AbstractSmartContract

AbstractSmartContract

Abstract class that is base for all smart contracts. There is no reason to directly instantiate it. Here lies some common logic about how to resolve the underlying smart contract address and getting the signer instance. you should not instantiate it directly.

Constructor

new AbstractSmartContract(options)

You should not call this class constructor directly if you do so you will get a TypeError as we are explicitly checking against this.

// excerpt from the constructor

if (this.constructor === AbstractSmartContract) {
     throw new TypeError("Cannot construct AbstractSmartContract instances directly");
}
Parameters:
Name Type Description
options ClientOptions
Version:
  • 3
Source:

Methods

getSignerAddress() → {*}

You can use this method to check the current signer wallet address.

Source:

getProvider() → {*}

Returns the internal signer or provider, this method needs to be used with caution as it exposes internals. So unless you know what you are doing it's better to avoid using it.

Source: