Abstract smart contract to extend ERC20s, in order to add streamings capability.
Each streaming contains an amount per second, a starting date, and ending date, a sender an a receiver. Can only exist one streaming between to addresses.
A flow between to addresses is a directed relationship which summarizes the streamings where sender address is the flow sender, and receiver address is the flow receiver. This concept allows to scale consulting over balances, because the contract doesn't need to loop over strreamings.
TODO: Add mainnet smart contract addresses
TODO: Add mainnet smart contract addresses
- First clone this repository to your computer.
$ git clone ...
$ cd erc20-streamable-extension/
- Then install the node modules.
$ npm install
- Create .env in the folder. Fill out all info needed on those files in according to .env.example file.
MNEMONIC=[the 12 mnemonic words]
INFURA_API_KEY=[your API key]
ETHER_SCAN_API_KEY=[your API key]
POLYGONSCAN_API_KEY=[your API key]
- Run development server using Truffle.
$ truffle develop
2. Deploy contracts.
$ truffle migrate
$ truffle migrate --network mumbai
$ truffle migrate --network mainnet
- Truffle Commands: https://www.trufflesuite.com/docs/truffle/reference/truffle-commands
- ERC-721: https://eips.ethereum.org/EIPS/eip-721
- IPFS https://ipfs.io/
- Bonding Curve https://coinmarketcap.com/alexandria/glossary/bonding-curve#:~:text=A%20bonding%20curve%20is%20a%20mathematical%20concept%20used%20to%20describe,pay%20slightly%20more%20for%20it.
- ChainLink Ethereum Price Feeds. https://docs.chain.link/docs/ethereum-addresses/
- Flash loan attack https://coinmarketcap.com/alexandria/article/what-are-flash-loan-attacks