cartesi / rollups-contracts

Smart Contracts for Cartesi Rollups
https://cartesi.github.io/rollups-contracts/
Apache License 2.0
17 stars 37 forks source link

Batch ERC20 inputs #247

Open pedroargento opened 4 months ago

pedroargento commented 4 months ago

📚 Context

Some applications might benefit from allowing multiple ERC20 tokens to be deposited at once. This issue can reduce the costs of adding multiple inputs.

Also, more importantly, applications can receive multiple tokens under the same execLayerData, allowing them to process the different deposits in the same context as part of a single operation.

✔️ Solution

Create a batchERC20Portal that adds inputs in the form of ((token1, amount1), (token2, amount2), (token2, amount2)).