Comment on page
Introduction to RMRK legos EVM examples.
A set of Solidity sample contracts using the RMRK standard implementation on EVM.
Possible combinations of RMRK legos
You can start using the RMRK EVM implementation smart contracts by installing the dependency to your project:
npm install @rmrk-team/evm-contracts
Once you have installed the
@rmrk-team/evm-contractsdependency, you can refer to one of the samples residing in this section's pages. The versions starting with
Simplekeyword are ready to use; you can simply extend those for your own contracts and pass fixed or variable parameters to the constructor. The examples starting with
Advancedkeyword showcase the implementation where you have more freedom in implementing custom business logic. The available internal functions when building it are outlined within the examples.
The usage examples of package v2.0.0 are coming soon. The current examples are of the previous version.
This section contains the examples of using RMRK legos to build your own smart contracts. Every example uses the
@rmrk-team/evm-contractsdependency in order to implement the examples. Adding it allows you to easily include them in your own smart contracts.
The examples included are:
Additionally we have render util contracts. The reason these are separate is to save contract space. You can have a single deploy of those and use them on any number of contracts or even use the existing ones (we will provide them in the future):
MultiAsset render utilsprovides utilities to get asset objects from IDs, and accepted or pending asset objects for a given token. The MultiAsset lego provides only IDs for the latter.
Equip render utilsprovides the same shortcuts on extended assets (with equip information). This utility smart contract also has views to get information about what is currently equipped to a token and to compose equippables for a token asset.
To follow along using modifiable and runnable code, you can clone our examples repository:
NOTE: This is a living collection of examples, which will get updated as the RMRK EVM implementation evolves.