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      -> 3nLambdas 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();yupana = ContractInterface.from_michelson(code) # or client.contract(contract_address)...
call = yupana.setTokenAction(index, bytes)
opg = call.inject()Errors
- yToken/token-lambda-already-set- lambda with passed index is already set.
- yToken/you-not-admin-- senderis not contract admin.
Last updated