Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,9 @@
package = pkgsWithOverlays.foundry-bin;
port = 3021;
timestamp = 1743944919;
gasLimit = 100000000000;
baseFee = 1;
blockTime = 2;
};
};
};
Expand Down
20 changes: 19 additions & 1 deletion nix/anvil.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down