From d6d8de9d7d1cb1e2e5581c05933d086a7178f84d Mon Sep 17 00:00:00 2001 From: Matthias Seitz Date: Fri, 24 Nov 2023 14:00:01 +0100 Subject: [PATCH] test: pin rpc test to block (#6420) --- testdata/cheats/Fork2.t.sol | 3 ++- testdata/fixtures/Rpc/balance_params.json | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/testdata/cheats/Fork2.t.sol b/testdata/cheats/Fork2.t.sol index 382cb1b91596..b3c1008b7b73 100644 --- a/testdata/cheats/Fork2.t.sol +++ b/testdata/cheats/Fork2.t.sol @@ -221,11 +221,12 @@ contract ForkTest is DSTest { } function testRpc() public { + // balance at block vm.selectFork(mainnetFork); string memory path = "fixtures/Rpc/balance_params.json"; string memory file = vm.readFile(path); bytes memory result = vm.rpc("eth_getBalance", file); - assertEq(result, hex"10b7c11bcb51e6"); + assertEq(hex"10b7c11bcb51e6", result); } } diff --git a/testdata/fixtures/Rpc/balance_params.json b/testdata/fixtures/Rpc/balance_params.json index 740491452728..5004108761fb 100644 --- a/testdata/fixtures/Rpc/balance_params.json +++ b/testdata/fixtures/Rpc/balance_params.json @@ -1 +1 @@ -["0x8D97689C9818892B700e27F316cc3E41e17fBeb9", "latest"] \ No newline at end of file +["0x8D97689C9818892B700e27F316cc3E41e17fBeb9", "0x117BC09"] \ No newline at end of file