Dismantle
Dismantle is a mechanic used to break redundant items for crafting materials.
Here are some common scenarios for dismantling:
- Dismantle items into resources. User can dismantle ERC721 token for several ERC1155 tokens. This way sword becomes an X iron
To start dismantling items you have to create items and resources first
Full steps to create and test Dismantle from scratch: Admin-ui
- Deploy ERC20 Simple contract
- Mint 10 ERC20 tokens to the Owner (then add ERC20 token to Metamask to see balance)
- Deploy ERC721 Simple contract
- Create ERC721 Template with price 1 ETH
- Mint 1 ERC721 token to Owner (then add ERC721 token to Metamask to see balance)
- Create Dismantle rule (Price - ERC721 Template, Item - 10 ERC20 Tokens)
Market-ui
- On the ERC721 Token page - click Dismantle button
- Confirm approve token spend for ERC721 token
- Confirm Dismantle of ERC721 token
- Check 2 things: ERC721 token burned, ERC20 balance doesn't change (as 10 ERC20 Tokens will be transferred from Owner to Owner)