Calls
erc1155ApprovalForAll
Set approval for an account (or contract) to transfer any tokens from an SFT collection mapping(address => mapping(address => bool)) private _operatorApprovals;
Namespace
Copy api.tx.tokenApprovals.erc1155ApprovalForAll
Type
Copy function erc1155ApprovalForAll (
caller : SeedPrimitivesSignatureAccountId20 ,
operator_account : SeedPrimitivesSignatureAccountId20 ,
collection_uuid : u32 ,
approved : bool
)
erc20Approval
Set approval for an account to transfer an amount of tokens on behalf of the caller Mapping from caller to spender and amount mapping(address => mapping(address => uint256)) private _allowances;
Namespace
Copy api.tx.tokenApprovals.erc20Approval
Type
Copy function erc20Approval (
caller : SeedPrimitivesSignatureAccountId20 ,
spender : SeedPrimitivesSignatureAccountId20 ,
asset_id : u32 ,
amount : u128
)
erc20UpdateApproval
Removes an approval over an account and asset_id mapping(address => mapping(address => uint256)) private _allowances;
Namespace
Copy api.tx.tokenApprovals.erc20UpdateApproval
Type
Copy function erc20UpdateApproval (
caller : SeedPrimitivesSignatureAccountId20 ,
spender : SeedPrimitivesSignatureAccountId20 ,
asset_id : u32 ,
amount : u128
)
erc721Approval
Set approval for a single NFT Mapping from token_id to operator clears approval on transfer mapping(uint256 => address) private _tokenApprovals;
Namespace
Copy api.tx.tokenApprovals.erc721Approval
Type
Copy function erc721Approval (
caller : SeedPrimitivesSignatureAccountId20 ,
operator_account : SeedPrimitivesSignatureAccountId20 ,
token_id : (u32 , u32)
)
erc721ApprovalForAll
Set approval for an account (or contract) to transfer any tokens from a collection mapping(address => mapping(address => bool)) private _operatorApprovals;
Namespace
Copy api.tx.tokenApprovals.erc721ApprovalForAll
Type
Copy function erc721ApprovalForAll (
caller : SeedPrimitivesSignatureAccountId20 ,
operator_account : SeedPrimitivesSignatureAccountId20 ,
collection_uuid : u32 ,
approved : bool
)
erc721RemoveApproval
Public method which allows users to remove approvals on a token they own
Namespace
Copy api.tx.tokenApprovals.erc721RemoveApproval
Type
Copy function erc721RemoveApproval (
token_id : (u32 , u32)
)
Storage
eRC1155ApprovalsForAll
Namespace
Copy api.query.tokenApprovals.eRC1155ApprovalsForAll
Type
Copy function eRC1155ApprovalsForAll (
SeedPrimitivesSignatureAccountId20 ,
(u32 , SeedPrimitivesSignatureAccountId20)
) : Option < bool >
eRC20Approvals
Namespace
Copy api.query.tokenApprovals.eRC20Approvals
Type
Copy function eRC20Approvals (
(SeedPrimitivesSignatureAccountId20 , u32),
SeedPrimitivesSignatureAccountId20
) : Option < u128 >
eRC721Approvals
Namespace
Copy api.query.tokenApprovals.eRC721Approvals
Type
Copy function eRC721Approvals (
(u32 , u32)
) : Option < SeedPrimitivesSignatureAccountId20 >
eRC721ApprovalsForAll
Namespace
Copy api.query.tokenApprovals.eRC721ApprovalsForAll
Type
Copy function eRC721ApprovalsForAll (
SeedPrimitivesSignatureAccountId20 ,
(u32 , SeedPrimitivesSignatureAccountId20)
) : Option < bool >
undefined## Errors
AlreadyApproved
Address is already approved
Namespace
Copy api.errors.tokenApprovals.AlreadyApproved
ApprovalDoesntExist
There is no approval set for this token
Namespace
Copy api.errors.tokenApprovals.ApprovalDoesntExist
ApprovedAmountTooLow
The caller is not approved for the requested amount
Namespace
Copy api.errors.tokenApprovals.ApprovedAmountTooLow
CallerNotApproved
The caller isn't approved for any amount
Namespace
Copy api.errors.tokenApprovals.CallerNotApproved
CallerNotOperator
The caller account can't be the same as the operator account
Namespace
Copy api.errors.tokenApprovals.CallerNotOperator
NoToken
The token doesn't exist
Namespace
Copy api.errors.tokenApprovals.NoToken
NotTokenOwner
The account is not the owner of the token
Namespace
Copy api.errors.tokenApprovals.NotTokenOwner
NotTokenOwnerOrApproved
The account is not the owner of the token or an approved account
Namespace
Copy api.errors.tokenApprovals.NotTokenOwnerOrApproved
undefined