Skip to main content

EthJsonRPC

EthJsonRPC is a library with utilities to interact with an Ethereum JSON-RPC endpoint.

Functions​

nonce​

Get the nonce of an address.

Input:

  • addr (address): The address to get the nonce.

Output:

  • val (uint256): The nonce of the address.

balance​

Get the balance of an address.

Input:

  • addr (address): The address to get the balance.

Output:

  • val (uint256): The balance of the address.

call​

Call a contract function.

Input:

  • to (address): The address of the contract.

  • data (bytes): The data of the function.

Output:

  • the (bytes): Result of the function call.

call​

Call a contract function with a state override.

Input:

  • to (address): The address of the contract.

  • data (bytes): The data of the function.

  • accountOverride (``): The state override.

Output:

  • the (bytes): Result of the function call.