Skip to content

Commit

Permalink
added transaction constants
Browse files Browse the repository at this point in the history
  • Loading branch information
antiyro committed Jun 17, 2024
1 parent 180e443 commit d9a47de
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 187 deletions.
47 changes: 47 additions & 0 deletions unit_tests/src/constants/mainnet/transaction.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
///
/// Random INVOKE_V0 transaction
///
/// Details concerning this contract can be found on [StarkScan](https://starkscan.co/tx/0x02c02d6f0d75bc71b1c629cde038199ccfb6e18343a76943275405817727f76c)
///
pub const TX_INVOKE_V0: &str =
"0x02c02d6f0d75bc71b1c629cde038199ccfb6e18343a76943275405817727f76c";

///
/// Random INVOKE_V1 transaction
///
/// Details concerning this contract can be found on [StarkScan](https://starkscan.co/tx/0x027ed707907aef09c39ece1b24540308eee8d74a14c77728604c3a2da546fd6d)
///
pub const TX_INVOKE_V1: &str =
"0x027ed707907aef09c39ece1b24540308eee8d74a14c77728604c3a2da546fd6d";

///
/// Random DECLARE_V0 transaction
///
/// Details concerning this contract can be found on [StarkScan](https://starkscan.co/tx/0x5f430525084fe54a73e6f6de7d5d3ac20311ac4ba48002c665dade0c585af82)
///
pub const TX_DECLARE_V0: &str =
"0x5f430525084fe54a73e6f6de7d5d3ac20311ac4ba48002c665dade0c585af82";

///
/// Random DECLARE_V1 transaction
///
/// Details concerning this contract can be found on [StarkScan](https://starkscan.co/tx/0x30fd34d7ffbe2aea6121f76c7c82a9edb7250a69a86eaf4ea55e9fb39237d71)
///
pub const TX_DECLARE_V1: &str =
"0x30fd34d7ffbe2aea6121f76c7c82a9edb7250a69a86eaf4ea55e9fb39237d71";

///
/// Random DECLARE_V2 transaction
///
/// Details concerning this contract can be found on [StarkScan](https://starkscan.co/tx/0x62c6e41b306db3dd03fbbb14bd169e84819e5ac1058ffde93a924b3abe9b3c1)
///
pub const TX_DECLARE_V2: &str =
"0x62c6e41b306db3dd03fbbb14bd169e84819e5ac1058ffde93a924b3abe9b3c1";

///
/// Random L1_HANDLER_V0 transaction
///
/// Details concerning this contract can be found on [StarkScan](https://starkscan.co/tx/0x006a555ac598673a215ef69815db1ebe89cb11eed9a489215c21c7d32d6e581a)
///
pub const TX_L1_HANDLER_V0: &str =
"0x006a555ac598673a215ef69815db1ebe89cb11eed9a489215c21c7d32d6e581a";
19 changes: 0 additions & 19 deletions unit_tests/src/constants/sepolia/block.rs
Original file line number Diff line number Diff line change
@@ -1,19 +0,0 @@
///
/// Starknet Mainnet block number versions.
///
pub const BLOCK_0: u64 = 0;
pub const BLOCK_0_9_1: u64 = 3799;
pub const BLOCK_0_10_0: u64 = 4883;
pub const BLOCK_0_10_1: u64 = 6570;
pub const BLOCK_0_10_2: u64 = 12268;
pub const BLOCK_0_10_3: u64 = 16575;
pub const BLOCK_0_11_0: u64 = 28613;
pub const BLOCK_0_11_0_2: u64 = 43851;
pub const BLOCK_0_11_1: u64 = 61394;
pub const BLOCK_0_11_2: u64 = 68096;
pub const BLOCK_0_12_0: u64 = 103129;
pub const BLOCK_0_12_1: u64 = 164901;
pub const BLOCK_0_12_2: u64 = 194410;
pub const BLOCK_0_12_3: u64 = 472644;
pub const BLOCK_0_13_0: u64 = 501514;
pub const BLOCK_0_13_1: u64 = 607878;
168 changes: 0 additions & 168 deletions unit_tests/src/constants/sepolia/constants.rs
Original file line number Diff line number Diff line change
@@ -1,168 +0,0 @@
use once_cell::sync::Lazy;
use std::env;

// Max block number used for testing fetched from environment variable MAX_BLOCK
pub static MAX_BLOCK: Lazy<u64> = Lazy::new(|| {
env::var("MAX_BLOCK")
.map(|val| val.parse().unwrap_or(0))
.unwrap_or(0)
});

