gelatodigital / gelato-network

V1 implementation of Gelato Network
https://gelato.network/
MIT License
232 stars 29 forks source link

[Gas Optimization]: Provider Module Redundancy of deconstruction Action[] object into Proxy specific payload #264

Open hilmarx opened 3 years ago

hilmarx commented 3 years ago

Problem:

For all provider modules, other than the GelatoUserProxyProviderModule, we need to deconstruct the Task.Action[] object in the execPayload function because most other proxies either accept an array of address[] and bytes[] or a single address and bytes.

Current Solution: We deconstruct our action object and for loop over all data points to make them proxy specific.

Food for thought: We could think about accepting, like most other modern proxies, an array of addresses and bytes instead of creating a custom struct, which would enable us to simply pass the data as we receive it in the execPayload function to the proxy.call.