Skip to content

Commit 8b27dc8

Browse files
committed
temp: helper tests
1 parent 5d0a9d9 commit 8b27dc8

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

test/Helpers.t.sol

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
// SPDX-License-Identifier: UNLICENSED
2+
pragma solidity ^0.8.24;
3+
4+
import {Test, console2} from "forge-std/Test.sol";
5+
import {Zenith} from "../src/Zenith.sol";
6+
7+
contract HelpersTest is Test {
8+
Zenith public target;
9+
10+
function setUp() public {
11+
vm.createSelectFork("https://rpc.holesky.ethpandaops.io");
12+
target = new Zenith(0x0a53e650c6f015eF70a15Da7B18fa95F051465aB);
13+
}
14+
15+
function test_signature() public {
16+
bytes32 hash = 0xdcd0af9a45fa82dcdd1e4f9ef703d8cd459b6950c0638154c67117e86facf9c1;
17+
uint8 v = 28;
18+
bytes32 r = 0xb89764d107f812dbbebb925711b320d336ff8d03f08570f051123df86334f3f5;
19+
bytes32 s = 0x394cd592577ce6307154045607b9b18ecc1de0eb636e996981477c2d9b1a7675;
20+
address signer = ecrecover(hash, v, r, s);
21+
vm.label(signer, "recovered signer");
22+
assertEq(signer, 0x5b0517Dc94c413a5871536872605522E54C85a03);
23+
}
24+
}

0 commit comments

Comments
 (0)