pub const DEOXYS: &str = "deoxys";
pub const PATHFINDER: &str = "pathfinder";
pub const JUNO: &str = "juno";
pub const STARKGATE_ETH_CONTRACT_ADDR: &str =
"0x049d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7";
pub const INVALID_CONTRACT_ADDR: &str = "0x4269DEADBEEF";
pub const CONTRACT_ADDR: &str =
"0x03a20d4f7b4229e7c4863dab158b4d076d7f454b893d90a62011882dc4caca2a";
pub const CONTRACT_KEY: &str = "0x00f920571b9f85bdd92a867cfdc73319d0f8836f0e69e06e4c5566b6203f75cc";

///
/// Contract address for StarkGate ETH starknet bridge.
///
/// Details concerning available methods can be found on [StarkScan](https://starkscan.co/contract/0x049d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7#read-write-contract)
///
pub const STARKGATE_ETH_BRIDGE_ADDR: &str =
"0x049d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7";

///
/// Contract address for Jediswap exchange.
///
/// Details concerning available methods can be found on [StarkScan](https://starkscan.co/contract/0x041fd22b238fa21cfcf5dd45a8548974d8263b3a531a60388411c5e230f97023#read-write-contract):
///
pub const JEDI_SWAP_ADDR: &str =
"0x041fd22b238fa21cfcf5dd45a8548974d8263b3a531a60388411c5e230f97023";

///
/// Contract address for Starkgate USDC on Starknet.
///
/// Details concerning this coin can be found on [StarkScan](https://starkscan.co/token/0x053c91253bc9682c04929ca02ed00b3e423f6710d2ee7e0d5ebb06f3ecf368a8):
///
pub const STARKGATE_USDC: &str =
"0x053c91253bc9682c04929ca02ed00b3e423f6710d2ee7e0d5ebb06f3ecf368a8";

///
/// Contract address fpr Starkgate Ether on Starknet.
///
/// Detail concerning this coin can be found on [StarkScan](https://starkscan.co/token/0x049d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7):
///
pub const STARKGATE_ETHER: &str =
"0x049d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7";

///
/// Random ERC721 Starknet contract address.
///
/// Details concerning this contract can be found on [StarkScan](https://starkscan.co/contract/0x07fa9a8eacb89fb6cd0c7fe557e71c42a4b181ba328a9a04958136e6469c4e00)
///
pub const CONTRACT_ERC721: &str =
"0x05dbdedc203e92749e2e746e2d40a768d966bd243df04a6b712e222bc040a9af";

///
/// Random ERC20 Starknet contract address.
///
/// Details concerning this contract can be found on [StarkScan](https://starkscan.co/contract/0x04a5fdce70877b77f03aea8a29259176f88d5bea9d0ad8c0118f5316425e6ba0)
///
pub const CONTRACT_ERC20: &str =
"0x049d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7";

///
/// Random ACCOUNT Starknet contract address.
///
/// Details concerning this contract can be found on [StarkScan](https://starkscan.co/contract/0x05e1eee30e79b4f592f444132526b2e2c7f505698e888c659e5f5def5a458c1a)
///
pub const CONTRACT_ACCOUNT_CAIRO_ZERO: &str =
"0x0100104681e789e4211fba898262e1d6f6191bee797ce38a9e07fe8dec743574";

///
/// Random PROXY ACCOUNT Starknet contract address.
///
/// Details concerning this contract can be found on [StarkScan](https://starkscan.co/contract/0x05d7f4d55795b56ceb4dd93febe17954c7cfd5e15d7a79cb0cec067a713ac159)
///
pub const CONTRACT_ACCOUNT_PROXY_CAIRO_ZERO: &str =
"0x036Ef6410243034cE315eC19E7ABFEB41052f39095EE3D5AFcC20D672b1C725F";

///
/// Random legacy account using Cairo v0
///
/// Details concerning this contract can be found on [StarkScan](https://starkscan.co/contract/0x07076931c19d0ef52b847f9412c90a2ef999ff028f1005d2d069343061762fb7)
///
pub const CONTRACT_LEGACY: &str =
"0x07076931c19d0ef52b847f9412c90a2ef999ff028f1005d2d069343061762fb7";
pub const BLOCK_LEGACY: u64 = 2891;

