Skip to content

Commit

Permalink
set output alloc, result default values
Browse files Browse the repository at this point in the history
  • Loading branch information
yerke26 committed Oct 28, 2024
1 parent a4422b9 commit 3001398
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions tools/evm/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ static void ConfigureT8NCommand(ref RootCommand rootCmd)
var inputAllocOpt = new Option<string>("--input.alloc", description: "Input allocations", getDefaultValue: () => "alloc.json");
var inputEnvOpt = new Option<string>("--input.env", description: "Input environment", getDefaultValue: () => "env.json");
var inputTxsOpt = new Option<string>("--input.txs", description: "Input transactions", getDefaultValue: () => "txs.json");
var outputAllocOpt = new Option<string>("--output.alloc", description: "Output allocations");
var outputAllocOpt = new Option<string>("--output.alloc", description: "Output allocations", getDefaultValue: () => "alloc.json");
var outputBaseDirOpt = new Option<string>("--output.basedir", description: "Output base directory");
var outputBodyOpt = new Option<string>("--output.body", description: "Output body");
var outputResultOpt = new Option<string>("--output.result", description: "Output result");
var outputResultOpt = new Option<string>("--output.result", description: "Output result", getDefaultValue: () => "result.json");
var stateChainIdOpt = new Option<ulong>("--state.chainid", description: "State chain id", getDefaultValue: () => 1);
var stateForkOpt = new Option<string>("--state.fork", description: "State fork", getDefaultValue: () => "GrayGlacier");
var stateRewardOpt = new Option<string>("--state.reward", description: "State reward");
Expand Down
8 changes: 4 additions & 4 deletions tools/evm/T8NTool/T8NTool.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ public T8NOutput Execute(
string inputEnv,
string inputTxs,
string? outputBasedir,
string? outputAlloc,
string outputAlloc,
string? outputBody,
string? outputResult,
string outputResult,
ulong stateChainId,
string stateFork,
string? stateReward,
Expand All @@ -39,10 +39,10 @@ public T8NOutput Execute(
isGnosis, traceOptions);

if (outputAlloc == "stdout") t8NOutput.Alloc = t8NExecutionResult.Alloc;
else if (outputAlloc != null) WriteToFile(outputAlloc, outputBasedir, t8NExecutionResult.Alloc);
else WriteToFile(outputAlloc, outputBasedir, t8NExecutionResult.Alloc);

if (outputResult == "stdout") t8NOutput.Result = t8NExecutionResult.PostState;
else if (outputResult != null) WriteToFile(outputResult, outputBasedir, t8NExecutionResult.PostState);
else WriteToFile(outputResult, outputBasedir, t8NExecutionResult.PostState);

if (outputBody == "stdout") t8NOutput.Body = t8NExecutionResult.Body;
else if (outputBody != null) WriteToFile(outputBody, outputBasedir, t8NExecutionResult.Body);
Expand Down

0 comments on commit 3001398

Please sign in to comment.