requestNetwork
requestNetwork copied to clipboard
chore(smart-contract): add batch fees amount paid limitation
Main update of the batch contract:
- add batch fee limit in USD
- rename batchRouter into batchPayments
Adding it makes the smart contract exceed the limit and stack too deep in many functions => an important refactoring of the smart contract solved it. It adds also some tests.
Regarding the fee limit, doing it within each batch functions complexifies the contract and increases gas consumption. Read the function's descriptions to understand how to reduce gas consumption. BatchConversionFee has been deleted, and batchFee is capped at 2% to avoid the wrong settings when deploying/updating the contract.
The PR cannot be merged -> payment-processor has to be done within the same branch.