The resource loading... loading...

Method of Calling Ethereum RPC

Use the exchange.IO() function to call the Ethereum RPC method.

  • Query the balance of ETH in the wallet
    exchange.IO("api", "eth", "eth_getBalance", owner, "latest")   // owner is the specific wallet address
    
  • ETH Transfer
    exchange.IO("api", "eth", "send", toAddress, toAmount)   // toAddress is the address of the wallet receiving ETH when transferring, toAmount is the quantity
    
  • Query gasPrice
    exchange.IO("api", "eth", "eth_gasPrice")
    
  • Query eth_estimateGas
    exchange.IO("api", "eth", "eth_estimateGas", data)
    
Register ABI Support encode