superfluid-finance / protocol-monorepo

Superfluid Protocol Monorepo: the specification, implementations, peripherals and development kits.
https://www.superfluid.finance
Other
875 stars 239 forks source link

[ETHEREUM-CONTRACTS] Superfluid: make app gas limit configurable #1975

Closed hellwolf closed 4 months ago

hellwolf commented 5 months ago

We have serious superfluid applications that consume a lot of gas in callbacks, for example in ALFAFRENS, we set BASE app gas limit to 15M. To roll out this to all networks, we must make this configurable by:

  1. Make app gas limit a immutable configuration to Superfluid host contract.
  2. Setup op script configuration for each networks: packages/ethereum-contracts/ops-scripts/libs/getConfig.js

Recommended Configuration

Notes

Current block gas limit per chain (mainnets)

nix-shell$ (for i in `all_sf_mainnets`;do (h=$(sf_metadata $i | jq -r .contractsV1.host);select_foundry_network $i > /dev/null;echo -e "$i\t$(cast block --json | jq -r .gasLimit | xargs printf '%d')");done)
optimism-mainnet    30000000
polygon-mainnet 30000000
avalanche-c 15000000
arbitrum-one    1125899906842624
scroll-mainnet  10000000
bsc-mainnet 138908389
base-mainnet    97500000
xdai-mainnet    17000000
celo-mainnet    50000000
eth-mainnet 30000000