BendExchange

It is the core contract of the Bend exchange.

Methods

matchAskWithTakerBid

function matchAskWithTakerBid(OrderTypes.TakerOrder takerBid, OrderTypes.MakerOrder makerAsk) external nonpayable

Match a takerBid with a matchAsk

Parameters

NameTypeDescription

takerBid

OrderTypes.TakerOrder

taker bid order

makerAsk

OrderTypes.MakerOrder

maker ask order

matchAskWithTakerBidUsingETHAndWETH

function matchAskWithTakerBidUsingETHAndWETH(OrderTypes.TakerOrder takerBid, OrderTypes.MakerOrder makerAsk) external payable

Match ask with a taker bid order using ETH

Parameters

NameTypeDescription

takerBid

OrderTypes.TakerOrder

taker bid order

makerAsk

OrderTypes.MakerOrder

maker ask order

matchBidWithTakerAsk

function matchBidWithTakerAsk(OrderTypes.TakerOrder takerAsk, OrderTypes.MakerOrder makerBid) external nonpayable

Match a takerAsk with a makerBid

Parameters

NameTypeDescription

takerAsk

OrderTypes.TakerOrder

taker ask order

makerBid

OrderTypes.MakerOrder

maker bid order

cancelAllOrdersForSender

function cancelAllOrdersForSender(uint256 minNonce) external nonpayable

Cancel all pending orders for a sender

Parameters

NameTypeDescription

minNonce

uint256

minimum user nonce

cancelMultipleMakerOrders

function cancelMultipleMakerOrders(uint256[] orderNonces) external nonpayable

Cancel maker orders

Parameters

NameTypeDescription

orderNonces

uint256[]

array of order nonces

CancelMultipleOrders

event CancelMultipleOrders(address indexed user, uint256[] orderNonces)

Parameters

NameTypeDescription

user indexed

address

user address

orderNonces

uint256[]

array of order nonces that are cancelled

renounceOwnership

function renounceOwnership() external nonpayable

Leaves the contract without owner. It will not be possible to call onlyOwner functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner.

transferOwnership

function transferOwnership(address newOwner) external nonpayable

Transfers ownership of the contract to a new account (newOwner). Can only be called by the current owner.

Parameters

NameTypeDescription

newOwner

address

address of the new owner

updateAuthorizationManager

function updateAuthorizationManager(address _authorizationManager) external nonpayable

Update authorization manager

Parameters

NameTypeDescription

_authorizationManager

address

new authorization manager address

updateCurrencyManager

function updateCurrencyManager(address _currencyManager) external nonpayable

Update currency manager

Parameters

NameTypeDescription

_currencyManager

address

new currency manager address

updateExecutionManager

function updateExecutionManager(address _executionManager) external nonpayable

Update execution manager

Parameters

NameTypeDescription

_executionManager

address

new execution manager address

updateProtocolFeeRecipient

function updateProtocolFeeRecipient(address _protocolFeeRecipient) external nonpayable

Update protocol fee and recipient

Parameters

NameTypeDescription

_protocolFeeRecipient

address

new recipient for protocol fees

updateRoyaltyFeeManager

function updateRoyaltyFeeManager(address _royaltyFeeManager) external nonpayable

Update royalty fee manager

Parameters

NameTypeDescription

_royaltyFeeManager

address

new fee manager address

updateTransferManager

function updateTransferManager(address _transferManager) external nonpayable

Update transfer manager

Parameters

NameTypeDescription

_transferManager

address

new transfer manager address

updateInterceptorManager

function updateInterceptorManager(address _interceptorManager) external nonpayable

Update interceptor manager

Parameters

NameTypeDescription

_interceptorManager

address

new interceptor manager address

View methods

DOMAIN_SEPARATOR

function DOMAIN_SEPARATOR() external view returns (bytes32)

Returns

NameTypeDescription

DOMAIN_SEPARATOR

bytes32

EIP-712 domain separator for the exchange

WETH

function WETH() external view returns (address)

Returns

NameTypeDescription

WETH

address

address of the WETH ("Wrapped Ether") contract

authorizationManager

function authorizationManager() external view returns (contract IAuthorizationManager)

Returns

NameTypeDescription

authorizationManager

contract IAuthorizationManager

address of the AuthorizationManager

currencyManager

function currencyManager() external view returns (contract ICurrencyManager)

Returns

NameTypeDescription

currencyManager

contract ICurrencyManager

address of the CurrencyManager

executionManager

function executionManager() external view returns (contract IExecutionManager)

Returns

NameTypeDescription

executionManager

contract IExecutionManager

address of the ExecutionManager

royaltyFeeManager

function royaltyFeeManager() external view returns (contract IRoyaltyFeeManager)

Returns

NameTypeDescription

royaltyFeeManager

contract IRoyaltyFeeManager

address of the RoyaltyFeeManager

transferManager

function transferManager() external view returns (contract ITransferManager)

Returns

NameTypeDescription

transferManager

contract ITransferManager

address of the TransferManager contract

interceptorManager

