Implementations
In our NPM package (EVM-contracts (opens in a new tab)), we provide a variety of implementations for each of the modules. They come in 3 levels of increasing complexity:
Ready to use implementations are opinionated and include:
- Everything from Base Implementation
mint
,nestMint
andtokenURI
implementation, varying depending on the implementation.
- Premint: Opinionated implementation which includes:
mint
andnestMint
(if Nestable included) implementation, which only the owner or contributor can call.tokenURI
implementation, set on via parameter on mint for each NFT.
- Lazy Mint Native Token: Opinionated implementation which includes:
mint
andnestMint
(if Nestable included) implementation, where anyone can batch mint tokens by paying the price in native token. Price is set on creation.tokenURI
implementation, via baseURI defined on creation. The tokenId is appended to the baseURI.
- Lazy Mint ERC20:
mint
andnestMint
(if Nestable included) implementation, where anyone can batch mint tokens by paying the price in ERC20 token. Price and ERC20 token are set on creation.tokenURI
implementation, via baseURI defined on creation. The tokenId is appended to the baseURI.
- Premint Soulbound:
- Everything from Premint
- Uses soulbound implementation, making all tokens soulbound by default.
- Lazy Mint Native Token Soulbound:
- Everything from Lazy Mint Native Token
- Uses soulbound implementation, making all tokens soulbound by default.
- Lazy Mint ERC20 Soulbound:
- Everything from Lazy Mint ERC20
- Uses soulbound implementation, making all tokens soulbound by default.
The 3 levels of implementations can be found in this image as follows:
- The bottom-most layer is the non-opinionated implementation.
- Two layers above are the abstract implementations, together with the different extensions to manage tokenURI.
- The top-most layers are the ready to use implementations, available as soulbound or not.
MultiAsset
The multiasset implementations are available in the @rmrk-team/evm-contracts package (opens in a new tab) at:
- Premint: implementations/premint/RMRKMultiAssetPreMint.sol
- Lazy Mint Native Token: implementations/lazyMintNative/RMRKMultiAssetLazyMintNative.sol
- Lazy Mint ERC20: implementations/lazyMintErc20/RMRKMultiAssetLazyMintErc20.sol
- Premint Soulbound: implementations/premint/RMRKMultiAssetPreMintSoulbound.sol
- Lazy Mint Native Token Soulbound: implementations/lazyMintNative/RMRKMultiAssetLazyMintNativeSoulbound.sol
- Lazy Mint ERC20 Soulbound: implementations/lazyMintErc20/RMRKMultiAssetLazyMintErc20Soulbound.sol
Nestable
The Nestable implementations are available in the @rmrk-team/evm-contracts package (opens in a new tab) at:
- Premint: implementations/premint/RMRKNestablePreMint.sol
- Lazy Mint Native Token: implementations/lazyMintNative/RMRKNestableLazyMintNative.sol
- Lazy Mint ERC20: implementations/lazyMintErc20/RMRKNestableLazyMintErc20.sol
- Premint Soulbound: implementations/premint/RMRKNestablePreMintSoulbound.sol
- Lazy Mint Native Token Soulbound: implementations/lazyMintNative/RMRKNestableLazyMintNativeSoulbound.sol
- Lazy Mint ERC20 Soulbound: implementations/lazyMintErc20/RMRKNestableLazyMintErc20Soulbound.sol
The Nestable + MultiAsset implementations are available at:
- Premint: implementations/premint/RMRKNestableMultiAssetPreMint.sol
- Lazy Mint Native Token: implementations/lazyMintNative/RMRKNestableMultiAssetLazyMintNative.sol
- Lazy Mint ERC20: implementations/lazyMintErc20/RMRKNestableMultiAssetLazyMintErc20.sol
- Premint Soulbound: implementations/premint/RMRKNestableMultiAssetPreMintSoulbound.sol
- Lazy Mint Native Token Soulbound: implementations/lazyMintNative/RMRKNestableMultiAssetLazyMintNativeSoulbound.sol
- Lazy Mint ERC20 Soulbound: implementations/lazyMintErc20/RMRKNestableMultiAssetLazyMintErc20Soulbound.sol
Composable & Equippable
The equippable implementations are available in the @rmrk-team/evm-contracts package (opens in a new tab) at:
- Premint: implementations/premint/RMRKEquippablePreMint.sol
- Lazy Mint Native Token: implementations/lazyMintNative/RMRKEquippableLazyMintNative.sol
- Lazy Mint ERC20: implementations/lazyMintErc20/RMRKEquippableLazyMintErc20.sol
- Premint Soulbound: implementations/premint/RMRKEquippablePreMintSoulbound.sol
- Lazy Mint Native Token Soulbound: implementations/lazyMintNative/RMRKEquippableLazyMintNativeSoulbound.sol
- Lazy Mint ERC20 Soulbound: implementations/lazyMintErc20/RMRKEquippableLazyMintErc20Soulbound.sol
Soulbound
We provide implementations for multiple approaches to making a token non-transferable:
- Tokens are non-transferable from when they are minted: RMRKSoulbound
- Tokens become non-transferable after a specified block: RMRKSoulboundAfterBlockNumber
- Tokens become non-transferable after a predefined number of transactions: RMRKSoulboundAfterTransactions
- Tokens can be set as non-transferable on a per-token basis: RMRKSoulboundPerToken