withdrawReserve

params of yAssetParams -> (list(op), storage upd)

Withdraw protocol reserves from protocol.

Usage

const tokenId = 0; // or new BigNumber(0) or "0"
const amount = 10_000_000; // or new BigNumber(10_000_000) or "10000000"
const yupana = await tezos.contract.at(yTokenAddress);
const operation = await yupana.methods.withdrawReserve(tokenId, amount).send();
await operation.confirmation();

Errors

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

  • underflow/totalReservesF - when token.totalReserves < amount

  • token/cant-get-contract-token - FA12 token contract address does not contain transfer entrypoint from FA12 interface.

  • token/cant-get-contract-fa2-token - FA2 token contract address does not contain transfer entrypoint from FA2 interface.

Last updated