Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

ICuttingBoardSlotNFT

Git Source

Title: ICuttingBoardSlotNFT

Interface for the CuttingBoardSlotNFT ERC-721 contract that represents per-winner slot ownership in a CuttingBoardSyndicate round.

Functions

syndicate

Address of the CuttingBoardSyndicate — sole authorised minter/updater

function syndicate() external view returns (address);

mint

Mint a new slot NFT to a winner.

function mint(
    address to,
    uint256 auctionId,
    address originalPartner,
    uint96 allocatedWeight,
    uint96 requestedWeight,
    uint128 clearingPrice,
    address vault,
    uint256 expiryTimestamp,
    bool isPartialFill
) external returns (uint256 tokenId);

Parameters

NameTypeDescription
toaddressRecipient of the NFT.
auctionIduint256Syndicate round / auction identifier.
originalPartneraddressThe original winning partner.
allocatedWeightuint96Actual bps allocated.
requestedWeightuint96Bps bid by the partner.
clearingPriceuint128Total auction price paid at triggerClaim.
vaultaddressInitial BeraChef receiver vault.
expiryTimestampuint256When slot rights expire.
isPartialFillboolTrue when allocatedWeight < requestedWeight.

Returns

NameTypeDescription
tokenIduint256The newly minted token ID.

updateVault

Update the vault recorded in a slot NFT.

function updateVault(uint256 tokenId, address newVault) external;

Parameters

NameTypeDescription
tokenIduint256The token whose vault is being updated.
newVaultaddressThe new BeraChef receiver vault address.

isValid

Check whether a slot NFT is still valid (exists and not expired).

function isValid(uint256 tokenId) external view returns (bool);

Parameters

NameTypeDescription
tokenIduint256The token ID to check.

Returns

NameTypeDescription
<none>boolTrue if the token exists and block.timestamp ≤ expiryTimestamp.

getSlotRights

Return the full slot rights for a token.

function getSlotRights(uint256 tokenId)
    external
    view
    returns (SlotRights memory);

Parameters

NameTypeDescription
tokenIduint256The token ID.

getTokenId

Reverse lookup: return the token ID for a given (auctionId, originalPartner) pair.

function getTokenId(uint256 auctionId, address originalPartner)
    external
    view
    returns (uint256);

Returns

NameTypeDescription
<none>uint256The token ID, or 0 if no token has been minted for this pair.

totalSupply

Return the total number of slot NFTs minted.

function totalSupply() external view returns (uint256);

setBaseURI

Update the metadata base URI.

function setBaseURI(string calldata newBaseURI) external;

ownerOf

function ownerOf(uint256 tokenId) external view returns (address);

tokenURI

function tokenURI(uint256 tokenId) external view returns (string memory);

Events

SlotNFTMinted

event SlotNFTMinted(
    uint256 indexed tokenId,
    uint256 indexed auctionId,
    address indexed originalPartner,
    address vault,
    uint96 allocatedWeight,
    uint96 requestedWeight,
    uint128 clearingPrice,
    uint256 expiryTimestamp,
    bool isPartialFill
);

SlotVaultUpdated

event SlotVaultUpdated(uint256 indexed tokenId, address indexed newVault);

Errors

NotSyndicate

error NotSyndicate();

InvalidTokenId

error InvalidTokenId();

Structs

SlotRights

Represents the slot rights associated with an NFT

struct SlotRights {
    uint256 auctionId;
    address originalPartner; // original auction winner
    uint96 allocatedWeight; // actual bps allocated at triggerClaim
    uint96 requestedWeight; // bps bid by the partner
    uint128 clearingPrice; // total auction price paid at triggerClaim
    address vault; // current BeraChef receiver vault (updatable via Syndicate)
    uint256 expiryTimestamp; // matches control NFT expiry
    bool isPartialFill; // true when allocatedWeight < requestedWeight
}