Skip to content

Commit

Permalink
fix(anvil): properly set deposit nonce key on other fields for ser (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
Evalir authored Feb 18, 2024
1 parent e32ebe1 commit a9c4d30
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
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

0 comments on commit a9c4d30

Please sign in to comment.