Uplink client
updateChannelMetadata
Update the metadata for a channel
Check out the sdk quickstart guide for help setting up your client.
Usage
Returns
{
uri: string,
channelName: string,
event: Log
}
Parameters
channelAddress
- type:
string
The target channel address
const { event } = await uplinkClient.updateChannelMetadata({
channelAddress: '0x1234567890123456789012345678901234567890',
...
})
uri
- type:
string
The new metadata URI of the channel
const { event } = await uplinkClient.updateChannelMetadata({
uri: 'new channel uri',
...
})
name
- type:
string
The new name of the channel
const { event } = await uplinkClient.updateChannelMetadata({
name: 'new channel name',
...
})
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.updateChannelMetadata({
...
transactionOverrides: {
gas: 1000000n
}
})
Calldata
generate calldata for the transaction
const { address, data } = await uplinkClient.calldata.updateChannelMetadata({...})
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.updateChannelMetadata({...})
Returns
bigint // gas estimate in wei