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).


const yupana = await;
const operation = await yupana.methods.setUseAction(index, bytes).send();
await operation.confirmation();


  • yToken/use-lambda-already-set - lambda with passed index is already set.

  • yToken/you-not-admin - sender is not contract admin.

Last updated