Uplink client
updateChannelFees
Update the minting fees and protocol reward splits for a deployed channel
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.updateChannelFees({
channelAddress: '0x1234567890123456789012345678901234567890',
...
})
feeContract
- type:
string
The address of the fee contract to use. Use CUSTOM_FEES
for the default fee contract, or address zero to disable fees.
const { event } = await uplinkClient.updateChannelFees({
{ feeContract: CUSTOM_FEES, ... },
...
})
feeArgs
- type:
CustomFeeInputs | null
The fee configuration to apply. If feeContract
is set to address zero, this parameter is ignored.
const { event } = await uplinkClient.updateChannelFees({
{
feeContract: CUSTOM_FEES,
feeArgs: {
channelTreasury: '0x123...' // channel treasury address
uplinkPercentage: 10 // protocol reward split percentage
channelPercentage: 10 // channel reward split percentage
creatorPercentage: 60 // creator reward split percentage
mintReferralPercentage: 10 // mint referral reward split percentage
sponsorPercentage: 10 // sponsor reward split percentage
ethMintPrice: parseEther('0.000666') // ETH mint price
erc20MintPrice: BigInt(0) // ERC20 mint price
erc20Contract: zeroAddress // ERC20 contract address
},
},
...
})
transactionOverrides (optional)
- type:
TransactionOverrides
type TransactionOverrides = {
accessList?: AccessList
gas?: bigint
maxFeePerGas?: bigint
maxPriorityFeePerGas?: bigint
nonce?: number
value?: bigint
}
Overrides for the transaction
const { contractAddress } = await uplinkClient.updateChannelFees({
...
transactionOverrides: {
gas: 1000000n
}
})
Calldata
generate calldata for the transaction
const { address, data } = await uplinkClient.calldata.updateChannelFees({...})
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.updateChannelFees({...})
Returns
bigint // gas estimate in wei