function interceptorManager() external view returns (contract IInterceptorManager)

Returns

NameTypeDescription

interceptorManager

contract IInterceptorManager

address of the InterceptorManager contract

isUserOrderNonceExecutedOrCancelled

function isUserOrderNonceExecutedOrCancelled(address user, uint256 orderNonce) external view returns (bool)

Check whether user order nonce is executed or cancelled

Parameters

NameTypeDescription

user

address

address of user

orderNonce

uint256

nonce of the order

Returns

NameTypeDescription

-

bool

whether the user order nonce is executed or cancelled (for cancels, it needs to be checked against the minOrderNonce too)

protocolFeeRecipient

function protocolFeeRecipient() external view returns (address)

Returns

NameTypeDescription

protocolFeeRecipient

address

address of the protocol fee recipient

owner

function owner() external view returns (address)

Returns the address of the current owner.

Returns

NameTypeDescription

owner

address

address of the current owner

userMinOrderNonce

function userMinOrderNonce(address) external view returns (uint256)

Parameters

NameTypeDescription

user

address

user address

Returns

NameTypeDescription

minOrderNonce

uint256

minimum order nonce that defines the validity of user orders. If an order has a nonce inferior to the minOrderNonce, it cannot be executed.

Events

CancelAllOrders

event CancelAllOrders(address indexed user, uint256 newMinNonce)

Parameters

NameTypeDescription

user indexed

address

user address

newMinNonce

uint256

new minimum order nonce

NewAuthorizationManager

event NewAuthorizationManager(address indexed authorizationManager)

Parameters

NameTypeDescription

authorizationManager indexed

address

address of the new AuthorizationManager

NewCurrencyManager

event NewCurrencyManager(address indexed currencyManager)

Parameters

NameTypeDescription

currencyManager indexed

address

address of the new CurrencyManager

NewExecutionManager

event NewExecutionManager(address indexed executionManager)

Parameters

NameTypeDescription

executionManager indexed

address

address of the new ExecutionManager

NewProtocolFeeRecipient

event NewProtocolFeeRecipient(address indexed protocolFeeRecipient)

Parameters

NameTypeDescription

protocolFeeRecipient indexed

address

address of the new protocol fee recipient

NewRoyaltyFeeManager

event NewRoyaltyFeeManager(address indexed royaltyFeeManager)

Parameters

NameTypeDescription

royaltyFeeManager indexed

address

address of the new RoyaltyFeeManager

NewTransferManager

event NewTransferManager(address indexed transferManager)

Parameters

NameTypeDescription

transferManager indexed

address

address of the new TransferManager

NewInterceptorManager

event NewInterceptorManager(address indexed interceptorManager)

Parameters

NameTypeDescription

interceptorManager indexed

address

address of the new InterceptorManager

OwnershipTransferred

event OwnershipTransferred(address indexed previousOwner, address indexed newOwner)

Parameters

NameTypeDescription

previousOwner indexed

address

address of the previous owner

newOwner indexed

address

address of the new owner

RoyaltyPayment

event RoyaltyPayment(address indexed collection, uint256 indexed tokenId, address indexed royaltyRecipient, address currency, uint256 amount)

Parameters

NameTypeDescription

collection indexed

address

collection address

tokenId indexed

uint256

tokenId

royaltyRecipient indexed

address

royalty fee recipient

currency

address

currency used (e.g., WETH)

amount

uint256

royalty amount transferred

ProtocolFeePayment

event ProtocolFeePayment(address indexed collection,uint256 indexed tokenId,address indexed protocolFeeRecipient,address currency,uint256 amount);

Parameters

NameTypeDescription

collection indexed

address

collection address

tokenId indexed

uint256

tokenId

protocolFeeRecipient indexed

address

protocol fee recipient

currency

address

currency used (e.g., WETH)

amount

uint256

royalty amount transferred

TakerAsk

event TakerAsk(bytes32 orderHash, uint256 orderNonce, address indexed taker, address indexed maker, address indexed strategy, address currency, address collection, uint256 tokenId, uint256 amount, uint256 price)

Parameters

NameTypeDescription

orderHash

bytes32

order hash

orderNonce

uint256

user order nonce (for the maker)

taker indexed

address

taker address

maker indexed

address

maker address

strategy indexed

address

address of the execution strategy

currency

address

currency address

collection

address

collection address

tokenId

uint256

tokenId

amount

uint256

amount of tokens transferred

price

uint256

gross transaction price

TakerBid

event TakerBid(bytes32 orderHash, uint256 orderNonce, address indexed taker, address indexed maker, address indexed strategy, address currency, address collection, uint256 tokenId, uint256 amount, uint256 price)

Parameters

NameTypeDescription

orderHash

bytes32

order hash

orderNonce

uint256

user order nonce (for the maker)

taker indexed

address

taker address

maker indexed

address

maker address

strategy indexed

address

address of the execution strategy

currency

address

currency address

collection

address

collection address

tokenId

uint256

tokenId

amount

uint256

amount of tokens transferred

price

uint256

gross transaction price

Last updated