From dfde54c182484b95f60dfd5c0f88904800eb2b20 Mon Sep 17 00:00:00 2001 From: Sebastian Lorenz Date: Thu, 21 Aug 2025 13:27:17 +0200 Subject: [PATCH] all: use same nix anvil options as in ci --- flake.nix | 3 +++ nix/anvil.nix | 20 +++++++++++++++++++- 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/flake.nix b/flake.nix index 33835454b6e..56dc427737a 100644 --- a/flake.nix +++ b/flake.nix @@ -149,6 +149,9 @@ package = pkgsWithOverlays.foundry-bin; port = 3021; timestamp = 1743944919; + gasLimit = 100000000000; + baseFee = 1; + blockTime = 2; }; }; }; diff --git a/nix/anvil.nix b/nix/anvil.nix index df5623aac70..a15807a1d11 100644 --- a/nix/anvil.nix +++ b/nix/anvil.nix @@ -17,11 +17,29 @@ default = 1743944919; description = "Timestamp for the genesis block"; }; + + gasLimit = lib.mkOption { + type = lib.types.int; + default = 100000000000; + description = "Gas limit for the genesis block"; + }; + + baseFee = lib.mkOption { + type = lib.types.int; + default = 1; + description = "Base fee for the genesis block"; + }; + + blockTime = lib.mkOption { + type = lib.types.int; + default = 2; + description = "Block time for the genesis block"; + }; }; config = { outputs.settings.processes.${name} = { - command = "${lib.getExe' config.package "anvil"} --disable-block-gas-limit --disable-code-size-limit --base-fee 1 --block-time 2 --timestamp ${toString config.timestamp} --port ${toString config.port}"; + command = "${lib.getExe' config.package "anvil"} --gas-limit ${toString config.gasLimit} --base-fee ${toString config.baseFee} --block-time ${toString config.blockTime} --timestamp ${toString config.timestamp} --port ${toString config.port}"; availability = { restart = "always";