Class EvmWeb3Private

Class containing methods for executing the functions of contracts and sending transactions in order to change the state of the blockchain. To get information from the blockchain use Web3Public.

Hierarchy

Constructors

Properties

address: string

Current wallet provider address.

web3: default

Instance of web3, initialized with ethereum wallet, e.g. Metamask, WalletConnect.

Methods

  • Executes method of smart-contract and resolve the promise when the transaction is included in the block.

    Returns

    Smart-contract method returned value.

    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

      Method name to execute.

    • methodArguments: unknown[]

      Method arguments.

    • Optional options: EvmTransactionOptions = {}

      Additional options.

    Returns Promise<TransactionReceipt>

  • Tries to execute method of smart-contract and resolve the promise when the transaction is included in the block or rejects the error.

    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

      Method name to execute.

    • methodArguments: unknown[]

      Method arguments.

    • Optional options: EvmTransactionOptions = {}

      Additional options.

    • Optional allowError: ((err: Web3Error) => boolean)

      Check error and decides to execute contact if error is allowed.

    Returns Promise<TransactionReceipt>

Generated using TypeDoc