Commit 1e4dac3
authored
test(sdk): Use
Moved two Ethereum function selector utils from `FakeJsonRpcServer` to
test utils. These are soon needed in
#2883.
Also refactored methods (and one `FakeJsonRpcServer` usage) to use the
`id` utils from ethers
(https://github.com/ethers-io/ethers.js/blob/9e7e7f3e2f2d51019aaa782e6290e079c38332fb/src.ts/hash/id.ts#L16).
It does the same hash calculation as our implementation.
Note that the return value of the functions now includes the `0x`
prefix. It is therefore compatible e.g. with `ethers`
`FunctionFragment.getSelector()` method
(https://github.com/ethers-io/ethers.js/blob/9e7e7f3e2f2d51019aaa782e6290e079c38332fb/src.ts/abi/fragments.ts#L1449).ethers v6 utils (#2886)1 parent 2a40642 commit 1e4dac3
2 files changed
+22
-17
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
8 | 9 | | |
9 | 10 | | |
10 | 11 | | |
| |||
14 | 15 | | |
15 | 16 | | |
16 | 17 | | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | 18 | | |
24 | 19 | | |
25 | 20 | | |
| |||
88 | 83 | | |
89 | 84 | | |
90 | 85 | | |
91 | | - | |
92 | | - | |
| 86 | + | |
| 87 | + | |
93 | 88 | | |
94 | 89 | | |
95 | 90 | | |
96 | | - | |
| 91 | + | |
97 | 92 | | |
98 | 93 | | |
99 | 94 | | |
100 | | - | |
101 | | - | |
| 95 | + | |
| 96 | + | |
102 | 97 | | |
103 | 98 | | |
104 | 99 | | |
| |||
109 | 104 | | |
110 | 105 | | |
111 | 106 | | |
112 | | - | |
| 107 | + | |
113 | 108 | | |
114 | 109 | | |
115 | 110 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
8 | 9 | | |
9 | 10 | | |
| 11 | + | |
10 | 12 | | |
11 | | - | |
12 | 13 | | |
13 | | - | |
14 | | - | |
| 14 | + | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
| 17 | + | |
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| |||
318 | 318 | | |
319 | 319 | | |
320 | 320 | | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
0 commit comments