Function: addMintRequest(uint256 assetID, OrderInfo memory orderInfo, uint256 maxIssueFee)
The function creates a mint request for the given asset and the given order. The in-token amount of the participant is transferred to the contract.
Inputs
assetIDControl: Fully controlled by the caller.
Constraints: The sender is checked to be a participant of the asset.
Impact: A non-participant cannot create a mint request.
orderInfoControl: Fully controlled by the caller.
Constraints: The order should not have been used before for the swap. The order hash should match the hash computed over the order structure. The signature of the order is verified to have been made by the order maker.
Impact: Prevents invalid order from being passed or replayed to the same swap.
maxIssueFeeControl: Fully controlled by the caller.
Constraints: The max fee is checked to be greater than the issue fee.
Impact: Prevents using an invalid fee.
Branches and code coverage (including function calls)
Intended branches
A mint request is successfully created for a valid order and maximum fee.
Negative behavior
A mint request should revert when the sender is not a participant.
A mint request should revert when the order is invalid.
A mint request should revert when the order was already used for the same swap.
A mint request should revert when the token sets mismatch.
A mint request should revert when the chains in the order, in the factory, or in the token sets do not match.
A mint request should revert when the balance of the in-token set is too low.
A mint request should revert when some tokens are not whitelisted.