Skip to content

Commit

Permalink
Merge pull request #35 from 0xFacet/set_block_one_gas
Browse files Browse the repository at this point in the history
Set correct block 1 gas
  • Loading branch information
RogerPodacter authored Dec 9, 2024
2 parents 6eb155e + a8bdd90 commit 6e3c70f
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions lib/sys_config.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@ def block_gas_limit(block)
if in_migration_mode?
5_000_000_000
elsif is_first_v2_block?(block)
approx_imigration_gas = 4_000_000_000
approx_imigration_gas + L2_BLOCK_GAS_LIMIT
migration_gas + L2_BLOCK_GAS_LIMIT
else
L2_BLOCK_GAS_LIMIT
end
Expand All @@ -20,6 +19,18 @@ def l1_genesis_block_number
ENV.fetch("L1_GENESIS_BLOCK").to_i
end

def migration_gas
if current_l1_network == "mainnet"
3_871_347_580
else
3_870_476_472
end
end

def current_l1_network
ChainIdManager.current_l1_network
end

def genesis_timestamp
@_genesis_timestamp ||= EthRpcClient.l1.get_block(l1_genesis_block_number)["timestamp"].to_i(16)
end
Expand Down

0 comments on commit 6e3c70f

Please sign in to comment.