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(katana): remove fee tokens & udc declaration from genesis #2541

Merged
merged 3 commits into from
Oct 15, 2024
Merged
Show file tree
Hide file tree
Changes from 2 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
120 changes: 61 additions & 59 deletions bin/katana/src/cli/node.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,15 @@
ApiKind, RpcConfig, DEFAULT_RPC_ADDR, DEFAULT_RPC_MAX_CONNECTIONS, DEFAULT_RPC_PORT,
};
use katana_node::config::{Config, SequencingConfig};
use katana_primitives::block::GasPrices;
use katana_primitives::chain::ChainId;
use katana_primitives::chain_spec::ChainSpec;
use katana_primitives::chain_spec::{self, ChainSpec};
use katana_primitives::class::ClassHash;
use katana_primitives::contract::ContractAddress;
use katana_primitives::genesis::allocation::{DevAllocationsGenerator, GenesisAccountAlloc};
use katana_primitives::genesis::constant::DEFAULT_PREFUNDED_ACCOUNT_BALANCE;
use katana_primitives::genesis::constant::{
DEFAULT_LEGACY_ERC20_CLASS_HASH, DEFAULT_LEGACY_UDC_CLASS_HASH,
DEFAULT_PREFUNDED_ACCOUNT_BALANCE, DEFAULT_UDC_ADDRESS,
};
use katana_primitives::genesis::Genesis;
use tracing::{info, Subscriber};
use tracing_log::LogTracer;
Expand Down Expand Up @@ -150,7 +152,7 @@

#[arg(long = "accounts")]
#[arg(value_name = "NUM")]
#[arg(default_value = "10")]
#[arg(default_value_t = 10)]
#[arg(help = "Number of pre-funded accounts to generate.")]
pub total_accounts: u16,

Expand Down Expand Up @@ -179,9 +181,8 @@
#[arg(long_help = "The chain ID. If a raw hex string (`0x` prefix) is provided, then it'd \
used as the actual chain ID. Otherwise, it's represented as the raw \
ASCII values. It must be a valid Cairo short string.")]
#[arg(default_value = "KATANA")]
#[arg(value_parser = ChainId::parse)]
pub chain_id: ChainId,
pub chain_id: Option<ChainId>,

#[arg(long)]
#[arg(help = "The maximum number of steps available for the account validation logic.")]
Expand Down Expand Up @@ -232,8 +233,7 @@
let node = katana_node::build(config).await.context("failed to build node")?;

if !self.silent {
let genesis = &node.backend.chain_spec.genesis;
print_intro(&self, genesis);
print_intro(&self, &node.backend.chain_spec);

Check warning on line 236 in bin/katana/src/cli/node.rs

View check run for this annotation

Codecov / codecov/patch

bin/katana/src/cli/node.rs#L236

Added line #L236 was not covered by tests
}

// Launch the node
Expand Down Expand Up @@ -309,36 +309,33 @@
}

