Drops
Use Drops to distribute ERC20 tokens, NFTs, items, or achievements to your community. All you have to do is upload a spreadsheet listing the amount of rewards that each community member should receive.
Alternatively, you can use Drops to automate the distribution of rewards to players occupying top places in your game’s leaderboards.
Dropper contract
Dropper is a contract that allows you to distribute tokens to your users, with them submitting the transactions to claim those tokens.
It can distribute ERC20 tokens, ERC721 tokens, and ERC1155 tokens. It can also be used to mint Terminus tokens using an authorized claim workflow.
Contract name | Immutable or Upgradable | Deployment | CLI | Solidity interface | ABI |
---|---|---|---|---|---|
DropperFacet |
Upgradable | web3cli core dropper-gogogo |
web3cli dropper |
IDropper |
abi/DropperFacet.json |
Dropper (legacy version) |
Immutable | web3cli dropper-v1 deploy |
web3cli dropper-v1 |
n/a | abi/Dropper.json |
Workflow
To use drops, you will first have to deploy a Dropper contract. This can be done using the web3cli
command line utility in web3 repo. That's a Python program; instructions to install it are in the README.
The command to deploy a Dropper contract is web3cli core dropper-gogogo
. Try web3cli core dropper-gogogo –help
to see what parameters you need to provide.
The deployment is complex because we use the Terminus protocol to manage role-based permissions on the Dropper contract. That means you’ll need to also deploy a Terminus contract using web3cli core terminus-gogogo
. Reach out to us on Discord for the details of the deployment from CLI.
We are planning to build a web UI for these deployments in the future.
To manage token drops: 1. Create a free Moonstream account here. 2. Go to Moonstream Portal and click Drops.
Lootboxes
Before dropping tokens to players, you can bundle them into fully on-chain randomizable lootboxes. These are implemented as Terminus tokens. Lootboxes come in two varieties - deterministic and random.
Random lootboxes use decentralized, verifiable randomness to randomize the items that players receive when they open the lootbox.
Contract name | Immutable or Upgradable | Deployment | CLI | Solidity interface | ABI |
---|---|---|---|---|---|
Lootbox |
Immutable | web3cli lootbox deploy |
web3cli lootbox |
ILootbox |
abi/Lootbox.json |
Deploying a Lootbox contract can be done using the web3cli
command line utility in web3 repo. That's a Python program; instructions to install it are in the README.
Created: November 1, 2023