-
Notifications
You must be signed in to change notification settings - Fork 47
Update dependencies #934
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
Update dependencies #934
Conversation
| myMethod(invalid) as my_method; | ||
| myMethod(invalid invalid) as my_method; |
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.
rust-ethereum/ethabi#254
Plain invalid does not error anymore.
ethcontract/src/log.rs
Outdated
| let start_block = block_number(&web3, from_block).await?; | ||
| let end_block = block_number(&web3, to_block).await?; |
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.
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.
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.
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?,
};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.
Changed to your suggestion.
| ONE_KEY.into() | ||
| SecretKey::from_str("0000000000000000000000000000000000000000000000000000000000000001") | ||
| .unwrap() | ||
| .into() |
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.
nlordell
left a comment
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.
Looks good. One comment about the event loop implementation.
Went through all outdated dependencies and updated them.
(I got annoyed at some outdated dependencies in services.)
Test Plan
CI