Contract Settings
Configure the settings of your smart contract.
Contract Metadata
Read, write, and update the metadata of a smart contract using the SDK, such as the name, description and image.
Read
- React
- Javascript
- Python
- Go
- Unity
const metadata = await contract.metadata.get();
This snippet is for v3 of the SDK. Learn how to upgrade.
View in React SDK Documentationconst metadata = await contract.metadata.get();
This snippet is for v3 of the SDK. Learn how to upgrade.
View in Javascript SDK DocumentationThis feature is missing a code snippet or might not be supported yet.
Check the Python SDK documentation for more information.
Reach out on Discord for further assistance!
View Python SDK DocumentationThis feature is missing a code snippet or might not be supported yet.
Check the Go SDK documentation for more information.
Reach out on Discord for further assistance!
View Go SDK Documentation
Write (Overwrite)
This will overwrite the existing metadata.
- React
- Javascript
- Python
- Go
- Unity
await contract.metadata.set({
name: "My Contract",
description: "My contract description"
})
This snippet is for v3 of the SDK. Learn how to upgrade.
View in React SDK Documentationawait contract.metadata.set({
name: "My Contract",
description: "My contract description"
})
This snippet is for v3 of the SDK. Learn how to upgrade.
View in Javascript SDK DocumentationThis feature is missing a code snippet or might not be supported yet.
Check the Python SDK documentation for more information.
Reach out on Discord for further assistance!
View Python SDK DocumentationThis feature is missing a code snippet or might not be supported yet.
Check the Go SDK documentation for more information.
Reach out on Discord for further assistance!
View Go SDK Documentation
Update
- React
- Javascript
- Python
- Go
- Unity
await contract.metadata.update({
name: "My Contract",
description: "My contract description"
})
This snippet is for v3 of the SDK. Learn how to upgrade.
View in React SDK Documentationawait contract.metadata.update({
name: "My Contract",
description: "My contract description"
})
This snippet is for v3 of the SDK. Learn how to upgrade.
View in Javascript SDK DocumentationThis feature is missing a code snippet or might not be supported yet.
Check the Python SDK documentation for more information.
Reach out on Discord for further assistance!
View Python SDK DocumentationThis feature is missing a code snippet or might not be supported yet.
Check the Go SDK documentation for more information.
Reach out on Discord for further assistance!
View Go SDK Documentation
Royalty Fees
Read and update the royalty fees of a collection or a specific token.
Read
- React
- Javascript
- Python
- Go
- Unity
const royaltyInfo = await contract.royalties.getDefaultRoyaltyInfo();
This snippet is for v3 of the SDK. Learn how to upgrade.
View in React SDK Documentationconst royaltyInfo = await contract.royalties.getDefaultRoyaltyInfo();
This snippet is for v3 of the SDK. Learn how to upgrade.
View in Javascript SDK DocumentationThis feature is missing a code snippet or might not be supported yet.
Check the Python SDK documentation for more information.
Reach out on Discord for further assistance!
View Python SDK DocumentationThis feature is missing a code snippet or might not be supported yet.
Check the Go SDK documentation for more information.
Reach out on Discord for further assistance!
View Go SDK Documentation
Update
- React
- Javascript
- Python
- Go
- Unity
await contract.roles.setDefaultRoyaltyInfo({
seller_fee_basis_points: 100, // 1% royalty fee
fee_recipient: "0x...", // the fee recipient
});
This snippet is for v3 of the SDK. Learn how to upgrade.
View in React SDK Documentationawait contract.roles.setDefaultRoyaltyInfo({
seller_fee_basis_points: 100, // 1% royalty fee
fee_recipient: "0x...", // the fee recipient
});
This snippet is for v3 of the SDK. Learn how to upgrade.
View in Javascript SDK DocumentationThis feature is missing a code snippet or might not be supported yet.
Check the Python SDK documentation for more information.
Reach out on Discord for further assistance!
View Python SDK DocumentationThis feature is missing a code snippet or might not be supported yet.
Check the Go SDK documentation for more information.
Reach out on Discord for further assistance!
View Go SDK Documentation
Read Specific Token
- React
- Javascript
- Python
- Go
- Unity
const royaltyInfo = await contract.royalties.getDefaultRoyaltyInfo();
This snippet is for v3 of the SDK. Learn how to upgrade.
View in React SDK Documentationconst royaltyInfo = await contract.royalties.getDefaultRoyaltyInfo();
This snippet is for v3 of the SDK. Learn how to upgrade.
View in Javascript SDK DocumentationThis feature is missing a code snippet or might not be supported yet.
Check the Python SDK documentation for more information.
Reach out on Discord for further assistance!
View Python SDK DocumentationThis feature is missing a code snippet or might not be supported yet.
Check the Go SDK documentation for more information.
Reach out on Discord for further assistance!
View Go SDK Documentation
Update Specific Token
- React
- Javascript
- Python
- Go
- Unity
await contract.roles.setTokenRoyaltyInfo(tokenId, {
seller_fee_basis_points: 100, // 1% royalty fee
fee_recipient: "0x...", // the fee recipient
});
This snippet is for v3 of the SDK. Learn how to upgrade.
View in React SDK Documentationawait contract.roles.setTokenRoyaltyInfo(tokenId, {
seller_fee_basis_points: 100, // 1% royalty fee
fee_recipient: "0x...", // the fee recipient
});
This snippet is for v3 of the SDK. Learn how to upgrade.
View in Javascript SDK DocumentationThis feature is missing a code snippet or might not be supported yet.
Check the Python SDK documentation for more information.
Reach out on Discord for further assistance!
View Python SDK DocumentationThis feature is missing a code snippet or might not be supported yet.
Check the Go SDK documentation for more information.
Reach out on Discord for further assistance!
View Go SDK Documentation
Platform Fees
Platform fees allow you to charge a percentage fee wherever there is a transfer of currency in your contract.
Read
- React
- Javascript
- Python
- Go
- Unity
const feeInfo = await contract.platformFee.get();
This snippet is for v3 of the SDK. Learn how to upgrade.
View in React SDK Documentationconst feeInfo = await contract.platformFee.get();
This snippet is for v3 of the SDK. Learn how to upgrade.
View in Javascript SDK DocumentationThis feature is missing a code snippet or might not be supported yet.
Check the Python SDK documentation for more information.
Reach out on Discord for further assistance!
View Python SDK DocumentationThis feature is missing a code snippet or might not be supported yet.
Check the Go SDK documentation for more information.
Reach out on Discord for further assistance!
View Go SDK Documentation
Update
- React
- Javascript
- Python
- Go
- Unity
This feature is missing a code snippet or might not be supported yet.
Check the React SDK documentation for more information.
Reach out on Discord for further assistance!
View React SDK DocumentationThis feature is missing a code snippet or might not be supported yet.
Check the Javascript SDK documentation for more information.
Reach out on Discord for further assistance!
View Javascript SDK DocumentationThis feature is missing a code snippet or might not be supported yet.
Check the Python SDK documentation for more information.
Reach out on Discord for further assistance!
View Python SDK DocumentationThis feature is missing a code snippet or might not be supported yet.
Check the Go SDK documentation for more information.
Reach out on Discord for further assistance!
View Go SDK DocumentationThis feature is missing a code snippet or might not be supported yet.
Check the Unity SDK documentation for more information.
Reach out on Discord for further assistance!
View Unity SDK DocumentationPrimary Sale
Configure the recipient of the primary sale fees.
Read
- React
- Javascript
- Python
- Go
- Unity
const salesRecipient = await contract.sales.getRecipient();
This snippet is for v3 of the SDK. Learn how to upgrade.
View in React SDK Documentationconst salesRecipient = await contract.sales.getRecipient();
This snippet is for v3 of the SDK. Learn how to upgrade.
View in Javascript SDK DocumentationThis feature is missing a code snippet or might not be supported yet.
Check the Python SDK documentation for more information.
Reach out on Discord for further assistance!
View Python SDK DocumentationThis feature is missing a code snippet or might not be supported yet.
Check the Go SDK documentation for more information.
Reach out on Discord for further assistance!
View Go SDK Documentation
Update
- React
- Javascript
- Python
- Go
- Unity
await contract.sales.setRecipient(recipientWalletAddress);
This snippet is for v3 of the SDK. Learn how to upgrade.
View in React SDK Documentationawait contract.sales.setRecipient(recipientWalletAddress);
This snippet is for v3 of the SDK. Learn how to upgrade.
View in Javascript SDK DocumentationThis feature is missing a code snippet or might not be supported yet.
Check the Python SDK documentation for more information.
Reach out on Discord for further assistance!
View Python SDK DocumentationThis feature is missing a code snippet or might not be supported yet.
Check the Go SDK documentation for more information.
Reach out on Discord for further assistance!
View Go SDK Documentation