withdraw_farm_depo

An entrypoint that withdraws the specified by an admin value staked from farm's name. Votes for the farm's preferred baker if the farm supports LP tokens. If the farm does not have a preferred baker, the current delegated will be chosen as the preferred baker. Rewards are not claimed (use burn_farm_rewards entrypoint for this purpose).

Call parameters

type withdraw_farm_type is [@layout:comb] record [
  fid                     : fid_type;
  amt                     : nat;
]

Usage

const qFarmAddress = "KT1...";
const params = {
    fid: 1,
    amt: 100,
};
const qFarm = await tezos.contract.at(qFarmAddress);
const operation = await qFarm.methodsObject.withdraw_farm_depo(params).send();

await operation.confirmation();

Errors

  • Not-admin - sender of the transaction is not current administrator.

  • QSystem/farm-not-set - farming with fid parameter doesn't exist.

  • QSystem/balance-too-low - staked by farm tokens amount is less than amount parameter passed by an admin.

Last updated