Check out the sdk quickstart guide for help setting up your client.

Usage

Returns

{ 
  event: Log 
}

Parameters

channelAddress

  • type: string

The target channel address

const { event } = await uplinkClient.settleFiniteChannel({
  channelAddress: '0x1234567890123456789012345678901234567890',
  ...
})

transactionOverrides (optional)

  • type: TransactionOverrides
type TransactionOverrides = {
  accessList?: AccessList
  gas?: bigint
  maxFeePerGas?: bigint
  maxPriorityFeePerGas?: bigint
  nonce?: number
  value?: bigint
}

Overrides for the transaction

const { event } = await uplinkClient.settleFiniteChannel({
    ...
    transactionOverrides: {
        gas: 1000000n
    }
})

Calldata

generate calldata for the transaction

const { address, data } = await uplinkClient.calldata.settleFiniteChannel({...})

Returns

{
    address: string, // address of the target contract
    data: string // calldata for the transaction
}

Gas Estimation

Estimate gas for the transaction

const gas = await uplinkClient.estimateGas.settleFiniteChannel({...})

Returns

bigint // gas estimate in wei