diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 349a8c64..009613cf 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -98,6 +98,12 @@ jobs: id: test working-directory: protocol + - name: Check bindings + run: | + make check + working-directory: protocol + id: bindings + solidity-sdk: name: solidity-sdk runs-on: ubuntu-latest @@ -128,6 +134,7 @@ jobs: forge test -vvv id: test working-directory: solidity-sdk + optimistic-auction: name: optimistic-auction diff --git a/.rustfmt.toml b/.rustfmt.toml index a50dfef8..55129603 100644 --- a/.rustfmt.toml +++ b/.rustfmt.toml @@ -4,5 +4,6 @@ ignore = [ "examples/optimistic-auction/bindings", "examples/voting/bindings", "examples/auction/bindings", - "examples/notary/bindings" + "examples/notary/bindings", + "protocol/bindings" ] diff --git a/Cargo.lock b/Cargo.lock index f93cbddd..0e81f3c8 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -317,6 +317,7 @@ dependencies = [ "derive_arbitrary", "derive_more", "foldhash", + "getrandom 0.3.3", "hashbrown 0.15.2", "indexmap 2.7.0", "itoa", @@ -781,9 +782,9 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.98" +version = "1.0.100" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e16d2d3311acee920a9eb8d33b8cbc1787ce4a264e85f964c2404b969bdcd487" +checksum = "a23eb6b1614318a8071c9b2521f36b424b2c83db5eb3a0fead4a6c0809af6e61" [[package]] name = "arbitrary" @@ -991,9 +992,9 @@ dependencies = [ "clap", "futures", "hex", - "pod-examples-solidity", - "pod-sdk", - "pod-types", + "pod-examples-solidity 0.2.0", + "pod-sdk 0.2.0", + "pod-types 0.2.0", "tokio", ] @@ -1271,6 +1272,23 @@ dependencies = [ "zeroize", ] +[[package]] +name = "bridge" +version = "0.1.0" +dependencies = [ + "alloy-network", + "alloy-primitives", + "alloy-provider", + "alloy-signer-local", + "alloy-sol-types", + "anyhow", + "dotenv", + "pod-protocol 0.1.0 (git+https://github.com/podnetwork/pod-sdk.git?rev=12abcb9b359dea94825a6d78fefa439e8857263d)", + "pod-sdk 0.2.0 (git+https://github.com/podnetwork/pod-sdk.git?rev=7cd15a0c5436182f3ce6f4115d69f2bd257dd8e3)", + "pod-types 0.2.0 (git+https://github.com/podnetwork/pod-sdk.git?rev=7cd15a0c5436182f3ce6f4115d69f2bd257dd8e3)", + "tokio", +] + [[package]] name = "bs58" version = "0.5.1" @@ -1293,7 +1311,7 @@ dependencies = [ "config", "hex", "multihash-codetable", - "pod-sdk", + "pod-sdk 0.2.0", "serde", "serde_ipld_dagcbor", "serde_json", @@ -2935,8 +2953,8 @@ dependencies = [ "clap", "futures", "hex", - "pod-sdk", - "pod-types", + "pod-sdk 0.2.0", + "pod-types 0.2.0", "tokio", ] @@ -2951,8 +2969,8 @@ dependencies = [ "hex", "humantime", "notary-bindings", - "pod-sdk", - "pod-types", + "pod-sdk 0.2.0", + "pod-types 0.2.0", "tokio", ] @@ -3242,7 +3260,7 @@ dependencies = [ "futures", "humantime", "op-alloy", - "pod-sdk", + "pod-sdk 0.2.0", "rand 0.9.1", "serde_json", "tokio", @@ -3260,10 +3278,10 @@ dependencies = [ "anyhow", "clap", "dotenv", - "pod-examples-solidity", + "pod-examples-solidity 0.2.0", "pod-optimistic-auction", - "pod-sdk", - "pod-types", + "pod-sdk 0.2.0", + "pod-types 0.2.0", "tokio", ] @@ -3471,6 +3489,15 @@ dependencies = [ "serde", ] +[[package]] +name = "pod-examples-solidity" +version = "0.2.0" +source = "git+https://github.com/podnetwork/pod-sdk.git?rev=7cd15a0c5436182f3ce6f4115d69f2bd257dd8e3#7cd15a0c5436182f3ce6f4115d69f2bd257dd8e3" +dependencies = [ + "alloy", + "serde", +] + [[package]] name = "pod-optimistic-auction" version = "0.1.0" @@ -3479,6 +3506,23 @@ dependencies = [ "serde", ] +[[package]] +name = "pod-protocol" +version = "0.1.0" +dependencies = [ + "alloy", + "serde", +] + +[[package]] +name = "pod-protocol" +version = "0.1.0" +source = "git+https://github.com/podnetwork/pod-sdk.git?rev=12abcb9b359dea94825a6d78fefa439e8857263d#12abcb9b359dea94825a6d78fefa439e8857263d" +dependencies = [ + "alloy", + "serde", +] + [[package]] name = "pod-sdk" version = "0.2.0" @@ -3499,13 +3543,40 @@ dependencies = [ "async-trait", "futures", "hex", - "pod-examples-solidity", - "pod-types", + "pod-examples-solidity 0.2.0", + "pod-types 0.2.0", "serde", "tokio-test", "tracing", ] +[[package]] +name = "pod-sdk" +version = "0.2.0" +source = "git+https://github.com/podnetwork/pod-sdk.git?rev=7cd15a0c5436182f3ce6f4115d69f2bd257dd8e3#7cd15a0c5436182f3ce6f4115d69f2bd257dd8e3" +dependencies = [ + "alloy-consensus", + "alloy-eips", + "alloy-json-rpc", + "alloy-network", + "alloy-primitives", + "alloy-provider", + "alloy-pubsub", + "alloy-rpc-types", + "alloy-signer", + "alloy-signer-local", + "alloy-sol-types", + "alloy-transport", + "anyhow", + "async-trait", + "futures", + "hex", + "pod-examples-solidity 0.2.0 (git+https://github.com/podnetwork/pod-sdk.git?rev=7cd15a0c5436182f3ce6f4115d69f2bd257dd8e3)", + "pod-types 0.2.0 (git+https://github.com/podnetwork/pod-sdk.git?rev=7cd15a0c5436182f3ce6f4115d69f2bd257dd8e3)", + "serde", + "tracing", +] + [[package]] name = "pod-types" version = "0.2.0" @@ -3523,7 +3594,7 @@ dependencies = [ "bytes", "hex", "itertools 0.13.0", - "pod-types", + "pod-types 0.2.0", "rand 0.9.1", "serde", "serde_json", @@ -3534,6 +3605,30 @@ dependencies = [ "utoipa", ] +[[package]] +name = "pod-types" +version = "0.2.0" +source = "git+https://github.com/podnetwork/pod-sdk.git?rev=7cd15a0c5436182f3ce6f4115d69f2bd257dd8e3#7cd15a0c5436182f3ce6f4115d69f2bd257dd8e3" +dependencies = [ + "alloy-consensus", + "alloy-primitives", + "alloy-rpc-types", + "alloy-signer", + "alloy-signer-local", + "alloy-sol-types", + "anyhow", + "base64 0.22.1", + "bytes", + "hex", + "itertools 0.13.0", + "serde", + "serde_with", + "thiserror 2.0.12", + "tokio", + "tracing", + "utoipa", +] + [[package]] name = "powerfmt" version = "0.2.0" @@ -3924,9 +4019,9 @@ dependencies = [ "env_logger", "futures", "hex", - "pod-examples-solidity", - "pod-sdk", - "pod-types", + "pod-examples-solidity 0.2.0", + "pod-sdk 0.2.0", + "pod-types 0.2.0", "tokio", ] @@ -4694,8 +4789,8 @@ dependencies = [ "clap", "futures", "hex", - "pod-sdk", - "pod-types", + "pod-sdk 0.2.0", + "pod-types 0.2.0", "tokio", ] @@ -4714,6 +4809,7 @@ dependencies = [ "signal-hook-registry", "socket2", "tokio-macros", + "tracing", "windows-sys 0.52.0", ] @@ -5126,8 +5222,8 @@ dependencies = [ "clap", "futures", "hex", - "pod-sdk", - "pod-types", + "pod-sdk 0.2.0", + "pod-types 0.2.0", "tokio", "voting-bindings", ] diff --git a/Cargo.toml b/Cargo.toml index 455f20a5..0f360084 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -6,11 +6,13 @@ members = [ "examples/notary", "examples/optimistic-auction", "examples/auction", + "examples/bridge-flow", "examples/rust", "examples/voting/client", "examples/nfts", "examples/tokens", "examples/bsky/plc", "examples/optimism-tx-auction", + "protocol/bindings", ] resolver = "2" diff --git a/examples/auction/main.rs b/examples/auction/main.rs index 251ff29f..510fd2a7 100644 --- a/examples/auction/main.rs +++ b/examples/auction/main.rs @@ -259,7 +259,7 @@ async fn watch(auction_id: U256, deadline: u64, rpc_url: String) -> Result<()> { match result { Ok(Ok(_)) => break, Ok(Err(e)) => return Err(e), - Err(e) => return Err(anyhow::anyhow!("Deadline task failed: {}", e)), + Err(e) => return Err(anyhow::anyhow!("Deadline task failed: {e}")), } } } diff --git a/examples/bridge-flow/.env.example b/examples/bridge-flow/.env.example new file mode 100644 index 00000000..756b8035 --- /dev/null +++ b/examples/bridge-flow/.env.example @@ -0,0 +1,8 @@ +POD_RPC_URL=http://localhost:8545 +POD_BRIDGE_CONTRACT_ADDRESS=0xpodbridgecontractaddress +POD_TOKEN_CONTRACT_ADDRESS=0xpodtokencontractaddress +SOURCE_CHAIN_RPC_URL=http://localhost:8546 +SOURCE_CHAIN_BRIDGE_CONTRACT_ADDRESS=0xsourcechainbridgecontractaddress +SOURCE_CHAIN_TOKEN_CONTRACT_ADDRESS=0xsourcetokendeployedaddress +USER_ADDRESS=0xuseraddress +USER_PRIVATE_KEY=userprivatekey \ No newline at end of file diff --git a/examples/bridge-flow/.gitignore b/examples/bridge-flow/.gitignore new file mode 100644 index 00000000..0b745e29 --- /dev/null +++ b/examples/bridge-flow/.gitignore @@ -0,0 +1,2 @@ +/target +.env \ No newline at end of file diff --git a/examples/bridge-flow/Cargo.toml b/examples/bridge-flow/Cargo.toml new file mode 100644 index 00000000..164706eb --- /dev/null +++ b/examples/bridge-flow/Cargo.toml @@ -0,0 +1,21 @@ +[package] +name = "bridge" +version = "0.1.0" +edition = "2024" + +[dependencies] +pod-sdk = { git = "https://github.com/podnetwork/pod-sdk.git", rev = "7cd15a0c5436182f3ce6f4115d69f2bd257dd8e3" } +pod-types = { git = "https://github.com/podnetwork/pod-sdk.git", rev = "7cd15a0c5436182f3ce6f4115d69f2bd257dd8e3" } +alloy-network = "1.0.24" +alloy-primitives = { version = "1.3.0", features = [ + "k256", + "serde", + "getrandom", +] } +alloy-provider = { version = "1.0.24", features = ["pubsub", "ws"] } +alloy-signer-local = "1.0.24" +alloy-sol-types = "1.3.0" +pod-protocol = { git = "https://github.com/podnetwork/pod-sdk.git", rev = "12abcb9b359dea94825a6d78fefa439e8857263d" } +dotenv = "0.15.0" +anyhow = "1.0.100" +tokio = { version = "1.43.1", features = ["full", "tracing"] } diff --git a/examples/bridge-flow/src/main.rs b/examples/bridge-flow/src/main.rs new file mode 100644 index 00000000..c69fcb81 --- /dev/null +++ b/examples/bridge-flow/src/main.rs @@ -0,0 +1,673 @@ +use alloy_sol_types::SolEvent; +use dotenv::dotenv; + +use alloy_network::{Ethereum, EthereumWallet, ReceiptResponse}; +use alloy_primitives::Address; +use alloy_provider::{ + Identity, RootProvider, + fillers::{ + BlobGasFiller, ChainIdFiller, FillProvider, GasFiller, JoinFill, NonceFiller, WalletFiller, + }, +}; +use alloy_signer_local::PrivateKeySigner; + +use anyhow::Result; +use pod_sdk::{ + Provider, ProviderBuilder, U256, + network::PodNetwork, + provider::{PodProvider, PodProviderBuilder}, +}; + +use pod_protocol::{ + bridge_deposit_withdraw::BridgeDepositWithdraw::BridgeDepositWithdrawInstance, + bridge_mint_burn::BridgeMintBurn::{BridgeMintBurnInstance, Deposit, DepositNative}, + wrapped_token::WrappedToken::WrappedTokenInstance, +}; + +use pod_types::{Hashable, ledger::log::VerifiableLog, rpc::filter::LogFilterBuilder}; + +use pod_protocol::bridge_deposit_withdraw::{ + MerkleTree::Proof, + PodECDSA::{ + Certificate as BridgeCertificate, CertifiedLog, CertifiedReceipt, Log as BridgeLog, + }, +}; + +use std::{env, str::FromStr, thread::sleep, time::Duration}; + +type SourceChainProviderType = FillProvider< + JoinFill< + JoinFill< + Identity, + JoinFill>>, + >, + WalletFiller, + >, + RootProvider, + Ethereum, +>; + +type SourceChainContractType = BridgeDepositWithdrawInstance< + FillProvider< + JoinFill< + JoinFill< + Identity, + JoinFill>>, + >, + WalletFiller, + >, + RootProvider, + Ethereum, + >, +>; + +struct PodBridgeClient { + pod_provider: PodProvider, + pod_bridge: BridgeMintBurnInstance, + pod_token_contract: WrappedTokenInstance, +} + +struct SourceChainBridgeClient { + source_chain_provider: SourceChainProviderType, + source_chain_contract: SourceChainContractType, + source_chain_token_contract: WrappedTokenInstance, +} + +fn get_certified_log(log: &VerifiableLog) -> Result { + let proof = log.generate_proof().unwrap(); + let leaf = log.get_leaf(); + + Ok(CertifiedLog { + log: BridgeLog { + addr: log.inner.address(), + topics: log.inner.topics().to_vec(), + data: log.inner.data().data.clone(), + }, + logIndex: U256::from(log.inner.log_index.unwrap()), + certificate: BridgeCertificate { + certifiedReceipt: CertifiedReceipt { + receiptRoot: log.pod_metadata.receipt.hash_custom(), + aggregateSignature: log.aggregate_signatures().into(), + sortedAttestationTimestamps: log.get_sorted_attestation_timestamps_in_seconds(), + }, + leaf, + proof: Proof { path: proof.path }, + }, + }) +} + +impl SourceChainBridgeClient { + pub async fn new( + source_chain_rpc_url: String, + source_chain_contract_address: Address, + source_chain_token_contract_address: Address, + signer: PrivateKeySigner, + ) -> Result { + let wallet = EthereumWallet::from(signer); + + let source_chain_provider = ProviderBuilder::new() + .wallet(wallet.clone()) + .connect_http(source_chain_rpc_url.parse()?); + + let source_chain_contract = BridgeDepositWithdrawInstance::new( + source_chain_contract_address, + source_chain_provider.clone(), + ); + + let source_chain_token_contract = WrappedTokenInstance::new( + source_chain_token_contract_address, + source_chain_provider.clone(), + ); + + Ok(Self { + source_chain_provider, + source_chain_contract, + source_chain_token_contract, + }) + } + + pub async fn deposit_native(&self, to: Address, value: U256) -> Result<(U256, u64)> { + let tx = self + .source_chain_contract + .depositNative(to) + .max_fee_per_gas(1_000_000_000u128) + .max_priority_fee_per_gas(0) + .value(value) + .send() + .await?; + + sleep(Duration::from_millis(100)); + + println!("Successfully deposited {value} native to address: {to}"); + + let receipt = self + .source_chain_provider + .get_transaction_receipt(*tx.tx_hash()) + .await? + .unwrap(); + + assert!(receipt.status()); + assert!(receipt.logs().len() == 1); + + for log in receipt.logs() { + let event_signature = log.topic0(); + if Some(*event_signature.unwrap()) == Some(DepositNative::SIGNATURE_HASH) { + let request_id = log.topics()[1]; + let block_number = receipt.block_number(); + if let Some(block_number) = block_number { + return Ok((request_id.into(), block_number)); + } + } + } + + Err(anyhow::anyhow!("Request ID not found")) + } + + pub async fn deposit_token(&self, to: Address, amount: U256) -> Result<(U256, Address, u64)> { + let tx = self + .source_chain_contract + .deposit(*self.source_chain_token_contract.address(), amount, to) + .send() + .await?; + + sleep(Duration::from_millis(1000)); + + let receipt = self + .source_chain_provider + .get_transaction_receipt(*tx.tx_hash()) + .await? + .unwrap(); + + assert!(receipt.status()); + assert!(receipt.logs().len() == 2); + + println!("Successfully deposited {amount} token to address: {to}"); + + for log in receipt.logs() { + let event_signature = log.topic0(); + if Some(*event_signature.unwrap()) == Some(Deposit::SIGNATURE_HASH) { + let request_id = log.topics()[1]; + let token_address = log.topics()[2]; + let block_number = receipt.block_number(); + if let Some(block_number) = block_number { + return Ok(( + request_id.into(), + Address::from_slice(&token_address.0[12..]), + block_number, + )); + } + } + } + + Err(anyhow::anyhow!("Request ID not found")) + } + + pub async fn claim_token(&self, certified_log: CertifiedLog) -> Result<()> { + let tx = self + .source_chain_contract + .claim(certified_log) + .send() + .await?; + + sleep(Duration::from_millis(100)); + + let receipt = self + .source_chain_provider + .get_transaction_receipt(*tx.tx_hash()) + .await? + .unwrap(); + + assert!(receipt.status()); + assert!(receipt.logs().len() == 2); + + println!("Successfully claimed token from source chain"); + + Ok(()) + } + + pub async fn claim_native(&self, certified_log: CertifiedLog) -> Result<()> { + let tx = self + .source_chain_contract + .claimNative(certified_log) + .send() + .await?; + + sleep(Duration::from_millis(100)); + + let receipt = self + .source_chain_provider + .get_transaction_receipt(*tx.tx_hash()) + .await? + .unwrap(); + + assert!(receipt.status()); + assert!(receipt.logs().len() == 1); + + println!("Successfully claimed native from source chain",); + + Ok(()) + } +} + +impl PodBridgeClient { + pub async fn new( + pod_rpc_url: String, + pod_bridge_contract_address: Address, + pod_token_contract_address: Address, + signer: PrivateKeySigner, + ) -> Result { + let wallet = EthereumWallet::from(signer); + + let pod_provider = PodProviderBuilder::with_recommended_settings() + .wallet(wallet.clone()) + .on_url(pod_rpc_url) + .await?; + + let pod_bridge = + BridgeMintBurnInstance::new(pod_bridge_contract_address, pod_provider.clone()); + + let pod_token_contract = + WrappedTokenInstance::new(pod_token_contract_address, pod_provider.clone()); + + Ok(Self { + pod_provider, + pod_bridge, + pod_token_contract, + }) + } + + pub async fn deposit_native(&self, to: Address, value: U256) -> Result { + let tx = self + .pod_bridge + .depositNative(to) + .value(value) + .send() + .await + .unwrap(); + + let receipt = tx.get_receipt().await?; + + assert!(receipt.status()); + assert!(receipt.receipt.logs().len() == 1); + + println!("Successfully deposited {value} native to address: {to}"); + + for log in receipt.logs() { + let event_signature = log.topic0(); + if Some(*event_signature.unwrap()) == Some(DepositNative::SIGNATURE_HASH) { + let request_id = log.topics()[1]; + return Ok(request_id.into()); + } + } + Err(anyhow::anyhow!("Request ID not found")) + } + + pub async fn deposit_token(&self, to: Address, amount: U256) -> Result<(U256, Address)> { + let tx = self + .pod_bridge + .deposit(*self.pod_token_contract.address(), amount, to) + .max_fee_per_gas(1_000_000_000u128) + .max_priority_fee_per_gas(0) + .send() + .await + .unwrap(); + + let receipt = tx.get_receipt().await?; + + assert!(receipt.status()); + assert!(receipt.logs().len() == 2); + + println!("Successfully deposited {amount} token to address: {to}"); + + for log in receipt.logs() { + let event_signature = log.topic0(); + if Some(*event_signature.unwrap()) == Some(Deposit::SIGNATURE_HASH) { + let request_id = log.topics()[1]; + let token_address = log.topics()[2]; + return Ok(( + request_id.into(), + Address::from_slice(&token_address.0[12..]), + )); + } + } + Err(anyhow::anyhow!("Request ID not found")) + } + + pub async fn claim_token( + &self, + request_id: U256, + token_address: Address, + block_number: U256, + to: Address, + ) -> Result<()> { + let tx = self + .pod_bridge + .claim(request_id, token_address, block_number) + .send() + .await?; + + let receipt = tx.get_receipt().await?; + + assert!(receipt.status()); + assert!(receipt.logs().len() == 2); + + println!("Successfully claimed request id: {request_id} by address: {to}"); + + Ok(()) + } + + pub async fn claim_native( + &self, + request_id: U256, + block_number: U256, + to: Address, + ) -> Result<()> { + let prev_balance = self.pod_provider.get_balance(to).await?; + + let tx = self + .pod_bridge + .claimNative(request_id, block_number) + .send() + .await?; + + let receipt = tx.get_receipt().await?; + + assert!(receipt.status()); + assert!(self.pod_provider.get_balance(to).await? > prev_balance); + + println!("Successfully claimed request id: {request_id} by address: {to}"); + + Ok(()) + } + + pub async fn get_deposit_native_certified_log(&self, request_id: U256) -> Result { + let filter = LogFilterBuilder::new() + .address(Address::from(self.pod_bridge.address().0)) + .event_signature(DepositNative::SIGNATURE_HASH) + .topic1(request_id) + .build(); + + sleep(Duration::from_millis(1000)); + + let logs = self.pod_provider.get_verifiable_logs(&filter).await?; + + assert_eq!(logs.len(), 1); + let log = &logs[0]; + + let certified_log = get_certified_log(log)?; + + println!("Generated certified log for request id: {request_id}"); + + Ok(certified_log) + } + + pub async fn get_deposit_token_certified_log( + &self, + request_id: U256, + token_address: Address, + ) -> Result { + let token_address_filter = U256::from_str(&token_address.to_string())?; + let filter = LogFilterBuilder::new() + .address(Address::from(self.pod_bridge.address().0)) + .event_signature(Deposit::SIGNATURE_HASH) + .topic1(request_id) + .topic2(token_address_filter) + .build(); + + sleep(Duration::from_millis(1000)); + + let logs = self.pod_provider.get_verifiable_logs(&filter).await?; + + assert_eq!(logs.len(), 1); + let log = &logs[0]; + + let certified_log = get_certified_log(log)?; + + println!("Generated certified log for request id: {request_id}"); + + Ok(certified_log) + } +} + +#[tokio::main] +async fn main() -> Result<()> { + dotenv().ok(); + + let to = env::var("USER_ADDRESS").expect("USER_ADDRESS must be set"); + let to = Address::from_str(&to)?; + + let pod_rpc_url = env::var("POD_RPC_URL").expect("POD_RPC_URL must be set"); + let pod_bridge_contract_address = + env::var("POD_BRIDGE_CONTRACT_ADDRESS").expect("POD_BRIDGE_CONTRACT_ADDRESS must be set"); + let pod_bridge_contract_address = Address::from_str(&pod_bridge_contract_address)?; + let pod_token_contract_address = + env::var("POD_TOKEN_CONTRACT_ADDRESS").expect("POD_TOKEN_CONTRACT_ADDRESS must be set"); + let pod_token_contract_address = Address::from_str(&pod_token_contract_address)?; + + let source_chain_rpc_url = + env::var("SOURCE_CHAIN_RPC_URL").expect("SOURCE_CHAIN_RPC_URL must be set"); + let source_chain_contract_address = env::var("SOURCE_CHAIN_BRIDGE_CONTRACT_ADDRESS") + .expect("SOURCE_CHAIN_BRIDGE_CONTRACT_ADDRESS must be set"); + let source_chain_contract_address = Address::from_str(&source_chain_contract_address)?; + + let source_chain_token_contract_address = env::var("SOURCE_CHAIN_TOKEN_CONTRACT_ADDRESS") + .expect("SOURCE_CHAIN_TOKEN_CONTRACT_ADDRESS must be set"); + let source_chain_token_contract_address = + Address::from_str(&source_chain_token_contract_address)?; + + let user_private_key = env::var("USER_PRIVATE_KEY").expect("USER_PRIVATE_KEY must be set"); + let user_signer: PrivateKeySigner = user_private_key.parse()?; + + let source_chain_bridge_client = SourceChainBridgeClient::new( + source_chain_rpc_url.clone(), + source_chain_contract_address, + source_chain_token_contract_address, + user_signer.clone(), + ) + .await?; + + let pod_bridge_client = PodBridgeClient::new( + pod_rpc_url, + pod_bridge_contract_address, + pod_token_contract_address, + user_signer, + ) + .await?; + + let amount = U256::from(1000000000000000000u128); + + bridge_native_from_source_chain_to_pod( + &source_chain_bridge_client, + &pod_bridge_client, + to, + amount, + ) + .await?; + + bridge_native_from_pod_to_source_chain( + &pod_bridge_client, + &source_chain_bridge_client, + to, + amount, + ) + .await?; + + bridge_token_from_source_chain_to_pod( + &source_chain_bridge_client, + &pod_bridge_client, + to, + amount, + ) + .await?; + + bridge_token_from_pod_to_source_chain( + &pod_bridge_client, + &source_chain_bridge_client, + to, + amount, + ) + .await?; + + Ok(()) +} + +async fn bridge_native_from_source_chain_to_pod( + source_chain_bridge_client: &SourceChainBridgeClient, + pod_bridge_client: &PodBridgeClient, + to: Address, + value: U256, +) -> Result<()> { + let prev_balance_source = source_chain_bridge_client + .source_chain_provider + .get_balance(to) + .await?; + + let prev_balance_pod = pod_bridge_client.pod_provider.get_balance(to).await?; + + let (request_id, source_chain_block_number) = + source_chain_bridge_client.deposit_native(to, value).await?; + + pod_bridge_client + .claim_native(request_id, U256::from(source_chain_block_number), to) + .await?; + + sleep(Duration::from_millis(1000)); + + assert!(pod_bridge_client.pod_provider.get_balance(to).await? > prev_balance_pod); + assert!( + source_chain_bridge_client + .source_chain_provider + .get_balance(to) + .await? + < prev_balance_source + ); + + Ok(()) +} + +async fn bridge_native_from_pod_to_source_chain( + pod_bridge_client: &PodBridgeClient, + source_chain_bridge_client: &SourceChainBridgeClient, + to: Address, + value: U256, +) -> Result<()> { + let prev_balance_pod = pod_bridge_client.pod_provider.get_balance(to).await?; + let prev_balance_source = source_chain_bridge_client + .source_chain_provider + .get_balance(to) + .await?; + + let request_id = pod_bridge_client.deposit_native(to, value).await?; + + let certified_log = pod_bridge_client + .get_deposit_native_certified_log(request_id) + .await?; + + source_chain_bridge_client + .claim_native(certified_log) + .await?; + + assert!(pod_bridge_client.pod_provider.get_balance(to).await? < prev_balance_pod); + assert!( + source_chain_bridge_client + .source_chain_provider + .get_balance(to) + .await? + > prev_balance_source + ); + + Ok(()) +} + +async fn bridge_token_from_source_chain_to_pod( + source_chain_bridge_client: &SourceChainBridgeClient, + pod_bridge_client: &PodBridgeClient, + to: Address, + amount: U256, +) -> Result<()> { + let prev_balance_source = source_chain_bridge_client + .source_chain_token_contract + .balanceOf(to) + .call() + .await?; + let prev_balance_pod = pod_bridge_client + .pod_token_contract + .balanceOf(to) + .call() + .await?; + + let (request_id, token_address, block_number) = + source_chain_bridge_client.deposit_token(to, amount).await?; + + pod_bridge_client + .claim_token(request_id, token_address, U256::from(block_number), to) + .await?; + + assert!( + pod_bridge_client + .pod_token_contract + .balanceOf(to) + .call() + .await? + > prev_balance_pod + ); + + assert!( + source_chain_bridge_client + .source_chain_token_contract + .balanceOf(to) + .call() + .await? + < prev_balance_source + ); + + Ok(()) +} + +async fn bridge_token_from_pod_to_source_chain( + pod_bridge_client: &PodBridgeClient, + source_chain_bridge_client: &SourceChainBridgeClient, + to: Address, + amount: U256, +) -> Result<()> { + let prev_balance_pod = pod_bridge_client + .pod_token_contract + .balanceOf(to) + .call() + .await?; + let prev_balance_source = source_chain_bridge_client + .source_chain_token_contract + .balanceOf(to) + .call() + .await?; + + let (request_id, token_address) = pod_bridge_client.deposit_token(to, amount).await?; + + let certified_log = pod_bridge_client + .get_deposit_token_certified_log(request_id, token_address) + .await?; + + source_chain_bridge_client + .claim_token(certified_log) + .await?; + + assert!( + pod_bridge_client + .pod_token_contract + .balanceOf(to) + .call() + .await? + < prev_balance_pod + ); + + assert!( + source_chain_bridge_client + .source_chain_token_contract + .balanceOf(to) + .call() + .await? + > prev_balance_source + ); + + Ok(()) +} diff --git a/examples/optimistic-auction/contracts/AbsBonding.sol b/examples/optimistic-auction/contracts/AbsBonding.sol index b06326a8..dce2d00d 100644 --- a/examples/optimistic-auction/contracts/AbsBonding.sol +++ b/examples/optimistic-auction/contracts/AbsBonding.sol @@ -1,7 +1,7 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.8.20; -import {Ownable} from "openzeppelin-contracts/access/Ownable.sol"; +import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol"; abstract contract AbsBonding is Ownable { uint256 public immutable BOND_AMOUNT; diff --git a/examples/optimistic-auction/foundry.toml b/examples/optimistic-auction/foundry.toml index fbb4eef8..bdbaa529 100644 --- a/examples/optimistic-auction/foundry.toml +++ b/examples/optimistic-auction/foundry.toml @@ -10,7 +10,8 @@ remappings = [ "pod-sdk/=../../solidity-sdk/src/", "pod-protocol/=../../protocol/src", "pod-protocol-scripts/=../../protocol/script/", - "optimistic-auction/=contracts/" + "optimistic-auction/=contracts/", + "@openzeppelin/=lib/openzeppelin-contracts/", ] allow_paths = [ "../../solidity-sdk", diff --git a/examples/solidity/script/Deploy.s.sol b/examples/solidity/script/Deploy.s.sol index 72b03f19..a8efbc33 100644 --- a/examples/solidity/script/Deploy.s.sol +++ b/examples/solidity/script/Deploy.s.sol @@ -10,6 +10,9 @@ import {BaseDeployer} from "pod-protocol-scripts/BaseDeployer.s.sol"; import {PodRegistry} from "pod-protocol/PodRegistry.sol"; import {PodAuctionConsumer} from "optimistic-auction/PodAuctionConsumer.sol"; import {TestMintBalancePrecompile} from "../src/TestMintBalancePrecompile.sol"; +import {BridgeMintBurn} from "pod-protocol/BridgeMintBurn.sol"; +import {IBridge} from "pod-protocol/interfaces/IBridge.sol"; +import {WrappedToken} from "pod-protocol/WrappedToken.sol"; contract Deployer is BaseDeployer { function run() public { @@ -41,6 +44,27 @@ contract Deployer is BaseDeployer { TestMintBalancePrecompile testMintBalance = new TestMintBalancePrecompile(); console.log("TestMintBalancePrecompile contract deployed at:", address(testMintBalance)); + + address OTHER_BRIDGE_CONTRACT = makeAddr("otherBridgeContract"); + IBridge.TokenLimits memory nativeTokenLimits = + IBridge.TokenLimits({minAmount: 0.01 ether, deposit: 5000000 ether, claim: 4000000 ether}); + + BridgeMintBurn bridgeMintBurn = new BridgeMintBurn(OTHER_BRIDGE_CONTRACT, nativeTokenLimits, 0); + console.log("BridgeMintBurn deployed at:", address(bridgeMintBurn)); + + address MIRROR_TOKEN_ADDRESS = makeAddr("mirrorToken"); + + WrappedToken token = new WrappedToken("Test Token", "TEST", 18); + + console.log("Token deployed at:", address(token)); + + bridgeMintBurn.createAndWhitelistMirrorToken( + "Test Token", "TEST", address(token), address(MIRROR_TOKEN_ADDRESS), 18, nativeTokenLimits + ); + + token.grantRole(token.MINTER_ROLE(), address(bridgeMintBurn)); + token.grantRole(token.PAUSER_ROLE(), address(bridgeMintBurn)); + token.grantRole(token.DEFAULT_ADMIN_ROLE(), address(bridgeMintBurn)); } vm.stopBroadcast(); diff --git a/protocol/.env.example b/protocol/.env.example new file mode 100644 index 00000000..29057961 --- /dev/null +++ b/protocol/.env.example @@ -0,0 +1,7 @@ +PK_SOURCE_CHAIN=0xSourceChainPrivateKey +PK_POD=0xPodPrivateKey +POD_RPC=http://localhost:8545 +SOURCE_CHAIN_RPC=http://localhost:8546 +POD_COMMITTEE_KEYS=0xcc30Ffc732E52fbcF7Ea33915502b2F598BF2a90,0x6931FEd7fD06DDA83f1d5702b729e2E7EaAF6bAB,0x6fE9943790e826e77478B05e740Fc551240221F9,0x135D988A2747A1c61cF90D9492F87AaCeAB8EE2c +USER_ADDRESS=0xYourUserAddress +USER_PRIVATE_KEY=0xYourUserPrivateKey \ No newline at end of file diff --git a/protocol/.gitignore b/protocol/.gitignore index 85198aaa..98c97c73 100644 --- a/protocol/.gitignore +++ b/protocol/.gitignore @@ -6,6 +6,8 @@ out/ !/broadcast /broadcast/*/31337/ /broadcast/**/dry-run/ +/broadcast/*/1293/ +/broadcast/*/11155111/ # Docs docs/ diff --git a/protocol/Makefile b/protocol/Makefile new file mode 100644 index 00000000..8b8301dc --- /dev/null +++ b/protocol/Makefile @@ -0,0 +1,10 @@ +generate: + forge bind --crate-name pod-protocol --bindings-path ./bindings --alloy-version 1.0.24 --force --no-metadata --select "^BridgeMintBurn$$" --select "^BridgeDepositWithdraw$$" --select "^WrappedToken$$" --overwrite + +check: + forge bind --crate-name pod-protocol --bindings-path ./bindings --alloy-version 1.0.24 --force --no-metadata --select "^BridgeMintBurn$$" --select "^BridgeDepositWithdraw$$" --select "^WrappedToken$$" + + + +.PHONY: generate +.PHONY: check \ No newline at end of file diff --git a/protocol/bindings/Cargo.toml b/protocol/bindings/Cargo.toml new file mode 100644 index 00000000..b0ef5ac3 --- /dev/null +++ b/protocol/bindings/Cargo.toml @@ -0,0 +1,8 @@ +[package] +name = "pod-protocol" +version = "0.1.0" +edition = "2021" + +[dependencies] +alloy = { version = "1.0.24", features = ["sol-types", "contract"] } +serde = { version = "1.0", features = ["derive"] } \ No newline at end of file diff --git a/protocol/bindings/src/bridge_deposit_withdraw.rs b/protocol/bindings/src/bridge_deposit_withdraw.rs new file mode 100644 index 00000000..2eb0b807 --- /dev/null +++ b/protocol/bindings/src/bridge_deposit_withdraw.rs @@ -0,0 +1,12165 @@ +///Module containing a contract's types and functions. +/** + +```solidity +library IBridge { + struct TokenLimits { uint256 minAmount; uint256 deposit; uint256 claim; } + struct TokenUsage { uint256 consumed; uint256 lastUpdated; } +} +```*/ +#[allow( + non_camel_case_types, + non_snake_case, + clippy::pub_underscore_fields, + clippy::style, + clippy::empty_structs_with_brackets +)] +pub mod IBridge { + use super::*; + use alloy::sol_types as alloy_sol_types; + #[derive(serde::Serialize, serde::Deserialize)] + #[derive(Default, Debug, PartialEq, Eq, Hash)] + /**```solidity +struct TokenLimits { uint256 minAmount; uint256 deposit; uint256 claim; } +```*/ + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] + #[derive(Clone)] + pub struct TokenLimits { + #[allow(missing_docs)] + pub minAmount: alloy::sol_types::private::primitives::aliases::U256, + #[allow(missing_docs)] + pub deposit: alloy::sol_types::private::primitives::aliases::U256, + #[allow(missing_docs)] + pub claim: alloy::sol_types::private::primitives::aliases::U256, + } + #[allow( + non_camel_case_types, + non_snake_case, + clippy::pub_underscore_fields, + clippy::style + )] + const _: () = { + use alloy::sol_types as alloy_sol_types; + #[doc(hidden)] + type UnderlyingSolTuple<'a> = ( + alloy::sol_types::sol_data::Uint<256>, + alloy::sol_types::sol_data::Uint<256>, + alloy::sol_types::sol_data::Uint<256>, + ); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = ( + alloy::sol_types::private::primitives::aliases::U256, + alloy::sol_types::private::primitives::aliases::U256, + alloy::sol_types::private::primitives::aliases::U256, + ); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: TokenLimits) -> Self { + (value.minAmount, value.deposit, value.claim) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for TokenLimits { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { + minAmount: tuple.0, + deposit: tuple.1, + claim: tuple.2, + } + } + } + #[automatically_derived] + impl alloy_sol_types::SolValue for TokenLimits { + type SolType = Self; + } + #[automatically_derived] + impl alloy_sol_types::private::SolTypeValue for TokenLimits { + #[inline] + fn stv_to_tokens(&self) -> ::Token<'_> { + ( + as alloy_sol_types::SolType>::tokenize(&self.minAmount), + as alloy_sol_types::SolType>::tokenize(&self.deposit), + as alloy_sol_types::SolType>::tokenize(&self.claim), + ) + } + #[inline] + fn stv_abi_encoded_size(&self) -> usize { + if let Some(size) = ::ENCODED_SIZE { + return size; + } + let tuple = as ::core::convert::From>::from(self.clone()); + as alloy_sol_types::SolType>::abi_encoded_size(&tuple) + } + #[inline] + fn stv_eip712_data_word(&self) -> alloy_sol_types::Word { + ::eip712_hash_struct(self) + } + #[inline] + fn stv_abi_encode_packed_to( + &self, + out: &mut alloy_sol_types::private::Vec, + ) { + let tuple = as ::core::convert::From>::from(self.clone()); + as alloy_sol_types::SolType>::abi_encode_packed_to(&tuple, out) + } + #[inline] + fn stv_abi_packed_encoded_size(&self) -> usize { + if let Some(size) = ::PACKED_ENCODED_SIZE { + return size; + } + let tuple = as ::core::convert::From>::from(self.clone()); + as alloy_sol_types::SolType>::abi_packed_encoded_size(&tuple) + } + } + #[automatically_derived] + impl alloy_sol_types::SolType for TokenLimits { + type RustType = Self; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SOL_NAME: &'static str = ::NAME; + const ENCODED_SIZE: Option = as alloy_sol_types::SolType>::ENCODED_SIZE; + const PACKED_ENCODED_SIZE: Option = as alloy_sol_types::SolType>::PACKED_ENCODED_SIZE; + #[inline] + fn valid_token(token: &Self::Token<'_>) -> bool { + as alloy_sol_types::SolType>::valid_token(token) + } + #[inline] + fn detokenize(token: Self::Token<'_>) -> Self::RustType { + let tuple = as alloy_sol_types::SolType>::detokenize(token); + >>::from(tuple) + } + } + #[automatically_derived] + impl alloy_sol_types::SolStruct for TokenLimits { + const NAME: &'static str = "TokenLimits"; + #[inline] + fn eip712_root_type() -> alloy_sol_types::private::Cow<'static, str> { + alloy_sol_types::private::Cow::Borrowed( + "TokenLimits(uint256 minAmount,uint256 deposit,uint256 claim)", + ) + } + #[inline] + fn eip712_components() -> alloy_sol_types::private::Vec< + alloy_sol_types::private::Cow<'static, str>, + > { + alloy_sol_types::private::Vec::new() + } + #[inline] + fn eip712_encode_type() -> alloy_sol_types::private::Cow<'static, str> { + ::eip712_root_type() + } + #[inline] + fn eip712_encode_data(&self) -> alloy_sol_types::private::Vec { + [ + as alloy_sol_types::SolType>::eip712_data_word(&self.minAmount) + .0, + as alloy_sol_types::SolType>::eip712_data_word(&self.deposit) + .0, + as alloy_sol_types::SolType>::eip712_data_word(&self.claim) + .0, + ] + .concat() + } + } + #[automatically_derived] + impl alloy_sol_types::EventTopic for TokenLimits { + #[inline] + fn topic_preimage_length(rust: &Self::RustType) -> usize { + 0usize + + as alloy_sol_types::EventTopic>::topic_preimage_length( + &rust.minAmount, + ) + + as alloy_sol_types::EventTopic>::topic_preimage_length( + &rust.deposit, + ) + + as alloy_sol_types::EventTopic>::topic_preimage_length(&rust.claim) + } + #[inline] + fn encode_topic_preimage( + rust: &Self::RustType, + out: &mut alloy_sol_types::private::Vec, + ) { + out.reserve( + ::topic_preimage_length(rust), + ); + as alloy_sol_types::EventTopic>::encode_topic_preimage( + &rust.minAmount, + out, + ); + as alloy_sol_types::EventTopic>::encode_topic_preimage( + &rust.deposit, + out, + ); + as alloy_sol_types::EventTopic>::encode_topic_preimage( + &rust.claim, + out, + ); + } + #[inline] + fn encode_topic( + rust: &Self::RustType, + ) -> alloy_sol_types::abi::token::WordToken { + let mut out = alloy_sol_types::private::Vec::new(); + ::encode_topic_preimage( + rust, + &mut out, + ); + alloy_sol_types::abi::token::WordToken( + alloy_sol_types::private::keccak256(out), + ) + } + } + }; + #[derive(serde::Serialize, serde::Deserialize)] + #[derive(Default, Debug, PartialEq, Eq, Hash)] + /**```solidity +struct TokenUsage { uint256 consumed; uint256 lastUpdated; } +```*/ + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] + #[derive(Clone)] + pub struct TokenUsage { + #[allow(missing_docs)] + pub consumed: alloy::sol_types::private::primitives::aliases::U256, + #[allow(missing_docs)] + pub lastUpdated: alloy::sol_types::private::primitives::aliases::U256, + } + #[allow( + non_camel_case_types, + non_snake_case, + clippy::pub_underscore_fields, + clippy::style + )] + const _: () = { + use alloy::sol_types as alloy_sol_types; + #[doc(hidden)] + type UnderlyingSolTuple<'a> = ( + alloy::sol_types::sol_data::Uint<256>, + alloy::sol_types::sol_data::Uint<256>, + ); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = ( + alloy::sol_types::private::primitives::aliases::U256, + alloy::sol_types::private::primitives::aliases::U256, + ); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: TokenUsage) -> Self { + (value.consumed, value.lastUpdated) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for TokenUsage { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { + consumed: tuple.0, + lastUpdated: tuple.1, + } + } + } + #[automatically_derived] + impl alloy_sol_types::SolValue for TokenUsage { + type SolType = Self; + } + #[automatically_derived] + impl alloy_sol_types::private::SolTypeValue for TokenUsage { + #[inline] + fn stv_to_tokens(&self) -> ::Token<'_> { + ( + as alloy_sol_types::SolType>::tokenize(&self.consumed), + as alloy_sol_types::SolType>::tokenize(&self.lastUpdated), + ) + } + #[inline] + fn stv_abi_encoded_size(&self) -> usize { + if let Some(size) = ::ENCODED_SIZE { + return size; + } + let tuple = as ::core::convert::From>::from(self.clone()); + as alloy_sol_types::SolType>::abi_encoded_size(&tuple) + } + #[inline] + fn stv_eip712_data_word(&self) -> alloy_sol_types::Word { + ::eip712_hash_struct(self) + } + #[inline] + fn stv_abi_encode_packed_to( + &self, + out: &mut alloy_sol_types::private::Vec, + ) { + let tuple = as ::core::convert::From>::from(self.clone()); + as alloy_sol_types::SolType>::abi_encode_packed_to(&tuple, out) + } + #[inline] + fn stv_abi_packed_encoded_size(&self) -> usize { + if let Some(size) = ::PACKED_ENCODED_SIZE { + return size; + } + let tuple = as ::core::convert::From>::from(self.clone()); + as alloy_sol_types::SolType>::abi_packed_encoded_size(&tuple) + } + } + #[automatically_derived] + impl alloy_sol_types::SolType for TokenUsage { + type RustType = Self; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SOL_NAME: &'static str = ::NAME; + const ENCODED_SIZE: Option = as alloy_sol_types::SolType>::ENCODED_SIZE; + const PACKED_ENCODED_SIZE: Option = as alloy_sol_types::SolType>::PACKED_ENCODED_SIZE; + #[inline] + fn valid_token(token: &Self::Token<'_>) -> bool { + as alloy_sol_types::SolType>::valid_token(token) + } + #[inline] + fn detokenize(token: Self::Token<'_>) -> Self::RustType { + let tuple = as alloy_sol_types::SolType>::detokenize(token); + >>::from(tuple) + } + } + #[automatically_derived] + impl alloy_sol_types::SolStruct for TokenUsage { + const NAME: &'static str = "TokenUsage"; + #[inline] + fn eip712_root_type() -> alloy_sol_types::private::Cow<'static, str> { + alloy_sol_types::private::Cow::Borrowed( + "TokenUsage(uint256 consumed,uint256 lastUpdated)", + ) + } + #[inline] + fn eip712_components() -> alloy_sol_types::private::Vec< + alloy_sol_types::private::Cow<'static, str>, + > { + alloy_sol_types::private::Vec::new() + } + #[inline] + fn eip712_encode_type() -> alloy_sol_types::private::Cow<'static, str> { + ::eip712_root_type() + } + #[inline] + fn eip712_encode_data(&self) -> alloy_sol_types::private::Vec { + [ + as alloy_sol_types::SolType>::eip712_data_word(&self.consumed) + .0, + as alloy_sol_types::SolType>::eip712_data_word(&self.lastUpdated) + .0, + ] + .concat() + } + } + #[automatically_derived] + impl alloy_sol_types::EventTopic for TokenUsage { + #[inline] + fn topic_preimage_length(rust: &Self::RustType) -> usize { + 0usize + + as alloy_sol_types::EventTopic>::topic_preimage_length( + &rust.consumed, + ) + + as alloy_sol_types::EventTopic>::topic_preimage_length( + &rust.lastUpdated, + ) + } + #[inline] + fn encode_topic_preimage( + rust: &Self::RustType, + out: &mut alloy_sol_types::private::Vec, + ) { + out.reserve( + ::topic_preimage_length(rust), + ); + as alloy_sol_types::EventTopic>::encode_topic_preimage( + &rust.consumed, + out, + ); + as alloy_sol_types::EventTopic>::encode_topic_preimage( + &rust.lastUpdated, + out, + ); + } + #[inline] + fn encode_topic( + rust: &Self::RustType, + ) -> alloy_sol_types::abi::token::WordToken { + let mut out = alloy_sol_types::private::Vec::new(); + ::encode_topic_preimage( + rust, + &mut out, + ); + alloy_sol_types::abi::token::WordToken( + alloy_sol_types::private::keccak256(out), + ) + } + } + }; + use alloy::contract as alloy_contract; + /**Creates a new wrapper around an on-chain [`IBridge`](self) contract instance. + +See the [wrapper's documentation](`IBridgeInstance`) for more details.*/ + #[inline] + pub const fn new< + P: alloy_contract::private::Provider, + N: alloy_contract::private::Network, + >(address: alloy_sol_types::private::Address, provider: P) -> IBridgeInstance { + IBridgeInstance::::new(address, provider) + } + /**A [`IBridge`](self) instance. + +Contains type-safe methods for interacting with an on-chain instance of the +[`IBridge`](self) contract located at a given `address`, using a given +provider `P`. + +If the contract bytecode is available (see the [`sol!`](alloy_sol_types::sol!) +documentation on how to provide it), the `deploy` and `deploy_builder` methods can +be used to deploy a new instance of the contract. + +See the [module-level documentation](self) for all the available methods.*/ + #[derive(Clone)] + pub struct IBridgeInstance { + address: alloy_sol_types::private::Address, + provider: P, + _network: ::core::marker::PhantomData, + } + #[automatically_derived] + impl ::core::fmt::Debug for IBridgeInstance { + #[inline] + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { + f.debug_tuple("IBridgeInstance").field(&self.address).finish() + } + } + /// Instantiation and getters/setters. + #[automatically_derived] + impl< + P: alloy_contract::private::Provider, + N: alloy_contract::private::Network, + > IBridgeInstance { + /**Creates a new wrapper around an on-chain [`IBridge`](self) contract instance. + +See the [wrapper's documentation](`IBridgeInstance`) for more details.*/ + #[inline] + pub const fn new( + address: alloy_sol_types::private::Address, + provider: P, + ) -> Self { + Self { + address, + provider, + _network: ::core::marker::PhantomData, + } + } + /// Returns a reference to the address. + #[inline] + pub const fn address(&self) -> &alloy_sol_types::private::Address { + &self.address + } + /// Sets the address. + #[inline] + pub fn set_address(&mut self, address: alloy_sol_types::private::Address) { + self.address = address; + } + /// Sets the address and returns `self`. + pub fn at(mut self, address: alloy_sol_types::private::Address) -> Self { + self.set_address(address); + self + } + /// Returns a reference to the provider. + #[inline] + pub const fn provider(&self) -> &P { + &self.provider + } + } + impl IBridgeInstance<&P, N> { + /// Clones the provider and returns a new instance with the cloned provider. + #[inline] + pub fn with_cloned_provider(self) -> IBridgeInstance { + IBridgeInstance { + address: self.address, + provider: ::core::clone::Clone::clone(&self.provider), + _network: ::core::marker::PhantomData, + } + } + } + /// Function calls. + #[automatically_derived] + impl< + P: alloy_contract::private::Provider, + N: alloy_contract::private::Network, + > IBridgeInstance { + /// Creates a new call builder using this contract instance's provider and address. + /// + /// Note that the call can be any function call, not just those defined in this + /// contract. Prefer using the other methods for building type-safe contract calls. + pub fn call_builder( + &self, + call: &C, + ) -> alloy_contract::SolCallBuilder<&P, C, N> { + alloy_contract::SolCallBuilder::new_sol(&self.provider, &self.address, call) + } + } + /// Event filters. + #[automatically_derived] + impl< + P: alloy_contract::private::Provider, + N: alloy_contract::private::Network, + > IBridgeInstance { + /// Creates a new event filter using this contract instance's provider and address. + /// + /// Note that the type can be any event, not just those defined in this contract. + /// Prefer using the other methods for building type-safe event filters. + pub fn event_filter( + &self, + ) -> alloy_contract::Event<&P, E, N> { + alloy_contract::Event::new_sol(&self.provider, &self.address) + } + } +} +///Module containing a contract's types and functions. +/** + +```solidity +library MerkleTree { + struct Proof { bytes32[] path; } +} +```*/ +#[allow( + non_camel_case_types, + non_snake_case, + clippy::pub_underscore_fields, + clippy::style, + clippy::empty_structs_with_brackets +)] +pub mod MerkleTree { + use super::*; + use alloy::sol_types as alloy_sol_types; + #[derive(serde::Serialize, serde::Deserialize)] + #[derive(Default, Debug, PartialEq, Eq, Hash)] + /**```solidity +struct Proof { bytes32[] path; } +```*/ + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] + #[derive(Clone)] + pub struct Proof { + #[allow(missing_docs)] + pub path: alloy::sol_types::private::Vec< + alloy::sol_types::private::FixedBytes<32>, + >, + } + #[allow( + non_camel_case_types, + non_snake_case, + clippy::pub_underscore_fields, + clippy::style + )] + const _: () = { + use alloy::sol_types as alloy_sol_types; + #[doc(hidden)] + type UnderlyingSolTuple<'a> = ( + alloy::sol_types::sol_data::Array< + alloy::sol_types::sol_data::FixedBytes<32>, + >, + ); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = ( + alloy::sol_types::private::Vec>, + ); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: Proof) -> Self { + (value.path,) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for Proof { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { path: tuple.0 } + } + } + #[automatically_derived] + impl alloy_sol_types::SolValue for Proof { + type SolType = Self; + } + #[automatically_derived] + impl alloy_sol_types::private::SolTypeValue for Proof { + #[inline] + fn stv_to_tokens(&self) -> ::Token<'_> { + ( + , + > as alloy_sol_types::SolType>::tokenize(&self.path), + ) + } + #[inline] + fn stv_abi_encoded_size(&self) -> usize { + if let Some(size) = ::ENCODED_SIZE { + return size; + } + let tuple = as ::core::convert::From>::from(self.clone()); + as alloy_sol_types::SolType>::abi_encoded_size(&tuple) + } + #[inline] + fn stv_eip712_data_word(&self) -> alloy_sol_types::Word { + ::eip712_hash_struct(self) + } + #[inline] + fn stv_abi_encode_packed_to( + &self, + out: &mut alloy_sol_types::private::Vec, + ) { + let tuple = as ::core::convert::From>::from(self.clone()); + as alloy_sol_types::SolType>::abi_encode_packed_to(&tuple, out) + } + #[inline] + fn stv_abi_packed_encoded_size(&self) -> usize { + if let Some(size) = ::PACKED_ENCODED_SIZE { + return size; + } + let tuple = as ::core::convert::From>::from(self.clone()); + as alloy_sol_types::SolType>::abi_packed_encoded_size(&tuple) + } + } + #[automatically_derived] + impl alloy_sol_types::SolType for Proof { + type RustType = Self; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SOL_NAME: &'static str = ::NAME; + const ENCODED_SIZE: Option = as alloy_sol_types::SolType>::ENCODED_SIZE; + const PACKED_ENCODED_SIZE: Option = as alloy_sol_types::SolType>::PACKED_ENCODED_SIZE; + #[inline] + fn valid_token(token: &Self::Token<'_>) -> bool { + as alloy_sol_types::SolType>::valid_token(token) + } + #[inline] + fn detokenize(token: Self::Token<'_>) -> Self::RustType { + let tuple = as alloy_sol_types::SolType>::detokenize(token); + >>::from(tuple) + } + } + #[automatically_derived] + impl alloy_sol_types::SolStruct for Proof { + const NAME: &'static str = "Proof"; + #[inline] + fn eip712_root_type() -> alloy_sol_types::private::Cow<'static, str> { + alloy_sol_types::private::Cow::Borrowed("Proof(bytes32[] path)") + } + #[inline] + fn eip712_components() -> alloy_sol_types::private::Vec< + alloy_sol_types::private::Cow<'static, str>, + > { + alloy_sol_types::private::Vec::new() + } + #[inline] + fn eip712_encode_type() -> alloy_sol_types::private::Cow<'static, str> { + ::eip712_root_type() + } + #[inline] + fn eip712_encode_data(&self) -> alloy_sol_types::private::Vec { + , + > as alloy_sol_types::SolType>::eip712_data_word(&self.path) + .0 + .to_vec() + } + } + #[automatically_derived] + impl alloy_sol_types::EventTopic for Proof { + #[inline] + fn topic_preimage_length(rust: &Self::RustType) -> usize { + 0usize + + , + > as alloy_sol_types::EventTopic>::topic_preimage_length(&rust.path) + } + #[inline] + fn encode_topic_preimage( + rust: &Self::RustType, + out: &mut alloy_sol_types::private::Vec, + ) { + out.reserve( + ::topic_preimage_length(rust), + ); + , + > as alloy_sol_types::EventTopic>::encode_topic_preimage( + &rust.path, + out, + ); + } + #[inline] + fn encode_topic( + rust: &Self::RustType, + ) -> alloy_sol_types::abi::token::WordToken { + let mut out = alloy_sol_types::private::Vec::new(); + ::encode_topic_preimage( + rust, + &mut out, + ); + alloy_sol_types::abi::token::WordToken( + alloy_sol_types::private::keccak256(out), + ) + } + } + }; + use alloy::contract as alloy_contract; + /**Creates a new wrapper around an on-chain [`MerkleTree`](self) contract instance. + +See the [wrapper's documentation](`MerkleTreeInstance`) for more details.*/ + #[inline] + pub const fn new< + P: alloy_contract::private::Provider, + N: alloy_contract::private::Network, + >( + address: alloy_sol_types::private::Address, + provider: P, + ) -> MerkleTreeInstance { + MerkleTreeInstance::::new(address, provider) + } + /**A [`MerkleTree`](self) instance. + +Contains type-safe methods for interacting with an on-chain instance of the +[`MerkleTree`](self) contract located at a given `address`, using a given +provider `P`. + +If the contract bytecode is available (see the [`sol!`](alloy_sol_types::sol!) +documentation on how to provide it), the `deploy` and `deploy_builder` methods can +be used to deploy a new instance of the contract. + +See the [module-level documentation](self) for all the available methods.*/ + #[derive(Clone)] + pub struct MerkleTreeInstance { + address: alloy_sol_types::private::Address, + provider: P, + _network: ::core::marker::PhantomData, + } + #[automatically_derived] + impl ::core::fmt::Debug for MerkleTreeInstance { + #[inline] + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { + f.debug_tuple("MerkleTreeInstance").field(&self.address).finish() + } + } + /// Instantiation and getters/setters. + #[automatically_derived] + impl< + P: alloy_contract::private::Provider, + N: alloy_contract::private::Network, + > MerkleTreeInstance { + /**Creates a new wrapper around an on-chain [`MerkleTree`](self) contract instance. + +See the [wrapper's documentation](`MerkleTreeInstance`) for more details.*/ + #[inline] + pub const fn new( + address: alloy_sol_types::private::Address, + provider: P, + ) -> Self { + Self { + address, + provider, + _network: ::core::marker::PhantomData, + } + } + /// Returns a reference to the address. + #[inline] + pub const fn address(&self) -> &alloy_sol_types::private::Address { + &self.address + } + /// Sets the address. + #[inline] + pub fn set_address(&mut self, address: alloy_sol_types::private::Address) { + self.address = address; + } + /// Sets the address and returns `self`. + pub fn at(mut self, address: alloy_sol_types::private::Address) -> Self { + self.set_address(address); + self + } + /// Returns a reference to the provider. + #[inline] + pub const fn provider(&self) -> &P { + &self.provider + } + } + impl MerkleTreeInstance<&P, N> { + /// Clones the provider and returns a new instance with the cloned provider. + #[inline] + pub fn with_cloned_provider(self) -> MerkleTreeInstance { + MerkleTreeInstance { + address: self.address, + provider: ::core::clone::Clone::clone(&self.provider), + _network: ::core::marker::PhantomData, + } + } + } + /// Function calls. + #[automatically_derived] + impl< + P: alloy_contract::private::Provider, + N: alloy_contract::private::Network, + > MerkleTreeInstance { + /// Creates a new call builder using this contract instance's provider and address. + /// + /// Note that the call can be any function call, not just those defined in this + /// contract. Prefer using the other methods for building type-safe contract calls. + pub fn call_builder( + &self, + call: &C, + ) -> alloy_contract::SolCallBuilder<&P, C, N> { + alloy_contract::SolCallBuilder::new_sol(&self.provider, &self.address, call) + } + } + /// Event filters. + #[automatically_derived] + impl< + P: alloy_contract::private::Provider, + N: alloy_contract::private::Network, + > MerkleTreeInstance { + /// Creates a new event filter using this contract instance's provider and address. + /// + /// Note that the type can be any event, not just those defined in this contract. + /// Prefer using the other methods for building type-safe event filters. + pub fn event_filter( + &self, + ) -> alloy_contract::Event<&P, E, N> { + alloy_contract::Event::new_sol(&self.provider, &self.address) + } + } +} +///Module containing a contract's types and functions. +/** + +```solidity +library PodECDSA { + struct Certificate { CertifiedReceipt certifiedReceipt; bytes32 leaf; MerkleTree.Proof proof; } + struct CertifiedLog { Log log; uint256 logIndex; Certificate certificate; } + struct CertifiedReceipt { bytes32 receiptRoot; bytes aggregateSignature; uint256[] sortedAttestationTimestamps; } + struct Log { address addr; bytes32[] topics; bytes data; } +} +```*/ +#[allow( + non_camel_case_types, + non_snake_case, + clippy::pub_underscore_fields, + clippy::style, + clippy::empty_structs_with_brackets +)] +pub mod PodECDSA { + use super::*; + use alloy::sol_types as alloy_sol_types; + #[derive(serde::Serialize, serde::Deserialize)] + #[derive(Default, Debug, PartialEq, Eq, Hash)] + /**```solidity +struct Certificate { CertifiedReceipt certifiedReceipt; bytes32 leaf; MerkleTree.Proof proof; } +```*/ + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] + #[derive(Clone)] + pub struct Certificate { + #[allow(missing_docs)] + pub certifiedReceipt: ::RustType, + #[allow(missing_docs)] + pub leaf: alloy::sol_types::private::FixedBytes<32>, + #[allow(missing_docs)] + pub proof: ::RustType, + } + #[allow( + non_camel_case_types, + non_snake_case, + clippy::pub_underscore_fields, + clippy::style + )] + const _: () = { + use alloy::sol_types as alloy_sol_types; + #[doc(hidden)] + type UnderlyingSolTuple<'a> = ( + CertifiedReceipt, + alloy::sol_types::sol_data::FixedBytes<32>, + MerkleTree::Proof, + ); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = ( + ::RustType, + alloy::sol_types::private::FixedBytes<32>, + ::RustType, + ); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: Certificate) -> Self { + (value.certifiedReceipt, value.leaf, value.proof) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for Certificate { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { + certifiedReceipt: tuple.0, + leaf: tuple.1, + proof: tuple.2, + } + } + } + #[automatically_derived] + impl alloy_sol_types::SolValue for Certificate { + type SolType = Self; + } + #[automatically_derived] + impl alloy_sol_types::private::SolTypeValue for Certificate { + #[inline] + fn stv_to_tokens(&self) -> ::Token<'_> { + ( + ::tokenize( + &self.certifiedReceipt, + ), + as alloy_sol_types::SolType>::tokenize(&self.leaf), + ::tokenize( + &self.proof, + ), + ) + } + #[inline] + fn stv_abi_encoded_size(&self) -> usize { + if let Some(size) = ::ENCODED_SIZE { + return size; + } + let tuple = as ::core::convert::From>::from(self.clone()); + as alloy_sol_types::SolType>::abi_encoded_size(&tuple) + } + #[inline] + fn stv_eip712_data_word(&self) -> alloy_sol_types::Word { + ::eip712_hash_struct(self) + } + #[inline] + fn stv_abi_encode_packed_to( + &self, + out: &mut alloy_sol_types::private::Vec, + ) { + let tuple = as ::core::convert::From>::from(self.clone()); + as alloy_sol_types::SolType>::abi_encode_packed_to(&tuple, out) + } + #[inline] + fn stv_abi_packed_encoded_size(&self) -> usize { + if let Some(size) = ::PACKED_ENCODED_SIZE { + return size; + } + let tuple = as ::core::convert::From>::from(self.clone()); + as alloy_sol_types::SolType>::abi_packed_encoded_size(&tuple) + } + } + #[automatically_derived] + impl alloy_sol_types::SolType for Certificate { + type RustType = Self; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SOL_NAME: &'static str = ::NAME; + const ENCODED_SIZE: Option = as alloy_sol_types::SolType>::ENCODED_SIZE; + const PACKED_ENCODED_SIZE: Option = as alloy_sol_types::SolType>::PACKED_ENCODED_SIZE; + #[inline] + fn valid_token(token: &Self::Token<'_>) -> bool { + as alloy_sol_types::SolType>::valid_token(token) + } + #[inline] + fn detokenize(token: Self::Token<'_>) -> Self::RustType { + let tuple = as alloy_sol_types::SolType>::detokenize(token); + >>::from(tuple) + } + } + #[automatically_derived] + impl alloy_sol_types::SolStruct for Certificate { + const NAME: &'static str = "Certificate"; + #[inline] + fn eip712_root_type() -> alloy_sol_types::private::Cow<'static, str> { + alloy_sol_types::private::Cow::Borrowed( + "Certificate(CertifiedReceipt certifiedReceipt,bytes32 leaf,Proof proof)", + ) + } + #[inline] + fn eip712_components() -> alloy_sol_types::private::Vec< + alloy_sol_types::private::Cow<'static, str>, + > { + let mut components = alloy_sol_types::private::Vec::with_capacity(2); + components + .push( + ::eip712_root_type(), + ); + components + .extend( + ::eip712_components(), + ); + components + .push( + ::eip712_root_type(), + ); + components + .extend( + ::eip712_components(), + ); + components + } + #[inline] + fn eip712_encode_data(&self) -> alloy_sol_types::private::Vec { + [ + ::eip712_data_word( + &self.certifiedReceipt, + ) + .0, + as alloy_sol_types::SolType>::eip712_data_word(&self.leaf) + .0, + ::eip712_data_word( + &self.proof, + ) + .0, + ] + .concat() + } + } + #[automatically_derived] + impl alloy_sol_types::EventTopic for Certificate { + #[inline] + fn topic_preimage_length(rust: &Self::RustType) -> usize { + 0usize + + ::topic_preimage_length( + &rust.certifiedReceipt, + ) + + as alloy_sol_types::EventTopic>::topic_preimage_length(&rust.leaf) + + ::topic_preimage_length( + &rust.proof, + ) + } + #[inline] + fn encode_topic_preimage( + rust: &Self::RustType, + out: &mut alloy_sol_types::private::Vec, + ) { + out.reserve( + ::topic_preimage_length(rust), + ); + ::encode_topic_preimage( + &rust.certifiedReceipt, + out, + ); + as alloy_sol_types::EventTopic>::encode_topic_preimage( + &rust.leaf, + out, + ); + ::encode_topic_preimage( + &rust.proof, + out, + ); + } + #[inline] + fn encode_topic( + rust: &Self::RustType, + ) -> alloy_sol_types::abi::token::WordToken { + let mut out = alloy_sol_types::private::Vec::new(); + ::encode_topic_preimage( + rust, + &mut out, + ); + alloy_sol_types::abi::token::WordToken( + alloy_sol_types::private::keccak256(out), + ) + } + } + }; + #[derive(serde::Serialize, serde::Deserialize)] + #[derive(Default, Debug, PartialEq, Eq, Hash)] + /**```solidity +struct CertifiedLog { Log log; uint256 logIndex; Certificate certificate; } +```*/ + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] + #[derive(Clone)] + pub struct CertifiedLog { + #[allow(missing_docs)] + pub log: ::RustType, + #[allow(missing_docs)] + pub logIndex: alloy::sol_types::private::primitives::aliases::U256, + #[allow(missing_docs)] + pub certificate: ::RustType, + } + #[allow( + non_camel_case_types, + non_snake_case, + clippy::pub_underscore_fields, + clippy::style + )] + const _: () = { + use alloy::sol_types as alloy_sol_types; + #[doc(hidden)] + type UnderlyingSolTuple<'a> = ( + Log, + alloy::sol_types::sol_data::Uint<256>, + Certificate, + ); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = ( + ::RustType, + alloy::sol_types::private::primitives::aliases::U256, + ::RustType, + ); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: CertifiedLog) -> Self { + (value.log, value.logIndex, value.certificate) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for CertifiedLog { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { + log: tuple.0, + logIndex: tuple.1, + certificate: tuple.2, + } + } + } + #[automatically_derived] + impl alloy_sol_types::SolValue for CertifiedLog { + type SolType = Self; + } + #[automatically_derived] + impl alloy_sol_types::private::SolTypeValue for CertifiedLog { + #[inline] + fn stv_to_tokens(&self) -> ::Token<'_> { + ( + ::tokenize(&self.log), + as alloy_sol_types::SolType>::tokenize(&self.logIndex), + ::tokenize( + &self.certificate, + ), + ) + } + #[inline] + fn stv_abi_encoded_size(&self) -> usize { + if let Some(size) = ::ENCODED_SIZE { + return size; + } + let tuple = as ::core::convert::From>::from(self.clone()); + as alloy_sol_types::SolType>::abi_encoded_size(&tuple) + } + #[inline] + fn stv_eip712_data_word(&self) -> alloy_sol_types::Word { + ::eip712_hash_struct(self) + } + #[inline] + fn stv_abi_encode_packed_to( + &self, + out: &mut alloy_sol_types::private::Vec, + ) { + let tuple = as ::core::convert::From>::from(self.clone()); + as alloy_sol_types::SolType>::abi_encode_packed_to(&tuple, out) + } + #[inline] + fn stv_abi_packed_encoded_size(&self) -> usize { + if let Some(size) = ::PACKED_ENCODED_SIZE { + return size; + } + let tuple = as ::core::convert::From>::from(self.clone()); + as alloy_sol_types::SolType>::abi_packed_encoded_size(&tuple) + } + } + #[automatically_derived] + impl alloy_sol_types::SolType for CertifiedLog { + type RustType = Self; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SOL_NAME: &'static str = ::NAME; + const ENCODED_SIZE: Option = as alloy_sol_types::SolType>::ENCODED_SIZE; + const PACKED_ENCODED_SIZE: Option = as alloy_sol_types::SolType>::PACKED_ENCODED_SIZE; + #[inline] + fn valid_token(token: &Self::Token<'_>) -> bool { + as alloy_sol_types::SolType>::valid_token(token) + } + #[inline] + fn detokenize(token: Self::Token<'_>) -> Self::RustType { + let tuple = as alloy_sol_types::SolType>::detokenize(token); + >>::from(tuple) + } + } + #[automatically_derived] + impl alloy_sol_types::SolStruct for CertifiedLog { + const NAME: &'static str = "CertifiedLog"; + #[inline] + fn eip712_root_type() -> alloy_sol_types::private::Cow<'static, str> { + alloy_sol_types::private::Cow::Borrowed( + "CertifiedLog(Log log,uint256 logIndex,Certificate certificate)", + ) + } + #[inline] + fn eip712_components() -> alloy_sol_types::private::Vec< + alloy_sol_types::private::Cow<'static, str>, + > { + let mut components = alloy_sol_types::private::Vec::with_capacity(2); + components.push(::eip712_root_type()); + components + .extend(::eip712_components()); + components + .push( + ::eip712_root_type(), + ); + components + .extend( + ::eip712_components(), + ); + components + } + #[inline] + fn eip712_encode_data(&self) -> alloy_sol_types::private::Vec { + [ + ::eip712_data_word(&self.log).0, + as alloy_sol_types::SolType>::eip712_data_word(&self.logIndex) + .0, + ::eip712_data_word( + &self.certificate, + ) + .0, + ] + .concat() + } + } + #[automatically_derived] + impl alloy_sol_types::EventTopic for CertifiedLog { + #[inline] + fn topic_preimage_length(rust: &Self::RustType) -> usize { + 0usize + + ::topic_preimage_length( + &rust.log, + ) + + as alloy_sol_types::EventTopic>::topic_preimage_length( + &rust.logIndex, + ) + + ::topic_preimage_length( + &rust.certificate, + ) + } + #[inline] + fn encode_topic_preimage( + rust: &Self::RustType, + out: &mut alloy_sol_types::private::Vec, + ) { + out.reserve( + ::topic_preimage_length(rust), + ); + ::encode_topic_preimage( + &rust.log, + out, + ); + as alloy_sol_types::EventTopic>::encode_topic_preimage( + &rust.logIndex, + out, + ); + ::encode_topic_preimage( + &rust.certificate, + out, + ); + } + #[inline] + fn encode_topic( + rust: &Self::RustType, + ) -> alloy_sol_types::abi::token::WordToken { + let mut out = alloy_sol_types::private::Vec::new(); + ::encode_topic_preimage( + rust, + &mut out, + ); + alloy_sol_types::abi::token::WordToken( + alloy_sol_types::private::keccak256(out), + ) + } + } + }; + #[derive(serde::Serialize, serde::Deserialize)] + #[derive(Default, Debug, PartialEq, Eq, Hash)] + /**```solidity +struct CertifiedReceipt { bytes32 receiptRoot; bytes aggregateSignature; uint256[] sortedAttestationTimestamps; } +```*/ + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] + #[derive(Clone)] + pub struct CertifiedReceipt { + #[allow(missing_docs)] + pub receiptRoot: alloy::sol_types::private::FixedBytes<32>, + #[allow(missing_docs)] + pub aggregateSignature: alloy::sol_types::private::Bytes, + #[allow(missing_docs)] + pub sortedAttestationTimestamps: alloy::sol_types::private::Vec< + alloy::sol_types::private::primitives::aliases::U256, + >, + } + #[allow( + non_camel_case_types, + non_snake_case, + clippy::pub_underscore_fields, + clippy::style + )] + const _: () = { + use alloy::sol_types as alloy_sol_types; + #[doc(hidden)] + type UnderlyingSolTuple<'a> = ( + alloy::sol_types::sol_data::FixedBytes<32>, + alloy::sol_types::sol_data::Bytes, + alloy::sol_types::sol_data::Array>, + ); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = ( + alloy::sol_types::private::FixedBytes<32>, + alloy::sol_types::private::Bytes, + alloy::sol_types::private::Vec< + alloy::sol_types::private::primitives::aliases::U256, + >, + ); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: CertifiedReceipt) -> Self { + ( + value.receiptRoot, + value.aggregateSignature, + value.sortedAttestationTimestamps, + ) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for CertifiedReceipt { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { + receiptRoot: tuple.0, + aggregateSignature: tuple.1, + sortedAttestationTimestamps: tuple.2, + } + } + } + #[automatically_derived] + impl alloy_sol_types::SolValue for CertifiedReceipt { + type SolType = Self; + } + #[automatically_derived] + impl alloy_sol_types::private::SolTypeValue for CertifiedReceipt { + #[inline] + fn stv_to_tokens(&self) -> ::Token<'_> { + ( + as alloy_sol_types::SolType>::tokenize(&self.receiptRoot), + ::tokenize( + &self.aggregateSignature, + ), + , + > as alloy_sol_types::SolType>::tokenize( + &self.sortedAttestationTimestamps, + ), + ) + } + #[inline] + fn stv_abi_encoded_size(&self) -> usize { + if let Some(size) = ::ENCODED_SIZE { + return size; + } + let tuple = as ::core::convert::From>::from(self.clone()); + as alloy_sol_types::SolType>::abi_encoded_size(&tuple) + } + #[inline] + fn stv_eip712_data_word(&self) -> alloy_sol_types::Word { + ::eip712_hash_struct(self) + } + #[inline] + fn stv_abi_encode_packed_to( + &self, + out: &mut alloy_sol_types::private::Vec, + ) { + let tuple = as ::core::convert::From>::from(self.clone()); + as alloy_sol_types::SolType>::abi_encode_packed_to(&tuple, out) + } + #[inline] + fn stv_abi_packed_encoded_size(&self) -> usize { + if let Some(size) = ::PACKED_ENCODED_SIZE { + return size; + } + let tuple = as ::core::convert::From>::from(self.clone()); + as alloy_sol_types::SolType>::abi_packed_encoded_size(&tuple) + } + } + #[automatically_derived] + impl alloy_sol_types::SolType for CertifiedReceipt { + type RustType = Self; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SOL_NAME: &'static str = ::NAME; + const ENCODED_SIZE: Option = as alloy_sol_types::SolType>::ENCODED_SIZE; + const PACKED_ENCODED_SIZE: Option = as alloy_sol_types::SolType>::PACKED_ENCODED_SIZE; + #[inline] + fn valid_token(token: &Self::Token<'_>) -> bool { + as alloy_sol_types::SolType>::valid_token(token) + } + #[inline] + fn detokenize(token: Self::Token<'_>) -> Self::RustType { + let tuple = as alloy_sol_types::SolType>::detokenize(token); + >>::from(tuple) + } + } + #[automatically_derived] + impl alloy_sol_types::SolStruct for CertifiedReceipt { + const NAME: &'static str = "CertifiedReceipt"; + #[inline] + fn eip712_root_type() -> alloy_sol_types::private::Cow<'static, str> { + alloy_sol_types::private::Cow::Borrowed( + "CertifiedReceipt(bytes32 receiptRoot,bytes aggregateSignature,uint256[] sortedAttestationTimestamps)", + ) + } + #[inline] + fn eip712_components() -> alloy_sol_types::private::Vec< + alloy_sol_types::private::Cow<'static, str>, + > { + alloy_sol_types::private::Vec::new() + } + #[inline] + fn eip712_encode_type() -> alloy_sol_types::private::Cow<'static, str> { + ::eip712_root_type() + } + #[inline] + fn eip712_encode_data(&self) -> alloy_sol_types::private::Vec { + [ + as alloy_sol_types::SolType>::eip712_data_word(&self.receiptRoot) + .0, + ::eip712_data_word( + &self.aggregateSignature, + ) + .0, + , + > as alloy_sol_types::SolType>::eip712_data_word( + &self.sortedAttestationTimestamps, + ) + .0, + ] + .concat() + } + } + #[automatically_derived] + impl alloy_sol_types::EventTopic for CertifiedReceipt { + #[inline] + fn topic_preimage_length(rust: &Self::RustType) -> usize { + 0usize + + as alloy_sol_types::EventTopic>::topic_preimage_length( + &rust.receiptRoot, + ) + + ::topic_preimage_length( + &rust.aggregateSignature, + ) + + , + > as alloy_sol_types::EventTopic>::topic_preimage_length( + &rust.sortedAttestationTimestamps, + ) + } + #[inline] + fn encode_topic_preimage( + rust: &Self::RustType, + out: &mut alloy_sol_types::private::Vec, + ) { + out.reserve( + ::topic_preimage_length(rust), + ); + as alloy_sol_types::EventTopic>::encode_topic_preimage( + &rust.receiptRoot, + out, + ); + ::encode_topic_preimage( + &rust.aggregateSignature, + out, + ); + , + > as alloy_sol_types::EventTopic>::encode_topic_preimage( + &rust.sortedAttestationTimestamps, + out, + ); + } + #[inline] + fn encode_topic( + rust: &Self::RustType, + ) -> alloy_sol_types::abi::token::WordToken { + let mut out = alloy_sol_types::private::Vec::new(); + ::encode_topic_preimage( + rust, + &mut out, + ); + alloy_sol_types::abi::token::WordToken( + alloy_sol_types::private::keccak256(out), + ) + } + } + }; + #[derive(serde::Serialize, serde::Deserialize)] + #[derive(Default, Debug, PartialEq, Eq, Hash)] + /**```solidity +struct Log { address addr; bytes32[] topics; bytes data; } +```*/ + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] + #[derive(Clone)] + pub struct Log { + #[allow(missing_docs)] + pub addr: alloy::sol_types::private::Address, + #[allow(missing_docs)] + pub topics: alloy::sol_types::private::Vec< + alloy::sol_types::private::FixedBytes<32>, + >, + #[allow(missing_docs)] + pub data: alloy::sol_types::private::Bytes, + } + #[allow( + non_camel_case_types, + non_snake_case, + clippy::pub_underscore_fields, + clippy::style + )] + const _: () = { + use alloy::sol_types as alloy_sol_types; + #[doc(hidden)] + type UnderlyingSolTuple<'a> = ( + alloy::sol_types::sol_data::Address, + alloy::sol_types::sol_data::Array< + alloy::sol_types::sol_data::FixedBytes<32>, + >, + alloy::sol_types::sol_data::Bytes, + ); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = ( + alloy::sol_types::private::Address, + alloy::sol_types::private::Vec>, + alloy::sol_types::private::Bytes, + ); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: Log) -> Self { + (value.addr, value.topics, value.data) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for Log { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { + addr: tuple.0, + topics: tuple.1, + data: tuple.2, + } + } + } + #[automatically_derived] + impl alloy_sol_types::SolValue for Log { + type SolType = Self; + } + #[automatically_derived] + impl alloy_sol_types::private::SolTypeValue for Log { + #[inline] + fn stv_to_tokens(&self) -> ::Token<'_> { + ( + ::tokenize( + &self.addr, + ), + , + > as alloy_sol_types::SolType>::tokenize(&self.topics), + ::tokenize( + &self.data, + ), + ) + } + #[inline] + fn stv_abi_encoded_size(&self) -> usize { + if let Some(size) = ::ENCODED_SIZE { + return size; + } + let tuple = as ::core::convert::From>::from(self.clone()); + as alloy_sol_types::SolType>::abi_encoded_size(&tuple) + } + #[inline] + fn stv_eip712_data_word(&self) -> alloy_sol_types::Word { + ::eip712_hash_struct(self) + } + #[inline] + fn stv_abi_encode_packed_to( + &self, + out: &mut alloy_sol_types::private::Vec, + ) { + let tuple = as ::core::convert::From>::from(self.clone()); + as alloy_sol_types::SolType>::abi_encode_packed_to(&tuple, out) + } + #[inline] + fn stv_abi_packed_encoded_size(&self) -> usize { + if let Some(size) = ::PACKED_ENCODED_SIZE { + return size; + } + let tuple = as ::core::convert::From>::from(self.clone()); + as alloy_sol_types::SolType>::abi_packed_encoded_size(&tuple) + } + } + #[automatically_derived] + impl alloy_sol_types::SolType for Log { + type RustType = Self; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SOL_NAME: &'static str = ::NAME; + const ENCODED_SIZE: Option = as alloy_sol_types::SolType>::ENCODED_SIZE; + const PACKED_ENCODED_SIZE: Option = as alloy_sol_types::SolType>::PACKED_ENCODED_SIZE; + #[inline] + fn valid_token(token: &Self::Token<'_>) -> bool { + as alloy_sol_types::SolType>::valid_token(token) + } + #[inline] + fn detokenize(token: Self::Token<'_>) -> Self::RustType { + let tuple = as alloy_sol_types::SolType>::detokenize(token); + >>::from(tuple) + } + } + #[automatically_derived] + impl alloy_sol_types::SolStruct for Log { + const NAME: &'static str = "Log"; + #[inline] + fn eip712_root_type() -> alloy_sol_types::private::Cow<'static, str> { + alloy_sol_types::private::Cow::Borrowed( + "Log(address addr,bytes32[] topics,bytes data)", + ) + } + #[inline] + fn eip712_components() -> alloy_sol_types::private::Vec< + alloy_sol_types::private::Cow<'static, str>, + > { + alloy_sol_types::private::Vec::new() + } + #[inline] + fn eip712_encode_type() -> alloy_sol_types::private::Cow<'static, str> { + ::eip712_root_type() + } + #[inline] + fn eip712_encode_data(&self) -> alloy_sol_types::private::Vec { + [ + ::eip712_data_word( + &self.addr, + ) + .0, + , + > as alloy_sol_types::SolType>::eip712_data_word(&self.topics) + .0, + ::eip712_data_word( + &self.data, + ) + .0, + ] + .concat() + } + } + #[automatically_derived] + impl alloy_sol_types::EventTopic for Log { + #[inline] + fn topic_preimage_length(rust: &Self::RustType) -> usize { + 0usize + + ::topic_preimage_length( + &rust.addr, + ) + + , + > as alloy_sol_types::EventTopic>::topic_preimage_length( + &rust.topics, + ) + + ::topic_preimage_length( + &rust.data, + ) + } + #[inline] + fn encode_topic_preimage( + rust: &Self::RustType, + out: &mut alloy_sol_types::private::Vec, + ) { + out.reserve( + ::topic_preimage_length(rust), + ); + ::encode_topic_preimage( + &rust.addr, + out, + ); + , + > as alloy_sol_types::EventTopic>::encode_topic_preimage( + &rust.topics, + out, + ); + ::encode_topic_preimage( + &rust.data, + out, + ); + } + #[inline] + fn encode_topic( + rust: &Self::RustType, + ) -> alloy_sol_types::abi::token::WordToken { + let mut out = alloy_sol_types::private::Vec::new(); + ::encode_topic_preimage( + rust, + &mut out, + ); + alloy_sol_types::abi::token::WordToken( + alloy_sol_types::private::keccak256(out), + ) + } + } + }; + use alloy::contract as alloy_contract; + /**Creates a new wrapper around an on-chain [`PodECDSA`](self) contract instance. + +See the [wrapper's documentation](`PodECDSAInstance`) for more details.*/ + #[inline] + pub const fn new< + P: alloy_contract::private::Provider, + N: alloy_contract::private::Network, + >( + address: alloy_sol_types::private::Address, + provider: P, + ) -> PodECDSAInstance { + PodECDSAInstance::::new(address, provider) + } + /**A [`PodECDSA`](self) instance. + +Contains type-safe methods for interacting with an on-chain instance of the +[`PodECDSA`](self) contract located at a given `address`, using a given +provider `P`. + +If the contract bytecode is available (see the [`sol!`](alloy_sol_types::sol!) +documentation on how to provide it), the `deploy` and `deploy_builder` methods can +be used to deploy a new instance of the contract. + +See the [module-level documentation](self) for all the available methods.*/ + #[derive(Clone)] + pub struct PodECDSAInstance { + address: alloy_sol_types::private::Address, + provider: P, + _network: ::core::marker::PhantomData, + } + #[automatically_derived] + impl ::core::fmt::Debug for PodECDSAInstance { + #[inline] + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { + f.debug_tuple("PodECDSAInstance").field(&self.address).finish() + } + } + /// Instantiation and getters/setters. + #[automatically_derived] + impl< + P: alloy_contract::private::Provider, + N: alloy_contract::private::Network, + > PodECDSAInstance { + /**Creates a new wrapper around an on-chain [`PodECDSA`](self) contract instance. + +See the [wrapper's documentation](`PodECDSAInstance`) for more details.*/ + #[inline] + pub const fn new( + address: alloy_sol_types::private::Address, + provider: P, + ) -> Self { + Self { + address, + provider, + _network: ::core::marker::PhantomData, + } + } + /// Returns a reference to the address. + #[inline] + pub const fn address(&self) -> &alloy_sol_types::private::Address { + &self.address + } + /// Sets the address. + #[inline] + pub fn set_address(&mut self, address: alloy_sol_types::private::Address) { + self.address = address; + } + /// Sets the address and returns `self`. + pub fn at(mut self, address: alloy_sol_types::private::Address) -> Self { + self.set_address(address); + self + } + /// Returns a reference to the provider. + #[inline] + pub const fn provider(&self) -> &P { + &self.provider + } + } + impl PodECDSAInstance<&P, N> { + /// Clones the provider and returns a new instance with the cloned provider. + #[inline] + pub fn with_cloned_provider(self) -> PodECDSAInstance { + PodECDSAInstance { + address: self.address, + provider: ::core::clone::Clone::clone(&self.provider), + _network: ::core::marker::PhantomData, + } + } + } + /// Function calls. + #[automatically_derived] + impl< + P: alloy_contract::private::Provider, + N: alloy_contract::private::Network, + > PodECDSAInstance { + /// Creates a new call builder using this contract instance's provider and address. + /// + /// Note that the call can be any function call, not just those defined in this + /// contract. Prefer using the other methods for building type-safe contract calls. + pub fn call_builder( + &self, + call: &C, + ) -> alloy_contract::SolCallBuilder<&P, C, N> { + alloy_contract::SolCallBuilder::new_sol(&self.provider, &self.address, call) + } + } + /// Event filters. + #[automatically_derived] + impl< + P: alloy_contract::private::Provider, + N: alloy_contract::private::Network, + > PodECDSAInstance { + /// Creates a new event filter using this contract instance's provider and address. + /// + /// Note that the type can be any event, not just those defined in this contract. + /// Prefer using the other methods for building type-safe event filters. + pub fn event_filter( + &self, + ) -> alloy_contract::Event<&P, E, N> { + alloy_contract::Event::new_sol(&self.provider, &self.address) + } + } +} +/** + +Generated by the following Solidity interface... +```solidity +library IBridge { + struct TokenLimits { + uint256 minAmount; + uint256 deposit; + uint256 claim; + } + struct TokenUsage { + uint256 consumed; + uint256 lastUpdated; + } +} + +library MerkleTree { + struct Proof { + bytes32[] path; + } +} + +library PodECDSA { + struct Certificate { + CertifiedReceipt certifiedReceipt; + bytes32 leaf; + MerkleTree.Proof proof; + } + struct CertifiedLog { + Log log; + uint256 logIndex; + Certificate certificate; + } + struct CertifiedReceipt { + bytes32 receiptRoot; + bytes aggregateSignature; + uint256[] sortedAttestationTimestamps; + } + struct Log { + address addr; + bytes32[] topics; + bytes data; + } +} + +interface BridgeDepositWithdraw { + error AccessControlBadConfirmation(); + error AccessControlUnauthorizedAccount(address account, bytes32 neededRole); + error ContractMigrated(); + error DailyLimitExhausted(); + error EnforcedPause(); + error ExpectedPause(); + error InvalidBridgeContract(); + error InvalidCertificate(); + error InvalidDepositLog(); + error InvalidNonce(); + error InvalidToAddress(); + error InvalidTokenAmount(); + error InvalidTokenConfig(); + error MirrorTokenNotFound(); + error RequestAlreadyProcessed(); + error SafeERC20FailedOperation(address token); + + event Claim(uint256 indexed id, address indexed mirrorToken, address indexed token, uint256 amount, address to); + event ClaimNative(uint256 indexed id, uint256 amount, address to); + event Deposit(uint256 indexed id, address indexed token, uint256 amount, address to); + event DepositNative(uint256 indexed id, uint256 amount, address to); + event Paused(address account); + event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole); + event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender); + event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender); + event Unpaused(address account); + + constructor(address _podRegistry, address _bridgeContract, IBridge.TokenLimits nativeTokenLimits); + + function DEFAULT_ADMIN_ROLE() external view returns (bytes32); + function PAUSER_ROLE() external view returns (bytes32); + function bridgeContract() external view returns (address); + function claim(PodECDSA.CertifiedLog memory certifiedLog) external; + function claimNative(PodECDSA.CertifiedLog memory certifiedLog) external; + function configureToken(address token, IBridge.TokenLimits memory limits) external; + function deposit(address token, uint256 amount, address to) external returns (uint256); + function depositIndex() external view returns (uint256); + function depositNative(address to) external payable returns (uint256); + function getRoleAdmin(bytes32 role) external view returns (bytes32); + function grantRole(bytes32 role, address account) external; + function hasRole(bytes32 role, address account) external view returns (bool); + function migrate(address _newContract) external; + function migratedContract() external view returns (address); + function mirrorTokens(address) external view returns (address); + function pause() external; + function paused() external view returns (bool); + function podConfig() external view returns (uint8 thresholdNumerator, uint8 thresholdDenominator, address registry); + function processedRequests(bytes32) external view returns (bool); + function renounceRole(bytes32 role, address callerConfirmation) external; + function revokeRole(bytes32 role, address account) external; + function supportsInterface(bytes4 interfaceId) external view returns (bool); + function tokenData(address) external view returns (IBridge.TokenLimits memory limits, IBridge.TokenUsage memory deposit, IBridge.TokenUsage memory claim); + function unpause() external; + function usedNonces(uint256) external view returns (bool); + function whiteListToken(address token, address mirrorToken, IBridge.TokenLimits memory limits) external; + function whitelistedTokens(uint256) external view returns (address); +} +``` + +...which was generated by the following JSON ABI: +```json +[ + { + "type": "constructor", + "inputs": [ + { + "name": "_podRegistry", + "type": "address", + "internalType": "address" + }, + { + "name": "_bridgeContract", + "type": "address", + "internalType": "address" + }, + { + "name": "nativeTokenLimits", + "type": "tuple", + "internalType": "struct IBridge.TokenLimits", + "components": [ + { + "name": "minAmount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "deposit", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "claim", + "type": "uint256", + "internalType": "uint256" + } + ] + } + ], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "DEFAULT_ADMIN_ROLE", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "PAUSER_ROLE", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "bridgeContract", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "claim", + "inputs": [ + { + "name": "certifiedLog", + "type": "tuple", + "internalType": "struct PodECDSA.CertifiedLog", + "components": [ + { + "name": "log", + "type": "tuple", + "internalType": "struct PodECDSA.Log", + "components": [ + { + "name": "addr", + "type": "address", + "internalType": "address" + }, + { + "name": "topics", + "type": "bytes32[]", + "internalType": "bytes32[]" + }, + { + "name": "data", + "type": "bytes", + "internalType": "bytes" + } + ] + }, + { + "name": "logIndex", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "certificate", + "type": "tuple", + "internalType": "struct PodECDSA.Certificate", + "components": [ + { + "name": "certifiedReceipt", + "type": "tuple", + "internalType": "struct PodECDSA.CertifiedReceipt", + "components": [ + { + "name": "receiptRoot", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "aggregateSignature", + "type": "bytes", + "internalType": "bytes" + }, + { + "name": "sortedAttestationTimestamps", + "type": "uint256[]", + "internalType": "uint256[]" + } + ] + }, + { + "name": "leaf", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "proof", + "type": "tuple", + "internalType": "struct MerkleTree.Proof", + "components": [ + { + "name": "path", + "type": "bytes32[]", + "internalType": "bytes32[]" + } + ] + } + ] + } + ] + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "claimNative", + "inputs": [ + { + "name": "certifiedLog", + "type": "tuple", + "internalType": "struct PodECDSA.CertifiedLog", + "components": [ + { + "name": "log", + "type": "tuple", + "internalType": "struct PodECDSA.Log", + "components": [ + { + "name": "addr", + "type": "address", + "internalType": "address" + }, + { + "name": "topics", + "type": "bytes32[]", + "internalType": "bytes32[]" + }, + { + "name": "data", + "type": "bytes", + "internalType": "bytes" + } + ] + }, + { + "name": "logIndex", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "certificate", + "type": "tuple", + "internalType": "struct PodECDSA.Certificate", + "components": [ + { + "name": "certifiedReceipt", + "type": "tuple", + "internalType": "struct PodECDSA.CertifiedReceipt", + "components": [ + { + "name": "receiptRoot", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "aggregateSignature", + "type": "bytes", + "internalType": "bytes" + }, + { + "name": "sortedAttestationTimestamps", + "type": "uint256[]", + "internalType": "uint256[]" + } + ] + }, + { + "name": "leaf", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "proof", + "type": "tuple", + "internalType": "struct MerkleTree.Proof", + "components": [ + { + "name": "path", + "type": "bytes32[]", + "internalType": "bytes32[]" + } + ] + } + ] + } + ] + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "configureToken", + "inputs": [ + { + "name": "token", + "type": "address", + "internalType": "address" + }, + { + "name": "limits", + "type": "tuple", + "internalType": "struct IBridge.TokenLimits", + "components": [ + { + "name": "minAmount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "deposit", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "claim", + "type": "uint256", + "internalType": "uint256" + } + ] + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "deposit", + "inputs": [ + { + "name": "token", + "type": "address", + "internalType": "address" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "to", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "depositIndex", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "depositNative", + "inputs": [ + { + "name": "to", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "payable" + }, + { + "type": "function", + "name": "getRoleAdmin", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "outputs": [ + { + "name": "", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "grantRole", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "account", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "hasRole", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "account", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "migrate", + "inputs": [ + { + "name": "_newContract", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "migratedContract", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "mirrorTokens", + "inputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "pause", + "inputs": [], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "paused", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "podConfig", + "inputs": [], + "outputs": [ + { + "name": "thresholdNumerator", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "thresholdDenominator", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "registry", + "type": "address", + "internalType": "contract IPodRegistry" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "processedRequests", + "inputs": [ + { + "name": "", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "renounceRole", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "callerConfirmation", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "revokeRole", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "account", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "supportsInterface", + "inputs": [ + { + "name": "interfaceId", + "type": "bytes4", + "internalType": "bytes4" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "tokenData", + "inputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "limits", + "type": "tuple", + "internalType": "struct IBridge.TokenLimits", + "components": [ + { + "name": "minAmount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "deposit", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "claim", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "name": "deposit", + "type": "tuple", + "internalType": "struct IBridge.TokenUsage", + "components": [ + { + "name": "consumed", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "lastUpdated", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "name": "claim", + "type": "tuple", + "internalType": "struct IBridge.TokenUsage", + "components": [ + { + "name": "consumed", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "lastUpdated", + "type": "uint256", + "internalType": "uint256" + } + ] + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "unpause", + "inputs": [], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "usedNonces", + "inputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "whiteListToken", + "inputs": [ + { + "name": "token", + "type": "address", + "internalType": "address" + }, + { + "name": "mirrorToken", + "type": "address", + "internalType": "address" + }, + { + "name": "limits", + "type": "tuple", + "internalType": "struct IBridge.TokenLimits", + "components": [ + { + "name": "minAmount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "deposit", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "claim", + "type": "uint256", + "internalType": "uint256" + } + ] + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "whitelistedTokens", + "inputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "event", + "name": "Claim", + "inputs": [ + { + "name": "id", + "type": "uint256", + "indexed": true, + "internalType": "uint256" + }, + { + "name": "mirrorToken", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "token", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "to", + "type": "address", + "indexed": false, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "ClaimNative", + "inputs": [ + { + "name": "id", + "type": "uint256", + "indexed": true, + "internalType": "uint256" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "to", + "type": "address", + "indexed": false, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "Deposit", + "inputs": [ + { + "name": "id", + "type": "uint256", + "indexed": true, + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "to", + "type": "address", + "indexed": false, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "DepositNative", + "inputs": [ + { + "name": "id", + "type": "uint256", + "indexed": true, + "internalType": "uint256" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "to", + "type": "address", + "indexed": false, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "Paused", + "inputs": [ + { + "name": "account", + "type": "address", + "indexed": false, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "RoleAdminChanged", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + }, + { + "name": "previousAdminRole", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + }, + { + "name": "newAdminRole", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "RoleGranted", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + }, + { + "name": "account", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "sender", + "type": "address", + "indexed": true, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "RoleRevoked", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + }, + { + "name": "account", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "sender", + "type": "address", + "indexed": true, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "Unpaused", + "inputs": [ + { + "name": "account", + "type": "address", + "indexed": false, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "error", + "name": "AccessControlBadConfirmation", + "inputs": [] + }, + { + "type": "error", + "name": "AccessControlUnauthorizedAccount", + "inputs": [ + { + "name": "account", + "type": "address", + "internalType": "address" + }, + { + "name": "neededRole", + "type": "bytes32", + "internalType": "bytes32" + } + ] + }, + { + "type": "error", + "name": "ContractMigrated", + "inputs": [] + }, + { + "type": "error", + "name": "DailyLimitExhausted", + "inputs": [] + }, + { + "type": "error", + "name": "EnforcedPause", + "inputs": [] + }, + { + "type": "error", + "name": "ExpectedPause", + "inputs": [] + }, + { + "type": "error", + "name": "InvalidBridgeContract", + "inputs": [] + }, + { + "type": "error", + "name": "InvalidCertificate", + "inputs": [] + }, + { + "type": "error", + "name": "InvalidDepositLog", + "inputs": [] + }, + { + "type": "error", + "name": "InvalidNonce", + "inputs": [] + }, + { + "type": "error", + "name": "InvalidToAddress", + "inputs": [] + }, + { + "type": "error", + "name": "InvalidTokenAmount", + "inputs": [] + }, + { + "type": "error", + "name": "InvalidTokenConfig", + "inputs": [] + }, + { + "type": "error", + "name": "MirrorTokenNotFound", + "inputs": [] + }, + { + "type": "error", + "name": "RequestAlreadyProcessed", + "inputs": [] + }, + { + "type": "error", + "name": "SafeERC20FailedOperation", + "inputs": [ + { + "name": "token", + "type": "address", + "internalType": "address" + } + ] + } +] +```*/ +#[allow( + non_camel_case_types, + non_snake_case, + clippy::pub_underscore_fields, + clippy::style, + clippy::empty_structs_with_brackets +)] +pub mod BridgeDepositWithdraw { + use super::*; + use alloy::sol_types as alloy_sol_types; + #[derive(serde::Serialize, serde::Deserialize)] + #[derive(Default, Debug, PartialEq, Eq, Hash)] + /**Custom error with signature `AccessControlBadConfirmation()` and selector `0x6697b232`. +```solidity +error AccessControlBadConfirmation(); +```*/ + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] + #[derive(Clone)] + pub struct AccessControlBadConfirmation; + #[allow( + non_camel_case_types, + non_snake_case, + clippy::pub_underscore_fields, + clippy::style + )] + const _: () = { + use alloy::sol_types as alloy_sol_types; + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From + for UnderlyingRustTuple<'_> { + fn from(value: AccessControlBadConfirmation) -> Self { + () + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> + for AccessControlBadConfirmation { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self + } + } + #[automatically_derived] + impl alloy_sol_types::SolError for AccessControlBadConfirmation { + type Parameters<'a> = UnderlyingSolTuple<'a>; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SIGNATURE: &'static str = "AccessControlBadConfirmation()"; + const SELECTOR: [u8; 4] = [102u8, 151u8, 178u8, 50u8]; + #[inline] + fn new<'a>( + tuple: as alloy_sol_types::SolType>::RustType, + ) -> Self { + tuple.into() + } + #[inline] + fn tokenize(&self) -> Self::Token<'_> { + () + } + #[inline] + fn abi_decode_raw_validate(data: &[u8]) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence_validate(data) + .map(Self::new) + } + } + }; + #[derive(serde::Serialize, serde::Deserialize)] + #[derive(Default, Debug, PartialEq, Eq, Hash)] + /**Custom error with signature `AccessControlUnauthorizedAccount(address,bytes32)` and selector `0xe2517d3f`. +```solidity +error AccessControlUnauthorizedAccount(address account, bytes32 neededRole); +```*/ + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] + #[derive(Clone)] + pub struct AccessControlUnauthorizedAccount { + #[allow(missing_docs)] + pub account: alloy::sol_types::private::Address, + #[allow(missing_docs)] + pub neededRole: alloy::sol_types::private::FixedBytes<32>, + } + #[allow( + non_camel_case_types, + non_snake_case, + clippy::pub_underscore_fields, + clippy::style + )] + const _: () = { + use alloy::sol_types as alloy_sol_types; + #[doc(hidden)] + type UnderlyingSolTuple<'a> = ( + alloy::sol_types::sol_data::Address, + alloy::sol_types::sol_data::FixedBytes<32>, + ); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = ( + alloy::sol_types::private::Address, + alloy::sol_types::private::FixedBytes<32>, + ); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From + for UnderlyingRustTuple<'_> { + fn from(value: AccessControlUnauthorizedAccount) -> Self { + (value.account, value.neededRole) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> + for AccessControlUnauthorizedAccount { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { + account: tuple.0, + neededRole: tuple.1, + } + } + } + #[automatically_derived] + impl alloy_sol_types::SolError for AccessControlUnauthorizedAccount { + type Parameters<'a> = UnderlyingSolTuple<'a>; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SIGNATURE: &'static str = "AccessControlUnauthorizedAccount(address,bytes32)"; + const SELECTOR: [u8; 4] = [226u8, 81u8, 125u8, 63u8]; + #[inline] + fn new<'a>( + tuple: as alloy_sol_types::SolType>::RustType, + ) -> Self { + tuple.into() + } + #[inline] + fn tokenize(&self) -> Self::Token<'_> { + ( + ::tokenize( + &self.account, + ), + as alloy_sol_types::SolType>::tokenize(&self.neededRole), + ) + } + #[inline] + fn abi_decode_raw_validate(data: &[u8]) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence_validate(data) + .map(Self::new) + } + } + }; + #[derive(serde::Serialize, serde::Deserialize)] + #[derive(Default, Debug, PartialEq, Eq, Hash)] + /**Custom error with signature `ContractMigrated()` and selector `0x3f4f6896`. +```solidity +error ContractMigrated(); +```*/ + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] + #[derive(Clone)] + pub struct ContractMigrated; + #[allow( + non_camel_case_types, + non_snake_case, + clippy::pub_underscore_fields, + clippy::style + )] + const _: () = { + use alloy::sol_types as alloy_sol_types; + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: ContractMigrated) -> Self { + () + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for ContractMigrated { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self + } + } + #[automatically_derived] + impl alloy_sol_types::SolError for ContractMigrated { + type Parameters<'a> = UnderlyingSolTuple<'a>; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SIGNATURE: &'static str = "ContractMigrated()"; + const SELECTOR: [u8; 4] = [63u8, 79u8, 104u8, 150u8]; + #[inline] + fn new<'a>( + tuple: as alloy_sol_types::SolType>::RustType, + ) -> Self { + tuple.into() + } + #[inline] + fn tokenize(&self) -> Self::Token<'_> { + () + } + #[inline] + fn abi_decode_raw_validate(data: &[u8]) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence_validate(data) + .map(Self::new) + } + } + }; + #[derive(serde::Serialize, serde::Deserialize)] + #[derive(Default, Debug, PartialEq, Eq, Hash)] + /**Custom error with signature `DailyLimitExhausted()` and selector `0xbdc4df72`. +```solidity +error DailyLimitExhausted(); +```*/ + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] + #[derive(Clone)] + pub struct DailyLimitExhausted; + #[allow( + non_camel_case_types, + non_snake_case, + clippy::pub_underscore_fields, + clippy::style + )] + const _: () = { + use alloy::sol_types as alloy_sol_types; + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: DailyLimitExhausted) -> Self { + () + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for DailyLimitExhausted { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self + } + } + #[automatically_derived] + impl alloy_sol_types::SolError for DailyLimitExhausted { + type Parameters<'a> = UnderlyingSolTuple<'a>; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SIGNATURE: &'static str = "DailyLimitExhausted()"; + const SELECTOR: [u8; 4] = [189u8, 196u8, 223u8, 114u8]; + #[inline] + fn new<'a>( + tuple: as alloy_sol_types::SolType>::RustType, + ) -> Self { + tuple.into() + } + #[inline] + fn tokenize(&self) -> Self::Token<'_> { + () + } + #[inline] + fn abi_decode_raw_validate(data: &[u8]) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence_validate(data) + .map(Self::new) + } + } + }; + #[derive(serde::Serialize, serde::Deserialize)] + #[derive(Default, Debug, PartialEq, Eq, Hash)] + /**Custom error with signature `EnforcedPause()` and selector `0xd93c0665`. +```solidity +error EnforcedPause(); +```*/ + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] + #[derive(Clone)] + pub struct EnforcedPause; + #[allow( + non_camel_case_types, + non_snake_case, + clippy::pub_underscore_fields, + clippy::style + )] + const _: () = { + use alloy::sol_types as alloy_sol_types; + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: EnforcedPause) -> Self { + () + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for EnforcedPause { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self + } + } + #[automatically_derived] + impl alloy_sol_types::SolError for EnforcedPause { + type Parameters<'a> = UnderlyingSolTuple<'a>; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SIGNATURE: &'static str = "EnforcedPause()"; + const SELECTOR: [u8; 4] = [217u8, 60u8, 6u8, 101u8]; + #[inline] + fn new<'a>( + tuple: as alloy_sol_types::SolType>::RustType, + ) -> Self { + tuple.into() + } + #[inline] + fn tokenize(&self) -> Self::Token<'_> { + () + } + #[inline] + fn abi_decode_raw_validate(data: &[u8]) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence_validate(data) + .map(Self::new) + } + } + }; + #[derive(serde::Serialize, serde::Deserialize)] + #[derive(Default, Debug, PartialEq, Eq, Hash)] + /**Custom error with signature `ExpectedPause()` and selector `0x8dfc202b`. +```solidity +error ExpectedPause(); +```*/ + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] + #[derive(Clone)] + pub struct ExpectedPause; + #[allow( + non_camel_case_types, + non_snake_case, + clippy::pub_underscore_fields, + clippy::style + )] + const _: () = { + use alloy::sol_types as alloy_sol_types; + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: ExpectedPause) -> Self { + () + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for ExpectedPause { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self + } + } + #[automatically_derived] + impl alloy_sol_types::SolError for ExpectedPause { + type Parameters<'a> = UnderlyingSolTuple<'a>; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SIGNATURE: &'static str = "ExpectedPause()"; + const SELECTOR: [u8; 4] = [141u8, 252u8, 32u8, 43u8]; + #[inline] + fn new<'a>( + tuple: as alloy_sol_types::SolType>::RustType, + ) -> Self { + tuple.into() + } + #[inline] + fn tokenize(&self) -> Self::Token<'_> { + () + } + #[inline] + fn abi_decode_raw_validate(data: &[u8]) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence_validate(data) + .map(Self::new) + } + } + }; + #[derive(serde::Serialize, serde::Deserialize)] + #[derive(Default, Debug, PartialEq, Eq, Hash)] + /**Custom error with signature `InvalidBridgeContract()` and selector `0x66da8037`. +```solidity +error InvalidBridgeContract(); +```*/ + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] + #[derive(Clone)] + pub struct InvalidBridgeContract; + #[allow( + non_camel_case_types, + non_snake_case, + clippy::pub_underscore_fields, + clippy::style + )] + const _: () = { + use alloy::sol_types as alloy_sol_types; + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: InvalidBridgeContract) -> Self { + () + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for InvalidBridgeContract { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self + } + } + #[automatically_derived] + impl alloy_sol_types::SolError for InvalidBridgeContract { + type Parameters<'a> = UnderlyingSolTuple<'a>; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SIGNATURE: &'static str = "InvalidBridgeContract()"; + const SELECTOR: [u8; 4] = [102u8, 218u8, 128u8, 55u8]; + #[inline] + fn new<'a>( + tuple: as alloy_sol_types::SolType>::RustType, + ) -> Self { + tuple.into() + } + #[inline] + fn tokenize(&self) -> Self::Token<'_> { + () + } + #[inline] + fn abi_decode_raw_validate(data: &[u8]) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence_validate(data) + .map(Self::new) + } + } + }; + #[derive(serde::Serialize, serde::Deserialize)] + #[derive(Default, Debug, PartialEq, Eq, Hash)] + /**Custom error with signature `InvalidCertificate()` and selector `0x1d39f946`. +```solidity +error InvalidCertificate(); +```*/ + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] + #[derive(Clone)] + pub struct InvalidCertificate; + #[allow( + non_camel_case_types, + non_snake_case, + clippy::pub_underscore_fields, + clippy::style + )] + const _: () = { + use alloy::sol_types as alloy_sol_types; + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: InvalidCertificate) -> Self { + () + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for InvalidCertificate { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self + } + } + #[automatically_derived] + impl alloy_sol_types::SolError for InvalidCertificate { + type Parameters<'a> = UnderlyingSolTuple<'a>; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SIGNATURE: &'static str = "InvalidCertificate()"; + const SELECTOR: [u8; 4] = [29u8, 57u8, 249u8, 70u8]; + #[inline] + fn new<'a>( + tuple: as alloy_sol_types::SolType>::RustType, + ) -> Self { + tuple.into() + } + #[inline] + fn tokenize(&self) -> Self::Token<'_> { + () + } + #[inline] + fn abi_decode_raw_validate(data: &[u8]) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence_validate(data) + .map(Self::new) + } + } + }; + #[derive(serde::Serialize, serde::Deserialize)] + #[derive(Default, Debug, PartialEq, Eq, Hash)] + /**Custom error with signature `InvalidDepositLog()` and selector `0xc12dcbc2`. +```solidity +error InvalidDepositLog(); +```*/ + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] + #[derive(Clone)] + pub struct InvalidDepositLog; + #[allow( + non_camel_case_types, + non_snake_case, + clippy::pub_underscore_fields, + clippy::style + )] + const _: () = { + use alloy::sol_types as alloy_sol_types; + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: InvalidDepositLog) -> Self { + () + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for InvalidDepositLog { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self + } + } + #[automatically_derived] + impl alloy_sol_types::SolError for InvalidDepositLog { + type Parameters<'a> = UnderlyingSolTuple<'a>; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SIGNATURE: &'static str = "InvalidDepositLog()"; + const SELECTOR: [u8; 4] = [193u8, 45u8, 203u8, 194u8]; + #[inline] + fn new<'a>( + tuple: as alloy_sol_types::SolType>::RustType, + ) -> Self { + tuple.into() + } + #[inline] + fn tokenize(&self) -> Self::Token<'_> { + () + } + #[inline] + fn abi_decode_raw_validate(data: &[u8]) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence_validate(data) + .map(Self::new) + } + } + }; + #[derive(serde::Serialize, serde::Deserialize)] + #[derive(Default, Debug, PartialEq, Eq, Hash)] + /**Custom error with signature `InvalidNonce()` and selector `0x756688fe`. +```solidity +error InvalidNonce(); +```*/ + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] + #[derive(Clone)] + pub struct InvalidNonce; + #[allow( + non_camel_case_types, + non_snake_case, + clippy::pub_underscore_fields, + clippy::style + )] + const _: () = { + use alloy::sol_types as alloy_sol_types; + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: InvalidNonce) -> Self { + () + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for InvalidNonce { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self + } + } + #[automatically_derived] + impl alloy_sol_types::SolError for InvalidNonce { + type Parameters<'a> = UnderlyingSolTuple<'a>; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SIGNATURE: &'static str = "InvalidNonce()"; + const SELECTOR: [u8; 4] = [117u8, 102u8, 136u8, 254u8]; + #[inline] + fn new<'a>( + tuple: as alloy_sol_types::SolType>::RustType, + ) -> Self { + tuple.into() + } + #[inline] + fn tokenize(&self) -> Self::Token<'_> { + () + } + #[inline] + fn abi_decode_raw_validate(data: &[u8]) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence_validate(data) + .map(Self::new) + } + } + }; + #[derive(serde::Serialize, serde::Deserialize)] + #[derive(Default, Debug, PartialEq, Eq, Hash)] + /**Custom error with signature `InvalidToAddress()` and selector `0x8aa3a72f`. +```solidity +error InvalidToAddress(); +```*/ + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] + #[derive(Clone)] + pub struct InvalidToAddress; + #[allow( + non_camel_case_types, + non_snake_case, + clippy::pub_underscore_fields, + clippy::style + )] + const _: () = { + use alloy::sol_types as alloy_sol_types; + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: InvalidToAddress) -> Self { + () + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for InvalidToAddress { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self + } + } + #[automatically_derived] + impl alloy_sol_types::SolError for InvalidToAddress { + type Parameters<'a> = UnderlyingSolTuple<'a>; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SIGNATURE: &'static str = "InvalidToAddress()"; + const SELECTOR: [u8; 4] = [138u8, 163u8, 167u8, 47u8]; + #[inline] + fn new<'a>( + tuple: as alloy_sol_types::SolType>::RustType, + ) -> Self { + tuple.into() + } + #[inline] + fn tokenize(&self) -> Self::Token<'_> { + () + } + #[inline] + fn abi_decode_raw_validate(data: &[u8]) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence_validate(data) + .map(Self::new) + } + } + }; + #[derive(serde::Serialize, serde::Deserialize)] + #[derive(Default, Debug, PartialEq, Eq, Hash)] + /**Custom error with signature `InvalidTokenAmount()` and selector `0x21607339`. +```solidity +error InvalidTokenAmount(); +```*/ + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] + #[derive(Clone)] + pub struct InvalidTokenAmount; + #[allow( + non_camel_case_types, + non_snake_case, + clippy::pub_underscore_fields, + clippy::style + )] + const _: () = { + use alloy::sol_types as alloy_sol_types; + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: InvalidTokenAmount) -> Self { + () + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for InvalidTokenAmount { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self + } + } + #[automatically_derived] + impl alloy_sol_types::SolError for InvalidTokenAmount { + type Parameters<'a> = UnderlyingSolTuple<'a>; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SIGNATURE: &'static str = "InvalidTokenAmount()"; + const SELECTOR: [u8; 4] = [33u8, 96u8, 115u8, 57u8]; + #[inline] + fn new<'a>( + tuple: as alloy_sol_types::SolType>::RustType, + ) -> Self { + tuple.into() + } + #[inline] + fn tokenize(&self) -> Self::Token<'_> { + () + } + #[inline] + fn abi_decode_raw_validate(data: &[u8]) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence_validate(data) + .map(Self::new) + } + } + }; + #[derive(serde::Serialize, serde::Deserialize)] + #[derive(Default, Debug, PartialEq, Eq, Hash)] + /**Custom error with signature `InvalidTokenConfig()` and selector `0x07fe7bae`. +```solidity +error InvalidTokenConfig(); +```*/ + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] + #[derive(Clone)] + pub struct InvalidTokenConfig; + #[allow( + non_camel_case_types, + non_snake_case, + clippy::pub_underscore_fields, + clippy::style + )] + const _: () = { + use alloy::sol_types as alloy_sol_types; + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: InvalidTokenConfig) -> Self { + () + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for InvalidTokenConfig { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self + } + } + #[automatically_derived] + impl alloy_sol_types::SolError for InvalidTokenConfig { + type Parameters<'a> = UnderlyingSolTuple<'a>; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SIGNATURE: &'static str = "InvalidTokenConfig()"; + const SELECTOR: [u8; 4] = [7u8, 254u8, 123u8, 174u8]; + #[inline] + fn new<'a>( + tuple: as alloy_sol_types::SolType>::RustType, + ) -> Self { + tuple.into() + } + #[inline] + fn tokenize(&self) -> Self::Token<'_> { + () + } + #[inline] + fn abi_decode_raw_validate(data: &[u8]) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence_validate(data) + .map(Self::new) + } + } + }; + #[derive(serde::Serialize, serde::Deserialize)] + #[derive(Default, Debug, PartialEq, Eq, Hash)] + /**Custom error with signature `MirrorTokenNotFound()` and selector `0xa8ddb64d`. +```solidity +error MirrorTokenNotFound(); +```*/ + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] + #[derive(Clone)] + pub struct MirrorTokenNotFound; + #[allow( + non_camel_case_types, + non_snake_case, + clippy::pub_underscore_fields, + clippy::style + )] + const _: () = { + use alloy::sol_types as alloy_sol_types; + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: MirrorTokenNotFound) -> Self { + () + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for MirrorTokenNotFound { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self + } + } + #[automatically_derived] + impl alloy_sol_types::SolError for MirrorTokenNotFound { + type Parameters<'a> = UnderlyingSolTuple<'a>; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SIGNATURE: &'static str = "MirrorTokenNotFound()"; + const SELECTOR: [u8; 4] = [168u8, 221u8, 182u8, 77u8]; + #[inline] + fn new<'a>( + tuple: as alloy_sol_types::SolType>::RustType, + ) -> Self { + tuple.into() + } + #[inline] + fn tokenize(&self) -> Self::Token<'_> { + () + } + #[inline] + fn abi_decode_raw_validate(data: &[u8]) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence_validate(data) + .map(Self::new) + } + } + }; + #[derive(serde::Serialize, serde::Deserialize)] + #[derive(Default, Debug, PartialEq, Eq, Hash)] + /**Custom error with signature `RequestAlreadyProcessed()` and selector `0xa6bc74c4`. +```solidity +error RequestAlreadyProcessed(); +```*/ + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] + #[derive(Clone)] + pub struct RequestAlreadyProcessed; + #[allow( + non_camel_case_types, + non_snake_case, + clippy::pub_underscore_fields, + clippy::style + )] + const _: () = { + use alloy::sol_types as alloy_sol_types; + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: RequestAlreadyProcessed) -> Self { + () + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for RequestAlreadyProcessed { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self + } + } + #[automatically_derived] + impl alloy_sol_types::SolError for RequestAlreadyProcessed { + type Parameters<'a> = UnderlyingSolTuple<'a>; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SIGNATURE: &'static str = "RequestAlreadyProcessed()"; + const SELECTOR: [u8; 4] = [166u8, 188u8, 116u8, 196u8]; + #[inline] + fn new<'a>( + tuple: as alloy_sol_types::SolType>::RustType, + ) -> Self { + tuple.into() + } + #[inline] + fn tokenize(&self) -> Self::Token<'_> { + () + } + #[inline] + fn abi_decode_raw_validate(data: &[u8]) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence_validate(data) + .map(Self::new) + } + } + }; + #[derive(serde::Serialize, serde::Deserialize)] + #[derive(Default, Debug, PartialEq, Eq, Hash)] + /**Custom error with signature `SafeERC20FailedOperation(address)` and selector `0x5274afe7`. +```solidity +error SafeERC20FailedOperation(address token); +```*/ + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] + #[derive(Clone)] + pub struct SafeERC20FailedOperation { + #[allow(missing_docs)] + pub token: alloy::sol_types::private::Address, + } + #[allow( + non_camel_case_types, + non_snake_case, + clippy::pub_underscore_fields, + clippy::style + )] + const _: () = { + use alloy::sol_types as alloy_sol_types; + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Address,); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (alloy::sol_types::private::Address,); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From + for UnderlyingRustTuple<'_> { + fn from(value: SafeERC20FailedOperation) -> Self { + (value.token,) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> + for SafeERC20FailedOperation { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { token: tuple.0 } + } + } + #[automatically_derived] + impl alloy_sol_types::SolError for SafeERC20FailedOperation { + type Parameters<'a> = UnderlyingSolTuple<'a>; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SIGNATURE: &'static str = "SafeERC20FailedOperation(address)"; + const SELECTOR: [u8; 4] = [82u8, 116u8, 175u8, 231u8]; + #[inline] + fn new<'a>( + tuple: as alloy_sol_types::SolType>::RustType, + ) -> Self { + tuple.into() + } + #[inline] + fn tokenize(&self) -> Self::Token<'_> { + ( + ::tokenize( + &self.token, + ), + ) + } + #[inline] + fn abi_decode_raw_validate(data: &[u8]) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence_validate(data) + .map(Self::new) + } + } + }; + #[derive(serde::Serialize, serde::Deserialize)] + #[derive(Default, Debug, PartialEq, Eq, Hash)] + /**Event with signature `Claim(uint256,address,address,uint256,address)` and selector `0xaf3f1a12344bbeaab954d412e821d6b6a06d5cd5d27be204353bd4ea9b55a504`. +```solidity +event Claim(uint256 indexed id, address indexed mirrorToken, address indexed token, uint256 amount, address to); +```*/ + #[allow( + non_camel_case_types, + non_snake_case, + clippy::pub_underscore_fields, + clippy::style + )] + #[derive(Clone)] + pub struct Claim { + #[allow(missing_docs)] + pub id: alloy::sol_types::private::primitives::aliases::U256, + #[allow(missing_docs)] + pub mirrorToken: alloy::sol_types::private::Address, + #[allow(missing_docs)] + pub token: alloy::sol_types::private::Address, + #[allow(missing_docs)] + pub amount: alloy::sol_types::private::primitives::aliases::U256, + #[allow(missing_docs)] + pub to: alloy::sol_types::private::Address, + } + #[allow( + non_camel_case_types, + non_snake_case, + clippy::pub_underscore_fields, + clippy::style + )] + const _: () = { + use alloy::sol_types as alloy_sol_types; + #[automatically_derived] + impl alloy_sol_types::SolEvent for Claim { + type DataTuple<'a> = ( + alloy::sol_types::sol_data::Uint<256>, + alloy::sol_types::sol_data::Address, + ); + type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + type TopicList = ( + alloy_sol_types::sol_data::FixedBytes<32>, + alloy::sol_types::sol_data::Uint<256>, + alloy::sol_types::sol_data::Address, + alloy::sol_types::sol_data::Address, + ); + const SIGNATURE: &'static str = "Claim(uint256,address,address,uint256,address)"; + const SIGNATURE_HASH: alloy_sol_types::private::B256 = alloy_sol_types::private::B256::new([ + 175u8, 63u8, 26u8, 18u8, 52u8, 75u8, 190u8, 170u8, 185u8, 84u8, 212u8, + 18u8, 232u8, 33u8, 214u8, 182u8, 160u8, 109u8, 92u8, 213u8, 210u8, 123u8, + 226u8, 4u8, 53u8, 59u8, 212u8, 234u8, 155u8, 85u8, 165u8, 4u8, + ]); + const ANONYMOUS: bool = false; + #[allow(unused_variables)] + #[inline] + fn new( + topics: ::RustType, + data: as alloy_sol_types::SolType>::RustType, + ) -> Self { + Self { + id: topics.1, + mirrorToken: topics.2, + token: topics.3, + amount: data.0, + to: data.1, + } + } + #[inline] + fn check_signature( + topics: &::RustType, + ) -> alloy_sol_types::Result<()> { + if topics.0 != Self::SIGNATURE_HASH { + return Err( + alloy_sol_types::Error::invalid_event_signature_hash( + Self::SIGNATURE, + topics.0, + Self::SIGNATURE_HASH, + ), + ); + } + Ok(()) + } + #[inline] + fn tokenize_body(&self) -> Self::DataToken<'_> { + ( + as alloy_sol_types::SolType>::tokenize(&self.amount), + ::tokenize( + &self.to, + ), + ) + } + #[inline] + fn topics(&self) -> ::RustType { + ( + Self::SIGNATURE_HASH.into(), + self.id.clone(), + self.mirrorToken.clone(), + self.token.clone(), + ) + } + #[inline] + fn encode_topics_raw( + &self, + out: &mut [alloy_sol_types::abi::token::WordToken], + ) -> alloy_sol_types::Result<()> { + if out.len() < ::COUNT { + return Err(alloy_sol_types::Error::Overrun); + } + out[0usize] = alloy_sol_types::abi::token::WordToken( + Self::SIGNATURE_HASH, + ); + out[1usize] = as alloy_sol_types::EventTopic>::encode_topic(&self.id); + out[2usize] = ::encode_topic( + &self.mirrorToken, + ); + out[3usize] = ::encode_topic( + &self.token, + ); + Ok(()) + } + } + #[automatically_derived] + impl alloy_sol_types::private::IntoLogData for Claim { + fn to_log_data(&self) -> alloy_sol_types::private::LogData { + From::from(self) + } + fn into_log_data(self) -> alloy_sol_types::private::LogData { + From::from(&self) + } + } + #[automatically_derived] + impl From<&Claim> for alloy_sol_types::private::LogData { + #[inline] + fn from(this: &Claim) -> alloy_sol_types::private::LogData { + alloy_sol_types::SolEvent::encode_log_data(this) + } + } + }; + #[derive(serde::Serialize, serde::Deserialize)] + #[derive(Default, Debug, PartialEq, Eq, Hash)] + /**Event with signature `ClaimNative(uint256,uint256,address)` and selector `0x913168da07c3f7f5f3c523933316328b0d0611b627f12eb11c22ca44fbb19dc6`. +```solidity +event ClaimNative(uint256 indexed id, uint256 amount, address to); +```*/ + #[allow( + non_camel_case_types, + non_snake_case, + clippy::pub_underscore_fields, + clippy::style + )] + #[derive(Clone)] + pub struct ClaimNative { + #[allow(missing_docs)] + pub id: alloy::sol_types::private::primitives::aliases::U256, + #[allow(missing_docs)] + pub amount: alloy::sol_types::private::primitives::aliases::U256, + #[allow(missing_docs)] + pub to: alloy::sol_types::private::Address, + } + #[allow( + non_camel_case_types, + non_snake_case, + clippy::pub_underscore_fields, + clippy::style + )] + const _: () = { + use alloy::sol_types as alloy_sol_types; + #[automatically_derived] + impl alloy_sol_types::SolEvent for ClaimNative { + type DataTuple<'a> = ( + alloy::sol_types::sol_data::Uint<256>, + alloy::sol_types::sol_data::Address, + ); + type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + type TopicList = ( + alloy_sol_types::sol_data::FixedBytes<32>, + alloy::sol_types::sol_data::Uint<256>, + ); + const SIGNATURE: &'static str = "ClaimNative(uint256,uint256,address)"; + const SIGNATURE_HASH: alloy_sol_types::private::B256 = alloy_sol_types::private::B256::new([ + 145u8, 49u8, 104u8, 218u8, 7u8, 195u8, 247u8, 245u8, 243u8, 197u8, 35u8, + 147u8, 51u8, 22u8, 50u8, 139u8, 13u8, 6u8, 17u8, 182u8, 39u8, 241u8, + 46u8, 177u8, 28u8, 34u8, 202u8, 68u8, 251u8, 177u8, 157u8, 198u8, + ]); + const ANONYMOUS: bool = false; + #[allow(unused_variables)] + #[inline] + fn new( + topics: ::RustType, + data: as alloy_sol_types::SolType>::RustType, + ) -> Self { + Self { + id: topics.1, + amount: data.0, + to: data.1, + } + } + #[inline] + fn check_signature( + topics: &::RustType, + ) -> alloy_sol_types::Result<()> { + if topics.0 != Self::SIGNATURE_HASH { + return Err( + alloy_sol_types::Error::invalid_event_signature_hash( + Self::SIGNATURE, + topics.0, + Self::SIGNATURE_HASH, + ), + ); + } + Ok(()) + } + #[inline] + fn tokenize_body(&self) -> Self::DataToken<'_> { + ( + as alloy_sol_types::SolType>::tokenize(&self.amount), + ::tokenize( + &self.to, + ), + ) + } + #[inline] + fn topics(&self) -> ::RustType { + (Self::SIGNATURE_HASH.into(), self.id.clone()) + } + #[inline] + fn encode_topics_raw( + &self, + out: &mut [alloy_sol_types::abi::token::WordToken], + ) -> alloy_sol_types::Result<()> { + if out.len() < ::COUNT { + return Err(alloy_sol_types::Error::Overrun); + } + out[0usize] = alloy_sol_types::abi::token::WordToken( + Self::SIGNATURE_HASH, + ); + out[1usize] = as alloy_sol_types::EventTopic>::encode_topic(&self.id); + Ok(()) + } + } + #[automatically_derived] + impl alloy_sol_types::private::IntoLogData for ClaimNative { + fn to_log_data(&self) -> alloy_sol_types::private::LogData { + From::from(self) + } + fn into_log_data(self) -> alloy_sol_types::private::LogData { + From::from(&self) + } + } + #[automatically_derived] + impl From<&ClaimNative> for alloy_sol_types::private::LogData { + #[inline] + fn from(this: &ClaimNative) -> alloy_sol_types::private::LogData { + alloy_sol_types::SolEvent::encode_log_data(this) + } + } + }; + #[derive(serde::Serialize, serde::Deserialize)] + #[derive(Default, Debug, PartialEq, Eq, Hash)] + /**Event with signature `Deposit(uint256,address,uint256,address)` and selector `0x05e57fa62d890603d85944c963ddc7fbe77cde5ea69cad7033fc6f76b7ddd2ab`. +```solidity +event Deposit(uint256 indexed id, address indexed token, uint256 amount, address to); +```*/ + #[allow( + non_camel_case_types, + non_snake_case, + clippy::pub_underscore_fields, + clippy::style + )] + #[derive(Clone)] + pub struct Deposit { + #[allow(missing_docs)] + pub id: alloy::sol_types::private::primitives::aliases::U256, + #[allow(missing_docs)] + pub token: alloy::sol_types::private::Address, + #[allow(missing_docs)] + pub amount: alloy::sol_types::private::primitives::aliases::U256, + #[allow(missing_docs)] + pub to: alloy::sol_types::private::Address, + } + #[allow( + non_camel_case_types, + non_snake_case, + clippy::pub_underscore_fields, + clippy::style + )] + const _: () = { + use alloy::sol_types as alloy_sol_types; + #[automatically_derived] + impl alloy_sol_types::SolEvent for Deposit { + type DataTuple<'a> = ( + alloy::sol_types::sol_data::Uint<256>, + alloy::sol_types::sol_data::Address, + ); + type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + type TopicList = ( + alloy_sol_types::sol_data::FixedBytes<32>, + alloy::sol_types::sol_data::Uint<256>, + alloy::sol_types::sol_data::Address, + ); + const SIGNATURE: &'static str = "Deposit(uint256,address,uint256,address)"; + const SIGNATURE_HASH: alloy_sol_types::private::B256 = alloy_sol_types::private::B256::new([ + 5u8, 229u8, 127u8, 166u8, 45u8, 137u8, 6u8, 3u8, 216u8, 89u8, 68u8, + 201u8, 99u8, 221u8, 199u8, 251u8, 231u8, 124u8, 222u8, 94u8, 166u8, + 156u8, 173u8, 112u8, 51u8, 252u8, 111u8, 118u8, 183u8, 221u8, 210u8, + 171u8, + ]); + const ANONYMOUS: bool = false; + #[allow(unused_variables)] + #[inline] + fn new( + topics: ::RustType, + data: as alloy_sol_types::SolType>::RustType, + ) -> Self { + Self { + id: topics.1, + token: topics.2, + amount: data.0, + to: data.1, + } + } + #[inline] + fn check_signature( + topics: &::RustType, + ) -> alloy_sol_types::Result<()> { + if topics.0 != Self::SIGNATURE_HASH { + return Err( + alloy_sol_types::Error::invalid_event_signature_hash( + Self::SIGNATURE, + topics.0, + Self::SIGNATURE_HASH, + ), + ); + } + Ok(()) + } + #[inline] + fn tokenize_body(&self) -> Self::DataToken<'_> { + ( + as alloy_sol_types::SolType>::tokenize(&self.amount), + ::tokenize( + &self.to, + ), + ) + } + #[inline] + fn topics(&self) -> ::RustType { + (Self::SIGNATURE_HASH.into(), self.id.clone(), self.token.clone()) + } + #[inline] + fn encode_topics_raw( + &self, + out: &mut [alloy_sol_types::abi::token::WordToken], + ) -> alloy_sol_types::Result<()> { + if out.len() < ::COUNT { + return Err(alloy_sol_types::Error::Overrun); + } + out[0usize] = alloy_sol_types::abi::token::WordToken( + Self::SIGNATURE_HASH, + ); + out[1usize] = as alloy_sol_types::EventTopic>::encode_topic(&self.id); + out[2usize] = ::encode_topic( + &self.token, + ); + Ok(()) + } + } + #[automatically_derived] + impl alloy_sol_types::private::IntoLogData for Deposit { + fn to_log_data(&self) -> alloy_sol_types::private::LogData { + From::from(self) + } + fn into_log_data(self) -> alloy_sol_types::private::LogData { + From::from(&self) + } + } + #[automatically_derived] + impl From<&Deposit> for alloy_sol_types::private::LogData { + #[inline] + fn from(this: &Deposit) -> alloy_sol_types::private::LogData { + alloy_sol_types::SolEvent::encode_log_data(this) + } + } + }; + #[derive(serde::Serialize, serde::Deserialize)] + #[derive(Default, Debug, PartialEq, Eq, Hash)] + /**Event with signature `DepositNative(uint256,uint256,address)` and selector `0x40352b63d0a9c92983fcf19d8c3fc28ca0bcc8fa9ffeb5be28e14a3f758ab39e`. +```solidity +event DepositNative(uint256 indexed id, uint256 amount, address to); +```*/ + #[allow( + non_camel_case_types, + non_snake_case, + clippy::pub_underscore_fields, + clippy::style + )] + #[derive(Clone)] + pub struct DepositNative { + #[allow(missing_docs)] + pub id: alloy::sol_types::private::primitives::aliases::U256, + #[allow(missing_docs)] + pub amount: alloy::sol_types::private::primitives::aliases::U256, + #[allow(missing_docs)] + pub to: alloy::sol_types::private::Address, + } + #[allow( + non_camel_case_types, + non_snake_case, + clippy::pub_underscore_fields, + clippy::style + )] + const _: () = { + use alloy::sol_types as alloy_sol_types; + #[automatically_derived] + impl alloy_sol_types::SolEvent for DepositNative { + type DataTuple<'a> = ( + alloy::sol_types::sol_data::Uint<256>, + alloy::sol_types::sol_data::Address, + ); + type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + type TopicList = ( + alloy_sol_types::sol_data::FixedBytes<32>, + alloy::sol_types::sol_data::Uint<256>, + ); + const SIGNATURE: &'static str = "DepositNative(uint256,uint256,address)"; + const SIGNATURE_HASH: alloy_sol_types::private::B256 = alloy_sol_types::private::B256::new([ + 64u8, 53u8, 43u8, 99u8, 208u8, 169u8, 201u8, 41u8, 131u8, 252u8, 241u8, + 157u8, 140u8, 63u8, 194u8, 140u8, 160u8, 188u8, 200u8, 250u8, 159u8, + 254u8, 181u8, 190u8, 40u8, 225u8, 74u8, 63u8, 117u8, 138u8, 179u8, 158u8, + ]); + const ANONYMOUS: bool = false; + #[allow(unused_variables)] + #[inline] + fn new( + topics: ::RustType, + data: as alloy_sol_types::SolType>::RustType, + ) -> Self { + Self { + id: topics.1, + amount: data.0, + to: data.1, + } + } + #[inline] + fn check_signature( + topics: &::RustType, + ) -> alloy_sol_types::Result<()> { + if topics.0 != Self::SIGNATURE_HASH { + return Err( + alloy_sol_types::Error::invalid_event_signature_hash( + Self::SIGNATURE, + topics.0, + Self::SIGNATURE_HASH, + ), + ); + } + Ok(()) + } + #[inline] + fn tokenize_body(&self) -> Self::DataToken<'_> { + ( + as alloy_sol_types::SolType>::tokenize(&self.amount), + ::tokenize( + &self.to, + ), + ) + } + #[inline] + fn topics(&self) -> ::RustType { + (Self::SIGNATURE_HASH.into(), self.id.clone()) + } + #[inline] + fn encode_topics_raw( + &self, + out: &mut [alloy_sol_types::abi::token::WordToken], + ) -> alloy_sol_types::Result<()> { + if out.len() < ::COUNT { + return Err(alloy_sol_types::Error::Overrun); + } + out[0usize] = alloy_sol_types::abi::token::WordToken( + Self::SIGNATURE_HASH, + ); + out[1usize] = as alloy_sol_types::EventTopic>::encode_topic(&self.id); + Ok(()) + } + } + #[automatically_derived] + impl alloy_sol_types::private::IntoLogData for DepositNative { + fn to_log_data(&self) -> alloy_sol_types::private::LogData { + From::from(self) + } + fn into_log_data(self) -> alloy_sol_types::private::LogData { + From::from(&self) + } + } + #[automatically_derived] + impl From<&DepositNative> for alloy_sol_types::private::LogData { + #[inline] + fn from(this: &DepositNative) -> alloy_sol_types::private::LogData { + alloy_sol_types::SolEvent::encode_log_data(this) + } + } + }; + #[derive(serde::Serialize, serde::Deserialize)] + #[derive(Default, Debug, PartialEq, Eq, Hash)] + /**Event with signature `Paused(address)` and selector `0x62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258`. +```solidity +event Paused(address account); +```*/ + #[allow( + non_camel_case_types, + non_snake_case, + clippy::pub_underscore_fields, + clippy::style + )] + #[derive(Clone)] + pub struct Paused { + #[allow(missing_docs)] + pub account: alloy::sol_types::private::Address, + } + #[allow( + non_camel_case_types, + non_snake_case, + clippy::pub_underscore_fields, + clippy::style + )] + const _: () = { + use alloy::sol_types as alloy_sol_types; + #[automatically_derived] + impl alloy_sol_types::SolEvent for Paused { + type DataTuple<'a> = (alloy::sol_types::sol_data::Address,); + type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + type TopicList = (alloy_sol_types::sol_data::FixedBytes<32>,); + const SIGNATURE: &'static str = "Paused(address)"; + const SIGNATURE_HASH: alloy_sol_types::private::B256 = alloy_sol_types::private::B256::new([ + 98u8, 231u8, 140u8, 234u8, 1u8, 190u8, 227u8, 32u8, 205u8, 78u8, 66u8, + 2u8, 112u8, 181u8, 234u8, 116u8, 0u8, 13u8, 17u8, 176u8, 201u8, 247u8, + 71u8, 84u8, 235u8, 219u8, 252u8, 84u8, 75u8, 5u8, 162u8, 88u8, + ]); + const ANONYMOUS: bool = false; + #[allow(unused_variables)] + #[inline] + fn new( + topics: ::RustType, + data: as alloy_sol_types::SolType>::RustType, + ) -> Self { + Self { account: data.0 } + } + #[inline] + fn check_signature( + topics: &::RustType, + ) -> alloy_sol_types::Result<()> { + if topics.0 != Self::SIGNATURE_HASH { + return Err( + alloy_sol_types::Error::invalid_event_signature_hash( + Self::SIGNATURE, + topics.0, + Self::SIGNATURE_HASH, + ), + ); + } + Ok(()) + } + #[inline] + fn tokenize_body(&self) -> Self::DataToken<'_> { + ( + ::tokenize( + &self.account, + ), + ) + } + #[inline] + fn topics(&self) -> ::RustType { + (Self::SIGNATURE_HASH.into(),) + } + #[inline] + fn encode_topics_raw( + &self, + out: &mut [alloy_sol_types::abi::token::WordToken], + ) -> alloy_sol_types::Result<()> { + if out.len() < ::COUNT { + return Err(alloy_sol_types::Error::Overrun); + } + out[0usize] = alloy_sol_types::abi::token::WordToken( + Self::SIGNATURE_HASH, + ); + Ok(()) + } + } + #[automatically_derived] + impl alloy_sol_types::private::IntoLogData for Paused { + fn to_log_data(&self) -> alloy_sol_types::private::LogData { + From::from(self) + } + fn into_log_data(self) -> alloy_sol_types::private::LogData { + From::from(&self) + } + } + #[automatically_derived] + impl From<&Paused> for alloy_sol_types::private::LogData { + #[inline] + fn from(this: &Paused) -> alloy_sol_types::private::LogData { + alloy_sol_types::SolEvent::encode_log_data(this) + } + } + }; + #[derive(serde::Serialize, serde::Deserialize)] + #[derive(Default, Debug, PartialEq, Eq, Hash)] + /**Event with signature `RoleAdminChanged(bytes32,bytes32,bytes32)` and selector `0xbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff`. +```solidity +event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole); +```*/ + #[allow( + non_camel_case_types, + non_snake_case, + clippy::pub_underscore_fields, + clippy::style + )] + #[derive(Clone)] + pub struct RoleAdminChanged { + #[allow(missing_docs)] + pub role: alloy::sol_types::private::FixedBytes<32>, + #[allow(missing_docs)] + pub previousAdminRole: alloy::sol_types::private::FixedBytes<32>, + #[allow(missing_docs)] + pub newAdminRole: alloy::sol_types::private::FixedBytes<32>, + } + #[allow( + non_camel_case_types, + non_snake_case, + clippy::pub_underscore_fields, + clippy::style + )] + const _: () = { + use alloy::sol_types as alloy_sol_types; + #[automatically_derived] + impl alloy_sol_types::SolEvent for RoleAdminChanged { + type DataTuple<'a> = (); + type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + type TopicList = ( + alloy_sol_types::sol_data::FixedBytes<32>, + alloy::sol_types::sol_data::FixedBytes<32>, + alloy::sol_types::sol_data::FixedBytes<32>, + alloy::sol_types::sol_data::FixedBytes<32>, + ); + const SIGNATURE: &'static str = "RoleAdminChanged(bytes32,bytes32,bytes32)"; + const SIGNATURE_HASH: alloy_sol_types::private::B256 = alloy_sol_types::private::B256::new([ + 189u8, 121u8, 184u8, 111u8, 254u8, 10u8, 184u8, 232u8, 119u8, 97u8, 81u8, + 81u8, 66u8, 23u8, 205u8, 124u8, 172u8, 213u8, 44u8, 144u8, 159u8, 102u8, + 71u8, 92u8, 58u8, 244u8, 78u8, 18u8, 159u8, 11u8, 0u8, 255u8, + ]); + const ANONYMOUS: bool = false; + #[allow(unused_variables)] + #[inline] + fn new( + topics: ::RustType, + data: as alloy_sol_types::SolType>::RustType, + ) -> Self { + Self { + role: topics.1, + previousAdminRole: topics.2, + newAdminRole: topics.3, + } + } + #[inline] + fn check_signature( + topics: &::RustType, + ) -> alloy_sol_types::Result<()> { + if topics.0 != Self::SIGNATURE_HASH { + return Err( + alloy_sol_types::Error::invalid_event_signature_hash( + Self::SIGNATURE, + topics.0, + Self::SIGNATURE_HASH, + ), + ); + } + Ok(()) + } + #[inline] + fn tokenize_body(&self) -> Self::DataToken<'_> { + () + } + #[inline] + fn topics(&self) -> ::RustType { + ( + Self::SIGNATURE_HASH.into(), + self.role.clone(), + self.previousAdminRole.clone(), + self.newAdminRole.clone(), + ) + } + #[inline] + fn encode_topics_raw( + &self, + out: &mut [alloy_sol_types::abi::token::WordToken], + ) -> alloy_sol_types::Result<()> { + if out.len() < ::COUNT { + return Err(alloy_sol_types::Error::Overrun); + } + out[0usize] = alloy_sol_types::abi::token::WordToken( + Self::SIGNATURE_HASH, + ); + out[1usize] = as alloy_sol_types::EventTopic>::encode_topic(&self.role); + out[2usize] = as alloy_sol_types::EventTopic>::encode_topic(&self.previousAdminRole); + out[3usize] = as alloy_sol_types::EventTopic>::encode_topic(&self.newAdminRole); + Ok(()) + } + } + #[automatically_derived] + impl alloy_sol_types::private::IntoLogData for RoleAdminChanged { + fn to_log_data(&self) -> alloy_sol_types::private::LogData { + From::from(self) + } + fn into_log_data(self) -> alloy_sol_types::private::LogData { + From::from(&self) + } + } + #[automatically_derived] + impl From<&RoleAdminChanged> for alloy_sol_types::private::LogData { + #[inline] + fn from(this: &RoleAdminChanged) -> alloy_sol_types::private::LogData { + alloy_sol_types::SolEvent::encode_log_data(this) + } + } + }; + #[derive(serde::Serialize, serde::Deserialize)] + #[derive(Default, Debug, PartialEq, Eq, Hash)] + /**Event with signature `RoleGranted(bytes32,address,address)` and selector `0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d`. +```solidity +event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender); +```*/ + #[allow( + non_camel_case_types, + non_snake_case, + clippy::pub_underscore_fields, + clippy::style + )] + #[derive(Clone)] + pub struct RoleGranted { + #[allow(missing_docs)] + pub role: alloy::sol_types::private::FixedBytes<32>, + #[allow(missing_docs)] + pub account: alloy::sol_types::private::Address, + #[allow(missing_docs)] + pub sender: alloy::sol_types::private::Address, + } + #[allow( + non_camel_case_types, + non_snake_case, + clippy::pub_underscore_fields, + clippy::style + )] + const _: () = { + use alloy::sol_types as alloy_sol_types; + #[automatically_derived] + impl alloy_sol_types::SolEvent for RoleGranted { + type DataTuple<'a> = (); + type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + type TopicList = ( + alloy_sol_types::sol_data::FixedBytes<32>, + alloy::sol_types::sol_data::FixedBytes<32>, + alloy::sol_types::sol_data::Address, + alloy::sol_types::sol_data::Address, + ); + const SIGNATURE: &'static str = "RoleGranted(bytes32,address,address)"; + const SIGNATURE_HASH: alloy_sol_types::private::B256 = alloy_sol_types::private::B256::new([ + 47u8, 135u8, 136u8, 17u8, 126u8, 126u8, 255u8, 29u8, 130u8, 233u8, 38u8, + 236u8, 121u8, 73u8, 1u8, 209u8, 124u8, 120u8, 2u8, 74u8, 80u8, 39u8, 9u8, + 64u8, 48u8, 69u8, 64u8, 167u8, 51u8, 101u8, 111u8, 13u8, + ]); + const ANONYMOUS: bool = false; + #[allow(unused_variables)] + #[inline] + fn new( + topics: ::RustType, + data: as alloy_sol_types::SolType>::RustType, + ) -> Self { + Self { + role: topics.1, + account: topics.2, + sender: topics.3, + } + } + #[inline] + fn check_signature( + topics: &::RustType, + ) -> alloy_sol_types::Result<()> { + if topics.0 != Self::SIGNATURE_HASH { + return Err( + alloy_sol_types::Error::invalid_event_signature_hash( + Self::SIGNATURE, + topics.0, + Self::SIGNATURE_HASH, + ), + ); + } + Ok(()) + } + #[inline] + fn tokenize_body(&self) -> Self::DataToken<'_> { + () + } + #[inline] + fn topics(&self) -> ::RustType { + ( + Self::SIGNATURE_HASH.into(), + self.role.clone(), + self.account.clone(), + self.sender.clone(), + ) + } + #[inline] + fn encode_topics_raw( + &self, + out: &mut [alloy_sol_types::abi::token::WordToken], + ) -> alloy_sol_types::Result<()> { + if out.len() < ::COUNT { + return Err(alloy_sol_types::Error::Overrun); + } + out[0usize] = alloy_sol_types::abi::token::WordToken( + Self::SIGNATURE_HASH, + ); + out[1usize] = as alloy_sol_types::EventTopic>::encode_topic(&self.role); + out[2usize] = ::encode_topic( + &self.account, + ); + out[3usize] = ::encode_topic( + &self.sender, + ); + Ok(()) + } + } + #[automatically_derived] + impl alloy_sol_types::private::IntoLogData for RoleGranted { + fn to_log_data(&self) -> alloy_sol_types::private::LogData { + From::from(self) + } + fn into_log_data(self) -> alloy_sol_types::private::LogData { + From::from(&self) + } + } + #[automatically_derived] + impl From<&RoleGranted> for alloy_sol_types::private::LogData { + #[inline] + fn from(this: &RoleGranted) -> alloy_sol_types::private::LogData { + alloy_sol_types::SolEvent::encode_log_data(this) + } + } + }; + #[derive(serde::Serialize, serde::Deserialize)] + #[derive(Default, Debug, PartialEq, Eq, Hash)] + /**Event with signature `RoleRevoked(bytes32,address,address)` and selector `0xf6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b`. +```solidity +event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender); +```*/ + #[allow( + non_camel_case_types, + non_snake_case, + clippy::pub_underscore_fields, + clippy::style + )] + #[derive(Clone)] + pub struct RoleRevoked { + #[allow(missing_docs)] + pub role: alloy::sol_types::private::FixedBytes<32>, + #[allow(missing_docs)] + pub account: alloy::sol_types::private::Address, + #[allow(missing_docs)] + pub sender: alloy::sol_types::private::Address, + } + #[allow( + non_camel_case_types, + non_snake_case, + clippy::pub_underscore_fields, + clippy::style + )] + const _: () = { + use alloy::sol_types as alloy_sol_types; + #[automatically_derived] + impl alloy_sol_types::SolEvent for RoleRevoked { + type DataTuple<'a> = (); + type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + type TopicList = ( + alloy_sol_types::sol_data::FixedBytes<32>, + alloy::sol_types::sol_data::FixedBytes<32>, + alloy::sol_types::sol_data::Address, + alloy::sol_types::sol_data::Address, + ); + const SIGNATURE: &'static str = "RoleRevoked(bytes32,address,address)"; + const SIGNATURE_HASH: alloy_sol_types::private::B256 = alloy_sol_types::private::B256::new([ + 246u8, 57u8, 31u8, 92u8, 50u8, 217u8, 198u8, 157u8, 42u8, 71u8, 234u8, + 103u8, 11u8, 68u8, 41u8, 116u8, 181u8, 57u8, 53u8, 209u8, 237u8, 199u8, + 253u8, 100u8, 235u8, 33u8, 224u8, 71u8, 168u8, 57u8, 23u8, 27u8, + ]); + const ANONYMOUS: bool = false; + #[allow(unused_variables)] + #[inline] + fn new( + topics: ::RustType, + data: as alloy_sol_types::SolType>::RustType, + ) -> Self { + Self { + role: topics.1, + account: topics.2, + sender: topics.3, + } + } + #[inline] + fn check_signature( + topics: &::RustType, + ) -> alloy_sol_types::Result<()> { + if topics.0 != Self::SIGNATURE_HASH { + return Err( + alloy_sol_types::Error::invalid_event_signature_hash( + Self::SIGNATURE, + topics.0, + Self::SIGNATURE_HASH, + ), + ); + } + Ok(()) + } + #[inline] + fn tokenize_body(&self) -> Self::DataToken<'_> { + () + } + #[inline] + fn topics(&self) -> ::RustType { + ( + Self::SIGNATURE_HASH.into(), + self.role.clone(), + self.account.clone(), + self.sender.clone(), + ) + } + #[inline] + fn encode_topics_raw( + &self, + out: &mut [alloy_sol_types::abi::token::WordToken], + ) -> alloy_sol_types::Result<()> { + if out.len() < ::COUNT { + return Err(alloy_sol_types::Error::Overrun); + } + out[0usize] = alloy_sol_types::abi::token::WordToken( + Self::SIGNATURE_HASH, + ); + out[1usize] = as alloy_sol_types::EventTopic>::encode_topic(&self.role); + out[2usize] = ::encode_topic( + &self.account, + ); + out[3usize] = ::encode_topic( + &self.sender, + ); + Ok(()) + } + } + #[automatically_derived] + impl alloy_sol_types::private::IntoLogData for RoleRevoked { + fn to_log_data(&self) -> alloy_sol_types::private::LogData { + From::from(self) + } + fn into_log_data(self) -> alloy_sol_types::private::LogData { + From::from(&self) + } + } + #[automatically_derived] + impl From<&RoleRevoked> for alloy_sol_types::private::LogData { + #[inline] + fn from(this: &RoleRevoked) -> alloy_sol_types::private::LogData { + alloy_sol_types::SolEvent::encode_log_data(this) + } + } + }; + #[derive(serde::Serialize, serde::Deserialize)] + #[derive(Default, Debug, PartialEq, Eq, Hash)] + /**Event with signature `Unpaused(address)` and selector `0x5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa`. +```solidity +event Unpaused(address account); +```*/ + #[allow( + non_camel_case_types, + non_snake_case, + clippy::pub_underscore_fields, + clippy::style + )] + #[derive(Clone)] + pub struct Unpaused { + #[allow(missing_docs)] + pub account: alloy::sol_types::private::Address, + } + #[allow( + non_camel_case_types, + non_snake_case, + clippy::pub_underscore_fields, + clippy::style + )] + const _: () = { + use alloy::sol_types as alloy_sol_types; + #[automatically_derived] + impl alloy_sol_types::SolEvent for Unpaused { + type DataTuple<'a> = (alloy::sol_types::sol_data::Address,); + type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + type TopicList = (alloy_sol_types::sol_data::FixedBytes<32>,); + const SIGNATURE: &'static str = "Unpaused(address)"; + const SIGNATURE_HASH: alloy_sol_types::private::B256 = alloy_sol_types::private::B256::new([ + 93u8, 185u8, 238u8, 10u8, 73u8, 91u8, 242u8, 230u8, 255u8, 156u8, 145u8, + 167u8, 131u8, 76u8, 27u8, 164u8, 253u8, 210u8, 68u8, 165u8, 232u8, 170u8, + 78u8, 83u8, 123u8, 211u8, 138u8, 234u8, 228u8, 176u8, 115u8, 170u8, + ]); + const ANONYMOUS: bool = false; + #[allow(unused_variables)] + #[inline] + fn new( + topics: ::RustType, + data: as alloy_sol_types::SolType>::RustType, + ) -> Self { + Self { account: data.0 } + } + #[inline] + fn check_signature( + topics: &::RustType, + ) -> alloy_sol_types::Result<()> { + if topics.0 != Self::SIGNATURE_HASH { + return Err( + alloy_sol_types::Error::invalid_event_signature_hash( + Self::SIGNATURE, + topics.0, + Self::SIGNATURE_HASH, + ), + ); + } + Ok(()) + } + #[inline] + fn tokenize_body(&self) -> Self::DataToken<'_> { + ( + ::tokenize( + &self.account, + ), + ) + } + #[inline] + fn topics(&self) -> ::RustType { + (Self::SIGNATURE_HASH.into(),) + } + #[inline] + fn encode_topics_raw( + &self, + out: &mut [alloy_sol_types::abi::token::WordToken], + ) -> alloy_sol_types::Result<()> { + if out.len() < ::COUNT { + return Err(alloy_sol_types::Error::Overrun); + } + out[0usize] = alloy_sol_types::abi::token::WordToken( + Self::SIGNATURE_HASH, + ); + Ok(()) + } + } + #[automatically_derived] + impl alloy_sol_types::private::IntoLogData for Unpaused { + fn to_log_data(&self) -> alloy_sol_types::private::LogData { + From::from(self) + } + fn into_log_data(self) -> alloy_sol_types::private::LogData { + From::from(&self) + } + } + #[automatically_derived] + impl From<&Unpaused> for alloy_sol_types::private::LogData { + #[inline] + fn from(this: &Unpaused) -> alloy_sol_types::private::LogData { + alloy_sol_types::SolEvent::encode_log_data(this) + } + } + }; + /**Constructor`. +```solidity +constructor(address _podRegistry, address _bridgeContract, IBridge.TokenLimits nativeTokenLimits); +```*/ + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] + #[derive(Clone)] + pub struct constructorCall { + #[allow(missing_docs)] + pub _podRegistry: alloy::sol_types::private::Address, + #[allow(missing_docs)] + pub _bridgeContract: alloy::sol_types::private::Address, + #[allow(missing_docs)] + pub nativeTokenLimits: ::RustType, + } + const _: () = { + use alloy::sol_types as alloy_sol_types; + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = ( + alloy::sol_types::sol_data::Address, + alloy::sol_types::sol_data::Address, + IBridge::TokenLimits, + ); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = ( + alloy::sol_types::private::Address, + alloy::sol_types::private::Address, + ::RustType, + ); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: constructorCall) -> Self { + (value._podRegistry, value._bridgeContract, value.nativeTokenLimits) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for constructorCall { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { + _podRegistry: tuple.0, + _bridgeContract: tuple.1, + nativeTokenLimits: tuple.2, + } + } + } + } + #[automatically_derived] + impl alloy_sol_types::SolConstructor for constructorCall { + type Parameters<'a> = ( + alloy::sol_types::sol_data::Address, + alloy::sol_types::sol_data::Address, + IBridge::TokenLimits, + ); + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + #[inline] + fn new<'a>( + tuple: as alloy_sol_types::SolType>::RustType, + ) -> Self { + tuple.into() + } + #[inline] + fn tokenize(&self) -> Self::Token<'_> { + ( + ::tokenize( + &self._podRegistry, + ), + ::tokenize( + &self._bridgeContract, + ), + ::tokenize( + &self.nativeTokenLimits, + ), + ) + } + } + }; + #[derive(serde::Serialize, serde::Deserialize)] + #[derive(Default, Debug, PartialEq, Eq, Hash)] + /**Function with signature `DEFAULT_ADMIN_ROLE()` and selector `0xa217fddf`. +```solidity +function DEFAULT_ADMIN_ROLE() external view returns (bytes32); +```*/ + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] + #[derive(Clone)] + pub struct DEFAULT_ADMIN_ROLECall; + #[derive(serde::Serialize, serde::Deserialize)] + #[derive(Default, Debug, PartialEq, Eq, Hash)] + ///Container type for the return parameters of the [`DEFAULT_ADMIN_ROLE()`](DEFAULT_ADMIN_ROLECall) function. + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] + #[derive(Clone)] + pub struct DEFAULT_ADMIN_ROLEReturn { + #[allow(missing_docs)] + pub _0: alloy::sol_types::private::FixedBytes<32>, + } + #[allow( + non_camel_case_types, + non_snake_case, + clippy::pub_underscore_fields, + clippy::style + )] + const _: () = { + use alloy::sol_types as alloy_sol_types; + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From + for UnderlyingRustTuple<'_> { + fn from(value: DEFAULT_ADMIN_ROLECall) -> Self { + () + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> + for DEFAULT_ADMIN_ROLECall { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self + } + } + } + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::FixedBytes<32>,); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (alloy::sol_types::private::FixedBytes<32>,); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From + for UnderlyingRustTuple<'_> { + fn from(value: DEFAULT_ADMIN_ROLEReturn) -> Self { + (value._0,) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> + for DEFAULT_ADMIN_ROLEReturn { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { _0: tuple.0 } + } + } + } + #[automatically_derived] + impl alloy_sol_types::SolCall for DEFAULT_ADMIN_ROLECall { + type Parameters<'a> = (); + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Return = alloy::sol_types::private::FixedBytes<32>; + type ReturnTuple<'a> = (alloy::sol_types::sol_data::FixedBytes<32>,); + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SIGNATURE: &'static str = "DEFAULT_ADMIN_ROLE()"; + const SELECTOR: [u8; 4] = [162u8, 23u8, 253u8, 223u8]; + #[inline] + fn new<'a>( + tuple: as alloy_sol_types::SolType>::RustType, + ) -> Self { + tuple.into() + } + #[inline] + fn tokenize(&self) -> Self::Token<'_> { + () + } + #[inline] + fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { + ( + as alloy_sol_types::SolType>::tokenize(ret), + ) + } + #[inline] + fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence(data) + .map(|r| { + let r: DEFAULT_ADMIN_ROLEReturn = r.into(); + r._0 + }) + } + #[inline] + fn abi_decode_returns_validate( + data: &[u8], + ) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence_validate(data) + .map(|r| { + let r: DEFAULT_ADMIN_ROLEReturn = r.into(); + r._0 + }) + } + } + }; + #[derive(serde::Serialize, serde::Deserialize)] + #[derive(Default, Debug, PartialEq, Eq, Hash)] + /**Function with signature `PAUSER_ROLE()` and selector `0xe63ab1e9`. +```solidity +function PAUSER_ROLE() external view returns (bytes32); +```*/ + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] + #[derive(Clone)] + pub struct PAUSER_ROLECall; + #[derive(serde::Serialize, serde::Deserialize)] + #[derive(Default, Debug, PartialEq, Eq, Hash)] + ///Container type for the return parameters of the [`PAUSER_ROLE()`](PAUSER_ROLECall) function. + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] + #[derive(Clone)] + pub struct PAUSER_ROLEReturn { + #[allow(missing_docs)] + pub _0: alloy::sol_types::private::FixedBytes<32>, + } + #[allow( + non_camel_case_types, + non_snake_case, + clippy::pub_underscore_fields, + clippy::style + )] + const _: () = { + use alloy::sol_types as alloy_sol_types; + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: PAUSER_ROLECall) -> Self { + () + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for PAUSER_ROLECall { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self + } + } + } + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::FixedBytes<32>,); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (alloy::sol_types::private::FixedBytes<32>,); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: PAUSER_ROLEReturn) -> Self { + (value._0,) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for PAUSER_ROLEReturn { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { _0: tuple.0 } + } + } + } + #[automatically_derived] + impl alloy_sol_types::SolCall for PAUSER_ROLECall { + type Parameters<'a> = (); + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Return = alloy::sol_types::private::FixedBytes<32>; + type ReturnTuple<'a> = (alloy::sol_types::sol_data::FixedBytes<32>,); + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SIGNATURE: &'static str = "PAUSER_ROLE()"; + const SELECTOR: [u8; 4] = [230u8, 58u8, 177u8, 233u8]; + #[inline] + fn new<'a>( + tuple: as alloy_sol_types::SolType>::RustType, + ) -> Self { + tuple.into() + } + #[inline] + fn tokenize(&self) -> Self::Token<'_> { + () + } + #[inline] + fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { + ( + as alloy_sol_types::SolType>::tokenize(ret), + ) + } + #[inline] + fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence(data) + .map(|r| { + let r: PAUSER_ROLEReturn = r.into(); + r._0 + }) + } + #[inline] + fn abi_decode_returns_validate( + data: &[u8], + ) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence_validate(data) + .map(|r| { + let r: PAUSER_ROLEReturn = r.into(); + r._0 + }) + } + } + }; + #[derive(serde::Serialize, serde::Deserialize)] + #[derive(Default, Debug, PartialEq, Eq, Hash)] + /**Function with signature `bridgeContract()` and selector `0xcd596583`. +```solidity +function bridgeContract() external view returns (address); +```*/ + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] + #[derive(Clone)] + pub struct bridgeContractCall; + #[derive(serde::Serialize, serde::Deserialize)] + #[derive(Default, Debug, PartialEq, Eq, Hash)] + ///Container type for the return parameters of the [`bridgeContract()`](bridgeContractCall) function. + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] + #[derive(Clone)] + pub struct bridgeContractReturn { + #[allow(missing_docs)] + pub _0: alloy::sol_types::private::Address, + } + #[allow( + non_camel_case_types, + non_snake_case, + clippy::pub_underscore_fields, + clippy::style + )] + const _: () = { + use alloy::sol_types as alloy_sol_types; + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: bridgeContractCall) -> Self { + () + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for bridgeContractCall { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self + } + } + } + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Address,); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (alloy::sol_types::private::Address,); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From + for UnderlyingRustTuple<'_> { + fn from(value: bridgeContractReturn) -> Self { + (value._0,) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> + for bridgeContractReturn { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { _0: tuple.0 } + } + } + } + #[automatically_derived] + impl alloy_sol_types::SolCall for bridgeContractCall { + type Parameters<'a> = (); + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Return = alloy::sol_types::private::Address; + type ReturnTuple<'a> = (alloy::sol_types::sol_data::Address,); + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SIGNATURE: &'static str = "bridgeContract()"; + const SELECTOR: [u8; 4] = [205u8, 89u8, 101u8, 131u8]; + #[inline] + fn new<'a>( + tuple: as alloy_sol_types::SolType>::RustType, + ) -> Self { + tuple.into() + } + #[inline] + fn tokenize(&self) -> Self::Token<'_> { + () + } + #[inline] + fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { + ( + ::tokenize( + ret, + ), + ) + } + #[inline] + fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence(data) + .map(|r| { + let r: bridgeContractReturn = r.into(); + r._0 + }) + } + #[inline] + fn abi_decode_returns_validate( + data: &[u8], + ) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence_validate(data) + .map(|r| { + let r: bridgeContractReturn = r.into(); + r._0 + }) + } + } + }; + #[derive(serde::Serialize, serde::Deserialize)] + #[derive()] + /**Function with signature `claim(((address,bytes32[],bytes),uint256,((bytes32,bytes,uint256[]),bytes32,(bytes32[]))))` and selector `0x4319e6db`. +```solidity +function claim(PodECDSA.CertifiedLog memory certifiedLog) external; +```*/ + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] + #[derive(Clone)] + pub struct claimCall { + #[allow(missing_docs)] + pub certifiedLog: ::RustType, + } + ///Container type for the return parameters of the [`claim(((address,bytes32[],bytes),uint256,((bytes32,bytes,uint256[]),bytes32,(bytes32[]))))`](claimCall) function. + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] + #[derive(Clone)] + pub struct claimReturn {} + #[allow( + non_camel_case_types, + non_snake_case, + clippy::pub_underscore_fields, + clippy::style + )] + const _: () = { + use alloy::sol_types as alloy_sol_types; + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (PodECDSA::CertifiedLog,); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = ( + ::RustType, + ); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: claimCall) -> Self { + (value.certifiedLog,) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for claimCall { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { certifiedLog: tuple.0 } + } + } + } + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: claimReturn) -> Self { + () + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for claimReturn { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self {} + } + } + } + impl claimReturn { + fn _tokenize( + &self, + ) -> ::ReturnToken<'_> { + () + } + } + #[automatically_derived] + impl alloy_sol_types::SolCall for claimCall { + type Parameters<'a> = (PodECDSA::CertifiedLog,); + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Return = claimReturn; + type ReturnTuple<'a> = (); + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SIGNATURE: &'static str = "claim(((address,bytes32[],bytes),uint256,((bytes32,bytes,uint256[]),bytes32,(bytes32[]))))"; + const SELECTOR: [u8; 4] = [67u8, 25u8, 230u8, 219u8]; + #[inline] + fn new<'a>( + tuple: as alloy_sol_types::SolType>::RustType, + ) -> Self { + tuple.into() + } + #[inline] + fn tokenize(&self) -> Self::Token<'_> { + ( + ::tokenize( + &self.certifiedLog, + ), + ) + } + #[inline] + fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { + claimReturn::_tokenize(ret) + } + #[inline] + fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence(data) + .map(Into::into) + } + #[inline] + fn abi_decode_returns_validate( + data: &[u8], + ) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence_validate(data) + .map(Into::into) + } + } + }; + #[derive(serde::Serialize, serde::Deserialize)] + #[derive()] + /**Function with signature `claimNative(((address,bytes32[],bytes),uint256,((bytes32,bytes,uint256[]),bytes32,(bytes32[]))))` and selector `0x57143be1`. +```solidity +function claimNative(PodECDSA.CertifiedLog memory certifiedLog) external; +```*/ + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] + #[derive(Clone)] + pub struct claimNativeCall { + #[allow(missing_docs)] + pub certifiedLog: ::RustType, + } + ///Container type for the return parameters of the [`claimNative(((address,bytes32[],bytes),uint256,((bytes32,bytes,uint256[]),bytes32,(bytes32[]))))`](claimNativeCall) function. + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] + #[derive(Clone)] + pub struct claimNativeReturn {} + #[allow( + non_camel_case_types, + non_snake_case, + clippy::pub_underscore_fields, + clippy::style + )] + const _: () = { + use alloy::sol_types as alloy_sol_types; + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (PodECDSA::CertifiedLog,); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = ( + ::RustType, + ); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: claimNativeCall) -> Self { + (value.certifiedLog,) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for claimNativeCall { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { certifiedLog: tuple.0 } + } + } + } + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: claimNativeReturn) -> Self { + () + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for claimNativeReturn { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self {} + } + } + } + impl claimNativeReturn { + fn _tokenize( + &self, + ) -> ::ReturnToken<'_> { + () + } + } + #[automatically_derived] + impl alloy_sol_types::SolCall for claimNativeCall { + type Parameters<'a> = (PodECDSA::CertifiedLog,); + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Return = claimNativeReturn; + type ReturnTuple<'a> = (); + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SIGNATURE: &'static str = "claimNative(((address,bytes32[],bytes),uint256,((bytes32,bytes,uint256[]),bytes32,(bytes32[]))))"; + const SELECTOR: [u8; 4] = [87u8, 20u8, 59u8, 225u8]; + #[inline] + fn new<'a>( + tuple: as alloy_sol_types::SolType>::RustType, + ) -> Self { + tuple.into() + } + #[inline] + fn tokenize(&self) -> Self::Token<'_> { + ( + ::tokenize( + &self.certifiedLog, + ), + ) + } + #[inline] + fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { + claimNativeReturn::_tokenize(ret) + } + #[inline] + fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence(data) + .map(Into::into) + } + #[inline] + fn abi_decode_returns_validate( + data: &[u8], + ) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence_validate(data) + .map(Into::into) + } + } + }; + #[derive(serde::Serialize, serde::Deserialize)] + #[derive(Default, Debug, PartialEq, Eq, Hash)] + /**Function with signature `configureToken(address,(uint256,uint256,uint256))` and selector `0x9267b153`. +```solidity +function configureToken(address token, IBridge.TokenLimits memory limits) external; +```*/ + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] + #[derive(Clone)] + pub struct configureTokenCall { + #[allow(missing_docs)] + pub token: alloy::sol_types::private::Address, + #[allow(missing_docs)] + pub limits: ::RustType, + } + ///Container type for the return parameters of the [`configureToken(address,(uint256,uint256,uint256))`](configureTokenCall) function. + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] + #[derive(Clone)] + pub struct configureTokenReturn {} + #[allow( + non_camel_case_types, + non_snake_case, + clippy::pub_underscore_fields, + clippy::style + )] + const _: () = { + use alloy::sol_types as alloy_sol_types; + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = ( + alloy::sol_types::sol_data::Address, + IBridge::TokenLimits, + ); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = ( + alloy::sol_types::private::Address, + ::RustType, + ); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: configureTokenCall) -> Self { + (value.token, value.limits) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for configureTokenCall { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { + token: tuple.0, + limits: tuple.1, + } + } + } + } + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From + for UnderlyingRustTuple<'_> { + fn from(value: configureTokenReturn) -> Self { + () + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> + for configureTokenReturn { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self {} + } + } + } + impl configureTokenReturn { + fn _tokenize( + &self, + ) -> ::ReturnToken<'_> { + () + } + } + #[automatically_derived] + impl alloy_sol_types::SolCall for configureTokenCall { + type Parameters<'a> = ( + alloy::sol_types::sol_data::Address, + IBridge::TokenLimits, + ); + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Return = configureTokenReturn; + type ReturnTuple<'a> = (); + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SIGNATURE: &'static str = "configureToken(address,(uint256,uint256,uint256))"; + const SELECTOR: [u8; 4] = [146u8, 103u8, 177u8, 83u8]; + #[inline] + fn new<'a>( + tuple: as alloy_sol_types::SolType>::RustType, + ) -> Self { + tuple.into() + } + #[inline] + fn tokenize(&self) -> Self::Token<'_> { + ( + ::tokenize( + &self.token, + ), + ::tokenize( + &self.limits, + ), + ) + } + #[inline] + fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { + configureTokenReturn::_tokenize(ret) + } + #[inline] + fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence(data) + .map(Into::into) + } + #[inline] + fn abi_decode_returns_validate( + data: &[u8], + ) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence_validate(data) + .map(Into::into) + } + } + }; + #[derive(serde::Serialize, serde::Deserialize)] + #[derive(Default, Debug, PartialEq, Eq, Hash)] + /**Function with signature `deposit(address,uint256,address)` and selector `0xf45346dc`. +```solidity +function deposit(address token, uint256 amount, address to) external returns (uint256); +```*/ + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] + #[derive(Clone)] + pub struct depositCall { + #[allow(missing_docs)] + pub token: alloy::sol_types::private::Address, + #[allow(missing_docs)] + pub amount: alloy::sol_types::private::primitives::aliases::U256, + #[allow(missing_docs)] + pub to: alloy::sol_types::private::Address, + } + #[derive(serde::Serialize, serde::Deserialize)] + #[derive(Default, Debug, PartialEq, Eq, Hash)] + ///Container type for the return parameters of the [`deposit(address,uint256,address)`](depositCall) function. + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] + #[derive(Clone)] + pub struct depositReturn { + #[allow(missing_docs)] + pub _0: alloy::sol_types::private::primitives::aliases::U256, + } + #[allow( + non_camel_case_types, + non_snake_case, + clippy::pub_underscore_fields, + clippy::style + )] + const _: () = { + use alloy::sol_types as alloy_sol_types; + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = ( + alloy::sol_types::sol_data::Address, + alloy::sol_types::sol_data::Uint<256>, + alloy::sol_types::sol_data::Address, + ); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = ( + alloy::sol_types::private::Address, + alloy::sol_types::private::primitives::aliases::U256, + alloy::sol_types::private::Address, + ); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: depositCall) -> Self { + (value.token, value.amount, value.to) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for depositCall { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { + token: tuple.0, + amount: tuple.1, + to: tuple.2, + } + } + } + } + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Uint<256>,); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = ( + alloy::sol_types::private::primitives::aliases::U256, + ); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: depositReturn) -> Self { + (value._0,) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for depositReturn { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { _0: tuple.0 } + } + } + } + #[automatically_derived] + impl alloy_sol_types::SolCall for depositCall { + type Parameters<'a> = ( + alloy::sol_types::sol_data::Address, + alloy::sol_types::sol_data::Uint<256>, + alloy::sol_types::sol_data::Address, + ); + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Return = alloy::sol_types::private::primitives::aliases::U256; + type ReturnTuple<'a> = (alloy::sol_types::sol_data::Uint<256>,); + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SIGNATURE: &'static str = "deposit(address,uint256,address)"; + const SELECTOR: [u8; 4] = [244u8, 83u8, 70u8, 220u8]; + #[inline] + fn new<'a>( + tuple: as alloy_sol_types::SolType>::RustType, + ) -> Self { + tuple.into() + } + #[inline] + fn tokenize(&self) -> Self::Token<'_> { + ( + ::tokenize( + &self.token, + ), + as alloy_sol_types::SolType>::tokenize(&self.amount), + ::tokenize( + &self.to, + ), + ) + } + #[inline] + fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { + ( + as alloy_sol_types::SolType>::tokenize(ret), + ) + } + #[inline] + fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence(data) + .map(|r| { + let r: depositReturn = r.into(); + r._0 + }) + } + #[inline] + fn abi_decode_returns_validate( + data: &[u8], + ) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence_validate(data) + .map(|r| { + let r: depositReturn = r.into(); + r._0 + }) + } + } + }; + #[derive(serde::Serialize, serde::Deserialize)] + #[derive(Default, Debug, PartialEq, Eq, Hash)] + /**Function with signature `depositIndex()` and selector `0x7b898939`. +```solidity +function depositIndex() external view returns (uint256); +```*/ + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] + #[derive(Clone)] + pub struct depositIndexCall; + #[derive(serde::Serialize, serde::Deserialize)] + #[derive(Default, Debug, PartialEq, Eq, Hash)] + ///Container type for the return parameters of the [`depositIndex()`](depositIndexCall) function. + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] + #[derive(Clone)] + pub struct depositIndexReturn { + #[allow(missing_docs)] + pub _0: alloy::sol_types::private::primitives::aliases::U256, + } + #[allow( + non_camel_case_types, + non_snake_case, + clippy::pub_underscore_fields, + clippy::style + )] + const _: () = { + use alloy::sol_types as alloy_sol_types; + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: depositIndexCall) -> Self { + () + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for depositIndexCall { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self + } + } + } + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Uint<256>,); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = ( + alloy::sol_types::private::primitives::aliases::U256, + ); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: depositIndexReturn) -> Self { + (value._0,) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for depositIndexReturn { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { _0: tuple.0 } + } + } + } + #[automatically_derived] + impl alloy_sol_types::SolCall for depositIndexCall { + type Parameters<'a> = (); + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Return = alloy::sol_types::private::primitives::aliases::U256; + type ReturnTuple<'a> = (alloy::sol_types::sol_data::Uint<256>,); + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SIGNATURE: &'static str = "depositIndex()"; + const SELECTOR: [u8; 4] = [123u8, 137u8, 137u8, 57u8]; + #[inline] + fn new<'a>( + tuple: as alloy_sol_types::SolType>::RustType, + ) -> Self { + tuple.into() + } + #[inline] + fn tokenize(&self) -> Self::Token<'_> { + () + } + #[inline] + fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { + ( + as alloy_sol_types::SolType>::tokenize(ret), + ) + } + #[inline] + fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence(data) + .map(|r| { + let r: depositIndexReturn = r.into(); + r._0 + }) + } + #[inline] + fn abi_decode_returns_validate( + data: &[u8], + ) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence_validate(data) + .map(|r| { + let r: depositIndexReturn = r.into(); + r._0 + }) + } + } + }; + #[derive(serde::Serialize, serde::Deserialize)] + #[derive(Default, Debug, PartialEq, Eq, Hash)] + /**Function with signature `depositNative(address)` and selector `0x33bb7f91`. +```solidity +function depositNative(address to) external payable returns (uint256); +```*/ + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] + #[derive(Clone)] + pub struct depositNativeCall { + #[allow(missing_docs)] + pub to: alloy::sol_types::private::Address, + } + #[derive(serde::Serialize, serde::Deserialize)] + #[derive(Default, Debug, PartialEq, Eq, Hash)] + ///Container type for the return parameters of the [`depositNative(address)`](depositNativeCall) function. + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] + #[derive(Clone)] + pub struct depositNativeReturn { + #[allow(missing_docs)] + pub _0: alloy::sol_types::private::primitives::aliases::U256, + } + #[allow( + non_camel_case_types, + non_snake_case, + clippy::pub_underscore_fields, + clippy::style + )] + const _: () = { + use alloy::sol_types as alloy_sol_types; + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Address,); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (alloy::sol_types::private::Address,); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: depositNativeCall) -> Self { + (value.to,) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for depositNativeCall { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { to: tuple.0 } + } + } + } + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Uint<256>,); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = ( + alloy::sol_types::private::primitives::aliases::U256, + ); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: depositNativeReturn) -> Self { + (value._0,) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for depositNativeReturn { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { _0: tuple.0 } + } + } + } + #[automatically_derived] + impl alloy_sol_types::SolCall for depositNativeCall { + type Parameters<'a> = (alloy::sol_types::sol_data::Address,); + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Return = alloy::sol_types::private::primitives::aliases::U256; + type ReturnTuple<'a> = (alloy::sol_types::sol_data::Uint<256>,); + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SIGNATURE: &'static str = "depositNative(address)"; + const SELECTOR: [u8; 4] = [51u8, 187u8, 127u8, 145u8]; + #[inline] + fn new<'a>( + tuple: as alloy_sol_types::SolType>::RustType, + ) -> Self { + tuple.into() + } + #[inline] + fn tokenize(&self) -> Self::Token<'_> { + ( + ::tokenize( + &self.to, + ), + ) + } + #[inline] + fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { + ( + as alloy_sol_types::SolType>::tokenize(ret), + ) + } + #[inline] + fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence(data) + .map(|r| { + let r: depositNativeReturn = r.into(); + r._0 + }) + } + #[inline] + fn abi_decode_returns_validate( + data: &[u8], + ) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence_validate(data) + .map(|r| { + let r: depositNativeReturn = r.into(); + r._0 + }) + } + } + }; + #[derive(serde::Serialize, serde::Deserialize)] + #[derive(Default, Debug, PartialEq, Eq, Hash)] + /**Function with signature `getRoleAdmin(bytes32)` and selector `0x248a9ca3`. +```solidity +function getRoleAdmin(bytes32 role) external view returns (bytes32); +```*/ + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] + #[derive(Clone)] + pub struct getRoleAdminCall { + #[allow(missing_docs)] + pub role: alloy::sol_types::private::FixedBytes<32>, + } + #[derive(serde::Serialize, serde::Deserialize)] + #[derive(Default, Debug, PartialEq, Eq, Hash)] + ///Container type for the return parameters of the [`getRoleAdmin(bytes32)`](getRoleAdminCall) function. + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] + #[derive(Clone)] + pub struct getRoleAdminReturn { + #[allow(missing_docs)] + pub _0: alloy::sol_types::private::FixedBytes<32>, + } + #[allow( + non_camel_case_types, + non_snake_case, + clippy::pub_underscore_fields, + clippy::style + )] + const _: () = { + use alloy::sol_types as alloy_sol_types; + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::FixedBytes<32>,); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (alloy::sol_types::private::FixedBytes<32>,); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: getRoleAdminCall) -> Self { + (value.role,) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for getRoleAdminCall { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { role: tuple.0 } + } + } + } + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::FixedBytes<32>,); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (alloy::sol_types::private::FixedBytes<32>,); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: getRoleAdminReturn) -> Self { + (value._0,) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for getRoleAdminReturn { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { _0: tuple.0 } + } + } + } + #[automatically_derived] + impl alloy_sol_types::SolCall for getRoleAdminCall { + type Parameters<'a> = (alloy::sol_types::sol_data::FixedBytes<32>,); + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Return = alloy::sol_types::private::FixedBytes<32>; + type ReturnTuple<'a> = (alloy::sol_types::sol_data::FixedBytes<32>,); + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SIGNATURE: &'static str = "getRoleAdmin(bytes32)"; + const SELECTOR: [u8; 4] = [36u8, 138u8, 156u8, 163u8]; + #[inline] + fn new<'a>( + tuple: as alloy_sol_types::SolType>::RustType, + ) -> Self { + tuple.into() + } + #[inline] + fn tokenize(&self) -> Self::Token<'_> { + ( + as alloy_sol_types::SolType>::tokenize(&self.role), + ) + } + #[inline] + fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { + ( + as alloy_sol_types::SolType>::tokenize(ret), + ) + } + #[inline] + fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence(data) + .map(|r| { + let r: getRoleAdminReturn = r.into(); + r._0 + }) + } + #[inline] + fn abi_decode_returns_validate( + data: &[u8], + ) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence_validate(data) + .map(|r| { + let r: getRoleAdminReturn = r.into(); + r._0 + }) + } + } + }; + #[derive(serde::Serialize, serde::Deserialize)] + #[derive(Default, Debug, PartialEq, Eq, Hash)] + /**Function with signature `grantRole(bytes32,address)` and selector `0x2f2ff15d`. +```solidity +function grantRole(bytes32 role, address account) external; +```*/ + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] + #[derive(Clone)] + pub struct grantRoleCall { + #[allow(missing_docs)] + pub role: alloy::sol_types::private::FixedBytes<32>, + #[allow(missing_docs)] + pub account: alloy::sol_types::private::Address, + } + ///Container type for the return parameters of the [`grantRole(bytes32,address)`](grantRoleCall) function. + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] + #[derive(Clone)] + pub struct grantRoleReturn {} + #[allow( + non_camel_case_types, + non_snake_case, + clippy::pub_underscore_fields, + clippy::style + )] + const _: () = { + use alloy::sol_types as alloy_sol_types; + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = ( + alloy::sol_types::sol_data::FixedBytes<32>, + alloy::sol_types::sol_data::Address, + ); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = ( + alloy::sol_types::private::FixedBytes<32>, + alloy::sol_types::private::Address, + ); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: grantRoleCall) -> Self { + (value.role, value.account) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for grantRoleCall { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { + role: tuple.0, + account: tuple.1, + } + } + } + } + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: grantRoleReturn) -> Self { + () + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for grantRoleReturn { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self {} + } + } + } + impl grantRoleReturn { + fn _tokenize( + &self, + ) -> ::ReturnToken<'_> { + () + } + } + #[automatically_derived] + impl alloy_sol_types::SolCall for grantRoleCall { + type Parameters<'a> = ( + alloy::sol_types::sol_data::FixedBytes<32>, + alloy::sol_types::sol_data::Address, + ); + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Return = grantRoleReturn; + type ReturnTuple<'a> = (); + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SIGNATURE: &'static str = "grantRole(bytes32,address)"; + const SELECTOR: [u8; 4] = [47u8, 47u8, 241u8, 93u8]; + #[inline] + fn new<'a>( + tuple: as alloy_sol_types::SolType>::RustType, + ) -> Self { + tuple.into() + } + #[inline] + fn tokenize(&self) -> Self::Token<'_> { + ( + as alloy_sol_types::SolType>::tokenize(&self.role), + ::tokenize( + &self.account, + ), + ) + } + #[inline] + fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { + grantRoleReturn::_tokenize(ret) + } + #[inline] + fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence(data) + .map(Into::into) + } + #[inline] + fn abi_decode_returns_validate( + data: &[u8], + ) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence_validate(data) + .map(Into::into) + } + } + }; + #[derive(serde::Serialize, serde::Deserialize)] + #[derive(Default, Debug, PartialEq, Eq, Hash)] + /**Function with signature `hasRole(bytes32,address)` and selector `0x91d14854`. +```solidity +function hasRole(bytes32 role, address account) external view returns (bool); +```*/ + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] + #[derive(Clone)] + pub struct hasRoleCall { + #[allow(missing_docs)] + pub role: alloy::sol_types::private::FixedBytes<32>, + #[allow(missing_docs)] + pub account: alloy::sol_types::private::Address, + } + #[derive(serde::Serialize, serde::Deserialize)] + #[derive(Default, Debug, PartialEq, Eq, Hash)] + ///Container type for the return parameters of the [`hasRole(bytes32,address)`](hasRoleCall) function. + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] + #[derive(Clone)] + pub struct hasRoleReturn { + #[allow(missing_docs)] + pub _0: bool, + } + #[allow( + non_camel_case_types, + non_snake_case, + clippy::pub_underscore_fields, + clippy::style + )] + const _: () = { + use alloy::sol_types as alloy_sol_types; + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = ( + alloy::sol_types::sol_data::FixedBytes<32>, + alloy::sol_types::sol_data::Address, + ); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = ( + alloy::sol_types::private::FixedBytes<32>, + alloy::sol_types::private::Address, + ); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: hasRoleCall) -> Self { + (value.role, value.account) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for hasRoleCall { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { + role: tuple.0, + account: tuple.1, + } + } + } + } + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Bool,); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (bool,); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: hasRoleReturn) -> Self { + (value._0,) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for hasRoleReturn { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { _0: tuple.0 } + } + } + } + #[automatically_derived] + impl alloy_sol_types::SolCall for hasRoleCall { + type Parameters<'a> = ( + alloy::sol_types::sol_data::FixedBytes<32>, + alloy::sol_types::sol_data::Address, + ); + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Return = bool; + type ReturnTuple<'a> = (alloy::sol_types::sol_data::Bool,); + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SIGNATURE: &'static str = "hasRole(bytes32,address)"; + const SELECTOR: [u8; 4] = [145u8, 209u8, 72u8, 84u8]; + #[inline] + fn new<'a>( + tuple: as alloy_sol_types::SolType>::RustType, + ) -> Self { + tuple.into() + } + #[inline] + fn tokenize(&self) -> Self::Token<'_> { + ( + as alloy_sol_types::SolType>::tokenize(&self.role), + ::tokenize( + &self.account, + ), + ) + } + #[inline] + fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { + ( + ::tokenize( + ret, + ), + ) + } + #[inline] + fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence(data) + .map(|r| { + let r: hasRoleReturn = r.into(); + r._0 + }) + } + #[inline] + fn abi_decode_returns_validate( + data: &[u8], + ) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence_validate(data) + .map(|r| { + let r: hasRoleReturn = r.into(); + r._0 + }) + } + } + }; + #[derive(serde::Serialize, serde::Deserialize)] + #[derive(Default, Debug, PartialEq, Eq, Hash)] + /**Function with signature `migrate(address)` and selector `0xce5494bb`. +```solidity +function migrate(address _newContract) external; +```*/ + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] + #[derive(Clone)] + pub struct migrateCall { + #[allow(missing_docs)] + pub _newContract: alloy::sol_types::private::Address, + } + ///Container type for the return parameters of the [`migrate(address)`](migrateCall) function. + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] + #[derive(Clone)] + pub struct migrateReturn {} + #[allow( + non_camel_case_types, + non_snake_case, + clippy::pub_underscore_fields, + clippy::style + )] + const _: () = { + use alloy::sol_types as alloy_sol_types; + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Address,); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (alloy::sol_types::private::Address,); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: migrateCall) -> Self { + (value._newContract,) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for migrateCall { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { _newContract: tuple.0 } + } + } + } + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: migrateReturn) -> Self { + () + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for migrateReturn { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self {} + } + } + } + impl migrateReturn { + fn _tokenize( + &self, + ) -> ::ReturnToken<'_> { + () + } + } + #[automatically_derived] + impl alloy_sol_types::SolCall for migrateCall { + type Parameters<'a> = (alloy::sol_types::sol_data::Address,); + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Return = migrateReturn; + type ReturnTuple<'a> = (); + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SIGNATURE: &'static str = "migrate(address)"; + const SELECTOR: [u8; 4] = [206u8, 84u8, 148u8, 187u8]; + #[inline] + fn new<'a>( + tuple: as alloy_sol_types::SolType>::RustType, + ) -> Self { + tuple.into() + } + #[inline] + fn tokenize(&self) -> Self::Token<'_> { + ( + ::tokenize( + &self._newContract, + ), + ) + } + #[inline] + fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { + migrateReturn::_tokenize(ret) + } + #[inline] + fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence(data) + .map(Into::into) + } + #[inline] + fn abi_decode_returns_validate( + data: &[u8], + ) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence_validate(data) + .map(Into::into) + } + } + }; + #[derive(serde::Serialize, serde::Deserialize)] + #[derive(Default, Debug, PartialEq, Eq, Hash)] + /**Function with signature `migratedContract()` and selector `0x7486fa4e`. +```solidity +function migratedContract() external view returns (address); +```*/ + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] + #[derive(Clone)] + pub struct migratedContractCall; + #[derive(serde::Serialize, serde::Deserialize)] + #[derive(Default, Debug, PartialEq, Eq, Hash)] + ///Container type for the return parameters of the [`migratedContract()`](migratedContractCall) function. + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] + #[derive(Clone)] + pub struct migratedContractReturn { + #[allow(missing_docs)] + pub _0: alloy::sol_types::private::Address, + } + #[allow( + non_camel_case_types, + non_snake_case, + clippy::pub_underscore_fields, + clippy::style + )] + const _: () = { + use alloy::sol_types as alloy_sol_types; + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From + for UnderlyingRustTuple<'_> { + fn from(value: migratedContractCall) -> Self { + () + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> + for migratedContractCall { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self + } + } + } + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Address,); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (alloy::sol_types::private::Address,); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From + for UnderlyingRustTuple<'_> { + fn from(value: migratedContractReturn) -> Self { + (value._0,) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> + for migratedContractReturn { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { _0: tuple.0 } + } + } + } + #[automatically_derived] + impl alloy_sol_types::SolCall for migratedContractCall { + type Parameters<'a> = (); + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Return = alloy::sol_types::private::Address; + type ReturnTuple<'a> = (alloy::sol_types::sol_data::Address,); + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SIGNATURE: &'static str = "migratedContract()"; + const SELECTOR: [u8; 4] = [116u8, 134u8, 250u8, 78u8]; + #[inline] + fn new<'a>( + tuple: as alloy_sol_types::SolType>::RustType, + ) -> Self { + tuple.into() + } + #[inline] + fn tokenize(&self) -> Self::Token<'_> { + () + } + #[inline] + fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { + ( + ::tokenize( + ret, + ), + ) + } + #[inline] + fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence(data) + .map(|r| { + let r: migratedContractReturn = r.into(); + r._0 + }) + } + #[inline] + fn abi_decode_returns_validate( + data: &[u8], + ) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence_validate(data) + .map(|r| { + let r: migratedContractReturn = r.into(); + r._0 + }) + } + } + }; + #[derive(serde::Serialize, serde::Deserialize)] + #[derive(Default, Debug, PartialEq, Eq, Hash)] + /**Function with signature `mirrorTokens(address)` and selector `0xfeaeb43e`. +```solidity +function mirrorTokens(address) external view returns (address); +```*/ + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] + #[derive(Clone)] + pub struct mirrorTokensCall(pub alloy::sol_types::private::Address); + #[derive(serde::Serialize, serde::Deserialize)] + #[derive(Default, Debug, PartialEq, Eq, Hash)] + ///Container type for the return parameters of the [`mirrorTokens(address)`](mirrorTokensCall) function. + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] + #[derive(Clone)] + pub struct mirrorTokensReturn { + #[allow(missing_docs)] + pub _0: alloy::sol_types::private::Address, + } + #[allow( + non_camel_case_types, + non_snake_case, + clippy::pub_underscore_fields, + clippy::style + )] + const _: () = { + use alloy::sol_types as alloy_sol_types; + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Address,); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (alloy::sol_types::private::Address,); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: mirrorTokensCall) -> Self { + (value.0,) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for mirrorTokensCall { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self(tuple.0) + } + } + } + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Address,); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (alloy::sol_types::private::Address,); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: mirrorTokensReturn) -> Self { + (value._0,) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for mirrorTokensReturn { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { _0: tuple.0 } + } + } + } + #[automatically_derived] + impl alloy_sol_types::SolCall for mirrorTokensCall { + type Parameters<'a> = (alloy::sol_types::sol_data::Address,); + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Return = alloy::sol_types::private::Address; + type ReturnTuple<'a> = (alloy::sol_types::sol_data::Address,); + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SIGNATURE: &'static str = "mirrorTokens(address)"; + const SELECTOR: [u8; 4] = [254u8, 174u8, 180u8, 62u8]; + #[inline] + fn new<'a>( + tuple: as alloy_sol_types::SolType>::RustType, + ) -> Self { + tuple.into() + } + #[inline] + fn tokenize(&self) -> Self::Token<'_> { + ( + ::tokenize( + &self.0, + ), + ) + } + #[inline] + fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { + ( + ::tokenize( + ret, + ), + ) + } + #[inline] + fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence(data) + .map(|r| { + let r: mirrorTokensReturn = r.into(); + r._0 + }) + } + #[inline] + fn abi_decode_returns_validate( + data: &[u8], + ) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence_validate(data) + .map(|r| { + let r: mirrorTokensReturn = r.into(); + r._0 + }) + } + } + }; + #[derive(serde::Serialize, serde::Deserialize)] + #[derive(Default, Debug, PartialEq, Eq, Hash)] + /**Function with signature `pause()` and selector `0x8456cb59`. +```solidity +function pause() external; +```*/ + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] + #[derive(Clone)] + pub struct pauseCall; + ///Container type for the return parameters of the [`pause()`](pauseCall) function. + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] + #[derive(Clone)] + pub struct pauseReturn {} + #[allow( + non_camel_case_types, + non_snake_case, + clippy::pub_underscore_fields, + clippy::style + )] + const _: () = { + use alloy::sol_types as alloy_sol_types; + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: pauseCall) -> Self { + () + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for pauseCall { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self + } + } + } + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: pauseReturn) -> Self { + () + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for pauseReturn { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self {} + } + } + } + impl pauseReturn { + fn _tokenize( + &self, + ) -> ::ReturnToken<'_> { + () + } + } + #[automatically_derived] + impl alloy_sol_types::SolCall for pauseCall { + type Parameters<'a> = (); + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Return = pauseReturn; + type ReturnTuple<'a> = (); + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SIGNATURE: &'static str = "pause()"; + const SELECTOR: [u8; 4] = [132u8, 86u8, 203u8, 89u8]; + #[inline] + fn new<'a>( + tuple: as alloy_sol_types::SolType>::RustType, + ) -> Self { + tuple.into() + } + #[inline] + fn tokenize(&self) -> Self::Token<'_> { + () + } + #[inline] + fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { + pauseReturn::_tokenize(ret) + } + #[inline] + fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence(data) + .map(Into::into) + } + #[inline] + fn abi_decode_returns_validate( + data: &[u8], + ) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence_validate(data) + .map(Into::into) + } + } + }; + #[derive(serde::Serialize, serde::Deserialize)] + #[derive(Default, Debug, PartialEq, Eq, Hash)] + /**Function with signature `paused()` and selector `0x5c975abb`. +```solidity +function paused() external view returns (bool); +```*/ + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] + #[derive(Clone)] + pub struct pausedCall; + #[derive(serde::Serialize, serde::Deserialize)] + #[derive(Default, Debug, PartialEq, Eq, Hash)] + ///Container type for the return parameters of the [`paused()`](pausedCall) function. + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] + #[derive(Clone)] + pub struct pausedReturn { + #[allow(missing_docs)] + pub _0: bool, + } + #[allow( + non_camel_case_types, + non_snake_case, + clippy::pub_underscore_fields, + clippy::style + )] + const _: () = { + use alloy::sol_types as alloy_sol_types; + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: pausedCall) -> Self { + () + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for pausedCall { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self + } + } + } + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Bool,); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (bool,); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: pausedReturn) -> Self { + (value._0,) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for pausedReturn { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { _0: tuple.0 } + } + } + } + #[automatically_derived] + impl alloy_sol_types::SolCall for pausedCall { + type Parameters<'a> = (); + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Return = bool; + type ReturnTuple<'a> = (alloy::sol_types::sol_data::Bool,); + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SIGNATURE: &'static str = "paused()"; + const SELECTOR: [u8; 4] = [92u8, 151u8, 90u8, 187u8]; + #[inline] + fn new<'a>( + tuple: as alloy_sol_types::SolType>::RustType, + ) -> Self { + tuple.into() + } + #[inline] + fn tokenize(&self) -> Self::Token<'_> { + () + } + #[inline] + fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { + ( + ::tokenize( + ret, + ), + ) + } + #[inline] + fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence(data) + .map(|r| { + let r: pausedReturn = r.into(); + r._0 + }) + } + #[inline] + fn abi_decode_returns_validate( + data: &[u8], + ) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence_validate(data) + .map(|r| { + let r: pausedReturn = r.into(); + r._0 + }) + } + } + }; + #[derive(serde::Serialize, serde::Deserialize)] + #[derive(Default, Debug, PartialEq, Eq, Hash)] + /**Function with signature `podConfig()` and selector `0xd328613b`. +```solidity +function podConfig() external view returns (uint8 thresholdNumerator, uint8 thresholdDenominator, address registry); +```*/ + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] + #[derive(Clone)] + pub struct podConfigCall; + #[derive(serde::Serialize, serde::Deserialize)] + #[derive(Default, Debug, PartialEq, Eq, Hash)] + ///Container type for the return parameters of the [`podConfig()`](podConfigCall) function. + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] + #[derive(Clone)] + pub struct podConfigReturn { + #[allow(missing_docs)] + pub thresholdNumerator: u8, + #[allow(missing_docs)] + pub thresholdDenominator: u8, + #[allow(missing_docs)] + pub registry: alloy::sol_types::private::Address, + } + #[allow( + non_camel_case_types, + non_snake_case, + clippy::pub_underscore_fields, + clippy::style + )] + const _: () = { + use alloy::sol_types as alloy_sol_types; + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: podConfigCall) -> Self { + () + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for podConfigCall { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self + } + } + } + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = ( + alloy::sol_types::sol_data::Uint<8>, + alloy::sol_types::sol_data::Uint<8>, + alloy::sol_types::sol_data::Address, + ); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (u8, u8, alloy::sol_types::private::Address); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: podConfigReturn) -> Self { + ( + value.thresholdNumerator, + value.thresholdDenominator, + value.registry, + ) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for podConfigReturn { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { + thresholdNumerator: tuple.0, + thresholdDenominator: tuple.1, + registry: tuple.2, + } + } + } + } + impl podConfigReturn { + fn _tokenize( + &self, + ) -> ::ReturnToken<'_> { + ( + as alloy_sol_types::SolType>::tokenize(&self.thresholdNumerator), + as alloy_sol_types::SolType>::tokenize(&self.thresholdDenominator), + ::tokenize( + &self.registry, + ), + ) + } + } + #[automatically_derived] + impl alloy_sol_types::SolCall for podConfigCall { + type Parameters<'a> = (); + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Return = podConfigReturn; + type ReturnTuple<'a> = ( + alloy::sol_types::sol_data::Uint<8>, + alloy::sol_types::sol_data::Uint<8>, + alloy::sol_types::sol_data::Address, + ); + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SIGNATURE: &'static str = "podConfig()"; + const SELECTOR: [u8; 4] = [211u8, 40u8, 97u8, 59u8]; + #[inline] + fn new<'a>( + tuple: as alloy_sol_types::SolType>::RustType, + ) -> Self { + tuple.into() + } + #[inline] + fn tokenize(&self) -> Self::Token<'_> { + () + } + #[inline] + fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { + podConfigReturn::_tokenize(ret) + } + #[inline] + fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence(data) + .map(Into::into) + } + #[inline] + fn abi_decode_returns_validate( + data: &[u8], + ) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence_validate(data) + .map(Into::into) + } + } + }; + #[derive(serde::Serialize, serde::Deserialize)] + #[derive(Default, Debug, PartialEq, Eq, Hash)] + /**Function with signature `processedRequests(bytes32)` and selector `0xce0fa5a9`. +```solidity +function processedRequests(bytes32) external view returns (bool); +```*/ + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] + #[derive(Clone)] + pub struct processedRequestsCall(pub alloy::sol_types::private::FixedBytes<32>); + #[derive(serde::Serialize, serde::Deserialize)] + #[derive(Default, Debug, PartialEq, Eq, Hash)] + ///Container type for the return parameters of the [`processedRequests(bytes32)`](processedRequestsCall) function. + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] + #[derive(Clone)] + pub struct processedRequestsReturn { + #[allow(missing_docs)] + pub _0: bool, + } + #[allow( + non_camel_case_types, + non_snake_case, + clippy::pub_underscore_fields, + clippy::style + )] + const _: () = { + use alloy::sol_types as alloy_sol_types; + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::FixedBytes<32>,); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (alloy::sol_types::private::FixedBytes<32>,); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From + for UnderlyingRustTuple<'_> { + fn from(value: processedRequestsCall) -> Self { + (value.0,) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> + for processedRequestsCall { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self(tuple.0) + } + } + } + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Bool,); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (bool,); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From + for UnderlyingRustTuple<'_> { + fn from(value: processedRequestsReturn) -> Self { + (value._0,) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> + for processedRequestsReturn { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { _0: tuple.0 } + } + } + } + #[automatically_derived] + impl alloy_sol_types::SolCall for processedRequestsCall { + type Parameters<'a> = (alloy::sol_types::sol_data::FixedBytes<32>,); + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Return = bool; + type ReturnTuple<'a> = (alloy::sol_types::sol_data::Bool,); + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SIGNATURE: &'static str = "processedRequests(bytes32)"; + const SELECTOR: [u8; 4] = [206u8, 15u8, 165u8, 169u8]; + #[inline] + fn new<'a>( + tuple: as alloy_sol_types::SolType>::RustType, + ) -> Self { + tuple.into() + } + #[inline] + fn tokenize(&self) -> Self::Token<'_> { + ( + as alloy_sol_types::SolType>::tokenize(&self.0), + ) + } + #[inline] + fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { + ( + ::tokenize( + ret, + ), + ) + } + #[inline] + fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence(data) + .map(|r| { + let r: processedRequestsReturn = r.into(); + r._0 + }) + } + #[inline] + fn abi_decode_returns_validate( + data: &[u8], + ) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence_validate(data) + .map(|r| { + let r: processedRequestsReturn = r.into(); + r._0 + }) + } + } + }; + #[derive(serde::Serialize, serde::Deserialize)] + #[derive(Default, Debug, PartialEq, Eq, Hash)] + /**Function with signature `renounceRole(bytes32,address)` and selector `0x36568abe`. +```solidity +function renounceRole(bytes32 role, address callerConfirmation) external; +```*/ + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] + #[derive(Clone)] + pub struct renounceRoleCall { + #[allow(missing_docs)] + pub role: alloy::sol_types::private::FixedBytes<32>, + #[allow(missing_docs)] + pub callerConfirmation: alloy::sol_types::private::Address, + } + ///Container type for the return parameters of the [`renounceRole(bytes32,address)`](renounceRoleCall) function. + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] + #[derive(Clone)] + pub struct renounceRoleReturn {} + #[allow( + non_camel_case_types, + non_snake_case, + clippy::pub_underscore_fields, + clippy::style + )] + const _: () = { + use alloy::sol_types as alloy_sol_types; + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = ( + alloy::sol_types::sol_data::FixedBytes<32>, + alloy::sol_types::sol_data::Address, + ); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = ( + alloy::sol_types::private::FixedBytes<32>, + alloy::sol_types::private::Address, + ); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: renounceRoleCall) -> Self { + (value.role, value.callerConfirmation) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for renounceRoleCall { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { + role: tuple.0, + callerConfirmation: tuple.1, + } + } + } + } + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: renounceRoleReturn) -> Self { + () + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for renounceRoleReturn { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self {} + } + } + } + impl renounceRoleReturn { + fn _tokenize( + &self, + ) -> ::ReturnToken<'_> { + () + } + } + #[automatically_derived] + impl alloy_sol_types::SolCall for renounceRoleCall { + type Parameters<'a> = ( + alloy::sol_types::sol_data::FixedBytes<32>, + alloy::sol_types::sol_data::Address, + ); + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Return = renounceRoleReturn; + type ReturnTuple<'a> = (); + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SIGNATURE: &'static str = "renounceRole(bytes32,address)"; + const SELECTOR: [u8; 4] = [54u8, 86u8, 138u8, 190u8]; + #[inline] + fn new<'a>( + tuple: as alloy_sol_types::SolType>::RustType, + ) -> Self { + tuple.into() + } + #[inline] + fn tokenize(&self) -> Self::Token<'_> { + ( + as alloy_sol_types::SolType>::tokenize(&self.role), + ::tokenize( + &self.callerConfirmation, + ), + ) + } + #[inline] + fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { + renounceRoleReturn::_tokenize(ret) + } + #[inline] + fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence(data) + .map(Into::into) + } + #[inline] + fn abi_decode_returns_validate( + data: &[u8], + ) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence_validate(data) + .map(Into::into) + } + } + }; + #[derive(serde::Serialize, serde::Deserialize)] + #[derive(Default, Debug, PartialEq, Eq, Hash)] + /**Function with signature `revokeRole(bytes32,address)` and selector `0xd547741f`. +```solidity +function revokeRole(bytes32 role, address account) external; +```*/ + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] + #[derive(Clone)] + pub struct revokeRoleCall { + #[allow(missing_docs)] + pub role: alloy::sol_types::private::FixedBytes<32>, + #[allow(missing_docs)] + pub account: alloy::sol_types::private::Address, + } + ///Container type for the return parameters of the [`revokeRole(bytes32,address)`](revokeRoleCall) function. + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] + #[derive(Clone)] + pub struct revokeRoleReturn {} + #[allow( + non_camel_case_types, + non_snake_case, + clippy::pub_underscore_fields, + clippy::style + )] + const _: () = { + use alloy::sol_types as alloy_sol_types; + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = ( + alloy::sol_types::sol_data::FixedBytes<32>, + alloy::sol_types::sol_data::Address, + ); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = ( + alloy::sol_types::private::FixedBytes<32>, + alloy::sol_types::private::Address, + ); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: revokeRoleCall) -> Self { + (value.role, value.account) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for revokeRoleCall { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { + role: tuple.0, + account: tuple.1, + } + } + } + } + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: revokeRoleReturn) -> Self { + () + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for revokeRoleReturn { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self {} + } + } + } + impl revokeRoleReturn { + fn _tokenize( + &self, + ) -> ::ReturnToken<'_> { + () + } + } + #[automatically_derived] + impl alloy_sol_types::SolCall for revokeRoleCall { + type Parameters<'a> = ( + alloy::sol_types::sol_data::FixedBytes<32>, + alloy::sol_types::sol_data::Address, + ); + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Return = revokeRoleReturn; + type ReturnTuple<'a> = (); + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SIGNATURE: &'static str = "revokeRole(bytes32,address)"; + const SELECTOR: [u8; 4] = [213u8, 71u8, 116u8, 31u8]; + #[inline] + fn new<'a>( + tuple: as alloy_sol_types::SolType>::RustType, + ) -> Self { + tuple.into() + } + #[inline] + fn tokenize(&self) -> Self::Token<'_> { + ( + as alloy_sol_types::SolType>::tokenize(&self.role), + ::tokenize( + &self.account, + ), + ) + } + #[inline] + fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { + revokeRoleReturn::_tokenize(ret) + } + #[inline] + fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence(data) + .map(Into::into) + } + #[inline] + fn abi_decode_returns_validate( + data: &[u8], + ) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence_validate(data) + .map(Into::into) + } + } + }; + #[derive(serde::Serialize, serde::Deserialize)] + #[derive(Default, Debug, PartialEq, Eq, Hash)] + /**Function with signature `supportsInterface(bytes4)` and selector `0x01ffc9a7`. +```solidity +function supportsInterface(bytes4 interfaceId) external view returns (bool); +```*/ + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] + #[derive(Clone)] + pub struct supportsInterfaceCall { + #[allow(missing_docs)] + pub interfaceId: alloy::sol_types::private::FixedBytes<4>, + } + #[derive(serde::Serialize, serde::Deserialize)] + #[derive(Default, Debug, PartialEq, Eq, Hash)] + ///Container type for the return parameters of the [`supportsInterface(bytes4)`](supportsInterfaceCall) function. + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] + #[derive(Clone)] + pub struct supportsInterfaceReturn { + #[allow(missing_docs)] + pub _0: bool, + } + #[allow( + non_camel_case_types, + non_snake_case, + clippy::pub_underscore_fields, + clippy::style + )] + const _: () = { + use alloy::sol_types as alloy_sol_types; + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::FixedBytes<4>,); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (alloy::sol_types::private::FixedBytes<4>,); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From + for UnderlyingRustTuple<'_> { + fn from(value: supportsInterfaceCall) -> Self { + (value.interfaceId,) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> + for supportsInterfaceCall { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { interfaceId: tuple.0 } + } + } + } + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Bool,); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (bool,); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From + for UnderlyingRustTuple<'_> { + fn from(value: supportsInterfaceReturn) -> Self { + (value._0,) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> + for supportsInterfaceReturn { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { _0: tuple.0 } + } + } + } + #[automatically_derived] + impl alloy_sol_types::SolCall for supportsInterfaceCall { + type Parameters<'a> = (alloy::sol_types::sol_data::FixedBytes<4>,); + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Return = bool; + type ReturnTuple<'a> = (alloy::sol_types::sol_data::Bool,); + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SIGNATURE: &'static str = "supportsInterface(bytes4)"; + const SELECTOR: [u8; 4] = [1u8, 255u8, 201u8, 167u8]; + #[inline] + fn new<'a>( + tuple: as alloy_sol_types::SolType>::RustType, + ) -> Self { + tuple.into() + } + #[inline] + fn tokenize(&self) -> Self::Token<'_> { + ( + as alloy_sol_types::SolType>::tokenize(&self.interfaceId), + ) + } + #[inline] + fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { + ( + ::tokenize( + ret, + ), + ) + } + #[inline] + fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence(data) + .map(|r| { + let r: supportsInterfaceReturn = r.into(); + r._0 + }) + } + #[inline] + fn abi_decode_returns_validate( + data: &[u8], + ) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence_validate(data) + .map(|r| { + let r: supportsInterfaceReturn = r.into(); + r._0 + }) + } + } + }; + #[derive(serde::Serialize, serde::Deserialize)] + #[derive(Default, Debug, PartialEq, Eq, Hash)] + /**Function with signature `tokenData(address)` and selector `0x27e45c2c`. +```solidity +function tokenData(address) external view returns (IBridge.TokenLimits memory limits, IBridge.TokenUsage memory deposit, IBridge.TokenUsage memory claim); +```*/ + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] + #[derive(Clone)] + pub struct tokenDataCall(pub alloy::sol_types::private::Address); + #[derive(serde::Serialize, serde::Deserialize)] + #[derive(Default, Debug, PartialEq, Eq, Hash)] + ///Container type for the return parameters of the [`tokenData(address)`](tokenDataCall) function. + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] + #[derive(Clone)] + pub struct tokenDataReturn { + #[allow(missing_docs)] + pub limits: ::RustType, + #[allow(missing_docs)] + pub deposit: ::RustType, + #[allow(missing_docs)] + pub claim: ::RustType, + } + #[allow( + non_camel_case_types, + non_snake_case, + clippy::pub_underscore_fields, + clippy::style + )] + const _: () = { + use alloy::sol_types as alloy_sol_types; + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Address,); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (alloy::sol_types::private::Address,); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: tokenDataCall) -> Self { + (value.0,) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for tokenDataCall { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self(tuple.0) + } + } + } + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = ( + IBridge::TokenLimits, + IBridge::TokenUsage, + IBridge::TokenUsage, + ); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = ( + ::RustType, + ::RustType, + ::RustType, + ); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: tokenDataReturn) -> Self { + (value.limits, value.deposit, value.claim) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for tokenDataReturn { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { + limits: tuple.0, + deposit: tuple.1, + claim: tuple.2, + } + } + } + } + impl tokenDataReturn { + fn _tokenize( + &self, + ) -> ::ReturnToken<'_> { + ( + ::tokenize( + &self.limits, + ), + ::tokenize( + &self.deposit, + ), + ::tokenize( + &self.claim, + ), + ) + } + } + #[automatically_derived] + impl alloy_sol_types::SolCall for tokenDataCall { + type Parameters<'a> = (alloy::sol_types::sol_data::Address,); + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Return = tokenDataReturn; + type ReturnTuple<'a> = ( + IBridge::TokenLimits, + IBridge::TokenUsage, + IBridge::TokenUsage, + ); + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SIGNATURE: &'static str = "tokenData(address)"; + const SELECTOR: [u8; 4] = [39u8, 228u8, 92u8, 44u8]; + #[inline] + fn new<'a>( + tuple: as alloy_sol_types::SolType>::RustType, + ) -> Self { + tuple.into() + } + #[inline] + fn tokenize(&self) -> Self::Token<'_> { + ( + ::tokenize( + &self.0, + ), + ) + } + #[inline] + fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { + tokenDataReturn::_tokenize(ret) + } + #[inline] + fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence(data) + .map(Into::into) + } + #[inline] + fn abi_decode_returns_validate( + data: &[u8], + ) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence_validate(data) + .map(Into::into) + } + } + }; + #[derive(serde::Serialize, serde::Deserialize)] + #[derive(Default, Debug, PartialEq, Eq, Hash)] + /**Function with signature `unpause()` and selector `0x3f4ba83a`. +```solidity +function unpause() external; +```*/ + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] + #[derive(Clone)] + pub struct unpauseCall; + ///Container type for the return parameters of the [`unpause()`](unpauseCall) function. + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] + #[derive(Clone)] + pub struct unpauseReturn {} + #[allow( + non_camel_case_types, + non_snake_case, + clippy::pub_underscore_fields, + clippy::style + )] + const _: () = { + use alloy::sol_types as alloy_sol_types; + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: unpauseCall) -> Self { + () + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for unpauseCall { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self + } + } + } + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: unpauseReturn) -> Self { + () + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for unpauseReturn { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self {} + } + } + } + impl unpauseReturn { + fn _tokenize( + &self, + ) -> ::ReturnToken<'_> { + () + } + } + #[automatically_derived] + impl alloy_sol_types::SolCall for unpauseCall { + type Parameters<'a> = (); + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Return = unpauseReturn; + type ReturnTuple<'a> = (); + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SIGNATURE: &'static str = "unpause()"; + const SELECTOR: [u8; 4] = [63u8, 75u8, 168u8, 58u8]; + #[inline] + fn new<'a>( + tuple: as alloy_sol_types::SolType>::RustType, + ) -> Self { + tuple.into() + } + #[inline] + fn tokenize(&self) -> Self::Token<'_> { + () + } + #[inline] + fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { + unpauseReturn::_tokenize(ret) + } + #[inline] + fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence(data) + .map(Into::into) + } + #[inline] + fn abi_decode_returns_validate( + data: &[u8], + ) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence_validate(data) + .map(Into::into) + } + } + }; + #[derive(serde::Serialize, serde::Deserialize)] + #[derive(Default, Debug, PartialEq, Eq, Hash)] + /**Function with signature `usedNonces(uint256)` and selector `0x6717e41c`. +```solidity +function usedNonces(uint256) external view returns (bool); +```*/ + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] + #[derive(Clone)] + pub struct usedNoncesCall(pub alloy::sol_types::private::primitives::aliases::U256); + #[derive(serde::Serialize, serde::Deserialize)] + #[derive(Default, Debug, PartialEq, Eq, Hash)] + ///Container type for the return parameters of the [`usedNonces(uint256)`](usedNoncesCall) function. + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] + #[derive(Clone)] + pub struct usedNoncesReturn { + #[allow(missing_docs)] + pub _0: bool, + } + #[allow( + non_camel_case_types, + non_snake_case, + clippy::pub_underscore_fields, + clippy::style + )] + const _: () = { + use alloy::sol_types as alloy_sol_types; + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Uint<256>,); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = ( + alloy::sol_types::private::primitives::aliases::U256, + ); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: usedNoncesCall) -> Self { + (value.0,) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for usedNoncesCall { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self(tuple.0) + } + } + } + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Bool,); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (bool,); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: usedNoncesReturn) -> Self { + (value._0,) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for usedNoncesReturn { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { _0: tuple.0 } + } + } + } + #[automatically_derived] + impl alloy_sol_types::SolCall for usedNoncesCall { + type Parameters<'a> = (alloy::sol_types::sol_data::Uint<256>,); + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Return = bool; + type ReturnTuple<'a> = (alloy::sol_types::sol_data::Bool,); + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SIGNATURE: &'static str = "usedNonces(uint256)"; + const SELECTOR: [u8; 4] = [103u8, 23u8, 228u8, 28u8]; + #[inline] + fn new<'a>( + tuple: as alloy_sol_types::SolType>::RustType, + ) -> Self { + tuple.into() + } + #[inline] + fn tokenize(&self) -> Self::Token<'_> { + ( + as alloy_sol_types::SolType>::tokenize(&self.0), + ) + } + #[inline] + fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { + ( + ::tokenize( + ret, + ), + ) + } + #[inline] + fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence(data) + .map(|r| { + let r: usedNoncesReturn = r.into(); + r._0 + }) + } + #[inline] + fn abi_decode_returns_validate( + data: &[u8], + ) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence_validate(data) + .map(|r| { + let r: usedNoncesReturn = r.into(); + r._0 + }) + } + } + }; + #[derive(serde::Serialize, serde::Deserialize)] + #[derive(Default, Debug, PartialEq, Eq, Hash)] + /**Function with signature `whiteListToken(address,address,(uint256,uint256,uint256))` and selector `0xfc5c5cb3`. +```solidity +function whiteListToken(address token, address mirrorToken, IBridge.TokenLimits memory limits) external; +```*/ + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] + #[derive(Clone)] + pub struct whiteListTokenCall { + #[allow(missing_docs)] + pub token: alloy::sol_types::private::Address, + #[allow(missing_docs)] + pub mirrorToken: alloy::sol_types::private::Address, + #[allow(missing_docs)] + pub limits: ::RustType, + } + ///Container type for the return parameters of the [`whiteListToken(address,address,(uint256,uint256,uint256))`](whiteListTokenCall) function. + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] + #[derive(Clone)] + pub struct whiteListTokenReturn {} + #[allow( + non_camel_case_types, + non_snake_case, + clippy::pub_underscore_fields, + clippy::style + )] + const _: () = { + use alloy::sol_types as alloy_sol_types; + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = ( + alloy::sol_types::sol_data::Address, + alloy::sol_types::sol_data::Address, + IBridge::TokenLimits, + ); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = ( + alloy::sol_types::private::Address, + alloy::sol_types::private::Address, + ::RustType, + ); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: whiteListTokenCall) -> Self { + (value.token, value.mirrorToken, value.limits) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for whiteListTokenCall { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { + token: tuple.0, + mirrorToken: tuple.1, + limits: tuple.2, + } + } + } + } + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From + for UnderlyingRustTuple<'_> { + fn from(value: whiteListTokenReturn) -> Self { + () + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> + for whiteListTokenReturn { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self {} + } + } + } + impl whiteListTokenReturn { + fn _tokenize( + &self, + ) -> ::ReturnToken<'_> { + () + } + } + #[automatically_derived] + impl alloy_sol_types::SolCall for whiteListTokenCall { + type Parameters<'a> = ( + alloy::sol_types::sol_data::Address, + alloy::sol_types::sol_data::Address, + IBridge::TokenLimits, + ); + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Return = whiteListTokenReturn; + type ReturnTuple<'a> = (); + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SIGNATURE: &'static str = "whiteListToken(address,address,(uint256,uint256,uint256))"; + const SELECTOR: [u8; 4] = [252u8, 92u8, 92u8, 179u8]; + #[inline] + fn new<'a>( + tuple: as alloy_sol_types::SolType>::RustType, + ) -> Self { + tuple.into() + } + #[inline] + fn tokenize(&self) -> Self::Token<'_> { + ( + ::tokenize( + &self.token, + ), + ::tokenize( + &self.mirrorToken, + ), + ::tokenize( + &self.limits, + ), + ) + } + #[inline] + fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { + whiteListTokenReturn::_tokenize(ret) + } + #[inline] + fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence(data) + .map(Into::into) + } + #[inline] + fn abi_decode_returns_validate( + data: &[u8], + ) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence_validate(data) + .map(Into::into) + } + } + }; + #[derive(serde::Serialize, serde::Deserialize)] + #[derive(Default, Debug, PartialEq, Eq, Hash)] + /**Function with signature `whitelistedTokens(uint256)` and selector `0x2154bc44`. +```solidity +function whitelistedTokens(uint256) external view returns (address); +```*/ + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] + #[derive(Clone)] + pub struct whitelistedTokensCall( + pub alloy::sol_types::private::primitives::aliases::U256, + ); + #[derive(serde::Serialize, serde::Deserialize)] + #[derive(Default, Debug, PartialEq, Eq, Hash)] + ///Container type for the return parameters of the [`whitelistedTokens(uint256)`](whitelistedTokensCall) function. + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] + #[derive(Clone)] + pub struct whitelistedTokensReturn { + #[allow(missing_docs)] + pub _0: alloy::sol_types::private::Address, + } + #[allow( + non_camel_case_types, + non_snake_case, + clippy::pub_underscore_fields, + clippy::style + )] + const _: () = { + use alloy::sol_types as alloy_sol_types; + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Uint<256>,); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = ( + alloy::sol_types::private::primitives::aliases::U256, + ); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From + for UnderlyingRustTuple<'_> { + fn from(value: whitelistedTokensCall) -> Self { + (value.0,) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> + for whitelistedTokensCall { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self(tuple.0) + } + } + } + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Address,); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (alloy::sol_types::private::Address,); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From + for UnderlyingRustTuple<'_> { + fn from(value: whitelistedTokensReturn) -> Self { + (value._0,) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> + for whitelistedTokensReturn { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { _0: tuple.0 } + } + } + } + #[automatically_derived] + impl alloy_sol_types::SolCall for whitelistedTokensCall { + type Parameters<'a> = (alloy::sol_types::sol_data::Uint<256>,); + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Return = alloy::sol_types::private::Address; + type ReturnTuple<'a> = (alloy::sol_types::sol_data::Address,); + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SIGNATURE: &'static str = "whitelistedTokens(uint256)"; + const SELECTOR: [u8; 4] = [33u8, 84u8, 188u8, 68u8]; + #[inline] + fn new<'a>( + tuple: as alloy_sol_types::SolType>::RustType, + ) -> Self { + tuple.into() + } + #[inline] + fn tokenize(&self) -> Self::Token<'_> { + ( + as alloy_sol_types::SolType>::tokenize(&self.0), + ) + } + #[inline] + fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { + ( + ::tokenize( + ret, + ), + ) + } + #[inline] + fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence(data) + .map(|r| { + let r: whitelistedTokensReturn = r.into(); + r._0 + }) + } + #[inline] + fn abi_decode_returns_validate( + data: &[u8], + ) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence_validate(data) + .map(|r| { + let r: whitelistedTokensReturn = r.into(); + r._0 + }) + } + } + }; + ///Container for all the [`BridgeDepositWithdraw`](self) function calls. + #[derive(serde::Serialize, serde::Deserialize)] + #[derive()] + pub enum BridgeDepositWithdrawCalls { + #[allow(missing_docs)] + DEFAULT_ADMIN_ROLE(DEFAULT_ADMIN_ROLECall), + #[allow(missing_docs)] + PAUSER_ROLE(PAUSER_ROLECall), + #[allow(missing_docs)] + bridgeContract(bridgeContractCall), + #[allow(missing_docs)] + claim(claimCall), + #[allow(missing_docs)] + claimNative(claimNativeCall), + #[allow(missing_docs)] + configureToken(configureTokenCall), + #[allow(missing_docs)] + deposit(depositCall), + #[allow(missing_docs)] + depositIndex(depositIndexCall), + #[allow(missing_docs)] + depositNative(depositNativeCall), + #[allow(missing_docs)] + getRoleAdmin(getRoleAdminCall), + #[allow(missing_docs)] + grantRole(grantRoleCall), + #[allow(missing_docs)] + hasRole(hasRoleCall), + #[allow(missing_docs)] + migrate(migrateCall), + #[allow(missing_docs)] + migratedContract(migratedContractCall), + #[allow(missing_docs)] + mirrorTokens(mirrorTokensCall), + #[allow(missing_docs)] + pause(pauseCall), + #[allow(missing_docs)] + paused(pausedCall), + #[allow(missing_docs)] + podConfig(podConfigCall), + #[allow(missing_docs)] + processedRequests(processedRequestsCall), + #[allow(missing_docs)] + renounceRole(renounceRoleCall), + #[allow(missing_docs)] + revokeRole(revokeRoleCall), + #[allow(missing_docs)] + supportsInterface(supportsInterfaceCall), + #[allow(missing_docs)] + tokenData(tokenDataCall), + #[allow(missing_docs)] + unpause(unpauseCall), + #[allow(missing_docs)] + usedNonces(usedNoncesCall), + #[allow(missing_docs)] + whiteListToken(whiteListTokenCall), + #[allow(missing_docs)] + whitelistedTokens(whitelistedTokensCall), + } + #[automatically_derived] + impl BridgeDepositWithdrawCalls { + /// All the selectors of this enum. + /// + /// Note that the selectors might not be in the same order as the variants. + /// No guarantees are made about the order of the selectors. + /// + /// Prefer using `SolInterface` methods instead. + pub const SELECTORS: &'static [[u8; 4usize]] = &[ + [1u8, 255u8, 201u8, 167u8], + [33u8, 84u8, 188u8, 68u8], + [36u8, 138u8, 156u8, 163u8], + [39u8, 228u8, 92u8, 44u8], + [47u8, 47u8, 241u8, 93u8], + [51u8, 187u8, 127u8, 145u8], + [54u8, 86u8, 138u8, 190u8], + [63u8, 75u8, 168u8, 58u8], + [67u8, 25u8, 230u8, 219u8], + [87u8, 20u8, 59u8, 225u8], + [92u8, 151u8, 90u8, 187u8], + [103u8, 23u8, 228u8, 28u8], + [116u8, 134u8, 250u8, 78u8], + [123u8, 137u8, 137u8, 57u8], + [132u8, 86u8, 203u8, 89u8], + [145u8, 209u8, 72u8, 84u8], + [146u8, 103u8, 177u8, 83u8], + [162u8, 23u8, 253u8, 223u8], + [205u8, 89u8, 101u8, 131u8], + [206u8, 15u8, 165u8, 169u8], + [206u8, 84u8, 148u8, 187u8], + [211u8, 40u8, 97u8, 59u8], + [213u8, 71u8, 116u8, 31u8], + [230u8, 58u8, 177u8, 233u8], + [244u8, 83u8, 70u8, 220u8], + [252u8, 92u8, 92u8, 179u8], + [254u8, 174u8, 180u8, 62u8], + ]; + } + #[automatically_derived] + impl alloy_sol_types::SolInterface for BridgeDepositWithdrawCalls { + const NAME: &'static str = "BridgeDepositWithdrawCalls"; + const MIN_DATA_LENGTH: usize = 0usize; + const COUNT: usize = 27usize; + #[inline] + fn selector(&self) -> [u8; 4] { + match self { + Self::DEFAULT_ADMIN_ROLE(_) => { + ::SELECTOR + } + Self::PAUSER_ROLE(_) => { + ::SELECTOR + } + Self::bridgeContract(_) => { + ::SELECTOR + } + Self::claim(_) => ::SELECTOR, + Self::claimNative(_) => { + ::SELECTOR + } + Self::configureToken(_) => { + ::SELECTOR + } + Self::deposit(_) => ::SELECTOR, + Self::depositIndex(_) => { + ::SELECTOR + } + Self::depositNative(_) => { + ::SELECTOR + } + Self::getRoleAdmin(_) => { + ::SELECTOR + } + Self::grantRole(_) => { + ::SELECTOR + } + Self::hasRole(_) => ::SELECTOR, + Self::migrate(_) => ::SELECTOR, + Self::migratedContract(_) => { + ::SELECTOR + } + Self::mirrorTokens(_) => { + ::SELECTOR + } + Self::pause(_) => ::SELECTOR, + Self::paused(_) => ::SELECTOR, + Self::podConfig(_) => { + ::SELECTOR + } + Self::processedRequests(_) => { + ::SELECTOR + } + Self::renounceRole(_) => { + ::SELECTOR + } + Self::revokeRole(_) => { + ::SELECTOR + } + Self::supportsInterface(_) => { + ::SELECTOR + } + Self::tokenData(_) => { + ::SELECTOR + } + Self::unpause(_) => ::SELECTOR, + Self::usedNonces(_) => { + ::SELECTOR + } + Self::whiteListToken(_) => { + ::SELECTOR + } + Self::whitelistedTokens(_) => { + ::SELECTOR + } + } + } + #[inline] + fn selector_at(i: usize) -> ::core::option::Option<[u8; 4]> { + Self::SELECTORS.get(i).copied() + } + #[inline] + fn valid_selector(selector: [u8; 4]) -> bool { + Self::SELECTORS.binary_search(&selector).is_ok() + } + #[inline] + #[allow(non_snake_case)] + fn abi_decode_raw( + selector: [u8; 4], + data: &[u8], + ) -> alloy_sol_types::Result { + static DECODE_SHIMS: &[fn( + &[u8], + ) -> alloy_sol_types::Result] = &[ + { + fn supportsInterface( + data: &[u8], + ) -> alloy_sol_types::Result { + ::abi_decode_raw( + data, + ) + .map(BridgeDepositWithdrawCalls::supportsInterface) + } + supportsInterface + }, + { + fn whitelistedTokens( + data: &[u8], + ) -> alloy_sol_types::Result { + ::abi_decode_raw( + data, + ) + .map(BridgeDepositWithdrawCalls::whitelistedTokens) + } + whitelistedTokens + }, + { + fn getRoleAdmin( + data: &[u8], + ) -> alloy_sol_types::Result { + ::abi_decode_raw( + data, + ) + .map(BridgeDepositWithdrawCalls::getRoleAdmin) + } + getRoleAdmin + }, + { + fn tokenData( + data: &[u8], + ) -> alloy_sol_types::Result { + ::abi_decode_raw(data) + .map(BridgeDepositWithdrawCalls::tokenData) + } + tokenData + }, + { + fn grantRole( + data: &[u8], + ) -> alloy_sol_types::Result { + ::abi_decode_raw(data) + .map(BridgeDepositWithdrawCalls::grantRole) + } + grantRole + }, + { + fn depositNative( + data: &[u8], + ) -> alloy_sol_types::Result { + ::abi_decode_raw( + data, + ) + .map(BridgeDepositWithdrawCalls::depositNative) + } + depositNative + }, + { + fn renounceRole( + data: &[u8], + ) -> alloy_sol_types::Result { + ::abi_decode_raw( + data, + ) + .map(BridgeDepositWithdrawCalls::renounceRole) + } + renounceRole + }, + { + fn unpause( + data: &[u8], + ) -> alloy_sol_types::Result { + ::abi_decode_raw(data) + .map(BridgeDepositWithdrawCalls::unpause) + } + unpause + }, + { + fn claim( + data: &[u8], + ) -> alloy_sol_types::Result { + ::abi_decode_raw(data) + .map(BridgeDepositWithdrawCalls::claim) + } + claim + }, + { + fn claimNative( + data: &[u8], + ) -> alloy_sol_types::Result { + ::abi_decode_raw( + data, + ) + .map(BridgeDepositWithdrawCalls::claimNative) + } + claimNative + }, + { + fn paused( + data: &[u8], + ) -> alloy_sol_types::Result { + ::abi_decode_raw(data) + .map(BridgeDepositWithdrawCalls::paused) + } + paused + }, + { + fn usedNonces( + data: &[u8], + ) -> alloy_sol_types::Result { + ::abi_decode_raw( + data, + ) + .map(BridgeDepositWithdrawCalls::usedNonces) + } + usedNonces + }, + { + fn migratedContract( + data: &[u8], + ) -> alloy_sol_types::Result { + ::abi_decode_raw( + data, + ) + .map(BridgeDepositWithdrawCalls::migratedContract) + } + migratedContract + }, + { + fn depositIndex( + data: &[u8], + ) -> alloy_sol_types::Result { + ::abi_decode_raw( + data, + ) + .map(BridgeDepositWithdrawCalls::depositIndex) + } + depositIndex + }, + { + fn pause( + data: &[u8], + ) -> alloy_sol_types::Result { + ::abi_decode_raw(data) + .map(BridgeDepositWithdrawCalls::pause) + } + pause + }, + { + fn hasRole( + data: &[u8], + ) -> alloy_sol_types::Result { + ::abi_decode_raw(data) + .map(BridgeDepositWithdrawCalls::hasRole) + } + hasRole + }, + { + fn configureToken( + data: &[u8], + ) -> alloy_sol_types::Result { + ::abi_decode_raw( + data, + ) + .map(BridgeDepositWithdrawCalls::configureToken) + } + configureToken + }, + { + fn DEFAULT_ADMIN_ROLE( + data: &[u8], + ) -> alloy_sol_types::Result { + ::abi_decode_raw( + data, + ) + .map(BridgeDepositWithdrawCalls::DEFAULT_ADMIN_ROLE) + } + DEFAULT_ADMIN_ROLE + }, + { + fn bridgeContract( + data: &[u8], + ) -> alloy_sol_types::Result { + ::abi_decode_raw( + data, + ) + .map(BridgeDepositWithdrawCalls::bridgeContract) + } + bridgeContract + }, + { + fn processedRequests( + data: &[u8], + ) -> alloy_sol_types::Result { + ::abi_decode_raw( + data, + ) + .map(BridgeDepositWithdrawCalls::processedRequests) + } + processedRequests + }, + { + fn migrate( + data: &[u8], + ) -> alloy_sol_types::Result { + ::abi_decode_raw(data) + .map(BridgeDepositWithdrawCalls::migrate) + } + migrate + }, + { + fn podConfig( + data: &[u8], + ) -> alloy_sol_types::Result { + ::abi_decode_raw(data) + .map(BridgeDepositWithdrawCalls::podConfig) + } + podConfig + }, + { + fn revokeRole( + data: &[u8], + ) -> alloy_sol_types::Result { + ::abi_decode_raw( + data, + ) + .map(BridgeDepositWithdrawCalls::revokeRole) + } + revokeRole + }, + { + fn PAUSER_ROLE( + data: &[u8], + ) -> alloy_sol_types::Result { + ::abi_decode_raw( + data, + ) + .map(BridgeDepositWithdrawCalls::PAUSER_ROLE) + } + PAUSER_ROLE + }, + { + fn deposit( + data: &[u8], + ) -> alloy_sol_types::Result { + ::abi_decode_raw(data) + .map(BridgeDepositWithdrawCalls::deposit) + } + deposit + }, + { + fn whiteListToken( + data: &[u8], + ) -> alloy_sol_types::Result { + ::abi_decode_raw( + data, + ) + .map(BridgeDepositWithdrawCalls::whiteListToken) + } + whiteListToken + }, + { + fn mirrorTokens( + data: &[u8], + ) -> alloy_sol_types::Result { + ::abi_decode_raw( + data, + ) + .map(BridgeDepositWithdrawCalls::mirrorTokens) + } + mirrorTokens + }, + ]; + let Ok(idx) = Self::SELECTORS.binary_search(&selector) else { + return Err( + alloy_sol_types::Error::unknown_selector( + ::NAME, + selector, + ), + ); + }; + DECODE_SHIMS[idx](data) + } + #[inline] + #[allow(non_snake_case)] + fn abi_decode_raw_validate( + selector: [u8; 4], + data: &[u8], + ) -> alloy_sol_types::Result { + static DECODE_VALIDATE_SHIMS: &[fn( + &[u8], + ) -> alloy_sol_types::Result] = &[ + { + fn supportsInterface( + data: &[u8], + ) -> alloy_sol_types::Result { + ::abi_decode_raw_validate( + data, + ) + .map(BridgeDepositWithdrawCalls::supportsInterface) + } + supportsInterface + }, + { + fn whitelistedTokens( + data: &[u8], + ) -> alloy_sol_types::Result { + ::abi_decode_raw_validate( + data, + ) + .map(BridgeDepositWithdrawCalls::whitelistedTokens) + } + whitelistedTokens + }, + { + fn getRoleAdmin( + data: &[u8], + ) -> alloy_sol_types::Result { + ::abi_decode_raw_validate( + data, + ) + .map(BridgeDepositWithdrawCalls::getRoleAdmin) + } + getRoleAdmin + }, + { + fn tokenData( + data: &[u8], + ) -> alloy_sol_types::Result { + ::abi_decode_raw_validate( + data, + ) + .map(BridgeDepositWithdrawCalls::tokenData) + } + tokenData + }, + { + fn grantRole( + data: &[u8], + ) -> alloy_sol_types::Result { + ::abi_decode_raw_validate( + data, + ) + .map(BridgeDepositWithdrawCalls::grantRole) + } + grantRole + }, + { + fn depositNative( + data: &[u8], + ) -> alloy_sol_types::Result { + ::abi_decode_raw_validate( + data, + ) + .map(BridgeDepositWithdrawCalls::depositNative) + } + depositNative + }, + { + fn renounceRole( + data: &[u8], + ) -> alloy_sol_types::Result { + ::abi_decode_raw_validate( + data, + ) + .map(BridgeDepositWithdrawCalls::renounceRole) + } + renounceRole + }, + { + fn unpause( + data: &[u8], + ) -> alloy_sol_types::Result { + ::abi_decode_raw_validate( + data, + ) + .map(BridgeDepositWithdrawCalls::unpause) + } + unpause + }, + { + fn claim( + data: &[u8], + ) -> alloy_sol_types::Result { + ::abi_decode_raw_validate( + data, + ) + .map(BridgeDepositWithdrawCalls::claim) + } + claim + }, + { + fn claimNative( + data: &[u8], + ) -> alloy_sol_types::Result { + ::abi_decode_raw_validate( + data, + ) + .map(BridgeDepositWithdrawCalls::claimNative) + } + claimNative + }, + { + fn paused( + data: &[u8], + ) -> alloy_sol_types::Result { + ::abi_decode_raw_validate( + data, + ) + .map(BridgeDepositWithdrawCalls::paused) + } + paused + }, + { + fn usedNonces( + data: &[u8], + ) -> alloy_sol_types::Result { + ::abi_decode_raw_validate( + data, + ) + .map(BridgeDepositWithdrawCalls::usedNonces) + } + usedNonces + }, + { + fn migratedContract( + data: &[u8], + ) -> alloy_sol_types::Result { + ::abi_decode_raw_validate( + data, + ) + .map(BridgeDepositWithdrawCalls::migratedContract) + } + migratedContract + }, + { + fn depositIndex( + data: &[u8], + ) -> alloy_sol_types::Result { + ::abi_decode_raw_validate( + data, + ) + .map(BridgeDepositWithdrawCalls::depositIndex) + } + depositIndex + }, + { + fn pause( + data: &[u8], + ) -> alloy_sol_types::Result { + ::abi_decode_raw_validate( + data, + ) + .map(BridgeDepositWithdrawCalls::pause) + } + pause + }, + { + fn hasRole( + data: &[u8], + ) -> alloy_sol_types::Result { + ::abi_decode_raw_validate( + data, + ) + .map(BridgeDepositWithdrawCalls::hasRole) + } + hasRole + }, + { + fn configureToken( + data: &[u8], + ) -> alloy_sol_types::Result { + ::abi_decode_raw_validate( + data, + ) + .map(BridgeDepositWithdrawCalls::configureToken) + } + configureToken + }, + { + fn DEFAULT_ADMIN_ROLE( + data: &[u8], + ) -> alloy_sol_types::Result { + ::abi_decode_raw_validate( + data, + ) + .map(BridgeDepositWithdrawCalls::DEFAULT_ADMIN_ROLE) + } + DEFAULT_ADMIN_ROLE + }, + { + fn bridgeContract( + data: &[u8], + ) -> alloy_sol_types::Result { + ::abi_decode_raw_validate( + data, + ) + .map(BridgeDepositWithdrawCalls::bridgeContract) + } + bridgeContract + }, + { + fn processedRequests( + data: &[u8], + ) -> alloy_sol_types::Result { + ::abi_decode_raw_validate( + data, + ) + .map(BridgeDepositWithdrawCalls::processedRequests) + } + processedRequests + }, + { + fn migrate( + data: &[u8], + ) -> alloy_sol_types::Result { + ::abi_decode_raw_validate( + data, + ) + .map(BridgeDepositWithdrawCalls::migrate) + } + migrate + }, + { + fn podConfig( + data: &[u8], + ) -> alloy_sol_types::Result { + ::abi_decode_raw_validate( + data, + ) + .map(BridgeDepositWithdrawCalls::podConfig) + } + podConfig + }, + { + fn revokeRole( + data: &[u8], + ) -> alloy_sol_types::Result { + ::abi_decode_raw_validate( + data, + ) + .map(BridgeDepositWithdrawCalls::revokeRole) + } + revokeRole + }, + { + fn PAUSER_ROLE( + data: &[u8], + ) -> alloy_sol_types::Result { + ::abi_decode_raw_validate( + data, + ) + .map(BridgeDepositWithdrawCalls::PAUSER_ROLE) + } + PAUSER_ROLE + }, + { + fn deposit( + data: &[u8], + ) -> alloy_sol_types::Result { + ::abi_decode_raw_validate( + data, + ) + .map(BridgeDepositWithdrawCalls::deposit) + } + deposit + }, + { + fn whiteListToken( + data: &[u8], + ) -> alloy_sol_types::Result { + ::abi_decode_raw_validate( + data, + ) + .map(BridgeDepositWithdrawCalls::whiteListToken) + } + whiteListToken + }, + { + fn mirrorTokens( + data: &[u8], + ) -> alloy_sol_types::Result { + ::abi_decode_raw_validate( + data, + ) + .map(BridgeDepositWithdrawCalls::mirrorTokens) + } + mirrorTokens + }, + ]; + let Ok(idx) = Self::SELECTORS.binary_search(&selector) else { + return Err( + alloy_sol_types::Error::unknown_selector( + ::NAME, + selector, + ), + ); + }; + DECODE_VALIDATE_SHIMS[idx](data) + } + #[inline] + fn abi_encoded_size(&self) -> usize { + match self { + Self::DEFAULT_ADMIN_ROLE(inner) => { + ::abi_encoded_size( + inner, + ) + } + Self::PAUSER_ROLE(inner) => { + ::abi_encoded_size( + inner, + ) + } + Self::bridgeContract(inner) => { + ::abi_encoded_size( + inner, + ) + } + Self::claim(inner) => { + ::abi_encoded_size(inner) + } + Self::claimNative(inner) => { + ::abi_encoded_size( + inner, + ) + } + Self::configureToken(inner) => { + ::abi_encoded_size( + inner, + ) + } + Self::deposit(inner) => { + ::abi_encoded_size(inner) + } + Self::depositIndex(inner) => { + ::abi_encoded_size( + inner, + ) + } + Self::depositNative(inner) => { + ::abi_encoded_size( + inner, + ) + } + Self::getRoleAdmin(inner) => { + ::abi_encoded_size( + inner, + ) + } + Self::grantRole(inner) => { + ::abi_encoded_size(inner) + } + Self::hasRole(inner) => { + ::abi_encoded_size(inner) + } + Self::migrate(inner) => { + ::abi_encoded_size(inner) + } + Self::migratedContract(inner) => { + ::abi_encoded_size( + inner, + ) + } + Self::mirrorTokens(inner) => { + ::abi_encoded_size( + inner, + ) + } + Self::pause(inner) => { + ::abi_encoded_size(inner) + } + Self::paused(inner) => { + ::abi_encoded_size(inner) + } + Self::podConfig(inner) => { + ::abi_encoded_size(inner) + } + Self::processedRequests(inner) => { + ::abi_encoded_size( + inner, + ) + } + Self::renounceRole(inner) => { + ::abi_encoded_size( + inner, + ) + } + Self::revokeRole(inner) => { + ::abi_encoded_size(inner) + } + Self::supportsInterface(inner) => { + ::abi_encoded_size( + inner, + ) + } + Self::tokenData(inner) => { + ::abi_encoded_size(inner) + } + Self::unpause(inner) => { + ::abi_encoded_size(inner) + } + Self::usedNonces(inner) => { + ::abi_encoded_size(inner) + } + Self::whiteListToken(inner) => { + ::abi_encoded_size( + inner, + ) + } + Self::whitelistedTokens(inner) => { + ::abi_encoded_size( + inner, + ) + } + } + } + #[inline] + fn abi_encode_raw(&self, out: &mut alloy_sol_types::private::Vec) { + match self { + Self::DEFAULT_ADMIN_ROLE(inner) => { + ::abi_encode_raw( + inner, + out, + ) + } + Self::PAUSER_ROLE(inner) => { + ::abi_encode_raw( + inner, + out, + ) + } + Self::bridgeContract(inner) => { + ::abi_encode_raw( + inner, + out, + ) + } + Self::claim(inner) => { + ::abi_encode_raw(inner, out) + } + Self::claimNative(inner) => { + ::abi_encode_raw( + inner, + out, + ) + } + Self::configureToken(inner) => { + ::abi_encode_raw( + inner, + out, + ) + } + Self::deposit(inner) => { + ::abi_encode_raw(inner, out) + } + Self::depositIndex(inner) => { + ::abi_encode_raw( + inner, + out, + ) + } + Self::depositNative(inner) => { + ::abi_encode_raw( + inner, + out, + ) + } + Self::getRoleAdmin(inner) => { + ::abi_encode_raw( + inner, + out, + ) + } + Self::grantRole(inner) => { + ::abi_encode_raw( + inner, + out, + ) + } + Self::hasRole(inner) => { + ::abi_encode_raw(inner, out) + } + Self::migrate(inner) => { + ::abi_encode_raw(inner, out) + } + Self::migratedContract(inner) => { + ::abi_encode_raw( + inner, + out, + ) + } + Self::mirrorTokens(inner) => { + ::abi_encode_raw( + inner, + out, + ) + } + Self::pause(inner) => { + ::abi_encode_raw(inner, out) + } + Self::paused(inner) => { + ::abi_encode_raw(inner, out) + } + Self::podConfig(inner) => { + ::abi_encode_raw( + inner, + out, + ) + } + Self::processedRequests(inner) => { + ::abi_encode_raw( + inner, + out, + ) + } + Self::renounceRole(inner) => { + ::abi_encode_raw( + inner, + out, + ) + } + Self::revokeRole(inner) => { + ::abi_encode_raw( + inner, + out, + ) + } + Self::supportsInterface(inner) => { + ::abi_encode_raw( + inner, + out, + ) + } + Self::tokenData(inner) => { + ::abi_encode_raw( + inner, + out, + ) + } + Self::unpause(inner) => { + ::abi_encode_raw(inner, out) + } + Self::usedNonces(inner) => { + ::abi_encode_raw( + inner, + out, + ) + } + Self::whiteListToken(inner) => { + ::abi_encode_raw( + inner, + out, + ) + } + Self::whitelistedTokens(inner) => { + ::abi_encode_raw( + inner, + out, + ) + } + } + } + } + ///Container for all the [`BridgeDepositWithdraw`](self) custom errors. + #[derive(serde::Serialize, serde::Deserialize)] + #[derive(Debug, PartialEq, Eq, Hash)] + pub enum BridgeDepositWithdrawErrors { + #[allow(missing_docs)] + AccessControlBadConfirmation(AccessControlBadConfirmation), + #[allow(missing_docs)] + AccessControlUnauthorizedAccount(AccessControlUnauthorizedAccount), + #[allow(missing_docs)] + ContractMigrated(ContractMigrated), + #[allow(missing_docs)] + DailyLimitExhausted(DailyLimitExhausted), + #[allow(missing_docs)] + EnforcedPause(EnforcedPause), + #[allow(missing_docs)] + ExpectedPause(ExpectedPause), + #[allow(missing_docs)] + InvalidBridgeContract(InvalidBridgeContract), + #[allow(missing_docs)] + InvalidCertificate(InvalidCertificate), + #[allow(missing_docs)] + InvalidDepositLog(InvalidDepositLog), + #[allow(missing_docs)] + InvalidNonce(InvalidNonce), + #[allow(missing_docs)] + InvalidToAddress(InvalidToAddress), + #[allow(missing_docs)] + InvalidTokenAmount(InvalidTokenAmount), + #[allow(missing_docs)] + InvalidTokenConfig(InvalidTokenConfig), + #[allow(missing_docs)] + MirrorTokenNotFound(MirrorTokenNotFound), + #[allow(missing_docs)] + RequestAlreadyProcessed(RequestAlreadyProcessed), + #[allow(missing_docs)] + SafeERC20FailedOperation(SafeERC20FailedOperation), + } + #[automatically_derived] + impl BridgeDepositWithdrawErrors { + /// All the selectors of this enum. + /// + /// Note that the selectors might not be in the same order as the variants. + /// No guarantees are made about the order of the selectors. + /// + /// Prefer using `SolInterface` methods instead. + pub const SELECTORS: &'static [[u8; 4usize]] = &[ + [7u8, 254u8, 123u8, 174u8], + [29u8, 57u8, 249u8, 70u8], + [33u8, 96u8, 115u8, 57u8], + [63u8, 79u8, 104u8, 150u8], + [82u8, 116u8, 175u8, 231u8], + [102u8, 151u8, 178u8, 50u8], + [102u8, 218u8, 128u8, 55u8], + [117u8, 102u8, 136u8, 254u8], + [138u8, 163u8, 167u8, 47u8], + [141u8, 252u8, 32u8, 43u8], + [166u8, 188u8, 116u8, 196u8], + [168u8, 221u8, 182u8, 77u8], + [189u8, 196u8, 223u8, 114u8], + [193u8, 45u8, 203u8, 194u8], + [217u8, 60u8, 6u8, 101u8], + [226u8, 81u8, 125u8, 63u8], + ]; + } + #[automatically_derived] + impl alloy_sol_types::SolInterface for BridgeDepositWithdrawErrors { + const NAME: &'static str = "BridgeDepositWithdrawErrors"; + const MIN_DATA_LENGTH: usize = 0usize; + const COUNT: usize = 16usize; + #[inline] + fn selector(&self) -> [u8; 4] { + match self { + Self::AccessControlBadConfirmation(_) => { + ::SELECTOR + } + Self::AccessControlUnauthorizedAccount(_) => { + ::SELECTOR + } + Self::ContractMigrated(_) => { + ::SELECTOR + } + Self::DailyLimitExhausted(_) => { + ::SELECTOR + } + Self::EnforcedPause(_) => { + ::SELECTOR + } + Self::ExpectedPause(_) => { + ::SELECTOR + } + Self::InvalidBridgeContract(_) => { + ::SELECTOR + } + Self::InvalidCertificate(_) => { + ::SELECTOR + } + Self::InvalidDepositLog(_) => { + ::SELECTOR + } + Self::InvalidNonce(_) => { + ::SELECTOR + } + Self::InvalidToAddress(_) => { + ::SELECTOR + } + Self::InvalidTokenAmount(_) => { + ::SELECTOR + } + Self::InvalidTokenConfig(_) => { + ::SELECTOR + } + Self::MirrorTokenNotFound(_) => { + ::SELECTOR + } + Self::RequestAlreadyProcessed(_) => { + ::SELECTOR + } + Self::SafeERC20FailedOperation(_) => { + ::SELECTOR + } + } + } + #[inline] + fn selector_at(i: usize) -> ::core::option::Option<[u8; 4]> { + Self::SELECTORS.get(i).copied() + } + #[inline] + fn valid_selector(selector: [u8; 4]) -> bool { + Self::SELECTORS.binary_search(&selector).is_ok() + } + #[inline] + #[allow(non_snake_case)] + fn abi_decode_raw( + selector: [u8; 4], + data: &[u8], + ) -> alloy_sol_types::Result { + static DECODE_SHIMS: &[fn( + &[u8], + ) -> alloy_sol_types::Result] = &[ + { + fn InvalidTokenConfig( + data: &[u8], + ) -> alloy_sol_types::Result { + ::abi_decode_raw( + data, + ) + .map(BridgeDepositWithdrawErrors::InvalidTokenConfig) + } + InvalidTokenConfig + }, + { + fn InvalidCertificate( + data: &[u8], + ) -> alloy_sol_types::Result { + ::abi_decode_raw( + data, + ) + .map(BridgeDepositWithdrawErrors::InvalidCertificate) + } + InvalidCertificate + }, + { + fn InvalidTokenAmount( + data: &[u8], + ) -> alloy_sol_types::Result { + ::abi_decode_raw( + data, + ) + .map(BridgeDepositWithdrawErrors::InvalidTokenAmount) + } + InvalidTokenAmount + }, + { + fn ContractMigrated( + data: &[u8], + ) -> alloy_sol_types::Result { + ::abi_decode_raw( + data, + ) + .map(BridgeDepositWithdrawErrors::ContractMigrated) + } + ContractMigrated + }, + { + fn SafeERC20FailedOperation( + data: &[u8], + ) -> alloy_sol_types::Result { + ::abi_decode_raw( + data, + ) + .map(BridgeDepositWithdrawErrors::SafeERC20FailedOperation) + } + SafeERC20FailedOperation + }, + { + fn AccessControlBadConfirmation( + data: &[u8], + ) -> alloy_sol_types::Result { + ::abi_decode_raw( + data, + ) + .map( + BridgeDepositWithdrawErrors::AccessControlBadConfirmation, + ) + } + AccessControlBadConfirmation + }, + { + fn InvalidBridgeContract( + data: &[u8], + ) -> alloy_sol_types::Result { + ::abi_decode_raw( + data, + ) + .map(BridgeDepositWithdrawErrors::InvalidBridgeContract) + } + InvalidBridgeContract + }, + { + fn InvalidNonce( + data: &[u8], + ) -> alloy_sol_types::Result { + ::abi_decode_raw(data) + .map(BridgeDepositWithdrawErrors::InvalidNonce) + } + InvalidNonce + }, + { + fn InvalidToAddress( + data: &[u8], + ) -> alloy_sol_types::Result { + ::abi_decode_raw( + data, + ) + .map(BridgeDepositWithdrawErrors::InvalidToAddress) + } + InvalidToAddress + }, + { + fn ExpectedPause( + data: &[u8], + ) -> alloy_sol_types::Result { + ::abi_decode_raw( + data, + ) + .map(BridgeDepositWithdrawErrors::ExpectedPause) + } + ExpectedPause + }, + { + fn RequestAlreadyProcessed( + data: &[u8], + ) -> alloy_sol_types::Result { + ::abi_decode_raw( + data, + ) + .map(BridgeDepositWithdrawErrors::RequestAlreadyProcessed) + } + RequestAlreadyProcessed + }, + { + fn MirrorTokenNotFound( + data: &[u8], + ) -> alloy_sol_types::Result { + ::abi_decode_raw( + data, + ) + .map(BridgeDepositWithdrawErrors::MirrorTokenNotFound) + } + MirrorTokenNotFound + }, + { + fn DailyLimitExhausted( + data: &[u8], + ) -> alloy_sol_types::Result { + ::abi_decode_raw( + data, + ) + .map(BridgeDepositWithdrawErrors::DailyLimitExhausted) + } + DailyLimitExhausted + }, + { + fn InvalidDepositLog( + data: &[u8], + ) -> alloy_sol_types::Result { + ::abi_decode_raw( + data, + ) + .map(BridgeDepositWithdrawErrors::InvalidDepositLog) + } + InvalidDepositLog + }, + { + fn EnforcedPause( + data: &[u8], + ) -> alloy_sol_types::Result { + ::abi_decode_raw( + data, + ) + .map(BridgeDepositWithdrawErrors::EnforcedPause) + } + EnforcedPause + }, + { + fn AccessControlUnauthorizedAccount( + data: &[u8], + ) -> alloy_sol_types::Result { + ::abi_decode_raw( + data, + ) + .map( + BridgeDepositWithdrawErrors::AccessControlUnauthorizedAccount, + ) + } + AccessControlUnauthorizedAccount + }, + ]; + let Ok(idx) = Self::SELECTORS.binary_search(&selector) else { + return Err( + alloy_sol_types::Error::unknown_selector( + ::NAME, + selector, + ), + ); + }; + DECODE_SHIMS[idx](data) + } + #[inline] + #[allow(non_snake_case)] + fn abi_decode_raw_validate( + selector: [u8; 4], + data: &[u8], + ) -> alloy_sol_types::Result { + static DECODE_VALIDATE_SHIMS: &[fn( + &[u8], + ) -> alloy_sol_types::Result] = &[ + { + fn InvalidTokenConfig( + data: &[u8], + ) -> alloy_sol_types::Result { + ::abi_decode_raw_validate( + data, + ) + .map(BridgeDepositWithdrawErrors::InvalidTokenConfig) + } + InvalidTokenConfig + }, + { + fn InvalidCertificate( + data: &[u8], + ) -> alloy_sol_types::Result { + ::abi_decode_raw_validate( + data, + ) + .map(BridgeDepositWithdrawErrors::InvalidCertificate) + } + InvalidCertificate + }, + { + fn InvalidTokenAmount( + data: &[u8], + ) -> alloy_sol_types::Result { + ::abi_decode_raw_validate( + data, + ) + .map(BridgeDepositWithdrawErrors::InvalidTokenAmount) + } + InvalidTokenAmount + }, + { + fn ContractMigrated( + data: &[u8], + ) -> alloy_sol_types::Result { + ::abi_decode_raw_validate( + data, + ) + .map(BridgeDepositWithdrawErrors::ContractMigrated) + } + ContractMigrated + }, + { + fn SafeERC20FailedOperation( + data: &[u8], + ) -> alloy_sol_types::Result { + ::abi_decode_raw_validate( + data, + ) + .map(BridgeDepositWithdrawErrors::SafeERC20FailedOperation) + } + SafeERC20FailedOperation + }, + { + fn AccessControlBadConfirmation( + data: &[u8], + ) -> alloy_sol_types::Result { + ::abi_decode_raw_validate( + data, + ) + .map( + BridgeDepositWithdrawErrors::AccessControlBadConfirmation, + ) + } + AccessControlBadConfirmation + }, + { + fn InvalidBridgeContract( + data: &[u8], + ) -> alloy_sol_types::Result { + ::abi_decode_raw_validate( + data, + ) + .map(BridgeDepositWithdrawErrors::InvalidBridgeContract) + } + InvalidBridgeContract + }, + { + fn InvalidNonce( + data: &[u8], + ) -> alloy_sol_types::Result { + ::abi_decode_raw_validate( + data, + ) + .map(BridgeDepositWithdrawErrors::InvalidNonce) + } + InvalidNonce + }, + { + fn InvalidToAddress( + data: &[u8], + ) -> alloy_sol_types::Result { + ::abi_decode_raw_validate( + data, + ) + .map(BridgeDepositWithdrawErrors::InvalidToAddress) + } + InvalidToAddress + }, + { + fn ExpectedPause( + data: &[u8], + ) -> alloy_sol_types::Result { + ::abi_decode_raw_validate( + data, + ) + .map(BridgeDepositWithdrawErrors::ExpectedPause) + } + ExpectedPause + }, + { + fn RequestAlreadyProcessed( + data: &[u8], + ) -> alloy_sol_types::Result { + ::abi_decode_raw_validate( + data, + ) + .map(BridgeDepositWithdrawErrors::RequestAlreadyProcessed) + } + RequestAlreadyProcessed + }, + { + fn MirrorTokenNotFound( + data: &[u8], + ) -> alloy_sol_types::Result { + ::abi_decode_raw_validate( + data, + ) + .map(BridgeDepositWithdrawErrors::MirrorTokenNotFound) + } + MirrorTokenNotFound + }, + { + fn DailyLimitExhausted( + data: &[u8], + ) -> alloy_sol_types::Result { + ::abi_decode_raw_validate( + data, + ) + .map(BridgeDepositWithdrawErrors::DailyLimitExhausted) + } + DailyLimitExhausted + }, + { + fn InvalidDepositLog( + data: &[u8], + ) -> alloy_sol_types::Result { + ::abi_decode_raw_validate( + data, + ) + .map(BridgeDepositWithdrawErrors::InvalidDepositLog) + } + InvalidDepositLog + }, + { + fn EnforcedPause( + data: &[u8], + ) -> alloy_sol_types::Result { + ::abi_decode_raw_validate( + data, + ) + .map(BridgeDepositWithdrawErrors::EnforcedPause) + } + EnforcedPause + }, + { + fn AccessControlUnauthorizedAccount( + data: &[u8], + ) -> alloy_sol_types::Result { + ::abi_decode_raw_validate( + data, + ) + .map( + BridgeDepositWithdrawErrors::AccessControlUnauthorizedAccount, + ) + } + AccessControlUnauthorizedAccount + }, + ]; + let Ok(idx) = Self::SELECTORS.binary_search(&selector) else { + return Err( + alloy_sol_types::Error::unknown_selector( + ::NAME, + selector, + ), + ); + }; + DECODE_VALIDATE_SHIMS[idx](data) + } + #[inline] + fn abi_encoded_size(&self) -> usize { + match self { + Self::AccessControlBadConfirmation(inner) => { + ::abi_encoded_size( + inner, + ) + } + Self::AccessControlUnauthorizedAccount(inner) => { + ::abi_encoded_size( + inner, + ) + } + Self::ContractMigrated(inner) => { + ::abi_encoded_size( + inner, + ) + } + Self::DailyLimitExhausted(inner) => { + ::abi_encoded_size( + inner, + ) + } + Self::EnforcedPause(inner) => { + ::abi_encoded_size(inner) + } + Self::ExpectedPause(inner) => { + ::abi_encoded_size(inner) + } + Self::InvalidBridgeContract(inner) => { + ::abi_encoded_size( + inner, + ) + } + Self::InvalidCertificate(inner) => { + ::abi_encoded_size( + inner, + ) + } + Self::InvalidDepositLog(inner) => { + ::abi_encoded_size( + inner, + ) + } + Self::InvalidNonce(inner) => { + ::abi_encoded_size(inner) + } + Self::InvalidToAddress(inner) => { + ::abi_encoded_size( + inner, + ) + } + Self::InvalidTokenAmount(inner) => { + ::abi_encoded_size( + inner, + ) + } + Self::InvalidTokenConfig(inner) => { + ::abi_encoded_size( + inner, + ) + } + Self::MirrorTokenNotFound(inner) => { + ::abi_encoded_size( + inner, + ) + } + Self::RequestAlreadyProcessed(inner) => { + ::abi_encoded_size( + inner, + ) + } + Self::SafeERC20FailedOperation(inner) => { + ::abi_encoded_size( + inner, + ) + } + } + } + #[inline] + fn abi_encode_raw(&self, out: &mut alloy_sol_types::private::Vec) { + match self { + Self::AccessControlBadConfirmation(inner) => { + ::abi_encode_raw( + inner, + out, + ) + } + Self::AccessControlUnauthorizedAccount(inner) => { + ::abi_encode_raw( + inner, + out, + ) + } + Self::ContractMigrated(inner) => { + ::abi_encode_raw( + inner, + out, + ) + } + Self::DailyLimitExhausted(inner) => { + ::abi_encode_raw( + inner, + out, + ) + } + Self::EnforcedPause(inner) => { + ::abi_encode_raw( + inner, + out, + ) + } + Self::ExpectedPause(inner) => { + ::abi_encode_raw( + inner, + out, + ) + } + Self::InvalidBridgeContract(inner) => { + ::abi_encode_raw( + inner, + out, + ) + } + Self::InvalidCertificate(inner) => { + ::abi_encode_raw( + inner, + out, + ) + } + Self::InvalidDepositLog(inner) => { + ::abi_encode_raw( + inner, + out, + ) + } + Self::InvalidNonce(inner) => { + ::abi_encode_raw( + inner, + out, + ) + } + Self::InvalidToAddress(inner) => { + ::abi_encode_raw( + inner, + out, + ) + } + Self::InvalidTokenAmount(inner) => { + ::abi_encode_raw( + inner, + out, + ) + } + Self::InvalidTokenConfig(inner) => { + ::abi_encode_raw( + inner, + out, + ) + } + Self::MirrorTokenNotFound(inner) => { + ::abi_encode_raw( + inner, + out, + ) + } + Self::RequestAlreadyProcessed(inner) => { + ::abi_encode_raw( + inner, + out, + ) + } + Self::SafeERC20FailedOperation(inner) => { + ::abi_encode_raw( + inner, + out, + ) + } + } + } + } + ///Container for all the [`BridgeDepositWithdraw`](self) events. + #[derive(serde::Serialize, serde::Deserialize)] + #[derive(Debug, PartialEq, Eq, Hash)] + pub enum BridgeDepositWithdrawEvents { + #[allow(missing_docs)] + Claim(Claim), + #[allow(missing_docs)] + ClaimNative(ClaimNative), + #[allow(missing_docs)] + Deposit(Deposit), + #[allow(missing_docs)] + DepositNative(DepositNative), + #[allow(missing_docs)] + Paused(Paused), + #[allow(missing_docs)] + RoleAdminChanged(RoleAdminChanged), + #[allow(missing_docs)] + RoleGranted(RoleGranted), + #[allow(missing_docs)] + RoleRevoked(RoleRevoked), + #[allow(missing_docs)] + Unpaused(Unpaused), + } + #[automatically_derived] + impl BridgeDepositWithdrawEvents { + /// All the selectors of this enum. + /// + /// Note that the selectors might not be in the same order as the variants. + /// No guarantees are made about the order of the selectors. + /// + /// Prefer using `SolInterface` methods instead. + pub const SELECTORS: &'static [[u8; 32usize]] = &[ + [ + 5u8, 229u8, 127u8, 166u8, 45u8, 137u8, 6u8, 3u8, 216u8, 89u8, 68u8, + 201u8, 99u8, 221u8, 199u8, 251u8, 231u8, 124u8, 222u8, 94u8, 166u8, + 156u8, 173u8, 112u8, 51u8, 252u8, 111u8, 118u8, 183u8, 221u8, 210u8, + 171u8, + ], + [ + 47u8, 135u8, 136u8, 17u8, 126u8, 126u8, 255u8, 29u8, 130u8, 233u8, 38u8, + 236u8, 121u8, 73u8, 1u8, 209u8, 124u8, 120u8, 2u8, 74u8, 80u8, 39u8, 9u8, + 64u8, 48u8, 69u8, 64u8, 167u8, 51u8, 101u8, 111u8, 13u8, + ], + [ + 64u8, 53u8, 43u8, 99u8, 208u8, 169u8, 201u8, 41u8, 131u8, 252u8, 241u8, + 157u8, 140u8, 63u8, 194u8, 140u8, 160u8, 188u8, 200u8, 250u8, 159u8, + 254u8, 181u8, 190u8, 40u8, 225u8, 74u8, 63u8, 117u8, 138u8, 179u8, 158u8, + ], + [ + 93u8, 185u8, 238u8, 10u8, 73u8, 91u8, 242u8, 230u8, 255u8, 156u8, 145u8, + 167u8, 131u8, 76u8, 27u8, 164u8, 253u8, 210u8, 68u8, 165u8, 232u8, 170u8, + 78u8, 83u8, 123u8, 211u8, 138u8, 234u8, 228u8, 176u8, 115u8, 170u8, + ], + [ + 98u8, 231u8, 140u8, 234u8, 1u8, 190u8, 227u8, 32u8, 205u8, 78u8, 66u8, + 2u8, 112u8, 181u8, 234u8, 116u8, 0u8, 13u8, 17u8, 176u8, 201u8, 247u8, + 71u8, 84u8, 235u8, 219u8, 252u8, 84u8, 75u8, 5u8, 162u8, 88u8, + ], + [ + 145u8, 49u8, 104u8, 218u8, 7u8, 195u8, 247u8, 245u8, 243u8, 197u8, 35u8, + 147u8, 51u8, 22u8, 50u8, 139u8, 13u8, 6u8, 17u8, 182u8, 39u8, 241u8, + 46u8, 177u8, 28u8, 34u8, 202u8, 68u8, 251u8, 177u8, 157u8, 198u8, + ], + [ + 175u8, 63u8, 26u8, 18u8, 52u8, 75u8, 190u8, 170u8, 185u8, 84u8, 212u8, + 18u8, 232u8, 33u8, 214u8, 182u8, 160u8, 109u8, 92u8, 213u8, 210u8, 123u8, + 226u8, 4u8, 53u8, 59u8, 212u8, 234u8, 155u8, 85u8, 165u8, 4u8, + ], + [ + 189u8, 121u8, 184u8, 111u8, 254u8, 10u8, 184u8, 232u8, 119u8, 97u8, 81u8, + 81u8, 66u8, 23u8, 205u8, 124u8, 172u8, 213u8, 44u8, 144u8, 159u8, 102u8, + 71u8, 92u8, 58u8, 244u8, 78u8, 18u8, 159u8, 11u8, 0u8, 255u8, + ], + [ + 246u8, 57u8, 31u8, 92u8, 50u8, 217u8, 198u8, 157u8, 42u8, 71u8, 234u8, + 103u8, 11u8, 68u8, 41u8, 116u8, 181u8, 57u8, 53u8, 209u8, 237u8, 199u8, + 253u8, 100u8, 235u8, 33u8, 224u8, 71u8, 168u8, 57u8, 23u8, 27u8, + ], + ]; + } + #[automatically_derived] + impl alloy_sol_types::SolEventInterface for BridgeDepositWithdrawEvents { + const NAME: &'static str = "BridgeDepositWithdrawEvents"; + const COUNT: usize = 9usize; + fn decode_raw_log( + topics: &[alloy_sol_types::Word], + data: &[u8], + ) -> alloy_sol_types::Result { + match topics.first().copied() { + Some(::SIGNATURE_HASH) => { + ::decode_raw_log(topics, data) + .map(Self::Claim) + } + Some(::SIGNATURE_HASH) => { + ::decode_raw_log( + topics, + data, + ) + .map(Self::ClaimNative) + } + Some(::SIGNATURE_HASH) => { + ::decode_raw_log(topics, data) + .map(Self::Deposit) + } + Some(::SIGNATURE_HASH) => { + ::decode_raw_log( + topics, + data, + ) + .map(Self::DepositNative) + } + Some(::SIGNATURE_HASH) => { + ::decode_raw_log(topics, data) + .map(Self::Paused) + } + Some(::SIGNATURE_HASH) => { + ::decode_raw_log( + topics, + data, + ) + .map(Self::RoleAdminChanged) + } + Some(::SIGNATURE_HASH) => { + ::decode_raw_log( + topics, + data, + ) + .map(Self::RoleGranted) + } + Some(::SIGNATURE_HASH) => { + ::decode_raw_log( + topics, + data, + ) + .map(Self::RoleRevoked) + } + Some(::SIGNATURE_HASH) => { + ::decode_raw_log(topics, data) + .map(Self::Unpaused) + } + _ => { + alloy_sol_types::private::Err(alloy_sol_types::Error::InvalidLog { + name: ::NAME, + log: alloy_sol_types::private::Box::new( + alloy_sol_types::private::LogData::new_unchecked( + topics.to_vec(), + data.to_vec().into(), + ), + ), + }) + } + } + } + } + #[automatically_derived] + impl alloy_sol_types::private::IntoLogData for BridgeDepositWithdrawEvents { + fn to_log_data(&self) -> alloy_sol_types::private::LogData { + match self { + Self::Claim(inner) => { + alloy_sol_types::private::IntoLogData::to_log_data(inner) + } + Self::ClaimNative(inner) => { + alloy_sol_types::private::IntoLogData::to_log_data(inner) + } + Self::Deposit(inner) => { + alloy_sol_types::private::IntoLogData::to_log_data(inner) + } + Self::DepositNative(inner) => { + alloy_sol_types::private::IntoLogData::to_log_data(inner) + } + Self::Paused(inner) => { + alloy_sol_types::private::IntoLogData::to_log_data(inner) + } + Self::RoleAdminChanged(inner) => { + alloy_sol_types::private::IntoLogData::to_log_data(inner) + } + Self::RoleGranted(inner) => { + alloy_sol_types::private::IntoLogData::to_log_data(inner) + } + Self::RoleRevoked(inner) => { + alloy_sol_types::private::IntoLogData::to_log_data(inner) + } + Self::Unpaused(inner) => { + alloy_sol_types::private::IntoLogData::to_log_data(inner) + } + } + } + fn into_log_data(self) -> alloy_sol_types::private::LogData { + match self { + Self::Claim(inner) => { + alloy_sol_types::private::IntoLogData::into_log_data(inner) + } + Self::ClaimNative(inner) => { + alloy_sol_types::private::IntoLogData::into_log_data(inner) + } + Self::Deposit(inner) => { + alloy_sol_types::private::IntoLogData::into_log_data(inner) + } + Self::DepositNative(inner) => { + alloy_sol_types::private::IntoLogData::into_log_data(inner) + } + Self::Paused(inner) => { + alloy_sol_types::private::IntoLogData::into_log_data(inner) + } + Self::RoleAdminChanged(inner) => { + alloy_sol_types::private::IntoLogData::into_log_data(inner) + } + Self::RoleGranted(inner) => { + alloy_sol_types::private::IntoLogData::into_log_data(inner) + } + Self::RoleRevoked(inner) => { + alloy_sol_types::private::IntoLogData::into_log_data(inner) + } + Self::Unpaused(inner) => { + alloy_sol_types::private::IntoLogData::into_log_data(inner) + } + } + } + } + use alloy::contract as alloy_contract; + /**Creates a new wrapper around an on-chain [`BridgeDepositWithdraw`](self) contract instance. + +See the [wrapper's documentation](`BridgeDepositWithdrawInstance`) for more details.*/ + #[inline] + pub const fn new< + P: alloy_contract::private::Provider, + N: alloy_contract::private::Network, + >( + address: alloy_sol_types::private::Address, + provider: P, + ) -> BridgeDepositWithdrawInstance { + BridgeDepositWithdrawInstance::::new(address, provider) + } + /**A [`BridgeDepositWithdraw`](self) instance. + +Contains type-safe methods for interacting with an on-chain instance of the +[`BridgeDepositWithdraw`](self) contract located at a given `address`, using a given +provider `P`. + +If the contract bytecode is available (see the [`sol!`](alloy_sol_types::sol!) +documentation on how to provide it), the `deploy` and `deploy_builder` methods can +be used to deploy a new instance of the contract. + +See the [module-level documentation](self) for all the available methods.*/ + #[derive(Clone)] + pub struct BridgeDepositWithdrawInstance { + address: alloy_sol_types::private::Address, + provider: P, + _network: ::core::marker::PhantomData, + } + #[automatically_derived] + impl ::core::fmt::Debug for BridgeDepositWithdrawInstance { + #[inline] + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { + f.debug_tuple("BridgeDepositWithdrawInstance").field(&self.address).finish() + } + } + /// Instantiation and getters/setters. + #[automatically_derived] + impl< + P: alloy_contract::private::Provider, + N: alloy_contract::private::Network, + > BridgeDepositWithdrawInstance { + /**Creates a new wrapper around an on-chain [`BridgeDepositWithdraw`](self) contract instance. + +See the [wrapper's documentation](`BridgeDepositWithdrawInstance`) for more details.*/ + #[inline] + pub const fn new( + address: alloy_sol_types::private::Address, + provider: P, + ) -> Self { + Self { + address, + provider, + _network: ::core::marker::PhantomData, + } + } + /// Returns a reference to the address. + #[inline] + pub const fn address(&self) -> &alloy_sol_types::private::Address { + &self.address + } + /// Sets the address. + #[inline] + pub fn set_address(&mut self, address: alloy_sol_types::private::Address) { + self.address = address; + } + /// Sets the address and returns `self`. + pub fn at(mut self, address: alloy_sol_types::private::Address) -> Self { + self.set_address(address); + self + } + /// Returns a reference to the provider. + #[inline] + pub const fn provider(&self) -> &P { + &self.provider + } + } + impl BridgeDepositWithdrawInstance<&P, N> { + /// Clones the provider and returns a new instance with the cloned provider. + #[inline] + pub fn with_cloned_provider(self) -> BridgeDepositWithdrawInstance { + BridgeDepositWithdrawInstance { + address: self.address, + provider: ::core::clone::Clone::clone(&self.provider), + _network: ::core::marker::PhantomData, + } + } + } + /// Function calls. + #[automatically_derived] + impl< + P: alloy_contract::private::Provider, + N: alloy_contract::private::Network, + > BridgeDepositWithdrawInstance { + /// Creates a new call builder using this contract instance's provider and address. + /// + /// Note that the call can be any function call, not just those defined in this + /// contract. Prefer using the other methods for building type-safe contract calls. + pub fn call_builder( + &self, + call: &C, + ) -> alloy_contract::SolCallBuilder<&P, C, N> { + alloy_contract::SolCallBuilder::new_sol(&self.provider, &self.address, call) + } + ///Creates a new call builder for the [`DEFAULT_ADMIN_ROLE`] function. + pub fn DEFAULT_ADMIN_ROLE( + &self, + ) -> alloy_contract::SolCallBuilder<&P, DEFAULT_ADMIN_ROLECall, N> { + self.call_builder(&DEFAULT_ADMIN_ROLECall) + } + ///Creates a new call builder for the [`PAUSER_ROLE`] function. + pub fn PAUSER_ROLE( + &self, + ) -> alloy_contract::SolCallBuilder<&P, PAUSER_ROLECall, N> { + self.call_builder(&PAUSER_ROLECall) + } + ///Creates a new call builder for the [`bridgeContract`] function. + pub fn bridgeContract( + &self, + ) -> alloy_contract::SolCallBuilder<&P, bridgeContractCall, N> { + self.call_builder(&bridgeContractCall) + } + ///Creates a new call builder for the [`claim`] function. + pub fn claim( + &self, + certifiedLog: ::RustType, + ) -> alloy_contract::SolCallBuilder<&P, claimCall, N> { + self.call_builder(&claimCall { certifiedLog }) + } + ///Creates a new call builder for the [`claimNative`] function. + pub fn claimNative( + &self, + certifiedLog: ::RustType, + ) -> alloy_contract::SolCallBuilder<&P, claimNativeCall, N> { + self.call_builder(&claimNativeCall { certifiedLog }) + } + ///Creates a new call builder for the [`configureToken`] function. + pub fn configureToken( + &self, + token: alloy::sol_types::private::Address, + limits: ::RustType, + ) -> alloy_contract::SolCallBuilder<&P, configureTokenCall, N> { + self.call_builder( + &configureTokenCall { + token, + limits, + }, + ) + } + ///Creates a new call builder for the [`deposit`] function. + pub fn deposit( + &self, + token: alloy::sol_types::private::Address, + amount: alloy::sol_types::private::primitives::aliases::U256, + to: alloy::sol_types::private::Address, + ) -> alloy_contract::SolCallBuilder<&P, depositCall, N> { + self.call_builder(&depositCall { token, amount, to }) + } + ///Creates a new call builder for the [`depositIndex`] function. + pub fn depositIndex( + &self, + ) -> alloy_contract::SolCallBuilder<&P, depositIndexCall, N> { + self.call_builder(&depositIndexCall) + } + ///Creates a new call builder for the [`depositNative`] function. + pub fn depositNative( + &self, + to: alloy::sol_types::private::Address, + ) -> alloy_contract::SolCallBuilder<&P, depositNativeCall, N> { + self.call_builder(&depositNativeCall { to }) + } + ///Creates a new call builder for the [`getRoleAdmin`] function. + pub fn getRoleAdmin( + &self, + role: alloy::sol_types::private::FixedBytes<32>, + ) -> alloy_contract::SolCallBuilder<&P, getRoleAdminCall, N> { + self.call_builder(&getRoleAdminCall { role }) + } + ///Creates a new call builder for the [`grantRole`] function. + pub fn grantRole( + &self, + role: alloy::sol_types::private::FixedBytes<32>, + account: alloy::sol_types::private::Address, + ) -> alloy_contract::SolCallBuilder<&P, grantRoleCall, N> { + self.call_builder(&grantRoleCall { role, account }) + } + ///Creates a new call builder for the [`hasRole`] function. + pub fn hasRole( + &self, + role: alloy::sol_types::private::FixedBytes<32>, + account: alloy::sol_types::private::Address, + ) -> alloy_contract::SolCallBuilder<&P, hasRoleCall, N> { + self.call_builder(&hasRoleCall { role, account }) + } + ///Creates a new call builder for the [`migrate`] function. + pub fn migrate( + &self, + _newContract: alloy::sol_types::private::Address, + ) -> alloy_contract::SolCallBuilder<&P, migrateCall, N> { + self.call_builder(&migrateCall { _newContract }) + } + ///Creates a new call builder for the [`migratedContract`] function. + pub fn migratedContract( + &self, + ) -> alloy_contract::SolCallBuilder<&P, migratedContractCall, N> { + self.call_builder(&migratedContractCall) + } + ///Creates a new call builder for the [`mirrorTokens`] function. + pub fn mirrorTokens( + &self, + _0: alloy::sol_types::private::Address, + ) -> alloy_contract::SolCallBuilder<&P, mirrorTokensCall, N> { + self.call_builder(&mirrorTokensCall(_0)) + } + ///Creates a new call builder for the [`pause`] function. + pub fn pause(&self) -> alloy_contract::SolCallBuilder<&P, pauseCall, N> { + self.call_builder(&pauseCall) + } + ///Creates a new call builder for the [`paused`] function. + pub fn paused(&self) -> alloy_contract::SolCallBuilder<&P, pausedCall, N> { + self.call_builder(&pausedCall) + } + ///Creates a new call builder for the [`podConfig`] function. + pub fn podConfig(&self) -> alloy_contract::SolCallBuilder<&P, podConfigCall, N> { + self.call_builder(&podConfigCall) + } + ///Creates a new call builder for the [`processedRequests`] function. + pub fn processedRequests( + &self, + _0: alloy::sol_types::private::FixedBytes<32>, + ) -> alloy_contract::SolCallBuilder<&P, processedRequestsCall, N> { + self.call_builder(&processedRequestsCall(_0)) + } + ///Creates a new call builder for the [`renounceRole`] function. + pub fn renounceRole( + &self, + role: alloy::sol_types::private::FixedBytes<32>, + callerConfirmation: alloy::sol_types::private::Address, + ) -> alloy_contract::SolCallBuilder<&P, renounceRoleCall, N> { + self.call_builder( + &renounceRoleCall { + role, + callerConfirmation, + }, + ) + } + ///Creates a new call builder for the [`revokeRole`] function. + pub fn revokeRole( + &self, + role: alloy::sol_types::private::FixedBytes<32>, + account: alloy::sol_types::private::Address, + ) -> alloy_contract::SolCallBuilder<&P, revokeRoleCall, N> { + self.call_builder(&revokeRoleCall { role, account }) + } + ///Creates a new call builder for the [`supportsInterface`] function. + pub fn supportsInterface( + &self, + interfaceId: alloy::sol_types::private::FixedBytes<4>, + ) -> alloy_contract::SolCallBuilder<&P, supportsInterfaceCall, N> { + self.call_builder( + &supportsInterfaceCall { + interfaceId, + }, + ) + } + ///Creates a new call builder for the [`tokenData`] function. + pub fn tokenData( + &self, + _0: alloy::sol_types::private::Address, + ) -> alloy_contract::SolCallBuilder<&P, tokenDataCall, N> { + self.call_builder(&tokenDataCall(_0)) + } + ///Creates a new call builder for the [`unpause`] function. + pub fn unpause(&self) -> alloy_contract::SolCallBuilder<&P, unpauseCall, N> { + self.call_builder(&unpauseCall) + } + ///Creates a new call builder for the [`usedNonces`] function. + pub fn usedNonces( + &self, + _0: alloy::sol_types::private::primitives::aliases::U256, + ) -> alloy_contract::SolCallBuilder<&P, usedNoncesCall, N> { + self.call_builder(&usedNoncesCall(_0)) + } + ///Creates a new call builder for the [`whiteListToken`] function. + pub fn whiteListToken( + &self, + token: alloy::sol_types::private::Address, + mirrorToken: alloy::sol_types::private::Address, + limits: ::RustType, + ) -> alloy_contract::SolCallBuilder<&P, whiteListTokenCall, N> { + self.call_builder( + &whiteListTokenCall { + token, + mirrorToken, + limits, + }, + ) + } + ///Creates a new call builder for the [`whitelistedTokens`] function. + pub fn whitelistedTokens( + &self, + _0: alloy::sol_types::private::primitives::aliases::U256, + ) -> alloy_contract::SolCallBuilder<&P, whitelistedTokensCall, N> { + self.call_builder(&whitelistedTokensCall(_0)) + } + } + /// Event filters. + #[automatically_derived] + impl< + P: alloy_contract::private::Provider, + N: alloy_contract::private::Network, + > BridgeDepositWithdrawInstance { + /// Creates a new event filter using this contract instance's provider and address. + /// + /// Note that the type can be any event, not just those defined in this contract. + /// Prefer using the other methods for building type-safe event filters. + pub fn event_filter( + &self, + ) -> alloy_contract::Event<&P, E, N> { + alloy_contract::Event::new_sol(&self.provider, &self.address) + } + ///Creates a new event filter for the [`Claim`] event. + pub fn Claim_filter(&self) -> alloy_contract::Event<&P, Claim, N> { + self.event_filter::() + } + ///Creates a new event filter for the [`ClaimNative`] event. + pub fn ClaimNative_filter(&self) -> alloy_contract::Event<&P, ClaimNative, N> { + self.event_filter::() + } + ///Creates a new event filter for the [`Deposit`] event. + pub fn Deposit_filter(&self) -> alloy_contract::Event<&P, Deposit, N> { + self.event_filter::() + } + ///Creates a new event filter for the [`DepositNative`] event. + pub fn DepositNative_filter( + &self, + ) -> alloy_contract::Event<&P, DepositNative, N> { + self.event_filter::() + } + ///Creates a new event filter for the [`Paused`] event. + pub fn Paused_filter(&self) -> alloy_contract::Event<&P, Paused, N> { + self.event_filter::() + } + ///Creates a new event filter for the [`RoleAdminChanged`] event. + pub fn RoleAdminChanged_filter( + &self, + ) -> alloy_contract::Event<&P, RoleAdminChanged, N> { + self.event_filter::() + } + ///Creates a new event filter for the [`RoleGranted`] event. + pub fn RoleGranted_filter(&self) -> alloy_contract::Event<&P, RoleGranted, N> { + self.event_filter::() + } + ///Creates a new event filter for the [`RoleRevoked`] event. + pub fn RoleRevoked_filter(&self) -> alloy_contract::Event<&P, RoleRevoked, N> { + self.event_filter::() + } + ///Creates a new event filter for the [`Unpaused`] event. + pub fn Unpaused_filter(&self) -> alloy_contract::Event<&P, Unpaused, N> { + self.event_filter::() + } + } +} diff --git a/protocol/bindings/src/bridge_mint_burn.rs b/protocol/bindings/src/bridge_mint_burn.rs new file mode 100644 index 00000000..96082f93 --- /dev/null +++ b/protocol/bindings/src/bridge_mint_burn.rs @@ -0,0 +1,10393 @@ +///Module containing a contract's types and functions. +/** + +```solidity +library IBridge { + struct TokenLimits { uint256 minAmount; uint256 deposit; uint256 claim; } + struct TokenUsage { uint256 consumed; uint256 lastUpdated; } +} +```*/ +#[allow( + non_camel_case_types, + non_snake_case, + clippy::pub_underscore_fields, + clippy::style, + clippy::empty_structs_with_brackets +)] +pub mod IBridge { + use super::*; + use alloy::sol_types as alloy_sol_types; + #[derive(serde::Serialize, serde::Deserialize)] + #[derive(Default, Debug, PartialEq, Eq, Hash)] + /**```solidity +struct TokenLimits { uint256 minAmount; uint256 deposit; uint256 claim; } +```*/ + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] + #[derive(Clone)] + pub struct TokenLimits { + #[allow(missing_docs)] + pub minAmount: alloy::sol_types::private::primitives::aliases::U256, + #[allow(missing_docs)] + pub deposit: alloy::sol_types::private::primitives::aliases::U256, + #[allow(missing_docs)] + pub claim: alloy::sol_types::private::primitives::aliases::U256, + } + #[allow( + non_camel_case_types, + non_snake_case, + clippy::pub_underscore_fields, + clippy::style + )] + const _: () = { + use alloy::sol_types as alloy_sol_types; + #[doc(hidden)] + type UnderlyingSolTuple<'a> = ( + alloy::sol_types::sol_data::Uint<256>, + alloy::sol_types::sol_data::Uint<256>, + alloy::sol_types::sol_data::Uint<256>, + ); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = ( + alloy::sol_types::private::primitives::aliases::U256, + alloy::sol_types::private::primitives::aliases::U256, + alloy::sol_types::private::primitives::aliases::U256, + ); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: TokenLimits) -> Self { + (value.minAmount, value.deposit, value.claim) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for TokenLimits { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { + minAmount: tuple.0, + deposit: tuple.1, + claim: tuple.2, + } + } + } + #[automatically_derived] + impl alloy_sol_types::SolValue for TokenLimits { + type SolType = Self; + } + #[automatically_derived] + impl alloy_sol_types::private::SolTypeValue for TokenLimits { + #[inline] + fn stv_to_tokens(&self) -> ::Token<'_> { + ( + as alloy_sol_types::SolType>::tokenize(&self.minAmount), + as alloy_sol_types::SolType>::tokenize(&self.deposit), + as alloy_sol_types::SolType>::tokenize(&self.claim), + ) + } + #[inline] + fn stv_abi_encoded_size(&self) -> usize { + if let Some(size) = ::ENCODED_SIZE { + return size; + } + let tuple = as ::core::convert::From>::from(self.clone()); + as alloy_sol_types::SolType>::abi_encoded_size(&tuple) + } + #[inline] + fn stv_eip712_data_word(&self) -> alloy_sol_types::Word { + ::eip712_hash_struct(self) + } + #[inline] + fn stv_abi_encode_packed_to( + &self, + out: &mut alloy_sol_types::private::Vec, + ) { + let tuple = as ::core::convert::From>::from(self.clone()); + as alloy_sol_types::SolType>::abi_encode_packed_to(&tuple, out) + } + #[inline] + fn stv_abi_packed_encoded_size(&self) -> usize { + if let Some(size) = ::PACKED_ENCODED_SIZE { + return size; + } + let tuple = as ::core::convert::From>::from(self.clone()); + as alloy_sol_types::SolType>::abi_packed_encoded_size(&tuple) + } + } + #[automatically_derived] + impl alloy_sol_types::SolType for TokenLimits { + type RustType = Self; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SOL_NAME: &'static str = ::NAME; + const ENCODED_SIZE: Option = as alloy_sol_types::SolType>::ENCODED_SIZE; + const PACKED_ENCODED_SIZE: Option = as alloy_sol_types::SolType>::PACKED_ENCODED_SIZE; + #[inline] + fn valid_token(token: &Self::Token<'_>) -> bool { + as alloy_sol_types::SolType>::valid_token(token) + } + #[inline] + fn detokenize(token: Self::Token<'_>) -> Self::RustType { + let tuple = as alloy_sol_types::SolType>::detokenize(token); + >>::from(tuple) + } + } + #[automatically_derived] + impl alloy_sol_types::SolStruct for TokenLimits { + const NAME: &'static str = "TokenLimits"; + #[inline] + fn eip712_root_type() -> alloy_sol_types::private::Cow<'static, str> { + alloy_sol_types::private::Cow::Borrowed( + "TokenLimits(uint256 minAmount,uint256 deposit,uint256 claim)", + ) + } + #[inline] + fn eip712_components() -> alloy_sol_types::private::Vec< + alloy_sol_types::private::Cow<'static, str>, + > { + alloy_sol_types::private::Vec::new() + } + #[inline] + fn eip712_encode_type() -> alloy_sol_types::private::Cow<'static, str> { + ::eip712_root_type() + } + #[inline] + fn eip712_encode_data(&self) -> alloy_sol_types::private::Vec { + [ + as alloy_sol_types::SolType>::eip712_data_word(&self.minAmount) + .0, + as alloy_sol_types::SolType>::eip712_data_word(&self.deposit) + .0, + as alloy_sol_types::SolType>::eip712_data_word(&self.claim) + .0, + ] + .concat() + } + } + #[automatically_derived] + impl alloy_sol_types::EventTopic for TokenLimits { + #[inline] + fn topic_preimage_length(rust: &Self::RustType) -> usize { + 0usize + + as alloy_sol_types::EventTopic>::topic_preimage_length( + &rust.minAmount, + ) + + as alloy_sol_types::EventTopic>::topic_preimage_length( + &rust.deposit, + ) + + as alloy_sol_types::EventTopic>::topic_preimage_length(&rust.claim) + } + #[inline] + fn encode_topic_preimage( + rust: &Self::RustType, + out: &mut alloy_sol_types::private::Vec, + ) { + out.reserve( + ::topic_preimage_length(rust), + ); + as alloy_sol_types::EventTopic>::encode_topic_preimage( + &rust.minAmount, + out, + ); + as alloy_sol_types::EventTopic>::encode_topic_preimage( + &rust.deposit, + out, + ); + as alloy_sol_types::EventTopic>::encode_topic_preimage( + &rust.claim, + out, + ); + } + #[inline] + fn encode_topic( + rust: &Self::RustType, + ) -> alloy_sol_types::abi::token::WordToken { + let mut out = alloy_sol_types::private::Vec::new(); + ::encode_topic_preimage( + rust, + &mut out, + ); + alloy_sol_types::abi::token::WordToken( + alloy_sol_types::private::keccak256(out), + ) + } + } + }; + #[derive(serde::Serialize, serde::Deserialize)] + #[derive(Default, Debug, PartialEq, Eq, Hash)] + /**```solidity +struct TokenUsage { uint256 consumed; uint256 lastUpdated; } +```*/ + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] + #[derive(Clone)] + pub struct TokenUsage { + #[allow(missing_docs)] + pub consumed: alloy::sol_types::private::primitives::aliases::U256, + #[allow(missing_docs)] + pub lastUpdated: alloy::sol_types::private::primitives::aliases::U256, + } + #[allow( + non_camel_case_types, + non_snake_case, + clippy::pub_underscore_fields, + clippy::style + )] + const _: () = { + use alloy::sol_types as alloy_sol_types; + #[doc(hidden)] + type UnderlyingSolTuple<'a> = ( + alloy::sol_types::sol_data::Uint<256>, + alloy::sol_types::sol_data::Uint<256>, + ); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = ( + alloy::sol_types::private::primitives::aliases::U256, + alloy::sol_types::private::primitives::aliases::U256, + ); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: TokenUsage) -> Self { + (value.consumed, value.lastUpdated) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for TokenUsage { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { + consumed: tuple.0, + lastUpdated: tuple.1, + } + } + } + #[automatically_derived] + impl alloy_sol_types::SolValue for TokenUsage { + type SolType = Self; + } + #[automatically_derived] + impl alloy_sol_types::private::SolTypeValue for TokenUsage { + #[inline] + fn stv_to_tokens(&self) -> ::Token<'_> { + ( + as alloy_sol_types::SolType>::tokenize(&self.consumed), + as alloy_sol_types::SolType>::tokenize(&self.lastUpdated), + ) + } + #[inline] + fn stv_abi_encoded_size(&self) -> usize { + if let Some(size) = ::ENCODED_SIZE { + return size; + } + let tuple = as ::core::convert::From>::from(self.clone()); + as alloy_sol_types::SolType>::abi_encoded_size(&tuple) + } + #[inline] + fn stv_eip712_data_word(&self) -> alloy_sol_types::Word { + ::eip712_hash_struct(self) + } + #[inline] + fn stv_abi_encode_packed_to( + &self, + out: &mut alloy_sol_types::private::Vec, + ) { + let tuple = as ::core::convert::From>::from(self.clone()); + as alloy_sol_types::SolType>::abi_encode_packed_to(&tuple, out) + } + #[inline] + fn stv_abi_packed_encoded_size(&self) -> usize { + if let Some(size) = ::PACKED_ENCODED_SIZE { + return size; + } + let tuple = as ::core::convert::From>::from(self.clone()); + as alloy_sol_types::SolType>::abi_packed_encoded_size(&tuple) + } + } + #[automatically_derived] + impl alloy_sol_types::SolType for TokenUsage { + type RustType = Self; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SOL_NAME: &'static str = ::NAME; + const ENCODED_SIZE: Option = as alloy_sol_types::SolType>::ENCODED_SIZE; + const PACKED_ENCODED_SIZE: Option = as alloy_sol_types::SolType>::PACKED_ENCODED_SIZE; + #[inline] + fn valid_token(token: &Self::Token<'_>) -> bool { + as alloy_sol_types::SolType>::valid_token(token) + } + #[inline] + fn detokenize(token: Self::Token<'_>) -> Self::RustType { + let tuple = as alloy_sol_types::SolType>::detokenize(token); + >>::from(tuple) + } + } + #[automatically_derived] + impl alloy_sol_types::SolStruct for TokenUsage { + const NAME: &'static str = "TokenUsage"; + #[inline] + fn eip712_root_type() -> alloy_sol_types::private::Cow<'static, str> { + alloy_sol_types::private::Cow::Borrowed( + "TokenUsage(uint256 consumed,uint256 lastUpdated)", + ) + } + #[inline] + fn eip712_components() -> alloy_sol_types::private::Vec< + alloy_sol_types::private::Cow<'static, str>, + > { + alloy_sol_types::private::Vec::new() + } + #[inline] + fn eip712_encode_type() -> alloy_sol_types::private::Cow<'static, str> { + ::eip712_root_type() + } + #[inline] + fn eip712_encode_data(&self) -> alloy_sol_types::private::Vec { + [ + as alloy_sol_types::SolType>::eip712_data_word(&self.consumed) + .0, + as alloy_sol_types::SolType>::eip712_data_word(&self.lastUpdated) + .0, + ] + .concat() + } + } + #[automatically_derived] + impl alloy_sol_types::EventTopic for TokenUsage { + #[inline] + fn topic_preimage_length(rust: &Self::RustType) -> usize { + 0usize + + as alloy_sol_types::EventTopic>::topic_preimage_length( + &rust.consumed, + ) + + as alloy_sol_types::EventTopic>::topic_preimage_length( + &rust.lastUpdated, + ) + } + #[inline] + fn encode_topic_preimage( + rust: &Self::RustType, + out: &mut alloy_sol_types::private::Vec, + ) { + out.reserve( + ::topic_preimage_length(rust), + ); + as alloy_sol_types::EventTopic>::encode_topic_preimage( + &rust.consumed, + out, + ); + as alloy_sol_types::EventTopic>::encode_topic_preimage( + &rust.lastUpdated, + out, + ); + } + #[inline] + fn encode_topic( + rust: &Self::RustType, + ) -> alloy_sol_types::abi::token::WordToken { + let mut out = alloy_sol_types::private::Vec::new(); + ::encode_topic_preimage( + rust, + &mut out, + ); + alloy_sol_types::abi::token::WordToken( + alloy_sol_types::private::keccak256(out), + ) + } + } + }; + use alloy::contract as alloy_contract; + /**Creates a new wrapper around an on-chain [`IBridge`](self) contract instance. + +See the [wrapper's documentation](`IBridgeInstance`) for more details.*/ + #[inline] + pub const fn new< + P: alloy_contract::private::Provider, + N: alloy_contract::private::Network, + >(address: alloy_sol_types::private::Address, provider: P) -> IBridgeInstance { + IBridgeInstance::::new(address, provider) + } + /**A [`IBridge`](self) instance. + +Contains type-safe methods for interacting with an on-chain instance of the +[`IBridge`](self) contract located at a given `address`, using a given +provider `P`. + +If the contract bytecode is available (see the [`sol!`](alloy_sol_types::sol!) +documentation on how to provide it), the `deploy` and `deploy_builder` methods can +be used to deploy a new instance of the contract. + +See the [module-level documentation](self) for all the available methods.*/ + #[derive(Clone)] + pub struct IBridgeInstance { + address: alloy_sol_types::private::Address, + provider: P, + _network: ::core::marker::PhantomData, + } + #[automatically_derived] + impl ::core::fmt::Debug for IBridgeInstance { + #[inline] + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { + f.debug_tuple("IBridgeInstance").field(&self.address).finish() + } + } + /// Instantiation and getters/setters. + #[automatically_derived] + impl< + P: alloy_contract::private::Provider, + N: alloy_contract::private::Network, + > IBridgeInstance { + /**Creates a new wrapper around an on-chain [`IBridge`](self) contract instance. + +See the [wrapper's documentation](`IBridgeInstance`) for more details.*/ + #[inline] + pub const fn new( + address: alloy_sol_types::private::Address, + provider: P, + ) -> Self { + Self { + address, + provider, + _network: ::core::marker::PhantomData, + } + } + /// Returns a reference to the address. + #[inline] + pub const fn address(&self) -> &alloy_sol_types::private::Address { + &self.address + } + /// Sets the address. + #[inline] + pub fn set_address(&mut self, address: alloy_sol_types::private::Address) { + self.address = address; + } + /// Sets the address and returns `self`. + pub fn at(mut self, address: alloy_sol_types::private::Address) -> Self { + self.set_address(address); + self + } + /// Returns a reference to the provider. + #[inline] + pub const fn provider(&self) -> &P { + &self.provider + } + } + impl IBridgeInstance<&P, N> { + /// Clones the provider and returns a new instance with the cloned provider. + #[inline] + pub fn with_cloned_provider(self) -> IBridgeInstance { + IBridgeInstance { + address: self.address, + provider: ::core::clone::Clone::clone(&self.provider), + _network: ::core::marker::PhantomData, + } + } + } + /// Function calls. + #[automatically_derived] + impl< + P: alloy_contract::private::Provider, + N: alloy_contract::private::Network, + > IBridgeInstance { + /// Creates a new call builder using this contract instance's provider and address. + /// + /// Note that the call can be any function call, not just those defined in this + /// contract. Prefer using the other methods for building type-safe contract calls. + pub fn call_builder( + &self, + call: &C, + ) -> alloy_contract::SolCallBuilder<&P, C, N> { + alloy_contract::SolCallBuilder::new_sol(&self.provider, &self.address, call) + } + } + /// Event filters. + #[automatically_derived] + impl< + P: alloy_contract::private::Provider, + N: alloy_contract::private::Network, + > IBridgeInstance { + /// Creates a new event filter using this contract instance's provider and address. + /// + /// Note that the type can be any event, not just those defined in this contract. + /// Prefer using the other methods for building type-safe event filters. + pub fn event_filter( + &self, + ) -> alloy_contract::Event<&P, E, N> { + alloy_contract::Event::new_sol(&self.provider, &self.address) + } + } +} +/** + +Generated by the following Solidity interface... +```solidity +library IBridge { + struct TokenLimits { + uint256 minAmount; + uint256 deposit; + uint256 claim; + } + struct TokenUsage { + uint256 consumed; + uint256 lastUpdated; + } +} + +interface BridgeMintBurn { + error AccessControlBadConfirmation(); + error AccessControlUnauthorizedAccount(address account, bytes32 neededRole); + error BlockNotFinalized(); + error ContractMigrated(); + error DailyLimitExhausted(); + error Empty(); + error EnforcedPause(); + error ExpectedPause(); + error InvalidBridgeContract(); + error InvalidDepositLog(); + error InvalidNonce(); + error InvalidToAddress(); + error InvalidTokenAmount(); + error InvalidTokenConfig(); + error MirrorTokenNotFound(); + error Overflow256(); + error PrecompileCallFailed(); + error RequestAlreadyProcessed(); + + event Claim(uint256 indexed id, address indexed mirrorToken, address indexed token, uint256 amount, address to); + event ClaimNative(uint256 indexed id, uint256 amount, address to); + event Deposit(uint256 indexed id, address indexed token, uint256 amount, address to); + event DepositNative(uint256 indexed id, uint256 amount, address to); + event Paused(address account); + event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole); + event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender); + event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender); + event Unpaused(address account); + + constructor(address _bridgeContract, IBridge.TokenLimits nativeTokenLimits, uint96 _sourceChainId); + + function DEFAULT_ADMIN_ROLE() external view returns (bytes32); + function PAUSER_ROLE() external view returns (bytes32); + function bridgeContract() external view returns (address); + function claim(uint256 id, address token, uint256 blockNumber) external; + function claimNative(uint256 id, uint256 blockNumber) external; + function configureToken(address token, IBridge.TokenLimits memory limits) external; + function createAndWhitelistMirrorToken(string memory tokenName, string memory tokenSymbol, address existingToken, address mirrorToken, uint8 mirrorTokenDecimals, IBridge.TokenLimits memory limits) external returns (address token); + function deposit(address token, uint256 amount, address to) external returns (uint256); + function depositNative(address to) external payable returns (uint256); + function getRoleAdmin(bytes32 role) external view returns (bytes32); + function grantRole(bytes32 role, address account) external; + function hasRole(bytes32 role, address account) external view returns (bool); + function migrate(address _newContract) external; + function migratedContract() external view returns (address); + function mirrorTokens(address) external view returns (address); + function pause() external; + function paused() external view returns (bool); + function processedRequests(bytes32) external view returns (bool); + function renounceRole(bytes32 role, address callerConfirmation) external; + function revokeRole(bytes32 role, address account) external; + function supportsInterface(bytes4 interfaceId) external view returns (bool); + function tokenData(address) external view returns (IBridge.TokenLimits memory limits, IBridge.TokenUsage memory deposit, IBridge.TokenUsage memory claim); + function unpause() external; + function usedNonces(uint256) external view returns (bool); + function whitelistedTokens(uint256) external view returns (address); +} +``` + +...which was generated by the following JSON ABI: +```json +[ + { + "type": "constructor", + "inputs": [ + { + "name": "_bridgeContract", + "type": "address", + "internalType": "address" + }, + { + "name": "nativeTokenLimits", + "type": "tuple", + "internalType": "struct IBridge.TokenLimits", + "components": [ + { + "name": "minAmount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "deposit", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "claim", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "name": "_sourceChainId", + "type": "uint96", + "internalType": "uint96" + } + ], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "DEFAULT_ADMIN_ROLE", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "PAUSER_ROLE", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "bridgeContract", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "claim", + "inputs": [ + { + "name": "id", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "internalType": "address" + }, + { + "name": "blockNumber", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "claimNative", + "inputs": [ + { + "name": "id", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "blockNumber", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "configureToken", + "inputs": [ + { + "name": "token", + "type": "address", + "internalType": "address" + }, + { + "name": "limits", + "type": "tuple", + "internalType": "struct IBridge.TokenLimits", + "components": [ + { + "name": "minAmount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "deposit", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "claim", + "type": "uint256", + "internalType": "uint256" + } + ] + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "createAndWhitelistMirrorToken", + "inputs": [ + { + "name": "tokenName", + "type": "string", + "internalType": "string" + }, + { + "name": "tokenSymbol", + "type": "string", + "internalType": "string" + }, + { + "name": "existingToken", + "type": "address", + "internalType": "address" + }, + { + "name": "mirrorToken", + "type": "address", + "internalType": "address" + }, + { + "name": "mirrorTokenDecimals", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "limits", + "type": "tuple", + "internalType": "struct IBridge.TokenLimits", + "components": [ + { + "name": "minAmount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "deposit", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "claim", + "type": "uint256", + "internalType": "uint256" + } + ] + } + ], + "outputs": [ + { + "name": "token", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "deposit", + "inputs": [ + { + "name": "token", + "type": "address", + "internalType": "address" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "to", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "depositNative", + "inputs": [ + { + "name": "to", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "payable" + }, + { + "type": "function", + "name": "getRoleAdmin", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "outputs": [ + { + "name": "", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "grantRole", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "account", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "hasRole", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "account", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "migrate", + "inputs": [ + { + "name": "_newContract", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "migratedContract", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "mirrorTokens", + "inputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "pause", + "inputs": [], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "paused", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "processedRequests", + "inputs": [ + { + "name": "", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "renounceRole", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "callerConfirmation", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "revokeRole", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "account", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "supportsInterface", + "inputs": [ + { + "name": "interfaceId", + "type": "bytes4", + "internalType": "bytes4" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "tokenData", + "inputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "limits", + "type": "tuple", + "internalType": "struct IBridge.TokenLimits", + "components": [ + { + "name": "minAmount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "deposit", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "claim", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "name": "deposit", + "type": "tuple", + "internalType": "struct IBridge.TokenUsage", + "components": [ + { + "name": "consumed", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "lastUpdated", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "name": "claim", + "type": "tuple", + "internalType": "struct IBridge.TokenUsage", + "components": [ + { + "name": "consumed", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "lastUpdated", + "type": "uint256", + "internalType": "uint256" + } + ] + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "unpause", + "inputs": [], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "usedNonces", + "inputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "whitelistedTokens", + "inputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "event", + "name": "Claim", + "inputs": [ + { + "name": "id", + "type": "uint256", + "indexed": true, + "internalType": "uint256" + }, + { + "name": "mirrorToken", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "token", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "to", + "type": "address", + "indexed": false, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "ClaimNative", + "inputs": [ + { + "name": "id", + "type": "uint256", + "indexed": true, + "internalType": "uint256" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "to", + "type": "address", + "indexed": false, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "Deposit", + "inputs": [ + { + "name": "id", + "type": "uint256", + "indexed": true, + "internalType": "uint256" + }, + { + "name": "token", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "to", + "type": "address", + "indexed": false, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "DepositNative", + "inputs": [ + { + "name": "id", + "type": "uint256", + "indexed": true, + "internalType": "uint256" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "to", + "type": "address", + "indexed": false, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "Paused", + "inputs": [ + { + "name": "account", + "type": "address", + "indexed": false, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "RoleAdminChanged", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + }, + { + "name": "previousAdminRole", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + }, + { + "name": "newAdminRole", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "RoleGranted", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + }, + { + "name": "account", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "sender", + "type": "address", + "indexed": true, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "RoleRevoked", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + }, + { + "name": "account", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "sender", + "type": "address", + "indexed": true, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "Unpaused", + "inputs": [ + { + "name": "account", + "type": "address", + "indexed": false, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "error", + "name": "AccessControlBadConfirmation", + "inputs": [] + }, + { + "type": "error", + "name": "AccessControlUnauthorizedAccount", + "inputs": [ + { + "name": "account", + "type": "address", + "internalType": "address" + }, + { + "name": "neededRole", + "type": "bytes32", + "internalType": "bytes32" + } + ] + }, + { + "type": "error", + "name": "BlockNotFinalized", + "inputs": [] + }, + { + "type": "error", + "name": "ContractMigrated", + "inputs": [] + }, + { + "type": "error", + "name": "DailyLimitExhausted", + "inputs": [] + }, + { + "type": "error", + "name": "Empty", + "inputs": [] + }, + { + "type": "error", + "name": "EnforcedPause", + "inputs": [] + }, + { + "type": "error", + "name": "ExpectedPause", + "inputs": [] + }, + { + "type": "error", + "name": "InvalidBridgeContract", + "inputs": [] + }, + { + "type": "error", + "name": "InvalidDepositLog", + "inputs": [] + }, + { + "type": "error", + "name": "InvalidNonce", + "inputs": [] + }, + { + "type": "error", + "name": "InvalidToAddress", + "inputs": [] + }, + { + "type": "error", + "name": "InvalidTokenAmount", + "inputs": [] + }, + { + "type": "error", + "name": "InvalidTokenConfig", + "inputs": [] + }, + { + "type": "error", + "name": "MirrorTokenNotFound", + "inputs": [] + }, + { + "type": "error", + "name": "Overflow256", + "inputs": [] + }, + { + "type": "error", + "name": "PrecompileCallFailed", + "inputs": [] + }, + { + "type": "error", + "name": "RequestAlreadyProcessed", + "inputs": [] + } +] +```*/ +#[allow( + non_camel_case_types, + non_snake_case, + clippy::pub_underscore_fields, + clippy::style, + clippy::empty_structs_with_brackets +)] +pub mod BridgeMintBurn { + use super::*; + use alloy::sol_types as alloy_sol_types; + #[derive(serde::Serialize, serde::Deserialize)] + #[derive(Default, Debug, PartialEq, Eq, Hash)] + /**Custom error with signature `AccessControlBadConfirmation()` and selector `0x6697b232`. +```solidity +error AccessControlBadConfirmation(); +```*/ + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] + #[derive(Clone)] + pub struct AccessControlBadConfirmation; + #[allow( + non_camel_case_types, + non_snake_case, + clippy::pub_underscore_fields, + clippy::style + )] + const _: () = { + use alloy::sol_types as alloy_sol_types; + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From + for UnderlyingRustTuple<'_> { + fn from(value: AccessControlBadConfirmation) -> Self { + () + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> + for AccessControlBadConfirmation { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self + } + } + #[automatically_derived] + impl alloy_sol_types::SolError for AccessControlBadConfirmation { + type Parameters<'a> = UnderlyingSolTuple<'a>; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SIGNATURE: &'static str = "AccessControlBadConfirmation()"; + const SELECTOR: [u8; 4] = [102u8, 151u8, 178u8, 50u8]; + #[inline] + fn new<'a>( + tuple: as alloy_sol_types::SolType>::RustType, + ) -> Self { + tuple.into() + } + #[inline] + fn tokenize(&self) -> Self::Token<'_> { + () + } + #[inline] + fn abi_decode_raw_validate(data: &[u8]) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence_validate(data) + .map(Self::new) + } + } + }; + #[derive(serde::Serialize, serde::Deserialize)] + #[derive(Default, Debug, PartialEq, Eq, Hash)] + /**Custom error with signature `AccessControlUnauthorizedAccount(address,bytes32)` and selector `0xe2517d3f`. +```solidity +error AccessControlUnauthorizedAccount(address account, bytes32 neededRole); +```*/ + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] + #[derive(Clone)] + pub struct AccessControlUnauthorizedAccount { + #[allow(missing_docs)] + pub account: alloy::sol_types::private::Address, + #[allow(missing_docs)] + pub neededRole: alloy::sol_types::private::FixedBytes<32>, + } + #[allow( + non_camel_case_types, + non_snake_case, + clippy::pub_underscore_fields, + clippy::style + )] + const _: () = { + use alloy::sol_types as alloy_sol_types; + #[doc(hidden)] + type UnderlyingSolTuple<'a> = ( + alloy::sol_types::sol_data::Address, + alloy::sol_types::sol_data::FixedBytes<32>, + ); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = ( + alloy::sol_types::private::Address, + alloy::sol_types::private::FixedBytes<32>, + ); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From + for UnderlyingRustTuple<'_> { + fn from(value: AccessControlUnauthorizedAccount) -> Self { + (value.account, value.neededRole) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> + for AccessControlUnauthorizedAccount { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { + account: tuple.0, + neededRole: tuple.1, + } + } + } + #[automatically_derived] + impl alloy_sol_types::SolError for AccessControlUnauthorizedAccount { + type Parameters<'a> = UnderlyingSolTuple<'a>; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SIGNATURE: &'static str = "AccessControlUnauthorizedAccount(address,bytes32)"; + const SELECTOR: [u8; 4] = [226u8, 81u8, 125u8, 63u8]; + #[inline] + fn new<'a>( + tuple: as alloy_sol_types::SolType>::RustType, + ) -> Self { + tuple.into() + } + #[inline] + fn tokenize(&self) -> Self::Token<'_> { + ( + ::tokenize( + &self.account, + ), + as alloy_sol_types::SolType>::tokenize(&self.neededRole), + ) + } + #[inline] + fn abi_decode_raw_validate(data: &[u8]) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence_validate(data) + .map(Self::new) + } + } + }; + #[derive(serde::Serialize, serde::Deserialize)] + #[derive(Default, Debug, PartialEq, Eq, Hash)] + /**Custom error with signature `BlockNotFinalized()` and selector `0x6d77eea2`. +```solidity +error BlockNotFinalized(); +```*/ + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] + #[derive(Clone)] + pub struct BlockNotFinalized; + #[allow( + non_camel_case_types, + non_snake_case, + clippy::pub_underscore_fields, + clippy::style + )] + const _: () = { + use alloy::sol_types as alloy_sol_types; + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: BlockNotFinalized) -> Self { + () + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for BlockNotFinalized { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self + } + } + #[automatically_derived] + impl alloy_sol_types::SolError for BlockNotFinalized { + type Parameters<'a> = UnderlyingSolTuple<'a>; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SIGNATURE: &'static str = "BlockNotFinalized()"; + const SELECTOR: [u8; 4] = [109u8, 119u8, 238u8, 162u8]; + #[inline] + fn new<'a>( + tuple: as alloy_sol_types::SolType>::RustType, + ) -> Self { + tuple.into() + } + #[inline] + fn tokenize(&self) -> Self::Token<'_> { + () + } + #[inline] + fn abi_decode_raw_validate(data: &[u8]) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence_validate(data) + .map(Self::new) + } + } + }; + #[derive(serde::Serialize, serde::Deserialize)] + #[derive(Default, Debug, PartialEq, Eq, Hash)] + /**Custom error with signature `ContractMigrated()` and selector `0x3f4f6896`. +```solidity +error ContractMigrated(); +```*/ + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] + #[derive(Clone)] + pub struct ContractMigrated; + #[allow( + non_camel_case_types, + non_snake_case, + clippy::pub_underscore_fields, + clippy::style + )] + const _: () = { + use alloy::sol_types as alloy_sol_types; + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: ContractMigrated) -> Self { + () + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for ContractMigrated { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self + } + } + #[automatically_derived] + impl alloy_sol_types::SolError for ContractMigrated { + type Parameters<'a> = UnderlyingSolTuple<'a>; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SIGNATURE: &'static str = "ContractMigrated()"; + const SELECTOR: [u8; 4] = [63u8, 79u8, 104u8, 150u8]; + #[inline] + fn new<'a>( + tuple: as alloy_sol_types::SolType>::RustType, + ) -> Self { + tuple.into() + } + #[inline] + fn tokenize(&self) -> Self::Token<'_> { + () + } + #[inline] + fn abi_decode_raw_validate(data: &[u8]) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence_validate(data) + .map(Self::new) + } + } + }; + #[derive(serde::Serialize, serde::Deserialize)] + #[derive(Default, Debug, PartialEq, Eq, Hash)] + /**Custom error with signature `DailyLimitExhausted()` and selector `0xbdc4df72`. +```solidity +error DailyLimitExhausted(); +```*/ + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] + #[derive(Clone)] + pub struct DailyLimitExhausted; + #[allow( + non_camel_case_types, + non_snake_case, + clippy::pub_underscore_fields, + clippy::style + )] + const _: () = { + use alloy::sol_types as alloy_sol_types; + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: DailyLimitExhausted) -> Self { + () + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for DailyLimitExhausted { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self + } + } + #[automatically_derived] + impl alloy_sol_types::SolError for DailyLimitExhausted { + type Parameters<'a> = UnderlyingSolTuple<'a>; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SIGNATURE: &'static str = "DailyLimitExhausted()"; + const SELECTOR: [u8; 4] = [189u8, 196u8, 223u8, 114u8]; + #[inline] + fn new<'a>( + tuple: as alloy_sol_types::SolType>::RustType, + ) -> Self { + tuple.into() + } + #[inline] + fn tokenize(&self) -> Self::Token<'_> { + () + } + #[inline] + fn abi_decode_raw_validate(data: &[u8]) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence_validate(data) + .map(Self::new) + } + } + }; + #[derive(serde::Serialize, serde::Deserialize)] + #[derive(Default, Debug, PartialEq, Eq, Hash)] + /**Custom error with signature `Empty()` and selector `0x3db2a12a`. +```solidity +error Empty(); +```*/ + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] + #[derive(Clone)] + pub struct Empty; + #[allow( + non_camel_case_types, + non_snake_case, + clippy::pub_underscore_fields, + clippy::style + )] + const _: () = { + use alloy::sol_types as alloy_sol_types; + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: Empty) -> Self { + () + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for Empty { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self + } + } + #[automatically_derived] + impl alloy_sol_types::SolError for Empty { + type Parameters<'a> = UnderlyingSolTuple<'a>; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SIGNATURE: &'static str = "Empty()"; + const SELECTOR: [u8; 4] = [61u8, 178u8, 161u8, 42u8]; + #[inline] + fn new<'a>( + tuple: as alloy_sol_types::SolType>::RustType, + ) -> Self { + tuple.into() + } + #[inline] + fn tokenize(&self) -> Self::Token<'_> { + () + } + #[inline] + fn abi_decode_raw_validate(data: &[u8]) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence_validate(data) + .map(Self::new) + } + } + }; + #[derive(serde::Serialize, serde::Deserialize)] + #[derive(Default, Debug, PartialEq, Eq, Hash)] + /**Custom error with signature `EnforcedPause()` and selector `0xd93c0665`. +```solidity +error EnforcedPause(); +```*/ + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] + #[derive(Clone)] + pub struct EnforcedPause; + #[allow( + non_camel_case_types, + non_snake_case, + clippy::pub_underscore_fields, + clippy::style + )] + const _: () = { + use alloy::sol_types as alloy_sol_types; + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: EnforcedPause) -> Self { + () + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for EnforcedPause { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self + } + } + #[automatically_derived] + impl alloy_sol_types::SolError for EnforcedPause { + type Parameters<'a> = UnderlyingSolTuple<'a>; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SIGNATURE: &'static str = "EnforcedPause()"; + const SELECTOR: [u8; 4] = [217u8, 60u8, 6u8, 101u8]; + #[inline] + fn new<'a>( + tuple: as alloy_sol_types::SolType>::RustType, + ) -> Self { + tuple.into() + } + #[inline] + fn tokenize(&self) -> Self::Token<'_> { + () + } + #[inline] + fn abi_decode_raw_validate(data: &[u8]) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence_validate(data) + .map(Self::new) + } + } + }; + #[derive(serde::Serialize, serde::Deserialize)] + #[derive(Default, Debug, PartialEq, Eq, Hash)] + /**Custom error with signature `ExpectedPause()` and selector `0x8dfc202b`. +```solidity +error ExpectedPause(); +```*/ + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] + #[derive(Clone)] + pub struct ExpectedPause; + #[allow( + non_camel_case_types, + non_snake_case, + clippy::pub_underscore_fields, + clippy::style + )] + const _: () = { + use alloy::sol_types as alloy_sol_types; + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: ExpectedPause) -> Self { + () + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for ExpectedPause { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self + } + } + #[automatically_derived] + impl alloy_sol_types::SolError for ExpectedPause { + type Parameters<'a> = UnderlyingSolTuple<'a>; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SIGNATURE: &'static str = "ExpectedPause()"; + const SELECTOR: [u8; 4] = [141u8, 252u8, 32u8, 43u8]; + #[inline] + fn new<'a>( + tuple: as alloy_sol_types::SolType>::RustType, + ) -> Self { + tuple.into() + } + #[inline] + fn tokenize(&self) -> Self::Token<'_> { + () + } + #[inline] + fn abi_decode_raw_validate(data: &[u8]) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence_validate(data) + .map(Self::new) + } + } + }; + #[derive(serde::Serialize, serde::Deserialize)] + #[derive(Default, Debug, PartialEq, Eq, Hash)] + /**Custom error with signature `InvalidBridgeContract()` and selector `0x66da8037`. +```solidity +error InvalidBridgeContract(); +```*/ + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] + #[derive(Clone)] + pub struct InvalidBridgeContract; + #[allow( + non_camel_case_types, + non_snake_case, + clippy::pub_underscore_fields, + clippy::style + )] + const _: () = { + use alloy::sol_types as alloy_sol_types; + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: InvalidBridgeContract) -> Self { + () + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for InvalidBridgeContract { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self + } + } + #[automatically_derived] + impl alloy_sol_types::SolError for InvalidBridgeContract { + type Parameters<'a> = UnderlyingSolTuple<'a>; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SIGNATURE: &'static str = "InvalidBridgeContract()"; + const SELECTOR: [u8; 4] = [102u8, 218u8, 128u8, 55u8]; + #[inline] + fn new<'a>( + tuple: as alloy_sol_types::SolType>::RustType, + ) -> Self { + tuple.into() + } + #[inline] + fn tokenize(&self) -> Self::Token<'_> { + () + } + #[inline] + fn abi_decode_raw_validate(data: &[u8]) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence_validate(data) + .map(Self::new) + } + } + }; + #[derive(serde::Serialize, serde::Deserialize)] + #[derive(Default, Debug, PartialEq, Eq, Hash)] + /**Custom error with signature `InvalidDepositLog()` and selector `0xc12dcbc2`. +```solidity +error InvalidDepositLog(); +```*/ + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] + #[derive(Clone)] + pub struct InvalidDepositLog; + #[allow( + non_camel_case_types, + non_snake_case, + clippy::pub_underscore_fields, + clippy::style + )] + const _: () = { + use alloy::sol_types as alloy_sol_types; + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: InvalidDepositLog) -> Self { + () + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for InvalidDepositLog { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self + } + } + #[automatically_derived] + impl alloy_sol_types::SolError for InvalidDepositLog { + type Parameters<'a> = UnderlyingSolTuple<'a>; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SIGNATURE: &'static str = "InvalidDepositLog()"; + const SELECTOR: [u8; 4] = [193u8, 45u8, 203u8, 194u8]; + #[inline] + fn new<'a>( + tuple: as alloy_sol_types::SolType>::RustType, + ) -> Self { + tuple.into() + } + #[inline] + fn tokenize(&self) -> Self::Token<'_> { + () + } + #[inline] + fn abi_decode_raw_validate(data: &[u8]) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence_validate(data) + .map(Self::new) + } + } + }; + #[derive(serde::Serialize, serde::Deserialize)] + #[derive(Default, Debug, PartialEq, Eq, Hash)] + /**Custom error with signature `InvalidNonce()` and selector `0x756688fe`. +```solidity +error InvalidNonce(); +```*/ + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] + #[derive(Clone)] + pub struct InvalidNonce; + #[allow( + non_camel_case_types, + non_snake_case, + clippy::pub_underscore_fields, + clippy::style + )] + const _: () = { + use alloy::sol_types as alloy_sol_types; + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: InvalidNonce) -> Self { + () + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for InvalidNonce { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self + } + } + #[automatically_derived] + impl alloy_sol_types::SolError for InvalidNonce { + type Parameters<'a> = UnderlyingSolTuple<'a>; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SIGNATURE: &'static str = "InvalidNonce()"; + const SELECTOR: [u8; 4] = [117u8, 102u8, 136u8, 254u8]; + #[inline] + fn new<'a>( + tuple: as alloy_sol_types::SolType>::RustType, + ) -> Self { + tuple.into() + } + #[inline] + fn tokenize(&self) -> Self::Token<'_> { + () + } + #[inline] + fn abi_decode_raw_validate(data: &[u8]) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence_validate(data) + .map(Self::new) + } + } + }; + #[derive(serde::Serialize, serde::Deserialize)] + #[derive(Default, Debug, PartialEq, Eq, Hash)] + /**Custom error with signature `InvalidToAddress()` and selector `0x8aa3a72f`. +```solidity +error InvalidToAddress(); +```*/ + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] + #[derive(Clone)] + pub struct InvalidToAddress; + #[allow( + non_camel_case_types, + non_snake_case, + clippy::pub_underscore_fields, + clippy::style + )] + const _: () = { + use alloy::sol_types as alloy_sol_types; + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: InvalidToAddress) -> Self { + () + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for InvalidToAddress { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self + } + } + #[automatically_derived] + impl alloy_sol_types::SolError for InvalidToAddress { + type Parameters<'a> = UnderlyingSolTuple<'a>; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SIGNATURE: &'static str = "InvalidToAddress()"; + const SELECTOR: [u8; 4] = [138u8, 163u8, 167u8, 47u8]; + #[inline] + fn new<'a>( + tuple: as alloy_sol_types::SolType>::RustType, + ) -> Self { + tuple.into() + } + #[inline] + fn tokenize(&self) -> Self::Token<'_> { + () + } + #[inline] + fn abi_decode_raw_validate(data: &[u8]) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence_validate(data) + .map(Self::new) + } + } + }; + #[derive(serde::Serialize, serde::Deserialize)] + #[derive(Default, Debug, PartialEq, Eq, Hash)] + /**Custom error with signature `InvalidTokenAmount()` and selector `0x21607339`. +```solidity +error InvalidTokenAmount(); +```*/ + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] + #[derive(Clone)] + pub struct InvalidTokenAmount; + #[allow( + non_camel_case_types, + non_snake_case, + clippy::pub_underscore_fields, + clippy::style + )] + const _: () = { + use alloy::sol_types as alloy_sol_types; + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: InvalidTokenAmount) -> Self { + () + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for InvalidTokenAmount { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self + } + } + #[automatically_derived] + impl alloy_sol_types::SolError for InvalidTokenAmount { + type Parameters<'a> = UnderlyingSolTuple<'a>; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SIGNATURE: &'static str = "InvalidTokenAmount()"; + const SELECTOR: [u8; 4] = [33u8, 96u8, 115u8, 57u8]; + #[inline] + fn new<'a>( + tuple: as alloy_sol_types::SolType>::RustType, + ) -> Self { + tuple.into() + } + #[inline] + fn tokenize(&self) -> Self::Token<'_> { + () + } + #[inline] + fn abi_decode_raw_validate(data: &[u8]) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence_validate(data) + .map(Self::new) + } + } + }; + #[derive(serde::Serialize, serde::Deserialize)] + #[derive(Default, Debug, PartialEq, Eq, Hash)] + /**Custom error with signature `InvalidTokenConfig()` and selector `0x07fe7bae`. +```solidity +error InvalidTokenConfig(); +```*/ + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] + #[derive(Clone)] + pub struct InvalidTokenConfig; + #[allow( + non_camel_case_types, + non_snake_case, + clippy::pub_underscore_fields, + clippy::style + )] + const _: () = { + use alloy::sol_types as alloy_sol_types; + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: InvalidTokenConfig) -> Self { + () + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for InvalidTokenConfig { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self + } + } + #[automatically_derived] + impl alloy_sol_types::SolError for InvalidTokenConfig { + type Parameters<'a> = UnderlyingSolTuple<'a>; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SIGNATURE: &'static str = "InvalidTokenConfig()"; + const SELECTOR: [u8; 4] = [7u8, 254u8, 123u8, 174u8]; + #[inline] + fn new<'a>( + tuple: as alloy_sol_types::SolType>::RustType, + ) -> Self { + tuple.into() + } + #[inline] + fn tokenize(&self) -> Self::Token<'_> { + () + } + #[inline] + fn abi_decode_raw_validate(data: &[u8]) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence_validate(data) + .map(Self::new) + } + } + }; + #[derive(serde::Serialize, serde::Deserialize)] + #[derive(Default, Debug, PartialEq, Eq, Hash)] + /**Custom error with signature `MirrorTokenNotFound()` and selector `0xa8ddb64d`. +```solidity +error MirrorTokenNotFound(); +```*/ + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] + #[derive(Clone)] + pub struct MirrorTokenNotFound; + #[allow( + non_camel_case_types, + non_snake_case, + clippy::pub_underscore_fields, + clippy::style + )] + const _: () = { + use alloy::sol_types as alloy_sol_types; + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: MirrorTokenNotFound) -> Self { + () + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for MirrorTokenNotFound { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self + } + } + #[automatically_derived] + impl alloy_sol_types::SolError for MirrorTokenNotFound { + type Parameters<'a> = UnderlyingSolTuple<'a>; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SIGNATURE: &'static str = "MirrorTokenNotFound()"; + const SELECTOR: [u8; 4] = [168u8, 221u8, 182u8, 77u8]; + #[inline] + fn new<'a>( + tuple: as alloy_sol_types::SolType>::RustType, + ) -> Self { + tuple.into() + } + #[inline] + fn tokenize(&self) -> Self::Token<'_> { + () + } + #[inline] + fn abi_decode_raw_validate(data: &[u8]) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence_validate(data) + .map(Self::new) + } + } + }; + #[derive(serde::Serialize, serde::Deserialize)] + #[derive(Default, Debug, PartialEq, Eq, Hash)] + /**Custom error with signature `Overflow256()` and selector `0x1c41481c`. +```solidity +error Overflow256(); +```*/ + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] + #[derive(Clone)] + pub struct Overflow256; + #[allow( + non_camel_case_types, + non_snake_case, + clippy::pub_underscore_fields, + clippy::style + )] + const _: () = { + use alloy::sol_types as alloy_sol_types; + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: Overflow256) -> Self { + () + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for Overflow256 { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self + } + } + #[automatically_derived] + impl alloy_sol_types::SolError for Overflow256 { + type Parameters<'a> = UnderlyingSolTuple<'a>; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SIGNATURE: &'static str = "Overflow256()"; + const SELECTOR: [u8; 4] = [28u8, 65u8, 72u8, 28u8]; + #[inline] + fn new<'a>( + tuple: as alloy_sol_types::SolType>::RustType, + ) -> Self { + tuple.into() + } + #[inline] + fn tokenize(&self) -> Self::Token<'_> { + () + } + #[inline] + fn abi_decode_raw_validate(data: &[u8]) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence_validate(data) + .map(Self::new) + } + } + }; + #[derive(serde::Serialize, serde::Deserialize)] + #[derive(Default, Debug, PartialEq, Eq, Hash)] + /**Custom error with signature `PrecompileCallFailed()` and selector `0xfd23ff64`. +```solidity +error PrecompileCallFailed(); +```*/ + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] + #[derive(Clone)] + pub struct PrecompileCallFailed; + #[allow( + non_camel_case_types, + non_snake_case, + clippy::pub_underscore_fields, + clippy::style + )] + const _: () = { + use alloy::sol_types as alloy_sol_types; + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: PrecompileCallFailed) -> Self { + () + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for PrecompileCallFailed { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self + } + } + #[automatically_derived] + impl alloy_sol_types::SolError for PrecompileCallFailed { + type Parameters<'a> = UnderlyingSolTuple<'a>; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SIGNATURE: &'static str = "PrecompileCallFailed()"; + const SELECTOR: [u8; 4] = [253u8, 35u8, 255u8, 100u8]; + #[inline] + fn new<'a>( + tuple: as alloy_sol_types::SolType>::RustType, + ) -> Self { + tuple.into() + } + #[inline] + fn tokenize(&self) -> Self::Token<'_> { + () + } + #[inline] + fn abi_decode_raw_validate(data: &[u8]) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence_validate(data) + .map(Self::new) + } + } + }; + #[derive(serde::Serialize, serde::Deserialize)] + #[derive(Default, Debug, PartialEq, Eq, Hash)] + /**Custom error with signature `RequestAlreadyProcessed()` and selector `0xa6bc74c4`. +```solidity +error RequestAlreadyProcessed(); +```*/ + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] + #[derive(Clone)] + pub struct RequestAlreadyProcessed; + #[allow( + non_camel_case_types, + non_snake_case, + clippy::pub_underscore_fields, + clippy::style + )] + const _: () = { + use alloy::sol_types as alloy_sol_types; + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: RequestAlreadyProcessed) -> Self { + () + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for RequestAlreadyProcessed { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self + } + } + #[automatically_derived] + impl alloy_sol_types::SolError for RequestAlreadyProcessed { + type Parameters<'a> = UnderlyingSolTuple<'a>; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SIGNATURE: &'static str = "RequestAlreadyProcessed()"; + const SELECTOR: [u8; 4] = [166u8, 188u8, 116u8, 196u8]; + #[inline] + fn new<'a>( + tuple: as alloy_sol_types::SolType>::RustType, + ) -> Self { + tuple.into() + } + #[inline] + fn tokenize(&self) -> Self::Token<'_> { + () + } + #[inline] + fn abi_decode_raw_validate(data: &[u8]) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence_validate(data) + .map(Self::new) + } + } + }; + #[derive(serde::Serialize, serde::Deserialize)] + #[derive(Default, Debug, PartialEq, Eq, Hash)] + /**Event with signature `Claim(uint256,address,address,uint256,address)` and selector `0xaf3f1a12344bbeaab954d412e821d6b6a06d5cd5d27be204353bd4ea9b55a504`. +```solidity +event Claim(uint256 indexed id, address indexed mirrorToken, address indexed token, uint256 amount, address to); +```*/ + #[allow( + non_camel_case_types, + non_snake_case, + clippy::pub_underscore_fields, + clippy::style + )] + #[derive(Clone)] + pub struct Claim { + #[allow(missing_docs)] + pub id: alloy::sol_types::private::primitives::aliases::U256, + #[allow(missing_docs)] + pub mirrorToken: alloy::sol_types::private::Address, + #[allow(missing_docs)] + pub token: alloy::sol_types::private::Address, + #[allow(missing_docs)] + pub amount: alloy::sol_types::private::primitives::aliases::U256, + #[allow(missing_docs)] + pub to: alloy::sol_types::private::Address, + } + #[allow( + non_camel_case_types, + non_snake_case, + clippy::pub_underscore_fields, + clippy::style + )] + const _: () = { + use alloy::sol_types as alloy_sol_types; + #[automatically_derived] + impl alloy_sol_types::SolEvent for Claim { + type DataTuple<'a> = ( + alloy::sol_types::sol_data::Uint<256>, + alloy::sol_types::sol_data::Address, + ); + type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + type TopicList = ( + alloy_sol_types::sol_data::FixedBytes<32>, + alloy::sol_types::sol_data::Uint<256>, + alloy::sol_types::sol_data::Address, + alloy::sol_types::sol_data::Address, + ); + const SIGNATURE: &'static str = "Claim(uint256,address,address,uint256,address)"; + const SIGNATURE_HASH: alloy_sol_types::private::B256 = alloy_sol_types::private::B256::new([ + 175u8, 63u8, 26u8, 18u8, 52u8, 75u8, 190u8, 170u8, 185u8, 84u8, 212u8, + 18u8, 232u8, 33u8, 214u8, 182u8, 160u8, 109u8, 92u8, 213u8, 210u8, 123u8, + 226u8, 4u8, 53u8, 59u8, 212u8, 234u8, 155u8, 85u8, 165u8, 4u8, + ]); + const ANONYMOUS: bool = false; + #[allow(unused_variables)] + #[inline] + fn new( + topics: ::RustType, + data: as alloy_sol_types::SolType>::RustType, + ) -> Self { + Self { + id: topics.1, + mirrorToken: topics.2, + token: topics.3, + amount: data.0, + to: data.1, + } + } + #[inline] + fn check_signature( + topics: &::RustType, + ) -> alloy_sol_types::Result<()> { + if topics.0 != Self::SIGNATURE_HASH { + return Err( + alloy_sol_types::Error::invalid_event_signature_hash( + Self::SIGNATURE, + topics.0, + Self::SIGNATURE_HASH, + ), + ); + } + Ok(()) + } + #[inline] + fn tokenize_body(&self) -> Self::DataToken<'_> { + ( + as alloy_sol_types::SolType>::tokenize(&self.amount), + ::tokenize( + &self.to, + ), + ) + } + #[inline] + fn topics(&self) -> ::RustType { + ( + Self::SIGNATURE_HASH.into(), + self.id.clone(), + self.mirrorToken.clone(), + self.token.clone(), + ) + } + #[inline] + fn encode_topics_raw( + &self, + out: &mut [alloy_sol_types::abi::token::WordToken], + ) -> alloy_sol_types::Result<()> { + if out.len() < ::COUNT { + return Err(alloy_sol_types::Error::Overrun); + } + out[0usize] = alloy_sol_types::abi::token::WordToken( + Self::SIGNATURE_HASH, + ); + out[1usize] = as alloy_sol_types::EventTopic>::encode_topic(&self.id); + out[2usize] = ::encode_topic( + &self.mirrorToken, + ); + out[3usize] = ::encode_topic( + &self.token, + ); + Ok(()) + } + } + #[automatically_derived] + impl alloy_sol_types::private::IntoLogData for Claim { + fn to_log_data(&self) -> alloy_sol_types::private::LogData { + From::from(self) + } + fn into_log_data(self) -> alloy_sol_types::private::LogData { + From::from(&self) + } + } + #[automatically_derived] + impl From<&Claim> for alloy_sol_types::private::LogData { + #[inline] + fn from(this: &Claim) -> alloy_sol_types::private::LogData { + alloy_sol_types::SolEvent::encode_log_data(this) + } + } + }; + #[derive(serde::Serialize, serde::Deserialize)] + #[derive(Default, Debug, PartialEq, Eq, Hash)] + /**Event with signature `ClaimNative(uint256,uint256,address)` and selector `0x913168da07c3f7f5f3c523933316328b0d0611b627f12eb11c22ca44fbb19dc6`. +```solidity +event ClaimNative(uint256 indexed id, uint256 amount, address to); +```*/ + #[allow( + non_camel_case_types, + non_snake_case, + clippy::pub_underscore_fields, + clippy::style + )] + #[derive(Clone)] + pub struct ClaimNative { + #[allow(missing_docs)] + pub id: alloy::sol_types::private::primitives::aliases::U256, + #[allow(missing_docs)] + pub amount: alloy::sol_types::private::primitives::aliases::U256, + #[allow(missing_docs)] + pub to: alloy::sol_types::private::Address, + } + #[allow( + non_camel_case_types, + non_snake_case, + clippy::pub_underscore_fields, + clippy::style + )] + const _: () = { + use alloy::sol_types as alloy_sol_types; + #[automatically_derived] + impl alloy_sol_types::SolEvent for ClaimNative { + type DataTuple<'a> = ( + alloy::sol_types::sol_data::Uint<256>, + alloy::sol_types::sol_data::Address, + ); + type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + type TopicList = ( + alloy_sol_types::sol_data::FixedBytes<32>, + alloy::sol_types::sol_data::Uint<256>, + ); + const SIGNATURE: &'static str = "ClaimNative(uint256,uint256,address)"; + const SIGNATURE_HASH: alloy_sol_types::private::B256 = alloy_sol_types::private::B256::new([ + 145u8, 49u8, 104u8, 218u8, 7u8, 195u8, 247u8, 245u8, 243u8, 197u8, 35u8, + 147u8, 51u8, 22u8, 50u8, 139u8, 13u8, 6u8, 17u8, 182u8, 39u8, 241u8, + 46u8, 177u8, 28u8, 34u8, 202u8, 68u8, 251u8, 177u8, 157u8, 198u8, + ]); + const ANONYMOUS: bool = false; + #[allow(unused_variables)] + #[inline] + fn new( + topics: ::RustType, + data: as alloy_sol_types::SolType>::RustType, + ) -> Self { + Self { + id: topics.1, + amount: data.0, + to: data.1, + } + } + #[inline] + fn check_signature( + topics: &::RustType, + ) -> alloy_sol_types::Result<()> { + if topics.0 != Self::SIGNATURE_HASH { + return Err( + alloy_sol_types::Error::invalid_event_signature_hash( + Self::SIGNATURE, + topics.0, + Self::SIGNATURE_HASH, + ), + ); + } + Ok(()) + } + #[inline] + fn tokenize_body(&self) -> Self::DataToken<'_> { + ( + as alloy_sol_types::SolType>::tokenize(&self.amount), + ::tokenize( + &self.to, + ), + ) + } + #[inline] + fn topics(&self) -> ::RustType { + (Self::SIGNATURE_HASH.into(), self.id.clone()) + } + #[inline] + fn encode_topics_raw( + &self, + out: &mut [alloy_sol_types::abi::token::WordToken], + ) -> alloy_sol_types::Result<()> { + if out.len() < ::COUNT { + return Err(alloy_sol_types::Error::Overrun); + } + out[0usize] = alloy_sol_types::abi::token::WordToken( + Self::SIGNATURE_HASH, + ); + out[1usize] = as alloy_sol_types::EventTopic>::encode_topic(&self.id); + Ok(()) + } + } + #[automatically_derived] + impl alloy_sol_types::private::IntoLogData for ClaimNative { + fn to_log_data(&self) -> alloy_sol_types::private::LogData { + From::from(self) + } + fn into_log_data(self) -> alloy_sol_types::private::LogData { + From::from(&self) + } + } + #[automatically_derived] + impl From<&ClaimNative> for alloy_sol_types::private::LogData { + #[inline] + fn from(this: &ClaimNative) -> alloy_sol_types::private::LogData { + alloy_sol_types::SolEvent::encode_log_data(this) + } + } + }; + #[derive(serde::Serialize, serde::Deserialize)] + #[derive(Default, Debug, PartialEq, Eq, Hash)] + /**Event with signature `Deposit(uint256,address,uint256,address)` and selector `0x05e57fa62d890603d85944c963ddc7fbe77cde5ea69cad7033fc6f76b7ddd2ab`. +```solidity +event Deposit(uint256 indexed id, address indexed token, uint256 amount, address to); +```*/ + #[allow( + non_camel_case_types, + non_snake_case, + clippy::pub_underscore_fields, + clippy::style + )] + #[derive(Clone)] + pub struct Deposit { + #[allow(missing_docs)] + pub id: alloy::sol_types::private::primitives::aliases::U256, + #[allow(missing_docs)] + pub token: alloy::sol_types::private::Address, + #[allow(missing_docs)] + pub amount: alloy::sol_types::private::primitives::aliases::U256, + #[allow(missing_docs)] + pub to: alloy::sol_types::private::Address, + } + #[allow( + non_camel_case_types, + non_snake_case, + clippy::pub_underscore_fields, + clippy::style + )] + const _: () = { + use alloy::sol_types as alloy_sol_types; + #[automatically_derived] + impl alloy_sol_types::SolEvent for Deposit { + type DataTuple<'a> = ( + alloy::sol_types::sol_data::Uint<256>, + alloy::sol_types::sol_data::Address, + ); + type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + type TopicList = ( + alloy_sol_types::sol_data::FixedBytes<32>, + alloy::sol_types::sol_data::Uint<256>, + alloy::sol_types::sol_data::Address, + ); + const SIGNATURE: &'static str = "Deposit(uint256,address,uint256,address)"; + const SIGNATURE_HASH: alloy_sol_types::private::B256 = alloy_sol_types::private::B256::new([ + 5u8, 229u8, 127u8, 166u8, 45u8, 137u8, 6u8, 3u8, 216u8, 89u8, 68u8, + 201u8, 99u8, 221u8, 199u8, 251u8, 231u8, 124u8, 222u8, 94u8, 166u8, + 156u8, 173u8, 112u8, 51u8, 252u8, 111u8, 118u8, 183u8, 221u8, 210u8, + 171u8, + ]); + const ANONYMOUS: bool = false; + #[allow(unused_variables)] + #[inline] + fn new( + topics: ::RustType, + data: as alloy_sol_types::SolType>::RustType, + ) -> Self { + Self { + id: topics.1, + token: topics.2, + amount: data.0, + to: data.1, + } + } + #[inline] + fn check_signature( + topics: &::RustType, + ) -> alloy_sol_types::Result<()> { + if topics.0 != Self::SIGNATURE_HASH { + return Err( + alloy_sol_types::Error::invalid_event_signature_hash( + Self::SIGNATURE, + topics.0, + Self::SIGNATURE_HASH, + ), + ); + } + Ok(()) + } + #[inline] + fn tokenize_body(&self) -> Self::DataToken<'_> { + ( + as alloy_sol_types::SolType>::tokenize(&self.amount), + ::tokenize( + &self.to, + ), + ) + } + #[inline] + fn topics(&self) -> ::RustType { + (Self::SIGNATURE_HASH.into(), self.id.clone(), self.token.clone()) + } + #[inline] + fn encode_topics_raw( + &self, + out: &mut [alloy_sol_types::abi::token::WordToken], + ) -> alloy_sol_types::Result<()> { + if out.len() < ::COUNT { + return Err(alloy_sol_types::Error::Overrun); + } + out[0usize] = alloy_sol_types::abi::token::WordToken( + Self::SIGNATURE_HASH, + ); + out[1usize] = as alloy_sol_types::EventTopic>::encode_topic(&self.id); + out[2usize] = ::encode_topic( + &self.token, + ); + Ok(()) + } + } + #[automatically_derived] + impl alloy_sol_types::private::IntoLogData for Deposit { + fn to_log_data(&self) -> alloy_sol_types::private::LogData { + From::from(self) + } + fn into_log_data(self) -> alloy_sol_types::private::LogData { + From::from(&self) + } + } + #[automatically_derived] + impl From<&Deposit> for alloy_sol_types::private::LogData { + #[inline] + fn from(this: &Deposit) -> alloy_sol_types::private::LogData { + alloy_sol_types::SolEvent::encode_log_data(this) + } + } + }; + #[derive(serde::Serialize, serde::Deserialize)] + #[derive(Default, Debug, PartialEq, Eq, Hash)] + /**Event with signature `DepositNative(uint256,uint256,address)` and selector `0x40352b63d0a9c92983fcf19d8c3fc28ca0bcc8fa9ffeb5be28e14a3f758ab39e`. +```solidity +event DepositNative(uint256 indexed id, uint256 amount, address to); +```*/ + #[allow( + non_camel_case_types, + non_snake_case, + clippy::pub_underscore_fields, + clippy::style + )] + #[derive(Clone)] + pub struct DepositNative { + #[allow(missing_docs)] + pub id: alloy::sol_types::private::primitives::aliases::U256, + #[allow(missing_docs)] + pub amount: alloy::sol_types::private::primitives::aliases::U256, + #[allow(missing_docs)] + pub to: alloy::sol_types::private::Address, + } + #[allow( + non_camel_case_types, + non_snake_case, + clippy::pub_underscore_fields, + clippy::style + )] + const _: () = { + use alloy::sol_types as alloy_sol_types; + #[automatically_derived] + impl alloy_sol_types::SolEvent for DepositNative { + type DataTuple<'a> = ( + alloy::sol_types::sol_data::Uint<256>, + alloy::sol_types::sol_data::Address, + ); + type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + type TopicList = ( + alloy_sol_types::sol_data::FixedBytes<32>, + alloy::sol_types::sol_data::Uint<256>, + ); + const SIGNATURE: &'static str = "DepositNative(uint256,uint256,address)"; + const SIGNATURE_HASH: alloy_sol_types::private::B256 = alloy_sol_types::private::B256::new([ + 64u8, 53u8, 43u8, 99u8, 208u8, 169u8, 201u8, 41u8, 131u8, 252u8, 241u8, + 157u8, 140u8, 63u8, 194u8, 140u8, 160u8, 188u8, 200u8, 250u8, 159u8, + 254u8, 181u8, 190u8, 40u8, 225u8, 74u8, 63u8, 117u8, 138u8, 179u8, 158u8, + ]); + const ANONYMOUS: bool = false; + #[allow(unused_variables)] + #[inline] + fn new( + topics: ::RustType, + data: as alloy_sol_types::SolType>::RustType, + ) -> Self { + Self { + id: topics.1, + amount: data.0, + to: data.1, + } + } + #[inline] + fn check_signature( + topics: &::RustType, + ) -> alloy_sol_types::Result<()> { + if topics.0 != Self::SIGNATURE_HASH { + return Err( + alloy_sol_types::Error::invalid_event_signature_hash( + Self::SIGNATURE, + topics.0, + Self::SIGNATURE_HASH, + ), + ); + } + Ok(()) + } + #[inline] + fn tokenize_body(&self) -> Self::DataToken<'_> { + ( + as alloy_sol_types::SolType>::tokenize(&self.amount), + ::tokenize( + &self.to, + ), + ) + } + #[inline] + fn topics(&self) -> ::RustType { + (Self::SIGNATURE_HASH.into(), self.id.clone()) + } + #[inline] + fn encode_topics_raw( + &self, + out: &mut [alloy_sol_types::abi::token::WordToken], + ) -> alloy_sol_types::Result<()> { + if out.len() < ::COUNT { + return Err(alloy_sol_types::Error::Overrun); + } + out[0usize] = alloy_sol_types::abi::token::WordToken( + Self::SIGNATURE_HASH, + ); + out[1usize] = as alloy_sol_types::EventTopic>::encode_topic(&self.id); + Ok(()) + } + } + #[automatically_derived] + impl alloy_sol_types::private::IntoLogData for DepositNative { + fn to_log_data(&self) -> alloy_sol_types::private::LogData { + From::from(self) + } + fn into_log_data(self) -> alloy_sol_types::private::LogData { + From::from(&self) + } + } + #[automatically_derived] + impl From<&DepositNative> for alloy_sol_types::private::LogData { + #[inline] + fn from(this: &DepositNative) -> alloy_sol_types::private::LogData { + alloy_sol_types::SolEvent::encode_log_data(this) + } + } + }; + #[derive(serde::Serialize, serde::Deserialize)] + #[derive(Default, Debug, PartialEq, Eq, Hash)] + /**Event with signature `Paused(address)` and selector `0x62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258`. +```solidity +event Paused(address account); +```*/ + #[allow( + non_camel_case_types, + non_snake_case, + clippy::pub_underscore_fields, + clippy::style + )] + #[derive(Clone)] + pub struct Paused { + #[allow(missing_docs)] + pub account: alloy::sol_types::private::Address, + } + #[allow( + non_camel_case_types, + non_snake_case, + clippy::pub_underscore_fields, + clippy::style + )] + const _: () = { + use alloy::sol_types as alloy_sol_types; + #[automatically_derived] + impl alloy_sol_types::SolEvent for Paused { + type DataTuple<'a> = (alloy::sol_types::sol_data::Address,); + type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + type TopicList = (alloy_sol_types::sol_data::FixedBytes<32>,); + const SIGNATURE: &'static str = "Paused(address)"; + const SIGNATURE_HASH: alloy_sol_types::private::B256 = alloy_sol_types::private::B256::new([ + 98u8, 231u8, 140u8, 234u8, 1u8, 190u8, 227u8, 32u8, 205u8, 78u8, 66u8, + 2u8, 112u8, 181u8, 234u8, 116u8, 0u8, 13u8, 17u8, 176u8, 201u8, 247u8, + 71u8, 84u8, 235u8, 219u8, 252u8, 84u8, 75u8, 5u8, 162u8, 88u8, + ]); + const ANONYMOUS: bool = false; + #[allow(unused_variables)] + #[inline] + fn new( + topics: ::RustType, + data: as alloy_sol_types::SolType>::RustType, + ) -> Self { + Self { account: data.0 } + } + #[inline] + fn check_signature( + topics: &::RustType, + ) -> alloy_sol_types::Result<()> { + if topics.0 != Self::SIGNATURE_HASH { + return Err( + alloy_sol_types::Error::invalid_event_signature_hash( + Self::SIGNATURE, + topics.0, + Self::SIGNATURE_HASH, + ), + ); + } + Ok(()) + } + #[inline] + fn tokenize_body(&self) -> Self::DataToken<'_> { + ( + ::tokenize( + &self.account, + ), + ) + } + #[inline] + fn topics(&self) -> ::RustType { + (Self::SIGNATURE_HASH.into(),) + } + #[inline] + fn encode_topics_raw( + &self, + out: &mut [alloy_sol_types::abi::token::WordToken], + ) -> alloy_sol_types::Result<()> { + if out.len() < ::COUNT { + return Err(alloy_sol_types::Error::Overrun); + } + out[0usize] = alloy_sol_types::abi::token::WordToken( + Self::SIGNATURE_HASH, + ); + Ok(()) + } + } + #[automatically_derived] + impl alloy_sol_types::private::IntoLogData for Paused { + fn to_log_data(&self) -> alloy_sol_types::private::LogData { + From::from(self) + } + fn into_log_data(self) -> alloy_sol_types::private::LogData { + From::from(&self) + } + } + #[automatically_derived] + impl From<&Paused> for alloy_sol_types::private::LogData { + #[inline] + fn from(this: &Paused) -> alloy_sol_types::private::LogData { + alloy_sol_types::SolEvent::encode_log_data(this) + } + } + }; + #[derive(serde::Serialize, serde::Deserialize)] + #[derive(Default, Debug, PartialEq, Eq, Hash)] + /**Event with signature `RoleAdminChanged(bytes32,bytes32,bytes32)` and selector `0xbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff`. +```solidity +event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole); +```*/ + #[allow( + non_camel_case_types, + non_snake_case, + clippy::pub_underscore_fields, + clippy::style + )] + #[derive(Clone)] + pub struct RoleAdminChanged { + #[allow(missing_docs)] + pub role: alloy::sol_types::private::FixedBytes<32>, + #[allow(missing_docs)] + pub previousAdminRole: alloy::sol_types::private::FixedBytes<32>, + #[allow(missing_docs)] + pub newAdminRole: alloy::sol_types::private::FixedBytes<32>, + } + #[allow( + non_camel_case_types, + non_snake_case, + clippy::pub_underscore_fields, + clippy::style + )] + const _: () = { + use alloy::sol_types as alloy_sol_types; + #[automatically_derived] + impl alloy_sol_types::SolEvent for RoleAdminChanged { + type DataTuple<'a> = (); + type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + type TopicList = ( + alloy_sol_types::sol_data::FixedBytes<32>, + alloy::sol_types::sol_data::FixedBytes<32>, + alloy::sol_types::sol_data::FixedBytes<32>, + alloy::sol_types::sol_data::FixedBytes<32>, + ); + const SIGNATURE: &'static str = "RoleAdminChanged(bytes32,bytes32,bytes32)"; + const SIGNATURE_HASH: alloy_sol_types::private::B256 = alloy_sol_types::private::B256::new([ + 189u8, 121u8, 184u8, 111u8, 254u8, 10u8, 184u8, 232u8, 119u8, 97u8, 81u8, + 81u8, 66u8, 23u8, 205u8, 124u8, 172u8, 213u8, 44u8, 144u8, 159u8, 102u8, + 71u8, 92u8, 58u8, 244u8, 78u8, 18u8, 159u8, 11u8, 0u8, 255u8, + ]); + const ANONYMOUS: bool = false; + #[allow(unused_variables)] + #[inline] + fn new( + topics: ::RustType, + data: as alloy_sol_types::SolType>::RustType, + ) -> Self { + Self { + role: topics.1, + previousAdminRole: topics.2, + newAdminRole: topics.3, + } + } + #[inline] + fn check_signature( + topics: &::RustType, + ) -> alloy_sol_types::Result<()> { + if topics.0 != Self::SIGNATURE_HASH { + return Err( + alloy_sol_types::Error::invalid_event_signature_hash( + Self::SIGNATURE, + topics.0, + Self::SIGNATURE_HASH, + ), + ); + } + Ok(()) + } + #[inline] + fn tokenize_body(&self) -> Self::DataToken<'_> { + () + } + #[inline] + fn topics(&self) -> ::RustType { + ( + Self::SIGNATURE_HASH.into(), + self.role.clone(), + self.previousAdminRole.clone(), + self.newAdminRole.clone(), + ) + } + #[inline] + fn encode_topics_raw( + &self, + out: &mut [alloy_sol_types::abi::token::WordToken], + ) -> alloy_sol_types::Result<()> { + if out.len() < ::COUNT { + return Err(alloy_sol_types::Error::Overrun); + } + out[0usize] = alloy_sol_types::abi::token::WordToken( + Self::SIGNATURE_HASH, + ); + out[1usize] = as alloy_sol_types::EventTopic>::encode_topic(&self.role); + out[2usize] = as alloy_sol_types::EventTopic>::encode_topic(&self.previousAdminRole); + out[3usize] = as alloy_sol_types::EventTopic>::encode_topic(&self.newAdminRole); + Ok(()) + } + } + #[automatically_derived] + impl alloy_sol_types::private::IntoLogData for RoleAdminChanged { + fn to_log_data(&self) -> alloy_sol_types::private::LogData { + From::from(self) + } + fn into_log_data(self) -> alloy_sol_types::private::LogData { + From::from(&self) + } + } + #[automatically_derived] + impl From<&RoleAdminChanged> for alloy_sol_types::private::LogData { + #[inline] + fn from(this: &RoleAdminChanged) -> alloy_sol_types::private::LogData { + alloy_sol_types::SolEvent::encode_log_data(this) + } + } + }; + #[derive(serde::Serialize, serde::Deserialize)] + #[derive(Default, Debug, PartialEq, Eq, Hash)] + /**Event with signature `RoleGranted(bytes32,address,address)` and selector `0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d`. +```solidity +event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender); +```*/ + #[allow( + non_camel_case_types, + non_snake_case, + clippy::pub_underscore_fields, + clippy::style + )] + #[derive(Clone)] + pub struct RoleGranted { + #[allow(missing_docs)] + pub role: alloy::sol_types::private::FixedBytes<32>, + #[allow(missing_docs)] + pub account: alloy::sol_types::private::Address, + #[allow(missing_docs)] + pub sender: alloy::sol_types::private::Address, + } + #[allow( + non_camel_case_types, + non_snake_case, + clippy::pub_underscore_fields, + clippy::style + )] + const _: () = { + use alloy::sol_types as alloy_sol_types; + #[automatically_derived] + impl alloy_sol_types::SolEvent for RoleGranted { + type DataTuple<'a> = (); + type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + type TopicList = ( + alloy_sol_types::sol_data::FixedBytes<32>, + alloy::sol_types::sol_data::FixedBytes<32>, + alloy::sol_types::sol_data::Address, + alloy::sol_types::sol_data::Address, + ); + const SIGNATURE: &'static str = "RoleGranted(bytes32,address,address)"; + const SIGNATURE_HASH: alloy_sol_types::private::B256 = alloy_sol_types::private::B256::new([ + 47u8, 135u8, 136u8, 17u8, 126u8, 126u8, 255u8, 29u8, 130u8, 233u8, 38u8, + 236u8, 121u8, 73u8, 1u8, 209u8, 124u8, 120u8, 2u8, 74u8, 80u8, 39u8, 9u8, + 64u8, 48u8, 69u8, 64u8, 167u8, 51u8, 101u8, 111u8, 13u8, + ]); + const ANONYMOUS: bool = false; + #[allow(unused_variables)] + #[inline] + fn new( + topics: ::RustType, + data: as alloy_sol_types::SolType>::RustType, + ) -> Self { + Self { + role: topics.1, + account: topics.2, + sender: topics.3, + } + } + #[inline] + fn check_signature( + topics: &::RustType, + ) -> alloy_sol_types::Result<()> { + if topics.0 != Self::SIGNATURE_HASH { + return Err( + alloy_sol_types::Error::invalid_event_signature_hash( + Self::SIGNATURE, + topics.0, + Self::SIGNATURE_HASH, + ), + ); + } + Ok(()) + } + #[inline] + fn tokenize_body(&self) -> Self::DataToken<'_> { + () + } + #[inline] + fn topics(&self) -> ::RustType { + ( + Self::SIGNATURE_HASH.into(), + self.role.clone(), + self.account.clone(), + self.sender.clone(), + ) + } + #[inline] + fn encode_topics_raw( + &self, + out: &mut [alloy_sol_types::abi::token::WordToken], + ) -> alloy_sol_types::Result<()> { + if out.len() < ::COUNT { + return Err(alloy_sol_types::Error::Overrun); + } + out[0usize] = alloy_sol_types::abi::token::WordToken( + Self::SIGNATURE_HASH, + ); + out[1usize] = as alloy_sol_types::EventTopic>::encode_topic(&self.role); + out[2usize] = ::encode_topic( + &self.account, + ); + out[3usize] = ::encode_topic( + &self.sender, + ); + Ok(()) + } + } + #[automatically_derived] + impl alloy_sol_types::private::IntoLogData for RoleGranted { + fn to_log_data(&self) -> alloy_sol_types::private::LogData { + From::from(self) + } + fn into_log_data(self) -> alloy_sol_types::private::LogData { + From::from(&self) + } + } + #[automatically_derived] + impl From<&RoleGranted> for alloy_sol_types::private::LogData { + #[inline] + fn from(this: &RoleGranted) -> alloy_sol_types::private::LogData { + alloy_sol_types::SolEvent::encode_log_data(this) + } + } + }; + #[derive(serde::Serialize, serde::Deserialize)] + #[derive(Default, Debug, PartialEq, Eq, Hash)] + /**Event with signature `RoleRevoked(bytes32,address,address)` and selector `0xf6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b`. +```solidity +event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender); +```*/ + #[allow( + non_camel_case_types, + non_snake_case, + clippy::pub_underscore_fields, + clippy::style + )] + #[derive(Clone)] + pub struct RoleRevoked { + #[allow(missing_docs)] + pub role: alloy::sol_types::private::FixedBytes<32>, + #[allow(missing_docs)] + pub account: alloy::sol_types::private::Address, + #[allow(missing_docs)] + pub sender: alloy::sol_types::private::Address, + } + #[allow( + non_camel_case_types, + non_snake_case, + clippy::pub_underscore_fields, + clippy::style + )] + const _: () = { + use alloy::sol_types as alloy_sol_types; + #[automatically_derived] + impl alloy_sol_types::SolEvent for RoleRevoked { + type DataTuple<'a> = (); + type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + type TopicList = ( + alloy_sol_types::sol_data::FixedBytes<32>, + alloy::sol_types::sol_data::FixedBytes<32>, + alloy::sol_types::sol_data::Address, + alloy::sol_types::sol_data::Address, + ); + const SIGNATURE: &'static str = "RoleRevoked(bytes32,address,address)"; + const SIGNATURE_HASH: alloy_sol_types::private::B256 = alloy_sol_types::private::B256::new([ + 246u8, 57u8, 31u8, 92u8, 50u8, 217u8, 198u8, 157u8, 42u8, 71u8, 234u8, + 103u8, 11u8, 68u8, 41u8, 116u8, 181u8, 57u8, 53u8, 209u8, 237u8, 199u8, + 253u8, 100u8, 235u8, 33u8, 224u8, 71u8, 168u8, 57u8, 23u8, 27u8, + ]); + const ANONYMOUS: bool = false; + #[allow(unused_variables)] + #[inline] + fn new( + topics: ::RustType, + data: as alloy_sol_types::SolType>::RustType, + ) -> Self { + Self { + role: topics.1, + account: topics.2, + sender: topics.3, + } + } + #[inline] + fn check_signature( + topics: &::RustType, + ) -> alloy_sol_types::Result<()> { + if topics.0 != Self::SIGNATURE_HASH { + return Err( + alloy_sol_types::Error::invalid_event_signature_hash( + Self::SIGNATURE, + topics.0, + Self::SIGNATURE_HASH, + ), + ); + } + Ok(()) + } + #[inline] + fn tokenize_body(&self) -> Self::DataToken<'_> { + () + } + #[inline] + fn topics(&self) -> ::RustType { + ( + Self::SIGNATURE_HASH.into(), + self.role.clone(), + self.account.clone(), + self.sender.clone(), + ) + } + #[inline] + fn encode_topics_raw( + &self, + out: &mut [alloy_sol_types::abi::token::WordToken], + ) -> alloy_sol_types::Result<()> { + if out.len() < ::COUNT { + return Err(alloy_sol_types::Error::Overrun); + } + out[0usize] = alloy_sol_types::abi::token::WordToken( + Self::SIGNATURE_HASH, + ); + out[1usize] = as alloy_sol_types::EventTopic>::encode_topic(&self.role); + out[2usize] = ::encode_topic( + &self.account, + ); + out[3usize] = ::encode_topic( + &self.sender, + ); + Ok(()) + } + } + #[automatically_derived] + impl alloy_sol_types::private::IntoLogData for RoleRevoked { + fn to_log_data(&self) -> alloy_sol_types::private::LogData { + From::from(self) + } + fn into_log_data(self) -> alloy_sol_types::private::LogData { + From::from(&self) + } + } + #[automatically_derived] + impl From<&RoleRevoked> for alloy_sol_types::private::LogData { + #[inline] + fn from(this: &RoleRevoked) -> alloy_sol_types::private::LogData { + alloy_sol_types::SolEvent::encode_log_data(this) + } + } + }; + #[derive(serde::Serialize, serde::Deserialize)] + #[derive(Default, Debug, PartialEq, Eq, Hash)] + /**Event with signature `Unpaused(address)` and selector `0x5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa`. +```solidity +event Unpaused(address account); +```*/ + #[allow( + non_camel_case_types, + non_snake_case, + clippy::pub_underscore_fields, + clippy::style + )] + #[derive(Clone)] + pub struct Unpaused { + #[allow(missing_docs)] + pub account: alloy::sol_types::private::Address, + } + #[allow( + non_camel_case_types, + non_snake_case, + clippy::pub_underscore_fields, + clippy::style + )] + const _: () = { + use alloy::sol_types as alloy_sol_types; + #[automatically_derived] + impl alloy_sol_types::SolEvent for Unpaused { + type DataTuple<'a> = (alloy::sol_types::sol_data::Address,); + type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + type TopicList = (alloy_sol_types::sol_data::FixedBytes<32>,); + const SIGNATURE: &'static str = "Unpaused(address)"; + const SIGNATURE_HASH: alloy_sol_types::private::B256 = alloy_sol_types::private::B256::new([ + 93u8, 185u8, 238u8, 10u8, 73u8, 91u8, 242u8, 230u8, 255u8, 156u8, 145u8, + 167u8, 131u8, 76u8, 27u8, 164u8, 253u8, 210u8, 68u8, 165u8, 232u8, 170u8, + 78u8, 83u8, 123u8, 211u8, 138u8, 234u8, 228u8, 176u8, 115u8, 170u8, + ]); + const ANONYMOUS: bool = false; + #[allow(unused_variables)] + #[inline] + fn new( + topics: ::RustType, + data: as alloy_sol_types::SolType>::RustType, + ) -> Self { + Self { account: data.0 } + } + #[inline] + fn check_signature( + topics: &::RustType, + ) -> alloy_sol_types::Result<()> { + if topics.0 != Self::SIGNATURE_HASH { + return Err( + alloy_sol_types::Error::invalid_event_signature_hash( + Self::SIGNATURE, + topics.0, + Self::SIGNATURE_HASH, + ), + ); + } + Ok(()) + } + #[inline] + fn tokenize_body(&self) -> Self::DataToken<'_> { + ( + ::tokenize( + &self.account, + ), + ) + } + #[inline] + fn topics(&self) -> ::RustType { + (Self::SIGNATURE_HASH.into(),) + } + #[inline] + fn encode_topics_raw( + &self, + out: &mut [alloy_sol_types::abi::token::WordToken], + ) -> alloy_sol_types::Result<()> { + if out.len() < ::COUNT { + return Err(alloy_sol_types::Error::Overrun); + } + out[0usize] = alloy_sol_types::abi::token::WordToken( + Self::SIGNATURE_HASH, + ); + Ok(()) + } + } + #[automatically_derived] + impl alloy_sol_types::private::IntoLogData for Unpaused { + fn to_log_data(&self) -> alloy_sol_types::private::LogData { + From::from(self) + } + fn into_log_data(self) -> alloy_sol_types::private::LogData { + From::from(&self) + } + } + #[automatically_derived] + impl From<&Unpaused> for alloy_sol_types::private::LogData { + #[inline] + fn from(this: &Unpaused) -> alloy_sol_types::private::LogData { + alloy_sol_types::SolEvent::encode_log_data(this) + } + } + }; + /**Constructor`. +```solidity +constructor(address _bridgeContract, IBridge.TokenLimits nativeTokenLimits, uint96 _sourceChainId); +```*/ + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] + #[derive(Clone)] + pub struct constructorCall { + #[allow(missing_docs)] + pub _bridgeContract: alloy::sol_types::private::Address, + #[allow(missing_docs)] + pub nativeTokenLimits: ::RustType, + #[allow(missing_docs)] + pub _sourceChainId: alloy::sol_types::private::primitives::aliases::U96, + } + const _: () = { + use alloy::sol_types as alloy_sol_types; + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = ( + alloy::sol_types::sol_data::Address, + IBridge::TokenLimits, + alloy::sol_types::sol_data::Uint<96>, + ); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = ( + alloy::sol_types::private::Address, + ::RustType, + alloy::sol_types::private::primitives::aliases::U96, + ); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: constructorCall) -> Self { + ( + value._bridgeContract, + value.nativeTokenLimits, + value._sourceChainId, + ) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for constructorCall { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { + _bridgeContract: tuple.0, + nativeTokenLimits: tuple.1, + _sourceChainId: tuple.2, + } + } + } + } + #[automatically_derived] + impl alloy_sol_types::SolConstructor for constructorCall { + type Parameters<'a> = ( + alloy::sol_types::sol_data::Address, + IBridge::TokenLimits, + alloy::sol_types::sol_data::Uint<96>, + ); + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + #[inline] + fn new<'a>( + tuple: as alloy_sol_types::SolType>::RustType, + ) -> Self { + tuple.into() + } + #[inline] + fn tokenize(&self) -> Self::Token<'_> { + ( + ::tokenize( + &self._bridgeContract, + ), + ::tokenize( + &self.nativeTokenLimits, + ), + as alloy_sol_types::SolType>::tokenize(&self._sourceChainId), + ) + } + } + }; + #[derive(serde::Serialize, serde::Deserialize)] + #[derive(Default, Debug, PartialEq, Eq, Hash)] + /**Function with signature `DEFAULT_ADMIN_ROLE()` and selector `0xa217fddf`. +```solidity +function DEFAULT_ADMIN_ROLE() external view returns (bytes32); +```*/ + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] + #[derive(Clone)] + pub struct DEFAULT_ADMIN_ROLECall; + #[derive(serde::Serialize, serde::Deserialize)] + #[derive(Default, Debug, PartialEq, Eq, Hash)] + ///Container type for the return parameters of the [`DEFAULT_ADMIN_ROLE()`](DEFAULT_ADMIN_ROLECall) function. + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] + #[derive(Clone)] + pub struct DEFAULT_ADMIN_ROLEReturn { + #[allow(missing_docs)] + pub _0: alloy::sol_types::private::FixedBytes<32>, + } + #[allow( + non_camel_case_types, + non_snake_case, + clippy::pub_underscore_fields, + clippy::style + )] + const _: () = { + use alloy::sol_types as alloy_sol_types; + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From + for UnderlyingRustTuple<'_> { + fn from(value: DEFAULT_ADMIN_ROLECall) -> Self { + () + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> + for DEFAULT_ADMIN_ROLECall { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self + } + } + } + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::FixedBytes<32>,); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (alloy::sol_types::private::FixedBytes<32>,); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From + for UnderlyingRustTuple<'_> { + fn from(value: DEFAULT_ADMIN_ROLEReturn) -> Self { + (value._0,) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> + for DEFAULT_ADMIN_ROLEReturn { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { _0: tuple.0 } + } + } + } + #[automatically_derived] + impl alloy_sol_types::SolCall for DEFAULT_ADMIN_ROLECall { + type Parameters<'a> = (); + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Return = alloy::sol_types::private::FixedBytes<32>; + type ReturnTuple<'a> = (alloy::sol_types::sol_data::FixedBytes<32>,); + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SIGNATURE: &'static str = "DEFAULT_ADMIN_ROLE()"; + const SELECTOR: [u8; 4] = [162u8, 23u8, 253u8, 223u8]; + #[inline] + fn new<'a>( + tuple: as alloy_sol_types::SolType>::RustType, + ) -> Self { + tuple.into() + } + #[inline] + fn tokenize(&self) -> Self::Token<'_> { + () + } + #[inline] + fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { + ( + as alloy_sol_types::SolType>::tokenize(ret), + ) + } + #[inline] + fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence(data) + .map(|r| { + let r: DEFAULT_ADMIN_ROLEReturn = r.into(); + r._0 + }) + } + #[inline] + fn abi_decode_returns_validate( + data: &[u8], + ) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence_validate(data) + .map(|r| { + let r: DEFAULT_ADMIN_ROLEReturn = r.into(); + r._0 + }) + } + } + }; + #[derive(serde::Serialize, serde::Deserialize)] + #[derive(Default, Debug, PartialEq, Eq, Hash)] + /**Function with signature `PAUSER_ROLE()` and selector `0xe63ab1e9`. +```solidity +function PAUSER_ROLE() external view returns (bytes32); +```*/ + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] + #[derive(Clone)] + pub struct PAUSER_ROLECall; + #[derive(serde::Serialize, serde::Deserialize)] + #[derive(Default, Debug, PartialEq, Eq, Hash)] + ///Container type for the return parameters of the [`PAUSER_ROLE()`](PAUSER_ROLECall) function. + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] + #[derive(Clone)] + pub struct PAUSER_ROLEReturn { + #[allow(missing_docs)] + pub _0: alloy::sol_types::private::FixedBytes<32>, + } + #[allow( + non_camel_case_types, + non_snake_case, + clippy::pub_underscore_fields, + clippy::style + )] + const _: () = { + use alloy::sol_types as alloy_sol_types; + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: PAUSER_ROLECall) -> Self { + () + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for PAUSER_ROLECall { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self + } + } + } + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::FixedBytes<32>,); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (alloy::sol_types::private::FixedBytes<32>,); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: PAUSER_ROLEReturn) -> Self { + (value._0,) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for PAUSER_ROLEReturn { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { _0: tuple.0 } + } + } + } + #[automatically_derived] + impl alloy_sol_types::SolCall for PAUSER_ROLECall { + type Parameters<'a> = (); + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Return = alloy::sol_types::private::FixedBytes<32>; + type ReturnTuple<'a> = (alloy::sol_types::sol_data::FixedBytes<32>,); + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SIGNATURE: &'static str = "PAUSER_ROLE()"; + const SELECTOR: [u8; 4] = [230u8, 58u8, 177u8, 233u8]; + #[inline] + fn new<'a>( + tuple: as alloy_sol_types::SolType>::RustType, + ) -> Self { + tuple.into() + } + #[inline] + fn tokenize(&self) -> Self::Token<'_> { + () + } + #[inline] + fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { + ( + as alloy_sol_types::SolType>::tokenize(ret), + ) + } + #[inline] + fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence(data) + .map(|r| { + let r: PAUSER_ROLEReturn = r.into(); + r._0 + }) + } + #[inline] + fn abi_decode_returns_validate( + data: &[u8], + ) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence_validate(data) + .map(|r| { + let r: PAUSER_ROLEReturn = r.into(); + r._0 + }) + } + } + }; + #[derive(serde::Serialize, serde::Deserialize)] + #[derive(Default, Debug, PartialEq, Eq, Hash)] + /**Function with signature `bridgeContract()` and selector `0xcd596583`. +```solidity +function bridgeContract() external view returns (address); +```*/ + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] + #[derive(Clone)] + pub struct bridgeContractCall; + #[derive(serde::Serialize, serde::Deserialize)] + #[derive(Default, Debug, PartialEq, Eq, Hash)] + ///Container type for the return parameters of the [`bridgeContract()`](bridgeContractCall) function. + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] + #[derive(Clone)] + pub struct bridgeContractReturn { + #[allow(missing_docs)] + pub _0: alloy::sol_types::private::Address, + } + #[allow( + non_camel_case_types, + non_snake_case, + clippy::pub_underscore_fields, + clippy::style + )] + const _: () = { + use alloy::sol_types as alloy_sol_types; + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: bridgeContractCall) -> Self { + () + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for bridgeContractCall { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self + } + } + } + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Address,); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (alloy::sol_types::private::Address,); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From + for UnderlyingRustTuple<'_> { + fn from(value: bridgeContractReturn) -> Self { + (value._0,) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> + for bridgeContractReturn { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { _0: tuple.0 } + } + } + } + #[automatically_derived] + impl alloy_sol_types::SolCall for bridgeContractCall { + type Parameters<'a> = (); + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Return = alloy::sol_types::private::Address; + type ReturnTuple<'a> = (alloy::sol_types::sol_data::Address,); + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SIGNATURE: &'static str = "bridgeContract()"; + const SELECTOR: [u8; 4] = [205u8, 89u8, 101u8, 131u8]; + #[inline] + fn new<'a>( + tuple: as alloy_sol_types::SolType>::RustType, + ) -> Self { + tuple.into() + } + #[inline] + fn tokenize(&self) -> Self::Token<'_> { + () + } + #[inline] + fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { + ( + ::tokenize( + ret, + ), + ) + } + #[inline] + fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence(data) + .map(|r| { + let r: bridgeContractReturn = r.into(); + r._0 + }) + } + #[inline] + fn abi_decode_returns_validate( + data: &[u8], + ) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence_validate(data) + .map(|r| { + let r: bridgeContractReturn = r.into(); + r._0 + }) + } + } + }; + #[derive(serde::Serialize, serde::Deserialize)] + #[derive(Default, Debug, PartialEq, Eq, Hash)] + /**Function with signature `claim(uint256,address,uint256)` and selector `0x5e737548`. +```solidity +function claim(uint256 id, address token, uint256 blockNumber) external; +```*/ + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] + #[derive(Clone)] + pub struct claimCall { + #[allow(missing_docs)] + pub id: alloy::sol_types::private::primitives::aliases::U256, + #[allow(missing_docs)] + pub token: alloy::sol_types::private::Address, + #[allow(missing_docs)] + pub blockNumber: alloy::sol_types::private::primitives::aliases::U256, + } + ///Container type for the return parameters of the [`claim(uint256,address,uint256)`](claimCall) function. + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] + #[derive(Clone)] + pub struct claimReturn {} + #[allow( + non_camel_case_types, + non_snake_case, + clippy::pub_underscore_fields, + clippy::style + )] + const _: () = { + use alloy::sol_types as alloy_sol_types; + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = ( + alloy::sol_types::sol_data::Uint<256>, + alloy::sol_types::sol_data::Address, + alloy::sol_types::sol_data::Uint<256>, + ); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = ( + alloy::sol_types::private::primitives::aliases::U256, + alloy::sol_types::private::Address, + alloy::sol_types::private::primitives::aliases::U256, + ); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: claimCall) -> Self { + (value.id, value.token, value.blockNumber) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for claimCall { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { + id: tuple.0, + token: tuple.1, + blockNumber: tuple.2, + } + } + } + } + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: claimReturn) -> Self { + () + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for claimReturn { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self {} + } + } + } + impl claimReturn { + fn _tokenize( + &self, + ) -> ::ReturnToken<'_> { + () + } + } + #[automatically_derived] + impl alloy_sol_types::SolCall for claimCall { + type Parameters<'a> = ( + alloy::sol_types::sol_data::Uint<256>, + alloy::sol_types::sol_data::Address, + alloy::sol_types::sol_data::Uint<256>, + ); + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Return = claimReturn; + type ReturnTuple<'a> = (); + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SIGNATURE: &'static str = "claim(uint256,address,uint256)"; + const SELECTOR: [u8; 4] = [94u8, 115u8, 117u8, 72u8]; + #[inline] + fn new<'a>( + tuple: as alloy_sol_types::SolType>::RustType, + ) -> Self { + tuple.into() + } + #[inline] + fn tokenize(&self) -> Self::Token<'_> { + ( + as alloy_sol_types::SolType>::tokenize(&self.id), + ::tokenize( + &self.token, + ), + as alloy_sol_types::SolType>::tokenize(&self.blockNumber), + ) + } + #[inline] + fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { + claimReturn::_tokenize(ret) + } + #[inline] + fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence(data) + .map(Into::into) + } + #[inline] + fn abi_decode_returns_validate( + data: &[u8], + ) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence_validate(data) + .map(Into::into) + } + } + }; + #[derive(serde::Serialize, serde::Deserialize)] + #[derive(Default, Debug, PartialEq, Eq, Hash)] + /**Function with signature `claimNative(uint256,uint256)` and selector `0xac894391`. +```solidity +function claimNative(uint256 id, uint256 blockNumber) external; +```*/ + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] + #[derive(Clone)] + pub struct claimNativeCall { + #[allow(missing_docs)] + pub id: alloy::sol_types::private::primitives::aliases::U256, + #[allow(missing_docs)] + pub blockNumber: alloy::sol_types::private::primitives::aliases::U256, + } + ///Container type for the return parameters of the [`claimNative(uint256,uint256)`](claimNativeCall) function. + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] + #[derive(Clone)] + pub struct claimNativeReturn {} + #[allow( + non_camel_case_types, + non_snake_case, + clippy::pub_underscore_fields, + clippy::style + )] + const _: () = { + use alloy::sol_types as alloy_sol_types; + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = ( + alloy::sol_types::sol_data::Uint<256>, + alloy::sol_types::sol_data::Uint<256>, + ); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = ( + alloy::sol_types::private::primitives::aliases::U256, + alloy::sol_types::private::primitives::aliases::U256, + ); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: claimNativeCall) -> Self { + (value.id, value.blockNumber) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for claimNativeCall { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { + id: tuple.0, + blockNumber: tuple.1, + } + } + } + } + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: claimNativeReturn) -> Self { + () + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for claimNativeReturn { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self {} + } + } + } + impl claimNativeReturn { + fn _tokenize( + &self, + ) -> ::ReturnToken<'_> { + () + } + } + #[automatically_derived] + impl alloy_sol_types::SolCall for claimNativeCall { + type Parameters<'a> = ( + alloy::sol_types::sol_data::Uint<256>, + alloy::sol_types::sol_data::Uint<256>, + ); + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Return = claimNativeReturn; + type ReturnTuple<'a> = (); + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SIGNATURE: &'static str = "claimNative(uint256,uint256)"; + const SELECTOR: [u8; 4] = [172u8, 137u8, 67u8, 145u8]; + #[inline] + fn new<'a>( + tuple: as alloy_sol_types::SolType>::RustType, + ) -> Self { + tuple.into() + } + #[inline] + fn tokenize(&self) -> Self::Token<'_> { + ( + as alloy_sol_types::SolType>::tokenize(&self.id), + as alloy_sol_types::SolType>::tokenize(&self.blockNumber), + ) + } + #[inline] + fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { + claimNativeReturn::_tokenize(ret) + } + #[inline] + fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence(data) + .map(Into::into) + } + #[inline] + fn abi_decode_returns_validate( + data: &[u8], + ) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence_validate(data) + .map(Into::into) + } + } + }; + #[derive(serde::Serialize, serde::Deserialize)] + #[derive(Default, Debug, PartialEq, Eq, Hash)] + /**Function with signature `configureToken(address,(uint256,uint256,uint256))` and selector `0x9267b153`. +```solidity +function configureToken(address token, IBridge.TokenLimits memory limits) external; +```*/ + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] + #[derive(Clone)] + pub struct configureTokenCall { + #[allow(missing_docs)] + pub token: alloy::sol_types::private::Address, + #[allow(missing_docs)] + pub limits: ::RustType, + } + ///Container type for the return parameters of the [`configureToken(address,(uint256,uint256,uint256))`](configureTokenCall) function. + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] + #[derive(Clone)] + pub struct configureTokenReturn {} + #[allow( + non_camel_case_types, + non_snake_case, + clippy::pub_underscore_fields, + clippy::style + )] + const _: () = { + use alloy::sol_types as alloy_sol_types; + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = ( + alloy::sol_types::sol_data::Address, + IBridge::TokenLimits, + ); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = ( + alloy::sol_types::private::Address, + ::RustType, + ); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: configureTokenCall) -> Self { + (value.token, value.limits) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for configureTokenCall { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { + token: tuple.0, + limits: tuple.1, + } + } + } + } + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From + for UnderlyingRustTuple<'_> { + fn from(value: configureTokenReturn) -> Self { + () + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> + for configureTokenReturn { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self {} + } + } + } + impl configureTokenReturn { + fn _tokenize( + &self, + ) -> ::ReturnToken<'_> { + () + } + } + #[automatically_derived] + impl alloy_sol_types::SolCall for configureTokenCall { + type Parameters<'a> = ( + alloy::sol_types::sol_data::Address, + IBridge::TokenLimits, + ); + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Return = configureTokenReturn; + type ReturnTuple<'a> = (); + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SIGNATURE: &'static str = "configureToken(address,(uint256,uint256,uint256))"; + const SELECTOR: [u8; 4] = [146u8, 103u8, 177u8, 83u8]; + #[inline] + fn new<'a>( + tuple: as alloy_sol_types::SolType>::RustType, + ) -> Self { + tuple.into() + } + #[inline] + fn tokenize(&self) -> Self::Token<'_> { + ( + ::tokenize( + &self.token, + ), + ::tokenize( + &self.limits, + ), + ) + } + #[inline] + fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { + configureTokenReturn::_tokenize(ret) + } + #[inline] + fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence(data) + .map(Into::into) + } + #[inline] + fn abi_decode_returns_validate( + data: &[u8], + ) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence_validate(data) + .map(Into::into) + } + } + }; + #[derive(serde::Serialize, serde::Deserialize)] + #[derive(Default, Debug, PartialEq, Eq, Hash)] + /**Function with signature `createAndWhitelistMirrorToken(string,string,address,address,uint8,(uint256,uint256,uint256))` and selector `0xdf6b022b`. +```solidity +function createAndWhitelistMirrorToken(string memory tokenName, string memory tokenSymbol, address existingToken, address mirrorToken, uint8 mirrorTokenDecimals, IBridge.TokenLimits memory limits) external returns (address token); +```*/ + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] + #[derive(Clone)] + pub struct createAndWhitelistMirrorTokenCall { + #[allow(missing_docs)] + pub tokenName: alloy::sol_types::private::String, + #[allow(missing_docs)] + pub tokenSymbol: alloy::sol_types::private::String, + #[allow(missing_docs)] + pub existingToken: alloy::sol_types::private::Address, + #[allow(missing_docs)] + pub mirrorToken: alloy::sol_types::private::Address, + #[allow(missing_docs)] + pub mirrorTokenDecimals: u8, + #[allow(missing_docs)] + pub limits: ::RustType, + } + #[derive(serde::Serialize, serde::Deserialize)] + #[derive(Default, Debug, PartialEq, Eq, Hash)] + ///Container type for the return parameters of the [`createAndWhitelistMirrorToken(string,string,address,address,uint8,(uint256,uint256,uint256))`](createAndWhitelistMirrorTokenCall) function. + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] + #[derive(Clone)] + pub struct createAndWhitelistMirrorTokenReturn { + #[allow(missing_docs)] + pub token: alloy::sol_types::private::Address, + } + #[allow( + non_camel_case_types, + non_snake_case, + clippy::pub_underscore_fields, + clippy::style + )] + const _: () = { + use alloy::sol_types as alloy_sol_types; + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = ( + alloy::sol_types::sol_data::String, + alloy::sol_types::sol_data::String, + alloy::sol_types::sol_data::Address, + alloy::sol_types::sol_data::Address, + alloy::sol_types::sol_data::Uint<8>, + IBridge::TokenLimits, + ); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = ( + alloy::sol_types::private::String, + alloy::sol_types::private::String, + alloy::sol_types::private::Address, + alloy::sol_types::private::Address, + u8, + ::RustType, + ); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From + for UnderlyingRustTuple<'_> { + fn from(value: createAndWhitelistMirrorTokenCall) -> Self { + ( + value.tokenName, + value.tokenSymbol, + value.existingToken, + value.mirrorToken, + value.mirrorTokenDecimals, + value.limits, + ) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> + for createAndWhitelistMirrorTokenCall { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { + tokenName: tuple.0, + tokenSymbol: tuple.1, + existingToken: tuple.2, + mirrorToken: tuple.3, + mirrorTokenDecimals: tuple.4, + limits: tuple.5, + } + } + } + } + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Address,); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (alloy::sol_types::private::Address,); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From + for UnderlyingRustTuple<'_> { + fn from(value: createAndWhitelistMirrorTokenReturn) -> Self { + (value.token,) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> + for createAndWhitelistMirrorTokenReturn { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { token: tuple.0 } + } + } + } + #[automatically_derived] + impl alloy_sol_types::SolCall for createAndWhitelistMirrorTokenCall { + type Parameters<'a> = ( + alloy::sol_types::sol_data::String, + alloy::sol_types::sol_data::String, + alloy::sol_types::sol_data::Address, + alloy::sol_types::sol_data::Address, + alloy::sol_types::sol_data::Uint<8>, + IBridge::TokenLimits, + ); + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Return = alloy::sol_types::private::Address; + type ReturnTuple<'a> = (alloy::sol_types::sol_data::Address,); + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SIGNATURE: &'static str = "createAndWhitelistMirrorToken(string,string,address,address,uint8,(uint256,uint256,uint256))"; + const SELECTOR: [u8; 4] = [223u8, 107u8, 2u8, 43u8]; + #[inline] + fn new<'a>( + tuple: as alloy_sol_types::SolType>::RustType, + ) -> Self { + tuple.into() + } + #[inline] + fn tokenize(&self) -> Self::Token<'_> { + ( + ::tokenize( + &self.tokenName, + ), + ::tokenize( + &self.tokenSymbol, + ), + ::tokenize( + &self.existingToken, + ), + ::tokenize( + &self.mirrorToken, + ), + as alloy_sol_types::SolType>::tokenize(&self.mirrorTokenDecimals), + ::tokenize( + &self.limits, + ), + ) + } + #[inline] + fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { + ( + ::tokenize( + ret, + ), + ) + } + #[inline] + fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence(data) + .map(|r| { + let r: createAndWhitelistMirrorTokenReturn = r.into(); + r.token + }) + } + #[inline] + fn abi_decode_returns_validate( + data: &[u8], + ) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence_validate(data) + .map(|r| { + let r: createAndWhitelistMirrorTokenReturn = r.into(); + r.token + }) + } + } + }; + #[derive(serde::Serialize, serde::Deserialize)] + #[derive(Default, Debug, PartialEq, Eq, Hash)] + /**Function with signature `deposit(address,uint256,address)` and selector `0xf45346dc`. +```solidity +function deposit(address token, uint256 amount, address to) external returns (uint256); +```*/ + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] + #[derive(Clone)] + pub struct depositCall { + #[allow(missing_docs)] + pub token: alloy::sol_types::private::Address, + #[allow(missing_docs)] + pub amount: alloy::sol_types::private::primitives::aliases::U256, + #[allow(missing_docs)] + pub to: alloy::sol_types::private::Address, + } + #[derive(serde::Serialize, serde::Deserialize)] + #[derive(Default, Debug, PartialEq, Eq, Hash)] + ///Container type for the return parameters of the [`deposit(address,uint256,address)`](depositCall) function. + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] + #[derive(Clone)] + pub struct depositReturn { + #[allow(missing_docs)] + pub _0: alloy::sol_types::private::primitives::aliases::U256, + } + #[allow( + non_camel_case_types, + non_snake_case, + clippy::pub_underscore_fields, + clippy::style + )] + const _: () = { + use alloy::sol_types as alloy_sol_types; + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = ( + alloy::sol_types::sol_data::Address, + alloy::sol_types::sol_data::Uint<256>, + alloy::sol_types::sol_data::Address, + ); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = ( + alloy::sol_types::private::Address, + alloy::sol_types::private::primitives::aliases::U256, + alloy::sol_types::private::Address, + ); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: depositCall) -> Self { + (value.token, value.amount, value.to) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for depositCall { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { + token: tuple.0, + amount: tuple.1, + to: tuple.2, + } + } + } + } + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Uint<256>,); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = ( + alloy::sol_types::private::primitives::aliases::U256, + ); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: depositReturn) -> Self { + (value._0,) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for depositReturn { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { _0: tuple.0 } + } + } + } + #[automatically_derived] + impl alloy_sol_types::SolCall for depositCall { + type Parameters<'a> = ( + alloy::sol_types::sol_data::Address, + alloy::sol_types::sol_data::Uint<256>, + alloy::sol_types::sol_data::Address, + ); + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Return = alloy::sol_types::private::primitives::aliases::U256; + type ReturnTuple<'a> = (alloy::sol_types::sol_data::Uint<256>,); + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SIGNATURE: &'static str = "deposit(address,uint256,address)"; + const SELECTOR: [u8; 4] = [244u8, 83u8, 70u8, 220u8]; + #[inline] + fn new<'a>( + tuple: as alloy_sol_types::SolType>::RustType, + ) -> Self { + tuple.into() + } + #[inline] + fn tokenize(&self) -> Self::Token<'_> { + ( + ::tokenize( + &self.token, + ), + as alloy_sol_types::SolType>::tokenize(&self.amount), + ::tokenize( + &self.to, + ), + ) + } + #[inline] + fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { + ( + as alloy_sol_types::SolType>::tokenize(ret), + ) + } + #[inline] + fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence(data) + .map(|r| { + let r: depositReturn = r.into(); + r._0 + }) + } + #[inline] + fn abi_decode_returns_validate( + data: &[u8], + ) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence_validate(data) + .map(|r| { + let r: depositReturn = r.into(); + r._0 + }) + } + } + }; + #[derive(serde::Serialize, serde::Deserialize)] + #[derive(Default, Debug, PartialEq, Eq, Hash)] + /**Function with signature `depositNative(address)` and selector `0x33bb7f91`. +```solidity +function depositNative(address to) external payable returns (uint256); +```*/ + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] + #[derive(Clone)] + pub struct depositNativeCall { + #[allow(missing_docs)] + pub to: alloy::sol_types::private::Address, + } + #[derive(serde::Serialize, serde::Deserialize)] + #[derive(Default, Debug, PartialEq, Eq, Hash)] + ///Container type for the return parameters of the [`depositNative(address)`](depositNativeCall) function. + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] + #[derive(Clone)] + pub struct depositNativeReturn { + #[allow(missing_docs)] + pub _0: alloy::sol_types::private::primitives::aliases::U256, + } + #[allow( + non_camel_case_types, + non_snake_case, + clippy::pub_underscore_fields, + clippy::style + )] + const _: () = { + use alloy::sol_types as alloy_sol_types; + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Address,); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (alloy::sol_types::private::Address,); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: depositNativeCall) -> Self { + (value.to,) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for depositNativeCall { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { to: tuple.0 } + } + } + } + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Uint<256>,); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = ( + alloy::sol_types::private::primitives::aliases::U256, + ); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: depositNativeReturn) -> Self { + (value._0,) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for depositNativeReturn { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { _0: tuple.0 } + } + } + } + #[automatically_derived] + impl alloy_sol_types::SolCall for depositNativeCall { + type Parameters<'a> = (alloy::sol_types::sol_data::Address,); + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Return = alloy::sol_types::private::primitives::aliases::U256; + type ReturnTuple<'a> = (alloy::sol_types::sol_data::Uint<256>,); + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SIGNATURE: &'static str = "depositNative(address)"; + const SELECTOR: [u8; 4] = [51u8, 187u8, 127u8, 145u8]; + #[inline] + fn new<'a>( + tuple: as alloy_sol_types::SolType>::RustType, + ) -> Self { + tuple.into() + } + #[inline] + fn tokenize(&self) -> Self::Token<'_> { + ( + ::tokenize( + &self.to, + ), + ) + } + #[inline] + fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { + ( + as alloy_sol_types::SolType>::tokenize(ret), + ) + } + #[inline] + fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence(data) + .map(|r| { + let r: depositNativeReturn = r.into(); + r._0 + }) + } + #[inline] + fn abi_decode_returns_validate( + data: &[u8], + ) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence_validate(data) + .map(|r| { + let r: depositNativeReturn = r.into(); + r._0 + }) + } + } + }; + #[derive(serde::Serialize, serde::Deserialize)] + #[derive(Default, Debug, PartialEq, Eq, Hash)] + /**Function with signature `getRoleAdmin(bytes32)` and selector `0x248a9ca3`. +```solidity +function getRoleAdmin(bytes32 role) external view returns (bytes32); +```*/ + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] + #[derive(Clone)] + pub struct getRoleAdminCall { + #[allow(missing_docs)] + pub role: alloy::sol_types::private::FixedBytes<32>, + } + #[derive(serde::Serialize, serde::Deserialize)] + #[derive(Default, Debug, PartialEq, Eq, Hash)] + ///Container type for the return parameters of the [`getRoleAdmin(bytes32)`](getRoleAdminCall) function. + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] + #[derive(Clone)] + pub struct getRoleAdminReturn { + #[allow(missing_docs)] + pub _0: alloy::sol_types::private::FixedBytes<32>, + } + #[allow( + non_camel_case_types, + non_snake_case, + clippy::pub_underscore_fields, + clippy::style + )] + const _: () = { + use alloy::sol_types as alloy_sol_types; + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::FixedBytes<32>,); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (alloy::sol_types::private::FixedBytes<32>,); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: getRoleAdminCall) -> Self { + (value.role,) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for getRoleAdminCall { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { role: tuple.0 } + } + } + } + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::FixedBytes<32>,); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (alloy::sol_types::private::FixedBytes<32>,); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: getRoleAdminReturn) -> Self { + (value._0,) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for getRoleAdminReturn { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { _0: tuple.0 } + } + } + } + #[automatically_derived] + impl alloy_sol_types::SolCall for getRoleAdminCall { + type Parameters<'a> = (alloy::sol_types::sol_data::FixedBytes<32>,); + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Return = alloy::sol_types::private::FixedBytes<32>; + type ReturnTuple<'a> = (alloy::sol_types::sol_data::FixedBytes<32>,); + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SIGNATURE: &'static str = "getRoleAdmin(bytes32)"; + const SELECTOR: [u8; 4] = [36u8, 138u8, 156u8, 163u8]; + #[inline] + fn new<'a>( + tuple: as alloy_sol_types::SolType>::RustType, + ) -> Self { + tuple.into() + } + #[inline] + fn tokenize(&self) -> Self::Token<'_> { + ( + as alloy_sol_types::SolType>::tokenize(&self.role), + ) + } + #[inline] + fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { + ( + as alloy_sol_types::SolType>::tokenize(ret), + ) + } + #[inline] + fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence(data) + .map(|r| { + let r: getRoleAdminReturn = r.into(); + r._0 + }) + } + #[inline] + fn abi_decode_returns_validate( + data: &[u8], + ) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence_validate(data) + .map(|r| { + let r: getRoleAdminReturn = r.into(); + r._0 + }) + } + } + }; + #[derive(serde::Serialize, serde::Deserialize)] + #[derive(Default, Debug, PartialEq, Eq, Hash)] + /**Function with signature `grantRole(bytes32,address)` and selector `0x2f2ff15d`. +```solidity +function grantRole(bytes32 role, address account) external; +```*/ + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] + #[derive(Clone)] + pub struct grantRoleCall { + #[allow(missing_docs)] + pub role: alloy::sol_types::private::FixedBytes<32>, + #[allow(missing_docs)] + pub account: alloy::sol_types::private::Address, + } + ///Container type for the return parameters of the [`grantRole(bytes32,address)`](grantRoleCall) function. + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] + #[derive(Clone)] + pub struct grantRoleReturn {} + #[allow( + non_camel_case_types, + non_snake_case, + clippy::pub_underscore_fields, + clippy::style + )] + const _: () = { + use alloy::sol_types as alloy_sol_types; + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = ( + alloy::sol_types::sol_data::FixedBytes<32>, + alloy::sol_types::sol_data::Address, + ); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = ( + alloy::sol_types::private::FixedBytes<32>, + alloy::sol_types::private::Address, + ); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: grantRoleCall) -> Self { + (value.role, value.account) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for grantRoleCall { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { + role: tuple.0, + account: tuple.1, + } + } + } + } + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: grantRoleReturn) -> Self { + () + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for grantRoleReturn { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self {} + } + } + } + impl grantRoleReturn { + fn _tokenize( + &self, + ) -> ::ReturnToken<'_> { + () + } + } + #[automatically_derived] + impl alloy_sol_types::SolCall for grantRoleCall { + type Parameters<'a> = ( + alloy::sol_types::sol_data::FixedBytes<32>, + alloy::sol_types::sol_data::Address, + ); + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Return = grantRoleReturn; + type ReturnTuple<'a> = (); + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SIGNATURE: &'static str = "grantRole(bytes32,address)"; + const SELECTOR: [u8; 4] = [47u8, 47u8, 241u8, 93u8]; + #[inline] + fn new<'a>( + tuple: as alloy_sol_types::SolType>::RustType, + ) -> Self { + tuple.into() + } + #[inline] + fn tokenize(&self) -> Self::Token<'_> { + ( + as alloy_sol_types::SolType>::tokenize(&self.role), + ::tokenize( + &self.account, + ), + ) + } + #[inline] + fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { + grantRoleReturn::_tokenize(ret) + } + #[inline] + fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence(data) + .map(Into::into) + } + #[inline] + fn abi_decode_returns_validate( + data: &[u8], + ) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence_validate(data) + .map(Into::into) + } + } + }; + #[derive(serde::Serialize, serde::Deserialize)] + #[derive(Default, Debug, PartialEq, Eq, Hash)] + /**Function with signature `hasRole(bytes32,address)` and selector `0x91d14854`. +```solidity +function hasRole(bytes32 role, address account) external view returns (bool); +```*/ + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] + #[derive(Clone)] + pub struct hasRoleCall { + #[allow(missing_docs)] + pub role: alloy::sol_types::private::FixedBytes<32>, + #[allow(missing_docs)] + pub account: alloy::sol_types::private::Address, + } + #[derive(serde::Serialize, serde::Deserialize)] + #[derive(Default, Debug, PartialEq, Eq, Hash)] + ///Container type for the return parameters of the [`hasRole(bytes32,address)`](hasRoleCall) function. + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] + #[derive(Clone)] + pub struct hasRoleReturn { + #[allow(missing_docs)] + pub _0: bool, + } + #[allow( + non_camel_case_types, + non_snake_case, + clippy::pub_underscore_fields, + clippy::style + )] + const _: () = { + use alloy::sol_types as alloy_sol_types; + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = ( + alloy::sol_types::sol_data::FixedBytes<32>, + alloy::sol_types::sol_data::Address, + ); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = ( + alloy::sol_types::private::FixedBytes<32>, + alloy::sol_types::private::Address, + ); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: hasRoleCall) -> Self { + (value.role, value.account) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for hasRoleCall { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { + role: tuple.0, + account: tuple.1, + } + } + } + } + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Bool,); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (bool,); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: hasRoleReturn) -> Self { + (value._0,) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for hasRoleReturn { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { _0: tuple.0 } + } + } + } + #[automatically_derived] + impl alloy_sol_types::SolCall for hasRoleCall { + type Parameters<'a> = ( + alloy::sol_types::sol_data::FixedBytes<32>, + alloy::sol_types::sol_data::Address, + ); + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Return = bool; + type ReturnTuple<'a> = (alloy::sol_types::sol_data::Bool,); + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SIGNATURE: &'static str = "hasRole(bytes32,address)"; + const SELECTOR: [u8; 4] = [145u8, 209u8, 72u8, 84u8]; + #[inline] + fn new<'a>( + tuple: as alloy_sol_types::SolType>::RustType, + ) -> Self { + tuple.into() + } + #[inline] + fn tokenize(&self) -> Self::Token<'_> { + ( + as alloy_sol_types::SolType>::tokenize(&self.role), + ::tokenize( + &self.account, + ), + ) + } + #[inline] + fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { + ( + ::tokenize( + ret, + ), + ) + } + #[inline] + fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence(data) + .map(|r| { + let r: hasRoleReturn = r.into(); + r._0 + }) + } + #[inline] + fn abi_decode_returns_validate( + data: &[u8], + ) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence_validate(data) + .map(|r| { + let r: hasRoleReturn = r.into(); + r._0 + }) + } + } + }; + #[derive(serde::Serialize, serde::Deserialize)] + #[derive(Default, Debug, PartialEq, Eq, Hash)] + /**Function with signature `migrate(address)` and selector `0xce5494bb`. +```solidity +function migrate(address _newContract) external; +```*/ + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] + #[derive(Clone)] + pub struct migrateCall { + #[allow(missing_docs)] + pub _newContract: alloy::sol_types::private::Address, + } + ///Container type for the return parameters of the [`migrate(address)`](migrateCall) function. + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] + #[derive(Clone)] + pub struct migrateReturn {} + #[allow( + non_camel_case_types, + non_snake_case, + clippy::pub_underscore_fields, + clippy::style + )] + const _: () = { + use alloy::sol_types as alloy_sol_types; + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Address,); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (alloy::sol_types::private::Address,); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: migrateCall) -> Self { + (value._newContract,) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for migrateCall { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { _newContract: tuple.0 } + } + } + } + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: migrateReturn) -> Self { + () + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for migrateReturn { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self {} + } + } + } + impl migrateReturn { + fn _tokenize( + &self, + ) -> ::ReturnToken<'_> { + () + } + } + #[automatically_derived] + impl alloy_sol_types::SolCall for migrateCall { + type Parameters<'a> = (alloy::sol_types::sol_data::Address,); + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Return = migrateReturn; + type ReturnTuple<'a> = (); + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SIGNATURE: &'static str = "migrate(address)"; + const SELECTOR: [u8; 4] = [206u8, 84u8, 148u8, 187u8]; + #[inline] + fn new<'a>( + tuple: as alloy_sol_types::SolType>::RustType, + ) -> Self { + tuple.into() + } + #[inline] + fn tokenize(&self) -> Self::Token<'_> { + ( + ::tokenize( + &self._newContract, + ), + ) + } + #[inline] + fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { + migrateReturn::_tokenize(ret) + } + #[inline] + fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence(data) + .map(Into::into) + } + #[inline] + fn abi_decode_returns_validate( + data: &[u8], + ) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence_validate(data) + .map(Into::into) + } + } + }; + #[derive(serde::Serialize, serde::Deserialize)] + #[derive(Default, Debug, PartialEq, Eq, Hash)] + /**Function with signature `migratedContract()` and selector `0x7486fa4e`. +```solidity +function migratedContract() external view returns (address); +```*/ + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] + #[derive(Clone)] + pub struct migratedContractCall; + #[derive(serde::Serialize, serde::Deserialize)] + #[derive(Default, Debug, PartialEq, Eq, Hash)] + ///Container type for the return parameters of the [`migratedContract()`](migratedContractCall) function. + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] + #[derive(Clone)] + pub struct migratedContractReturn { + #[allow(missing_docs)] + pub _0: alloy::sol_types::private::Address, + } + #[allow( + non_camel_case_types, + non_snake_case, + clippy::pub_underscore_fields, + clippy::style + )] + const _: () = { + use alloy::sol_types as alloy_sol_types; + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From + for UnderlyingRustTuple<'_> { + fn from(value: migratedContractCall) -> Self { + () + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> + for migratedContractCall { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self + } + } + } + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Address,); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (alloy::sol_types::private::Address,); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From + for UnderlyingRustTuple<'_> { + fn from(value: migratedContractReturn) -> Self { + (value._0,) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> + for migratedContractReturn { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { _0: tuple.0 } + } + } + } + #[automatically_derived] + impl alloy_sol_types::SolCall for migratedContractCall { + type Parameters<'a> = (); + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Return = alloy::sol_types::private::Address; + type ReturnTuple<'a> = (alloy::sol_types::sol_data::Address,); + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SIGNATURE: &'static str = "migratedContract()"; + const SELECTOR: [u8; 4] = [116u8, 134u8, 250u8, 78u8]; + #[inline] + fn new<'a>( + tuple: as alloy_sol_types::SolType>::RustType, + ) -> Self { + tuple.into() + } + #[inline] + fn tokenize(&self) -> Self::Token<'_> { + () + } + #[inline] + fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { + ( + ::tokenize( + ret, + ), + ) + } + #[inline] + fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence(data) + .map(|r| { + let r: migratedContractReturn = r.into(); + r._0 + }) + } + #[inline] + fn abi_decode_returns_validate( + data: &[u8], + ) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence_validate(data) + .map(|r| { + let r: migratedContractReturn = r.into(); + r._0 + }) + } + } + }; + #[derive(serde::Serialize, serde::Deserialize)] + #[derive(Default, Debug, PartialEq, Eq, Hash)] + /**Function with signature `mirrorTokens(address)` and selector `0xfeaeb43e`. +```solidity +function mirrorTokens(address) external view returns (address); +```*/ + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] + #[derive(Clone)] + pub struct mirrorTokensCall(pub alloy::sol_types::private::Address); + #[derive(serde::Serialize, serde::Deserialize)] + #[derive(Default, Debug, PartialEq, Eq, Hash)] + ///Container type for the return parameters of the [`mirrorTokens(address)`](mirrorTokensCall) function. + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] + #[derive(Clone)] + pub struct mirrorTokensReturn { + #[allow(missing_docs)] + pub _0: alloy::sol_types::private::Address, + } + #[allow( + non_camel_case_types, + non_snake_case, + clippy::pub_underscore_fields, + clippy::style + )] + const _: () = { + use alloy::sol_types as alloy_sol_types; + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Address,); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (alloy::sol_types::private::Address,); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: mirrorTokensCall) -> Self { + (value.0,) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for mirrorTokensCall { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self(tuple.0) + } + } + } + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Address,); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (alloy::sol_types::private::Address,); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: mirrorTokensReturn) -> Self { + (value._0,) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for mirrorTokensReturn { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { _0: tuple.0 } + } + } + } + #[automatically_derived] + impl alloy_sol_types::SolCall for mirrorTokensCall { + type Parameters<'a> = (alloy::sol_types::sol_data::Address,); + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Return = alloy::sol_types::private::Address; + type ReturnTuple<'a> = (alloy::sol_types::sol_data::Address,); + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SIGNATURE: &'static str = "mirrorTokens(address)"; + const SELECTOR: [u8; 4] = [254u8, 174u8, 180u8, 62u8]; + #[inline] + fn new<'a>( + tuple: as alloy_sol_types::SolType>::RustType, + ) -> Self { + tuple.into() + } + #[inline] + fn tokenize(&self) -> Self::Token<'_> { + ( + ::tokenize( + &self.0, + ), + ) + } + #[inline] + fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { + ( + ::tokenize( + ret, + ), + ) + } + #[inline] + fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence(data) + .map(|r| { + let r: mirrorTokensReturn = r.into(); + r._0 + }) + } + #[inline] + fn abi_decode_returns_validate( + data: &[u8], + ) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence_validate(data) + .map(|r| { + let r: mirrorTokensReturn = r.into(); + r._0 + }) + } + } + }; + #[derive(serde::Serialize, serde::Deserialize)] + #[derive(Default, Debug, PartialEq, Eq, Hash)] + /**Function with signature `pause()` and selector `0x8456cb59`. +```solidity +function pause() external; +```*/ + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] + #[derive(Clone)] + pub struct pauseCall; + ///Container type for the return parameters of the [`pause()`](pauseCall) function. + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] + #[derive(Clone)] + pub struct pauseReturn {} + #[allow( + non_camel_case_types, + non_snake_case, + clippy::pub_underscore_fields, + clippy::style + )] + const _: () = { + use alloy::sol_types as alloy_sol_types; + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: pauseCall) -> Self { + () + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for pauseCall { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self + } + } + } + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: pauseReturn) -> Self { + () + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for pauseReturn { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self {} + } + } + } + impl pauseReturn { + fn _tokenize( + &self, + ) -> ::ReturnToken<'_> { + () + } + } + #[automatically_derived] + impl alloy_sol_types::SolCall for pauseCall { + type Parameters<'a> = (); + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Return = pauseReturn; + type ReturnTuple<'a> = (); + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SIGNATURE: &'static str = "pause()"; + const SELECTOR: [u8; 4] = [132u8, 86u8, 203u8, 89u8]; + #[inline] + fn new<'a>( + tuple: as alloy_sol_types::SolType>::RustType, + ) -> Self { + tuple.into() + } + #[inline] + fn tokenize(&self) -> Self::Token<'_> { + () + } + #[inline] + fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { + pauseReturn::_tokenize(ret) + } + #[inline] + fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence(data) + .map(Into::into) + } + #[inline] + fn abi_decode_returns_validate( + data: &[u8], + ) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence_validate(data) + .map(Into::into) + } + } + }; + #[derive(serde::Serialize, serde::Deserialize)] + #[derive(Default, Debug, PartialEq, Eq, Hash)] + /**Function with signature `paused()` and selector `0x5c975abb`. +```solidity +function paused() external view returns (bool); +```*/ + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] + #[derive(Clone)] + pub struct pausedCall; + #[derive(serde::Serialize, serde::Deserialize)] + #[derive(Default, Debug, PartialEq, Eq, Hash)] + ///Container type for the return parameters of the [`paused()`](pausedCall) function. + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] + #[derive(Clone)] + pub struct pausedReturn { + #[allow(missing_docs)] + pub _0: bool, + } + #[allow( + non_camel_case_types, + non_snake_case, + clippy::pub_underscore_fields, + clippy::style + )] + const _: () = { + use alloy::sol_types as alloy_sol_types; + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: pausedCall) -> Self { + () + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for pausedCall { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self + } + } + } + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Bool,); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (bool,); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: pausedReturn) -> Self { + (value._0,) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for pausedReturn { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { _0: tuple.0 } + } + } + } + #[automatically_derived] + impl alloy_sol_types::SolCall for pausedCall { + type Parameters<'a> = (); + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Return = bool; + type ReturnTuple<'a> = (alloy::sol_types::sol_data::Bool,); + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SIGNATURE: &'static str = "paused()"; + const SELECTOR: [u8; 4] = [92u8, 151u8, 90u8, 187u8]; + #[inline] + fn new<'a>( + tuple: as alloy_sol_types::SolType>::RustType, + ) -> Self { + tuple.into() + } + #[inline] + fn tokenize(&self) -> Self::Token<'_> { + () + } + #[inline] + fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { + ( + ::tokenize( + ret, + ), + ) + } + #[inline] + fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence(data) + .map(|r| { + let r: pausedReturn = r.into(); + r._0 + }) + } + #[inline] + fn abi_decode_returns_validate( + data: &[u8], + ) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence_validate(data) + .map(|r| { + let r: pausedReturn = r.into(); + r._0 + }) + } + } + }; + #[derive(serde::Serialize, serde::Deserialize)] + #[derive(Default, Debug, PartialEq, Eq, Hash)] + /**Function with signature `processedRequests(bytes32)` and selector `0xce0fa5a9`. +```solidity +function processedRequests(bytes32) external view returns (bool); +```*/ + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] + #[derive(Clone)] + pub struct processedRequestsCall(pub alloy::sol_types::private::FixedBytes<32>); + #[derive(serde::Serialize, serde::Deserialize)] + #[derive(Default, Debug, PartialEq, Eq, Hash)] + ///Container type for the return parameters of the [`processedRequests(bytes32)`](processedRequestsCall) function. + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] + #[derive(Clone)] + pub struct processedRequestsReturn { + #[allow(missing_docs)] + pub _0: bool, + } + #[allow( + non_camel_case_types, + non_snake_case, + clippy::pub_underscore_fields, + clippy::style + )] + const _: () = { + use alloy::sol_types as alloy_sol_types; + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::FixedBytes<32>,); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (alloy::sol_types::private::FixedBytes<32>,); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From + for UnderlyingRustTuple<'_> { + fn from(value: processedRequestsCall) -> Self { + (value.0,) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> + for processedRequestsCall { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self(tuple.0) + } + } + } + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Bool,); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (bool,); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From + for UnderlyingRustTuple<'_> { + fn from(value: processedRequestsReturn) -> Self { + (value._0,) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> + for processedRequestsReturn { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { _0: tuple.0 } + } + } + } + #[automatically_derived] + impl alloy_sol_types::SolCall for processedRequestsCall { + type Parameters<'a> = (alloy::sol_types::sol_data::FixedBytes<32>,); + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Return = bool; + type ReturnTuple<'a> = (alloy::sol_types::sol_data::Bool,); + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SIGNATURE: &'static str = "processedRequests(bytes32)"; + const SELECTOR: [u8; 4] = [206u8, 15u8, 165u8, 169u8]; + #[inline] + fn new<'a>( + tuple: as alloy_sol_types::SolType>::RustType, + ) -> Self { + tuple.into() + } + #[inline] + fn tokenize(&self) -> Self::Token<'_> { + ( + as alloy_sol_types::SolType>::tokenize(&self.0), + ) + } + #[inline] + fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { + ( + ::tokenize( + ret, + ), + ) + } + #[inline] + fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence(data) + .map(|r| { + let r: processedRequestsReturn = r.into(); + r._0 + }) + } + #[inline] + fn abi_decode_returns_validate( + data: &[u8], + ) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence_validate(data) + .map(|r| { + let r: processedRequestsReturn = r.into(); + r._0 + }) + } + } + }; + #[derive(serde::Serialize, serde::Deserialize)] + #[derive(Default, Debug, PartialEq, Eq, Hash)] + /**Function with signature `renounceRole(bytes32,address)` and selector `0x36568abe`. +```solidity +function renounceRole(bytes32 role, address callerConfirmation) external; +```*/ + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] + #[derive(Clone)] + pub struct renounceRoleCall { + #[allow(missing_docs)] + pub role: alloy::sol_types::private::FixedBytes<32>, + #[allow(missing_docs)] + pub callerConfirmation: alloy::sol_types::private::Address, + } + ///Container type for the return parameters of the [`renounceRole(bytes32,address)`](renounceRoleCall) function. + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] + #[derive(Clone)] + pub struct renounceRoleReturn {} + #[allow( + non_camel_case_types, + non_snake_case, + clippy::pub_underscore_fields, + clippy::style + )] + const _: () = { + use alloy::sol_types as alloy_sol_types; + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = ( + alloy::sol_types::sol_data::FixedBytes<32>, + alloy::sol_types::sol_data::Address, + ); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = ( + alloy::sol_types::private::FixedBytes<32>, + alloy::sol_types::private::Address, + ); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: renounceRoleCall) -> Self { + (value.role, value.callerConfirmation) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for renounceRoleCall { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { + role: tuple.0, + callerConfirmation: tuple.1, + } + } + } + } + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: renounceRoleReturn) -> Self { + () + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for renounceRoleReturn { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self {} + } + } + } + impl renounceRoleReturn { + fn _tokenize( + &self, + ) -> ::ReturnToken<'_> { + () + } + } + #[automatically_derived] + impl alloy_sol_types::SolCall for renounceRoleCall { + type Parameters<'a> = ( + alloy::sol_types::sol_data::FixedBytes<32>, + alloy::sol_types::sol_data::Address, + ); + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Return = renounceRoleReturn; + type ReturnTuple<'a> = (); + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SIGNATURE: &'static str = "renounceRole(bytes32,address)"; + const SELECTOR: [u8; 4] = [54u8, 86u8, 138u8, 190u8]; + #[inline] + fn new<'a>( + tuple: as alloy_sol_types::SolType>::RustType, + ) -> Self { + tuple.into() + } + #[inline] + fn tokenize(&self) -> Self::Token<'_> { + ( + as alloy_sol_types::SolType>::tokenize(&self.role), + ::tokenize( + &self.callerConfirmation, + ), + ) + } + #[inline] + fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { + renounceRoleReturn::_tokenize(ret) + } + #[inline] + fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence(data) + .map(Into::into) + } + #[inline] + fn abi_decode_returns_validate( + data: &[u8], + ) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence_validate(data) + .map(Into::into) + } + } + }; + #[derive(serde::Serialize, serde::Deserialize)] + #[derive(Default, Debug, PartialEq, Eq, Hash)] + /**Function with signature `revokeRole(bytes32,address)` and selector `0xd547741f`. +```solidity +function revokeRole(bytes32 role, address account) external; +```*/ + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] + #[derive(Clone)] + pub struct revokeRoleCall { + #[allow(missing_docs)] + pub role: alloy::sol_types::private::FixedBytes<32>, + #[allow(missing_docs)] + pub account: alloy::sol_types::private::Address, + } + ///Container type for the return parameters of the [`revokeRole(bytes32,address)`](revokeRoleCall) function. + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] + #[derive(Clone)] + pub struct revokeRoleReturn {} + #[allow( + non_camel_case_types, + non_snake_case, + clippy::pub_underscore_fields, + clippy::style + )] + const _: () = { + use alloy::sol_types as alloy_sol_types; + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = ( + alloy::sol_types::sol_data::FixedBytes<32>, + alloy::sol_types::sol_data::Address, + ); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = ( + alloy::sol_types::private::FixedBytes<32>, + alloy::sol_types::private::Address, + ); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: revokeRoleCall) -> Self { + (value.role, value.account) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for revokeRoleCall { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { + role: tuple.0, + account: tuple.1, + } + } + } + } + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: revokeRoleReturn) -> Self { + () + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for revokeRoleReturn { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self {} + } + } + } + impl revokeRoleReturn { + fn _tokenize( + &self, + ) -> ::ReturnToken<'_> { + () + } + } + #[automatically_derived] + impl alloy_sol_types::SolCall for revokeRoleCall { + type Parameters<'a> = ( + alloy::sol_types::sol_data::FixedBytes<32>, + alloy::sol_types::sol_data::Address, + ); + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Return = revokeRoleReturn; + type ReturnTuple<'a> = (); + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SIGNATURE: &'static str = "revokeRole(bytes32,address)"; + const SELECTOR: [u8; 4] = [213u8, 71u8, 116u8, 31u8]; + #[inline] + fn new<'a>( + tuple: as alloy_sol_types::SolType>::RustType, + ) -> Self { + tuple.into() + } + #[inline] + fn tokenize(&self) -> Self::Token<'_> { + ( + as alloy_sol_types::SolType>::tokenize(&self.role), + ::tokenize( + &self.account, + ), + ) + } + #[inline] + fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { + revokeRoleReturn::_tokenize(ret) + } + #[inline] + fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence(data) + .map(Into::into) + } + #[inline] + fn abi_decode_returns_validate( + data: &[u8], + ) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence_validate(data) + .map(Into::into) + } + } + }; + #[derive(serde::Serialize, serde::Deserialize)] + #[derive(Default, Debug, PartialEq, Eq, Hash)] + /**Function with signature `supportsInterface(bytes4)` and selector `0x01ffc9a7`. +```solidity +function supportsInterface(bytes4 interfaceId) external view returns (bool); +```*/ + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] + #[derive(Clone)] + pub struct supportsInterfaceCall { + #[allow(missing_docs)] + pub interfaceId: alloy::sol_types::private::FixedBytes<4>, + } + #[derive(serde::Serialize, serde::Deserialize)] + #[derive(Default, Debug, PartialEq, Eq, Hash)] + ///Container type for the return parameters of the [`supportsInterface(bytes4)`](supportsInterfaceCall) function. + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] + #[derive(Clone)] + pub struct supportsInterfaceReturn { + #[allow(missing_docs)] + pub _0: bool, + } + #[allow( + non_camel_case_types, + non_snake_case, + clippy::pub_underscore_fields, + clippy::style + )] + const _: () = { + use alloy::sol_types as alloy_sol_types; + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::FixedBytes<4>,); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (alloy::sol_types::private::FixedBytes<4>,); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From + for UnderlyingRustTuple<'_> { + fn from(value: supportsInterfaceCall) -> Self { + (value.interfaceId,) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> + for supportsInterfaceCall { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { interfaceId: tuple.0 } + } + } + } + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Bool,); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (bool,); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From + for UnderlyingRustTuple<'_> { + fn from(value: supportsInterfaceReturn) -> Self { + (value._0,) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> + for supportsInterfaceReturn { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { _0: tuple.0 } + } + } + } + #[automatically_derived] + impl alloy_sol_types::SolCall for supportsInterfaceCall { + type Parameters<'a> = (alloy::sol_types::sol_data::FixedBytes<4>,); + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Return = bool; + type ReturnTuple<'a> = (alloy::sol_types::sol_data::Bool,); + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SIGNATURE: &'static str = "supportsInterface(bytes4)"; + const SELECTOR: [u8; 4] = [1u8, 255u8, 201u8, 167u8]; + #[inline] + fn new<'a>( + tuple: as alloy_sol_types::SolType>::RustType, + ) -> Self { + tuple.into() + } + #[inline] + fn tokenize(&self) -> Self::Token<'_> { + ( + as alloy_sol_types::SolType>::tokenize(&self.interfaceId), + ) + } + #[inline] + fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { + ( + ::tokenize( + ret, + ), + ) + } + #[inline] + fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence(data) + .map(|r| { + let r: supportsInterfaceReturn = r.into(); + r._0 + }) + } + #[inline] + fn abi_decode_returns_validate( + data: &[u8], + ) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence_validate(data) + .map(|r| { + let r: supportsInterfaceReturn = r.into(); + r._0 + }) + } + } + }; + #[derive(serde::Serialize, serde::Deserialize)] + #[derive(Default, Debug, PartialEq, Eq, Hash)] + /**Function with signature `tokenData(address)` and selector `0x27e45c2c`. +```solidity +function tokenData(address) external view returns (IBridge.TokenLimits memory limits, IBridge.TokenUsage memory deposit, IBridge.TokenUsage memory claim); +```*/ + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] + #[derive(Clone)] + pub struct tokenDataCall(pub alloy::sol_types::private::Address); + #[derive(serde::Serialize, serde::Deserialize)] + #[derive(Default, Debug, PartialEq, Eq, Hash)] + ///Container type for the return parameters of the [`tokenData(address)`](tokenDataCall) function. + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] + #[derive(Clone)] + pub struct tokenDataReturn { + #[allow(missing_docs)] + pub limits: ::RustType, + #[allow(missing_docs)] + pub deposit: ::RustType, + #[allow(missing_docs)] + pub claim: ::RustType, + } + #[allow( + non_camel_case_types, + non_snake_case, + clippy::pub_underscore_fields, + clippy::style + )] + const _: () = { + use alloy::sol_types as alloy_sol_types; + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Address,); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (alloy::sol_types::private::Address,); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: tokenDataCall) -> Self { + (value.0,) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for tokenDataCall { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self(tuple.0) + } + } + } + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = ( + IBridge::TokenLimits, + IBridge::TokenUsage, + IBridge::TokenUsage, + ); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = ( + ::RustType, + ::RustType, + ::RustType, + ); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: tokenDataReturn) -> Self { + (value.limits, value.deposit, value.claim) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for tokenDataReturn { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { + limits: tuple.0, + deposit: tuple.1, + claim: tuple.2, + } + } + } + } + impl tokenDataReturn { + fn _tokenize( + &self, + ) -> ::ReturnToken<'_> { + ( + ::tokenize( + &self.limits, + ), + ::tokenize( + &self.deposit, + ), + ::tokenize( + &self.claim, + ), + ) + } + } + #[automatically_derived] + impl alloy_sol_types::SolCall for tokenDataCall { + type Parameters<'a> = (alloy::sol_types::sol_data::Address,); + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Return = tokenDataReturn; + type ReturnTuple<'a> = ( + IBridge::TokenLimits, + IBridge::TokenUsage, + IBridge::TokenUsage, + ); + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SIGNATURE: &'static str = "tokenData(address)"; + const SELECTOR: [u8; 4] = [39u8, 228u8, 92u8, 44u8]; + #[inline] + fn new<'a>( + tuple: as alloy_sol_types::SolType>::RustType, + ) -> Self { + tuple.into() + } + #[inline] + fn tokenize(&self) -> Self::Token<'_> { + ( + ::tokenize( + &self.0, + ), + ) + } + #[inline] + fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { + tokenDataReturn::_tokenize(ret) + } + #[inline] + fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence(data) + .map(Into::into) + } + #[inline] + fn abi_decode_returns_validate( + data: &[u8], + ) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence_validate(data) + .map(Into::into) + } + } + }; + #[derive(serde::Serialize, serde::Deserialize)] + #[derive(Default, Debug, PartialEq, Eq, Hash)] + /**Function with signature `unpause()` and selector `0x3f4ba83a`. +```solidity +function unpause() external; +```*/ + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] + #[derive(Clone)] + pub struct unpauseCall; + ///Container type for the return parameters of the [`unpause()`](unpauseCall) function. + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] + #[derive(Clone)] + pub struct unpauseReturn {} + #[allow( + non_camel_case_types, + non_snake_case, + clippy::pub_underscore_fields, + clippy::style + )] + const _: () = { + use alloy::sol_types as alloy_sol_types; + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: unpauseCall) -> Self { + () + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for unpauseCall { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self + } + } + } + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: unpauseReturn) -> Self { + () + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for unpauseReturn { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self {} + } + } + } + impl unpauseReturn { + fn _tokenize( + &self, + ) -> ::ReturnToken<'_> { + () + } + } + #[automatically_derived] + impl alloy_sol_types::SolCall for unpauseCall { + type Parameters<'a> = (); + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Return = unpauseReturn; + type ReturnTuple<'a> = (); + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SIGNATURE: &'static str = "unpause()"; + const SELECTOR: [u8; 4] = [63u8, 75u8, 168u8, 58u8]; + #[inline] + fn new<'a>( + tuple: as alloy_sol_types::SolType>::RustType, + ) -> Self { + tuple.into() + } + #[inline] + fn tokenize(&self) -> Self::Token<'_> { + () + } + #[inline] + fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { + unpauseReturn::_tokenize(ret) + } + #[inline] + fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence(data) + .map(Into::into) + } + #[inline] + fn abi_decode_returns_validate( + data: &[u8], + ) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence_validate(data) + .map(Into::into) + } + } + }; + #[derive(serde::Serialize, serde::Deserialize)] + #[derive(Default, Debug, PartialEq, Eq, Hash)] + /**Function with signature `usedNonces(uint256)` and selector `0x6717e41c`. +```solidity +function usedNonces(uint256) external view returns (bool); +```*/ + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] + #[derive(Clone)] + pub struct usedNoncesCall(pub alloy::sol_types::private::primitives::aliases::U256); + #[derive(serde::Serialize, serde::Deserialize)] + #[derive(Default, Debug, PartialEq, Eq, Hash)] + ///Container type for the return parameters of the [`usedNonces(uint256)`](usedNoncesCall) function. + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] + #[derive(Clone)] + pub struct usedNoncesReturn { + #[allow(missing_docs)] + pub _0: bool, + } + #[allow( + non_camel_case_types, + non_snake_case, + clippy::pub_underscore_fields, + clippy::style + )] + const _: () = { + use alloy::sol_types as alloy_sol_types; + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Uint<256>,); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = ( + alloy::sol_types::private::primitives::aliases::U256, + ); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: usedNoncesCall) -> Self { + (value.0,) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for usedNoncesCall { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self(tuple.0) + } + } + } + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Bool,); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (bool,); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: usedNoncesReturn) -> Self { + (value._0,) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for usedNoncesReturn { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { _0: tuple.0 } + } + } + } + #[automatically_derived] + impl alloy_sol_types::SolCall for usedNoncesCall { + type Parameters<'a> = (alloy::sol_types::sol_data::Uint<256>,); + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Return = bool; + type ReturnTuple<'a> = (alloy::sol_types::sol_data::Bool,); + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SIGNATURE: &'static str = "usedNonces(uint256)"; + const SELECTOR: [u8; 4] = [103u8, 23u8, 228u8, 28u8]; + #[inline] + fn new<'a>( + tuple: as alloy_sol_types::SolType>::RustType, + ) -> Self { + tuple.into() + } + #[inline] + fn tokenize(&self) -> Self::Token<'_> { + ( + as alloy_sol_types::SolType>::tokenize(&self.0), + ) + } + #[inline] + fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { + ( + ::tokenize( + ret, + ), + ) + } + #[inline] + fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence(data) + .map(|r| { + let r: usedNoncesReturn = r.into(); + r._0 + }) + } + #[inline] + fn abi_decode_returns_validate( + data: &[u8], + ) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence_validate(data) + .map(|r| { + let r: usedNoncesReturn = r.into(); + r._0 + }) + } + } + }; + #[derive(serde::Serialize, serde::Deserialize)] + #[derive(Default, Debug, PartialEq, Eq, Hash)] + /**Function with signature `whitelistedTokens(uint256)` and selector `0x2154bc44`. +```solidity +function whitelistedTokens(uint256) external view returns (address); +```*/ + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] + #[derive(Clone)] + pub struct whitelistedTokensCall( + pub alloy::sol_types::private::primitives::aliases::U256, + ); + #[derive(serde::Serialize, serde::Deserialize)] + #[derive(Default, Debug, PartialEq, Eq, Hash)] + ///Container type for the return parameters of the [`whitelistedTokens(uint256)`](whitelistedTokensCall) function. + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] + #[derive(Clone)] + pub struct whitelistedTokensReturn { + #[allow(missing_docs)] + pub _0: alloy::sol_types::private::Address, + } + #[allow( + non_camel_case_types, + non_snake_case, + clippy::pub_underscore_fields, + clippy::style + )] + const _: () = { + use alloy::sol_types as alloy_sol_types; + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Uint<256>,); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = ( + alloy::sol_types::private::primitives::aliases::U256, + ); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From + for UnderlyingRustTuple<'_> { + fn from(value: whitelistedTokensCall) -> Self { + (value.0,) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> + for whitelistedTokensCall { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self(tuple.0) + } + } + } + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Address,); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (alloy::sol_types::private::Address,); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From + for UnderlyingRustTuple<'_> { + fn from(value: whitelistedTokensReturn) -> Self { + (value._0,) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> + for whitelistedTokensReturn { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { _0: tuple.0 } + } + } + } + #[automatically_derived] + impl alloy_sol_types::SolCall for whitelistedTokensCall { + type Parameters<'a> = (alloy::sol_types::sol_data::Uint<256>,); + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Return = alloy::sol_types::private::Address; + type ReturnTuple<'a> = (alloy::sol_types::sol_data::Address,); + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SIGNATURE: &'static str = "whitelistedTokens(uint256)"; + const SELECTOR: [u8; 4] = [33u8, 84u8, 188u8, 68u8]; + #[inline] + fn new<'a>( + tuple: as alloy_sol_types::SolType>::RustType, + ) -> Self { + tuple.into() + } + #[inline] + fn tokenize(&self) -> Self::Token<'_> { + ( + as alloy_sol_types::SolType>::tokenize(&self.0), + ) + } + #[inline] + fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { + ( + ::tokenize( + ret, + ), + ) + } + #[inline] + fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence(data) + .map(|r| { + let r: whitelistedTokensReturn = r.into(); + r._0 + }) + } + #[inline] + fn abi_decode_returns_validate( + data: &[u8], + ) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence_validate(data) + .map(|r| { + let r: whitelistedTokensReturn = r.into(); + r._0 + }) + } + } + }; + ///Container for all the [`BridgeMintBurn`](self) function calls. + #[derive(serde::Serialize, serde::Deserialize)] + #[derive()] + pub enum BridgeMintBurnCalls { + #[allow(missing_docs)] + DEFAULT_ADMIN_ROLE(DEFAULT_ADMIN_ROLECall), + #[allow(missing_docs)] + PAUSER_ROLE(PAUSER_ROLECall), + #[allow(missing_docs)] + bridgeContract(bridgeContractCall), + #[allow(missing_docs)] + claim(claimCall), + #[allow(missing_docs)] + claimNative(claimNativeCall), + #[allow(missing_docs)] + configureToken(configureTokenCall), + #[allow(missing_docs)] + createAndWhitelistMirrorToken(createAndWhitelistMirrorTokenCall), + #[allow(missing_docs)] + deposit(depositCall), + #[allow(missing_docs)] + depositNative(depositNativeCall), + #[allow(missing_docs)] + getRoleAdmin(getRoleAdminCall), + #[allow(missing_docs)] + grantRole(grantRoleCall), + #[allow(missing_docs)] + hasRole(hasRoleCall), + #[allow(missing_docs)] + migrate(migrateCall), + #[allow(missing_docs)] + migratedContract(migratedContractCall), + #[allow(missing_docs)] + mirrorTokens(mirrorTokensCall), + #[allow(missing_docs)] + pause(pauseCall), + #[allow(missing_docs)] + paused(pausedCall), + #[allow(missing_docs)] + processedRequests(processedRequestsCall), + #[allow(missing_docs)] + renounceRole(renounceRoleCall), + #[allow(missing_docs)] + revokeRole(revokeRoleCall), + #[allow(missing_docs)] + supportsInterface(supportsInterfaceCall), + #[allow(missing_docs)] + tokenData(tokenDataCall), + #[allow(missing_docs)] + unpause(unpauseCall), + #[allow(missing_docs)] + usedNonces(usedNoncesCall), + #[allow(missing_docs)] + whitelistedTokens(whitelistedTokensCall), + } + #[automatically_derived] + impl BridgeMintBurnCalls { + /// All the selectors of this enum. + /// + /// Note that the selectors might not be in the same order as the variants. + /// No guarantees are made about the order of the selectors. + /// + /// Prefer using `SolInterface` methods instead. + pub const SELECTORS: &'static [[u8; 4usize]] = &[ + [1u8, 255u8, 201u8, 167u8], + [33u8, 84u8, 188u8, 68u8], + [36u8, 138u8, 156u8, 163u8], + [39u8, 228u8, 92u8, 44u8], + [47u8, 47u8, 241u8, 93u8], + [51u8, 187u8, 127u8, 145u8], + [54u8, 86u8, 138u8, 190u8], + [63u8, 75u8, 168u8, 58u8], + [92u8, 151u8, 90u8, 187u8], + [94u8, 115u8, 117u8, 72u8], + [103u8, 23u8, 228u8, 28u8], + [116u8, 134u8, 250u8, 78u8], + [132u8, 86u8, 203u8, 89u8], + [145u8, 209u8, 72u8, 84u8], + [146u8, 103u8, 177u8, 83u8], + [162u8, 23u8, 253u8, 223u8], + [172u8, 137u8, 67u8, 145u8], + [205u8, 89u8, 101u8, 131u8], + [206u8, 15u8, 165u8, 169u8], + [206u8, 84u8, 148u8, 187u8], + [213u8, 71u8, 116u8, 31u8], + [223u8, 107u8, 2u8, 43u8], + [230u8, 58u8, 177u8, 233u8], + [244u8, 83u8, 70u8, 220u8], + [254u8, 174u8, 180u8, 62u8], + ]; + } + #[automatically_derived] + impl alloy_sol_types::SolInterface for BridgeMintBurnCalls { + const NAME: &'static str = "BridgeMintBurnCalls"; + const MIN_DATA_LENGTH: usize = 0usize; + const COUNT: usize = 25usize; + #[inline] + fn selector(&self) -> [u8; 4] { + match self { + Self::DEFAULT_ADMIN_ROLE(_) => { + ::SELECTOR + } + Self::PAUSER_ROLE(_) => { + ::SELECTOR + } + Self::bridgeContract(_) => { + ::SELECTOR + } + Self::claim(_) => ::SELECTOR, + Self::claimNative(_) => { + ::SELECTOR + } + Self::configureToken(_) => { + ::SELECTOR + } + Self::createAndWhitelistMirrorToken(_) => { + ::SELECTOR + } + Self::deposit(_) => ::SELECTOR, + Self::depositNative(_) => { + ::SELECTOR + } + Self::getRoleAdmin(_) => { + ::SELECTOR + } + Self::grantRole(_) => { + ::SELECTOR + } + Self::hasRole(_) => ::SELECTOR, + Self::migrate(_) => ::SELECTOR, + Self::migratedContract(_) => { + ::SELECTOR + } + Self::mirrorTokens(_) => { + ::SELECTOR + } + Self::pause(_) => ::SELECTOR, + Self::paused(_) => ::SELECTOR, + Self::processedRequests(_) => { + ::SELECTOR + } + Self::renounceRole(_) => { + ::SELECTOR + } + Self::revokeRole(_) => { + ::SELECTOR + } + Self::supportsInterface(_) => { + ::SELECTOR + } + Self::tokenData(_) => { + ::SELECTOR + } + Self::unpause(_) => ::SELECTOR, + Self::usedNonces(_) => { + ::SELECTOR + } + Self::whitelistedTokens(_) => { + ::SELECTOR + } + } + } + #[inline] + fn selector_at(i: usize) -> ::core::option::Option<[u8; 4]> { + Self::SELECTORS.get(i).copied() + } + #[inline] + fn valid_selector(selector: [u8; 4]) -> bool { + Self::SELECTORS.binary_search(&selector).is_ok() + } + #[inline] + #[allow(non_snake_case)] + fn abi_decode_raw( + selector: [u8; 4], + data: &[u8], + ) -> alloy_sol_types::Result { + static DECODE_SHIMS: &[fn( + &[u8], + ) -> alloy_sol_types::Result] = &[ + { + fn supportsInterface( + data: &[u8], + ) -> alloy_sol_types::Result { + ::abi_decode_raw( + data, + ) + .map(BridgeMintBurnCalls::supportsInterface) + } + supportsInterface + }, + { + fn whitelistedTokens( + data: &[u8], + ) -> alloy_sol_types::Result { + ::abi_decode_raw( + data, + ) + .map(BridgeMintBurnCalls::whitelistedTokens) + } + whitelistedTokens + }, + { + fn getRoleAdmin( + data: &[u8], + ) -> alloy_sol_types::Result { + ::abi_decode_raw( + data, + ) + .map(BridgeMintBurnCalls::getRoleAdmin) + } + getRoleAdmin + }, + { + fn tokenData( + data: &[u8], + ) -> alloy_sol_types::Result { + ::abi_decode_raw(data) + .map(BridgeMintBurnCalls::tokenData) + } + tokenData + }, + { + fn grantRole( + data: &[u8], + ) -> alloy_sol_types::Result { + ::abi_decode_raw(data) + .map(BridgeMintBurnCalls::grantRole) + } + grantRole + }, + { + fn depositNative( + data: &[u8], + ) -> alloy_sol_types::Result { + ::abi_decode_raw( + data, + ) + .map(BridgeMintBurnCalls::depositNative) + } + depositNative + }, + { + fn renounceRole( + data: &[u8], + ) -> alloy_sol_types::Result { + ::abi_decode_raw( + data, + ) + .map(BridgeMintBurnCalls::renounceRole) + } + renounceRole + }, + { + fn unpause( + data: &[u8], + ) -> alloy_sol_types::Result { + ::abi_decode_raw(data) + .map(BridgeMintBurnCalls::unpause) + } + unpause + }, + { + fn paused( + data: &[u8], + ) -> alloy_sol_types::Result { + ::abi_decode_raw(data) + .map(BridgeMintBurnCalls::paused) + } + paused + }, + { + fn claim( + data: &[u8], + ) -> alloy_sol_types::Result { + ::abi_decode_raw(data) + .map(BridgeMintBurnCalls::claim) + } + claim + }, + { + fn usedNonces( + data: &[u8], + ) -> alloy_sol_types::Result { + ::abi_decode_raw( + data, + ) + .map(BridgeMintBurnCalls::usedNonces) + } + usedNonces + }, + { + fn migratedContract( + data: &[u8], + ) -> alloy_sol_types::Result { + ::abi_decode_raw( + data, + ) + .map(BridgeMintBurnCalls::migratedContract) + } + migratedContract + }, + { + fn pause( + data: &[u8], + ) -> alloy_sol_types::Result { + ::abi_decode_raw(data) + .map(BridgeMintBurnCalls::pause) + } + pause + }, + { + fn hasRole( + data: &[u8], + ) -> alloy_sol_types::Result { + ::abi_decode_raw(data) + .map(BridgeMintBurnCalls::hasRole) + } + hasRole + }, + { + fn configureToken( + data: &[u8], + ) -> alloy_sol_types::Result { + ::abi_decode_raw( + data, + ) + .map(BridgeMintBurnCalls::configureToken) + } + configureToken + }, + { + fn DEFAULT_ADMIN_ROLE( + data: &[u8], + ) -> alloy_sol_types::Result { + ::abi_decode_raw( + data, + ) + .map(BridgeMintBurnCalls::DEFAULT_ADMIN_ROLE) + } + DEFAULT_ADMIN_ROLE + }, + { + fn claimNative( + data: &[u8], + ) -> alloy_sol_types::Result { + ::abi_decode_raw( + data, + ) + .map(BridgeMintBurnCalls::claimNative) + } + claimNative + }, + { + fn bridgeContract( + data: &[u8], + ) -> alloy_sol_types::Result { + ::abi_decode_raw( + data, + ) + .map(BridgeMintBurnCalls::bridgeContract) + } + bridgeContract + }, + { + fn processedRequests( + data: &[u8], + ) -> alloy_sol_types::Result { + ::abi_decode_raw( + data, + ) + .map(BridgeMintBurnCalls::processedRequests) + } + processedRequests + }, + { + fn migrate( + data: &[u8], + ) -> alloy_sol_types::Result { + ::abi_decode_raw(data) + .map(BridgeMintBurnCalls::migrate) + } + migrate + }, + { + fn revokeRole( + data: &[u8], + ) -> alloy_sol_types::Result { + ::abi_decode_raw( + data, + ) + .map(BridgeMintBurnCalls::revokeRole) + } + revokeRole + }, + { + fn createAndWhitelistMirrorToken( + data: &[u8], + ) -> alloy_sol_types::Result { + ::abi_decode_raw( + data, + ) + .map(BridgeMintBurnCalls::createAndWhitelistMirrorToken) + } + createAndWhitelistMirrorToken + }, + { + fn PAUSER_ROLE( + data: &[u8], + ) -> alloy_sol_types::Result { + ::abi_decode_raw( + data, + ) + .map(BridgeMintBurnCalls::PAUSER_ROLE) + } + PAUSER_ROLE + }, + { + fn deposit( + data: &[u8], + ) -> alloy_sol_types::Result { + ::abi_decode_raw(data) + .map(BridgeMintBurnCalls::deposit) + } + deposit + }, + { + fn mirrorTokens( + data: &[u8], + ) -> alloy_sol_types::Result { + ::abi_decode_raw( + data, + ) + .map(BridgeMintBurnCalls::mirrorTokens) + } + mirrorTokens + }, + ]; + let Ok(idx) = Self::SELECTORS.binary_search(&selector) else { + return Err( + alloy_sol_types::Error::unknown_selector( + ::NAME, + selector, + ), + ); + }; + DECODE_SHIMS[idx](data) + } + #[inline] + #[allow(non_snake_case)] + fn abi_decode_raw_validate( + selector: [u8; 4], + data: &[u8], + ) -> alloy_sol_types::Result { + static DECODE_VALIDATE_SHIMS: &[fn( + &[u8], + ) -> alloy_sol_types::Result] = &[ + { + fn supportsInterface( + data: &[u8], + ) -> alloy_sol_types::Result { + ::abi_decode_raw_validate( + data, + ) + .map(BridgeMintBurnCalls::supportsInterface) + } + supportsInterface + }, + { + fn whitelistedTokens( + data: &[u8], + ) -> alloy_sol_types::Result { + ::abi_decode_raw_validate( + data, + ) + .map(BridgeMintBurnCalls::whitelistedTokens) + } + whitelistedTokens + }, + { + fn getRoleAdmin( + data: &[u8], + ) -> alloy_sol_types::Result { + ::abi_decode_raw_validate( + data, + ) + .map(BridgeMintBurnCalls::getRoleAdmin) + } + getRoleAdmin + }, + { + fn tokenData( + data: &[u8], + ) -> alloy_sol_types::Result { + ::abi_decode_raw_validate( + data, + ) + .map(BridgeMintBurnCalls::tokenData) + } + tokenData + }, + { + fn grantRole( + data: &[u8], + ) -> alloy_sol_types::Result { + ::abi_decode_raw_validate( + data, + ) + .map(BridgeMintBurnCalls::grantRole) + } + grantRole + }, + { + fn depositNative( + data: &[u8], + ) -> alloy_sol_types::Result { + ::abi_decode_raw_validate( + data, + ) + .map(BridgeMintBurnCalls::depositNative) + } + depositNative + }, + { + fn renounceRole( + data: &[u8], + ) -> alloy_sol_types::Result { + ::abi_decode_raw_validate( + data, + ) + .map(BridgeMintBurnCalls::renounceRole) + } + renounceRole + }, + { + fn unpause( + data: &[u8], + ) -> alloy_sol_types::Result { + ::abi_decode_raw_validate( + data, + ) + .map(BridgeMintBurnCalls::unpause) + } + unpause + }, + { + fn paused( + data: &[u8], + ) -> alloy_sol_types::Result { + ::abi_decode_raw_validate( + data, + ) + .map(BridgeMintBurnCalls::paused) + } + paused + }, + { + fn claim( + data: &[u8], + ) -> alloy_sol_types::Result { + ::abi_decode_raw_validate( + data, + ) + .map(BridgeMintBurnCalls::claim) + } + claim + }, + { + fn usedNonces( + data: &[u8], + ) -> alloy_sol_types::Result { + ::abi_decode_raw_validate( + data, + ) + .map(BridgeMintBurnCalls::usedNonces) + } + usedNonces + }, + { + fn migratedContract( + data: &[u8], + ) -> alloy_sol_types::Result { + ::abi_decode_raw_validate( + data, + ) + .map(BridgeMintBurnCalls::migratedContract) + } + migratedContract + }, + { + fn pause( + data: &[u8], + ) -> alloy_sol_types::Result { + ::abi_decode_raw_validate( + data, + ) + .map(BridgeMintBurnCalls::pause) + } + pause + }, + { + fn hasRole( + data: &[u8], + ) -> alloy_sol_types::Result { + ::abi_decode_raw_validate( + data, + ) + .map(BridgeMintBurnCalls::hasRole) + } + hasRole + }, + { + fn configureToken( + data: &[u8], + ) -> alloy_sol_types::Result { + ::abi_decode_raw_validate( + data, + ) + .map(BridgeMintBurnCalls::configureToken) + } + configureToken + }, + { + fn DEFAULT_ADMIN_ROLE( + data: &[u8], + ) -> alloy_sol_types::Result { + ::abi_decode_raw_validate( + data, + ) + .map(BridgeMintBurnCalls::DEFAULT_ADMIN_ROLE) + } + DEFAULT_ADMIN_ROLE + }, + { + fn claimNative( + data: &[u8], + ) -> alloy_sol_types::Result { + ::abi_decode_raw_validate( + data, + ) + .map(BridgeMintBurnCalls::claimNative) + } + claimNative + }, + { + fn bridgeContract( + data: &[u8], + ) -> alloy_sol_types::Result { + ::abi_decode_raw_validate( + data, + ) + .map(BridgeMintBurnCalls::bridgeContract) + } + bridgeContract + }, + { + fn processedRequests( + data: &[u8], + ) -> alloy_sol_types::Result { + ::abi_decode_raw_validate( + data, + ) + .map(BridgeMintBurnCalls::processedRequests) + } + processedRequests + }, + { + fn migrate( + data: &[u8], + ) -> alloy_sol_types::Result { + ::abi_decode_raw_validate( + data, + ) + .map(BridgeMintBurnCalls::migrate) + } + migrate + }, + { + fn revokeRole( + data: &[u8], + ) -> alloy_sol_types::Result { + ::abi_decode_raw_validate( + data, + ) + .map(BridgeMintBurnCalls::revokeRole) + } + revokeRole + }, + { + fn createAndWhitelistMirrorToken( + data: &[u8], + ) -> alloy_sol_types::Result { + ::abi_decode_raw_validate( + data, + ) + .map(BridgeMintBurnCalls::createAndWhitelistMirrorToken) + } + createAndWhitelistMirrorToken + }, + { + fn PAUSER_ROLE( + data: &[u8], + ) -> alloy_sol_types::Result { + ::abi_decode_raw_validate( + data, + ) + .map(BridgeMintBurnCalls::PAUSER_ROLE) + } + PAUSER_ROLE + }, + { + fn deposit( + data: &[u8], + ) -> alloy_sol_types::Result { + ::abi_decode_raw_validate( + data, + ) + .map(BridgeMintBurnCalls::deposit) + } + deposit + }, + { + fn mirrorTokens( + data: &[u8], + ) -> alloy_sol_types::Result { + ::abi_decode_raw_validate( + data, + ) + .map(BridgeMintBurnCalls::mirrorTokens) + } + mirrorTokens + }, + ]; + let Ok(idx) = Self::SELECTORS.binary_search(&selector) else { + return Err( + alloy_sol_types::Error::unknown_selector( + ::NAME, + selector, + ), + ); + }; + DECODE_VALIDATE_SHIMS[idx](data) + } + #[inline] + fn abi_encoded_size(&self) -> usize { + match self { + Self::DEFAULT_ADMIN_ROLE(inner) => { + ::abi_encoded_size( + inner, + ) + } + Self::PAUSER_ROLE(inner) => { + ::abi_encoded_size( + inner, + ) + } + Self::bridgeContract(inner) => { + ::abi_encoded_size( + inner, + ) + } + Self::claim(inner) => { + ::abi_encoded_size(inner) + } + Self::claimNative(inner) => { + ::abi_encoded_size( + inner, + ) + } + Self::configureToken(inner) => { + ::abi_encoded_size( + inner, + ) + } + Self::createAndWhitelistMirrorToken(inner) => { + ::abi_encoded_size( + inner, + ) + } + Self::deposit(inner) => { + ::abi_encoded_size(inner) + } + Self::depositNative(inner) => { + ::abi_encoded_size( + inner, + ) + } + Self::getRoleAdmin(inner) => { + ::abi_encoded_size( + inner, + ) + } + Self::grantRole(inner) => { + ::abi_encoded_size(inner) + } + Self::hasRole(inner) => { + ::abi_encoded_size(inner) + } + Self::migrate(inner) => { + ::abi_encoded_size(inner) + } + Self::migratedContract(inner) => { + ::abi_encoded_size( + inner, + ) + } + Self::mirrorTokens(inner) => { + ::abi_encoded_size( + inner, + ) + } + Self::pause(inner) => { + ::abi_encoded_size(inner) + } + Self::paused(inner) => { + ::abi_encoded_size(inner) + } + Self::processedRequests(inner) => { + ::abi_encoded_size( + inner, + ) + } + Self::renounceRole(inner) => { + ::abi_encoded_size( + inner, + ) + } + Self::revokeRole(inner) => { + ::abi_encoded_size(inner) + } + Self::supportsInterface(inner) => { + ::abi_encoded_size( + inner, + ) + } + Self::tokenData(inner) => { + ::abi_encoded_size(inner) + } + Self::unpause(inner) => { + ::abi_encoded_size(inner) + } + Self::usedNonces(inner) => { + ::abi_encoded_size(inner) + } + Self::whitelistedTokens(inner) => { + ::abi_encoded_size( + inner, + ) + } + } + } + #[inline] + fn abi_encode_raw(&self, out: &mut alloy_sol_types::private::Vec) { + match self { + Self::DEFAULT_ADMIN_ROLE(inner) => { + ::abi_encode_raw( + inner, + out, + ) + } + Self::PAUSER_ROLE(inner) => { + ::abi_encode_raw( + inner, + out, + ) + } + Self::bridgeContract(inner) => { + ::abi_encode_raw( + inner, + out, + ) + } + Self::claim(inner) => { + ::abi_encode_raw(inner, out) + } + Self::claimNative(inner) => { + ::abi_encode_raw( + inner, + out, + ) + } + Self::configureToken(inner) => { + ::abi_encode_raw( + inner, + out, + ) + } + Self::createAndWhitelistMirrorToken(inner) => { + ::abi_encode_raw( + inner, + out, + ) + } + Self::deposit(inner) => { + ::abi_encode_raw(inner, out) + } + Self::depositNative(inner) => { + ::abi_encode_raw( + inner, + out, + ) + } + Self::getRoleAdmin(inner) => { + ::abi_encode_raw( + inner, + out, + ) + } + Self::grantRole(inner) => { + ::abi_encode_raw( + inner, + out, + ) + } + Self::hasRole(inner) => { + ::abi_encode_raw(inner, out) + } + Self::migrate(inner) => { + ::abi_encode_raw(inner, out) + } + Self::migratedContract(inner) => { + ::abi_encode_raw( + inner, + out, + ) + } + Self::mirrorTokens(inner) => { + ::abi_encode_raw( + inner, + out, + ) + } + Self::pause(inner) => { + ::abi_encode_raw(inner, out) + } + Self::paused(inner) => { + ::abi_encode_raw(inner, out) + } + Self::processedRequests(inner) => { + ::abi_encode_raw( + inner, + out, + ) + } + Self::renounceRole(inner) => { + ::abi_encode_raw( + inner, + out, + ) + } + Self::revokeRole(inner) => { + ::abi_encode_raw( + inner, + out, + ) + } + Self::supportsInterface(inner) => { + ::abi_encode_raw( + inner, + out, + ) + } + Self::tokenData(inner) => { + ::abi_encode_raw( + inner, + out, + ) + } + Self::unpause(inner) => { + ::abi_encode_raw(inner, out) + } + Self::usedNonces(inner) => { + ::abi_encode_raw( + inner, + out, + ) + } + Self::whitelistedTokens(inner) => { + ::abi_encode_raw( + inner, + out, + ) + } + } + } + } + ///Container for all the [`BridgeMintBurn`](self) custom errors. + #[derive(serde::Serialize, serde::Deserialize)] + #[derive(Debug, PartialEq, Eq, Hash)] + pub enum BridgeMintBurnErrors { + #[allow(missing_docs)] + AccessControlBadConfirmation(AccessControlBadConfirmation), + #[allow(missing_docs)] + AccessControlUnauthorizedAccount(AccessControlUnauthorizedAccount), + #[allow(missing_docs)] + BlockNotFinalized(BlockNotFinalized), + #[allow(missing_docs)] + ContractMigrated(ContractMigrated), + #[allow(missing_docs)] + DailyLimitExhausted(DailyLimitExhausted), + #[allow(missing_docs)] + Empty(Empty), + #[allow(missing_docs)] + EnforcedPause(EnforcedPause), + #[allow(missing_docs)] + ExpectedPause(ExpectedPause), + #[allow(missing_docs)] + InvalidBridgeContract(InvalidBridgeContract), + #[allow(missing_docs)] + InvalidDepositLog(InvalidDepositLog), + #[allow(missing_docs)] + InvalidNonce(InvalidNonce), + #[allow(missing_docs)] + InvalidToAddress(InvalidToAddress), + #[allow(missing_docs)] + InvalidTokenAmount(InvalidTokenAmount), + #[allow(missing_docs)] + InvalidTokenConfig(InvalidTokenConfig), + #[allow(missing_docs)] + MirrorTokenNotFound(MirrorTokenNotFound), + #[allow(missing_docs)] + Overflow256(Overflow256), + #[allow(missing_docs)] + PrecompileCallFailed(PrecompileCallFailed), + #[allow(missing_docs)] + RequestAlreadyProcessed(RequestAlreadyProcessed), + } + #[automatically_derived] + impl BridgeMintBurnErrors { + /// All the selectors of this enum. + /// + /// Note that the selectors might not be in the same order as the variants. + /// No guarantees are made about the order of the selectors. + /// + /// Prefer using `SolInterface` methods instead. + pub const SELECTORS: &'static [[u8; 4usize]] = &[ + [7u8, 254u8, 123u8, 174u8], + [28u8, 65u8, 72u8, 28u8], + [33u8, 96u8, 115u8, 57u8], + [61u8, 178u8, 161u8, 42u8], + [63u8, 79u8, 104u8, 150u8], + [102u8, 151u8, 178u8, 50u8], + [102u8, 218u8, 128u8, 55u8], + [109u8, 119u8, 238u8, 162u8], + [117u8, 102u8, 136u8, 254u8], + [138u8, 163u8, 167u8, 47u8], + [141u8, 252u8, 32u8, 43u8], + [166u8, 188u8, 116u8, 196u8], + [168u8, 221u8, 182u8, 77u8], + [189u8, 196u8, 223u8, 114u8], + [193u8, 45u8, 203u8, 194u8], + [217u8, 60u8, 6u8, 101u8], + [226u8, 81u8, 125u8, 63u8], + [253u8, 35u8, 255u8, 100u8], + ]; + } + #[automatically_derived] + impl alloy_sol_types::SolInterface for BridgeMintBurnErrors { + const NAME: &'static str = "BridgeMintBurnErrors"; + const MIN_DATA_LENGTH: usize = 0usize; + const COUNT: usize = 18usize; + #[inline] + fn selector(&self) -> [u8; 4] { + match self { + Self::AccessControlBadConfirmation(_) => { + ::SELECTOR + } + Self::AccessControlUnauthorizedAccount(_) => { + ::SELECTOR + } + Self::BlockNotFinalized(_) => { + ::SELECTOR + } + Self::ContractMigrated(_) => { + ::SELECTOR + } + Self::DailyLimitExhausted(_) => { + ::SELECTOR + } + Self::Empty(_) => ::SELECTOR, + Self::EnforcedPause(_) => { + ::SELECTOR + } + Self::ExpectedPause(_) => { + ::SELECTOR + } + Self::InvalidBridgeContract(_) => { + ::SELECTOR + } + Self::InvalidDepositLog(_) => { + ::SELECTOR + } + Self::InvalidNonce(_) => { + ::SELECTOR + } + Self::InvalidToAddress(_) => { + ::SELECTOR + } + Self::InvalidTokenAmount(_) => { + ::SELECTOR + } + Self::InvalidTokenConfig(_) => { + ::SELECTOR + } + Self::MirrorTokenNotFound(_) => { + ::SELECTOR + } + Self::Overflow256(_) => { + ::SELECTOR + } + Self::PrecompileCallFailed(_) => { + ::SELECTOR + } + Self::RequestAlreadyProcessed(_) => { + ::SELECTOR + } + } + } + #[inline] + fn selector_at(i: usize) -> ::core::option::Option<[u8; 4]> { + Self::SELECTORS.get(i).copied() + } + #[inline] + fn valid_selector(selector: [u8; 4]) -> bool { + Self::SELECTORS.binary_search(&selector).is_ok() + } + #[inline] + #[allow(non_snake_case)] + fn abi_decode_raw( + selector: [u8; 4], + data: &[u8], + ) -> alloy_sol_types::Result { + static DECODE_SHIMS: &[fn( + &[u8], + ) -> alloy_sol_types::Result] = &[ + { + fn InvalidTokenConfig( + data: &[u8], + ) -> alloy_sol_types::Result { + ::abi_decode_raw( + data, + ) + .map(BridgeMintBurnErrors::InvalidTokenConfig) + } + InvalidTokenConfig + }, + { + fn Overflow256( + data: &[u8], + ) -> alloy_sol_types::Result { + ::abi_decode_raw(data) + .map(BridgeMintBurnErrors::Overflow256) + } + Overflow256 + }, + { + fn InvalidTokenAmount( + data: &[u8], + ) -> alloy_sol_types::Result { + ::abi_decode_raw( + data, + ) + .map(BridgeMintBurnErrors::InvalidTokenAmount) + } + InvalidTokenAmount + }, + { + fn Empty( + data: &[u8], + ) -> alloy_sol_types::Result { + ::abi_decode_raw(data) + .map(BridgeMintBurnErrors::Empty) + } + Empty + }, + { + fn ContractMigrated( + data: &[u8], + ) -> alloy_sol_types::Result { + ::abi_decode_raw( + data, + ) + .map(BridgeMintBurnErrors::ContractMigrated) + } + ContractMigrated + }, + { + fn AccessControlBadConfirmation( + data: &[u8], + ) -> alloy_sol_types::Result { + ::abi_decode_raw( + data, + ) + .map(BridgeMintBurnErrors::AccessControlBadConfirmation) + } + AccessControlBadConfirmation + }, + { + fn InvalidBridgeContract( + data: &[u8], + ) -> alloy_sol_types::Result { + ::abi_decode_raw( + data, + ) + .map(BridgeMintBurnErrors::InvalidBridgeContract) + } + InvalidBridgeContract + }, + { + fn BlockNotFinalized( + data: &[u8], + ) -> alloy_sol_types::Result { + ::abi_decode_raw( + data, + ) + .map(BridgeMintBurnErrors::BlockNotFinalized) + } + BlockNotFinalized + }, + { + fn InvalidNonce( + data: &[u8], + ) -> alloy_sol_types::Result { + ::abi_decode_raw(data) + .map(BridgeMintBurnErrors::InvalidNonce) + } + InvalidNonce + }, + { + fn InvalidToAddress( + data: &[u8], + ) -> alloy_sol_types::Result { + ::abi_decode_raw( + data, + ) + .map(BridgeMintBurnErrors::InvalidToAddress) + } + InvalidToAddress + }, + { + fn ExpectedPause( + data: &[u8], + ) -> alloy_sol_types::Result { + ::abi_decode_raw( + data, + ) + .map(BridgeMintBurnErrors::ExpectedPause) + } + ExpectedPause + }, + { + fn RequestAlreadyProcessed( + data: &[u8], + ) -> alloy_sol_types::Result { + ::abi_decode_raw( + data, + ) + .map(BridgeMintBurnErrors::RequestAlreadyProcessed) + } + RequestAlreadyProcessed + }, + { + fn MirrorTokenNotFound( + data: &[u8], + ) -> alloy_sol_types::Result { + ::abi_decode_raw( + data, + ) + .map(BridgeMintBurnErrors::MirrorTokenNotFound) + } + MirrorTokenNotFound + }, + { + fn DailyLimitExhausted( + data: &[u8], + ) -> alloy_sol_types::Result { + ::abi_decode_raw( + data, + ) + .map(BridgeMintBurnErrors::DailyLimitExhausted) + } + DailyLimitExhausted + }, + { + fn InvalidDepositLog( + data: &[u8], + ) -> alloy_sol_types::Result { + ::abi_decode_raw( + data, + ) + .map(BridgeMintBurnErrors::InvalidDepositLog) + } + InvalidDepositLog + }, + { + fn EnforcedPause( + data: &[u8], + ) -> alloy_sol_types::Result { + ::abi_decode_raw( + data, + ) + .map(BridgeMintBurnErrors::EnforcedPause) + } + EnforcedPause + }, + { + fn AccessControlUnauthorizedAccount( + data: &[u8], + ) -> alloy_sol_types::Result { + ::abi_decode_raw( + data, + ) + .map(BridgeMintBurnErrors::AccessControlUnauthorizedAccount) + } + AccessControlUnauthorizedAccount + }, + { + fn PrecompileCallFailed( + data: &[u8], + ) -> alloy_sol_types::Result { + ::abi_decode_raw( + data, + ) + .map(BridgeMintBurnErrors::PrecompileCallFailed) + } + PrecompileCallFailed + }, + ]; + let Ok(idx) = Self::SELECTORS.binary_search(&selector) else { + return Err( + alloy_sol_types::Error::unknown_selector( + ::NAME, + selector, + ), + ); + }; + DECODE_SHIMS[idx](data) + } + #[inline] + #[allow(non_snake_case)] + fn abi_decode_raw_validate( + selector: [u8; 4], + data: &[u8], + ) -> alloy_sol_types::Result { + static DECODE_VALIDATE_SHIMS: &[fn( + &[u8], + ) -> alloy_sol_types::Result] = &[ + { + fn InvalidTokenConfig( + data: &[u8], + ) -> alloy_sol_types::Result { + ::abi_decode_raw_validate( + data, + ) + .map(BridgeMintBurnErrors::InvalidTokenConfig) + } + InvalidTokenConfig + }, + { + fn Overflow256( + data: &[u8], + ) -> alloy_sol_types::Result { + ::abi_decode_raw_validate( + data, + ) + .map(BridgeMintBurnErrors::Overflow256) + } + Overflow256 + }, + { + fn InvalidTokenAmount( + data: &[u8], + ) -> alloy_sol_types::Result { + ::abi_decode_raw_validate( + data, + ) + .map(BridgeMintBurnErrors::InvalidTokenAmount) + } + InvalidTokenAmount + }, + { + fn Empty( + data: &[u8], + ) -> alloy_sol_types::Result { + ::abi_decode_raw_validate( + data, + ) + .map(BridgeMintBurnErrors::Empty) + } + Empty + }, + { + fn ContractMigrated( + data: &[u8], + ) -> alloy_sol_types::Result { + ::abi_decode_raw_validate( + data, + ) + .map(BridgeMintBurnErrors::ContractMigrated) + } + ContractMigrated + }, + { + fn AccessControlBadConfirmation( + data: &[u8], + ) -> alloy_sol_types::Result { + ::abi_decode_raw_validate( + data, + ) + .map(BridgeMintBurnErrors::AccessControlBadConfirmation) + } + AccessControlBadConfirmation + }, + { + fn InvalidBridgeContract( + data: &[u8], + ) -> alloy_sol_types::Result { + ::abi_decode_raw_validate( + data, + ) + .map(BridgeMintBurnErrors::InvalidBridgeContract) + } + InvalidBridgeContract + }, + { + fn BlockNotFinalized( + data: &[u8], + ) -> alloy_sol_types::Result { + ::abi_decode_raw_validate( + data, + ) + .map(BridgeMintBurnErrors::BlockNotFinalized) + } + BlockNotFinalized + }, + { + fn InvalidNonce( + data: &[u8], + ) -> alloy_sol_types::Result { + ::abi_decode_raw_validate( + data, + ) + .map(BridgeMintBurnErrors::InvalidNonce) + } + InvalidNonce + }, + { + fn InvalidToAddress( + data: &[u8], + ) -> alloy_sol_types::Result { + ::abi_decode_raw_validate( + data, + ) + .map(BridgeMintBurnErrors::InvalidToAddress) + } + InvalidToAddress + }, + { + fn ExpectedPause( + data: &[u8], + ) -> alloy_sol_types::Result { + ::abi_decode_raw_validate( + data, + ) + .map(BridgeMintBurnErrors::ExpectedPause) + } + ExpectedPause + }, + { + fn RequestAlreadyProcessed( + data: &[u8], + ) -> alloy_sol_types::Result { + ::abi_decode_raw_validate( + data, + ) + .map(BridgeMintBurnErrors::RequestAlreadyProcessed) + } + RequestAlreadyProcessed + }, + { + fn MirrorTokenNotFound( + data: &[u8], + ) -> alloy_sol_types::Result { + ::abi_decode_raw_validate( + data, + ) + .map(BridgeMintBurnErrors::MirrorTokenNotFound) + } + MirrorTokenNotFound + }, + { + fn DailyLimitExhausted( + data: &[u8], + ) -> alloy_sol_types::Result { + ::abi_decode_raw_validate( + data, + ) + .map(BridgeMintBurnErrors::DailyLimitExhausted) + } + DailyLimitExhausted + }, + { + fn InvalidDepositLog( + data: &[u8], + ) -> alloy_sol_types::Result { + ::abi_decode_raw_validate( + data, + ) + .map(BridgeMintBurnErrors::InvalidDepositLog) + } + InvalidDepositLog + }, + { + fn EnforcedPause( + data: &[u8], + ) -> alloy_sol_types::Result { + ::abi_decode_raw_validate( + data, + ) + .map(BridgeMintBurnErrors::EnforcedPause) + } + EnforcedPause + }, + { + fn AccessControlUnauthorizedAccount( + data: &[u8], + ) -> alloy_sol_types::Result { + ::abi_decode_raw_validate( + data, + ) + .map(BridgeMintBurnErrors::AccessControlUnauthorizedAccount) + } + AccessControlUnauthorizedAccount + }, + { + fn PrecompileCallFailed( + data: &[u8], + ) -> alloy_sol_types::Result { + ::abi_decode_raw_validate( + data, + ) + .map(BridgeMintBurnErrors::PrecompileCallFailed) + } + PrecompileCallFailed + }, + ]; + let Ok(idx) = Self::SELECTORS.binary_search(&selector) else { + return Err( + alloy_sol_types::Error::unknown_selector( + ::NAME, + selector, + ), + ); + }; + DECODE_VALIDATE_SHIMS[idx](data) + } + #[inline] + fn abi_encoded_size(&self) -> usize { + match self { + Self::AccessControlBadConfirmation(inner) => { + ::abi_encoded_size( + inner, + ) + } + Self::AccessControlUnauthorizedAccount(inner) => { + ::abi_encoded_size( + inner, + ) + } + Self::BlockNotFinalized(inner) => { + ::abi_encoded_size( + inner, + ) + } + Self::ContractMigrated(inner) => { + ::abi_encoded_size( + inner, + ) + } + Self::DailyLimitExhausted(inner) => { + ::abi_encoded_size( + inner, + ) + } + Self::Empty(inner) => { + ::abi_encoded_size(inner) + } + Self::EnforcedPause(inner) => { + ::abi_encoded_size(inner) + } + Self::ExpectedPause(inner) => { + ::abi_encoded_size(inner) + } + Self::InvalidBridgeContract(inner) => { + ::abi_encoded_size( + inner, + ) + } + Self::InvalidDepositLog(inner) => { + ::abi_encoded_size( + inner, + ) + } + Self::InvalidNonce(inner) => { + ::abi_encoded_size(inner) + } + Self::InvalidToAddress(inner) => { + ::abi_encoded_size( + inner, + ) + } + Self::InvalidTokenAmount(inner) => { + ::abi_encoded_size( + inner, + ) + } + Self::InvalidTokenConfig(inner) => { + ::abi_encoded_size( + inner, + ) + } + Self::MirrorTokenNotFound(inner) => { + ::abi_encoded_size( + inner, + ) + } + Self::Overflow256(inner) => { + ::abi_encoded_size(inner) + } + Self::PrecompileCallFailed(inner) => { + ::abi_encoded_size( + inner, + ) + } + Self::RequestAlreadyProcessed(inner) => { + ::abi_encoded_size( + inner, + ) + } + } + } + #[inline] + fn abi_encode_raw(&self, out: &mut alloy_sol_types::private::Vec) { + match self { + Self::AccessControlBadConfirmation(inner) => { + ::abi_encode_raw( + inner, + out, + ) + } + Self::AccessControlUnauthorizedAccount(inner) => { + ::abi_encode_raw( + inner, + out, + ) + } + Self::BlockNotFinalized(inner) => { + ::abi_encode_raw( + inner, + out, + ) + } + Self::ContractMigrated(inner) => { + ::abi_encode_raw( + inner, + out, + ) + } + Self::DailyLimitExhausted(inner) => { + ::abi_encode_raw( + inner, + out, + ) + } + Self::Empty(inner) => { + ::abi_encode_raw(inner, out) + } + Self::EnforcedPause(inner) => { + ::abi_encode_raw( + inner, + out, + ) + } + Self::ExpectedPause(inner) => { + ::abi_encode_raw( + inner, + out, + ) + } + Self::InvalidBridgeContract(inner) => { + ::abi_encode_raw( + inner, + out, + ) + } + Self::InvalidDepositLog(inner) => { + ::abi_encode_raw( + inner, + out, + ) + } + Self::InvalidNonce(inner) => { + ::abi_encode_raw( + inner, + out, + ) + } + Self::InvalidToAddress(inner) => { + ::abi_encode_raw( + inner, + out, + ) + } + Self::InvalidTokenAmount(inner) => { + ::abi_encode_raw( + inner, + out, + ) + } + Self::InvalidTokenConfig(inner) => { + ::abi_encode_raw( + inner, + out, + ) + } + Self::MirrorTokenNotFound(inner) => { + ::abi_encode_raw( + inner, + out, + ) + } + Self::Overflow256(inner) => { + ::abi_encode_raw( + inner, + out, + ) + } + Self::PrecompileCallFailed(inner) => { + ::abi_encode_raw( + inner, + out, + ) + } + Self::RequestAlreadyProcessed(inner) => { + ::abi_encode_raw( + inner, + out, + ) + } + } + } + } + ///Container for all the [`BridgeMintBurn`](self) events. + #[derive(serde::Serialize, serde::Deserialize)] + #[derive(Debug, PartialEq, Eq, Hash)] + pub enum BridgeMintBurnEvents { + #[allow(missing_docs)] + Claim(Claim), + #[allow(missing_docs)] + ClaimNative(ClaimNative), + #[allow(missing_docs)] + Deposit(Deposit), + #[allow(missing_docs)] + DepositNative(DepositNative), + #[allow(missing_docs)] + Paused(Paused), + #[allow(missing_docs)] + RoleAdminChanged(RoleAdminChanged), + #[allow(missing_docs)] + RoleGranted(RoleGranted), + #[allow(missing_docs)] + RoleRevoked(RoleRevoked), + #[allow(missing_docs)] + Unpaused(Unpaused), + } + #[automatically_derived] + impl BridgeMintBurnEvents { + /// All the selectors of this enum. + /// + /// Note that the selectors might not be in the same order as the variants. + /// No guarantees are made about the order of the selectors. + /// + /// Prefer using `SolInterface` methods instead. + pub const SELECTORS: &'static [[u8; 32usize]] = &[ + [ + 5u8, 229u8, 127u8, 166u8, 45u8, 137u8, 6u8, 3u8, 216u8, 89u8, 68u8, + 201u8, 99u8, 221u8, 199u8, 251u8, 231u8, 124u8, 222u8, 94u8, 166u8, + 156u8, 173u8, 112u8, 51u8, 252u8, 111u8, 118u8, 183u8, 221u8, 210u8, + 171u8, + ], + [ + 47u8, 135u8, 136u8, 17u8, 126u8, 126u8, 255u8, 29u8, 130u8, 233u8, 38u8, + 236u8, 121u8, 73u8, 1u8, 209u8, 124u8, 120u8, 2u8, 74u8, 80u8, 39u8, 9u8, + 64u8, 48u8, 69u8, 64u8, 167u8, 51u8, 101u8, 111u8, 13u8, + ], + [ + 64u8, 53u8, 43u8, 99u8, 208u8, 169u8, 201u8, 41u8, 131u8, 252u8, 241u8, + 157u8, 140u8, 63u8, 194u8, 140u8, 160u8, 188u8, 200u8, 250u8, 159u8, + 254u8, 181u8, 190u8, 40u8, 225u8, 74u8, 63u8, 117u8, 138u8, 179u8, 158u8, + ], + [ + 93u8, 185u8, 238u8, 10u8, 73u8, 91u8, 242u8, 230u8, 255u8, 156u8, 145u8, + 167u8, 131u8, 76u8, 27u8, 164u8, 253u8, 210u8, 68u8, 165u8, 232u8, 170u8, + 78u8, 83u8, 123u8, 211u8, 138u8, 234u8, 228u8, 176u8, 115u8, 170u8, + ], + [ + 98u8, 231u8, 140u8, 234u8, 1u8, 190u8, 227u8, 32u8, 205u8, 78u8, 66u8, + 2u8, 112u8, 181u8, 234u8, 116u8, 0u8, 13u8, 17u8, 176u8, 201u8, 247u8, + 71u8, 84u8, 235u8, 219u8, 252u8, 84u8, 75u8, 5u8, 162u8, 88u8, + ], + [ + 145u8, 49u8, 104u8, 218u8, 7u8, 195u8, 247u8, 245u8, 243u8, 197u8, 35u8, + 147u8, 51u8, 22u8, 50u8, 139u8, 13u8, 6u8, 17u8, 182u8, 39u8, 241u8, + 46u8, 177u8, 28u8, 34u8, 202u8, 68u8, 251u8, 177u8, 157u8, 198u8, + ], + [ + 175u8, 63u8, 26u8, 18u8, 52u8, 75u8, 190u8, 170u8, 185u8, 84u8, 212u8, + 18u8, 232u8, 33u8, 214u8, 182u8, 160u8, 109u8, 92u8, 213u8, 210u8, 123u8, + 226u8, 4u8, 53u8, 59u8, 212u8, 234u8, 155u8, 85u8, 165u8, 4u8, + ], + [ + 189u8, 121u8, 184u8, 111u8, 254u8, 10u8, 184u8, 232u8, 119u8, 97u8, 81u8, + 81u8, 66u8, 23u8, 205u8, 124u8, 172u8, 213u8, 44u8, 144u8, 159u8, 102u8, + 71u8, 92u8, 58u8, 244u8, 78u8, 18u8, 159u8, 11u8, 0u8, 255u8, + ], + [ + 246u8, 57u8, 31u8, 92u8, 50u8, 217u8, 198u8, 157u8, 42u8, 71u8, 234u8, + 103u8, 11u8, 68u8, 41u8, 116u8, 181u8, 57u8, 53u8, 209u8, 237u8, 199u8, + 253u8, 100u8, 235u8, 33u8, 224u8, 71u8, 168u8, 57u8, 23u8, 27u8, + ], + ]; + } + #[automatically_derived] + impl alloy_sol_types::SolEventInterface for BridgeMintBurnEvents { + const NAME: &'static str = "BridgeMintBurnEvents"; + const COUNT: usize = 9usize; + fn decode_raw_log( + topics: &[alloy_sol_types::Word], + data: &[u8], + ) -> alloy_sol_types::Result { + match topics.first().copied() { + Some(::SIGNATURE_HASH) => { + ::decode_raw_log(topics, data) + .map(Self::Claim) + } + Some(::SIGNATURE_HASH) => { + ::decode_raw_log( + topics, + data, + ) + .map(Self::ClaimNative) + } + Some(::SIGNATURE_HASH) => { + ::decode_raw_log(topics, data) + .map(Self::Deposit) + } + Some(::SIGNATURE_HASH) => { + ::decode_raw_log( + topics, + data, + ) + .map(Self::DepositNative) + } + Some(::SIGNATURE_HASH) => { + ::decode_raw_log(topics, data) + .map(Self::Paused) + } + Some(::SIGNATURE_HASH) => { + ::decode_raw_log( + topics, + data, + ) + .map(Self::RoleAdminChanged) + } + Some(::SIGNATURE_HASH) => { + ::decode_raw_log( + topics, + data, + ) + .map(Self::RoleGranted) + } + Some(::SIGNATURE_HASH) => { + ::decode_raw_log( + topics, + data, + ) + .map(Self::RoleRevoked) + } + Some(::SIGNATURE_HASH) => { + ::decode_raw_log(topics, data) + .map(Self::Unpaused) + } + _ => { + alloy_sol_types::private::Err(alloy_sol_types::Error::InvalidLog { + name: ::NAME, + log: alloy_sol_types::private::Box::new( + alloy_sol_types::private::LogData::new_unchecked( + topics.to_vec(), + data.to_vec().into(), + ), + ), + }) + } + } + } + } + #[automatically_derived] + impl alloy_sol_types::private::IntoLogData for BridgeMintBurnEvents { + fn to_log_data(&self) -> alloy_sol_types::private::LogData { + match self { + Self::Claim(inner) => { + alloy_sol_types::private::IntoLogData::to_log_data(inner) + } + Self::ClaimNative(inner) => { + alloy_sol_types::private::IntoLogData::to_log_data(inner) + } + Self::Deposit(inner) => { + alloy_sol_types::private::IntoLogData::to_log_data(inner) + } + Self::DepositNative(inner) => { + alloy_sol_types::private::IntoLogData::to_log_data(inner) + } + Self::Paused(inner) => { + alloy_sol_types::private::IntoLogData::to_log_data(inner) + } + Self::RoleAdminChanged(inner) => { + alloy_sol_types::private::IntoLogData::to_log_data(inner) + } + Self::RoleGranted(inner) => { + alloy_sol_types::private::IntoLogData::to_log_data(inner) + } + Self::RoleRevoked(inner) => { + alloy_sol_types::private::IntoLogData::to_log_data(inner) + } + Self::Unpaused(inner) => { + alloy_sol_types::private::IntoLogData::to_log_data(inner) + } + } + } + fn into_log_data(self) -> alloy_sol_types::private::LogData { + match self { + Self::Claim(inner) => { + alloy_sol_types::private::IntoLogData::into_log_data(inner) + } + Self::ClaimNative(inner) => { + alloy_sol_types::private::IntoLogData::into_log_data(inner) + } + Self::Deposit(inner) => { + alloy_sol_types::private::IntoLogData::into_log_data(inner) + } + Self::DepositNative(inner) => { + alloy_sol_types::private::IntoLogData::into_log_data(inner) + } + Self::Paused(inner) => { + alloy_sol_types::private::IntoLogData::into_log_data(inner) + } + Self::RoleAdminChanged(inner) => { + alloy_sol_types::private::IntoLogData::into_log_data(inner) + } + Self::RoleGranted(inner) => { + alloy_sol_types::private::IntoLogData::into_log_data(inner) + } + Self::RoleRevoked(inner) => { + alloy_sol_types::private::IntoLogData::into_log_data(inner) + } + Self::Unpaused(inner) => { + alloy_sol_types::private::IntoLogData::into_log_data(inner) + } + } + } + } + use alloy::contract as alloy_contract; + /**Creates a new wrapper around an on-chain [`BridgeMintBurn`](self) contract instance. + +See the [wrapper's documentation](`BridgeMintBurnInstance`) for more details.*/ + #[inline] + pub const fn new< + P: alloy_contract::private::Provider, + N: alloy_contract::private::Network, + >( + address: alloy_sol_types::private::Address, + provider: P, + ) -> BridgeMintBurnInstance { + BridgeMintBurnInstance::::new(address, provider) + } + /**A [`BridgeMintBurn`](self) instance. + +Contains type-safe methods for interacting with an on-chain instance of the +[`BridgeMintBurn`](self) contract located at a given `address`, using a given +provider `P`. + +If the contract bytecode is available (see the [`sol!`](alloy_sol_types::sol!) +documentation on how to provide it), the `deploy` and `deploy_builder` methods can +be used to deploy a new instance of the contract. + +See the [module-level documentation](self) for all the available methods.*/ + #[derive(Clone)] + pub struct BridgeMintBurnInstance { + address: alloy_sol_types::private::Address, + provider: P, + _network: ::core::marker::PhantomData, + } + #[automatically_derived] + impl ::core::fmt::Debug for BridgeMintBurnInstance { + #[inline] + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { + f.debug_tuple("BridgeMintBurnInstance").field(&self.address).finish() + } + } + /// Instantiation and getters/setters. + #[automatically_derived] + impl< + P: alloy_contract::private::Provider, + N: alloy_contract::private::Network, + > BridgeMintBurnInstance { + /**Creates a new wrapper around an on-chain [`BridgeMintBurn`](self) contract instance. + +See the [wrapper's documentation](`BridgeMintBurnInstance`) for more details.*/ + #[inline] + pub const fn new( + address: alloy_sol_types::private::Address, + provider: P, + ) -> Self { + Self { + address, + provider, + _network: ::core::marker::PhantomData, + } + } + /// Returns a reference to the address. + #[inline] + pub const fn address(&self) -> &alloy_sol_types::private::Address { + &self.address + } + /// Sets the address. + #[inline] + pub fn set_address(&mut self, address: alloy_sol_types::private::Address) { + self.address = address; + } + /// Sets the address and returns `self`. + pub fn at(mut self, address: alloy_sol_types::private::Address) -> Self { + self.set_address(address); + self + } + /// Returns a reference to the provider. + #[inline] + pub const fn provider(&self) -> &P { + &self.provider + } + } + impl BridgeMintBurnInstance<&P, N> { + /// Clones the provider and returns a new instance with the cloned provider. + #[inline] + pub fn with_cloned_provider(self) -> BridgeMintBurnInstance { + BridgeMintBurnInstance { + address: self.address, + provider: ::core::clone::Clone::clone(&self.provider), + _network: ::core::marker::PhantomData, + } + } + } + /// Function calls. + #[automatically_derived] + impl< + P: alloy_contract::private::Provider, + N: alloy_contract::private::Network, + > BridgeMintBurnInstance { + /// Creates a new call builder using this contract instance's provider and address. + /// + /// Note that the call can be any function call, not just those defined in this + /// contract. Prefer using the other methods for building type-safe contract calls. + pub fn call_builder( + &self, + call: &C, + ) -> alloy_contract::SolCallBuilder<&P, C, N> { + alloy_contract::SolCallBuilder::new_sol(&self.provider, &self.address, call) + } + ///Creates a new call builder for the [`DEFAULT_ADMIN_ROLE`] function. + pub fn DEFAULT_ADMIN_ROLE( + &self, + ) -> alloy_contract::SolCallBuilder<&P, DEFAULT_ADMIN_ROLECall, N> { + self.call_builder(&DEFAULT_ADMIN_ROLECall) + } + ///Creates a new call builder for the [`PAUSER_ROLE`] function. + pub fn PAUSER_ROLE( + &self, + ) -> alloy_contract::SolCallBuilder<&P, PAUSER_ROLECall, N> { + self.call_builder(&PAUSER_ROLECall) + } + ///Creates a new call builder for the [`bridgeContract`] function. + pub fn bridgeContract( + &self, + ) -> alloy_contract::SolCallBuilder<&P, bridgeContractCall, N> { + self.call_builder(&bridgeContractCall) + } + ///Creates a new call builder for the [`claim`] function. + pub fn claim( + &self, + id: alloy::sol_types::private::primitives::aliases::U256, + token: alloy::sol_types::private::Address, + blockNumber: alloy::sol_types::private::primitives::aliases::U256, + ) -> alloy_contract::SolCallBuilder<&P, claimCall, N> { + self.call_builder( + &claimCall { + id, + token, + blockNumber, + }, + ) + } + ///Creates a new call builder for the [`claimNative`] function. + pub fn claimNative( + &self, + id: alloy::sol_types::private::primitives::aliases::U256, + blockNumber: alloy::sol_types::private::primitives::aliases::U256, + ) -> alloy_contract::SolCallBuilder<&P, claimNativeCall, N> { + self.call_builder(&claimNativeCall { id, blockNumber }) + } + ///Creates a new call builder for the [`configureToken`] function. + pub fn configureToken( + &self, + token: alloy::sol_types::private::Address, + limits: ::RustType, + ) -> alloy_contract::SolCallBuilder<&P, configureTokenCall, N> { + self.call_builder( + &configureTokenCall { + token, + limits, + }, + ) + } + ///Creates a new call builder for the [`createAndWhitelistMirrorToken`] function. + pub fn createAndWhitelistMirrorToken( + &self, + tokenName: alloy::sol_types::private::String, + tokenSymbol: alloy::sol_types::private::String, + existingToken: alloy::sol_types::private::Address, + mirrorToken: alloy::sol_types::private::Address, + mirrorTokenDecimals: u8, + limits: ::RustType, + ) -> alloy_contract::SolCallBuilder<&P, createAndWhitelistMirrorTokenCall, N> { + self.call_builder( + &createAndWhitelistMirrorTokenCall { + tokenName, + tokenSymbol, + existingToken, + mirrorToken, + mirrorTokenDecimals, + limits, + }, + ) + } + ///Creates a new call builder for the [`deposit`] function. + pub fn deposit( + &self, + token: alloy::sol_types::private::Address, + amount: alloy::sol_types::private::primitives::aliases::U256, + to: alloy::sol_types::private::Address, + ) -> alloy_contract::SolCallBuilder<&P, depositCall, N> { + self.call_builder(&depositCall { token, amount, to }) + } + ///Creates a new call builder for the [`depositNative`] function. + pub fn depositNative( + &self, + to: alloy::sol_types::private::Address, + ) -> alloy_contract::SolCallBuilder<&P, depositNativeCall, N> { + self.call_builder(&depositNativeCall { to }) + } + ///Creates a new call builder for the [`getRoleAdmin`] function. + pub fn getRoleAdmin( + &self, + role: alloy::sol_types::private::FixedBytes<32>, + ) -> alloy_contract::SolCallBuilder<&P, getRoleAdminCall, N> { + self.call_builder(&getRoleAdminCall { role }) + } + ///Creates a new call builder for the [`grantRole`] function. + pub fn grantRole( + &self, + role: alloy::sol_types::private::FixedBytes<32>, + account: alloy::sol_types::private::Address, + ) -> alloy_contract::SolCallBuilder<&P, grantRoleCall, N> { + self.call_builder(&grantRoleCall { role, account }) + } + ///Creates a new call builder for the [`hasRole`] function. + pub fn hasRole( + &self, + role: alloy::sol_types::private::FixedBytes<32>, + account: alloy::sol_types::private::Address, + ) -> alloy_contract::SolCallBuilder<&P, hasRoleCall, N> { + self.call_builder(&hasRoleCall { role, account }) + } + ///Creates a new call builder for the [`migrate`] function. + pub fn migrate( + &self, + _newContract: alloy::sol_types::private::Address, + ) -> alloy_contract::SolCallBuilder<&P, migrateCall, N> { + self.call_builder(&migrateCall { _newContract }) + } + ///Creates a new call builder for the [`migratedContract`] function. + pub fn migratedContract( + &self, + ) -> alloy_contract::SolCallBuilder<&P, migratedContractCall, N> { + self.call_builder(&migratedContractCall) + } + ///Creates a new call builder for the [`mirrorTokens`] function. + pub fn mirrorTokens( + &self, + _0: alloy::sol_types::private::Address, + ) -> alloy_contract::SolCallBuilder<&P, mirrorTokensCall, N> { + self.call_builder(&mirrorTokensCall(_0)) + } + ///Creates a new call builder for the [`pause`] function. + pub fn pause(&self) -> alloy_contract::SolCallBuilder<&P, pauseCall, N> { + self.call_builder(&pauseCall) + } + ///Creates a new call builder for the [`paused`] function. + pub fn paused(&self) -> alloy_contract::SolCallBuilder<&P, pausedCall, N> { + self.call_builder(&pausedCall) + } + ///Creates a new call builder for the [`processedRequests`] function. + pub fn processedRequests( + &self, + _0: alloy::sol_types::private::FixedBytes<32>, + ) -> alloy_contract::SolCallBuilder<&P, processedRequestsCall, N> { + self.call_builder(&processedRequestsCall(_0)) + } + ///Creates a new call builder for the [`renounceRole`] function. + pub fn renounceRole( + &self, + role: alloy::sol_types::private::FixedBytes<32>, + callerConfirmation: alloy::sol_types::private::Address, + ) -> alloy_contract::SolCallBuilder<&P, renounceRoleCall, N> { + self.call_builder( + &renounceRoleCall { + role, + callerConfirmation, + }, + ) + } + ///Creates a new call builder for the [`revokeRole`] function. + pub fn revokeRole( + &self, + role: alloy::sol_types::private::FixedBytes<32>, + account: alloy::sol_types::private::Address, + ) -> alloy_contract::SolCallBuilder<&P, revokeRoleCall, N> { + self.call_builder(&revokeRoleCall { role, account }) + } + ///Creates a new call builder for the [`supportsInterface`] function. + pub fn supportsInterface( + &self, + interfaceId: alloy::sol_types::private::FixedBytes<4>, + ) -> alloy_contract::SolCallBuilder<&P, supportsInterfaceCall, N> { + self.call_builder( + &supportsInterfaceCall { + interfaceId, + }, + ) + } + ///Creates a new call builder for the [`tokenData`] function. + pub fn tokenData( + &self, + _0: alloy::sol_types::private::Address, + ) -> alloy_contract::SolCallBuilder<&P, tokenDataCall, N> { + self.call_builder(&tokenDataCall(_0)) + } + ///Creates a new call builder for the [`unpause`] function. + pub fn unpause(&self) -> alloy_contract::SolCallBuilder<&P, unpauseCall, N> { + self.call_builder(&unpauseCall) + } + ///Creates a new call builder for the [`usedNonces`] function. + pub fn usedNonces( + &self, + _0: alloy::sol_types::private::primitives::aliases::U256, + ) -> alloy_contract::SolCallBuilder<&P, usedNoncesCall, N> { + self.call_builder(&usedNoncesCall(_0)) + } + ///Creates a new call builder for the [`whitelistedTokens`] function. + pub fn whitelistedTokens( + &self, + _0: alloy::sol_types::private::primitives::aliases::U256, + ) -> alloy_contract::SolCallBuilder<&P, whitelistedTokensCall, N> { + self.call_builder(&whitelistedTokensCall(_0)) + } + } + /// Event filters. + #[automatically_derived] + impl< + P: alloy_contract::private::Provider, + N: alloy_contract::private::Network, + > BridgeMintBurnInstance { + /// Creates a new event filter using this contract instance's provider and address. + /// + /// Note that the type can be any event, not just those defined in this contract. + /// Prefer using the other methods for building type-safe event filters. + pub fn event_filter( + &self, + ) -> alloy_contract::Event<&P, E, N> { + alloy_contract::Event::new_sol(&self.provider, &self.address) + } + ///Creates a new event filter for the [`Claim`] event. + pub fn Claim_filter(&self) -> alloy_contract::Event<&P, Claim, N> { + self.event_filter::() + } + ///Creates a new event filter for the [`ClaimNative`] event. + pub fn ClaimNative_filter(&self) -> alloy_contract::Event<&P, ClaimNative, N> { + self.event_filter::() + } + ///Creates a new event filter for the [`Deposit`] event. + pub fn Deposit_filter(&self) -> alloy_contract::Event<&P, Deposit, N> { + self.event_filter::() + } + ///Creates a new event filter for the [`DepositNative`] event. + pub fn DepositNative_filter( + &self, + ) -> alloy_contract::Event<&P, DepositNative, N> { + self.event_filter::() + } + ///Creates a new event filter for the [`Paused`] event. + pub fn Paused_filter(&self) -> alloy_contract::Event<&P, Paused, N> { + self.event_filter::() + } + ///Creates a new event filter for the [`RoleAdminChanged`] event. + pub fn RoleAdminChanged_filter( + &self, + ) -> alloy_contract::Event<&P, RoleAdminChanged, N> { + self.event_filter::() + } + ///Creates a new event filter for the [`RoleGranted`] event. + pub fn RoleGranted_filter(&self) -> alloy_contract::Event<&P, RoleGranted, N> { + self.event_filter::() + } + ///Creates a new event filter for the [`RoleRevoked`] event. + pub fn RoleRevoked_filter(&self) -> alloy_contract::Event<&P, RoleRevoked, N> { + self.event_filter::() + } + ///Creates a new event filter for the [`Unpaused`] event. + pub fn Unpaused_filter(&self) -> alloy_contract::Event<&P, Unpaused, N> { + self.event_filter::() + } + } +} diff --git a/protocol/bindings/src/lib.rs b/protocol/bindings/src/lib.rs new file mode 100644 index 00000000..e1205ddd --- /dev/null +++ b/protocol/bindings/src/lib.rs @@ -0,0 +1,8 @@ +#![allow(unused_imports, clippy::all, rustdoc::all)] +//! This module contains the sol! generated bindings for solidity contracts. +//! This is autogenerated code. +//! Do not manually edit these files. +//! These files may be overwritten by the codegen system at any time. +pub mod r#bridge_deposit_withdraw; +pub mod r#bridge_mint_burn; +pub mod r#wrapped_token; diff --git a/protocol/bindings/src/wrapped_token.rs b/protocol/bindings/src/wrapped_token.rs new file mode 100644 index 00000000..70d110b2 --- /dev/null +++ b/protocol/bindings/src/wrapped_token.rs @@ -0,0 +1,8164 @@ +/** + +Generated by the following Solidity interface... +```solidity +interface WrappedToken { + error AccessControlBadConfirmation(); + error AccessControlUnauthorizedAccount(address account, bytes32 neededRole); + error ERC20InsufficientAllowance(address spender, uint256 allowance, uint256 needed); + error ERC20InsufficientBalance(address sender, uint256 balance, uint256 needed); + error ERC20InvalidApprover(address approver); + error ERC20InvalidReceiver(address receiver); + error ERC20InvalidSender(address sender); + error ERC20InvalidSpender(address spender); + error EnforcedPause(); + error ExpectedPause(); + + event Approval(address indexed owner, address indexed spender, uint256 value); + event Paused(address account); + event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole); + event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender); + event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender); + event Transfer(address indexed from, address indexed to, uint256 value); + event Unpaused(address account); + + constructor(string name_, string symbol_, uint8 decimals_); + + function DEFAULT_ADMIN_ROLE() external view returns (bytes32); + function MINTER_ROLE() external view returns (bytes32); + function PAUSER_ROLE() external view returns (bytes32); + function allowance(address owner, address spender) external view returns (uint256); + function approve(address spender, uint256 value) external returns (bool); + function balanceOf(address account) external view returns (uint256); + function burn(uint256 value) external; + function burnFrom(address account, uint256 value) external; + function decimals() external view returns (uint8); + function getRoleAdmin(bytes32 role) external view returns (bytes32); + function grantRole(bytes32 role, address account) external; + function hasRole(bytes32 role, address account) external view returns (bool); + function mint(address to, uint256 amount) external; + function name() external view returns (string memory); + function pause() external; + function paused() external view returns (bool); + function renounceRole(bytes32 role, address callerConfirmation) external; + function revokeRole(bytes32 role, address account) external; + function supportsInterface(bytes4 interfaceId) external view returns (bool); + function symbol() external view returns (string memory); + function totalSupply() external view returns (uint256); + function transfer(address to, uint256 value) external returns (bool); + function transferFrom(address from, address to, uint256 value) external returns (bool); + function unpause() external; +} +``` + +...which was generated by the following JSON ABI: +```json +[ + { + "type": "constructor", + "inputs": [ + { + "name": "name_", + "type": "string", + "internalType": "string" + }, + { + "name": "symbol_", + "type": "string", + "internalType": "string" + }, + { + "name": "decimals_", + "type": "uint8", + "internalType": "uint8" + } + ], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "DEFAULT_ADMIN_ROLE", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "MINTER_ROLE", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "PAUSER_ROLE", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "allowance", + "inputs": [ + { + "name": "owner", + "type": "address", + "internalType": "address" + }, + { + "name": "spender", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "approve", + "inputs": [ + { + "name": "spender", + "type": "address", + "internalType": "address" + }, + { + "name": "value", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "balanceOf", + "inputs": [ + { + "name": "account", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "burn", + "inputs": [ + { + "name": "value", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "burnFrom", + "inputs": [ + { + "name": "account", + "type": "address", + "internalType": "address" + }, + { + "name": "value", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "decimals", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint8", + "internalType": "uint8" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getRoleAdmin", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "outputs": [ + { + "name": "", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "grantRole", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "account", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "hasRole", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "account", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "mint", + "inputs": [ + { + "name": "to", + "type": "address", + "internalType": "address" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "name", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "string", + "internalType": "string" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "pause", + "inputs": [], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "paused", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "renounceRole", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "callerConfirmation", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "revokeRole", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "account", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "supportsInterface", + "inputs": [ + { + "name": "interfaceId", + "type": "bytes4", + "internalType": "bytes4" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "symbol", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "string", + "internalType": "string" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "totalSupply", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "transfer", + "inputs": [ + { + "name": "to", + "type": "address", + "internalType": "address" + }, + { + "name": "value", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "transferFrom", + "inputs": [ + { + "name": "from", + "type": "address", + "internalType": "address" + }, + { + "name": "to", + "type": "address", + "internalType": "address" + }, + { + "name": "value", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "unpause", + "inputs": [], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "event", + "name": "Approval", + "inputs": [ + { + "name": "owner", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "spender", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "value", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "Paused", + "inputs": [ + { + "name": "account", + "type": "address", + "indexed": false, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "RoleAdminChanged", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + }, + { + "name": "previousAdminRole", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + }, + { + "name": "newAdminRole", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "RoleGranted", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + }, + { + "name": "account", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "sender", + "type": "address", + "indexed": true, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "RoleRevoked", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + }, + { + "name": "account", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "sender", + "type": "address", + "indexed": true, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "Transfer", + "inputs": [ + { + "name": "from", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "to", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "value", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "Unpaused", + "inputs": [ + { + "name": "account", + "type": "address", + "indexed": false, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "error", + "name": "AccessControlBadConfirmation", + "inputs": [] + }, + { + "type": "error", + "name": "AccessControlUnauthorizedAccount", + "inputs": [ + { + "name": "account", + "type": "address", + "internalType": "address" + }, + { + "name": "neededRole", + "type": "bytes32", + "internalType": "bytes32" + } + ] + }, + { + "type": "error", + "name": "ERC20InsufficientAllowance", + "inputs": [ + { + "name": "spender", + "type": "address", + "internalType": "address" + }, + { + "name": "allowance", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "needed", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "type": "error", + "name": "ERC20InsufficientBalance", + "inputs": [ + { + "name": "sender", + "type": "address", + "internalType": "address" + }, + { + "name": "balance", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "needed", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "type": "error", + "name": "ERC20InvalidApprover", + "inputs": [ + { + "name": "approver", + "type": "address", + "internalType": "address" + } + ] + }, + { + "type": "error", + "name": "ERC20InvalidReceiver", + "inputs": [ + { + "name": "receiver", + "type": "address", + "internalType": "address" + } + ] + }, + { + "type": "error", + "name": "ERC20InvalidSender", + "inputs": [ + { + "name": "sender", + "type": "address", + "internalType": "address" + } + ] + }, + { + "type": "error", + "name": "ERC20InvalidSpender", + "inputs": [ + { + "name": "spender", + "type": "address", + "internalType": "address" + } + ] + }, + { + "type": "error", + "name": "EnforcedPause", + "inputs": [] + }, + { + "type": "error", + "name": "ExpectedPause", + "inputs": [] + } +] +```*/ +#[allow( + non_camel_case_types, + non_snake_case, + clippy::pub_underscore_fields, + clippy::style, + clippy::empty_structs_with_brackets +)] +pub mod WrappedToken { + use super::*; + use alloy::sol_types as alloy_sol_types; + /// The creation / init bytecode of the contract. + /// + /// ```text + ///0x60a060405234801561000f575f5ffd5b50604051612116380380612116833981810160405281019061003191906103c4565b82828160039081610042919061065c565b508060049081610052919061065c565b5050508060ff1660808160ff16815250506100755f5f1b336100e060201b60201c565b506100a67f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a336100e060201b60201c565b506100d77f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a6336100e060201b60201c565b5050505061072b565b5f6100f183836101d660201b60201c565b6101cc57600160065f8581526020019081526020015f205f015f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f6101000a81548160ff02191690831515021790555061016961023a60201b60201c565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16847f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a4600190506101d0565b5f90505b92915050565b5f60065f8481526020019081526020015f205f015f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f9054906101000a900460ff16905092915050565b5f33905090565b5f604051905090565b5f5ffd5b5f5ffd5b5f5ffd5b5f5ffd5b5f601f19601f8301169050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b6102a08261025a565b810181811067ffffffffffffffff821117156102bf576102be61026a565b5b80604052505050565b5f6102d1610241565b90506102dd8282610297565b919050565b5f67ffffffffffffffff8211156102fc576102fb61026a565b5b6103058261025a565b9050602081019050919050565b8281835e5f83830152505050565b5f61033261032d846102e2565b6102c8565b90508281526020810184848401111561034e5761034d610256565b5b610359848285610312565b509392505050565b5f82601f83011261037557610374610252565b5b8151610385848260208601610320565b91505092915050565b5f60ff82169050919050565b6103a38161038e565b81146103ad575f5ffd5b50565b5f815190506103be8161039a565b92915050565b5f5f5f606084860312156103db576103da61024a565b5b5f84015167ffffffffffffffff8111156103f8576103f761024e565b5b61040486828701610361565b935050602084015167ffffffffffffffff8111156104255761042461024e565b5b61043186828701610361565b9250506040610442868287016103b0565b9150509250925092565b5f81519050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b5f600282049050600182168061049a57607f821691505b6020821081036104ad576104ac610456565b5b50919050565b5f819050815f5260205f209050919050565b5f6020601f8301049050919050565b5f82821b905092915050565b5f6008830261050f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff826104d4565b61051986836104d4565b95508019841693508086168417925050509392505050565b5f819050919050565b5f819050919050565b5f61055d61055861055384610531565b61053a565b610531565b9050919050565b5f819050919050565b61057683610543565b61058a61058282610564565b8484546104e0565b825550505050565b5f5f905090565b6105a1610592565b6105ac81848461056d565b505050565b5b818110156105cf576105c45f82610599565b6001810190506105b2565b5050565b601f821115610614576105e5816104b3565b6105ee846104c5565b810160208510156105fd578190505b610611610609856104c5565b8301826105b1565b50505b505050565b5f82821c905092915050565b5f6106345f1984600802610619565b1980831691505092915050565b5f61064c8383610625565b9150826002028217905092915050565b6106658261044c565b67ffffffffffffffff81111561067e5761067d61026a565b5b6106888254610483565b6106938282856105d3565b5f60209050601f8311600181146106c4575f84156106b2578287015190505b6106bc8582610641565b865550610723565b601f1984166106d2866104b3565b5f5b828110156106f9578489015182556001820191506020850194506020810190506106d4565b868310156107165784890151610712601f891682610625565b8355505b6001600288020188555050505b505050505050565b6080516119d36107435f395f61062a01526119d35ff3fe608060405234801561000f575f5ffd5b5060043610610156575f3560e01c80635c975abb116100c1578063a217fddf1161007a578063a217fddf146103b0578063a9059cbb146103ce578063d5391393146103fe578063d547741f1461041c578063dd62ed3e14610438578063e63ab1e91461046857610156565b80635c975abb146102ee57806370a082311461030c57806379cc67901461033c5780638456cb591461035857806391d148541461036257806395d89b411461039257610156565b80632f2ff15d116101135780632f2ff15d14610256578063313ce5671461027257806336568abe146102905780633f4ba83a146102ac57806340c10f19146102b657806342966c68146102d257610156565b806301ffc9a71461015a57806306fdde031461018a578063095ea7b3146101a857806318160ddd146101d857806323b872dd146101f6578063248a9ca314610226575b5f5ffd5b610174600480360381019061016f91906114d5565b610486565b604051610181919061151a565b60405180910390f35b6101926104ff565b60405161019f91906115a3565b60405180910390f35b6101c260048036038101906101bd9190611650565b61058f565b6040516101cf919061151a565b60405180910390f35b6101e06105b1565b6040516101ed919061169d565b60405180910390f35b610210600480360381019061020b91906116b6565b6105ba565b60405161021d919061151a565b60405180910390f35b610240600480360381019061023b9190611739565b6105e8565b60405161024d9190611773565b60405180910390f35b610270600480360381019061026b919061178c565b610605565b005b61027a610627565b60405161028791906117e5565b60405180910390f35b6102aa60048036038101906102a5919061178c565b61064e565b005b6102b46106c9565b005b6102d060048036038101906102cb9190611650565b6106e0565b005b6102ec60048036038101906102e791906117fe565b610719565b005b6102f661072d565b604051610303919061151a565b60405180910390f35b61032660048036038101906103219190611829565b610742565b604051610333919061169d565b60405180910390f35b61035660048036038101906103519190611650565b610787565b005b6103606107a7565b005b61037c6004803603810190610377919061178c565b6107dc565b604051610389919061151a565b60405180910390f35b61039a610840565b6040516103a791906115a3565b60405180910390f35b6103b86108d0565b6040516103c59190611773565b60405180910390f35b6103e860048036038101906103e39190611650565b6108d6565b6040516103f5919061151a565b60405180910390f35b6104066108f8565b6040516104139190611773565b60405180910390f35b6104366004803603810190610431919061178c565b61091c565b005b610452600480360381019061044d9190611854565b61093e565b60405161045f919061169d565b60405180910390f35b6104706109c0565b60405161047d9190611773565b60405180910390f35b5f7f7965db0b000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614806104f857506104f7826109e4565b5b9050919050565b60606003805461050e906118bf565b80601f016020809104026020016040519081016040528092919081815260200182805461053a906118bf565b80156105855780601f1061055c57610100808354040283529160200191610585565b820191905f5260205f20905b81548152906001019060200180831161056857829003601f168201915b5050505050905090565b5f5f610599610a4d565b90506105a6818585610a54565b600191505092915050565b5f600254905090565b5f5f6105c4610a4d565b90506105d1858285610a66565b6105dc858585610af9565b60019150509392505050565b5f60065f8381526020019081526020015f20600101549050919050565b61060e826105e8565b61061781610be9565b6106218383610bfd565b50505050565b5f7f0000000000000000000000000000000000000000000000000000000000000000905090565b610656610a4d565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16146106ba576040517f6697b23200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6106c48282610ce7565b505050565b5f5f1b6106d581610be9565b6106dd610dd1565b50565b7f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a661070a81610be9565b6107148383610e32565b505050565b61072a610724610a4d565b82610eb1565b50565b5f60055f9054906101000a900460ff16905090565b5f5f5f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20549050919050565b61079982610793610a4d565b83610a66565b6107a38282610eb1565b5050565b7f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a6107d181610be9565b6107d9610f30565b50565b5f60065f8481526020019081526020015f205f015f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f9054906101000a900460ff16905092915050565b60606004805461084f906118bf565b80601f016020809104026020016040519081016040528092919081815260200182805461087b906118bf565b80156108c65780601f1061089d576101008083540402835291602001916108c6565b820191905f5260205f20905b8154815290600101906020018083116108a957829003601f168201915b5050505050905090565b5f5f1b81565b5f5f6108e0610a4d565b90506108ed818585610af9565b600191505092915050565b7f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a681565b610925826105e8565b61092e81610be9565b6109388383610ce7565b50505050565b5f60015f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2054905092915050565b7f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a81565b5f7f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b5f33905090565b610a618383836001610f92565b505050565b5f610a71848461093e565b90507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff811015610af35781811015610ae4578281836040517ffb8f41b2000000000000000000000000000000000000000000000000000000008152600401610adb939291906118fe565b60405180910390fd5b610af284848484035f610f92565b5b50505050565b5f73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1603610b69575f6040517f96c6fd1e000000000000000000000000000000000000000000000000000000008152600401610b609190611933565b60405180910390fd5b5f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603610bd9575f6040517fec442f05000000000000000000000000000000000000000000000000000000008152600401610bd09190611933565b60405180910390fd5b610be4838383611161565b505050565b610bfa81610bf5610a4d565b611179565b50565b5f610c0883836107dc565b610cdd57600160065f8581526020019081526020015f205f015f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f6101000a81548160ff021916908315150217905550610c7a610a4d565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16847f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a460019050610ce1565b5f90505b92915050565b5f610cf283836107dc565b15610dc7575f60065f8581526020019081526020015f205f015f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f6101000a81548160ff021916908315150217905550610d64610a4d565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16847ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b60405160405180910390a460019050610dcb565b5f90505b92915050565b610dd96111ca565b5f60055f6101000a81548160ff0219169083151502179055507f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa610e1b610a4d565b604051610e289190611933565b60405180910390a1565b5f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603610ea2575f6040517fec442f05000000000000000000000000000000000000000000000000000000008152600401610e999190611933565b60405180910390fd5b610ead5f8383611161565b5050565b5f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603610f21575f6040517f96c6fd1e000000000000000000000000000000000000000000000000000000008152600401610f189190611933565b60405180910390fd5b610f2c825f83611161565b5050565b610f3861120a565b600160055f6101000a81548160ff0219169083151502179055507f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258610f7b610a4d565b604051610f889190611933565b60405180910390a1565b5f73ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1603611002575f6040517fe602df05000000000000000000000000000000000000000000000000000000008152600401610ff99190611933565b60405180910390fd5b5f73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1603611072575f6040517f94280d620000000000000000000000000000000000000000000000000000000081526004016110699190611933565b60405180910390fd5b8160015f8673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2081905550801561115b578273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92584604051611152919061169d565b60405180910390a35b50505050565b61116961120a565b61117483838361124b565b505050565b61118382826107dc565b6111c65780826040517fe2517d3f0000000000000000000000000000000000000000000000000000000081526004016111bd92919061194c565b60405180910390fd5b5050565b6111d261072d565b611208576040517f8dfc202b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b565b61121261072d565b15611249576040517fd93c066500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b565b61125361120a565b61125e838383611263565b505050565b5f73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16036112b3578060025f8282546112a791906119a0565b92505081905550611381565b5f5f5f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205490508181101561133c578381836040517fe450d38c000000000000000000000000000000000000000000000000000000008152600401611333939291906118fe565b60405180910390fd5b8181035f5f8673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2081905550505b5f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16036113c8578060025f8282540392505081905550611412565b805f5f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f82825401925050819055505b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8360405161146f919061169d565b60405180910390a3505050565b5f5ffd5b5f7fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b6114b481611480565b81146114be575f5ffd5b50565b5f813590506114cf816114ab565b92915050565b5f602082840312156114ea576114e961147c565b5b5f6114f7848285016114c1565b91505092915050565b5f8115159050919050565b61151481611500565b82525050565b5f60208201905061152d5f83018461150b565b92915050565b5f81519050919050565b5f82825260208201905092915050565b8281835e5f83830152505050565b5f601f19601f8301169050919050565b5f61157582611533565b61157f818561153d565b935061158f81856020860161154d565b6115988161155b565b840191505092915050565b5f6020820190508181035f8301526115bb818461156b565b905092915050565b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f6115ec826115c3565b9050919050565b6115fc816115e2565b8114611606575f5ffd5b50565b5f81359050611617816115f3565b92915050565b5f819050919050565b61162f8161161d565b8114611639575f5ffd5b50565b5f8135905061164a81611626565b92915050565b5f5f604083850312156116665761166561147c565b5b5f61167385828601611609565b92505060206116848582860161163c565b9150509250929050565b6116978161161d565b82525050565b5f6020820190506116b05f83018461168e565b92915050565b5f5f5f606084860312156116cd576116cc61147c565b5b5f6116da86828701611609565b93505060206116eb86828701611609565b92505060406116fc8682870161163c565b9150509250925092565b5f819050919050565b61171881611706565b8114611722575f5ffd5b50565b5f813590506117338161170f565b92915050565b5f6020828403121561174e5761174d61147c565b5b5f61175b84828501611725565b91505092915050565b61176d81611706565b82525050565b5f6020820190506117865f830184611764565b92915050565b5f5f604083850312156117a2576117a161147c565b5b5f6117af85828601611725565b92505060206117c085828601611609565b9150509250929050565b5f60ff82169050919050565b6117df816117ca565b82525050565b5f6020820190506117f85f8301846117d6565b92915050565b5f602082840312156118135761181261147c565b5b5f6118208482850161163c565b91505092915050565b5f6020828403121561183e5761183d61147c565b5b5f61184b84828501611609565b91505092915050565b5f5f6040838503121561186a5761186961147c565b5b5f61187785828601611609565b925050602061188885828601611609565b9150509250929050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b5f60028204905060018216806118d657607f821691505b6020821081036118e9576118e8611892565b5b50919050565b6118f8816115e2565b82525050565b5f6060820190506119115f8301866118ef565b61191e602083018561168e565b61192b604083018461168e565b949350505050565b5f6020820190506119465f8301846118ef565b92915050565b5f60408201905061195f5f8301856118ef565b61196c6020830184611764565b9392505050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f6119aa8261161d565b91506119b58361161d565b92508282019050808211156119cd576119cc611973565b5b9291505056 + /// ``` + #[rustfmt::skip] + #[allow(clippy::all)] + pub static BYTECODE: alloy_sol_types::private::Bytes = alloy_sol_types::private::Bytes::from_static( + b"`\xA0`@R4\x80\x15a\0\x0FW__\xFD[P`@Qa!\x168\x03\x80a!\x16\x839\x81\x81\x01`@R\x81\x01\x90a\x001\x91\x90a\x03\xC4V[\x82\x82\x81`\x03\x90\x81a\0B\x91\x90a\x06\\V[P\x80`\x04\x90\x81a\0R\x91\x90a\x06\\V[PPP\x80`\xFF\x16`\x80\x81`\xFF\x16\x81RPPa\0u__\x1B3a\0\xE0` \x1B` \x1CV[Pa\0\xA6\x7Fe\xD7\xA2\x8E2e\xB3zdt\x92\x9F3e!\xB32\xC1h\x1B\x93?l\xB9\xF37fsD\r\x86*3a\0\xE0` \x1B` \x1CV[Pa\0\xD7\x7F\x9F-\xF0\xFE\xD2\xC7vH\xDEX`\xA4\xCCP\x8C\xD0\x81\x8C\x85\xB8\xB8\xA1\xABL\xEE\xEF\x8D\x98\x1C\x89V\xA63a\0\xE0` \x1B` \x1CV[PPPPa\x07+V[_a\0\xF1\x83\x83a\x01\xD6` \x1B` \x1CV[a\x01\xCCW`\x01`\x06_\x85\x81R` \x01\x90\x81R` \x01_ _\x01_\x84s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x81R` \x01\x90\x81R` \x01_ _a\x01\0\n\x81T\x81`\xFF\x02\x19\x16\x90\x83\x15\x15\x02\x17\x90UPa\x01ia\x02:` \x1B` \x1CV[s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x82s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x84\x7F/\x87\x88\x11~~\xFF\x1D\x82\xE9&\xECyI\x01\xD1|x\x02JP'\t@0E@\xA73eo\r`@Q`@Q\x80\x91\x03\x90\xA4`\x01\x90Pa\x01\xD0V[_\x90P[\x92\x91PPV[_`\x06_\x84\x81R` \x01\x90\x81R` \x01_ _\x01_\x83s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x81R` \x01\x90\x81R` \x01_ _\x90T\x90a\x01\0\n\x90\x04`\xFF\x16\x90P\x92\x91PPV[_3\x90P\x90V[_`@Q\x90P\x90V[__\xFD[__\xFD[__\xFD[__\xFD[_`\x1F\x19`\x1F\x83\x01\x16\x90P\x91\x90PV[\x7FNH{q\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0_R`A`\x04R`$_\xFD[a\x02\xA0\x82a\x02ZV[\x81\x01\x81\x81\x10g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x82\x11\x17\x15a\x02\xBFWa\x02\xBEa\x02jV[[\x80`@RPPPV[_a\x02\xD1a\x02AV[\x90Pa\x02\xDD\x82\x82a\x02\x97V[\x91\x90PV[_g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x82\x11\x15a\x02\xFCWa\x02\xFBa\x02jV[[a\x03\x05\x82a\x02ZV[\x90P` \x81\x01\x90P\x91\x90PV[\x82\x81\x83^_\x83\x83\x01RPPPV[_a\x032a\x03-\x84a\x02\xE2V[a\x02\xC8V[\x90P\x82\x81R` \x81\x01\x84\x84\x84\x01\x11\x15a\x03NWa\x03Ma\x02VV[[a\x03Y\x84\x82\x85a\x03\x12V[P\x93\x92PPPV[_\x82`\x1F\x83\x01\x12a\x03uWa\x03ta\x02RV[[\x81Qa\x03\x85\x84\x82` \x86\x01a\x03 V[\x91PP\x92\x91PPV[_`\xFF\x82\x16\x90P\x91\x90PV[a\x03\xA3\x81a\x03\x8EV[\x81\x14a\x03\xADW__\xFD[PV[_\x81Q\x90Pa\x03\xBE\x81a\x03\x9AV[\x92\x91PPV[___``\x84\x86\x03\x12\x15a\x03\xDBWa\x03\xDAa\x02JV[[_\x84\x01Qg\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x11\x15a\x03\xF8Wa\x03\xF7a\x02NV[[a\x04\x04\x86\x82\x87\x01a\x03aV[\x93PP` \x84\x01Qg\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x11\x15a\x04%Wa\x04$a\x02NV[[a\x041\x86\x82\x87\x01a\x03aV[\x92PP`@a\x04B\x86\x82\x87\x01a\x03\xB0V[\x91PP\x92P\x92P\x92V[_\x81Q\x90P\x91\x90PV[\x7FNH{q\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0_R`\"`\x04R`$_\xFD[_`\x02\x82\x04\x90P`\x01\x82\x16\x80a\x04\x9AW`\x7F\x82\x16\x91P[` \x82\x10\x81\x03a\x04\xADWa\x04\xACa\x04VV[[P\x91\x90PV[_\x81\x90P\x81_R` _ \x90P\x91\x90PV[_` `\x1F\x83\x01\x04\x90P\x91\x90PV[_\x82\x82\x1B\x90P\x92\x91PPV[_`\x08\x83\x02a\x05\x0F\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x82a\x04\xD4V[a\x05\x19\x86\x83a\x04\xD4V[\x95P\x80\x19\x84\x16\x93P\x80\x86\x16\x84\x17\x92PPP\x93\x92PPPV[_\x81\x90P\x91\x90PV[_\x81\x90P\x91\x90PV[_a\x05]a\x05Xa\x05S\x84a\x051V[a\x05:V[a\x051V[\x90P\x91\x90PV[_\x81\x90P\x91\x90PV[a\x05v\x83a\x05CV[a\x05\x8Aa\x05\x82\x82a\x05dV[\x84\x84Ta\x04\xE0V[\x82UPPPPV[__\x90P\x90V[a\x05\xA1a\x05\x92V[a\x05\xAC\x81\x84\x84a\x05mV[PPPV[[\x81\x81\x10\x15a\x05\xCFWa\x05\xC4_\x82a\x05\x99V[`\x01\x81\x01\x90Pa\x05\xB2V[PPV[`\x1F\x82\x11\x15a\x06\x14Wa\x05\xE5\x81a\x04\xB3V[a\x05\xEE\x84a\x04\xC5V[\x81\x01` \x85\x10\x15a\x05\xFDW\x81\x90P[a\x06\x11a\x06\t\x85a\x04\xC5V[\x83\x01\x82a\x05\xB1V[PP[PPPV[_\x82\x82\x1C\x90P\x92\x91PPV[_a\x064_\x19\x84`\x08\x02a\x06\x19V[\x19\x80\x83\x16\x91PP\x92\x91PPV[_a\x06L\x83\x83a\x06%V[\x91P\x82`\x02\x02\x82\x17\x90P\x92\x91PPV[a\x06e\x82a\x04LV[g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x11\x15a\x06~Wa\x06}a\x02jV[[a\x06\x88\x82Ta\x04\x83V[a\x06\x93\x82\x82\x85a\x05\xD3V[_` \x90P`\x1F\x83\x11`\x01\x81\x14a\x06\xC4W_\x84\x15a\x06\xB2W\x82\x87\x01Q\x90P[a\x06\xBC\x85\x82a\x06AV[\x86UPa\x07#V[`\x1F\x19\x84\x16a\x06\xD2\x86a\x04\xB3V[_[\x82\x81\x10\x15a\x06\xF9W\x84\x89\x01Q\x82U`\x01\x82\x01\x91P` \x85\x01\x94P` \x81\x01\x90Pa\x06\xD4V[\x86\x83\x10\x15a\x07\x16W\x84\x89\x01Qa\x07\x12`\x1F\x89\x16\x82a\x06%V[\x83UP[`\x01`\x02\x88\x02\x01\x88UPPP[PPPPPPV[`\x80Qa\x19\xD3a\x07C_9_a\x06*\x01Ra\x19\xD3_\xF3\xFE`\x80`@R4\x80\x15a\0\x0FW__\xFD[P`\x046\x10a\x01VW_5`\xE0\x1C\x80c\\\x97Z\xBB\x11a\0\xC1W\x80c\xA2\x17\xFD\xDF\x11a\0zW\x80c\xA2\x17\xFD\xDF\x14a\x03\xB0W\x80c\xA9\x05\x9C\xBB\x14a\x03\xCEW\x80c\xD59\x13\x93\x14a\x03\xFEW\x80c\xD5Gt\x1F\x14a\x04\x1CW\x80c\xDDb\xED>\x14a\x048W\x80c\xE6:\xB1\xE9\x14a\x04hWa\x01VV[\x80c\\\x97Z\xBB\x14a\x02\xEEW\x80cp\xA0\x821\x14a\x03\x0CW\x80cy\xCCg\x90\x14a\x03V[`@Qa\x04_\x91\x90a\x16\x9DV[`@Q\x80\x91\x03\x90\xF3[a\x04pa\t\xC0V[`@Qa\x04}\x91\x90a\x17sV[`@Q\x80\x91\x03\x90\xF3[_\x7Fye\xDB\x0B\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0{\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x19\x16\x82{\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x19\x16\x14\x80a\x04\xF8WPa\x04\xF7\x82a\t\xE4V[[\x90P\x91\x90PV[```\x03\x80Ta\x05\x0E\x90a\x18\xBFV[\x80`\x1F\x01` \x80\x91\x04\x02` \x01`@Q\x90\x81\x01`@R\x80\x92\x91\x90\x81\x81R` \x01\x82\x80Ta\x05:\x90a\x18\xBFV[\x80\x15a\x05\x85W\x80`\x1F\x10a\x05\\Wa\x01\0\x80\x83T\x04\x02\x83R\x91` \x01\x91a\x05\x85V[\x82\x01\x91\x90_R` _ \x90[\x81T\x81R\x90`\x01\x01\x90` \x01\x80\x83\x11a\x05hW\x82\x90\x03`\x1F\x16\x82\x01\x91[PPPPP\x90P\x90V[__a\x05\x99a\nMV[\x90Pa\x05\xA6\x81\x85\x85a\nTV[`\x01\x91PP\x92\x91PPV[_`\x02T\x90P\x90V[__a\x05\xC4a\nMV[\x90Pa\x05\xD1\x85\x82\x85a\nfV[a\x05\xDC\x85\x85\x85a\n\xF9V[`\x01\x91PP\x93\x92PPPV[_`\x06_\x83\x81R` \x01\x90\x81R` \x01_ `\x01\x01T\x90P\x91\x90PV[a\x06\x0E\x82a\x05\xE8V[a\x06\x17\x81a\x0B\xE9V[a\x06!\x83\x83a\x0B\xFDV[PPPPV[_\x7F\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x90P\x90V[a\x06Va\nMV[s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x81s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x14a\x06\xBAW`@Q\x7Ff\x97\xB22\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R`\x04\x01`@Q\x80\x91\x03\x90\xFD[a\x06\xC4\x82\x82a\x0C\xE7V[PPPV[__\x1Ba\x06\xD5\x81a\x0B\xE9V[a\x06\xDDa\r\xD1V[PV[\x7F\x9F-\xF0\xFE\xD2\xC7vH\xDEX`\xA4\xCCP\x8C\xD0\x81\x8C\x85\xB8\xB8\xA1\xABL\xEE\xEF\x8D\x98\x1C\x89V\xA6a\x07\n\x81a\x0B\xE9V[a\x07\x14\x83\x83a\x0E2V[PPPV[a\x07*a\x07$a\nMV[\x82a\x0E\xB1V[PV[_`\x05_\x90T\x90a\x01\0\n\x90\x04`\xFF\x16\x90P\x90V[___\x83s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x81R` \x01\x90\x81R` \x01_ T\x90P\x91\x90PV[a\x07\x99\x82a\x07\x93a\nMV[\x83a\nfV[a\x07\xA3\x82\x82a\x0E\xB1V[PPV[\x7Fe\xD7\xA2\x8E2e\xB3zdt\x92\x9F3e!\xB32\xC1h\x1B\x93?l\xB9\xF37fsD\r\x86*a\x07\xD1\x81a\x0B\xE9V[a\x07\xD9a\x0F0V[PV[_`\x06_\x84\x81R` \x01\x90\x81R` \x01_ _\x01_\x83s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x81R` \x01\x90\x81R` \x01_ _\x90T\x90a\x01\0\n\x90\x04`\xFF\x16\x90P\x92\x91PPV[```\x04\x80Ta\x08O\x90a\x18\xBFV[\x80`\x1F\x01` \x80\x91\x04\x02` \x01`@Q\x90\x81\x01`@R\x80\x92\x91\x90\x81\x81R` \x01\x82\x80Ta\x08{\x90a\x18\xBFV[\x80\x15a\x08\xC6W\x80`\x1F\x10a\x08\x9DWa\x01\0\x80\x83T\x04\x02\x83R\x91` \x01\x91a\x08\xC6V[\x82\x01\x91\x90_R` _ \x90[\x81T\x81R\x90`\x01\x01\x90` \x01\x80\x83\x11a\x08\xA9W\x82\x90\x03`\x1F\x16\x82\x01\x91[PPPPP\x90P\x90V[__\x1B\x81V[__a\x08\xE0a\nMV[\x90Pa\x08\xED\x81\x85\x85a\n\xF9V[`\x01\x91PP\x92\x91PPV[\x7F\x9F-\xF0\xFE\xD2\xC7vH\xDEX`\xA4\xCCP\x8C\xD0\x81\x8C\x85\xB8\xB8\xA1\xABL\xEE\xEF\x8D\x98\x1C\x89V\xA6\x81V[a\t%\x82a\x05\xE8V[a\t.\x81a\x0B\xE9V[a\t8\x83\x83a\x0C\xE7V[PPPPV[_`\x01_\x84s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x81R` \x01\x90\x81R` \x01_ _\x83s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x81R` \x01\x90\x81R` \x01_ T\x90P\x92\x91PPV[\x7Fe\xD7\xA2\x8E2e\xB3zdt\x92\x9F3e!\xB32\xC1h\x1B\x93?l\xB9\xF37fsD\r\x86*\x81V[_\x7F\x01\xFF\xC9\xA7\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0{\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x19\x16\x82{\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x19\x16\x14\x90P\x91\x90PV[_3\x90P\x90V[a\na\x83\x83\x83`\x01a\x0F\x92V[PPPV[_a\nq\x84\x84a\t>V[\x90P\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x10\x15a\n\xF3W\x81\x81\x10\x15a\n\xE4W\x82\x81\x83`@Q\x7F\xFB\x8FA\xB2\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R`\x04\x01a\n\xDB\x93\x92\x91\x90a\x18\xFEV[`@Q\x80\x91\x03\x90\xFD[a\n\xF2\x84\x84\x84\x84\x03_a\x0F\x92V[[PPPPV[_s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x83s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x03a\x0BiW_`@Q\x7F\x96\xC6\xFD\x1E\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R`\x04\x01a\x0B`\x91\x90a\x193V[`@Q\x80\x91\x03\x90\xFD[_s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x82s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x03a\x0B\xD9W_`@Q\x7F\xECD/\x05\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R`\x04\x01a\x0B\xD0\x91\x90a\x193V[`@Q\x80\x91\x03\x90\xFD[a\x0B\xE4\x83\x83\x83a\x11aV[PPPV[a\x0B\xFA\x81a\x0B\xF5a\nMV[a\x11yV[PV[_a\x0C\x08\x83\x83a\x07\xDCV[a\x0C\xDDW`\x01`\x06_\x85\x81R` \x01\x90\x81R` \x01_ _\x01_\x84s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x81R` \x01\x90\x81R` \x01_ _a\x01\0\n\x81T\x81`\xFF\x02\x19\x16\x90\x83\x15\x15\x02\x17\x90UPa\x0Cza\nMV[s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x82s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x84\x7F/\x87\x88\x11~~\xFF\x1D\x82\xE9&\xECyI\x01\xD1|x\x02JP'\t@0E@\xA73eo\r`@Q`@Q\x80\x91\x03\x90\xA4`\x01\x90Pa\x0C\xE1V[_\x90P[\x92\x91PPV[_a\x0C\xF2\x83\x83a\x07\xDCV[\x15a\r\xC7W_`\x06_\x85\x81R` \x01\x90\x81R` \x01_ _\x01_\x84s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x81R` \x01\x90\x81R` \x01_ _a\x01\0\n\x81T\x81`\xFF\x02\x19\x16\x90\x83\x15\x15\x02\x17\x90UPa\rda\nMV[s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x82s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x84\x7F\xF69\x1F\\2\xD9\xC6\x9D*G\xEAg\x0BD)t\xB595\xD1\xED\xC7\xFDd\xEB!\xE0G\xA89\x17\x1B`@Q`@Q\x80\x91\x03\x90\xA4`\x01\x90Pa\r\xCBV[_\x90P[\x92\x91PPV[a\r\xD9a\x11\xCAV[_`\x05_a\x01\0\n\x81T\x81`\xFF\x02\x19\x16\x90\x83\x15\x15\x02\x17\x90UP\x7F]\xB9\xEE\nI[\xF2\xE6\xFF\x9C\x91\xA7\x83L\x1B\xA4\xFD\xD2D\xA5\xE8\xAANS{\xD3\x8A\xEA\xE4\xB0s\xAAa\x0E\x1Ba\nMV[`@Qa\x0E(\x91\x90a\x193V[`@Q\x80\x91\x03\x90\xA1V[_s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x82s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x03a\x0E\xA2W_`@Q\x7F\xECD/\x05\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R`\x04\x01a\x0E\x99\x91\x90a\x193V[`@Q\x80\x91\x03\x90\xFD[a\x0E\xAD_\x83\x83a\x11aV[PPV[_s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x82s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x03a\x0F!W_`@Q\x7F\x96\xC6\xFD\x1E\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R`\x04\x01a\x0F\x18\x91\x90a\x193V[`@Q\x80\x91\x03\x90\xFD[a\x0F,\x82_\x83a\x11aV[PPV[a\x0F8a\x12\nV[`\x01`\x05_a\x01\0\n\x81T\x81`\xFF\x02\x19\x16\x90\x83\x15\x15\x02\x17\x90UP\x7Fb\xE7\x8C\xEA\x01\xBE\xE3 \xCDNB\x02p\xB5\xEAt\0\r\x11\xB0\xC9\xF7GT\xEB\xDB\xFCTK\x05\xA2Xa\x0F{a\nMV[`@Qa\x0F\x88\x91\x90a\x193V[`@Q\x80\x91\x03\x90\xA1V[_s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x84s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x03a\x10\x02W_`@Q\x7F\xE6\x02\xDF\x05\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R`\x04\x01a\x0F\xF9\x91\x90a\x193V[`@Q\x80\x91\x03\x90\xFD[_s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x83s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x03a\x10rW_`@Q\x7F\x94(\rb\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R`\x04\x01a\x10i\x91\x90a\x193V[`@Q\x80\x91\x03\x90\xFD[\x81`\x01_\x86s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x81R` \x01\x90\x81R` \x01_ _\x85s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x81R` \x01\x90\x81R` \x01_ \x81\x90UP\x80\x15a\x11[W\x82s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x84s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x7F\x8C[\xE1\xE5\xEB\xEC}[\xD1OqB}\x1E\x84\xF3\xDD\x03\x14\xC0\xF7\xB2)\x1E[ \n\xC8\xC7\xC3\xB9%\x84`@Qa\x11R\x91\x90a\x16\x9DV[`@Q\x80\x91\x03\x90\xA3[PPPPV[a\x11ia\x12\nV[a\x11t\x83\x83\x83a\x12KV[PPPV[a\x11\x83\x82\x82a\x07\xDCV[a\x11\xC6W\x80\x82`@Q\x7F\xE2Q}?\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R`\x04\x01a\x11\xBD\x92\x91\x90a\x19LV[`@Q\x80\x91\x03\x90\xFD[PPV[a\x11\xD2a\x07-V[a\x12\x08W`@Q\x7F\x8D\xFC +\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R`\x04\x01`@Q\x80\x91\x03\x90\xFD[V[a\x12\x12a\x07-V[\x15a\x12IW`@Q\x7F\xD9<\x06e\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R`\x04\x01`@Q\x80\x91\x03\x90\xFD[V[a\x12Sa\x12\nV[a\x12^\x83\x83\x83a\x12cV[PPPV[_s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x83s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x03a\x12\xB3W\x80`\x02_\x82\x82Ta\x12\xA7\x91\x90a\x19\xA0V[\x92PP\x81\x90UPa\x13\x81V[___\x85s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x81R` \x01\x90\x81R` \x01_ T\x90P\x81\x81\x10\x15a\x13Wa\x18=a\x14|V[[_a\x18K\x84\x82\x85\x01a\x16\tV[\x91PP\x92\x91PPV[__`@\x83\x85\x03\x12\x15a\x18jWa\x18ia\x14|V[[_a\x18w\x85\x82\x86\x01a\x16\tV[\x92PP` a\x18\x88\x85\x82\x86\x01a\x16\tV[\x91PP\x92P\x92\x90PV[\x7FNH{q\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0_R`\"`\x04R`$_\xFD[_`\x02\x82\x04\x90P`\x01\x82\x16\x80a\x18\xD6W`\x7F\x82\x16\x91P[` \x82\x10\x81\x03a\x18\xE9Wa\x18\xE8a\x18\x92V[[P\x91\x90PV[a\x18\xF8\x81a\x15\xE2V[\x82RPPV[_``\x82\x01\x90Pa\x19\x11_\x83\x01\x86a\x18\xEFV[a\x19\x1E` \x83\x01\x85a\x16\x8EV[a\x19+`@\x83\x01\x84a\x16\x8EV[\x94\x93PPPPV[_` \x82\x01\x90Pa\x19F_\x83\x01\x84a\x18\xEFV[\x92\x91PPV[_`@\x82\x01\x90Pa\x19__\x83\x01\x85a\x18\xEFV[a\x19l` \x83\x01\x84a\x17dV[\x93\x92PPPV[\x7FNH{q\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0_R`\x11`\x04R`$_\xFD[_a\x19\xAA\x82a\x16\x1DV[\x91Pa\x19\xB5\x83a\x16\x1DV[\x92P\x82\x82\x01\x90P\x80\x82\x11\x15a\x19\xCDWa\x19\xCCa\x19sV[[\x92\x91PPV", + ); + /// The runtime bytecode of the contract, as deployed on the network. + /// + /// ```text + ///0x608060405234801561000f575f5ffd5b5060043610610156575f3560e01c80635c975abb116100c1578063a217fddf1161007a578063a217fddf146103b0578063a9059cbb146103ce578063d5391393146103fe578063d547741f1461041c578063dd62ed3e14610438578063e63ab1e91461046857610156565b80635c975abb146102ee57806370a082311461030c57806379cc67901461033c5780638456cb591461035857806391d148541461036257806395d89b411461039257610156565b80632f2ff15d116101135780632f2ff15d14610256578063313ce5671461027257806336568abe146102905780633f4ba83a146102ac57806340c10f19146102b657806342966c68146102d257610156565b806301ffc9a71461015a57806306fdde031461018a578063095ea7b3146101a857806318160ddd146101d857806323b872dd146101f6578063248a9ca314610226575b5f5ffd5b610174600480360381019061016f91906114d5565b610486565b604051610181919061151a565b60405180910390f35b6101926104ff565b60405161019f91906115a3565b60405180910390f35b6101c260048036038101906101bd9190611650565b61058f565b6040516101cf919061151a565b60405180910390f35b6101e06105b1565b6040516101ed919061169d565b60405180910390f35b610210600480360381019061020b91906116b6565b6105ba565b60405161021d919061151a565b60405180910390f35b610240600480360381019061023b9190611739565b6105e8565b60405161024d9190611773565b60405180910390f35b610270600480360381019061026b919061178c565b610605565b005b61027a610627565b60405161028791906117e5565b60405180910390f35b6102aa60048036038101906102a5919061178c565b61064e565b005b6102b46106c9565b005b6102d060048036038101906102cb9190611650565b6106e0565b005b6102ec60048036038101906102e791906117fe565b610719565b005b6102f661072d565b604051610303919061151a565b60405180910390f35b61032660048036038101906103219190611829565b610742565b604051610333919061169d565b60405180910390f35b61035660048036038101906103519190611650565b610787565b005b6103606107a7565b005b61037c6004803603810190610377919061178c565b6107dc565b604051610389919061151a565b60405180910390f35b61039a610840565b6040516103a791906115a3565b60405180910390f35b6103b86108d0565b6040516103c59190611773565b60405180910390f35b6103e860048036038101906103e39190611650565b6108d6565b6040516103f5919061151a565b60405180910390f35b6104066108f8565b6040516104139190611773565b60405180910390f35b6104366004803603810190610431919061178c565b61091c565b005b610452600480360381019061044d9190611854565b61093e565b60405161045f919061169d565b60405180910390f35b6104706109c0565b60405161047d9190611773565b60405180910390f35b5f7f7965db0b000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614806104f857506104f7826109e4565b5b9050919050565b60606003805461050e906118bf565b80601f016020809104026020016040519081016040528092919081815260200182805461053a906118bf565b80156105855780601f1061055c57610100808354040283529160200191610585565b820191905f5260205f20905b81548152906001019060200180831161056857829003601f168201915b5050505050905090565b5f5f610599610a4d565b90506105a6818585610a54565b600191505092915050565b5f600254905090565b5f5f6105c4610a4d565b90506105d1858285610a66565b6105dc858585610af9565b60019150509392505050565b5f60065f8381526020019081526020015f20600101549050919050565b61060e826105e8565b61061781610be9565b6106218383610bfd565b50505050565b5f7f0000000000000000000000000000000000000000000000000000000000000000905090565b610656610a4d565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16146106ba576040517f6697b23200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6106c48282610ce7565b505050565b5f5f1b6106d581610be9565b6106dd610dd1565b50565b7f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a661070a81610be9565b6107148383610e32565b505050565b61072a610724610a4d565b82610eb1565b50565b5f60055f9054906101000a900460ff16905090565b5f5f5f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20549050919050565b61079982610793610a4d565b83610a66565b6107a38282610eb1565b5050565b7f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a6107d181610be9565b6107d9610f30565b50565b5f60065f8481526020019081526020015f205f015f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f9054906101000a900460ff16905092915050565b60606004805461084f906118bf565b80601f016020809104026020016040519081016040528092919081815260200182805461087b906118bf565b80156108c65780601f1061089d576101008083540402835291602001916108c6565b820191905f5260205f20905b8154815290600101906020018083116108a957829003601f168201915b5050505050905090565b5f5f1b81565b5f5f6108e0610a4d565b90506108ed818585610af9565b600191505092915050565b7f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a681565b610925826105e8565b61092e81610be9565b6109388383610ce7565b50505050565b5f60015f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2054905092915050565b7f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a81565b5f7f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b5f33905090565b610a618383836001610f92565b505050565b5f610a71848461093e565b90507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff811015610af35781811015610ae4578281836040517ffb8f41b2000000000000000000000000000000000000000000000000000000008152600401610adb939291906118fe565b60405180910390fd5b610af284848484035f610f92565b5b50505050565b5f73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1603610b69575f6040517f96c6fd1e000000000000000000000000000000000000000000000000000000008152600401610b609190611933565b60405180910390fd5b5f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603610bd9575f6040517fec442f05000000000000000000000000000000000000000000000000000000008152600401610bd09190611933565b60405180910390fd5b610be4838383611161565b505050565b610bfa81610bf5610a4d565b611179565b50565b5f610c0883836107dc565b610cdd57600160065f8581526020019081526020015f205f015f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f6101000a81548160ff021916908315150217905550610c7a610a4d565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16847f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a460019050610ce1565b5f90505b92915050565b5f610cf283836107dc565b15610dc7575f60065f8581526020019081526020015f205f015f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f6101000a81548160ff021916908315150217905550610d64610a4d565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16847ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b60405160405180910390a460019050610dcb565b5f90505b92915050565b610dd96111ca565b5f60055f6101000a81548160ff0219169083151502179055507f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa610e1b610a4d565b604051610e289190611933565b60405180910390a1565b5f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603610ea2575f6040517fec442f05000000000000000000000000000000000000000000000000000000008152600401610e999190611933565b60405180910390fd5b610ead5f8383611161565b5050565b5f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603610f21575f6040517f96c6fd1e000000000000000000000000000000000000000000000000000000008152600401610f189190611933565b60405180910390fd5b610f2c825f83611161565b5050565b610f3861120a565b600160055f6101000a81548160ff0219169083151502179055507f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258610f7b610a4d565b604051610f889190611933565b60405180910390a1565b5f73ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1603611002575f6040517fe602df05000000000000000000000000000000000000000000000000000000008152600401610ff99190611933565b60405180910390fd5b5f73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1603611072575f6040517f94280d620000000000000000000000000000000000000000000000000000000081526004016110699190611933565b60405180910390fd5b8160015f8673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2081905550801561115b578273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92584604051611152919061169d565b60405180910390a35b50505050565b61116961120a565b61117483838361124b565b505050565b61118382826107dc565b6111c65780826040517fe2517d3f0000000000000000000000000000000000000000000000000000000081526004016111bd92919061194c565b60405180910390fd5b5050565b6111d261072d565b611208576040517f8dfc202b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b565b61121261072d565b15611249576040517fd93c066500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b565b61125361120a565b61125e838383611263565b505050565b5f73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16036112b3578060025f8282546112a791906119a0565b92505081905550611381565b5f5f5f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205490508181101561133c578381836040517fe450d38c000000000000000000000000000000000000000000000000000000008152600401611333939291906118fe565b60405180910390fd5b8181035f5f8673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2081905550505b5f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16036113c8578060025f8282540392505081905550611412565b805f5f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f82825401925050819055505b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8360405161146f919061169d565b60405180910390a3505050565b5f5ffd5b5f7fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b6114b481611480565b81146114be575f5ffd5b50565b5f813590506114cf816114ab565b92915050565b5f602082840312156114ea576114e961147c565b5b5f6114f7848285016114c1565b91505092915050565b5f8115159050919050565b61151481611500565b82525050565b5f60208201905061152d5f83018461150b565b92915050565b5f81519050919050565b5f82825260208201905092915050565b8281835e5f83830152505050565b5f601f19601f8301169050919050565b5f61157582611533565b61157f818561153d565b935061158f81856020860161154d565b6115988161155b565b840191505092915050565b5f6020820190508181035f8301526115bb818461156b565b905092915050565b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f6115ec826115c3565b9050919050565b6115fc816115e2565b8114611606575f5ffd5b50565b5f81359050611617816115f3565b92915050565b5f819050919050565b61162f8161161d565b8114611639575f5ffd5b50565b5f8135905061164a81611626565b92915050565b5f5f604083850312156116665761166561147c565b5b5f61167385828601611609565b92505060206116848582860161163c565b9150509250929050565b6116978161161d565b82525050565b5f6020820190506116b05f83018461168e565b92915050565b5f5f5f606084860312156116cd576116cc61147c565b5b5f6116da86828701611609565b93505060206116eb86828701611609565b92505060406116fc8682870161163c565b9150509250925092565b5f819050919050565b61171881611706565b8114611722575f5ffd5b50565b5f813590506117338161170f565b92915050565b5f6020828403121561174e5761174d61147c565b5b5f61175b84828501611725565b91505092915050565b61176d81611706565b82525050565b5f6020820190506117865f830184611764565b92915050565b5f5f604083850312156117a2576117a161147c565b5b5f6117af85828601611725565b92505060206117c085828601611609565b9150509250929050565b5f60ff82169050919050565b6117df816117ca565b82525050565b5f6020820190506117f85f8301846117d6565b92915050565b5f602082840312156118135761181261147c565b5b5f6118208482850161163c565b91505092915050565b5f6020828403121561183e5761183d61147c565b5b5f61184b84828501611609565b91505092915050565b5f5f6040838503121561186a5761186961147c565b5b5f61187785828601611609565b925050602061188885828601611609565b9150509250929050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b5f60028204905060018216806118d657607f821691505b6020821081036118e9576118e8611892565b5b50919050565b6118f8816115e2565b82525050565b5f6060820190506119115f8301866118ef565b61191e602083018561168e565b61192b604083018461168e565b949350505050565b5f6020820190506119465f8301846118ef565b92915050565b5f60408201905061195f5f8301856118ef565b61196c6020830184611764565b9392505050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f6119aa8261161d565b91506119b58361161d565b92508282019050808211156119cd576119cc611973565b5b9291505056 + /// ``` + #[rustfmt::skip] + #[allow(clippy::all)] + pub static DEPLOYED_BYTECODE: alloy_sol_types::private::Bytes = alloy_sol_types::private::Bytes::from_static( + b"`\x80`@R4\x80\x15a\0\x0FW__\xFD[P`\x046\x10a\x01VW_5`\xE0\x1C\x80c\\\x97Z\xBB\x11a\0\xC1W\x80c\xA2\x17\xFD\xDF\x11a\0zW\x80c\xA2\x17\xFD\xDF\x14a\x03\xB0W\x80c\xA9\x05\x9C\xBB\x14a\x03\xCEW\x80c\xD59\x13\x93\x14a\x03\xFEW\x80c\xD5Gt\x1F\x14a\x04\x1CW\x80c\xDDb\xED>\x14a\x048W\x80c\xE6:\xB1\xE9\x14a\x04hWa\x01VV[\x80c\\\x97Z\xBB\x14a\x02\xEEW\x80cp\xA0\x821\x14a\x03\x0CW\x80cy\xCCg\x90\x14a\x03V[`@Qa\x04_\x91\x90a\x16\x9DV[`@Q\x80\x91\x03\x90\xF3[a\x04pa\t\xC0V[`@Qa\x04}\x91\x90a\x17sV[`@Q\x80\x91\x03\x90\xF3[_\x7Fye\xDB\x0B\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0{\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x19\x16\x82{\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x19\x16\x14\x80a\x04\xF8WPa\x04\xF7\x82a\t\xE4V[[\x90P\x91\x90PV[```\x03\x80Ta\x05\x0E\x90a\x18\xBFV[\x80`\x1F\x01` \x80\x91\x04\x02` \x01`@Q\x90\x81\x01`@R\x80\x92\x91\x90\x81\x81R` \x01\x82\x80Ta\x05:\x90a\x18\xBFV[\x80\x15a\x05\x85W\x80`\x1F\x10a\x05\\Wa\x01\0\x80\x83T\x04\x02\x83R\x91` \x01\x91a\x05\x85V[\x82\x01\x91\x90_R` _ \x90[\x81T\x81R\x90`\x01\x01\x90` \x01\x80\x83\x11a\x05hW\x82\x90\x03`\x1F\x16\x82\x01\x91[PPPPP\x90P\x90V[__a\x05\x99a\nMV[\x90Pa\x05\xA6\x81\x85\x85a\nTV[`\x01\x91PP\x92\x91PPV[_`\x02T\x90P\x90V[__a\x05\xC4a\nMV[\x90Pa\x05\xD1\x85\x82\x85a\nfV[a\x05\xDC\x85\x85\x85a\n\xF9V[`\x01\x91PP\x93\x92PPPV[_`\x06_\x83\x81R` \x01\x90\x81R` \x01_ `\x01\x01T\x90P\x91\x90PV[a\x06\x0E\x82a\x05\xE8V[a\x06\x17\x81a\x0B\xE9V[a\x06!\x83\x83a\x0B\xFDV[PPPPV[_\x7F\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x90P\x90V[a\x06Va\nMV[s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x81s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x14a\x06\xBAW`@Q\x7Ff\x97\xB22\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R`\x04\x01`@Q\x80\x91\x03\x90\xFD[a\x06\xC4\x82\x82a\x0C\xE7V[PPPV[__\x1Ba\x06\xD5\x81a\x0B\xE9V[a\x06\xDDa\r\xD1V[PV[\x7F\x9F-\xF0\xFE\xD2\xC7vH\xDEX`\xA4\xCCP\x8C\xD0\x81\x8C\x85\xB8\xB8\xA1\xABL\xEE\xEF\x8D\x98\x1C\x89V\xA6a\x07\n\x81a\x0B\xE9V[a\x07\x14\x83\x83a\x0E2V[PPPV[a\x07*a\x07$a\nMV[\x82a\x0E\xB1V[PV[_`\x05_\x90T\x90a\x01\0\n\x90\x04`\xFF\x16\x90P\x90V[___\x83s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x81R` \x01\x90\x81R` \x01_ T\x90P\x91\x90PV[a\x07\x99\x82a\x07\x93a\nMV[\x83a\nfV[a\x07\xA3\x82\x82a\x0E\xB1V[PPV[\x7Fe\xD7\xA2\x8E2e\xB3zdt\x92\x9F3e!\xB32\xC1h\x1B\x93?l\xB9\xF37fsD\r\x86*a\x07\xD1\x81a\x0B\xE9V[a\x07\xD9a\x0F0V[PV[_`\x06_\x84\x81R` \x01\x90\x81R` \x01_ _\x01_\x83s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x81R` \x01\x90\x81R` \x01_ _\x90T\x90a\x01\0\n\x90\x04`\xFF\x16\x90P\x92\x91PPV[```\x04\x80Ta\x08O\x90a\x18\xBFV[\x80`\x1F\x01` \x80\x91\x04\x02` \x01`@Q\x90\x81\x01`@R\x80\x92\x91\x90\x81\x81R` \x01\x82\x80Ta\x08{\x90a\x18\xBFV[\x80\x15a\x08\xC6W\x80`\x1F\x10a\x08\x9DWa\x01\0\x80\x83T\x04\x02\x83R\x91` \x01\x91a\x08\xC6V[\x82\x01\x91\x90_R` _ \x90[\x81T\x81R\x90`\x01\x01\x90` \x01\x80\x83\x11a\x08\xA9W\x82\x90\x03`\x1F\x16\x82\x01\x91[PPPPP\x90P\x90V[__\x1B\x81V[__a\x08\xE0a\nMV[\x90Pa\x08\xED\x81\x85\x85a\n\xF9V[`\x01\x91PP\x92\x91PPV[\x7F\x9F-\xF0\xFE\xD2\xC7vH\xDEX`\xA4\xCCP\x8C\xD0\x81\x8C\x85\xB8\xB8\xA1\xABL\xEE\xEF\x8D\x98\x1C\x89V\xA6\x81V[a\t%\x82a\x05\xE8V[a\t.\x81a\x0B\xE9V[a\t8\x83\x83a\x0C\xE7V[PPPPV[_`\x01_\x84s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x81R` \x01\x90\x81R` \x01_ _\x83s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x81R` \x01\x90\x81R` \x01_ T\x90P\x92\x91PPV[\x7Fe\xD7\xA2\x8E2e\xB3zdt\x92\x9F3e!\xB32\xC1h\x1B\x93?l\xB9\xF37fsD\r\x86*\x81V[_\x7F\x01\xFF\xC9\xA7\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0{\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x19\x16\x82{\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x19\x16\x14\x90P\x91\x90PV[_3\x90P\x90V[a\na\x83\x83\x83`\x01a\x0F\x92V[PPPV[_a\nq\x84\x84a\t>V[\x90P\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x10\x15a\n\xF3W\x81\x81\x10\x15a\n\xE4W\x82\x81\x83`@Q\x7F\xFB\x8FA\xB2\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R`\x04\x01a\n\xDB\x93\x92\x91\x90a\x18\xFEV[`@Q\x80\x91\x03\x90\xFD[a\n\xF2\x84\x84\x84\x84\x03_a\x0F\x92V[[PPPPV[_s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x83s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x03a\x0BiW_`@Q\x7F\x96\xC6\xFD\x1E\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R`\x04\x01a\x0B`\x91\x90a\x193V[`@Q\x80\x91\x03\x90\xFD[_s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x82s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x03a\x0B\xD9W_`@Q\x7F\xECD/\x05\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R`\x04\x01a\x0B\xD0\x91\x90a\x193V[`@Q\x80\x91\x03\x90\xFD[a\x0B\xE4\x83\x83\x83a\x11aV[PPPV[a\x0B\xFA\x81a\x0B\xF5a\nMV[a\x11yV[PV[_a\x0C\x08\x83\x83a\x07\xDCV[a\x0C\xDDW`\x01`\x06_\x85\x81R` \x01\x90\x81R` \x01_ _\x01_\x84s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x81R` \x01\x90\x81R` \x01_ _a\x01\0\n\x81T\x81`\xFF\x02\x19\x16\x90\x83\x15\x15\x02\x17\x90UPa\x0Cza\nMV[s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x82s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x84\x7F/\x87\x88\x11~~\xFF\x1D\x82\xE9&\xECyI\x01\xD1|x\x02JP'\t@0E@\xA73eo\r`@Q`@Q\x80\x91\x03\x90\xA4`\x01\x90Pa\x0C\xE1V[_\x90P[\x92\x91PPV[_a\x0C\xF2\x83\x83a\x07\xDCV[\x15a\r\xC7W_`\x06_\x85\x81R` \x01\x90\x81R` \x01_ _\x01_\x84s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x81R` \x01\x90\x81R` \x01_ _a\x01\0\n\x81T\x81`\xFF\x02\x19\x16\x90\x83\x15\x15\x02\x17\x90UPa\rda\nMV[s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x82s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x84\x7F\xF69\x1F\\2\xD9\xC6\x9D*G\xEAg\x0BD)t\xB595\xD1\xED\xC7\xFDd\xEB!\xE0G\xA89\x17\x1B`@Q`@Q\x80\x91\x03\x90\xA4`\x01\x90Pa\r\xCBV[_\x90P[\x92\x91PPV[a\r\xD9a\x11\xCAV[_`\x05_a\x01\0\n\x81T\x81`\xFF\x02\x19\x16\x90\x83\x15\x15\x02\x17\x90UP\x7F]\xB9\xEE\nI[\xF2\xE6\xFF\x9C\x91\xA7\x83L\x1B\xA4\xFD\xD2D\xA5\xE8\xAANS{\xD3\x8A\xEA\xE4\xB0s\xAAa\x0E\x1Ba\nMV[`@Qa\x0E(\x91\x90a\x193V[`@Q\x80\x91\x03\x90\xA1V[_s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x82s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x03a\x0E\xA2W_`@Q\x7F\xECD/\x05\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R`\x04\x01a\x0E\x99\x91\x90a\x193V[`@Q\x80\x91\x03\x90\xFD[a\x0E\xAD_\x83\x83a\x11aV[PPV[_s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x82s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x03a\x0F!W_`@Q\x7F\x96\xC6\xFD\x1E\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R`\x04\x01a\x0F\x18\x91\x90a\x193V[`@Q\x80\x91\x03\x90\xFD[a\x0F,\x82_\x83a\x11aV[PPV[a\x0F8a\x12\nV[`\x01`\x05_a\x01\0\n\x81T\x81`\xFF\x02\x19\x16\x90\x83\x15\x15\x02\x17\x90UP\x7Fb\xE7\x8C\xEA\x01\xBE\xE3 \xCDNB\x02p\xB5\xEAt\0\r\x11\xB0\xC9\xF7GT\xEB\xDB\xFCTK\x05\xA2Xa\x0F{a\nMV[`@Qa\x0F\x88\x91\x90a\x193V[`@Q\x80\x91\x03\x90\xA1V[_s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x84s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x03a\x10\x02W_`@Q\x7F\xE6\x02\xDF\x05\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R`\x04\x01a\x0F\xF9\x91\x90a\x193V[`@Q\x80\x91\x03\x90\xFD[_s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x83s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x03a\x10rW_`@Q\x7F\x94(\rb\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R`\x04\x01a\x10i\x91\x90a\x193V[`@Q\x80\x91\x03\x90\xFD[\x81`\x01_\x86s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x81R` \x01\x90\x81R` \x01_ _\x85s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x81R` \x01\x90\x81R` \x01_ \x81\x90UP\x80\x15a\x11[W\x82s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x84s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x7F\x8C[\xE1\xE5\xEB\xEC}[\xD1OqB}\x1E\x84\xF3\xDD\x03\x14\xC0\xF7\xB2)\x1E[ \n\xC8\xC7\xC3\xB9%\x84`@Qa\x11R\x91\x90a\x16\x9DV[`@Q\x80\x91\x03\x90\xA3[PPPPV[a\x11ia\x12\nV[a\x11t\x83\x83\x83a\x12KV[PPPV[a\x11\x83\x82\x82a\x07\xDCV[a\x11\xC6W\x80\x82`@Q\x7F\xE2Q}?\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R`\x04\x01a\x11\xBD\x92\x91\x90a\x19LV[`@Q\x80\x91\x03\x90\xFD[PPV[a\x11\xD2a\x07-V[a\x12\x08W`@Q\x7F\x8D\xFC +\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R`\x04\x01`@Q\x80\x91\x03\x90\xFD[V[a\x12\x12a\x07-V[\x15a\x12IW`@Q\x7F\xD9<\x06e\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R`\x04\x01`@Q\x80\x91\x03\x90\xFD[V[a\x12Sa\x12\nV[a\x12^\x83\x83\x83a\x12cV[PPPV[_s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x83s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x03a\x12\xB3W\x80`\x02_\x82\x82Ta\x12\xA7\x91\x90a\x19\xA0V[\x92PP\x81\x90UPa\x13\x81V[___\x85s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x81R` \x01\x90\x81R` \x01_ T\x90P\x81\x81\x10\x15a\x13Wa\x18=a\x14|V[[_a\x18K\x84\x82\x85\x01a\x16\tV[\x91PP\x92\x91PPV[__`@\x83\x85\x03\x12\x15a\x18jWa\x18ia\x14|V[[_a\x18w\x85\x82\x86\x01a\x16\tV[\x92PP` a\x18\x88\x85\x82\x86\x01a\x16\tV[\x91PP\x92P\x92\x90PV[\x7FNH{q\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0_R`\"`\x04R`$_\xFD[_`\x02\x82\x04\x90P`\x01\x82\x16\x80a\x18\xD6W`\x7F\x82\x16\x91P[` \x82\x10\x81\x03a\x18\xE9Wa\x18\xE8a\x18\x92V[[P\x91\x90PV[a\x18\xF8\x81a\x15\xE2V[\x82RPPV[_``\x82\x01\x90Pa\x19\x11_\x83\x01\x86a\x18\xEFV[a\x19\x1E` \x83\x01\x85a\x16\x8EV[a\x19+`@\x83\x01\x84a\x16\x8EV[\x94\x93PPPPV[_` \x82\x01\x90Pa\x19F_\x83\x01\x84a\x18\xEFV[\x92\x91PPV[_`@\x82\x01\x90Pa\x19__\x83\x01\x85a\x18\xEFV[a\x19l` \x83\x01\x84a\x17dV[\x93\x92PPPV[\x7FNH{q\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0_R`\x11`\x04R`$_\xFD[_a\x19\xAA\x82a\x16\x1DV[\x91Pa\x19\xB5\x83a\x16\x1DV[\x92P\x82\x82\x01\x90P\x80\x82\x11\x15a\x19\xCDWa\x19\xCCa\x19sV[[\x92\x91PPV", + ); + #[derive(serde::Serialize, serde::Deserialize)] + #[derive(Default, Debug, PartialEq, Eq, Hash)] + /**Custom error with signature `AccessControlBadConfirmation()` and selector `0x6697b232`. +```solidity +error AccessControlBadConfirmation(); +```*/ + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] + #[derive(Clone)] + pub struct AccessControlBadConfirmation; + #[allow( + non_camel_case_types, + non_snake_case, + clippy::pub_underscore_fields, + clippy::style + )] + const _: () = { + use alloy::sol_types as alloy_sol_types; + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From + for UnderlyingRustTuple<'_> { + fn from(value: AccessControlBadConfirmation) -> Self { + () + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> + for AccessControlBadConfirmation { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self + } + } + #[automatically_derived] + impl alloy_sol_types::SolError for AccessControlBadConfirmation { + type Parameters<'a> = UnderlyingSolTuple<'a>; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SIGNATURE: &'static str = "AccessControlBadConfirmation()"; + const SELECTOR: [u8; 4] = [102u8, 151u8, 178u8, 50u8]; + #[inline] + fn new<'a>( + tuple: as alloy_sol_types::SolType>::RustType, + ) -> Self { + tuple.into() + } + #[inline] + fn tokenize(&self) -> Self::Token<'_> { + () + } + #[inline] + fn abi_decode_raw_validate(data: &[u8]) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence_validate(data) + .map(Self::new) + } + } + }; + #[derive(serde::Serialize, serde::Deserialize)] + #[derive(Default, Debug, PartialEq, Eq, Hash)] + /**Custom error with signature `AccessControlUnauthorizedAccount(address,bytes32)` and selector `0xe2517d3f`. +```solidity +error AccessControlUnauthorizedAccount(address account, bytes32 neededRole); +```*/ + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] + #[derive(Clone)] + pub struct AccessControlUnauthorizedAccount { + #[allow(missing_docs)] + pub account: alloy::sol_types::private::Address, + #[allow(missing_docs)] + pub neededRole: alloy::sol_types::private::FixedBytes<32>, + } + #[allow( + non_camel_case_types, + non_snake_case, + clippy::pub_underscore_fields, + clippy::style + )] + const _: () = { + use alloy::sol_types as alloy_sol_types; + #[doc(hidden)] + type UnderlyingSolTuple<'a> = ( + alloy::sol_types::sol_data::Address, + alloy::sol_types::sol_data::FixedBytes<32>, + ); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = ( + alloy::sol_types::private::Address, + alloy::sol_types::private::FixedBytes<32>, + ); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From + for UnderlyingRustTuple<'_> { + fn from(value: AccessControlUnauthorizedAccount) -> Self { + (value.account, value.neededRole) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> + for AccessControlUnauthorizedAccount { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { + account: tuple.0, + neededRole: tuple.1, + } + } + } + #[automatically_derived] + impl alloy_sol_types::SolError for AccessControlUnauthorizedAccount { + type Parameters<'a> = UnderlyingSolTuple<'a>; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SIGNATURE: &'static str = "AccessControlUnauthorizedAccount(address,bytes32)"; + const SELECTOR: [u8; 4] = [226u8, 81u8, 125u8, 63u8]; + #[inline] + fn new<'a>( + tuple: as alloy_sol_types::SolType>::RustType, + ) -> Self { + tuple.into() + } + #[inline] + fn tokenize(&self) -> Self::Token<'_> { + ( + ::tokenize( + &self.account, + ), + as alloy_sol_types::SolType>::tokenize(&self.neededRole), + ) + } + #[inline] + fn abi_decode_raw_validate(data: &[u8]) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence_validate(data) + .map(Self::new) + } + } + }; + #[derive(serde::Serialize, serde::Deserialize)] + #[derive(Default, Debug, PartialEq, Eq, Hash)] + /**Custom error with signature `ERC20InsufficientAllowance(address,uint256,uint256)` and selector `0xfb8f41b2`. +```solidity +error ERC20InsufficientAllowance(address spender, uint256 allowance, uint256 needed); +```*/ + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] + #[derive(Clone)] + pub struct ERC20InsufficientAllowance { + #[allow(missing_docs)] + pub spender: alloy::sol_types::private::Address, + #[allow(missing_docs)] + pub allowance: alloy::sol_types::private::primitives::aliases::U256, + #[allow(missing_docs)] + pub needed: alloy::sol_types::private::primitives::aliases::U256, + } + #[allow( + non_camel_case_types, + non_snake_case, + clippy::pub_underscore_fields, + clippy::style + )] + const _: () = { + use alloy::sol_types as alloy_sol_types; + #[doc(hidden)] + type UnderlyingSolTuple<'a> = ( + alloy::sol_types::sol_data::Address, + alloy::sol_types::sol_data::Uint<256>, + alloy::sol_types::sol_data::Uint<256>, + ); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = ( + alloy::sol_types::private::Address, + alloy::sol_types::private::primitives::aliases::U256, + alloy::sol_types::private::primitives::aliases::U256, + ); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From + for UnderlyingRustTuple<'_> { + fn from(value: ERC20InsufficientAllowance) -> Self { + (value.spender, value.allowance, value.needed) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> + for ERC20InsufficientAllowance { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { + spender: tuple.0, + allowance: tuple.1, + needed: tuple.2, + } + } + } + #[automatically_derived] + impl alloy_sol_types::SolError for ERC20InsufficientAllowance { + type Parameters<'a> = UnderlyingSolTuple<'a>; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SIGNATURE: &'static str = "ERC20InsufficientAllowance(address,uint256,uint256)"; + const SELECTOR: [u8; 4] = [251u8, 143u8, 65u8, 178u8]; + #[inline] + fn new<'a>( + tuple: as alloy_sol_types::SolType>::RustType, + ) -> Self { + tuple.into() + } + #[inline] + fn tokenize(&self) -> Self::Token<'_> { + ( + ::tokenize( + &self.spender, + ), + as alloy_sol_types::SolType>::tokenize(&self.allowance), + as alloy_sol_types::SolType>::tokenize(&self.needed), + ) + } + #[inline] + fn abi_decode_raw_validate(data: &[u8]) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence_validate(data) + .map(Self::new) + } + } + }; + #[derive(serde::Serialize, serde::Deserialize)] + #[derive(Default, Debug, PartialEq, Eq, Hash)] + /**Custom error with signature `ERC20InsufficientBalance(address,uint256,uint256)` and selector `0xe450d38c`. +```solidity +error ERC20InsufficientBalance(address sender, uint256 balance, uint256 needed); +```*/ + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] + #[derive(Clone)] + pub struct ERC20InsufficientBalance { + #[allow(missing_docs)] + pub sender: alloy::sol_types::private::Address, + #[allow(missing_docs)] + pub balance: alloy::sol_types::private::primitives::aliases::U256, + #[allow(missing_docs)] + pub needed: alloy::sol_types::private::primitives::aliases::U256, + } + #[allow( + non_camel_case_types, + non_snake_case, + clippy::pub_underscore_fields, + clippy::style + )] + const _: () = { + use alloy::sol_types as alloy_sol_types; + #[doc(hidden)] + type UnderlyingSolTuple<'a> = ( + alloy::sol_types::sol_data::Address, + alloy::sol_types::sol_data::Uint<256>, + alloy::sol_types::sol_data::Uint<256>, + ); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = ( + alloy::sol_types::private::Address, + alloy::sol_types::private::primitives::aliases::U256, + alloy::sol_types::private::primitives::aliases::U256, + ); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From + for UnderlyingRustTuple<'_> { + fn from(value: ERC20InsufficientBalance) -> Self { + (value.sender, value.balance, value.needed) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> + for ERC20InsufficientBalance { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { + sender: tuple.0, + balance: tuple.1, + needed: tuple.2, + } + } + } + #[automatically_derived] + impl alloy_sol_types::SolError for ERC20InsufficientBalance { + type Parameters<'a> = UnderlyingSolTuple<'a>; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SIGNATURE: &'static str = "ERC20InsufficientBalance(address,uint256,uint256)"; + const SELECTOR: [u8; 4] = [228u8, 80u8, 211u8, 140u8]; + #[inline] + fn new<'a>( + tuple: as alloy_sol_types::SolType>::RustType, + ) -> Self { + tuple.into() + } + #[inline] + fn tokenize(&self) -> Self::Token<'_> { + ( + ::tokenize( + &self.sender, + ), + as alloy_sol_types::SolType>::tokenize(&self.balance), + as alloy_sol_types::SolType>::tokenize(&self.needed), + ) + } + #[inline] + fn abi_decode_raw_validate(data: &[u8]) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence_validate(data) + .map(Self::new) + } + } + }; + #[derive(serde::Serialize, serde::Deserialize)] + #[derive(Default, Debug, PartialEq, Eq, Hash)] + /**Custom error with signature `ERC20InvalidApprover(address)` and selector `0xe602df05`. +```solidity +error ERC20InvalidApprover(address approver); +```*/ + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] + #[derive(Clone)] + pub struct ERC20InvalidApprover { + #[allow(missing_docs)] + pub approver: alloy::sol_types::private::Address, + } + #[allow( + non_camel_case_types, + non_snake_case, + clippy::pub_underscore_fields, + clippy::style + )] + const _: () = { + use alloy::sol_types as alloy_sol_types; + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Address,); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (alloy::sol_types::private::Address,); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: ERC20InvalidApprover) -> Self { + (value.approver,) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for ERC20InvalidApprover { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { approver: tuple.0 } + } + } + #[automatically_derived] + impl alloy_sol_types::SolError for ERC20InvalidApprover { + type Parameters<'a> = UnderlyingSolTuple<'a>; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SIGNATURE: &'static str = "ERC20InvalidApprover(address)"; + const SELECTOR: [u8; 4] = [230u8, 2u8, 223u8, 5u8]; + #[inline] + fn new<'a>( + tuple: as alloy_sol_types::SolType>::RustType, + ) -> Self { + tuple.into() + } + #[inline] + fn tokenize(&self) -> Self::Token<'_> { + ( + ::tokenize( + &self.approver, + ), + ) + } + #[inline] + fn abi_decode_raw_validate(data: &[u8]) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence_validate(data) + .map(Self::new) + } + } + }; + #[derive(serde::Serialize, serde::Deserialize)] + #[derive(Default, Debug, PartialEq, Eq, Hash)] + /**Custom error with signature `ERC20InvalidReceiver(address)` and selector `0xec442f05`. +```solidity +error ERC20InvalidReceiver(address receiver); +```*/ + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] + #[derive(Clone)] + pub struct ERC20InvalidReceiver { + #[allow(missing_docs)] + pub receiver: alloy::sol_types::private::Address, + } + #[allow( + non_camel_case_types, + non_snake_case, + clippy::pub_underscore_fields, + clippy::style + )] + const _: () = { + use alloy::sol_types as alloy_sol_types; + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Address,); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (alloy::sol_types::private::Address,); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: ERC20InvalidReceiver) -> Self { + (value.receiver,) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for ERC20InvalidReceiver { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { receiver: tuple.0 } + } + } + #[automatically_derived] + impl alloy_sol_types::SolError for ERC20InvalidReceiver { + type Parameters<'a> = UnderlyingSolTuple<'a>; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SIGNATURE: &'static str = "ERC20InvalidReceiver(address)"; + const SELECTOR: [u8; 4] = [236u8, 68u8, 47u8, 5u8]; + #[inline] + fn new<'a>( + tuple: as alloy_sol_types::SolType>::RustType, + ) -> Self { + tuple.into() + } + #[inline] + fn tokenize(&self) -> Self::Token<'_> { + ( + ::tokenize( + &self.receiver, + ), + ) + } + #[inline] + fn abi_decode_raw_validate(data: &[u8]) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence_validate(data) + .map(Self::new) + } + } + }; + #[derive(serde::Serialize, serde::Deserialize)] + #[derive(Default, Debug, PartialEq, Eq, Hash)] + /**Custom error with signature `ERC20InvalidSender(address)` and selector `0x96c6fd1e`. +```solidity +error ERC20InvalidSender(address sender); +```*/ + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] + #[derive(Clone)] + pub struct ERC20InvalidSender { + #[allow(missing_docs)] + pub sender: alloy::sol_types::private::Address, + } + #[allow( + non_camel_case_types, + non_snake_case, + clippy::pub_underscore_fields, + clippy::style + )] + const _: () = { + use alloy::sol_types as alloy_sol_types; + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Address,); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (alloy::sol_types::private::Address,); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: ERC20InvalidSender) -> Self { + (value.sender,) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for ERC20InvalidSender { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { sender: tuple.0 } + } + } + #[automatically_derived] + impl alloy_sol_types::SolError for ERC20InvalidSender { + type Parameters<'a> = UnderlyingSolTuple<'a>; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SIGNATURE: &'static str = "ERC20InvalidSender(address)"; + const SELECTOR: [u8; 4] = [150u8, 198u8, 253u8, 30u8]; + #[inline] + fn new<'a>( + tuple: as alloy_sol_types::SolType>::RustType, + ) -> Self { + tuple.into() + } + #[inline] + fn tokenize(&self) -> Self::Token<'_> { + ( + ::tokenize( + &self.sender, + ), + ) + } + #[inline] + fn abi_decode_raw_validate(data: &[u8]) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence_validate(data) + .map(Self::new) + } + } + }; + #[derive(serde::Serialize, serde::Deserialize)] + #[derive(Default, Debug, PartialEq, Eq, Hash)] + /**Custom error with signature `ERC20InvalidSpender(address)` and selector `0x94280d62`. +```solidity +error ERC20InvalidSpender(address spender); +```*/ + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] + #[derive(Clone)] + pub struct ERC20InvalidSpender { + #[allow(missing_docs)] + pub spender: alloy::sol_types::private::Address, + } + #[allow( + non_camel_case_types, + non_snake_case, + clippy::pub_underscore_fields, + clippy::style + )] + const _: () = { + use alloy::sol_types as alloy_sol_types; + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Address,); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (alloy::sol_types::private::Address,); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: ERC20InvalidSpender) -> Self { + (value.spender,) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for ERC20InvalidSpender { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { spender: tuple.0 } + } + } + #[automatically_derived] + impl alloy_sol_types::SolError for ERC20InvalidSpender { + type Parameters<'a> = UnderlyingSolTuple<'a>; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SIGNATURE: &'static str = "ERC20InvalidSpender(address)"; + const SELECTOR: [u8; 4] = [148u8, 40u8, 13u8, 98u8]; + #[inline] + fn new<'a>( + tuple: as alloy_sol_types::SolType>::RustType, + ) -> Self { + tuple.into() + } + #[inline] + fn tokenize(&self) -> Self::Token<'_> { + ( + ::tokenize( + &self.spender, + ), + ) + } + #[inline] + fn abi_decode_raw_validate(data: &[u8]) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence_validate(data) + .map(Self::new) + } + } + }; + #[derive(serde::Serialize, serde::Deserialize)] + #[derive(Default, Debug, PartialEq, Eq, Hash)] + /**Custom error with signature `EnforcedPause()` and selector `0xd93c0665`. +```solidity +error EnforcedPause(); +```*/ + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] + #[derive(Clone)] + pub struct EnforcedPause; + #[allow( + non_camel_case_types, + non_snake_case, + clippy::pub_underscore_fields, + clippy::style + )] + const _: () = { + use alloy::sol_types as alloy_sol_types; + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: EnforcedPause) -> Self { + () + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for EnforcedPause { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self + } + } + #[automatically_derived] + impl alloy_sol_types::SolError for EnforcedPause { + type Parameters<'a> = UnderlyingSolTuple<'a>; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SIGNATURE: &'static str = "EnforcedPause()"; + const SELECTOR: [u8; 4] = [217u8, 60u8, 6u8, 101u8]; + #[inline] + fn new<'a>( + tuple: as alloy_sol_types::SolType>::RustType, + ) -> Self { + tuple.into() + } + #[inline] + fn tokenize(&self) -> Self::Token<'_> { + () + } + #[inline] + fn abi_decode_raw_validate(data: &[u8]) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence_validate(data) + .map(Self::new) + } + } + }; + #[derive(serde::Serialize, serde::Deserialize)] + #[derive(Default, Debug, PartialEq, Eq, Hash)] + /**Custom error with signature `ExpectedPause()` and selector `0x8dfc202b`. +```solidity +error ExpectedPause(); +```*/ + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] + #[derive(Clone)] + pub struct ExpectedPause; + #[allow( + non_camel_case_types, + non_snake_case, + clippy::pub_underscore_fields, + clippy::style + )] + const _: () = { + use alloy::sol_types as alloy_sol_types; + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: ExpectedPause) -> Self { + () + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for ExpectedPause { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self + } + } + #[automatically_derived] + impl alloy_sol_types::SolError for ExpectedPause { + type Parameters<'a> = UnderlyingSolTuple<'a>; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SIGNATURE: &'static str = "ExpectedPause()"; + const SELECTOR: [u8; 4] = [141u8, 252u8, 32u8, 43u8]; + #[inline] + fn new<'a>( + tuple: as alloy_sol_types::SolType>::RustType, + ) -> Self { + tuple.into() + } + #[inline] + fn tokenize(&self) -> Self::Token<'_> { + () + } + #[inline] + fn abi_decode_raw_validate(data: &[u8]) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence_validate(data) + .map(Self::new) + } + } + }; + #[derive(serde::Serialize, serde::Deserialize)] + #[derive(Default, Debug, PartialEq, Eq, Hash)] + /**Event with signature `Approval(address,address,uint256)` and selector `0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925`. +```solidity +event Approval(address indexed owner, address indexed spender, uint256 value); +```*/ + #[allow( + non_camel_case_types, + non_snake_case, + clippy::pub_underscore_fields, + clippy::style + )] + #[derive(Clone)] + pub struct Approval { + #[allow(missing_docs)] + pub owner: alloy::sol_types::private::Address, + #[allow(missing_docs)] + pub spender: alloy::sol_types::private::Address, + #[allow(missing_docs)] + pub value: alloy::sol_types::private::primitives::aliases::U256, + } + #[allow( + non_camel_case_types, + non_snake_case, + clippy::pub_underscore_fields, + clippy::style + )] + const _: () = { + use alloy::sol_types as alloy_sol_types; + #[automatically_derived] + impl alloy_sol_types::SolEvent for Approval { + type DataTuple<'a> = (alloy::sol_types::sol_data::Uint<256>,); + type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + type TopicList = ( + alloy_sol_types::sol_data::FixedBytes<32>, + alloy::sol_types::sol_data::Address, + alloy::sol_types::sol_data::Address, + ); + const SIGNATURE: &'static str = "Approval(address,address,uint256)"; + const SIGNATURE_HASH: alloy_sol_types::private::B256 = alloy_sol_types::private::B256::new([ + 140u8, 91u8, 225u8, 229u8, 235u8, 236u8, 125u8, 91u8, 209u8, 79u8, 113u8, + 66u8, 125u8, 30u8, 132u8, 243u8, 221u8, 3u8, 20u8, 192u8, 247u8, 178u8, + 41u8, 30u8, 91u8, 32u8, 10u8, 200u8, 199u8, 195u8, 185u8, 37u8, + ]); + const ANONYMOUS: bool = false; + #[allow(unused_variables)] + #[inline] + fn new( + topics: ::RustType, + data: as alloy_sol_types::SolType>::RustType, + ) -> Self { + Self { + owner: topics.1, + spender: topics.2, + value: data.0, + } + } + #[inline] + fn check_signature( + topics: &::RustType, + ) -> alloy_sol_types::Result<()> { + if topics.0 != Self::SIGNATURE_HASH { + return Err( + alloy_sol_types::Error::invalid_event_signature_hash( + Self::SIGNATURE, + topics.0, + Self::SIGNATURE_HASH, + ), + ); + } + Ok(()) + } + #[inline] + fn tokenize_body(&self) -> Self::DataToken<'_> { + ( + as alloy_sol_types::SolType>::tokenize(&self.value), + ) + } + #[inline] + fn topics(&self) -> ::RustType { + (Self::SIGNATURE_HASH.into(), self.owner.clone(), self.spender.clone()) + } + #[inline] + fn encode_topics_raw( + &self, + out: &mut [alloy_sol_types::abi::token::WordToken], + ) -> alloy_sol_types::Result<()> { + if out.len() < ::COUNT { + return Err(alloy_sol_types::Error::Overrun); + } + out[0usize] = alloy_sol_types::abi::token::WordToken( + Self::SIGNATURE_HASH, + ); + out[1usize] = ::encode_topic( + &self.owner, + ); + out[2usize] = ::encode_topic( + &self.spender, + ); + Ok(()) + } + } + #[automatically_derived] + impl alloy_sol_types::private::IntoLogData for Approval { + fn to_log_data(&self) -> alloy_sol_types::private::LogData { + From::from(self) + } + fn into_log_data(self) -> alloy_sol_types::private::LogData { + From::from(&self) + } + } + #[automatically_derived] + impl From<&Approval> for alloy_sol_types::private::LogData { + #[inline] + fn from(this: &Approval) -> alloy_sol_types::private::LogData { + alloy_sol_types::SolEvent::encode_log_data(this) + } + } + }; + #[derive(serde::Serialize, serde::Deserialize)] + #[derive(Default, Debug, PartialEq, Eq, Hash)] + /**Event with signature `Paused(address)` and selector `0x62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258`. +```solidity +event Paused(address account); +```*/ + #[allow( + non_camel_case_types, + non_snake_case, + clippy::pub_underscore_fields, + clippy::style + )] + #[derive(Clone)] + pub struct Paused { + #[allow(missing_docs)] + pub account: alloy::sol_types::private::Address, + } + #[allow( + non_camel_case_types, + non_snake_case, + clippy::pub_underscore_fields, + clippy::style + )] + const _: () = { + use alloy::sol_types as alloy_sol_types; + #[automatically_derived] + impl alloy_sol_types::SolEvent for Paused { + type DataTuple<'a> = (alloy::sol_types::sol_data::Address,); + type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + type TopicList = (alloy_sol_types::sol_data::FixedBytes<32>,); + const SIGNATURE: &'static str = "Paused(address)"; + const SIGNATURE_HASH: alloy_sol_types::private::B256 = alloy_sol_types::private::B256::new([ + 98u8, 231u8, 140u8, 234u8, 1u8, 190u8, 227u8, 32u8, 205u8, 78u8, 66u8, + 2u8, 112u8, 181u8, 234u8, 116u8, 0u8, 13u8, 17u8, 176u8, 201u8, 247u8, + 71u8, 84u8, 235u8, 219u8, 252u8, 84u8, 75u8, 5u8, 162u8, 88u8, + ]); + const ANONYMOUS: bool = false; + #[allow(unused_variables)] + #[inline] + fn new( + topics: ::RustType, + data: as alloy_sol_types::SolType>::RustType, + ) -> Self { + Self { account: data.0 } + } + #[inline] + fn check_signature( + topics: &::RustType, + ) -> alloy_sol_types::Result<()> { + if topics.0 != Self::SIGNATURE_HASH { + return Err( + alloy_sol_types::Error::invalid_event_signature_hash( + Self::SIGNATURE, + topics.0, + Self::SIGNATURE_HASH, + ), + ); + } + Ok(()) + } + #[inline] + fn tokenize_body(&self) -> Self::DataToken<'_> { + ( + ::tokenize( + &self.account, + ), + ) + } + #[inline] + fn topics(&self) -> ::RustType { + (Self::SIGNATURE_HASH.into(),) + } + #[inline] + fn encode_topics_raw( + &self, + out: &mut [alloy_sol_types::abi::token::WordToken], + ) -> alloy_sol_types::Result<()> { + if out.len() < ::COUNT { + return Err(alloy_sol_types::Error::Overrun); + } + out[0usize] = alloy_sol_types::abi::token::WordToken( + Self::SIGNATURE_HASH, + ); + Ok(()) + } + } + #[automatically_derived] + impl alloy_sol_types::private::IntoLogData for Paused { + fn to_log_data(&self) -> alloy_sol_types::private::LogData { + From::from(self) + } + fn into_log_data(self) -> alloy_sol_types::private::LogData { + From::from(&self) + } + } + #[automatically_derived] + impl From<&Paused> for alloy_sol_types::private::LogData { + #[inline] + fn from(this: &Paused) -> alloy_sol_types::private::LogData { + alloy_sol_types::SolEvent::encode_log_data(this) + } + } + }; + #[derive(serde::Serialize, serde::Deserialize)] + #[derive(Default, Debug, PartialEq, Eq, Hash)] + /**Event with signature `RoleAdminChanged(bytes32,bytes32,bytes32)` and selector `0xbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff`. +```solidity +event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole); +```*/ + #[allow( + non_camel_case_types, + non_snake_case, + clippy::pub_underscore_fields, + clippy::style + )] + #[derive(Clone)] + pub struct RoleAdminChanged { + #[allow(missing_docs)] + pub role: alloy::sol_types::private::FixedBytes<32>, + #[allow(missing_docs)] + pub previousAdminRole: alloy::sol_types::private::FixedBytes<32>, + #[allow(missing_docs)] + pub newAdminRole: alloy::sol_types::private::FixedBytes<32>, + } + #[allow( + non_camel_case_types, + non_snake_case, + clippy::pub_underscore_fields, + clippy::style + )] + const _: () = { + use alloy::sol_types as alloy_sol_types; + #[automatically_derived] + impl alloy_sol_types::SolEvent for RoleAdminChanged { + type DataTuple<'a> = (); + type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + type TopicList = ( + alloy_sol_types::sol_data::FixedBytes<32>, + alloy::sol_types::sol_data::FixedBytes<32>, + alloy::sol_types::sol_data::FixedBytes<32>, + alloy::sol_types::sol_data::FixedBytes<32>, + ); + const SIGNATURE: &'static str = "RoleAdminChanged(bytes32,bytes32,bytes32)"; + const SIGNATURE_HASH: alloy_sol_types::private::B256 = alloy_sol_types::private::B256::new([ + 189u8, 121u8, 184u8, 111u8, 254u8, 10u8, 184u8, 232u8, 119u8, 97u8, 81u8, + 81u8, 66u8, 23u8, 205u8, 124u8, 172u8, 213u8, 44u8, 144u8, 159u8, 102u8, + 71u8, 92u8, 58u8, 244u8, 78u8, 18u8, 159u8, 11u8, 0u8, 255u8, + ]); + const ANONYMOUS: bool = false; + #[allow(unused_variables)] + #[inline] + fn new( + topics: ::RustType, + data: as alloy_sol_types::SolType>::RustType, + ) -> Self { + Self { + role: topics.1, + previousAdminRole: topics.2, + newAdminRole: topics.3, + } + } + #[inline] + fn check_signature( + topics: &::RustType, + ) -> alloy_sol_types::Result<()> { + if topics.0 != Self::SIGNATURE_HASH { + return Err( + alloy_sol_types::Error::invalid_event_signature_hash( + Self::SIGNATURE, + topics.0, + Self::SIGNATURE_HASH, + ), + ); + } + Ok(()) + } + #[inline] + fn tokenize_body(&self) -> Self::DataToken<'_> { + () + } + #[inline] + fn topics(&self) -> ::RustType { + ( + Self::SIGNATURE_HASH.into(), + self.role.clone(), + self.previousAdminRole.clone(), + self.newAdminRole.clone(), + ) + } + #[inline] + fn encode_topics_raw( + &self, + out: &mut [alloy_sol_types::abi::token::WordToken], + ) -> alloy_sol_types::Result<()> { + if out.len() < ::COUNT { + return Err(alloy_sol_types::Error::Overrun); + } + out[0usize] = alloy_sol_types::abi::token::WordToken( + Self::SIGNATURE_HASH, + ); + out[1usize] = as alloy_sol_types::EventTopic>::encode_topic(&self.role); + out[2usize] = as alloy_sol_types::EventTopic>::encode_topic(&self.previousAdminRole); + out[3usize] = as alloy_sol_types::EventTopic>::encode_topic(&self.newAdminRole); + Ok(()) + } + } + #[automatically_derived] + impl alloy_sol_types::private::IntoLogData for RoleAdminChanged { + fn to_log_data(&self) -> alloy_sol_types::private::LogData { + From::from(self) + } + fn into_log_data(self) -> alloy_sol_types::private::LogData { + From::from(&self) + } + } + #[automatically_derived] + impl From<&RoleAdminChanged> for alloy_sol_types::private::LogData { + #[inline] + fn from(this: &RoleAdminChanged) -> alloy_sol_types::private::LogData { + alloy_sol_types::SolEvent::encode_log_data(this) + } + } + }; + #[derive(serde::Serialize, serde::Deserialize)] + #[derive(Default, Debug, PartialEq, Eq, Hash)] + /**Event with signature `RoleGranted(bytes32,address,address)` and selector `0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d`. +```solidity +event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender); +```*/ + #[allow( + non_camel_case_types, + non_snake_case, + clippy::pub_underscore_fields, + clippy::style + )] + #[derive(Clone)] + pub struct RoleGranted { + #[allow(missing_docs)] + pub role: alloy::sol_types::private::FixedBytes<32>, + #[allow(missing_docs)] + pub account: alloy::sol_types::private::Address, + #[allow(missing_docs)] + pub sender: alloy::sol_types::private::Address, + } + #[allow( + non_camel_case_types, + non_snake_case, + clippy::pub_underscore_fields, + clippy::style + )] + const _: () = { + use alloy::sol_types as alloy_sol_types; + #[automatically_derived] + impl alloy_sol_types::SolEvent for RoleGranted { + type DataTuple<'a> = (); + type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + type TopicList = ( + alloy_sol_types::sol_data::FixedBytes<32>, + alloy::sol_types::sol_data::FixedBytes<32>, + alloy::sol_types::sol_data::Address, + alloy::sol_types::sol_data::Address, + ); + const SIGNATURE: &'static str = "RoleGranted(bytes32,address,address)"; + const SIGNATURE_HASH: alloy_sol_types::private::B256 = alloy_sol_types::private::B256::new([ + 47u8, 135u8, 136u8, 17u8, 126u8, 126u8, 255u8, 29u8, 130u8, 233u8, 38u8, + 236u8, 121u8, 73u8, 1u8, 209u8, 124u8, 120u8, 2u8, 74u8, 80u8, 39u8, 9u8, + 64u8, 48u8, 69u8, 64u8, 167u8, 51u8, 101u8, 111u8, 13u8, + ]); + const ANONYMOUS: bool = false; + #[allow(unused_variables)] + #[inline] + fn new( + topics: ::RustType, + data: as alloy_sol_types::SolType>::RustType, + ) -> Self { + Self { + role: topics.1, + account: topics.2, + sender: topics.3, + } + } + #[inline] + fn check_signature( + topics: &::RustType, + ) -> alloy_sol_types::Result<()> { + if topics.0 != Self::SIGNATURE_HASH { + return Err( + alloy_sol_types::Error::invalid_event_signature_hash( + Self::SIGNATURE, + topics.0, + Self::SIGNATURE_HASH, + ), + ); + } + Ok(()) + } + #[inline] + fn tokenize_body(&self) -> Self::DataToken<'_> { + () + } + #[inline] + fn topics(&self) -> ::RustType { + ( + Self::SIGNATURE_HASH.into(), + self.role.clone(), + self.account.clone(), + self.sender.clone(), + ) + } + #[inline] + fn encode_topics_raw( + &self, + out: &mut [alloy_sol_types::abi::token::WordToken], + ) -> alloy_sol_types::Result<()> { + if out.len() < ::COUNT { + return Err(alloy_sol_types::Error::Overrun); + } + out[0usize] = alloy_sol_types::abi::token::WordToken( + Self::SIGNATURE_HASH, + ); + out[1usize] = as alloy_sol_types::EventTopic>::encode_topic(&self.role); + out[2usize] = ::encode_topic( + &self.account, + ); + out[3usize] = ::encode_topic( + &self.sender, + ); + Ok(()) + } + } + #[automatically_derived] + impl alloy_sol_types::private::IntoLogData for RoleGranted { + fn to_log_data(&self) -> alloy_sol_types::private::LogData { + From::from(self) + } + fn into_log_data(self) -> alloy_sol_types::private::LogData { + From::from(&self) + } + } + #[automatically_derived] + impl From<&RoleGranted> for alloy_sol_types::private::LogData { + #[inline] + fn from(this: &RoleGranted) -> alloy_sol_types::private::LogData { + alloy_sol_types::SolEvent::encode_log_data(this) + } + } + }; + #[derive(serde::Serialize, serde::Deserialize)] + #[derive(Default, Debug, PartialEq, Eq, Hash)] + /**Event with signature `RoleRevoked(bytes32,address,address)` and selector `0xf6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b`. +```solidity +event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender); +```*/ + #[allow( + non_camel_case_types, + non_snake_case, + clippy::pub_underscore_fields, + clippy::style + )] + #[derive(Clone)] + pub struct RoleRevoked { + #[allow(missing_docs)] + pub role: alloy::sol_types::private::FixedBytes<32>, + #[allow(missing_docs)] + pub account: alloy::sol_types::private::Address, + #[allow(missing_docs)] + pub sender: alloy::sol_types::private::Address, + } + #[allow( + non_camel_case_types, + non_snake_case, + clippy::pub_underscore_fields, + clippy::style + )] + const _: () = { + use alloy::sol_types as alloy_sol_types; + #[automatically_derived] + impl alloy_sol_types::SolEvent for RoleRevoked { + type DataTuple<'a> = (); + type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + type TopicList = ( + alloy_sol_types::sol_data::FixedBytes<32>, + alloy::sol_types::sol_data::FixedBytes<32>, + alloy::sol_types::sol_data::Address, + alloy::sol_types::sol_data::Address, + ); + const SIGNATURE: &'static str = "RoleRevoked(bytes32,address,address)"; + const SIGNATURE_HASH: alloy_sol_types::private::B256 = alloy_sol_types::private::B256::new([ + 246u8, 57u8, 31u8, 92u8, 50u8, 217u8, 198u8, 157u8, 42u8, 71u8, 234u8, + 103u8, 11u8, 68u8, 41u8, 116u8, 181u8, 57u8, 53u8, 209u8, 237u8, 199u8, + 253u8, 100u8, 235u8, 33u8, 224u8, 71u8, 168u8, 57u8, 23u8, 27u8, + ]); + const ANONYMOUS: bool = false; + #[allow(unused_variables)] + #[inline] + fn new( + topics: ::RustType, + data: as alloy_sol_types::SolType>::RustType, + ) -> Self { + Self { + role: topics.1, + account: topics.2, + sender: topics.3, + } + } + #[inline] + fn check_signature( + topics: &::RustType, + ) -> alloy_sol_types::Result<()> { + if topics.0 != Self::SIGNATURE_HASH { + return Err( + alloy_sol_types::Error::invalid_event_signature_hash( + Self::SIGNATURE, + topics.0, + Self::SIGNATURE_HASH, + ), + ); + } + Ok(()) + } + #[inline] + fn tokenize_body(&self) -> Self::DataToken<'_> { + () + } + #[inline] + fn topics(&self) -> ::RustType { + ( + Self::SIGNATURE_HASH.into(), + self.role.clone(), + self.account.clone(), + self.sender.clone(), + ) + } + #[inline] + fn encode_topics_raw( + &self, + out: &mut [alloy_sol_types::abi::token::WordToken], + ) -> alloy_sol_types::Result<()> { + if out.len() < ::COUNT { + return Err(alloy_sol_types::Error::Overrun); + } + out[0usize] = alloy_sol_types::abi::token::WordToken( + Self::SIGNATURE_HASH, + ); + out[1usize] = as alloy_sol_types::EventTopic>::encode_topic(&self.role); + out[2usize] = ::encode_topic( + &self.account, + ); + out[3usize] = ::encode_topic( + &self.sender, + ); + Ok(()) + } + } + #[automatically_derived] + impl alloy_sol_types::private::IntoLogData for RoleRevoked { + fn to_log_data(&self) -> alloy_sol_types::private::LogData { + From::from(self) + } + fn into_log_data(self) -> alloy_sol_types::private::LogData { + From::from(&self) + } + } + #[automatically_derived] + impl From<&RoleRevoked> for alloy_sol_types::private::LogData { + #[inline] + fn from(this: &RoleRevoked) -> alloy_sol_types::private::LogData { + alloy_sol_types::SolEvent::encode_log_data(this) + } + } + }; + #[derive(serde::Serialize, serde::Deserialize)] + #[derive(Default, Debug, PartialEq, Eq, Hash)] + /**Event with signature `Transfer(address,address,uint256)` and selector `0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef`. +```solidity +event Transfer(address indexed from, address indexed to, uint256 value); +```*/ + #[allow( + non_camel_case_types, + non_snake_case, + clippy::pub_underscore_fields, + clippy::style + )] + #[derive(Clone)] + pub struct Transfer { + #[allow(missing_docs)] + pub from: alloy::sol_types::private::Address, + #[allow(missing_docs)] + pub to: alloy::sol_types::private::Address, + #[allow(missing_docs)] + pub value: alloy::sol_types::private::primitives::aliases::U256, + } + #[allow( + non_camel_case_types, + non_snake_case, + clippy::pub_underscore_fields, + clippy::style + )] + const _: () = { + use alloy::sol_types as alloy_sol_types; + #[automatically_derived] + impl alloy_sol_types::SolEvent for Transfer { + type DataTuple<'a> = (alloy::sol_types::sol_data::Uint<256>,); + type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + type TopicList = ( + alloy_sol_types::sol_data::FixedBytes<32>, + alloy::sol_types::sol_data::Address, + alloy::sol_types::sol_data::Address, + ); + const SIGNATURE: &'static str = "Transfer(address,address,uint256)"; + const SIGNATURE_HASH: alloy_sol_types::private::B256 = alloy_sol_types::private::B256::new([ + 221u8, 242u8, 82u8, 173u8, 27u8, 226u8, 200u8, 155u8, 105u8, 194u8, + 176u8, 104u8, 252u8, 55u8, 141u8, 170u8, 149u8, 43u8, 167u8, 241u8, 99u8, + 196u8, 161u8, 22u8, 40u8, 245u8, 90u8, 77u8, 245u8, 35u8, 179u8, 239u8, + ]); + const ANONYMOUS: bool = false; + #[allow(unused_variables)] + #[inline] + fn new( + topics: ::RustType, + data: as alloy_sol_types::SolType>::RustType, + ) -> Self { + Self { + from: topics.1, + to: topics.2, + value: data.0, + } + } + #[inline] + fn check_signature( + topics: &::RustType, + ) -> alloy_sol_types::Result<()> { + if topics.0 != Self::SIGNATURE_HASH { + return Err( + alloy_sol_types::Error::invalid_event_signature_hash( + Self::SIGNATURE, + topics.0, + Self::SIGNATURE_HASH, + ), + ); + } + Ok(()) + } + #[inline] + fn tokenize_body(&self) -> Self::DataToken<'_> { + ( + as alloy_sol_types::SolType>::tokenize(&self.value), + ) + } + #[inline] + fn topics(&self) -> ::RustType { + (Self::SIGNATURE_HASH.into(), self.from.clone(), self.to.clone()) + } + #[inline] + fn encode_topics_raw( + &self, + out: &mut [alloy_sol_types::abi::token::WordToken], + ) -> alloy_sol_types::Result<()> { + if out.len() < ::COUNT { + return Err(alloy_sol_types::Error::Overrun); + } + out[0usize] = alloy_sol_types::abi::token::WordToken( + Self::SIGNATURE_HASH, + ); + out[1usize] = ::encode_topic( + &self.from, + ); + out[2usize] = ::encode_topic( + &self.to, + ); + Ok(()) + } + } + #[automatically_derived] + impl alloy_sol_types::private::IntoLogData for Transfer { + fn to_log_data(&self) -> alloy_sol_types::private::LogData { + From::from(self) + } + fn into_log_data(self) -> alloy_sol_types::private::LogData { + From::from(&self) + } + } + #[automatically_derived] + impl From<&Transfer> for alloy_sol_types::private::LogData { + #[inline] + fn from(this: &Transfer) -> alloy_sol_types::private::LogData { + alloy_sol_types::SolEvent::encode_log_data(this) + } + } + }; + #[derive(serde::Serialize, serde::Deserialize)] + #[derive(Default, Debug, PartialEq, Eq, Hash)] + /**Event with signature `Unpaused(address)` and selector `0x5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa`. +```solidity +event Unpaused(address account); +```*/ + #[allow( + non_camel_case_types, + non_snake_case, + clippy::pub_underscore_fields, + clippy::style + )] + #[derive(Clone)] + pub struct Unpaused { + #[allow(missing_docs)] + pub account: alloy::sol_types::private::Address, + } + #[allow( + non_camel_case_types, + non_snake_case, + clippy::pub_underscore_fields, + clippy::style + )] + const _: () = { + use alloy::sol_types as alloy_sol_types; + #[automatically_derived] + impl alloy_sol_types::SolEvent for Unpaused { + type DataTuple<'a> = (alloy::sol_types::sol_data::Address,); + type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + type TopicList = (alloy_sol_types::sol_data::FixedBytes<32>,); + const SIGNATURE: &'static str = "Unpaused(address)"; + const SIGNATURE_HASH: alloy_sol_types::private::B256 = alloy_sol_types::private::B256::new([ + 93u8, 185u8, 238u8, 10u8, 73u8, 91u8, 242u8, 230u8, 255u8, 156u8, 145u8, + 167u8, 131u8, 76u8, 27u8, 164u8, 253u8, 210u8, 68u8, 165u8, 232u8, 170u8, + 78u8, 83u8, 123u8, 211u8, 138u8, 234u8, 228u8, 176u8, 115u8, 170u8, + ]); + const ANONYMOUS: bool = false; + #[allow(unused_variables)] + #[inline] + fn new( + topics: ::RustType, + data: as alloy_sol_types::SolType>::RustType, + ) -> Self { + Self { account: data.0 } + } + #[inline] + fn check_signature( + topics: &::RustType, + ) -> alloy_sol_types::Result<()> { + if topics.0 != Self::SIGNATURE_HASH { + return Err( + alloy_sol_types::Error::invalid_event_signature_hash( + Self::SIGNATURE, + topics.0, + Self::SIGNATURE_HASH, + ), + ); + } + Ok(()) + } + #[inline] + fn tokenize_body(&self) -> Self::DataToken<'_> { + ( + ::tokenize( + &self.account, + ), + ) + } + #[inline] + fn topics(&self) -> ::RustType { + (Self::SIGNATURE_HASH.into(),) + } + #[inline] + fn encode_topics_raw( + &self, + out: &mut [alloy_sol_types::abi::token::WordToken], + ) -> alloy_sol_types::Result<()> { + if out.len() < ::COUNT { + return Err(alloy_sol_types::Error::Overrun); + } + out[0usize] = alloy_sol_types::abi::token::WordToken( + Self::SIGNATURE_HASH, + ); + Ok(()) + } + } + #[automatically_derived] + impl alloy_sol_types::private::IntoLogData for Unpaused { + fn to_log_data(&self) -> alloy_sol_types::private::LogData { + From::from(self) + } + fn into_log_data(self) -> alloy_sol_types::private::LogData { + From::from(&self) + } + } + #[automatically_derived] + impl From<&Unpaused> for alloy_sol_types::private::LogData { + #[inline] + fn from(this: &Unpaused) -> alloy_sol_types::private::LogData { + alloy_sol_types::SolEvent::encode_log_data(this) + } + } + }; + /**Constructor`. +```solidity +constructor(string name_, string symbol_, uint8 decimals_); +```*/ + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] + #[derive(Clone)] + pub struct constructorCall { + #[allow(missing_docs)] + pub name_: alloy::sol_types::private::String, + #[allow(missing_docs)] + pub symbol_: alloy::sol_types::private::String, + #[allow(missing_docs)] + pub decimals_: u8, + } + const _: () = { + use alloy::sol_types as alloy_sol_types; + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = ( + alloy::sol_types::sol_data::String, + alloy::sol_types::sol_data::String, + alloy::sol_types::sol_data::Uint<8>, + ); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = ( + alloy::sol_types::private::String, + alloy::sol_types::private::String, + u8, + ); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: constructorCall) -> Self { + (value.name_, value.symbol_, value.decimals_) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for constructorCall { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { + name_: tuple.0, + symbol_: tuple.1, + decimals_: tuple.2, + } + } + } + } + #[automatically_derived] + impl alloy_sol_types::SolConstructor for constructorCall { + type Parameters<'a> = ( + alloy::sol_types::sol_data::String, + alloy::sol_types::sol_data::String, + alloy::sol_types::sol_data::Uint<8>, + ); + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + #[inline] + fn new<'a>( + tuple: as alloy_sol_types::SolType>::RustType, + ) -> Self { + tuple.into() + } + #[inline] + fn tokenize(&self) -> Self::Token<'_> { + ( + ::tokenize( + &self.name_, + ), + ::tokenize( + &self.symbol_, + ), + as alloy_sol_types::SolType>::tokenize(&self.decimals_), + ) + } + } + }; + #[derive(serde::Serialize, serde::Deserialize)] + #[derive(Default, Debug, PartialEq, Eq, Hash)] + /**Function with signature `DEFAULT_ADMIN_ROLE()` and selector `0xa217fddf`. +```solidity +function DEFAULT_ADMIN_ROLE() external view returns (bytes32); +```*/ + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] + #[derive(Clone)] + pub struct DEFAULT_ADMIN_ROLECall; + #[derive(serde::Serialize, serde::Deserialize)] + #[derive(Default, Debug, PartialEq, Eq, Hash)] + ///Container type for the return parameters of the [`DEFAULT_ADMIN_ROLE()`](DEFAULT_ADMIN_ROLECall) function. + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] + #[derive(Clone)] + pub struct DEFAULT_ADMIN_ROLEReturn { + #[allow(missing_docs)] + pub _0: alloy::sol_types::private::FixedBytes<32>, + } + #[allow( + non_camel_case_types, + non_snake_case, + clippy::pub_underscore_fields, + clippy::style + )] + const _: () = { + use alloy::sol_types as alloy_sol_types; + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From + for UnderlyingRustTuple<'_> { + fn from(value: DEFAULT_ADMIN_ROLECall) -> Self { + () + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> + for DEFAULT_ADMIN_ROLECall { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self + } + } + } + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::FixedBytes<32>,); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (alloy::sol_types::private::FixedBytes<32>,); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From + for UnderlyingRustTuple<'_> { + fn from(value: DEFAULT_ADMIN_ROLEReturn) -> Self { + (value._0,) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> + for DEFAULT_ADMIN_ROLEReturn { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { _0: tuple.0 } + } + } + } + #[automatically_derived] + impl alloy_sol_types::SolCall for DEFAULT_ADMIN_ROLECall { + type Parameters<'a> = (); + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Return = alloy::sol_types::private::FixedBytes<32>; + type ReturnTuple<'a> = (alloy::sol_types::sol_data::FixedBytes<32>,); + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SIGNATURE: &'static str = "DEFAULT_ADMIN_ROLE()"; + const SELECTOR: [u8; 4] = [162u8, 23u8, 253u8, 223u8]; + #[inline] + fn new<'a>( + tuple: as alloy_sol_types::SolType>::RustType, + ) -> Self { + tuple.into() + } + #[inline] + fn tokenize(&self) -> Self::Token<'_> { + () + } + #[inline] + fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { + ( + as alloy_sol_types::SolType>::tokenize(ret), + ) + } + #[inline] + fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence(data) + .map(|r| { + let r: DEFAULT_ADMIN_ROLEReturn = r.into(); + r._0 + }) + } + #[inline] + fn abi_decode_returns_validate( + data: &[u8], + ) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence_validate(data) + .map(|r| { + let r: DEFAULT_ADMIN_ROLEReturn = r.into(); + r._0 + }) + } + } + }; + #[derive(serde::Serialize, serde::Deserialize)] + #[derive(Default, Debug, PartialEq, Eq, Hash)] + /**Function with signature `MINTER_ROLE()` and selector `0xd5391393`. +```solidity +function MINTER_ROLE() external view returns (bytes32); +```*/ + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] + #[derive(Clone)] + pub struct MINTER_ROLECall; + #[derive(serde::Serialize, serde::Deserialize)] + #[derive(Default, Debug, PartialEq, Eq, Hash)] + ///Container type for the return parameters of the [`MINTER_ROLE()`](MINTER_ROLECall) function. + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] + #[derive(Clone)] + pub struct MINTER_ROLEReturn { + #[allow(missing_docs)] + pub _0: alloy::sol_types::private::FixedBytes<32>, + } + #[allow( + non_camel_case_types, + non_snake_case, + clippy::pub_underscore_fields, + clippy::style + )] + const _: () = { + use alloy::sol_types as alloy_sol_types; + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: MINTER_ROLECall) -> Self { + () + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for MINTER_ROLECall { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self + } + } + } + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::FixedBytes<32>,); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (alloy::sol_types::private::FixedBytes<32>,); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: MINTER_ROLEReturn) -> Self { + (value._0,) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for MINTER_ROLEReturn { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { _0: tuple.0 } + } + } + } + #[automatically_derived] + impl alloy_sol_types::SolCall for MINTER_ROLECall { + type Parameters<'a> = (); + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Return = alloy::sol_types::private::FixedBytes<32>; + type ReturnTuple<'a> = (alloy::sol_types::sol_data::FixedBytes<32>,); + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SIGNATURE: &'static str = "MINTER_ROLE()"; + const SELECTOR: [u8; 4] = [213u8, 57u8, 19u8, 147u8]; + #[inline] + fn new<'a>( + tuple: as alloy_sol_types::SolType>::RustType, + ) -> Self { + tuple.into() + } + #[inline] + fn tokenize(&self) -> Self::Token<'_> { + () + } + #[inline] + fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { + ( + as alloy_sol_types::SolType>::tokenize(ret), + ) + } + #[inline] + fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence(data) + .map(|r| { + let r: MINTER_ROLEReturn = r.into(); + r._0 + }) + } + #[inline] + fn abi_decode_returns_validate( + data: &[u8], + ) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence_validate(data) + .map(|r| { + let r: MINTER_ROLEReturn = r.into(); + r._0 + }) + } + } + }; + #[derive(serde::Serialize, serde::Deserialize)] + #[derive(Default, Debug, PartialEq, Eq, Hash)] + /**Function with signature `PAUSER_ROLE()` and selector `0xe63ab1e9`. +```solidity +function PAUSER_ROLE() external view returns (bytes32); +```*/ + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] + #[derive(Clone)] + pub struct PAUSER_ROLECall; + #[derive(serde::Serialize, serde::Deserialize)] + #[derive(Default, Debug, PartialEq, Eq, Hash)] + ///Container type for the return parameters of the [`PAUSER_ROLE()`](PAUSER_ROLECall) function. + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] + #[derive(Clone)] + pub struct PAUSER_ROLEReturn { + #[allow(missing_docs)] + pub _0: alloy::sol_types::private::FixedBytes<32>, + } + #[allow( + non_camel_case_types, + non_snake_case, + clippy::pub_underscore_fields, + clippy::style + )] + const _: () = { + use alloy::sol_types as alloy_sol_types; + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: PAUSER_ROLECall) -> Self { + () + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for PAUSER_ROLECall { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self + } + } + } + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::FixedBytes<32>,); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (alloy::sol_types::private::FixedBytes<32>,); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: PAUSER_ROLEReturn) -> Self { + (value._0,) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for PAUSER_ROLEReturn { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { _0: tuple.0 } + } + } + } + #[automatically_derived] + impl alloy_sol_types::SolCall for PAUSER_ROLECall { + type Parameters<'a> = (); + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Return = alloy::sol_types::private::FixedBytes<32>; + type ReturnTuple<'a> = (alloy::sol_types::sol_data::FixedBytes<32>,); + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SIGNATURE: &'static str = "PAUSER_ROLE()"; + const SELECTOR: [u8; 4] = [230u8, 58u8, 177u8, 233u8]; + #[inline] + fn new<'a>( + tuple: as alloy_sol_types::SolType>::RustType, + ) -> Self { + tuple.into() + } + #[inline] + fn tokenize(&self) -> Self::Token<'_> { + () + } + #[inline] + fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { + ( + as alloy_sol_types::SolType>::tokenize(ret), + ) + } + #[inline] + fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence(data) + .map(|r| { + let r: PAUSER_ROLEReturn = r.into(); + r._0 + }) + } + #[inline] + fn abi_decode_returns_validate( + data: &[u8], + ) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence_validate(data) + .map(|r| { + let r: PAUSER_ROLEReturn = r.into(); + r._0 + }) + } + } + }; + #[derive(serde::Serialize, serde::Deserialize)] + #[derive(Default, Debug, PartialEq, Eq, Hash)] + /**Function with signature `allowance(address,address)` and selector `0xdd62ed3e`. +```solidity +function allowance(address owner, address spender) external view returns (uint256); +```*/ + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] + #[derive(Clone)] + pub struct allowanceCall { + #[allow(missing_docs)] + pub owner: alloy::sol_types::private::Address, + #[allow(missing_docs)] + pub spender: alloy::sol_types::private::Address, + } + #[derive(serde::Serialize, serde::Deserialize)] + #[derive(Default, Debug, PartialEq, Eq, Hash)] + ///Container type for the return parameters of the [`allowance(address,address)`](allowanceCall) function. + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] + #[derive(Clone)] + pub struct allowanceReturn { + #[allow(missing_docs)] + pub _0: alloy::sol_types::private::primitives::aliases::U256, + } + #[allow( + non_camel_case_types, + non_snake_case, + clippy::pub_underscore_fields, + clippy::style + )] + const _: () = { + use alloy::sol_types as alloy_sol_types; + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = ( + alloy::sol_types::sol_data::Address, + alloy::sol_types::sol_data::Address, + ); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = ( + alloy::sol_types::private::Address, + alloy::sol_types::private::Address, + ); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: allowanceCall) -> Self { + (value.owner, value.spender) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for allowanceCall { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { + owner: tuple.0, + spender: tuple.1, + } + } + } + } + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Uint<256>,); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = ( + alloy::sol_types::private::primitives::aliases::U256, + ); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: allowanceReturn) -> Self { + (value._0,) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for allowanceReturn { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { _0: tuple.0 } + } + } + } + #[automatically_derived] + impl alloy_sol_types::SolCall for allowanceCall { + type Parameters<'a> = ( + alloy::sol_types::sol_data::Address, + alloy::sol_types::sol_data::Address, + ); + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Return = alloy::sol_types::private::primitives::aliases::U256; + type ReturnTuple<'a> = (alloy::sol_types::sol_data::Uint<256>,); + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SIGNATURE: &'static str = "allowance(address,address)"; + const SELECTOR: [u8; 4] = [221u8, 98u8, 237u8, 62u8]; + #[inline] + fn new<'a>( + tuple: as alloy_sol_types::SolType>::RustType, + ) -> Self { + tuple.into() + } + #[inline] + fn tokenize(&self) -> Self::Token<'_> { + ( + ::tokenize( + &self.owner, + ), + ::tokenize( + &self.spender, + ), + ) + } + #[inline] + fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { + ( + as alloy_sol_types::SolType>::tokenize(ret), + ) + } + #[inline] + fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence(data) + .map(|r| { + let r: allowanceReturn = r.into(); + r._0 + }) + } + #[inline] + fn abi_decode_returns_validate( + data: &[u8], + ) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence_validate(data) + .map(|r| { + let r: allowanceReturn = r.into(); + r._0 + }) + } + } + }; + #[derive(serde::Serialize, serde::Deserialize)] + #[derive(Default, Debug, PartialEq, Eq, Hash)] + /**Function with signature `approve(address,uint256)` and selector `0x095ea7b3`. +```solidity +function approve(address spender, uint256 value) external returns (bool); +```*/ + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] + #[derive(Clone)] + pub struct approveCall { + #[allow(missing_docs)] + pub spender: alloy::sol_types::private::Address, + #[allow(missing_docs)] + pub value: alloy::sol_types::private::primitives::aliases::U256, + } + #[derive(serde::Serialize, serde::Deserialize)] + #[derive(Default, Debug, PartialEq, Eq, Hash)] + ///Container type for the return parameters of the [`approve(address,uint256)`](approveCall) function. + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] + #[derive(Clone)] + pub struct approveReturn { + #[allow(missing_docs)] + pub _0: bool, + } + #[allow( + non_camel_case_types, + non_snake_case, + clippy::pub_underscore_fields, + clippy::style + )] + const _: () = { + use alloy::sol_types as alloy_sol_types; + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = ( + alloy::sol_types::sol_data::Address, + alloy::sol_types::sol_data::Uint<256>, + ); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = ( + alloy::sol_types::private::Address, + alloy::sol_types::private::primitives::aliases::U256, + ); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: approveCall) -> Self { + (value.spender, value.value) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for approveCall { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { + spender: tuple.0, + value: tuple.1, + } + } + } + } + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Bool,); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (bool,); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: approveReturn) -> Self { + (value._0,) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for approveReturn { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { _0: tuple.0 } + } + } + } + #[automatically_derived] + impl alloy_sol_types::SolCall for approveCall { + type Parameters<'a> = ( + alloy::sol_types::sol_data::Address, + alloy::sol_types::sol_data::Uint<256>, + ); + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Return = bool; + type ReturnTuple<'a> = (alloy::sol_types::sol_data::Bool,); + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SIGNATURE: &'static str = "approve(address,uint256)"; + const SELECTOR: [u8; 4] = [9u8, 94u8, 167u8, 179u8]; + #[inline] + fn new<'a>( + tuple: as alloy_sol_types::SolType>::RustType, + ) -> Self { + tuple.into() + } + #[inline] + fn tokenize(&self) -> Self::Token<'_> { + ( + ::tokenize( + &self.spender, + ), + as alloy_sol_types::SolType>::tokenize(&self.value), + ) + } + #[inline] + fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { + ( + ::tokenize( + ret, + ), + ) + } + #[inline] + fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence(data) + .map(|r| { + let r: approveReturn = r.into(); + r._0 + }) + } + #[inline] + fn abi_decode_returns_validate( + data: &[u8], + ) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence_validate(data) + .map(|r| { + let r: approveReturn = r.into(); + r._0 + }) + } + } + }; + #[derive(serde::Serialize, serde::Deserialize)] + #[derive(Default, Debug, PartialEq, Eq, Hash)] + /**Function with signature `balanceOf(address)` and selector `0x70a08231`. +```solidity +function balanceOf(address account) external view returns (uint256); +```*/ + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] + #[derive(Clone)] + pub struct balanceOfCall { + #[allow(missing_docs)] + pub account: alloy::sol_types::private::Address, + } + #[derive(serde::Serialize, serde::Deserialize)] + #[derive(Default, Debug, PartialEq, Eq, Hash)] + ///Container type for the return parameters of the [`balanceOf(address)`](balanceOfCall) function. + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] + #[derive(Clone)] + pub struct balanceOfReturn { + #[allow(missing_docs)] + pub _0: alloy::sol_types::private::primitives::aliases::U256, + } + #[allow( + non_camel_case_types, + non_snake_case, + clippy::pub_underscore_fields, + clippy::style + )] + const _: () = { + use alloy::sol_types as alloy_sol_types; + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Address,); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (alloy::sol_types::private::Address,); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: balanceOfCall) -> Self { + (value.account,) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for balanceOfCall { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { account: tuple.0 } + } + } + } + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Uint<256>,); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = ( + alloy::sol_types::private::primitives::aliases::U256, + ); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: balanceOfReturn) -> Self { + (value._0,) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for balanceOfReturn { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { _0: tuple.0 } + } + } + } + #[automatically_derived] + impl alloy_sol_types::SolCall for balanceOfCall { + type Parameters<'a> = (alloy::sol_types::sol_data::Address,); + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Return = alloy::sol_types::private::primitives::aliases::U256; + type ReturnTuple<'a> = (alloy::sol_types::sol_data::Uint<256>,); + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SIGNATURE: &'static str = "balanceOf(address)"; + const SELECTOR: [u8; 4] = [112u8, 160u8, 130u8, 49u8]; + #[inline] + fn new<'a>( + tuple: as alloy_sol_types::SolType>::RustType, + ) -> Self { + tuple.into() + } + #[inline] + fn tokenize(&self) -> Self::Token<'_> { + ( + ::tokenize( + &self.account, + ), + ) + } + #[inline] + fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { + ( + as alloy_sol_types::SolType>::tokenize(ret), + ) + } + #[inline] + fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence(data) + .map(|r| { + let r: balanceOfReturn = r.into(); + r._0 + }) + } + #[inline] + fn abi_decode_returns_validate( + data: &[u8], + ) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence_validate(data) + .map(|r| { + let r: balanceOfReturn = r.into(); + r._0 + }) + } + } + }; + #[derive(serde::Serialize, serde::Deserialize)] + #[derive(Default, Debug, PartialEq, Eq, Hash)] + /**Function with signature `burn(uint256)` and selector `0x42966c68`. +```solidity +function burn(uint256 value) external; +```*/ + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] + #[derive(Clone)] + pub struct burnCall { + #[allow(missing_docs)] + pub value: alloy::sol_types::private::primitives::aliases::U256, + } + ///Container type for the return parameters of the [`burn(uint256)`](burnCall) function. + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] + #[derive(Clone)] + pub struct burnReturn {} + #[allow( + non_camel_case_types, + non_snake_case, + clippy::pub_underscore_fields, + clippy::style + )] + const _: () = { + use alloy::sol_types as alloy_sol_types; + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Uint<256>,); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = ( + alloy::sol_types::private::primitives::aliases::U256, + ); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: burnCall) -> Self { + (value.value,) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for burnCall { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { value: tuple.0 } + } + } + } + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: burnReturn) -> Self { + () + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for burnReturn { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self {} + } + } + } + impl burnReturn { + fn _tokenize( + &self, + ) -> ::ReturnToken<'_> { + () + } + } + #[automatically_derived] + impl alloy_sol_types::SolCall for burnCall { + type Parameters<'a> = (alloy::sol_types::sol_data::Uint<256>,); + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Return = burnReturn; + type ReturnTuple<'a> = (); + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SIGNATURE: &'static str = "burn(uint256)"; + const SELECTOR: [u8; 4] = [66u8, 150u8, 108u8, 104u8]; + #[inline] + fn new<'a>( + tuple: as alloy_sol_types::SolType>::RustType, + ) -> Self { + tuple.into() + } + #[inline] + fn tokenize(&self) -> Self::Token<'_> { + ( + as alloy_sol_types::SolType>::tokenize(&self.value), + ) + } + #[inline] + fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { + burnReturn::_tokenize(ret) + } + #[inline] + fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence(data) + .map(Into::into) + } + #[inline] + fn abi_decode_returns_validate( + data: &[u8], + ) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence_validate(data) + .map(Into::into) + } + } + }; + #[derive(serde::Serialize, serde::Deserialize)] + #[derive(Default, Debug, PartialEq, Eq, Hash)] + /**Function with signature `burnFrom(address,uint256)` and selector `0x79cc6790`. +```solidity +function burnFrom(address account, uint256 value) external; +```*/ + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] + #[derive(Clone)] + pub struct burnFromCall { + #[allow(missing_docs)] + pub account: alloy::sol_types::private::Address, + #[allow(missing_docs)] + pub value: alloy::sol_types::private::primitives::aliases::U256, + } + ///Container type for the return parameters of the [`burnFrom(address,uint256)`](burnFromCall) function. + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] + #[derive(Clone)] + pub struct burnFromReturn {} + #[allow( + non_camel_case_types, + non_snake_case, + clippy::pub_underscore_fields, + clippy::style + )] + const _: () = { + use alloy::sol_types as alloy_sol_types; + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = ( + alloy::sol_types::sol_data::Address, + alloy::sol_types::sol_data::Uint<256>, + ); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = ( + alloy::sol_types::private::Address, + alloy::sol_types::private::primitives::aliases::U256, + ); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: burnFromCall) -> Self { + (value.account, value.value) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for burnFromCall { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { + account: tuple.0, + value: tuple.1, + } + } + } + } + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: burnFromReturn) -> Self { + () + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for burnFromReturn { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self {} + } + } + } + impl burnFromReturn { + fn _tokenize( + &self, + ) -> ::ReturnToken<'_> { + () + } + } + #[automatically_derived] + impl alloy_sol_types::SolCall for burnFromCall { + type Parameters<'a> = ( + alloy::sol_types::sol_data::Address, + alloy::sol_types::sol_data::Uint<256>, + ); + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Return = burnFromReturn; + type ReturnTuple<'a> = (); + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SIGNATURE: &'static str = "burnFrom(address,uint256)"; + const SELECTOR: [u8; 4] = [121u8, 204u8, 103u8, 144u8]; + #[inline] + fn new<'a>( + tuple: as alloy_sol_types::SolType>::RustType, + ) -> Self { + tuple.into() + } + #[inline] + fn tokenize(&self) -> Self::Token<'_> { + ( + ::tokenize( + &self.account, + ), + as alloy_sol_types::SolType>::tokenize(&self.value), + ) + } + #[inline] + fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { + burnFromReturn::_tokenize(ret) + } + #[inline] + fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence(data) + .map(Into::into) + } + #[inline] + fn abi_decode_returns_validate( + data: &[u8], + ) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence_validate(data) + .map(Into::into) + } + } + }; + #[derive(serde::Serialize, serde::Deserialize)] + #[derive(Default, Debug, PartialEq, Eq, Hash)] + /**Function with signature `decimals()` and selector `0x313ce567`. +```solidity +function decimals() external view returns (uint8); +```*/ + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] + #[derive(Clone)] + pub struct decimalsCall; + #[derive(serde::Serialize, serde::Deserialize)] + #[derive(Default, Debug, PartialEq, Eq, Hash)] + ///Container type for the return parameters of the [`decimals()`](decimalsCall) function. + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] + #[derive(Clone)] + pub struct decimalsReturn { + #[allow(missing_docs)] + pub _0: u8, + } + #[allow( + non_camel_case_types, + non_snake_case, + clippy::pub_underscore_fields, + clippy::style + )] + const _: () = { + use alloy::sol_types as alloy_sol_types; + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: decimalsCall) -> Self { + () + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for decimalsCall { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self + } + } + } + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Uint<8>,); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (u8,); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: decimalsReturn) -> Self { + (value._0,) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for decimalsReturn { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { _0: tuple.0 } + } + } + } + #[automatically_derived] + impl alloy_sol_types::SolCall for decimalsCall { + type Parameters<'a> = (); + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Return = u8; + type ReturnTuple<'a> = (alloy::sol_types::sol_data::Uint<8>,); + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SIGNATURE: &'static str = "decimals()"; + const SELECTOR: [u8; 4] = [49u8, 60u8, 229u8, 103u8]; + #[inline] + fn new<'a>( + tuple: as alloy_sol_types::SolType>::RustType, + ) -> Self { + tuple.into() + } + #[inline] + fn tokenize(&self) -> Self::Token<'_> { + () + } + #[inline] + fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { + ( + as alloy_sol_types::SolType>::tokenize(ret), + ) + } + #[inline] + fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence(data) + .map(|r| { + let r: decimalsReturn = r.into(); + r._0 + }) + } + #[inline] + fn abi_decode_returns_validate( + data: &[u8], + ) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence_validate(data) + .map(|r| { + let r: decimalsReturn = r.into(); + r._0 + }) + } + } + }; + #[derive(serde::Serialize, serde::Deserialize)] + #[derive(Default, Debug, PartialEq, Eq, Hash)] + /**Function with signature `getRoleAdmin(bytes32)` and selector `0x248a9ca3`. +```solidity +function getRoleAdmin(bytes32 role) external view returns (bytes32); +```*/ + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] + #[derive(Clone)] + pub struct getRoleAdminCall { + #[allow(missing_docs)] + pub role: alloy::sol_types::private::FixedBytes<32>, + } + #[derive(serde::Serialize, serde::Deserialize)] + #[derive(Default, Debug, PartialEq, Eq, Hash)] + ///Container type for the return parameters of the [`getRoleAdmin(bytes32)`](getRoleAdminCall) function. + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] + #[derive(Clone)] + pub struct getRoleAdminReturn { + #[allow(missing_docs)] + pub _0: alloy::sol_types::private::FixedBytes<32>, + } + #[allow( + non_camel_case_types, + non_snake_case, + clippy::pub_underscore_fields, + clippy::style + )] + const _: () = { + use alloy::sol_types as alloy_sol_types; + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::FixedBytes<32>,); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (alloy::sol_types::private::FixedBytes<32>,); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: getRoleAdminCall) -> Self { + (value.role,) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for getRoleAdminCall { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { role: tuple.0 } + } + } + } + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::FixedBytes<32>,); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (alloy::sol_types::private::FixedBytes<32>,); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: getRoleAdminReturn) -> Self { + (value._0,) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for getRoleAdminReturn { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { _0: tuple.0 } + } + } + } + #[automatically_derived] + impl alloy_sol_types::SolCall for getRoleAdminCall { + type Parameters<'a> = (alloy::sol_types::sol_data::FixedBytes<32>,); + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Return = alloy::sol_types::private::FixedBytes<32>; + type ReturnTuple<'a> = (alloy::sol_types::sol_data::FixedBytes<32>,); + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SIGNATURE: &'static str = "getRoleAdmin(bytes32)"; + const SELECTOR: [u8; 4] = [36u8, 138u8, 156u8, 163u8]; + #[inline] + fn new<'a>( + tuple: as alloy_sol_types::SolType>::RustType, + ) -> Self { + tuple.into() + } + #[inline] + fn tokenize(&self) -> Self::Token<'_> { + ( + as alloy_sol_types::SolType>::tokenize(&self.role), + ) + } + #[inline] + fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { + ( + as alloy_sol_types::SolType>::tokenize(ret), + ) + } + #[inline] + fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence(data) + .map(|r| { + let r: getRoleAdminReturn = r.into(); + r._0 + }) + } + #[inline] + fn abi_decode_returns_validate( + data: &[u8], + ) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence_validate(data) + .map(|r| { + let r: getRoleAdminReturn = r.into(); + r._0 + }) + } + } + }; + #[derive(serde::Serialize, serde::Deserialize)] + #[derive(Default, Debug, PartialEq, Eq, Hash)] + /**Function with signature `grantRole(bytes32,address)` and selector `0x2f2ff15d`. +```solidity +function grantRole(bytes32 role, address account) external; +```*/ + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] + #[derive(Clone)] + pub struct grantRoleCall { + #[allow(missing_docs)] + pub role: alloy::sol_types::private::FixedBytes<32>, + #[allow(missing_docs)] + pub account: alloy::sol_types::private::Address, + } + ///Container type for the return parameters of the [`grantRole(bytes32,address)`](grantRoleCall) function. + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] + #[derive(Clone)] + pub struct grantRoleReturn {} + #[allow( + non_camel_case_types, + non_snake_case, + clippy::pub_underscore_fields, + clippy::style + )] + const _: () = { + use alloy::sol_types as alloy_sol_types; + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = ( + alloy::sol_types::sol_data::FixedBytes<32>, + alloy::sol_types::sol_data::Address, + ); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = ( + alloy::sol_types::private::FixedBytes<32>, + alloy::sol_types::private::Address, + ); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: grantRoleCall) -> Self { + (value.role, value.account) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for grantRoleCall { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { + role: tuple.0, + account: tuple.1, + } + } + } + } + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: grantRoleReturn) -> Self { + () + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for grantRoleReturn { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self {} + } + } + } + impl grantRoleReturn { + fn _tokenize( + &self, + ) -> ::ReturnToken<'_> { + () + } + } + #[automatically_derived] + impl alloy_sol_types::SolCall for grantRoleCall { + type Parameters<'a> = ( + alloy::sol_types::sol_data::FixedBytes<32>, + alloy::sol_types::sol_data::Address, + ); + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Return = grantRoleReturn; + type ReturnTuple<'a> = (); + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SIGNATURE: &'static str = "grantRole(bytes32,address)"; + const SELECTOR: [u8; 4] = [47u8, 47u8, 241u8, 93u8]; + #[inline] + fn new<'a>( + tuple: as alloy_sol_types::SolType>::RustType, + ) -> Self { + tuple.into() + } + #[inline] + fn tokenize(&self) -> Self::Token<'_> { + ( + as alloy_sol_types::SolType>::tokenize(&self.role), + ::tokenize( + &self.account, + ), + ) + } + #[inline] + fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { + grantRoleReturn::_tokenize(ret) + } + #[inline] + fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence(data) + .map(Into::into) + } + #[inline] + fn abi_decode_returns_validate( + data: &[u8], + ) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence_validate(data) + .map(Into::into) + } + } + }; + #[derive(serde::Serialize, serde::Deserialize)] + #[derive(Default, Debug, PartialEq, Eq, Hash)] + /**Function with signature `hasRole(bytes32,address)` and selector `0x91d14854`. +```solidity +function hasRole(bytes32 role, address account) external view returns (bool); +```*/ + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] + #[derive(Clone)] + pub struct hasRoleCall { + #[allow(missing_docs)] + pub role: alloy::sol_types::private::FixedBytes<32>, + #[allow(missing_docs)] + pub account: alloy::sol_types::private::Address, + } + #[derive(serde::Serialize, serde::Deserialize)] + #[derive(Default, Debug, PartialEq, Eq, Hash)] + ///Container type for the return parameters of the [`hasRole(bytes32,address)`](hasRoleCall) function. + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] + #[derive(Clone)] + pub struct hasRoleReturn { + #[allow(missing_docs)] + pub _0: bool, + } + #[allow( + non_camel_case_types, + non_snake_case, + clippy::pub_underscore_fields, + clippy::style + )] + const _: () = { + use alloy::sol_types as alloy_sol_types; + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = ( + alloy::sol_types::sol_data::FixedBytes<32>, + alloy::sol_types::sol_data::Address, + ); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = ( + alloy::sol_types::private::FixedBytes<32>, + alloy::sol_types::private::Address, + ); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: hasRoleCall) -> Self { + (value.role, value.account) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for hasRoleCall { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { + role: tuple.0, + account: tuple.1, + } + } + } + } + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Bool,); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (bool,); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: hasRoleReturn) -> Self { + (value._0,) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for hasRoleReturn { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { _0: tuple.0 } + } + } + } + #[automatically_derived] + impl alloy_sol_types::SolCall for hasRoleCall { + type Parameters<'a> = ( + alloy::sol_types::sol_data::FixedBytes<32>, + alloy::sol_types::sol_data::Address, + ); + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Return = bool; + type ReturnTuple<'a> = (alloy::sol_types::sol_data::Bool,); + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SIGNATURE: &'static str = "hasRole(bytes32,address)"; + const SELECTOR: [u8; 4] = [145u8, 209u8, 72u8, 84u8]; + #[inline] + fn new<'a>( + tuple: as alloy_sol_types::SolType>::RustType, + ) -> Self { + tuple.into() + } + #[inline] + fn tokenize(&self) -> Self::Token<'_> { + ( + as alloy_sol_types::SolType>::tokenize(&self.role), + ::tokenize( + &self.account, + ), + ) + } + #[inline] + fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { + ( + ::tokenize( + ret, + ), + ) + } + #[inline] + fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence(data) + .map(|r| { + let r: hasRoleReturn = r.into(); + r._0 + }) + } + #[inline] + fn abi_decode_returns_validate( + data: &[u8], + ) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence_validate(data) + .map(|r| { + let r: hasRoleReturn = r.into(); + r._0 + }) + } + } + }; + #[derive(serde::Serialize, serde::Deserialize)] + #[derive(Default, Debug, PartialEq, Eq, Hash)] + /**Function with signature `mint(address,uint256)` and selector `0x40c10f19`. +```solidity +function mint(address to, uint256 amount) external; +```*/ + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] + #[derive(Clone)] + pub struct mintCall { + #[allow(missing_docs)] + pub to: alloy::sol_types::private::Address, + #[allow(missing_docs)] + pub amount: alloy::sol_types::private::primitives::aliases::U256, + } + ///Container type for the return parameters of the [`mint(address,uint256)`](mintCall) function. + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] + #[derive(Clone)] + pub struct mintReturn {} + #[allow( + non_camel_case_types, + non_snake_case, + clippy::pub_underscore_fields, + clippy::style + )] + const _: () = { + use alloy::sol_types as alloy_sol_types; + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = ( + alloy::sol_types::sol_data::Address, + alloy::sol_types::sol_data::Uint<256>, + ); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = ( + alloy::sol_types::private::Address, + alloy::sol_types::private::primitives::aliases::U256, + ); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: mintCall) -> Self { + (value.to, value.amount) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for mintCall { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { + to: tuple.0, + amount: tuple.1, + } + } + } + } + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: mintReturn) -> Self { + () + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for mintReturn { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self {} + } + } + } + impl mintReturn { + fn _tokenize( + &self, + ) -> ::ReturnToken<'_> { + () + } + } + #[automatically_derived] + impl alloy_sol_types::SolCall for mintCall { + type Parameters<'a> = ( + alloy::sol_types::sol_data::Address, + alloy::sol_types::sol_data::Uint<256>, + ); + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Return = mintReturn; + type ReturnTuple<'a> = (); + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SIGNATURE: &'static str = "mint(address,uint256)"; + const SELECTOR: [u8; 4] = [64u8, 193u8, 15u8, 25u8]; + #[inline] + fn new<'a>( + tuple: as alloy_sol_types::SolType>::RustType, + ) -> Self { + tuple.into() + } + #[inline] + fn tokenize(&self) -> Self::Token<'_> { + ( + ::tokenize( + &self.to, + ), + as alloy_sol_types::SolType>::tokenize(&self.amount), + ) + } + #[inline] + fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { + mintReturn::_tokenize(ret) + } + #[inline] + fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence(data) + .map(Into::into) + } + #[inline] + fn abi_decode_returns_validate( + data: &[u8], + ) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence_validate(data) + .map(Into::into) + } + } + }; + #[derive(serde::Serialize, serde::Deserialize)] + #[derive(Default, Debug, PartialEq, Eq, Hash)] + /**Function with signature `name()` and selector `0x06fdde03`. +```solidity +function name() external view returns (string memory); +```*/ + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] + #[derive(Clone)] + pub struct nameCall; + #[derive(serde::Serialize, serde::Deserialize)] + #[derive(Default, Debug, PartialEq, Eq, Hash)] + ///Container type for the return parameters of the [`name()`](nameCall) function. + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] + #[derive(Clone)] + pub struct nameReturn { + #[allow(missing_docs)] + pub _0: alloy::sol_types::private::String, + } + #[allow( + non_camel_case_types, + non_snake_case, + clippy::pub_underscore_fields, + clippy::style + )] + const _: () = { + use alloy::sol_types as alloy_sol_types; + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: nameCall) -> Self { + () + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for nameCall { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self + } + } + } + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::String,); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (alloy::sol_types::private::String,); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: nameReturn) -> Self { + (value._0,) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for nameReturn { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { _0: tuple.0 } + } + } + } + #[automatically_derived] + impl alloy_sol_types::SolCall for nameCall { + type Parameters<'a> = (); + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Return = alloy::sol_types::private::String; + type ReturnTuple<'a> = (alloy::sol_types::sol_data::String,); + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SIGNATURE: &'static str = "name()"; + const SELECTOR: [u8; 4] = [6u8, 253u8, 222u8, 3u8]; + #[inline] + fn new<'a>( + tuple: as alloy_sol_types::SolType>::RustType, + ) -> Self { + tuple.into() + } + #[inline] + fn tokenize(&self) -> Self::Token<'_> { + () + } + #[inline] + fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { + ( + ::tokenize( + ret, + ), + ) + } + #[inline] + fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence(data) + .map(|r| { + let r: nameReturn = r.into(); + r._0 + }) + } + #[inline] + fn abi_decode_returns_validate( + data: &[u8], + ) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence_validate(data) + .map(|r| { + let r: nameReturn = r.into(); + r._0 + }) + } + } + }; + #[derive(serde::Serialize, serde::Deserialize)] + #[derive(Default, Debug, PartialEq, Eq, Hash)] + /**Function with signature `pause()` and selector `0x8456cb59`. +```solidity +function pause() external; +```*/ + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] + #[derive(Clone)] + pub struct pauseCall; + ///Container type for the return parameters of the [`pause()`](pauseCall) function. + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] + #[derive(Clone)] + pub struct pauseReturn {} + #[allow( + non_camel_case_types, + non_snake_case, + clippy::pub_underscore_fields, + clippy::style + )] + const _: () = { + use alloy::sol_types as alloy_sol_types; + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: pauseCall) -> Self { + () + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for pauseCall { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self + } + } + } + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: pauseReturn) -> Self { + () + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for pauseReturn { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self {} + } + } + } + impl pauseReturn { + fn _tokenize( + &self, + ) -> ::ReturnToken<'_> { + () + } + } + #[automatically_derived] + impl alloy_sol_types::SolCall for pauseCall { + type Parameters<'a> = (); + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Return = pauseReturn; + type ReturnTuple<'a> = (); + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SIGNATURE: &'static str = "pause()"; + const SELECTOR: [u8; 4] = [132u8, 86u8, 203u8, 89u8]; + #[inline] + fn new<'a>( + tuple: as alloy_sol_types::SolType>::RustType, + ) -> Self { + tuple.into() + } + #[inline] + fn tokenize(&self) -> Self::Token<'_> { + () + } + #[inline] + fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { + pauseReturn::_tokenize(ret) + } + #[inline] + fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence(data) + .map(Into::into) + } + #[inline] + fn abi_decode_returns_validate( + data: &[u8], + ) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence_validate(data) + .map(Into::into) + } + } + }; + #[derive(serde::Serialize, serde::Deserialize)] + #[derive(Default, Debug, PartialEq, Eq, Hash)] + /**Function with signature `paused()` and selector `0x5c975abb`. +```solidity +function paused() external view returns (bool); +```*/ + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] + #[derive(Clone)] + pub struct pausedCall; + #[derive(serde::Serialize, serde::Deserialize)] + #[derive(Default, Debug, PartialEq, Eq, Hash)] + ///Container type for the return parameters of the [`paused()`](pausedCall) function. + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] + #[derive(Clone)] + pub struct pausedReturn { + #[allow(missing_docs)] + pub _0: bool, + } + #[allow( + non_camel_case_types, + non_snake_case, + clippy::pub_underscore_fields, + clippy::style + )] + const _: () = { + use alloy::sol_types as alloy_sol_types; + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: pausedCall) -> Self { + () + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for pausedCall { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self + } + } + } + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Bool,); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (bool,); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: pausedReturn) -> Self { + (value._0,) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for pausedReturn { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { _0: tuple.0 } + } + } + } + #[automatically_derived] + impl alloy_sol_types::SolCall for pausedCall { + type Parameters<'a> = (); + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Return = bool; + type ReturnTuple<'a> = (alloy::sol_types::sol_data::Bool,); + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SIGNATURE: &'static str = "paused()"; + const SELECTOR: [u8; 4] = [92u8, 151u8, 90u8, 187u8]; + #[inline] + fn new<'a>( + tuple: as alloy_sol_types::SolType>::RustType, + ) -> Self { + tuple.into() + } + #[inline] + fn tokenize(&self) -> Self::Token<'_> { + () + } + #[inline] + fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { + ( + ::tokenize( + ret, + ), + ) + } + #[inline] + fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence(data) + .map(|r| { + let r: pausedReturn = r.into(); + r._0 + }) + } + #[inline] + fn abi_decode_returns_validate( + data: &[u8], + ) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence_validate(data) + .map(|r| { + let r: pausedReturn = r.into(); + r._0 + }) + } + } + }; + #[derive(serde::Serialize, serde::Deserialize)] + #[derive(Default, Debug, PartialEq, Eq, Hash)] + /**Function with signature `renounceRole(bytes32,address)` and selector `0x36568abe`. +```solidity +function renounceRole(bytes32 role, address callerConfirmation) external; +```*/ + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] + #[derive(Clone)] + pub struct renounceRoleCall { + #[allow(missing_docs)] + pub role: alloy::sol_types::private::FixedBytes<32>, + #[allow(missing_docs)] + pub callerConfirmation: alloy::sol_types::private::Address, + } + ///Container type for the return parameters of the [`renounceRole(bytes32,address)`](renounceRoleCall) function. + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] + #[derive(Clone)] + pub struct renounceRoleReturn {} + #[allow( + non_camel_case_types, + non_snake_case, + clippy::pub_underscore_fields, + clippy::style + )] + const _: () = { + use alloy::sol_types as alloy_sol_types; + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = ( + alloy::sol_types::sol_data::FixedBytes<32>, + alloy::sol_types::sol_data::Address, + ); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = ( + alloy::sol_types::private::FixedBytes<32>, + alloy::sol_types::private::Address, + ); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: renounceRoleCall) -> Self { + (value.role, value.callerConfirmation) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for renounceRoleCall { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { + role: tuple.0, + callerConfirmation: tuple.1, + } + } + } + } + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: renounceRoleReturn) -> Self { + () + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for renounceRoleReturn { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self {} + } + } + } + impl renounceRoleReturn { + fn _tokenize( + &self, + ) -> ::ReturnToken<'_> { + () + } + } + #[automatically_derived] + impl alloy_sol_types::SolCall for renounceRoleCall { + type Parameters<'a> = ( + alloy::sol_types::sol_data::FixedBytes<32>, + alloy::sol_types::sol_data::Address, + ); + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Return = renounceRoleReturn; + type ReturnTuple<'a> = (); + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SIGNATURE: &'static str = "renounceRole(bytes32,address)"; + const SELECTOR: [u8; 4] = [54u8, 86u8, 138u8, 190u8]; + #[inline] + fn new<'a>( + tuple: as alloy_sol_types::SolType>::RustType, + ) -> Self { + tuple.into() + } + #[inline] + fn tokenize(&self) -> Self::Token<'_> { + ( + as alloy_sol_types::SolType>::tokenize(&self.role), + ::tokenize( + &self.callerConfirmation, + ), + ) + } + #[inline] + fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { + renounceRoleReturn::_tokenize(ret) + } + #[inline] + fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence(data) + .map(Into::into) + } + #[inline] + fn abi_decode_returns_validate( + data: &[u8], + ) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence_validate(data) + .map(Into::into) + } + } + }; + #[derive(serde::Serialize, serde::Deserialize)] + #[derive(Default, Debug, PartialEq, Eq, Hash)] + /**Function with signature `revokeRole(bytes32,address)` and selector `0xd547741f`. +```solidity +function revokeRole(bytes32 role, address account) external; +```*/ + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] + #[derive(Clone)] + pub struct revokeRoleCall { + #[allow(missing_docs)] + pub role: alloy::sol_types::private::FixedBytes<32>, + #[allow(missing_docs)] + pub account: alloy::sol_types::private::Address, + } + ///Container type for the return parameters of the [`revokeRole(bytes32,address)`](revokeRoleCall) function. + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] + #[derive(Clone)] + pub struct revokeRoleReturn {} + #[allow( + non_camel_case_types, + non_snake_case, + clippy::pub_underscore_fields, + clippy::style + )] + const _: () = { + use alloy::sol_types as alloy_sol_types; + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = ( + alloy::sol_types::sol_data::FixedBytes<32>, + alloy::sol_types::sol_data::Address, + ); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = ( + alloy::sol_types::private::FixedBytes<32>, + alloy::sol_types::private::Address, + ); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: revokeRoleCall) -> Self { + (value.role, value.account) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for revokeRoleCall { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { + role: tuple.0, + account: tuple.1, + } + } + } + } + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: revokeRoleReturn) -> Self { + () + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for revokeRoleReturn { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self {} + } + } + } + impl revokeRoleReturn { + fn _tokenize( + &self, + ) -> ::ReturnToken<'_> { + () + } + } + #[automatically_derived] + impl alloy_sol_types::SolCall for revokeRoleCall { + type Parameters<'a> = ( + alloy::sol_types::sol_data::FixedBytes<32>, + alloy::sol_types::sol_data::Address, + ); + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Return = revokeRoleReturn; + type ReturnTuple<'a> = (); + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SIGNATURE: &'static str = "revokeRole(bytes32,address)"; + const SELECTOR: [u8; 4] = [213u8, 71u8, 116u8, 31u8]; + #[inline] + fn new<'a>( + tuple: as alloy_sol_types::SolType>::RustType, + ) -> Self { + tuple.into() + } + #[inline] + fn tokenize(&self) -> Self::Token<'_> { + ( + as alloy_sol_types::SolType>::tokenize(&self.role), + ::tokenize( + &self.account, + ), + ) + } + #[inline] + fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { + revokeRoleReturn::_tokenize(ret) + } + #[inline] + fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence(data) + .map(Into::into) + } + #[inline] + fn abi_decode_returns_validate( + data: &[u8], + ) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence_validate(data) + .map(Into::into) + } + } + }; + #[derive(serde::Serialize, serde::Deserialize)] + #[derive(Default, Debug, PartialEq, Eq, Hash)] + /**Function with signature `supportsInterface(bytes4)` and selector `0x01ffc9a7`. +```solidity +function supportsInterface(bytes4 interfaceId) external view returns (bool); +```*/ + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] + #[derive(Clone)] + pub struct supportsInterfaceCall { + #[allow(missing_docs)] + pub interfaceId: alloy::sol_types::private::FixedBytes<4>, + } + #[derive(serde::Serialize, serde::Deserialize)] + #[derive(Default, Debug, PartialEq, Eq, Hash)] + ///Container type for the return parameters of the [`supportsInterface(bytes4)`](supportsInterfaceCall) function. + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] + #[derive(Clone)] + pub struct supportsInterfaceReturn { + #[allow(missing_docs)] + pub _0: bool, + } + #[allow( + non_camel_case_types, + non_snake_case, + clippy::pub_underscore_fields, + clippy::style + )] + const _: () = { + use alloy::sol_types as alloy_sol_types; + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::FixedBytes<4>,); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (alloy::sol_types::private::FixedBytes<4>,); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From + for UnderlyingRustTuple<'_> { + fn from(value: supportsInterfaceCall) -> Self { + (value.interfaceId,) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> + for supportsInterfaceCall { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { interfaceId: tuple.0 } + } + } + } + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Bool,); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (bool,); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From + for UnderlyingRustTuple<'_> { + fn from(value: supportsInterfaceReturn) -> Self { + (value._0,) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> + for supportsInterfaceReturn { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { _0: tuple.0 } + } + } + } + #[automatically_derived] + impl alloy_sol_types::SolCall for supportsInterfaceCall { + type Parameters<'a> = (alloy::sol_types::sol_data::FixedBytes<4>,); + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Return = bool; + type ReturnTuple<'a> = (alloy::sol_types::sol_data::Bool,); + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SIGNATURE: &'static str = "supportsInterface(bytes4)"; + const SELECTOR: [u8; 4] = [1u8, 255u8, 201u8, 167u8]; + #[inline] + fn new<'a>( + tuple: as alloy_sol_types::SolType>::RustType, + ) -> Self { + tuple.into() + } + #[inline] + fn tokenize(&self) -> Self::Token<'_> { + ( + as alloy_sol_types::SolType>::tokenize(&self.interfaceId), + ) + } + #[inline] + fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { + ( + ::tokenize( + ret, + ), + ) + } + #[inline] + fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence(data) + .map(|r| { + let r: supportsInterfaceReturn = r.into(); + r._0 + }) + } + #[inline] + fn abi_decode_returns_validate( + data: &[u8], + ) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence_validate(data) + .map(|r| { + let r: supportsInterfaceReturn = r.into(); + r._0 + }) + } + } + }; + #[derive(serde::Serialize, serde::Deserialize)] + #[derive(Default, Debug, PartialEq, Eq, Hash)] + /**Function with signature `symbol()` and selector `0x95d89b41`. +```solidity +function symbol() external view returns (string memory); +```*/ + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] + #[derive(Clone)] + pub struct symbolCall; + #[derive(serde::Serialize, serde::Deserialize)] + #[derive(Default, Debug, PartialEq, Eq, Hash)] + ///Container type for the return parameters of the [`symbol()`](symbolCall) function. + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] + #[derive(Clone)] + pub struct symbolReturn { + #[allow(missing_docs)] + pub _0: alloy::sol_types::private::String, + } + #[allow( + non_camel_case_types, + non_snake_case, + clippy::pub_underscore_fields, + clippy::style + )] + const _: () = { + use alloy::sol_types as alloy_sol_types; + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: symbolCall) -> Self { + () + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for symbolCall { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self + } + } + } + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::String,); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (alloy::sol_types::private::String,); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: symbolReturn) -> Self { + (value._0,) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for symbolReturn { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { _0: tuple.0 } + } + } + } + #[automatically_derived] + impl alloy_sol_types::SolCall for symbolCall { + type Parameters<'a> = (); + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Return = alloy::sol_types::private::String; + type ReturnTuple<'a> = (alloy::sol_types::sol_data::String,); + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SIGNATURE: &'static str = "symbol()"; + const SELECTOR: [u8; 4] = [149u8, 216u8, 155u8, 65u8]; + #[inline] + fn new<'a>( + tuple: as alloy_sol_types::SolType>::RustType, + ) -> Self { + tuple.into() + } + #[inline] + fn tokenize(&self) -> Self::Token<'_> { + () + } + #[inline] + fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { + ( + ::tokenize( + ret, + ), + ) + } + #[inline] + fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence(data) + .map(|r| { + let r: symbolReturn = r.into(); + r._0 + }) + } + #[inline] + fn abi_decode_returns_validate( + data: &[u8], + ) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence_validate(data) + .map(|r| { + let r: symbolReturn = r.into(); + r._0 + }) + } + } + }; + #[derive(serde::Serialize, serde::Deserialize)] + #[derive(Default, Debug, PartialEq, Eq, Hash)] + /**Function with signature `totalSupply()` and selector `0x18160ddd`. +```solidity +function totalSupply() external view returns (uint256); +```*/ + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] + #[derive(Clone)] + pub struct totalSupplyCall; + #[derive(serde::Serialize, serde::Deserialize)] + #[derive(Default, Debug, PartialEq, Eq, Hash)] + ///Container type for the return parameters of the [`totalSupply()`](totalSupplyCall) function. + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] + #[derive(Clone)] + pub struct totalSupplyReturn { + #[allow(missing_docs)] + pub _0: alloy::sol_types::private::primitives::aliases::U256, + } + #[allow( + non_camel_case_types, + non_snake_case, + clippy::pub_underscore_fields, + clippy::style + )] + const _: () = { + use alloy::sol_types as alloy_sol_types; + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: totalSupplyCall) -> Self { + () + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for totalSupplyCall { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self + } + } + } + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Uint<256>,); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = ( + alloy::sol_types::private::primitives::aliases::U256, + ); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: totalSupplyReturn) -> Self { + (value._0,) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for totalSupplyReturn { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { _0: tuple.0 } + } + } + } + #[automatically_derived] + impl alloy_sol_types::SolCall for totalSupplyCall { + type Parameters<'a> = (); + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Return = alloy::sol_types::private::primitives::aliases::U256; + type ReturnTuple<'a> = (alloy::sol_types::sol_data::Uint<256>,); + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SIGNATURE: &'static str = "totalSupply()"; + const SELECTOR: [u8; 4] = [24u8, 22u8, 13u8, 221u8]; + #[inline] + fn new<'a>( + tuple: as alloy_sol_types::SolType>::RustType, + ) -> Self { + tuple.into() + } + #[inline] + fn tokenize(&self) -> Self::Token<'_> { + () + } + #[inline] + fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { + ( + as alloy_sol_types::SolType>::tokenize(ret), + ) + } + #[inline] + fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence(data) + .map(|r| { + let r: totalSupplyReturn = r.into(); + r._0 + }) + } + #[inline] + fn abi_decode_returns_validate( + data: &[u8], + ) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence_validate(data) + .map(|r| { + let r: totalSupplyReturn = r.into(); + r._0 + }) + } + } + }; + #[derive(serde::Serialize, serde::Deserialize)] + #[derive(Default, Debug, PartialEq, Eq, Hash)] + /**Function with signature `transfer(address,uint256)` and selector `0xa9059cbb`. +```solidity +function transfer(address to, uint256 value) external returns (bool); +```*/ + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] + #[derive(Clone)] + pub struct transferCall { + #[allow(missing_docs)] + pub to: alloy::sol_types::private::Address, + #[allow(missing_docs)] + pub value: alloy::sol_types::private::primitives::aliases::U256, + } + #[derive(serde::Serialize, serde::Deserialize)] + #[derive(Default, Debug, PartialEq, Eq, Hash)] + ///Container type for the return parameters of the [`transfer(address,uint256)`](transferCall) function. + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] + #[derive(Clone)] + pub struct transferReturn { + #[allow(missing_docs)] + pub _0: bool, + } + #[allow( + non_camel_case_types, + non_snake_case, + clippy::pub_underscore_fields, + clippy::style + )] + const _: () = { + use alloy::sol_types as alloy_sol_types; + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = ( + alloy::sol_types::sol_data::Address, + alloy::sol_types::sol_data::Uint<256>, + ); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = ( + alloy::sol_types::private::Address, + alloy::sol_types::private::primitives::aliases::U256, + ); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: transferCall) -> Self { + (value.to, value.value) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for transferCall { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { + to: tuple.0, + value: tuple.1, + } + } + } + } + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Bool,); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (bool,); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: transferReturn) -> Self { + (value._0,) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for transferReturn { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { _0: tuple.0 } + } + } + } + #[automatically_derived] + impl alloy_sol_types::SolCall for transferCall { + type Parameters<'a> = ( + alloy::sol_types::sol_data::Address, + alloy::sol_types::sol_data::Uint<256>, + ); + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Return = bool; + type ReturnTuple<'a> = (alloy::sol_types::sol_data::Bool,); + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SIGNATURE: &'static str = "transfer(address,uint256)"; + const SELECTOR: [u8; 4] = [169u8, 5u8, 156u8, 187u8]; + #[inline] + fn new<'a>( + tuple: as alloy_sol_types::SolType>::RustType, + ) -> Self { + tuple.into() + } + #[inline] + fn tokenize(&self) -> Self::Token<'_> { + ( + ::tokenize( + &self.to, + ), + as alloy_sol_types::SolType>::tokenize(&self.value), + ) + } + #[inline] + fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { + ( + ::tokenize( + ret, + ), + ) + } + #[inline] + fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence(data) + .map(|r| { + let r: transferReturn = r.into(); + r._0 + }) + } + #[inline] + fn abi_decode_returns_validate( + data: &[u8], + ) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence_validate(data) + .map(|r| { + let r: transferReturn = r.into(); + r._0 + }) + } + } + }; + #[derive(serde::Serialize, serde::Deserialize)] + #[derive(Default, Debug, PartialEq, Eq, Hash)] + /**Function with signature `transferFrom(address,address,uint256)` and selector `0x23b872dd`. +```solidity +function transferFrom(address from, address to, uint256 value) external returns (bool); +```*/ + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] + #[derive(Clone)] + pub struct transferFromCall { + #[allow(missing_docs)] + pub from: alloy::sol_types::private::Address, + #[allow(missing_docs)] + pub to: alloy::sol_types::private::Address, + #[allow(missing_docs)] + pub value: alloy::sol_types::private::primitives::aliases::U256, + } + #[derive(serde::Serialize, serde::Deserialize)] + #[derive(Default, Debug, PartialEq, Eq, Hash)] + ///Container type for the return parameters of the [`transferFrom(address,address,uint256)`](transferFromCall) function. + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] + #[derive(Clone)] + pub struct transferFromReturn { + #[allow(missing_docs)] + pub _0: bool, + } + #[allow( + non_camel_case_types, + non_snake_case, + clippy::pub_underscore_fields, + clippy::style + )] + const _: () = { + use alloy::sol_types as alloy_sol_types; + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = ( + alloy::sol_types::sol_data::Address, + alloy::sol_types::sol_data::Address, + alloy::sol_types::sol_data::Uint<256>, + ); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = ( + alloy::sol_types::private::Address, + alloy::sol_types::private::Address, + alloy::sol_types::private::primitives::aliases::U256, + ); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: transferFromCall) -> Self { + (value.from, value.to, value.value) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for transferFromCall { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { + from: tuple.0, + to: tuple.1, + value: tuple.2, + } + } + } + } + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (alloy::sol_types::sol_data::Bool,); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (bool,); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: transferFromReturn) -> Self { + (value._0,) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for transferFromReturn { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { _0: tuple.0 } + } + } + } + #[automatically_derived] + impl alloy_sol_types::SolCall for transferFromCall { + type Parameters<'a> = ( + alloy::sol_types::sol_data::Address, + alloy::sol_types::sol_data::Address, + alloy::sol_types::sol_data::Uint<256>, + ); + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Return = bool; + type ReturnTuple<'a> = (alloy::sol_types::sol_data::Bool,); + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SIGNATURE: &'static str = "transferFrom(address,address,uint256)"; + const SELECTOR: [u8; 4] = [35u8, 184u8, 114u8, 221u8]; + #[inline] + fn new<'a>( + tuple: as alloy_sol_types::SolType>::RustType, + ) -> Self { + tuple.into() + } + #[inline] + fn tokenize(&self) -> Self::Token<'_> { + ( + ::tokenize( + &self.from, + ), + ::tokenize( + &self.to, + ), + as alloy_sol_types::SolType>::tokenize(&self.value), + ) + } + #[inline] + fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { + ( + ::tokenize( + ret, + ), + ) + } + #[inline] + fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence(data) + .map(|r| { + let r: transferFromReturn = r.into(); + r._0 + }) + } + #[inline] + fn abi_decode_returns_validate( + data: &[u8], + ) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence_validate(data) + .map(|r| { + let r: transferFromReturn = r.into(); + r._0 + }) + } + } + }; + #[derive(serde::Serialize, serde::Deserialize)] + #[derive(Default, Debug, PartialEq, Eq, Hash)] + /**Function with signature `unpause()` and selector `0x3f4ba83a`. +```solidity +function unpause() external; +```*/ + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] + #[derive(Clone)] + pub struct unpauseCall; + ///Container type for the return parameters of the [`unpause()`](unpauseCall) function. + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] + #[derive(Clone)] + pub struct unpauseReturn {} + #[allow( + non_camel_case_types, + non_snake_case, + clippy::pub_underscore_fields, + clippy::style + )] + const _: () = { + use alloy::sol_types as alloy_sol_types; + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: unpauseCall) -> Self { + () + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for unpauseCall { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self + } + } + } + { + #[doc(hidden)] + type UnderlyingSolTuple<'a> = (); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (); + #[cfg(test)] + #[allow(dead_code, unreachable_patterns)] + fn _type_assertion( + _t: alloy_sol_types::private::AssertTypeEq, + ) { + match _t { + alloy_sol_types::private::AssertTypeEq::< + ::RustType, + >(_) => {} + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From for UnderlyingRustTuple<'_> { + fn from(value: unpauseReturn) -> Self { + () + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for unpauseReturn { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self {} + } + } + } + impl unpauseReturn { + fn _tokenize( + &self, + ) -> ::ReturnToken<'_> { + () + } + } + #[automatically_derived] + impl alloy_sol_types::SolCall for unpauseCall { + type Parameters<'a> = (); + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Return = unpauseReturn; + type ReturnTuple<'a> = (); + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SIGNATURE: &'static str = "unpause()"; + const SELECTOR: [u8; 4] = [63u8, 75u8, 168u8, 58u8]; + #[inline] + fn new<'a>( + tuple: as alloy_sol_types::SolType>::RustType, + ) -> Self { + tuple.into() + } + #[inline] + fn tokenize(&self) -> Self::Token<'_> { + () + } + #[inline] + fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { + unpauseReturn::_tokenize(ret) + } + #[inline] + fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence(data) + .map(Into::into) + } + #[inline] + fn abi_decode_returns_validate( + data: &[u8], + ) -> alloy_sol_types::Result { + as alloy_sol_types::SolType>::abi_decode_sequence_validate(data) + .map(Into::into) + } + } + }; + ///Container for all the [`WrappedToken`](self) function calls. + #[derive(serde::Serialize, serde::Deserialize)] + #[derive()] + pub enum WrappedTokenCalls { + #[allow(missing_docs)] + DEFAULT_ADMIN_ROLE(DEFAULT_ADMIN_ROLECall), + #[allow(missing_docs)] + MINTER_ROLE(MINTER_ROLECall), + #[allow(missing_docs)] + PAUSER_ROLE(PAUSER_ROLECall), + #[allow(missing_docs)] + allowance(allowanceCall), + #[allow(missing_docs)] + approve(approveCall), + #[allow(missing_docs)] + balanceOf(balanceOfCall), + #[allow(missing_docs)] + burn(burnCall), + #[allow(missing_docs)] + burnFrom(burnFromCall), + #[allow(missing_docs)] + decimals(decimalsCall), + #[allow(missing_docs)] + getRoleAdmin(getRoleAdminCall), + #[allow(missing_docs)] + grantRole(grantRoleCall), + #[allow(missing_docs)] + hasRole(hasRoleCall), + #[allow(missing_docs)] + mint(mintCall), + #[allow(missing_docs)] + name(nameCall), + #[allow(missing_docs)] + pause(pauseCall), + #[allow(missing_docs)] + paused(pausedCall), + #[allow(missing_docs)] + renounceRole(renounceRoleCall), + #[allow(missing_docs)] + revokeRole(revokeRoleCall), + #[allow(missing_docs)] + supportsInterface(supportsInterfaceCall), + #[allow(missing_docs)] + symbol(symbolCall), + #[allow(missing_docs)] + totalSupply(totalSupplyCall), + #[allow(missing_docs)] + transfer(transferCall), + #[allow(missing_docs)] + transferFrom(transferFromCall), + #[allow(missing_docs)] + unpause(unpauseCall), + } + #[automatically_derived] + impl WrappedTokenCalls { + /// All the selectors of this enum. + /// + /// Note that the selectors might not be in the same order as the variants. + /// No guarantees are made about the order of the selectors. + /// + /// Prefer using `SolInterface` methods instead. + pub const SELECTORS: &'static [[u8; 4usize]] = &[ + [1u8, 255u8, 201u8, 167u8], + [6u8, 253u8, 222u8, 3u8], + [9u8, 94u8, 167u8, 179u8], + [24u8, 22u8, 13u8, 221u8], + [35u8, 184u8, 114u8, 221u8], + [36u8, 138u8, 156u8, 163u8], + [47u8, 47u8, 241u8, 93u8], + [49u8, 60u8, 229u8, 103u8], + [54u8, 86u8, 138u8, 190u8], + [63u8, 75u8, 168u8, 58u8], + [64u8, 193u8, 15u8, 25u8], + [66u8, 150u8, 108u8, 104u8], + [92u8, 151u8, 90u8, 187u8], + [112u8, 160u8, 130u8, 49u8], + [121u8, 204u8, 103u8, 144u8], + [132u8, 86u8, 203u8, 89u8], + [145u8, 209u8, 72u8, 84u8], + [149u8, 216u8, 155u8, 65u8], + [162u8, 23u8, 253u8, 223u8], + [169u8, 5u8, 156u8, 187u8], + [213u8, 57u8, 19u8, 147u8], + [213u8, 71u8, 116u8, 31u8], + [221u8, 98u8, 237u8, 62u8], + [230u8, 58u8, 177u8, 233u8], + ]; + } + #[automatically_derived] + impl alloy_sol_types::SolInterface for WrappedTokenCalls { + const NAME: &'static str = "WrappedTokenCalls"; + const MIN_DATA_LENGTH: usize = 0usize; + const COUNT: usize = 24usize; + #[inline] + fn selector(&self) -> [u8; 4] { + match self { + Self::DEFAULT_ADMIN_ROLE(_) => { + ::SELECTOR + } + Self::MINTER_ROLE(_) => { + ::SELECTOR + } + Self::PAUSER_ROLE(_) => { + ::SELECTOR + } + Self::allowance(_) => { + ::SELECTOR + } + Self::approve(_) => ::SELECTOR, + Self::balanceOf(_) => { + ::SELECTOR + } + Self::burn(_) => ::SELECTOR, + Self::burnFrom(_) => ::SELECTOR, + Self::decimals(_) => ::SELECTOR, + Self::getRoleAdmin(_) => { + ::SELECTOR + } + Self::grantRole(_) => { + ::SELECTOR + } + Self::hasRole(_) => ::SELECTOR, + Self::mint(_) => ::SELECTOR, + Self::name(_) => ::SELECTOR, + Self::pause(_) => ::SELECTOR, + Self::paused(_) => ::SELECTOR, + Self::renounceRole(_) => { + ::SELECTOR + } + Self::revokeRole(_) => { + ::SELECTOR + } + Self::supportsInterface(_) => { + ::SELECTOR + } + Self::symbol(_) => ::SELECTOR, + Self::totalSupply(_) => { + ::SELECTOR + } + Self::transfer(_) => ::SELECTOR, + Self::transferFrom(_) => { + ::SELECTOR + } + Self::unpause(_) => ::SELECTOR, + } + } + #[inline] + fn selector_at(i: usize) -> ::core::option::Option<[u8; 4]> { + Self::SELECTORS.get(i).copied() + } + #[inline] + fn valid_selector(selector: [u8; 4]) -> bool { + Self::SELECTORS.binary_search(&selector).is_ok() + } + #[inline] + #[allow(non_snake_case)] + fn abi_decode_raw( + selector: [u8; 4], + data: &[u8], + ) -> alloy_sol_types::Result { + static DECODE_SHIMS: &[fn( + &[u8], + ) -> alloy_sol_types::Result] = &[ + { + fn supportsInterface( + data: &[u8], + ) -> alloy_sol_types::Result { + ::abi_decode_raw( + data, + ) + .map(WrappedTokenCalls::supportsInterface) + } + supportsInterface + }, + { + fn name(data: &[u8]) -> alloy_sol_types::Result { + ::abi_decode_raw(data) + .map(WrappedTokenCalls::name) + } + name + }, + { + fn approve( + data: &[u8], + ) -> alloy_sol_types::Result { + ::abi_decode_raw(data) + .map(WrappedTokenCalls::approve) + } + approve + }, + { + fn totalSupply( + data: &[u8], + ) -> alloy_sol_types::Result { + ::abi_decode_raw( + data, + ) + .map(WrappedTokenCalls::totalSupply) + } + totalSupply + }, + { + fn transferFrom( + data: &[u8], + ) -> alloy_sol_types::Result { + ::abi_decode_raw( + data, + ) + .map(WrappedTokenCalls::transferFrom) + } + transferFrom + }, + { + fn getRoleAdmin( + data: &[u8], + ) -> alloy_sol_types::Result { + ::abi_decode_raw( + data, + ) + .map(WrappedTokenCalls::getRoleAdmin) + } + getRoleAdmin + }, + { + fn grantRole( + data: &[u8], + ) -> alloy_sol_types::Result { + ::abi_decode_raw(data) + .map(WrappedTokenCalls::grantRole) + } + grantRole + }, + { + fn decimals( + data: &[u8], + ) -> alloy_sol_types::Result { + ::abi_decode_raw(data) + .map(WrappedTokenCalls::decimals) + } + decimals + }, + { + fn renounceRole( + data: &[u8], + ) -> alloy_sol_types::Result { + ::abi_decode_raw( + data, + ) + .map(WrappedTokenCalls::renounceRole) + } + renounceRole + }, + { + fn unpause( + data: &[u8], + ) -> alloy_sol_types::Result { + ::abi_decode_raw(data) + .map(WrappedTokenCalls::unpause) + } + unpause + }, + { + fn mint(data: &[u8]) -> alloy_sol_types::Result { + ::abi_decode_raw(data) + .map(WrappedTokenCalls::mint) + } + mint + }, + { + fn burn(data: &[u8]) -> alloy_sol_types::Result { + ::abi_decode_raw(data) + .map(WrappedTokenCalls::burn) + } + burn + }, + { + fn paused( + data: &[u8], + ) -> alloy_sol_types::Result { + ::abi_decode_raw(data) + .map(WrappedTokenCalls::paused) + } + paused + }, + { + fn balanceOf( + data: &[u8], + ) -> alloy_sol_types::Result { + ::abi_decode_raw(data) + .map(WrappedTokenCalls::balanceOf) + } + balanceOf + }, + { + fn burnFrom( + data: &[u8], + ) -> alloy_sol_types::Result { + ::abi_decode_raw(data) + .map(WrappedTokenCalls::burnFrom) + } + burnFrom + }, + { + fn pause(data: &[u8]) -> alloy_sol_types::Result { + ::abi_decode_raw(data) + .map(WrappedTokenCalls::pause) + } + pause + }, + { + fn hasRole( + data: &[u8], + ) -> alloy_sol_types::Result { + ::abi_decode_raw(data) + .map(WrappedTokenCalls::hasRole) + } + hasRole + }, + { + fn symbol( + data: &[u8], + ) -> alloy_sol_types::Result { + ::abi_decode_raw(data) + .map(WrappedTokenCalls::symbol) + } + symbol + }, + { + fn DEFAULT_ADMIN_ROLE( + data: &[u8], + ) -> alloy_sol_types::Result { + ::abi_decode_raw( + data, + ) + .map(WrappedTokenCalls::DEFAULT_ADMIN_ROLE) + } + DEFAULT_ADMIN_ROLE + }, + { + fn transfer( + data: &[u8], + ) -> alloy_sol_types::Result { + ::abi_decode_raw(data) + .map(WrappedTokenCalls::transfer) + } + transfer + }, + { + fn MINTER_ROLE( + data: &[u8], + ) -> alloy_sol_types::Result { + ::abi_decode_raw( + data, + ) + .map(WrappedTokenCalls::MINTER_ROLE) + } + MINTER_ROLE + }, + { + fn revokeRole( + data: &[u8], + ) -> alloy_sol_types::Result { + ::abi_decode_raw( + data, + ) + .map(WrappedTokenCalls::revokeRole) + } + revokeRole + }, + { + fn allowance( + data: &[u8], + ) -> alloy_sol_types::Result { + ::abi_decode_raw(data) + .map(WrappedTokenCalls::allowance) + } + allowance + }, + { + fn PAUSER_ROLE( + data: &[u8], + ) -> alloy_sol_types::Result { + ::abi_decode_raw( + data, + ) + .map(WrappedTokenCalls::PAUSER_ROLE) + } + PAUSER_ROLE + }, + ]; + let Ok(idx) = Self::SELECTORS.binary_search(&selector) else { + return Err( + alloy_sol_types::Error::unknown_selector( + ::NAME, + selector, + ), + ); + }; + DECODE_SHIMS[idx](data) + } + #[inline] + #[allow(non_snake_case)] + fn abi_decode_raw_validate( + selector: [u8; 4], + data: &[u8], + ) -> alloy_sol_types::Result { + static DECODE_VALIDATE_SHIMS: &[fn( + &[u8], + ) -> alloy_sol_types::Result] = &[ + { + fn supportsInterface( + data: &[u8], + ) -> alloy_sol_types::Result { + ::abi_decode_raw_validate( + data, + ) + .map(WrappedTokenCalls::supportsInterface) + } + supportsInterface + }, + { + fn name(data: &[u8]) -> alloy_sol_types::Result { + ::abi_decode_raw_validate( + data, + ) + .map(WrappedTokenCalls::name) + } + name + }, + { + fn approve( + data: &[u8], + ) -> alloy_sol_types::Result { + ::abi_decode_raw_validate( + data, + ) + .map(WrappedTokenCalls::approve) + } + approve + }, + { + fn totalSupply( + data: &[u8], + ) -> alloy_sol_types::Result { + ::abi_decode_raw_validate( + data, + ) + .map(WrappedTokenCalls::totalSupply) + } + totalSupply + }, + { + fn transferFrom( + data: &[u8], + ) -> alloy_sol_types::Result { + ::abi_decode_raw_validate( + data, + ) + .map(WrappedTokenCalls::transferFrom) + } + transferFrom + }, + { + fn getRoleAdmin( + data: &[u8], + ) -> alloy_sol_types::Result { + ::abi_decode_raw_validate( + data, + ) + .map(WrappedTokenCalls::getRoleAdmin) + } + getRoleAdmin + }, + { + fn grantRole( + data: &[u8], + ) -> alloy_sol_types::Result { + ::abi_decode_raw_validate( + data, + ) + .map(WrappedTokenCalls::grantRole) + } + grantRole + }, + { + fn decimals( + data: &[u8], + ) -> alloy_sol_types::Result { + ::abi_decode_raw_validate( + data, + ) + .map(WrappedTokenCalls::decimals) + } + decimals + }, + { + fn renounceRole( + data: &[u8], + ) -> alloy_sol_types::Result { + ::abi_decode_raw_validate( + data, + ) + .map(WrappedTokenCalls::renounceRole) + } + renounceRole + }, + { + fn unpause( + data: &[u8], + ) -> alloy_sol_types::Result { + ::abi_decode_raw_validate( + data, + ) + .map(WrappedTokenCalls::unpause) + } + unpause + }, + { + fn mint(data: &[u8]) -> alloy_sol_types::Result { + ::abi_decode_raw_validate( + data, + ) + .map(WrappedTokenCalls::mint) + } + mint + }, + { + fn burn(data: &[u8]) -> alloy_sol_types::Result { + ::abi_decode_raw_validate( + data, + ) + .map(WrappedTokenCalls::burn) + } + burn + }, + { + fn paused( + data: &[u8], + ) -> alloy_sol_types::Result { + ::abi_decode_raw_validate( + data, + ) + .map(WrappedTokenCalls::paused) + } + paused + }, + { + fn balanceOf( + data: &[u8], + ) -> alloy_sol_types::Result { + ::abi_decode_raw_validate( + data, + ) + .map(WrappedTokenCalls::balanceOf) + } + balanceOf + }, + { + fn burnFrom( + data: &[u8], + ) -> alloy_sol_types::Result { + ::abi_decode_raw_validate( + data, + ) + .map(WrappedTokenCalls::burnFrom) + } + burnFrom + }, + { + fn pause(data: &[u8]) -> alloy_sol_types::Result { + ::abi_decode_raw_validate( + data, + ) + .map(WrappedTokenCalls::pause) + } + pause + }, + { + fn hasRole( + data: &[u8], + ) -> alloy_sol_types::Result { + ::abi_decode_raw_validate( + data, + ) + .map(WrappedTokenCalls::hasRole) + } + hasRole + }, + { + fn symbol( + data: &[u8], + ) -> alloy_sol_types::Result { + ::abi_decode_raw_validate( + data, + ) + .map(WrappedTokenCalls::symbol) + } + symbol + }, + { + fn DEFAULT_ADMIN_ROLE( + data: &[u8], + ) -> alloy_sol_types::Result { + ::abi_decode_raw_validate( + data, + ) + .map(WrappedTokenCalls::DEFAULT_ADMIN_ROLE) + } + DEFAULT_ADMIN_ROLE + }, + { + fn transfer( + data: &[u8], + ) -> alloy_sol_types::Result { + ::abi_decode_raw_validate( + data, + ) + .map(WrappedTokenCalls::transfer) + } + transfer + }, + { + fn MINTER_ROLE( + data: &[u8], + ) -> alloy_sol_types::Result { + ::abi_decode_raw_validate( + data, + ) + .map(WrappedTokenCalls::MINTER_ROLE) + } + MINTER_ROLE + }, + { + fn revokeRole( + data: &[u8], + ) -> alloy_sol_types::Result { + ::abi_decode_raw_validate( + data, + ) + .map(WrappedTokenCalls::revokeRole) + } + revokeRole + }, + { + fn allowance( + data: &[u8], + ) -> alloy_sol_types::Result { + ::abi_decode_raw_validate( + data, + ) + .map(WrappedTokenCalls::allowance) + } + allowance + }, + { + fn PAUSER_ROLE( + data: &[u8], + ) -> alloy_sol_types::Result { + ::abi_decode_raw_validate( + data, + ) + .map(WrappedTokenCalls::PAUSER_ROLE) + } + PAUSER_ROLE + }, + ]; + let Ok(idx) = Self::SELECTORS.binary_search(&selector) else { + return Err( + alloy_sol_types::Error::unknown_selector( + ::NAME, + selector, + ), + ); + }; + DECODE_VALIDATE_SHIMS[idx](data) + } + #[inline] + fn abi_encoded_size(&self) -> usize { + match self { + Self::DEFAULT_ADMIN_ROLE(inner) => { + ::abi_encoded_size( + inner, + ) + } + Self::MINTER_ROLE(inner) => { + ::abi_encoded_size( + inner, + ) + } + Self::PAUSER_ROLE(inner) => { + ::abi_encoded_size( + inner, + ) + } + Self::allowance(inner) => { + ::abi_encoded_size(inner) + } + Self::approve(inner) => { + ::abi_encoded_size(inner) + } + Self::balanceOf(inner) => { + ::abi_encoded_size(inner) + } + Self::burn(inner) => { + ::abi_encoded_size(inner) + } + Self::burnFrom(inner) => { + ::abi_encoded_size(inner) + } + Self::decimals(inner) => { + ::abi_encoded_size(inner) + } + Self::getRoleAdmin(inner) => { + ::abi_encoded_size( + inner, + ) + } + Self::grantRole(inner) => { + ::abi_encoded_size(inner) + } + Self::hasRole(inner) => { + ::abi_encoded_size(inner) + } + Self::mint(inner) => { + ::abi_encoded_size(inner) + } + Self::name(inner) => { + ::abi_encoded_size(inner) + } + Self::pause(inner) => { + ::abi_encoded_size(inner) + } + Self::paused(inner) => { + ::abi_encoded_size(inner) + } + Self::renounceRole(inner) => { + ::abi_encoded_size( + inner, + ) + } + Self::revokeRole(inner) => { + ::abi_encoded_size(inner) + } + Self::supportsInterface(inner) => { + ::abi_encoded_size( + inner, + ) + } + Self::symbol(inner) => { + ::abi_encoded_size(inner) + } + Self::totalSupply(inner) => { + ::abi_encoded_size( + inner, + ) + } + Self::transfer(inner) => { + ::abi_encoded_size(inner) + } + Self::transferFrom(inner) => { + ::abi_encoded_size( + inner, + ) + } + Self::unpause(inner) => { + ::abi_encoded_size(inner) + } + } + } + #[inline] + fn abi_encode_raw(&self, out: &mut alloy_sol_types::private::Vec) { + match self { + Self::DEFAULT_ADMIN_ROLE(inner) => { + ::abi_encode_raw( + inner, + out, + ) + } + Self::MINTER_ROLE(inner) => { + ::abi_encode_raw( + inner, + out, + ) + } + Self::PAUSER_ROLE(inner) => { + ::abi_encode_raw( + inner, + out, + ) + } + Self::allowance(inner) => { + ::abi_encode_raw( + inner, + out, + ) + } + Self::approve(inner) => { + ::abi_encode_raw(inner, out) + } + Self::balanceOf(inner) => { + ::abi_encode_raw( + inner, + out, + ) + } + Self::burn(inner) => { + ::abi_encode_raw(inner, out) + } + Self::burnFrom(inner) => { + ::abi_encode_raw( + inner, + out, + ) + } + Self::decimals(inner) => { + ::abi_encode_raw( + inner, + out, + ) + } + Self::getRoleAdmin(inner) => { + ::abi_encode_raw( + inner, + out, + ) + } + Self::grantRole(inner) => { + ::abi_encode_raw( + inner, + out, + ) + } + Self::hasRole(inner) => { + ::abi_encode_raw(inner, out) + } + Self::mint(inner) => { + ::abi_encode_raw(inner, out) + } + Self::name(inner) => { + ::abi_encode_raw(inner, out) + } + Self::pause(inner) => { + ::abi_encode_raw(inner, out) + } + Self::paused(inner) => { + ::abi_encode_raw(inner, out) + } + Self::renounceRole(inner) => { + ::abi_encode_raw( + inner, + out, + ) + } + Self::revokeRole(inner) => { + ::abi_encode_raw( + inner, + out, + ) + } + Self::supportsInterface(inner) => { + ::abi_encode_raw( + inner, + out, + ) + } + Self::symbol(inner) => { + ::abi_encode_raw(inner, out) + } + Self::totalSupply(inner) => { + ::abi_encode_raw( + inner, + out, + ) + } + Self::transfer(inner) => { + ::abi_encode_raw( + inner, + out, + ) + } + Self::transferFrom(inner) => { + ::abi_encode_raw( + inner, + out, + ) + } + Self::unpause(inner) => { + ::abi_encode_raw(inner, out) + } + } + } + } + ///Container for all the [`WrappedToken`](self) custom errors. + #[derive(serde::Serialize, serde::Deserialize)] + #[derive(Debug, PartialEq, Eq, Hash)] + pub enum WrappedTokenErrors { + #[allow(missing_docs)] + AccessControlBadConfirmation(AccessControlBadConfirmation), + #[allow(missing_docs)] + AccessControlUnauthorizedAccount(AccessControlUnauthorizedAccount), + #[allow(missing_docs)] + ERC20InsufficientAllowance(ERC20InsufficientAllowance), + #[allow(missing_docs)] + ERC20InsufficientBalance(ERC20InsufficientBalance), + #[allow(missing_docs)] + ERC20InvalidApprover(ERC20InvalidApprover), + #[allow(missing_docs)] + ERC20InvalidReceiver(ERC20InvalidReceiver), + #[allow(missing_docs)] + ERC20InvalidSender(ERC20InvalidSender), + #[allow(missing_docs)] + ERC20InvalidSpender(ERC20InvalidSpender), + #[allow(missing_docs)] + EnforcedPause(EnforcedPause), + #[allow(missing_docs)] + ExpectedPause(ExpectedPause), + } + #[automatically_derived] + impl WrappedTokenErrors { + /// All the selectors of this enum. + /// + /// Note that the selectors might not be in the same order as the variants. + /// No guarantees are made about the order of the selectors. + /// + /// Prefer using `SolInterface` methods instead. + pub const SELECTORS: &'static [[u8; 4usize]] = &[ + [102u8, 151u8, 178u8, 50u8], + [141u8, 252u8, 32u8, 43u8], + [148u8, 40u8, 13u8, 98u8], + [150u8, 198u8, 253u8, 30u8], + [217u8, 60u8, 6u8, 101u8], + [226u8, 81u8, 125u8, 63u8], + [228u8, 80u8, 211u8, 140u8], + [230u8, 2u8, 223u8, 5u8], + [236u8, 68u8, 47u8, 5u8], + [251u8, 143u8, 65u8, 178u8], + ]; + } + #[automatically_derived] + impl alloy_sol_types::SolInterface for WrappedTokenErrors { + const NAME: &'static str = "WrappedTokenErrors"; + const MIN_DATA_LENGTH: usize = 0usize; + const COUNT: usize = 10usize; + #[inline] + fn selector(&self) -> [u8; 4] { + match self { + Self::AccessControlBadConfirmation(_) => { + ::SELECTOR + } + Self::AccessControlUnauthorizedAccount(_) => { + ::SELECTOR + } + Self::ERC20InsufficientAllowance(_) => { + ::SELECTOR + } + Self::ERC20InsufficientBalance(_) => { + ::SELECTOR + } + Self::ERC20InvalidApprover(_) => { + ::SELECTOR + } + Self::ERC20InvalidReceiver(_) => { + ::SELECTOR + } + Self::ERC20InvalidSender(_) => { + ::SELECTOR + } + Self::ERC20InvalidSpender(_) => { + ::SELECTOR + } + Self::EnforcedPause(_) => { + ::SELECTOR + } + Self::ExpectedPause(_) => { + ::SELECTOR + } + } + } + #[inline] + fn selector_at(i: usize) -> ::core::option::Option<[u8; 4]> { + Self::SELECTORS.get(i).copied() + } + #[inline] + fn valid_selector(selector: [u8; 4]) -> bool { + Self::SELECTORS.binary_search(&selector).is_ok() + } + #[inline] + #[allow(non_snake_case)] + fn abi_decode_raw( + selector: [u8; 4], + data: &[u8], + ) -> alloy_sol_types::Result { + static DECODE_SHIMS: &[fn( + &[u8], + ) -> alloy_sol_types::Result] = &[ + { + fn AccessControlBadConfirmation( + data: &[u8], + ) -> alloy_sol_types::Result { + ::abi_decode_raw( + data, + ) + .map(WrappedTokenErrors::AccessControlBadConfirmation) + } + AccessControlBadConfirmation + }, + { + fn ExpectedPause( + data: &[u8], + ) -> alloy_sol_types::Result { + ::abi_decode_raw( + data, + ) + .map(WrappedTokenErrors::ExpectedPause) + } + ExpectedPause + }, + { + fn ERC20InvalidSpender( + data: &[u8], + ) -> alloy_sol_types::Result { + ::abi_decode_raw( + data, + ) + .map(WrappedTokenErrors::ERC20InvalidSpender) + } + ERC20InvalidSpender + }, + { + fn ERC20InvalidSender( + data: &[u8], + ) -> alloy_sol_types::Result { + ::abi_decode_raw( + data, + ) + .map(WrappedTokenErrors::ERC20InvalidSender) + } + ERC20InvalidSender + }, + { + fn EnforcedPause( + data: &[u8], + ) -> alloy_sol_types::Result { + ::abi_decode_raw( + data, + ) + .map(WrappedTokenErrors::EnforcedPause) + } + EnforcedPause + }, + { + fn AccessControlUnauthorizedAccount( + data: &[u8], + ) -> alloy_sol_types::Result { + ::abi_decode_raw( + data, + ) + .map(WrappedTokenErrors::AccessControlUnauthorizedAccount) + } + AccessControlUnauthorizedAccount + }, + { + fn ERC20InsufficientBalance( + data: &[u8], + ) -> alloy_sol_types::Result { + ::abi_decode_raw( + data, + ) + .map(WrappedTokenErrors::ERC20InsufficientBalance) + } + ERC20InsufficientBalance + }, + { + fn ERC20InvalidApprover( + data: &[u8], + ) -> alloy_sol_types::Result { + ::abi_decode_raw( + data, + ) + .map(WrappedTokenErrors::ERC20InvalidApprover) + } + ERC20InvalidApprover + }, + { + fn ERC20InvalidReceiver( + data: &[u8], + ) -> alloy_sol_types::Result { + ::abi_decode_raw( + data, + ) + .map(WrappedTokenErrors::ERC20InvalidReceiver) + } + ERC20InvalidReceiver + }, + { + fn ERC20InsufficientAllowance( + data: &[u8], + ) -> alloy_sol_types::Result { + ::abi_decode_raw( + data, + ) + .map(WrappedTokenErrors::ERC20InsufficientAllowance) + } + ERC20InsufficientAllowance + }, + ]; + let Ok(idx) = Self::SELECTORS.binary_search(&selector) else { + return Err( + alloy_sol_types::Error::unknown_selector( + ::NAME, + selector, + ), + ); + }; + DECODE_SHIMS[idx](data) + } + #[inline] + #[allow(non_snake_case)] + fn abi_decode_raw_validate( + selector: [u8; 4], + data: &[u8], + ) -> alloy_sol_types::Result { + static DECODE_VALIDATE_SHIMS: &[fn( + &[u8], + ) -> alloy_sol_types::Result] = &[ + { + fn AccessControlBadConfirmation( + data: &[u8], + ) -> alloy_sol_types::Result { + ::abi_decode_raw_validate( + data, + ) + .map(WrappedTokenErrors::AccessControlBadConfirmation) + } + AccessControlBadConfirmation + }, + { + fn ExpectedPause( + data: &[u8], + ) -> alloy_sol_types::Result { + ::abi_decode_raw_validate( + data, + ) + .map(WrappedTokenErrors::ExpectedPause) + } + ExpectedPause + }, + { + fn ERC20InvalidSpender( + data: &[u8], + ) -> alloy_sol_types::Result { + ::abi_decode_raw_validate( + data, + ) + .map(WrappedTokenErrors::ERC20InvalidSpender) + } + ERC20InvalidSpender + }, + { + fn ERC20InvalidSender( + data: &[u8], + ) -> alloy_sol_types::Result { + ::abi_decode_raw_validate( + data, + ) + .map(WrappedTokenErrors::ERC20InvalidSender) + } + ERC20InvalidSender + }, + { + fn EnforcedPause( + data: &[u8], + ) -> alloy_sol_types::Result { + ::abi_decode_raw_validate( + data, + ) + .map(WrappedTokenErrors::EnforcedPause) + } + EnforcedPause + }, + { + fn AccessControlUnauthorizedAccount( + data: &[u8], + ) -> alloy_sol_types::Result { + ::abi_decode_raw_validate( + data, + ) + .map(WrappedTokenErrors::AccessControlUnauthorizedAccount) + } + AccessControlUnauthorizedAccount + }, + { + fn ERC20InsufficientBalance( + data: &[u8], + ) -> alloy_sol_types::Result { + ::abi_decode_raw_validate( + data, + ) + .map(WrappedTokenErrors::ERC20InsufficientBalance) + } + ERC20InsufficientBalance + }, + { + fn ERC20InvalidApprover( + data: &[u8], + ) -> alloy_sol_types::Result { + ::abi_decode_raw_validate( + data, + ) + .map(WrappedTokenErrors::ERC20InvalidApprover) + } + ERC20InvalidApprover + }, + { + fn ERC20InvalidReceiver( + data: &[u8], + ) -> alloy_sol_types::Result { + ::abi_decode_raw_validate( + data, + ) + .map(WrappedTokenErrors::ERC20InvalidReceiver) + } + ERC20InvalidReceiver + }, + { + fn ERC20InsufficientAllowance( + data: &[u8], + ) -> alloy_sol_types::Result { + ::abi_decode_raw_validate( + data, + ) + .map(WrappedTokenErrors::ERC20InsufficientAllowance) + } + ERC20InsufficientAllowance + }, + ]; + let Ok(idx) = Self::SELECTORS.binary_search(&selector) else { + return Err( + alloy_sol_types::Error::unknown_selector( + ::NAME, + selector, + ), + ); + }; + DECODE_VALIDATE_SHIMS[idx](data) + } + #[inline] + fn abi_encoded_size(&self) -> usize { + match self { + Self::AccessControlBadConfirmation(inner) => { + ::abi_encoded_size( + inner, + ) + } + Self::AccessControlUnauthorizedAccount(inner) => { + ::abi_encoded_size( + inner, + ) + } + Self::ERC20InsufficientAllowance(inner) => { + ::abi_encoded_size( + inner, + ) + } + Self::ERC20InsufficientBalance(inner) => { + ::abi_encoded_size( + inner, + ) + } + Self::ERC20InvalidApprover(inner) => { + ::abi_encoded_size( + inner, + ) + } + Self::ERC20InvalidReceiver(inner) => { + ::abi_encoded_size( + inner, + ) + } + Self::ERC20InvalidSender(inner) => { + ::abi_encoded_size( + inner, + ) + } + Self::ERC20InvalidSpender(inner) => { + ::abi_encoded_size( + inner, + ) + } + Self::EnforcedPause(inner) => { + ::abi_encoded_size(inner) + } + Self::ExpectedPause(inner) => { + ::abi_encoded_size(inner) + } + } + } + #[inline] + fn abi_encode_raw(&self, out: &mut alloy_sol_types::private::Vec) { + match self { + Self::AccessControlBadConfirmation(inner) => { + ::abi_encode_raw( + inner, + out, + ) + } + Self::AccessControlUnauthorizedAccount(inner) => { + ::abi_encode_raw( + inner, + out, + ) + } + Self::ERC20InsufficientAllowance(inner) => { + ::abi_encode_raw( + inner, + out, + ) + } + Self::ERC20InsufficientBalance(inner) => { + ::abi_encode_raw( + inner, + out, + ) + } + Self::ERC20InvalidApprover(inner) => { + ::abi_encode_raw( + inner, + out, + ) + } + Self::ERC20InvalidReceiver(inner) => { + ::abi_encode_raw( + inner, + out, + ) + } + Self::ERC20InvalidSender(inner) => { + ::abi_encode_raw( + inner, + out, + ) + } + Self::ERC20InvalidSpender(inner) => { + ::abi_encode_raw( + inner, + out, + ) + } + Self::EnforcedPause(inner) => { + ::abi_encode_raw( + inner, + out, + ) + } + Self::ExpectedPause(inner) => { + ::abi_encode_raw( + inner, + out, + ) + } + } + } + } + ///Container for all the [`WrappedToken`](self) events. + #[derive(serde::Serialize, serde::Deserialize)] + #[derive(Debug, PartialEq, Eq, Hash)] + pub enum WrappedTokenEvents { + #[allow(missing_docs)] + Approval(Approval), + #[allow(missing_docs)] + Paused(Paused), + #[allow(missing_docs)] + RoleAdminChanged(RoleAdminChanged), + #[allow(missing_docs)] + RoleGranted(RoleGranted), + #[allow(missing_docs)] + RoleRevoked(RoleRevoked), + #[allow(missing_docs)] + Transfer(Transfer), + #[allow(missing_docs)] + Unpaused(Unpaused), + } + #[automatically_derived] + impl WrappedTokenEvents { + /// All the selectors of this enum. + /// + /// Note that the selectors might not be in the same order as the variants. + /// No guarantees are made about the order of the selectors. + /// + /// Prefer using `SolInterface` methods instead. + pub const SELECTORS: &'static [[u8; 32usize]] = &[ + [ + 47u8, 135u8, 136u8, 17u8, 126u8, 126u8, 255u8, 29u8, 130u8, 233u8, 38u8, + 236u8, 121u8, 73u8, 1u8, 209u8, 124u8, 120u8, 2u8, 74u8, 80u8, 39u8, 9u8, + 64u8, 48u8, 69u8, 64u8, 167u8, 51u8, 101u8, 111u8, 13u8, + ], + [ + 93u8, 185u8, 238u8, 10u8, 73u8, 91u8, 242u8, 230u8, 255u8, 156u8, 145u8, + 167u8, 131u8, 76u8, 27u8, 164u8, 253u8, 210u8, 68u8, 165u8, 232u8, 170u8, + 78u8, 83u8, 123u8, 211u8, 138u8, 234u8, 228u8, 176u8, 115u8, 170u8, + ], + [ + 98u8, 231u8, 140u8, 234u8, 1u8, 190u8, 227u8, 32u8, 205u8, 78u8, 66u8, + 2u8, 112u8, 181u8, 234u8, 116u8, 0u8, 13u8, 17u8, 176u8, 201u8, 247u8, + 71u8, 84u8, 235u8, 219u8, 252u8, 84u8, 75u8, 5u8, 162u8, 88u8, + ], + [ + 140u8, 91u8, 225u8, 229u8, 235u8, 236u8, 125u8, 91u8, 209u8, 79u8, 113u8, + 66u8, 125u8, 30u8, 132u8, 243u8, 221u8, 3u8, 20u8, 192u8, 247u8, 178u8, + 41u8, 30u8, 91u8, 32u8, 10u8, 200u8, 199u8, 195u8, 185u8, 37u8, + ], + [ + 189u8, 121u8, 184u8, 111u8, 254u8, 10u8, 184u8, 232u8, 119u8, 97u8, 81u8, + 81u8, 66u8, 23u8, 205u8, 124u8, 172u8, 213u8, 44u8, 144u8, 159u8, 102u8, + 71u8, 92u8, 58u8, 244u8, 78u8, 18u8, 159u8, 11u8, 0u8, 255u8, + ], + [ + 221u8, 242u8, 82u8, 173u8, 27u8, 226u8, 200u8, 155u8, 105u8, 194u8, + 176u8, 104u8, 252u8, 55u8, 141u8, 170u8, 149u8, 43u8, 167u8, 241u8, 99u8, + 196u8, 161u8, 22u8, 40u8, 245u8, 90u8, 77u8, 245u8, 35u8, 179u8, 239u8, + ], + [ + 246u8, 57u8, 31u8, 92u8, 50u8, 217u8, 198u8, 157u8, 42u8, 71u8, 234u8, + 103u8, 11u8, 68u8, 41u8, 116u8, 181u8, 57u8, 53u8, 209u8, 237u8, 199u8, + 253u8, 100u8, 235u8, 33u8, 224u8, 71u8, 168u8, 57u8, 23u8, 27u8, + ], + ]; + } + #[automatically_derived] + impl alloy_sol_types::SolEventInterface for WrappedTokenEvents { + const NAME: &'static str = "WrappedTokenEvents"; + const COUNT: usize = 7usize; + fn decode_raw_log( + topics: &[alloy_sol_types::Word], + data: &[u8], + ) -> alloy_sol_types::Result { + match topics.first().copied() { + Some(::SIGNATURE_HASH) => { + ::decode_raw_log(topics, data) + .map(Self::Approval) + } + Some(::SIGNATURE_HASH) => { + ::decode_raw_log(topics, data) + .map(Self::Paused) + } + Some(::SIGNATURE_HASH) => { + ::decode_raw_log( + topics, + data, + ) + .map(Self::RoleAdminChanged) + } + Some(::SIGNATURE_HASH) => { + ::decode_raw_log( + topics, + data, + ) + .map(Self::RoleGranted) + } + Some(::SIGNATURE_HASH) => { + ::decode_raw_log( + topics, + data, + ) + .map(Self::RoleRevoked) + } + Some(::SIGNATURE_HASH) => { + ::decode_raw_log(topics, data) + .map(Self::Transfer) + } + Some(::SIGNATURE_HASH) => { + ::decode_raw_log(topics, data) + .map(Self::Unpaused) + } + _ => { + alloy_sol_types::private::Err(alloy_sol_types::Error::InvalidLog { + name: ::NAME, + log: alloy_sol_types::private::Box::new( + alloy_sol_types::private::LogData::new_unchecked( + topics.to_vec(), + data.to_vec().into(), + ), + ), + }) + } + } + } + } + #[automatically_derived] + impl alloy_sol_types::private::IntoLogData for WrappedTokenEvents { + fn to_log_data(&self) -> alloy_sol_types::private::LogData { + match self { + Self::Approval(inner) => { + alloy_sol_types::private::IntoLogData::to_log_data(inner) + } + Self::Paused(inner) => { + alloy_sol_types::private::IntoLogData::to_log_data(inner) + } + Self::RoleAdminChanged(inner) => { + alloy_sol_types::private::IntoLogData::to_log_data(inner) + } + Self::RoleGranted(inner) => { + alloy_sol_types::private::IntoLogData::to_log_data(inner) + } + Self::RoleRevoked(inner) => { + alloy_sol_types::private::IntoLogData::to_log_data(inner) + } + Self::Transfer(inner) => { + alloy_sol_types::private::IntoLogData::to_log_data(inner) + } + Self::Unpaused(inner) => { + alloy_sol_types::private::IntoLogData::to_log_data(inner) + } + } + } + fn into_log_data(self) -> alloy_sol_types::private::LogData { + match self { + Self::Approval(inner) => { + alloy_sol_types::private::IntoLogData::into_log_data(inner) + } + Self::Paused(inner) => { + alloy_sol_types::private::IntoLogData::into_log_data(inner) + } + Self::RoleAdminChanged(inner) => { + alloy_sol_types::private::IntoLogData::into_log_data(inner) + } + Self::RoleGranted(inner) => { + alloy_sol_types::private::IntoLogData::into_log_data(inner) + } + Self::RoleRevoked(inner) => { + alloy_sol_types::private::IntoLogData::into_log_data(inner) + } + Self::Transfer(inner) => { + alloy_sol_types::private::IntoLogData::into_log_data(inner) + } + Self::Unpaused(inner) => { + alloy_sol_types::private::IntoLogData::into_log_data(inner) + } + } + } + } + use alloy::contract as alloy_contract; + /**Creates a new wrapper around an on-chain [`WrappedToken`](self) contract instance. + +See the [wrapper's documentation](`WrappedTokenInstance`) for more details.*/ + #[inline] + pub const fn new< + P: alloy_contract::private::Provider, + N: alloy_contract::private::Network, + >( + address: alloy_sol_types::private::Address, + provider: P, + ) -> WrappedTokenInstance { + WrappedTokenInstance::::new(address, provider) + } + /**Deploys this contract using the given `provider` and constructor arguments, if any. + +Returns a new instance of the contract, if the deployment was successful. + +For more fine-grained control over the deployment process, use [`deploy_builder`] instead.*/ + #[inline] + pub fn deploy< + P: alloy_contract::private::Provider, + N: alloy_contract::private::Network, + >( + provider: P, + name_: alloy::sol_types::private::String, + symbol_: alloy::sol_types::private::String, + decimals_: u8, + ) -> impl ::core::future::Future< + Output = alloy_contract::Result>, + > { + WrappedTokenInstance::::deploy(provider, name_, symbol_, decimals_) + } + /**Creates a `RawCallBuilder` for deploying this contract using the given `provider` +and constructor arguments, if any. + +This is a simple wrapper around creating a `RawCallBuilder` with the data set to +the bytecode concatenated with the constructor's ABI-encoded arguments.*/ + #[inline] + pub fn deploy_builder< + P: alloy_contract::private::Provider, + N: alloy_contract::private::Network, + >( + provider: P, + name_: alloy::sol_types::private::String, + symbol_: alloy::sol_types::private::String, + decimals_: u8, + ) -> alloy_contract::RawCallBuilder { + WrappedTokenInstance::::deploy_builder(provider, name_, symbol_, decimals_) + } + /**A [`WrappedToken`](self) instance. + +Contains type-safe methods for interacting with an on-chain instance of the +[`WrappedToken`](self) contract located at a given `address`, using a given +provider `P`. + +If the contract bytecode is available (see the [`sol!`](alloy_sol_types::sol!) +documentation on how to provide it), the `deploy` and `deploy_builder` methods can +be used to deploy a new instance of the contract. + +See the [module-level documentation](self) for all the available methods.*/ + #[derive(Clone)] + pub struct WrappedTokenInstance { + address: alloy_sol_types::private::Address, + provider: P, + _network: ::core::marker::PhantomData, + } + #[automatically_derived] + impl ::core::fmt::Debug for WrappedTokenInstance { + #[inline] + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { + f.debug_tuple("WrappedTokenInstance").field(&self.address).finish() + } + } + /// Instantiation and getters/setters. + #[automatically_derived] + impl< + P: alloy_contract::private::Provider, + N: alloy_contract::private::Network, + > WrappedTokenInstance { + /**Creates a new wrapper around an on-chain [`WrappedToken`](self) contract instance. + +See the [wrapper's documentation](`WrappedTokenInstance`) for more details.*/ + #[inline] + pub const fn new( + address: alloy_sol_types::private::Address, + provider: P, + ) -> Self { + Self { + address, + provider, + _network: ::core::marker::PhantomData, + } + } + /**Deploys this contract using the given `provider` and constructor arguments, if any. + +Returns a new instance of the contract, if the deployment was successful. + +For more fine-grained control over the deployment process, use [`deploy_builder`] instead.*/ + #[inline] + pub async fn deploy( + provider: P, + name_: alloy::sol_types::private::String, + symbol_: alloy::sol_types::private::String, + decimals_: u8, + ) -> alloy_contract::Result> { + let call_builder = Self::deploy_builder(provider, name_, symbol_, decimals_); + let contract_address = call_builder.deploy().await?; + Ok(Self::new(contract_address, call_builder.provider)) + } + /**Creates a `RawCallBuilder` for deploying this contract using the given `provider` +and constructor arguments, if any. + +This is a simple wrapper around creating a `RawCallBuilder` with the data set to +the bytecode concatenated with the constructor's ABI-encoded arguments.*/ + #[inline] + pub fn deploy_builder( + provider: P, + name_: alloy::sol_types::private::String, + symbol_: alloy::sol_types::private::String, + decimals_: u8, + ) -> alloy_contract::RawCallBuilder { + alloy_contract::RawCallBuilder::new_raw_deploy( + provider, + [ + &BYTECODE[..], + &alloy_sol_types::SolConstructor::abi_encode( + &constructorCall { + name_, + symbol_, + decimals_, + }, + )[..], + ] + .concat() + .into(), + ) + } + /// Returns a reference to the address. + #[inline] + pub const fn address(&self) -> &alloy_sol_types::private::Address { + &self.address + } + /// Sets the address. + #[inline] + pub fn set_address(&mut self, address: alloy_sol_types::private::Address) { + self.address = address; + } + /// Sets the address and returns `self`. + pub fn at(mut self, address: alloy_sol_types::private::Address) -> Self { + self.set_address(address); + self + } + /// Returns a reference to the provider. + #[inline] + pub const fn provider(&self) -> &P { + &self.provider + } + } + impl WrappedTokenInstance<&P, N> { + /// Clones the provider and returns a new instance with the cloned provider. + #[inline] + pub fn with_cloned_provider(self) -> WrappedTokenInstance { + WrappedTokenInstance { + address: self.address, + provider: ::core::clone::Clone::clone(&self.provider), + _network: ::core::marker::PhantomData, + } + } + } + /// Function calls. + #[automatically_derived] + impl< + P: alloy_contract::private::Provider, + N: alloy_contract::private::Network, + > WrappedTokenInstance { + /// Creates a new call builder using this contract instance's provider and address. + /// + /// Note that the call can be any function call, not just those defined in this + /// contract. Prefer using the other methods for building type-safe contract calls. + pub fn call_builder( + &self, + call: &C, + ) -> alloy_contract::SolCallBuilder<&P, C, N> { + alloy_contract::SolCallBuilder::new_sol(&self.provider, &self.address, call) + } + ///Creates a new call builder for the [`DEFAULT_ADMIN_ROLE`] function. + pub fn DEFAULT_ADMIN_ROLE( + &self, + ) -> alloy_contract::SolCallBuilder<&P, DEFAULT_ADMIN_ROLECall, N> { + self.call_builder(&DEFAULT_ADMIN_ROLECall) + } + ///Creates a new call builder for the [`MINTER_ROLE`] function. + pub fn MINTER_ROLE( + &self, + ) -> alloy_contract::SolCallBuilder<&P, MINTER_ROLECall, N> { + self.call_builder(&MINTER_ROLECall) + } + ///Creates a new call builder for the [`PAUSER_ROLE`] function. + pub fn PAUSER_ROLE( + &self, + ) -> alloy_contract::SolCallBuilder<&P, PAUSER_ROLECall, N> { + self.call_builder(&PAUSER_ROLECall) + } + ///Creates a new call builder for the [`allowance`] function. + pub fn allowance( + &self, + owner: alloy::sol_types::private::Address, + spender: alloy::sol_types::private::Address, + ) -> alloy_contract::SolCallBuilder<&P, allowanceCall, N> { + self.call_builder(&allowanceCall { owner, spender }) + } + ///Creates a new call builder for the [`approve`] function. + pub fn approve( + &self, + spender: alloy::sol_types::private::Address, + value: alloy::sol_types::private::primitives::aliases::U256, + ) -> alloy_contract::SolCallBuilder<&P, approveCall, N> { + self.call_builder(&approveCall { spender, value }) + } + ///Creates a new call builder for the [`balanceOf`] function. + pub fn balanceOf( + &self, + account: alloy::sol_types::private::Address, + ) -> alloy_contract::SolCallBuilder<&P, balanceOfCall, N> { + self.call_builder(&balanceOfCall { account }) + } + ///Creates a new call builder for the [`burn`] function. + pub fn burn( + &self, + value: alloy::sol_types::private::primitives::aliases::U256, + ) -> alloy_contract::SolCallBuilder<&P, burnCall, N> { + self.call_builder(&burnCall { value }) + } + ///Creates a new call builder for the [`burnFrom`] function. + pub fn burnFrom( + &self, + account: alloy::sol_types::private::Address, + value: alloy::sol_types::private::primitives::aliases::U256, + ) -> alloy_contract::SolCallBuilder<&P, burnFromCall, N> { + self.call_builder(&burnFromCall { account, value }) + } + ///Creates a new call builder for the [`decimals`] function. + pub fn decimals(&self) -> alloy_contract::SolCallBuilder<&P, decimalsCall, N> { + self.call_builder(&decimalsCall) + } + ///Creates a new call builder for the [`getRoleAdmin`] function. + pub fn getRoleAdmin( + &self, + role: alloy::sol_types::private::FixedBytes<32>, + ) -> alloy_contract::SolCallBuilder<&P, getRoleAdminCall, N> { + self.call_builder(&getRoleAdminCall { role }) + } + ///Creates a new call builder for the [`grantRole`] function. + pub fn grantRole( + &self, + role: alloy::sol_types::private::FixedBytes<32>, + account: alloy::sol_types::private::Address, + ) -> alloy_contract::SolCallBuilder<&P, grantRoleCall, N> { + self.call_builder(&grantRoleCall { role, account }) + } + ///Creates a new call builder for the [`hasRole`] function. + pub fn hasRole( + &self, + role: alloy::sol_types::private::FixedBytes<32>, + account: alloy::sol_types::private::Address, + ) -> alloy_contract::SolCallBuilder<&P, hasRoleCall, N> { + self.call_builder(&hasRoleCall { role, account }) + } + ///Creates a new call builder for the [`mint`] function. + pub fn mint( + &self, + to: alloy::sol_types::private::Address, + amount: alloy::sol_types::private::primitives::aliases::U256, + ) -> alloy_contract::SolCallBuilder<&P, mintCall, N> { + self.call_builder(&mintCall { to, amount }) + } + ///Creates a new call builder for the [`name`] function. + pub fn name(&self) -> alloy_contract::SolCallBuilder<&P, nameCall, N> { + self.call_builder(&nameCall) + } + ///Creates a new call builder for the [`pause`] function. + pub fn pause(&self) -> alloy_contract::SolCallBuilder<&P, pauseCall, N> { + self.call_builder(&pauseCall) + } + ///Creates a new call builder for the [`paused`] function. + pub fn paused(&self) -> alloy_contract::SolCallBuilder<&P, pausedCall, N> { + self.call_builder(&pausedCall) + } + ///Creates a new call builder for the [`renounceRole`] function. + pub fn renounceRole( + &self, + role: alloy::sol_types::private::FixedBytes<32>, + callerConfirmation: alloy::sol_types::private::Address, + ) -> alloy_contract::SolCallBuilder<&P, renounceRoleCall, N> { + self.call_builder( + &renounceRoleCall { + role, + callerConfirmation, + }, + ) + } + ///Creates a new call builder for the [`revokeRole`] function. + pub fn revokeRole( + &self, + role: alloy::sol_types::private::FixedBytes<32>, + account: alloy::sol_types::private::Address, + ) -> alloy_contract::SolCallBuilder<&P, revokeRoleCall, N> { + self.call_builder(&revokeRoleCall { role, account }) + } + ///Creates a new call builder for the [`supportsInterface`] function. + pub fn supportsInterface( + &self, + interfaceId: alloy::sol_types::private::FixedBytes<4>, + ) -> alloy_contract::SolCallBuilder<&P, supportsInterfaceCall, N> { + self.call_builder( + &supportsInterfaceCall { + interfaceId, + }, + ) + } + ///Creates a new call builder for the [`symbol`] function. + pub fn symbol(&self) -> alloy_contract::SolCallBuilder<&P, symbolCall, N> { + self.call_builder(&symbolCall) + } + ///Creates a new call builder for the [`totalSupply`] function. + pub fn totalSupply( + &self, + ) -> alloy_contract::SolCallBuilder<&P, totalSupplyCall, N> { + self.call_builder(&totalSupplyCall) + } + ///Creates a new call builder for the [`transfer`] function. + pub fn transfer( + &self, + to: alloy::sol_types::private::Address, + value: alloy::sol_types::private::primitives::aliases::U256, + ) -> alloy_contract::SolCallBuilder<&P, transferCall, N> { + self.call_builder(&transferCall { to, value }) + } + ///Creates a new call builder for the [`transferFrom`] function. + pub fn transferFrom( + &self, + from: alloy::sol_types::private::Address, + to: alloy::sol_types::private::Address, + value: alloy::sol_types::private::primitives::aliases::U256, + ) -> alloy_contract::SolCallBuilder<&P, transferFromCall, N> { + self.call_builder( + &transferFromCall { + from, + to, + value, + }, + ) + } + ///Creates a new call builder for the [`unpause`] function. + pub fn unpause(&self) -> alloy_contract::SolCallBuilder<&P, unpauseCall, N> { + self.call_builder(&unpauseCall) + } + } + /// Event filters. + #[automatically_derived] + impl< + P: alloy_contract::private::Provider, + N: alloy_contract::private::Network, + > WrappedTokenInstance { + /// Creates a new event filter using this contract instance's provider and address. + /// + /// Note that the type can be any event, not just those defined in this contract. + /// Prefer using the other methods for building type-safe event filters. + pub fn event_filter( + &self, + ) -> alloy_contract::Event<&P, E, N> { + alloy_contract::Event::new_sol(&self.provider, &self.address) + } + ///Creates a new event filter for the [`Approval`] event. + pub fn Approval_filter(&self) -> alloy_contract::Event<&P, Approval, N> { + self.event_filter::() + } + ///Creates a new event filter for the [`Paused`] event. + pub fn Paused_filter(&self) -> alloy_contract::Event<&P, Paused, N> { + self.event_filter::() + } + ///Creates a new event filter for the [`RoleAdminChanged`] event. + pub fn RoleAdminChanged_filter( + &self, + ) -> alloy_contract::Event<&P, RoleAdminChanged, N> { + self.event_filter::() + } + ///Creates a new event filter for the [`RoleGranted`] event. + pub fn RoleGranted_filter(&self) -> alloy_contract::Event<&P, RoleGranted, N> { + self.event_filter::() + } + ///Creates a new event filter for the [`RoleRevoked`] event. + pub fn RoleRevoked_filter(&self) -> alloy_contract::Event<&P, RoleRevoked, N> { + self.event_filter::() + } + ///Creates a new event filter for the [`Transfer`] event. + pub fn Transfer_filter(&self) -> alloy_contract::Event<&P, Transfer, N> { + self.event_filter::() + } + ///Creates a new event filter for the [`Unpaused`] event. + pub fn Unpaused_filter(&self) -> alloy_contract::Event<&P, Unpaused, N> { + self.event_filter::() + } + } +} diff --git a/protocol/foundry.toml b/protocol/foundry.toml index 14cb474b..5c2988ad 100644 --- a/protocol/foundry.toml +++ b/protocol/foundry.toml @@ -8,7 +8,8 @@ bytecode_hash = "none" cbor_metadata = false remappings = [ "@openzeppelin/=lib/openzeppelin-contracts/", - "pod-sdk/=../solidity-sdk/src/" + "pod-sdk/=../solidity-sdk/src/", + "pod-protocol/=./src/" ] allow_paths = ["../solidity-sdk"] diff --git a/protocol/script/DeployDepositWithdraw.s.sol b/protocol/script/DeployDepositWithdraw.s.sol new file mode 100644 index 00000000..c63a41c5 --- /dev/null +++ b/protocol/script/DeployDepositWithdraw.s.sol @@ -0,0 +1,27 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.20; + +import {BaseDeployer} from "./BaseDeployer.s.sol"; +import {console} from "forge-std/console.sol"; +import {BridgeDepositWithdraw} from "pod-protocol/BridgeDepositWithdraw.sol"; +import {IBridge} from "pod-protocol/interfaces/IBridge.sol"; +import {PodRegistry} from "pod-protocol/PodRegistry.sol"; + +contract DeployDepositWithdraw is BaseDeployer { + function run( + address podBridgeAddr, + IBridge.TokenLimits memory nativeTokenLimits, + address testTokenAddr, + address mirrorTokenAddr + ) external returns (address podRegistry, address depositWithdraw) { + address[] memory initialValidators = getValidatorAddresses(); + vm.startBroadcast(); + PodRegistry reg = new PodRegistry(initialValidators); + BridgeDepositWithdraw bdw = new BridgeDepositWithdraw(address(reg), podBridgeAddr, nativeTokenLimits); + bdw.whiteListToken(testTokenAddr, mirrorTokenAddr, nativeTokenLimits); + vm.stopBroadcast(); + console.log("PodRegistry deployed at:", address(reg)); + console.log("BridgeDepositWithdraw deployed at:", address(bdw)); + return (address(reg), address(bdw)); + } +} diff --git a/protocol/script/DeployMintBurn.s.sol b/protocol/script/DeployMintBurn.s.sol new file mode 100644 index 00000000..a3ee2795 --- /dev/null +++ b/protocol/script/DeployMintBurn.s.sol @@ -0,0 +1,33 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.20; + +import {Script} from "forge-std/Script.sol"; +import {console} from "forge-std/console.sol"; +import {BridgeMintBurn} from "pod-protocol/BridgeMintBurn.sol"; +import {IBridge} from "pod-protocol/interfaces/IBridge.sol"; + +contract DeployMintBurn is Script { + function run( + address sourceChainBridgeAddr, + IBridge.TokenLimits memory nativeTokenLimits, + uint96 sourceChainId, + string memory tokenName, + string memory tokenSymbol, + address tokenAddr, + address mirrorTokenAddr, + uint8 tokenDecimals + ) external returns (address bridgeMintBurn) { + vm.startBroadcast(); + BridgeMintBurn bmb = new BridgeMintBurn(sourceChainBridgeAddr, nativeTokenLimits, sourceChainId); + + if (tokenAddr != address(0)) { + bmb.createAndWhitelistMirrorToken( + tokenName, tokenSymbol, tokenAddr, mirrorTokenAddr, tokenDecimals, nativeTokenLimits + ); + } + vm.stopBroadcast(); + console.log("BridgeMintBurn deployed at:", address(bmb)); + + return address(bmb); + } +} diff --git a/protocol/script/DeployToken.s.sol b/protocol/script/DeployToken.s.sol new file mode 100644 index 00000000..765498d5 --- /dev/null +++ b/protocol/script/DeployToken.s.sol @@ -0,0 +1,22 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.20; + +import {Script} from "forge-std/Script.sol"; +import {console} from "forge-std/console.sol"; +import {WrappedToken} from "pod-protocol/WrappedToken.sol"; + +contract DeployToken is Script { + function run(string memory name, string memory symbol, uint8 decimals, address mintTo, uint256 amount) + external + returns (address token) + { + vm.startBroadcast(); + WrappedToken t = new WrappedToken(name, symbol, decimals); + t.mint(mintTo, amount); + vm.stopBroadcast(); + console.log("Minted amount:", amount); + console.log("Minted to:", mintTo); + console.log("Token deployed at:", address(t)); + return address(t); + } +} diff --git a/protocol/script/GrantRoles.s.sol b/protocol/script/GrantRoles.s.sol new file mode 100644 index 00000000..37754045 --- /dev/null +++ b/protocol/script/GrantRoles.s.sol @@ -0,0 +1,18 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.20; + +import {Script} from "forge-std/Script.sol"; +import {console} from "forge-std/console.sol"; +import {WrappedToken} from "pod-protocol/WrappedToken.sol"; + +contract GrantRoles is Script { + function run(address token, address admin) external { + vm.startBroadcast(); + WrappedToken t = WrappedToken(token); + t.grantRole(t.MINTER_ROLE(), admin); + t.grantRole(t.PAUSER_ROLE(), admin); + t.grantRole(t.DEFAULT_ADMIN_ROLE(), admin); + vm.stopBroadcast(); + console.log("Granted roles to:", admin); + } +} diff --git a/protocol/script/deploy_bridges.bash b/protocol/script/deploy_bridges.bash new file mode 100755 index 00000000..c628f19c --- /dev/null +++ b/protocol/script/deploy_bridges.bash @@ -0,0 +1,126 @@ +#!/usr/bin/env bash +set -euo pipefail + +# Usage: +# ./script/deploy_bridges.bash +# ran from protocl folder to grab the .env file + + +source .env +# Required env vars +: "${SOURCE_CHAIN_RPC:?}" # e.g. http://127.0.0.1:8546 or Sepolia RPC +: "${POD_RPC:?}" # Pod RPC +: "${PK_SOURCE_CHAIN:?}" # Anvil/Sepolia deployer private key +: "${PK_POD:?}" # Pod deployer private key +: "${USER_ADDRESS:?}" # Receiver on Anvil/Sepolia for initial mint +: "${USER_PRIVATE_KEY:?}" # User private key +: "${POD_COMMITTEE_KEYS:?}" # Pod committee keys + +echo "SOURCE_CHAIN_RPC: $SOURCE_CHAIN_RPC" +echo "POD_RPC: $POD_RPC" +echo "PK_SOURCE_CHAIN: $PK_SOURCE_CHAIN" +echo "PK_POD: $PK_POD" +echo "USER_ADDRESS: $USER_ADDRESS" + +# Optional (defaults) +: "${SOURCE_CHAIN_ID:=31337}" # set to 11155111 for Sepolia + +# Token params +: "${TOKEN_NAME:=Test Token}" +: "${TOKEN_SYMBOL:=TEST}" +: "${MIRROR_SYMBOL:=pwTEST}" +: "${MIRROR_TOKEN_NAME:=Pod Wrapped Test Token}" +: "${DECIMALS:=18}" +: "${MINT_AMOUNT:=100000000000000000000}" # 10e18 + +# Limits +: "${NATIVE_MIN:=10000000000000000}" # 0.01 ether +: "${NATIVE_DEP:=500000000000000000000}" # 500e18 +: "${NATIVE_CLA:=500000000000000000000}" # 500e18 +: "${TOKEN_MIN:=10000000000000000}" # 0.01e18 +: "${TOKEN_DEP:=1000000000000000000000}" # 100e18 +: "${TOKEN_CLA:=1000000000000000000000}" # 100e18 + + +# 1) Deploy test ERC20 on Source chain (Anvil/Sepolia) and mint to user +SOURCE_CHAIN_TOKEN_ADDR=$(forge script ./script/DeployToken.s.sol:DeployToken \ + --rpc-url "$SOURCE_CHAIN_RPC" --private-key "$PK_SOURCE_CHAIN" --broadcast --slow \ + --json \ + --sig "run(string,string,uint8,address,uint256)" \ + "$TOKEN_NAME" "$TOKEN_SYMBOL" "$DECIMALS" "$USER_ADDRESS" "$MINT_AMOUNT" \ + | jq -sr 'map(.returns?.token?.value // empty) | map(select(. != "")) | last') +echo "Source chain token: $SOURCE_CHAIN_TOKEN_ADDR" + +# 2) Deploy Mirror token on Pod +POD_TOKEN_ADDR=$(forge script ./script/DeployToken.s.sol:DeployToken \ + --rpc-url "$POD_RPC" --private-key "$PK_POD" --broadcast --slow \ + --json \ + --sig "run(string,string,uint8,address,uint256)" \ + "$TOKEN_NAME" "$MIRROR_SYMBOL" "$DECIMALS" "$USER_ADDRESS" "$MINT_AMOUNT" \ + | jq -sr 'map(.returns?.token?.value // empty) | map(select(. != "")) | last') +echo "Pod token: $POD_TOKEN_ADDR" + +sleep 1 + +# Compute addresses for next CREATE +SOURCE_CHAIN_DEPLOYER=$(cast wallet address --private-key "$PK_SOURCE_CHAIN") +POD_DEPLOYER=$(cast wallet address --private-key "$PK_POD") +SOURCE_CHAIN_NONCE=$(cast nonce "$SOURCE_CHAIN_DEPLOYER" --rpc-url "$SOURCE_CHAIN_RPC") +POD_NONCE=$(cast nonce "$POD_DEPLOYER" --rpc-url "$POD_RPC") +SOURCE_CHAIN_BRIDGE_ADDR=$(cast compute-address "$SOURCE_CHAIN_DEPLOYER" --nonce "$(($SOURCE_CHAIN_NONCE + 3))" | grep -oE '0x[0-9a-fA-F]{40}') +POD_BRIDGE_ADDR=$(cast compute-address "$POD_DEPLOYER" --nonce "$(($POD_NONCE + 1))" | grep -oE '0x[0-9a-fA-F]{40}') + +echo "Precomputed:" +echo " Source chain BridgeDepositWithdraw -> $SOURCE_CHAIN_BRIDGE_ADDR" +echo " Pod BridgeMintBurn -> $POD_BRIDGE_ADDR" + +# 3) Deploy BridgeMintBurn on Pod and configure a test token, pointing to precomputed Anvil bridge address +forge script ./script/DeployMintBurn.s.sol:DeployMintBurn \ + --rpc-url "$POD_RPC" --private-key "$PK_POD" --broadcast --slow --skip-simulation \ + --sig "run(address,(uint256,uint256,uint256),uint96,string,string,address,address,uint8)" \ + "$SOURCE_CHAIN_BRIDGE_ADDR" "($NATIVE_MIN,$NATIVE_DEP,$NATIVE_CLA)" "$SOURCE_CHAIN_ID" "$TOKEN_NAME" "$TOKEN_SYMBOL" "$POD_TOKEN_ADDR" "$SOURCE_CHAIN_TOKEN_ADDR" "$DECIMALS" \ + -vvv + +# 4) Deploy BridgeDepositWithdraw on Source chain (Anvil/Sepolia) and configure a test token, pointing to precomputed Pod bridge address. +forge script ./script/DeployDepositWithdraw.s.sol:DeployDepositWithdraw \ + --rpc-url "$SOURCE_CHAIN_RPC" --private-key "$PK_SOURCE_CHAIN" --broadcast --slow --skip-simulation \ + --sig "run(address,(uint256,uint256,uint256),address,address)" \ + "$POD_BRIDGE_ADDR" "($NATIVE_MIN,$NATIVE_DEP,$NATIVE_CLA)" "$SOURCE_CHAIN_TOKEN_ADDR" "$POD_TOKEN_ADDR" \ + -vvv + + +# 5) Grant roles to BridgeMintBurn +forge script ./script/GrantRoles.s.sol:GrantRoles \ + --rpc-url "$POD_RPC" --private-key "$PK_POD" --broadcast --slow --skip-simulation \ + --sig "run(address,address)" \ + "$POD_TOKEN_ADDR" "$POD_BRIDGE_ADDR" \ + -vvv + + +# 6) Fund user on Pod and Source chain +cast send --rpc-url "$POD_RPC" --private-key "$PK_POD" --value "$MINT_AMOUNT" "$USER_ADDRESS" +cast send --rpc-url "$SOURCE_CHAIN_RPC" --private-key "$PK_SOURCE_CHAIN" --value "$MINT_AMOUNT" "$USER_ADDRESS" + +# 7) Call approve from user private key on bridge for amount of tokens +cast send $POD_TOKEN_ADDR "approve(address,uint256)" --rpc-url "$POD_RPC" --private-key "$USER_PRIVATE_KEY" "$POD_BRIDGE_ADDR" "$MINT_AMOUNT" +cast send $SOURCE_CHAIN_TOKEN_ADDR "approve(address,uint256)" --rpc-url "$SOURCE_CHAIN_RPC" --private-key "$USER_PRIVATE_KEY" "$SOURCE_CHAIN_BRIDGE_ADDR" "$MINT_AMOUNT" + + +# 8) Show codes to confirm deployment when debugging +echo "Codes:" +echo " Source Chain BridgeDepositWithdraw code bytes: $(cast code $SOURCE_CHAIN_BRIDGE_ADDR --rpc-url $SOURCE_CHAIN_RPC | wc -c)" +echo " Pod BridgeMintBurn code bytes: $(cast code $POD_BRIDGE_ADDR --rpc-url $POD_RPC | wc -c)" +echo " Source Chain Token code bytes: $(cast code $SOURCE_CHAIN_TOKEN_ADDR --rpc-url $SOURCE_CHAIN_RPC | wc -c)" +echo " Pod Mirror Token code bytes: $(cast code $POD_TOKEN_ADDR --rpc-url $POD_RPC | wc -c)" + +# Expected values: +# Source Chain BridgeDepositWithdraw code bytes: 26453 +# Pod BridgeMintBurn code bytes: 49063 +# Source Chain Token code bytes: 13225 +# Pod Mirror Token code bytes: 13225 + +echo "Done." +echo "Source Chain BridgeDepositWithdraw: $SOURCE_CHAIN_BRIDGE_ADDR" +echo "Pod BridgeMintBurn: $POD_BRIDGE_ADDR" +echo "Source Chain Token: $SOURCE_CHAIN_TOKEN_ADDR" +echo "Pod Mirror Token: $POD_TOKEN_ADDR" \ No newline at end of file diff --git a/protocol/src/BridgeDepositWithdraw.sol b/protocol/src/BridgeDepositWithdraw.sol new file mode 100644 index 00000000..a48fe8d7 --- /dev/null +++ b/protocol/src/BridgeDepositWithdraw.sol @@ -0,0 +1,168 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.20; + +import {IBridgeDepositWithdraw} from "pod-protocol/interfaces/IBridgeDepositWithdraw.sol"; +import {Bridge} from "pod-protocol/abstract/Bridge.sol"; +import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol"; +import {SafeERC20} from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; +import {PodECDSA} from "pod-sdk/verifier/PodECDSA.sol"; +import {IPodRegistry} from "pod-protocol/interfaces/IPodRegistry.sol"; + +/** + * @title BridgeDepositWithdraw + * @notice Implementation of the deposit-withdraw bridge. + * @dev This contract implements the IBridgeDepositWithdraw interface and provides the functionality for + * depositing and withdrawing tokens between chains. + */ +contract BridgeDepositWithdraw is Bridge, IBridgeDepositWithdraw { + using SafeERC20 for IERC20; + + /** + * @dev The PodConfig for the bridge. The config defines the required number + * of signatures to consider a certificate valid and the PodRegistry to use. + */ + PodECDSA.PodConfig public podConfig; + + /** + * @dev The index of the next deposit. + */ + uint256 public depositIndex; + + /** + * @dev Constructor. + * @param _podRegistry The address of the PodRegistry to use. + */ + constructor(address _podRegistry, address _bridgeContract, TokenLimits memory nativeTokenLimits) + Bridge(_bridgeContract, nativeTokenLimits) + { + podConfig = + PodECDSA.PodConfig({thresholdNumerator: 2, thresholdDenominator: 3, registry: IPodRegistry(_podRegistry)}); + } + + /** + * @dev Decodes the log into the deposit details. + * @param log The log to decode. + * @return id The id of the deposit. + * @return token The token of the deposit. + * @return amount The amount of the deposit. + * @return to The address to send the tokens to. + */ + function _decodeDepositLog(PodECDSA.Log calldata log) + internal + pure + returns (uint256 id, address token, uint256 amount, address to) + { + if (log.topics[0] != DEPOSIT_TOPIC_0 || log.topics.length != 3) { + revert InvalidDepositLog(); + } + id = uint256(log.topics[1]); + token = address(uint160(uint256(log.topics[2]))); + (amount, to) = abi.decode(log.data, (uint256, address)); + } + + /** + * @dev Decodes the log into native deposit details. + * @param log The log to decode. + * @return id The id of the deposit. + * @return amount The amount of the deposit. + * @return to The address to send the tokens to. + */ + function _decodeDepositNativeLog(PodECDSA.Log calldata log) + internal + pure + returns (uint256 id, uint256 amount, address to) + { + if (log.topics[0] != DEPOSIT_NATIVE_TOPIC_0 || log.topics.length != 2) { + revert InvalidDepositLog(); + } + id = uint256(log.topics[1]); + (amount, to) = abi.decode(log.data, (uint256, address)); + } + + /** + * @dev Handles the deposit of tokens. The tokens are transferred from the msg.sender to the contract. + * @param token The token to deposit. + * @param amount The amount of tokens to deposit. + */ + function handleDeposit(address token, uint256 amount) internal override { + IERC20(token).safeTransferFrom(msg.sender, address(this), amount); + } + + /** + * @dev Internal function to get the deposit ID. + * @return id The request ID of the deposit. + */ + function _getDepositId() internal override returns (uint256) { + return depositIndex++; + } + + /** + * @dev Handles the migration of tokens. The tokens are transferred from the contract to the new contract. + * @param _newContract The address of the new contract. + */ + function handleMigrate(address _newContract) internal override { + for (uint256 i = 0; i < whitelistedTokens.length; i++) { + address token = whitelistedTokens[i]; + uint256 tokenBalance = IERC20(token).balanceOf(address(this)); + if (tokenBalance > 0) { + IERC20(token).safeTransfer(_newContract, tokenBalance); + } + } + } + + /** + * @inheritdoc IBridgeDepositWithdraw + */ + function claim(PodECDSA.CertifiedLog calldata certifiedLog) public override whenNotPaused { + (uint256 id, address token, uint256 amount, address to) = _decodeDepositLog(certifiedLog.log); + address mirrorToken = mirrorTokens[token]; + if (mirrorToken == address(0)) revert MirrorTokenNotFound(); + + if (!_isValidTokenAmount(mirrorToken, amount, false)) revert InvalidTokenAmount(); + + bytes32 requestId = _hashRequest(id, token, amount, to); + if (processedRequests[requestId]) revert RequestAlreadyProcessed(); + + if (certifiedLog.log.addr != bridgeContract) revert InvalidBridgeContract(); + + bool verified = PodECDSA.verifyCertifiedLog(podConfig, certifiedLog); + if (!verified) revert InvalidCertificate(); + + processedRequests[requestId] = true; + + IERC20(mirrorToken).safeTransfer(to, amount); + emit Claim(id, mirrorToken, token, amount, to); + } + + /** + * @inheritdoc IBridgeDepositWithdraw + */ + function claimNative(PodECDSA.CertifiedLog calldata certifiedLog) public override whenNotPaused { + (uint256 id, uint256 amount, address to) = _decodeDepositNativeLog(certifiedLog.log); + + if (!_isValidTokenAmount(MOCK_ADDRESS_FOR_NATIVE_DEPOSIT, amount, false)) revert InvalidTokenAmount(); + + bytes32 requestId = _hashRequest(id, address(0), amount, to); + if (processedRequests[requestId]) revert RequestAlreadyProcessed(); + + if (certifiedLog.log.addr != bridgeContract) revert InvalidBridgeContract(); + + bool verified = PodECDSA.verifyCertifiedLog(podConfig, certifiedLog); + if (!verified) revert InvalidCertificate(); + + processedRequests[requestId] = true; + + payable(to).transfer(amount); + emit ClaimNative(id, amount, to); + } + + /** + * @inheritdoc IBridgeDepositWithdraw + */ + function whiteListToken(address token, address mirrorToken, TokenLimits calldata limits) + external + onlyRole(DEFAULT_ADMIN_ROLE) + { + _whitelistToken(token, mirrorToken, limits); + } +} diff --git a/protocol/src/BridgeMintBurn.sol b/protocol/src/BridgeMintBurn.sol new file mode 100644 index 00000000..c10f7b00 --- /dev/null +++ b/protocol/src/BridgeMintBurn.sol @@ -0,0 +1,180 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.20; + +import {IBridgeMintBurn} from "pod-protocol/interfaces/IBridgeMintBurn.sol"; +import {Bridge} from "pod-protocol/abstract/Bridge.sol"; +import {IAccessControl} from "@openzeppelin/contracts/access/IAccessControl.sol"; +import {IERC20MintableAndBurnable} from "pod-protocol/interfaces/IERC20MintableAndBurnable.sol"; +import {WrappedToken} from "pod-protocol/WrappedToken.sol"; +import {EthGetLogsTypes} from "pod-sdk/types/EthGetLogsTypes.sol"; +import {PodPrecompileHelper} from "pod-protocol/libraries/PodPrecompileHelper.sol"; + +/** + * @title BridgeMintBurn + * @notice Implementation of the mint-burn bridge. + * @dev This contract implements the IBridgeMintBurn interface and provides the functionality for + * minting and burning tokens between chains. + */ +contract BridgeMintBurn is Bridge, IBridgeMintBurn { + /** + * @dev The role for the minter. + */ + bytes32 constant MINTER_ROLE = keccak256("MINTER_ROLE"); + + /** + * @dev The source chain id. + */ + uint96 immutable SOURCE_CHAIN_ID; + + uint256 constant ANVIL_CHAIN_ID = 31337; + + /** + * @dev "finalized" as bytes, or "latest" for anvil + */ + bytes block_tag_bytes; + + /** + * @dev Constructor. + */ + constructor(address _bridgeContract, TokenLimits memory nativeTokenLimits, uint96 _sourceChainId) + Bridge(_bridgeContract, nativeTokenLimits) + { + SOURCE_CHAIN_ID = _sourceChainId; + if (SOURCE_CHAIN_ID == ANVIL_CHAIN_ID) { + block_tag_bytes = hex"6c6174657374"; // "latest" because anvil doesn't supporrt "finalized" + } else { + block_tag_bytes = hex"66696e616c697a6564"; + } + } + + /** + * @dev Handles the deposit of tokens. The tokens are burned from the msg.sender. + * @param token The token to deposit. + * @param amount The amount of tokens to deposit. + */ + function handleDeposit(address token, uint256 amount) internal override { + IERC20MintableAndBurnable(token).burnFrom(msg.sender, amount); + } + + /** + * @dev Internal function to get the deposit ID. + * @return id The request ID of the deposit. + */ + function _getDepositId() internal view override returns (uint256) { + return PodPrecompileHelper.getTxHash(); + } + + /** + * @inheritdoc IBridgeMintBurn + */ + function claim(uint256 id, address token, uint256 blockNumber) external override whenNotPaused { + bytes32[] memory topics = new bytes32[](3); + topics[0] = DEPOSIT_TOPIC_0; + topics[1] = bytes32(id); + topics[2] = bytes32(uint256(uint160(token))); + + uint256 finalizedBlockNumber = PodPrecompileHelper.getBlockByBlockTag(SOURCE_CHAIN_ID, block_tag_bytes); + + if (blockNumber > finalizedBlockNumber) { + revert BlockNotFinalized(); + } + + address mirrorToken = mirrorTokens[token]; + if (mirrorToken == address(0)) revert MirrorTokenNotFound(); + + (uint256 decodedAmount, address decodedTo, bytes32 requestId) = _claim(id, token, blockNumber, topics); + + if (!_isValidTokenAmount(mirrorToken, decodedAmount, false)) revert InvalidTokenAmount(); + + bool isProcessed = processedRequests[requestId]; + + processedRequests[requestId] = true; + + if (!isProcessed) { + IERC20MintableAndBurnable(mirrorToken).mint(decodedTo, decodedAmount); + emit Claim(id, mirrorToken, token, decodedAmount, decodedTo); + } + } + + function _claim(uint256 id, address token, uint256 blockNumber, bytes32[] memory topics) + internal + view + returns (uint256 decodedAmount, address decodedTo, bytes32 requestId) + { + EthGetLogsTypes.RpcLog[] memory logs = + PodPrecompileHelper.getLogs(SOURCE_CHAIN_ID, blockNumber, topics, bridgeContract); + + if (logs.length != 1) revert InvalidDepositLog(); + + //redunatnt check for extra security, can be removed for gas purposes. + // if (logs[0].addr != bridgeContract) revert InvalidBridgeContract(); + + (decodedAmount, decodedTo) = abi.decode(logs[0].data, (uint256, address)); + requestId = _hashRequest(id, token, decodedAmount, decodedTo); + } + + /** + * @inheritdoc IBridgeMintBurn + */ + function claimNative(uint256 id, uint256 blockNumber) external override whenNotPaused { + bytes32[] memory topics = new bytes32[](2); + topics[0] = DEPOSIT_NATIVE_TOPIC_0; + topics[1] = bytes32(id); + + uint256 finalizedBlockNumber = PodPrecompileHelper.getBlockByBlockTag(SOURCE_CHAIN_ID, block_tag_bytes); + + if (blockNumber > finalizedBlockNumber) { + revert BlockNotFinalized(); + } + + (uint256 decodedAmount, address decodedTo, bytes32 requestId) = _claim(id, address(0), blockNumber, topics); + + if (!_isValidTokenAmount(MOCK_ADDRESS_FOR_NATIVE_DEPOSIT, decodedAmount, false)) revert InvalidTokenAmount(); + + bool isProcessed = processedRequests[requestId]; + + processedRequests[requestId] = true; + + // mint the native tokens to msg.sender + if (!isProcessed) { + // TODO: need to modify this to mint to decodedTo instead of msg.sender + if (!PodPrecompileHelper.mint(decodedAmount)) revert PrecompileCallFailed(); + + emit ClaimNative(id, decodedAmount, decodedTo); + } + } + + /** + * @dev Handles the migration of tokens. The tokens and roles are transferred from the contract to the new contract. + * @param _newContract The address of the new contract. + */ + function handleMigrate(address _newContract) internal override { + for (uint256 i = 0; i < whitelistedTokens.length; i++) { + address token = whitelistedTokens[i]; + IAccessControl(token).grantRole(DEFAULT_ADMIN_ROLE, _newContract); + IAccessControl(token).grantRole(MINTER_ROLE, _newContract); + IAccessControl(token).grantRole(PAUSER_ROLE, _newContract); + + IAccessControl(token).renounceRole(DEFAULT_ADMIN_ROLE, address(this)); + IAccessControl(token).renounceRole(MINTER_ROLE, address(this)); + IAccessControl(token).renounceRole(PAUSER_ROLE, address(this)); + } + } + + /** + * @inheritdoc IBridgeMintBurn + */ + function createAndWhitelistMirrorToken( + string memory tokenName, + string memory tokenSymbol, + address existingToken, + address mirrorToken, + uint8 mirrorTokenDecimals, + TokenLimits calldata limits + ) external override onlyRole(DEFAULT_ADMIN_ROLE) returns (address token) { + token = existingToken == address(0) + ? address(new WrappedToken(tokenName, tokenSymbol, mirrorTokenDecimals)) + : existingToken; + _whitelistToken(token, mirrorToken, limits); + } +} diff --git a/protocol/src/WrappedToken.sol b/protocol/src/WrappedToken.sol new file mode 100644 index 00000000..3b4bb513 --- /dev/null +++ b/protocol/src/WrappedToken.sol @@ -0,0 +1,86 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.20; + +import {ERC20Burnable} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Burnable.sol"; +import {ERC20Pausable} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Pausable.sol"; +import {AccessControl} from "@openzeppelin/contracts/access/AccessControl.sol"; +import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol"; + +/** + * @title WrappedToken + * @notice A contract for wrapping and unwrapping tokens. + * @dev This contract is used to wrap and unwrap tokens between chains. + */ +contract WrappedToken is ERC20Burnable, ERC20Pausable, AccessControl { + /** + * @dev The role for the minter. + */ + bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE"); + + /** + * @dev The role for the pauser. + */ + bytes32 public constant PAUSER_ROLE = keccak256("PAUSER_ROLE"); + + /** + * @dev The number of decimals of the token. + */ + uint8 private immutable DECIMALS; + + /** + * @dev Constructor. + * @param name_ The name of the token. + * @param symbol_ The symbol of the token. + * @param decimals_ The number of decimals of the token. + */ + constructor(string memory name_, string memory symbol_, uint8 decimals_) ERC20(name_, symbol_) { + DECIMALS = decimals_; + _grantRole(DEFAULT_ADMIN_ROLE, msg.sender); + _grantRole(PAUSER_ROLE, msg.sender); + _grantRole(MINTER_ROLE, msg.sender); + } + + /** + * @inheritdoc ERC20 + */ + function decimals() public view override returns (uint8) { + return DECIMALS; + } + + /** + * @dev Mints tokens to an address. + * @dev Will revert when paused because ERC20Pausable guards _update + * @notice Access is restricted to the minter role. + * @param to The address to mint tokens to. + * @param amount The amount of tokens to mint. + */ + function mint(address to, uint256 amount) external onlyRole(MINTER_ROLE) { + _mint(to, amount); + } + + /** + * @dev Pauses the contract + * @notice Access is restricted to the pauser role. + */ + function pause() external onlyRole(PAUSER_ROLE) { + _pause(); + } + + /** + * @dev Unpauses the contract + * @notice Access is restricted to the admin role. + */ + function unpause() external onlyRole(DEFAULT_ADMIN_ROLE) { + _unpause(); + } + + /** + * @dev Updates the token balance of an address. + * @param from The address to update the balance from. + * @param to The address to update the balance to. + * @param value The amount of tokens to update the balance by. + */ + function _update(address from, address to, uint256 value) internal override(ERC20, ERC20Pausable) whenNotPaused { + super._update(from, to, value); + } +} diff --git a/protocol/src/abstract/Bridge.sol b/protocol/src/abstract/Bridge.sol new file mode 100644 index 00000000..5b847fc1 --- /dev/null +++ b/protocol/src/abstract/Bridge.sol @@ -0,0 +1,265 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.20; + +import {IBridge} from "../interfaces/IBridge.sol"; +import {AccessControl} from "@openzeppelin/contracts/access/AccessControl.sol"; +import {Pausable} from "@openzeppelin/contracts/utils/Pausable.sol"; + +/** + * @title Bridge + * @notice Abstract base contract for cross-chain token bridging implementations. + * @dev This contract implements the IBridge interface and provides common functionality + * for bridging tokens between chains. It serves as a base contract for both + * BridgeMintBurn and BridgeDepositWithdraw concrete implementations. + * + * The contract uses the Template Method design pattern (https://refactoring.guru/design-patterns/template-method) + * where the core deposit and migrate functions are implemented here, but delegate specific token handling logic to + * the callback functions (handleDeposit and handleMigrate) that must be implemented by concrete contracts. + */ +abstract contract Bridge is IBridge, AccessControl, Pausable { + /** + * @dev The role ID for addresses that can pause the contract. + */ + bytes32 public constant PAUSER_ROLE = keccak256("PAUSER_ROLE"); + + /** + * @dev The topic 0 (event signature) of the deposit event. + */ + bytes32 constant DEPOSIT_TOPIC_0 = keccak256("Deposit(uint256,address,uint256,address)"); + + /** + * @dev The topic 0 (event signature) of the deposit native event. + */ + bytes32 constant DEPOSIT_NATIVE_TOPIC_0 = keccak256("DepositNative(uint256,uint256,address)"); + + /** + * @dev The mock address for native deposit. + */ + address constant MOCK_ADDRESS_FOR_NATIVE_DEPOSIT = + address(uint160(uint256(keccak256("MOCK_ADDRESS_FOR_NATIVE_DEPOSIT")))); + + /** + * @dev Map token address to token data. + */ + mapping(address => TokenData) public tokenData; + + /** + * @dev Map source chain token address to destination chain token address. + */ + mapping(address => address) public mirrorTokens; + + /** + * @dev Map request hash to processed requests. + */ + mapping(bytes32 => bool) public processedRequests; + + /** + * @dev Array of all the whitelisted tokens. + * @notice A token in the list can be disabled. + */ + address[] public whitelistedTokens; + + /** + * @dev Map nonce to used nonces. + */ + mapping(uint256 => bool) public usedNonces; + + /** + * @dev Address of the migrated contract. + */ + address public migratedContract; + + /** + * @dev The address of the bridge contract on the other chain. + */ + address public bridgeContract; + + /** + * @dev Constructor. + * @notice Grants the DEFAULT_ADMIN_ROLE and PAUSER_ROLE to the msg.sender. + */ + constructor(address _bridgeContract, TokenLimits memory nativeTokenLimits) { + if (_bridgeContract == address(0)) revert InvalidBridgeContract(); + _grantRole(DEFAULT_ADMIN_ROLE, msg.sender); + _grantRole(PAUSER_ROLE, msg.sender); + bridgeContract = _bridgeContract; + _configureTokenData(MOCK_ADDRESS_FOR_NATIVE_DEPOSIT, nativeTokenLimits, true); + } + + /** + * @dev Internal function to handle the deposit of tokens. + * This is a callback defining the different token handling logic for the different bridge contracts. + * @param token The token to deposit. + * @param amount The amount of tokens to deposit. + */ + function handleDeposit(address token, uint256 amount) internal virtual; + + /** + * @dev Internal function to get the deposit ID. + * This is a callback defining the different deposit ID logic for the different bridge contracts. + * @return id The request ID of the deposit. + */ + function _getDepositId() internal virtual returns (uint256); + + /** + * @dev Internal function to handle the migration of tokens. + * This is a callback defining the different token handling logic for the different bridge contracts. + * @param _newContract The address of the new contract. + */ + function handleMigrate(address _newContract) internal virtual; + + /** + * @dev Modifier to check that contract has not been migrated. + * @dev Reverts with ContractMigrated if the contract has already been migrated. + */ + modifier notMigrated() { + if (migratedContract != address(0)) { + revert ContractMigrated(); + } + _; + } + + /** + * @dev Internal function to check if the token amount is valid. + * @param token The token to check. + * @param amount The amount of tokens to check. + * @param isDeposit Whether the amount is for a deposit or a claim. + * @return True if the token amount is valid, false otherwise. + * @dev Reverts with DailyLimitExhausted if the daily token deposit or claim limit is exhausted. + */ + function _isValidTokenAmount(address token, uint256 amount, bool isDeposit) internal returns (bool) { + TokenData storage t = tokenData[token]; + + if (t.limits.minAmount == 0 || amount < t.limits.minAmount) { + return false; + } + + if (isDeposit) { + if (block.timestamp >= t.deposit.lastUpdated + 1 days) { + t.deposit.lastUpdated = block.timestamp; + t.deposit.consumed = 0; + } + + if (t.deposit.consumed + amount > t.limits.deposit) { + revert DailyLimitExhausted(); + } + t.deposit.consumed += amount; + } else if (!isDeposit) { + if (block.timestamp >= t.claim.lastUpdated + 1 days) { + t.claim.lastUpdated = block.timestamp; + t.claim.consumed = 0; + } + + if (t.claim.consumed + amount > t.limits.claim) { + revert DailyLimitExhausted(); + } + t.claim.consumed += amount; + } + return true; + } + + /** + * @inheritdoc IBridge + */ + function deposit(address token, uint256 amount, address to) external override whenNotPaused returns (uint256) { + if (!_isValidTokenAmount(token, amount, true)) revert InvalidTokenAmount(); + if (to == address(0)) revert InvalidToAddress(); + uint256 id = _getDepositId(); + handleDeposit(token, amount); + emit Deposit(id, token, amount, to); + return id; + } + + /** + * @inheritdoc IBridge + */ + function depositNative(address to) external payable override whenNotPaused returns (uint256) { + if (!_isValidTokenAmount(MOCK_ADDRESS_FOR_NATIVE_DEPOSIT, msg.value, true)) revert InvalidTokenAmount(); + uint256 id = _getDepositId(); + emit DepositNative(id, msg.value, to); + return id; + } + + /** + * @dev Internal function to hash a request. + * @param id The request index. + * @param token The token to hash. + * @param amount The amount of tokens to hash. + * @param to The address to hash. + * @return hash The hash of the request used for uniquely identifying a bridging request. + */ + function _hashRequest(uint256 id, address token, uint256 amount, address to) internal pure returns (bytes32 hash) { + assembly { + let ptr := mload(0x40) + mstore(ptr, id) + mstore(add(ptr, 0x20), shl(96, token)) + mstore(add(ptr, 0x34), amount) + mstore(add(ptr, 0x54), shl(96, to)) + hash := keccak256(ptr, 0x68) + } + } + + /** + * @dev Internal function to configure the token data. + * @param token The token to configure. + * @param limits The token limits to configure. + * @param newToken Whether the token is new. + */ + function _configureTokenData(address token, TokenLimits memory limits, bool newToken) internal { + uint256 currMinAmount = tokenData[token].limits.minAmount; + if (limits.minAmount == 0 || (newToken ? currMinAmount != 0 : currMinAmount == 0)) { + revert InvalidTokenConfig(); + } + + TokenUsage memory depositUsage = TokenUsage(0, block.timestamp); + TokenUsage memory claimUsage = TokenUsage(0, block.timestamp); + + TokenData memory data = TokenData(limits, depositUsage, claimUsage); + tokenData[token] = data; + } + + /** + * @inheritdoc IBridge + */ + function configureToken(address token, TokenLimits memory limits) external onlyRole(DEFAULT_ADMIN_ROLE) { + _configureTokenData(token, limits, false); + } + + /** + * @dev Internal function to whitelist a new token. + * @param token Token that will be deposited in the contract. + * @param mirrorToken Token that will be deposited in the mirror contract. + * @param limits Token limits associated with the token. + */ + function _whitelistToken(address token, address mirrorToken, TokenLimits memory limits) internal { + if (mirrorTokens[mirrorToken] != address(0)) { + revert InvalidTokenConfig(); + } + + _configureTokenData(token, limits, true); + whitelistedTokens.push(token); + mirrorTokens[mirrorToken] = token; + } + + /** + * @inheritdoc IBridge + */ + function pause() external onlyRole(PAUSER_ROLE) { + _pause(); + } + + /** + * @inheritdoc IBridge + */ + function unpause() external notMigrated onlyRole(DEFAULT_ADMIN_ROLE) { + _unpause(); + } + + /** + * @inheritdoc IBridge + */ + function migrate(address _newContract) public whenPaused notMigrated onlyRole(DEFAULT_ADMIN_ROLE) { + handleMigrate(_newContract); + migratedContract = _newContract; + } +} diff --git a/protocol/src/interfaces/IBridge.sol b/protocol/src/interfaces/IBridge.sol new file mode 100644 index 00000000..09f32aca --- /dev/null +++ b/protocol/src/interfaces/IBridge.sol @@ -0,0 +1,196 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.20; + +/** + * @title IBridge + * @notice Interface for cross-chain token bridging contracts. + * @dev This interface defines the standard contract for bridging tokens between chains. + * It is implemented by the Bridge abstract contract and it standardizes an API + * for the shared bridge functionality. + */ +interface IBridge { + /** + * @dev Error thrown when attempting to perform operations on an already migrated contract. + */ + error ContractMigrated(); + + /** + * @dev Error thrown when the provided token amount is invalid (below minimum or exceeds limits). + */ + error InvalidTokenAmount(); + + /** + * @dev Error thrown when the destination address is zero or invalid. + */ + error InvalidToAddress(); + + /** + * @dev Error thrown when the token configuration is invalid. + */ + error InvalidTokenConfig(); + + /** + * @dev Error thrown when the daily deposit or claim limit for a token has been exceeded. + */ + error DailyLimitExhausted(); + + /** + * @dev Error thrown when attempting to process a claim for a token that has no mirror token mapping. + */ + error MirrorTokenNotFound(); + + /** + * @dev Error thrown when attempting to process a request that has already been processed. + */ + error RequestAlreadyProcessed(); + + /** + * @dev Error thrown when the bridge contract is invalid. + */ + error InvalidBridgeContract(); + + /** + * @dev Error thrown when the deposit log is invalid. + */ + error InvalidDepositLog(); + + /** + * @dev Error thrown when the nonce is invalid. + */ + error InvalidNonce(); + + /** + * @dev Event emitted when a deposit is made. + * @param id The request index. + * @param token The token to bridge. + * @param amount The amount of tokens to bridge. + * @param to The address to send the tokens to. + */ + event Deposit(uint256 indexed id, address indexed token, uint256 amount, address to); + + /** + * @dev Event emitted when a native deposit is made. + * @param id The request index. + * @param amount The amount of native tokens to bridge. + * @param to The address to send the native tokens to. + */ + event DepositNative(uint256 indexed id, uint256 amount, address to); + + /** + * @dev Event emitted when a claim is made. + * @param id The request index. + * @param mirrorToken The token on the source chain. + * @param token The token on the destination chain. + * @param amount The amount of tokens to bridge. + * @param to The address to send the tokens to. + */ + event Claim(uint256 indexed id, address indexed mirrorToken, address indexed token, uint256 amount, address to); + + /** + * @dev Event emitted when a native claim is made. + * @param id The request index. + * @param amount The amount of native tokens to bridge. + * @param to The address to send the native tokens to. + */ + event ClaimNative(uint256 indexed id, uint256 amount, address to); + + /** + * @dev Token limits. + * @param minAmount The minimum amount of tokens that can be deposited. + * @param deposit The daily deposit limit for the token. + * @param claim The daily claim limit for the token. + */ + struct TokenLimits { + uint256 minAmount; + uint256 deposit; + uint256 claim; + } + + /** + * @dev Token usage. + * @param consumed The amount of tokens that have been used. + * @param lastUpdated The timestamp when the consumed limits were last updated. + */ + struct TokenUsage { + uint256 consumed; + uint256 lastUpdated; + } + + /** + * @dev Token data. + * @param limits The token limits. + * @param deposit The token usage for deposits. + * @param claim The token usage for claims. + */ + struct TokenData { + TokenLimits limits; + TokenUsage deposit; + TokenUsage claim; + } + + /** + * @dev Request information. + * @param id The request index. + * @param token The token to bridge. + * @param amount The amount of tokens to bridge. + * @param to The address to send the tokens to. + */ + struct RequestInfo { + uint256 id; + address token; + uint256 amount; + address to; + } + + /** + * @dev Update a token's configuration information. + * Token limits need to be set to half the desired value, due to users being able to deposit and claim at the boundry condition. + * If the desired deposit limit is 1000 tokens, the limit should be set to 500 tokens. + * For example, the limits are over the course of 1 day, and the limit reset at 12:00 AM UTC and suppose there are no bridging transactions + * for that day until 11:58 PM UTC. Then a user can deposit the limit amount at 11:59 PM UTC, and then immediately + * deposit the limit amount again at 12:00 AM UTC. + * @notice Token can be disabled by setting deposit and claim limits to zero. + * @notice Access is restricted to the admin. + * @param token The token to configure. + * @param limits The token's new configuration limits. + */ + function configureToken(address token, TokenLimits calldata limits) external; + + /** + * @dev Deposit tokens to bridge to the destination chain. + * @notice Function used to bridge tokens to the destination chain. + * @param token The token to bridge. + * @param amount The amount of tokens to bridge. + * @param to The address to send the tokens to on the destination chain. + * @return id The request index. + */ + function deposit(address token, uint256 amount, address to) external returns (uint256); + + /** + * @dev Deposit native tokens to bridge to the destination chain. + * @notice Function used to bridge native tokens to the destination chain. + * @param to The address to send the native tokens to on the destination chain. + * @return id The request index. + */ + function depositNative(address to) external payable returns (uint256); + + /** + * @dev Pauses the contract. + * @notice Access control is restricted to the pause role. + */ + function pause() external; + + /** + * @dev Unpauses the contract. + * @notice Access control is restricted to the admin. + */ + function unpause() external; + + /** + * @dev Migrates the contract to a new address. + * @param _newContract Address of the new contract. + * @notice Access control is restricted to the admin. + * @notice Migration can only be done once on this contract + */ + function migrate(address _newContract) external; +} diff --git a/protocol/src/interfaces/IBridgeDepositWithdraw.sol b/protocol/src/interfaces/IBridgeDepositWithdraw.sol new file mode 100644 index 00000000..a8bdb475 --- /dev/null +++ b/protocol/src/interfaces/IBridgeDepositWithdraw.sol @@ -0,0 +1,37 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.20; + +import {IBridge} from "./IBridge.sol"; +import {PodECDSA} from "pod-sdk/verifier/PodECDSA.sol"; + +/** + * @title IBridgeDepositWithdraw + * @notice Interface for deposit-withdraw bridge implementation. + * @dev Extends IBridge to add token whitelisting and claiming through certified log verification. + */ +interface IBridgeDepositWithdraw is IBridge { + /** + * @notice Whitelist a token for bridging. + * @param token Source chain token address. + * @param mirrorToken Destination chain token address. + * @param limits Daily limits for deposits and claims. + */ + function whiteListToken(address token, address mirrorToken, TokenLimits calldata limits) external; + + /** + * @notice Claim bridged tokens using a certified log proof. + * @param certifiedLog The proof of the deposit represented as a pod certified log. + */ + function claim(PodECDSA.CertifiedLog calldata certifiedLog) external; + + /** + * @notice Claim native tokens using a certified log proof. + * @param certifiedLog The proof of the deposit represented as a pod certified log. + */ + function claimNative(PodECDSA.CertifiedLog calldata certifiedLog) external; + + /** + * @dev Error thrown when the certificate verification fails. + */ + error InvalidCertificate(); +} diff --git a/protocol/src/interfaces/IBridgeMintBurn.sol b/protocol/src/interfaces/IBridgeMintBurn.sol new file mode 100644 index 00000000..c88cb7a6 --- /dev/null +++ b/protocol/src/interfaces/IBridgeMintBurn.sol @@ -0,0 +1,55 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.20; + +import {IBridge} from "./IBridge.sol"; + +/** + * @title IBridgeMintBurn + * @notice Interface for mint-burn bridge implementation. + * @dev Extends IBridge to add token creation and claiming through external precompile verification. + */ +interface IBridgeMintBurn is IBridge { + /** + * @notice Create and whitelist a mirror token for bridging. + * @param tokenName Name of the token to create. + * @param tokenSymbol Symbol of the token to create. + * @param existingToken Address of existing token (0 to create new). + * @param mirrorToken Source chain token address. + * @param mirrorTokenDecimals Decimals of the mirror token. + * @param limits Daily limits for deposits and claims. + * @return Address of the created or existing token. + */ + function createAndWhitelistMirrorToken( + string memory tokenName, + string memory tokenSymbol, + address existingToken, + address mirrorToken, + uint8 mirrorTokenDecimals, + TokenLimits calldata limits + ) external returns (address); + + /** + * @notice Claim bridged tokens using external precompile verification. + * @param id Deposit ID to claim. + * @param token Source chain token address. + * @param blockNumber The block number that contains the log to of the deposit. + */ + function claim(uint256 id, address token, uint256 blockNumber) external; + + /** + * @notice Claim native tokens using external precompile verification. + * @param id Deposit ID to claim. + * @param blockNumber The block number that contains the log to of the native deposit. + */ + function claimNative(uint256 id, uint256 blockNumber) external; + + /** + * @dev Error thrown when the external precompile call fails. + */ + error PrecompileCallFailed(); + + /** + * @dev Error thrown when the block is not finalized. + */ + error BlockNotFinalized(); +} diff --git a/protocol/src/interfaces/IERC20MintableAndBurnable.sol b/protocol/src/interfaces/IERC20MintableAndBurnable.sol new file mode 100644 index 00000000..31358659 --- /dev/null +++ b/protocol/src/interfaces/IERC20MintableAndBurnable.sol @@ -0,0 +1,25 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.20; + +import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol"; + +/** + * @title IERC20MintableAndBurnable + * @notice Interface for ERC20 tokens that can be minted and burned. + * @dev This interface extends the IERC20 interface and adds mint and burn functionality. + */ +interface IERC20MintableAndBurnable is IERC20 { + /** + * @notice Mints tokens to an address. + * @param to The address to mint tokens to. + * @param amount The amount of tokens to mint. + */ + function mint(address to, uint256 amount) external; + + /** + * @notice Burns tokens from an address. + * @param account The address to burn tokens from. + * @param amount The amount of tokens to burn. + */ + function burnFrom(address account, uint256 amount) external; +} diff --git a/protocol/src/libraries/HexUtils.sol b/protocol/src/libraries/HexUtils.sol new file mode 100644 index 00000000..18e79e42 --- /dev/null +++ b/protocol/src/libraries/HexUtils.sol @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.20; + +library HexUtils { + error Empty(); + error InvalidHexChar(uint8 ch, uint256 pos); + error Overflow256(); + + bytes16 private constant _HEX = "0123456789abcdef"; + + /// @notice Parse raw big-endian bytes into uint256 (e.g. 0x01 0x56). + /// @param b The bytes to parse. + /// @return v The parsed uint256. + function uintFromBigEndian(bytes memory b) internal pure returns (uint256 v) { + uint256 len = b.length; + if (len == 0) revert Empty(); + if (len > 32) revert Overflow256(); + for (uint256 i = 0; i < len; ++i) { + v = (v << 8) | uint8(b[i]); + } + } + + /// @notice Minimal big-endian BINARY bytes: 1 -> 0x01, 0 -> 0x00. + /// @param value The value to convert. + /// @return out The converted bytes. + function toBytesMinimal(uint256 value) internal pure returns (bytes memory out) { + if (value == 0) return hex"00"; + uint256 v = value; + uint256 len; + while (v != 0) { + len++; + v >>= 8; + } + out = new bytes(len); + v = value; + for (uint256 i = len; i > 0;) { + out[--i] = bytes1(uint8(v)); + v >>= 8; + } + } +} diff --git a/protocol/src/libraries/PodPrecompileHelper.sol b/protocol/src/libraries/PodPrecompileHelper.sol new file mode 100644 index 00000000..c540af3f --- /dev/null +++ b/protocol/src/libraries/PodPrecompileHelper.sol @@ -0,0 +1,71 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.28; + +import {EthGetLogsTypes} from "pod-sdk/types/EthGetLogsTypes.sol"; +import {EthGetBlockByNumberTypes} from "pod-sdk/types/EthGetBlockByNumberTypes.sol"; +import {TxInfo, POD_TX_INFO} from "pod-sdk/Context.sol"; +import {HexUtils} from "./HexUtils.sol"; + +library PodPrecompileHelper { + error PrecompileCallFailed(); + + /** + * @dev The address of the external pod mint balance precompile. + */ + address constant POD_MINT_BALANCE_PRECOMPILE_ADDRESS = address(uint160(uint256(keccak256("POD_MINT_BALANCE")))); + + /** + * @dev Mints tokens to the caller. + * @param amount The amount of tokens to mint. + * @return success Whether the minting was successful. + */ + function mint(uint256 amount) external view returns (bool) { + (bool success,) = POD_MINT_BALANCE_PRECOMPILE_ADDRESS.staticcall{gas: gasleft()}(abi.encode(amount)); + return success; + } + + /** + * @dev Gets the block by block tag. + * @return blockNumber The block number. + */ + function getBlockByBlockTag(uint256 chainId, bytes memory blockTag) internal view returns (uint256) { + EthGetBlockByNumberTypes.PrecompileArgs memory args = + EthGetBlockByNumberTypes.PrecompileArgs(chainId, EthGetBlockByNumberTypes.RpcArgs(blockTag, false)); + (bool success, bytes memory output) = EthGetBlockByNumberTypes.PRECOMPILE_ADDRESS.staticcall( + abi.encode(args.chainId, args.ethGetBlockByNumberArgs) + ); + if (!success) revert PrecompileCallFailed(); + return HexUtils.uintFromBigEndian(abi.decode(output, (EthGetBlockByNumberTypes.RpcBlock)).number); + } + + /** + * @dev Gets the logs. + * @param blockNumber The block number to get the logs for. + * @param topics The topics to get the logs for. + * @param bridgeContract The bridge contract to get the logs for. + * @return logs The logs. + */ + function getLogs(uint256 chainId, uint256 blockNumber, bytes32[] memory topics, address bridgeContract) + internal + view + returns (EthGetLogsTypes.RpcLog[] memory) + { + bytes memory n = HexUtils.toBytesMinimal(blockNumber); + EthGetLogsTypes.PrecompileArgs memory args = + EthGetLogsTypes.PrecompileArgs(chainId, EthGetLogsTypes.RpcArgs(n, n, bridgeContract, bytes32(0), topics)); + (bool success, bytes memory output) = + EthGetLogsTypes.PRECOMPILE_ADDRESS.staticcall{gas: gasleft()}(abi.encode(args.chainId, args.ethGetLogsArgs)); + if (!success) revert PrecompileCallFailed(); + + EthGetLogsTypes.RpcLog[] memory logs = abi.decode(output, (EthGetLogsTypes.RpcLog[])); + + return logs; + } + + function getTxHash() internal view returns (uint256) { + (bool success, bytes memory output) = POD_TX_INFO.staticcall{gas: gasleft()}(""); + if (!success) revert PrecompileCallFailed(); + TxInfo memory txInfo = abi.decode(output, (TxInfo)); + return uint256(txInfo.txHash); + } +} diff --git a/protocol/test/BridgeDepositWithdraw.t.sol b/protocol/test/BridgeDepositWithdraw.t.sol new file mode 100644 index 00000000..cc3a7404 --- /dev/null +++ b/protocol/test/BridgeDepositWithdraw.t.sol @@ -0,0 +1,445 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.20; + +import {BridgeBehaviorTest} from "./abstract/Bridge.t.sol"; +import {BridgeDepositWithdraw} from "../src/BridgeDepositWithdraw.sol"; +import {IBridgeDepositWithdraw} from "../src/interfaces/IBridgeDepositWithdraw.sol"; +import {IBridge} from "../src/interfaces/IBridge.sol"; +import {Bridge} from "../src/abstract/Bridge.sol"; +import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol"; +import {IPodRegistry} from "../src/interfaces/IPodRegistry.sol"; +import {PodRegistry} from "../src/PodRegistry.sol"; +import {PodECDSA} from "pod-sdk/verifier/PodECDSA.sol"; +import {ECDSA} from "pod-sdk/verifier/ECDSA.sol"; +import {MerkleTree} from "pod-sdk/verifier/MerkleTree.sol"; +import {WrappedToken} from "../src/WrappedToken.sol"; +import {Pausable} from "@openzeppelin/contracts/utils/Pausable.sol"; + +contract BridgeDepositWithdrawTest is BridgeBehaviorTest { + BridgeDepositWithdraw private _bridge; + WrappedToken private _token; + IPodRegistry podRegistry; + uint256[] validatorPrivateKeys; + uint256 constant NUMBER_OF_VALIDATORS = 4; + address immutable MIRROR_TOKEN = makeAddr("mirrorToken"); + address immutable OTHER_BRIDGE_CONTRACT = makeAddr("otherBridgeContract"); + + function bridge() internal view override returns (Bridge) { + return _bridge; + } + + function token() internal view override returns (IERC20) { + return _token; + } + + function setUpSuite() public override { + vm.startPrank(admin); + address[] memory initialValidators = new address[](NUMBER_OF_VALIDATORS); + + validatorPrivateKeys = new uint256[](NUMBER_OF_VALIDATORS); + + for (uint256 i = 0; i < NUMBER_OF_VALIDATORS; i++) { + validatorPrivateKeys[i] = uint256(i + 1); + initialValidators[i] = vm.addr(validatorPrivateKeys[i]); + } + + podRegistry = new PodRegistry(initialValidators); + _bridge = new BridgeDepositWithdraw(address(podRegistry), OTHER_BRIDGE_CONTRACT, nativeTokenLimits); + + _token = new WrappedToken("InitialToken", "ITKN", 18); + _token.mint(user, INITIAL_BALANCE); + _token.mint(admin, INITIAL_BALANCE); + _token.approve(address(_bridge), type(uint256).max); + _bridge.whiteListToken(address(_token), MIRROR_TOKEN, tokenLimits); + + vm.stopPrank(); + + vm.prank(user); + _token.approve(address(_bridge), type(uint256).max); + } + + function test_DepositIndex_IncrementsSequentially() public { + uint256 beforeIdx = _bridge.depositIndex(); + vm.prank(user); + bridge().deposit(address(token()), tokenLimits.minAmount, recipient); + assertEq(_bridge.depositIndex(), beforeIdx + 1); + + vm.prank(user); + bridge().deposit(address(token()), tokenLimits.minAmount, recipient); + assertEq(_bridge.depositIndex(), beforeIdx + 2); + } + + function test_Deposit_TransfersIntoBridge() public { + uint256 ub = _token.balanceOf(user); + uint256 bb = _token.balanceOf(address(_bridge)); + vm.prank(user); + _bridge.deposit(address(_token), DEPOSIT_AMOUNT, recipient); + assertEq(_token.balanceOf(user), ub - DEPOSIT_AMOUNT); + assertEq(_token.balanceOf(address(_bridge)), bb + DEPOSIT_AMOUNT); + } + + function test_Claim() public { + vm.prank(admin); + _bridge.deposit(address(_token), DEPOSIT_AMOUNT, recipient); + + vm.prank(user); + PodECDSA.CertifiedLog memory certifiedLog = createCertifiedLog(3); + assertEq(_token.balanceOf(recipient), 0); + assertEq(_token.balanceOf(address(_bridge)), DEPOSIT_AMOUNT); + vm.expectEmit(true, true, true, true); + emit IBridge.Claim(0, address(_token), MIRROR_TOKEN, DEPOSIT_AMOUNT, recipient); + _bridge.claim(certifiedLog); + assertEq(_token.balanceOf(recipient), DEPOSIT_AMOUNT); + assertEq(_token.balanceOf(address(_bridge)), 0); + + (, IBridge.TokenUsage memory depositUsage, IBridge.TokenUsage memory claimUsage) = + bridge().tokenData(address(_token)); + assertEq(depositUsage.consumed, DEPOSIT_AMOUNT); + assertEq(claimUsage.consumed, DEPOSIT_AMOUNT); + } + + function test_Claim_RevertIfInvalidCertificate() public { + // not enough signatures + PodECDSA.CertifiedLog memory certifiedLog = createCertifiedLog(2); + vm.expectRevert(abi.encodeWithSelector(IBridgeDepositWithdraw.InvalidCertificate.selector)); + _bridge.claim(certifiedLog); + + // invalid leaf + certifiedLog = createCertifiedLog(3); + certifiedLog.certificate.leaf = bytes32(0); + vm.expectRevert(abi.encodeWithSelector(IBridgeDepositWithdraw.InvalidCertificate.selector)); + _bridge.claim(certifiedLog); + + // tampered proof + certifiedLog = createCertifiedLog(3); + certifiedLog.certificate.proof.path[0] = bytes32(uint256(1232)); + vm.expectRevert(abi.encodeWithSelector(IBridgeDepositWithdraw.InvalidCertificate.selector)); + _bridge.claim(certifiedLog); + } + + function test_Claim_RevertIfInvalidBridgeContract() public { + PodECDSA.CertifiedLog memory certifiedLog = createCertifiedLog(3); + certifiedLog.log.addr = address(0xBEEF); + vm.expectRevert(abi.encodeWithSelector(IBridge.InvalidBridgeContract.selector)); + _bridge.claim(certifiedLog); + } + + function test_Claim_RevertIfAlreadyClaimed() public { + vm.prank(admin); + _bridge.deposit(address(_token), DEPOSIT_AMOUNT, recipient); + PodECDSA.CertifiedLog memory certifiedLog = createCertifiedLog(3); + _bridge.claim(certifiedLog); + vm.expectRevert(abi.encodeWithSelector(IBridge.RequestAlreadyProcessed.selector)); + _bridge.claim(certifiedLog); + } + + function test_ClaimNative() public { + vm.deal(admin, DEPOSIT_AMOUNT); + vm.prank(admin); + _bridge.depositNative{value: DEPOSIT_AMOUNT}(recipient); + assertEq(address(bridge()).balance, DEPOSIT_AMOUNT); + assertEq(recipient.balance, 0); + PodECDSA.CertifiedLog memory certifiedLog = createNativeCertifiedLog(3); + vm.expectEmit(true, false, false, true); + emit IBridge.ClaimNative(0, DEPOSIT_AMOUNT, recipient); + _bridge.claimNative(certifiedLog); + assertEq(address(bridge()).balance, 0); + assertEq(recipient.balance, DEPOSIT_AMOUNT); + (, IBridge.TokenUsage memory dep, IBridge.TokenUsage memory claimUsage) = + bridge().tokenData(MOCK_ADDRESS_FOR_NATIVE_DEPOSIT); + assertEq(dep.consumed, DEPOSIT_AMOUNT); + assertEq(claimUsage.consumed, DEPOSIT_AMOUNT); + } + + function test_ClaimNative_RevertIfPaused() public { + vm.prank(admin); + _bridge.pause(); + PodECDSA.CertifiedLog memory certifiedLog = createNativeCertifiedLog(3); + vm.expectRevert(abi.encodeWithSelector(Pausable.EnforcedPause.selector)); + _bridge.claimNative(certifiedLog); + } + + function test_ClaimNative_RevertIfInvalidLog() public { + PodECDSA.CertifiedLog memory certifiedLog = createNativeCertifiedLog(3); + certifiedLog.log.topics[0] = bytes32(uint256(1232)); + vm.expectRevert(abi.encodeWithSelector(IBridge.InvalidDepositLog.selector)); + _bridge.claimNative(certifiedLog); + } + + function test_ClaimNative_RevertIfInvalidBridgeContract() public { + PodECDSA.CertifiedLog memory certifiedLog = createNativeCertifiedLog(3); + certifiedLog.log.addr = address(0xBEEF); + vm.expectRevert(abi.encodeWithSelector(IBridge.InvalidBridgeContract.selector)); + _bridge.claimNative(certifiedLog); + } + + function test_ClaimNative_RevertIfInvalidAmount() public { + vm.deal(admin, DEPOSIT_AMOUNT); + vm.prank(admin); + _bridge.depositNative{value: DEPOSIT_AMOUNT}(recipient); + PodECDSA.CertifiedLog memory certifiedLog = createNativeCertifiedLog(3); + certifiedLog.log.data = abi.encode(nativeTokenLimits.minAmount - 1, recipient); + vm.expectRevert(abi.encodeWithSelector(IBridge.InvalidTokenAmount.selector)); + _bridge.claimNative(certifiedLog); + assertEq(address(bridge()).balance, DEPOSIT_AMOUNT); + assertEq(recipient.balance, 0); + } + + function test_ClaimNative_RevertIfInvalidCertificate() public { + // invalid leaf + vm.deal(admin, DEPOSIT_AMOUNT); + vm.prank(admin); + _bridge.depositNative{value: DEPOSIT_AMOUNT}(recipient); + PodECDSA.CertifiedLog memory certifiedLog = createNativeCertifiedLog(3); + certifiedLog.certificate.leaf = bytes32(0); + vm.expectRevert(abi.encodeWithSelector(IBridgeDepositWithdraw.InvalidCertificate.selector)); + _bridge.claimNative(certifiedLog); + + // tampered proof + certifiedLog = createNativeCertifiedLog(3); + certifiedLog.certificate.proof.path[0] = bytes32(uint256(1232)); + vm.expectRevert(abi.encodeWithSelector(IBridgeDepositWithdraw.InvalidCertificate.selector)); + _bridge.claimNative(certifiedLog); + + // not enough signatures + certifiedLog = createNativeCertifiedLog(2); + vm.expectRevert(abi.encodeWithSelector(IBridgeDepositWithdraw.InvalidCertificate.selector)); + _bridge.claimNative(certifiedLog); + } + + function test_ClaimNative_RevertIfAlreadyClaimed() public { + vm.deal(admin, DEPOSIT_AMOUNT); + vm.prank(admin); + _bridge.depositNative{value: DEPOSIT_AMOUNT}(recipient); + PodECDSA.CertifiedLog memory certifiedLog = createNativeCertifiedLog(3); + _bridge.claimNative(certifiedLog); + vm.expectRevert(abi.encodeWithSelector(IBridge.RequestAlreadyProcessed.selector)); + _bridge.claimNative(certifiedLog); + } + + function test_Claim_RevertIfInvalidDepositLog() public { + PodECDSA.CertifiedLog memory certifiedLog = createCertifiedLog(3); + certifiedLog.log.topics[0] = bytes32(uint256(1232)); + vm.expectRevert(abi.encodeWithSelector(IBridge.InvalidDepositLog.selector)); + _bridge.claim(certifiedLog); + + certifiedLog = createCertifiedLog(3); + certifiedLog.log.topics = new bytes32[](1); + certifiedLog.log.topics[0] = bytes32(uint256(1232)); + vm.expectRevert(abi.encodeWithSelector(IBridge.InvalidDepositLog.selector)); + _bridge.claim(certifiedLog); + } + + function test_Claim_RevertIfMirrorTokenNotFound() public { + PodECDSA.CertifiedLog memory certifiedLog = createCertifiedLog(3); + certifiedLog.log.topics[2] = bytes32(uint256(0xBEEF)); + vm.expectRevert(abi.encodeWithSelector(IBridge.MirrorTokenNotFound.selector)); + _bridge.claim(certifiedLog); + } + + function test_Claim_RevertIfPaused() public { + vm.prank(admin); + _bridge.pause(); + PodECDSA.CertifiedLog memory certifiedLog = createCertifiedLog(3); + vm.expectRevert(abi.encodeWithSelector(Pausable.EnforcedPause.selector)); + _bridge.claim(certifiedLog); + } + + function test_Migrate_TransfersAllTokenBalances() public { + vm.prank(user); + _bridge.deposit(address(_token), DEPOSIT_AMOUNT, recipient); + vm.prank(admin); + _bridge.pause(); + uint256 beforeAmt = _token.balanceOf(address(_bridge)); + vm.prank(admin); + _bridge.migrate(newBridge); + assertEq(_token.balanceOf(newBridge), beforeAmt); + assertEq(_token.balanceOf(address(_bridge)), 0); + } + + function test_Whitelist_RevertIfSameTokenTwiceDifferentMirror() public { + WrappedToken anotherMirror = new WrappedToken("Token", "TKN", 18); + vm.prank(admin); + vm.expectRevert(abi.encodeWithSelector(IBridge.InvalidTokenConfig.selector)); + _bridge.whiteListToken(address(_token), address(anotherMirror), tokenLimits); + } + + function test_Deposit_RevertWithoutAllowance() public { + address u = makeAddr("noapprove"); + vm.prank(admin); + _token.mint(u, DEPOSIT_AMOUNT); + vm.prank(u); + vm.expectRevert(); + _bridge.deposit(address(_token), DEPOSIT_AMOUNT, recipient); + } + + function test_DepositNative_IncrementsIndexSequentially() public { + vm.deal(user, 2 * DEPOSIT_AMOUNT); + vm.prank(user); + _bridge.depositNative{value: DEPOSIT_AMOUNT}(recipient); + assertEq(_bridge.depositIndex(), 1); + vm.prank(user); + _bridge.depositNative{value: DEPOSIT_AMOUNT}(recipient); + assertEq(_bridge.depositIndex(), 2); + } + + function test_Migrate_NoWhitelistedTokens() public { + vm.prank(admin); + BridgeDepositWithdraw fresh = + new BridgeDepositWithdraw(address(podRegistry), OTHER_BRIDGE_CONTRACT, nativeTokenLimits); + vm.prank(admin); + fresh.pause(); + vm.prank(admin); + fresh.migrate(newBridge); + assertEq(fresh.migratedContract(), newBridge); + } + + function test_Migrate_SkipsZeroBalanceTokens() public { + WrappedToken t2 = new WrappedToken("Token", "TKN", 18); + WrappedToken m2 = new WrappedToken("Mirror", "MRR", 18); + vm.prank(admin); + _bridge.whiteListToken(address(t2), address(m2), tokenLimits); + vm.prank(user); + _token.approve(address(_bridge), type(uint256).max); + vm.prank(user); + _bridge.deposit(address(_token), DEPOSIT_AMOUNT, address(1)); + vm.prank(admin); + _bridge.pause(); + vm.prank(admin); + _bridge.migrate(newBridge); + assertEq(_token.balanceOf(newBridge), DEPOSIT_AMOUNT); + assertEq(t2.balanceOf(newBridge), 0); + } + + function test_WhitelistedTokens_ListGrowsAndOrder() public { + WrappedToken t2 = new WrappedToken("Token", "TKN", 18); + WrappedToken m2 = new WrappedToken("Mirror", "MRR", 18); + vm.prank(admin); + _bridge.whiteListToken(address(t2), address(m2), tokenLimits); + assertEq(_bridge.whitelistedTokens(0), address(_token)); + assertEq(_bridge.whitelistedTokens(1), address(t2)); + } + + function test_MultiToken_DepositTracksUsageSeparately() public { + address t2 = address(0xB0B2); + WrappedToken t2Mock = new WrappedToken("Token", "TKN", 18); + vm.prank(admin); + _bridge.whiteListToken( + t2, + address(t2Mock), + IBridge.TokenLimits({ + minAmount: tokenLimits.minAmount, + deposit: tokenLimits.deposit, + claim: tokenLimits.claim + }) + ); + + vm.prank(user); + bridge().deposit(address(token()), tokenLimits.minAmount, recipient); + (, IBridge.TokenUsage memory dep1,) = bridge().tokenData(address(token())); + assertEq(dep1.consumed, tokenLimits.minAmount); + + (, IBridge.TokenUsage memory dep2,) = bridge().tokenData(t2); + assertEq(dep2.consumed, 0); + } + + function createCertifiedLog(uint256 numberOfRequiredSignatures) + internal + view + returns (PodECDSA.CertifiedLog memory) + { + bytes32 receiptRoot = 0xb971e2eaeaab46dbad2fa4ed54edbaac586939dbc33c73315903a80bcc931b39; + bytes32[] memory topics = new bytes32[](3); + topics[0] = keccak256("Deposit(uint256,address,uint256,address)"); + topics[1] = bytes32(uint256(0)); + topics[2] = bytes32(uint256(uint160(MIRROR_TOKEN))); + + bytes memory data = abi.encode(DEPOSIT_AMOUNT, recipient); + + bytes32[] memory merklePath = new bytes32[](4); + + merklePath[0] = 0x42ee24b8bf1831e9a79284d4f5719840477450d02681315d2d2ae29a4c2c829b; + merklePath[1] = 0x05ad2355f20950fa862daf53cc8ac0b82c0106289c3e1e4c8602aa13792d0831; + merklePath[2] = 0x0eb6eaabad615528bc24c8c5786a4ceff0c07481daac20e40a7f009c47b1868e; + merklePath[3] = 0xa570326bbbc2e5afb293034a35a7a074d76d2ec3af3695beb2da2b870da524b5; + + bytes[] memory signatures = new bytes[](numberOfRequiredSignatures); + uint256[] memory sortedAttestationTimestamps = new uint256[](numberOfRequiredSignatures); + for (uint256 i = 0; i < numberOfRequiredSignatures; i++) { + (uint8 v, bytes32 r, bytes32 s) = vm.sign(validatorPrivateKeys[i], receiptRoot); + signatures[i] = ECDSA._serialize_signature(v, r, s); + sortedAttestationTimestamps[i] = i + 1; + } + + bytes memory aggregateSignature = ECDSA.aggregate_signatures(signatures); + + PodECDSA.CertifiedReceipt memory certifiedReceipt = PodECDSA.CertifiedReceipt({ + receiptRoot: receiptRoot, + aggregateSignature: aggregateSignature, + sortedAttestationTimestamps: sortedAttestationTimestamps + }); + + PodECDSA.Log memory log = PodECDSA.Log({addr: address(OTHER_BRIDGE_CONTRACT), topics: topics, data: data}); + + bytes32 logHash = PodECDSA.hashLog(log); + bytes32 leaf = MerkleTree.hashLeaf(bytes("log_hashes[1]"), logHash); + MerkleTree.Proof memory proof = MerkleTree.Proof({path: merklePath}); + + PodECDSA.CertifiedLog memory certifiedLog = PodECDSA.CertifiedLog({ + log: log, + logIndex: 1, + certificate: PodECDSA.Certificate({leaf: leaf, certifiedReceipt: certifiedReceipt, proof: proof}) + }); + + return certifiedLog; + } + + function createNativeCertifiedLog(uint256 numberOfRequiredSignatures) + internal + view + returns (PodECDSA.CertifiedLog memory) + { + bytes32 receiptRoot = 0x53530f2085bae5343304dc02eba7f347453fe00ad74f5acf9f0aced719fe4a03; + bytes32[] memory topics = new bytes32[](2); + topics[0] = keccak256("DepositNative(uint256,uint256,address)"); + topics[1] = bytes32(uint256(0)); + + bytes memory data = abi.encode(DEPOSIT_AMOUNT, recipient); + + bytes32[] memory merklePath = new bytes32[](3); + + merklePath[0] = 0x05ad2355f20950fa862daf53cc8ac0b82c0106289c3e1e4c8602aa13792d0831; + merklePath[1] = 0x801cf30b996f0126b23e8bb5b0833b4253c4c752a64cefd31adbc887f04397c1; + merklePath[2] = 0xa12e4e7415c5592a840a2fd2d4b0786526eb78284f1f8f8ecd7d10fd113f4a14; + + bytes[] memory signatures = new bytes[](numberOfRequiredSignatures); + uint256[] memory sortedAttestationTimestamps = new uint256[](numberOfRequiredSignatures); + for (uint256 i = 0; i < numberOfRequiredSignatures; i++) { + (uint8 v, bytes32 r, bytes32 s) = vm.sign(validatorPrivateKeys[i], receiptRoot); + signatures[i] = ECDSA._serialize_signature(v, r, s); + sortedAttestationTimestamps[i] = i + 1; + } + + bytes memory aggregateSignature = ECDSA.aggregate_signatures(signatures); + + PodECDSA.CertifiedReceipt memory certifiedReceipt = PodECDSA.CertifiedReceipt({ + receiptRoot: receiptRoot, + aggregateSignature: aggregateSignature, + sortedAttestationTimestamps: sortedAttestationTimestamps + }); + + PodECDSA.Log memory log = PodECDSA.Log({addr: address(OTHER_BRIDGE_CONTRACT), topics: topics, data: data}); + + bytes32 logHash = PodECDSA.hashLog(log); + bytes32 leaf = MerkleTree.hashLeaf(bytes("log_hashes[1]"), logHash); + MerkleTree.Proof memory proof = MerkleTree.Proof({path: merklePath}); + + PodECDSA.CertifiedLog memory certifiedLog = PodECDSA.CertifiedLog({ + log: log, + logIndex: 1, + certificate: PodECDSA.Certificate({leaf: leaf, certifiedReceipt: certifiedReceipt, proof: proof}) + }); + + return certifiedLog; + } +} diff --git a/protocol/test/BridgeMintBurn.t.sol b/protocol/test/BridgeMintBurn.t.sol new file mode 100644 index 00000000..2cf8c45f --- /dev/null +++ b/protocol/test/BridgeMintBurn.t.sol @@ -0,0 +1,466 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.20; + +import {BridgeBehaviorTest} from "./abstract/Bridge.t.sol"; +import {BridgeMintBurn} from "pod-protocol/BridgeMintBurn.sol"; +import {IBridgeMintBurn} from "pod-protocol/interfaces/IBridgeMintBurn.sol"; +import {IBridge} from "pod-protocol/interfaces/IBridge.sol"; +import {Bridge} from "pod-protocol/abstract/Bridge.sol"; +import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol"; +import {WrappedToken} from "pod-protocol/WrappedToken.sol"; +import {Pausable} from "@openzeppelin/contracts/utils/Pausable.sol"; +import {EthGetLogsTypes} from "pod-sdk/types/EthGetLogsTypes.sol"; +import {EthGetBlockByNumberTypes} from "pod-sdk/types/EthGetBlockByNumberTypes.sol"; +import {HexUtils} from "pod-protocol/libraries/HexUtils.sol"; +import {TxInfo} from "pod-sdk/Context.sol"; +import {VmSafe} from "forge-std/Vm.sol"; + +contract BridgeMintBurnTest is BridgeBehaviorTest { + BridgeMintBurn private _bridge; + WrappedToken private _token; + address immutable MIRROR_TOKEN_ADDRESS = makeAddr("mirrorToken"); + address immutable OTHER_BRIDGE_CONTRACT = makeAddr("otherBridgeContract"); + + function bridge() internal view override returns (Bridge) { + return _bridge; + } + + function token() internal view override returns (IERC20) { + return _token; + } + + function setUpSuite() public override { + vm.startPrank(admin); + _bridge = new BridgeMintBurn(OTHER_BRIDGE_CONTRACT, nativeTokenLimits, 1); + + _token = WrappedToken( + _bridge.createAndWhitelistMirrorToken( + "Token", "TKN", address(0), address(MIRROR_TOKEN_ADDRESS), 18, tokenLimits + ) + ); + vm.stopPrank(); + + vm.prank(address(_bridge)); + _token.mint(user, INITIAL_BALANCE); + + vm.prank(user); + _token.approve(address(_bridge), type(uint256).max); + + _mockTxInfo(TxInfo({txHash: bytes32(0), nonce: 0})); + } + + function test_Deposit_BurnsFromUser() public { + uint256 ub = _token.balanceOf(user); + uint256 ts = _token.totalSupply(); + vm.prank(user); + _mockTxInfo(TxInfo({txHash: bytes32(0), nonce: 0})); + bridge().deposit(address(_token), DEPOSIT_AMOUNT, recipient); + assertEq(_token.balanceOf(user), ub - DEPOSIT_AMOUNT); + assertEq(_token.totalSupply(), ts - DEPOSIT_AMOUNT); + } + + function test_Claim_SingleLog_MintsToRecipient() public { + EthGetLogsTypes.RpcLog[] memory logs = new EthGetLogsTypes.RpcLog[](1); + logs[0] = _makeLog(0, MIRROR_TOKEN_ADDRESS, DEPOSIT_AMOUNT, recipient); + _mockEthGetLogs(0, 1, 1, MIRROR_TOKEN_ADDRESS, logs); + _mockEthGetBlockByNumber(2); + _mockTxInfo(TxInfo({txHash: bytes32(0), nonce: 0})); + assertEq(_token.balanceOf(recipient), 0); + + vm.expectEmit(true, false, false, true); + emit IBridge.Claim(0, address(_token), MIRROR_TOKEN_ADDRESS, DEPOSIT_AMOUNT, recipient); + _bridge.claim(0, MIRROR_TOKEN_ADDRESS, 1); + + assertEq(_token.balanceOf(recipient), DEPOSIT_AMOUNT); + + (, IBridge.TokenUsage memory depositUsage, IBridge.TokenUsage memory claimUsage) = + bridge().tokenData(address(_token)); + + assertEq(depositUsage.consumed, 0); + assertEq(claimUsage.consumed, DEPOSIT_AMOUNT); + } + + function test_Claim_RevertIfDailyLimitExhausted() public { + EthGetLogsTypes.RpcLog[] memory logs = new EthGetLogsTypes.RpcLog[](1); + logs[0] = _makeLog(0, MIRROR_TOKEN_ADDRESS, tokenLimits.claim + 1, recipient); + _mockEthGetBlockByNumber(1); + _mockEthGetLogs(0, 1, 1, MIRROR_TOKEN_ADDRESS, logs); + vm.expectRevert(abi.encodeWithSelector(IBridge.DailyLimitExhausted.selector)); + _bridge.claim(0, MIRROR_TOKEN_ADDRESS, 1); + } + + // TODO: redundant test, remove if the check is removed again. + // function test_Claim_RevertIfInvalidBridgeContract() public { + // EthGetLogsTypes.RpcLog[] memory logs = new EthGetLogsTypes.RpcLog[](1); + // logs[0] = _makeLog(0, MIRROR_TOKEN_ADDRESS, DEPOSIT_AMOUNT, recipient); + // logs[0].addr = address(0xBEEF); + // _mockEthGetBlockByNumber(1); + // _mockEthGetLogs(0, 1, 1, MIRROR_TOKEN_ADDRESS, logs); + // vm.expectRevert(abi.encodeWithSelector(IBridge.InvalidBridgeContract.selector)); + // _bridge.claim(0, MIRROR_TOKEN_ADDRESS, 1); + // } + + function test_Claim_RevertIfDailyLimitExhausted_ButSucceedAfterOneDay() public { + EthGetLogsTypes.RpcLog[] memory logs = new EthGetLogsTypes.RpcLog[](1); + logs[0] = _makeLog(0, MIRROR_TOKEN_ADDRESS, DEPOSIT_AMOUNT, recipient); + _mockEthGetBlockByNumber(1); + _mockEthGetLogs(0, 1, 1, MIRROR_TOKEN_ADDRESS, logs); + _bridge.claim(0, MIRROR_TOKEN_ADDRESS, 1); + logs[0] = _makeLog(1, MIRROR_TOKEN_ADDRESS, tokenLimits.claim, recipient); + _mockEthGetBlockByNumber(1); + _mockEthGetLogs(1, 1, 1, MIRROR_TOKEN_ADDRESS, logs); + vm.expectRevert(abi.encodeWithSelector(IBridge.DailyLimitExhausted.selector)); + _bridge.claim(1, MIRROR_TOKEN_ADDRESS, 1); + vm.warp(block.timestamp + 1 days + 1); + _mockEthGetBlockByNumber(1); + _mockEthGetLogs(1, 1, 1, MIRROR_TOKEN_ADDRESS, logs); + _bridge.claim(1, MIRROR_TOKEN_ADDRESS, 1); + } + + function test_Claim_RevertIfNoDepositsFound() public { + EthGetLogsTypes.RpcLog[] memory logs = new EthGetLogsTypes.RpcLog[](0); + _mockEthGetBlockByNumber(1); + _mockEthGetLogs(0, 1, 1, MIRROR_TOKEN_ADDRESS, logs); + vm.expectRevert(abi.encodeWithSelector(IBridge.InvalidDepositLog.selector)); + _bridge.claim(0, MIRROR_TOKEN_ADDRESS, 1); + } + + function test_Claim_RevertIfMultipleDepositsFound() public { + EthGetLogsTypes.RpcLog[] memory logs = new EthGetLogsTypes.RpcLog[](2); + logs[0] = _makeLog(0, MIRROR_TOKEN_ADDRESS, DEPOSIT_AMOUNT, recipient); + logs[1] = _makeLog(0, MIRROR_TOKEN_ADDRESS, DEPOSIT_AMOUNT, recipient); + _mockEthGetBlockByNumber(1); + _mockEthGetLogs(0, 1, 1, MIRROR_TOKEN_ADDRESS, logs); + vm.expectRevert(abi.encodeWithSelector(IBridge.InvalidDepositLog.selector)); + _bridge.claim(0, MIRROR_TOKEN_ADDRESS, 1); + } + + function test_Claim_RevertIfMirrorTokenNotFound() public { + // Use a token not mapped in mirrorTokens + address unknownMirror = address(0xBEEF); + EthGetLogsTypes.RpcLog[] memory logs = new EthGetLogsTypes.RpcLog[](1); + logs[0] = _makeLog(0, unknownMirror, DEPOSIT_AMOUNT, recipient); + _mockEthGetBlockByNumber(1); + _mockEthGetLogs(0, 1, 1, unknownMirror, logs); + + vm.expectRevert(abi.encodeWithSelector(IBridge.MirrorTokenNotFound.selector)); + _bridge.claim(0, unknownMirror, 1); + } + + function test_Claim_RevertIfBlockNotFinalized() public { + EthGetLogsTypes.RpcLog[] memory logs = new EthGetLogsTypes.RpcLog[](1); + logs[0] = _makeLog(0, MIRROR_TOKEN_ADDRESS, DEPOSIT_AMOUNT, recipient); + _mockEthGetBlockByNumber(1); + _mockEthGetLogs(0, 1, 1, MIRROR_TOKEN_ADDRESS, logs); + vm.expectRevert(abi.encodeWithSelector(IBridgeMintBurn.BlockNotFinalized.selector)); + _bridge.claim(0, MIRROR_TOKEN_ADDRESS, 10); + } + + function test_Claim_RevertIfAlreadyProcessed() public { + EthGetLogsTypes.RpcLog[] memory logs = new EthGetLogsTypes.RpcLog[](1); + logs[0] = _makeLog(0, MIRROR_TOKEN_ADDRESS, DEPOSIT_AMOUNT, recipient); + _mockEthGetBlockByNumber(1); + _mockEthGetLogs(0, 1, 1, MIRROR_TOKEN_ADDRESS, logs); + _bridge.claim(0, MIRROR_TOKEN_ADDRESS, 1); + + // Mock again with same log so requestId is identical + _mockEthGetBlockByNumber(1); + _mockEthGetLogs(0, 1, 1, MIRROR_TOKEN_ADDRESS, logs); + // record that no logs are emitted + vm.recordLogs(); + vm.prank(recipient); + _bridge.claim(0, MIRROR_TOKEN_ADDRESS, 1); + // confirm that nothing happens when the request is already processed + VmSafe.Log[] memory recordedLogs = vm.getRecordedLogs(); + assertEq(recordedLogs.length, 0); + } + + function test_Claim_RevertIfPaused() public { + vm.prank(admin); + _bridge.pause(); + vm.expectRevert(abi.encodeWithSelector(Pausable.EnforcedPause.selector)); + _bridge.claim(0, MIRROR_TOKEN_ADDRESS, 1); + } + + function test_Claim_RevertIfInvalidLog() public { + EthGetLogsTypes.RpcLog[] memory logs = new EthGetLogsTypes.RpcLog[](2); + logs[0] = _makeLog(0, MIRROR_TOKEN_ADDRESS, DEPOSIT_AMOUNT, recipient); + logs[1] = _makeLog(1, MIRROR_TOKEN_ADDRESS, DEPOSIT_AMOUNT, recipient); + _mockEthGetBlockByNumber(1); + _mockEthGetLogs(0, 1, 1, MIRROR_TOKEN_ADDRESS, logs); + vm.expectRevert(abi.encodeWithSelector(IBridge.InvalidDepositLog.selector)); + _bridge.claim(0, MIRROR_TOKEN_ADDRESS, 1); + + logs = new EthGetLogsTypes.RpcLog[](0); + _mockEthGetBlockByNumber(1); + _mockEthGetLogs(0, 1, 1, MIRROR_TOKEN_ADDRESS, logs); + vm.expectRevert(abi.encodeWithSelector(IBridge.InvalidDepositLog.selector)); + _bridge.claim(0, MIRROR_TOKEN_ADDRESS, 1); + } + + function test_Claim_RevertIfPrecompileCallFails() public { + _mockEthGetBlockByNumber(1); + EthGetLogsTypes.PrecompileArgs memory args = _buildArgs(0, 1, 1, MIRROR_TOKEN_ADDRESS); + podMockEthGetLogsRevert(abi.encode(args.chainId, args.ethGetLogsArgs)); + + vm.expectRevert(abi.encodeWithSelector(IBridgeMintBurn.PrecompileCallFailed.selector)); + _bridge.claim(0, MIRROR_TOKEN_ADDRESS, 1); + } + + function test_ClaimNative() public { + EthGetLogsTypes.RpcLog[] memory logs = new EthGetLogsTypes.RpcLog[](1); + logs[0] = _makeLog(0, address(0), DEPOSIT_AMOUNT, recipient); + _mockEthGetBlockByNumber(1); + _mockEthGetLogs(0, 1, 1, address(0), logs); + _mockMintBalance(recipient, DEPOSIT_AMOUNT); + + vm.expectEmit(true, false, false, true); + emit IBridge.ClaimNative(0, DEPOSIT_AMOUNT, recipient); + vm.prank(user); + _bridge.claimNative(0, 1); + // should be done by precompile + assertEq(recipient.balance, DEPOSIT_AMOUNT); + } + + function test_ClaimNative_RevertIfPaused() public { + vm.prank(admin); + _bridge.pause(); + vm.expectRevert(abi.encodeWithSelector(Pausable.EnforcedPause.selector)); + _bridge.claimNative(0, 1); + } + + function test_ClaimNative_RevertIfInvalidLog() public { + EthGetLogsTypes.RpcLog[] memory logs = new EthGetLogsTypes.RpcLog[](2); + logs[0] = _makeLog(0, address(0), DEPOSIT_AMOUNT, recipient); + logs[1] = _makeLog(1, address(0), DEPOSIT_AMOUNT, recipient); + _mockEthGetBlockByNumber(1); + _mockEthGetLogs(0, 1, 1, address(0), logs); + vm.expectRevert(abi.encodeWithSelector(IBridge.InvalidDepositLog.selector)); + vm.prank(recipient); + _bridge.claimNative(0, 1); + + logs = new EthGetLogsTypes.RpcLog[](0); + _mockEthGetBlockByNumber(1); + _mockEthGetLogs(0, 1, 1, address(0), logs); + vm.expectRevert(abi.encodeWithSelector(IBridge.InvalidDepositLog.selector)); + vm.prank(recipient); + _bridge.claimNative(0, 1); + } + + function test_ClaimNative_RevertIfInvalidAmount() public { + EthGetLogsTypes.RpcLog[] memory logs = new EthGetLogsTypes.RpcLog[](1); + logs[0] = _makeLog(0, address(0), nativeTokenLimits.minAmount - 1, recipient); + _mockEthGetBlockByNumber(1); + _mockEthGetLogs(0, 1, 1, address(0), logs); + vm.expectRevert(abi.encodeWithSelector(IBridge.InvalidTokenAmount.selector)); + _bridge.claimNative(0, 1); + } + + function test_ClaimNative_TracksConsumed() public { + EthGetLogsTypes.RpcLog[] memory logs = new EthGetLogsTypes.RpcLog[](1); + logs[0] = _makeLog(0, address(0), DEPOSIT_AMOUNT, recipient); + _mockEthGetBlockByNumber(1); + _mockEthGetLogs(0, 1, 1, address(0), logs); + _bridge.claimNative(0, 1); + (, IBridge.TokenUsage memory dep, IBridge.TokenUsage memory claimUsage) = + bridge().tokenData(MOCK_ADDRESS_FOR_NATIVE_DEPOSIT); + assertEq(claimUsage.consumed, DEPOSIT_AMOUNT); + logs[0] = _makeLog(1, address(0), DEPOSIT_AMOUNT, recipient); + _mockEthGetBlockByNumber(1); + _mockEthGetLogs(1, 1, 1, address(0), logs); + _bridge.claimNative(1, 1); + (, dep, claimUsage) = bridge().tokenData(MOCK_ADDRESS_FOR_NATIVE_DEPOSIT); + assertEq(claimUsage.consumed, DEPOSIT_AMOUNT * 2); + } + + function test_ClaimNative_RevertIfMoreThanClaimLimitButSucceedAfterOneDay() public { + EthGetLogsTypes.RpcLog[] memory logs = new EthGetLogsTypes.RpcLog[](1); + logs[0] = _makeLog(0, address(0), DEPOSIT_AMOUNT, recipient); + _mockEthGetBlockByNumber(1); + _mockEthGetLogs(0, 1, 1, address(0), logs); + _bridge.claimNative(0, 1); + logs[0] = _makeLog(1, address(0), nativeTokenLimits.claim, recipient); + _mockEthGetBlockByNumber(2); + _mockEthGetLogs(1, 2, 2, address(0), logs); + vm.expectRevert(abi.encodeWithSelector(IBridge.DailyLimitExhausted.selector)); + _bridge.claimNative(1, 2); + vm.warp(block.timestamp + 1 days + 1); + _mockEthGetBlockByNumber(2); + _mockEthGetLogs(1, 2, 2, address(0), logs); + _bridge.claimNative(1, 2); + } + + function test_ClaimNative_RevertIfBlockNotFinalized() public { + EthGetLogsTypes.RpcLog[] memory logs = new EthGetLogsTypes.RpcLog[](1); + logs[0] = _makeLog(0, address(0), DEPOSIT_AMOUNT, recipient); + _mockEthGetBlockByNumber(1); + _mockEthGetLogs(0, 1, 1, address(0), logs); + vm.expectRevert(abi.encodeWithSelector(IBridgeMintBurn.BlockNotFinalized.selector)); + _bridge.claimNative(0, 10); + } + + // TODO: redundant test, add if the check is removed again. + // function test_ClaimNative_RevertIfInvalidBridgeContract() public { + // EthGetLogsTypes.RpcLog[] memory logs = new EthGetLogsTypes.RpcLog[](1); + // logs[0] = _makeLog(0, address(0), DEPOSIT_AMOUNT, recipient); + // logs[0].addr = address(0xBEEF); + // _mockEthGetBlockByNumber(1); + // _mockEthGetLogs(0, 1, 1, address(0), logs); + // vm.expectRevert(abi.encodeWithSelector(IBridge.InvalidBridgeContract.selector)); + // _bridge.claimNative(0, 1); + // } + + function test_ClaimNative_DoNothingIfRequestAlreadyProcessed() public { + EthGetLogsTypes.RpcLog[] memory logs = new EthGetLogsTypes.RpcLog[](1); + logs[0] = _makeLog(0, address(0), DEPOSIT_AMOUNT, recipient); + _mockEthGetBlockByNumber(1); + _mockEthGetLogs(0, 1, 1, address(0), logs); + vm.expectEmit(true, false, false, true); + emit IBridge.ClaimNative(0, DEPOSIT_AMOUNT, recipient); + vm.prank(recipient); + _bridge.claimNative(0, 1); + + _mockEthGetBlockByNumber(1); + _mockEthGetLogs(0, 1, 1, address(0), logs); + + // record that no logs are emitted + vm.recordLogs(); + vm.prank(recipient); + _bridge.claimNative(0, 1); + + // confirm that nothing happens when the request is already processed + VmSafe.Log[] memory recordedLogs = vm.getRecordedLogs(); + assertEq(recordedLogs.length, 0); + } + + function test_Migrate_TransfersRolesToNewBridge() public { + vm.prank(admin); + _bridge.pause(); + vm.prank(admin); + _bridge.migrate(newBridge); + + // New bridge gains roles + assertTrue(_token.hasRole(_token.DEFAULT_ADMIN_ROLE(), newBridge)); + assertTrue(_token.hasRole(_token.MINTER_ROLE(), newBridge)); + assertTrue(_token.hasRole(_token.PAUSER_ROLE(), newBridge)); + // Old bridge renounces roles + assertFalse(_token.hasRole(_token.DEFAULT_ADMIN_ROLE(), address(_bridge))); + assertFalse(_token.hasRole(_token.MINTER_ROLE(), address(_bridge))); + assertFalse(_token.hasRole(_token.PAUSER_ROLE(), address(_bridge))); + } + + function test_CreateAndWhitelistMirrorToken_NewOrExisting() public { + address nonExisting = address(0x1234); + vm.prank(admin); + address created = + _bridge.createAndWhitelistMirrorToken("Token", "TKN", address(0), address(nonExisting), 18, tokenLimits); + assertTrue(created != address(0)); + } + + // ---------- Helpers for building logs ---------- + function _buildArgs(uint256 id, uint256 fromBlock, uint256 toBlock, address tokenAddr) + internal + view + returns (EthGetLogsTypes.PrecompileArgs memory) + { + bytes memory fromBlockBytes = HexUtils.toBytesMinimal(fromBlock); + bytes memory toBlockBytes = HexUtils.toBytesMinimal(toBlock); + EthGetLogsTypes.RpcArgs memory inner = EthGetLogsTypes.RpcArgs({ + fromBlock: fromBlockBytes, + toBlock: toBlockBytes, + addr: address(OTHER_BRIDGE_CONTRACT), + blockHash: bytes32(0), + topics: _buildTopics(id, tokenAddr) + }); + return EthGetLogsTypes.PrecompileArgs({chainId: 1, ethGetLogsArgs: inner}); + } + + function _mockEthGetLogs( + uint256 id, + uint256 fromBlock, + uint256 toBlock, + address tokenAddr, + EthGetLogsTypes.RpcLog[] memory logs + ) internal { + EthGetLogsTypes.PrecompileArgs memory args = _buildArgs(id, fromBlock, toBlock, tokenAddr); + podMockEthGetLogs(abi.encode(args.chainId, args.ethGetLogsArgs), abi.encode(logs)); + } + + function _buildTopics(uint256 id, address tokenAddr) internal pure returns (bytes32[] memory topics) { + if (tokenAddr == address(0)) { + topics = new bytes32[](2); + topics[0] = keccak256("DepositNative(uint256,uint256,address)"); + topics[1] = bytes32(id); + } else { + topics = new bytes32[](3); + topics[0] = keccak256("Deposit(uint256,address,uint256,address)"); + topics[1] = bytes32(id); + topics[2] = bytes32(uint256(uint160(tokenAddr))); + } + } + + function _makeLog(uint256 id, address tokenAddr, uint256 amount, address to) + internal + view + returns (EthGetLogsTypes.RpcLog memory) + { + return EthGetLogsTypes.RpcLog({ + addr: address(OTHER_BRIDGE_CONTRACT), + topics: _buildTopics(id, tokenAddr), + data: abi.encode(amount, to), + blockNumber: bytes(""), + transactionHash: bytes32(0), + transactionIndex: bytes(""), + blockHash: bytes32(0), + logIndex: bytes(""), + removed: false + }); + } + + function _buildEthGetBlockByNumberArgs() internal pure returns (bytes memory) { + EthGetBlockByNumberTypes.PrecompileArgs memory args = + EthGetBlockByNumberTypes.PrecompileArgs(1, EthGetBlockByNumberTypes.RpcArgs(hex"66696e616c697a6564", false)); + + return abi.encode(args.chainId, args.ethGetBlockByNumberArgs); + } + + function _buildEthGetBlockByNumberRpcBlock(uint256 blockNumber) internal pure returns (bytes memory) { + return abi.encode( + EthGetBlockByNumberTypes.RpcBlock({ + number: HexUtils.toBytesMinimal(blockNumber), + difficulty: bytes(""), + extraData: bytes(""), + gasLimit: bytes(""), + gasUsed: bytes(""), + hash: bytes32(0), + logsBloom: bytes(""), + miner: address(0), + mixHash: bytes32(0), + nonce: bytes(""), + parentHash: bytes32(0), + receiptsRoot: bytes32(0), + sha3Uncles: bytes32(0), + size: bytes(""), + stateRoot: bytes32(0), + timestamp: bytes(""), + transactions: new bytes32[](0), + transactionsRoot: bytes32(0), + uncles: new bytes32[](0) + }) + ); + } + + function _mockEthGetBlockByNumber(uint256 blockNumber) internal { + bytes memory args = _buildEthGetBlockByNumberArgs(); + bytes memory rpcBlock = _buildEthGetBlockByNumberRpcBlock(blockNumber); + podMockEthGetBlockByNumber(args, rpcBlock); + } + + function _mockTxInfo(TxInfo memory txInfo) internal { + podMockTxInfo(abi.encode(txInfo)); + } + + function _mockMintBalance(address recipient, uint256 amount) internal { + podMockMintBalance(recipient, abi.encode(amount)); + } +} diff --git a/protocol/test/HexUtils.t.sol b/protocol/test/HexUtils.t.sol new file mode 100644 index 00000000..cb4f0eb7 --- /dev/null +++ b/protocol/test/HexUtils.t.sol @@ -0,0 +1,15 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.20; + +import {Test} from "forge-std/Test.sol"; +import {HexUtils} from "../src/libraries/HexUtils.sol"; + +contract HexUtilsTest is Test { + function test_uintFromBigEndian() public pure { + assertEq(HexUtils.uintFromBigEndian(hex"0156"), 342); + } + + function test_toBytesMinimal() public pure { + assertEq(HexUtils.toBytesMinimal(342), hex"0156"); + } +} diff --git a/protocol/test/abstract/Bridge.t.sol b/protocol/test/abstract/Bridge.t.sol new file mode 100644 index 00000000..e3d5671a --- /dev/null +++ b/protocol/test/abstract/Bridge.t.sol @@ -0,0 +1,286 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.20; + +import {PodTest} from "pod-sdk/test/podTest.sol"; +import {Bridge} from "../../src/abstract/Bridge.sol"; +import {IBridge} from "../../src/interfaces/IBridge.sol"; +import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol"; +import {Pausable} from "@openzeppelin/contracts/utils/Pausable.sol"; + +abstract contract BridgeBehaviorTest is PodTest { + address public admin = makeAddr("admin"); + address public user = makeAddr("user"); + address public recipient = makeAddr("recipient"); + address public newBridge = makeAddr("newBridge"); + + uint256 public constant INITIAL_BALANCE = 1000e18; + uint256 public constant DEPOSIT_AMOUNT = 100e18; + + IBridge.TokenLimits public tokenLimits; + IBridge.TokenLimits public nativeTokenLimits; + + address public constant MOCK_ADDRESS_FOR_NATIVE_DEPOSIT = + address(uint160(uint256(keccak256("MOCK_ADDRESS_FOR_NATIVE_DEPOSIT")))); + + // Hooks each concrete suite must implement + function bridge() internal view virtual returns (Bridge); + function token() internal view virtual returns (IERC20); + function setUpSuite() public virtual; + + function setUp() public virtual { + tokenLimits = IBridge.TokenLimits({minAmount: 1e18, deposit: 500e18, claim: 400e18}); + nativeTokenLimits = IBridge.TokenLimits({minAmount: 0.01 ether, deposit: 500e18, claim: 400e18}); + setUpSuite(); + } + + // Common tests + function test_Deposit_EmitsEvent() public { + vm.prank(user); + vm.expectEmit(true, true, true, true); + emit IBridge.Deposit(0, address(token()), DEPOSIT_AMOUNT, recipient); + bridge().deposit(address(token()), DEPOSIT_AMOUNT, recipient); + } + + function test_Deposit_RevertIfPaused() public { + vm.prank(admin); + bridge().pause(); + vm.expectRevert(Pausable.EnforcedPause.selector); + vm.prank(user); + bridge().deposit(address(token()), DEPOSIT_AMOUNT, recipient); + } + + function test_Deposit_MinAndDailyLimit() public { + vm.prank(user); + vm.expectRevert(abi.encodeWithSelector(IBridge.InvalidTokenAmount.selector)); + bridge().deposit(address(token()), tokenLimits.minAmount - 1, recipient); + + vm.prank(user); + vm.expectRevert(abi.encodeWithSelector(IBridge.DailyLimitExhausted.selector)); + bridge().deposit(address(token()), tokenLimits.deposit + 1, recipient); + } + + function test_DepositNative_EmitsEvent() public { + vm.deal(user, DEPOSIT_AMOUNT); + vm.expectEmit(true, true, true, true); + emit IBridge.DepositNative(0, DEPOSIT_AMOUNT, recipient); + vm.prank(user); + bridge().depositNative{value: DEPOSIT_AMOUNT}(recipient); + assertEq(address(bridge()).balance, DEPOSIT_AMOUNT); + } + + function test_DepositNative_RevertIfLessThanMinAmount() public { + vm.deal(user, DEPOSIT_AMOUNT); + vm.expectRevert(abi.encodeWithSelector(IBridge.InvalidTokenAmount.selector)); + vm.prank(user); + bridge().depositNative{value: nativeTokenLimits.minAmount - 1}(recipient); + } + + function test_DepositNative_RevertIfMoreThanDailyLimit() public { + vm.deal(user, nativeTokenLimits.deposit + 1); + vm.prank(admin); + bridge().pause(); + vm.expectRevert(Pausable.EnforcedPause.selector); + vm.prank(user); + bridge().depositNative{value: nativeTokenLimits.deposit + 1}(recipient); + } + + function test_DepositNative_RevertIfMoreThanClaimLimitButSucceedAfterOneDay() public { + vm.deal(user, nativeTokenLimits.deposit + DEPOSIT_AMOUNT); + vm.prank(user); + vm.warp(block.timestamp + 1 days - 1); + bridge().depositNative{value: DEPOSIT_AMOUNT}(recipient); + vm.expectRevert(abi.encodeWithSelector(IBridge.DailyLimitExhausted.selector)); + vm.prank(user); + bridge().depositNative{value: nativeTokenLimits.deposit - 1}(recipient); + vm.warp(block.timestamp + 2); + vm.prank(user); + bridge().depositNative{value: nativeTokenLimits.deposit - 1}(recipient); + } + + function test_DepositNative_RevertIfPaused() public { + vm.deal(user, DEPOSIT_AMOUNT); + vm.prank(admin); + bridge().pause(); + vm.expectRevert(Pausable.EnforcedPause.selector); + vm.prank(user); + bridge().depositNative{value: DEPOSIT_AMOUNT}(recipient); + } + + function test_DepositNative_RevertIfInvalidAmount() public { + vm.deal(user, DEPOSIT_AMOUNT); + vm.expectRevert(abi.encodeWithSelector(IBridge.InvalidTokenAmount.selector)); + vm.prank(user); + bridge().depositNative{value: nativeTokenLimits.minAmount - 1}(recipient); + } + + function test_DepositNative_TracksConsumed() public { + vm.deal(user, DEPOSIT_AMOUNT); + vm.prank(user); + bridge().depositNative{value: DEPOSIT_AMOUNT}(recipient); + (, IBridge.TokenUsage memory dep,) = bridge().tokenData(MOCK_ADDRESS_FOR_NATIVE_DEPOSIT); + assertEq(dep.consumed, DEPOSIT_AMOUNT); + } + + function test_Deposit_ZeroRecipientAndPause() public { + vm.prank(user); + vm.expectRevert(abi.encodeWithSelector(IBridge.InvalidToAddress.selector)); + bridge().deposit(address(token()), DEPOSIT_AMOUNT, address(0)); + + vm.prank(admin); + bridge().pause(); + vm.prank(user); + vm.expectRevert(Pausable.EnforcedPause.selector); + bridge().deposit(address(token()), DEPOSIT_AMOUNT, recipient); + } + + function test_ConfigureToken() public { + IBridge.TokenLimits memory nl = IBridge.TokenLimits({minAmount: 2e18, deposit: 2000e18, claim: 2000e18}); + vm.prank(admin); + bridge().configureToken(address(token()), nl); + (IBridge.TokenLimits memory limits,,) = bridge().tokenData(address(token())); + assertEq(limits.minAmount, nl.minAmount); + assertEq(limits.deposit, nl.deposit); + assertEq(limits.claim, nl.claim); + } + + function test_ConfigureToken_RevertIfNotAdmin() public { + IBridge.TokenLimits memory nl = IBridge.TokenLimits({minAmount: 2e18, deposit: 2000e18, claim: 2000e18}); + vm.prank(user); + vm.expectRevert(); + bridge().configureToken(address(token()), nl); + } + + function test_Pause_Unpause() public { + vm.prank(admin); + bridge().pause(); + assertTrue(bridge().paused()); + vm.prank(admin); + bridge().unpause(); + assertFalse(bridge().paused()); + } + + function test_Pause_RevertIfNotPauseRole() public { + vm.prank(user); + vm.expectRevert(); + bridge().pause(); + } + + function test_Migrate_SetsMigratedContract() public { + vm.prank(admin); + bridge().pause(); + vm.prank(admin); + bridge().migrate(newBridge); + assertEq(bridge().migratedContract(), newBridge); + } + + function test_Deposit_ExactlyAtMinAndLimit() public { + vm.prank(user); + bridge().deposit(address(token()), tokenLimits.minAmount, recipient); + vm.prank(user); + bridge().deposit(address(token()), tokenLimits.deposit - tokenLimits.minAmount, recipient); + } + + function test_Deposit_MultipleSameDay_TracksConsumed() public { + vm.prank(user); + bridge().deposit(address(token()), 100e18, recipient); + vm.prank(user); + bridge().deposit(address(token()), 200e18, recipient); + (, IBridge.TokenUsage memory dep,) = bridge().tokenData(address(token())); + assertEq(dep.consumed, 300e18); + } + + function test_Deposit_DailyLimitResets_AfterOneDayOnly() public { + vm.prank(user); + bridge().deposit(address(token()), tokenLimits.deposit, recipient); + vm.warp(block.timestamp + 1 days - 1); + vm.prank(user); + vm.expectRevert(abi.encodeWithSelector(IBridge.DailyLimitExhausted.selector)); + bridge().deposit(address(token()), tokenLimits.minAmount, recipient); + vm.warp(block.timestamp + 2); + vm.prank(user); + bridge().deposit(address(token()), tokenLimits.deposit, recipient); + } + + function test_Deposit_RevertIfTokenNotWhitelisted() public { + address notWhitelisted = address(0xBEEF); + vm.prank(user); + vm.expectRevert(abi.encodeWithSelector(IBridge.InvalidTokenAmount.selector)); + bridge().deposit(notWhitelisted, 1, recipient); + } + + function test_Migrate_RevertIfAlreadyMigrated() public { + vm.startPrank(admin); + bridge().pause(); + bridge().migrate(newBridge); + vm.expectRevert(abi.encodeWithSelector(IBridge.ContractMigrated.selector)); + bridge().migrate(address(0x1234)); + vm.stopPrank(); + } + + function test_Deposit_RevertAfterMigrated() public { + vm.startPrank(admin); + bridge().pause(); + bridge().migrate(newBridge); + vm.stopPrank(); + vm.prank(user); + vm.expectRevert(Pausable.EnforcedPause.selector); + bridge().deposit(address(token()), 1, recipient); + } + + function test_Pause_RoleRequired_Unpause_AdminRequired() public { + vm.prank(user); + vm.expectRevert(); + bridge().pause(); + vm.prank(admin); + bridge().pause(); + vm.prank(user); + vm.expectRevert(); + bridge().unpause(); + } + + function test_ConfigureToken_RevertIfUpdatingUnconfiguredToken() public { + IBridge.TokenLimits memory some = IBridge.TokenLimits({minAmount: 1, deposit: 1, claim: 1}); + vm.prank(admin); + vm.expectRevert(abi.encodeWithSelector(IBridge.InvalidTokenConfig.selector)); + bridge().configureToken(address(0xCAFE), some); + } + + function test_Deposit_SkipsDailyLimit_WhenDepositCapZero() public { + IBridge.TokenLimits memory unlimited = + IBridge.TokenLimits({minAmount: tokenLimits.minAmount, deposit: 0, claim: tokenLimits.claim}); + vm.prank(admin); + bridge().configureToken(address(token()), unlimited); + + vm.prank(user); + vm.expectRevert(); + bridge().deposit(address(token()), tokenLimits.minAmount, recipient); + } + + function test_RoleGrants_FromConstructor() public view { + assertTrue(bridge().hasRole(bridge().DEFAULT_ADMIN_ROLE(), admin)); + assertTrue(bridge().hasRole(bridge().PAUSER_ROLE(), admin)); + } + + function test_ConfigureToken_ResetsDailyLimits() public { + vm.prank(user); + bridge().deposit(address(token()), tokenLimits.minAmount, recipient); + (, IBridge.TokenUsage memory dep,) = bridge().tokenData(address(token())); + assertEq(dep.consumed, tokenLimits.minAmount); + vm.prank(admin); + bridge().configureToken(address(token()), tokenLimits); + (, IBridge.TokenUsage memory dep2,) = bridge().tokenData(address(token())); + assertEq(dep2.consumed, 0); + vm.prank(user); + bridge().deposit(address(token()), tokenLimits.minAmount, recipient); + } + + function test_ConfigureToken_DisableToken() public { + vm.prank(user); + bridge().deposit(address(token()), tokenLimits.minAmount, recipient); + vm.prank(admin); + bridge().configureToken(address(token()), IBridge.TokenLimits({minAmount: 1e18, deposit: 0, claim: 0})); + vm.prank(user); + vm.expectRevert(abi.encodeWithSelector(IBridge.DailyLimitExhausted.selector)); + bridge().deposit(address(token()), tokenLimits.minAmount, recipient); + } +} diff --git a/solidity-sdk/bindings/src/mockrequirequorum.rs b/solidity-sdk/bindings/src/mockrequirequorum.rs deleted file mode 100644 index 4e1467d3..00000000 --- a/solidity-sdk/bindings/src/mockrequirequorum.rs +++ /dev/null @@ -1,231 +0,0 @@ -/** - -Generated by the following Solidity interface... -```solidity -interface MockRequireQuorum { - fallback() external; -} -``` - -...which was generated by the following JSON ABI: -```json -[ - { - "type": "fallback", - "stateMutability": "nonpayable" - } -] -```*/ -#[allow( - non_camel_case_types, - non_snake_case, - clippy::pub_underscore_fields, - clippy::style, - clippy::empty_structs_with_brackets -)] -pub mod MockRequireQuorum { - use super::*; - use alloy::sol_types as alloy_sol_types; - /// The creation / init bytecode of the contract. - /// - /// ```text - ///0x6080604052348015600f57600080fd5b506103748061001f6000396000f3fe608060405234801561001057600080fd5b5060003660606000838381019061002791906101dd565b90506100686040518060400160405280600a81526020017f636f6e646974696f6e3a00000000000000000000000000000000000000000000815250826100b4565b806100a8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161009f90610267565b60405180910390fd5b50915050805190602001f35b61014c82826040516024016100ca929190610315565b6040516020818303038152906040527fc3b55635000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050610150565b5050565b6101678161015f61016a61018b565b63ffffffff16565b50565b60006a636f6e736f6c652e6c6f679050600080835160208501845afa505050565b610196819050919050565b61019e610345565b565b600080fd5b60008115159050919050565b6101ba816101a5565b81146101c557600080fd5b50565b6000813590506101d7816101b1565b92915050565b6000602082840312156101f3576101f26101a0565b5b6000610201848285016101c8565b91505092915050565b600082825260208201905092915050565b7f51756f72756d20726571756972656d656e74206e6f74206d6574000000000000600082015250565b6000610251601a8361020a565b915061025c8261021b565b602082019050919050565b6000602082019050818103600083015261028081610244565b9050919050565b600081519050919050565b60005b838110156102b0578082015181840152602081019050610295565b60008484015250505050565b6000601f19601f8301169050919050565b60006102d882610287565b6102e2818561020a565b93506102f2818560208601610292565b6102fb816102bc565b840191505092915050565b61030f816101a5565b82525050565b6000604082019050818103600083015261032f81856102cd565b905061033e6020830184610306565b9392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052605160045260246000fd - /// ``` - #[rustfmt::skip] - #[allow(clippy::all)] - pub static BYTECODE: alloy_sol_types::private::Bytes = alloy_sol_types::private::Bytes::from_static( - b"`\x80`@R4\x80\x15`\x0FW`\0\x80\xFD[Pa\x03t\x80a\0\x1F`\09`\0\xF3\xFE`\x80`@R4\x80\x15a\0\x10W`\0\x80\xFD[P`\x006```\0\x83\x83\x81\x01\x90a\0'\x91\x90a\x01\xDDV[\x90Pa\0h`@Q\x80`@\x01`@R\x80`\n\x81R` \x01\x7Fcondition:\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81RP\x82a\0\xB4V[\x80a\0\xA8W`@Q\x7F\x08\xC3y\xA0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R`\x04\x01a\0\x9F\x90a\x02gV[`@Q\x80\x91\x03\x90\xFD[P\x91PP\x80Q\x90` \x01\xF3[a\x01L\x82\x82`@Q`$\x01a\0\xCA\x92\x91\x90a\x03\x15V[`@Q` \x81\x83\x03\x03\x81R\x90`@R\x7F\xC3\xB5V5\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0{\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x19\x16` \x82\x01\x80Q{\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x83\x81\x83\x16\x17\x83RPPPPa\x01PV[PPV[a\x01g\x81a\x01_a\x01ja\x01\x8BV[c\xFF\xFF\xFF\xFF\x16V[PV[`\0jconsole.log\x90P`\0\x80\x83Q` \x85\x01\x84Z\xFAPPPV[a\x01\x96\x81\x90P\x91\x90PV[a\x01\x9Ea\x03EV[V[`\0\x80\xFD[`\0\x81\x15\x15\x90P\x91\x90PV[a\x01\xBA\x81a\x01\xA5V[\x81\x14a\x01\xC5W`\0\x80\xFD[PV[`\0\x815\x90Pa\x01\xD7\x81a\x01\xB1V[\x92\x91PPV[`\0` \x82\x84\x03\x12\x15a\x01\xF3Wa\x01\xF2a\x01\xA0V[[`\0a\x02\x01\x84\x82\x85\x01a\x01\xC8V[\x91PP\x92\x91PPV[`\0\x82\x82R` \x82\x01\x90P\x92\x91PPV[\x7FQuorum requirement not met\0\0\0\0\0\0`\0\x82\x01RPV[`\0a\x02Q`\x1A\x83a\x02\nV[\x91Pa\x02\\\x82a\x02\x1BV[` \x82\x01\x90P\x91\x90PV[`\0` \x82\x01\x90P\x81\x81\x03`\0\x83\x01Ra\x02\x80\x81a\x02DV[\x90P\x91\x90PV[`\0\x81Q\x90P\x91\x90PV[`\0[\x83\x81\x10\x15a\x02\xB0W\x80\x82\x01Q\x81\x84\x01R` \x81\x01\x90Pa\x02\x95V[`\0\x84\x84\x01RPPPPV[`\0`\x1F\x19`\x1F\x83\x01\x16\x90P\x91\x90PV[`\0a\x02\xD8\x82a\x02\x87V[a\x02\xE2\x81\x85a\x02\nV[\x93Pa\x02\xF2\x81\x85` \x86\x01a\x02\x92V[a\x02\xFB\x81a\x02\xBCV[\x84\x01\x91PP\x92\x91PPV[a\x03\x0F\x81a\x01\xA5V[\x82RPPV[`\0`@\x82\x01\x90P\x81\x81\x03`\0\x83\x01Ra\x03/\x81\x85a\x02\xCDV[\x90Pa\x03>` \x83\x01\x84a\x03\x06V[\x93\x92PPPV[\x7FNH{q\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0`\0R`Q`\x04R`$`\0\xFD", - ); - /// The runtime bytecode of the contract, as deployed on the network. - /// - /// ```text - ///0x608060405234801561001057600080fd5b5060003660606000838381019061002791906101dd565b90506100686040518060400160405280600a81526020017f636f6e646974696f6e3a00000000000000000000000000000000000000000000815250826100b4565b806100a8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161009f90610267565b60405180910390fd5b50915050805190602001f35b61014c82826040516024016100ca929190610315565b6040516020818303038152906040527fc3b55635000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050610150565b5050565b6101678161015f61016a61018b565b63ffffffff16565b50565b60006a636f6e736f6c652e6c6f679050600080835160208501845afa505050565b610196819050919050565b61019e610345565b565b600080fd5b60008115159050919050565b6101ba816101a5565b81146101c557600080fd5b50565b6000813590506101d7816101b1565b92915050565b6000602082840312156101f3576101f26101a0565b5b6000610201848285016101c8565b91505092915050565b600082825260208201905092915050565b7f51756f72756d20726571756972656d656e74206e6f74206d6574000000000000600082015250565b6000610251601a8361020a565b915061025c8261021b565b602082019050919050565b6000602082019050818103600083015261028081610244565b9050919050565b600081519050919050565b60005b838110156102b0578082015181840152602081019050610295565b60008484015250505050565b6000601f19601f8301169050919050565b60006102d882610287565b6102e2818561020a565b93506102f2818560208601610292565b6102fb816102bc565b840191505092915050565b61030f816101a5565b82525050565b6000604082019050818103600083015261032f81856102cd565b905061033e6020830184610306565b9392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052605160045260246000fd - /// ``` - #[rustfmt::skip] - #[allow(clippy::all)] - pub static DEPLOYED_BYTECODE: alloy_sol_types::private::Bytes = alloy_sol_types::private::Bytes::from_static( - b"`\x80`@R4\x80\x15a\0\x10W`\0\x80\xFD[P`\x006```\0\x83\x83\x81\x01\x90a\0'\x91\x90a\x01\xDDV[\x90Pa\0h`@Q\x80`@\x01`@R\x80`\n\x81R` \x01\x7Fcondition:\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81RP\x82a\0\xB4V[\x80a\0\xA8W`@Q\x7F\x08\xC3y\xA0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81R`\x04\x01a\0\x9F\x90a\x02gV[`@Q\x80\x91\x03\x90\xFD[P\x91PP\x80Q\x90` \x01\xF3[a\x01L\x82\x82`@Q`$\x01a\0\xCA\x92\x91\x90a\x03\x15V[`@Q` \x81\x83\x03\x03\x81R\x90`@R\x7F\xC3\xB5V5\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0{\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x19\x16` \x82\x01\x80Q{\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x83\x81\x83\x16\x17\x83RPPPPa\x01PV[PPV[a\x01g\x81a\x01_a\x01ja\x01\x8BV[c\xFF\xFF\xFF\xFF\x16V[PV[`\0jconsole.log\x90P`\0\x80\x83Q` \x85\x01\x84Z\xFAPPPV[a\x01\x96\x81\x90P\x91\x90PV[a\x01\x9Ea\x03EV[V[`\0\x80\xFD[`\0\x81\x15\x15\x90P\x91\x90PV[a\x01\xBA\x81a\x01\xA5V[\x81\x14a\x01\xC5W`\0\x80\xFD[PV[`\0\x815\x90Pa\x01\xD7\x81a\x01\xB1V[\x92\x91PPV[`\0` \x82\x84\x03\x12\x15a\x01\xF3Wa\x01\xF2a\x01\xA0V[[`\0a\x02\x01\x84\x82\x85\x01a\x01\xC8V[\x91PP\x92\x91PPV[`\0\x82\x82R` \x82\x01\x90P\x92\x91PPV[\x7FQuorum requirement not met\0\0\0\0\0\0`\0\x82\x01RPV[`\0a\x02Q`\x1A\x83a\x02\nV[\x91Pa\x02\\\x82a\x02\x1BV[` \x82\x01\x90P\x91\x90PV[`\0` \x82\x01\x90P\x81\x81\x03`\0\x83\x01Ra\x02\x80\x81a\x02DV[\x90P\x91\x90PV[`\0\x81Q\x90P\x91\x90PV[`\0[\x83\x81\x10\x15a\x02\xB0W\x80\x82\x01Q\x81\x84\x01R` \x81\x01\x90Pa\x02\x95V[`\0\x84\x84\x01RPPPPV[`\0`\x1F\x19`\x1F\x83\x01\x16\x90P\x91\x90PV[`\0a\x02\xD8\x82a\x02\x87V[a\x02\xE2\x81\x85a\x02\nV[\x93Pa\x02\xF2\x81\x85` \x86\x01a\x02\x92V[a\x02\xFB\x81a\x02\xBCV[\x84\x01\x91PP\x92\x91PPV[a\x03\x0F\x81a\x01\xA5V[\x82RPPV[`\0`@\x82\x01\x90P\x81\x81\x03`\0\x83\x01Ra\x03/\x81\x85a\x02\xCDV[\x90Pa\x03>` \x83\x01\x84a\x03\x06V[\x93\x92PPPV[\x7FNH{q\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0`\0R`Q`\x04R`$`\0\xFD", - ); - use alloy::contract as alloy_contract; - /**Creates a new wrapper around an on-chain [`MockRequireQuorum`](self) contract instance. - -See the [wrapper's documentation](`MockRequireQuorumInstance`) for more details.*/ - #[inline] - pub const fn new< - T: alloy_contract::private::Transport + ::core::clone::Clone, - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - >( - address: alloy_sol_types::private::Address, - provider: P, - ) -> MockRequireQuorumInstance { - MockRequireQuorumInstance::::new(address, provider) - } - /**Deploys this contract using the given `provider` and constructor arguments, if any. - -Returns a new instance of the contract, if the deployment was successful. - -For more fine-grained control over the deployment process, use [`deploy_builder`] instead.*/ - #[inline] - pub fn deploy< - T: alloy_contract::private::Transport + ::core::clone::Clone, - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - >( - provider: P, - ) -> impl ::core::future::Future< - Output = alloy_contract::Result>, - > { - MockRequireQuorumInstance::::deploy(provider) - } - /**Creates a `RawCallBuilder` for deploying this contract using the given `provider` -and constructor arguments, if any. - -This is a simple wrapper around creating a `RawCallBuilder` with the data set to -the bytecode concatenated with the constructor's ABI-encoded arguments.*/ - #[inline] - pub fn deploy_builder< - T: alloy_contract::private::Transport + ::core::clone::Clone, - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - >(provider: P) -> alloy_contract::RawCallBuilder { - MockRequireQuorumInstance::::deploy_builder(provider) - } - /**A [`MockRequireQuorum`](self) instance. - -Contains type-safe methods for interacting with an on-chain instance of the -[`MockRequireQuorum`](self) contract located at a given `address`, using a given -provider `P`. - -If the contract bytecode is available (see the [`sol!`](alloy_sol_types::sol!) -documentation on how to provide it), the `deploy` and `deploy_builder` methods can -be used to deploy a new instance of the contract. - -See the [module-level documentation](self) for all the available methods.*/ - #[derive(Clone)] - pub struct MockRequireQuorumInstance { - address: alloy_sol_types::private::Address, - provider: P, - _network_transport: ::core::marker::PhantomData<(N, T)>, - } - #[automatically_derived] - impl ::core::fmt::Debug for MockRequireQuorumInstance { - #[inline] - fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { - f.debug_tuple("MockRequireQuorumInstance").field(&self.address).finish() - } - } - /// Instantiation and getters/setters. - #[automatically_derived] - impl< - T: alloy_contract::private::Transport + ::core::clone::Clone, - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > MockRequireQuorumInstance { - /**Creates a new wrapper around an on-chain [`MockRequireQuorum`](self) contract instance. - -See the [wrapper's documentation](`MockRequireQuorumInstance`) for more details.*/ - #[inline] - pub const fn new( - address: alloy_sol_types::private::Address, - provider: P, - ) -> Self { - Self { - address, - provider, - _network_transport: ::core::marker::PhantomData, - } - } - /**Deploys this contract using the given `provider` and constructor arguments, if any. - -Returns a new instance of the contract, if the deployment was successful. - -For more fine-grained control over the deployment process, use [`deploy_builder`] instead.*/ - #[inline] - pub async fn deploy( - provider: P, - ) -> alloy_contract::Result> { - let call_builder = Self::deploy_builder(provider); - let contract_address = call_builder.deploy().await?; - Ok(Self::new(contract_address, call_builder.provider)) - } - /**Creates a `RawCallBuilder` for deploying this contract using the given `provider` -and constructor arguments, if any. - -This is a simple wrapper around creating a `RawCallBuilder` with the data set to -the bytecode concatenated with the constructor's ABI-encoded arguments.*/ - #[inline] - pub fn deploy_builder(provider: P) -> alloy_contract::RawCallBuilder { - alloy_contract::RawCallBuilder::new_raw_deploy( - provider, - ::core::clone::Clone::clone(&BYTECODE), - ) - } - /// Returns a reference to the address. - #[inline] - pub const fn address(&self) -> &alloy_sol_types::private::Address { - &self.address - } - /// Sets the address. - #[inline] - pub fn set_address(&mut self, address: alloy_sol_types::private::Address) { - self.address = address; - } - /// Sets the address and returns `self`. - pub fn at(mut self, address: alloy_sol_types::private::Address) -> Self { - self.set_address(address); - self - } - /// Returns a reference to the provider. - #[inline] - pub const fn provider(&self) -> &P { - &self.provider - } - } - impl MockRequireQuorumInstance { - /// Clones the provider and returns a new instance with the cloned provider. - #[inline] - pub fn with_cloned_provider(self) -> MockRequireQuorumInstance { - MockRequireQuorumInstance { - address: self.address, - provider: ::core::clone::Clone::clone(&self.provider), - _network_transport: ::core::marker::PhantomData, - } - } - } - /// Function calls. - #[automatically_derived] - impl< - T: alloy_contract::private::Transport + ::core::clone::Clone, - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > MockRequireQuorumInstance { - /// Creates a new call builder using this contract instance's provider and address. - /// - /// Note that the call can be any function call, not just those defined in this - /// contract. Prefer using the other methods for building type-safe contract calls. - pub fn call_builder( - &self, - call: &C, - ) -> alloy_contract::SolCallBuilder { - alloy_contract::SolCallBuilder::new_sol(&self.provider, &self.address, call) - } - } - /// Event filters. - #[automatically_derived] - impl< - T: alloy_contract::private::Transport + ::core::clone::Clone, - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > MockRequireQuorumInstance { - /// Creates a new event filter using this contract instance's provider and address. - /// - /// Note that the type can be any event, not just those defined in this contract. - /// Prefer using the other methods for building type-safe event filters. - pub fn event_filter( - &self, - ) -> alloy_contract::Event { - alloy_contract::Event::new_sol(&self.provider, &self.address) - } - } -} diff --git a/solidity-sdk/src/test/podTest.sol b/solidity-sdk/src/test/podTest.sol index 5a5d063d..20a8a254 100644 --- a/solidity-sdk/src/test/podTest.sol +++ b/solidity-sdk/src/test/podTest.sol @@ -4,6 +4,9 @@ pragma solidity ^0.8.0; import {Test} from "forge-std/Test.sol"; import {Time, POD_TIMESTAMP_PRECOMPILE} from "../Time.sol"; import {REQUIRE_QUORUM} from "../Quorum.sol"; +import {EthGetLogsTypes} from "../types/EthGetLogsTypes.sol"; +import {EthGetBlockByNumberTypes} from "../types/EthGetBlockByNumberTypes.sol"; +import {POD_TX_INFO} from "../Context.sol"; abstract contract PodTest is Test { function podMockQuorum() public { @@ -17,4 +20,30 @@ abstract contract PodTest is Test { function podWarp(Time.Timestamp ts) public { vm.mockCall(POD_TIMESTAMP_PRECOMPILE, bytes(""), abi.encode(Time.Timestamp.unwrap(ts))); } + + function podMockEthGetLogs(bytes memory input, bytes memory output) internal { + vm.mockCall(EthGetLogsTypes.PRECOMPILE_ADDRESS, input, output); + } + + function podMockEthGetLogsRevert(bytes memory input) internal { + vm.mockCallRevert(EthGetLogsTypes.PRECOMPILE_ADDRESS, input, bytes("")); + } + + function podMockEthGetBlockByNumber(bytes memory input, bytes memory output) internal { + vm.mockCall(EthGetBlockByNumberTypes.PRECOMPILE_ADDRESS, input, output); + } + + function podMockEthGetBlockByNumberRevert(bytes memory input) internal { + vm.mockCallRevert(EthGetBlockByNumberTypes.PRECOMPILE_ADDRESS, input, bytes("")); + } + + function podMockTxInfo(bytes memory output) internal { + vm.mockCall(POD_TX_INFO, bytes(""), output); + } + + function podMockMintBalance(address recipient, bytes memory input) internal { + vm.mockCall(address(uint160(uint256(keccak256("POD_MINT_BALANCE")))), input, bytes("")); + uint256 amount = abi.decode(input, (uint256)); + vm.deal(recipient, amount); + } } diff --git a/solidity-sdk/src/types/EthGetBlockByNumberTypes.sol b/solidity-sdk/src/types/EthGetBlockByNumberTypes.sol new file mode 100644 index 00000000..d740f2ac --- /dev/null +++ b/solidity-sdk/src/types/EthGetBlockByNumberTypes.sol @@ -0,0 +1,73 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.28; + +library EthGetBlockByNumberTypes { + /** + * @dev The address of the external eth get block by number precompile. + */ + address constant PRECOMPILE_ADDRESS = address(uint160(uint256(keccak256("POD_EXTERNAL_ETH_GET_BLOCK_BY_NUMBER")))); + + /** + * @dev The arguments for the external eth get block by number precompile. + * @param blockNumber The block number to get. + * @param transactionDetailFlag Whether to return full transaction details. + */ + struct RpcArgs { + bytes blockNumber; + bool transactionDetailFlag; + } + + /** + * @dev The arguments for the external eth get block by number precompile. + * @param chainId The chain id to search block by number for. + * @param ethGetBlockByNumberArgs The arguments for the external eth get block by number precompile. + */ + struct PrecompileArgs { + uint256 chainId; + RpcArgs ethGetBlockByNumberArgs; + } + + /** + * @dev The response from the external eth get block by number precompile. + * @param difficulty The difficulty of the block. + * @param extraData The extra data of the block. + * @param gasLimit The gas limit of the block. + * @param gasUsed The gas used of the block. + * @param hash The hash of the block. + * @param logsBloom The logs bloom of the block. + * @param miner The miner of the block. + * @param mixHash The mix hash of the block. + * @param nonce The nonce of the block. + * @param number The number of the block. + * @param parentHash The parent hash of the block. + * @param receiptsRoot The receipts root of the block. + * @param sha3Uncles The sha3 uncles of the block. + * @param size The size of the block. + * @param stateRoot The state root of the block. + * @param timestamp The timestamp of the block. + * @param transactions The transactions of the block. + * @param transactionsRoot The transactions root of the block. + * @param uncles The uncles of the block. + */ + struct RpcBlock { + bytes difficulty; + bytes extraData; + bytes gasLimit; + bytes gasUsed; + bytes32 hash; + bytes logsBloom; + address miner; + bytes32 mixHash; + bytes nonce; + bytes number; + bytes32 parentHash; + bytes32 receiptsRoot; + bytes32 sha3Uncles; + bytes size; + bytes32 stateRoot; + bytes timestamp; + bytes32[] transactions; + bytes32 transactionsRoot; + bytes32[] uncles; + } +} diff --git a/solidity-sdk/src/types/EthGetLogsTypes.sol b/solidity-sdk/src/types/EthGetLogsTypes.sol new file mode 100644 index 00000000..2f7a0a99 --- /dev/null +++ b/solidity-sdk/src/types/EthGetLogsTypes.sol @@ -0,0 +1,59 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.28; + +library EthGetLogsTypes { + /** + * @dev The address of the external eth get logs precompile. + */ + address constant PRECOMPILE_ADDRESS = address(uint160(uint256(keccak256("POD_EXTERNAL_ETH_GET_LOGS")))); + + /** + * @dev The arguments for the external eth get logs precompile. + * @param fromBlock The block number to start searching from. + * @param toBlock The block number to stop searching at. + * @param addr The address to search logs for. + * @param blockHash The block hash to search logs for. + * @param topics The topics to search logs for. + */ + struct RpcArgs { + bytes fromBlock; + bytes toBlock; + address addr; + bytes32 blockHash; + bytes32[] topics; + } + + /** + * @dev The arguments for the external eth get logs precompile. + * @param chainId The chain id to search logs for. + * @param ethGetLogsArgs The arguments for the external eth get logs precompile. + */ + struct PrecompileArgs { + uint256 chainId; + RpcArgs ethGetLogsArgs; + } + + /** + * @dev The response from the external eth get logs precompile. + * @param addr The address of the log. + * @param topics The topics of the log. + * @param data The data of the log. + * @param blockNumber The block number of the log. + * @param transactionHash The transaction hash of the log. + * @param transactionIndex The transaction index of the log. + * @param blockHash The block hash of the log. + * @param logIndex The log index of the log. + * @param removed Whether the log was removed. + */ + struct RpcLog { + address addr; + bytes32[] topics; + bytes data; + bytes blockNumber; + bytes32 transactionHash; + bytes transactionIndex; + bytes32 blockHash; + bytes logIndex; + bool removed; + } +} diff --git a/src b/src deleted file mode 120000 index 694967ad..00000000 --- a/src +++ /dev/null @@ -1 +0,0 @@ -solidity-sdk/src \ No newline at end of file diff --git a/types/src/ledger/log.rs b/types/src/ledger/log.rs index 4b561cf2..bd9bdf90 100644 --- a/types/src/ledger/log.rs +++ b/types/src/ledger/log.rs @@ -168,7 +168,7 @@ mod test { use crate::{AttestedTx, Hashable, Merkleizable, Transaction}; #[tokio::test] - async fn test_verifiable_log_hash_proof() { + async fn test_verifiable_log_hash_proof_single_log() { let log = Log { address: "0x217f5658c6ecc27d439922263ad9bb8e992e0373" .parse() @@ -263,4 +263,117 @@ mod test { assert!(verifiable_log.verify_proof(receipt_root, proof)); assert_eq!(verifiable_log.inner.log_index, Some(0)); } + + #[tokio::test] + async fn test_verifiable_log_hash_proof_multiple_logs() { + let log = Log { + address: "0xbea11c6707c744581a4c885424af376baa7f686c" + .parse() + .unwrap(), + data: LogData::new_unchecked( + vec![ + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef" + .parse() + .unwrap(), + "0x00000000000000000000000013791790bef192d14712d627f13a55c4abee52a4" + .parse() + .unwrap(), + "0x0000000000000000000000000000000000000000000000000000000000000000" + .parse() + .unwrap(), + ], + "0x0000000000000000000000000000000000000000000000000de0b6b3a7640000" + .parse() + .unwrap(), + ), + }; + + let log2 = Log { + address: "0x7eE47822C517C29d49744890f52c624d3AcfdBfc" + .parse() + .unwrap(), + data: LogData::new_unchecked( + vec![ + "05e57fa62d890603d85944c963ddc7fbe77cde5ea69cad7033fc6f76b7ddd2ab" + .parse() + .unwrap(), + "0000000000000000000000000000000000000000000000000000000000000000" + .parse() + .unwrap(), + "0000000000000000000000003b1b6ffac8831f1c1c9a425bb240cd1bbf23f146" + .parse() + .unwrap(), + ], + "0x0000000000000000000000000000000000000000000000056bc75e2d63100000000000000000000000000000006217c47ffa5eb3f3c92247fffe22ad998242c5" + .parse() + .unwrap(), + ), + }; + + let to: Address = "0x12296f2D128530a834460DF6c36a2895B793F26d" + .parse() + .unwrap(); + let transaction = Transaction { + chain_id: 0x50d, + to: TxKind::Call(to.clone()), + nonce: 0, + gas_limit: 201819, + max_fee_per_gas: 1000000000, + max_priority_fee_per_gas: 1000000000, + access_list: Default::default(), + value: U256::ZERO, + input: vec![ + 244, 83, 70, 220, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 190, 161, 28, 103, 7, 199, + 68, 88, 26, 76, 136, 84, 36, 175, 55, 107, 170, 127, 104, 108, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 13, 224, 182, 179, 167, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 19, 121, 23, 144, 190, 241, 146, 209, 71, 18, 214, 39, + 241, 58, 85, 196, 171, 238, 82, 164, + ] + .into(), + }; + let signer = PrivateKeySigner::random(); + + let logs = vec![log.clone(), log2.clone()]; + let logs_tree = logs.to_merkle_tree(); + let logs_root = logs_tree.root(); + + let rpc_log = RPCLog { + inner: log2.clone(), + block_hash: Some(Hash::default()), + block_number: Some(0), + block_timestamp: Some(1742493092), + transaction_hash: Some(transaction.hash_custom()), + transaction_index: Some(0), + log_index: Some(1), + removed: false, + }; + + let verifiable_log = VerifiableLog { + inner: rpc_log, + pod_metadata: PodLogMetadata { + attestations: vec![], + receipt: Receipt { + status: true, + actual_gas_used: 21784, + max_fee_per_gas: transaction.max_fee_per_gas, + logs: logs.clone(), + logs_root, + attested_tx: AttestedTx::success(transaction.hash_custom(), 0), + signer: signer.address(), + to: Some(to), + contract_address: None, + }, + }, + }; + + let proof = verifiable_log.generate_proof().unwrap(); + let receipt_root = verifiable_log + .pod_metadata + .receipt + .to_merkle_tree() + .hash_custom(); + + assert!(verifiable_log.verify_proof(receipt_root, proof)); + assert_eq!(verifiable_log.inner.log_index, Some(1)); + } } diff --git a/types/src/pagination.rs b/types/src/pagination.rs index e818c70a..e2907758 100644 --- a/types/src/pagination.rs +++ b/types/src/pagination.rs @@ -79,9 +79,9 @@ impl TryFrom for CursorPagination { Some(cursor) => { let decoded = base64::engine::general_purpose::STANDARD .decode(&cursor) - .map_err(|e| anyhow!("Failed to decode cursor: {}", e))?; + .map_err(|e| anyhow!("Failed to decode cursor: {e}"))?; let decoded_str = String::from_utf8(decoded) - .map_err(|e| anyhow!("Failed to decode cursor as UTF-8: {}", e))?; + .map_err(|e| anyhow!("Failed to decode cursor as UTF-8: {e}"))?; let parts: Vec<&str> = decoded_str.split('|').collect(); if parts.len() != 2 {