Function: addSwapRequest(OrderInfo orderInfo, bool inByContract, bool outByContract)
This function adds a new swap request.
Inputs
orderInfoControl: Controlled by the caller of the contracts that use the swap.
Constraints: Must be a valid order.
Impact: Specifies the order to process.
inByContractControl: Controlled by the caller (contracts).
Constraints: None.
Impact: Specifies whether the contract receives ERC-20 tokens for this swap or not.
outByContractControl: Controlled by the caller (contracts).
Constraints: None.
Impact: Specifies whether the contract sends ERC-20 tokens for this swap or not.
Branches and code coverage
Intended branches
Add the order to the storage.
Negative behavior
The caller is a taker.
Given order is valid.
Given input and output tokens are valid if
inByContractoroutByContractis true, respectively.