Class Web3PublicAbstract

Class containing methods for calling contracts in order to obtain information from the blockchain. To send transaction or execute contract method use Web3Private.

Hierarchy

Methods

  • Calls pure method of smart-contract and returns its output value.

    Type Parameters

    Parameters

    • contractAddress: string

      Address of smart-contract which method is to be executed.

    • contractAbi: AbiItem[]

      Abi of smart-contract which method is to be executed.

    • methodName: string

      Called method name.

    • Optional methodArguments: unknown[]

      Method arguments.

    • Optional options: object

      Transaction options.

    Returns Promise<T>

  • Calls allowance method in token contract.

    Returns

    Token's amount, allowed to be spent.

    Parameters

    • tokenAddress: string

      Address of the smart-contract corresponding to the token.

    • ownerAddress: string

      Wallet address to spend from.

    • spenderAddress: string

      Wallet or contract address, allowed to spend.

    Returns Promise<BigNumber>

  • Gets account native or token balance in wei.

    Parameters

    • userAddress: string

      Wallet address, whose balance you want to find out.

    • Optional tokenAddress: string

      Address of the smart-contract corresponding to the token,

    Returns Promise<BigNumber>

  • Gets token's balance in wei.

    Parameters

    • userAddress: string

      Wallet address, whose balance you want to find out.

    • tokenAddress: string

      Address of the smart-contract corresponding to the token.

    Returns Promise<BigNumber>

Generated using TypeDoc