///
/// INVOKE transaction accepted on L1, also transaction 1 at block 5000
///
/// Details concerning this transaction can be found on [StarkScan](https://starkscan.co/tx/0x0214840bad3099f95c40106097b8ef5fd16f06cb23efcdaec297398f77174597)
///
pub const TRANSACTION_INVOKE: &str =
"0x0214840bad3099f95c40106097b8ef5fd16f06cb23efcdaec297398f77174597";
pub const TRANSACTION_INVOKE_INDEX: u64 = 1;
pub const TRANSACTION_INVOKE_BLOCK_NB: u64 = 50000;

///
/// L1_HANDLER transaction accepted on L1, also transaction 57 at block 50000
///
/// Details concerning this transaction can be found on [StarkScan](https://starkscan.co/tx/0x05ca6470c37e943b0ae172a11359f7a457054319e8ae8771af32a1f397c7c208)
///
pub const TRANSACTION_L1_HANDLER: &str =
"0x05ca6470c37e943b0ae172a11359f7a457054319e8ae8771af32a1f397c7c208";
pub const TRANSACTION_L1_HANDLER_INDEX: u64 = 57;
pub const TRANSACTION_L1_HANDLER_BLOCK_NB: u64 = 50000;

///
/// DECLARE transaction accepted on L1, also transaction 44 at block 49990
///
/// Details concerning this transaction can be found on [StarkScan](https://starkscan.co/tx/0x056c0723ef6cde62f589bbf7c5c40897b6e3d9c13e960c5e7f28276d8e9c3229)
///
pub const TRANSACTION_DECLARE: &str =
"0x056c0723ef6cde62f589bbf7c5c40897b6e3d9c13e960c5e7f28276d8e9c3229";
pub const TRANSACTION_DECLARE_INDEX: u64 = 44;
pub const TRANSACTION_DECLARE_BLOCK_NB: u64 = 49990;

///
/// DEPLOY_ACCOUNT transaction accepted on L1, also transaction 0 at block 5000
///
/// Details concerning this transaction can be found on [StarkScan](https://starkscan.co/tx/0x0604e143591a6bff980f3141abdfc87f1ef3243785d251367cdaa7da5c337ba4)
///
pub const TRANSACTION_DEPLOY_ACCOUNT: &str =
"0x0604e143591a6bff980f3141abdfc87f1ef3243785d251367cdaa7da5c337ba4";
pub const TRANSACTION_DEPLOY_ACCOUNT_INDEX: u64 = 0;
pub const TRANSACTION_DEPLOY_ACCOUNT_BLOCK_NB: u64 = 50000;

///
/// Random reverted Starknet transaction
///
/// Details concerning this transaction can be found on [StarkScan](https://starkscan.co/tx/0x016ed559467c50c12f225f348ca8895d54b91a499ad6f856cb6086e317c120ca)
///
pub const TRANSACTION_REVERTED: &str =
"0x016ed559467c50c12f225f348ca8895d54b91a499ad6f856cb6086e317c120ca";

pub const ACCOUNT_CONTRACT: &str = "";
pub const TEST_CONTRACT_ADDRESS: &str = "";
pub const CAIRO_1_ACCOUNT_CONTRACT_CLASS_HASH: &str = "";
pub const TEST_CONTRACT_CLASS_HASH_V0: &str =
"0x036e5b6081df2174189fb83800d2a09132286dcd1004ad960a0c8d69364e6e9a";
pub const TEST_CONTRACT_CLASS_HASH_V1: &str =
"0x01a736d6ed154502257f02b1ccdf4d9d1089f80811cd6acad48e6b6a9d1f2003";

///
/// Value to be used as a payload for a message in the `estimate_message_fee` test.
///
pub const ETHEREUM_ADDRESS: &str = "";
pub const INVALID_ETHEREUM_ADDRESS: &str = "";
pub const SELECTOR_NAME: &str = "";

///
/// Value to be used as a signer for simulate_transaction tests.
///
pub const SIGNER_PRIVATE: &str = "";
pub const ARGENT_CONTRACT_ADDRESS: &str = "";

pub const ERR_DEOXYS: &str = "Error waiting for response from Deoxys client";
pub const ERR_PATHFINDER: &str = "Error waiting for response from Pathfinder client";

pub const SPEC_0_7_0: &str = "0.7.0";
pub const SPEC_0_7_1: &str = "0.7.1";

0 comments on commit d9a47de

Please sign in to comment.