-
-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
William Cory
authored and
William Cory
committed
Jul 14, 2024
1 parent
49c164b
commit 9c67b80
Showing
6 changed files
with
56 additions
and
36 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
let i = 0 | ||
/** | ||
* Creates a function that logs a warning once | ||
* @param {import('../BaseChain.js').BaseChain} baseChain | ||
*/ | ||
export const warnOnce = (baseChain) => { | ||
/** | ||
* @param {import('viem').RpcBlock} tx | ||
*/ | ||
return (tx) => { | ||
if (i > 0) { | ||
return | ||
} | ||
i++ | ||
baseChain.logger.warn( | ||
`Warning: Optimism deposit transactions (type 0x7e) are currently not supported and will be filtered out of blocks until support is added | ||
filtering out tx ${/** @type {import('viem').RpcBlock}*/ (tx).hash}`, | ||
) | ||
} | ||
} |