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
NOTE:
Before run deploy scripts, please configure the
.envfile according to.env.examplefile.
- For
verify: if setfalse, the contract won't be verified during deployment, and vice versa.- For
upgrade: if setfalse, the script will deploy a new contract on the specified chain. Otherwise, the script will upgrade the contract.If you don't configure the
.envfile properly, the script will deploy a new contract and won't verify contract by default;
npm run deploy ropstenUnit 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.
If you have any security issue, please send to security@mask.io.