U2U Network Documentations
  • Introduction
    • Our Vision
    • Litepaper
      • Overview
        • U2U Network Diagram
        • U2U Network with DEPIN and Web3 Eco System
      • Consensus
  • Services
    • RPC
      • RPC Endpoints
      • Ethereum API Methods
        • eth_blockNumber
        • eth_call
        • eth_chainId
        • eth_estimateGas
        • eth_feeHistory
        • eth_gasPrice
        • eth_getBalance
        • eth_getBlockByHash
        • eth_getBlockByNumber
        • eth_getBlockTransactionCountByHash
        • eth_getBlockTransactionCountByNumber
        • eth_getCode
        • eth_getLogs
        • eth_getProof
        • eth_getStorageAt
        • eth_getTransactionByBlockHashAndIndex
        • eth_getTransactionByBlockNumberAndIndex
        • eth_getTransactionByHash
        • eth_getTransactionCount
        • eth_getTransactionReceipt
        • eth_getUncleByBlockHashAndIndex
        • eth_getUncleByBlockNumberAndIndex
        • eth_getUncleCountByBlockHash
        • eth_getUncleCountByBlockNumber
        • eth_maxPriorityFeePerGas
        • eth_sendRawTransaction
        • eth_subscribe
        • eth_unsubscribe
        • net_version
        • net_listening
        • net_peerCount
        • web3_clientVersion
        • web3_sha3
        • debug_traceTransaction
      • DAG API Methods
        • dag_getEvent
        • dag_getEventPayload
        • dag_getHeads
        • eth_currentEpoch
      • Trace API Methods
        • trace_block
        • trace_get
        • trace_transaction
        • trace_filter
    • Explorer
      • Explorer URLs
      • Explorer API
        • Account
        • Block
        • Contract
        • Logs
        • Stats
        • Token
        • Transaction
      • GraphQL
      • Explorer RPC API
      • Smart Contract Verification
        • Via explorer
        • Via hardhat plugin
      • Testnet Faucet
    • Wallets
      • Metamask
      • Wallet Connect
      • Coinbase Wallet
      • U2U Super App
        • Policy
    • Staking
      • How To Stake?
      • FAQ
    • The Graph
      • Deploy a Graph Node
      • Deploy a Subgraph
    • Bridge
      • Smart Contracts & EOA
    • Oracle
      • Smart Contracts & EOA
  • Network
    • Node Types
    • Requirements
    • Build Dependencies
    • Run Normal Node
      • Mainnet Normal Node
      • Testnet Normal Node
      • Run via Docker
    • Run Validator Node
      • Mainnet Validator Node
      • Testnet Validator Node
    • Run A Local Test Network
    • Troubleshooting
  • SUBNET
    • Overview
    • Subnet Node Type
    • Requirements
    • NFT Digital License
    • Subnet Node Setup
      • Master Node
      • Verifier Node
      • Edge Node CLI
  • For Developers
    • SDK
    • Smart Contract Development
      • What are smart contracts?
      • What is gas?
      • Structure of a smart contract
      • Your first smart contract
      • Test your smart contract
      • Deploy your smart contract
      • Submit your contract to explorer
      • Interact With Your Smart Contract
      • Integrate Your Smart Contract With a Frontend
      • Additional Resources
    • Smart Contract Deployment
      • Deploy with Remix
      • Deploy with Hardhat
Powered by GitBook
On this page
  • https://instance_base_url/api?module=token
  • Get ERC-20 or ERC-721 token by contract address
  • Get token holders by contract address
  • Get bridged tokens list
  1. Services
  2. Explorer
  3. Explorer API

Token

?module=token

https://instance_base_url/api?module=token

Get ERC-20 or ERC-721 token by contract address

getToken

Info on name, symbol, supply and type for a token contract address.

Example

https://instance_base_url/api
   ?module=token
   &action=getToken
   &contractaddress={contractaddressHash}
Parameter
Description

contractaddress

string containing the contract address hash - a 160-bit code used for identifying contracts.

{
  "message": "OK",
  "result": {
    "cataloged": true,
    "contractAddress": "0x0000000000000000000000000000000000000000",
    "decimals": "18",
    "name": "Example Token",
    "symbol": "ET",
    "totalSupply": "1000000000",
    "type": "ERC-20"
  },
  "status": "1"
}

Get token holders by contract address

getTokenHolders

Returns an array of token holder's accounts and amounts held for a specified token contract address.

Example

https://instance_base_url/api
   ?module=token
   &action=getTokenHolders
   &contractaddress={contractaddressHash}
   &page={integer}
   &offset={integer}
Parameter
Description

contractaddress

string containing the contract address hash of the ERC-20/ERC-721 token

page

optional nonnegative integer representing the page number used for pagination. 'offset' must also be provided.

offset

optional nonnegative integer representing the max number of records to return when paginating. 'page' must also be provided.

{
  "message": "OK",
  "result": [
    {
      "address": "0x3887e82dbdbe8ec6db44e6298a2d48af572a3b78",
      "value": "153737849289497644937838"
    },
    {
      "address": "0xc894c5de34cb2a3615c737d1276876e44e9700a3",
      "value": "77247336418828547887499"
    }
  ],
  "status": "1"
}

Get bridged tokens list

bridgedTokenList

Returns an array of bridged token information (uses native bridge application and only returns when applicable - depends on implementation).

Example

https://instance_base_url/api
   ?module=token
   &action=bridgedTokenList
   &chainid={chainid}
   &page={integer}
   &offset={integer}
Parameter
Description

chainID

nonnegative integer that represents the chain id where the original token exists.

page

optional nonnegative integer representing the page number used for pagination. 'offset' must also be provided.

offset

optional nonnegative integer representing the max number of records to return when paginating. 'page' must also be provided.

PreviousStatsNextTransaction

Last updated 11 months ago