ban

An entrypoint that can ban or unban a baker on the specified Bucket contract. Users can't vote for a baker who has been banned by an administrator.

Call parameters

type ban_baker_t        is [@layout:comb] record [
  baker                   : key_hash;
  ban_period              : nat;
]

type ban_t              is [@layout:comb] record [
  pair_id                 : token_id_t;
  ban_params              : ban_baker_t;
]

ban_baker_t

ban_t

Usage

const dexCoreAddress = "KT1...";
const parmas = {
    pair_id: 1,
    ban_params: {
        baker: "tz1...",
        ban_period: 60, // 1 minute
    },
};
const dexCore = await tezos.contract.at(dexCoreAddress);
const operation = await dexCore.methodsObject.ban(parmas).send();

await operation.confirmation();

Errors

  • 108 - pair (pool) with the specified token_id not listed.

  • 113 - a Bucket contract not found (not TOK/TEZ LP pair).

  • 400 - sender of the transaction is not current administrator.

  • 412 - non payable entrypoint (can't accept TEZ tokens during call of an entrypoint).

Last updated