Skip to content

Conversation

@vkgnosis
Copy link
Contributor

@vkgnosis vkgnosis commented Jul 6, 2023

Went through all outdated dependencies and updated them.

(I got annoyed at some outdated dependencies in services.)

Test Plan

CI

Comment on lines -731 to +730
myMethod(invalid) as my_method;
myMethod(invalid invalid) as my_method;
Copy link
Contributor Author

@vkgnosis vkgnosis Jul 6, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rust-ethereum/ethabi#254
Plain invalid does not error anymore.

Comment on lines 300 to 301
let start_block = block_number(&web3, from_block).await?;
let end_block = block_number(&web3, to_block).await?;
Copy link
Contributor Author

@vkgnosis vkgnosis Jul 6, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wasn't sure what the best way to handle the new BlockNumber::Finalized and BlockNumber::Safe was. So I moved all non number block numbers to be fetched by the node. This is a risky change because I'm not sure to what degree the exact behavior matters.

Copy link
Contributor

@nlordell nlordell Jul 10, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems slightly incorrect to me.

For logs, to_block can be past the latest, so it shouldn't error in that case. I would implement this as:

        let start_block = match from_block {
            BlockNumber::Earliest => Some(0),
            BlockNumber::Number(value) => Some(value.as_u64()),
            BlockNumber::Latest | BlockNumber::Pending => None,
            BlockNumber::Safe | BlockNumber::Finalized => block_number(&web3, from_block).await?,
        };
        let end_block = match to_block {
            BlockNumber::Earliest => None,
            BlockNumber::Number(value) => Some(value.as_u64()),
            BlockNumber::Latest | BlockNumber::Pending => {
                let latest_block = web3.eth().block_number().await?;
                Some(latest_block.as_u64())
            }
            BlockNumber::Safe | BlockNumber::Finalized => block_number(&web3, to_block).await?,
        };

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed to your suggestion.

Comment on lines -134 to +136
ONE_KEY.into()
SecretKey::from_str("0000000000000000000000000000000000000000000000000000000000000001")
.unwrap()
.into()
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

@nlordell nlordell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. One comment about the event loop implementation.

@vkgnosis vkgnosis requested a review from a team July 10, 2023 13:22
@vkgnosis vkgnosis merged commit 6fc046a into main Jul 10, 2023
@vkgnosis vkgnosis deleted the depds branch July 10, 2023 15:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants