fix: add alloy-rlp dependency to testing-utils (test_sign_eip_155) (#19807)

This commit is contained in:
gustavo
2025-11-17 15:41:50 +00:00
committed by GitHub
parent cac2443dfc
commit adbc68c66c
3 changed files with 9 additions and 7 deletions

View File

@@ -529,7 +529,7 @@ mod tests {
#[test]
fn test_sign_eip_155() {
// reference: https://github.com/ethereum/EIPs/blob/master/EIPS/eip-155.md#example
let transaction = Transaction::Legacy(TxLegacy {
let tx = TxLegacy {
chain_id: Some(1),
nonce: 9,
gas_price: 20 * 10_u128.pow(9),
@@ -537,12 +537,11 @@ mod tests {
to: TxKind::Call(hex!("3535353535353535353535353535353535353535").into()),
value: U256::from(10_u128.pow(18)),
input: Bytes::default(),
});
};
let transaction = Transaction::Legacy(tx.clone());
// TODO resolve dependency issue
// let expected =
// hex!("ec098504a817c800825208943535353535353535353535353535353535353535880de0b6b3a764000080018080");
// assert_eq!(expected, &alloy_rlp::encode(transaction));
let expected = hex!("ec098504a817c800825208943535353535353535353535353535353535353535880de0b6b3a764000080018080");
assert_eq!(expected.as_slice(), &alloy_rlp::encode(tx));
let hash = transaction.signature_hash();
let expected =