RMRK Solidity

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-contracts dependency, you can refer to one of the samples residing in this section's pages. The versions starting with Simple keyword 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 Advanced keyword 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.

RMRK EVM implementation examples

This section contains the examples of using RMRK legos to build your own smart contracts. Every example uses the @rmrk-team/evm-contracts dependency 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):
  1. 1.
    MultiAsset render utils provides 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.
  2. 2.
    Equip render utils provides 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.