For the complete documentation index, see llms.txt. This page is also available as Markdown.

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();
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 - sender is not contract admin.

Last updated