Skip to content

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.targetstring

    The target to connect to. This can be an address, ENS name or any Addressable, such as another contract.

  • SkusetContract.contractRunnerSigner | 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.getAttachmentsArray<any>

Fetches and parses all AttachmentAdded events from the contract.



skusetContract.getTokensany

Fetches balances for all tokenId and address pairs from TransferSingle and TransferBatch events.



skusetContract.getOwnerstring

Retrieves the owner's address



skusetContract.pauseStateboolean

This function calls the paused method of the contract to determine the current paused state.



skusetContract.getDetailsany

Retrieves all relevant details of the token including address, owner, token, attachments, pause state and uri.