Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
enitrat committed Oct 4, 2024
1 parent 94329d9 commit 8c609d3
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions crates/contracts/tests/test_kakarot_core.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ fn test_kakarot_core_get_starknet_address() {
}

#[test]
fn test_eth_send_transaction_non_deploy_tx() {
fn test_eth_send_raw_transaction_non_deploy_tx() {
// Given
let (native_token, kakarot_core) = contract_utils::setup_contracts_for_testing();

Expand Down Expand Up @@ -249,7 +249,7 @@ fn test_eth_send_transaction_non_deploy_tx() {
input: data_increment_counter
};

let (success, _, _) = kakarot_core.eth_send_transaction(Transaction::Legacy(tx));
let (success, _, _) = kakarot_core.eth_send_raw_transaction(Transaction::Legacy(tx));
assert!(success);

// Then
Expand Down Expand Up @@ -300,7 +300,7 @@ fn test_eth_call() {


#[test]
fn test_eth_send_transaction_deploy_tx() {
fn test_eth_send_raw_transaction_deploy_tx() {
// Given
let (native_token, kakarot_core) = contract_utils::setup_contracts_for_testing();

Expand All @@ -315,7 +315,8 @@ fn test_eth_send_transaction_deploy_tx() {
let value = 0;

// When
// Set the contract address to the EOA address, so that the caller of the `eth_send_transaction`
// Set the contract address to the EOA address, so that the caller of the
// `eth_send_raw_transaction`
// is an eoa
let tx = TxLegacy {
chain_id: Option::Some(chain_id()),
Expand All @@ -327,7 +328,7 @@ fn test_eth_send_transaction_deploy_tx() {
input: deploy_counter_calldata()
};
start_cheat_caller_address(kakarot_core.contract_address, eoa);
let (_, deploy_result, _) = kakarot_core.eth_send_transaction(Transaction::Legacy(tx));
let (_, deploy_result, _) = kakarot_core.eth_send_raw_transaction(Transaction::Legacy(tx));

// Then
let expected_address: EthAddress = 0x19587b345dcadfe3120272bd0dbec24741891759
Expand Down

0 comments on commit 8c609d3

Please sign in to comment.