Skip to content

Commit

Permalink
fix: fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
Harsh Bajpai authored and Harsh Bajpai committed Nov 24, 2023
1 parent 587881c commit 51a9a2c
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 25 deletions.
Empty file removed crates/contracts/src/tests/t
Empty file.
38 changes: 19 additions & 19 deletions crates/contracts/src/tests/test_data.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -1025,7 +1025,7 @@ fn storage_evm_bytecode() -> Span<u8> {

// eip-2930 RLP encoded tx { unsigned }, calls the `inc` function of counter bytecode
// format: 0x01 || rlp([chainId, nonce, gasPrice, gasLimit, to, value, data, accessList])
// rlp decoding: [ '0x01', '0x', '0x3b9aca00', '0x1e8480', '0x00000000000000000000000000000000000abde1', '0x', '0x371303c0', [] ]
// rlp decoding: [ '0x01', '0x', '0x3b9aca00', '0x1e8480', '0x0000006f746865725f65766d5f61646472657373', '0x', '0x371303c0', [] ]
fn eip_2930_rlp_encoded_counter_inc_tx() -> Span<u8> {
array![
1,
Expand All @@ -1045,30 +1045,30 @@ fn eip_2930_rlp_encoded_counter_inc_tx() -> Span<u8> {
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
10,
189,
225,
111,
116,
104,
101,
114,
95,
101,
118,
109,
95,
97,
100,
100,
114,
101,
115,
115,
128,
132,
55,
19,
3,
192,
192
192,
]
.span()
}
13 changes: 7 additions & 6 deletions crates/contracts/src/tests/test_eoa.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ mod test_external_owned_account {
use core::array::SpanTrait;
use core::starknet::account::{Call, AccountContractDispatcher, AccountContractDispatcherTrait};


//todo(harsh): remove
use debug::PrintTrait;

use evm::model::{Address, AddressTrait, ContractAccountTrait};
use evm::tests::test_utils::{
kakarot_address, evm_address, other_evm_address, eoa_address, chain_id, gas_limit, gas_price
Expand Down Expand Up @@ -124,6 +128,9 @@ mod test_external_owned_account {
let evm_address = evm_address();
let eoa = kakarot_core.deploy_eoa(evm_address);

//todo(harsh): remove
other_evm_address().print();

let kakarot_address = kakarot_core.contract_address;

let account = deploy_contract_account(other_evm_address(), counter_evm_bytecode());
Expand Down Expand Up @@ -159,12 +166,6 @@ mod test_external_owned_account {

let result = eoa_contract.__execute__(array![call]);

let call = Call {
to: kakarot_address,
selector: selector!("eth_send_transaction"),
calldata: encoded_tx.to_felt252_array()
};

// check counter value has increased
let return_data = kakarot_core
.eth_call(
Expand Down

0 comments on commit 51a9a2c

Please sign in to comment.