Install EVM API
@therootnetwork/evm
A utility package that simplifies EVM development on The Root Network.
Install
Usage
Import and initialize the functionalities you need:
API
function assetIdToERC20Address(assetId: string | number)
function assetIdToERC20Address(assetId: string | number)
Converts native asset ID to ERC-20 contract address
function collectionIdToERC721Address(collectionId: string | number)
function collectionIdToERC721Address(collectionId: string | number)
Converts native NFT collection ID to ERC-721 contract address
function getPublicProviderUrl(network: NetworkName): HttpProviderUrl
function getPublicProviderUrl(network: NetworkName): HttpProviderUrl
Returns the Public RPC URls for the corresponding network
Constants
Addresses
Constant | Description | Address |
---|---|---|
| Precompile address for |
|
| Precompile address for |
|
| Precompile address for |
|
| Precompile address for |
|
| Precompile address for |
|
| Precompile address for |
|
Info: The precompile addresses are identical across all networks, including Mainnet, Devnet, and Porcini.
ABIs
Constant | Description |
---|---|
| ABI for the ERC-20 standard |
| ABI for the ERC-721 standard |
| ABI for the ERC-1155 standard |
| ABI for the |
| ABI for the |
| ABI for |
| ABI for |
| ABI for |
| ABI for the |
Note: All exported ABIs are in human-readable format.
Last updated