Links
Comment on page

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
Name
Type
Description
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
Name
Type
Description
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
Name
Type
Description
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
Name
Type
Description
minNonce
uint256
minimum user nonce

cancelMultipleMakerOrders

function cancelMultipleMakerOrders(uint256[] orderNonces) external nonpayable
Cancel maker orders
Parameters
Name
Type
Description
orderNonces
uint256[]
array of order nonces

CancelMultipleOrders

event CancelMultipleOrders(address indexed user, uint256[] orderNonces)
Parameters
Name
Type
Description
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
Name
Type
Description
newOwner
address
address of the new owner

updateAuthorizationManager

function updateAuthorizationManager(address _authorizationManager) external nonpayable
Update authorization manager
Parameters
Name
Type
Description
_authorizationManager
address
new authorization manager address

updateCurrencyManager

function updateCurrencyManager(address _currencyManager) external nonpayable
Update currency manager
Parameters
Name
Type
Description
_currencyManager
address
new currency manager address

updateExecutionManager

function updateExecutionManager(address _executionManager) external nonpayable
Update execution manager
Parameters
Name
Type
Description
_executionManager
address
new execution manager address

updateProtocolFeeRecipient

function updateProtocolFeeRecipient(address _protocolFeeRecipient) external nonpayable
Update protocol fee and recipient
Parameters
Name
Type
Description
_protocolFeeRecipient
address
new recipient for protocol fees

updateRoyaltyFeeManager

function updateRoyaltyFeeManager(address _royaltyFeeManager) external nonpayable
Update royalty fee manager
Parameters
Name
Type
Description
_royaltyFeeManager
address
new fee manager address

updateTransferManager

function updateTransferManager(address _transferManager) external nonpayable
Update transfer manager
Parameters
Name
Type
Description
_transferManager
address
new transfer manager address

updateInterceptorManager

function updateInterceptorManager(address _interceptorManager) external nonpayable
Update interceptor manager
Parameters
Name
Type
Description
_interceptorManager
address
new interceptor manager address

View methods

DOMAIN_SEPARATOR

function DOMAIN_SEPARATOR() external view returns (bytes32)
Returns
Name
Type
Description
DOMAIN_SEPARATOR
bytes32
EIP-712 domain separator for the exchange

WETH

function WETH() external view returns (address)
Returns
Name
Type
Description
WETH
address
address of the WETH ("Wrapped Ether") contract

authorizationManager

function authorizationManager() external view returns (contract IAuthorizationManager)
Returns
Name
Type
Description

authorizationManager

contract IAuthorizationManager
address of the AuthorizationManager

currencyManager

function currencyManager() external view returns (contract ICurrencyManager)
Returns
Name
Type
Description
currencyManager
contract ICurrencyManager
address of the CurrencyManager

executionManager

function executionManager() external view returns (contract IExecutionManager)
Returns
Name
Type
Description
executionManager
contract IExecutionManager
address of the ExecutionManager

royaltyFeeManager

function royaltyFeeManager() external view returns (contract IRoyaltyFeeManager)
Returns
Name
Type
Description
royaltyFeeManager
contract IRoyaltyFeeManager
address of the RoyaltyFeeManager

transferManager

function transferManager() external view returns (contract ITransferManager)
Returns
Name
Type
Description
transferManager
contract ITransferManager
address of the TransferManager contract

interceptorManager

function interceptorManager() external view returns (contract IInterceptorManager)
Returns
Name
Type
Description
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
Name
Type
Description
user
address
address of user
orderNonce
uint256
nonce of the order
Returns
Name
Type
Description
-
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
Name
Type
Description
protocolFeeRecipient
address
address of the protocol fee recipient

owner

function owner() external view returns (address)
Returns the address of the current owner.
Returns
Name
Type
Description
owner
address
address of the current owner

userMinOrderNonce

function userMinOrderNonce(address) external view returns (uint256)
Parameters
Name
Type
Description
user
address
user address
Returns
Name
Type
Description
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
Name
Type
Description
user indexed
address
user address
newMinNonce
uint256
new minimum order nonce

NewAuthorizationManager

event NewAuthorizationManager(address indexed authorizationManager)
Parameters
Name
Type
Description
authorizationManager indexed
address
address of the new AuthorizationManager

NewCurrencyManager

event NewCurrencyManager(address indexed currencyManager)
Parameters
Name
Type
Description
currencyManager indexed
address
address of the new CurrencyManager

NewExecutionManager

event NewExecutionManager(address indexed executionManager)
Parameters
Name
Type
Description
executionManager indexed
address
address of the new ExecutionManager

NewProtocolFeeRecipient

event NewProtocolFeeRecipient(address indexed protocolFeeRecipient)
Parameters
Name
Type
Description
protocolFeeRecipient indexed
address
address of the new protocol fee recipient

NewRoyaltyFeeManager

event NewRoyaltyFeeManager(address indexed royaltyFeeManager)
Parameters
Name
Type
Description
royaltyFeeManager indexed
address
address of the new RoyaltyFeeManager

NewTransferManager

event NewTransferManager(address indexed transferManager)
Parameters
Name
Type
Description
transferManager indexed
address
address of the new TransferManager

NewInterceptorManager

event NewInterceptorManager(address indexed interceptorManager)
Parameters
Name
Type
Description
interceptorManager indexed
address
address of the new InterceptorManager

OwnershipTransferred

event OwnershipTransferred(address indexed previousOwner, address indexed newOwner)
Parameters
Name
Type
Description
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
Name
Type
Description
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
Name
Type
Description
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
Name
Type
Description
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
Name
Type
Description
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