From edce42d3e518b76d765332807c09a6517684b8ce Mon Sep 17 00:00:00 2001 From: enitrat Date: Fri, 4 Oct 2024 13:27:34 +0200 Subject: [PATCH] fix test --- .../tests/test_execution_from_outside.cairo | 29 ------------------- crates/utils/src/traits/bytes.cairo | 2 +- 2 files changed, 1 insertion(+), 30 deletions(-) diff --git a/crates/contracts/tests/test_execution_from_outside.cairo b/crates/contracts/tests/test_execution_from_outside.cairo index 9daff0fe4..3b29a04d5 100644 --- a/crates/contracts/tests/test_execution_from_outside.cairo +++ b/crates/contracts/tests/test_execution_from_outside.cairo @@ -251,35 +251,6 @@ fn test_execute_from_outside_invalid_signature() { tear_down(contract_account); } -#[test] -#[should_panic(expected: 'EOA: could not decode tx')] -fn test_execute_from_outside_invalid_tx() { - let (kakarot_core, contract_account, _) = set_up(); - - let mut faulty_eip_2930_tx = eip_2930_encoded_tx(); - let signature = Signature { - r: 0x5c4ae1ed01c8df4277f02aa3443f8183ed44627217fd7f27badaed8795906e78, - s: 0x4d2af576441428d47c174ffddc6e70b980527a57795b3c87a71878f97ecef274, - y_parity: true - }; - let _ = faulty_eip_2930_tx.pop_front(); - - let outside_execution = OutsideExecutionBuilderTrait::new(kakarot_core.contract_address) - .with_calls( - [ - CallBuilderTrait::new(kakarot_core.contract_address) - .with_calldata(faulty_eip_2930_tx) - .build() - ].span() - ) - .build(); - - let signature = serialize_transaction_signature(signature, TxType::Eip2930, chain_id()).span(); - - let _ = contract_account.execute_from_outside(outside_execution, signature); - - tear_down(contract_account); -} #[test] #[should_panic(expected: 'KKRT: Multicall not supported')] diff --git a/crates/utils/src/traits/bytes.cairo b/crates/utils/src/traits/bytes.cairo index 177b60a79..1de450676 100644 --- a/crates/utils/src/traits/bytes.cairo +++ b/crates/utils/src/traits/bytes.cairo @@ -51,7 +51,7 @@ pub impl U8SpanExImpl of U8SpanExTrait { Option::Some(byte) => { let byte: u64 = (*byte.unbox()).into(); // Accumulate pending_word in a little endian manner - byte.shl(8_u32 * byte_counter.into()) + byte * (256 * byte_counter.into()) }, Option::None => { break; }, };