Skip to content

Commit

Permalink
Fix sender_nonce shadowing (#6589)
Browse files Browse the repository at this point in the history
* Fix sender_nonce shadowing

* Fix sender_nonce
  • Loading branch information
klkvr committed Dec 13, 2023
1 parent fa26c84 commit b6e6ce3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
3 changes: 1 addition & 2 deletions crates/forge/bin/cmd/script/runner.rs
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,7 @@ impl ScriptRunner {
.map(|traces| (TraceKind::Deployment, traces))
.collect();

let sender_nonce = self.executor.get_nonce(CALLER)?;
let address = CALLER.create(sender_nonce);
let address = CALLER.create(self.executor.get_nonce(CALLER)?);

// Set the contracts initial balance before deployment, so it is available during the
// construction
Expand Down
3 changes: 1 addition & 2 deletions crates/forge/src/runner.rs
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,7 @@ impl<'a> ContractRunner<'a> {
}
}

let sender_nonce = self.executor.get_nonce(self.sender)?;
let address = self.sender.create(sender_nonce);
let address = self.sender.create(self.executor.get_nonce(self.sender)?);

// Set the contracts initial balance before deployment, so it is available during
// construction
Expand Down

0 comments on commit b6e6ce3

Please sign in to comment.