Smart Contract proxy wallet for ERC-20/BEP-20 tokens.
The Suitcase can be put up for sale and its ownership can be transferred to the purchaser in a secure, trustless way.
You can read more about this project at our blog.
🗞 Winner of Binance Hackathon - The Future Is Now: https://gitcoin.co/issue/24656#:~:text=2%20Years%20Ago-,Bounty%20Paid,-(0xd9aa%E2%80%A66f20) https://gitcoin.co/hackathon/binance/projects/4293/suitcase/summary
An example instance of the contract has been deployed here.
- owner initiates the sale by calling
initiateSaleand specifying the asking price and who they want to sell to - the 'target' address can be set to the zero address (
0x0) to signify that anyone can buy the Suitcase, or set to a specific buyer address (e.g. if previously agreed) - the buyer calls
completeSaleand sends the asking price, thus becoming the new owner of the contract - the new owner can then sell the Suitcase to another person and so on
- the owner can cancel the sale while it's initiated but not yet completed by calling
cancelSale
Call the transfer function while specifying the ERC-20/BEP-20 address, the recipient and amount to move the tokens from the Suitcase to the recipient address.
The contract also has a proxy function that allows you to call an arbitrary address with arbitrary data on behalf of the Suitcase.
Optional:
truffle-flattenerto flatten the source code for easy submission tobscscanganache-clifor development
Run npm install
Optional:
npm install truffle-flattener -gnpm install ganache-cli -g
- provide
DEPLOYER_PRIVATE_KEYenvironment variable by using.envfile that you need to create (.env.exampleis provided as template) or by injecting the variable directly - run
npm run deploy:<target>:npm run deploy:bscTestnetto deploy to Binance Smart Chain Testnetnpm run deploy:bscMainnetto deploy to Binance Smart Chain Mainnet
Tests are located in test/ directory.
Run npm run test to execute the test suite.
- Website: https://chronologic.network/
- Twitter: https://twitter.com/chronologiceth
- Medium: https://blog.chronologic.network/
- Telegram: https://t.me/chronologicnetwork
- Github: https://github.com/chronologic/
