{"id":18340387,"url":"https://github.com/dimensiondev/mysterybox","last_synced_at":"2026-03-14T20:26:32.637Z","repository":{"id":37450535,"uuid":"386613352","full_name":"DimensionDev/MysteryBox","owner":"DimensionDev","description":null,"archived":false,"fork":false,"pushed_at":"2023-08-14T08:26:17.000Z","size":2853,"stargazers_count":25,"open_issues_count":2,"forks_count":16,"subscribers_count":10,"default_branch":"master","last_synced_at":"2025-03-21T18:22:38.970Z","etag":null,"topics":["mysterybox","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}},"created_at":"2021-07-16T11:28:57.000Z","updated_at":"2024-03-16T06:49:33.000Z","dependencies_parsed_at":"2022-09-07T23:30:14.519Z","dependency_job_id":null,"html_url":"https://github.com/DimensionDev/MysteryBox","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DimensionDev%2FMysteryBox","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DimensionDev%2FMysteryBox/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DimensionDev%2FMysteryBox/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DimensionDev%2FMysteryBox/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DimensionDev","download_url":"https://codeload.github.com/DimensionDev/MysteryBox/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247440739,"owners_count":20939223,"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","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":["mysterybox","smart-contracts","solidity"],"created_at":"2024-11-05T20:22:22.136Z","updated_at":"2026-03-14T20:26:32.589Z","avatar_url":"https://github.com/DimensionDev.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# MysteryBox Smart Contract\n\n## Brief introduction\n\nMysteryBox Smart Contract is an Ethereum smart contract for people to sell/buy NFT tokens. Inspired by [Fukubukuro](https://en.wikipedia.org/wiki/Fukubukuro), people can put NFT(s) in a box and customers/players can pick an NFT(randomly).\n\nFor design details, please see [API document](docs/API.md).\n\n## Getting Started\n\n### Project setup\n\nThis project has [`git submodules`](https://git-scm.com/book/en/v2/Git-Tools-Submodules). You need to initialize these submodules first.\n\n```bash\ngit submodule update --init --recursive\n```\n\nTo 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 unit test:\n\n```bash\nnpm run test\n```\n\nTo deploy the smart contract on Ethereum `rinkeby` testnet:\n\n```bash\nnpm run deploy rinkeby\n```\n\nUsing the [`helper.ts`](helper.ts) script to set up the deployed smart contracts.\n\n### Troubleshoot \u0026 Tips\n\n- This project is powered by [hardhat](https://hardhat.org/).\n    You can change your network configuration in `hardhat.config.ts` file.\n- This smart contract involves some _randomness_, hence, the estimated gas consumption is probably not accurate. To make sure `transaction gas limit` is large enough, we need to give `a larger gas consumption`.\n\n## Deployed Contract Address\n\n### MysteryBox \u0026 MaskTestNFT\n\n\u003c!-- begin main --\u003e\n\n| Chain               | MysteryBox                             | MaskTestNFT                             |\n| ------------------- | -------------------------------------- | --------------------------------------- |\n| mainnet             | [`0x294428f0`][mb-mainnet]             | [`0x56136E69`][nft-mainnet]             |\n| ropsten             | [`0xc7387b6A`][mb-ropsten]             | [`0x4c73F4DC`][nft-ropsten]             |\n| rinkeby             | [`0xF8ED169B`][mb-rinkeby]             | [`0x0c8FB5C9`][nft-rinkeby]             |\n| bsc                 |                                        | [`0xa8518287`][nft-bsc]                 |\n| matic               | [`0x02F98667`][mb-matic]               | [`0x49C2a3D9`][nft-matic]               |\n| goerli              | [`0xd4ABB07c`][mb-goerli]              | [`0xcdE281B3`][nft-goerli]              |\n| fantom              | [`0x19f179D7`][mb-fantom]              | [`0x05ee315E`][nft-fantom]              |\n| celo                | [`0x578a7Fee`][mb-celo]                | [`0x066804d9`][nft-celo]                |\n| avalanche           | [`0x05ee315E`][mb-avalanche]           | [`0x81246335`][nft-avalanche]           |\n| optimism_kovan      | [`0x3eadcFB5`][mb-optimism_kovan]      | [`0x7DBA5446`][nft-optimism_kovan]      |\n| optimism            | [`0xF9F7C149`][mb-optimism]            | [`0x578a7Fee`][nft-optimism]            |\n| aurora              | [`0x5B966f3a`][mb-aurora]              | [`0x54a0A221`][nft-aurora]              |\n| fuse                | [`0x5B966f3a`][mb-fuse]                | [`0x54a0A221`][nft-fuse]                |\n| boba                | [`0x5B966f3a`][mb-boba]                |                                         |\n| moonriver           | [`0x6cc1b105`][mb-moonriver]           |                                         |\n| conflux_espace_test | [`0x4c64b524`][mb-conflux_espace_test] | [`0xc29afd93`][nft-conflux_espace_test] |\n| conflux_espace      | [`0x4c64b524`][mb-conflux_espace]      | [`0xc29afd93`][nft-conflux_espace]      |\n| harmony_test        | [`0x4fda6d9b`][mb-harmony_test]        | [`0xd48bc506`][nft-harmony_test]        |\n| harmony             | [`0xDc0905F2`][mb-harmony]             | [`0x677f7bba`][nft-harmony]             |\n| metis_test          | [`0x5B966f3a`][mb-metis_test]          | [`0x981be454`][nft-metis_test]          |\n| metis               | [`0x981be454`][mb-metis]               | [`0x96c7D011`][nft-metis]               |\n| kardia              | [`0xbC7d9898`][mb-kardia]              | [`0x8D03d9b4`][nft-kardia]              |\n| astar               | [`0x041Bdc5b`][mb-astar]               | [`0x7E0aa694`][nft-astar]               |\n| base                | [`0xc3e62b2C`][mb-base]                | [`0x081ea643`][nft-base]                |\n| base_goerli         | [`0x8D03d9b4`][mb-base_goerli]         | [`0x3387a7e7`][nft-base_goerli]         |\n\n[mb-mainnet]: https://etherscan.io/address/0x294428f04b0F9EbC49B7Ad61E2736ebD6808c145\n[mb-ropsten]: https://ropsten.etherscan.io/address/0xc7387b6Ac310ae15576451d2d37058711331105c\n[mb-rinkeby]: https://rinkeby.etherscan.io/address/0xF8ED169BC0cdA735A88d32AC10b88AA5B69181ac\n[mb-matic]: https://polygonscan.com/address/0x02F98667b3A1202a320F67a669a5e4e451fD0cc1\n[mb-goerli]: https://goerli.etherscan.io/address/0xd4ABB07c7f6D57C17812520c9Ea5d597c7Bf09Ec\n[mb-fantom]: https://ftmscan.com/address/0x19f179D7e0D7d9F9d5386afFF64271D98A91615B\n[mb-celo]: https://explorer.celo.org/address/0x578a7Fee5f0D8CEc7d00578Bf37374C5b95C4b98\n[mb-avalanche]: https://snowtrace.io/address/0x05ee315E407C21a594f807D61d6CC11306D1F149\n[mb-optimism_kovan]: https://kovan-optimistic.etherscan.io/address/0x3eadcFB5FbCEd62B07DDB41aeACFCbff601cf36B\n[mb-optimism]: https://optimistic.etherscan.io/address/0xF9F7C1496c21bC0180f4B64daBE0754ebFc8A8c0\n[mb-aurora]: https://explorer.mainnet.aurora.dev/address/0x5B966f3a32Db9C180843bCb40267A66b73E4f022\n[mb-fuse]: https://explorer.fuse.io/address/0x5B966f3a32Db9C180843bCb40267A66b73E4f022\n[mb-boba]: https://blockexplorer.boba.network/address/0x5B966f3a32Db9C180843bCb40267A66b73E4f022\n[mb-moonriver]: https://moonriver.moonscan.io/address/0x6cc1b1058F9153358278C35E0b2D382f1585854B\n[mb-conflux_espace_test]: https://evmtestnet.confluxscan.io/address/0x4c64b52476902430f56870d51d18529737acfa2f\n[mb-conflux_espace]: https://evm.confluxscan.io/address/0x4c64b52476902430f56870d51d18529737acfa2f\n[mb-harmony_test]: https://explorer.pops.one/address/0x4fda6d9bb68af18e5d686555b18ccea7c82e0a3f\n[mb-harmony]: https://explorer.harmony.one/address/0xDc0905F2Dac875E29A36f22F1Ea046e063875D3e\n[mb-metis_test]: https://stardust-explorer.metis.io/address/0x5B966f3a32Db9C180843bCb40267A66b73E4f022\n[mb-metis]: https://andromeda-explorer.metis.io/address/0x981be454a930479d92C91a0092D204b64845A5D6\n[mb-kardia]: https://explorer.kardiachain.io/address/0xbC7d98985966f56A66B0cB5F23d865676dc2ac84\n[mb-astar]: https://blockscout.com/astar/address/0x041Bdc5b713aFc3AA06b9511E1e55552138b139A\n[mb-base]: https://basescan.org/address/0xc3e62b2CC70439C32a381Bfc056aCEd1d7162cef\n[mb-base_goerli]: https://goerli.basescan.org/address/0x8D03d9b43e98Cc2f790Be4E96503fD0CcFd04a2D\n[nft-mainnet]: https://etherscan.io/address/0x56136E69A5771436a9598804c5eA792230c21181\n[nft-ropsten]: https://ropsten.etherscan.io/address/0x4c73F4DC55Ef094259570892F52717cF19c62283\n[nft-rinkeby]: https://rinkeby.etherscan.io/address/0x0c8FB5C985E00fb1D002b6B9700084492Fb4B9A8\n[nft-bsc]: https://bscscan.com/address/0xa8518287BfB7729A6CC2d67f757eB2074DA84913\n[nft-matic]: https://polygonscan.com/address/0x49C2a3D93C4B94eAd101d9936f1ebCA634394a78\n[nft-goerli]: https://goerli.etherscan.io/address/0xcdE281B32b629f2e89E5953B674E1E507e6dabcF\n[nft-fantom]: https://ftmscan.com/address/0x05ee315E407C21a594f807D61d6CC11306D1F149\n[nft-celo]: https://explorer.celo.org/address/0x066804d9123bF2609Ed4A4a40b1177a9c5a9Ed51\n[nft-avalanche]: https://snowtrace.io/address/0x812463356F58fc8194645A1838ee6C52D8ca2D26\n[nft-optimism_kovan]: https://kovan-optimistic.etherscan.io/address/0x7DBA54465650ee4077E295d81130a21D5eDc04F9\n[nft-optimism]: https://optimistic.etherscan.io/address/0x578a7Fee5f0D8CEc7d00578Bf37374C5b95C4b98\n[nft-aurora]: https://explorer.mainnet.aurora.dev/address/0x54a0A221C25Fc0a347EC929cFC5db0be17fA2a2B\n[nft-fuse]: https://explorer.fuse.io/address/0x54a0A221C25Fc0a347EC929cFC5db0be17fA2a2B\n[nft-conflux_espace_test]: https://evmtestnet.confluxscan.io/address/0xc29afd93409226ce9f8a358790f8830371ee33e7\n[nft-conflux_espace]: https://evm.confluxscan.io/address/0xc29afd93409226ce9f8a358790f8830371ee33e7\n[nft-harmony_test]: https://explorer.pops.one/address/0xd48bc506a9fe6024f6b8a401ef91ae1db6b83f90\n[nft-harmony]: https://explorer.harmony.one/address/0x677f7bba13108649ecff068e8b3d55631327b83a\n[nft-metis_test]: https://stardust-explorer.metis.io/address/0x981be454a930479d92C91a0092D204b64845A5D6\n[nft-metis]: https://andromeda-explorer.metis.io/address/0x96c7D011cdFD467f551605f0f5Fce279F86F4186\n[nft-kardia]: https://explorer.kardiachain.io/address/0x8D03d9b43e98Cc2f790Be4E96503fD0CcFd04a2D\n[nft-astar]: https://blockscout.com/astar/address/0x7E0aa694E51551Bcc0e669180123AAcB1debC5fd\n[nft-base]: https://basescan.org/address/0x081ea6437E73F3b4504b131443309404a9bC2054\n[nft-base_goerli]: https://goerli.basescan.org/address/0x3387a7e7B6A2ba6C2cE3482C14a5d6c6D1F03Ff5\n\n\u003c!-- end main --\u003e\n\n### Qualification Contract\n\n\u003c!-- begin Qualification --\u003e\n\n| Chain               | WhitelistQlf               | SigVerifyQlf               | MaskHolderQlf              | MerkleProofQlf             |\n| ------------------- | -------------------------- | -------------------------- | -------------------------- | -------------------------- |\n| ropsten             | [`0x3011dF5b`][wl-ropsten] |                            |                            |                            |\n| rinkeby             | [`0x50eCEebb`][wl-rinkeby] | [`0x9a656528`][sv-rinkeby] | [`0x26c3DE14`][mh-rinkeby] | [`0x450A1185`][mp-rinkeby] |\n| goerli              | [`0xfE14631D`][wl-goerli]  |                            |                            |                            |\n| aurora              | [`0x83D6b366`][wl-aurora]  |                            |                            |                            |\n| fuse                | [`0x83D6b366`][wl-fuse]    |                            |                            |                            |\n\n[wl-ropsten]: https://ropsten.etherscan.io/address/0x3011dF5b0Be18A56693cC062Cb61a160dca571C3\n[wl-rinkeby]: https://rinkeby.etherscan.io/address/0x50eCEebb7360Efb93094dDEA692e04274E548b1d\n[sv-rinkeby]: https://rinkeby.etherscan.io/address/0x9a656528700493348132823C6A3C59CdFa48283d\n[mh-rinkeby]: https://rinkeby.etherscan.io/address/0x26c3DE1430dc105b205F47fc497ED3015768C9B0\n[mp-rinkeby]: https://rinkeby.etherscan.io/address/0x450A11854F41d6E958e258665e593929E3bf111D\n[wl-goerli]: https://goerli.etherscan.io/address/0xfE14631D3C2364171694EBcA05CAD08A54B2b07a\n[wl-aurora]: https://explorer.mainnet.aurora.dev/address/0x83D6b366f21e413f214EB077D5378478e71a5eD2\n[wl-fuse]: https://explorer.fuse.io/address/0x83D6b366f21e413f214EB077D5378478e71a5eD2\n\n\u003c!-- end Qualification --\u003e\n\n[testnet $MASK token address](https://github.com/DimensionDev/misc_smart_contract#masktoken---testnet-only)\n\n### Known issue and limitation\n\nThis smart contract only support [Enumerable ERC721 NFT](https://docs.openzeppelin.com/contracts/4.x/api/token/erc721#ERC721Enumerable).\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/MysteryBox/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%2Fmysterybox","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdimensiondev%2Fmysterybox","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdimensiondev%2Fmysterybox/lists"}