Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: test organization #795

Merged
merged 1 commit into from
May 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .tool-versions
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
scarb 2.5.3
scarb 2.6.4
starknet-foundry 0.12.0
6 changes: 3 additions & 3 deletions crates/contracts/src/kakarot_core/kakarot.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ pub mod KakarotCore {

let origin = Address { evm: origin, starknet: self.compute_starknet_address(origin) };

let TransactionResult{success, return_data, gas_used, state: _ } = self
let TransactionResult { success, return_data, gas_used, state: _ } = self
.process_transaction(origin, tx);

(success, return_data, gas_used)
Expand All @@ -180,7 +180,7 @@ pub mod KakarotCore {
evm: account.get_evm_address(), starknet: starknet_caller_address
};

let TransactionResult{success, return_data, gas_used, mut state } = self
let TransactionResult { success, return_data, gas_used, mut state } = self
.process_transaction(origin, tx);
starknet_backend::commit(ref state).expect('Committing state failed');
(success, return_data, gas_used)
Expand Down Expand Up @@ -323,7 +323,7 @@ pub mod KakarotCore {
loop {
match access_list.pop_front() {
Option::Some(access_list_item) => {
let AccessListItem{ethereum_address, storage_keys: _ } =
let AccessListItem { ethereum_address, storage_keys: _ } =
*access_list_item;
let storage_keys = access_list_item.to_storage_keys();

Expand Down
7 changes: 5 additions & 2 deletions crates/contracts/src/lib.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,11 @@ mod errors;
// Kakarot smart contract
mod kakarot_core;

#[cfg(test)]
mod tests;
#[cfg(target: 'test')]
mod test_data;

#[cfg(target: 'test')]
mod test_utils;

// Account transparent proxy
mod uninitialized_account;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ use core::result::ResultTrait;
use evm::backend::starknet_backend;
use evm::model::{Address};

use evm::tests::test_utils::{ca_address, other_starknet_address, chain_id, sequencer_evm_address};
use evm::test_utils::{ca_address, other_starknet_address, chain_id, sequencer_evm_address};
use openzeppelin::token::erc20::ERC20;
use openzeppelin::token::erc20::interface::{IERC20CamelDispatcher, IERC20CamelDispatcherTrait};
use starknet::{
Expand Down
331 changes: 0 additions & 331 deletions crates/contracts/src/tests/test_eoa.cairo

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
mod test_cairo1_helpers;
mod test_contract_account;

mod test_data;

mod test_eoa;

Expand All @@ -10,5 +9,3 @@ mod test_kakarot_core;
mod test_ownable;

mod test_upgradeable;

mod test_utils;
Loading
Loading