setTokenAction
params of setUseParams -> storage with [ tokenLambdas ]
This entrypoint sets FA2
(TZIP-12) functions to storage of contract.
Each function packed to bytes and setted to corresponding index
Indexes of functions:
transfer -> 0n
update_operators -> 1n
getBalance -> 2n
get_total_supply -> 3n
Lambdas could be found on git.
Usage
const yupana = await tezos.contract.at(yTokenAddress);
const operation = await yupana.methods.setTokenAction(index, bytes).send();
await operation.confirmation();
Errors
yToken/token-lambda-already-set
- lambda with passed index is already set.yToken/you-not-admin
-sender
is not contract admin.
Last updated