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

[Blocked] Update TransactionRequest's to field to TxKind #553

Merged
merged 20 commits into from
Apr 23, 2024
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
test: fix tests
  • Loading branch information
prestwich committed Apr 18, 2024
commit b0b4ff0a4c5f8ea166830a4548611b847d3fffd0
14 changes: 8 additions & 6 deletions crates/network/src/ethereum/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,6 @@ mod tests {
assert!(matches!(tx, TypedTransaction::Eip1559(_)));

let request = request.with_gas_price(0);
dbg!(request.preferred_type());
let tx = request.build_unsigned().unwrap();
assert!(matches!(tx, TypedTransaction::Legacy(_)));
}
Expand All @@ -263,7 +262,8 @@ mod tests {
};

assert_eq!(tx_type, TxType::Legacy);
assert_eq!(errors.len(), 2);
assert_eq!(errors.len(), 3);
assert!(errors.contains(&"to"));
assert!(errors.contains(&"nonce"));
assert!(errors.contains(&"gas_limit"));
}
Expand All @@ -279,7 +279,8 @@ mod tests {
};

assert_eq!(tx_type, TxType::Eip1559);
assert_eq!(errors.len(), 4);
assert_eq!(errors.len(), 5);
assert!(errors.contains(&"to"));
assert!(errors.contains(&"nonce"));
assert!(errors.contains(&"gas_limit"));
assert!(errors.contains(&"max_priority_fee_per_gas"));
Expand All @@ -297,7 +298,8 @@ mod tests {
};

assert_eq!(tx_type, TxType::Eip2930);
assert_eq!(errors.len(), 3);
assert_eq!(errors.len(), 4);
assert!(errors.contains(&"to"));
assert!(errors.contains(&"nonce"));
assert!(errors.contains(&"gas_limit"));
assert!(errors.contains(&"gas_price"));
Expand All @@ -315,8 +317,8 @@ mod tests {
};

assert_eq!(tx_type, TxType::Eip4844);
dbg!(&errors);
assert_eq!(errors.len(), 6);
assert_eq!(errors.len(), 7);
assert!(errors.contains(&"to"));
assert!(errors.contains(&"nonce"));
assert!(errors.contains(&"gas_limit"));
assert!(errors.contains(&"max_priority_fee_per_gas"));
Expand Down
Loading