Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
enitrat committed Oct 4, 2024
1 parent ec20538 commit edce42d
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 30 deletions.
29 changes: 0 additions & 29 deletions crates/contracts/tests/test_execution_from_outside.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -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')]
Expand Down
2 changes: 1 addition & 1 deletion crates/utils/src/traits/bytes.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -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; },
};
Expand Down

0 comments on commit edce42d

Please sign in to comment.