This project(RedPacket smart contract) is a Dapplet based on the Mask browser extension. Inspired by Red Packet. It enables you to put cryptocurrency tokens(ETH or ERC-20) into red packets and send them to your friends and family.
Besides, Mask Network developed a new red packet for ERC721/NFT token.
This is a hardhat project. To install required node.js modules
npm ciTo compile the solidity source code
npm run compileTo run ERC20 RedPacket unit test
npm run test:normalTo run ERC721/NFT RedPacket unit test
npm run test:erc721To deploy the smart contract on Ethereum ropsten testnet
npm run deploy:ropsten| Chain | Address |
|---|---|
| Mainnet | 0xaBBe1101FD8fa5847c452A6D70C8655532B03C33 |
| Ropsten | 0x0722507c3b776A6B205946592016e358B0D34c3F |
| BSC | 0x0ca42C178e14c618c81B8438043F27d9D38145f6 |
| Matic | 0x93e0b87A0aD0C991dc1B5176ddCD850c9a78aabb |
| Rinkeby-Arbitrum | 0x4A77E797031257db72F7D2C3Ec08a4FAc5c8CfE9 |
| Arbitrum | 0x83D6b366f21e413f214EB077D5378478e71a5eD2 |
| xDai | 0x54a0A221C25Fc0a347EC929cFC5db0be17fA2a2B |
Unit test and performance(gas consumption) results, please see test report and gas consumption test report.
Change, please see Change log for changes.
Any contribution is welcomed to make it better.
If you have any questions, please create an issue.