ข้ามไปยังเนื้อหาหลัก

ExecutionManager

This contract handles the execution and resolution of transactions. A transaction is executed on-chain when an off-chain maker order is matched by on-chain taker order of a different kind. For instance, a taker ask is executed against a maker bid (or a taker bid against a maker ask).

protocolFeeRecipient

address protocolFeeRecipient

Protocol fee recipient.

maxCreatorFeeBp

uint16 maxCreatorFeeBp

Maximum creator fee (in basis point).

creatorFeeManager

contract ICreatorFeeManager creatorFeeManager

Creator fee manager.

constructor

constructor(address _owner, address _protocolFeeRecipient) public

Constructor

Parameters

NameTypeDescription
_owneraddressOwner address
_protocolFeeRecipientaddressProtocol fee recipient address

updateCreatorFeeManager

function updateCreatorFeeManager(address newCreatorFeeManager) external

This function allows the owner to update the creator fee manager address.

Only callable by owner.

Parameters

NameTypeDescription
newCreatorFeeManageraddressAddress of the creator fee manager

updateMaxCreatorFeeBp

function updateMaxCreatorFeeBp(uint16 newMaxCreatorFeeBp) external

This function allows the owner to update the maximum creator fee (in basis point).

The maximum value that can be set is 25%. Only callable by owner.

Parameters

NameTypeDescription
newMaxCreatorFeeBpuint16New maximum creator fee (in basis point)

updateProtocolFeeRecipient

function updateProtocolFeeRecipient(address newProtocolFeeRecipient) external

This function allows the owner to update the protocol fee recipient.

Only callable by owner.

Parameters

NameTypeDescription
newProtocolFeeRecipientaddressNew protocol fee recipient address

_executeStrategyForTakerOrder

function _executeStrategyForTakerOrder(struct OrderStructs.Taker takerOrder, struct OrderStructs.Maker makerOrder, address sender) internal returns (uint256[] itemIds, uint256[] amounts, address[2] recipients, uint256[3] feeAmounts, bool isNonceInvalidated)

This function is internal and is used to execute a transaction initiated by a taker order.

Parameters

NameTypeDescription
takerOrderstruct OrderStructs.TakerTaker order struct (taker specific parameters for the execution)
makerOrderstruct OrderStructs.MakerMaker order struct (maker specific parameter for the execution)
senderaddressThe address that sent the transaction

Return Values

NameTypeDescription
itemIdsuint256[]Array of item ids to be traded
amountsuint256[]Array of amounts for each item id
recipientsaddress[2]Array of recipient addresses
feeAmountsuint256[3]Array of fee amounts
isNonceInvalidatedboolWhether the order's nonce will be invalidated after executing the order