Skip to content

Commit e72518e

Browse files
gakonstampcode-com
andauthored
feat: update Vm.sol with new cheatcodes (#819)
## Summary Update `Vm.sol` with all new cheatcodes from foundry. ## New cheatcodes - `createEd25519Key(bytes32 salt)` — generate Ed25519 key pair from deterministic salt - `publicKeyEd25519(bytes32 privateKey)` — derive Ed25519 public key - `signEd25519(bytes namespace, bytes message, bytes32 privateKey)` — sign with namespace using Ed25519 - `verifyEd25519(bytes signature, bytes namespace, bytes message, bytes32 publicKey)` — verify Ed25519 signature - `executeTransaction(bytes rawTx)` — execute RLP-encoded signed tx with full EVM semantics (like `--isolate` mode) ## Generation Regenerated via `scripts/vm.py --from cheatcodes.json` using foundry's latest `cheatcodes.json`. Prompted by: georgen --------- Co-authored-by: Amp <amp@ampcode.com>
1 parent 52c1e83 commit e72518e

File tree

2 files changed

+32
-2
lines changed

2 files changed

+32
-2
lines changed

src/Vm.sol

Lines changed: 30 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

test/Vm.t.sol

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ import {Vm, VmSafe} from "../src/Vm.sol";
99
// added to or removed from Vm or VmSafe.
1010
contract VmTest is Test {
1111
function test_VmInterfaceId() public pure {
12-
assertEq(type(Vm).interfaceId, bytes4(0xe835828d), "Vm");
12+
assertEq(type(Vm).interfaceId, bytes4(0x7c08f084), "Vm");
1313
}
1414

1515
function test_VmSafeInterfaceId() public pure {
16-
assertEq(type(VmSafe).interfaceId, bytes4(0x444fe6af), "VmSafe");
16+
assertEq(type(VmSafe).interfaceId, bytes4(0x42a4e20e), "VmSafe");
1717
}
1818
}

0 commit comments

Comments
 (0)