Skip to main content

BALwithCappedAllowlist

Git Source

Inherits: BALwithAllowlist

Capped allowlist version of the Baseline Axis Launch callback.

This version allows for each address in the Merkle tree to have a standard amount of quote tokens they can spend.

State Variables

buyerLimit

The maximum amount a buyer can spend

uint256 public buyerLimit;

buyerSpent

Tracks the cumulative amount spent by a buyer

mapping(address => uint256) public buyerSpent;

Functions

constructor

constructor(
address auctionHouse_,
address baselineKernel_,
address reserve_,
address owner_
) BALwithAllowlist(auctionHouse_, baselineKernel_, reserve_, owner_);

__onCreate

Override this function to implement allowlist functionality

This function reverts if:

  • allowlistData_ is not of the correct length
function __onCreate(
uint96,
address,
address,
address,
uint256,
bool,
bytes memory allowlistData_
) internal override;

Parameters

NameTypeDescription
<none>uint96
<none>address
<none>address
<none>address
<none>uint256
<none>bool
allowlistData_bytesabi-encoded data: (bytes32, uint256) representing the merkle root and buyer limit

__onBid

Override this function to implement additional functionality for the onBid callback

This function reverts if:

  • The buyer has already spent their limit
function __onBid(
uint96,
uint64,
address buyer_,
uint256 amount_,
bytes calldata
) internal override;

Parameters

NameTypeDescription
<none>uint96
<none>uint64
buyer_addressThe address of the buyer
amount_uint256The amount of quote tokens
<none>bytes

_canBuy

function _canBuy(address buyer_, uint256 amount_) internal;

Errors

Callback_ExceedsLimit

Error message when the bid amount exceeds the limit assigned to a buyer

error Callback_ExceedsLimit();