Skip to content

Commit

Permalink
fix: replace cheats by vm (#1167)
Browse files Browse the repository at this point in the history
  • Loading branch information
L0GYKAL authored Apr 9, 2024
1 parent e06ab38 commit 667c150
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/cheatcodes/broadcast.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,18 +24,18 @@ transaction that can later be signed and sent onchain.

```solidity
function deploy() public {
cheats.broadcast(ACCOUNT_A);
vm.broadcast(ACCOUNT_A);
Test test = new Test();
// this won't generate tx to sign
uint256 b = test.t(4);
// this will
cheats.broadcast(ACCOUNT_B);
vm.broadcast(ACCOUNT_B);
test.t(2);
// this also will, using a private key from your environment variables
cheats.broadcast(vm.envUint("PRIVATE_KEY"));
vm.broadcast(vm.envUint("PRIVATE_KEY"));
test.t(3);
}
```
Expand Down

0 comments on commit 667c150

Please sign in to comment.