Skip to main content

ContractRoyalty.setTokenRoyaltyInfo() method

Set the royalty recipient and fee for a particular token

Example

await contract.roles.setTokenRoyaltyInfo(tokenId, {
seller_fee_basis_points: 100, // 1% royalty fee
fee_recipient: "0x...", // the fee recipient
});

Signature:

setTokenRoyaltyInfo(tokenId: BigNumberish, royaltyData: z.input<typeof CommonRoyaltySchema>): Promise<{
receipt: import("@ethersproject/abstract-provider").TransactionReceipt;
data: () => Promise<{
seller_fee_basis_points: number;
fee_recipient: string;
}>;
}>;

Parameters

ParameterTypeDescription
tokenIdBigNumberishthe token id
royaltyDataz.input<typeof CommonRoyaltySchema>the royalty recipient and fee

Returns:

Promise<{ receipt: import("@ethersproject/abstract-provider").TransactionReceipt; data: () => Promise<{ seller_fee_basis_points: number; fee_recipient: string; }>; }>