ban_bakers

An entrypoint that bans or unbans baker on the specified period (in seconds). Can ban/unban a group of bakers in one transaction. To unban baker, period of banning must be equal to 0.

Call parameters

type ban_baker_type     is [@layout:comb] record [
  baker                   : key_hash;
  period                  : nat;
]

type ban_bakers_type    is list(ban_baker_type)

Usage

const qFarmAddress = "KT1...";
const params = [
    {
        baker: "tz1...",
        period: 43200, // 24 hours
    }
];
const qFarm = await tezos.contract.at(qFarmAddress);
const operation = await qFarm.methods.ban_bakers(params).send();

await operation.confirmation();

Errors

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

Last updated