-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test(sdk): Use
ethers
v6 utils (#2886)
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).
- Loading branch information
Showing
2 changed files
with
22 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters