ReservoirAdapter

ReservoirAdapter.sol is an adapter contract that enables the Unlockd Protocol to interact with the Reservoir marketplace. It implements the IMarketAdapter interface and provides functions for selling, buying, and canceling orders on the Reservoir marketplace.

Key functions:

function preSell(
    PreSellParams memory params
) public payable onlyProtocol

Prepares an asset for selling on the Reservoir marketplace.

Parameters:

params: The parameters for preparing the sell operation.


function sell(
    SellParams memory params
) public payable onlyProtocol

Sells an asset on the Reservoir marketplace.

Parameters:

params: The parameters for the sell operation.


function preBuy(
    PreBuyParams memory params
) public payable onlyProtocol

Prepares for buying an asset on the Reservoir marketplace.

Parameters:

params: The parameters for preparing the buy operation.


function buy(
    BuyParams memory params
) public payable onlyProtocol returns (uint256)

Buys an asset on the Reservoir marketplace.

Parameters:

params: The parameters for the buy operation.

Returns: The actual cost of the buy operation.

Last updated