The ERC-20 contract address for The Root Network native tokens uses the following format:
0xCCCCCCCC[4-byte-token-id]000000000000000000000000
import { assetIdToERC20Address } from "@therootnetwork/evm";
const ROOT_ASSET_ID = 1;
const ROOT_CONTRACT_ADDRESS = assetIdToERC20Address(ROOT_ASSET_ID);
interface IERC20 {
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
function totalSupply() external view returns (uint256);
function balanceOf(address account) external view returns (uint256);
function transfer(address to, uint256 amount) external returns (bool);
function allowance(address owner, address spender) external view returns (uint256);
function approve(address spender, uint256 amount) external returns (bool);
function transferFrom(address from, address to, uint256 amount) external returns (bool);
}
interface IERC20Metadata is IERC20 {
function name() external view returns (string memory);
function symbol() external view returns (string memory);
function decimals() external view returns (uint8);
}