Listing adapters
An adapter prices one venue listing and returns the exact call the Core may execute. The Core approves adapters one by one.
Shared interface
price(uint256 id, bytes params) → (address target, uint256 value, bytes data, address offerer)viewQuote a listing for exactly one Credit and return its execution target, ETH value, calldata, and seller.
Core.buyListing(address adapter, uint256 id, bytes params)The Core checks its allowlist, bid, budget, and resulting custody before executing the returned call.
CreditStrategyAdapter
Reads CreditStrategy.nftForSale(id); zero means NotForSale.
Ignores params and returns the strategy's sellTargetNFT(id) call.
The strategy is the offerer for the returned quote.
SeaportBasicAdapter
Decode params as BasicOrderParameters for a Seaport 1.6 basic order.
Accept only an open native-ETH sale of exactly the requested Credit; payout recipients must be the seller or allowlisted.
The Core owner can change allowed recipients. After adapters are locked, recipients can be removed but not added.
setAllowedRecipient(address recipient, bool allowed)Core ownerMaintain the Seaport payout allowlist.
RecipientSet(recipient, allowed)Allowlist change to index.
Complete interface
Functions, events, and errors from the generated interfaces.
src/interfaces/IListingAdapter.sol
Functions 1
function price(uint256 id, bytes calldata params) external view returns (address target, uint256 value, bytes memory data, address offerer)src/interfaces/ISeaportBasicAdapter.sol
Functions 6
function CORE() external view returns (address)function CREDITS() external view returns (address)function SEAPORT() external view returns (address)function allowedRecipient(address) external view returns (bool)function price(uint256 id, bytes memory params) external view returns (address target, uint256 value, bytes memory data, address offerer)function setAllowedRecipient(address recipient, bool allowed) externalEvents 1
event RecipientSet(address indexed recipient, bool allowed)Errors 9
error Locked()error NotNative()error OnlyCoreOwner()error RecipientNotAllowed(address recipient)error RestrictedOrder()error WrongAmount()error WrongId()error WrongToken()error ZeroPrice()src/interfaces/ICreditStrategyAdapter.sol
Functions 2
function STRATEGY() external view returns (address)function price(uint256 id, bytes memory) external view returns (address target, uint256 value, bytes memory data, address offerer)Errors 1
error NotForSale()