diff --git a/.gitignore b/.gitignore index ba6b847..4195f06 100644 --- a/.gitignore +++ b/.gitignore @@ -23,3 +23,6 @@ Cargo.lock # Gatling reports directory reports + +# IntelliJ IDEA +.idea diff --git a/README.md b/README.md index 382ce5d..01a5570 100644 --- a/README.md +++ b/README.md @@ -42,6 +42,9 @@ RUST_LOG=debug cargo run -- shoot -c config/default.yaml gatling --help ``` +For Katana, currently you need to increase the `DEFAULT_PREFUNDED_ACCOUNT_BALANCE` in constants to `0xffffffffffffffffffffffffffffffff` +and run the node with flag `--no-validate`. + ### Configuration Gomu gomu's configuration is specified as a yaml file. diff --git a/config/default.yaml b/config/default.yaml index bead264..7f086b2 100644 --- a/config/default.yaml +++ b/config/default.yaml @@ -28,3 +28,4 @@ deployer: salt: "1" address: "0x0000000000000000000000000000000000000000000000000000000000000004" signing_key: "0x00c1cf1490de1352865301bb8705143f3ef938f97fdf892f1090dcb5ac7bcd1d" + legacy_account: false diff --git a/config/katana.yaml b/config/katana.yaml index 6737426..94ccfd0 100644 --- a/config/katana.yaml +++ b/config/katana.yaml @@ -28,3 +28,4 @@ deployer: salt: "1" address: "0x517ececd29116499f4a1b64b094da79ba08dfd54a3edaa316134c41f8160973" signing_key: "0x1800000000300000180000000000030000000000003006001800006600" + legacy_account: true diff --git a/src/actions/shoot.rs b/src/actions/shoot.rs index b7c120e..91b9c3e 100644 --- a/src/actions/shoot.rs +++ b/src/actions/shoot.rs @@ -38,7 +38,7 @@ use std::time::{Duration, SystemTime}; use url::Url; // Used to bypass validation -pub static MAX_FEE: FieldElement = felt!("0xffffff"); +pub static MAX_FEE: FieldElement = felt!("0x6efb28c75a0000"); pub static CHECK_INTERVAL: Duration = Duration::from_millis(500); type StarknetAccount = SingleOwnerAccount>, LocalWallet>; @@ -91,7 +91,11 @@ impl GatlingShooter { signer.clone(), config.deployer.address, config.setup.chain_id, - ExecutionEncoding::New, + if config.deployer.legacy_account { + ExecutionEncoding::Legacy + } else { + ExecutionEncoding::New + }, ); // Fails if nonce is null (which is the case for 1st startup) @@ -756,7 +760,7 @@ impl GatlingShooter { fee_token_address, self.account.clone(), address, - felt!("0xFFFFFFFFFFFFFF"), + felt!("0xFFFFFFFFFFFFFFFFFFFF"), ) .await?; wait_for_tx(&self.starknet_rpc, tx_hash, CHECK_INTERVAL).await?; diff --git a/src/config.rs b/src/config.rs index 1875138..53e40d1 100644 --- a/src/config.rs +++ b/src/config.rs @@ -99,6 +99,7 @@ pub struct DeployerConfig { pub salt: FieldElement, pub address: FieldElement, pub signing_key: FieldElement, + pub legacy_account: bool, } #[derive(Debug, Deserialize, Clone)]