Skip to content

SkucodeContract

SkucodeContract extends ethers.Contract and provides an interface for interacting with smart contract. It includes method for preparing transaction data.

To deploy a new contract, use the Skucode methods: prepareDeployTxFromTracker or prepareDeployTx, depending on whether database dependencies are involved or not respectively.

Creating Instances

new SkucodeContract( target: string, contractRunner: Signer | Provider )

Creates a new instance of SkucodeContract 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

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

  • skucodeContract.contractRunner ⇒ Signer | Provider
    The Signer or Provider used for interacting with the contract.

Methods

skucodeContract.prepareTxData ( methodName: string, args: any[], signerAddress: string ) ⇒ Promise< TxData >

Prepares the transaction data for invoking a method on the contract by generating the required data.


Note: The SkucodeContract class also allows interaction with the deployed Skucode Contract's functions. For more details, refer to the Skucode Contract Artifact.