-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Small fixes and refactoring across multiple bots #551
base: main
Are you sure you want to change the base?
Conversation
to prevent possible incorrect logic if a hardcoded address is specified in checksum format
407b109
to
b15400c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!
though, please pay attention that one of the l2-bridge-base tests has failed to pass |
@TheDZhon they are broken in main as well a few other tests |
l2-bridge-ethereum/src/agent.ts
Outdated
@@ -152,7 +152,7 @@ const handleBlock: HandleBlock = async ( | |||
}), | |||
); | |||
|
|||
runs.forEach((r: PromiseSettledResult<any>, index: number) => { | |||
runs.forEach((r: PromiseSettledResult<unknown>, index: number) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does it really better ?=)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, it fixes linter warnings. And essentially a more restrictive type
@@ -27,14 +28,15 @@ export class EventWatcher { | |||
const logIndexToLog = new Map<number, Log>() | |||
|
|||
for (const l2Log of l2Logs) { | |||
addresses.add(l2Log.address.toLowerCase()) | |||
addresses.add(formatAddress(l2Log.address)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd prefer to use .toLowerCase() instead of forta.formatAddress.
Motivation: we want to drop out forta-sdk dependency at all and forta.fortmatAddress makes a string in lowerCase too inside itself
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd like to keep it as it is. At least for now to move forward.
Converting using a dedicated function would at least allow to easily identify all the contexts and replace easily by either changing import or searching/replacing be.
|
e6759f3
to
0aca5a2
Compare
0aca5a2
to
651a94d
Compare
any
-->unkown