File tree Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Original file line number Diff line number Diff line change
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
+ }
You can’t perform that action at this time.
0 commit comments