fn chain_spec(&self) -> Result<ChainSpec> {
let genesis = match self.starknet.genesis.clone() {
Some(genesis) => genesis,
None => {
let gas_prices = GasPrices {
eth: self.starknet.environment.l1_eth_gas_price,
strk: self.starknet.environment.l1_strk_gas_price,
};

let accounts = DevAllocationsGenerator::new(self.starknet.total_accounts)
.with_seed(parse_seed(&self.starknet.seed))
.with_balance(U256::from(DEFAULT_PREFUNDED_ACCOUNT_BALANCE))
.generate();

let mut genesis = Genesis {
gas_prices,
sequencer_address: *DEFAULT_SEQUENCER_ADDRESS,
..Default::default()
};

#[cfg(feature = "slot")]
if self.slot.controller {
katana_slot_controller::add_controller_account(&mut genesis)?;
}

genesis.extend_allocations(accounts.into_iter().map(|(k, v)| (k, v.into())));
genesis
}
};
let mut chain_spec = chain_spec::DEV_UNALLOCATED.clone();

if let Some(id) = self.starknet.environment.chain_id {
chain_spec.id = id;
}

if let Some(genesis) = self.starknet.genesis.clone() {
chain_spec.genesis = genesis;

Check warning on line 319 in bin/katana/src/cli/node.rs

View check run for this annotation

Codecov / codecov/patch

bin/katana/src/cli/node.rs#L319

Added line #L319 was not covered by tests
}

// generate dev accounts
let accounts = DevAllocationsGenerator::new(self.starknet.total_accounts)
.with_seed(parse_seed(&self.starknet.seed))
.with_balance(U256::from(DEFAULT_PREFUNDED_ACCOUNT_BALANCE))
.generate();
Comment on lines +323 to +326
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Avoid generating dev accounts when using custom genesis

Ohayo, sensei! Currently, dev accounts are generated even when a custom genesis is provided, which might lead to conflicts or unintended states. Consider modifying the logic to skip dev account generation in such cases.

Here's a suggested change:

+ if self.starknet.genesis.is_none() {
    let accounts = DevAllocationsGenerator::new(self.starknet.total_accounts)
        .with_seed(parse_seed(&self.starknet.seed))
        .with_balance(U256::from(DEFAULT_PREFUNDED_ACCOUNT_BALANCE))
        .generate();

    chain_spec.genesis.extend_allocations(accounts.into_iter().map(|(k, v)| (k, v.into())));
+ }

Committable suggestion was skipped due to low confidence.


chain_spec.genesis.extend_allocations(accounts.into_iter().map(|(k, v)| (k, v.into())));
chain_spec.genesis.sequencer_address = *DEFAULT_SEQUENCER_ADDRESS;
chain_spec.genesis.gas_prices.eth = self.starknet.environment.l1_eth_gas_price;
chain_spec.genesis.gas_prices.strk = self.starknet.environment.l1_strk_gas_price;
Comment on lines +329 to +331
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codebase verification

Ohayo, sensei! It looks like the sequencer_address and gas_prices are being set directly in bin/katana/src/cli/node.rs, which may override user-provided configurations. Please ensure that these assignments respect custom genesis settings to prevent unintended overrides.

🔗 Analysis chain

Verify gas prices and sequencer address settings

Ohayo, sensei! Setting sequencer_address and gas_prices directly may override custom configurations. Ensure that these assignments respect user-provided values, especially when using a custom genesis.

Use this script to find all assignments and usages:


Ohayo, sensei! It looks like there was a syntax error in the previous script. Let's run the corrected script to properly verify the gas prices and sequencer address settings.


Ohayo, sensei! Let's gather more information to ensure that gas prices and sequencer address settings respect user-provided configurations.


Ohayo, sensei! It looks like the previous script had a little hiccup. Let's try a simplified version to properly locate the initialization of chain_spec.genesis.


Ohayo, sensei! The last script ran into a bit of trouble. Let's try a different approach to locate the assignments to chain_spec.genesis.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check assignments to `sequencer_address` and `gas_prices`

rg --type rust 'chain_spec\.genesis\.(sequencer_address|gas_prices)' -A 3

Length of output: 7569


Script:

#!/bin/bash
# Description: Check assignments to `sequencer_address` and `gas_prices`

rg --type rust 'chain_spec\.genesis\.(sequencer_address|gas_prices)' -A 3

Length of output: 1012


Script:

#!/bin/bash
# Description: Find initialization of `chain_spec.genesis` to check for user configuration handling

ast-grep --lang rust 'chain_spec\.genesis\s*=' --pattern '
fn $_($_) {
    $_
}
'

Length of output: 154


Script:

#!/bin/bash
# Description: Find all assignments to `chain_spec.genesis` to verify user configuration handling

ast-grep --lang rust 'chain_spec\.genesis' --pattern '
    assign $_ = $_
'

Length of output: 144


Script:

#!/bin/bash
# Description: Find all assignments to `chain_spec.genesis` to verify user configuration handling

rg --type rust 'chain_spec\.genesis\.(sequencer_address|gas_prices)\s*=' -A 3

Length of output: 441


#[cfg(feature = "slot")]
if self.slot.controller {
katana_slot_controller::add_controller_account(&mut chain_spec.genesis)?;

Check warning on line 335 in bin/katana/src/cli/node.rs

View check run for this annotation

Codecov / codecov/patch

bin/katana/src/cli/node.rs#L335

Added line #L335 was not covered by tests
}

Ok(ChainSpec { id: self.starknet.environment.chain_id, genesis })
Ok(chain_spec)
}

