Skip to content
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

fix(anvil): properly set deposit nonce key on mined tx receipt #7159

Merged
merged 1 commit into from
Feb 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion crates/anvil/src/eth/backend/mem/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2072,7 +2072,7 @@ impl Backend {
};

inner.other.insert(
"deposit_nonce".to_string(),
"depositNonce".to_string(),
serde_json::to_value(deposit_nonce).expect("Infallible"),
);

Expand Down
1 change: 1 addition & 0 deletions crates/anvil/tests/it/optimism.rs
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@ async fn test_send_value_raw_deposit_transaction() {
let receipt = provider.get_transaction_receipt(pending.tx_hash()).await.unwrap().unwrap();
assert_eq!(receipt.from, from_addr);
assert_eq!(receipt.to, Some(to_addr));
assert_eq!(receipt.other.get_deserialized::<u64>("depositNonce").unwrap().unwrap(), 0);

// the recipient should have received the value
let balance = provider.get_balance(to_addr, None).await.unwrap();
Expand Down
Loading