check_is_banned_baker

This on-chain view checks if baker on the specific Bucket contract is banned or not. If baker is banned, voting for him is not possible.

Call parameters

type token_id_t         is nat

type is_banned_baker_t  is key_hash

type check_is_banned_t  is [@layout:comb] record [
  pair_id                 : token_id_t;
  baker                   : is_banned_baker_t;
]

Return type

bool

Usage

const dexCoreAddress = "KT1...";
const params = {
    pair_id: 1,
    baker: "tz1...",
};
const viewCaller = "tz1...";
const dexCore = await tezos.contract.at(dexCoreAddress);
const isBannedBaker = await dexCore.contract.contractViews.check_is_banned_baker(params).executeView({ viewCaller: viewCaller });

Errors

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

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

  • 125 - is_banned_baker view of Bucket contract isn't found.

Last updated