Skip to content

inkdevhub/rmrk-lazy-mint

Repository files navigation

RMRK Lazy Minting Proxy Contract

This is a proxy contract for RMRK to enable lazy minting.

Purpose

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)

License

Apache 2.0

🏗️ How to use - Contracts

💫 Build
cd rmrk_proxy
cargo contract build --release
💫 Run unit and integration tests
cd rmrk_proxy
cargo test --features e2e-tests -- --nocapture
💫 Deploy

First start your local node. Recommended is the latest swanky-node

./target/release/swanky-node --dev --tmp -lruntime=trace -lruntime::contracts=debug -lerror

Use

to deploy contract on the local Swanky node

💫 Deployed contracts

Test on Shibuya - XzoT9sH6zpC19TdkkePiopgXjTHcEgX8qjXXHs4p1HuQ5uR

📚 Learn

Follow the From Zero to ink! Hero tutorial tu learn how to build this smart contract

About

RMRK lazy minting proxy contract

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published