set_fees

An entrypoint that setups dev and bid fees.

Call parameters

type fees_t             is [@layout:comb] record [
  dev_fee_f               : nat;
  bid_fee_f               : nat;
]
Field
Type
Hint
Description

dev_fee_f

nat

Float value multiplied by 1e+18

bid_fee_f

nat

Float value multiplied by 1e+18

Usage

const devFeeF = 0.25 * 10 ** 18; // 0.25%
const bidFeeF = 0.5 * 10 ** 18; // 0.5%
const auctionAddress = "KT1...";
const fees = {
    dev_fee_f: devFeeF,
    bid_fee_f: bidFeeF,
};
const auction = await tezos.contract.at(auctionAddress);
const operation = await dexCore.methodsObject.set_fees(fees).send();

await operation.confirmation();

Errors

  • 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