CCengine
Docs/Contracts
Contract / venue boundary

Listing adapters

An adapter prices one venue listing and returns the exact call the Core may execute. The Core approves adapters one by one.

CreditStrategyAdapter · Ethereum mainnet0x5757788D0A6dF507dba064d66532F0b630Be1dc9 ↗
SeaportBasicAdapter · Ethereum mainnet0x40302D497436bcC03e0Af2138Ec325C68DF3B0c8 ↗

Shared interface

price(uint256 id, bytes params) → (address target, uint256 value, bytes data, address offerer)view

Quote 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

01

Reads CreditStrategy.nftForSale(id); zero means NotForSale.

02

Ignores params and returns the strategy's sellTargetNFT(id) call.

03

The strategy is the offerer for the returned quote.

SeaportBasicAdapter

01

Decode params as BasicOrderParameters for a Seaport 1.6 basic order.

02

Accept only an open native-ETH sale of exactly the requested Credit; payout recipients must be the seller or allowlisted.

03

The Core owner can change allowed recipients. After adapters are locked, recipients can be removed but not added.

setAllowedRecipient(address recipient, bool allowed)Core owner

Maintain 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) external

Events 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()