diff --git a/.gitmodules b/.gitmodules index 6949b7d838..32a1c93e3b 100644 --- a/.gitmodules +++ b/.gitmodules @@ -7,6 +7,3 @@ [submodule "madara-tsukuyomi"] path = madara-tsukuyomi url = https://github.com/keep-starknet-strange/madara-tsukuyomi -[submodule "zaun"] - path = zaun - url = https://github.com/keep-starknet-strange/zaun diff --git a/CHANGELOG.md b/CHANGELOG.md index 7908635768..e443515aa7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -59,6 +59,8 @@ - dev: add avail and celestia crates behind a feature flag - dev: replace md5 with sha3_256 hash function - feat: fixing getNonce Rpc Call and adding a new test +- refactor: use Zaun crate for Starknet core contract bindings +- refactor: use Anvil sandbox from Zaun crate - feat(rpc) : estimateMessageFee RPC call implementation ## v0.6.0 diff --git a/Cargo.lock b/Cargo.lock index ca3144075d..97b3e902b0 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4650,7 +4650,7 @@ dependencies = [ "iana-time-zone-haiku", "js-sys", "wasm-bindgen", - "windows-core 0.52.0", + "windows-core", ] [[package]] @@ -6205,6 +6205,7 @@ dependencies = [ "starknet-rpc-test", "starknet-signers", "starknet_api", + "tempfile", "thiserror", "tokio", "url", @@ -6375,6 +6376,7 @@ dependencies = [ "sp-api", "sp-core 21.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.3.0)", "sp-runtime 24.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.3.0)", + "starknet-core-contract-client", "starknet_api", "thiserror", "url", @@ -6512,6 +6514,7 @@ dependencies = [ "sp-core 21.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.3.0)", "sp-io 23.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.3.0)", "sp-runtime 24.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.3.0)", + "starknet-core-contract-client", "starknet-crypto 0.6.1 (git+https://github.com/xJonathanLEI/starknet-rs.git?rev=64ebc36)", "starknet_api", "thiserror", @@ -9225,6 +9228,19 @@ dependencies = [ "winapi-util", ] +[[package]] +name = "sandbox" +version = "0.1.0" +source = "git+https://github.com/keep-starknet-strange/zaun#9fe421790165166b714c4ef95c79ad49a959a05a" +dependencies = [ + "dirs", + "ethers", + "hex", + "serde_json", + "starknet-core-contract-client", + "thiserror", +] + [[package]] name = "sc-allocator" version = "4.1.0-dev" @@ -12020,6 +12036,18 @@ dependencies = [ "starknet-ff 0.3.5 (git+https://github.com/xJonathanLEI/starknet-rs.git?rev=64ebc36)", ] +[[package]] +name = "starknet-core-contract-client" +version = "0.1.0" +source = "git+https://github.com/keep-starknet-strange/zaun#9fe421790165166b714c4ef95c79ad49a959a05a" +dependencies = [ + "async-trait", + "ethers", + "log", + "num-traits 0.2.17", + "thiserror", +] + [[package]] name = "starknet-crypto" version = "0.6.1" @@ -12102,7 +12130,6 @@ dependencies = [ "assert_matches", "async-trait", "ethers", - "ethers-solc", "flate2", "home", "madara-runtime", @@ -12113,17 +12140,18 @@ dependencies = [ "mp-snos-output", "reqwest", "rstest", + "sandbox", "serde", "serde_json", "starknet-accounts", "starknet-contract", "starknet-core", + "starknet-core-contract-client", "starknet-crypto 0.6.1 (git+https://github.com/xJonathanLEI/starknet-rs.git?rev=64ebc36)", "starknet-ff 0.3.5 (git+https://github.com/xJonathanLEI/starknet-rs.git?rev=64ebc36)", "starknet-providers", "starknet-signers", "starknet_api", - "tempfile", "test-context", "thiserror", "tokio", @@ -13401,7 +13429,7 @@ checksum = "97fee6b57c6a41524a810daee9286c02d7752c4253064d0b05472833a438f675" dependencies = [ "cfg-if", "digest 0.10.7", - "rand 0.8.5", + "rand 0.7.3", "static_assertions", ] @@ -14086,7 +14114,7 @@ version = "0.51.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ca229916c5ee38c2f2bc1e9d8f04df975b4bd93f9955dc69fabb5d91270045c9" dependencies = [ - "windows-core 0.51.1", + "windows-core", "windows-targets 0.48.5", ] @@ -14099,15 +14127,6 @@ dependencies = [ "windows-targets 0.48.5", ] -[[package]] -name = "windows-core" -version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" -dependencies = [ - "windows-targets 0.52.0", -] - [[package]] name = "windows-sys" version = "0.45.0" diff --git a/Cargo.toml b/Cargo.toml index dd92fecddb..c8080ad70f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -229,6 +229,10 @@ cairo-lang-utils = { git = "https://github.com/keep-starknet-strange/cairo.git", ethers = { git = "https://github.com/gakonst/ethers-rs", rev = "f0e5b194f09c533feb10d1a686ddb9e5946ec107" } ethers-solc = { git = "https://github.com/gakonst/ethers-rs", rev = "f0e5b194f09c533feb10d1a686ddb9e5946ec107" } +# Zaun +zaun-sandbox = { git = "https://github.com/keep-starknet-strange/zaun", package = "sandbox" } +starknet-core-contract-client = { git = "https://github.com/keep-starknet-strange/zaun" } + # Other third party dependencies anyhow = "1.0.75" flate2 = "1.0.28" @@ -270,6 +274,7 @@ assert_matches = "1.5.0" async-lock = "3.1.0" rustc-hex = { version = "2.0.0" } itertools = "0.12.0" +tempfile = "3.2" [patch."https://github.com/w3f/ring-vrf"] bandersnatch_vrfs = { git = "https://github.com/w3f/ring-vrf?rev=3ddc20", version = "0.0.4", rev = "3ddc20" } diff --git a/crates/client/l1-messages/Cargo.toml b/crates/client/l1-messages/Cargo.toml index a491591caf..2e967808d2 100644 --- a/crates/client/l1-messages/Cargo.toml +++ b/crates/client/l1-messages/Cargo.toml @@ -38,6 +38,9 @@ sp-runtime = { workspace = true, default-features = true } sc-client-api = { workspace = true, default-features = true } sc-transaction-pool-api = { workspace = true, default-features = true } +# Zaun +starknet-core-contract-client = { workspace = true } + # Other third party dependencies ethers = { workspace = true } serde = { workspace = true, default-features = true } diff --git a/crates/client/l1-messages/src/contract.rs b/crates/client/l1-messages/src/contract.rs index f353ea5b6c..dbc3129511 100644 --- a/crates/client/l1-messages/src/contract.rs +++ b/crates/client/l1-messages/src/contract.rs @@ -1,13 +1,6 @@ -use ethers::contract::abigen; use mp_felt::{Felt252Wrapper, Felt252WrapperError}; use mp_transactions::HandleL1MessageTransaction; - -abigen!( - L1Contract, - r"[ - event LogMessageToL2(address indexed fromAddress, uint256 indexed toAddress, uint256 indexed selector, uint256[] payload, uint256 nonce, uint256 fee) -]" -); +use starknet_core_contract_client::interfaces::LogMessageToL2Filter; #[derive(thiserror::Error, Debug, PartialEq)] #[allow(clippy::enum_variant_names)] @@ -22,31 +15,29 @@ pub enum L1EventToTransactionError { InvalidNonce(Felt252WrapperError), } -impl TryFrom for HandleL1MessageTransaction { - type Error = L1EventToTransactionError; - - fn try_from(event: LogMessageToL2Filter) -> Result { - // L2 contract to call. - let contract_address = Felt252Wrapper::try_from(sp_core::U256(event.to_address.0)) - .map_err(L1EventToTransactionError::InvalidContractAddress)?; - - // Function of the contract to call. - let entry_point_selector = Felt252Wrapper::try_from(sp_core::U256(event.selector.0)) - .map_err(L1EventToTransactionError::InvalidEntryPointSelector)?; - - // L1 message nonce. - let nonce: u64 = Felt252Wrapper::try_from(sp_core::U256(event.nonce.0)) - .map_err(L1EventToTransactionError::InvalidNonce)? - .try_into() - .map_err(L1EventToTransactionError::InvalidNonce)?; - - let calldata: Vec = event - .payload - .iter() - .map(|param| Felt252Wrapper::try_from(sp_core::U256(param.0))) - .collect::, Felt252WrapperError>>() - .map_err(L1EventToTransactionError::InvalidCalldata)?; - - Ok(HandleL1MessageTransaction { nonce, contract_address, entry_point_selector, calldata }) - } +pub fn parse_handle_l1_message_transaction( + event: LogMessageToL2Filter, +) -> Result { + // L2 contract to call. + let contract_address = Felt252Wrapper::try_from(sp_core::U256(event.to_address.0)) + .map_err(L1EventToTransactionError::InvalidContractAddress)?; + + // Function of the contract to call. + let entry_point_selector = Felt252Wrapper::try_from(sp_core::U256(event.selector.0)) + .map_err(L1EventToTransactionError::InvalidEntryPointSelector)?; + + // L1 message nonce. + let nonce: u64 = Felt252Wrapper::try_from(sp_core::U256(event.nonce.0)) + .map_err(L1EventToTransactionError::InvalidNonce)? + .try_into() + .map_err(L1EventToTransactionError::InvalidNonce)?; + + let calldata: Vec = event + .payload + .iter() + .map(|param| Felt252Wrapper::try_from(sp_core::U256(param.0))) + .collect::, Felt252WrapperError>>() + .map_err(L1EventToTransactionError::InvalidCalldata)?; + + Ok(HandleL1MessageTransaction { nonce, contract_address, entry_point_selector, calldata }) } diff --git a/crates/client/l1-messages/src/worker.rs b/crates/client/l1-messages/src/worker.rs index 007c40ce9a..6342640cf7 100644 --- a/crates/client/l1-messages/src/worker.rs +++ b/crates/client/l1-messages/src/worker.rs @@ -11,9 +11,10 @@ use sp_runtime::traits::Block as BlockT; use starknet_api::api_core::Nonce; use starknet_api::hash::StarkFelt; use starknet_api::transaction::Fee; +use starknet_core_contract_client::interfaces::{LogMessageToL2Filter, StarknetMessagingEvents}; use crate::config::L1MessagesWorkerConfig; -use crate::contract::{L1Contract, LogMessageToL2Filter}; +use crate::contract::parse_handle_l1_message_transaction; use crate::error::L1MessagesWorkerError; const TX_SOURCE: TransactionSource = TransactionSource::External; @@ -31,8 +32,10 @@ pub async fn run_worker( { log::info!("⟠ Starting L1 Messages Worker with settings: {:?}", config); - let l1_contract = - L1Contract::new(*config.contract_address(), Arc::new(Provider::new(Http::new(config.provider().clone())))); + let event_listener = StarknetMessagingEvents::new( + *config.contract_address(), + Arc::new(Provider::new(Http::new(config.provider().clone()))), + ); let last_synced_event_block = match backend.messaging().last_synced_l1_block_with_event() { Ok(blknum) => blknum, @@ -42,7 +45,7 @@ pub async fn run_worker( } }; - let events = l1_contract.events().from_block(last_synced_event_block.block_number); + let events = event_listener.event::().from_block(last_synced_event_block.block_number); let mut event_stream = match events.stream_with_meta().await { Ok(stream) => stream, Err(e) => { @@ -109,7 +112,7 @@ where } else { Fee(event.fee.as_u128()) }; - let transaction: HandleL1MessageTransaction = event.try_into()?; + let transaction: HandleL1MessageTransaction = parse_handle_l1_message_transaction(event)?; let best_block_hash = client.info().best_hash; diff --git a/crates/client/settlement/Cargo.toml b/crates/client/settlement/Cargo.toml index b94d2733db..4477508c1d 100644 --- a/crates/client/settlement/Cargo.toml +++ b/crates/client/settlement/Cargo.toml @@ -49,6 +49,9 @@ pallet-starknet-runtime-api = { workspace = true, default-features = true } # Ethereum ethers = { workspace = true } +# Zaun +starknet-core-contract-client = { workspace = true } + # Others log = { workspace = true } rustc-hex = { workspace = true } diff --git a/crates/client/settlement/src/ethereum/client.rs b/crates/client/settlement/src/ethereum/client.rs index 3d920ac87b..a1abdb21b1 100644 --- a/crates/client/settlement/src/ethereum/client.rs +++ b/crates/client/settlement/src/ethereum/client.rs @@ -1,11 +1,13 @@ use std::sync::Arc; use std::time::Duration; -use ethers::prelude::{abigen, SignerMiddleware}; +use ethers::prelude::SignerMiddleware; use ethers::providers::{Http, Provider}; use ethers::signers::{LocalWallet, Signer}; use ethers::types::{Address, TransactionReceipt, I256, U256}; pub use mc_data_availability::ethereum::config::EthereumConfig; +use starknet_core_contract_client::interfaces::StarknetSovereignContract; +use starknet_core_contract_client::LocalWalletSignerMiddleware; use crate::ethereum::errors::{Error, Result}; @@ -37,26 +39,14 @@ use crate::ethereum::errors::{Error, Result}; // // Read this great overview to learn more about SNOS: // https://hackmd.io/@pragma/ByP-iux1T -abigen!( - StarknetContract, - r#"[ - function programHash() public view returns (uint256) - function stateBlockNumber() external view returns (int256) - function stateRoot() external view returns (uint256) - function configHash() public view returns (uint256) - function updateState(uint256[] calldata programOutput) external - ]"#, -); - -pub type LocalMiddleware = SignerMiddleware, LocalWallet>; pub struct StarknetContractClient { - contract: StarknetContract, + contract: StarknetSovereignContract, } impl StarknetContractClient { - pub fn new(address: Address, client: Arc) -> Self { - Self { contract: StarknetContract::new(address, client) } + pub fn new(address: Address, client: Arc) -> Self { + Self { contract: StarknetSovereignContract::new(address, client) } } pub async fn state_block_number(&self) -> Result { diff --git a/crates/client/settlement/src/ethereum/errors.rs b/crates/client/settlement/src/ethereum/errors.rs index 021dd33c55..cd882d9ef0 100644 --- a/crates/client/settlement/src/ethereum/errors.rs +++ b/crates/client/settlement/src/ethereum/errors.rs @@ -1,4 +1,4 @@ -use super::client::LocalMiddleware; +use starknet_core_contract_client::LocalWalletSignerMiddleware; /// Ethereum client error type. #[derive(thiserror::Error, Debug)] @@ -14,7 +14,7 @@ pub enum Error { HexParser(#[from] rustc_hex::FromHexError), #[error("Error while interacting with contract: {0}")] - Contract(#[from] ethers::contract::ContractError), + Contract(#[from] ethers::contract::ContractError), #[error("HTTP provider error: {0}")] Provider(#[from] ethers::providers::ProviderError), diff --git a/crates/node/src/commands/run.rs b/crates/node/src/commands/run.rs index a47f9c3009..6021b1c0c9 100644 --- a/crates/node/src/commands/run.rs +++ b/crates/node/src/commands/run.rs @@ -207,14 +207,14 @@ pub fn run_node(mut cli: Cli) -> Result<()> { let settlement_config: Option<(SettlementLayer, PathBuf)> = match cli.run.settlement { Some(SettlementLayer::Ethereum) => { - let settlement_conf = cli.run.clone().settlement_conf.unwrap_or({ - let path_sett_conf_json = chain_config_dir.join("settlement_conf.json"); - if !path_sett_conf_json.exists() { - return Err(sc_cli::Error::Input("no file settlement_conf in base_path".to_string())); - } - path_sett_conf_json - }); - + let settlement_conf = + cli.run.clone().settlement_conf.unwrap_or_else(|| chain_config_dir.join("settlement_conf.json")); + if !settlement_conf.exists() { + return Err(sc_cli::Error::Input(format!( + "Settlement config does not exist: {}", + settlement_conf.display() + ))); + } Some((SettlementLayer::Ethereum, settlement_conf)) } diff --git a/madara-test-runner/Cargo.toml b/madara-test-runner/Cargo.toml index e01e0332fc..833ccd4e9e 100644 --- a/madara-test-runner/Cargo.toml +++ b/madara-test-runner/Cargo.toml @@ -23,6 +23,7 @@ starknet-ff = { workspace = true } starknet-providers = { workspace = true } starknet-signers = { workspace = true } starknet_api = { workspace = true, default-features = true } +tempfile = { workspace = true } thiserror = { workspace = true } tokio = { version = "1.29.1", features = ["rt", "macros", "parking_lot"] } url = "2.4.1" diff --git a/madara-test-runner/README.md b/madara-test-runner/README.md new file mode 100644 index 0000000000..1eb5a69a16 --- /dev/null +++ b/madara-test-runner/README.md @@ -0,0 +1,101 @@ +# Madara test runner + +Madara runner allows to launch a node with manual block sealing, and provides a +convenient client for interacting with that node. + +## Arguments + +Madara node can be parameterized with `MadaraArgs`: + +```rust +use madara_test_runner::{MadaraRunner, MadaraArgs, Settlement}; + +let madara_client = MadaraRunner::new( + MadaraArgs { + settlement: Some(Settlement::Ethereum), + settlement_conf: Some(format!("/tmp/madara/chains/dev/eth-config.json").into()) + base_path: Some(format!("/tmp/madara").into()), + } +) +.await; +``` + +Available arguments: + +- `settlement` [Optional] - which settlement layer to use (can be + `Settlement::Ethereum` for now) +- `settlement_conf` [Optional] - path to the Ethereum settlement config +- `base_path` [Optional] - override Madara base path which is used for storing + configs and other assets + +## Logging + +When you run integration tests for the first time, cargo needs to build the +Madara binary first - it takes some time (depending on your h/w) and you might +see " has been running for over 60 seconds" in your console +which is fine and it will eventually terminate. + +However, if there are some building or launch errors, the process will stuck +(under the hood it will try to reconnect to the node, but the node fails to +start). In order to troubleshoot such issues you can enable Madara logs. Simply +run tests with `MADARA_LOG` environment variable set: + +```shell +MADARA_LOG=1 cargo test --package starknet-e2e-test -- --nocapture +``` + +The logs will be available at: + +- `/target/madara-log/madara-stderr-log.txt` +- `/target/madara-log/madara-stdout-log.txt` + +It can also be helpful if you want to troubleshoot some issue with debug/trace +logs. + +## Parallel instances + +Note that cargo might run tests in parallel meaning that there can be multiple +running Madara instance at a single point of time. In order to avoid concurrent +access to e.g. config files you can override Madara base path and use unique +temporary directories for each instance. + +Here is how you can do that using `test_context` crate and `MadaraTempDir` +helper: + +```rust +use tempfile::TempDir; +use test_context::{test_context, AsyncTestContext}; +use async_trait::async_trait; +use madara_test_runner::{MadaraRunner, MadaraTempDir, MadaraArgs}; + +struct Context { + pub madara_temp_dir: MadaraTempDir, +} + +#[async_trait] +impl AsyncTestContext for Context { + async fn setup() -> Self { + let madara_temp_dir = MadaraTempDir::new(); + Self { madara_temp_dir } + } + + async fn teardown(self) { + self.madara_temp_dir.clear(); + } +} + +#[test_context(Context)] +#[rstest] +#[tokio::test] +async fn my_test_case(ctx: &mut Context) -> Result<(), anyhow::Error> { + let madara = MadaraRunner::new( + MadaraArgs { + base_path: Some(self.madara_temp_dir.base_path()), + ..Default::default() + } + ) + .await; + + todo!() +} +``` diff --git a/madara-test-runner/src/lib.rs b/madara-test-runner/src/lib.rs index b4f2b74522..185843b0f5 100644 --- a/madara-test-runner/src/lib.rs +++ b/madara-test-runner/src/lib.rs @@ -10,6 +10,7 @@ use tokio::sync::Mutex; use crate::client::MadaraClient; use crate::node::MadaraNode; +pub use crate::node::MadaraTempDir; lazy_static! { /// This is to prevent TOCTOU errors; i.e. one background madara node might find one @@ -20,22 +21,30 @@ lazy_static! { static ref FREE_PORT_ATTRIBUTION_MUTEX: Mutex<()> = Mutex::new(()); } -#[derive(Display, Clone)] +#[derive(Debug, Display, Clone)] pub enum Settlement { Ethereum, } +#[derive(Debug)] pub struct MadaraRunner { _node: MadaraNode, client: MadaraClient, } +#[derive(Debug, Clone, Default)] +pub struct MadaraArgs { + pub settlement: Option, + pub settlement_conf: Option, + pub base_path: Option, +} + impl MadaraRunner { - pub async fn new(settlement: Option, base_path: Option) -> Self { + pub async fn new(args: MadaraArgs) -> Self { // we keep the reference, otherwise the mutex unlocks immediately let _mutex_guard = FREE_PORT_ATTRIBUTION_MUTEX.lock().await; - let mut node = MadaraNode::run(settlement, base_path); + let mut node = MadaraNode::run(args); let client = MadaraClient::new(node.url()); // Wait until node is ready diff --git a/madara-test-runner/src/node.rs b/madara-test-runner/src/node.rs index 2d348ba706..646d3086e5 100644 --- a/madara-test-runner/src/node.rs +++ b/madara-test-runner/src/node.rs @@ -6,13 +6,45 @@ use std::path::{Path, PathBuf}; use std::process::{Child, Command, ExitStatus, Stdio}; use std::str::FromStr; +use tempfile::TempDir; use url::Url; -use crate::Settlement; +use crate::MadaraArgs; const MIN_PORT: u16 = 49_152; const MAX_PORT: u16 = 65_535; +#[derive(Debug)] +/// A helper struct for creating temporary Madara folders +/// +/// The temporary directory is deleted when instance is dropped. +pub struct MadaraTempDir { + temp_dir: TempDir, +} + +impl MadaraTempDir { + pub fn base_path(&self) -> PathBuf { + self.temp_dir.path().to_path_buf() + } + + pub fn data_path(&self) -> PathBuf { + self.temp_dir.path().join("chains/dev") + } + + pub fn clear(self) { + self.temp_dir.close().expect("Failed to clean up"); + } +} + +impl Default for MadaraTempDir { + fn default() -> Self { + let temp_dir = TempDir::with_prefix("madara").expect("Failed to create Madara path"); + let data_path = temp_dir.path().join("chains/dev"); + create_dir_all(data_path).expect("Failed to create data path"); + Self { temp_dir } + } +} + #[derive(Debug)] /// A wrapper over the Madara process handle, reqwest client and request counter /// @@ -69,14 +101,15 @@ impl MadaraNode { Command::new("cargo").stdout(stdout).stderr(stderr).args(arguments).spawn().expect("Could not run Madara node") } - pub fn run(settlement: Option, base_path: Option) -> Self { + pub fn run(args: MadaraArgs) -> Self { let port = get_free_port(); let repository_root = &get_repository_root(); std::env::set_current_dir(repository_root).expect("Failed to change working directory"); - let base_path_arg = base_path.map(|arg| format!("--base-path={}", arg.display())); - let settlement_arg = settlement.map(|arg| format!("--settlement={arg}")); + let base_path_arg = args.base_path.map(|arg| format!("--base-path={}", arg.display())); + let settlement_arg = args.settlement.map(|arg| format!("--settlement={arg}")); + let settlement_conf_arg = args.settlement_conf.map(|arg| format!("--settlement-conf={}", arg.display())); let rpc_port_arg = format!("--rpc-port={port}"); let chain_arg = "--chain=dev"; let from_local_arg = format!("--from-local={}", repository_root.join("configs").display()); @@ -103,6 +136,9 @@ impl MadaraNode { if let Some(s) = &settlement_arg { run_args.push(s); }; + if let Some(s) = &settlement_conf_arg { + run_args.push(s); + } let process = Self::cargo_run(repository_root.as_path(), run_args); diff --git a/starknet-e2e-test/Cargo.toml b/starknet-e2e-test/Cargo.toml index adc2be321b..85f31a8255 100644 --- a/starknet-e2e-test/Cargo.toml +++ b/starknet-e2e-test/Cargo.toml @@ -8,14 +8,12 @@ anyhow = "1.0.72" assert_matches = "1.5.0" async-trait = "0.1" ethers = { workspace = true } -ethers-solc = { workspace = true } flate2 = { workspace = true } home = "0.5.5" reqwest = "0.11.18" rstest = "0.18.1" serde = { version = "1.0.179", features = ["derive"] } serde_json = "1.0.107" -tempfile = "3.2" test-context = "0.1.3" thiserror = { workspace = true } tokio = { version = "1.29.1", features = ["rt", "macros", "parking_lot"] } @@ -39,10 +37,18 @@ mp-felt = { workspace = true } mp-messages = { workspace = true } mp-snos-output = { workspace = true } +# Zaun +starknet-core-contract-client = { workspace = true } +zaun-sandbox = { workspace = true } + [[test]] name = "ethereum_core_contract" path = "ethereum_core_contract.rs" [[test]] -name = "ethereum_e2e_settlement" -path = "ethereum_e2e_settlement.rs" +name = "ethereum_settlement" +path = "ethereum_settlement.rs" + +[[test]] +name = "ethereum_e2e" +path = "ethereum_e2e.rs" diff --git a/starknet-e2e-test/README.md b/starknet-e2e-test/README.md index bea602335e..d4a0318b7a 100644 --- a/starknet-e2e-test/README.md +++ b/starknet-e2e-test/README.md @@ -1,6 +1,7 @@ # Integration tests -This crate contains integration tests run against a fully-fledged Madara node. +This crate contains integration tests that are run against a fully-fledged +Madara node. In order to run all tests: @@ -14,108 +15,15 @@ In order to run a specific test case: cargo test --package starknet-e2e-test -- --nocapture ``` -## Madara runner +## Anvil sandbox for Ethereum E2E tests -Sometimes you might want more control over the launched node. Here is how you -can instantiate Madara runner which will run a node and provide you with a -client: +If `ANVIL_ENDPOINT` environment variable is set, integration tests involving +Ethereum contracts will try to attach to an already running Anvil. Otherwise, a +new instance will be spawn for every test. -```rust -use madara_test_runner::{MadaraRunner, Settlement}; +The default binary search location is `~/.foundry/bin/anvil`. Alternatively you +can specify the Anvil binary location by setting `ANVIL_PATH` environment +variable. -let madara_client = MadaraRunner::new( - Some(Settlement::Ethereum), - Some(format!("/tmp/madara").into()), -) -.await; -``` - -Available arguments: - -- `settlement` [Optional] - which settlement layer to use (can be - `Settlement::Ethereum` for now) -- `base_path` [Optional] - override Madara base path which is used for storing - configs and other assets - -Note that DA & settlement configs are expected to be stored in "data path" which -is `base_path/chains/` (for tests it's `dev`). - -## Logging - -When you run integration tests for the first time, cargo needs to build the -Madara binary first - it takes some time (depending on your h/w) and you might -see " has been running for over 60 seconds" in your console -which is fine and it will eventually terminate. - -However, if there are some building or launch errors, the process will stuck -(under the hood it will try to reconnect to the node, but the node fails to -start). In order to troubleshoot such issues you can enable Madara logs. Simply -run tests with `MADARA_LOG` environment variable set: - -```shell -MADARA_LOG=1 cargo test --package starknet-rpc-test -- --nocapture -``` - -The logs will be available at: - -- `/target/madara-log/madara-stderr-log.txt` -- `/target/madara-log/madara-stdout-log.txt` - -It can also be helpful if you want to troubleshoot some issue with debug/trace -logs. - -## Parallel instances - -Note that cargo might run tests in parallel meaning that there can be multiple -running Madara instance at a single point of time. In order to avoid concurrent -access to e.g. config files you can override Madara base path and use unique -temporary directories for each instance. - -Here is how you can do that using `test_context` and `tempfile` crate: - -```rust -use tempfile::TempDir; -use test_context::{test_context, AsyncTestContext}; -use async_trait::async_trait; -use madara_node_runner::MadaraRunner; - -struct Context { - pub madara_path: TempDir, -} - -#[async_trait] -impl AsyncTestContext for Context { - async fn setup() -> Self { - let madara_path = TempDir::with_prefix("madara").expect("Failed to create Madara path"); - Self { madara_path } - } - - async fn teardown(self) { - self.madara_path.close().expect("Failed to clean up"); - } -} - -#[test_context(Context)] -#[rstest] -#[tokio::test] -async fn my_test_case(ctx: &mut Context) -> Result<(), anyhow::Error> { - let madara = MadaraRunner::new( - None, - Some(ctx.madara_path.path().into()), - ) - .await; - - todo!() -} -``` - -## Anvil - -By default, integration tests involving Ethereum contracts will try to find -Anvil at `~/.foundry/bin/anvil`. -Alternatively you can specify the Anvil binary location by setting `ANVIL_PATH` -environment variable. - -IMPORTANT: make sure your Anvil version uses a compatiuble `ethers-rs` library -version. -In case of an issue, try to update both dependencies first. +IMPORTANT: make sure your local Anvil version uses a compatible `ethers-rs` +library version. In case of an issue, try to update both dependencies. diff --git a/starknet-e2e-test/contracts/Makefile b/starknet-e2e-test/contracts/Makefile deleted file mode 100644 index d281ddd542..0000000000 --- a/starknet-e2e-test/contracts/Makefile +++ /dev/null @@ -1,8 +0,0 @@ -.PHONY: artifacts - -artifacts: - mkdir artifacts || true - forge build - forge build --root ../../madara-zaun - cp build/UnsafeProxy.sol/UnsafeProxy.json artifacts/ - cp ../../madara-zaun/out/StarknetValidium.sol/Starknet.json artifacts/ \ No newline at end of file diff --git a/starknet-e2e-test/contracts/README.md b/starknet-e2e-test/contracts/README.md deleted file mode 100644 index aece112c2d..0000000000 --- a/starknet-e2e-test/contracts/README.md +++ /dev/null @@ -1,30 +0,0 @@ -# Solidity contracts - -This folder contains compiled contracts that are used for integration / e2e -tests of Madara L1 <> L2 messaging. - -## Compilation - -First make sure you have -[Foundry](https://book.getfoundry.sh/getting-started/installation) installed. - -Starknet contract sources live in [madara-zaun](../madara-zaun/) folder which is -git submodule pointing at -[zaun repo](https://github.com/keep-starknet-strange/zaun). If you haven't -cloned the submodules together with the Madara repository, run: - -```bash -git submodule update --init -``` - -If `zaun` submodule is out of sync, do: - -```bash -git submodule sync --recursive -``` - -In this folder run: - -```bash -make artifacts -``` diff --git a/starknet-e2e-test/contracts/artifacts/Starknet.json b/starknet-e2e-test/contracts/artifacts/Starknet.json deleted file mode 100644 index 3bcbb0ec80..0000000000 --- a/starknet-e2e-test/contracts/artifacts/Starknet.json +++ /dev/null @@ -1,8228 +0,0 @@ -{ - "abi": [ - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "changedBy", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "oldConfigHash", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newConfigHash", - "type": "uint256" - } - ], - "name": "ConfigHashChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "fromAddress", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "address", - "name": "toAddress", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256[]", - "name": "payload", - "type": "uint256[]" - } - ], - "name": "ConsumedMessageToL1", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "fromAddress", - "type": "address" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "toAddress", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "selector", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256[]", - "name": "payload", - "type": "uint256[]" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "nonce", - "type": "uint256" - } - ], - "name": "ConsumedMessageToL2", - "type": "event" - }, - { - "anonymous": false, - "inputs": [], - "name": "Finalized", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "fromAddress", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "address", - "name": "toAddress", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256[]", - "name": "payload", - "type": "uint256[]" - } - ], - "name": "LogMessageToL1", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "fromAddress", - "type": "address" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "toAddress", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "selector", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256[]", - "name": "payload", - "type": "uint256[]" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "nonce", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "fee", - "type": "uint256" - } - ], - "name": "LogMessageToL2", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "acceptedGovernor", - "type": "address" - } - ], - "name": "LogNewGovernorAccepted", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "nominatedGovernor", - "type": "address" - } - ], - "name": "LogNominatedGovernor", - "type": "event" - }, - { - "anonymous": false, - "inputs": [], - "name": "LogNominationCancelled", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "operator", - "type": "address" - } - ], - "name": "LogOperatorAdded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "operator", - "type": "address" - } - ], - "name": "LogOperatorRemoved", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "removedGovernor", - "type": "address" - } - ], - "name": "LogRemovedGovernor", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "bytes32", - "name": "stateTransitionFact", - "type": "bytes32" - } - ], - "name": "LogStateTransitionFact", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "globalRoot", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "int256", - "name": "blockNumber", - "type": "int256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "blockHash", - "type": "uint256" - } - ], - "name": "LogStateUpdate", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "fromAddress", - "type": "address" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "toAddress", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "selector", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256[]", - "name": "payload", - "type": "uint256[]" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "nonce", - "type": "uint256" - } - ], - "name": "MessageToL2Canceled", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "fromAddress", - "type": "address" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "toAddress", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "selector", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256[]", - "name": "payload", - "type": "uint256[]" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "nonce", - "type": "uint256" - } - ], - "name": "MessageToL2CancellationStarted", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "changedBy", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "oldProgramHash", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newProgramHash", - "type": "uint256" - } - ], - "name": "ProgramHashChanged", - "type": "event" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "toAddress", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "selector", - "type": "uint256" - }, - { - "internalType": "uint256[]", - "name": "payload", - "type": "uint256[]" - }, - { - "internalType": "uint256", - "name": "nonce", - "type": "uint256" - } - ], - "name": "cancelL1ToL2Message", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "configHash", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "fromAddress", - "type": "uint256" - }, - { - "internalType": "uint256[]", - "name": "payload", - "type": "uint256[]" - } - ], - "name": "consumeMessageFromL2", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "finalize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "getMaxL1MsgFee", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [], - "name": "identify", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "initialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "isFinalized", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "isFrozen", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "user", - "type": "address" - } - ], - "name": "isOperator", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "msgHash", - "type": "bytes32" - } - ], - "name": "l1ToL2MessageCancellations", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "l1ToL2MessageNonce", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "msgHash", - "type": "bytes32" - } - ], - "name": "l1ToL2Messages", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "msgHash", - "type": "bytes32" - } - ], - "name": "l2ToL1Messages", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "messageCancellationDelay", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "programHash", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newOperator", - "type": "address" - } - ], - "name": "registerOperator", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "toAddress", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "selector", - "type": "uint256" - }, - { - "internalType": "uint256[]", - "name": "payload", - "type": "uint256[]" - } - ], - "name": "sendMessageToL2", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "newConfigHash", - "type": "uint256" - } - ], - "name": "setConfigHash", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "delayInSeconds", - "type": "uint256" - } - ], - "name": "setMessageCancellationDelay", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "newProgramHash", - "type": "uint256" - } - ], - "name": "setProgramHash", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "starknetAcceptGovernance", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "starknetCancelNomination", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "user", - "type": "address" - } - ], - "name": "starknetIsGovernor", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newGovernor", - "type": "address" - } - ], - "name": "starknetNominateNewGovernor", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "governorForRemoval", - "type": "address" - } - ], - "name": "starknetRemoveGovernor", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "toAddress", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "selector", - "type": "uint256" - }, - { - "internalType": "uint256[]", - "name": "payload", - "type": "uint256[]" - }, - { - "internalType": "uint256", - "name": "nonce", - "type": "uint256" - } - ], - "name": "startL1ToL2MessageCancellation", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "stateBlockHash", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "stateBlockNumber", - "outputs": [ - { - "internalType": "int256", - "name": "", - "type": "int256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "stateRoot", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "removedOperator", - "type": "address" - } - ], - "name": "unregisterOperator", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256[]", - "name": "programOutput", - "type": "uint256[]" - } - ], - "name": "updateState", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - } - ], - "bytecode": { - "object": "0x60a060405234801561001057600080fd5b5030606081901b608052612cee610031600039806109365250612cee6000f3fe6080604052600436106101e35760003560e01c80638303bd8a1161010257806396115bc211610095578063e1f1176d11610064578063e1f1176d14610515578063e37fec251461052a578063e87e73321461053f578063eeb728661461055f576101e3565b806396115bc2146104955780639be446bf146104b5578063a46efaf3146104d5578063c99d397f146104f5576101e3565b80638d4e4083116100d15780638d4e40831461043657806391a66a261461044b578063946be3ed1461046b5780639588eca214610480576101e3565b80638303bd8a146103cc57806384f921cd146103e1578063853e2461146104015780638a9bf09014610421576101e3565b80633e3aa6c51161017a5780636170ff1b116101495780636170ff1b1461034c5780636d70f7ae1461036c57806377c7d7a91461038c5780637a98660b146103ac576101e3565b80633e3aa6c5146102e1578063439fab91146103025780634bb278f31461032257806354eccba414610337576101e3565b806335befa5d116101b657806335befa5d146102755780633682a4501461028a578063382d83e3146102ac5780633d07b336146102c1576101e3565b8063018cccdf146101e857806301a01590146102135780632c9dd5c01461024057806333eeb14714610260575b600080fd5b3480156101f457600080fd5b506101fd610581565b60405161020a919061235d565b60405180910390f35b34801561021f57600080fd5b5061023361022e366004611f37565b6105c6565b60405161020a9190612352565b34801561024c57600080fd5b506101fd61025b3660046120ae565b6105d7565b34801561026c57600080fd5b506102336106ba565b34801561028157600080fd5b506101fd6106bf565b34801561029657600080fd5b506102aa6102a5366004611f37565b6106d2565b005b3480156102b857600080fd5b506101fd610773565b3480156102cd57600080fd5b506102aa6102dc366004611f9a565b610786565b6102f46102ef3660046120f8565b61081a565b60405161020a929190612366565b34801561030e57600080fd5b506102aa61031d366004611fb2565b610934565b34801561032e57600080fd5b506102aa610a7c565b34801561034357600080fd5b506101fd610b14565b34801561035857600080fd5b506101fd610367366004612149565b610b20565b34801561037857600080fd5b50610233610387366004611f37565b610c62565b34801561039857600080fd5b506101fd6103a7366004611f9a565b610c8f565b3480156103b857600080fd5b506101fd6103c7366004612149565b610caa565b3480156103d857600080fd5b506101fd610d61565b3480156103ed57600080fd5b506102aa6103fc366004611f37565b610d84565b34801561040d57600080fd5b506102aa61041c366004611f5a565b610d8d565b34801561042d57600080fd5b506101fd610ef3565b34801561044257600080fd5b50610233610f16565b34801561045757600080fd5b506102aa610466366004611f37565b610f39565b34801561047757600080fd5b506102aa610f42565b34801561048c57600080fd5b506101fd610f4c565b3480156104a157600080fd5b506102aa6104b0366004611f37565b610f5c565b3480156104c157600080fd5b506101fd6104d0366004611f9a565b610ff2565b3480156104e157600080fd5b506101fd6104f0366004611f9a565b610ffc565b34801561050157600080fd5b506102aa610510366004611f9a565b611006565b34801561052157600080fd5b506101fd611059565b34801561053657600080fd5b506102aa61107c565b34801561054b57600080fd5b506102aa61055a366004611f9a565b611084565b34801561056b57600080fd5b50610574611118565b60405161020a91906123a3565b60006105c16040518060400160405280602081526020017f535441524b4e45545f312e305f4d5347494e475f4c31544f4c325f4e4f4e434581525061114f565b905090565b60006105d182611183565b92915050565b60405160009081906105f59086903390869088908290602001612235565b60405160208183030381529060405280519060200120905060006106176111b2565b600083815260209190915260409020541161064d5760405162461bcd60e51b8152600401610644906128ee565b60405180910390fd5b336001600160a01b0316857f7a06c571aa77f34d9706c51e5d8122b5595aebeaa34233bfe866f22befb973b186866040516106899291906122ab565b60405180910390a3600161069b6111b2565b6000838152602091909152604090208054919091039055949350505050565b600090565b60006106c96111d5565b60010154905090565b6106db33611183565b6106f75760405162461bcd60e51b81526004016106449061283c565b61070081610c62565b61077057600161070e61121f565b6001600160a01b0383166000908152602091909152604090819020805460ff191692151592909217909155517f50a18c352ee1c02ffe058e15c2eb6e58be387c81e73cc1e17035286e54c19a5790610767908390612297565b60405180910390a15b50565b600061077d6111d5565b60020154905090565b61078e610f16565b156107ab5760405162461bcd60e51b815260040161064490612819565b6107b433611183565b6107d05760405162461bcd60e51b81526004016106449061283c565b337f393c6beb5756a944b2967f15f31ff671e312e945d7a84fd3bdcfd6b408b2dc796107fa611059565b83604051610809929190612366565b60405180910390a261077081611242565b6000806000341161083d5760405162461bcd60e51b815260040161064490612a3d565b610845610b14565b3411156108645760405162461bcd60e51b8152600401610644906125b0565b600061086e610581565b90506108b26040518060400160405280602081526020017f535441524b4e45545f312e305f4d5347494e475f4c31544f4c325f4e4f4e434581525082600101611260565b8587336001600160a01b03167fdb80dd488acf86d17c747445b0eabb5d57c541d3bd7b6b87af987858e5066b2b888886346040516108f394939291906122e3565b60405180910390a4600061090a8888888886611293565b9050346001016109186112d4565b6000838152602091909152604090205597909650945050505050565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031630141561097d5760405162461bcd60e51b81526004016106449061267c565b60006109876106ba565b602090810291508101808310156109b05760405162461bcd60e51b81526004016106449061288a565b60006109be82848688612abf565b8101906109cb9190611f37565b90503660006109dc8582888a612abf565b915091506109ea8282610a78565b3660006109f98887818c612abf565b90925090506001600160a01b03851615610a2457610a188583836112f7565b50505050505050610a78565b610a2c61141c565b15610a54578015610a4f5760405162461bcd60e51b81526004016106449061261e565b610a70565b610a5e828261142d565b610a68828261148d565b610a706114e7565b505050505050505b5050565b610a8533611183565b610aa15760405162461bcd60e51b81526004016106449061283c565b610aa9610f16565b15610ac65760405162461bcd60e51b815260040161064490612819565b610ae9604051806060016040528060318152602001612c88603191396001611260565b6040517f6823b073d48d6e3a7d385eeb601452d680e74bb46afe3255a7d778f3a9b1768190600090a1565b670de0b6b3a764000090565b60008486336001600160a01b03167f8abd2ec2e0a10c82f5b60ea00455fa96c41fd144f225fcc52b8d83d94f803ed8878787604051610b61939291906122bf565b60405180910390a46000610b788787878787611293565b90506000610b846112d4565b60008381526020919091526040902054905080610bb35760405162461bcd60e51b81526004016106449061277d565b6000610bbd61153e565b60008481526020919091526040902054905080610bec5760405162461bcd60e51b8152600401610644906129fb565b6000610bf6610d61565b8201905081811015610c1a5760405162461bcd60e51b815260040161064490612510565b80421015610c3a5760405162461bcd60e51b815260040161064490612547565b6000610c446112d4565b60008681526020919091526040902055509198975050505050505050565b6000610c6c61121f565b6001600160a01b0392909216600090815260209290925250604090205460ff1690565b6000610c996112d4565b600092835260205250604090205490565b60008486336001600160a01b03167f2e00dccd686fd6823ec7dc3e125582aa82881b6ff5f6b5a73856e1ea8338a3be878787604051610ceb939291906122bf565b60405180910390a46000610d028787878787611293565b90506000610d0e6112d4565b60008381526020919091526040902054905080610d3d5760405162461bcd60e51b81526004016106449061277d565b42610d4661153e565b60008481526020919091526040902055509695505050505050565b60006105c16040518060600160405280602d8152602001612bf1602d913961114f565b61077081611561565b610d9633610c62565b610db25760405162461bcd60e51b815260040161064490612952565b6000610dbc6111d5565b600101549050610dcc838361163c565b82826004818110610dd957fe5b90506020020135610de8611059565b14610e055760405162461bcd60e51b8152600401610644906124b6565b610e198383610e126111d5565b919061165c565b6005610e396001610e2c85848189612a94565b610e346111b2565b611706565b01610e536000610e4b85848189612a94565b610e346112d4565b01828114610e735760405162461bcd60e51b815260040161064490612746565b6000610e7d6111d5565b90507fd342ddf7a308dec111745b00315c14b7efb2bdae570a6856e088ed0c65a3576c816000015482600101548360020154604051610ebe93929190612a7e565b60405180910390a182600101816001015414610eec5760405162461bcd60e51b8152600401610644906125e7565b5050505050565b60006105c1604051806060016040528060238152602001612bce6023913961114f565b60006105c1604051806060016040528060318152602001612c886031913961114f565b61077081611afb565b610f4a611bf0565b565b6000610f566111d5565b54905090565b610f6533611183565b610f815760405162461bcd60e51b81526004016106449061283c565b610f8a81610c62565b15610770576000610f9961121f565b6001600160a01b0383166000908152602091909152604090819020805460ff191692151592909217909155517fec5f6c3a91a1efb1f9a308bb33c6e9e66bf9090fad0732f127dfdbf516d0625d90610767908390612297565b6000610c9961153e565b6000610c996111b2565b61100e610f16565b1561102b5760405162461bcd60e51b815260040161064490612819565b61103433611183565b6110505760405162461bcd60e51b81526004016106449061283c565b61077081611c45565b60006105c1604051806060016040528060218152602001612c1e6021913961114f565b610f4a611c67565b61108c610f16565b156110a95760405162461bcd60e51b815260040161064490612819565b6110b233611183565b6110ce5760405162461bcd60e51b81526004016106449061283c565b337f600a61c1b32ac42fb2fe76e8fc7582a98106668fc16dcd85567cd3937363e49b6110f8610ef3565b83604051611107929190612366565b60405180910390a261077081611cea565b60408051808201909152601981527f537461726b576172655f537461726b6e65745f323032335f3600000000000000602082015290565b600080826040516020016111639190612216565b60408051601f198184030181529190528051602090910120549392505050565b60008061118e611d0c565b6001600160a01b039390931660009081526020939093525050604090205460ff1690565b60006105c1604051806060016040528060238152602001612c3f60239139611d55565b600080604051806060016040528060278152602001612ba7602791396040516020016112019190612216565b60408051601f19818403018152919052805160209091012092915050565b60006105c1604051806060016040528060288152602001612b4f60289139611d55565b610770604051806060016040528060218152602001612c1e60219139825b6000826040516020016112739190612216565b604051602081830303815290604052805190602001209050818155505050565b6040516000906112b390339088908590899088908a90829060200161225f565b60405160208183030381529060405280519060200120905095945050505050565b60006105c1604051806060016040528060268152602001612c6260269139611d55565b611309836001600160a01b0316611d88565b6113255760405162461bcd60e51b8152600401610644906123d6565b60006060846001600160a01b031663439fab9160e01b858560405160240161134e929190612374565b60408051601f198184030181529181526020820180516001600160e01b03166001600160e01b031990941693909317909252905161138c9190612216565b600060405180830381855af49150503d80600081146113c7576040519150601f19603f3d011682016040523d82523d6000602084013e6113cc565b606091505b50915091508181906113f15760405162461bcd60e51b815260040161064491906123a3565b5080518190156114145760405162461bcd60e51b815260040161064491906123a3565b505050505050565b6000611426610ef3565b1515905090565b60c0811461144d5760405162461bcd60e51b81526004016106449061242d565b600061145c6020828486612abf565b8101906114699190611f9a565b9050806114885760405162461bcd60e51b8152600401610644906126e3565b505050565b600080600061149a611ed4565b6114a68587018761201f565b93509350935093506114b784611cea565b6114c083611d8e565b6114d2816114cc6111d5565b90611db0565b6114db82611242565b61141462069780611c45565b60006114f1611d0c565b6001810154909150600160a01b900460ff16156115205760405162461bcd60e51b8152600401610644906124e3565b60018101805460ff60a01b1916600160a01b17905561077033611dca565b60006105c1604051806060016040528060308152602001612b7760309139611d55565b61156a33611183565b6115865760405162461bcd60e51b81526004016106449061283c565b336001600160a01b03821614156115af5760405162461bcd60e51b8152600401610644906129a7565b60006115b9611d0c565b90506115c482611183565b6115e05760405162461bcd60e51b8152600401610644906129d5565b6001600160a01b03821660009081526020829052604090819020805460ff19169055517fd75f94825e770b8b512be8e74759e252ad00e102e38f50cce2f7c6f868a2959990611630908490612297565b60405180910390a15050565b60058111610a785760405162461bcd60e51b8152600401610644906127ab565b6001838101805490910190558181600281811061167557fe5b9050602002013583600101541461169e5760405162461bcd60e51b815260040161064490612979565b818160038181106116ab57fe5b60200291909101356002850155503660006116c68484611e50565b915091506116d48282611e6c565b8554146116f35760405162461bcd60e51b815260040161064490612487565b6116fd8282611e8a565b90945550505050565b6000808484600081811061171657fe5b905060200201359050634000000081106117425760405162461bcd60e51b81526004016106449061270f565b6001818101600088611755576004611758565b60025b905060005b82841015611a4a578382018881106117875760405162461bcd60e51b815260040161064490612402565b60008a8a8381811061179557fe5b905060200201359050634000000081106117c15760405162461bcd60e51b81526004016106449061264c565b8181016001018a8111156117e75760405162461bcd60e51b8152600401610644906127e2565b8c156118c55760008c8c8990849261180193929190612a94565b604051602001611812929190612201565b6040516020818303038152906040528051906020012090508c8c60018a0181811061183957fe5b905060200201356001600160a01b03168d8d60008b0181811061185857fe5b905060200201357f4264ac208b5fde633ccdd42e0f12c3d6d443a4f3779bbf886925b94665b63a228f8f60038d0190879261189593929190612a94565b6040516118a39291906122ab565b60405180910390a3600090815260208b90526040902080546001019055611a40565b60008c8c899084926118d993929190612a94565b6040516020016118ea929190612201565b60408051601f1981840301815291815281516020928301206000818152928e90529120549091508061192e5760405162461bcd60e51b8152600401610644906128ee565b600091825260208c9052604082208290559490940160001901938c8c60028a0181811061195757fe5b90506020020135905060608d8d60058b0190859261197793929190612a94565b80806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f8201169050808301925050505050505090508d8d60038b018181106119c857fe5b905060200201358e8e60018c018181106119de57fe5b905060200201358f8f60008d018181106119f457fe5b905060200201356001600160a01b03167f9592d37825c744e33fa80c469683bbd04d336241bb600b574758efd182abe26a8486604051611a3592919061230a565b60405180910390a450505b955061175d915050565b828414611a695760405162461bcd60e51b81526004016106449061270f565b8015611aed576000336001600160a01b031682604051611a8890612232565b60006040518083038185875af1925050503d8060008114611ac5576040519150601f19603f3d011682016040523d82523d6000602084013e611aca565b606091505b5050905080611aeb5760405162461bcd60e51b815260040161064490612925565b505b509198975050505050505050565b611b0433611183565b611b205760405162461bcd60e51b81526004016106449061283c565b6000611b2a611d0c565b90506001600160a01b038216611b525760405162461bcd60e51b815260040161064490612865565b611b5b82611183565b15611b785760405162461bcd60e51b81526004016106449061245d565b60018101546001600160a01b031615611ba35760405162461bcd60e51b8152600401610644906128b7565b6001810180546001600160a01b0319166001600160a01b0384161790556040517f6166272c8d3f5f579082f2827532732f97195007983bb5b83ac12c56700b01a690611630908490612297565b6000611bfa611d0c565b60018101549091506001600160a01b03163314611c295760405162461bcd60e51b8152600401610644906126ac565b611c3233611dca565b60010180546001600160a01b0319169055565b6107706040518060600160405280602d8152602001612bf1602d913982611260565b611c7033611183565b611c8c5760405162461bcd60e51b81526004016106449061283c565b6000611c96611d0c565b60018101549091506001600160a01b031615610770576001810180546001600160a01b03191690556040517f7a8dc7dd7fffb43c4807438fa62729225156941e641fd877938f4edade3429f590600090a150565b610770604051806060016040528060238152602001612bce6023913982611260565b6000806040518060400160405280601c81526020017f535441524b4e45545f312e305f474f5645524e414e43455f494e464f000000008152506040516020016112019190612216565b60008082604051602001611d699190612216565b60408051601f1981840301815291905280516020909101209392505050565b3b151590565b610770604051806060016040528060228152602001612b2d6022913982611e99565b805182556020810151600183015560400151600290910155565b611dd381611183565b15611df05760405162461bcd60e51b81526004016106449061245d565b6000611dfa611d0c565b6001600160a01b03831660009081526020829052604090819020805460ff19166001179055519091507fcfb473e6c03f9a29ddaf990e736fa3de5188a0bd85d684f5b6e164ebfbfff5d290611630908490612297565b366000611e606002828587612a94565b915091505b9250929050565b600082826000818110611e7b57fe5b90506020020135905092915050565b600082826001818110611e7b57fe5b6000611ea48361114f565b6001600160a01b031614611eca5760405162461bcd60e51b81526004016106449061258b565b610a788282611260565b60405180606001604052806000815260200160008152602001600081525090565b60008083601f840112611f06578182fd5b50813567ffffffffffffffff811115611f1d578182fd5b6020830191508360208083028501011115611e6557600080fd5b600060208284031215611f48578081fd5b8135611f5381612b17565b9392505050565b60008060208385031215611f6c578081fd5b823567ffffffffffffffff811115611f82578182fd5b611f8e85828601611ef5565b90969095509350505050565b600060208284031215611fab578081fd5b5035919050565b60008060208385031215611fc4578182fd5b823567ffffffffffffffff80821115611fdb578384fd5b818501915085601f830112611fee578384fd5b813581811115611ffc578485fd5b86602082850101111561200d578485fd5b60209290920196919550909350505050565b60008060008084860360c0811215612035578283fd5b85359450602086013561204781612b17565b9350604086013592506060605f1982011215612061578182fd5b506040516060810181811067ffffffffffffffff82111715612081578283fd5b8060405250606086013581526080860135602082015260a086013560408201528091505092959194509250565b6000806000604084860312156120c2578283fd5b83359250602084013567ffffffffffffffff8111156120df578283fd5b6120eb86828701611ef5565b9497909650939450505050565b6000806000806060858703121561210d578384fd5b8435935060208501359250604085013567ffffffffffffffff811115612131578283fd5b61213d87828801611ef5565b95989497509550505050565b600080600080600060808688031215612160578081fd5b8535945060208601359350604086013567ffffffffffffffff811115612184578182fd5b61219088828901611ef5565b96999598509660600135949350505050565b81835260006001600160fb1b038311156121ba578081fd5b6020830280836020870137939093016020019283525090919050565b60006001600160fb1b038311156121eb578081fd5b6020830280838637939093019283525090919050565b600061220e8284866121d6565b949350505050565b60008251612228818460208701612ae7565b9190910192915050565b90565b60008682528560208301528460408301526122546060830184866121d6565b979650505050505050565b600088825287602083015286604083015285606083015284608083015261228a60a0830184866121d6565b9998505050505050505050565b6001600160a01b0391909116815260200190565b60006020825261220e6020830184866121a2565b6000604082526122d36040830185876121a2565b9050826020830152949350505050565b6000606082526122f76060830186886121a2565b6020830194909452506040015292915050565b604080825283519082018190526000906020906060840190828701845b8281101561234357815184529284019290840190600101612327565b50505092019290925292915050565b901515815260200190565b90815260200190565b918252602082015260400190565b60006020825282602083015282846040840137818301604090810191909152601f909201601f19160101919050565b60006020825282518060208401526123c2816040850160208701612ae7565b601f01601f19169190910160400192915050565b602080825260129082015271115250d7d393d517d057d0d3d395149050d560721b604082015260600190565b602080825260119082015270135154d4d051d157d513d3d7d4d213d495607a1b604082015260600190565b602080825260169082015275494c4c4547414c5f494e49545f444154415f53495a4560501b604082015260600190565b60208082526010908201526f20a62922a0a22cafa3a7ab22a92727a960811b604082015260600190565b6020808252601590820152741253959053125117d41491559253d554d7d493d3d5605a1b604082015260600190565b6020808252601390820152720929cac82989288be869e9c8c928ebe9082a69606b1b604082015260600190565b6020808252601390820152721053149150511657d253925512505312569151606a1b604082015260600190565b6020808252601c908201527f43414e43454c5f414c4c4f5745445f54494d455f4f564552464c4f5700000000604082015260600190565b60208082526024908201527f4d4553534147455f43414e43454c4c4154494f4e5f4e4f545f414c4c4f57454460408201526317d6515560e21b606082015260800190565b6020808252600b908201526a1053149150511657d4d15560aa1b604082015260600190565b60208082526017908201527f4d41585f4c315f4d53475f4645455f4558434545444544000000000000000000604082015260600190565b6020808252601a908201527f494e56414c49445f46494e414c5f424c4f434b5f4e554d424552000000000000604082015260600190565b602080825260149082015273554e45585045435445445f494e49545f4441544160601b604082015260600190565b6020808252601690820152750929cac82989288bea082b2989e8288be988a9c8ea8960531b604082015260600190565b6020808252601690820152751112549150d517d0d0531317d11254d0531313d5d15160521b604082015260600190565b60208082526017908201527f4f4e4c595f43414e4449444154455f474f5645524e4f52000000000000000000604082015260600190565b6020808252601290820152712120a22fa4a724aa24a0a624ad20aa24a7a760711b604082015260600190565b6020808252601c908201527f494e56414c49445f4d4553534147455f5345474d454e545f53495a4500000000604082015260600190565b60208082526018908201527f535441524b4e45545f4f55545055545f544f4f5f4c4f4e470000000000000000604082015260600190565b6020808252601490820152731393d7d35154d4d051d157d513d7d0d05390d15360621b604082015260600190565b60208082526019908201527f535441524b4e45545f4f55545055545f544f4f5f53484f525400000000000000604082015260600190565b60208082526019908201527f5452554e43415445445f4d4553534147455f5041594c4f414400000000000000604082015260600190565b60208082526009908201526811925390531256915160ba1b604082015260600190565b6020808252600f908201526e4f4e4c595f474f5645524e414e434560881b604082015260600190565b6020808252600b908201526a4241445f4144445245535360a81b604082015260600190565b6020808252601390820152721253925517d110551057d513d3d7d4d3505313606a1b604082015260600190565b60208082526017908201527f4f544845525f43414e4449444154455f50454e44494e47000000000000000000604082015260600190565b6020808252601a908201527f494e56414c49445f4d4553534147455f544f5f434f4e53554d45000000000000604082015260600190565b60208082526013908201527211551217d514905394d1915497d19052531151606a1b604082015260600190565b6020808252600d908201526c27a7262cafa7a822a920aa27a960991b604082015260600190565b60208082526014908201527324a72b20a624a22fa12627a1a5afa72aa6a122a960611b604082015260600190565b602080825260149082015273474f5645524e4f525f53454c465f52454d4f564560601b604082015260600190565b6020808252600c908201526b2727aa2fa3a7ab22a92727a960a11b604082015260600190565b60208082526022908201527f4d4553534147455f43414e43454c4c4154494f4e5f4e4f545f52455155455354604082015261115160f21b606082015260800190565b60208082526021908201527f4c315f4d53475f4645455f4d5553545f42455f475245415445525f5448414e5f6040820152600360fc1b606082015260800190565b9283526020830191909152604082015260600190565b60008085851115612aa3578182fd5b83861115612aaf578182fd5b5050602083020193919092039150565b60008085851115612ace578081fd5b83861115612ada578081fd5b5050820193919092039150565b60005b83811015612b02578181015183820152602001612aea565b83811115612b11576000848401525b50505050565b6001600160a01b038116811461077057600080fdfe535441524b4e45545f312e305f494e49545f56455249464945525f41444452455353535441524b4e45545f312e305f524f4c45535f4f50455241544f52535f4d415050494e475f544147535441524b4e45545f312e305f4d5347494e475f4c31544f4c325f43414e43454c4c4154494f4e5f4d41505050494e47535441524b4e45545f312e305f494e49545f535441524b4e45545f53544154455f535452554354535441524b4e45545f312e305f494e49545f50524f4752414d5f484153485f55494e54535441524b4e45545f312e305f4d5347494e475f4c31544f4c325f43414e43454c4c4154494f4e5f44454c4159535441524b4e45545f312e305f535441524b4e45545f434f4e4649475f48415348535441524b4e45545f312e305f4d5347494e475f4c32544f4c315f4d41505050494e47535441524b4e45545f312e305f4d5347494e475f4c31544f4c325f4d41505050494e475f5632535441524b574152455f434f4e5452414354535f474f564552454e45445f46494e414c495a41424c455f312e305f544147a2646970667358221220749105af4323f28521c03a1b6b128ff7ceb5750ce7bcf9475b742af277f1611264736f6c634300060c0033", - "sourceMap": "729:7138:37:-:0;;;;;;;;;;;;-1:-1:-1;489:4:4;473:21;;;;;;729:7138:37;;;;;;;", - "linkReferences": {} - }, - "deployedBytecode": { - "object": "0x6080604052600436106101e35760003560e01c80638303bd8a1161010257806396115bc211610095578063e1f1176d11610064578063e1f1176d14610515578063e37fec251461052a578063e87e73321461053f578063eeb728661461055f576101e3565b806396115bc2146104955780639be446bf146104b5578063a46efaf3146104d5578063c99d397f146104f5576101e3565b80638d4e4083116100d15780638d4e40831461043657806391a66a261461044b578063946be3ed1461046b5780639588eca214610480576101e3565b80638303bd8a146103cc57806384f921cd146103e1578063853e2461146104015780638a9bf09014610421576101e3565b80633e3aa6c51161017a5780636170ff1b116101495780636170ff1b1461034c5780636d70f7ae1461036c57806377c7d7a91461038c5780637a98660b146103ac576101e3565b80633e3aa6c5146102e1578063439fab91146103025780634bb278f31461032257806354eccba414610337576101e3565b806335befa5d116101b657806335befa5d146102755780633682a4501461028a578063382d83e3146102ac5780633d07b336146102c1576101e3565b8063018cccdf146101e857806301a01590146102135780632c9dd5c01461024057806333eeb14714610260575b600080fd5b3480156101f457600080fd5b506101fd610581565b60405161020a919061235d565b60405180910390f35b34801561021f57600080fd5b5061023361022e366004611f37565b6105c6565b60405161020a9190612352565b34801561024c57600080fd5b506101fd61025b3660046120ae565b6105d7565b34801561026c57600080fd5b506102336106ba565b34801561028157600080fd5b506101fd6106bf565b34801561029657600080fd5b506102aa6102a5366004611f37565b6106d2565b005b3480156102b857600080fd5b506101fd610773565b3480156102cd57600080fd5b506102aa6102dc366004611f9a565b610786565b6102f46102ef3660046120f8565b61081a565b60405161020a929190612366565b34801561030e57600080fd5b506102aa61031d366004611fb2565b610934565b34801561032e57600080fd5b506102aa610a7c565b34801561034357600080fd5b506101fd610b14565b34801561035857600080fd5b506101fd610367366004612149565b610b20565b34801561037857600080fd5b50610233610387366004611f37565b610c62565b34801561039857600080fd5b506101fd6103a7366004611f9a565b610c8f565b3480156103b857600080fd5b506101fd6103c7366004612149565b610caa565b3480156103d857600080fd5b506101fd610d61565b3480156103ed57600080fd5b506102aa6103fc366004611f37565b610d84565b34801561040d57600080fd5b506102aa61041c366004611f5a565b610d8d565b34801561042d57600080fd5b506101fd610ef3565b34801561044257600080fd5b50610233610f16565b34801561045757600080fd5b506102aa610466366004611f37565b610f39565b34801561047757600080fd5b506102aa610f42565b34801561048c57600080fd5b506101fd610f4c565b3480156104a157600080fd5b506102aa6104b0366004611f37565b610f5c565b3480156104c157600080fd5b506101fd6104d0366004611f9a565b610ff2565b3480156104e157600080fd5b506101fd6104f0366004611f9a565b610ffc565b34801561050157600080fd5b506102aa610510366004611f9a565b611006565b34801561052157600080fd5b506101fd611059565b34801561053657600080fd5b506102aa61107c565b34801561054b57600080fd5b506102aa61055a366004611f9a565b611084565b34801561056b57600080fd5b50610574611118565b60405161020a91906123a3565b60006105c16040518060400160405280602081526020017f535441524b4e45545f312e305f4d5347494e475f4c31544f4c325f4e4f4e434581525061114f565b905090565b60006105d182611183565b92915050565b60405160009081906105f59086903390869088908290602001612235565b60405160208183030381529060405280519060200120905060006106176111b2565b600083815260209190915260409020541161064d5760405162461bcd60e51b8152600401610644906128ee565b60405180910390fd5b336001600160a01b0316857f7a06c571aa77f34d9706c51e5d8122b5595aebeaa34233bfe866f22befb973b186866040516106899291906122ab565b60405180910390a3600161069b6111b2565b6000838152602091909152604090208054919091039055949350505050565b600090565b60006106c96111d5565b60010154905090565b6106db33611183565b6106f75760405162461bcd60e51b81526004016106449061283c565b61070081610c62565b61077057600161070e61121f565b6001600160a01b0383166000908152602091909152604090819020805460ff191692151592909217909155517f50a18c352ee1c02ffe058e15c2eb6e58be387c81e73cc1e17035286e54c19a5790610767908390612297565b60405180910390a15b50565b600061077d6111d5565b60020154905090565b61078e610f16565b156107ab5760405162461bcd60e51b815260040161064490612819565b6107b433611183565b6107d05760405162461bcd60e51b81526004016106449061283c565b337f393c6beb5756a944b2967f15f31ff671e312e945d7a84fd3bdcfd6b408b2dc796107fa611059565b83604051610809929190612366565b60405180910390a261077081611242565b6000806000341161083d5760405162461bcd60e51b815260040161064490612a3d565b610845610b14565b3411156108645760405162461bcd60e51b8152600401610644906125b0565b600061086e610581565b90506108b26040518060400160405280602081526020017f535441524b4e45545f312e305f4d5347494e475f4c31544f4c325f4e4f4e434581525082600101611260565b8587336001600160a01b03167fdb80dd488acf86d17c747445b0eabb5d57c541d3bd7b6b87af987858e5066b2b888886346040516108f394939291906122e3565b60405180910390a4600061090a8888888886611293565b9050346001016109186112d4565b6000838152602091909152604090205597909650945050505050565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031630141561097d5760405162461bcd60e51b81526004016106449061267c565b60006109876106ba565b602090810291508101808310156109b05760405162461bcd60e51b81526004016106449061288a565b60006109be82848688612abf565b8101906109cb9190611f37565b90503660006109dc8582888a612abf565b915091506109ea8282610a78565b3660006109f98887818c612abf565b90925090506001600160a01b03851615610a2457610a188583836112f7565b50505050505050610a78565b610a2c61141c565b15610a54578015610a4f5760405162461bcd60e51b81526004016106449061261e565b610a70565b610a5e828261142d565b610a68828261148d565b610a706114e7565b505050505050505b5050565b610a8533611183565b610aa15760405162461bcd60e51b81526004016106449061283c565b610aa9610f16565b15610ac65760405162461bcd60e51b815260040161064490612819565b610ae9604051806060016040528060318152602001612c88603191396001611260565b6040517f6823b073d48d6e3a7d385eeb601452d680e74bb46afe3255a7d778f3a9b1768190600090a1565b670de0b6b3a764000090565b60008486336001600160a01b03167f8abd2ec2e0a10c82f5b60ea00455fa96c41fd144f225fcc52b8d83d94f803ed8878787604051610b61939291906122bf565b60405180910390a46000610b788787878787611293565b90506000610b846112d4565b60008381526020919091526040902054905080610bb35760405162461bcd60e51b81526004016106449061277d565b6000610bbd61153e565b60008481526020919091526040902054905080610bec5760405162461bcd60e51b8152600401610644906129fb565b6000610bf6610d61565b8201905081811015610c1a5760405162461bcd60e51b815260040161064490612510565b80421015610c3a5760405162461bcd60e51b815260040161064490612547565b6000610c446112d4565b60008681526020919091526040902055509198975050505050505050565b6000610c6c61121f565b6001600160a01b0392909216600090815260209290925250604090205460ff1690565b6000610c996112d4565b600092835260205250604090205490565b60008486336001600160a01b03167f2e00dccd686fd6823ec7dc3e125582aa82881b6ff5f6b5a73856e1ea8338a3be878787604051610ceb939291906122bf565b60405180910390a46000610d028787878787611293565b90506000610d0e6112d4565b60008381526020919091526040902054905080610d3d5760405162461bcd60e51b81526004016106449061277d565b42610d4661153e565b60008481526020919091526040902055509695505050505050565b60006105c16040518060600160405280602d8152602001612bf1602d913961114f565b61077081611561565b610d9633610c62565b610db25760405162461bcd60e51b815260040161064490612952565b6000610dbc6111d5565b600101549050610dcc838361163c565b82826004818110610dd957fe5b90506020020135610de8611059565b14610e055760405162461bcd60e51b8152600401610644906124b6565b610e198383610e126111d5565b919061165c565b6005610e396001610e2c85848189612a94565b610e346111b2565b611706565b01610e536000610e4b85848189612a94565b610e346112d4565b01828114610e735760405162461bcd60e51b815260040161064490612746565b6000610e7d6111d5565b90507fd342ddf7a308dec111745b00315c14b7efb2bdae570a6856e088ed0c65a3576c816000015482600101548360020154604051610ebe93929190612a7e565b60405180910390a182600101816001015414610eec5760405162461bcd60e51b8152600401610644906125e7565b5050505050565b60006105c1604051806060016040528060238152602001612bce6023913961114f565b60006105c1604051806060016040528060318152602001612c886031913961114f565b61077081611afb565b610f4a611bf0565b565b6000610f566111d5565b54905090565b610f6533611183565b610f815760405162461bcd60e51b81526004016106449061283c565b610f8a81610c62565b15610770576000610f9961121f565b6001600160a01b0383166000908152602091909152604090819020805460ff191692151592909217909155517fec5f6c3a91a1efb1f9a308bb33c6e9e66bf9090fad0732f127dfdbf516d0625d90610767908390612297565b6000610c9961153e565b6000610c996111b2565b61100e610f16565b1561102b5760405162461bcd60e51b815260040161064490612819565b61103433611183565b6110505760405162461bcd60e51b81526004016106449061283c565b61077081611c45565b60006105c1604051806060016040528060218152602001612c1e6021913961114f565b610f4a611c67565b61108c610f16565b156110a95760405162461bcd60e51b815260040161064490612819565b6110b233611183565b6110ce5760405162461bcd60e51b81526004016106449061283c565b337f600a61c1b32ac42fb2fe76e8fc7582a98106668fc16dcd85567cd3937363e49b6110f8610ef3565b83604051611107929190612366565b60405180910390a261077081611cea565b60408051808201909152601981527f537461726b576172655f537461726b6e65745f323032335f3600000000000000602082015290565b600080826040516020016111639190612216565b60408051601f198184030181529190528051602090910120549392505050565b60008061118e611d0c565b6001600160a01b039390931660009081526020939093525050604090205460ff1690565b60006105c1604051806060016040528060238152602001612c3f60239139611d55565b600080604051806060016040528060278152602001612ba7602791396040516020016112019190612216565b60408051601f19818403018152919052805160209091012092915050565b60006105c1604051806060016040528060288152602001612b4f60289139611d55565b610770604051806060016040528060218152602001612c1e60219139825b6000826040516020016112739190612216565b604051602081830303815290604052805190602001209050818155505050565b6040516000906112b390339088908590899088908a90829060200161225f565b60405160208183030381529060405280519060200120905095945050505050565b60006105c1604051806060016040528060268152602001612c6260269139611d55565b611309836001600160a01b0316611d88565b6113255760405162461bcd60e51b8152600401610644906123d6565b60006060846001600160a01b031663439fab9160e01b858560405160240161134e929190612374565b60408051601f198184030181529181526020820180516001600160e01b03166001600160e01b031990941693909317909252905161138c9190612216565b600060405180830381855af49150503d80600081146113c7576040519150601f19603f3d011682016040523d82523d6000602084013e6113cc565b606091505b50915091508181906113f15760405162461bcd60e51b815260040161064491906123a3565b5080518190156114145760405162461bcd60e51b815260040161064491906123a3565b505050505050565b6000611426610ef3565b1515905090565b60c0811461144d5760405162461bcd60e51b81526004016106449061242d565b600061145c6020828486612abf565b8101906114699190611f9a565b9050806114885760405162461bcd60e51b8152600401610644906126e3565b505050565b600080600061149a611ed4565b6114a68587018761201f565b93509350935093506114b784611cea565b6114c083611d8e565b6114d2816114cc6111d5565b90611db0565b6114db82611242565b61141462069780611c45565b60006114f1611d0c565b6001810154909150600160a01b900460ff16156115205760405162461bcd60e51b8152600401610644906124e3565b60018101805460ff60a01b1916600160a01b17905561077033611dca565b60006105c1604051806060016040528060308152602001612b7760309139611d55565b61156a33611183565b6115865760405162461bcd60e51b81526004016106449061283c565b336001600160a01b03821614156115af5760405162461bcd60e51b8152600401610644906129a7565b60006115b9611d0c565b90506115c482611183565b6115e05760405162461bcd60e51b8152600401610644906129d5565b6001600160a01b03821660009081526020829052604090819020805460ff19169055517fd75f94825e770b8b512be8e74759e252ad00e102e38f50cce2f7c6f868a2959990611630908490612297565b60405180910390a15050565b60058111610a785760405162461bcd60e51b8152600401610644906127ab565b6001838101805490910190558181600281811061167557fe5b9050602002013583600101541461169e5760405162461bcd60e51b815260040161064490612979565b818160038181106116ab57fe5b60200291909101356002850155503660006116c68484611e50565b915091506116d48282611e6c565b8554146116f35760405162461bcd60e51b815260040161064490612487565b6116fd8282611e8a565b90945550505050565b6000808484600081811061171657fe5b905060200201359050634000000081106117425760405162461bcd60e51b81526004016106449061270f565b6001818101600088611755576004611758565b60025b905060005b82841015611a4a578382018881106117875760405162461bcd60e51b815260040161064490612402565b60008a8a8381811061179557fe5b905060200201359050634000000081106117c15760405162461bcd60e51b81526004016106449061264c565b8181016001018a8111156117e75760405162461bcd60e51b8152600401610644906127e2565b8c156118c55760008c8c8990849261180193929190612a94565b604051602001611812929190612201565b6040516020818303038152906040528051906020012090508c8c60018a0181811061183957fe5b905060200201356001600160a01b03168d8d60008b0181811061185857fe5b905060200201357f4264ac208b5fde633ccdd42e0f12c3d6d443a4f3779bbf886925b94665b63a228f8f60038d0190879261189593929190612a94565b6040516118a39291906122ab565b60405180910390a3600090815260208b90526040902080546001019055611a40565b60008c8c899084926118d993929190612a94565b6040516020016118ea929190612201565b60408051601f1981840301815291815281516020928301206000818152928e90529120549091508061192e5760405162461bcd60e51b8152600401610644906128ee565b600091825260208c9052604082208290559490940160001901938c8c60028a0181811061195757fe5b90506020020135905060608d8d60058b0190859261197793929190612a94565b80806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f8201169050808301925050505050505090508d8d60038b018181106119c857fe5b905060200201358e8e60018c018181106119de57fe5b905060200201358f8f60008d018181106119f457fe5b905060200201356001600160a01b03167f9592d37825c744e33fa80c469683bbd04d336241bb600b574758efd182abe26a8486604051611a3592919061230a565b60405180910390a450505b955061175d915050565b828414611a695760405162461bcd60e51b81526004016106449061270f565b8015611aed576000336001600160a01b031682604051611a8890612232565b60006040518083038185875af1925050503d8060008114611ac5576040519150601f19603f3d011682016040523d82523d6000602084013e611aca565b606091505b5050905080611aeb5760405162461bcd60e51b815260040161064490612925565b505b509198975050505050505050565b611b0433611183565b611b205760405162461bcd60e51b81526004016106449061283c565b6000611b2a611d0c565b90506001600160a01b038216611b525760405162461bcd60e51b815260040161064490612865565b611b5b82611183565b15611b785760405162461bcd60e51b81526004016106449061245d565b60018101546001600160a01b031615611ba35760405162461bcd60e51b8152600401610644906128b7565b6001810180546001600160a01b0319166001600160a01b0384161790556040517f6166272c8d3f5f579082f2827532732f97195007983bb5b83ac12c56700b01a690611630908490612297565b6000611bfa611d0c565b60018101549091506001600160a01b03163314611c295760405162461bcd60e51b8152600401610644906126ac565b611c3233611dca565b60010180546001600160a01b0319169055565b6107706040518060600160405280602d8152602001612bf1602d913982611260565b611c7033611183565b611c8c5760405162461bcd60e51b81526004016106449061283c565b6000611c96611d0c565b60018101549091506001600160a01b031615610770576001810180546001600160a01b03191690556040517f7a8dc7dd7fffb43c4807438fa62729225156941e641fd877938f4edade3429f590600090a150565b610770604051806060016040528060238152602001612bce6023913982611260565b6000806040518060400160405280601c81526020017f535441524b4e45545f312e305f474f5645524e414e43455f494e464f000000008152506040516020016112019190612216565b60008082604051602001611d699190612216565b60408051601f1981840301815291905280516020909101209392505050565b3b151590565b610770604051806060016040528060228152602001612b2d6022913982611e99565b805182556020810151600183015560400151600290910155565b611dd381611183565b15611df05760405162461bcd60e51b81526004016106449061245d565b6000611dfa611d0c565b6001600160a01b03831660009081526020829052604090819020805460ff19166001179055519091507fcfb473e6c03f9a29ddaf990e736fa3de5188a0bd85d684f5b6e164ebfbfff5d290611630908490612297565b366000611e606002828587612a94565b915091505b9250929050565b600082826000818110611e7b57fe5b90506020020135905092915050565b600082826001818110611e7b57fe5b6000611ea48361114f565b6001600160a01b031614611eca5760405162461bcd60e51b81526004016106449061258b565b610a788282611260565b60405180606001604052806000815260200160008152602001600081525090565b60008083601f840112611f06578182fd5b50813567ffffffffffffffff811115611f1d578182fd5b6020830191508360208083028501011115611e6557600080fd5b600060208284031215611f48578081fd5b8135611f5381612b17565b9392505050565b60008060208385031215611f6c578081fd5b823567ffffffffffffffff811115611f82578182fd5b611f8e85828601611ef5565b90969095509350505050565b600060208284031215611fab578081fd5b5035919050565b60008060208385031215611fc4578182fd5b823567ffffffffffffffff80821115611fdb578384fd5b818501915085601f830112611fee578384fd5b813581811115611ffc578485fd5b86602082850101111561200d578485fd5b60209290920196919550909350505050565b60008060008084860360c0811215612035578283fd5b85359450602086013561204781612b17565b9350604086013592506060605f1982011215612061578182fd5b506040516060810181811067ffffffffffffffff82111715612081578283fd5b8060405250606086013581526080860135602082015260a086013560408201528091505092959194509250565b6000806000604084860312156120c2578283fd5b83359250602084013567ffffffffffffffff8111156120df578283fd5b6120eb86828701611ef5565b9497909650939450505050565b6000806000806060858703121561210d578384fd5b8435935060208501359250604085013567ffffffffffffffff811115612131578283fd5b61213d87828801611ef5565b95989497509550505050565b600080600080600060808688031215612160578081fd5b8535945060208601359350604086013567ffffffffffffffff811115612184578182fd5b61219088828901611ef5565b96999598509660600135949350505050565b81835260006001600160fb1b038311156121ba578081fd5b6020830280836020870137939093016020019283525090919050565b60006001600160fb1b038311156121eb578081fd5b6020830280838637939093019283525090919050565b600061220e8284866121d6565b949350505050565b60008251612228818460208701612ae7565b9190910192915050565b90565b60008682528560208301528460408301526122546060830184866121d6565b979650505050505050565b600088825287602083015286604083015285606083015284608083015261228a60a0830184866121d6565b9998505050505050505050565b6001600160a01b0391909116815260200190565b60006020825261220e6020830184866121a2565b6000604082526122d36040830185876121a2565b9050826020830152949350505050565b6000606082526122f76060830186886121a2565b6020830194909452506040015292915050565b604080825283519082018190526000906020906060840190828701845b8281101561234357815184529284019290840190600101612327565b50505092019290925292915050565b901515815260200190565b90815260200190565b918252602082015260400190565b60006020825282602083015282846040840137818301604090810191909152601f909201601f19160101919050565b60006020825282518060208401526123c2816040850160208701612ae7565b601f01601f19169190910160400192915050565b602080825260129082015271115250d7d393d517d057d0d3d395149050d560721b604082015260600190565b602080825260119082015270135154d4d051d157d513d3d7d4d213d495607a1b604082015260600190565b602080825260169082015275494c4c4547414c5f494e49545f444154415f53495a4560501b604082015260600190565b60208082526010908201526f20a62922a0a22cafa3a7ab22a92727a960811b604082015260600190565b6020808252601590820152741253959053125117d41491559253d554d7d493d3d5605a1b604082015260600190565b6020808252601390820152720929cac82989288be869e9c8c928ebe9082a69606b1b604082015260600190565b6020808252601390820152721053149150511657d253925512505312569151606a1b604082015260600190565b6020808252601c908201527f43414e43454c5f414c4c4f5745445f54494d455f4f564552464c4f5700000000604082015260600190565b60208082526024908201527f4d4553534147455f43414e43454c4c4154494f4e5f4e4f545f414c4c4f57454460408201526317d6515560e21b606082015260800190565b6020808252600b908201526a1053149150511657d4d15560aa1b604082015260600190565b60208082526017908201527f4d41585f4c315f4d53475f4645455f4558434545444544000000000000000000604082015260600190565b6020808252601a908201527f494e56414c49445f46494e414c5f424c4f434b5f4e554d424552000000000000604082015260600190565b602080825260149082015273554e45585045435445445f494e49545f4441544160601b604082015260600190565b6020808252601690820152750929cac82989288bea082b2989e8288be988a9c8ea8960531b604082015260600190565b6020808252601690820152751112549150d517d0d0531317d11254d0531313d5d15160521b604082015260600190565b60208082526017908201527f4f4e4c595f43414e4449444154455f474f5645524e4f52000000000000000000604082015260600190565b6020808252601290820152712120a22fa4a724aa24a0a624ad20aa24a7a760711b604082015260600190565b6020808252601c908201527f494e56414c49445f4d4553534147455f5345474d454e545f53495a4500000000604082015260600190565b60208082526018908201527f535441524b4e45545f4f55545055545f544f4f5f4c4f4e470000000000000000604082015260600190565b6020808252601490820152731393d7d35154d4d051d157d513d7d0d05390d15360621b604082015260600190565b60208082526019908201527f535441524b4e45545f4f55545055545f544f4f5f53484f525400000000000000604082015260600190565b60208082526019908201527f5452554e43415445445f4d4553534147455f5041594c4f414400000000000000604082015260600190565b60208082526009908201526811925390531256915160ba1b604082015260600190565b6020808252600f908201526e4f4e4c595f474f5645524e414e434560881b604082015260600190565b6020808252600b908201526a4241445f4144445245535360a81b604082015260600190565b6020808252601390820152721253925517d110551057d513d3d7d4d3505313606a1b604082015260600190565b60208082526017908201527f4f544845525f43414e4449444154455f50454e44494e47000000000000000000604082015260600190565b6020808252601a908201527f494e56414c49445f4d4553534147455f544f5f434f4e53554d45000000000000604082015260600190565b60208082526013908201527211551217d514905394d1915497d19052531151606a1b604082015260600190565b6020808252600d908201526c27a7262cafa7a822a920aa27a960991b604082015260600190565b60208082526014908201527324a72b20a624a22fa12627a1a5afa72aa6a122a960611b604082015260600190565b602080825260149082015273474f5645524e4f525f53454c465f52454d4f564560601b604082015260600190565b6020808252600c908201526b2727aa2fa3a7ab22a92727a960a11b604082015260600190565b60208082526022908201527f4d4553534147455f43414e43454c4c4154494f4e5f4e4f545f52455155455354604082015261115160f21b606082015260800190565b60208082526021908201527f4c315f4d53475f4645455f4d5553545f42455f475245415445525f5448414e5f6040820152600360fc1b606082015260800190565b9283526020830191909152604082015260600190565b60008085851115612aa3578182fd5b83861115612aaf578182fd5b5050602083020193919092039150565b60008085851115612ace578081fd5b83861115612ada578081fd5b5050820193919092039150565b60005b83811015612b02578181015183820152602001612aea565b83811115612b11576000848401525b50505050565b6001600160a01b038116811461077057600080fdfe535441524b4e45545f312e305f494e49545f56455249464945525f41444452455353535441524b4e45545f312e305f524f4c45535f4f50455241544f52535f4d415050494e475f544147535441524b4e45545f312e305f4d5347494e475f4c31544f4c325f43414e43454c4c4154494f4e5f4d41505050494e47535441524b4e45545f312e305f494e49545f535441524b4e45545f53544154455f535452554354535441524b4e45545f312e305f494e49545f50524f4752414d5f484153485f55494e54535441524b4e45545f312e305f4d5347494e475f4c31544f4c325f43414e43454c4c4154494f4e5f44454c4159535441524b4e45545f312e305f535441524b4e45545f434f4e4649475f48415348535441524b4e45545f312e305f4d5347494e475f4c32544f4c315f4d41505050494e47535441524b4e45545f312e305f4d5347494e475f4c31544f4c325f4d41505050494e475f5632535441524b574152455f434f4e5452414354535f474f564552454e45445f46494e414c495a41424c455f312e305f544147a2646970667358221220749105af4323f28521c03a1b6b128ff7ceb5750ce7bcf9475b742af277f1611264736f6c634300060c0033", - "sourceMap": "729:7138:37:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1928:133:17;;;;;;;;;;;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;599:112:16;;;;;;;;;;-1:-1:-1;599:112:16;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;4556:497:17:-;;;;;;;;;;-1:-1:-1;4556:497:17;;;;;:::i;:::-;;:::i;778:86:10:-;;;;;;;;;;;;;:::i;5456:102:37:-;;;;;;;;;;;;;:::i;540:233:3:-;;;;;;;;;;-1:-1:-1;540:233:3;;;;;:::i;:::-;;:::i;:::-;;5617:99:37;;;;;;;;;;;;;:::i;2248:198::-;;;;;;;;;;-1:-1:-1;2248:198:37;;;;;:::i;:::-;;:::i;3591:844:17:-;;;;;;:::i;:::-;;:::i;:::-;;;;;;;;:::i;1486:1028:10:-;;;;;;;;;;-1:-1:-1;1486:1028:10;;;;;:::i;:::-;;:::i;705:144:1:-;;;;;;;;;;;;;:::i;1074:103:17:-;;;;;;;;;;;;;:::i;5649:1148::-;;;;;;;;;;-1:-1:-1;5649:1148:17;;;;;:::i;:::-;;:::i;1038:114:3:-;;;;;;;;;;-1:-1:-1;1038:114:3;;;;;:::i;:::-;;:::i;1324:122:17:-;;;;;;;;;;-1:-1:-1;1324:122:17;;;;;:::i;:::-;;:::i;5059:584::-;;;;;;;;;;-1:-1:-1;5059:584:17;;;;;:::i;:::-;;:::i;2067:152::-;;;;;;;;;;;;;:::i;840:121:16:-;;;;;;;;;;-1:-1:-1;840:121:16;;;;;:::i;:::-;;:::i;6058:1807:37:-;;;;;;;;;;-1:-1:-1;6058:1807:37;;;;;:::i;:::-;;:::i;2699:120::-;;;;;;;;;;;;;:::i;493:112:1:-;;;;;;;;;;;;;:::i;717:117:16:-;;;;;;;;;;-1:-1:-1;717:117:16;;;;;:::i;:::-;;:::i;967:81::-;;;;;;;;;;;;;:::i;5300:95:37:-;;;;;;;;;;;;;:::i;779:253:3:-;;;;;;;;;;-1:-1:-1;779:253:3;;;;;:::i;:::-;;:::i;2591:146:17:-;;;;;;;;;;-1:-1:-1;2591:146:17;;;;;:::i;:::-;;:::i;1452:122::-;;;;;;;;;;-1:-1:-1;1452:122:17;;;;;:::i;:::-;;:::i;2452:183:37:-;;;;;;;;;;-1:-1:-1;2452:183:37;;;;;:::i;:::-;;:::i;3415:118::-;;;;;;;;;;;;;:::i;1054:81:16:-;;;;;;;;;;;;;:::i;2037:205:37:-;;;;;;;;;;-1:-1:-1;2037:205:37;;;;;:::i;:::-;;:::i;5123:118::-;;;;;;;;;;;;;:::i;:::-;;;;;;;:::i;1928:133:17:-;1979:7;2005:49;2031:22;;;;;;;;;;;;;;;;;2005:25;:49::i;:::-;1998:56;;1928:133;:::o;599:112:16:-;664:4;687:17;699:4;687:11;:17::i;:::-;680:24;599:112;-1:-1:-1;;599:112:16:o;4556:497:17:-;4750:75;;4686:7;;;;4750:75;;4767:11;;4788:10;;4801:7;;;;;;4750:75;;;:::i;:::-;;;;;;;;;;;;;4727:108;;;;;;4709:126;;4882:1;4854:16;:14;:16::i;:::-;:25;;;;;;;;;;;;;:29;4846:68;;;;-1:-1:-1;;;4846:68:17;;;;;;;:::i;:::-;;;;;;;;;4929:53;;4962:10;;4949:11;;4929:53;;;;4974:7;;;;4929:53;:::i;:::-;;;;;;;;5021:1;4992:16;:14;:16::i;:::-;:25;;;;;;;;;;;;:30;;;;;;;;:25;4556:497;-1:-1:-1;;;;4556:497:17:o;778:86:10:-;829:4;778:86;:::o;5456:102:37:-;5507:6;5532:7;:5;:7::i;:::-;:19;;;5525:26;;5456:102;:::o;540:233:3:-;292:23:8;304:10;292:11;:23::i;:::-;284:51;;;;-1:-1:-1;;;284:51:8;;;;;;;:::i;:::-;635:23:3::1;646:11;635:10;:23::i;:::-;630:137;;704:4;674:14;:12;:14::i;:::-;-1:-1:-1::0;;;;;674:27:3;::::1;;::::0;;;::::1;::::0;;;;;;;;;:34;;-1:-1:-1;;674:34:3::1;::::0;::::1;;::::0;;;::::1;::::0;;;727:29;::::1;::::0;::::1;::::0;674:27;;727:29:::1;:::i;:::-;;;;;;;;630:137;540:233:::0;:::o;5617:99:37:-;5666:7;5692;:5;:7::i;:::-;:17;;;5685:24;;5617:99;:::o;2248:198::-;654:13:1;:11;:13::i;:::-;653:14;645:36;;;;-1:-1:-1;;;645:36:1;;;;;;;:::i;:::-;292:23:8::1;304:10;292:11;:23::i;:::-;284:51;;;::::0;-1:-1:-1;;;284:51:8;;::::1;::::0;::::1;;;:::i;:::-;2364:10:37::2;2346:58;2376:12;:10;:12::i;:::-;2390:13;2346:58;;;;;;;:::i;:::-;;;;;;;;2414:25;2425:13;2414:10;:25::i;3591:844:17:-:0;3746:7;3755;3794:1;3782:9;:13;3774:59;;;;-1:-1:-1;;;3774:59:17;;;;;;;:::i;:::-;3864:16;:14;:16::i;:::-;3851:9;:29;;3843:65;;;;-1:-1:-1;;;3843:65:17;;;;;;;:::i;:::-;3918:13;3934:20;:18;:20::i;:::-;3918:36;;3964:60;3990:22;;;;;;;;;;;;;;;;;4014:5;4022:1;4014:9;3964:25;:60::i;:::-;4039:74;;4077:8;;4066:9;;4054:10;;4039:74;;;;4087:7;;;;4096:5;;4103:9;;4039:74;:::i;:::-;;;;;;;;4123:15;4141:53;4158:9;4169:8;4179:7;;4188:5;4141:16;:53::i;:::-;4123:71;;4382:9;4394:1;4382:13;4354:16;:14;:16::i;:::-;:25;;;;;;;;;;;;:41;:25;4422:5;;-1:-1:-1;3591:844:17;-1:-1:-1;;;;;3591:844:17:o;1486:1028:10:-;571:4:4;-1:-1:-1;;;;;554:5:4;:22;;;546:57;;;;-1:-1:-1;;;546:57:4;;;;;;;:::i;:::-;1564:17:10::1;1589:19;:17;:19::i;:::-;1584:2;:24:::0;;::::1;::::0;-1:-1:-1;1645:14:10;::::1;1677:31:::0;;::::1;;1669:63;;;::::0;-1:-1:-1;;;1669:63:10;;::::1;::::0;::::1;;;:::i;:::-;1742:18;1774:32;1789:16:::0;1779:9;1774:4;;:32:::1;:::i;:::-;1763:55;;;;;;;:::i;:::-;1742:76:::0;-1:-1:-1;1829:35:10::1;;1867:16;1873:9:::0;1829:35;1867:4;;:16:::1;:::i;:::-;1829:54;;;;1894:49;1922:20;;1894:27;:49::i;:::-;1954:23;;1980;:4:::0;1985:16;1980:4;;:23:::1;:::i;:::-;1954:49:::0;;-1:-1:-1;1954:49:10;-1:-1:-1;;;;;;2098:26:10;::::1;::::0;2094:122:::1;;2140:45;2164:10;2176:8;;2140:23;:45::i;:::-;2199:7;;;;;;;;;2094:122;2230:15;:13;:15::i;:::-;2226:282;;;2269:20:::0;;2261:53:::1;;;::::0;-1:-1:-1;;;2261:53:10;;::::1;::::0;::::1;;;:::i;:::-;2226:282;;;2394:26;2411:8;;2394:16;:26::i;:::-;2434:33;2458:8;;2434:23;:33::i;:::-;2481:16;:14;:16::i;:::-;613:1:4;;;;;;;;1486:1028:10::0;;:::o;705:144:1:-;292:23:8;304:10;292:11;:23::i;:::-;284:51;;;;-1:-1:-1;;;284:51:8;;;;;;;:::i;:::-;654:13:1::1;:11;:13::i;:::-;653:14;645:36;;;::::0;-1:-1:-1;;;645:36:1;;::::1;::::0;::::1;;;:::i;:::-;772:44:::2;798:11;;;;;;;;;;;;;;;;;811:4;772:25;:44::i;:::-;831:11;::::0;::::2;::::0;;;::::2;705:144::o:0;1074:103:17:-;1060:7;1074:103;:::o;5649:1148::-;5847:68;;5823:7;;5890:8;;5879:9;;5867:10;;5847:68;;;;5900:7;;;;5909:5;;5847:68;:::i;:::-;;;;;;;;6133:15;6151:53;6168:9;6179:8;6189:7;;6198:5;6151:16;:53::i;:::-;6133:71;;6214:21;6238:16;:14;:16::i;:::-;:25;;;;;;;;;;;;;;-1:-1:-1;6281:18:17;6273:51;;;;-1:-1:-1;;;6273:51:17;;;;;;;:::i;:::-;6335:19;6357:28;:26;:28::i;:::-;:37;;;;;;;;;;;;;;-1:-1:-1;6412:16:17;6404:63;;;;-1:-1:-1;;;6404:63:17;;;;;;;:::i;:::-;6478:25;6520:26;:24;:26::i;:::-;6506:11;:40;6478:68;;6585:11;6564:17;:32;;6556:73;;;;-1:-1:-1;;;6556:73:17;;;;;;;:::i;:::-;6666:17;6647:15;:36;;6639:85;;;;-1:-1:-1;;;6639:85:17;;;;;;;:::i;:::-;6763:1;6735:16;:14;:16::i;:::-;:25;;;;;;;;;;;;:29;-1:-1:-1;6735:25:17;;5649:1148;-1:-1:-1;;;;;;;;5649:1148:17:o;1038:114:3:-;1102:4;1125:14;:12;:14::i;:::-;-1:-1:-1;;;;;1125:20:3;;;;;;;;;;;;;-1:-1:-1;1125:20:3;;;;;;;1038:114::o;1324:122:17:-;1388:7;1414:16;:14;:16::i;:::-;:25;;;;;;-1:-1:-1;1414:25:17;;;;;1324:122::o;5059:584::-;5268:79;;5244:7;;5322:8;;5311:9;;5299:10;;5268:79;;;;5332:7;;;;5341:5;;5268:79;:::i;:::-;;;;;;;;5357:15;5375:53;5392:9;5403:8;5413:7;;5422:5;5375:16;:53::i;:::-;5357:71;;5438:21;5462:16;:14;:16::i;:::-;:25;;;;;;;;;;;;;;-1:-1:-1;5505:17:17;5497:50;;;;-1:-1:-1;;;5497:50:17;;;;;;;:::i;:::-;5597:15;5557:28;:26;:28::i;:::-;:37;;;;;;;;;;;;:55;-1:-1:-1;5557:37:17;5059:584;-1:-1:-1;;;;;;5059:584:17:o;2067:152::-;2124:7;2150:62;2176:35;;;;;;;;;;;;;;;;;2150:25;:62::i;840:121:16:-;919:35;935:18;919:15;:35::i;6058:1807:37:-;341:22:9;352:10;341;:22::i;:::-;333:48;;;;-1:-1:-1;;;333:48:9;;;;;;;:::i;:::-;6331:25:37::1;6359:7;:5;:7::i;:::-;:19;;;6331:47;;6425:38;6449:13;;6425:23;:38::i;:::-;6544:13;;833:1:15;6544:48:37;;;;;;;;;;;;;6528:12;:10;:12::i;:::-;:64;6507:130;;;::::0;-1:-1:-1;;;6507:130:37;;::::1;::::0;::::1;;;:::i;:::-;6648:29;6663:13;;6648:7;:5;:7::i;:::-;:14:::0;:29;:14:::1;:29::i;:::-;880:1:15;6985:155:37;7054:4;7072:28;:13:::0;880:1:15;7072:13:37;;:28:::1;:::i;:::-;7114:16;:14;:16::i;:::-;6985:30;:155::i;:::-;6969:171;7205:156;7274:5;7293:28;:13:::0;6969:171;7293:13;;:28:::1;:::i;:::-;7335:16;:14;:16::i;7205:156::-;7189:172;7379:36:::0;;::::1;7371:73;;;::::0;-1:-1:-1;;;7371:73:37;;::::1;::::0;::::1;;;:::i;:::-;7588:34;7625:7;:5;:7::i;:::-;7588:44;;7647:71;7662:6;:17;;;7681:6;:18;;;7701:6;:16;;;7647:71;;;;;;;;:::i;:::-;;;;;;;;7805:18;7826:1;7805:22;7783:6;:18;;;:44;7775:83;;;::::0;-1:-1:-1;;;7775:83:37;;::::1;::::0;::::1;;;:::i;:::-;391:1:9;;;6058:1807:37::0;;:::o;2699:120::-;2743:7;2769:43;2795:16;;;;;;;;;;;;;;;;;2769:25;:43::i;493:112:1:-;537:4;560:38;586:11;;;;;;;;;;;;;;;;;560:25;:38::i;717:117:16:-;794:33;815:11;794:20;:33::i;967:81::-;1022:19;:17;:19::i;:::-;967:81::o;5300:95:37:-;5344:7;5370;:5;:7::i;:::-;:18;;-1:-1:-1;5300:95:37;:::o;779:253:3:-;292:23:8;304:10;292:11;:23::i;:::-;284:51;;;;-1:-1:-1;;;284:51:8;;;;;;;:::i;:::-;879:27:3::1;890:15;879:10;:27::i;:::-;875:151;;;956:5;922:14;:12;:14::i;:::-;-1:-1:-1::0;;;;;922:31:3;::::1;;::::0;;;::::1;::::0;;;;;;;;;:39;;-1:-1:-1;;922:39:3::1;::::0;::::1;;::::0;;;::::1;::::0;;;980:35;::::1;::::0;::::1;::::0;922:31;;980:35:::1;:::i;2591:146:17:-:0;2667:7;2693:28;:26;:28::i;1452:122::-;1516:7;1542:16;:14;:16::i;2452:183:37:-;654:13:1;:11;:13::i;:::-;653:14;645:36;;;;-1:-1:-1;;;645:36:1;;;;;;;:::i;:::-;292:23:8::1;304:10;292:11;:23::i;:::-;284:51;;;::::0;-1:-1:-1;;;284:51:8;;::::1;::::0;::::1;;;:::i;:::-;2588:40:37::2;2613:14;2588:24;:40::i;3415:118::-:0;3458:7;3484:42;3510:15;;;;;;;;;;;;;;;;;3484:25;:42::i;1054:81:16:-;1109:19;:17;:19::i;2037:205:37:-;654:13:1;:11;:13::i;:::-;653:14;645:36;;;;-1:-1:-1;;;645:36:1;;;;;;;:::i;:::-;292:23:8::1;304:10;292:11;:23::i;:::-;284:51;;;::::0;-1:-1:-1;;;284:51:8;;::::1;::::0;::::1;;;:::i;:::-;2156:10:37::2;2137:61;2168:13;:11;:13::i;:::-;2183:14;2137:61;;;;;;;:::i;:::-;;;;;;;;2208:27;2220:14;2208:11;:27::i;5123:118::-:0;5200:34;;;;;;;;;;;;;;;;;5123:118;:::o;1465:209:12:-;1530:14;1556:12;1598:4;1581:22;;;;;;;;:::i;:::-;;;;;;;-1:-1:-1;;1581:22:12;;;;;;1571:33;;1581:22;1571:33;;;;1647:11;;;-1:-1:-1;;;1623:45:12:o;1988:189:0:-;2055:4;2071:32;2106:19;:17;:19::i;:::-;-1:-1:-1;;;;;2142:28:0;;;;:22;:28;;;;;;;;-1:-1:-1;;2142:28:0;;;;;;;1988:189::o;1754:168:17:-;1803:35;1857:58;1894:20;;;;;;;;;;;;;;;;;1857:36;:58::i;3722:232:37:-;3762:39;3813:16;3859;;;;;;;;;;;;;;;;;3842:34;;;;;;;;:::i;:::-;;;;;;;-1:-1:-1;;3842:34:37;;;;;;3832:45;;3842:34;3832:45;;;;;;-1:-1:-1;;3896:52:37:o;318:170:18:-;374:32;425:56;459:21;;;;;;;;;;;;;;;;;425:33;:56::i;3242:110:37:-;3296:49;3322:15;;;;;;;;;;;;;;;;;3339:5;1680:192:12;1756:12;1798:4;1781:22;;;;;;;;:::i;:::-;;;;;;;;;;;;;1771:33;;;;;;1756:48;;1850:5;1844:4;1837:19;1823:43;;;:::o;3048:481:17:-;3280:228;;3215:7;;3280:228;;3326:10;;3359:9;;3390:5;;3417:8;;3447:7;;;;;;3280:228;;;:::i;:::-;;;;;;;;;;;;;3253:269;;;;;;3234:288;;3048:481;;;;;;;:::o;1580:168::-;1629:35;1683:58;1720:20;;;;;;;;;;;;;;;;;1683:36;:58::i;2520:540:10:-;2648:36;-1:-1:-1;;;;;2648:34:10;;;:36::i;:::-;2640:67;;;;-1:-1:-1;;;2640:67:10;;;;;;;:::i;:::-;2879:57;;2788:12;;2802:23;;-1:-1:-1;;;;;2829:36:10;;;-1:-1:-1;;;2902:24:10;2879:57;;2928:7;;;;2879:57;;;:::i;:::-;;;;-1:-1:-1;;2879:57:10;;;;;;;;;;;;;;-1:-1:-1;;;;;2879:57:10;-1:-1:-1;;;;;;2879:57:10;;;;;;;;;;;2829:117;;;;2879:57;2829:117;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2787:159;;;;2964:7;2980:10;2956:36;;;;;-1:-1:-1;;;2956:36:10;;;;;;;;:::i;:::-;-1:-1:-1;3010:17:10;;:10;;:22;3002:51;;;;-1:-1:-1;;;3002:51:10;;;;;;;;:::i;:::-;;2520:540;;;;;:::o;3960:105:37:-;4017:4;4040:13;:11;:13::i;:::-;:18;;;-1:-1:-1;3960:105:37;:::o;4172:266::-;4275:6;4260:21;;4252:56;;;;-1:-1:-1;;;4252:56:37;;;;;;;:::i;:::-;4318:20;4352:9;4358:2;4318:20;4352:4;;:9;:::i;:::-;4341:32;;;;;;;:::i;:::-;4318:55;-1:-1:-1;4391:17:37;4383:48;;;;-1:-1:-1;;;4383:48:37;;;;;;;:::i;:::-;4172:266;;;:::o;4544:505::-;4640:20;4674:17;4705:19;4738:39;;:::i;:::-;4790:66;;;;4801:4;4790:66;:::i;:::-;4626:230;;;;;;;;4867:25;4879:12;4867:11;:25::i;:::-;4902:29;4921:9;4902:18;:29::i;:::-;4941:26;4954:12;4941:7;:5;:7::i;:::-;:12;;:26::i;:::-;4977:23;4988:11;4977:10;:23::i;:::-;5010:32;5035:6;5010:24;:32::i;1665:317:0:-;1710:32;1745:19;:17;:19::i;:::-;1783:15;;;;;;-1:-1:-1;;;;1783:15:0;;;;1782:16;1774:48;;;;-1:-1:-1;;;1774:48:0;;;;;;;:::i;:::-;1850:4;1832:15;;:22;;-1:-1:-1;;;;1832:22:0;-1:-1:-1;;;1832:22:0;;;1946:29;1964:10;1946:17;:29::i;2743:221:17:-;2828:35;2886:71;2923:33;;;;;;;;;;;;;;;;;2886:36;:71::i;4088:402:0:-;292:23:8;304:10;292:11;:23::i;:::-;284:51;;;;-1:-1:-1;;;284:51:8;;;;;;;:::i;:::-;-1:-1:-1;;;;;4183:32:0;::::1;:10;:32;;4175:65;;;::::0;-1:-1:-1;;;4175:65:0;;::::1;::::0;::::1;;;:::i;:::-;4250:32;4285:19;:17;:19::i;:::-;4250:54;;4322:31;4334:18;4322:11;:31::i;:::-;4314:56;;;::::0;-1:-1:-1;;;4314:56:0;;::::1;::::0;::::1;;;:::i;:::-;-1:-1:-1::0;;;;;4380:42:0;::::1;4425:5;4380:42:::0;;;::::1;::::0;;;;;;;;:50;;-1:-1:-1;;4380:50:0::1;::::0;;4445:38;::::1;::::0;::::1;::::0;4380:42;;4445:38:::1;:::i;:::-;;;;;;;;345:1:8;4088:402:0::0;:::o;1965:151:15:-;880:1;2047:32;;2039:70;;;;-1:-1:-1;;;2039:70:15;;;;;;;:::i;598:803:19:-;808:1;787:17;;;:22;;;;;;;870:14;;726:1:15;870:50:19;;;;;;;;;;;;;848:5;:17;;;840:80;819:147;;;;-1:-1:-1;;;819:147:19;;;;;;;:::i;:::-;995:14;;779:1:15;995:48:19;;;;;;;;;;;;;;977:15;;;:66;-1:-1:-1;1054:41:19;;1098:46;1129:14;;1098:30;:46::i;:::-;1054:90;;;;1195:62;1234:22;;1195:38;:62::i;:::-;1175:16;;:82;1154:150;;;;-1:-1:-1;;;1154:150:19;;;;;;;:::i;:::-;1333:61;1371:22;;1333:37;:61::i;:::-;1314:80;;;-1:-1:-1;;;;598:803:19:o;2748:3369:15:-;2921:7;2940:26;2969:18;;2988:1;2969:21;;;;;;;;;;;;;2940:50;;3029:5;3008:18;:26;3000:67;;;;-1:-1:-1;;;3000:67:15;;;;;;;:::i;:::-;3095:1;3134:27;;;3078:14;3214:8;:80;;1399:1;3214:80;;;1059:1;3214:80;3172:132;;3315:20;3349:2443;3365:17;3356:6;:26;3349:2443;;;3428:26;;;3476:47;;;3468:77;;;;-1:-1:-1;;;3468:77:15;;;;;;;:::i;:::-;3560:21;3584:18;;3603:19;3584:39;;;;;;;;;;;;;3560:63;;3661:5;3645:13;:21;3637:56;;;;-1:-1:-1;;;3637:56:15;;;;;;;:::i;:::-;3728:39;;;3750:1;3728:39;3789:38;;;;3781:76;;;;-1:-1:-1;;;3781:76:15;;;;;;;:::i;:::-;3876:8;3872:1877;;;3904:19;3974:18;;3993:6;3974:36;4000:9;3974:36;;;;;;;:::i;:::-;3957:54;;;;;;;;;:::i;:::-;;;;;;;;;;;;;3926:103;;;;;;3904:125;;4237:18;;999:1;4256:6;:40;4237:60;;;;;;;;;;;;;-1:-1:-1;;;;;4053:394:15;4118:18;;941:1;4137:6;:42;4118:62;;;;;;;;;;;;;4053:394;4364:18;;1111:1;4383:6;:34;4364:64;4418:9;4364:64;;;;;;;:::i;:::-;4053:394;;;;;;;:::i;:::-;;;;;;;;4465:21;;;;;;;;;;;:26;;4490:1;4465:26;;;3872:1877;;;4552:19;4626:18;;4645:6;4626:36;4652:9;4626:36;;;;;;;:::i;:::-;4609:54;;;;;;;;;:::i;:::-;;;;;;;-1:-1:-1;;4609:54:15;;;;;;4574:111;;4609:54;4574:111;;;;4708:21;4732;;;;;;;;;;4574:111;;-1:-1:-1;4732:21:15;4775:56;;;;-1:-1:-1;;;4775:56:15;;;;;;;:::i;:::-;4932:1;4908:21;;;;;;;;;;:25;;;4853:33;;;;-1:-1:-1;;4853:33:15;;4986:18;;1283:1;5005:35;;4986:55;;;;;;;;;;;;;4970:71;;5059:29;5124:18;;1451:1;5143:6;:34;5124:64;5178:9;5124:64;;;;;;;:::i;:::-;5059:147;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5534:18;;1339:1;5553:6;:38;5534:58;;;;;;;;;;;;;5419:18;;1230:1;5438:6;:40;5419:60;;;;;;;;;;;;;5307:18;;1172:1;5326:6;:42;5307:62;;;;;;;;;;;;;-1:-1:-1;;;;;5229:505:15;;5646:12;5711:5;5229:505;;;;;;;:::i;:::-;;;;;;;;3872:1877;;;5772:9;-1:-1:-1;3349:2443:15;;-1:-1:-1;;3349:2443:15;;5819:17;5809:6;:27;5801:68;;;;-1:-1:-1;;;5801:68:15;;;;;;;:::i;:::-;5884:16;;5880:207;;5983:40;;5965:12;;5983:10;;6006:12;;5983:40;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5964:59;;;6045:7;6037:39;;;;-1:-1:-1;;;6037:39:15;;;;;;;:::i;:::-;5880:207;;-1:-1:-1;6104:6:15;;2748:3369;-1:-1:-1;;;;;;;;2748:3369:15:o;2537:447:0:-;292:23:8;304:10;292:11;:23::i;:::-;284:51;;;;-1:-1:-1;;;284:51:8;;;;;;;:::i;:::-;2622:32:0::1;2657:19;:17;:19::i;:::-;2622:54:::0;-1:-1:-1;;;;;;2694:27:0;::::1;2686:51;;;::::0;-1:-1:-1;;;2686:51:0;;::::1;::::0;::::1;;;:::i;:::-;2756:24;2768:11;2756;:24::i;:::-;2755:25;2747:54;;;::::0;-1:-1:-1;;;2747:54:0;;::::1;::::0;::::1;;;:::i;:::-;2819:21;::::0;::::1;::::0;-1:-1:-1;;;;;2819:21:0::1;:37:::0;2811:73:::1;;;::::0;-1:-1:-1;;;2811:73:0;;::::1;::::0;::::1;;;:::i;:::-;2894:21;::::0;::::1;:35:::0;;-1:-1:-1;;;;;;2894:35:0::1;-1:-1:-1::0;;;;;2894:35:0;::::1;;::::0;;2944:33:::1;::::0;::::1;::::0;::::1;::::0;2894:35;;2944:33:::1;:::i;3649:382::-:0;3778:32;3813:19;:17;:19::i;:::-;3864:21;;;;;;-1:-1:-1;;;;;;3864:21:0;3850:10;:35;3842:71;;;;-1:-1:-1;;;3842:71:0;;;;;;;:::i;:::-;3949:29;3967:10;3949:17;:29::i;:::-;3988:21;;:36;;-1:-1:-1;;;;;;3988:36:0;;;3649:382::o;2225:162:17:-;2302:78;2328:35;;;;;;;;;;;;;;;;;2365:14;2302:25;:78::i;2251:280:0:-;292:23:8;304:10;292:11;:23::i;:::-;284:51;;;;-1:-1:-1;;;284:51:8;;;;;;;:::i;:::-;2314:32:0::1;2349:19;:17;:19::i;:::-;2382:21;::::0;::::1;::::0;;;-1:-1:-1;;;;;;2382:21:0::1;:37:::0;2378:147:::1;;2435:21;::::0;::::1;:36:::0;;-1:-1:-1;;;;;;2435:36:0::1;::::0;;2490:24:::1;::::0;::::1;::::0;-1:-1:-1;;2490:24:0::1;345:1:8;2251:280:0:o:0;2884:112:37:-;2939:50;2965:16;;;;;;;;;;;;;;;;;2983:5;2939:25;:50::i;343:250:16:-;404:32;448:16;494:28;;;;;;;;;;;;;;;;;477:46;;;;;;;;:::i;258:298:12:-;358:50;424:16;470:4;453:22;;;;;;;;:::i;:::-;;;;;;;-1:-1:-1;;453:22:12;;;;;;443:33;;453:22;443:33;;;;;;-1:-1:-1;;;495:55:12:o;346:190:11:-;475:20;521:8;;;346:190::o;3539:130:37:-;3601:61;3634:20;;;;;;;;;;;;;;;;;3656:5;3601:32;:61::i;227:222:19:-;324:20;;305:39;;374:21;;;;354:17;;;:41;423:19;;;405:15;;;;:37;227:222::o;3309:334:0:-;3384:24;3396:11;3384;:24::i;:::-;3383:25;3375:54;;;;-1:-1:-1;;;3375:54:0;;;;;;;:::i;:::-;3439:32;3474:19;:17;:19::i;:::-;-1:-1:-1;;;;;3503:35:0;;:22;:35;;;;;;;;;;;;:42;;-1:-1:-1;;3503:42:0;-1:-1:-1;3503:42:0;;;3601:35;3503;;-1:-1:-1;3601:35:0;;;;3503;;3601;:::i;2225:210:15:-;2329:18;;2370:58;2426:1;2329:18;2370:11;;:58;:::i;:::-;2363:65;;;;2225:210;;;;;;:::o;171:177::-;284:7;314:24;;339:1;314:27;;;;;;;;;;;;;307:34;;171:177;;;;:::o;413:176::-;525:7;555:24;;580:1;555:27;;;;;;2472:189:12;2596:3;2563:21;2579:4;2563:15;:21::i;:::-;-1:-1:-1;;;;;2563:37:12;;2555:61;;;;-1:-1:-1;;;2555:61:12;;;;;;;:::i;:::-;2626:28;2642:4;2648:5;2626:15;:28::i;-1:-1:-1:-;;;;;;;;;;;;;;;;;;;;;;;;:::o;313:352::-;;;443:3;436:4;428:6;424:17;420:27;410:2;;-1:-1;;451:12;410:2;-1:-1;481:20;;521:18;510:30;;507:2;;;-1:-1;;543:12;507:2;587:4;579:6;575:17;563:29;;638:3;587:4;;622:6;618:17;579:6;604:32;;601:41;598:2;;;655:1;;645:12;2106:241;;2210:2;2198:9;2189:7;2185:23;2181:32;2178:2;;;-1:-1;;2216:12;2178:2;85:6;72:20;97:33;124:5;97:33;:::i;:::-;2268:63;2172:175;-1:-1;;;2172:175::o;2618:397::-;;;2757:2;2745:9;2736:7;2732:23;2728:32;2725:2;;;-1:-1;;2763:12;2725:2;2821:17;2808:31;2859:18;2851:6;2848:30;2845:2;;;-1:-1;;2881:12;2845:2;2919:80;2991:7;2982:6;2971:9;2967:22;2919:80;:::i;:::-;2901:98;;;;-1:-1;2719:296;-1:-1;;;;2719:296::o;3022:241::-;;3126:2;3114:9;3105:7;3101:23;3097:32;3094:2;;;-1:-1;;3132:12;3094:2;-1:-1;740:20;;3088:175;-1:-1;3088:175::o;3270:365::-;;;3393:2;3381:9;3372:7;3368:23;3364:32;3361:2;;;-1:-1;;3399:12;3361:2;3457:17;3444:31;3495:18;;3487:6;3484:30;3481:2;;;-1:-1;;3517:12;3481:2;3602:6;3591:9;3587:22;;;938:3;931:4;923:6;919:17;915:27;905:2;;-1:-1;;946:12;905:2;989:6;976:20;3495:18;1008:6;1005:30;1002:2;;;-1:-1;;1038:12;1002:2;1133:3;3393:2;1113:17;1074:6;1099:32;;1096:41;1093:2;;;-1:-1;;1140:12;1093:2;3393;1070:17;;;;;3537:82;;-1:-1;3355:280;;-1:-1;;;;3355:280::o;3890:679::-;;;;;4064:9;4055:7;4051:23;4076:3;4051:23;4047:33;4044:2;;;-1:-1;;4083:12;4044:2;2049:6;2036:20;4135:63;;4235:2;4286:9;4282:22;217:20;242:41;277:5;242:41;:::i;:::-;4243:71;-1:-1;4351:2;4390:22;;2036:20;;-1:-1;4459:2;-1:-1;;1427:19;;1423:30;1420:2;;;-1:-1;;1456:12;1420:2;;4351;45663:9;4459:2;45699:6;45695:17;45806:6;45794:10;45791:22;45770:18;45758:10;45755:34;45752:62;45749:2;;;-1:-1;;45817:12;45749:2;45847:10;4351:2;45836:22;;4459:2;4525:9;4521:22;2036:20;1574:16;1567:75;1763:22;4525:9;1763:22;1234:20;4235:2;1729:5;1725:16;1718:74;1912:22;4525:9;1912:22;2036:20;4351:2;1877:5;1873:16;1866:75;4467:86;;;;4038:531;;;;;;;:::o;4576:522::-;;;;4732:2;4720:9;4711:7;4707:23;4703:32;4700:2;;;-1:-1;;4738:12;4700:2;2049:6;2036:20;4790:63;;4918:2;4907:9;4903:18;4890:32;4942:18;4934:6;4931:30;4928:2;;;-1:-1;;4964:12;4928:2;5002:80;5074:7;5065:6;5054:9;5050:22;5002:80;:::i;:::-;4694:404;;4984:98;;-1:-1;4984:98;;-1:-1;;;;4694:404::o;5105:647::-;;;;;5278:2;5266:9;5257:7;5253:23;5249:32;5246:2;;;-1:-1;;5284:12;5246:2;2049:6;2036:20;5336:63;;5436:2;5479:9;5475:22;2036:20;5444:63;;5572:2;5561:9;5557:18;5544:32;5596:18;5588:6;5585:30;5582:2;;;-1:-1;;5618:12;5582:2;5656:80;5728:7;5719:6;5708:9;5704:22;5656:80;:::i;:::-;5240:512;;;;-1:-1;5638:98;-1:-1;;;;5240:512::o;5759:773::-;;;;;;5949:3;5937:9;5928:7;5924:23;5920:33;5917:2;;;-1:-1;;5956:12;5917:2;2049:6;2036:20;6008:63;;6108:2;6151:9;6147:22;2036:20;6116:63;;6244:2;6233:9;6229:18;6216:32;6268:18;6260:6;6257:30;6254:2;;;-1:-1;;6290:12;6254:2;6328:80;6400:7;6391:6;6380:9;6376:22;6328:80;:::i;:::-;5911:621;;;;-1:-1;6310:98;6445:2;6484:22;2036:20;;5911:621;-1:-1;;;;5911:621::o;6872:467::-;46663:19;;;6872:467;-1:-1;;;;;7120:78;;7117:2;;;-1:-1;;7201:12;7117:2;46712:4;7236:6;7232:17;48959:6;48954:3;46712:4;46707:3;46703:14;48936:30;48997:16;;;;46712:4;48997:16;48990:27;;;-1:-1;48997:16;;7004:335;-1:-1;7004:335::o;7378:503::-;;-1:-1;;;;;7662:78;;7659:2;;;-1:-1;;7743:12;7659:2;7786:4;7778:6;7774:17;48959:6;48954:3;48949;48936:30;48997:16;;;;48990:27;;;-1:-1;48997:16;;7528:353;-1:-1;7528:353::o;22734:361::-;;22935:135;23066:3;23057:6;23049;22935:135;:::i;:::-;23080:10;22916:179;-1:-1;;;;22916:179::o;23102:271::-;;9337:5;46131:12;9448:52;9493:6;9488:3;9481:4;9474:5;9470:16;9448:52;:::i;:::-;9512:16;;;;;23236:137;-1:-1;;23236:137::o;23662:379::-;24026:10;23850:191::o;24048:772::-;;8830:5;8807:3;8800:37;8830:5;24417:2;24412:3;24408:12;8800:37;8830:5;24519:12;24412:3;24519:12;8800:37;24660:135;24630:12;24412:3;24630:12;24782:6;24774;24660:135;:::i;:::-;24805:10;24308:512;-1:-1;;;;;;;24308:512::o;24827:1050::-;;8830:5;8807:3;8800:37;8830:5;25252:2;25247:3;25243:12;8800:37;8830:5;25354:12;25247:3;25354:12;8800:37;8830:5;25465:12;25247:3;25465:12;8800:37;8830:5;25576:12;25247:3;25576:12;8800:37;25717:135;25687:12;25247:3;25687:12;25839:6;25831;25717:135;:::i;:::-;25862:10;25143:734;-1:-1;;;;;;;;;25143:734::o;25884:222::-;-1:-1;;;;;48732:54;;;;6792:37;;26011:2;25996:18;;25982:124::o;26113:390::-;;26300:2;26321:17;26314:47;26375:118;26300:2;26289:9;26285:18;26479:6;26471;26375:118;:::i;26510:501::-;;26725:2;26746:17;26739:47;26800:118;26725:2;26714:9;26710:18;26904:6;26896;26800:118;:::i;:::-;26792:126;;8830:5;26997:2;26986:9;26982:18;8800:37;26696:315;;;;;;:::o;27018:612::-;;27261:2;27282:17;27275:47;27336:118;27261:2;27250:9;27246:18;27440:6;27432;27336:118;:::i;:::-;27533:2;27518:18;;8800:37;;;;-1:-1;27616:2;27601:18;8800:37;27328:126;27232:398;-1:-1;;27232:398::o;27637:481::-;27842:2;27856:47;;;46131:12;;27827:18;;;46663:19;;;27637:481;;46712:4;;46703:14;;;;45985;;;27637:481;8328:260;8353:6;8350:1;8347:13;8328:260;;;8414:13;;8800:37;;6693:14;;;;46518;;;;8375:1;8368:9;8328:260;;;-1:-1;;;28089:18;;8800:37;;;;27909:116;27813:305;-1:-1;;27813:305::o;28125:210::-;48487:13;;48480:21;8683:34;;28246:2;28231:18;;28217:118::o;28342:222::-;8800:37;;;28469:2;28454:18;;28440:124::o;28571:333::-;8800:37;;;28890:2;28875:18;;8800:37;28726:2;28711:18;;28697:207::o;28911:326::-;;29066:2;29087:17;29080:47;46675:6;29066:2;29055:9;29051:18;46663:19;48959:6;48954:3;46703:14;29055:9;46703:14;48936:30;48997:16;;;46703:14;48997:16;;;48990:27;;;;49473:7;49457:14;;;-1:-1;;49453:28;9124:39;;;29037:200;-1:-1;29037:200::o;29469:310::-;;29616:2;29637:17;29630:47;9802:5;46131:12;46675:6;29616:2;29605:9;29601:18;46663:19;9896:52;9941:6;46703:14;29605:9;46703:14;29616:2;9922:5;9918:16;9896:52;:::i;:::-;49473:7;49457:14;-1:-1;;49453:28;9960:39;;;;46703:14;9960:39;;29587:192;-1:-1;;29587:192::o;29786:416::-;29986:2;30000:47;;;10603:2;29971:18;;;46663:19;-1:-1;;;46703:14;;;10619:41;10679:12;;;29957:245::o;30209:416::-;30409:2;30423:47;;;10930:2;30394:18;;;46663:19;-1:-1;;;46703:14;;;10946:40;11005:12;;;30380:245::o;30632:416::-;30832:2;30846:47;;;11256:2;30817:18;;;46663:19;-1:-1;;;46703:14;;;11272:45;11336:12;;;30803:245::o;31055:416::-;31255:2;31269:47;;;11587:2;31240:18;;;46663:19;-1:-1;;;46703:14;;;11603:39;11661:12;;;31226:245::o;31478:416::-;31678:2;31692:47;;;11912:2;31663:18;;;46663:19;-1:-1;;;46703:14;;;11928:44;11991:12;;;31649:245::o;31901:416::-;32101:2;32115:47;;;12242:2;32086:18;;;46663:19;-1:-1;;;46703:14;;;12258:42;12319:12;;;32072:245::o;32324:416::-;32524:2;32538:47;;;12570:2;32509:18;;;46663:19;-1:-1;;;46703:14;;;12586:42;12647:12;;;32495:245::o;32747:416::-;32947:2;32961:47;;;12898:2;32932:18;;;46663:19;12934:30;46703:14;;;12914:51;12984:12;;;32918:245::o;33170:416::-;33370:2;33384:47;;;13235:2;33355:18;;;46663:19;13271:34;46703:14;;;13251:55;-1:-1;;;13326:12;;;13319:28;13366:12;;;33341:245::o;33593:416::-;33793:2;33807:47;;;13617:2;33778:18;;;46663:19;-1:-1;;;46703:14;;;13633:34;13686:12;;;33764:245::o;34016:416::-;34216:2;34230:47;;;13937:2;34201:18;;;46663:19;13973:25;46703:14;;;13953:46;14018:12;;;34187:245::o;34439:416::-;34639:2;34653:47;;;14269:2;34624:18;;;46663:19;14305:28;46703:14;;;14285:49;14353:12;;;34610:245::o;34862:416::-;35062:2;35076:47;;;14604:2;35047:18;;;46663:19;-1:-1;;;46703:14;;;14620:43;-1:-1;14682:12;;35033:245::o;35285:416::-;35485:2;35499:47;;;14933:2;35470:18;;;46663:19;-1:-1;;;46703:14;;;14949:45;15013:12;;;35456:245::o;35708:416::-;35908:2;35922:47;;;15264:2;35893:18;;;46663:19;-1:-1;;;46703:14;;;15280:45;15344:12;;;35879:245::o;36131:416::-;36331:2;36345:47;;;15595:2;36316:18;;;46663:19;15631:25;46703:14;;;15611:46;15676:12;;;36302:245::o;36554:416::-;36754:2;36768:47;;;15927:2;36739:18;;;46663:19;-1:-1;;;46703:14;;;15943:41;16003:12;;;36725:245::o;36977:416::-;37177:2;37191:47;;;16254:2;37162:18;;;46663:19;16290:30;46703:14;;;16270:51;16340:12;;;37148:245::o;37400:416::-;37600:2;37614:47;;;16591:2;37585:18;;;46663:19;16627:26;46703:14;;;16607:47;16673:12;;;37571:245::o;37823:416::-;38023:2;38037:47;;;16924:2;38008:18;;;46663:19;-1:-1;;;46703:14;;;16940:43;17002:12;;;37994:245::o;38246:416::-;38446:2;38460:47;;;17253:2;38431:18;;;46663:19;17289:27;46703:14;;;17269:48;17336:12;;;38417:245::o;38669:416::-;38869:2;38883:47;;;17587:2;38854:18;;;46663:19;17623:27;46703:14;;;17603:48;17670:12;;;38840:245::o;39092:416::-;39292:2;39306:47;;;17921:1;39277:18;;;46663:19;-1:-1;;;46703:14;;;17936:32;17987:12;;;39263:245::o;39515:416::-;39715:2;39729:47;;;18238:2;39700:18;;;46663:19;-1:-1;;;46703:14;;;18254:38;18311:12;;;39686:245::o;39938:416::-;40138:2;40152:47;;;18562:2;40123:18;;;46663:19;-1:-1;;;46703:14;;;18578:34;18631:12;;;40109:245::o;40361:416::-;40561:2;40575:47;;;18882:2;40546:18;;;46663:19;-1:-1;;;46703:14;;;18898:42;18959:12;;;40532:245::o;40784:416::-;40984:2;40998:47;;;19210:2;40969:18;;;46663:19;19246:25;46703:14;;;19226:46;19291:12;;;40955:245::o;41207:416::-;41407:2;41421:47;;;19542:2;41392:18;;;46663:19;19578:28;46703:14;;;19558:49;19626:12;;;41378:245::o;41630:416::-;41830:2;41844:47;;;20182:2;41815:18;;;46663:19;-1:-1;;;46703:14;;;20198:42;20259:12;;;41801:245::o;42053:416::-;42253:2;42267:47;;;20510:2;42238:18;;;46663:19;-1:-1;;;46703:14;;;20526:36;20581:12;;;42224:245::o;42476:416::-;42676:2;42690:47;;;20832:2;42661:18;;;46663:19;-1:-1;;;46703:14;;;20848:43;20910:12;;;42647:245::o;42899:416::-;43099:2;43113:47;;;21161:2;43084:18;;;46663:19;-1:-1;;;46703:14;;;21177:43;-1:-1;21239:12;;43070:245::o;43322:416::-;43522:2;43536:47;;;21490:2;43507:18;;;46663:19;-1:-1;;;46703:14;;;21506:35;21560:12;;;43493:245::o;43745:416::-;43945:2;43959:47;;;21811:2;43930:18;;;46663:19;21847:34;46703:14;;;21827:55;-1:-1;;;21902:12;;;21895:26;21940:12;;;43916:245::o;44168:416::-;44368:2;44382:47;;;22191:2;44353:18;;;46663:19;22227:34;46703:14;;;22207:55;-1:-1;;;22282:12;;;22275:25;22319:12;;;44339:245::o;44820:440::-;8800:37;;;45163:2;45148:18;;8800:37;;;;45246:2;45231:18;;8800:37;45001:2;44986:18;;44972:288::o;47550:335::-;;;47716:8;47704:10;47701:24;47698:2;;;-1:-1;;47728:12;47698:2;47763:6;47753:8;47750:20;47747:2;;;-1:-1;;47773:12;47747:2;-1:-1;;47833:2;47817:19;;47805:32;;47855:25;;;;;-1:-1;47692:193::o;47892:318::-;;;48042:8;48030:10;48027:24;48024:2;;;-1:-1;;48054:12;48024:2;48089:6;48079:8;48076:20;48073:2;;;-1:-1;;48099:12;48073:2;-1:-1;;48131:31;;;48180:25;;;;;-1:-1;48018:192::o;49032:268::-;49097:1;49104:101;49118:6;49115:1;49112:13;49104:101;;;49185:11;;;49179:18;49166:11;;;49159:39;49140:2;49133:10;49104:101;;;49220:6;49217:1;49214:13;49211:2;;;49097:1;49276:6;49271:3;49267:16;49260:27;49211:2;;49081:219;;;:::o;49494:117::-;-1:-1;;;;;48732:54;;49553:35;;49543:2;;49602:1;;49592:12", - "linkReferences": {}, - "immutableReferences": { - "460": [ - { - "start": 2358, - "length": 32 - } - ] - } - }, - "methodIdentifiers": { - "cancelL1ToL2Message(uint256,uint256,uint256[],uint256)": "6170ff1b", - "configHash()": "e1f1176d", - "consumeMessageFromL2(uint256,uint256[])": "2c9dd5c0", - "finalize()": "4bb278f3", - "getMaxL1MsgFee()": "54eccba4", - "identify()": "eeb72866", - "initialize(bytes)": "439fab91", - "isFinalized()": "8d4e4083", - "isFrozen()": "33eeb147", - "isOperator(address)": "6d70f7ae", - "l1ToL2MessageCancellations(bytes32)": "9be446bf", - "l1ToL2MessageNonce()": "018cccdf", - "l1ToL2Messages(bytes32)": "77c7d7a9", - "l2ToL1Messages(bytes32)": "a46efaf3", - "messageCancellationDelay()": "8303bd8a", - "programHash()": "8a9bf090", - "registerOperator(address)": "3682a450", - "sendMessageToL2(uint256,uint256,uint256[])": "3e3aa6c5", - "setConfigHash(uint256)": "3d07b336", - "setMessageCancellationDelay(uint256)": "c99d397f", - "setProgramHash(uint256)": "e87e7332", - "starknetAcceptGovernance()": "946be3ed", - "starknetCancelNomination()": "e37fec25", - "starknetIsGovernor(address)": "01a01590", - "starknetNominateNewGovernor(address)": "91a66a26", - "starknetRemoveGovernor(address)": "84f921cd", - "startL1ToL2MessageCancellation(uint256,uint256,uint256[],uint256)": "7a98660b", - "stateBlockHash()": "382d83e3", - "stateBlockNumber()": "35befa5d", - "stateRoot()": "9588eca2", - "unregisterOperator(address)": "96115bc2", - "updateState(uint256[])": "853e2461" - }, - "rawMetadata": "{\"compiler\":{\"version\":\"0.6.12+commit.27d51765\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"changedBy\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"oldConfigHash\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"newConfigHash\",\"type\":\"uint256\"}],\"name\":\"ConfigHashChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"fromAddress\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"toAddress\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256[]\",\"name\":\"payload\",\"type\":\"uint256[]\"}],\"name\":\"ConsumedMessageToL1\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"fromAddress\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"toAddress\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"selector\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256[]\",\"name\":\"payload\",\"type\":\"uint256[]\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"nonce\",\"type\":\"uint256\"}],\"name\":\"ConsumedMessageToL2\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[],\"name\":\"Finalized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"fromAddress\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"toAddress\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256[]\",\"name\":\"payload\",\"type\":\"uint256[]\"}],\"name\":\"LogMessageToL1\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"fromAddress\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"toAddress\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"selector\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256[]\",\"name\":\"payload\",\"type\":\"uint256[]\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"nonce\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"}],\"name\":\"LogMessageToL2\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"acceptedGovernor\",\"type\":\"address\"}],\"name\":\"LogNewGovernorAccepted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"nominatedGovernor\",\"type\":\"address\"}],\"name\":\"LogNominatedGovernor\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[],\"name\":\"LogNominationCancelled\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"}],\"name\":\"LogOperatorAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"}],\"name\":\"LogOperatorRemoved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"removedGovernor\",\"type\":\"address\"}],\"name\":\"LogRemovedGovernor\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"stateTransitionFact\",\"type\":\"bytes32\"}],\"name\":\"LogStateTransitionFact\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"globalRoot\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"int256\",\"name\":\"blockNumber\",\"type\":\"int256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"blockHash\",\"type\":\"uint256\"}],\"name\":\"LogStateUpdate\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"fromAddress\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"toAddress\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"selector\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256[]\",\"name\":\"payload\",\"type\":\"uint256[]\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"nonce\",\"type\":\"uint256\"}],\"name\":\"MessageToL2Canceled\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"fromAddress\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"toAddress\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"selector\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256[]\",\"name\":\"payload\",\"type\":\"uint256[]\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"nonce\",\"type\":\"uint256\"}],\"name\":\"MessageToL2CancellationStarted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"changedBy\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"oldProgramHash\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"newProgramHash\",\"type\":\"uint256\"}],\"name\":\"ProgramHashChanged\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"toAddress\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"selector\",\"type\":\"uint256\"},{\"internalType\":\"uint256[]\",\"name\":\"payload\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256\",\"name\":\"nonce\",\"type\":\"uint256\"}],\"name\":\"cancelL1ToL2Message\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"configHash\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"fromAddress\",\"type\":\"uint256\"},{\"internalType\":\"uint256[]\",\"name\":\"payload\",\"type\":\"uint256[]\"}],\"name\":\"consumeMessageFromL2\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"finalize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getMaxL1MsgFee\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"identify\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"isFinalized\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"isFrozen\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"}],\"name\":\"isOperator\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"msgHash\",\"type\":\"bytes32\"}],\"name\":\"l1ToL2MessageCancellations\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"l1ToL2MessageNonce\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"msgHash\",\"type\":\"bytes32\"}],\"name\":\"l1ToL2Messages\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"msgHash\",\"type\":\"bytes32\"}],\"name\":\"l2ToL1Messages\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"messageCancellationDelay\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"programHash\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOperator\",\"type\":\"address\"}],\"name\":\"registerOperator\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"toAddress\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"selector\",\"type\":\"uint256\"},{\"internalType\":\"uint256[]\",\"name\":\"payload\",\"type\":\"uint256[]\"}],\"name\":\"sendMessageToL2\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"newConfigHash\",\"type\":\"uint256\"}],\"name\":\"setConfigHash\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"delayInSeconds\",\"type\":\"uint256\"}],\"name\":\"setMessageCancellationDelay\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"newProgramHash\",\"type\":\"uint256\"}],\"name\":\"setProgramHash\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"starknetAcceptGovernance\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"starknetCancelNomination\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"}],\"name\":\"starknetIsGovernor\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newGovernor\",\"type\":\"address\"}],\"name\":\"starknetNominateNewGovernor\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"governorForRemoval\",\"type\":\"address\"}],\"name\":\"starknetRemoveGovernor\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"toAddress\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"selector\",\"type\":\"uint256\"},{\"internalType\":\"uint256[]\",\"name\":\"payload\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256\",\"name\":\"nonce\",\"type\":\"uint256\"}],\"name\":\"startL1ToL2MessageCancellation\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"stateBlockHash\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"stateBlockNumber\",\"outputs\":[{\"internalType\":\"int256\",\"name\":\"\",\"type\":\"int256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"stateRoot\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"removedOperator\",\"type\":\"address\"}],\"name\":\"unregisterOperator\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256[]\",\"name\":\"programOutput\",\"type\":\"uint256[]\"}],\"name\":\"updateState\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"cancelL1ToL2Message(uint256,uint256,uint256[],uint256)\":{\"notice\":\"Cancels an L1 to L2 message, this function should be called at least messageCancellationDelay() seconds after the call to startL1ToL2MessageCancellation(). A message may only be cancelled by its sender. If the message is missing, the call will revert. Note that the message fee is not refunded.\"},\"consumeMessageFromL2(uint256,uint256[])\":{\"notice\":\"Consumes a message that was sent from an L2 contract. Returns the hash of the message.\"},\"getMaxL1MsgFee()\":{\"notice\":\"Returns the max fee (in Wei) that StarkNet will accept per single message.\"},\"identify()\":{\"notice\":\"Returns a string that identifies the contract.\"},\"l1ToL2MessageCancellations(bytes32)\":{\"notice\":\"Returns the timestamp at the time cancelL1ToL2Message was called with a message matching 'msgHash'. The function returns 0 if cancelL1ToL2Message was never called.\"},\"l1ToL2Messages(bytes32)\":{\"notice\":\"Returns the msg_fee + 1 for the message with the given 'msgHash', or 0 if no message with such a hash is pending.\"},\"sendMessageToL2(uint256,uint256,uint256[])\":{\"notice\":\"Sends a message to an L2 contract.\"},\"startL1ToL2MessageCancellation(uint256,uint256,uint256[],uint256)\":{\"notice\":\"Starts the cancellation of an L1 to L2 message. A message can be canceled messageCancellationDelay() seconds after this function is called. Note: This function may only be called for a message that is currently pending and the caller must be the sender of the that message.\"},\"stateBlockHash()\":{\"notice\":\"Returns the current block hash.\"},\"stateBlockNumber()\":{\"notice\":\"Returns the current block number.\"},\"stateRoot()\":{\"notice\":\"Returns the current state root.\"},\"updateState(uint256[])\":{\"notice\":\"Updates the state of the StarkNet, based on a proof of the StarkNet OS that the state transition is valid. Arguments: programOutput - The main part of the StarkNet OS program output. data_availability_fact - An encoding of the on-chain data associated with the 'programOutput'.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/StarknetValidium.sol\":\"Starknet\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[\":cairo-lang/=lib/cairo-lang/src/\",\":ds-test/=lib/forge-std/lib/ds-test/src/\",\":forge-std/=lib/forge-std/src/\",\":starknet-cc/=lib/cairo-lang/src/starkware/starknet/solidity/\",\":starknet-token/=lib/starknet-token/src/starkware/isd/\",\":starkware/isd/=lib/starknet-token/src/starkware/isd/\",\":starkware/solidity/=lib/cairo-lang/src/starkware/solidity/\"]},\"sources\":{\"lib/cairo-lang/src/starkware/solidity/components/Governance.sol\":{\"keccak256\":\"0xf95152fbacc9b6096be75c4a0f03bfc10b1a5d6219bd24ce61963b78d8ea4d7f\",\"license\":\"Apache-2.0.\",\"urls\":[\"bzz-raw://53814938c69e1ce9e911bacf16633ef2d555391e8dafd697fd7ee2f8b201c293\",\"dweb:/ipfs/QmVVXhKbDHLAnwmGHFBkRaMJ597PV4gdmHTxQFSVS7NiUu\"]},\"lib/cairo-lang/src/starkware/solidity/components/GovernedFinalizable.sol\":{\"keccak256\":\"0x99e7a7ce7494dffd1e29855ae193d8d8a8b1d8811dc5b4f65c11f53049f60718\",\"license\":\"Apache-2.0.\",\"urls\":[\"bzz-raw://82f5fb8443fdb206e0b161dd93ddd920e250fa29b1be7abc6999014cefdeb389\",\"dweb:/ipfs/QmYsdDfnxPc72HJANgRKNwdagWW3mzttrzMQ1T73abcVnx\"]},\"lib/cairo-lang/src/starkware/solidity/components/OnchainDataFactTreeEncoder.sol\":{\"keccak256\":\"0xb5fdb7ff413d7f06b0f62db39100f668fa2c89b22eb1232dd9b2b66b1df44490\",\"license\":\"Apache-2.0.\",\"urls\":[\"bzz-raw://a851defbca9032b49eae3bc5aae1f140c2ff45c8648ed56146cb738a80381a0c\",\"dweb:/ipfs/QmdKfzzP4zF5sdsZS74qo4o6YiGrWVCxzmeVj74rRnk8q4\"]},\"lib/cairo-lang/src/starkware/solidity/components/Operator.sol\":{\"keccak256\":\"0x9a6a1f3772861dc6d6645bd140bafa7f562fd630244316f754303e45a0b642b1\",\"license\":\"Apache-2.0.\",\"urls\":[\"bzz-raw://7aaf1f4d36727c33ba2c653ff1405cf4e1034ce274d87b6dfffcc1314eeac9d8\",\"dweb:/ipfs/QmYdpszZJkpZ3eybwTWx6ssWVSdTVKaEgoaPm42T1pKS36\"]},\"lib/cairo-lang/src/starkware/solidity/interfaces/BlockDirectCall.sol\":{\"keccak256\":\"0xe8d027bbe8defa2df3caded6a7c5149372475e16d5cbaee80d5b05d923536ff9\",\"license\":\"Apache-2.0.\",\"urls\":[\"bzz-raw://5f627a16e57292b1f58fad26970abb41c91be120da24712bbcd34a0b345b3f2d\",\"dweb:/ipfs/QmSk7WdEp1WwpHLZQdViuKJZ5E2C4w2YiFYKkKNiFPWc2E\"]},\"lib/cairo-lang/src/starkware/solidity/interfaces/ContractInitializer.sol\":{\"keccak256\":\"0x4899cc503a549113f495e45c1ca08a15c13f8f22d42468b1089f9279a41a9021\",\"license\":\"Apache-2.0.\",\"urls\":[\"bzz-raw://de484cf04271afc3b24a1cc0f37036a9707b6ff28efd69d9afe95d5b5bb0f4d4\",\"dweb:/ipfs/QmS2bNaTM2NpoiGZQH723z3zxtpZcfB8W5wXDTQKLqJzqM\"]},\"lib/cairo-lang/src/starkware/solidity/interfaces/IFactRegistry.sol\":{\"keccak256\":\"0xab04b296b506dfb0b4a8828f3dc463072fd50449a5ad8327d1baf01438b0fb35\",\"license\":\"Apache-2.0.\",\"urls\":[\"bzz-raw://e451abe007f98081d1adfd759cc4168f81982992d8c0554650b94d37bc009e64\",\"dweb:/ipfs/QmVBNUWFhNX8PqSMcqRkHVaTbcm7KNpgSg91Sj6MepFG6u\"]},\"lib/cairo-lang/src/starkware/solidity/interfaces/Identity.sol\":{\"keccak256\":\"0xe09f6920ecf39cfa9285164bfba092dc9fce892da3fb4e3839391b5c039c34ff\",\"license\":\"Apache-2.0.\",\"urls\":[\"bzz-raw://b68168b5efcfd7a269c1b50ca381776764ac460fe7be2354c1b2410a2c9676d5\",\"dweb:/ipfs/Qmagk5UEjwWkqMczGvxa3V2fG2h4779MbXZ23i5U98gMUo\"]},\"lib/cairo-lang/src/starkware/solidity/interfaces/MGovernance.sol\":{\"keccak256\":\"0x02dc54c223e2977a13a3e12bb60659598ce2c56bc8df3a27d8bb8e761c676c67\",\"license\":\"Apache-2.0.\",\"urls\":[\"bzz-raw://eff35423c5dc96cf0d223517c9eaca3dc028fbd8be9ec3f989299c6db8e8c5b2\",\"dweb:/ipfs/QmfDR7Yoq5Lz3zLLSj2jXoSojPYTrWp4HYhGRtXus4t1G6\"]},\"lib/cairo-lang/src/starkware/solidity/interfaces/MOperator.sol\":{\"keccak256\":\"0x00417855444c25ec8e3b119775a0f2c7407bffbf5db69a8347ce6313cda84bdf\",\"license\":\"Apache-2.0.\",\"urls\":[\"bzz-raw://0922504dd6f7d7c8011d26953b5e12a02b5af0f4308e17ea508b45686c4bd5aa\",\"dweb:/ipfs/QmcwebQGm1yLuhEYy2VnuR9vB9eWZJPRTTMWRxE3EXW43B\"]},\"lib/cairo-lang/src/starkware/solidity/interfaces/ProxySupport.sol\":{\"keccak256\":\"0xc2253392af4d0d80c55d8b45af6700353cc66a4633c931ee53f9485178758b7a\",\"license\":\"Apache-2.0.\",\"urls\":[\"bzz-raw://14c96384bd0a2924abd78fbdfbfcb9e3dc6a6ba4e26778cf18ceeb5e9ffdc758\",\"dweb:/ipfs/QmbXxostCT9v3fnH4Ao9tGcHY7A6i4KvsR7JrcNBNM8XPe\"]},\"lib/cairo-lang/src/starkware/solidity/libraries/Addresses.sol\":{\"keccak256\":\"0x05016ed8cfde52acab00e22bb6ad741b8c0a6d0c8e358b87e275314e22f64461\",\"license\":\"Apache-2.0.\",\"urls\":[\"bzz-raw://632b9cd4f05f3ce39b5cdf5d20aa68b8800c4e292fe49dd6e86ffca7bc3a75e6\",\"dweb:/ipfs/QmUnJbZSJ23yEoemcsDwaus214uymAVS1LkyGdRPvZJfnZ\"]},\"lib/cairo-lang/src/starkware/solidity/libraries/NamedStorage.sol\":{\"keccak256\":\"0x014ba48551c965e42b7e8f2e22f6f5f559f1ecaa6b1ce2dbf965e2b9808514ee\",\"license\":\"Apache-2.0.\",\"urls\":[\"bzz-raw://fb77540fd0d17b382d61e597862b29d164256f7224f0f39a534d2e1c3c161140\",\"dweb:/ipfs/QmYCombekr8CQvCCjBDFVniNCnreg9Z2TT78ZjdS3FGNsk\"]},\"lib/cairo-lang/src/starkware/starknet/solidity/IStarknetMessaging.sol\":{\"keccak256\":\"0x75d3dad61854e3115a97fa314066cd3ff4544fa712bea1a6595bbac7ef8e92f8\",\"license\":\"Apache-2.0.\",\"urls\":[\"bzz-raw://d5a07d8e15bfba827443a9f79f0465f1e24df4960a581754c6139964b56124c5\",\"dweb:/ipfs/QmUqBMSiC8b3T6L6mRFcxR83ByHK1q2KVo3nCoKsph8DJH\"]},\"lib/cairo-lang/src/starkware/starknet/solidity/IStarknetMessagingEvents.sol\":{\"keccak256\":\"0xfeac71f229049b84eb47fbdae456f9de2074016828a4529e00abd4eddc8bb844\",\"license\":\"Apache-2.0.\",\"urls\":[\"bzz-raw://c9acd4424ec21178670c3b1793f2f8d2c4d59ff0f22063ba5f60100f18f47b95\",\"dweb:/ipfs/QmTHjQARTTVRFnCeThphAVocQYSk2hXCYT2yDr6TmZccJP\"]},\"lib/cairo-lang/src/starkware/starknet/solidity/Output.sol\":{\"keccak256\":\"0x2ac3d70a983a64285d80a86e9d7aa54512b24975610331de72f097e66e62e518\",\"license\":\"Apache-2.0.\",\"urls\":[\"bzz-raw://b976a5bb24ba56e038fc3f9700c6cddf8d0c555fa2be5cd74db59cc26b8b25c0\",\"dweb:/ipfs/QmPCQPDJNmZZtpXHMm31gJz9CJshKgMviSQAXJ5V62dvbL\"]},\"lib/cairo-lang/src/starkware/starknet/solidity/StarknetGovernance.sol\":{\"keccak256\":\"0x8cbfaa3158fb569adc4cc2ac4b7c1045cce0eb180b365ecfaf2aec82f53d1ffe\",\"license\":\"Apache-2.0.\",\"urls\":[\"bzz-raw://196f9b478b3e766db7621bf6699a22cdab262203de63eed0ea29dfd614ef13d2\",\"dweb:/ipfs/QmeqGnZwcMHEHWwT4XzENy85XtFLty2y6j3o5k3JRYTpqm\"]},\"lib/cairo-lang/src/starkware/starknet/solidity/StarknetMessaging.sol\":{\"keccak256\":\"0xbab7ad137660d819316cdc502cd96b82db5ede18f580e7750bfd3ea4e65eb4fb\",\"license\":\"Apache-2.0.\",\"urls\":[\"bzz-raw://8bc3f628c8967f5179c604e77bd0cf9ad9ce9379240c130d50b38c713d6c3c21\",\"dweb:/ipfs/QmQXs5AzAbxxY6jicFNoHMepF5iAz2QppCjyZQjQZRy41J\"]},\"lib/cairo-lang/src/starkware/starknet/solidity/StarknetOperator.sol\":{\"keccak256\":\"0x2c1bdc4010e7b07a344336f1145cf8bedaced48fbfe91d065d185a2205ec3244\",\"license\":\"Apache-2.0.\",\"urls\":[\"bzz-raw://9847d7ee4b5eff9513ab3df92e3b00e16c67ddbd6e5affbc855cab3b9b9ab4ac\",\"dweb:/ipfs/QmXaKMszDZJFtCa9ujwMeAZd1FcUM68BHsXe1s5VZLSWPh\"]},\"lib/cairo-lang/src/starkware/starknet/solidity/StarknetState.sol\":{\"keccak256\":\"0x98689b355b5758e590f3b5611b6df41e87b04202ab5457127e35b030af905b4f\",\"license\":\"Apache-2.0.\",\"urls\":[\"bzz-raw://9ddafb29225921f0f985d654e634b077161fb298d6f23891ab6042e243b95233\",\"dweb:/ipfs/QmPMvx7j8SJe8tqw3cUNwDt2tiStSaz6y59cHGN7GgE6Rm\"]},\"src/StarknetValidium.sol\":{\"keccak256\":\"0xc764b87700d3e383c229e490e6b0d0167ba1f462c64597c24eff3c204185baab\",\"license\":\"Apache-2.0.\",\"urls\":[\"bzz-raw://9463375e63cc69c072ef952511973fa1d0ecdc8e8628d214a8970d4d1b8d4d14\",\"dweb:/ipfs/Qmd39hmPc8N11Ybb3auAxq6P5pcM7AgqmExbDTjaQPFx2Z\"]}},\"version\":1}", - "metadata": { - "compiler": { - "version": "0.6.12+commit.27d51765" - }, - "language": "Solidity", - "output": { - "abi": [ - { - "inputs": [ - { - "internalType": "address", - "name": "changedBy", - "type": "address", - "indexed": true - }, - { - "internalType": "uint256", - "name": "oldConfigHash", - "type": "uint256", - "indexed": false - }, - { - "internalType": "uint256", - "name": "newConfigHash", - "type": "uint256", - "indexed": false - } - ], - "type": "event", - "name": "ConfigHashChanged", - "anonymous": false - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "fromAddress", - "type": "uint256", - "indexed": true - }, - { - "internalType": "address", - "name": "toAddress", - "type": "address", - "indexed": true - }, - { - "internalType": "uint256[]", - "name": "payload", - "type": "uint256[]", - "indexed": false - } - ], - "type": "event", - "name": "ConsumedMessageToL1", - "anonymous": false - }, - { - "inputs": [ - { - "internalType": "address", - "name": "fromAddress", - "type": "address", - "indexed": true - }, - { - "internalType": "uint256", - "name": "toAddress", - "type": "uint256", - "indexed": true - }, - { - "internalType": "uint256", - "name": "selector", - "type": "uint256", - "indexed": true - }, - { - "internalType": "uint256[]", - "name": "payload", - "type": "uint256[]", - "indexed": false - }, - { - "internalType": "uint256", - "name": "nonce", - "type": "uint256", - "indexed": false - } - ], - "type": "event", - "name": "ConsumedMessageToL2", - "anonymous": false - }, - { - "inputs": [], - "type": "event", - "name": "Finalized", - "anonymous": false - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "fromAddress", - "type": "uint256", - "indexed": true - }, - { - "internalType": "address", - "name": "toAddress", - "type": "address", - "indexed": true - }, - { - "internalType": "uint256[]", - "name": "payload", - "type": "uint256[]", - "indexed": false - } - ], - "type": "event", - "name": "LogMessageToL1", - "anonymous": false - }, - { - "inputs": [ - { - "internalType": "address", - "name": "fromAddress", - "type": "address", - "indexed": true - }, - { - "internalType": "uint256", - "name": "toAddress", - "type": "uint256", - "indexed": true - }, - { - "internalType": "uint256", - "name": "selector", - "type": "uint256", - "indexed": true - }, - { - "internalType": "uint256[]", - "name": "payload", - "type": "uint256[]", - "indexed": false - }, - { - "internalType": "uint256", - "name": "nonce", - "type": "uint256", - "indexed": false - }, - { - "internalType": "uint256", - "name": "fee", - "type": "uint256", - "indexed": false - } - ], - "type": "event", - "name": "LogMessageToL2", - "anonymous": false - }, - { - "inputs": [ - { - "internalType": "address", - "name": "acceptedGovernor", - "type": "address", - "indexed": false - } - ], - "type": "event", - "name": "LogNewGovernorAccepted", - "anonymous": false - }, - { - "inputs": [ - { - "internalType": "address", - "name": "nominatedGovernor", - "type": "address", - "indexed": false - } - ], - "type": "event", - "name": "LogNominatedGovernor", - "anonymous": false - }, - { - "inputs": [], - "type": "event", - "name": "LogNominationCancelled", - "anonymous": false - }, - { - "inputs": [ - { - "internalType": "address", - "name": "operator", - "type": "address", - "indexed": false - } - ], - "type": "event", - "name": "LogOperatorAdded", - "anonymous": false - }, - { - "inputs": [ - { - "internalType": "address", - "name": "operator", - "type": "address", - "indexed": false - } - ], - "type": "event", - "name": "LogOperatorRemoved", - "anonymous": false - }, - { - "inputs": [ - { - "internalType": "address", - "name": "removedGovernor", - "type": "address", - "indexed": false - } - ], - "type": "event", - "name": "LogRemovedGovernor", - "anonymous": false - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "stateTransitionFact", - "type": "bytes32", - "indexed": false - } - ], - "type": "event", - "name": "LogStateTransitionFact", - "anonymous": false - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "globalRoot", - "type": "uint256", - "indexed": false - }, - { - "internalType": "int256", - "name": "blockNumber", - "type": "int256", - "indexed": false - }, - { - "internalType": "uint256", - "name": "blockHash", - "type": "uint256", - "indexed": false - } - ], - "type": "event", - "name": "LogStateUpdate", - "anonymous": false - }, - { - "inputs": [ - { - "internalType": "address", - "name": "fromAddress", - "type": "address", - "indexed": true - }, - { - "internalType": "uint256", - "name": "toAddress", - "type": "uint256", - "indexed": true - }, - { - "internalType": "uint256", - "name": "selector", - "type": "uint256", - "indexed": true - }, - { - "internalType": "uint256[]", - "name": "payload", - "type": "uint256[]", - "indexed": false - }, - { - "internalType": "uint256", - "name": "nonce", - "type": "uint256", - "indexed": false - } - ], - "type": "event", - "name": "MessageToL2Canceled", - "anonymous": false - }, - { - "inputs": [ - { - "internalType": "address", - "name": "fromAddress", - "type": "address", - "indexed": true - }, - { - "internalType": "uint256", - "name": "toAddress", - "type": "uint256", - "indexed": true - }, - { - "internalType": "uint256", - "name": "selector", - "type": "uint256", - "indexed": true - }, - { - "internalType": "uint256[]", - "name": "payload", - "type": "uint256[]", - "indexed": false - }, - { - "internalType": "uint256", - "name": "nonce", - "type": "uint256", - "indexed": false - } - ], - "type": "event", - "name": "MessageToL2CancellationStarted", - "anonymous": false - }, - { - "inputs": [ - { - "internalType": "address", - "name": "changedBy", - "type": "address", - "indexed": true - }, - { - "internalType": "uint256", - "name": "oldProgramHash", - "type": "uint256", - "indexed": false - }, - { - "internalType": "uint256", - "name": "newProgramHash", - "type": "uint256", - "indexed": false - } - ], - "type": "event", - "name": "ProgramHashChanged", - "anonymous": false - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "toAddress", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "selector", - "type": "uint256" - }, - { - "internalType": "uint256[]", - "name": "payload", - "type": "uint256[]" - }, - { - "internalType": "uint256", - "name": "nonce", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function", - "name": "cancelL1ToL2Message", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ] - }, - { - "inputs": [], - "stateMutability": "view", - "type": "function", - "name": "configHash", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ] - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "fromAddress", - "type": "uint256" - }, - { - "internalType": "uint256[]", - "name": "payload", - "type": "uint256[]" - } - ], - "stateMutability": "nonpayable", - "type": "function", - "name": "consumeMessageFromL2", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ] - }, - { - "inputs": [], - "stateMutability": "nonpayable", - "type": "function", - "name": "finalize" - }, - { - "inputs": [], - "stateMutability": "pure", - "type": "function", - "name": "getMaxL1MsgFee", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ] - }, - { - "inputs": [], - "stateMutability": "pure", - "type": "function", - "name": "identify", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ] - }, - { - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "stateMutability": "nonpayable", - "type": "function", - "name": "initialize" - }, - { - "inputs": [], - "stateMutability": "view", - "type": "function", - "name": "isFinalized", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ] - }, - { - "inputs": [], - "stateMutability": "view", - "type": "function", - "name": "isFrozen", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ] - }, - { - "inputs": [ - { - "internalType": "address", - "name": "user", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function", - "name": "isOperator", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ] - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "msgHash", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function", - "name": "l1ToL2MessageCancellations", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ] - }, - { - "inputs": [], - "stateMutability": "view", - "type": "function", - "name": "l1ToL2MessageNonce", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ] - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "msgHash", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function", - "name": "l1ToL2Messages", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ] - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "msgHash", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function", - "name": "l2ToL1Messages", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ] - }, - { - "inputs": [], - "stateMutability": "view", - "type": "function", - "name": "messageCancellationDelay", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ] - }, - { - "inputs": [], - "stateMutability": "view", - "type": "function", - "name": "programHash", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ] - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newOperator", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "function", - "name": "registerOperator" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "toAddress", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "selector", - "type": "uint256" - }, - { - "internalType": "uint256[]", - "name": "payload", - "type": "uint256[]" - } - ], - "stateMutability": "payable", - "type": "function", - "name": "sendMessageToL2", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ] - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "newConfigHash", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function", - "name": "setConfigHash" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "delayInSeconds", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function", - "name": "setMessageCancellationDelay" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "newProgramHash", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function", - "name": "setProgramHash" - }, - { - "inputs": [], - "stateMutability": "nonpayable", - "type": "function", - "name": "starknetAcceptGovernance" - }, - { - "inputs": [], - "stateMutability": "nonpayable", - "type": "function", - "name": "starknetCancelNomination" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "user", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function", - "name": "starknetIsGovernor", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ] - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newGovernor", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "function", - "name": "starknetNominateNewGovernor" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "governorForRemoval", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "function", - "name": "starknetRemoveGovernor" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "toAddress", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "selector", - "type": "uint256" - }, - { - "internalType": "uint256[]", - "name": "payload", - "type": "uint256[]" - }, - { - "internalType": "uint256", - "name": "nonce", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function", - "name": "startL1ToL2MessageCancellation", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ] - }, - { - "inputs": [], - "stateMutability": "view", - "type": "function", - "name": "stateBlockHash", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ] - }, - { - "inputs": [], - "stateMutability": "view", - "type": "function", - "name": "stateBlockNumber", - "outputs": [ - { - "internalType": "int256", - "name": "", - "type": "int256" - } - ] - }, - { - "inputs": [], - "stateMutability": "view", - "type": "function", - "name": "stateRoot", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ] - }, - { - "inputs": [ - { - "internalType": "address", - "name": "removedOperator", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "function", - "name": "unregisterOperator" - }, - { - "inputs": [ - { - "internalType": "uint256[]", - "name": "programOutput", - "type": "uint256[]" - } - ], - "stateMutability": "nonpayable", - "type": "function", - "name": "updateState" - } - ], - "devdoc": { - "kind": "dev", - "methods": {}, - "version": 1 - }, - "userdoc": { - "kind": "user", - "methods": { - "cancelL1ToL2Message(uint256,uint256,uint256[],uint256)": { - "notice": "Cancels an L1 to L2 message, this function should be called at least messageCancellationDelay() seconds after the call to startL1ToL2MessageCancellation(). A message may only be cancelled by its sender. If the message is missing, the call will revert. Note that the message fee is not refunded." - }, - "consumeMessageFromL2(uint256,uint256[])": { - "notice": "Consumes a message that was sent from an L2 contract. Returns the hash of the message." - }, - "getMaxL1MsgFee()": { - "notice": "Returns the max fee (in Wei) that StarkNet will accept per single message." - }, - "identify()": { - "notice": "Returns a string that identifies the contract." - }, - "l1ToL2MessageCancellations(bytes32)": { - "notice": "Returns the timestamp at the time cancelL1ToL2Message was called with a message matching 'msgHash'. The function returns 0 if cancelL1ToL2Message was never called." - }, - "l1ToL2Messages(bytes32)": { - "notice": "Returns the msg_fee + 1 for the message with the given 'msgHash', or 0 if no message with such a hash is pending." - }, - "sendMessageToL2(uint256,uint256,uint256[])": { - "notice": "Sends a message to an L2 contract." - }, - "startL1ToL2MessageCancellation(uint256,uint256,uint256[],uint256)": { - "notice": "Starts the cancellation of an L1 to L2 message. A message can be canceled messageCancellationDelay() seconds after this function is called. Note: This function may only be called for a message that is currently pending and the caller must be the sender of the that message." - }, - "stateBlockHash()": { - "notice": "Returns the current block hash." - }, - "stateBlockNumber()": { - "notice": "Returns the current block number." - }, - "stateRoot()": { - "notice": "Returns the current state root." - }, - "updateState(uint256[])": { - "notice": "Updates the state of the StarkNet, based on a proof of the StarkNet OS that the state transition is valid. Arguments: programOutput - The main part of the StarkNet OS program output. data_availability_fact - An encoding of the on-chain data associated with the 'programOutput'." - } - }, - "version": 1 - } - }, - "settings": { - "remappings": [ - "cairo-lang/=lib/cairo-lang/src/", - "ds-test/=lib/forge-std/lib/ds-test/src/", - "forge-std/=lib/forge-std/src/", - "starknet-cc/=lib/cairo-lang/src/starkware/starknet/solidity/", - "starknet-token/=lib/starknet-token/src/starkware/isd/", - "starkware/isd/=lib/starknet-token/src/starkware/isd/", - "starkware/solidity/=lib/cairo-lang/src/starkware/solidity/" - ], - "optimizer": { - "enabled": true, - "runs": 200 - }, - "metadata": { - "bytecodeHash": "ipfs" - }, - "compilationTarget": { - "src/StarknetValidium.sol": "Starknet" - }, - "libraries": {} - }, - "sources": { - "lib/cairo-lang/src/starkware/solidity/components/Governance.sol": { - "keccak256": "0xf95152fbacc9b6096be75c4a0f03bfc10b1a5d6219bd24ce61963b78d8ea4d7f", - "urls": [ - "bzz-raw://53814938c69e1ce9e911bacf16633ef2d555391e8dafd697fd7ee2f8b201c293", - "dweb:/ipfs/QmVVXhKbDHLAnwmGHFBkRaMJ597PV4gdmHTxQFSVS7NiUu" - ], - "license": "Apache-2.0." - }, - "lib/cairo-lang/src/starkware/solidity/components/GovernedFinalizable.sol": { - "keccak256": "0x99e7a7ce7494dffd1e29855ae193d8d8a8b1d8811dc5b4f65c11f53049f60718", - "urls": [ - "bzz-raw://82f5fb8443fdb206e0b161dd93ddd920e250fa29b1be7abc6999014cefdeb389", - "dweb:/ipfs/QmYsdDfnxPc72HJANgRKNwdagWW3mzttrzMQ1T73abcVnx" - ], - "license": "Apache-2.0." - }, - "lib/cairo-lang/src/starkware/solidity/components/OnchainDataFactTreeEncoder.sol": { - "keccak256": "0xb5fdb7ff413d7f06b0f62db39100f668fa2c89b22eb1232dd9b2b66b1df44490", - "urls": [ - "bzz-raw://a851defbca9032b49eae3bc5aae1f140c2ff45c8648ed56146cb738a80381a0c", - "dweb:/ipfs/QmdKfzzP4zF5sdsZS74qo4o6YiGrWVCxzmeVj74rRnk8q4" - ], - "license": "Apache-2.0." - }, - "lib/cairo-lang/src/starkware/solidity/components/Operator.sol": { - "keccak256": "0x9a6a1f3772861dc6d6645bd140bafa7f562fd630244316f754303e45a0b642b1", - "urls": [ - "bzz-raw://7aaf1f4d36727c33ba2c653ff1405cf4e1034ce274d87b6dfffcc1314eeac9d8", - "dweb:/ipfs/QmYdpszZJkpZ3eybwTWx6ssWVSdTVKaEgoaPm42T1pKS36" - ], - "license": "Apache-2.0." - }, - "lib/cairo-lang/src/starkware/solidity/interfaces/BlockDirectCall.sol": { - "keccak256": "0xe8d027bbe8defa2df3caded6a7c5149372475e16d5cbaee80d5b05d923536ff9", - "urls": [ - "bzz-raw://5f627a16e57292b1f58fad26970abb41c91be120da24712bbcd34a0b345b3f2d", - "dweb:/ipfs/QmSk7WdEp1WwpHLZQdViuKJZ5E2C4w2YiFYKkKNiFPWc2E" - ], - "license": "Apache-2.0." - }, - "lib/cairo-lang/src/starkware/solidity/interfaces/ContractInitializer.sol": { - "keccak256": "0x4899cc503a549113f495e45c1ca08a15c13f8f22d42468b1089f9279a41a9021", - "urls": [ - "bzz-raw://de484cf04271afc3b24a1cc0f37036a9707b6ff28efd69d9afe95d5b5bb0f4d4", - "dweb:/ipfs/QmS2bNaTM2NpoiGZQH723z3zxtpZcfB8W5wXDTQKLqJzqM" - ], - "license": "Apache-2.0." - }, - "lib/cairo-lang/src/starkware/solidity/interfaces/IFactRegistry.sol": { - "keccak256": "0xab04b296b506dfb0b4a8828f3dc463072fd50449a5ad8327d1baf01438b0fb35", - "urls": [ - "bzz-raw://e451abe007f98081d1adfd759cc4168f81982992d8c0554650b94d37bc009e64", - "dweb:/ipfs/QmVBNUWFhNX8PqSMcqRkHVaTbcm7KNpgSg91Sj6MepFG6u" - ], - "license": "Apache-2.0." - }, - "lib/cairo-lang/src/starkware/solidity/interfaces/Identity.sol": { - "keccak256": "0xe09f6920ecf39cfa9285164bfba092dc9fce892da3fb4e3839391b5c039c34ff", - "urls": [ - "bzz-raw://b68168b5efcfd7a269c1b50ca381776764ac460fe7be2354c1b2410a2c9676d5", - "dweb:/ipfs/Qmagk5UEjwWkqMczGvxa3V2fG2h4779MbXZ23i5U98gMUo" - ], - "license": "Apache-2.0." - }, - "lib/cairo-lang/src/starkware/solidity/interfaces/MGovernance.sol": { - "keccak256": "0x02dc54c223e2977a13a3e12bb60659598ce2c56bc8df3a27d8bb8e761c676c67", - "urls": [ - "bzz-raw://eff35423c5dc96cf0d223517c9eaca3dc028fbd8be9ec3f989299c6db8e8c5b2", - "dweb:/ipfs/QmfDR7Yoq5Lz3zLLSj2jXoSojPYTrWp4HYhGRtXus4t1G6" - ], - "license": "Apache-2.0." - }, - "lib/cairo-lang/src/starkware/solidity/interfaces/MOperator.sol": { - "keccak256": "0x00417855444c25ec8e3b119775a0f2c7407bffbf5db69a8347ce6313cda84bdf", - "urls": [ - "bzz-raw://0922504dd6f7d7c8011d26953b5e12a02b5af0f4308e17ea508b45686c4bd5aa", - "dweb:/ipfs/QmcwebQGm1yLuhEYy2VnuR9vB9eWZJPRTTMWRxE3EXW43B" - ], - "license": "Apache-2.0." - }, - "lib/cairo-lang/src/starkware/solidity/interfaces/ProxySupport.sol": { - "keccak256": "0xc2253392af4d0d80c55d8b45af6700353cc66a4633c931ee53f9485178758b7a", - "urls": [ - "bzz-raw://14c96384bd0a2924abd78fbdfbfcb9e3dc6a6ba4e26778cf18ceeb5e9ffdc758", - "dweb:/ipfs/QmbXxostCT9v3fnH4Ao9tGcHY7A6i4KvsR7JrcNBNM8XPe" - ], - "license": "Apache-2.0." - }, - "lib/cairo-lang/src/starkware/solidity/libraries/Addresses.sol": { - "keccak256": "0x05016ed8cfde52acab00e22bb6ad741b8c0a6d0c8e358b87e275314e22f64461", - "urls": [ - "bzz-raw://632b9cd4f05f3ce39b5cdf5d20aa68b8800c4e292fe49dd6e86ffca7bc3a75e6", - "dweb:/ipfs/QmUnJbZSJ23yEoemcsDwaus214uymAVS1LkyGdRPvZJfnZ" - ], - "license": "Apache-2.0." - }, - "lib/cairo-lang/src/starkware/solidity/libraries/NamedStorage.sol": { - "keccak256": "0x014ba48551c965e42b7e8f2e22f6f5f559f1ecaa6b1ce2dbf965e2b9808514ee", - "urls": [ - "bzz-raw://fb77540fd0d17b382d61e597862b29d164256f7224f0f39a534d2e1c3c161140", - "dweb:/ipfs/QmYCombekr8CQvCCjBDFVniNCnreg9Z2TT78ZjdS3FGNsk" - ], - "license": "Apache-2.0." - }, - "lib/cairo-lang/src/starkware/starknet/solidity/IStarknetMessaging.sol": { - "keccak256": "0x75d3dad61854e3115a97fa314066cd3ff4544fa712bea1a6595bbac7ef8e92f8", - "urls": [ - "bzz-raw://d5a07d8e15bfba827443a9f79f0465f1e24df4960a581754c6139964b56124c5", - "dweb:/ipfs/QmUqBMSiC8b3T6L6mRFcxR83ByHK1q2KVo3nCoKsph8DJH" - ], - "license": "Apache-2.0." - }, - "lib/cairo-lang/src/starkware/starknet/solidity/IStarknetMessagingEvents.sol": { - "keccak256": "0xfeac71f229049b84eb47fbdae456f9de2074016828a4529e00abd4eddc8bb844", - "urls": [ - "bzz-raw://c9acd4424ec21178670c3b1793f2f8d2c4d59ff0f22063ba5f60100f18f47b95", - "dweb:/ipfs/QmTHjQARTTVRFnCeThphAVocQYSk2hXCYT2yDr6TmZccJP" - ], - "license": "Apache-2.0." - }, - "lib/cairo-lang/src/starkware/starknet/solidity/Output.sol": { - "keccak256": "0x2ac3d70a983a64285d80a86e9d7aa54512b24975610331de72f097e66e62e518", - "urls": [ - "bzz-raw://b976a5bb24ba56e038fc3f9700c6cddf8d0c555fa2be5cd74db59cc26b8b25c0", - "dweb:/ipfs/QmPCQPDJNmZZtpXHMm31gJz9CJshKgMviSQAXJ5V62dvbL" - ], - "license": "Apache-2.0." - }, - "lib/cairo-lang/src/starkware/starknet/solidity/StarknetGovernance.sol": { - "keccak256": "0x8cbfaa3158fb569adc4cc2ac4b7c1045cce0eb180b365ecfaf2aec82f53d1ffe", - "urls": [ - "bzz-raw://196f9b478b3e766db7621bf6699a22cdab262203de63eed0ea29dfd614ef13d2", - "dweb:/ipfs/QmeqGnZwcMHEHWwT4XzENy85XtFLty2y6j3o5k3JRYTpqm" - ], - "license": "Apache-2.0." - }, - "lib/cairo-lang/src/starkware/starknet/solidity/StarknetMessaging.sol": { - "keccak256": "0xbab7ad137660d819316cdc502cd96b82db5ede18f580e7750bfd3ea4e65eb4fb", - "urls": [ - "bzz-raw://8bc3f628c8967f5179c604e77bd0cf9ad9ce9379240c130d50b38c713d6c3c21", - "dweb:/ipfs/QmQXs5AzAbxxY6jicFNoHMepF5iAz2QppCjyZQjQZRy41J" - ], - "license": "Apache-2.0." - }, - "lib/cairo-lang/src/starkware/starknet/solidity/StarknetOperator.sol": { - "keccak256": "0x2c1bdc4010e7b07a344336f1145cf8bedaced48fbfe91d065d185a2205ec3244", - "urls": [ - "bzz-raw://9847d7ee4b5eff9513ab3df92e3b00e16c67ddbd6e5affbc855cab3b9b9ab4ac", - "dweb:/ipfs/QmXaKMszDZJFtCa9ujwMeAZd1FcUM68BHsXe1s5VZLSWPh" - ], - "license": "Apache-2.0." - }, - "lib/cairo-lang/src/starkware/starknet/solidity/StarknetState.sol": { - "keccak256": "0x98689b355b5758e590f3b5611b6df41e87b04202ab5457127e35b030af905b4f", - "urls": [ - "bzz-raw://9ddafb29225921f0f985d654e634b077161fb298d6f23891ab6042e243b95233", - "dweb:/ipfs/QmPMvx7j8SJe8tqw3cUNwDt2tiStSaz6y59cHGN7GgE6Rm" - ], - "license": "Apache-2.0." - }, - "src/StarknetValidium.sol": { - "keccak256": "0xc764b87700d3e383c229e490e6b0d0167ba1f462c64597c24eff3c204185baab", - "urls": [ - "bzz-raw://9463375e63cc69c072ef952511973fa1d0ecdc8e8628d214a8970d4d1b8d4d14", - "dweb:/ipfs/Qmd39hmPc8N11Ybb3auAxq6P5pcM7AgqmExbDTjaQPFx2Z" - ], - "license": "Apache-2.0." - } - }, - "version": 1 - }, - "ast": { - "absolutePath": "src/StarknetValidium.sol", - "id": 31651, - "exportedSymbols": { - "Starknet": [31650] - }, - "nodeType": "SourceUnit", - "src": "40:7828:37", - "nodes": [ - { - "id": 31173, - "nodeType": "PragmaDirective", - "src": "40:24:37", - "nodes": [], - "literals": ["solidity", "^", "0.6", ".12"] - }, - { - "id": 31174, - "nodeType": "PragmaDirective", - "src": "65:33:37", - "nodes": [], - "literals": ["experimental", "ABIEncoderV2"] - }, - { - "id": 31175, - "nodeType": "ImportDirective", - "src": "100:32:37", - "nodes": [], - "absolutePath": "lib/cairo-lang/src/starkware/starknet/solidity/Output.sol", - "file": "starknet-cc/Output.sol", - "scope": 31651, - "sourceUnit": 1654, - "symbolAliases": [], - "unitAlias": "" - }, - { - "id": 31176, - "nodeType": "ImportDirective", - "src": "133:44:37", - "nodes": [], - "absolutePath": "lib/cairo-lang/src/starkware/starknet/solidity/StarknetGovernance.sol", - "file": "starknet-cc/StarknetGovernance.sol", - "scope": 31651, - "sourceUnit": 1726, - "symbolAliases": [], - "unitAlias": "" - }, - { - "id": 31177, - "nodeType": "ImportDirective", - "src": "178:43:37", - "nodes": [], - "absolutePath": "lib/cairo-lang/src/starkware/starknet/solidity/StarknetMessaging.sol", - "file": "starknet-cc/StarknetMessaging.sol", - "scope": 31651, - "sourceUnit": 2201, - "symbolAliases": [], - "unitAlias": "" - }, - { - "id": 31178, - "nodeType": "ImportDirective", - "src": "222:42:37", - "nodes": [], - "absolutePath": "lib/cairo-lang/src/starkware/starknet/solidity/StarknetOperator.sol", - "file": "starknet-cc/StarknetOperator.sol", - "scope": 31651, - "sourceUnit": 2225, - "symbolAliases": [], - "unitAlias": "" - }, - { - "id": 31179, - "nodeType": "ImportDirective", - "src": "265:39:37", - "nodes": [], - "absolutePath": "lib/cairo-lang/src/starkware/starknet/solidity/StarknetState.sol", - "file": "starknet-cc/StarknetState.sol", - "scope": 31651, - "sourceUnit": 2334, - "symbolAliases": [], - "unitAlias": "" - }, - { - "id": 31180, - "nodeType": "ImportDirective", - "src": "305:63:37", - "nodes": [], - "absolutePath": "lib/cairo-lang/src/starkware/solidity/components/GovernedFinalizable.sol", - "file": "starkware/solidity/components/GovernedFinalizable.sol", - "scope": 31651, - "sourceUnit": 320, - "symbolAliases": [], - "unitAlias": "" - }, - { - "id": 31181, - "nodeType": "ImportDirective", - "src": "369:70:37", - "nodes": [], - "absolutePath": "lib/cairo-lang/src/starkware/solidity/components/OnchainDataFactTreeEncoder.sol", - "file": "starkware/solidity/components/OnchainDataFactTreeEncoder.sol", - "scope": 31651, - "sourceUnit": 382, - "symbolAliases": [], - "unitAlias": "" - }, - { - "id": 31182, - "nodeType": "ImportDirective", - "src": "440:63:37", - "nodes": [], - "absolutePath": "lib/cairo-lang/src/starkware/solidity/interfaces/ContractInitializer.sol", - "file": "starkware/solidity/interfaces/ContractInitializer.sol", - "scope": 31651, - "sourceUnit": 516, - "symbolAliases": [], - "unitAlias": "" - }, - { - "id": 31183, - "nodeType": "ImportDirective", - "src": "504:52:37", - "nodes": [], - "absolutePath": "lib/cairo-lang/src/starkware/solidity/interfaces/Identity.sol", - "file": "starkware/solidity/interfaces/Identity.sol", - "scope": 31651, - "sourceUnit": 534, - "symbolAliases": [], - "unitAlias": "" - }, - { - "id": 31184, - "nodeType": "ImportDirective", - "src": "557:57:37", - "nodes": [], - "absolutePath": "lib/cairo-lang/src/starkware/solidity/interfaces/IFactRegistry.sol", - "file": "starkware/solidity/interfaces/IFactRegistry.sol", - "scope": 31651, - "sourceUnit": 526, - "symbolAliases": [], - "unitAlias": "" - }, - { - "id": 31185, - "nodeType": "ImportDirective", - "src": "615:56:37", - "nodes": [], - "absolutePath": "lib/cairo-lang/src/starkware/solidity/interfaces/ProxySupport.sol", - "file": "starkware/solidity/interfaces/ProxySupport.sol", - "scope": 31651, - "sourceUnit": 774, - "symbolAliases": [], - "unitAlias": "" - }, - { - "id": 31186, - "nodeType": "ImportDirective", - "src": "672:55:37", - "nodes": [], - "absolutePath": "lib/cairo-lang/src/starkware/solidity/libraries/NamedStorage.sol", - "file": "starkware/solidity/libraries/NamedStorage.sol", - "scope": 31651, - "sourceUnit": 1107, - "symbolAliases": [], - "unitAlias": "" - }, - { - "id": 31650, - "nodeType": "ContractDefinition", - "src": "729:7138:37", - "nodes": [ - { - "id": 31203, - "nodeType": "UsingForDirective", - "src": "906:44:37", - "nodes": [], - "libraryName": { - "contractScope": null, - "id": 31201, - "name": "StarknetState", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 2333, - "src": "912:13:37", - "typeDescriptions": { - "typeIdentifier": "t_contract$_StarknetState_$2333", - "typeString": "library StarknetState" - } - }, - "typeName": { - "contractScope": null, - "id": 31202, - "name": "StarknetState.State", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 2234, - "src": "930:19:37", - "typeDescriptions": { - "typeIdentifier": "t_struct$_State_$2234_storage_ptr", - "typeString": "struct StarknetState.State" - } - } - }, - { - "id": 31211, - "nodeType": "EventDefinition", - "src": "1011:127:37", - "nodes": [], - "anonymous": false, - "documentation": null, - "name": "ConfigHashChanged", - "parameters": { - "id": 31210, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 31205, - "indexed": true, - "mutability": "mutable", - "name": "changedBy", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 31211, - "src": "1044:25:37", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 31204, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1044:7:37", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 31207, - "indexed": false, - "mutability": "mutable", - "name": "oldConfigHash", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 31211, - "src": "1079:21:37", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 31206, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1079:7:37", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 31209, - "indexed": false, - "mutability": "mutable", - "name": "newConfigHash", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 31211, - "src": "1110:21:37", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 31208, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1110:7:37", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1034:103:37" - } - }, - { - "id": 31219, - "nodeType": "EventDefinition", - "src": "1196:80:37", - "nodes": [], - "anonymous": false, - "documentation": null, - "name": "LogStateUpdate", - "parameters": { - "id": 31218, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 31213, - "indexed": false, - "mutability": "mutable", - "name": "globalRoot", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 31219, - "src": "1217:18:37", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 31212, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1217:7:37", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 31215, - "indexed": false, - "mutability": "mutable", - "name": "blockNumber", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 31219, - "src": "1237:18:37", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "typeName": { - "id": 31214, - "name": "int256", - "nodeType": "ElementaryTypeName", - "src": "1237:6:37", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 31217, - "indexed": false, - "mutability": "mutable", - "name": "blockHash", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 31219, - "src": "1257:17:37", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 31216, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1257:7:37", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1216:59:37" - } - }, - { - "id": 31223, - "nodeType": "EventDefinition", - "src": "1351:58:37", - "nodes": [], - "anonymous": false, - "documentation": null, - "name": "LogStateTransitionFact", - "parameters": { - "id": 31222, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 31221, - "indexed": false, - "mutability": "mutable", - "name": "stateTransitionFact", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 31223, - "src": "1380:27:37", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 31220, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "1380:7:37", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1379:29:37" - } - }, - { - "id": 31231, - "nodeType": "EventDefinition", - "src": "1474:130:37", - "nodes": [], - "anonymous": false, - "documentation": null, - "name": "ProgramHashChanged", - "parameters": { - "id": 31230, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 31225, - "indexed": true, - "mutability": "mutable", - "name": "changedBy", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 31231, - "src": "1508:25:37", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 31224, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1508:7:37", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 31227, - "indexed": false, - "mutability": "mutable", - "name": "oldProgramHash", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 31231, - "src": "1543:22:37", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 31226, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1543:7:37", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 31229, - "indexed": false, - "mutability": "mutable", - "name": "newProgramHash", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 31231, - "src": "1575:22:37", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 31228, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1575:7:37", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1498:105:37" - } - }, - { - "id": 31234, - "nodeType": "VariableDeclaration", - "src": "1643:81:37", - "nodes": [], - "constant": true, - "mutability": "constant", - "name": "PROGRAM_HASH_TAG", - "overrides": null, - "scope": 31650, - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 31232, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "1643:6:37", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": { - "argumentTypes": null, - "hexValue": "535441524b4e45545f312e305f494e49545f50524f4752414d5f484153485f55494e54", - "id": 31233, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1687:37:37", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_8cde0e99a4532474b22bd3952cb1c6b00478babd3678337325283f4f48110fc4", - "typeString": "literal_string \"STARKNET_1.0_INIT_PROGRAM_HASH_UINT\"" - }, - "value": "STARKNET_1.0_INIT_PROGRAM_HASH_UINT" - }, - "visibility": "internal" - }, - { - "id": 31237, - "nodeType": "VariableDeclaration", - "src": "1730:84:37", - "nodes": [], - "constant": true, - "mutability": "constant", - "name": "VERIFIER_ADDRESS_TAG", - "overrides": null, - "scope": 31650, - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 31235, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "1730:6:37", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": { - "argumentTypes": null, - "hexValue": "535441524b4e45545f312e305f494e49545f56455249464945525f41444452455353", - "id": 31236, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1778:36:37", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_04e7be39f2fb63cfd7d4fcfe19f108bc6b411ed972d99fca0a47dcaff878ce5e", - "typeString": "literal_string \"STARKNET_1.0_INIT_VERIFIER_ADDRESS\"" - }, - "value": "STARKNET_1.0_INIT_VERIFIER_ADDRESS" - }, - "visibility": "internal" - }, - { - "id": 31240, - "nodeType": "VariableDeclaration", - "src": "1820:85:37", - "nodes": [], - "constant": true, - "mutability": "constant", - "name": "STATE_STRUCT_TAG", - "overrides": null, - "scope": 31650, - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 31238, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "1820:6:37", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": { - "argumentTypes": null, - "hexValue": "535441524b4e45545f312e305f494e49545f535441524b4e45545f53544154455f535452554354", - "id": 31239, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1864:41:37", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_71a8ef1b1265359d77973c3524afac225c0a0d829a0d4da5cac3b34532019fec", - "typeString": "literal_string \"STARKNET_1.0_INIT_STARKNET_STATE_STRUCT\"" - }, - "value": "STARKNET_1.0_INIT_STARKNET_STATE_STRUCT" - }, - "visibility": "internal" - }, - { - "id": 31243, - "nodeType": "VariableDeclaration", - "src": "1952:78:37", - "nodes": [], - "constant": true, - "mutability": "constant", - "name": "CONFIG_HASH_TAG", - "overrides": null, - "scope": 31650, - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 31241, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "1952:6:37", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": { - "argumentTypes": null, - "hexValue": "535441524b4e45545f312e305f535441524b4e45545f434f4e4649475f48415348", - "id": 31242, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1995:35:37", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_b4c82a817c6e58e43d4ecb2529caab94383420d8f31e963cfe54dfe32d2cca56", - "typeString": "literal_string \"STARKNET_1.0_STARKNET_CONFIG_HASH\"" - }, - "value": "STARKNET_1.0_STARKNET_CONFIG_HASH" - }, - "visibility": "internal" - }, - { - "id": 31265, - "nodeType": "FunctionDefinition", - "src": "2037:205:37", - "nodes": [], - "body": { - "id": 31264, - "nodeType": "Block", - "src": "2122:120:37", - "nodes": [], - "statements": [ - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 31253, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -15, - "src": "2156:3:37", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 31254, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "2156:10:37", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 31255, - "name": "programHash", - "nodeType": "Identifier", - "overloadedDeclarations": [31312, 31325], - "referencedDeclaration": 31312, - "src": "2168:11:37", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 31256, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2168:13:37", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 31257, - "name": "newProgramHash", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 31245, - "src": "2183:14:37", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 31252, - "name": "ProgramHashChanged", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 31231, - "src": "2137:18:37", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$_t_uint256_$returns$__$", - "typeString": "function (address,uint256,uint256)" - } - }, - "id": 31258, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2137:61:37", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 31259, - "nodeType": "EmitStatement", - "src": "2132:66:37" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 31261, - "name": "newProgramHash", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 31245, - "src": "2220:14:37", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 31260, - "name": "programHash", - "nodeType": "Identifier", - "overloadedDeclarations": [31312, 31325], - "referencedDeclaration": 31325, - "src": "2208:11:37", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$returns$__$", - "typeString": "function (uint256)" - } - }, - "id": 31262, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2208:27:37", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 31263, - "nodeType": "ExpressionStatement", - "src": "2208:27:37" - } - ] - }, - "documentation": null, - "functionSelector": "e87e7332", - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 31248, - "modifierName": { - "argumentTypes": null, - "id": 31247, - "name": "notFinalized", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 300, - "src": "2094:12:37", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "2094:12:37" - }, - { - "arguments": null, - "id": 31250, - "modifierName": { - "argumentTypes": null, - "id": 31249, - "name": "onlyGovernance", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 554, - "src": "2107:14:37", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "2107:14:37" - } - ], - "name": "setProgramHash", - "overrides": null, - "parameters": { - "id": 31246, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 31245, - "mutability": "mutable", - "name": "newProgramHash", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 31265, - "src": "2061:22:37", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 31244, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2061:7:37", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2060:24:37" - }, - "returnParameters": { - "id": 31251, - "nodeType": "ParameterList", - "parameters": [], - "src": "2122:0:37" - }, - "scope": 31650, - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "external" - }, - { - "id": 31287, - "nodeType": "FunctionDefinition", - "src": "2248:198:37", - "nodes": [], - "body": { - "id": 31286, - "nodeType": "Block", - "src": "2331:115:37", - "nodes": [], - "statements": [ - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 31275, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -15, - "src": "2364:3:37", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 31276, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "2364:10:37", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 31277, - "name": "configHash", - "nodeType": "Identifier", - "overloadedDeclarations": [31349, 31360], - "referencedDeclaration": 31360, - "src": "2376:10:37", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 31278, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2376:12:37", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 31279, - "name": "newConfigHash", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 31267, - "src": "2390:13:37", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 31274, - "name": "ConfigHashChanged", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 31211, - "src": "2346:17:37", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$_t_uint256_$returns$__$", - "typeString": "function (address,uint256,uint256)" - } - }, - "id": 31280, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2346:58:37", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 31281, - "nodeType": "EmitStatement", - "src": "2341:63:37" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 31283, - "name": "newConfigHash", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 31267, - "src": "2425:13:37", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 31282, - "name": "configHash", - "nodeType": "Identifier", - "overloadedDeclarations": [31349, 31360], - "referencedDeclaration": 31349, - "src": "2414:10:37", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$returns$__$", - "typeString": "function (uint256)" - } - }, - "id": 31284, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2414:25:37", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 31285, - "nodeType": "ExpressionStatement", - "src": "2414:25:37" - } - ] - }, - "documentation": null, - "functionSelector": "3d07b336", - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 31270, - "modifierName": { - "argumentTypes": null, - "id": 31269, - "name": "notFinalized", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 300, - "src": "2303:12:37", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "2303:12:37" - }, - { - "arguments": null, - "id": 31272, - "modifierName": { - "argumentTypes": null, - "id": 31271, - "name": "onlyGovernance", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 554, - "src": "2316:14:37", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "2316:14:37" - } - ], - "name": "setConfigHash", - "overrides": null, - "parameters": { - "id": 31268, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 31267, - "mutability": "mutable", - "name": "newConfigHash", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 31287, - "src": "2271:21:37", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 31266, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2271:7:37", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2270:23:37" - }, - "returnParameters": { - "id": 31273, - "nodeType": "ParameterList", - "parameters": [], - "src": "2331:0:37" - }, - "scope": 31650, - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "external" - }, - { - "id": 31301, - "nodeType": "FunctionDefinition", - "src": "2452:183:37", - "nodes": [], - "body": { - "id": 31300, - "nodeType": "Block", - "src": "2578:57:37", - "nodes": [], - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 31297, - "name": "delayInSeconds", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 31289, - "src": "2613:14:37", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 31296, - "name": "messageCancellationDelay", - "nodeType": "Identifier", - "overloadedDeclarations": [1836, 1849], - "referencedDeclaration": 1849, - "src": "2588:24:37", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$returns$__$", - "typeString": "function (uint256)" - } - }, - "id": 31298, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2588:40:37", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 31299, - "nodeType": "ExpressionStatement", - "src": "2588:40:37" - } - ] - }, - "documentation": null, - "functionSelector": "c99d397f", - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 31292, - "modifierName": { - "argumentTypes": null, - "id": 31291, - "name": "notFinalized", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 300, - "src": "2538:12:37", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "2538:12:37" - }, - { - "arguments": null, - "id": 31294, - "modifierName": { - "argumentTypes": null, - "id": 31293, - "name": "onlyGovernance", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 554, - "src": "2559:14:37", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "2559:14:37" - } - ], - "name": "setMessageCancellationDelay", - "overrides": null, - "parameters": { - "id": 31290, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 31289, - "mutability": "mutable", - "name": "delayInSeconds", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 31301, - "src": "2489:22:37", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 31288, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2489:7:37", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2488:24:37" - }, - "returnParameters": { - "id": 31295, - "nodeType": "ParameterList", - "parameters": [], - "src": "2578:0:37" - }, - "scope": 31650, - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "external" - }, - { - "id": 31312, - "nodeType": "FunctionDefinition", - "src": "2699:120:37", - "nodes": [], - "body": { - "id": 31311, - "nodeType": "Block", - "src": "2752:67:37", - "nodes": [], - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 31308, - "name": "PROGRAM_HASH_TAG", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 31234, - "src": "2795:16:37", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "expression": { - "argumentTypes": null, - "id": 31306, - "name": "NamedStorage", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1106, - "src": "2769:12:37", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_NamedStorage_$1106_$", - "typeString": "type(library NamedStorage)" - } - }, - "id": 31307, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "getUintValue", - "nodeType": "MemberAccess", - "referencedDeclaration": 968, - "src": "2769:25:37", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_string_memory_ptr_$returns$_t_uint256_$", - "typeString": "function (string memory) view returns (uint256)" - } - }, - "id": 31309, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2769:43:37", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 31305, - "id": 31310, - "nodeType": "Return", - "src": "2762:50:37" - } - ] - }, - "documentation": null, - "functionSelector": "8a9bf090", - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "programHash", - "overrides": null, - "parameters": { - "id": 31302, - "nodeType": "ParameterList", - "parameters": [], - "src": "2719:2:37" - }, - "returnParameters": { - "id": 31305, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 31304, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 31312, - "src": "2743:7:37", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 31303, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2743:7:37", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2742:9:37" - }, - "scope": 31650, - "stateMutability": "view", - "virtual": false, - "visibility": "public" - }, - { - "id": 31325, - "nodeType": "FunctionDefinition", - "src": "2884:112:37", - "nodes": [], - "body": { - "id": 31324, - "nodeType": "Block", - "src": "2929:67:37", - "nodes": [], - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 31320, - "name": "PROGRAM_HASH_TAG", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 31234, - "src": "2965:16:37", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - { - "argumentTypes": null, - "id": 31321, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 31314, - "src": "2983:5:37", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 31317, - "name": "NamedStorage", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1106, - "src": "2939:12:37", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_NamedStorage_$1106_$", - "typeString": "type(library NamedStorage)" - } - }, - "id": 31319, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "setUintValue", - "nodeType": "MemberAccess", - "referencedDeclaration": 986, - "src": "2939:25:37", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_string_memory_ptr_$_t_uint256_$returns$__$", - "typeString": "function (string memory,uint256)" - } - }, - "id": 31322, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2939:50:37", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 31323, - "nodeType": "ExpressionStatement", - "src": "2939:50:37" - } - ] - }, - "documentation": null, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "programHash", - "overrides": null, - "parameters": { - "id": 31315, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 31314, - "mutability": "mutable", - "name": "value", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 31325, - "src": "2905:13:37", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 31313, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2905:7:37", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2904:15:37" - }, - "returnParameters": { - "id": 31316, - "nodeType": "ParameterList", - "parameters": [], - "src": "2929:0:37" - }, - "scope": 31650, - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "internal" - }, - { - "id": 31336, - "nodeType": "FunctionDefinition", - "src": "3052:126:37", - "nodes": [], - "body": { - "id": 31335, - "nodeType": "Block", - "src": "3104:74:37", - "nodes": [], - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 31332, - "name": "VERIFIER_ADDRESS_TAG", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 31237, - "src": "3150:20:37", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "expression": { - "argumentTypes": null, - "id": 31330, - "name": "NamedStorage", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1106, - "src": "3121:12:37", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_NamedStorage_$1106_$", - "typeString": "type(library NamedStorage)" - } - }, - "id": 31331, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "getAddressValue", - "nodeType": "MemberAccess", - "referencedDeclaration": 1026, - "src": "3121:28:37", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_string_memory_ptr_$returns$_t_address_$", - "typeString": "function (string memory) view returns (address)" - } - }, - "id": 31333, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3121:50:37", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "functionReturnParameters": 31329, - "id": 31334, - "nodeType": "Return", - "src": "3114:57:37" - } - ] - }, - "documentation": null, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "verifier", - "overrides": null, - "parameters": { - "id": 31326, - "nodeType": "ParameterList", - "parameters": [], - "src": "3069:2:37" - }, - "returnParameters": { - "id": 31329, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 31328, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 31336, - "src": "3095:7:37", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 31327, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "3095:7:37", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3094:9:37" - }, - "scope": 31650, - "stateMutability": "view", - "virtual": false, - "visibility": "internal" - }, - { - "id": 31349, - "nodeType": "FunctionDefinition", - "src": "3242:110:37", - "nodes": [], - "body": { - "id": 31348, - "nodeType": "Block", - "src": "3286:66:37", - "nodes": [], - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 31344, - "name": "CONFIG_HASH_TAG", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 31243, - "src": "3322:15:37", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - { - "argumentTypes": null, - "id": 31345, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 31338, - "src": "3339:5:37", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 31341, - "name": "NamedStorage", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1106, - "src": "3296:12:37", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_NamedStorage_$1106_$", - "typeString": "type(library NamedStorage)" - } - }, - "id": 31343, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "setUintValue", - "nodeType": "MemberAccess", - "referencedDeclaration": 986, - "src": "3296:25:37", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_string_memory_ptr_$_t_uint256_$returns$__$", - "typeString": "function (string memory,uint256)" - } - }, - "id": 31346, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3296:49:37", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 31347, - "nodeType": "ExpressionStatement", - "src": "3296:49:37" - } - ] - }, - "documentation": null, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "configHash", - "overrides": null, - "parameters": { - "id": 31339, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 31338, - "mutability": "mutable", - "name": "value", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 31349, - "src": "3262:13:37", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 31337, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3262:7:37", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3261:15:37" - }, - "returnParameters": { - "id": 31340, - "nodeType": "ParameterList", - "parameters": [], - "src": "3286:0:37" - }, - "scope": 31650, - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "internal" - }, - { - "id": 31360, - "nodeType": "FunctionDefinition", - "src": "3415:118:37", - "nodes": [], - "body": { - "id": 31359, - "nodeType": "Block", - "src": "3467:66:37", - "nodes": [], - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 31356, - "name": "CONFIG_HASH_TAG", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 31243, - "src": "3510:15:37", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "expression": { - "argumentTypes": null, - "id": 31354, - "name": "NamedStorage", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1106, - "src": "3484:12:37", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_NamedStorage_$1106_$", - "typeString": "type(library NamedStorage)" - } - }, - "id": 31355, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "getUintValue", - "nodeType": "MemberAccess", - "referencedDeclaration": 968, - "src": "3484:25:37", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_string_memory_ptr_$returns$_t_uint256_$", - "typeString": "function (string memory) view returns (uint256)" - } - }, - "id": 31357, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3484:42:37", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 31353, - "id": 31358, - "nodeType": "Return", - "src": "3477:49:37" - } - ] - }, - "documentation": null, - "functionSelector": "e1f1176d", - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "configHash", - "overrides": null, - "parameters": { - "id": 31350, - "nodeType": "ParameterList", - "parameters": [], - "src": "3434:2:37" - }, - "returnParameters": { - "id": 31353, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 31352, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 31360, - "src": "3458:7:37", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 31351, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3458:7:37", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3457:9:37" - }, - "scope": 31650, - "stateMutability": "view", - "virtual": false, - "visibility": "public" - }, - { - "id": 31373, - "nodeType": "FunctionDefinition", - "src": "3539:130:37", - "nodes": [], - "body": { - "id": 31372, - "nodeType": "Block", - "src": "3591:78:37", - "nodes": [], - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 31368, - "name": "VERIFIER_ADDRESS_TAG", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 31237, - "src": "3634:20:37", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - { - "argumentTypes": null, - "id": 31369, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 31362, - "src": "3656:5:37", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 31365, - "name": "NamedStorage", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1106, - "src": "3601:12:37", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_NamedStorage_$1106_$", - "typeString": "type(library NamedStorage)" - } - }, - "id": 31367, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "setAddressValueOnce", - "nodeType": "MemberAccess", - "referencedDeclaration": 1069, - "src": "3601:32:37", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_string_memory_ptr_$_t_address_$returns$__$", - "typeString": "function (string memory,address)" - } - }, - "id": 31370, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3601:61:37", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 31371, - "nodeType": "ExpressionStatement", - "src": "3601:61:37" - } - ] - }, - "documentation": null, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "setVerifierAddress", - "overrides": null, - "parameters": { - "id": 31363, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 31362, - "mutability": "mutable", - "name": "value", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 31373, - "src": "3567:13:37", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 31361, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "3567:7:37", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3566:15:37" - }, - "returnParameters": { - "id": 31364, - "nodeType": "ParameterList", - "parameters": [], - "src": "3591:0:37" - }, - "scope": 31650, - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "internal" - }, - { - "id": 31389, - "nodeType": "FunctionDefinition", - "src": "3722:232:37", - "nodes": [], - "body": { - "id": 31388, - "nodeType": "Block", - "src": "3803:151:37", - "nodes": [], - "statements": [ - { - "assignments": [31379], - "declarations": [ - { - "constant": false, - "id": 31379, - "mutability": "mutable", - "name": "location", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 31388, - "src": "3813:16:37", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 31378, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "3813:7:37", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 31386, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 31383, - "name": "STATE_STRUCT_TAG", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 31240, - "src": "3859:16:37", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "expression": { - "argumentTypes": null, - "id": 31381, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -1, - "src": "3842:3:37", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 31382, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "3842:16:37", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 31384, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3842:34:37", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 31380, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -8, - "src": "3832:9:37", - "typeDescriptions": { - "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", - "typeString": "function (bytes memory) pure returns (bytes32)" - } - }, - "id": 31385, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3832:45:37", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "3813:64:37" - }, - { - "AST": { - "nodeType": "YulBlock", - "src": "3896:52:37", - "statements": [ - { - "nodeType": "YulAssignment", - "src": "3910:28:37", - "value": { - "name": "location", - "nodeType": "YulIdentifier", - "src": "3930:8:37" - }, - "variableNames": [ - { - "name": "stateStruct_slot", - "nodeType": "YulIdentifier", - "src": "3910:16:37" - } - ] - } - ] - }, - "evmVersion": "istanbul", - "externalReferences": [ - { - "declaration": 31379, - "isOffset": false, - "isSlot": false, - "src": "3930:8:37", - "valueSize": 1 - }, - { - "declaration": 31376, - "isOffset": false, - "isSlot": true, - "src": "3910:16:37", - "valueSize": 1 - } - ], - "id": 31387, - "nodeType": "InlineAssembly", - "src": "3887:61:37" - } - ] - }, - "documentation": null, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "state", - "overrides": null, - "parameters": { - "id": 31374, - "nodeType": "ParameterList", - "parameters": [], - "src": "3736:2:37" - }, - "returnParameters": { - "id": 31377, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 31376, - "mutability": "mutable", - "name": "stateStruct", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 31389, - "src": "3762:39:37", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_State_$2234_storage_ptr", - "typeString": "struct StarknetState.State" - }, - "typeName": { - "contractScope": null, - "id": 31375, - "name": "StarknetState.State", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 2234, - "src": "3762:19:37", - "typeDescriptions": { - "typeIdentifier": "t_struct$_State_$2234_storage_ptr", - "typeString": "struct StarknetState.State" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3761:41:37" - }, - "scope": 31650, - "stateMutability": "pure", - "virtual": false, - "visibility": "internal" - }, - { - "id": 31401, - "nodeType": "FunctionDefinition", - "src": "3960:105:37", - "nodes": [], - "body": { - "id": 31400, - "nodeType": "Block", - "src": "4023:42:37", - "nodes": [], - "statements": [ - { - "expression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 31398, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 31395, - "name": "programHash", - "nodeType": "Identifier", - "overloadedDeclarations": [31312, 31325], - "referencedDeclaration": 31312, - "src": "4040:11:37", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 31396, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4040:13:37", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 31397, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4057:1:37", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "4040:18:37", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "functionReturnParameters": 31394, - "id": 31399, - "nodeType": "Return", - "src": "4033:25:37" - } - ] - }, - "baseFunctions": [499], - "documentation": null, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "isInitialized", - "overrides": { - "id": 31391, - "nodeType": "OverrideSpecifier", - "overrides": [], - "src": "3999:8:37" - }, - "parameters": { - "id": 31390, - "nodeType": "ParameterList", - "parameters": [], - "src": "3982:2:37" - }, - "returnParameters": { - "id": 31394, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 31393, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 31401, - "src": "4017:4:37", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 31392, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "4017:4:37", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4016:6:37" - }, - "scope": 31650, - "stateMutability": "view", - "virtual": false, - "visibility": "internal" - }, - { - "id": 31410, - "nodeType": "FunctionDefinition", - "src": "4071:95:37", - "nodes": [], - "body": { - "id": 31409, - "nodeType": "Block", - "src": "4141:25:37", - "nodes": [], - "statements": [ - { - "expression": { - "argumentTypes": null, - "hexValue": "30", - "id": 31407, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4158:1:37", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "functionReturnParameters": 31406, - "id": 31408, - "nodeType": "Return", - "src": "4151:8:37" - } - ] - }, - "baseFunctions": [494], - "documentation": null, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "numOfSubContracts", - "overrides": { - "id": 31403, - "nodeType": "OverrideSpecifier", - "overrides": [], - "src": "4114:8:37" - }, - "parameters": { - "id": 31402, - "nodeType": "ParameterList", - "parameters": [], - "src": "4097:2:37" - }, - "returnParameters": { - "id": 31406, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 31405, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 31410, - "src": "4132:7:37", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 31404, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4132:7:37", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4131:9:37" - }, - "scope": 31650, - "stateMutability": "pure", - "virtual": false, - "visibility": "internal" - }, - { - "id": 31446, - "nodeType": "FunctionDefinition", - "src": "4172:266:37", - "nodes": [], - "body": { - "id": 31445, - "nodeType": "Block", - "src": "4242:196:37", - "nodes": [], - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 31422, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 31417, - "name": "data", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 31412, - "src": "4260:4:37", - "typeDescriptions": { - "typeIdentifier": "t_bytes_calldata_ptr", - "typeString": "bytes calldata" - } - }, - "id": 31418, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "4260:11:37", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_rational_192_by_1", - "typeString": "int_const 192" - }, - "id": 31421, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "36", - "id": 31419, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4275:1:37", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_6_by_1", - "typeString": "int_const 6" - }, - "value": "6" - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": { - "argumentTypes": null, - "hexValue": "3332", - "id": 31420, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4279:2:37", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_32_by_1", - "typeString": "int_const 32" - }, - "value": "32" - }, - "src": "4275:6:37", - "typeDescriptions": { - "typeIdentifier": "t_rational_192_by_1", - "typeString": "int_const 192" - } - }, - "src": "4260:21:37", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "494c4c4547414c5f494e49545f444154415f53495a45", - "id": 31423, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4283:24:37", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_14356eebb71e7931cad70fa351b8bc5bd32ed3af1a9628009fb6ec382db26522", - "typeString": "literal_string \"ILLEGAL_INIT_DATA_SIZE\"" - }, - "value": "ILLEGAL_INIT_DATA_SIZE" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_14356eebb71e7931cad70fa351b8bc5bd32ed3af1a9628009fb6ec382db26522", - "typeString": "literal_string \"ILLEGAL_INIT_DATA_SIZE\"" - } - ], - "id": 31416, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [-18, -18], - "referencedDeclaration": -18, - "src": "4252:7:37", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 31424, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4252:56:37", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 31425, - "nodeType": "ExpressionStatement", - "src": "4252:56:37" - }, - { - "assignments": [31427], - "declarations": [ - { - "constant": false, - "id": 31427, - "mutability": "mutable", - "name": "programHash_", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 31445, - "src": "4318:20:37", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 31426, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4318:7:37", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 31437, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 31430, - "name": "data", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 31412, - "src": "4352:4:37", - "typeDescriptions": { - "typeIdentifier": "t_bytes_calldata_ptr", - "typeString": "bytes calldata" - } - }, - "endExpression": { - "argumentTypes": null, - "hexValue": "3332", - "id": 31431, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4358:2:37", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_32_by_1", - "typeString": "int_const 32" - }, - "value": "32" - }, - "id": 31432, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexRangeAccess", - "src": "4352:9:37", - "startExpression": null, - "typeDescriptions": { - "typeIdentifier": "t_bytes_calldata_ptr_slice", - "typeString": "bytes calldata slice" - } - }, - { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "id": 31434, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "4364:7:37", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_uint256_$", - "typeString": "type(uint256)" - }, - "typeName": { - "id": 31433, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4364:7:37", - "typeDescriptions": { - "typeIdentifier": null, - "typeString": null - } - } - } - ], - "id": 31435, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "4363:9:37", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_uint256_$", - "typeString": "type(uint256)" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_calldata_ptr_slice", - "typeString": "bytes calldata slice" - }, - { - "typeIdentifier": "t_type$_t_uint256_$", - "typeString": "type(uint256)" - } - ], - "expression": { - "argumentTypes": null, - "id": 31428, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -1, - "src": "4341:3:37", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 31429, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "decode", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "4341:10:37", - "typeDescriptions": { - "typeIdentifier": "t_function_abidecode_pure$__$returns$__$", - "typeString": "function () pure" - } - }, - "id": 31436, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4341:32:37", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "4318:55:37" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 31441, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 31439, - "name": "programHash_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 31427, - "src": "4391:12:37", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 31440, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4407:1:37", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "4391:17:37", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4241445f494e495449414c495a4154494f4e", - "id": 31442, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4410:20:37", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_755bbc3475835b38d7a5e4a6c96c52430dc055820776347e2e8da2916177d245", - "typeString": "literal_string \"BAD_INITIALIZATION\"" - }, - "value": "BAD_INITIALIZATION" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_755bbc3475835b38d7a5e4a6c96c52430dc055820776347e2e8da2916177d245", - "typeString": "literal_string \"BAD_INITIALIZATION\"" - } - ], - "id": 31438, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [-18, -18], - "referencedDeclaration": -18, - "src": "4383:7:37", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 31443, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4383:48:37", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 31444, - "nodeType": "ExpressionStatement", - "src": "4383:48:37" - } - ] - }, - "baseFunctions": [504], - "documentation": null, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "validateInitData", - "overrides": { - "id": 31414, - "nodeType": "OverrideSpecifier", - "overrides": [], - "src": "4233:8:37" - }, - "parameters": { - "id": 31413, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 31412, - "mutability": "mutable", - "name": "data", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 31446, - "src": "4198:19:37", - "stateVariable": false, - "storageLocation": "calldata", - "typeDescriptions": { - "typeIdentifier": "t_bytes_calldata_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 31411, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "4198:5:37", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4197:21:37" - }, - "returnParameters": { - "id": 31415, - "nodeType": "ParameterList", - "parameters": [], - "src": "4242:0:37" - }, - "scope": 31650, - "stateMutability": "view", - "virtual": false, - "visibility": "internal" - }, - { - "id": 31453, - "nodeType": "FunctionDefinition", - "src": "4444:94:37", - "nodes": [], - "body": { - "id": 31452, - "nodeType": "Block", - "src": "4536:2:37", - "nodes": [], - "statements": [] - }, - "baseFunctions": [509], - "documentation": null, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "processSubContractAddresses", - "overrides": { - "id": 31450, - "nodeType": "OverrideSpecifier", - "overrides": [], - "src": "4527:8:37" - }, - "parameters": { - "id": 31449, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 31448, - "mutability": "mutable", - "name": "subContractAddresses", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 31453, - "src": "4481:35:37", - "stateVariable": false, - "storageLocation": "calldata", - "typeDescriptions": { - "typeIdentifier": "t_bytes_calldata_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 31447, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "4481:5:37", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4480:37:37" - }, - "returnParameters": { - "id": 31451, - "nodeType": "ParameterList", - "parameters": [], - "src": "4536:0:37" - }, - "scope": 31650, - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "internal" - }, - { - "id": 31504, - "nodeType": "FunctionDefinition", - "src": "4544:505:37", - "nodes": [], - "body": { - "id": 31503, - "nodeType": "Block", - "src": "4616:433:37", - "nodes": [], - "statements": [ - { - "assignments": [31460, 31462, 31464, 31466], - "declarations": [ - { - "constant": false, - "id": 31460, - "mutability": "mutable", - "name": "programHash_", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 31503, - "src": "4640:20:37", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 31459, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4640:7:37", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 31462, - "mutability": "mutable", - "name": "verifier_", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 31503, - "src": "4674:17:37", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 31461, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "4674:7:37", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 31464, - "mutability": "mutable", - "name": "configHash_", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 31503, - "src": "4705:19:37", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 31463, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4705:7:37", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 31466, - "mutability": "mutable", - "name": "initialState", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 31503, - "src": "4738:39:37", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_struct$_State_$2234_memory_ptr", - "typeString": "struct StarknetState.State" - }, - "typeName": { - "contractScope": null, - "id": 31465, - "name": "StarknetState.State", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 2234, - "src": "4738:19:37", - "typeDescriptions": { - "typeIdentifier": "t_struct$_State_$2234_storage_ptr", - "typeString": "struct StarknetState.State" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 31480, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 31469, - "name": "data", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 31455, - "src": "4801:4:37", - "typeDescriptions": { - "typeIdentifier": "t_bytes_calldata_ptr", - "typeString": "bytes calldata" - } - }, - { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "id": 31471, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "4808:7:37", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_uint256_$", - "typeString": "type(uint256)" - }, - "typeName": { - "id": 31470, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4808:7:37", - "typeDescriptions": { - "typeIdentifier": null, - "typeString": null - } - } - }, - { - "argumentTypes": null, - "id": 31473, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "4817:7:37", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": { - "id": 31472, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "4817:7:37", - "typeDescriptions": { - "typeIdentifier": null, - "typeString": null - } - } - }, - { - "argumentTypes": null, - "id": 31475, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "4826:7:37", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_uint256_$", - "typeString": "type(uint256)" - }, - "typeName": { - "id": 31474, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4826:7:37", - "typeDescriptions": { - "typeIdentifier": null, - "typeString": null - } - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 31476, - "name": "StarknetState", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2333, - "src": "4835:13:37", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_StarknetState_$2333_$", - "typeString": "type(library StarknetState)" - } - }, - "id": 31477, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "State", - "nodeType": "MemberAccess", - "referencedDeclaration": 2234, - "src": "4835:19:37", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_struct$_State_$2234_storage_ptr_$", - "typeString": "type(struct StarknetState.State storage pointer)" - } - } - ], - "id": 31478, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "4807:48:37", - "typeDescriptions": { - "typeIdentifier": "t_tuple$_t_type$_t_uint256_$_$_t_type$_t_address_$_$_t_type$_t_uint256_$_$_t_type$_t_struct$_State_$2234_storage_ptr_$_$", - "typeString": "tuple(type(uint256),type(address),type(uint256),type(struct StarknetState.State storage pointer))" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_calldata_ptr", - "typeString": "bytes calldata" - }, - { - "typeIdentifier": "t_tuple$_t_type$_t_uint256_$_$_t_type$_t_address_$_$_t_type$_t_uint256_$_$_t_type$_t_struct$_State_$2234_storage_ptr_$_$", - "typeString": "tuple(type(uint256),type(address),type(uint256),type(struct StarknetState.State storage pointer))" - } - ], - "expression": { - "argumentTypes": null, - "id": 31467, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -1, - "src": "4790:3:37", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 31468, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "decode", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "4790:10:37", - "typeDescriptions": { - "typeIdentifier": "t_function_abidecode_pure$__$returns$__$", - "typeString": "function () pure" - } - }, - "id": 31479, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4790:66:37", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$_t_uint256_$_t_address_payable_$_t_uint256_$_t_struct$_State_$2234_memory_ptr_$", - "typeString": "tuple(uint256,address payable,uint256,struct StarknetState.State memory)" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "4626:230:37" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 31482, - "name": "programHash_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 31460, - "src": "4879:12:37", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 31481, - "name": "programHash", - "nodeType": "Identifier", - "overloadedDeclarations": [31312, 31325], - "referencedDeclaration": 31325, - "src": "4867:11:37", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$returns$__$", - "typeString": "function (uint256)" - } - }, - "id": 31483, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4867:25:37", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 31484, - "nodeType": "ExpressionStatement", - "src": "4867:25:37" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 31486, - "name": "verifier_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 31462, - "src": "4921:9:37", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 31485, - "name": "setVerifierAddress", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 31373, - "src": "4902:18:37", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$returns$__$", - "typeString": "function (address)" - } - }, - "id": 31487, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4902:29:37", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 31488, - "nodeType": "ExpressionStatement", - "src": "4902:29:37" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 31492, - "name": "initialState", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 31466, - "src": "4954:12:37", - "typeDescriptions": { - "typeIdentifier": "t_struct$_State_$2234_memory_ptr", - "typeString": "struct StarknetState.State memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_struct$_State_$2234_memory_ptr", - "typeString": "struct StarknetState.State memory" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 31489, - "name": "state", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 31389, - "src": "4941:5:37", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_State_$2234_storage_ptr_$", - "typeString": "function () pure returns (struct StarknetState.State storage pointer)" - } - }, - "id": 31490, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4941:7:37", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_struct$_State_$2234_storage_ptr", - "typeString": "struct StarknetState.State storage pointer" - } - }, - "id": 31491, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "copy", - "nodeType": "MemberAccess", - "referencedDeclaration": 2263, - "src": "4941:12:37", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_State_$2234_storage_ptr_$_t_struct$_State_$2234_memory_ptr_$returns$__$bound_to$_t_struct$_State_$2234_storage_ptr_$", - "typeString": "function (struct StarknetState.State storage pointer,struct StarknetState.State memory)" - } - }, - "id": 31493, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4941:26:37", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 31494, - "nodeType": "ExpressionStatement", - "src": "4941:26:37" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 31496, - "name": "configHash_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 31464, - "src": "4988:11:37", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 31495, - "name": "configHash", - "nodeType": "Identifier", - "overloadedDeclarations": [31349, 31360], - "referencedDeclaration": 31349, - "src": "4977:10:37", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$returns$__$", - "typeString": "function (uint256)" - } - }, - "id": 31497, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4977:23:37", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 31498, - "nodeType": "ExpressionStatement", - "src": "4977:23:37" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "35", - "id": 31500, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5035:6:37", - "subdenomination": "days", - "typeDescriptions": { - "typeIdentifier": "t_rational_432000_by_1", - "typeString": "int_const 432000" - }, - "value": "5" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_432000_by_1", - "typeString": "int_const 432000" - } - ], - "id": 31499, - "name": "messageCancellationDelay", - "nodeType": "Identifier", - "overloadedDeclarations": [1836, 1849], - "referencedDeclaration": 1849, - "src": "5010:24:37", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$returns$__$", - "typeString": "function (uint256)" - } - }, - "id": 31501, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5010:32:37", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 31502, - "nodeType": "ExpressionStatement", - "src": "5010:32:37" - } - ] - }, - "baseFunctions": [514], - "documentation": null, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "initializeContractState", - "overrides": { - "id": 31457, - "nodeType": "OverrideSpecifier", - "overrides": [], - "src": "4607:8:37" - }, - "parameters": { - "id": 31456, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 31455, - "mutability": "mutable", - "name": "data", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 31504, - "src": "4577:19:37", - "stateVariable": false, - "storageLocation": "calldata", - "typeDescriptions": { - "typeIdentifier": "t_bytes_calldata_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 31454, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "4577:5:37", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4576:21:37" - }, - "returnParameters": { - "id": 31458, - "nodeType": "ParameterList", - "parameters": [], - "src": "4616:0:37" - }, - "scope": 31650, - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "internal" - }, - { - "id": 31514, - "nodeType": "FunctionDefinition", - "src": "5123:118:37", - "nodes": [], - "body": { - "id": 31513, - "nodeType": "Block", - "src": "5190:51:37", - "nodes": [], - "statements": [ - { - "expression": { - "argumentTypes": null, - "hexValue": "537461726b576172655f537461726b6e65745f323032335f36", - "id": 31511, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "5207:27:37", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_2a1b12eb18968846aa42f0439e8341082c05ab7ac9d4e10fe505d21d0bef4c39", - "typeString": "literal_string \"StarkWare_Starknet_2023_6\"" - }, - "value": "StarkWare_Starknet_2023_6" - }, - "functionReturnParameters": 31510, - "id": 31512, - "nodeType": "Return", - "src": "5200:34:37" - } - ] - }, - "baseFunctions": [532], - "documentation": { - "id": 31505, - "nodeType": "StructuredDocumentation", - "src": "5055:63:37", - "text": "Returns a string that identifies the contract." - }, - "functionSelector": "eeb72866", - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "identify", - "overrides": { - "id": 31507, - "nodeType": "OverrideSpecifier", - "overrides": [], - "src": "5157:8:37" - }, - "parameters": { - "id": 31506, - "nodeType": "ParameterList", - "parameters": [], - "src": "5140:2:37" - }, - "returnParameters": { - "id": 31510, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 31509, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 31514, - "src": "5175:13:37", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 31508, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "5175:6:37", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "5174:15:37" - }, - "scope": 31650, - "stateMutability": "pure", - "virtual": false, - "visibility": "external" - }, - { - "id": 31525, - "nodeType": "FunctionDefinition", - "src": "5300:95:37", - "nodes": [], - "body": { - "id": 31524, - "nodeType": "Block", - "src": "5353:42:37", - "nodes": [], - "statements": [ - { - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 31520, - "name": "state", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 31389, - "src": "5370:5:37", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_State_$2234_storage_ptr_$", - "typeString": "function () pure returns (struct StarknetState.State storage pointer)" - } - }, - "id": 31521, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5370:7:37", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_struct$_State_$2234_storage_ptr", - "typeString": "struct StarknetState.State storage pointer" - } - }, - "id": 31522, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "globalRoot", - "nodeType": "MemberAccess", - "referencedDeclaration": 2229, - "src": "5370:18:37", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 31519, - "id": 31523, - "nodeType": "Return", - "src": "5363:25:37" - } - ] - }, - "documentation": { - "id": 31515, - "nodeType": "StructuredDocumentation", - "src": "5247:48:37", - "text": "Returns the current state root." - }, - "functionSelector": "9588eca2", - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "stateRoot", - "overrides": null, - "parameters": { - "id": 31516, - "nodeType": "ParameterList", - "parameters": [], - "src": "5318:2:37" - }, - "returnParameters": { - "id": 31519, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 31518, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 31525, - "src": "5344:7:37", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 31517, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "5344:7:37", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "5343:9:37" - }, - "scope": 31650, - "stateMutability": "view", - "virtual": false, - "visibility": "external" - }, - { - "id": 31536, - "nodeType": "FunctionDefinition", - "src": "5456:102:37", - "nodes": [], - "body": { - "id": 31535, - "nodeType": "Block", - "src": "5515:43:37", - "nodes": [], - "statements": [ - { - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 31531, - "name": "state", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 31389, - "src": "5532:5:37", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_State_$2234_storage_ptr_$", - "typeString": "function () pure returns (struct StarknetState.State storage pointer)" - } - }, - "id": 31532, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5532:7:37", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_struct$_State_$2234_storage_ptr", - "typeString": "struct StarknetState.State storage pointer" - } - }, - "id": 31533, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "blockNumber", - "nodeType": "MemberAccess", - "referencedDeclaration": 2231, - "src": "5532:19:37", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "functionReturnParameters": 31530, - "id": 31534, - "nodeType": "Return", - "src": "5525:26:37" - } - ] - }, - "documentation": { - "id": 31526, - "nodeType": "StructuredDocumentation", - "src": "5401:50:37", - "text": "Returns the current block number." - }, - "functionSelector": "35befa5d", - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "stateBlockNumber", - "overrides": null, - "parameters": { - "id": 31527, - "nodeType": "ParameterList", - "parameters": [], - "src": "5481:2:37" - }, - "returnParameters": { - "id": 31530, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 31529, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 31536, - "src": "5507:6:37", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "typeName": { - "id": 31528, - "name": "int256", - "nodeType": "ElementaryTypeName", - "src": "5507:6:37", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "5506:8:37" - }, - "scope": 31650, - "stateMutability": "view", - "virtual": false, - "visibility": "external" - }, - { - "id": 31547, - "nodeType": "FunctionDefinition", - "src": "5617:99:37", - "nodes": [], - "body": { - "id": 31546, - "nodeType": "Block", - "src": "5675:41:37", - "nodes": [], - "statements": [ - { - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 31542, - "name": "state", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 31389, - "src": "5692:5:37", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_State_$2234_storage_ptr_$", - "typeString": "function () pure returns (struct StarknetState.State storage pointer)" - } - }, - "id": 31543, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5692:7:37", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_struct$_State_$2234_storage_ptr", - "typeString": "struct StarknetState.State storage pointer" - } - }, - "id": 31544, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "blockHash", - "nodeType": "MemberAccess", - "referencedDeclaration": 2233, - "src": "5692:17:37", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 31541, - "id": 31545, - "nodeType": "Return", - "src": "5685:24:37" - } - ] - }, - "documentation": { - "id": 31537, - "nodeType": "StructuredDocumentation", - "src": "5564:48:37", - "text": "Returns the current block hash." - }, - "functionSelector": "382d83e3", - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "stateBlockHash", - "overrides": null, - "parameters": { - "id": 31538, - "nodeType": "ParameterList", - "parameters": [], - "src": "5640:2:37" - }, - "returnParameters": { - "id": 31541, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 31540, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 31547, - "src": "5666:7:37", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 31539, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "5666:7:37", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "5665:9:37" - }, - "scope": 31650, - "stateMutability": "view", - "virtual": false, - "visibility": "external" - }, - { - "id": 31649, - "nodeType": "FunctionDefinition", - "src": "6058:1807:37", - "nodes": [], - "body": { - "id": 31648, - "nodeType": "Block", - "src": "6149:1716:37", - "nodes": [], - "statements": [ - { - "assignments": [31557], - "declarations": [ - { - "constant": false, - "id": 31557, - "mutability": "mutable", - "name": "initialBlockNumber", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 31648, - "src": "6331:25:37", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "typeName": { - "id": 31556, - "name": "int256", - "nodeType": "ElementaryTypeName", - "src": "6331:6:37", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 31561, - "initialValue": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 31558, - "name": "state", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 31389, - "src": "6359:5:37", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_State_$2234_storage_ptr_$", - "typeString": "function () pure returns (struct StarknetState.State storage pointer)" - } - }, - "id": 31559, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6359:7:37", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_struct$_State_$2234_storage_ptr", - "typeString": "struct StarknetState.State storage pointer" - } - }, - "id": 31560, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "blockNumber", - "nodeType": "MemberAccess", - "referencedDeclaration": 2231, - "src": "6359:19:37", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "6331:47:37" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 31565, - "name": "programOutput", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 31551, - "src": "6449:13:37", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", - "typeString": "uint256[] calldata" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", - "typeString": "uint256[] calldata" - } - ], - "expression": { - "argumentTypes": null, - "id": 31562, - "name": "StarknetOutput", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1653, - "src": "6425:14:37", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_StarknetOutput_$1653_$", - "typeString": "type(library StarknetOutput)" - } - }, - "id": 31564, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "validate", - "nodeType": "MemberAccess", - "referencedDeclaration": 1363, - "src": "6425:23:37", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_array$_t_uint256_$dyn_calldata_ptr_$returns$__$", - "typeString": "function (uint256[] calldata) pure" - } - }, - "id": 31566, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6425:38:37", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 31567, - "nodeType": "ExpressionStatement", - "src": "6425:38:37" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 31575, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 31569, - "name": "configHash", - "nodeType": "Identifier", - "overloadedDeclarations": [31349, 31360], - "referencedDeclaration": 31360, - "src": "6528:10:37", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 31570, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6528:12:37", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 31571, - "name": "programOutput", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 31551, - "src": "6544:13:37", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", - "typeString": "uint256[] calldata" - } - }, - "id": 31574, - "indexExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 31572, - "name": "StarknetOutput", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1653, - "src": "6558:14:37", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_StarknetOutput_$1653_$", - "typeString": "type(library StarknetOutput)" - } - }, - "id": 31573, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "CONFIG_HASH_OFFSET", - "nodeType": "MemberAccess", - "referencedDeclaration": 1292, - "src": "6558:33:37", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "6544:48:37", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "6528:64:37", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "494e56414c49445f434f4e4649475f48415348", - "id": 31576, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "6606:21:37", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_1e15566847ed1c19ce14d62c724c85d7702676fc6f806d61315d57d0377541dc", - "typeString": "literal_string \"INVALID_CONFIG_HASH\"" - }, - "value": "INVALID_CONFIG_HASH" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_1e15566847ed1c19ce14d62c724c85d7702676fc6f806d61315d57d0377541dc", - "typeString": "literal_string \"INVALID_CONFIG_HASH\"" - } - ], - "id": 31568, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [-18, -18], - "referencedDeclaration": -18, - "src": "6507:7:37", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 31577, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6507:130:37", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 31578, - "nodeType": "ExpressionStatement", - "src": "6507:130:37" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 31582, - "name": "programOutput", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 31551, - "src": "6663:13:37", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", - "typeString": "uint256[] calldata" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", - "typeString": "uint256[] calldata" - } - ], - "expression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 31579, - "name": "state", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 31389, - "src": "6648:5:37", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_State_$2234_storage_ptr_$", - "typeString": "function () pure returns (struct StarknetState.State storage pointer)" - } - }, - "id": 31580, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6648:7:37", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_struct$_State_$2234_storage_ptr", - "typeString": "struct StarknetState.State storage pointer" - } - }, - "id": 31581, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "update", - "nodeType": "MemberAccess", - "referencedDeclaration": 2332, - "src": "6648:14:37", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_State_$2234_storage_ptr_$_t_array$_t_uint256_$dyn_calldata_ptr_$returns$__$bound_to$_t_struct$_State_$2234_storage_ptr_$", - "typeString": "function (struct StarknetState.State storage pointer,uint256[] calldata)" - } - }, - "id": 31583, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6648:29:37", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 31584, - "nodeType": "ExpressionStatement", - "src": "6648:29:37" - }, - { - "assignments": [31586], - "declarations": [ - { - "constant": false, - "id": 31586, - "mutability": "mutable", - "name": "outputOffset", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 31648, - "src": "6910:20:37", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 31585, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6910:7:37", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 31589, - "initialValue": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 31587, - "name": "StarknetOutput", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1653, - "src": "6933:14:37", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_StarknetOutput_$1653_$", - "typeString": "type(library StarknetOutput)" - } - }, - "id": 31588, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "HEADER_SIZE", - "nodeType": "MemberAccess", - "referencedDeclaration": 1295, - "src": "6933:26:37", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "6910:49:37" - }, - { - "expression": { - "argumentTypes": null, - "id": 31600, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 31590, - "name": "outputOffset", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 31586, - "src": "6969:12:37", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "+=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "74727565", - "id": 31593, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "7054:4:37", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 31594, - "name": "programOutput", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 31551, - "src": "7072:13:37", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", - "typeString": "uint256[] calldata" - } - }, - "endExpression": null, - "id": 31596, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexRangeAccess", - "src": "7072:28:37", - "startExpression": { - "argumentTypes": null, - "id": 31595, - "name": "outputOffset", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 31586, - "src": "7086:12:37", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr_slice", - "typeString": "uint256[] calldata slice" - } - }, - { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 31597, - "name": "l2ToL1Messages", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1814, - "src": "7114:14:37", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$__$returns$_t_mapping$_t_bytes32_$_t_uint256_$_$", - "typeString": "function () pure returns (mapping(bytes32 => uint256))" - } - }, - "id": 31598, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7114:16:37", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_uint256_$", - "typeString": "mapping(bytes32 => uint256)" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr_slice", - "typeString": "uint256[] calldata slice" - }, - { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_uint256_$", - "typeString": "mapping(bytes32 => uint256)" - } - ], - "expression": { - "argumentTypes": null, - "id": 31591, - "name": "StarknetOutput", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1653, - "src": "6985:14:37", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_StarknetOutput_$1653_$", - "typeString": "type(library StarknetOutput)" - } - }, - "id": 31592, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "processMessages", - "nodeType": "MemberAccess", - "referencedDeclaration": 1652, - "src": "6985:30:37", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_bool_$_t_array$_t_uint256_$dyn_calldata_ptr_$_t_mapping$_t_bytes32_$_t_uint256_$_$returns$_t_uint256_$", - "typeString": "function (bool,uint256[] calldata,mapping(bytes32 => uint256)) returns (uint256)" - } - }, - "id": 31599, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6985:155:37", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "6969:171:37", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 31601, - "nodeType": "ExpressionStatement", - "src": "6969:171:37" - }, - { - "expression": { - "argumentTypes": null, - "id": 31612, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 31602, - "name": "outputOffset", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 31586, - "src": "7189:12:37", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "+=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "66616c7365", - "id": 31605, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "7274:5:37", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "false" - }, - { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 31606, - "name": "programOutput", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 31551, - "src": "7293:13:37", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", - "typeString": "uint256[] calldata" - } - }, - "endExpression": null, - "id": 31608, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexRangeAccess", - "src": "7293:28:37", - "startExpression": { - "argumentTypes": null, - "id": 31607, - "name": "outputOffset", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 31586, - "src": "7307:12:37", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr_slice", - "typeString": "uint256[] calldata slice" - } - }, - { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 31609, - "name": "l1ToL2Messages", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1801, - "src": "7335:14:37", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$__$returns$_t_mapping$_t_bytes32_$_t_uint256_$_$", - "typeString": "function () pure returns (mapping(bytes32 => uint256))" - } - }, - "id": 31610, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7335:16:37", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_uint256_$", - "typeString": "mapping(bytes32 => uint256)" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr_slice", - "typeString": "uint256[] calldata slice" - }, - { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_uint256_$", - "typeString": "mapping(bytes32 => uint256)" - } - ], - "expression": { - "argumentTypes": null, - "id": 31603, - "name": "StarknetOutput", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1653, - "src": "7205:14:37", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_StarknetOutput_$1653_$", - "typeString": "type(library StarknetOutput)" - } - }, - "id": 31604, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "processMessages", - "nodeType": "MemberAccess", - "referencedDeclaration": 1652, - "src": "7205:30:37", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_bool_$_t_array$_t_uint256_$dyn_calldata_ptr_$_t_mapping$_t_bytes32_$_t_uint256_$_$returns$_t_uint256_$", - "typeString": "function (bool,uint256[] calldata,mapping(bytes32 => uint256)) returns (uint256)" - } - }, - "id": 31611, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7205:156:37", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "7189:172:37", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 31613, - "nodeType": "ExpressionStatement", - "src": "7189:172:37" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 31618, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 31615, - "name": "outputOffset", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 31586, - "src": "7379:12:37", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 31616, - "name": "programOutput", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 31551, - "src": "7395:13:37", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", - "typeString": "uint256[] calldata" - } - }, - "id": 31617, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "7395:20:37", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "7379:36:37", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "535441524b4e45545f4f55545055545f544f4f5f4c4f4e47", - "id": 31619, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "7417:26:37", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_81aab34693ff9205394810638bf8ae3f6aba0692d74a5c21cdfb88a363048a6c", - "typeString": "literal_string \"STARKNET_OUTPUT_TOO_LONG\"" - }, - "value": "STARKNET_OUTPUT_TOO_LONG" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_81aab34693ff9205394810638bf8ae3f6aba0692d74a5c21cdfb88a363048a6c", - "typeString": "literal_string \"STARKNET_OUTPUT_TOO_LONG\"" - } - ], - "id": 31614, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [-18, -18], - "referencedDeclaration": -18, - "src": "7371:7:37", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 31620, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7371:73:37", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 31621, - "nodeType": "ExpressionStatement", - "src": "7371:73:37" - }, - { - "assignments": [31625], - "declarations": [ - { - "constant": false, - "id": 31625, - "mutability": "mutable", - "name": "state_", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 31648, - "src": "7588:34:37", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_State_$2234_storage_ptr", - "typeString": "struct StarknetState.State" - }, - "typeName": { - "contractScope": null, - "id": 31624, - "name": "StarknetState.State", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 2234, - "src": "7588:19:37", - "typeDescriptions": { - "typeIdentifier": "t_struct$_State_$2234_storage_ptr", - "typeString": "struct StarknetState.State" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 31628, - "initialValue": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 31626, - "name": "state", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 31389, - "src": "7625:5:37", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_State_$2234_storage_ptr_$", - "typeString": "function () pure returns (struct StarknetState.State storage pointer)" - } - }, - "id": 31627, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7625:7:37", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_struct$_State_$2234_storage_ptr", - "typeString": "struct StarknetState.State storage pointer" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "7588:44:37" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 31630, - "name": "state_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 31625, - "src": "7662:6:37", - "typeDescriptions": { - "typeIdentifier": "t_struct$_State_$2234_storage_ptr", - "typeString": "struct StarknetState.State storage pointer" - } - }, - "id": 31631, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "globalRoot", - "nodeType": "MemberAccess", - "referencedDeclaration": 2229, - "src": "7662:17:37", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 31632, - "name": "state_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 31625, - "src": "7681:6:37", - "typeDescriptions": { - "typeIdentifier": "t_struct$_State_$2234_storage_ptr", - "typeString": "struct StarknetState.State storage pointer" - } - }, - "id": 31633, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "blockNumber", - "nodeType": "MemberAccess", - "referencedDeclaration": 2231, - "src": "7681:18:37", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 31634, - "name": "state_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 31625, - "src": "7701:6:37", - "typeDescriptions": { - "typeIdentifier": "t_struct$_State_$2234_storage_ptr", - "typeString": "struct StarknetState.State storage pointer" - } - }, - "id": 31635, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "blockHash", - "nodeType": "MemberAccess", - "referencedDeclaration": 2233, - "src": "7701:16:37", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 31629, - "name": "LogStateUpdate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 31219, - "src": "7647:14:37", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_int256_$_t_uint256_$returns$__$", - "typeString": "function (uint256,int256,uint256)" - } - }, - "id": 31636, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7647:71:37", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 31637, - "nodeType": "EmitStatement", - "src": "7642:76:37" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "id": 31644, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 31639, - "name": "state_", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 31625, - "src": "7783:6:37", - "typeDescriptions": { - "typeIdentifier": "t_struct$_State_$2234_storage_ptr", - "typeString": "struct StarknetState.State storage pointer" - } - }, - "id": 31640, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "blockNumber", - "nodeType": "MemberAccess", - "referencedDeclaration": 2231, - "src": "7783:18:37", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_int256", - "typeString": "int256" - }, - "id": 31643, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 31641, - "name": "initialBlockNumber", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 31557, - "src": "7805:18:37", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "hexValue": "31", - "id": 31642, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "7826:1:37", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - }, - "src": "7805:22:37", - "typeDescriptions": { - "typeIdentifier": "t_int256", - "typeString": "int256" - } - }, - "src": "7783:44:37", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "494e56414c49445f46494e414c5f424c4f434b5f4e554d424552", - "id": 31645, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "7829:28:37", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_4704f665b3bc7084199f162272b6b773fa8dad10a187a1c61e90ec9d251e75ab", - "typeString": "literal_string \"INVALID_FINAL_BLOCK_NUMBER\"" - }, - "value": "INVALID_FINAL_BLOCK_NUMBER" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_4704f665b3bc7084199f162272b6b773fa8dad10a187a1c61e90ec9d251e75ab", - "typeString": "literal_string \"INVALID_FINAL_BLOCK_NUMBER\"" - } - ], - "id": 31638, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [-18, -18], - "referencedDeclaration": -18, - "src": "7775:7:37", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 31646, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7775:83:37", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 31647, - "nodeType": "ExpressionStatement", - "src": "7775:83:37" - } - ] - }, - "documentation": { - "id": 31548, - "nodeType": "StructuredDocumentation", - "src": "5722:331:37", - "text": "Updates the state of the StarkNet, based on a proof of the\nStarkNet OS that the state transition is valid.\nArguments:\nprogramOutput - The main part of the StarkNet OS program output.\ndata_availability_fact - An encoding of the on-chain data associated\nwith the 'programOutput'." - }, - "functionSelector": "853e2461", - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 31554, - "modifierName": { - "argumentTypes": null, - "id": 31553, - "name": "onlyOperator", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 585, - "src": "6136:12:37", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "6136:12:37" - } - ], - "name": "updateState", - "overrides": null, - "parameters": { - "id": 31552, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 31551, - "mutability": "mutable", - "name": "programOutput", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 31649, - "src": "6088:32:37", - "stateVariable": false, - "storageLocation": "calldata", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", - "typeString": "uint256[]" - }, - "typeName": { - "baseType": { - "id": 31549, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "6088:7:37", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 31550, - "length": null, - "nodeType": "ArrayTypeName", - "src": "6088:9:37", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", - "typeString": "uint256[]" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6078:48:37" - }, - "returnParameters": { - "id": 31555, - "nodeType": "ParameterList", - "parameters": [], - "src": "6149:0:37" - }, - "scope": 31650, - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "external" - } - ], - "abstract": false, - "baseContracts": [ - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 31187, - "name": "Identity", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 533, - "src": "754:8:37", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Identity_$533", - "typeString": "contract Identity" - } - }, - "id": 31188, - "nodeType": "InheritanceSpecifier", - "src": "754:8:37" - }, - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 31189, - "name": "StarknetMessaging", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 2200, - "src": "768:17:37", - "typeDescriptions": { - "typeIdentifier": "t_contract$_StarknetMessaging_$2200", - "typeString": "contract StarknetMessaging" - } - }, - "id": 31190, - "nodeType": "InheritanceSpecifier", - "src": "768:17:37" - }, - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 31191, - "name": "StarknetGovernance", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1725, - "src": "791:18:37", - "typeDescriptions": { - "typeIdentifier": "t_contract$_StarknetGovernance_$1725", - "typeString": "contract StarknetGovernance" - } - }, - "id": 31192, - "nodeType": "InheritanceSpecifier", - "src": "791:18:37" - }, - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 31193, - "name": "GovernedFinalizable", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 319, - "src": "815:19:37", - "typeDescriptions": { - "typeIdentifier": "t_contract$_GovernedFinalizable_$319", - "typeString": "contract GovernedFinalizable" - } - }, - "id": 31194, - "nodeType": "InheritanceSpecifier", - "src": "815:19:37" - }, - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 31195, - "name": "StarknetOperator", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 2224, - "src": "840:16:37", - "typeDescriptions": { - "typeIdentifier": "t_contract$_StarknetOperator_$2224", - "typeString": "contract StarknetOperator" - } - }, - "id": 31196, - "nodeType": "InheritanceSpecifier", - "src": "840:16:37" - }, - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 31197, - "name": "ContractInitializer", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 515, - "src": "862:19:37", - "typeDescriptions": { - "typeIdentifier": "t_contract$_ContractInitializer_$515", - "typeString": "contract ContractInitializer" - } - }, - "id": 31198, - "nodeType": "InheritanceSpecifier", - "src": "862:19:37" - }, - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 31199, - "name": "ProxySupport", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 773, - "src": "887:12:37", - "typeDescriptions": { - "typeIdentifier": "t_contract$_ProxySupport_$773", - "typeString": "contract ProxySupport" - } - }, - "id": 31200, - "nodeType": "InheritanceSpecifier", - "src": "887:12:37" - } - ], - "contractDependencies": [ - 266, 319, 456, 486, 515, 533, 555, 603, 773, 1174, 1249, 1725, 2200, - 2224 - ], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": true, - "linearizedBaseContracts": [ - 31650, 773, 515, 486, 2224, 456, 603, 319, 1725, 266, 555, 2200, 1174, - 1249, 533 - ], - "name": "Starknet", - "scope": 31651 - } - ], - "license": "Apache-2.0." - }, - "id": 37 -} diff --git a/starknet-e2e-test/contracts/artifacts/UnsafeProxy.json b/starknet-e2e-test/contracts/artifacts/UnsafeProxy.json deleted file mode 100644 index f742fcc374..0000000000 --- a/starknet-e2e-test/contracts/artifacts/UnsafeProxy.json +++ /dev/null @@ -1,702 +0,0 @@ -{ - "abi": [ - { - "inputs": [ - { - "internalType": "address", - "name": "_delegate", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "stateMutability": "payable", - "type": "fallback" - } - ], - "bytecode": { - "object": "0x608060405234801561001057600080fd5b5060405161012f38038061012f83398101604081905261002f91610054565b600080546001600160a01b0319166001600160a01b0392909216919091179055610084565b60006020828403121561006657600080fd5b81516001600160a01b038116811461007d57600080fd5b9392505050565b609d806100926000396000f3fe6000805460a0602036601f8101829004909102820160405260808181526001600160a01b039093169392918391908190838280828437600092018290525084519495509384935091505060208401855af43d604051816000823e8280156063578282f35b8282fdfea26469706673582212206332d7f24634826be7603ca65e79a038e87d4d1c59deea05cc63ec5594f0e22764736f6c63430008100033", - "sourceMap": "0:571:0:-:0;;;51:68;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;92:8;:20;;-1:-1:-1;;;;;;92:20:0;-1:-1:-1;;;;;92:20:0;;;;;;;;;;0:571;;14:290:1;84:6;137:2;125:9;116:7;112:23;108:32;105:52;;;153:1;150;143:12;105:52;179:16;;-1:-1:-1;;;;;224:31:1;;214:42;;204:70;;270:1;267;260:12;204:70;293:5;14:290;-1:-1:-1;;;14:290:1:o;:::-;0:571:0;;;;;;", - "linkReferences": {} - }, - "deployedBytecode": { - "object": "0x6000805460a0602036601f8101829004909102820160405260808181526001600160a01b039093169392918391908190838280828437600092018290525084519495509384935091505060208401855af43d604051816000823e8280156063578282f35b8282fdfea26469706673582212206332d7f24634826be7603ca65e79a038e87d4d1c59deea05cc63ec5594f0e22764736f6c63430008100033", - "sourceMap": "163:14:0:-:0;180:8;;198:28;;218:8;198:28;;;;;;;;;;;0:571;198:28;0:571;198:28;;;-1:-1:-1;;;;;180:8:0;;;;163:14;0:571;163:14;;218:8;;;163:14;218:8;;163:14;198:28;;;;;;;;-1:-1:-1;317:11:0;;198:28;;-1:-1:-1;198:28:0;;;-1:-1:-1;317:11:0;-1:-1:-1;;310:4:0;301:14;;293:6;286:5;273:62;360:16;406:4;400:11;445:4;443:1;439:3;424:26;470:6;489:25;;;;547:4;543:3;536:16;489:25;508:4;504:3;497:16", - "linkReferences": {} - }, - "methodIdentifiers": {}, - "rawMetadata": "{\"compiler\":{\"version\":\"0.8.16+commit.07a7930e\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_delegate\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/UnsafeProxy.sol\":\"UnsafeProxy\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src/UnsafeProxy.sol\":{\"keccak256\":\"0xc7a64fbd332c543a4a771ca835e44329325d21018d423f28c7924851af3b0011\",\"urls\":[\"bzz-raw://748d3052c21dcfe646b2d77136a2cbd82c9c8674a13d002e1a94e6599433151c\",\"dweb:/ipfs/QmWTgYdm7d4G5VA6wzQ2GujbHyyxbEPvSyddCexvMBeHPE\"]}},\"version\":1}", - "metadata": { - "compiler": { - "version": "0.8.16+commit.07a7930e" - }, - "language": "Solidity", - "output": { - "abi": [ - { - "inputs": [ - { - "internalType": "address", - "name": "_delegate", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "inputs": [], - "stateMutability": "payable", - "type": "fallback" - } - ], - "devdoc": { - "kind": "dev", - "methods": {}, - "version": 1 - }, - "userdoc": { - "kind": "user", - "methods": {}, - "version": 1 - } - }, - "settings": { - "remappings": [], - "optimizer": { - "enabled": true, - "runs": 200 - }, - "metadata": { - "bytecodeHash": "ipfs" - }, - "compilationTarget": { - "src/UnsafeProxy.sol": "UnsafeProxy" - }, - "libraries": {} - }, - "sources": { - "src/UnsafeProxy.sol": { - "keccak256": "0xc7a64fbd332c543a4a771ca835e44329325d21018d423f28c7924851af3b0011", - "urls": [ - "bzz-raw://748d3052c21dcfe646b2d77136a2cbd82c9c8674a13d002e1a94e6599433151c", - "dweb:/ipfs/QmWTgYdm7d4G5VA6wzQ2GujbHyyxbEPvSyddCexvMBeHPE" - ], - "license": null - } - }, - "version": 1 - }, - "ast": { - "absolutePath": "src/UnsafeProxy.sol", - "id": 28, - "exportedSymbols": { - "UnsafeProxy": [27] - }, - "nodeType": "SourceUnit", - "src": "0:571:0", - "nodes": [ - { - "id": 27, - "nodeType": "ContractDefinition", - "src": "0:571:0", - "nodes": [ - { - "id": 2, - "nodeType": "VariableDeclaration", - "src": "28:16:0", - "nodes": [], - "constant": false, - "mutability": "mutable", - "name": "delegate", - "nameLocation": "36:8:0", - "scope": 27, - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "28:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "internal" - }, - { - "id": 12, - "nodeType": "FunctionDefinition", - "src": "51:68:0", - "nodes": [], - "body": { - "id": 11, - "nodeType": "Block", - "src": "82:37:0", - "nodes": [], - "statements": [ - { - "expression": { - "id": 9, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "id": 7, - "name": "delegate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2, - "src": "92:8:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "id": 8, - "name": "_delegate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4, - "src": "103:9:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "92:20:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 10, - "nodeType": "ExpressionStatement", - "src": "92:20:0" - } - ] - }, - "implemented": true, - "kind": "constructor", - "modifiers": [], - "name": "", - "nameLocation": "-1:-1:-1", - "parameters": { - "id": 5, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4, - "mutability": "mutable", - "name": "_delegate", - "nameLocation": "71:9:0", - "nodeType": "VariableDeclaration", - "scope": 12, - "src": "63:17:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 3, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "63:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "internal" - } - ], - "src": "62:19:0" - }, - "returnParameters": { - "id": 6, - "nodeType": "ParameterList", - "parameters": [], - "src": "82:0:0" - }, - "scope": 27, - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "public" - }, - { - "id": 26, - "nodeType": "FunctionDefinition", - "src": "125:444:0", - "nodes": [], - "body": { - "id": 25, - "nodeType": "Block", - "src": "153:416:0", - "nodes": [], - "statements": [ - { - "assignments": [16], - "declarations": [ - { - "constant": false, - "id": 16, - "mutability": "mutable", - "name": "target", - "nameLocation": "171:6:0", - "nodeType": "VariableDeclaration", - "scope": 25, - "src": "163:14:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 15, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "163:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "internal" - } - ], - "id": 18, - "initialValue": { - "id": 17, - "name": "delegate", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2, - "src": "180:8:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "163:25:0" - }, - { - "assignments": [20], - "declarations": [ - { - "constant": false, - "id": 20, - "mutability": "mutable", - "name": "data", - "nameLocation": "211:4:0", - "nodeType": "VariableDeclaration", - "scope": 25, - "src": "198:17:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 19, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "198:5:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "visibility": "internal" - } - ], - "id": 23, - "initialValue": { - "expression": { - "id": 21, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -15, - "src": "218:3:0", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 22, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberLocation": "222:4:0", - "memberName": "data", - "nodeType": "MemberAccess", - "src": "218:8:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes_calldata_ptr", - "typeString": "bytes calldata" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "198:28:0" - }, - { - "AST": { - "nodeType": "YulBlock", - "src": "245:318:0", - "statements": [ - { - "nodeType": "YulVariableDeclaration", - "src": "259:76:0", - "value": { - "arguments": [ - { - "arguments": [], - "functionName": { - "name": "gas", - "nodeType": "YulIdentifier", - "src": "286:3:0" - }, - "nodeType": "YulFunctionCall", - "src": "286:5:0" - }, - { - "name": "target", - "nodeType": "YulIdentifier", - "src": "293:6:0" - }, - { - "arguments": [ - { - "name": "data", - "nodeType": "YulIdentifier", - "src": "305:4:0" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "310:4:0", - "type": "", - "value": "0x20" - } - ], - "functionName": { - "name": "add", - "nodeType": "YulIdentifier", - "src": "301:3:0" - }, - "nodeType": "YulFunctionCall", - "src": "301:14:0" - }, - { - "arguments": [ - { - "name": "data", - "nodeType": "YulIdentifier", - "src": "323:4:0" - } - ], - "functionName": { - "name": "mload", - "nodeType": "YulIdentifier", - "src": "317:5:0" - }, - "nodeType": "YulFunctionCall", - "src": "317:11:0" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "330:1:0", - "type": "", - "value": "0" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "333:1:0", - "type": "", - "value": "0" - } - ], - "functionName": { - "name": "delegatecall", - "nodeType": "YulIdentifier", - "src": "273:12:0" - }, - "nodeType": "YulFunctionCall", - "src": "273:62:0" - }, - "variables": [ - { - "name": "result", - "nodeType": "YulTypedName", - "src": "263:6:0", - "type": "" - } - ] - }, - { - "nodeType": "YulVariableDeclaration", - "src": "348:28:0", - "value": { - "arguments": [], - "functionName": { - "name": "returndatasize", - "nodeType": "YulIdentifier", - "src": "360:14:0" - }, - "nodeType": "YulFunctionCall", - "src": "360:16:0" - }, - "variables": [ - { - "name": "size", - "nodeType": "YulTypedName", - "src": "352:4:0", - "type": "" - } - ] - }, - { - "nodeType": "YulVariableDeclaration", - "src": "389:22:0", - "value": { - "arguments": [ - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "406:4:0", - "type": "", - "value": "0x40" - } - ], - "functionName": { - "name": "mload", - "nodeType": "YulIdentifier", - "src": "400:5:0" - }, - "nodeType": "YulFunctionCall", - "src": "400:11:0" - }, - "variables": [ - { - "name": "ptr", - "nodeType": "YulTypedName", - "src": "393:3:0", - "type": "" - } - ] - }, - { - "expression": { - "arguments": [ - { - "name": "ptr", - "nodeType": "YulIdentifier", - "src": "439:3:0" - }, - { - "kind": "number", - "nodeType": "YulLiteral", - "src": "443:1:0", - "type": "", - "value": "0" - }, - { - "name": "size", - "nodeType": "YulIdentifier", - "src": "445:4:0" - } - ], - "functionName": { - "name": "returndatacopy", - "nodeType": "YulIdentifier", - "src": "424:14:0" - }, - "nodeType": "YulFunctionCall", - "src": "424:26:0" - }, - "nodeType": "YulExpressionStatement", - "src": "424:26:0" - }, - { - "cases": [ - { - "body": { - "nodeType": "YulBlock", - "src": "496:18:0", - "statements": [ - { - "expression": { - "arguments": [ - { - "name": "ptr", - "nodeType": "YulIdentifier", - "src": "504:3:0" - }, - { - "name": "size", - "nodeType": "YulIdentifier", - "src": "508:4:0" - } - ], - "functionName": { - "name": "revert", - "nodeType": "YulIdentifier", - "src": "497:6:0" - }, - "nodeType": "YulFunctionCall", - "src": "497:16:0" - }, - "nodeType": "YulExpressionStatement", - "src": "497:16:0" - } - ] - }, - "nodeType": "YulCase", - "src": "489:25:0", - "value": { - "kind": "number", - "nodeType": "YulLiteral", - "src": "494:1:0", - "type": "", - "value": "0" - } - }, - { - "body": { - "nodeType": "YulBlock", - "src": "535:18:0", - "statements": [ - { - "expression": { - "arguments": [ - { - "name": "ptr", - "nodeType": "YulIdentifier", - "src": "543:3:0" - }, - { - "name": "size", - "nodeType": "YulIdentifier", - "src": "547:4:0" - } - ], - "functionName": { - "name": "return", - "nodeType": "YulIdentifier", - "src": "536:6:0" - }, - "nodeType": "YulFunctionCall", - "src": "536:16:0" - }, - "nodeType": "YulExpressionStatement", - "src": "536:16:0" - } - ] - }, - "nodeType": "YulCase", - "src": "527:26:0", - "value": "default" - } - ], - "expression": { - "name": "result", - "nodeType": "YulIdentifier", - "src": "470:6:0" - }, - "nodeType": "YulSwitch", - "src": "463:90:0" - } - ] - }, - "evmVersion": "london", - "externalReferences": [ - { - "declaration": 20, - "isOffset": false, - "isSlot": false, - "src": "305:4:0", - "valueSize": 1 - }, - { - "declaration": 20, - "isOffset": false, - "isSlot": false, - "src": "323:4:0", - "valueSize": 1 - }, - { - "declaration": 16, - "isOffset": false, - "isSlot": false, - "src": "293:6:0", - "valueSize": 1 - } - ], - "id": 24, - "nodeType": "InlineAssembly", - "src": "236:327:0" - } - ] - }, - "implemented": true, - "kind": "fallback", - "modifiers": [], - "name": "", - "nameLocation": "-1:-1:-1", - "parameters": { - "id": 13, - "nodeType": "ParameterList", - "parameters": [], - "src": "133:2:0" - }, - "returnParameters": { - "id": 14, - "nodeType": "ParameterList", - "parameters": [], - "src": "153:0:0" - }, - "scope": 27, - "stateMutability": "payable", - "virtual": false, - "visibility": "external" - } - ], - "abstract": false, - "baseContracts": [], - "canonicalName": "UnsafeProxy", - "contractDependencies": [], - "contractKind": "contract", - "fullyImplemented": true, - "linearizedBaseContracts": [27], - "name": "UnsafeProxy", - "nameLocation": "9:11:0", - "scope": 28, - "usedErrors": [] - } - ] - }, - "id": 0 -} diff --git a/starknet-e2e-test/contracts/foundry.toml b/starknet-e2e-test/contracts/foundry.toml deleted file mode 100644 index d672a23b1d..0000000000 --- a/starknet-e2e-test/contracts/foundry.toml +++ /dev/null @@ -1,3 +0,0 @@ -[profile.default] -src = "src" -out = "build" diff --git a/starknet-e2e-test/contracts/src/UnsafeProxy.sol b/starknet-e2e-test/contracts/src/UnsafeProxy.sol deleted file mode 100644 index d7cedf05ec..0000000000 --- a/starknet-e2e-test/contracts/src/UnsafeProxy.sol +++ /dev/null @@ -1,22 +0,0 @@ -contract UnsafeProxy { - - address delegate; - - constructor(address _delegate) { - delegate = _delegate; - } - - fallback() external payable { - address target = delegate; - bytes memory data = msg.data; - assembly { - let result := delegatecall(gas(), target, add(data,0x20), mload(data), 0, 0) - let size := returndatasize() - let ptr := mload(0x40) - returndatacopy(ptr,0,size) - switch result - case 0 {revert(ptr,size)} - default {return(ptr,size)} - } - } -} \ No newline at end of file diff --git a/starknet-e2e-test/ethereum_core_contract.rs b/starknet-e2e-test/ethereum_core_contract.rs index bcaf47c77f..a19683d5f5 100644 --- a/starknet-e2e-test/ethereum_core_contract.rs +++ b/starknet-e2e-test/ethereum_core_contract.rs @@ -8,18 +8,15 @@ use mp_snos_output::StarknetOsOutput; use rstest::rstest; use starknet_api::api_core::{ContractAddress, Nonce, PatriciaKey}; use starknet_api::hash::StarkFelt; -use starknet_e2e_test::ethereum_sandbox::EthereumSandbox; -use starknet_e2e_test::starknet_contract::{InitData, StarknetContract}; +use starknet_e2e_test::starknet_sovereign::StarknetSovereign; #[rstest] #[tokio::test] async fn starknet_core_contract_is_initialized() -> anyhow::Result<()> { - let sandbox = EthereumSandbox::new(); - let starknet_contract = StarknetContract::deploy(&sandbox).await; + let starknet_sovereign = StarknetSovereign::deploy().await; + starknet_sovereign.initialize(1u64.into(), 1u64.into()).await; - starknet_contract.initialize(&sandbox, InitData::one()).await; - - let starknet = StarknetContractClient::new(starknet_contract.address(), sandbox.client()); + let starknet = StarknetContractClient::new(starknet_sovereign.address(), starknet_sovereign.client()); let spec = SettlementProvider::::get_chain_spec(&starknet).await.expect("Failed to get chain spec"); assert_eq!(spec, StarknetSpec { program_hash: 1u64.into(), config_hash: 1u64.into() }); @@ -33,12 +30,10 @@ async fn starknet_core_contract_is_initialized() -> anyhow::Result<()> { #[rstest] #[tokio::test] async fn starknet_core_contract_advances_state() -> anyhow::Result<()> { - let sandbox = EthereumSandbox::new(); - let starknet_contract = StarknetContract::deploy(&sandbox).await; - - starknet_contract.initialize(&sandbox, InitData::one()).await; + let starknet_sovereign = StarknetSovereign::deploy().await; + starknet_sovereign.initialize(1u64.into(), 1u64.into()).await; - let starknet = StarknetContractClient::new(starknet_contract.address(), sandbox.client()); + let starknet = StarknetContractClient::new(starknet_sovereign.address(), starknet_sovereign.client()); // Now let's transition the state from block 0 to 1 (state root 0 -> 1) let program_output = StarknetOsOutput { @@ -62,14 +57,12 @@ async fn starknet_core_contract_sends_messages_to_l2() -> anyhow::Result<()> { // In this test we do not check Starknet messaging logic, but rather that all our encodings are // correct - let sandbox = EthereumSandbox::new(); - let starknet_contract = StarknetContract::deploy(&sandbox).await; - - starknet_contract.initialize(&sandbox, InitData::one()).await; + let starknet_sovereign = StarknetSovereign::deploy().await; + starknet_sovereign.initialize(1u64.into(), 1u64.into()).await; // Converting our EOA address to felt let mut from_address = [0u8; 32]; - from_address[12..32].copy_from_slice(sandbox.address().as_bytes()); + from_address[12..32].copy_from_slice(starknet_sovereign.client().address().as_bytes()); let message = MessageL1ToL2 { from_address: ContractAddress(PatriciaKey(StarkFelt::new(from_address).unwrap())), @@ -80,10 +73,10 @@ async fn starknet_core_contract_sends_messages_to_l2() -> anyhow::Result<()> { }; // Sending message to L2 (this will update msg hash table) - starknet_contract.send_message_to_l2(&sandbox, &message).await; - assert!(starknet_contract.message_to_l2_exists(&sandbox, &message).await); + starknet_sovereign.send_message_to_l2(&message).await; + assert!(starknet_sovereign.message_to_l2_exists(&message).await); - let starknet = StarknetContractClient::new(starknet_contract.address(), sandbox.client()); + let starknet = StarknetContractClient::new(starknet_sovereign.address(), starknet_sovereign.client()); let program_output = StarknetOsOutput { new_state_root: 1u64.into(), @@ -97,7 +90,7 @@ async fn starknet_core_contract_sends_messages_to_l2() -> anyhow::Result<()> { SettlementProvider::::update_state(&starknet, program_output).await.expect("Failed to update state"); // At this point the counter has to be reset - assert!(!starknet_contract.message_to_l2_exists(&sandbox, &message).await); + assert!(!starknet_sovereign.message_to_l2_exists(&message).await); Ok(()) } @@ -108,17 +101,15 @@ async fn starknet_core_contract_consumes_messages_from_l2() -> anyhow::Result<() // In this test we do not check Starknet messaging logic, but rather that all our encodings are // correct - let sandbox = EthereumSandbox::new(); - let starknet_contract = StarknetContract::deploy(&sandbox).await; - - starknet_contract.initialize(&sandbox, InitData::one()).await; + let starknet_sovereign = StarknetSovereign::deploy().await; + starknet_sovereign.initialize(1u64.into(), 1u64.into()).await; let message = MessageL2ToL1 { from_address: 1u64.into(), to_address: StarkFelt::from(2u64).try_into().unwrap(), payload: vec![3u64.into()], }; - let starknet = StarknetContractClient::new(starknet_contract.address(), sandbox.client()); + let starknet = StarknetContractClient::new(starknet_sovereign.address(), starknet_sovereign.client()); let program_output = StarknetOsOutput { new_state_root: 1u64.into(), @@ -131,7 +122,7 @@ async fn starknet_core_contract_consumes_messages_from_l2() -> anyhow::Result<() // During the state update, the message will be consumed (removed from hash table) SettlementProvider::::update_state(&starknet, program_output).await.expect("Failed to update state"); - assert!(starknet_contract.message_to_l1_exists(&sandbox, &message).await); + assert!(starknet_sovereign.message_to_l1_exists(&message).await); Ok(()) } diff --git a/starknet-e2e-test/ethereum_e2e.rs b/starknet-e2e-test/ethereum_e2e.rs new file mode 100644 index 0000000000..7e6a9ff649 --- /dev/null +++ b/starknet-e2e-test/ethereum_e2e.rs @@ -0,0 +1,46 @@ +extern crate starknet_e2e_test; + +use std::time::Duration; + +use madara_runtime::opaque::Block; +use madara_test_runner::node::MadaraTempDir; +use madara_test_runner::{MadaraArgs, MadaraRunner, Settlement}; +use mc_settlement::ethereum::StarknetContractClient; +use mc_settlement::{SettlementProvider, StarknetState}; +use rstest::rstest; +use starknet_e2e_test::starknet_sovereign::StarknetSovereign; +use tokio::time::sleep; + +#[rstest] +#[tokio::test] +async fn madara_advances_ethereum_settlement_contract_state_in_sovereign_mode() -> Result<(), anyhow::Error> { + // Troubleshooting: + // RUST_LOG=mc_settlement=trace MADARA_LOG=1 cargo test --package starknet-e2e-test + // works_with_initialized_contract -- --nocapture + + // Run or attach to Anvil sandbox, deploy & initialize core contract + let starknet_sovereign = StarknetSovereign::deploy().await; + starknet_sovereign.initialize_for_goerli(0u64.into(), 0u64.into()).await; + + // Create tmp Madara path and write settlement config + let madara_temp_dir = MadaraTempDir::default(); + let settlement_conf = starknet_sovereign.create_settlement_conf(madara_temp_dir.data_path()).await; + + // Launch new Madara instance and connect to it + let mut madara = MadaraRunner::new(MadaraArgs { + settlement: Some(Settlement::Ethereum), + settlement_conf: Some(settlement_conf), + base_path: Some(madara_temp_dir.base_path()), + }) + .await; + + madara.create_n_blocks(3).await?; + sleep(Duration::from_millis(300)).await; + + let client = StarknetContractClient::new(starknet_sovereign.address(), starknet_sovereign.client()); + let state = SettlementProvider::::get_state(&client).await?; + + assert_eq!(state, StarknetState { block_number: 3u64.into(), state_root: 0u64.into() }); + + Ok(()) +} diff --git a/starknet-e2e-test/ethereum_e2e_settlement.rs b/starknet-e2e-test/ethereum_settlement.rs similarity index 50% rename from starknet-e2e-test/ethereum_e2e_settlement.rs rename to starknet-e2e-test/ethereum_settlement.rs index 034329361a..4387b78526 100644 --- a/starknet-e2e-test/ethereum_e2e_settlement.rs +++ b/starknet-e2e-test/ethereum_settlement.rs @@ -1,41 +1,37 @@ extern crate starknet_e2e_test; -use std::fs::{create_dir_all, File}; use std::time::Duration; use assert_matches::assert_matches; use async_trait::async_trait; -use ethers::providers::Middleware; use madara_runtime::opaque::Block; -use madara_test_runner::{MadaraRunner, Settlement}; -use mc_settlement::ethereum::client::EthereumConfig; +use madara_test_runner::node::MadaraTempDir; +use madara_test_runner::{MadaraArgs, MadaraRunner, Settlement}; use mc_settlement::ethereum::StarknetContractClient; use mc_settlement::{SettlementProvider, StarknetState}; use rstest::rstest; -use starknet_api::serde_utils::hex_str_from_bytes; -use starknet_e2e_test::ethereum_sandbox::EthereumSandbox; -use starknet_e2e_test::starknet_contract::{InitData, StarknetContract}; -use tempfile::TempDir; +use starknet_e2e_test::starknet_sovereign::StarknetSovereign; use test_context::{test_context, AsyncTestContext}; use tokio::time::sleep; struct Context { - pub madara_path: TempDir, - pub sandbox: EthereumSandbox, - pub starknet_contract: StarknetContract, + pub madara_temp_dir: MadaraTempDir, + pub starknet_sovereign: StarknetSovereign, } impl Context { - pub async fn initialize(&self, data: InitData) { - self.starknet_contract.initialize(&self.sandbox, data).await; - } - pub async fn launch_madara(&self) -> MadaraRunner { - MadaraRunner::new(Some(Settlement::Ethereum), Some(self.madara_path.path().to_path_buf())).await + let settlement_conf = self.starknet_sovereign.create_settlement_conf(self.madara_temp_dir.data_path()).await; + MadaraRunner::new(MadaraArgs { + settlement: Some(Settlement::Ethereum), + settlement_conf: Some(settlement_conf), + base_path: Some(self.madara_temp_dir.base_path()), + }) + .await } pub async fn read_state(&self) -> StarknetState { - let client = StarknetContractClient::new(self.starknet_contract.address(), self.sandbox.client()); + let client = StarknetContractClient::new(self.starknet_sovereign.address(), self.starknet_sovereign.client()); SettlementProvider::::get_state(&client).await.expect("Failed to get state") } } @@ -43,56 +39,16 @@ impl Context { #[async_trait] impl AsyncTestContext for Context { async fn setup() -> Self { - let sandbox = EthereumSandbox::new(); - let starknet_contract = StarknetContract::deploy(&sandbox).await; - - let madara_path = TempDir::with_prefix("madara").expect("Failed to create Madara path"); - let config_dir = madara_path.path().join("chains/dev"); // data path - create_dir_all(&config_dir).unwrap(); - - let config = EthereumConfig { - http_provider: sandbox.client().provider().url().to_string(), - core_contracts: hex_str_from_bytes::<20, true>(starknet_contract.address().0), - chain_id: sandbox.client().get_chainid().await.expect("Failed to get sandbox chain ID").as_u64(), - poll_interval_ms: Some(10u64), // Default is 7s, we need to speed things up - ..Default::default() - }; - - let config_file = File::create(config_dir.join("eth-config.json")).expect("Failed to open file for writing"); - serde_json::to_writer(config_file, &config).expect("Failed to write eth config"); - - Self { madara_path, sandbox, starknet_contract } + let starknet_sovereign = StarknetSovereign::deploy().await; + let madara_temp_dir = MadaraTempDir::default(); + Self { madara_temp_dir, starknet_sovereign } } async fn teardown(self) { - self.madara_path.close().expect("Failed to clean up"); + self.madara_temp_dir.clear(); } } -#[test_context(Context)] -#[rstest] -#[tokio::test] -async fn works_with_initialized_contract(ctx: &mut Context) -> Result<(), anyhow::Error> { - // Troubleshooting: - // RUST_LOG=mc_settlement=trace MADARA_LOG=1 cargo test --package starknet-e2e-test - // works_with_initialized_contract -- --nocapture - - // At this point we have: - // * spawned Ethereum sandbox - // * deployed settlement contract (not initialized yet) - // * temp Madara path with correct ethereum config - ctx.initialize(InitData::sn_goerli()).await; - - let mut madara = ctx.launch_madara().await; - - madara.create_n_blocks(3).await?; - sleep(Duration::from_millis(300)).await; - - assert_eq!(ctx.read_state().await, StarknetState { block_number: 3u64.into(), state_root: 0u64.into() }); - - Ok(()) -} - #[test_context(Context)] #[rstest] #[tokio::test] @@ -103,7 +59,7 @@ async fn recovers_from_non_initialized_state(ctx: &mut Context) -> Result<(), an // Give the client thread some time to handle the finalized block sleep(Duration::from_millis(100)).await; - ctx.initialize(InitData::sn_goerli()).await; + ctx.starknet_sovereign.initialize_for_goerli(0u64.into(), 0u64.into()).await; madara.create_empty_block().await?; // Give the client thread some time to recover @@ -121,7 +77,7 @@ async fn recovers_from_non_initialized_state(ctx: &mut Context) -> Result<(), an #[rstest] #[tokio::test] async fn catches_up_with_the_state_in_the_future(ctx: &mut Context) -> Result<(), anyhow::Error> { - ctx.initialize(InitData { block_number: 1u64.into(), ..InitData::sn_goerli() }).await; + ctx.starknet_sovereign.initialize_for_goerli(1u64.into(), 0u64.into()).await; let mut madara = ctx.launch_madara().await; @@ -139,7 +95,7 @@ async fn catches_up_with_the_state_in_the_future(ctx: &mut Context) -> Result<() #[rstest] #[tokio::test] async fn fails_with_inconsistent_state_in_the_future(ctx: &mut Context) -> Result<(), anyhow::Error> { - ctx.initialize(InitData { block_number: 1u64.into(), state_root: 12345u64.into(), ..InitData::sn_goerli() }).await; + ctx.starknet_sovereign.initialize_for_goerli(1u64.into(), 12345u64.into()).await; let mut madara = ctx.launch_madara().await; @@ -157,7 +113,7 @@ async fn fails_with_inconsistent_state_in_the_future(ctx: &mut Context) -> Resul #[rstest] #[tokio::test] async fn fails_with_inconsistent_starknet_spec(ctx: &mut Context) -> Result<(), anyhow::Error> { - ctx.initialize(InitData::one()).await; + ctx.starknet_sovereign.initialize(1u64.into(), 0u64.into()).await; let mut madara = ctx.launch_madara().await; diff --git a/starknet-e2e-test/src/ethereum_sandbox.rs b/starknet-e2e-test/src/ethereum_sandbox.rs deleted file mode 100644 index 3ca40df7e1..0000000000 --- a/starknet-e2e-test/src/ethereum_sandbox.rs +++ /dev/null @@ -1,73 +0,0 @@ -use std::env; -use std::path::PathBuf; -use std::sync::Arc; -use std::time::Duration; - -use ethers::abi::Tokenize; -use ethers::contract::{ContractFactory, ContractInstance}; -use ethers::core::utils::Anvil; -use ethers::prelude::SignerMiddleware; -use ethers::providers::{Http, Provider}; -use ethers::signers::{LocalWallet, Signer}; -use ethers::types::Address; -use ethers::utils::AnvilInstance; -use ethers_solc::artifacts::contract::ContractBytecode; - -type AnvilClient = SignerMiddleware, LocalWallet>; - -pub struct EthereumSandbox { - _anvil: AnvilInstance, - client: Arc, -} - -impl EthereumSandbox { - pub fn new() -> Self { - let anvil_path: PathBuf = env::var("ANVIL_PATH") - .map(Into::into) - .unwrap_or_else(|_| home::home_dir().unwrap().join(".foundry/bin/anvil")); - let anvil = Anvil::at(anvil_path).spawn(); - - let provider = Provider::::try_from(anvil.endpoint()) - .expect("Failed to connect to Anvil") - .interval(Duration::from_millis(10u64)); - - let wallet: LocalWallet = anvil.keys()[0].clone().into(); - let client = SignerMiddleware::new(provider.clone(), wallet.with_chain_id(anvil.chain_id())); - - Self { _anvil: anvil, client: Arc::new(client) } - } - - pub fn client(&self) -> Arc { - self.client.clone() - } - - pub fn address(&self) -> Address { - self.client.address() - } - - pub async fn deploy( - &self, - build_artifacts: &str, - contructor_args: T, - ) -> ContractInstance, AnvilClient> { - let artifacts: ContractBytecode = - serde_json::from_str(build_artifacts).expect("Failed to parse build artifacts"); - let abi = artifacts.abi.unwrap(); - let bytecode = artifacts.bytecode.unwrap().object.into_bytes().unwrap(); - - let factory = ContractFactory::new(abi, bytecode, self.client.clone()); - - factory - .deploy(contructor_args) - .expect("Failed to deploy contract") - .send() - .await - .expect("Ethereum polling error") - } -} - -impl Default for EthereumSandbox { - fn default() -> Self { - Self::new() - } -} diff --git a/starknet-e2e-test/src/lib.rs b/starknet-e2e-test/src/lib.rs index 50ac51fa97..33f3fec050 100644 --- a/starknet-e2e-test/src/lib.rs +++ b/starknet-e2e-test/src/lib.rs @@ -1,2 +1 @@ -pub mod ethereum_sandbox; -pub mod starknet_contract; +pub mod starknet_sovereign; diff --git a/starknet-e2e-test/src/starknet_contract.rs b/starknet-e2e-test/src/starknet_contract.rs deleted file mode 100644 index 19f85d0e8c..0000000000 --- a/starknet-e2e-test/src/starknet_contract.rs +++ /dev/null @@ -1,190 +0,0 @@ -use ethers::prelude::abigen; -use ethers::types::{Address, Bytes, U256}; -use ethers::utils::keccak256; -use mc_settlement::ethereum::convert_felt_to_u256; -use mp_felt::Felt252Wrapper; -use mp_messages::{MessageL1ToL2, MessageL2ToL1}; -use mp_snos_output::SnosCodec; -use starknet_api::hash::StarkFelt; -use starknet_ff::FieldElement; - -use crate::ethereum_sandbox::EthereumSandbox; - -const STARKNET_VALIDIUM: &str = include_str!("../contracts/artifacts/Starknet.json"); -const UNSAFE_PROXY: &str = include_str!("../contracts/artifacts/UnsafeProxy.json"); - -// Starknet core contract cannot be initialized directly hence we use a proxy for that. -// In order to initialize the contract we need to provide the following data: -// 0. Sub-proxy contracts - none in our case -// 1. External initializer contract (EIC) - zero in our case -// 2. Program hash - non-zero, otherwise will be considered invalid -// 3. Verifier address -// 4. Config hash -// 5. Global state root (genesis) -// 6. Block number (genesis) -// 7. Block hash (genesis) -// -// Once we have an initialized contract we also need to assign operator - -// the account we will use for updating the state. -abigen!( - StarknetInitializer, - r#"[ - function initialize(bytes calldata data) external - function registerOperator(address newOperator) external - ]"#, -); - -// Starknet messaging interface for testing purposes. -abigen!( - StarknetMessaging, - r#"[ - function sendMessageToL2(uint256 toAddress, uint256 selector, uint256[] calldata payload) external payable returns (bytes32, uint256) - function l1ToL2Messages(bytes32 msgHash) external view returns (uint256) - function l2ToL1Messages(bytes32 msgHash) external view returns (uint256) - ]"#, -); - -#[derive(Clone, Debug, Default)] -pub struct InitData { - pub program_hash: StarkFelt, - pub verifier_address: StarkFelt, - pub config_hash: StarkFelt, - pub state_root: StarkFelt, - pub block_number: StarkFelt, - pub block_hash: StarkFelt, -} - -impl From for Bytes { - // No dynamic fields, so the encoding is pretty straightforward: - // - // abi.encode(data, (uint256, address, uint256, StarknetState.State)); - // where struct State { - // uint256 globalRoot; - // int256 blockNumber; - // uint256 blockHash; - // } - fn from(val: InitData) -> Self { - let mut bytes = [0u8; 7 * 32]; - // Recall: - // * None sub-proxy contracts - // * First 32 bytes are for the EIC - not specified - bytes[32..64].copy_from_slice(val.program_hash.bytes()); - bytes[64..96].copy_from_slice(val.verifier_address.bytes()); - bytes[96..128].copy_from_slice(val.config_hash.bytes()); - bytes[128..160].copy_from_slice(val.state_root.bytes()); - bytes[160..192].copy_from_slice(val.block_number.bytes()); - bytes[192..224].copy_from_slice(val.block_hash.bytes()); - bytes.into() - } -} - -impl InitData { - /// Use the same config as in Starknet Goerli testnet - pub fn sn_goerli() -> Self { - Self { - // See SN_OS_PROGRAM_HASH constant - program_hash: StarkFelt::from(Felt252Wrapper::from( - FieldElement::from_hex_be("0x41fc2a467ef8649580631912517edcab7674173f1dbfa2e9b64fbcd82bc4d79").unwrap(), - )), - // Hash version: SN_OS_CONFIG_HASH_VERSION (settlement) - // Chain ID: SN_GOERLI_CHAIN_ID (pallet config) - // Fee token address: 0x49d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7 (genesis config) - config_hash: StarkFelt::from(Felt252Wrapper::from( - FieldElement::from_hex_be("0x036f5e4ea4dd042801c8841e3db8e654124305da0f11824fc1db60c405dbb39f") - .unwrap(), - )), - ..Default::default() - } - } - - pub fn one() -> Self { - Self { program_hash: 1u64.into(), config_hash: 1u64.into(), ..Default::default() } - } -} - -pub struct StarknetContract { - address: Address, -} - -impl StarknetContract { - pub async fn deploy(sandbox: &EthereumSandbox) -> Self { - // First we deploy the Starknet contract (no explicit contructor) - let snos_contract = sandbox.deploy(STARKNET_VALIDIUM, ()).await; - - // Then we deploy a simple delegate proxy to interact with Starknet contract (initialized with its - // address) - let proxy_contract = sandbox.deploy(UNSAFE_PROXY, snos_contract.address()).await; - - // We will use proxy to interact with the Starknet core contract - Self { address: proxy_contract.address() } - } - - pub fn address(&self) -> Address { - self.address - } - - pub async fn initialize(&self, sandbox: &EthereumSandbox, data: InitData) { - // This is the initialization interface - let initializer = StarknetInitializer::new(self.address, sandbox.client()); - - // 1. Provide Starknet OS program/config and genesis state - initializer - .initialize(data.into()) - .send() - .await - .expect("Failed to call `initialize`") - .await - .expect("Ethereum poll update error") - .unwrap(); - - // 2. Add our EOA as Starknet operator - initializer - .register_operator(sandbox.address()) - .send() - .await - .expect("Failed to call `register_operator`") - .await - .expect("Ethereum poll update error") - .unwrap(); - } - - pub async fn send_message_to_l2(&self, sandbox: &EthereumSandbox, message: &MessageL1ToL2) { - let messaging = StarknetMessaging::new(self.address, sandbox.client()); - - messaging.send_message_to_l2( - convert_felt_to_u256(message.to_address.0.0), - convert_felt_to_u256(message.selector), - message.payload.clone().into_iter().map(convert_felt_to_u256).collect()) - .value(1) // L1 message fee must be between 0 and 1 ether - .send() - .await - .expect("Failed to call `send_message_to_l2`") - .await - .expect("Ethereum poll update error") - .unwrap(); - } - - pub async fn message_to_l1_exists(&self, sandbox: &EthereumSandbox, message: &MessageL2ToL1) -> bool { - let messaging = StarknetMessaging::new(self.address, sandbox.client()); - - let mut payload: Vec = Vec::new(); - message.clone().into_encoded_vec().into_iter().for_each(|felt| payload.append(&mut felt.bytes().to_vec())); - - let msg_hash = keccak256(payload); - let res = messaging.l_2_to_l1_messages(msg_hash).call().await.expect("Failed to call `l_2_to_l1_messages`"); - - res != U256::zero() - } - - pub async fn message_to_l2_exists(&self, sandbox: &EthereumSandbox, message: &MessageL1ToL2) -> bool { - let messaging = StarknetMessaging::new(self.address, sandbox.client()); - - let mut payload: Vec = Vec::new(); - message.clone().into_encoded_vec().into_iter().for_each(|felt| payload.append(&mut felt.bytes().to_vec())); - - let msg_hash = keccak256(payload); - let res = messaging.l_1_to_l2_messages(msg_hash).call().await.expect("Failed to call `l_2_to_l1_messages`"); - - res != U256::zero() - } -} diff --git a/starknet-e2e-test/src/starknet_sovereign.rs b/starknet-e2e-test/src/starknet_sovereign.rs new file mode 100644 index 0000000000..1087b92c65 --- /dev/null +++ b/starknet-e2e-test/src/starknet_sovereign.rs @@ -0,0 +1,171 @@ +use std::fs::File; +use std::path::PathBuf; +use std::sync::Arc; + +use ethers::providers::Middleware; +use ethers::types::{Address, I256, U256}; +use ethers::utils::keccak256; +use mc_settlement::ethereum::client::EthereumConfig; +use mc_settlement::ethereum::convert_felt_to_u256; +use mp_felt::Felt252Wrapper; +use mp_messages::{MessageL1ToL2, MessageL2ToL1}; +use mp_snos_output::SnosCodec; +use starknet_api::hash::StarkFelt; +use starknet_api::serde_utils::hex_str_from_bytes; +use starknet_core_contract_client::clients::StarknetSovereignContractClient; +use starknet_core_contract_client::interfaces::{ + CoreContractInitData, CoreContractState, OperatorTrait, ProxyInitializeData, ProxySupportTrait, + StarknetMessagingTrait, +}; +use starknet_core_contract_client::{LocalWalletSignerMiddleware, StarknetCoreContractClient}; +use starknet_ff::FieldElement; +use zaun_sandbox::unsafe_proxy::deploy_starknet_sovereign_behind_unsafe_proxy; +use zaun_sandbox::EthereumSandbox; + +pub struct StarknetSovereign { + _sandbox: EthereumSandbox, + client: StarknetSovereignContractClient, +} + +impl StarknetSovereign { + pub fn address(&self) -> Address { + self.client.address() + } + + pub fn client(&self) -> Arc { + self.client.client() + } + + /// Attach to an existing Anvil instance or spawn a new one + /// and then deploy: + /// - Starknet core contract (sovereign mode) + /// - Unsafe delegate proxy (no access restrictions) + /// All the following interactions will be made thorugh the proxy + pub async fn deploy() -> Self { + // Try to attach to an already running sandbox (GitHub CI case) + // otherwise spawn new sandbox instance + let sandbox = if let Ok(endpoint) = std::env::var("ANVIL_ENDPOINT") { + EthereumSandbox::attach(Some(endpoint)).expect("Failed to attach to sandbox") + } else { + EthereumSandbox::spawn(None) + }; + + let client = deploy_starknet_sovereign_behind_unsafe_proxy(sandbox.client()) + .await + .expect("Failed to deploy starknet contract"); + + Self { _sandbox: sandbox, client } + } + + /// Write Ethereum settlement config to the specified Madara data folder + /// (usually /chains//). The settlement config contains: + /// - Anvil endpoint and chain ID + /// - Delegate proxy contract address + /// - Sequencer private key (Anvil defaults) + /// - Transaction poll interval (reduced for testing purposes) + /// + /// Returns path to the settlement config (has to be passed as a Madara node argument) + pub async fn create_settlement_conf(&self, data_path: PathBuf) -> PathBuf { + let settlement_conf = EthereumConfig { + http_provider: self.client.client().provider().url().to_string(), + core_contracts: hex_str_from_bytes::<20, true>(self.client.address().0), + chain_id: self.client.client().get_chainid().await.expect("Failed to get sandbox chain ID").as_u64(), + poll_interval_ms: Some(10u64), // Default is 7s, we need to speed things up + ..Default::default() + }; + + let conf_path = data_path.join("eth-config.json"); + let conf_file = File::create(&conf_path).expect("Failed to open file for writing"); + serde_json::to_writer(conf_file, &settlement_conf).expect("Failed to write settlement config"); + + conf_path + } + + /// Initialize Starknet core contract with the specified data. + /// + /// Also register Anvil default account as an operator. + pub async fn initialize_with(&self, init_data: CoreContractInitData) { + let data = ProxyInitializeData::<0> { sub_contract_addresses: [], eic_address: Default::default(), init_data }; + + self.client.initialize_with(data).await.expect("Failed to initialize"); + + self.client.register_operator(self.client.client().address()).await.expect("Failed to register operator"); + } + + /// Initialize Starknet core contract with the specified program and config hashes. + /// The rest of parameters will be left default. + /// + /// Also register Anvil default account as an operator. + pub async fn initialize(&self, program_hash: StarkFelt, config_hash: StarkFelt) { + self.initialize_with(CoreContractInitData { + program_hash: convert_felt_to_u256(program_hash), + config_hash: convert_felt_to_u256(config_hash), + ..Default::default() + }) + .await; + } + + /// Initialize Starknet core contract with the specified block number and state root hash. + /// The program and config hashes will be set according to the Madara Goerli configuration. + /// + /// Also register Anvil default account as an operator. + pub async fn initialize_for_goerli(&self, block_number: StarkFelt, state_root: StarkFelt) { + // See SN_OS_PROGRAM_HASH constant + let program_hash = StarkFelt::from(Felt252Wrapper::from( + FieldElement::from_hex_be("0x41fc2a467ef8649580631912517edcab7674173f1dbfa2e9b64fbcd82bc4d79").unwrap(), + )); + + // Hash version: SN_OS_CONFIG_HASH_VERSION (settlement) + // Chain ID: SN_GOERLI_CHAIN_ID (pallet config) + // Fee token address: 0x49d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7 (genesis + // config) + let config_hash = StarkFelt::from(Felt252Wrapper::from( + FieldElement::from_hex_be("0x036f5e4ea4dd042801c8841e3db8e654124305da0f11824fc1db60c405dbb39f").unwrap(), + )); + + let init_data = CoreContractInitData { + program_hash: convert_felt_to_u256(program_hash), // zero program hash would be deemed invalid + config_hash: convert_felt_to_u256(config_hash), + initial_state: CoreContractState { + block_number: I256::from_raw(convert_felt_to_u256(block_number)), + state_root: convert_felt_to_u256(state_root), + ..Default::default() + }, + ..Default::default() + }; + + self.initialize_with(init_data).await; + } + + pub async fn send_message_to_l2(&self, message: &MessageL1ToL2) { + self.client + .send_message_to_l2( + convert_felt_to_u256(message.to_address.0.0), + convert_felt_to_u256(message.selector), + message.payload.clone().into_iter().map(convert_felt_to_u256).collect(), + 1.into(), + ) + .await + .expect("Failed to call `send_message_to_l2`"); + } + + pub async fn message_to_l1_exists(&self, message: &MessageL2ToL1) -> bool { + let mut payload: Vec = Vec::new(); + message.clone().into_encoded_vec().into_iter().for_each(|felt| payload.append(&mut felt.bytes().to_vec())); + + let msg_hash = keccak256(payload); + let res = self.client.l2_to_l1_messages(msg_hash).await.expect("Failed to call `l2_to_l1_messages`"); + + res != U256::zero() + } + + pub async fn message_to_l2_exists(&self, message: &MessageL1ToL2) -> bool { + let mut payload: Vec = Vec::new(); + message.clone().into_encoded_vec().into_iter().for_each(|felt| payload.append(&mut felt.bytes().to_vec())); + + let msg_hash = keccak256(payload); + let res = self.client.l1_to_l2_messages(msg_hash).await.expect("Failed to call `l2_to_l1_messages`"); + + res != U256::zero() + } +} diff --git a/zaun b/zaun deleted file mode 160000 index 2b431a94c1..0000000000 --- a/zaun +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 2b431a94c194ad2efe62051811224c15e9196556