{"id":18340354,"url":"https://github.com/dimensiondev/redpacket","last_synced_at":"2025-08-12T22:37:03.212Z","repository":{"id":36559814,"uuid":"221168863","full_name":"DimensionDev/RedPacket","owner":"DimensionDev","description":null,"archived":false,"fork":false,"pushed_at":"2025-04-28T05:00:46.000Z","size":7002,"stargazers_count":18,"open_issues_count":15,"forks_count":6,"subscribers_count":14,"default_branch":"master","last_synced_at":"2025-04-28T06:21:43.417Z","etag":null,"topics":["redpacket","smart-contracts","solidity"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/DimensionDev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":".github/SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-11-12T08:35:49.000Z","updated_at":"2025-02-07T06:16:42.000Z","dependencies_parsed_at":"2023-02-13T17:41:17.454Z","dependency_job_id":"ed77094c-ebd9-4b15-8c1a-f3610845123b","html_url":"https://github.com/DimensionDev/RedPacket","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/DimensionDev/RedPacket","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DimensionDev%2FRedPacket","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DimensionDev%2FRedPacket/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DimensionDev%2FRedPacket/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DimensionDev%2FRedPacket/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DimensionDev","download_url":"https://codeload.github.com/DimensionDev/RedPacket/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DimensionDev%2FRedPacket/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270148082,"owners_count":24535693,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-12T02:00:09.011Z","response_time":80,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["redpacket","smart-contracts","solidity"],"created_at":"2024-11-05T20:22:14.764Z","updated_at":"2025-08-12T22:37:03.193Z","avatar_url":"https://github.com/DimensionDev.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# RedPacket\n\n## Introduction\n\nThis project(`RedPacket` smart contract) is a Dapplet based on the Mask browser extension. Inspired by [Red Packet](https://en.wikipedia.org/wiki/Red_envelope). It enables you to put cryptocurrency tokens(ETH or ERC-20) into red packets and send them to your friends and family.\n\nBesides, Mask Network developed a new red packet for ERC721/NFT token.\n\n## Getting Started\n\nThis is a hardhat project. To install required node.js modules\n\n```bash\nnpm ci\n```\n\nTo compile the solidity source code\n\n```bash\nnpm run compile\n```\n\nTo run ERC20 RedPacket unit test\n\n```bash\nnpm run test:normal\n```\n\nTo run ERC721/NFT RedPacket unit test\n\n```bash\nnpm run test:erc721\n```\n\nTo deploy the smart contract on Ethereum ropsten testnet\n\n\u003e **NOTE:**\n\u003e\n\u003e Before run deploy scripts, please configure the `.env` file according to `.env.example` file.\n\u003e\n\u003e - For `verify`: if set `false`, the contract won't be verified during deployment, and vice versa.\n\u003e - For `upgrade`: if set `false`, the script will deploy a new contract on the specified chain. Otherwise, the script will upgrade the contract.\n\u003e\n\u003e If you don't configure the `.env` file properly, the script will deploy a new contract and won't verify contract by default;\n\n```bash\nnpm run deploy ropsten\n```\n\n## Deployed Contract Address\n\n\u003c!-- begin RedPacket --\u003e\n\n| Chain               | HappyRedPacket                         | HappyRedPacket_ERC721                     |\n| ------------------- | -------------------------------------- | ----------------------------------------- |\n| mainnet             | [`0xaBBe1101`][rp-mainnet]             | [`0x8d285739`][rp721-mainnet]             |\n| ropsten             | [`0x0722507c`][rp-ropsten]             | [`0x8fF42e93`][rp721-ropsten]             |\n| bsc                 | [`0x0ca42C17`][rp-bsc]                 | [`0xf8968e1F`][rp721-bsc]                 |\n| matic               | [`0x93e0b87A`][rp-matic]               | [`0xf6Dc0427`][rp721-matic]               |\n| arbitrum_rinkeby    | [`0x4A77E797`][rp-arbitrum_rinkeby]    |                                           |\n| arbitrum            | [`0x83D6b366`][rp-arbitrum]            | [`0x561c5f3a`][rp721-arbitrum]            |\n| xdai                | [`0x54a0A221`][rp-xdai]                | [`0x561c5f3a`][rp721-xdai]                |\n| goerli              | [`0x8bF6b979`][rp-goerli]              | [`0x0a04e23f`][rp721-goerli]              |\n| fantom              | [`0x578a7Fee`][rp-fantom]              | [`0xF9F7C149`][rp721-fantom]              |\n| avalanche           | [`0xF9F7C149`][rp-avalanche]           | [`0x96c7D011`][rp721-avalanche]           |\n| celo                | [`0xab7b1be4`][rp-celo]                | [`0x96c7D011`][rp721-celo]                |\n| optimism_kovan      | [`0x68EDbfA3`][rp-optimism_kovan]      | [`0x556F63d7`][rp721-optimism_kovan]      |\n| optimism            | [`0x981be454`][rp-optimism]            | [`0x02Ea0720`][rp721-optimism]            |\n| aurora              | [`0x19f179D7`][rp-aurora]              | [`0x05ee315E`][rp721-aurora]              |\n| fuse                | [`0x561c5f3a`][rp-fuse]                | [`0x066804d9`][rp721-fuse]                |\n| boba                | [`0x578a7Fee`][rp-boba]                | [`0xF9F7C149`][rp721-boba]                |\n| moonriver           | [`0x578a7Fee`][rp-moonriver]           | [`0xF9F7C149`][rp721-moonriver]           |\n| conflux_espace      | [`0x96c7d011`][rp-conflux_espace]      | [`0x5b966f3a`][rp721-conflux_espace]      |\n| conflux_espace_test | [`0x913975af`][rp-conflux_espace_test] | [`0x71834a3f`][rp721-conflux_espace_test] |\n| harmony             | [`0xab7b1be4`][rp-harmony]             | [`0x83d6b366`][rp721-harmony]             |\n| harmony_test        | [`0x96c7d011`][rp-harmony_test]        | [`0x981be454`][rp721-harmony_test]        |\n| metis               | [`0x2cf91AD8`][rp-metis]               | [`0x81246335`][rp721-metis]               |\n| metis_test          | [`0xAb7B1bE4`][rp-metis_test]          | [`0x2cf91AD8`][rp721-metis_test]          |\n| kardia              | [`0x081ea643`][rp-kardia]              | [`0xc3e62b2C`][rp721-kardia]              |\n| astar               | [`0x2cF46Db8`][rp-astar]               | [`0xc3e62b2C`][rp721-astar]               |\n| base                | [`0x8D03d9b4`][rp-base]                | [`0xbC7d9898`][rp721-base]                |\n| base_goerli         | [`0x16f61cb3`][rp-base_goerli]         | [`0x727F8030`][rp721-base_goerli]         |\n| scroll_sepolia      | [`0x16f61cb3`][rp-scroll_sepolia]      | [`0x727F8030`][rp721-scroll_sepolia]      |\n| scroll              | [`0x16f61cb3`][rp-scroll]              | [`0x727F8030`][rp721-scroll]              |\n| x1_test             | [`0x977baB5f`][rp-x1_test]             | [`0xd81c16d7`][rp721-x1_test]             |\n| manta               | [`0x0Cc83D72`][rp-manta]               | [`0xB349AC5E`][rp721-manta]               |\n| linea               | [`0xB349AC5E`][rp-linea]               | [`0x8A42F700`][rp721-linea]               |\n| zksync_era          | [`0x5916FEE6`][rp-zksync_era]          | [`0x191805D4`][rp721-zksync_era]          |\n| x1                  | [`0xDb847f1D`][rp-x1]                  | [`0x977baB5f`][rp721-x1]                  |\n| sei                 | [`0xB349AC5E`][rp-sei]                 | [`0x8A42F700`][rp721-sei]                 |\n| lens_testnet        | [`0xE42da51a`][rp-lenstest]            | [`0x4F830a4e`][rp721-lenstest]            |\n| lens                | [`0x2CB304F1`][rp-lens]                | [`0x55E667E5`][rp721-lens]                |\n\n[rp-mainnet]: https://etherscan.io/address/0xaBBe1101FD8fa5847c452A6D70C8655532B03C33\n[rp-ropsten]: https://ropsten.etherscan.io/address/0x0722507c3b776A6B205946592016e358B0D34c3F\n[rp-bsc]: https://bscscan.com/address/0x0ca42C178e14c618c81B8438043F27d9D38145f6\n[rp-matic]: https://polygonscan.com/address/0x93e0b87A0aD0C991dc1B5176ddCD850c9a78aabb\n[rp-arbitrum_rinkeby]: https://rinkeby-explorer.arbitrum.io/address/0x4A77E797031257db72F7D2C3Ec08a4FAc5c8CfE9\n[rp-arbitrum]: https://explorer.arbitrum.io/address/0x83D6b366f21e413f214EB077D5378478e71a5eD2\n[rp-xdai]: https://blockscout.com/xdai/mainnet/address/0x54a0A221C25Fc0a347EC929cFC5db0be17fA2a2B\n[rp-goerli]: https://goerli.etherscan.io/address/0x8bF6b979286970860Adc75dc621cf1969b0bE66C\n[rp-fantom]: https://ftmscan.com/address/0x578a7Fee5f0D8CEc7d00578Bf37374C5b95C4b98\n[rp-avalanche]: https://snowtrace.io/address/0xF9F7C1496c21bC0180f4B64daBE0754ebFc8A8c0\n[rp-celo]: https://explorer.celo.org/address/0xab7b1be4233a04e5c43a810e75657eced8e5463b\n[rp-optimism_kovan]: https://kovan-optimistic.etherscan.io/address/0x68EDbfA3E564C987FaaAB54f4FD1E7567D4151Dd\n[rp-optimism]: https://optimistic.etherscan.io/address/0x981be454a930479d92C91a0092D204b64845A5D6\n[rp-aurora]: https://explorer.mainnet.aurora.dev/address/0x19f179D7e0D7d9F9d5386afFF64271D98A91615B\n[rp-fuse]: https://explorer.fuse.io/address/0x561c5f3a19871ecb1273D6D8eCc276BeEDa5c8b4\n[rp-boba]: https://blockexplorer.boba.network/address/0x578a7Fee5f0D8CEc7d00578Bf37374C5b95C4b98\n[rp-moonriver]: https://moonriver.moonscan.io/address/0x578a7Fee5f0D8CEc7d00578Bf37374C5b95C4b98\n[rp-conflux_espace]: https://evm.confluxscan.io/address/0x96c7d011cdfd467f551605f0f5fce279f86f4186\n[rp-conflux_espace_test]: https://evmtestnet.confluxscan.io/address/0x913975af2bb8a6be4100d7dc5e9765b77f6a5d6c\n[rp-harmony]: https://explorer.harmony.one/address/0xab7b1be4233a04e5c43a810e75657eced8e5463b\n[rp-harmony_test]: https://explorer.pops.one/address/0x96c7d011cdfd467f551605f0f5fce279f86f4186\n[rp-metis]: https://andromeda-explorer.metis.io/address/0x2cf91AD8C175305EBe6970Bd8f81231585EFbd77\n[rp-metis_test]: https://stardust-explorer.metis.io/address/0xAb7B1bE4233A04e5C43a810E75657ECED8E5463B\n[rp-kardia]: https://explorer.kardiachain.io/address/0x081ea6437E73F3b4504b131443309404a9bC2054\n[rp-astar]: https://blockscout.com/astar/address/0x2cF46Db820e279c5fBF778367D49d9C931D54524\n[rp-base]: https://basescan.org/address/0x8D03d9b43e98Cc2f790Be4E96503fD0CcFd04a2D\n[rp-base_goerli]: https://goerli.basescan.org/address/0x16f61cb37169523635B6761f3C946892fb3c18fB\n[rp-scroll_sepolia]: https://sepolia-blockscout.scroll.io/address/0x16f61cb37169523635B6761f3C946892fb3c18fB\n[rp-scroll]: https://scrollscan.com/address/0x16f61cb37169523635B6761f3C946892fb3c18fB\n[rp-x1_test]: https://okx.com/explorer/x1-test/address/0x977baB5f7e2cEd0C91fDA890Ed1DBDfD3Ee9AE81\n[rp-manta]: https://pacific-explorer.manta.network/address/0x0Cc83D728CB8dDC5e0C9Aeec375cF08a68Ef9bDF\n[rp-linea]: https://lineascan.build/address/0xB349AC5E5C037C2ecb2AE9fCDc8F122b5f384620\n[rp-zksync_era]: https://explorer.zksync.io/address/0x5916FEE647A7f0aC234D6828Fe76636bd730B40A\n[rp-x1]: https://okx.com/explorer/xlayer/address/0xDb847f1D8099C5b15519ECfd0b0C981d719bccE6\n[rp-sei]: https://seitrace.com/address/0xB349AC5E5C037C2ecb2AE9fCDc8F122b5f384620\n[rp-lenstest]: https://explorer.testnet.lens.xyz/address/0xE42da51a5BEef75b7f3C973021cbEf039c0b5a35\n[rp-lens]: https://explorer.lens.xyz/address/0x2CB304F176775Fcb4D9763f488c486B0Af9A6Bf8\n[rp721-mainnet]: https://etherscan.io/address/0x8d285739523FC2Ac8eC9c9C229ee863C8C9bF8C8\n[rp721-ropsten]: https://ropsten.etherscan.io/address/0x8fF42e93C19E44763FD1cD07b9E04d13bA07AD3f\n[rp721-bsc]: https://bscscan.com/address/0xf8968e1Fcf1440Be5Cec7Bb495bcee79753d5E06\n[rp721-matic]: https://polygonscan.com/address/0xf6Dc042717EF4C097348bE00f4BaE688dcaDD4eA\n[rp721-arbitrum]: https://explorer.arbitrum.io/address/0x561c5f3a19871ecb1273D6D8eCc276BeEDa5c8b4\n[rp721-xdai]: https://blockscout.com/xdai/mainnet/address/0x561c5f3a19871ecb1273D6D8eCc276BeEDa5c8b4\n[rp721-goerli]: https://goerli.etherscan.io/address/0x0a04e23f95E9DB2Fe4C31252548F663fFe3AAe4d\n[rp721-fantom]: https://ftmscan.com/address/0xF9F7C1496c21bC0180f4B64daBE0754ebFc8A8c0\n[rp721-avalanche]: https://snowtrace.io/address/0x96c7D011cdFD467f551605f0f5Fce279F86F4186\n[rp721-celo]: https://explorer.celo.org/address/0x96c7D011cdFD467f551605f0f5Fce279F86F4186\n[rp721-optimism_kovan]: https://kovan-optimistic.etherscan.io/address/0x556F63d7467c729034585C3e50e54e582222b491\n[rp721-optimism]: https://optimistic.etherscan.io/address/0x02Ea0720254F7fa4eca7d09A1b9C783F1020EbEF\n[rp721-aurora]: https://explorer.mainnet.aurora.dev/address/0x05ee315E407C21a594f807D61d6CC11306D1F149\n[rp721-fuse]: https://explorer.fuse.io/address/0x066804d9123bF2609Ed4A4a40b1177a9c5a9Ed51\n[rp721-boba]: https://blockexplorer.boba.network/address/0xF9F7C1496c21bC0180f4B64daBE0754ebFc8A8c0\n[rp721-moonriver]: https://moonriver.moonscan.io/address/0xF9F7C1496c21bC0180f4B64daBE0754ebFc8A8c0\n[rp721-conflux_espace]: https://evm.confluxscan.io/address/0x5b966f3a32db9c180843bcb40267a66b73e4f022\n[rp721-conflux_espace_test]: https://evmtestnet.confluxscan.io/address/0x71834a3fdea3e70f14a93ed85c6be70925d0cad9\n[rp721-harmony]: https://explorer.harmony.one/address/0x83d6b366f21e413f214eb077d5378478e71a5ed2\n[rp721-harmony_test]: https://explorer.pops.one/address/0x981be454a930479d92c91a0092d204b64845a5d6\n[rp721-metis]: https://andromeda-explorer.metis.io/address/0x812463356F58fc8194645A1838ee6C52D8ca2D26\n[rp721-metis_test]: https://stardust-explorer.metis.io/address/0x2cf91AD8C175305EBe6970Bd8f81231585EFbd77\n[rp721-kardia]: https://explorer.kardiachain.io/address/0xc3e62b2CC70439C32a381Bfc056aCEd1d7162cef\n[rp721-astar]: https://blockscout.com/astar/address/0xc3e62b2CC70439C32a381Bfc056aCEd1d7162cef\n[rp721-base]: https://basescan.org/address/0xbC7d98985966f56A66B0cB5F23d865676dc2ac84\n[rp721-base_goerli]: https://goerli.basescan.org/address/0x727F8030964CCEC6B0E344399c8d8E2B4C837351\n[rp721-scroll_sepolia]: https://sepolia-blockscout.scroll.io/address/0x727F8030964CCEC6B0E344399c8d8E2B4C837351\n[rp721-scroll]: https://scrollscan.com/address/0x727F8030964CCEC6B0E344399c8d8E2B4C837351\n[rp721-x1_test]: https://okx.com/explorer/x1-test/address/0xd81c16d71432d7df04575ffe9fed76f837fea0cc\n[rp721-manta]: https://pacific-explorer.manta.network/address/0xB349AC5E5C037C2ecb2AE9fCDc8F122b5f384620\n[rp721-linea]: https://lineascan.build/address/0x8A42F70047a99298822dD1dbA34b454fc49913F2\n[rp721-zksync_era]: https://explorer.zksync.io/address/0x191805D475ea34B9FF941cf9be615FD87997cC5A\n[rp721-x1]: https://okx.com/explorer/xlayer/address/0x977baB5f7e2cEd0C91fDA890Ed1DBDfD3Ee9AE81\n[rp721-sei]: https://seitrace.com/address/0x8A42F70047a99298822dD1dbA34b454fc49913F2\n[rp721-lenstest]: https://explorer.testnet.lens.xyz/address/0x4F830a4ecBDDE6f95fD9e7620D0769B66502737F\n[rp721-lens]: https://explorer.lens.xyz/address/0x55E667E5d35C34C0681eC1b2D5fA596c518aa05f\n\n\u003c!-- end RedPacket --\u003e\n\n## Test report\n\nUnit test and performance(gas consumption) results, please see [test report](docs/test_report.txt) and [gas consumption test report](docs/performance_test.txt).\n\n## Version history\n\nChange, please see [Change log](docs/CHANGELOG.md) for changes.\n\n## Contribute\n\nAny contribution is welcomed to make it better.\n\nIf you have any questions, please create an [issue](https://github.com/DimensionDev/RedPacket/issues).\n\n## Security report\n\nIf you have any security issue, please send to \u003csecurity@mask.io\u003e.\n\n## License\n\n[MIT LICENSE](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdimensiondev%2Fredpacket","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdimensiondev%2Fredpacket","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdimensiondev%2Fredpacket/lists"}