Seller
A seller can create offers and participate in exchanges. The seller is a complex role with admin, assistant and treasury. Initially, all roles must be the same Ethereum address; however, the admin can later change them to other addresses.
When a seller is created, a default collection is initialised and all rNFTs belonging to their offers are issued on that collection. If the seller wants to organise offers and issue rNFTs on different collections, the protocol enables them to create as many collections as needed.
The sellers manage royalty recipients on two levels - the admin defines a list of allowed recipients, and the assistant then decides which royalty recipients are added to which offer.
Seller's funds management is described in Deposit and withdraw.
TypeScript SDK
Creates a new seller. The assistant, admin and treasury must be the caller's address.
const sellerAddress = signerWallet.address;
await coreSDK.createSeller({
assistant: sellerAddress,
admin: sellerAddress,
treasury: sellerAddress,
contractUri: "http://contract.uri",
royaltyPercentage: "0",
authTokenId: "0",
authTokenType: 0,
metadataUri: "http://metadata.uri",
});Change the admin, the assistant, the treasury, or the authentication method. Except for the treasury, all other actions require confirmation from the new address.
const newAssistantWallet = Wallet.createRandom(ethereumProvider);
const sellerId = "12";
const seller = await coreSDK.getSellerById(sellerId);
// Start the update with the seller's wallet
await coreSDK.updateSellerAndOptIn({
...seller,
{assistant: newAssistantWallet.address}
})
// Finalize the update with the assistant's wallet
const assistantCoreSDK = CoreSDK.fromDefaultConfig({
envName,
configId,
web3Lib: new EthersAdapter(provider, newAssistantWallet),
});
await assistantCoreSDK.optInToSellerUpdate({
id: sellerId,
fieldsToUpdate: {assistant: true}
})Create a new rNFT collection (ERC721 contract) which can be assigned to new offers.
To get the new collection index, one can query
Solidity
Creates a new seller. The assistant, admin and treasury must be the caller's address.
Change the admin, the assistant, the treasury, or the authentication method. Except for the treasury, all other actions require confirmation from the new address.
Create a new rNFT collection (ERC721 contract) which can be assigned to new offers.
In case of admin address being updated it is a good practice also the salt to be updated. If not there exists a possibility that the old admin will try to create the vouchers with matching addresses on other chains.
Add, update or remove royalty recipients allowlist.
Last updated