fn dev_config(&self) -> DevConfig {
Expand Down Expand Up @@ -368,8 +365,8 @@
}
}

fn print_intro(args: &NodeArgs, genesis: &Genesis) {
let mut accounts = genesis.accounts().peekable();
fn print_intro(args: &NodeArgs, chain: &ChainSpec) {
let mut accounts = chain.genesis.accounts().peekable();

Check warning on line 369 in bin/katana/src/cli/node.rs

View check run for this annotation

Codecov / codecov/patch

bin/katana/src/cli/node.rs#L368-L369

Added lines #L368 - L369 were not covered by tests
let account_class_hash = accounts.peek().map(|e| e.1.class_hash());
let seed = &args.starknet.seed;

Expand Down Expand Up @@ -399,7 +396,7 @@
)
);

print_genesis_contracts(genesis, account_class_hash);
print_genesis_contracts(chain, account_class_hash);

Check warning on line 399 in bin/katana/src/cli/node.rs

View check run for this annotation

Codecov / codecov/patch

bin/katana/src/cli/node.rs#L399

Added line #L399 was not covered by tests
print_genesis_accounts(accounts);

println!(
Expand All @@ -413,33 +410,38 @@
}
}

fn print_genesis_contracts(genesis: &Genesis, account_class_hash: Option<ClassHash>) {
fn print_genesis_contracts(chain: &ChainSpec, account_class_hash: Option<ClassHash>) {

Check warning on line 413 in bin/katana/src/cli/node.rs

View check run for this annotation

Codecov / codecov/patch

bin/katana/src/cli/node.rs#L413

Added line #L413 was not covered by tests
println!(
r"
PREDEPLOYED CONTRACTS
==================

| Contract | Fee Token
| Address | {}
| Class Hash | {:#064x}",
genesis.fee_token.address, genesis.fee_token.class_hash,
PREDEPLOYED CONTRACTS
==================

| Contract | ETH Fee Token
| Address | {}
| Class Hash | {},

| Contract | STRK Fee Token
| Address | {}
| Class Hash | {}",
chain.fee_contracts.eth,
DEFAULT_LEGACY_ERC20_CLASS_HASH,
chain.fee_contracts.strk,
DEFAULT_LEGACY_ERC20_CLASS_HASH

Check warning on line 429 in bin/katana/src/cli/node.rs

View check run for this annotation

Codecov / codecov/patch

bin/katana/src/cli/node.rs#L416-L429

Added lines #L416 - L429 were not covered by tests
);

if let Some(ref udc) = genesis.universal_deployer {
println!(
r"
| Contract | Universal Deployer
| Address | {}
| Class Hash | {:#064x}",
udc.address, udc.class_hash
)
}
println!(
r"
| Contract | Universal Deployer
| Address | {}
| Class Hash | {}",
DEFAULT_UDC_ADDRESS, DEFAULT_LEGACY_UDC_CLASS_HASH
);

Check warning on line 438 in bin/katana/src/cli/node.rs

View check run for this annotation

Codecov / codecov/patch

bin/katana/src/cli/node.rs#L432-L438

Added lines #L432 - L438 were not covered by tests

if let Some(hash) = account_class_hash {
println!(
r"
| Contract | Account Contract
| Class Hash | {hash:#064x}"
| Contract | Account Contract
| Class Hash | {hash:#064x}"

Check warning on line 444 in bin/katana/src/cli/node.rs

View check run for this annotation

Codecov / codecov/patch

bin/katana/src/cli/node.rs#L443-L444

Added lines #L443 - L444 were not covered by tests
)
}
}
Expand Down
51 changes: 26 additions & 25 deletions crates/katana/core/src/backend/storage.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use anyhow::{anyhow, Result};
use katana_db::mdbx::DbEnv;
use katana_primitives::block::{BlockHash, FinalityStatus, SealedBlockWithStatus};
use katana_primitives::genesis::Genesis;
use katana_primitives::chain_spec::ChainSpec;
use katana_primitives::state::StateUpdatesWithDeclaredClasses;
use katana_provider::providers::db::DbProvider;
use katana_provider::traits::block::{BlockProvider, BlockWriter};
Expand Down Expand Up @@ -68,13 +68,13 @@ impl Blockchain {
}

/// Creates a new [Blockchain] with the given [Database] implementation and genesis state.
pub fn new_with_genesis(provider: impl Database, genesis: &Genesis) -> Result<Self> {
pub fn new_with_genesis(provider: impl Database, chain: &ChainSpec) -> Result<Self> {
// check whether the genesis block has been initialized
let genesis_hash = provider.block_hash_by_num(genesis.number)?;
let genesis_hash = provider.block_hash_by_num(chain.genesis.number)?;

match genesis_hash {
Some(db_hash) => {
let genesis_hash = genesis.block().header.compute_hash();
let genesis_hash = chain.block().header.compute_hash();
// check genesis should be the same
if db_hash == genesis_hash {
Ok(Self::new(provider))
Expand All @@ -86,29 +86,29 @@ impl Blockchain {
}

None => {
let block = genesis.block().seal();
let block = chain.block().seal();
let block = SealedBlockWithStatus { block, status: FinalityStatus::AcceptedOnL1 };
let state_updates = genesis.state_updates();
let state_updates = chain.state_updates();

Self::new_with_block_and_state(provider, block, state_updates)
}
}
}

/// Creates a new [Blockchain] from a database at `path` and `genesis` state.
pub fn new_with_db(db: DbEnv, genesis: &Genesis) -> Result<Self> {
Self::new_with_genesis(DbProvider::new(db), genesis)
pub fn new_with_db(db: DbEnv, chain: &ChainSpec) -> Result<Self> {
Self::new_with_genesis(DbProvider::new(db), chain)
}

/// Builds a new blockchain with a forked block.
pub fn new_from_forked(
provider: impl Database,
genesis_hash: BlockHash,
genesis: &Genesis,
chain: &ChainSpec,
block_status: FinalityStatus,
) -> Result<Self> {
let block = genesis.block().seal_with_hash_and_status(genesis_hash, block_status);
let state_updates = genesis.state_updates();
let block = chain.block().seal_with_hash_and_status(genesis_hash, block_status);
let state_updates = chain.state_updates();
Comment on lines +107 to +111
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codebase verification

Ohayo, sensei! It appears the new_from_forked method signature still uses &Genesis instead of &ChainSpec. Please update the method signature and ensure all its usages reflect this change to prevent runtime issues.

🔗 Analysis chain

Verify updates to new_from_forked method

Ohayo, sensei! The new_from_forked method has been updated to use &ChainSpec instead of &Genesis. Please confirm that all calls to this method reflect this change to prevent runtime issues.

Find usages with:


Ohayo, sensei! Let's get those usages of new_from_forked properly verified.


Ohayo, sensei! Let's ensure the new_from_forked method is correctly updated.


Ohayo, sensei! Let's make sure the new_from_forked method signature is correctly updated.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Find all usages of `new_from_forked` and ensure correct parameters.

# Test: Search for method calls to `new_from_forked`.
rg --type rust 'new_from_forked\('

Length of output: 136


Script:

#!/bin/bash
# Description: Find all usages of `new_from_forked` and ensure correct parameters.

# Test: Search for method calls to `new_from_forked`.
rg --type rust 'new_from_forked\('

Length of output: 286


Script:

#!/bin/bash
# Description: Verify the `new_from_forked` method signature uses `&ChainSpec` instead of `&Genesis`.

ast-grep --lang rust --pattern 'fn new_from_forked($_: &ChainSpec, $_) { $$$ }' crates/katana/core/src/backend/storage.rs

Length of output: 123


Script:

#!/bin/bash
# Description: Verify the `new_from_forked` method signature uses `&ChainSpec` instead of `&Genesis`.

# Test: Search for the method definition of `new_from_forked` with `&ChainSpec` as a parameter.
rg --type rust 'fn new_from_forked\s*\([^)]*&ChainSpec[^)]*\)' crates/katana/core/src/backend/storage.rs

Length of output: 106

Self::new_with_block_and_state(provider, block, state_updates)
}

Expand Down Expand Up @@ -139,15 +139,15 @@ mod tests {
};
use katana_primitives::fee::TxFeeInfo;
use katana_primitives::genesis::constant::{
DEFAULT_FEE_TOKEN_ADDRESS, DEFAULT_LEGACY_ERC20_CASM, DEFAULT_LEGACY_ERC20_CLASS_HASH,
DEFAULT_ETH_FEE_TOKEN_ADDRESS, DEFAULT_LEGACY_ERC20_CASM, DEFAULT_LEGACY_ERC20_CLASS_HASH,
DEFAULT_LEGACY_UDC_CASM, DEFAULT_LEGACY_UDC_CLASS_HASH, DEFAULT_UDC_ADDRESS,
};
use katana_primitives::genesis::Genesis;
use katana_primitives::receipt::{InvokeTxReceipt, Receipt};
use katana_primitives::state::StateUpdatesWithDeclaredClasses;
use katana_primitives::trace::TxExecInfo;
use katana_primitives::transaction::{InvokeTx, Tx, TxWithHash};
use katana_primitives::Felt;
use katana_primitives::{chain_spec, Felt};
use katana_provider::providers::in_memory::InMemoryProvider;
use katana_provider::traits::block::{
BlockHashProvider, BlockNumberProvider, BlockProvider, BlockStatusProvider, BlockWriter,
Expand All @@ -164,13 +164,13 @@ mod tests {
fn blockchain_from_genesis_states() {
let provider = InMemoryProvider::new();

let blockchain = Blockchain::new_with_genesis(provider, &Genesis::default())
let blockchain = Blockchain::new_with_genesis(provider, &chain_spec::DEV)
.expect("failed to create blockchain from genesis block");
let state = blockchain.provider().latest().expect("failed to get latest state");

let latest_number = blockchain.provider().latest_number().unwrap();
let fee_token_class_hash =
state.class_hash_of_contract(DEFAULT_FEE_TOKEN_ADDRESS).unwrap().unwrap();
state.class_hash_of_contract(DEFAULT_ETH_FEE_TOKEN_ADDRESS).unwrap().unwrap();
let udc_class_hash = state.class_hash_of_contract(DEFAULT_UDC_ADDRESS).unwrap().unwrap();

assert_eq!(latest_number, 0);
Expand All @@ -191,12 +191,15 @@ mod tests {
..Default::default()
};

let mut chain = chain_spec::DEV.clone();
chain.genesis = genesis;

Comment on lines +194 to +196
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Sensei, consider constructing ChainSpec directly instead of mutating.

In the test, you're cloning chain_spec::DEV and then modifying chain.genesis. Constructing a new ChainSpec with the desired Genesis might improve clarity and prevent unintended side effects.

Example:

let chain = ChainSpec {
    genesis,
    // ... other fields as needed
    ..chain_spec::DEV.clone()
};

Comment on lines +194 to +196
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Avoid modifying a cloned ChainSpec directly

Ohayo, sensei! Modifying the genesis field of a cloned ChainSpec might have unintended side effects if the original is used elsewhere. Consider creating a new ChainSpec instance to prevent potential issues.

You can refactor the code as follows:

-let mut chain = chain_spec::DEV.clone();
-chain.genesis = genesis;
+let chain = ChainSpec {
+    genesis,
+    ..chain_spec::DEV.clone()
+};
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
let mut chain = chain_spec::DEV.clone();
chain.genesis = genesis;
let chain = ChainSpec {
genesis,
..chain_spec::DEV.clone()
};

let genesis_hash = felt!("1111");

let blockchain = Blockchain::new_from_forked(
provider,
genesis_hash,
&genesis,
&chain,
FinalityStatus::AcceptedOnL1,
)
.expect("failed to create fork blockchain");
Expand All @@ -207,15 +210,15 @@ mod tests {
let block_status =
blockchain.provider().block_status(latest_number.into()).unwrap().unwrap();

assert_eq!(latest_number, genesis.number);
assert_eq!(latest_number, chain.genesis.number);
assert_eq!(latest_hash, genesis_hash);

assert_eq!(header.gas_prices.eth, 9090);
assert_eq!(header.gas_prices.strk, 8080);
assert_eq!(header.timestamp, 6868);
assert_eq!(header.number, latest_number);
assert_eq!(header.state_root, genesis.state_root);
assert_eq!(header.parent_hash, genesis.parent_hash);
assert_eq!(header.state_root, chain.genesis.state_root);
assert_eq!(header.parent_hash, chain.genesis.parent_hash);
assert_eq!(block_status, FinalityStatus::AcceptedOnL1);
}

Expand Down Expand Up @@ -243,11 +246,9 @@ mod tests {
.seal(),
};

let genesis = Genesis::default();

{
let db = katana_db::init_db(&db_path).expect("Failed to init database");
let blockchain = Blockchain::new_with_db(db, &genesis)
let blockchain = Blockchain::new_with_db(db, &chain_spec::DEV)
.expect("Failed to create db-backed blockchain storage");

blockchain
Expand Down Expand Up @@ -280,7 +281,7 @@ mod tests {
let actual_udc_class = state.class(actual_udc_class_hash).unwrap().unwrap();

let actual_fee_token_class_hash =
state.class_hash_of_contract(DEFAULT_FEE_TOKEN_ADDRESS).unwrap().unwrap();
state.class_hash_of_contract(DEFAULT_ETH_FEE_TOKEN_ADDRESS).unwrap().unwrap();
let actual_fee_token_class = state.class(actual_fee_token_class_hash).unwrap().unwrap();

assert_eq!(actual_udc_class_hash, DEFAULT_LEGACY_UDC_CLASS_HASH);
Expand All @@ -294,7 +295,7 @@ mod tests {

{
let db = katana_db::init_db(db_path).expect("Failed to init database");
let blockchain = Blockchain::new_with_db(db, &genesis)
let blockchain = Blockchain::new_with_db(db, &chain_spec::DEV)
.expect("Failed to create db-backed blockchain storage");

// assert genesis state is correct
Expand All @@ -306,7 +307,7 @@ mod tests {
let actual_udc_class = state.class(actual_udc_class_hash).unwrap().unwrap();

let actual_fee_token_class_hash =
state.class_hash_of_contract(DEFAULT_FEE_TOKEN_ADDRESS).unwrap().unwrap();
state.class_hash_of_contract(DEFAULT_ETH_FEE_TOKEN_ADDRESS).unwrap().unwrap();
let actual_fee_token_class = state.class(actual_fee_token_class_hash).unwrap().unwrap();

assert_eq!(actual_udc_class_hash, DEFAULT_LEGACY_UDC_CLASS_HASH);
Expand Down
8 changes: 4 additions & 4 deletions crates/katana/executor/benches/utils.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use katana_primitives::block::GasPrices;
use katana_primitives::env::{BlockEnv, CfgEnv, FeeTokenAddressses};
use katana_primitives::genesis::constant::DEFAULT_FEE_TOKEN_ADDRESS;
use katana_primitives::genesis::constant::DEFAULT_ETH_FEE_TOKEN_ADDRESS;
use katana_primitives::transaction::{ExecutableTxWithHash, InvokeTx, InvokeTxV1};
use katana_primitives::Felt;
use starknet::macros::{felt, selector};
Expand All @@ -9,7 +9,7 @@ pub fn tx() -> ExecutableTxWithHash {
let invoke = InvokeTx::V1(InvokeTxV1 {
sender_address: felt!("0x1").into(),
calldata: vec![
DEFAULT_FEE_TOKEN_ADDRESS.into(),
DEFAULT_ETH_FEE_TOKEN_ADDRESS.into(),
selector!("transfer"),
Felt::THREE,
felt!("0x100"),
Expand All @@ -34,8 +34,8 @@ pub fn envs() -> (BlockEnv, CfgEnv) {
validate_max_n_steps: 4_000_000,
invoke_tx_max_n_steps: 4_000_000,
fee_token_addresses: FeeTokenAddressses {
eth: DEFAULT_FEE_TOKEN_ADDRESS,
strk: DEFAULT_FEE_TOKEN_ADDRESS,
eth: DEFAULT_ETH_FEE_TOKEN_ADDRESS,
strk: DEFAULT_ETH_FEE_TOKEN_ADDRESS,
},
..Default::default()
};
Expand Down
Loading
Loading