Randomly distribute NEAR & NFT rewards among users
Explore other projects
·
Report a bug
Mystery Boxes, a fascinating and dynamic concept, are a popular mechanism used to distribute rewards randomly among users in various domains, including online gaming, eCommerce, and marketing campaigns. These intriguing boxes offer participants an element of chance, suspense, and surprise, creating an engaging and thrilling experience.
💡 Before starting, please ensure that you have all the necessary installations completed
- Clone the repo
git clone https://github.com/nearuaguild/mystery-box.git
- Open project folder
cd mystery-box/contract
- Compile the project
./build.sh
near dev-deploy --wasmFile res/mystery_box.wasm
near call mystery_box.testnet new '{}' --accountId some_account.testnet
near call mystery_box.testnet add_near_reward '{"rarity": "epic", "amount": "100000000000000000000000", "capacity": "5"}' --accountId some_account.testnet --depositYocto 186000000000000000000000
near call mystery_box.testnet trust_nft_contract '{"contract_id": "some_nft_contract.testnet"}' --accountId some_account.testnet
near call some_nft_contract.testnet nft_transfer_call '{"token_id": "5", "receiver_id": "mystery_box.testnet", "msg": "epic"}' --accountId some_account.testnet --depositYocto 1
near call mystery_box.testnet mint '{"account_id": "another_account.testnet", "rarity": "legendary"}' --accountId denbite.testnet --depositYocto 1980000000000000000000
near call mystery_box.testnet claim '{"box_id": 1}' --accountId another_account.testnet --depositYocto 1
Open project folder
cd mystery-box/widget
Update widget_owner_id
property in each component with the address you want it deploy to
bos components deploy
Make sure to include the contract_id
(the address you deployed the Smart Contract to in the steps above) query parameter in the URL for the widget to function correctly after deploying it
Near Ukraine Guild is a fast-growing guild based in Ukraine, aimed at providing high-quality educational content and assistance to grow a strong community of developers/entrepreneurs/enthusiasts within the Near Protocol ecosystem
Our validator has been active for a few months now, and the funds it generates are being put towards sponsoring community activities
Join us now to stake and earn 10% APY
Click below to get started 👇
Based on LittleLink
See LICENSE.txt
for more information