Registry
Canonical registry for tokenbound V3
Last updated
Canonical registry for tokenbound V3
Last updated
The registry is a singleton contract that serves as the entry point for all tokenbound account address queries.
It allows for the deterministic calculation and deployment of Tokenbound Account addresses.
The full contract code of the Registry can be found here.
create_account
This function deploys a new Tokenbound Account for an NFT. It requires that the caller is the owner of the specific NFT.
Name | Type | Description |
---|---|---|
Returns:
account_address (ContractAddress)
: The deployed Tokenbound Account address for the provided NFT.
get_account
This function calculates the address of a Tokenbound Account without deploying it. The account address is calculated deterministically using the provided contract address, token ID, and other parameters, meaning that the address will be the same each time for a given set of inputs.
Returns:
account_address (ContractAddress)
: The calculated Tokenbound Account address for the provided NFT and parameters.
Name | Type | Description |
---|---|---|
implementation_hash
felt252
The class hash of the reference account
token_contract
ContractAddress
The contract address of the NFT
token_id
u256
The NFT token ID
salt
felt252
A random value that enforces the uniqueness of the deterministic address calculation for the TBA.
chain_id
felt252
The network/chain ID
implementation_hash
felt252
The class hash of AccountV3 (implementation contract)
token_contract
ContractAddress
The contract address of the NFT
token_id
u256
The NFT token ID
salt
felt252
A random value that enforces the uniqueness of the deterministic address calculation for the TBA
chain_id
felt252
The Network/chain ID