TopCodeBeast / rmrk-lazy-mint

RMRK lazy minting proxy contract

Repository from Github https://github.comTopCodeBeast/rmrk-lazy-mintRepository from Github https://github.comTopCodeBeast/rmrk-lazy-mint

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

License:Apache License 2.0


Languages

Language:Rust 99.5%Language:Shell 0.5%