sdk.basecontract
Home > @openformat/sdk > BaseContract
BaseContract class
Creates a new instance of the BaseContract which manages the provider and signer
Signature:
export declare class BaseContract
Constructors
| Constructor | Modifiers | Description |
|---|---|---|
| (constructor)(provider, appId, signer) | Constructs a new instance of the BaseContract class |
Properties
| Property | Modifiers | Type | Description |
|---|---|---|---|
| appId | string | ||
| provider | providers.Provider | ||
| signer? | Signer | undefined | (Optional) | |
| subgraphEndpoint? | string | (Optional) |
Methods
| Method | Modifiers | Description |
|---|---|---|
| checkNetworksMatch() | protected | Throws an error if the current signer and provider's networks differ |
| getGasPrice() | protected | getGasPrice function to fetch the appropriate gas parameters. This function checks if the network supports EIP-1559 and returns the appropriate gas parameters for a transaction. If EIP-1559 is not supported, it uses the standard gas price. |
| getSubgraphEndpoint() | ||
| setStarId(starId) |