Appearance
SkusetContract
SkusetContract
extends ethers.Contract
and provides an interface for interacting with smart contract. It includes method for preparing transaction data.
Creating Instances
new SkusetContract( target: string
, contractRunner: Signer | Provider
)
Creates a new instance of SkusetContract connected to the specified contract address, using the provided signer or provider for interactions.
To query or retrieve blockchain details, use the Provider, while for executing transactions, use the Signer.
Properties
SkusetContract.target ⇒
string
The target to connect to. This can be an address, ENS name or any Addressable, such as another contract.
SkusetContract.contractRunner ⇒
Signer | Provider
The Signer or Provider used for interacting with the contract.
Methods
skusetContract.prepareTxData ( methodName: string
, args: any[]
, signerAddress: string
, memo?: string
) ⇒ Promise< TransactionRequest >
Prepares transaction data for a specific method in the contract.
skusetContract.getAttachments ⇒ Array<any>
Fetches and parses all AttachmentAdded
events from the contract.
skusetContract.getTokens ⇒ any
Fetches balances for all tokenId and address pairs from TransferSingle
and TransferBatch
events.
skusetContract.getOwner ⇒ string
Retrieves the owner's address
skusetContract.pauseState ⇒ boolean
This function calls the paused
method of the contract to determine the current paused state.
skusetContract.getDetails ⇒ any
Retrieves all relevant details of the token including address, owner, token, attachments, pause state and uri.