setUseAction
params of setUseParams -> storage with [ useLambdas ]
This entrypoint sets main landing method lambda bytes to storage.
Each function packed to bytes and setted to corresponding index
Indexes of functions:
mint -> 0n
redeem -> 1n
borrow -> 2n
repay -> 3n
liquidate -> 4n
enterMarket -> 5n
exitMarket -> 6n
// Admin methods here
setAdmin -> 7n
withdrawReserve -> 8n
setTokenFactors -> 9n
setGlobalFactors -> 10n
setBorrowPause -> 11n
Lambdas could be found on git here and here (admin part).
Usage
const yupana = await tezos.contract.at(yTokenAddress);
const operation = await yupana.methods.setUseAction(index, bytes).send();
await operation.confirmation();
Errors
yToken/use-lambda-already-set
- lambda with passed index is already set.yToken/you-not-admin
-sender
is not contract admin.
Last updated