OrderBookV3ArbOrderTaker
Inherits: IOrderBookV3ArbOrderTaker, ReentrancyGuard, Initializable, ICloneableV2, DeployerDiscoverableMetaV3, ERC165
State Variables
sOrderBook
IOrderBookV3 public sOrderBook;
sI9rDispatch
EncodedDispatch public sI9rDispatch;
sI9r
IInterpreterV2 public sI9r;
sI9rStore
IInterpreterStoreV1 public sI9rStore;
Functions
constructor
constructor(bytes32 metaHash, DeployerDiscoverableMetaV3ConstructionConfig memory config)
DeployerDiscoverableMetaV3(metaHash, config);
supportsInterface
function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool);
_beforeInitialize
function _beforeInitialize(bytes memory data) internal virtual;
onlyNotInitializing
Ensure the contract is not initializing.
modifier onlyNotInitializing();
initialize
function initialize(OrderBookV3ArbOrderTakerConfigV1 calldata) external pure returns (bytes32);
initialize
function initialize(bytes memory data) external initializer nonReentrant returns (bytes32);
arb
function arb(TakeOrdersConfigV2 calldata takeOrders, uint256 minimumSenderOutput)
external
payable
nonReentrant
onlyNotInitializing;
onTakeOrders
Called by OrderBookV3 when takeOrders is called with non-zero
data, if it caused a non-zero input amount. I.e. if the order(s) taker
received some tokens. Input and output directions are relative to the
IOrderBookV3OrderTaker contract. If the order(s) taker had an active
debt from a flash loan then that debt will be paid before calculating
any input amounts sent.
i.e. the debt is deducted from the input amount before this callback is
called.
function onTakeOrders(address, address, uint256, uint256, bytes calldata) public virtual override onlyNotInitializing;
Parameters
| Name | Type | Description |
|---|---|---|
<none> | address | |
<none> | address | |
<none> | uint256 | |
<none> | uint256 | |
<none> | bytes |
Events
Initialize
event Initialize(address sender, OrderBookV3ArbOrderTakerConfigV1 config);