This is a proxy contract for RMRK to enable lazy minting.
RMRK is designed in a way that all tokens in collection needs to be pre-minted and equipped with assets to be useful, which increases costs for a collection creators.
This contract enables lazy token minting on RMRK contract. The proxy contract has single method mint
which does the following:
- mints RMRK token
- adds random asset to the token
- transfers the token to the method caller
To be able to use this contract some prerequisites (see e2e test for details) must be met:
- RMRK and catalog contracts are deployed
- parts added to the catalog contract (
catalog::addPartList
) - asset entries added to the RMRK contract (call
multiAsset::addAssetEntry
for each entry you want to add)
Apache 2.0
- Use this instructions to setup your ink!/Rust environment
cd rmrk_proxy
cargo contract build --release
cd rmrk_proxy
cargo test --features e2e-tests -- --nocapture
First start your local node. Recommended is the latest swanky-node
./target/release/swanky-node --dev --tmp -lruntime=trace -lruntime::contracts=debug -lerror
Use
- polkadot.JS. Instructions on Astar docs
- or Contracts UI
to deploy contract on the local Swanky node
Test on Shibuya - XzoT9sH6zpC19TdkkePiopgXjTHcEgX8qjXXHs4p1HuQ5uR
Follow the From Zero to ink! Hero tutorial tu learn how to build this smart contract