Skip to content

dao-envelop/protocolV0

Repository files navigation

NIFTSY protocol

Collateral-backed and price discovery cross-chain protocol to provide NFT with inner value and liquidity.
https://envelop.is


Community Fork Notice

This protocol version is a community fork, which means:

  1. No business license of DAO Envelop and/or any other DAOs, legal entities, partnerships, or associations, as well as business licenses of individual developers, applies to it.
  2. The license of this fork is the MIT-License.
  3. The creator of this community fork is DAO Envelop.
  4. Date of creation: 2022-04-19
  5. More information about DAO: http://dao.envelop.is

Protocol Conracts

WrapperBase - WrapperBase - main protocol contract with Wrap and UnWrap functionality. Main features:

  • ability add native chain collateral(ETH, BNB, ...);
  • ability add each-transfer-accumulated fee;
  • author royalty from each erc721 token transfer;

WrapperWithERC20Collateral - extending for WrapperBase, add features for ability add whitelisted ERC20 collateral to wrapped NFT.

Tests

We use Brownie framework for developing and unit test. For run tests first please install it

brownie pm install OpenZeppelin/openzeppelin-contracts@4.1.0
brownie test

In ./tests directory you can find test case file long_test_wrapper_unWrap721_2.py which is not run with brownie test command becaus it take along time (5..10 min). But for run it please use : brownie test ./tests/long_test_wrapper_unWrap721_2.py

Don't forget ganache-cli

Deployments Info

Deploy is very simple. You can find workflow in fixtures

Ethereum Mainnet deploy ALFA

NIFTSY ERC20 token
https://etherscan.io/address/0x7728cd70b3dD86210e2bd321437F448231B81733#code

WrapperWithERC20Collateral
https://etherscan.io/address/0xc2571eBbc8F2af4f832bB8a2D3A4b0932Ce24773#code


https://etherscan.io/address/0xDF6F4408497DFe745b116138B9338490366b2303#code

techERC20
https://etherscan.io/address/0x6426Bc3F86E554f44bE7798c8D1f3482Fb7BB68C#code

TransferRoyaltyModel01
https://etherscan.io/address/0x6664c8118284b3F5ECB47c2105cAa544Ab0Cf75B#code

Farming
https://etherscan.com/address/0xD5E1cDfCf6A9fdc68997a90E8B5ee962e536a0D8#code

Binance Smart Chain deploy ALFA

NIFTSY BEP20 token https://bscscan.com/address/0x7728cd70b3dD86210e2bd321437F448231B81733

techERC20
https://bscscan.com/address/0x6426Bc3F86E554f44bE7798c8D1f3482Fb7BB68C#code

WrapperWithERC20Collateral
https://bscscan.com/address/0xc2571eBbc8F2af4f832bB8a2D3A4b0932Ce24773#code

TransferRoyaltyModel01
https://bscscan.com/address/0x6664c8118284b3F5ECB47c2105cAa544Ab0Cf75B#code

Farming
https://bscscan.com/address/0xD5E1cDfCf6A9fdc68997a90E8B5ee962e536a0D8#code

Polygon Mainnet

techERC20
https://polygonscan.com/address/0x6426Bc3F86E554f44bE7798c8D1f3482Fb7BB68C#code

WrapperWithERC20Collateral
https://polygonscan.com/address/0xc2571eBbc8F2af4f832bB8a2D3A4b0932Ce24773#code

TransferRoyaltyModel01
https://polygonscan.com/address/0x6664c8118284b3F5ECB47c2105cAa544Ab0Cf75B#code

Farming
https://polygonscan.com/address/0xD5E1cDfCf6A9fdc68997a90E8B5ee962e536a0D8#code

NIFTSY ERC20 token*
https://polygonscan.com/address/0x432cdbC749FD96AA35e1dC27765b23fDCc8F5cf1

Avalanche Mainnet

