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();token_id = 0
amount = 10_000_000
yupana = ContractInterface.from_michelson(code) # or client.contract(contract_address)...
call = yupana.withdrawReserve(token_id, amount)
opg = call.inject()Errors
yToken/not-admin-senderis not contract admin.underflow/totalReservesF- whentoken.totalReserves<amounttoken/cant-get-contract-token- FA12 token contract address does not containtransferentrypoint from FA12 interface.token/cant-get-contract-fa2-token- FA2 token contract address does not containtransferentrypoint from FA2 interface.
Last updated