-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: Replace ethers Event with Log (#738)
The ethers Event type is an extension of the underlying Log type, which is actually the type that contains almost all of the event data that the SDK needs for Across. Since Event extends Log, it's safe to narrow the scope of the RPC data down to a Log type. This significantly reduces the delta to viem's Log type and is a key stepping stone for viem and ethers to be used interchangeably for RPC interfacing & transport. It additionally seems like this simplification might also support Solana events (...with some eventual coercion). It should be noted that this change touches some code that makes a lot of assumptions about the event types that are being handled, and there are some warts. I've tried not to make things any less safe than they already are, but this code is generally in need of a refactoring to improve type safety.
- Loading branch information
Showing
15 changed files
with
147 additions
and
185 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
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
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
Oops, something went wrong.