techERC20
https://snowtrace.io/address/0x6426Bc3F86E554f44bE7798c8D1f3482Fb7BB68C#code


BSC Testnet

TechToken
https://testnet.bscscan.com/address/0xCee6a757183004238aB6F4885435dE427e23D3E7#code

WrapperWithERC20Collateral
https://testnet.bscscan.com/address/0xF901970cDD8df7977f2850fd70B58E02ecA241F8#code

TransferRoyaltyModel01 https://testnet.bscscan.com/address/0x2D551c84949BAF16FB1A5A7f6b6961b287100a88#code

Matic Polygon Testnet (Mumbai)

TechToken
https://mumbai.polygonscan.com/address/0x136aC25c56b24e5E117D71ff74c62D8539d2Ee29#code

WrapperWithERC20Collateral
https://mumbai.polygonscan.com/address/0x109Cb1f5a4851104C9Db27188C8158035D3303C1#code

TransferRoyaltyModel01
https://mumbai.polygonscan.com/address/0x20e30c7c1295FCD1A78528078b83aaf16C5CE032#code

Deploy 20210830 Rinkeby Pre Prod Deploy

WrapperWithERC20Collateral
https://rinkeby.etherscan.io/address/0x6d3e28b5Fa8d13A08Cbbf8151D86f77829977c34#code

techERC20 https://rinkeby.etherscan.io/address/0xbbe47167666100eC33de9079c1EE7B150cCbD874#code

TransferRoyaltyModel01 https://rinkeby.etherscan.io/address/0x64820a2cB3367C9b1416a101682e3CAc7E7392a9#code

Gas Consumption Info

WrapperWithERC20Collateral <Contract>
   ├─ constructor                -  avg : 4145117  low: 4145117  high: 4145117
   ├─ wrap721                    -  avg :  372649  low:   24713  high:  429754
   ├─ transferFrom               -  avg :  114051  low:   23486  high:  177410
   ├─ unWrap721                  -  avg :  122923  low:   28379  high:  233867
   ├─ addERC20Collateral         -  avg :  103729  low:   29117  high:  123936
   ├─ setFee                     -  avg :   67448  low:   23069  high:   70191
   ├─ approve                    -  avg :   46901  low:   46894  high:   46906
   ├─ setCollateralStatus        -  avg :   44723  low:   23077  high:   45254
   ├─ editPartnersItem           -  avg :   37254  low:   14771  high:   44794
   ├─ addNativeCollateral        -  avg :   29972  low:   22525  high:   43430
   └─ setMaxERC20CollateralCount -  avg :   29588  low:   22535  high:   29588



Deploy 20210627 Rinkeby ALFA

WrapperWithERC20Collateral

https://rinkeby.etherscan.io/address/0x937DbB747f69df066e0BA60cf673feB082c3514a#code

Niftsy ERC20

https://rinkeby.etherscan.io/address/0x1E991eA872061103560700683991A6cF88BA0028#code

ERC721MOck

https://rinkeby.etherscan.io/address/0xB71e481C0EB22A3f6Bb54C11128bC673C47a68E5#code

20210421 Testnet Binance Smart Chain

wrapper

https://testnet.bscscan.com/address/0x45198c41fb63Ad4119E52587ACc968944633254D#code

NIFTSY ERC20

https://testnet.bscscan.com/address/0xCEFe82aDEd5e1f8c2610256629d651840601EAa8#code

ERC721MOck

https://testnet.bscscan.com/address/0x3ddaeC66470Ca68eb20dfBfC8f3287B94e4320a8#code


Deploy v0.0.2 20210330

wrapper

https://rinkeby.etherscan.io/address/0x510CC3fB0E685Ff20768298d62b231a1A1df35c6#code

ERC721MOck

https://rinkeby.etherscan.io/address/0xB71e481C0EB22A3f6Bb54C11128bC673C47a68E5#code


About

Smart contracts for Niftsy protocol

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published