From 24135e3bcbfc2bb255293600cbb2c2f2c27c6d9e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jose=CC=81=20Duarte?= Date: Tue, 24 Mar 2026 14:23:30 +0100 Subject: [PATCH 01/80] Liquidity Indexer PoC --- .gitignore | 3 + CONTEXT_DUMP.md | 79 + Cargo.lock | 29 + Cargo.toml | 1 + crates/e2e/Cargo.toml | 2 + crates/e2e/tests/e2e/main.rs | 1 + crates/e2e/tests/e2e/pool_indexer.rs | 602 ++++++ crates/pool-indexer/Cargo.toml | 46 + crates/pool-indexer/FRONTEND_SPEC.md | 155 ++ crates/pool-indexer/frontend/index.html | 12 + .../pool-indexer/frontend/package-lock.json | 1734 +++++++++++++++++ crates/pool-indexer/frontend/package.json | 22 + crates/pool-indexer/frontend/src/App.css | 328 ++++ crates/pool-indexer/frontend/src/App.tsx | 312 +++ crates/pool-indexer/frontend/src/api.ts | 55 + crates/pool-indexer/frontend/src/main.tsx | 9 + crates/pool-indexer/frontend/src/utils.ts | 63 + crates/pool-indexer/frontend/tsconfig.json | 20 + crates/pool-indexer/frontend/vite.config.ts | 11 + crates/pool-indexer/p.md | 234 +++ crates/pool-indexer/package-lock.json | 6 + crates/pool-indexer/src/api/mod.rs | 30 + crates/pool-indexer/src/api/uniswap_v3.rs | 185 ++ crates/pool-indexer/src/arguments.rs | 28 + crates/pool-indexer/src/config.rs | 91 + crates/pool-indexer/src/db/mod.rs | 1 + crates/pool-indexer/src/db/uniswap_v3.rs | 643 ++++++ crates/pool-indexer/src/indexer/mod.rs | 1 + crates/pool-indexer/src/indexer/uniswap_v3.rs | 881 +++++++++ crates/pool-indexer/src/lib.rs | 9 + crates/pool-indexer/src/main.rs | 12 + crates/pool-indexer/src/run.rs | 84 + crates/pool-indexer/src/seeder.rs | 310 +++ .../sql/V110__pool_indexer_uniswap_v3.sql | 44 + .../sql/V111__pool_indexer_token_symbols.sql | 3 + 35 files changed, 6046 insertions(+) create mode 100644 CONTEXT_DUMP.md create mode 100644 crates/e2e/tests/e2e/pool_indexer.rs create mode 100644 crates/pool-indexer/Cargo.toml create mode 100644 crates/pool-indexer/FRONTEND_SPEC.md create mode 100644 crates/pool-indexer/frontend/index.html create mode 100644 crates/pool-indexer/frontend/package-lock.json create mode 100644 crates/pool-indexer/frontend/package.json create mode 100644 crates/pool-indexer/frontend/src/App.css create mode 100644 crates/pool-indexer/frontend/src/App.tsx create mode 100644 crates/pool-indexer/frontend/src/api.ts create mode 100644 crates/pool-indexer/frontend/src/main.tsx create mode 100644 crates/pool-indexer/frontend/src/utils.ts create mode 100644 crates/pool-indexer/frontend/tsconfig.json create mode 100644 crates/pool-indexer/frontend/vite.config.ts create mode 100644 crates/pool-indexer/p.md create mode 100644 crates/pool-indexer/package-lock.json create mode 100644 crates/pool-indexer/src/api/mod.rs create mode 100644 crates/pool-indexer/src/api/uniswap_v3.rs create mode 100644 crates/pool-indexer/src/arguments.rs create mode 100644 crates/pool-indexer/src/config.rs create mode 100644 crates/pool-indexer/src/db/mod.rs create mode 100644 crates/pool-indexer/src/db/uniswap_v3.rs create mode 100644 crates/pool-indexer/src/indexer/mod.rs create mode 100644 crates/pool-indexer/src/indexer/uniswap_v3.rs create mode 100644 crates/pool-indexer/src/lib.rs create mode 100644 crates/pool-indexer/src/main.rs create mode 100644 crates/pool-indexer/src/run.rs create mode 100644 crates/pool-indexer/src/seeder.rs create mode 100644 database/sql/V110__pool_indexer_uniswap_v3.sql create mode 100644 database/sql/V111__pool_indexer_token_symbols.sql diff --git a/.gitignore b/.gitignore index b86a4933ba..0aeaee4b97 100644 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,6 @@ **/testing.*.toml /playground/.env .env.claude + +crates/pool-indexer/config.mainnet.toml +crates/pool-indexer/frontend/node_modules/ diff --git a/CONTEXT_DUMP.md b/CONTEXT_DUMP.md new file mode 100644 index 0000000000..d7d5f14058 --- /dev/null +++ b/CONTEXT_DUMP.md @@ -0,0 +1,79 @@ +# Context Dump — pool-indexer test fixes + +## What was requested +Fix 4 testing issues in the new `crates/pool-indexer` crate: +1. Add unit tests for `collect_changes` (the pure log-processing function) +2. Fix `local_node_pool_indexer_pagination` — it only created 1 pool, so pagination was never actually tested +3. Improve `checkpoint_resume` — it only checked pool count, not state values +4. Add DB-level unit tests for query functions (deferred — not run by the user's command) + +## Current state: compilation error to fix + +The last `cargo nextest run` failed with: +``` +error[E0599]: no method named `get` found for struct `PgRow` in the current scope + --> crates/e2e/tests/e2e/pool_indexer.rs:399:41 +help: trait `Row` which provides `get` is implemented but not in scope + | +1 + use sqlx::Row; +``` + +### Fix already applied +`sqlx::Row` was added to the import in `pool_indexer.rs`: +```rust +sqlx::{PgPool, Row}, +``` + +The edit was accepted. Then the user interrupted the next test run. So the file should be correct — just need to re-run the tests. + +## Files changed + +### 1. `crates/pool-indexer/src/indexer/uniswap_v3.rs` +- **Extracted** `collect_changes` method body → free function `collect_log_changes(factory, logs, liq_cache, dec_cache, sym_cache) -> ChunkChanges` +- **Method** now delegates: `collect_log_changes(self.factory, logs, liq_cache, dec_cache, sym_cache)` +- **Added** `#[cfg(test)] mod tests { ... }` with 10 unit tests (all passing): + - `empty_logs_produce_empty_changes` + - `pool_created_from_factory_inserted` + - `pool_created_wrong_factory_ignored` + - `initialize_creates_full_state_with_zero_liquidity` + - `swap_creates_full_state` + - `mint_produces_correct_tick_deltas_and_liq_only` + - `mint_after_swap_updates_full_state_liquidity` + - `burn_zeroes_tick_filtered_out` + - `partial_burn_leaves_nonzero_delta` + - `pool_created_and_initialize_same_chunk` + +Note: The user added `SymbolsCache`, `token0_symbol`/`token1_symbol` to `NewPoolData`, `prefetch_symbols` method, etc. while work was ongoing. All these were synced — `collect_log_changes` takes 5 args (factory, logs, liq_cache, dec_cache, sym_cache). + +### 2. `crates/e2e/tests/e2e/pool_indexer.rs` +- **Added** `create_pool(provider, factory_addr, fee) -> Address` helper — creates + initialises a pool in an existing factory using fee as uniqueness key +- **Added** `sqlx::Row` to the use block (needed for `.get()` on PgRow) +- **Fixed `pagination` test**: now deploys 3 pools (fee 500, 3000, 10000) instead of 1 +- **Fixed `checkpoint_resume` test**: after first sync, captures `sqrt_price_x96`, `tick`, `liquidity` from DB; after restart + second sync, asserts all three values are identical + +## Verification so far +- `cargo check -p pool-indexer -p e2e` → clean +- `cargo nextest run -p pool-indexer` → 10/10 unit tests pass +- e2e tests: user interrupted before they ran; need to run: + +```bash +FORK_URL_MAINNET="https://ovh-mainnet-reth-02.nodes.batch.exchange/reth" \ + cargo nextest run -p e2e local_node_pool_indexer \ + --test-threads 1 --failure-output final --run-ignored ignored-only +``` + +## Next step +Run the command above. Fix any failures. Then run `cargo +nightly fmt -- crates/pool-indexer/src/indexer/uniswap_v3.rs crates/e2e/tests/e2e/pool_indexer.rs` when done. + +## Key file locations +- Indexer logic + tests: `crates/pool-indexer/src/indexer/uniswap_v3.rs` +- E2e tests: `crates/e2e/tests/e2e/pool_indexer.rs` +- DB layer: `crates/pool-indexer/src/db/uniswap_v3.rs` +- SQL migration: `database/sql/V110__pool_indexer_uniswap_v3.sql` +- Config: `crates/pool-indexer/src/config.rs` + +## Task list state (tasks 1-3 completed, 4 in_progress) +- #1 ✅ Unit tests for collect_changes +- #2 ✅ Pagination test fixed +- #3 ✅ checkpoint_resume state verification added +- #4 🔄 Run e2e tests + fix failures diff --git a/Cargo.lock b/Cargo.lock index 7c92615f7e..cdce72a3a5 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3076,6 +3076,7 @@ dependencies = [ "number", "observe", "orderbook", + "pool-indexer", "price-estimation", "refunder", "reqwest 0.13.2", @@ -5369,6 +5370,34 @@ version = "0.3.32" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7edddbd0b52d732b21ad9a5fab5c704c14cd949e5e9a1ec5929a24fded1b904c" +[[package]] +name = "pool-indexer" +version = "0.1.0" +dependencies = [ + "alloy", + "alloy-primitives", + "anyhow", + "axum 0.8.8", + "bigdecimal", + "clap", + "contracts", + "ethrpc", + "futures", + "mimalloc", + "num", + "observe", + "reqwest 0.13.2", + "serde", + "serde_json", + "sqlx", + "tikv-jemallocator", + "tokio", + "toml", + "tower-http", + "tracing", + "url", +] + [[package]] name = "portable-atomic" version = "1.13.0" diff --git a/Cargo.toml b/Cargo.toml index 9c31ae436b..43e0c191d0 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -116,6 +116,7 @@ sha2 = "0.10" shared = { path = "crates/shared" } signature-validator = { path = "crates/signature-validator" } simulator = { path = "crates/simulator" } +pool-indexer = { path = "crates/pool-indexer" } solver = { path = "crates/solver" } solvers = { path = "crates/solvers" } solvers-dto = { path = "crates/solvers-dto" } diff --git a/crates/e2e/Cargo.toml b/crates/e2e/Cargo.toml index a66253e7b3..7e8ae904be 100644 --- a/crates/e2e/Cargo.toml +++ b/crates/e2e/Cargo.toml @@ -21,6 +21,7 @@ alloy = { workspace = true, default-features = false, features = [ "signer-local", "signer-mnemonic", "signers", + "contract", "sol-types", "transports" ] } @@ -49,6 +50,7 @@ model = { workspace = true, features = ["e2e"] } number = { workspace = true } observe = { workspace = true } orderbook = { workspace = true, features = ["e2e", "test-util"] } +pool-indexer = { workspace = true } price-estimation = { workspace = true } reqwest = { workspace = true, features = ["blocking", "query"] } serde = { workspace = true } diff --git a/crates/e2e/tests/e2e/main.rs b/crates/e2e/tests/e2e/main.rs index b7e1668b67..feac94cdaf 100644 --- a/crates/e2e/tests/e2e/main.rs +++ b/crates/e2e/tests/e2e/main.rs @@ -30,6 +30,7 @@ mod partial_fill; mod partially_fillable_balance; mod partially_fillable_pool; mod place_order_with_quote; +mod pool_indexer; mod protocol_fee; mod quote_verification; mod quoting; diff --git a/crates/e2e/tests/e2e/pool_indexer.rs b/crates/e2e/tests/e2e/pool_indexer.rs new file mode 100644 index 0000000000..01f62bdcb4 --- /dev/null +++ b/crates/e2e/tests/e2e/pool_indexer.rs @@ -0,0 +1,602 @@ +use { + alloy::{ + network::TransactionBuilder, + primitives::{Address, Bytes, aliases::U160}, + providers::Provider, + rpc::types::TransactionRequest, + sol_types::{SolCall, SolEvent}, + }, + e2e::setup::{TIMEOUT, run_test, wait_for_condition}, + ethrpc::{AlloyProvider, Web3}, + hex_literal::hex, + pool_indexer::config::{ApiConfig, Configuration, DatabaseConfig, IndexerConfig}, + sqlx::{PgPool, Row}, + std::{ + net::{Ipv4Addr, SocketAddr, SocketAddrV4}, + num::NonZeroU32, + sync::Mutex, + time::Duration, + }, +}; + +// Holds the JoinHandle of any currently-running pool-indexer so we can +// abort it even if a previous test panicked before calling handle.abort(). +static CURRENT_HANDLE: Mutex>> = Mutex::new(None); + +const POOL_INDEXER_PORT: u16 = 7778; +const POOL_INDEXER_HOST: &str = "http://127.0.0.1:7778"; +const LOCAL_DB_URL: &str = "postgresql://"; + +// sqrt(1) * 2^96 — valid starting price +const INITIAL_SQRT_PRICE: u128 = 79_228_162_514_264_337_593_543_950_336; + +// ABI types only (no bytecode — deployment uses raw transactions below). +alloy::sol! { + contract MockUniswapV3Factory { + event PoolCreated( + address indexed token0, + address indexed token1, + uint24 indexed fee, + int24 tickSpacing, + address pool + ); + function createPool(address tokenA, address tokenB, uint24 fee) external returns (address pool); + } + + contract MockUniswapV3Pool { + function initialize(uint160 sqrtPriceX96) external; + function mockMint(address owner, int24 tickLower, int24 tickUpper, uint128 amount) external; + } +} + +// Factory bytecode compiled from Solidity via `forge build`. The factory +// embeds the pool constructor so only one bytecode blob is needed. +const FACTORY_BYTECODE: &[u8] = &hex!("6080604052348015600e575f5ffd5b50610b708061001c5f395ff3fe608060405234801561000f575f5ffd5b5060043610610029575f3560e01c8063a16712951461002d575b5f5ffd5b610047600480360381019061004291906101f2565b61005d565b6040516100549190610251565b60405180910390f35b5f5f5f8473ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff161061009a57848661009d565b85855b915091508181856040516100b09061014f565b6100bc93929190610279565b604051809103905ff0801580156100d5573d5f5f3e3d5ffd5b5092508362ffffff168173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f783cca1c0412dd0d695e784568c96da2e9c22ff989357a2e8b1d9b2b4e6b7118600a8760405161013e9291906102fc565b60405180910390a450509392505050565b6108178061032483390190565b5f5ffd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f61018982610160565b9050919050565b6101998161017f565b81146101a3575f5ffd5b50565b5f813590506101b481610190565b92915050565b5f62ffffff82169050919050565b6101d1816101ba565b81146101db575f5ffd5b50565b5f813590506101ec816101c8565b92915050565b5f5f5f606084860312156102095761020861015c565b5b5f610216868287016101a6565b9350506020610227868287016101a6565b9250506040610238868287016101de565b9150509250925092565b61024b8161017f565b82525050565b5f6020820190506102645f830184610242565b92915050565b610273816101ba565b82525050565b5f60608201905061028c5f830186610242565b6102996020830185610242565b6102a6604083018461026a565b949350505050565b5f819050919050565b5f8160020b9050919050565b5f819050919050565b5f6102e66102e16102dc846102ae565b6102c3565b6102b7565b9050919050565b6102f6816102cc565b82525050565b5f60408201905061030f5f8301856102ed565b61031c6020830184610242565b939250505056fe60e060405234801561000f575f5ffd5b5060405161081738038061081783398181016040528101906100319190610149565b8273ffffffffffffffffffffffffffffffffffffffff1660808173ffffffffffffffffffffffffffffffffffffffff16815250508173ffffffffffffffffffffffffffffffffffffffff1660a08173ffffffffffffffffffffffffffffffffffffffff16815250508062ffffff1660c08162ffffff1681525050505050610199565b5f5ffd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f6100e0826100b7565b9050919050565b6100f0816100d6565b81146100fa575f5ffd5b50565b5f8151905061010b816100e7565b92915050565b5f62ffffff82169050919050565b61012881610111565b8114610132575f5ffd5b50565b5f815190506101438161011f565b92915050565b5f5f5f606084860312156101605761015f6100b3565b5b5f61016d868287016100fd565b935050602061017e868287016100fd565b925050604061018f86828701610135565b9150509250925092565b60805160a05160c0516106546101c35f395f61018101525f61015d01525f61011601526106545ff3fe608060405234801561000f575f5ffd5b5060043610610060575f3560e01c80630dfe1681146100645780631a68650214610082578063d21220a7146100a0578063ddca3f43146100be578063efe27fa3146100dc578063f637731d146100f8575b5f5ffd5b61006c610114565b60405161007991906102e1565b60405180910390f35b61008a610138565b6040516100979190610324565b60405180910390f35b6100a861015b565b6040516100b591906102e1565b60405180910390f35b6100c661017f565b6040516100d3919061035a565b60405180910390f35b6100f660048036038101906100f19190610401565b6101a3565b005b610112600480360381019061010d919061048f565b610266565b005b7f000000000000000000000000000000000000000000000000000000000000000081565b5f5f5f9054906101000a90046fffffffffffffffffffffffffffffffff16905090565b7f000000000000000000000000000000000000000000000000000000000000000081565b7f000000000000000000000000000000000000000000000000000000000000000081565b805f5f8282829054906101000a90046fffffffffffffffffffffffffffffffff166101ce91906104e7565b92506101000a8154816fffffffffffffffffffffffffffffffff02191690836fffffffffffffffffffffffffffffffff1602179055508160020b8360020b8573ffffffffffffffffffffffffffffffffffffffff167f7a53080ba414158be7ec69b987b5fb7d07dee101fe85488f0853ae16239d0bde33855f5f6040516102589493929190610575565b60405180910390a450505050565b7f98636036cb66a9c19a37435efc1e90142190214e8abeb821bdba3f2990dd4c95815f6040516102979291906105f7565b60405180910390a150565b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f6102cb826102a2565b9050919050565b6102db816102c1565b82525050565b5f6020820190506102f45f8301846102d2565b92915050565b5f6fffffffffffffffffffffffffffffffff82169050919050565b61031e816102fa565b82525050565b5f6020820190506103375f830184610315565b92915050565b5f62ffffff82169050919050565b6103548161033d565b82525050565b5f60208201905061036d5f83018461034b565b92915050565b5f5ffd5b610380816102c1565b811461038a575f5ffd5b50565b5f8135905061039b81610377565b92915050565b5f8160020b9050919050565b6103b6816103a1565b81146103c0575f5ffd5b50565b5f813590506103d1816103ad565b92915050565b6103e0816102fa565b81146103ea575f5ffd5b50565b5f813590506103fb816103d7565b92915050565b5f5f5f5f6080858703121561041957610418610373565b5b5f6104268782880161038d565b9450506020610437878288016103c3565b9350506040610448878288016103c3565b9250506060610459878288016103ed565b91505092959194509250565b61046e816102a2565b8114610478575f5ffd5b50565b5f8135905061048981610465565b92915050565b5f602082840312156104a4576104a3610373565b5b5f6104b18482850161047b565b91505092915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f6104f1826102fa565b91506104fc836102fa565b925082820190506fffffffffffffffffffffffffffffffff811115610524576105236104ba565b5b92915050565b5f819050919050565b5f819050919050565b5f819050919050565b5f61055f61055a6105558461052a565b61053c565b610533565b9050919050565b61056f81610545565b82525050565b5f6080820190506105885f8301876102d2565b6105956020830186610315565b6105a26040830185610566565b6105af6060830184610566565b95945050505050565b6105c1816102a2565b82525050565b5f6105e16105dc6105d78461052a565b61053c565b6103a1565b9050919050565b6105f1816105c7565b82525050565b5f60408201905061060a5f8301856105b8565b61061760208301846105e8565b939250505056fea264697066735822122010bef78e190e08820279eb6767095a2311ec4bd8c78aaa73b1854f67600215cf64736f6c634300081e0033a264697066735822122096722dfd3fb9e8ac23cc5b777ddf98ccc7720d61c61583a6e33fa33bcd92287164736f6c634300081e0033"); + +// ── helpers +// ─────────────────────────────────────────────────────────────────── + +async fn clear_pool_indexer_tables(db: &PgPool) { + sqlx::query( + "TRUNCATE uniswap_v3_ticks, uniswap_v3_pool_states, uniswap_v3_pools, \ + pool_indexer_checkpoints", + ) + .execute(db) + .await + .unwrap(); +} + +async fn seed_checkpoint(db: &PgPool, factory: Address, block: u64) { + sqlx::query( + "INSERT INTO pool_indexer_checkpoints (chain_id, contract, block_number) + VALUES (1, $1, $2) + ON CONFLICT (chain_id, contract) DO UPDATE SET block_number = EXCLUDED.block_number", + ) + .bind(factory.as_slice()) + .bind(block as i64) + .execute(db) + .await + .unwrap(); +} + +/// Start the pool-indexer. Aborts any previously-running instance first +/// (handles leftover from a prior test that panicked before calling +/// `stop_pool_indexer`). +async fn start_pool_indexer(factory: Address) { + // Abort any handle left over from a previous test that panicked. + if let Some(old) = CURRENT_HANDLE.lock().unwrap().take() { + old.abort(); + } + // Always wait a bit so the previous pool-indexer (if any) has time to + // release port 7778 before we try to bind it again. + tokio::time::sleep(Duration::from_millis(300)).await; + + let config = Configuration { + database: DatabaseConfig { + url: LOCAL_DB_URL.to_owned(), + max_connections: NonZeroU32::new(5).unwrap(), + }, + indexer: IndexerConfig { + chain_id: 1, + rpc_url: "http://127.0.0.1:8545".parse().unwrap(), + factory_address: factory, + chunk_size: 1000, + poll_interval_secs: 1, + use_latest: true, + }, + api: ApiConfig { + bind_address: SocketAddr::V4(SocketAddrV4::new(Ipv4Addr::LOCALHOST, POOL_INDEXER_PORT)), + }, + }; + let handle = tokio::task::spawn(pool_indexer::run(config)); + wait_for_condition(TIMEOUT, || async { + reqwest::get(format!("{POOL_INDEXER_HOST}/health")) + .await + .is_ok_and(|r| r.status().is_success()) + }) + .await + .expect("pool-indexer API did not come up"); + *CURRENT_HANDLE.lock().unwrap() = Some(handle); +} + +fn stop_pool_indexer() { + if let Some(h) = CURRENT_HANDLE.lock().unwrap().take() { + h.abort(); + } +} + +async fn deploy_raw(provider: &AlloyProvider, bytecode: &[u8]) -> Address { + let tx = TransactionRequest::default().with_deploy_code(Bytes::copy_from_slice(bytecode)); + provider + .send_transaction(tx) + .await + .unwrap() + .get_receipt() + .await + .unwrap() + .contract_address + .unwrap() +} + +async fn send_call(provider: &AlloyProvider, to: Address, calldata: Vec) { + let tx = TransactionRequest::default() + .with_to(to) + .with_input(Bytes::from(calldata)); + provider + .send_transaction(tx) + .await + .unwrap() + .get_receipt() + .await + .unwrap(); +} + +/// Create and initialise a single pool inside an already-deployed factory. +/// `fee` must be unique within the factory for token0/token1 ([1u8;20], +/// [2u8;20]). +async fn create_pool(provider: &AlloyProvider, factory_addr: Address, fee: u32) -> Address { + let token0 = Address::from([1u8; 20]); + let token1 = Address::from([2u8; 20]); + + send_call( + provider, + factory_addr, + MockUniswapV3Factory::createPoolCall { + tokenA: token0, + tokenB: token1, + fee: alloy::primitives::aliases::U24::from(fee), + } + .abi_encode(), + ) + .await; + + let block = provider.get_block_number().await.unwrap(); + let logs = provider + .get_logs( + &alloy::rpc::types::Filter::new() + .from_block(block) + .to_block(block) + .event_signature(MockUniswapV3Factory::PoolCreated::SIGNATURE_HASH), + ) + .await + .unwrap(); + let pool_addr = MockUniswapV3Factory::PoolCreated::decode_log(&logs[0].inner) + .unwrap() + .data + .pool; + + send_call( + provider, + pool_addr, + MockUniswapV3Pool::initializeCall { + sqrtPriceX96: U160::from(INITIAL_SQRT_PRICE), + } + .abi_encode(), + ) + .await; + + send_call( + provider, + pool_addr, + MockUniswapV3Pool::mockMintCall { + owner: token0, + tickLower: alloy::primitives::aliases::I24::try_from(-100i32).unwrap(), + tickUpper: alloy::primitives::aliases::I24::try_from(100i32).unwrap(), + amount: 1_000_000u128, + } + .abi_encode(), + ) + .await; + + pool_addr +} + +/// Deploy mock V3 contracts and set up a pool with liquidity. +/// Returns `(factory_address, pool_address)`. +async fn deploy_v3(web3: &Web3) -> (Address, Address) { + let provider = &web3.provider; + + let factory_addr = deploy_raw(provider, FACTORY_BYTECODE).await; + + // Two fixed addresses used as token0/token1 (sorted). + let token0 = Address::from([1u8; 20]); + let token1 = Address::from([2u8; 20]); + debug_assert!(token0 < token1, "tokens must be sorted"); + + // createPool(token0, token1, 500) → emits PoolCreated + deploys pool. + send_call( + provider, + factory_addr, + MockUniswapV3Factory::createPoolCall { + tokenA: token0, + tokenB: token1, + fee: alloy::primitives::aliases::U24::from(500u32), + } + .abi_encode(), + ) + .await; + + // Read pool address from the PoolCreated log. + let block = provider.get_block_number().await.unwrap(); + let logs = provider + .get_logs( + &alloy::rpc::types::Filter::new() + .from_block(block) + .to_block(block) + .event_signature(MockUniswapV3Factory::PoolCreated::SIGNATURE_HASH), + ) + .await + .unwrap(); + let pool_addr = MockUniswapV3Factory::PoolCreated::decode_log(&logs[0].inner) + .unwrap() + .data + .pool; + + // initialize(sqrtPriceX96) → emits Initialize. + send_call( + provider, + pool_addr, + MockUniswapV3Pool::initializeCall { + sqrtPriceX96: U160::from(INITIAL_SQRT_PRICE), + } + .abi_encode(), + ) + .await; + + // mockMint(...) → emits Mint (indexer also calls pool.liquidity() after). + send_call( + provider, + pool_addr, + MockUniswapV3Pool::mockMintCall { + owner: token0, + tickLower: alloy::primitives::aliases::I24::try_from(-100i32).unwrap(), + tickUpper: alloy::primitives::aliases::I24::try_from(100i32).unwrap(), + amount: 1_000_000u128, + } + .abi_encode(), + ) + .await; + + (factory_addr, pool_addr) +} + +// ── Tests ───────────────────────────────────────────────────────────────────── + +#[tokio::test] +#[ignore] +async fn local_node_pool_indexer_happy_path() { + run_test(happy_path).await; +} + +async fn happy_path(web3: Web3) { + let db = PgPool::connect(LOCAL_DB_URL).await.unwrap(); + clear_pool_indexer_tables(&db).await; + + let (factory, pool_addr) = deploy_v3(&web3).await; + let head = web3.provider.get_block_number().await.unwrap(); + + seed_checkpoint(&db, factory, 0).await; + start_pool_indexer(factory).await; + + wait_for_condition(TIMEOUT, || async { + let resp = reqwest::get(format!("{POOL_INDEXER_HOST}/api/v1/uniswap/v3/pools")) + .await + .ok()?; + let body: serde_json::Value = resp.json().await.ok()?; + Some(body["block_number"].as_u64()? >= head) + }) + .await + .expect("indexer did not reach head block in time"); + + let resp: serde_json::Value = + reqwest::get(format!("{POOL_INDEXER_HOST}/api/v1/uniswap/v3/pools")) + .await + .unwrap() + .json() + .await + .unwrap(); + + let pools = resp["pools"].as_array().unwrap(); + assert!(!pools.is_empty()); + let our_pool = pools + .iter() + .find(|p| { + p["id"] + .as_str() + .unwrap() + .eq_ignore_ascii_case(&format!("{pool_addr:?}")) + }) + .expect("deployed pool not found in /pools response"); + assert_eq!(our_pool["fee_tier"].as_str().unwrap(), "500"); + assert_ne!(our_pool["sqrt_price"].as_str().unwrap(), "0"); + + let resp: serde_json::Value = reqwest::get(format!( + "{POOL_INDEXER_HOST}/api/v1/uniswap/v3/pools/{pool_addr:?}/ticks" + )) + .await + .unwrap() + .json() + .await + .unwrap(); + assert!( + !resp["ticks"].as_array().unwrap().is_empty(), + "expected ticks from Mint event" + ); + + let count: i64 = sqlx::query_scalar("SELECT COUNT(*) FROM uniswap_v3_pools WHERE chain_id = 1") + .fetch_one(&db) + .await + .unwrap(); + assert!(count > 0); + + stop_pool_indexer(); +} + +// ── Test 2: checkpoint resume +// ───────────────────────────────────────────────── + +#[tokio::test] +#[ignore] +async fn local_node_pool_indexer_checkpoint_resume() { + run_test(checkpoint_resume).await; +} + +async fn checkpoint_resume(web3: Web3) { + let db = PgPool::connect(LOCAL_DB_URL).await.unwrap(); + clear_pool_indexer_tables(&db).await; + + let (factory, pool_addr) = deploy_v3(&web3).await; + let head = web3.provider.get_block_number().await.unwrap(); + seed_checkpoint(&db, factory, 0).await; + + start_pool_indexer(factory).await; + wait_for_condition(TIMEOUT, || async { + let resp = reqwest::get(format!("{POOL_INDEXER_HOST}/api/v1/uniswap/v3/pools")) + .await + .ok()?; + let body: serde_json::Value = resp.json().await.ok()?; + Some(body["block_number"].as_u64()? >= head) + }) + .await + .expect("first run did not reach head"); + + let pool_count: i64 = + sqlx::query_scalar("SELECT COUNT(*) FROM uniswap_v3_pools WHERE chain_id = 1") + .fetch_one(&db) + .await + .unwrap(); + + // Capture pool state after first sync for comparison after restart. + let row = sqlx::query( + "SELECT sqrt_price_x96::TEXT AS price, tick, liquidity::TEXT AS liq + FROM uniswap_v3_pool_states + WHERE chain_id = 1 AND pool_address = $1", + ) + .bind(pool_addr.as_slice()) + .fetch_one(&db) + .await + .unwrap(); + let sqrt_price_before: String = row.get("price"); + let tick_before: i32 = row.get("tick"); + let liquidity_before: String = row.get("liq"); + + // stop_pool_indexer aborts and clears CURRENT_HANDLE; start_pool_indexer + // will see no old handle, so no extra sleep needed. + stop_pool_indexer(); + + start_pool_indexer(factory).await; + wait_for_condition(TIMEOUT, || async { + let resp = reqwest::get(format!("{POOL_INDEXER_HOST}/api/v1/uniswap/v3/pools")) + .await + .ok()?; + let body: serde_json::Value = resp.json().await.ok()?; + Some(body["block_number"].as_u64()? >= head) + }) + .await + .expect("second run did not reach head"); + + let pool_count_after: i64 = + sqlx::query_scalar("SELECT COUNT(*) FROM uniswap_v3_pools WHERE chain_id = 1") + .fetch_one(&db) + .await + .unwrap(); + + assert_eq!( + pool_count, pool_count_after, + "pool count changed after restart — idempotency violation" + ); + + // State must be identical after restart — re-indexing must not corrupt values. + let row_after = sqlx::query( + "SELECT sqrt_price_x96::TEXT AS price, tick, liquidity::TEXT AS liq + FROM uniswap_v3_pool_states + WHERE chain_id = 1 AND pool_address = $1", + ) + .bind(pool_addr.as_slice()) + .fetch_one(&db) + .await + .unwrap(); + assert_eq!( + sqrt_price_before, + row_after.get::("price"), + "sqrt_price changed after restart" + ); + assert_eq!( + tick_before, + row_after.get::("tick"), + "tick changed after restart" + ); + assert_eq!( + liquidity_before, + row_after.get::("liq"), + "liquidity changed after restart" + ); + + let checkpoint: i64 = sqlx::query_scalar( + "SELECT block_number FROM pool_indexer_checkpoints + WHERE chain_id = 1 AND contract = $1", + ) + .bind(factory.as_slice()) + .fetch_one(&db) + .await + .unwrap(); + assert!(checkpoint as u64 >= head); + + stop_pool_indexer(); +} + +// ── Test 3: API error handling +// ──────────────────────────────────────────────── + +#[tokio::test] +#[ignore] +async fn local_node_pool_indexer_api_errors() { + run_test(api_errors).await; +} + +async fn api_errors(web3: Web3) { + let db = PgPool::connect(LOCAL_DB_URL).await.unwrap(); + clear_pool_indexer_tables(&db).await; + + let (factory, _pool_addr) = deploy_v3(&web3).await; + let head = web3.provider.get_block_number().await.unwrap(); + + seed_checkpoint(&db, factory, 0).await; + start_pool_indexer(factory).await; + + wait_for_condition(TIMEOUT, || async { + let resp = reqwest::get(format!("{POOL_INDEXER_HOST}/api/v1/uniswap/v3/pools")) + .await + .ok()?; + let body: serde_json::Value = resp.json().await.ok()?; + Some(body["block_number"].as_u64()? >= head) + }) + .await + .expect("indexer did not reach head"); + + // Invalid address → 400. + let status = reqwest::get(format!( + "{POOL_INDEXER_HOST}/api/v1/uniswap/v3/pools/not-an-address/ticks" + )) + .await + .unwrap() + .status(); + assert_eq!(u16::from(status), 400, "expected 400 for invalid address"); + + // Valid but unknown address → 200 with empty ticks array. + let unknown = Address::from([0xABu8; 20]); + let resp: serde_json::Value = reqwest::get(format!( + "{POOL_INDEXER_HOST}/api/v1/uniswap/v3/pools/{unknown:?}/ticks" + )) + .await + .unwrap() + .json() + .await + .unwrap(); + assert_eq!( + resp["ticks"].as_array().unwrap().len(), + 0, + "expected empty ticks for unknown pool" + ); + + stop_pool_indexer(); +} + +// ── Test 4: pagination +// ──────────────────────────────────────────────────────── + +#[tokio::test] +#[ignore] +async fn local_node_pool_indexer_pagination() { + run_test(pagination).await; +} + +async fn pagination(web3: Web3) { + let db = PgPool::connect(LOCAL_DB_URL).await.unwrap(); + clear_pool_indexer_tables(&db).await; + + // Deploy factory + 3 pools (different fee tiers) so pagination has >1 page + // to traverse with limit=1. + let (factory, _pool1) = deploy_v3(&web3).await; + create_pool(&web3.provider, factory, 3000).await; + create_pool(&web3.provider, factory, 10_000).await; + let head = web3.provider.get_block_number().await.unwrap(); + seed_checkpoint(&db, factory, 0).await; + + start_pool_indexer(factory).await; + + wait_for_condition(TIMEOUT, || async { + let resp = reqwest::get(format!("{POOL_INDEXER_HOST}/api/v1/uniswap/v3/pools")) + .await + .ok()?; + let body: serde_json::Value = resp.json().await.ok()?; + Some(body["block_number"].as_u64()? >= head) + }) + .await + .expect("indexer did not reach head"); + + let mut all_ids: Vec = Vec::new(); + let mut cursor: Option = None; + + loop { + let url = match &cursor { + None => format!("{POOL_INDEXER_HOST}/api/v1/uniswap/v3/pools?limit=1"), + Some(c) => format!("{POOL_INDEXER_HOST}/api/v1/uniswap/v3/pools?limit=1&after={c}"), + }; + let resp: serde_json::Value = reqwest::get(&url).await.unwrap().json().await.unwrap(); + let pools = resp["pools"].as_array().unwrap(); + if pools.is_empty() { + break; + } + for p in pools { + all_ids.push(p["id"].as_str().unwrap().to_owned()); + } + cursor = resp["next_cursor"].as_str().map(|s| s.to_owned()); + if cursor.is_none() { + break; + } + } + + let db_count: i64 = + sqlx::query_scalar("SELECT COUNT(*) FROM uniswap_v3_pools WHERE chain_id = 1") + .fetch_one(&db) + .await + .unwrap(); + assert_eq!( + all_ids.len() as i64, + db_count, + "paginated count doesn't match DB" + ); + assert!( + db_count >= 3, + "expected at least 3 pools for a meaningful pagination test" + ); + let unique: std::collections::HashSet<_> = all_ids.iter().collect(); + assert_eq!( + unique.len(), + all_ids.len(), + "pagination returned duplicates" + ); + + stop_pool_indexer(); +} diff --git a/crates/pool-indexer/Cargo.toml b/crates/pool-indexer/Cargo.toml new file mode 100644 index 0000000000..65f69060f3 --- /dev/null +++ b/crates/pool-indexer/Cargo.toml @@ -0,0 +1,46 @@ +[package] +name = "pool-indexer" +version = "0.1.0" +authors = ["Cow Protocol Developers "] +edition = "2024" +license = "GPL-3.0-or-later" + +[lib] +doctest = false +name = "pool_indexer" +path = "src/lib.rs" + +[[bin]] +name = "pool-indexer" +path = "src/main.rs" + +[dependencies] +alloy = { workspace = true, features = ["providers", "rpc-types", "sol-types"] } +alloy-primitives = { workspace = true, features = ["std"] } +anyhow = { workspace = true } +axum = { workspace = true } +bigdecimal = { workspace = true } +clap = { workspace = true } +contracts = { workspace = true } +ethrpc = { workspace = true } +futures = { workspace = true } +mimalloc = { workspace = true, optional = true } +num = { workspace = true } +observe = { workspace = true } +reqwest = { workspace = true, features = ["json"] } +serde = { workspace = true } +serde_json = { workspace = true } +sqlx = { workspace = true } +tikv-jemallocator = { workspace = true } +tokio = { workspace = true, features = ["macros", "rt-multi-thread", "signal", "sync", "time"] } +toml = { workspace = true } +tower-http = { workspace = true, features = ["trace"] } +tracing = { workspace = true } +url = { workspace = true } + +[features] +mimalloc-allocator = ["dep:mimalloc"] +tokio-console = ["observe/tokio-console"] + +[lints] +workspace = true diff --git a/crates/pool-indexer/FRONTEND_SPEC.md b/crates/pool-indexer/FRONTEND_SPEC.md new file mode 100644 index 0000000000..98cc7c689e --- /dev/null +++ b/crates/pool-indexer/FRONTEND_SPEC.md @@ -0,0 +1,155 @@ +# Pool Indexer — Frontend Developer Spec + +## What is it? + +`pool-indexer` is a self-hosted Rust microservice that replaces the Uniswap V3 subgraph on The Graph. It reads directly from an Ethereum RPC node, stores Uniswap V3 pool state in Postgres, and exposes a REST API. + +**Why it exists:** The Graph has reliability issues (rate limits, outages, chain support gaps). This is a drop-in replacement with the same data, served reliably from our own infrastructure. + +**Current scope:** Uniswap V3 only. Balancer V2 planned but not implemented. + +--- + +## Base URL + +``` +http://:7777 +``` + +Default port is `7777`. Configured via `bind-address` in the service config. + +--- + +## Endpoints + +### `GET /health` + +Liveness check. + +**Response:** `200 OK` (no body) + +--- + +### `GET /api/v1/uniswap/v3/pools` + +Returns all known Uniswap V3 pools with their current state (price, liquidity, tick). Uses cursor-based pagination. + +**Query parameters:** + +| Name | Type | Required | Default | Description | +|---------|--------|----------|---------|----------------------------------------------------| +| `after` | string | no | — | Cursor: the `id` (address) of the last seen pool | +| `limit` | int | no | 1000 | Page size. Clamped to `[1, 5000]` | + +**Response `200 OK`:** +```json +{ + "block_number": 21800000, + "pools": [ + { + "id": "0x8ad599c3a0ff1de082011efddc58f1908eb6e6d8", + "token0": { + "id": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48", + "decimals": 6 + }, + "token1": { + "id": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", + "decimals": 18 + }, + "fee_tier": "3000", + "liquidity": "12345678901234", + "sqrt_price": "1234567890123456789", + "tick": -201234, + "ticks": null + } + ], + "next_cursor": "0x8ad599c3a0ff1de082011efddc58f1908eb6e6d8" +} +``` + +**Field notes:** + +- `block_number` — the latest fully-indexed finalized block. Use this to know how fresh the data is. +- `id`, `token0.id`, `token1.id` — checksummed Ethereum addresses (`0x`-prefixed hex). +- `fee_tier` — fee in parts-per-million as a string. Common values: `"500"` (0.05%), `"3000"` (0.3%), `"10000"` (1%). +- `liquidity` — current active liquidity as a decimal string (uint128). Can be large; treat as `BigInt` or use a big-number library. +- `sqrt_price` — `sqrtPriceX96` as a decimal string (uint160). This is the square root of the price in Q64.96 fixed-point format. To get human price: `(sqrtPrice / 2^96)^2`, then adjust for decimal differences between token0 and token1. +- `tick` — current tick index (signed int32). Determines the current price bucket. +- `ticks` — always `null` in this endpoint. Use the dedicated `/ticks` endpoint per pool. +- `next_cursor` — the address to pass as `after` for the next page. `null` when on the last page. + +**Pagination example:** +``` +GET /api/v1/uniswap/v3/pools?limit=500 +→ { "next_cursor": "0xabc...", "pools": [...] } + +GET /api/v1/uniswap/v3/pools?limit=500&after=0xabc... +→ { "next_cursor": null, "pools": [...] } +``` + +**Error responses:** +- `400 Bad Request` — `{"error": "invalid cursor"}` if `after` is not a valid address. +- `503 Service Unavailable` — indexer hasn't processed any blocks yet (cold start). +- `500 Internal Server Error` — unexpected DB error. + +--- + +### `GET /api/v1/uniswap/v3/pools/{pool_address}/ticks` + +Returns all active ticks for a specific pool. Ticks define the liquidity boundaries within the pool. + +**Path parameter:** +- `pool_address` — checksummed or lowercase hex address (`0x...`) + +**Response `200 OK`:** +```json +{ + "block_number": 21800000, + "pool": "0x8ad599c3a0ff1de082011efddc58f1908eb6e6d8", + "ticks": [ + { "tick_idx": -887272, "liquidity_net": "1000000000000" }, + { "tick_idx": -201240, "liquidity_net": "-500000000000" }, + { "tick_idx": 887272, "liquidity_net": "-1000000000000" } + ] +} +``` + +**Field notes:** +- `ticks` — sorted ascending by `tick_idx`. Only active ticks are present; ticks with `liquidity_net == 0` are pruned automatically. +- `liquidity_net` — signed int128 as a decimal string. Positive means liquidity is added when the price crosses this tick going right (up); negative means liquidity is removed. A standard Uniswap V3 liquidity math library will consume this directly. +- `block_number` — same semantics as the pools endpoint. + +**Error responses:** +- `400 Bad Request` — `{"error": "invalid pool address"}` if the path param isn't a valid address. +- `503 Service Unavailable` — not yet indexed. +- `500 Internal Server Error` — unexpected DB error. + +--- + +## Data freshness + +The service only indexes **finalized blocks** (no reorg handling). On mainnet, "finalized" lags the chain tip by ~2 epochs (~12 minutes). The `block_number` field in every response tells you exactly how current the data is. + +--- + +## Key numbers to know + +| Concept | Value | +|---|---| +| Default port | `7777` | +| Mainnet Uniswap V3 factory | `0x1F98431c8aD98523631AE4a59f267346ea31F984` | +| Fee tiers (ppm) | `100`, `500`, `3000`, `10000` | +| `sqrtPriceX96` precision | Q64.96 (divide by `2^96` to get the raw sqrt price) | +| `liquidity` type | uint128 (max ~3.4 × 10³⁸) | +| `liquidity_net` type | int128 (signed, max ~1.7 × 10³⁸) | +| Tick range | `[-887272, 887272]` | + +--- + +## Notes for UI implementation + +1. **Big numbers:** `liquidity`, `sqrt_price`, and `liquidity_net` are all returned as decimal strings because they exceed JavaScript's safe integer range. Use `BigInt` or a library like `ethers.js` / `viem` for arithmetic. +2. **Price from sqrtPriceX96:** `price = (sqrtPriceX96 / 2n**96n) ** 2`, then adjust: `humanPrice = price * 10n**(token0Decimals - token1Decimals)`. +3. **Pagination:** Fetch all pools by following `next_cursor` until it's `null`. The service supports up to 5000 per page. +4. **No `block` filter on queries:** Unlike the subgraph, these endpoints always return the latest indexed state — there is no point-in-time query by block number (despite `block` being mentioned in the original plan spec, it is not implemented in the current code). +5. **503 on cold start:** If the indexer just launched and hasn't finished its first block range, all endpoints return `503`. Implement a retry or loading state. diff --git a/crates/pool-indexer/frontend/index.html b/crates/pool-indexer/frontend/index.html new file mode 100644 index 0000000000..4158eae05d --- /dev/null +++ b/crates/pool-indexer/frontend/index.html @@ -0,0 +1,12 @@ + + + + + + Pool Indexer + + +
+ + + diff --git a/crates/pool-indexer/frontend/package-lock.json b/crates/pool-indexer/frontend/package-lock.json new file mode 100644 index 0000000000..6d4187c34c --- /dev/null +++ b/crates/pool-indexer/frontend/package-lock.json @@ -0,0 +1,1734 @@ +{ + "name": "pool-indexer-ui", + "version": "0.1.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "pool-indexer-ui", + "version": "0.1.0", + "dependencies": { + "react": "^18.3.1", + "react-dom": "^18.3.1" + }, + "devDependencies": { + "@types/react": "^18.3.5", + "@types/react-dom": "^18.3.0", + "@vitejs/plugin-react": "^4.3.1", + "typescript": "^5.5.3", + "vite": "^5.4.2" + } + }, + "node_modules/@babel/code-frame": { + "version": "7.29.0", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.29.0.tgz", + "integrity": "sha512-9NhCeYjq9+3uxgdtp20LSiJXJvN0FeCtNGpJxuMFZ1Kv3cWUNb6DOhJwUvcVCzKGR66cw4njwM6hrJLqgOwbcw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-validator-identifier": "^7.28.5", + "js-tokens": "^4.0.0", + "picocolors": "^1.1.1" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/compat-data": { + "version": "7.29.0", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.29.0.tgz", + "integrity": "sha512-T1NCJqT/j9+cn8fvkt7jtwbLBfLC/1y1c7NtCeXFRgzGTsafi68MRv8yzkYSapBnFA6L3U2VSc02ciDzoAJhJg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/core": { + "version": "7.29.0", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.29.0.tgz", + "integrity": "sha512-CGOfOJqWjg2qW/Mb6zNsDm+u5vFQ8DxXfbM09z69p5Z6+mE1ikP2jUXw+j42Pf1XTYED2Rni5f95npYeuwMDQA==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "@babel/code-frame": "^7.29.0", + "@babel/generator": "^7.29.0", + "@babel/helper-compilation-targets": "^7.28.6", + "@babel/helper-module-transforms": "^7.28.6", + "@babel/helpers": "^7.28.6", + "@babel/parser": "^7.29.0", + "@babel/template": "^7.28.6", + "@babel/traverse": "^7.29.0", + "@babel/types": "^7.29.0", + "@jridgewell/remapping": "^2.3.5", + "convert-source-map": "^2.0.0", + "debug": "^4.1.0", + "gensync": "^1.0.0-beta.2", + "json5": "^2.2.3", + "semver": "^6.3.1" + }, + "engines": { + "node": ">=6.9.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/babel" + } + }, + "node_modules/@babel/generator": { + "version": "7.29.1", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.29.1.tgz", + "integrity": "sha512-qsaF+9Qcm2Qv8SRIMMscAvG4O3lJ0F1GuMo5HR/Bp02LopNgnZBC/EkbevHFeGs4ls/oPz9v+Bsmzbkbe+0dUw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/parser": "^7.29.0", + "@babel/types": "^7.29.0", + "@jridgewell/gen-mapping": "^0.3.12", + "@jridgewell/trace-mapping": "^0.3.28", + "jsesc": "^3.0.2" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-compilation-targets": { + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.28.6.tgz", + "integrity": "sha512-JYtls3hqi15fcx5GaSNL7SCTJ2MNmjrkHXg4FSpOA/grxK8KwyZ5bubHsCq8FXCkua6xhuaaBit+3b7+VZRfcA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/compat-data": "^7.28.6", + "@babel/helper-validator-option": "^7.27.1", + "browserslist": "^4.24.0", + "lru-cache": "^5.1.1", + "semver": "^6.3.1" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-globals": { + "version": "7.28.0", + "resolved": "https://registry.npmjs.org/@babel/helper-globals/-/helper-globals-7.28.0.tgz", + "integrity": "sha512-+W6cISkXFa1jXsDEdYA8HeevQT/FULhxzR99pxphltZcVaugps53THCeiWA8SguxxpSp3gKPiuYfSWopkLQ4hw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-module-imports": { + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.28.6.tgz", + "integrity": "sha512-l5XkZK7r7wa9LucGw9LwZyyCUscb4x37JWTPz7swwFE/0FMQAGpiWUZn8u9DzkSBWEcK25jmvubfpw2dnAMdbw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/traverse": "^7.28.6", + "@babel/types": "^7.28.6" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-module-transforms": { + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.28.6.tgz", + "integrity": "sha512-67oXFAYr2cDLDVGLXTEABjdBJZ6drElUSI7WKp70NrpyISso3plG9SAGEF6y7zbha/wOzUByWWTJvEDVNIUGcA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-module-imports": "^7.28.6", + "@babel/helper-validator-identifier": "^7.28.5", + "@babel/traverse": "^7.28.6" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/@babel/helper-plugin-utils": { + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.28.6.tgz", + "integrity": "sha512-S9gzZ/bz83GRysI7gAD4wPT/AI3uCnY+9xn+Mx/KPs2JwHJIz1W8PZkg2cqyt3RNOBM8ejcXhV6y8Og7ly/Dug==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-string-parser": { + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.27.1.tgz", + "integrity": "sha512-qMlSxKbpRlAridDExk92nSobyDdpPijUq2DW6oDnUqd0iOGxmQjyqhMIihI9+zv4LPyZdRje2cavWPbCbWm3eA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-validator-identifier": { + "version": "7.28.5", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.28.5.tgz", + "integrity": "sha512-qSs4ifwzKJSV39ucNjsvc6WVHs6b7S03sOh2OcHF9UHfVPqWWALUsNUVzhSBiItjRZoLHx7nIarVjqKVusUZ1Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-validator-option": { + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.27.1.tgz", + "integrity": "sha512-YvjJow9FxbhFFKDSuFnVCe2WxXk1zWc22fFePVNEaWJEu8IrZVlda6N0uHwzZrUM1il7NC9Mlp4MaJYbYd9JSg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helpers": { + "version": "7.29.2", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.29.2.tgz", + "integrity": "sha512-HoGuUs4sCZNezVEKdVcwqmZN8GoHirLUcLaYVNBK2J0DadGtdcqgr3BCbvH8+XUo4NGjNl3VOtSjEKNzqfFgKw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/template": "^7.28.6", + "@babel/types": "^7.29.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/parser": { + "version": "7.29.2", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.29.2.tgz", + "integrity": "sha512-4GgRzy/+fsBa72/RZVJmGKPmZu9Byn8o4MoLpmNe1m8ZfYnz5emHLQz3U4gLud6Zwl0RZIcgiLD7Uq7ySFuDLA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/types": "^7.29.0" + }, + "bin": { + "parser": "bin/babel-parser.js" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@babel/plugin-transform-react-jsx-self": { + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx-self/-/plugin-transform-react-jsx-self-7.27.1.tgz", + "integrity": "sha512-6UzkCs+ejGdZ5mFFC/OCUrv028ab2fp1znZmCZjAOBKiBK2jXD1O+BPSfX8X2qjJ75fZBMSnQn3Rq2mrBJK2mw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.27.1" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-react-jsx-source": { + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx-source/-/plugin-transform-react-jsx-source-7.27.1.tgz", + "integrity": "sha512-zbwoTsBruTeKB9hSq73ha66iFeJHuaFkUbwvqElnygoNbj/jHRsSeokowZFN3CZ64IvEqcmmkVe89OPXc7ldAw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.27.1" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/template": { + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.28.6.tgz", + "integrity": "sha512-YA6Ma2KsCdGb+WC6UpBVFJGXL58MDA6oyONbjyF/+5sBgxY/dwkhLogbMT2GXXyU84/IhRw/2D1Os1B/giz+BQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/code-frame": "^7.28.6", + "@babel/parser": "^7.28.6", + "@babel/types": "^7.28.6" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/traverse": { + "version": "7.29.0", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.29.0.tgz", + "integrity": "sha512-4HPiQr0X7+waHfyXPZpWPfWL/J7dcN1mx9gL6WdQVMbPnF3+ZhSMs8tCxN7oHddJE9fhNE7+lxdnlyemKfJRuA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/code-frame": "^7.29.0", + "@babel/generator": "^7.29.0", + "@babel/helper-globals": "^7.28.0", + "@babel/parser": "^7.29.0", + "@babel/template": "^7.28.6", + "@babel/types": "^7.29.0", + "debug": "^4.3.1" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/types": { + "version": "7.29.0", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.29.0.tgz", + "integrity": "sha512-LwdZHpScM4Qz8Xw2iKSzS+cfglZzJGvofQICy7W7v4caru4EaAmyUuO6BGrbyQ2mYV11W0U8j5mBhd14dd3B0A==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-string-parser": "^7.27.1", + "@babel/helper-validator-identifier": "^7.28.5" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@esbuild/aix-ppc64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.21.5.tgz", + "integrity": "sha512-1SDgH6ZSPTlggy1yI6+Dbkiz8xzpHJEVAlF/AM1tHPLsf5STom9rwtjE4hKAF20FfXXNTFqEYXyJNWh1GiZedQ==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "aix" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/android-arm": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.21.5.tgz", + "integrity": "sha512-vCPvzSjpPHEi1siZdlvAlsPxXl7WbOVUBBAowWug4rJHb68Ox8KualB+1ocNvT5fjv6wpkX6o/iEpbDrf68zcg==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/android-arm64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.21.5.tgz", + "integrity": "sha512-c0uX9VAUBQ7dTDCjq+wdyGLowMdtR/GoC2U5IYk/7D1H1JYC0qseD7+11iMP2mRLN9RcCMRcjC4YMclCzGwS/A==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/android-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.21.5.tgz", + "integrity": "sha512-D7aPRUUNHRBwHxzxRvp856rjUHRFW1SdQATKXH2hqA0kAZb1hKmi02OpYRacl0TxIGz/ZmXWlbZgjwWYaCakTA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/darwin-arm64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.21.5.tgz", + "integrity": "sha512-DwqXqZyuk5AiWWf3UfLiRDJ5EDd49zg6O9wclZ7kUMv2WRFr4HKjXp/5t8JZ11QbQfUS6/cRCKGwYhtNAY88kQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/darwin-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.21.5.tgz", + "integrity": "sha512-se/JjF8NlmKVG4kNIuyWMV/22ZaerB+qaSi5MdrXtd6R08kvs2qCN4C09miupktDitvh8jRFflwGFBQcxZRjbw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/freebsd-arm64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.21.5.tgz", + "integrity": "sha512-5JcRxxRDUJLX8JXp/wcBCy3pENnCgBR9bN6JsY4OmhfUtIHe3ZW0mawA7+RDAcMLrMIZaf03NlQiX9DGyB8h4g==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/freebsd-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.21.5.tgz", + "integrity": "sha512-J95kNBj1zkbMXtHVH29bBriQygMXqoVQOQYA+ISs0/2l3T9/kj42ow2mpqerRBxDJnmkUDCaQT/dfNXWX/ZZCQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-arm": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.21.5.tgz", + "integrity": "sha512-bPb5AHZtbeNGjCKVZ9UGqGwo8EUu4cLq68E95A53KlxAPRmUyYv2D6F0uUI65XisGOL1hBP5mTronbgo+0bFcA==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-arm64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.21.5.tgz", + "integrity": "sha512-ibKvmyYzKsBeX8d8I7MH/TMfWDXBF3db4qM6sy+7re0YXya+K1cem3on9XgdT2EQGMu4hQyZhan7TeQ8XkGp4Q==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-ia32": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.21.5.tgz", + "integrity": "sha512-YvjXDqLRqPDl2dvRODYmmhz4rPeVKYvppfGYKSNGdyZkA01046pLWyRKKI3ax8fbJoK5QbxblURkwK/MWY18Tg==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-loong64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.21.5.tgz", + "integrity": "sha512-uHf1BmMG8qEvzdrzAqg2SIG/02+4/DHB6a9Kbya0XDvwDEKCoC8ZRWI5JJvNdUjtciBGFQ5PuBlpEOXQj+JQSg==", + "cpu": [ + "loong64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-mips64el": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.21.5.tgz", + "integrity": "sha512-IajOmO+KJK23bj52dFSNCMsz1QP1DqM6cwLUv3W1QwyxkyIWecfafnI555fvSGqEKwjMXVLokcV5ygHW5b3Jbg==", + "cpu": [ + "mips64el" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-ppc64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.21.5.tgz", + "integrity": "sha512-1hHV/Z4OEfMwpLO8rp7CvlhBDnjsC3CttJXIhBi+5Aj5r+MBvy4egg7wCbe//hSsT+RvDAG7s81tAvpL2XAE4w==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-riscv64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.21.5.tgz", + "integrity": "sha512-2HdXDMd9GMgTGrPWnJzP2ALSokE/0O5HhTUvWIbD3YdjME8JwvSCnNGBnTThKGEB91OZhzrJ4qIIxk/SBmyDDA==", + "cpu": [ + "riscv64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-s390x": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.21.5.tgz", + "integrity": "sha512-zus5sxzqBJD3eXxwvjN1yQkRepANgxE9lgOW2qLnmr8ikMTphkjgXu1HR01K4FJg8h1kEEDAqDcZQtbrRnB41A==", + "cpu": [ + "s390x" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.21.5.tgz", + "integrity": "sha512-1rYdTpyv03iycF1+BhzrzQJCdOuAOtaqHTWJZCWvijKD2N5Xu0TtVC8/+1faWqcP9iBCWOmjmhoH94dH82BxPQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/netbsd-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.21.5.tgz", + "integrity": "sha512-Woi2MXzXjMULccIwMnLciyZH4nCIMpWQAs049KEeMvOcNADVxo0UBIQPfSmxB3CWKedngg7sWZdLvLczpe0tLg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/openbsd-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.21.5.tgz", + "integrity": "sha512-HLNNw99xsvx12lFBUwoT8EVCsSvRNDVxNpjZ7bPn947b8gJPzeHWyNVhFsaerc0n3TsbOINvRP2byTZ5LKezow==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/sunos-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.21.5.tgz", + "integrity": "sha512-6+gjmFpfy0BHU5Tpptkuh8+uw3mnrvgs+dSPQXQOv3ekbordwnzTVEb4qnIvQcYXq6gzkyTnoZ9dZG+D4garKg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "sunos" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/win32-arm64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.21.5.tgz", + "integrity": "sha512-Z0gOTd75VvXqyq7nsl93zwahcTROgqvuAcYDUr+vOv8uHhNSKROyU961kgtCD1e95IqPKSQKH7tBTslnS3tA8A==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/win32-ia32": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.21.5.tgz", + "integrity": "sha512-SWXFF1CL2RVNMaVs+BBClwtfZSvDgtL//G/smwAc5oVK/UPu2Gu9tIaRgFmYFFKrmg3SyAjSrElf0TiJ1v8fYA==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/win32-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.21.5.tgz", + "integrity": "sha512-tQd/1efJuzPC6rCFwEvLtci/xNFcTZknmXs98FYDfGE4wP9ClFV98nyKrzJKVPMhdDnjzLhdUyMX4PsQAPjwIw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@jridgewell/gen-mapping": { + "version": "0.3.13", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.13.tgz", + "integrity": "sha512-2kkt/7niJ6MgEPxF0bYdQ6etZaA+fQvDcLKckhy1yIQOzaoKjBBjSj63/aLVjYE3qhRt5dvM+uUyfCg6UKCBbA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/sourcemap-codec": "^1.5.0", + "@jridgewell/trace-mapping": "^0.3.24" + } + }, + "node_modules/@jridgewell/remapping": { + "version": "2.3.5", + "resolved": "https://registry.npmjs.org/@jridgewell/remapping/-/remapping-2.3.5.tgz", + "integrity": "sha512-LI9u/+laYG4Ds1TDKSJW2YPrIlcVYOwi2fUC6xB43lueCjgxV4lffOCZCtYFiH6TNOX+tQKXx97T4IKHbhyHEQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/gen-mapping": "^0.3.5", + "@jridgewell/trace-mapping": "^0.3.24" + } + }, + "node_modules/@jridgewell/resolve-uri": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", + "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/sourcemap-codec": { + "version": "1.5.5", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.5.tgz", + "integrity": "sha512-cYQ9310grqxueWbl+WuIUIaiUaDcj7WOq5fVhEljNVgRfOUhY9fy2zTvfoqWsnebh8Sl70VScFbICvJnLKB0Og==", + "dev": true, + "license": "MIT" + }, + "node_modules/@jridgewell/trace-mapping": { + "version": "0.3.31", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.31.tgz", + "integrity": "sha512-zzNR+SdQSDJzc8joaeP8QQoCQr8NuYx2dIIytl1QeBEZHJ9uW6hebsrYgbz8hJwUQao3TWCMtmfV8Nu1twOLAw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/resolve-uri": "^3.1.0", + "@jridgewell/sourcemap-codec": "^1.4.14" + } + }, + "node_modules/@rolldown/pluginutils": { + "version": "1.0.0-beta.27", + "resolved": "https://registry.npmjs.org/@rolldown/pluginutils/-/pluginutils-1.0.0-beta.27.tgz", + "integrity": "sha512-+d0F4MKMCbeVUJwG96uQ4SgAznZNSq93I3V+9NHA4OpvqG8mRCpGdKmK8l/dl02h2CCDHwW2FqilnTyDcAnqjA==", + "dev": true, + "license": "MIT" + }, + "node_modules/@rollup/rollup-android-arm-eabi": { + "version": "4.60.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.60.0.tgz", + "integrity": "sha512-WOhNW9K8bR3kf4zLxbfg6Pxu2ybOUbB2AjMDHSQx86LIF4rH4Ft7vmMwNt0loO0eonglSNy4cpD3MKXXKQu0/A==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ] + }, + "node_modules/@rollup/rollup-android-arm64": { + "version": "4.60.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.60.0.tgz", + "integrity": "sha512-u6JHLll5QKRvjciE78bQXDmqRqNs5M/3GVqZeMwvmjaNODJih/WIrJlFVEihvV0MiYFmd+ZyPr9wxOVbPAG2Iw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ] + }, + "node_modules/@rollup/rollup-darwin-arm64": { + "version": "4.60.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.60.0.tgz", + "integrity": "sha512-qEF7CsKKzSRc20Ciu2Zw1wRrBz4g56F7r/vRwY430UPp/nt1x21Q/fpJ9N5l47WWvJlkNCPJz3QRVw008fi7yA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@rollup/rollup-darwin-x64": { + "version": "4.60.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.60.0.tgz", + "integrity": "sha512-WADYozJ4QCnXCH4wPB+3FuGmDPoFseVCUrANmA5LWwGmC6FL14BWC7pcq+FstOZv3baGX65tZ378uT6WG8ynTw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@rollup/rollup-freebsd-arm64": { + "version": "4.60.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.60.0.tgz", + "integrity": "sha512-6b8wGHJlDrGeSE3aH5mGNHBjA0TTkxdoNHik5EkvPHCt351XnigA4pS7Wsj/Eo9Y8RBU6f35cjN9SYmCFBtzxw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ] + }, + "node_modules/@rollup/rollup-freebsd-x64": { + "version": "4.60.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.60.0.tgz", + "integrity": "sha512-h25Ga0t4jaylMB8M/JKAyrvvfxGRjnPQIR8lnCayyzEjEOx2EJIlIiMbhpWxDRKGKF8jbNH01NnN663dH638mA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ] + }, + "node_modules/@rollup/rollup-linux-arm-gnueabihf": { + "version": "4.60.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.60.0.tgz", + "integrity": "sha512-RzeBwv0B3qtVBWtcuABtSuCzToo2IEAIQrcyB/b2zMvBWVbjo8bZDjACUpnaafaxhTw2W+imQbP2BD1usasK4g==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm-musleabihf": { + "version": "4.60.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.60.0.tgz", + "integrity": "sha512-Sf7zusNI2CIU1HLzuu9Tc5YGAHEZs5Lu7N1ssJG4Tkw6e0MEsN7NdjUDDfGNHy2IU+ENyWT+L2obgWiguWibWQ==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm64-gnu": { + "version": "4.60.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.60.0.tgz", + "integrity": "sha512-DX2x7CMcrJzsE91q7/O02IJQ5/aLkVtYFryqCjduJhUfGKG6yJV8hxaw8pZa93lLEpPTP/ohdN4wFz7yp/ry9A==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm64-musl": { + "version": "4.60.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.60.0.tgz", + "integrity": "sha512-09EL+yFVbJZlhcQfShpswwRZ0Rg+z/CsSELFCnPt3iK+iqwGsI4zht3secj5vLEs957QvFFXnzAT0FFPIxSrkQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-loong64-gnu": { + "version": "4.60.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loong64-gnu/-/rollup-linux-loong64-gnu-4.60.0.tgz", + "integrity": "sha512-i9IcCMPr3EXm8EQg5jnja0Zyc1iFxJjZWlb4wr7U2Wx/GrddOuEafxRdMPRYVaXjgbhvqalp6np07hN1w9kAKw==", + "cpu": [ + "loong64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-loong64-musl": { + "version": "4.60.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loong64-musl/-/rollup-linux-loong64-musl-4.60.0.tgz", + "integrity": "sha512-DGzdJK9kyJ+B78MCkWeGnpXJ91tK/iKA6HwHxF4TAlPIY7GXEvMe8hBFRgdrR9Ly4qebR/7gfUs9y2IoaVEyog==", + "cpu": [ + "loong64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-ppc64-gnu": { + "version": "4.60.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-gnu/-/rollup-linux-ppc64-gnu-4.60.0.tgz", + "integrity": "sha512-RwpnLsqC8qbS8z1H1AxBA1H6qknR4YpPR9w2XX0vo2Sz10miu57PkNcnHVaZkbqyw/kUWfKMI73jhmfi9BRMUQ==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-ppc64-musl": { + "version": "4.60.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-musl/-/rollup-linux-ppc64-musl-4.60.0.tgz", + "integrity": "sha512-Z8pPf54Ly3aqtdWC3G4rFigZgNvd+qJlOE52fmko3KST9SoGfAdSRCwyoyG05q1HrrAblLbk1/PSIV+80/pxLg==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-riscv64-gnu": { + "version": "4.60.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.60.0.tgz", + "integrity": "sha512-3a3qQustp3COCGvnP4SvrMHnPQ9d1vzCakQVRTliaz8cIp/wULGjiGpbcqrkv0WrHTEp8bQD/B3HBjzujVWLOA==", + "cpu": [ + "riscv64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-riscv64-musl": { + "version": "4.60.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-musl/-/rollup-linux-riscv64-musl-4.60.0.tgz", + "integrity": "sha512-pjZDsVH/1VsghMJ2/kAaxt6dL0psT6ZexQVrijczOf+PeP2BUqTHYejk3l6TlPRydggINOeNRhvpLa0AYpCWSQ==", + "cpu": [ + "riscv64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-s390x-gnu": { + "version": "4.60.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.60.0.tgz", + "integrity": "sha512-3ObQs0BhvPgiUVZrN7gqCSvmFuMWvWvsjG5ayJ3Lraqv+2KhOsp+pUbigqbeWqueGIsnn+09HBw27rJ+gYK4VQ==", + "cpu": [ + "s390x" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-x64-gnu": { + "version": "4.60.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.60.0.tgz", + "integrity": "sha512-EtylprDtQPdS5rXvAayrNDYoJhIz1/vzN2fEubo3yLE7tfAw+948dO0g4M0vkTVFhKojnF+n6C8bDNe+gDRdTg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-x64-musl": { + "version": "4.60.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.60.0.tgz", + "integrity": "sha512-k09oiRCi/bHU9UVFqD17r3eJR9bn03TyKraCrlz5ULFJGdJGi7VOmm9jl44vOJvRJ6P7WuBi/s2A97LxxHGIdw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-openbsd-x64": { + "version": "4.60.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-openbsd-x64/-/rollup-openbsd-x64-4.60.0.tgz", + "integrity": "sha512-1o/0/pIhozoSaDJoDcec+IVLbnRtQmHwPV730+AOD29lHEEo4F5BEUB24H0OBdhbBBDwIOSuf7vgg0Ywxdfiiw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ] + }, + "node_modules/@rollup/rollup-openharmony-arm64": { + "version": "4.60.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-openharmony-arm64/-/rollup-openharmony-arm64-4.60.0.tgz", + "integrity": "sha512-pESDkos/PDzYwtyzB5p/UoNU/8fJo68vcXM9ZW2V0kjYayj1KaaUfi1NmTUTUpMn4UhU4gTuK8gIaFO4UGuMbA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openharmony" + ] + }, + "node_modules/@rollup/rollup-win32-arm64-msvc": { + "version": "4.60.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.60.0.tgz", + "integrity": "sha512-hj1wFStD7B1YBeYmvY+lWXZ7ey73YGPcViMShYikqKT1GtstIKQAtfUI6yrzPjAy/O7pO0VLXGmUVWXQMaYgTQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@rollup/rollup-win32-ia32-msvc": { + "version": "4.60.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.60.0.tgz", + "integrity": "sha512-SyaIPFoxmUPlNDq5EHkTbiKzmSEmq/gOYFI/3HHJ8iS/v1mbugVa7dXUzcJGQfoytp9DJFLhHH4U3/eTy2Bq4w==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@rollup/rollup-win32-x64-gnu": { + "version": "4.60.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-gnu/-/rollup-win32-x64-gnu-4.60.0.tgz", + "integrity": "sha512-RdcryEfzZr+lAr5kRm2ucN9aVlCCa2QNq4hXelZxb8GG0NJSazq44Z3PCCc8wISRuCVnGs0lQJVX5Vp6fKA+IA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@rollup/rollup-win32-x64-msvc": { + "version": "4.60.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.60.0.tgz", + "integrity": "sha512-PrsWNQ8BuE00O3Xsx3ALh2Df8fAj9+cvvX9AIA6o4KpATR98c9mud4XtDWVvsEuyia5U4tVSTKygawyJkjm60w==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@types/babel__core": { + "version": "7.20.5", + "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.20.5.tgz", + "integrity": "sha512-qoQprZvz5wQFJwMDqeseRXWv3rqMvhgpbXFfVyWhbx9X47POIA6i/+dXefEmZKoAgOaTdaIgNSMqMIU61yRyzA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/parser": "^7.20.7", + "@babel/types": "^7.20.7", + "@types/babel__generator": "*", + "@types/babel__template": "*", + "@types/babel__traverse": "*" + } + }, + "node_modules/@types/babel__generator": { + "version": "7.27.0", + "resolved": "https://registry.npmjs.org/@types/babel__generator/-/babel__generator-7.27.0.tgz", + "integrity": "sha512-ufFd2Xi92OAVPYsy+P4n7/U7e68fex0+Ee8gSG9KX7eo084CWiQ4sdxktvdl0bOPupXtVJPY19zk6EwWqUQ8lg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/types": "^7.0.0" + } + }, + "node_modules/@types/babel__template": { + "version": "7.4.4", + "resolved": "https://registry.npmjs.org/@types/babel__template/-/babel__template-7.4.4.tgz", + "integrity": "sha512-h/NUaSyG5EyxBIp8YRxo4RMe2/qQgvyowRwVMzhYhBCONbW8PUsg4lkFMrhgZhUe5z3L3MiLDuvyJ/CaPa2A8A==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/parser": "^7.1.0", + "@babel/types": "^7.0.0" + } + }, + "node_modules/@types/babel__traverse": { + "version": "7.28.0", + "resolved": "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.28.0.tgz", + "integrity": "sha512-8PvcXf70gTDZBgt9ptxJ8elBeBjcLOAcOtoO/mPJjtji1+CdGbHgm77om1GrsPxsiE+uXIpNSK64UYaIwQXd4Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/types": "^7.28.2" + } + }, + "node_modules/@types/estree": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.8.tgz", + "integrity": "sha512-dWHzHa2WqEXI/O1E9OjrocMTKJl2mSrEolh1Iomrv6U+JuNwaHXsXx9bLu5gG7BUWFIN0skIQJQ/L1rIex4X6w==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/prop-types": { + "version": "15.7.15", + "resolved": "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.15.tgz", + "integrity": "sha512-F6bEyamV9jKGAFBEmlQnesRPGOQqS2+Uwi0Em15xenOxHaf2hv6L8YCVn3rPdPJOiJfPiCnLIRyvwVaqMY3MIw==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/react": { + "version": "18.3.28", + "resolved": "https://registry.npmjs.org/@types/react/-/react-18.3.28.tgz", + "integrity": "sha512-z9VXpC7MWrhfWipitjNdgCauoMLRdIILQsAEV+ZesIzBq/oUlxk0m3ApZuMFCXdnS4U7KrI+l3WRUEGQ8K1QKw==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "@types/prop-types": "*", + "csstype": "^3.2.2" + } + }, + "node_modules/@types/react-dom": { + "version": "18.3.7", + "resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-18.3.7.tgz", + "integrity": "sha512-MEe3UeoENYVFXzoXEWsvcpg6ZvlrFNlOQ7EOsvhI3CfAXwzPfO8Qwuxd40nepsYKqyyVQnTdEfv68q91yLcKrQ==", + "dev": true, + "license": "MIT", + "peerDependencies": { + "@types/react": "^18.0.0" + } + }, + "node_modules/@vitejs/plugin-react": { + "version": "4.7.0", + "resolved": "https://registry.npmjs.org/@vitejs/plugin-react/-/plugin-react-4.7.0.tgz", + "integrity": "sha512-gUu9hwfWvvEDBBmgtAowQCojwZmJ5mcLn3aufeCsitijs3+f2NsrPtlAWIR6OPiqljl96GVCUbLe0HyqIpVaoA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/core": "^7.28.0", + "@babel/plugin-transform-react-jsx-self": "^7.27.1", + "@babel/plugin-transform-react-jsx-source": "^7.27.1", + "@rolldown/pluginutils": "1.0.0-beta.27", + "@types/babel__core": "^7.20.5", + "react-refresh": "^0.17.0" + }, + "engines": { + "node": "^14.18.0 || >=16.0.0" + }, + "peerDependencies": { + "vite": "^4.2.0 || ^5.0.0 || ^6.0.0 || ^7.0.0" + } + }, + "node_modules/baseline-browser-mapping": { + "version": "2.10.10", + "resolved": "https://registry.npmjs.org/baseline-browser-mapping/-/baseline-browser-mapping-2.10.10.tgz", + "integrity": "sha512-sUoJ3IMxx4AyRqO4MLeHlnGDkyXRoUG0/AI9fjK+vS72ekpV0yWVY7O0BVjmBcRtkNcsAO2QDZ4tdKKGoI6YaQ==", + "dev": true, + "license": "Apache-2.0", + "bin": { + "baseline-browser-mapping": "dist/cli.cjs" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/browserslist": { + "version": "4.28.1", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.28.1.tgz", + "integrity": "sha512-ZC5Bd0LgJXgwGqUknZY/vkUQ04r8NXnJZ3yYi4vDmSiZmC/pdSN0NbNRPxZpbtO4uAfDUAFffO8IZoM3Gj8IkA==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/browserslist" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "peer": true, + "dependencies": { + "baseline-browser-mapping": "^2.9.0", + "caniuse-lite": "^1.0.30001759", + "electron-to-chromium": "^1.5.263", + "node-releases": "^2.0.27", + "update-browserslist-db": "^1.2.0" + }, + "bin": { + "browserslist": "cli.js" + }, + "engines": { + "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" + } + }, + "node_modules/caniuse-lite": { + "version": "1.0.30001781", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001781.tgz", + "integrity": "sha512-RdwNCyMsNBftLjW6w01z8bKEvT6e/5tpPVEgtn22TiLGlstHOVecsX2KHFkD5e/vRnIE4EGzpuIODb3mtswtkw==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/caniuse-lite" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "CC-BY-4.0" + }, + "node_modules/convert-source-map": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz", + "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==", + "dev": true, + "license": "MIT" + }, + "node_modules/csstype": { + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.2.3.tgz", + "integrity": "sha512-z1HGKcYy2xA8AGQfwrn0PAy+PB7X/GSj3UVJW9qKyn43xWa+gl5nXmU4qqLMRzWVLFC8KusUX8T/0kCiOYpAIQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/debug": { + "version": "4.4.3", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz", + "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ms": "^2.1.3" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/electron-to-chromium": { + "version": "1.5.322", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.322.tgz", + "integrity": "sha512-vFU34OcrvMcH66T+dYC3G4nURmgfDVewMIu6Q2urXpumAPSMmzvcn04KVVV8Opikq8Vs5nUbO/8laNhNRqSzYw==", + "dev": true, + "license": "ISC" + }, + "node_modules/esbuild": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.21.5.tgz", + "integrity": "sha512-mg3OPMV4hXywwpoDxu3Qda5xCKQi+vCTZq8S9J/EpkhB2HzKXq4SNFZE3+NK93JYxc8VMSep+lOUSC/RVKaBqw==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "bin": { + "esbuild": "bin/esbuild" + }, + "engines": { + "node": ">=12" + }, + "optionalDependencies": { + "@esbuild/aix-ppc64": "0.21.5", + "@esbuild/android-arm": "0.21.5", + "@esbuild/android-arm64": "0.21.5", + "@esbuild/android-x64": "0.21.5", + "@esbuild/darwin-arm64": "0.21.5", + "@esbuild/darwin-x64": "0.21.5", + "@esbuild/freebsd-arm64": "0.21.5", + "@esbuild/freebsd-x64": "0.21.5", + "@esbuild/linux-arm": "0.21.5", + "@esbuild/linux-arm64": "0.21.5", + "@esbuild/linux-ia32": "0.21.5", + "@esbuild/linux-loong64": "0.21.5", + "@esbuild/linux-mips64el": "0.21.5", + "@esbuild/linux-ppc64": "0.21.5", + "@esbuild/linux-riscv64": "0.21.5", + "@esbuild/linux-s390x": "0.21.5", + "@esbuild/linux-x64": "0.21.5", + "@esbuild/netbsd-x64": "0.21.5", + "@esbuild/openbsd-x64": "0.21.5", + "@esbuild/sunos-x64": "0.21.5", + "@esbuild/win32-arm64": "0.21.5", + "@esbuild/win32-ia32": "0.21.5", + "@esbuild/win32-x64": "0.21.5" + } + }, + "node_modules/escalade": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz", + "integrity": "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/fsevents": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", + "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, + "node_modules/gensync": { + "version": "1.0.0-beta.2", + "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", + "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/js-tokens": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", + "license": "MIT" + }, + "node_modules/jsesc": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-3.1.0.tgz", + "integrity": "sha512-/sM3dO2FOzXjKQhJuo0Q173wf2KOo8t4I8vHy6lF9poUp7bKT0/NHE8fPX23PwfhnykfqnC2xRxOnVw5XuGIaA==", + "dev": true, + "license": "MIT", + "bin": { + "jsesc": "bin/jsesc" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/json5": { + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", + "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", + "dev": true, + "license": "MIT", + "bin": { + "json5": "lib/cli.js" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/loose-envify": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", + "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==", + "license": "MIT", + "dependencies": { + "js-tokens": "^3.0.0 || ^4.0.0" + }, + "bin": { + "loose-envify": "cli.js" + } + }, + "node_modules/lru-cache": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", + "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", + "dev": true, + "license": "ISC", + "dependencies": { + "yallist": "^3.0.2" + } + }, + "node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "dev": true, + "license": "MIT" + }, + "node_modules/nanoid": { + "version": "3.3.11", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.11.tgz", + "integrity": "sha512-N8SpfPUnUp1bK+PMYW8qSWdl9U+wwNWI4QKxOYDy9JAro3WMX7p2OeVRF9v+347pnakNevPmiHhNmZ2HbFA76w==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "bin": { + "nanoid": "bin/nanoid.cjs" + }, + "engines": { + "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" + } + }, + "node_modules/node-releases": { + "version": "2.0.36", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.36.tgz", + "integrity": "sha512-TdC8FSgHz8Mwtw9g5L4gR/Sh9XhSP/0DEkQxfEFXOpiul5IiHgHan2VhYYb6agDSfp4KuvltmGApc8HMgUrIkA==", + "dev": true, + "license": "MIT" + }, + "node_modules/picocolors": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", + "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==", + "dev": true, + "license": "ISC" + }, + "node_modules/postcss": { + "version": "8.5.8", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.8.tgz", + "integrity": "sha512-OW/rX8O/jXnm82Ey1k44pObPtdblfiuWnrd8X7GJ7emImCOstunGbXUpp7HdBrFQX6rJzn3sPT397Wp5aCwCHg==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/postcss" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "dependencies": { + "nanoid": "^3.3.11", + "picocolors": "^1.1.1", + "source-map-js": "^1.2.1" + }, + "engines": { + "node": "^10 || ^12 || >=14" + } + }, + "node_modules/react": { + "version": "18.3.1", + "resolved": "https://registry.npmjs.org/react/-/react-18.3.1.tgz", + "integrity": "sha512-wS+hAgJShR0KhEvPJArfuPVN1+Hz1t0Y6n5jLrGQbkb4urgPE/0Rve+1kMB1v/oWgHgm4WIcV+i7F2pTVj+2iQ==", + "license": "MIT", + "peer": true, + "dependencies": { + "loose-envify": "^1.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/react-dom": { + "version": "18.3.1", + "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-18.3.1.tgz", + "integrity": "sha512-5m4nQKp+rZRb09LNH59GM4BxTh9251/ylbKIbpe7TpGxfJ+9kv6BLkLBXIjjspbgbnIBNqlI23tRnTWT0snUIw==", + "license": "MIT", + "dependencies": { + "loose-envify": "^1.1.0", + "scheduler": "^0.23.2" + }, + "peerDependencies": { + "react": "^18.3.1" + } + }, + "node_modules/react-refresh": { + "version": "0.17.0", + "resolved": "https://registry.npmjs.org/react-refresh/-/react-refresh-0.17.0.tgz", + "integrity": "sha512-z6F7K9bV85EfseRCp2bzrpyQ0Gkw1uLoCel9XBVWPg/TjRj94SkJzUTGfOa4bs7iJvBWtQG0Wq7wnI0syw3EBQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/rollup": { + "version": "4.60.0", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.60.0.tgz", + "integrity": "sha512-yqjxruMGBQJ2gG4HtjZtAfXArHomazDHoFwFFmZZl0r7Pdo7qCIXKqKHZc8yeoMgzJJ+pO6pEEHa+V7uzWlrAQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/estree": "1.0.8" + }, + "bin": { + "rollup": "dist/bin/rollup" + }, + "engines": { + "node": ">=18.0.0", + "npm": ">=8.0.0" + }, + "optionalDependencies": { + "@rollup/rollup-android-arm-eabi": "4.60.0", + "@rollup/rollup-android-arm64": "4.60.0", + "@rollup/rollup-darwin-arm64": "4.60.0", + "@rollup/rollup-darwin-x64": "4.60.0", + "@rollup/rollup-freebsd-arm64": "4.60.0", + "@rollup/rollup-freebsd-x64": "4.60.0", + "@rollup/rollup-linux-arm-gnueabihf": "4.60.0", + "@rollup/rollup-linux-arm-musleabihf": "4.60.0", + "@rollup/rollup-linux-arm64-gnu": "4.60.0", + "@rollup/rollup-linux-arm64-musl": "4.60.0", + "@rollup/rollup-linux-loong64-gnu": "4.60.0", + "@rollup/rollup-linux-loong64-musl": "4.60.0", + "@rollup/rollup-linux-ppc64-gnu": "4.60.0", + "@rollup/rollup-linux-ppc64-musl": "4.60.0", + "@rollup/rollup-linux-riscv64-gnu": "4.60.0", + "@rollup/rollup-linux-riscv64-musl": "4.60.0", + "@rollup/rollup-linux-s390x-gnu": "4.60.0", + "@rollup/rollup-linux-x64-gnu": "4.60.0", + "@rollup/rollup-linux-x64-musl": "4.60.0", + "@rollup/rollup-openbsd-x64": "4.60.0", + "@rollup/rollup-openharmony-arm64": "4.60.0", + "@rollup/rollup-win32-arm64-msvc": "4.60.0", + "@rollup/rollup-win32-ia32-msvc": "4.60.0", + "@rollup/rollup-win32-x64-gnu": "4.60.0", + "@rollup/rollup-win32-x64-msvc": "4.60.0", + "fsevents": "~2.3.2" + } + }, + "node_modules/scheduler": { + "version": "0.23.2", + "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.23.2.tgz", + "integrity": "sha512-UOShsPwz7NrMUqhR6t0hWjFduvOzbtv7toDH1/hIrfRNIDBnnBWd0CwJTGvTpngVlmwGCdP9/Zl/tVrDqcuYzQ==", + "license": "MIT", + "dependencies": { + "loose-envify": "^1.1.0" + } + }, + "node_modules/semver": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/source-map-js": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz", + "integrity": "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==", + "dev": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/typescript": { + "version": "5.9.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.9.3.tgz", + "integrity": "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==", + "dev": true, + "license": "Apache-2.0", + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=14.17" + } + }, + "node_modules/update-browserslist-db": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.2.3.tgz", + "integrity": "sha512-Js0m9cx+qOgDxo0eMiFGEueWztz+d4+M3rGlmKPT+T4IS/jP4ylw3Nwpu6cpTTP8R1MAC1kF4VbdLt3ARf209w==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/browserslist" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "dependencies": { + "escalade": "^3.2.0", + "picocolors": "^1.1.1" + }, + "bin": { + "update-browserslist-db": "cli.js" + }, + "peerDependencies": { + "browserslist": ">= 4.21.0" + } + }, + "node_modules/vite": { + "version": "5.4.21", + "resolved": "https://registry.npmjs.org/vite/-/vite-5.4.21.tgz", + "integrity": "sha512-o5a9xKjbtuhY6Bi5S3+HvbRERmouabWbyUcpXXUA1u+GNUKoROi9byOJ8M0nHbHYHkYICiMlqxkg1KkYmm25Sw==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "esbuild": "^0.21.3", + "postcss": "^8.4.43", + "rollup": "^4.20.0" + }, + "bin": { + "vite": "bin/vite.js" + }, + "engines": { + "node": "^18.0.0 || >=20.0.0" + }, + "funding": { + "url": "https://github.com/vitejs/vite?sponsor=1" + }, + "optionalDependencies": { + "fsevents": "~2.3.3" + }, + "peerDependencies": { + "@types/node": "^18.0.0 || >=20.0.0", + "less": "*", + "lightningcss": "^1.21.0", + "sass": "*", + "sass-embedded": "*", + "stylus": "*", + "sugarss": "*", + "terser": "^5.4.0" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + }, + "less": { + "optional": true + }, + "lightningcss": { + "optional": true + }, + "sass": { + "optional": true + }, + "sass-embedded": { + "optional": true + }, + "stylus": { + "optional": true + }, + "sugarss": { + "optional": true + }, + "terser": { + "optional": true + } + } + }, + "node_modules/yallist": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", + "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", + "dev": true, + "license": "ISC" + } + } +} diff --git a/crates/pool-indexer/frontend/package.json b/crates/pool-indexer/frontend/package.json new file mode 100644 index 0000000000..e429c68401 --- /dev/null +++ b/crates/pool-indexer/frontend/package.json @@ -0,0 +1,22 @@ +{ + "name": "pool-indexer-ui", + "private": true, + "version": "0.1.0", + "type": "module", + "scripts": { + "dev": "vite", + "build": "tsc && vite build", + "preview": "vite preview" + }, + "dependencies": { + "react": "^18.3.1", + "react-dom": "^18.3.1" + }, + "devDependencies": { + "@types/react": "^18.3.5", + "@types/react-dom": "^18.3.0", + "@vitejs/plugin-react": "^4.3.1", + "typescript": "^5.5.3", + "vite": "^5.4.2" + } +} diff --git a/crates/pool-indexer/frontend/src/App.css b/crates/pool-indexer/frontend/src/App.css new file mode 100644 index 0000000000..10e9a12aaf --- /dev/null +++ b/crates/pool-indexer/frontend/src/App.css @@ -0,0 +1,328 @@ +*, *::before, *::after { + box-sizing: border-box; + margin: 0; + padding: 0; +} + +:root { + --bg: #0a0a0a; + --surface: #111111; + --surface2: #1a1a1a; + --border: #252525; + --text: #e2e2e2; + --dim: #666666; + --accent: #3b82f6; + --green: #22c55e; + --red: #ef4444; + --yellow: #f59e0b; + --selected-bg: rgba(59, 130, 246, 0.08); + --selected-border: #3b82f6; +} + +html, body { + height: 100%; + background: var(--bg); + color: var(--text); +} + +body { + font-family: system-ui, -apple-system, sans-serif; + font-size: 13px; + line-height: 1.5; +} + +.app { + display: flex; + flex-direction: column; + height: 100vh; + overflow: hidden; +} + +/* Header */ +header { + display: flex; + align-items: center; + justify-content: space-between; + padding: 0 16px; + height: 48px; + border-bottom: 1px solid var(--border); + background: var(--surface); + flex-shrink: 0; + gap: 12px; +} + +.header-left, +.header-right { + display: flex; + align-items: center; + gap: 10px; +} + +.logo { + font-size: 14px; + font-weight: 600; +} + +.chip { + padding: 2px 8px; + border-radius: 10px; + background: var(--surface2); + border: 1px solid var(--border); + font-size: 11px; + color: var(--dim); + font-variant-numeric: tabular-nums; +} + +.filter { + background: var(--surface2); + border: 1px solid var(--border); + border-radius: 6px; + padding: 4px 10px; + color: var(--text); + font-size: 12px; + font-family: 'SF Mono', 'Fira Code', monospace; + width: 220px; + outline: none; + transition: border-color 0.15s; +} +.filter:focus { + border-color: var(--accent); +} +.filter::placeholder { + color: var(--dim); +} + +/* Banners */ +.banner { + padding: 8px 16px; + font-size: 12px; + flex-shrink: 0; +} +.banner.error { + background: rgba(239, 68, 68, 0.08); + color: #fca5a5; + border-bottom: 1px solid rgba(239, 68, 68, 0.2); +} + +/* Layout */ +.layout { + display: flex; + flex: 1; + overflow: hidden; +} + +/* Pool panel */ +.pool-panel { + flex: 1; + overflow: auto; + min-width: 0; +} + +.pool-panel table { + width: 100%; + border-collapse: collapse; +} + +.pool-panel thead { + position: sticky; + top: 0; + background: var(--surface); + z-index: 1; +} + +.pool-panel th { + padding: 8px 12px; + text-align: left; + font-size: 11px; + font-weight: 600; + color: var(--dim); + text-transform: uppercase; + letter-spacing: 0.04em; + border-bottom: 1px solid var(--border); + white-space: nowrap; +} + +.pool-panel td { + padding: 6px 12px; + border-bottom: 1px solid var(--border); + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + max-width: 160px; +} + +.pool-panel tbody tr { + cursor: pointer; + transition: background 0.08s; +} +.pool-panel tbody tr:hover { + background: var(--surface2); +} +.pool-panel tbody tr.selected { + background: var(--selected-bg); + outline: 1px solid var(--selected-border); + outline-offset: -1px; +} + +/* Shared table helpers */ +.mono { + font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace; + font-size: 12px; +} +.r { + text-align: right !important; +} +.dim { + color: var(--dim); +} +.pos { + color: var(--green); +} +.neg { + color: var(--red); +} + +.sortable { + cursor: pointer; + user-select: none; +} +.sortable:hover { + color: var(--text); +} + +.fee-badge { + display: inline-block; + padding: 1px 6px; + border-radius: 4px; + background: var(--surface2); + border: 1px solid var(--border); + font-size: 11px; + color: var(--dim); +} + +.empty { + text-align: center !important; + color: var(--dim); + padding: 40px 0 !important; +} + +.status-row { + text-align: center; + color: var(--dim); + padding: 20px; + font-size: 12px; +} + +.load-more-row { + padding: 12px 16px; + text-align: center; +} +.load-more-row button { + background: var(--surface2); + border: 1px solid var(--border); + color: var(--text); + padding: 6px 24px; + border-radius: 6px; + cursor: pointer; + font-size: 12px; + transition: border-color 0.15s; +} +.load-more-row button:hover { + border-color: var(--accent); +} + +/* Ticks panel */ +.ticks-panel { + width: 400px; + flex-shrink: 0; + border-left: 1px solid var(--border); + background: var(--surface); + display: flex; + flex-direction: column; + overflow: hidden; +} + +.ticks-header { + display: flex; + align-items: flex-start; + justify-content: space-between; + padding: 12px 16px; + border-bottom: 1px solid var(--border); + flex-shrink: 0; +} + +.ticks-header h2 { + font-size: 14px; + font-weight: 600; + margin-bottom: 3px; +} + +.addr-small { + font-size: 10px; + color: var(--dim); + word-break: break-all; +} + +.ticks-header .close { + background: none; + border: none; + color: var(--dim); + cursor: pointer; + font-size: 14px; + padding: 2px 4px; + border-radius: 4px; + line-height: 1; + flex-shrink: 0; + margin-left: 8px; +} +.ticks-header .close:hover { + color: var(--text); + background: var(--surface2); +} + +.ticks-meta { + padding: 8px 16px; + font-size: 11px; + flex-shrink: 0; +} + +/* Tick chart */ +.tick-chart { + display: block; + width: 100%; + height: auto; + padding: 4px 0; + border-bottom: 1px solid var(--border); + flex-shrink: 0; + background: var(--bg); +} + +/* Ticks table */ +.ticks-table-wrap { + flex: 1; + overflow: auto; +} + +.ticks-table-wrap table { + width: 100%; + border-collapse: collapse; +} + +.ticks-table-wrap th { + padding: 6px 12px; + font-size: 11px; + font-weight: 600; + color: var(--dim); + text-transform: uppercase; + letter-spacing: 0.04em; + border-bottom: 1px solid var(--border); + background: var(--surface); + position: sticky; + top: 0; +} + +.ticks-table-wrap td { + padding: 4px 12px; + border-bottom: 1px solid var(--border); + font-size: 12px; +} diff --git a/crates/pool-indexer/frontend/src/App.tsx b/crates/pool-indexer/frontend/src/App.tsx new file mode 100644 index 0000000000..dda0fc36a8 --- /dev/null +++ b/crates/pool-indexer/frontend/src/App.tsx @@ -0,0 +1,312 @@ +import { useState, useEffect, useCallback } from 'react' +import { fetchPools, fetchTicks } from './api' +import type { Pool, Tick } from './api' +import { computePrice, short, feeTierLabel, formatLiquidity } from './utils' +import './App.css' + +interface TicksState { + data: Tick[] + blockNumber: number + poolId: string +} + +export default function App() { + const [pools, setPools] = useState([]) + const [blockNumber, setBlockNumber] = useState(null) + // undefined = not yet fetched, null = last page, string = next cursor + const [cursor, setCursor] = useState(undefined) + const [loadingPools, setLoadingPools] = useState(false) + const [poolsError, setPoolsError] = useState(null) + const [selectedPool, setSelectedPool] = useState(null) + const [ticksState, setTicksState] = useState(null) + const [loadingTicks, setLoadingTicks] = useState(false) + const [ticksError, setTicksError] = useState(null) + const [filter, setFilter] = useState('') + const [sortDesc, setSortDesc] = useState(true) + + const loadPools = useCallback(async (after?: string) => { + setLoadingPools(true) + setPoolsError(null) + try { + const res = await fetchPools(after) + setPools(prev => (after ? [...prev, ...res.pools] : res.pools)) + setBlockNumber(res.block_number) + setCursor(res.next_cursor) + } catch (e) { + const msg = e instanceof Error ? e.message : 'Unknown error' + if (msg === 'not_indexed') { + setPoolsError('Indexer starting up — no blocks indexed yet. Retrying in 5s…') + setTimeout(() => loadPools(after), 5000) + } else { + setPoolsError(msg) + } + } finally { + setLoadingPools(false) + } + }, []) + + useEffect(() => { + loadPools() + }, [loadPools]) + + const openTicks = useCallback( + async (poolId: string) => { + if (selectedPool === poolId) { + setSelectedPool(null) + setTicksState(null) + return + } + setSelectedPool(poolId) + setTicksState(null) + setTicksError(null) + setLoadingTicks(true) + try { + const res = await fetchTicks(poolId) + setTicksState({ data: res.ticks, blockNumber: res.block_number, poolId }) + } catch (e) { + setTicksError(e instanceof Error ? e.message : 'Unknown error') + } finally { + setLoadingTicks(false) + } + }, + [selectedPool], + ) + + const filteredPools = ( + filter + ? pools.filter( + p => + p.id.toLowerCase().includes(filter.toLowerCase()) || + p.token0.id.toLowerCase().includes(filter.toLowerCase()) || + p.token1.id.toLowerCase().includes(filter.toLowerCase()), + ) + : pools + ).toSorted((a, b) => { + try { + const diff = BigInt(a.liquidity) - BigInt(b.liquidity) + return sortDesc ? (diff < 0n ? 1 : diff > 0n ? -1 : 0) : (diff < 0n ? -1 : diff > 0n ? 1 : 0) + } catch { + return 0 + } + }) + + const selectedPoolData = pools.find(p => p.id === selectedPool) + + return ( +
+
+
+ Uniswap V3 Pools + {blockNumber !== null && ( + block {blockNumber.toLocaleString()} + )} +
+
+ {pools.length > 0 && ( + {pools.length.toLocaleString()} pools + )} + setFilter(e.target.value)} + spellCheck={false} + /> +
+
+ + {poolsError &&
{poolsError}
} + +
+
+ + + + + + + + + + + + + + {filteredPools.map(pool => ( + openTicks(pool.id)} + > + + + + + + + + + ))} + {!loadingPools && filteredPools.length === 0 && ( + + + + )} + +
PoolToken 0Token 1FeePrice (T1/T0) setSortDesc(d => !d)}> + Liquidity {sortDesc ? '↓' : '↑'} + Tick
+ {short(pool.id)} + + {pool.token0.symbol ?? short(pool.token0.id)} + {pool.token0.decimals}d + + {pool.token1.symbol ?? short(pool.token1.id)} + {pool.token1.decimals}d + + {feeTierLabel(pool.fee_tier)} + + {computePrice(pool.sqrt_price, pool.token0.decimals, pool.token1.decimals)} + {formatLiquidity(pool.liquidity)}{pool.tick.toLocaleString()}
+ {filter ? 'No pools match filter.' : 'No pools loaded.'} +
+ + {loadingPools && pools.length === 0 && ( +
Loading pools…
+ )} + {typeof cursor === 'string' && !loadingPools && ( +
+ +
+ )} + {typeof cursor === 'string' && loadingPools && pools.length > 0 && ( +
Loading more…
+ )} +
+ + {selectedPool && ( + + )} +
+
+ ) +} + +function TickChart({ ticks, currentTick }: { ticks: Tick[]; currentTick: number }) { + const W = 560, + H = 80, + PX = 16, + PY = 8 + const minTick = ticks[0].tick_idx + const maxTick = ticks[ticks.length - 1].tick_idx + const tickRange = maxTick - minTick || 1 + + const maxAbs = ticks.reduce((m, t) => { + try { + const v = BigInt(t.liquidity_net) + const a = v < 0n ? -v : v + return a > m ? a : m + } catch { + return m + } + }, 1n) + + const toX = (tick: number) => PX + ((tick - minTick) / tickRange) * (W - 2 * PX) + const midY = PY + (H - 2 * PY) / 2 + const currentX = Math.min(Math.max(toX(currentTick), PX), W - PX) + + return ( + + + {ticks.map(t => { + const tx = toX(t.tick_idx) + let ratio = 0 + try { + const v = BigInt(t.liquidity_net) + ratio = Number((v * 1000n) / maxAbs) / 1000 + } catch { + /* skip */ + } + const barH = Math.abs(ratio) * ((H - 2 * PY) / 2 - 2) + const positive = ratio >= 0 + return ( + + ) + })} + + + ▶ {currentTick} + + + ) +} diff --git a/crates/pool-indexer/frontend/src/api.ts b/crates/pool-indexer/frontend/src/api.ts new file mode 100644 index 0000000000..02f6f69006 --- /dev/null +++ b/crates/pool-indexer/frontend/src/api.ts @@ -0,0 +1,55 @@ +export interface Token { + id: string + decimals: number + symbol?: string +} + +export interface Pool { + id: string + token0: Token + token1: Token + fee_tier: string + liquidity: string + sqrt_price: string + tick: number + ticks: null +} + +export interface PoolsResponse { + block_number: number + pools: Pool[] + next_cursor: string | null +} + +export interface Tick { + tick_idx: number + liquidity_net: string +} + +export interface TicksResponse { + block_number: number + pool: string + ticks: Tick[] +} + +export async function fetchPools(after?: string, limit = 1000): Promise { + const params = new URLSearchParams({ limit: String(limit) }) + if (after) params.set('after', after) + const res = await fetch(`/api/v1/uniswap/v3/pools?${params}`) + if (res.status === 503) throw new Error('not_indexed') + if (!res.ok) { + const body = await res.json().catch(() => ({})) as { error?: string } + throw new Error(body.error ?? `HTTP ${res.status}`) + } + return res.json() as Promise +} + +export async function fetchTicks(poolAddress: string): Promise { + const res = await fetch(`/api/v1/uniswap/v3/pools/${poolAddress}/ticks`) + if (res.status === 503) throw new Error('not_indexed') + if (!res.ok) { + const body = await res.json().catch(() => ({})) as { error?: string } + throw new Error(body.error ?? `HTTP ${res.status}`) + } + return res.json() as Promise +} diff --git a/crates/pool-indexer/frontend/src/main.tsx b/crates/pool-indexer/frontend/src/main.tsx new file mode 100644 index 0000000000..feac8eed43 --- /dev/null +++ b/crates/pool-indexer/frontend/src/main.tsx @@ -0,0 +1,9 @@ +import { StrictMode } from 'react' +import { createRoot } from 'react-dom/client' +import App from './App' + +createRoot(document.getElementById('root')!).render( + + + , +) diff --git a/crates/pool-indexer/frontend/src/utils.ts b/crates/pool-indexer/frontend/src/utils.ts new file mode 100644 index 0000000000..3d30c1842d --- /dev/null +++ b/crates/pool-indexer/frontend/src/utils.ts @@ -0,0 +1,63 @@ +// price = (sqrtPriceX96 / 2^96)^2 * 10^(dec0 - dec1) → token1 per token0 (human units) +export function computePrice(sqrtPrice: string, dec0: number, dec1: number): string { + try { + const sq = BigInt(sqrtPrice) + if (sq === 0n) return '0' + const Q96 = 2n ** 96n + const PREC = 10n ** 18n + // price_scaled = sq^2 / Q96^2 * PREC (18 decimal fixed-point) + const scaled = (sq * sq * PREC) / (Q96 * Q96) + const diff = dec0 - dec1 + const adjusted = + diff >= 0 ? scaled * 10n ** BigInt(diff) : scaled / 10n ** BigInt(-diff) + return formatFixed(adjusted, PREC, 6) + } catch { + return '?' + } +} + +function formatFixed(val: bigint, scale: bigint, sigFigs: number): string { + const int = val / scale + const frac = (val % scale).toString().padStart(String(scale).length - 1, '0') + if (int > 0n) return `${int}.${frac.slice(0, sigFigs)}` + const first = frac.search(/[1-9]/) + if (first === -1) return '~0' + return `0.${'0'.repeat(first)}${frac.slice(first, first + sigFigs)}` +} + +export function formatLiquidity(val: string): string { + try { + const n = BigInt(val) + const neg = n < 0n + const abs = neg ? -n : n + const sign = neg ? '−' : '' + if (abs === 0n) return '0' + const tiers: [bigint, string][] = [ + [10n ** 18n, 'e18'], + [10n ** 15n, 'e15'], + [10n ** 12n, 'T'], + [10n ** 9n, 'B'], + [10n ** 6n, 'M'], + [10n ** 3n, 'K'], + ] + for (const [threshold, suffix] of tiers) { + if (abs >= threshold) { + const int = abs / threshold + const frac = ((abs % threshold) * 100n / threshold).toString().padStart(2, '0') + return `${sign}${int}.${frac}${suffix}` + } + } + return `${sign}${abs}` + } catch { + return val + } +} + +export function short(addr: string): string { + return `${addr.slice(0, 6)}…${addr.slice(-4)}` +} + +export function feeTierLabel(ppm: string): string { + const labels: Record = { '100': '0.01%', '500': '0.05%', '3000': '0.3%', '10000': '1%' } + return labels[ppm] ?? `${(Number(ppm) / 10000).toFixed(2)}%` +} diff --git a/crates/pool-indexer/frontend/tsconfig.json b/crates/pool-indexer/frontend/tsconfig.json new file mode 100644 index 0000000000..109f0ac280 --- /dev/null +++ b/crates/pool-indexer/frontend/tsconfig.json @@ -0,0 +1,20 @@ +{ + "compilerOptions": { + "target": "ES2020", + "useDefineForClassFields": true, + "lib": ["ES2020", "DOM", "DOM.Iterable"], + "module": "ESNext", + "skipLibCheck": true, + "moduleResolution": "bundler", + "allowImportingTsExtensions": true, + "isolatedModules": true, + "moduleDetection": "force", + "noEmit": true, + "jsx": "react-jsx", + "strict": true, + "noUnusedLocals": true, + "noUnusedParameters": true, + "noFallthroughCasesInSwitch": true + }, + "include": ["src"] +} diff --git a/crates/pool-indexer/frontend/vite.config.ts b/crates/pool-indexer/frontend/vite.config.ts new file mode 100644 index 0000000000..e2020d67e0 --- /dev/null +++ b/crates/pool-indexer/frontend/vite.config.ts @@ -0,0 +1,11 @@ +import { defineConfig } from 'vite' +import react from '@vitejs/plugin-react' + +export default defineConfig({ + plugins: [react()], + server: { + proxy: { + '/api': 'http://localhost:7777', + }, + }, +}) diff --git a/crates/pool-indexer/p.md b/crates/pool-indexer/p.md new file mode 100644 index 0000000000..4c3fceca52 --- /dev/null +++ b/crates/pool-indexer/p.md @@ -0,0 +1,234 @@ +# Plan: Replace Subgraphs with Purpose-Built Pool Indexer + +## Context + +The driver currently bootstraps Uniswap V3 and Balancer V2 liquidity via The Graph subgraphs. Subgraphs are queried once at startup to get pool state at a safe historical block; on-chain events then maintain the state. The problem: subgraph dependency is unreliable (rate limits, outages, versioning, chain support gaps). This plan replaces the subgraph with an in-house indexer service that reads directly from the chain, persists state in Postgres, and exposes a REST API. + +Scope: **Uniswap V3 only** to start. Balancer V2 follows the same pattern and can be added later. + +Finalized blocks only — no reorg handling required. + +--- + +## New Crate: `crates/pool-indexer` + +Follows the same lib + binary pattern as `orderbook`, `autopilot`, etc. + +``` +crates/pool-indexer/ + Cargo.toml + src/ + main.rs → pool_indexer::start(std::env::args()) + lib.rs → pub mod declarations, pub use run::{run, start} + run.rs → parse args, load config, start DB, start indexer, start HTTP server + arguments.rs → clap: --config + config.rs → TOML config struct (serde) + indexer/ + mod.rs + uniswap_v3.rs → event loop: poll finalized block, fetch logs, write to DB + db/ + mod.rs + uniswap_v3.rs → sqlx queries (pools, ticks, state, indexed_block) + api/ + mod.rs → axum Router + uniswap_v3.rs → REST handlers +``` + +Also needs DB migration files under `database/sql/` following the Flyway numbering convention. + +--- + +## Database Schema (new migrations) + +### `V???__pool_indexer_uniswap_v3.sql` + +```sql +-- Tracks the highest finalized block fully processed per chain+contract +CREATE TABLE pool_indexer_checkpoints ( + chain_id BIGINT NOT NULL, + contract BYTEA NOT NULL, -- factory or pool address + block_number BIGINT NOT NULL, + PRIMARY KEY (chain_id, contract) +); + +-- One row per discovered pool (from PoolCreated events on the factory) +CREATE TABLE uniswap_v3_pools ( + chain_id BIGINT NOT NULL, + address BYTEA NOT NULL, -- pool address + token0 BYTEA NOT NULL, + token1 BYTEA NOT NULL, + fee INT NOT NULL, -- fee tier in bps (500, 3000, 10000) + created_block BIGINT NOT NULL, + PRIMARY KEY (chain_id, address) +); + +-- Current state of each pool (updated on every Swap/Mint/Burn that changes it) +CREATE TABLE uniswap_v3_pool_states ( + chain_id BIGINT NOT NULL, + pool_address BYTEA NOT NULL, + block_number BIGINT NOT NULL, + sqrt_price_x96 BYTEA NOT NULL, -- U256 as 32 bytes big-endian + liquidity BYTEA NOT NULL, -- U256 as 32 bytes big-endian + tick INT NOT NULL, + PRIMARY KEY (chain_id, pool_address), + FOREIGN KEY (chain_id, pool_address) REFERENCES uniswap_v3_pools(chain_id, address) +); + +-- Active ticks per pool (rows with liquidityNet = 0 are pruned) +CREATE TABLE uniswap_v3_ticks ( + chain_id BIGINT NOT NULL, + pool_address BYTEA NOT NULL, + tick_idx INT NOT NULL, + liquidity_net BYTEA NOT NULL, -- i128 as 16 bytes big-endian (signed) + PRIMARY KEY (chain_id, pool_address, tick_idx), + FOREIGN KEY (chain_id, pool_address) REFERENCES uniswap_v3_pools(chain_id, address) +); + +CREATE INDEX ON uniswap_v3_ticks (chain_id, pool_address); +``` + +--- + +## Indexer Logic (`src/indexer/uniswap_v3.rs`) + +Since we only care about finalized blocks there's no reorg handling — simplified compared to existing `EventHandler`. + +``` +loop: + finalized_block = eth_getBlockByNumber("finalized") + last_indexed = db::get_checkpoint(factory_address) + + if last_indexed >= finalized_block → sleep, continue + + for block_range in chunks(last_indexed+1..=finalized_block, CHUNK_SIZE=500): + logs = eth_getLogs(filter{ + from_block: range.start, + to_block: range.end, + topics: [PoolCreated, Initialize, Mint, Burn, Swap] + // No address filter (perf: same reason as existing event_fetching.rs) + }) + db::apply_logs(tx, logs) // single DB transaction per chunk + db::set_checkpoint(tx, block_range.end) + commit tx +``` + +### Events consumed + +All from `UniswapV3Pool` ABI + `IUniswapV3Factory` ABI (already in `crates/contracts/`): + +| Source | Event | DB effect | +|---|---|---| +| Factory | `PoolCreated(token0, token1, fee, tickSpacing, pool)` | INSERT into `uniswap_v3_pools` | +| Pool | `Initialize(sqrtPriceX96, tick)` | INSERT/UPDATE `uniswap_v3_pool_states` | +| Pool | `Mint(sender, owner, tickLower, tickUpper, amount, ...)` | +amount to tick_lower liquidityNet, -amount from tick_upper | +| Pool | `Burn(owner, tickLower, tickUpper, amount, ...)` | -amount from tick_lower, +amount to tick_upper | +| Pool | `Swap(..., sqrtPriceX96, liquidity, tick)` | UPDATE pool state row | + +Rows with `liquidity_net = 0` in `uniswap_v3_ticks` are deleted (pruned on write). + +We do NOT need: `Collect`, `CollectProtocol`, `Flash`, `SetFeeProtocol`, `IncreaseObservationCardinalityNext`. + +--- + +## REST API (`src/api/uniswap_v3.rs`) + +Base path: `/api/v1` + +### `GET /api/v1/uniswap/v3/latest-block` + +Returns the latest fully-indexed finalized block. Replaces `_meta { block { number } }` subgraph query. + +```json +{ "block_number": 21800000 } +``` + +### `GET /api/v1/uniswap/v3/pools` + +Returns all known pools with current state. Cursor-based pagination to match the existing `SubgraphClient.paginated_query` behaviour. + +Query params: +- `block` (required) — query state at this block number +- `after` (optional) — cursor: last seen pool address (hex) +- `limit` (optional, default 1000) + +Response: +```json +{ + "pools": [ + { + "id": "0x...", + "token0": { "id": "0x...", "decimals": 18 }, + "token1": { "id": "0x...", "decimals": 6 }, + "fee_tier": "3000", + "liquidity": "12345678", + "sqrt_price": "1234567890", + "tick": -887272, + "ticks": null + } + ], + "next_cursor": "0x..." // null if last page +} +``` + +### `GET /api/v1/uniswap/v3/pools/{pool_address}/ticks` + +Query params: +- `block` (required) + +Response: +```json +{ + "pool": "0x...", + "ticks": [ + { "tick_idx": -887272, "liquidity_net": "1000000" }, + ... + ] +} +``` + +This is called in batch by the driver (chunked by `max_pools_per_tick_query`). Having per-pool tick endpoint keeps it simple and avoids a multi-pool batch endpoint for now. + +### `GET /health` + +Standard liveness check. + +--- + +## Configuration (`src/config.rs`) + +```toml +[database] +url = "postgresql://..." +max-connections = 10 + +[indexer] +chain-id = 1 +rpc-url = "https://..." +factory-address = "0x1F98431c8aD98523631AE4a59f267346ea31F984" # UniV3 mainnet factory +chunk-size = 500 # blocks per eth_getLogs call +poll-interval-secs = 3 # how often to poll for new finalized block + +[api] +bind-address = "0.0.0.0:7777" +``` + +--- + +## Critical Files + +| File | Role | +|---|---| +| `crates/contracts/artifacts/UniswapV3Pool.json` | ABI source for event decoding | +| `crates/contracts/artifacts/IUniswapV3Factory.json` | ABI source for PoolCreated event | +| `database/sql/V???__pool_indexer.sql` | New migrations | +| `crates/pool-indexer/` | New crate (lib + binary) | +| `Cargo.toml` (workspace) | Add new crate to workspace members | + +--- + +## Verification + +1. **Unit tests** for DB query functions (using test transactions that rollback). +2. **Integration test**: spin up the indexer against an anvil fork (`FORK_URL_MAINNET`), index a small block range (e.g. 100 blocks), assert known pool addresses appear in DB with correct state. +3. **API test**: call `GET /pools`, `GET /pools/{addr}/ticks`, and `GET /latest-block` against a running indexer, verify responses match known on-chain state. +4. `cargo clippy` + `cargo +nightly fmt --all` before PR. diff --git a/crates/pool-indexer/package-lock.json b/crates/pool-indexer/package-lock.json new file mode 100644 index 0000000000..73d0d7f2de --- /dev/null +++ b/crates/pool-indexer/package-lock.json @@ -0,0 +1,6 @@ +{ + "name": "pool-indexer", + "lockfileVersion": 3, + "requires": true, + "packages": {} +} diff --git a/crates/pool-indexer/src/api/mod.rs b/crates/pool-indexer/src/api/mod.rs new file mode 100644 index 0000000000..8aaba15aa3 --- /dev/null +++ b/crates/pool-indexer/src/api/mod.rs @@ -0,0 +1,30 @@ +pub mod uniswap_v3; + +use { + axum::{Router, http::StatusCode, response::IntoResponse, routing::get}, + sqlx::PgPool, + std::sync::Arc, + tower_http::trace::TraceLayer, +}; + +#[derive(Clone)] +pub struct AppState { + pub db: PgPool, + pub chain_id: u64, +} + +pub fn router(state: Arc) -> Router { + Router::new() + .route("/health", get(health)) + .route("/api/v1/uniswap/v3/pools", get(uniswap_v3::get_pools)) + .route( + "/api/v1/uniswap/v3/pools/{pool_address}/ticks", + get(uniswap_v3::get_ticks), + ) + .with_state(state) + .layer(TraceLayer::new_for_http()) +} + +async fn health() -> impl IntoResponse { + StatusCode::OK +} diff --git a/crates/pool-indexer/src/api/uniswap_v3.rs b/crates/pool-indexer/src/api/uniswap_v3.rs new file mode 100644 index 0000000000..10a6f2e754 --- /dev/null +++ b/crates/pool-indexer/src/api/uniswap_v3.rs @@ -0,0 +1,185 @@ +use { + crate::{api::AppState, db::uniswap_v3 as db}, + alloy_primitives::Address, + axum::{ + extract::{Path, Query, State}, + http::StatusCode, + response::{IntoResponse, Json, Response}, + }, + serde::{Deserialize, Serialize}, + std::sync::Arc, +}; + +fn internal_error(err: anyhow::Error) -> Response { + tracing::error!(?err, "internal error"); + StatusCode::INTERNAL_SERVER_ERROR.into_response() +} + +// ── /api/v1/uniswap/v3/pools ───────────────────────────────────────────────── + +#[derive(Deserialize)] +pub struct PoolsQuery { + pub after: Option, + pub limit: Option, +} + +#[derive(Serialize)] +pub struct TokenInfo { + pub id: String, + #[serde(skip_serializing_if = "Option::is_none")] + pub decimals: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub symbol: Option, +} + +#[derive(Serialize)] +pub struct PoolResponse { + pub id: String, + pub token0: TokenInfo, + pub token1: TokenInfo, + pub fee_tier: String, + pub liquidity: String, + pub sqrt_price: String, + pub tick: i32, + pub ticks: Option>, +} + +#[derive(Serialize)] +pub struct PoolsResponse { + pub block_number: u64, + pub pools: Vec, + pub next_cursor: Option, +} + +pub async fn get_pools( + State(state): State>, + Query(query): Query, +) -> Response { + let block_number = match db::get_latest_indexed_block(&state.db, state.chain_id).await { + Ok(Some(block)) => block, + Ok(None) => return StatusCode::SERVICE_UNAVAILABLE.into_response(), + Err(err) => return internal_error(err), + }; + + let limit = query.limit.unwrap_or(1000).clamp(1, 5000); + + let cursor_bytes = match query.after.as_deref().map(parse_hex_address) { + Some(Ok(addr)) => Some(addr.as_slice().to_vec()), + Some(Err(_)) => { + return ( + StatusCode::BAD_REQUEST, + Json(serde_json::json!({"error": "invalid cursor"})), + ) + .into_response(); + } + None => None, + }; + + // Fetch one extra row to determine if there is a next page. + let rows = match db::get_pools(&state.db, state.chain_id, cursor_bytes, limit + 1).await { + Ok(rows) => rows, + Err(err) => return internal_error(err), + }; + + let limit_usize = usize::try_from(limit).unwrap_or(usize::MAX); + let has_next = rows.len() > limit_usize; + let rows = if has_next { + &rows[..limit_usize] + } else { + &rows[..] + }; + + let next_cursor = if has_next { + rows.last().map(|r| format!("{:?}", r.address)) + } else { + None + }; + + let pools = rows + .iter() + .map(|r| PoolResponse { + id: format!("{:?}", r.address), + token0: TokenInfo { + id: format!("{:?}", r.token0), + decimals: r.token0_decimals, + symbol: r.token0_symbol.clone(), + }, + token1: TokenInfo { + id: format!("{:?}", r.token1), + decimals: r.token1_decimals, + symbol: r.token1_symbol.clone(), + }, + fee_tier: r.fee.to_string(), + liquidity: r.liquidity.to_string(), + sqrt_price: r.sqrt_price_x96.to_string(), + tick: r.tick, + ticks: None, + }) + .collect(); + + Json(PoolsResponse { + block_number, + pools, + next_cursor, + }) + .into_response() +} + +// ── /api/v1/uniswap/v3/pools/:pool_address/ticks ──────────────────────────── + +#[derive(Serialize)] +pub struct TickEntry { + pub tick_idx: i32, + pub liquidity_net: String, +} + +#[derive(Serialize)] +pub struct TicksResponse { + pub block_number: u64, + pub pool: String, + pub ticks: Vec, +} + +pub async fn get_ticks( + State(state): State>, + Path(pool_address): Path, +) -> Response { + let addr = match parse_hex_address(&pool_address) { + Ok(a) => a, + Err(_) => { + return ( + StatusCode::BAD_REQUEST, + Json(serde_json::json!({"error": "invalid pool address"})), + ) + .into_response(); + } + }; + + let block_number = match db::get_latest_indexed_block(&state.db, state.chain_id).await { + Ok(Some(block)) => block, + Ok(None) => return StatusCode::SERVICE_UNAVAILABLE.into_response(), + Err(err) => return internal_error(err), + }; + + let ticks = match db::get_ticks(&state.db, state.chain_id, &addr).await { + Ok(ticks) => ticks, + Err(err) => return internal_error(err), + }; + + Json(TicksResponse { + block_number, + pool: format!("{:?}", addr), + ticks: ticks + .into_iter() + .map(|t| TickEntry { + tick_idx: t.tick_idx, + liquidity_net: t.liquidity_net.to_string(), + }) + .collect(), + }) + .into_response() +} + +fn parse_hex_address(s: &str) -> Result { + s.parse::
().map_err(|_| "invalid address") +} diff --git a/crates/pool-indexer/src/arguments.rs b/crates/pool-indexer/src/arguments.rs new file mode 100644 index 0000000000..0555ce110e --- /dev/null +++ b/crates/pool-indexer/src/arguments.rs @@ -0,0 +1,28 @@ +use std::path::PathBuf; + +#[derive(clap::Parser)] +pub struct Arguments { + #[clap(subcommand)] + pub command: Command, +} + +#[derive(clap::Subcommand)] +pub enum Command { + /// Run the indexer and API server. + Run { + #[clap(long, env)] + config: PathBuf, + }, + /// Seed the database from the Uniswap V3 subgraph, then exit. + Seed { + #[clap(long, env)] + config: PathBuf, + /// Subgraph GraphQL endpoint URL. + #[clap(long)] + subgraph_url: String, + /// Block number to seed at. Defaults to the subgraph's current indexed + /// block. + #[clap(long)] + block: Option, + }, +} diff --git a/crates/pool-indexer/src/config.rs b/crates/pool-indexer/src/config.rs new file mode 100644 index 0000000000..6494c5500c --- /dev/null +++ b/crates/pool-indexer/src/config.rs @@ -0,0 +1,91 @@ +use { + alloy_primitives::Address, + anyhow::{Context, Result}, + serde::Deserialize, + std::{ + net::{Ipv4Addr, SocketAddr, SocketAddrV4}, + num::NonZeroU32, + path::Path, + time::Duration, + }, + url::Url, +}; + +fn default_max_connections() -> NonZeroU32 { + NonZeroU32::new(10).unwrap() +} + +fn default_chunk_size() -> u64 { + 500 +} + +fn default_poll_interval_secs() -> u64 { + 3 +} + +fn default_bind_address() -> SocketAddr { + SocketAddr::V4(SocketAddrV4::new(Ipv4Addr::UNSPECIFIED, 7777)) +} + +#[derive(Debug, Deserialize)] +#[serde(rename_all = "kebab-case", deny_unknown_fields)] +pub struct DatabaseConfig { + pub url: String, + #[serde(default = "default_max_connections")] + pub max_connections: NonZeroU32, +} + +#[derive(Debug, Deserialize)] +#[serde(rename_all = "kebab-case", deny_unknown_fields)] +pub struct IndexerConfig { + pub chain_id: u64, + pub rpc_url: Url, + pub factory_address: Address, + #[serde(default = "default_chunk_size")] + pub chunk_size: u64, + #[serde(default = "default_poll_interval_secs")] + pub poll_interval_secs: u64, + /// When `true`, use `latest` instead of `finalized` as the target block. + /// Useful for test environments where finality is not simulated (e.g. local + /// Anvil). + #[serde(skip)] + pub use_latest: bool, +} + +impl IndexerConfig { + pub fn poll_interval(&self) -> Duration { + Duration::from_secs(self.poll_interval_secs) + } +} + +#[derive(Debug, Deserialize)] +#[serde(rename_all = "kebab-case", deny_unknown_fields)] +pub struct ApiConfig { + #[serde(default = "default_bind_address")] + pub bind_address: SocketAddr, +} + +impl Default for ApiConfig { + fn default() -> Self { + Self { + bind_address: default_bind_address(), + } + } +} + +#[derive(Debug, Deserialize)] +#[serde(rename_all = "kebab-case", deny_unknown_fields)] +pub struct Configuration { + pub database: DatabaseConfig, + pub indexer: IndexerConfig, + #[serde(default)] + pub api: ApiConfig, +} + +impl Configuration { + pub fn from_path(path: &Path) -> Result { + let content = std::fs::read_to_string(path) + .with_context(|| format!("reading config file {}", path.display()))?; + toml::from_str(&content).context("parsing config file") + } +} diff --git a/crates/pool-indexer/src/db/mod.rs b/crates/pool-indexer/src/db/mod.rs new file mode 100644 index 0000000000..c24144d0e0 --- /dev/null +++ b/crates/pool-indexer/src/db/mod.rs @@ -0,0 +1 @@ +pub mod uniswap_v3; diff --git a/crates/pool-indexer/src/db/uniswap_v3.rs b/crates/pool-indexer/src/db/uniswap_v3.rs new file mode 100644 index 0000000000..f8c22bf6f1 --- /dev/null +++ b/crates/pool-indexer/src/db/uniswap_v3.rs @@ -0,0 +1,643 @@ +use { + crate::indexer::uniswap_v3::{LiquidityUpdateData, NewPoolData, PoolStateData, TickDeltaData}, + alloy_primitives::Address, + anyhow::{Context, Result}, + bigdecimal::BigDecimal, + sqlx::{PgPool, Postgres, Row, Transaction}, + std::str::FromStr, +}; + +// ── helpers +// ─────────────────────────────────────────────────────────────────── + +fn addr_bytes(a: &Address) -> Vec { + a.as_slice().to_vec() +} + +fn bytes_to_addr(b: Vec) -> Result
{ + Address::try_from(b.as_slice()).context("invalid address bytes") +} + +fn u128_to_decimal(v: u128) -> BigDecimal { + BigDecimal::from_str(&v.to_string()).expect("u128 decimal conversion") +} + +fn i128_to_decimal(v: i128) -> BigDecimal { + BigDecimal::from_str(&v.to_string()).expect("i128 decimal conversion") +} + +pub fn u160_to_decimal(v: alloy_primitives::aliases::U160) -> BigDecimal { + BigDecimal::from_str(&v.to_string()).expect("U160 decimal conversion") +} + +fn decimal_to_u128(v: BigDecimal) -> u128 { + use num::ToPrimitive; + v.to_u128().expect("decimal fits in u128") +} + +fn decimal_to_i128(v: BigDecimal) -> i128 { + use num::ToPrimitive; + v.to_i128().expect("decimal fits in i128") +} + +pub fn decimal_to_u160(v: BigDecimal) -> alloy_primitives::aliases::U160 { + let s = v.to_string(); + let int_part = s.split('.').next().unwrap_or(&s); + int_part + .parse::() + .expect("decimal fits in U160") +} + +// ── checkpoint +// ──────────────────────────────────────────────────────────────── + +pub async fn get_checkpoint( + pool: &PgPool, + chain_id: u64, + contract: &Address, +) -> Result> { + let row = sqlx::query( + "SELECT block_number FROM pool_indexer_checkpoints WHERE chain_id = $1 AND contract = $2", + ) + .bind(chain_id.cast_signed()) + .bind(addr_bytes(contract)) + .fetch_optional(pool) + .await + .context("get_checkpoint")?; + + Ok(row.map(|r| r.get::("block_number").cast_unsigned())) +} + +pub async fn set_checkpoint( + tx: &mut Transaction<'_, Postgres>, + chain_id: u64, + contract: &Address, + block_number: u64, +) -> Result<()> { + sqlx::query( + "INSERT INTO pool_indexer_checkpoints (chain_id, contract, block_number) + VALUES ($1, $2, $3) + ON CONFLICT (chain_id, contract) DO UPDATE SET block_number = EXCLUDED.block_number", + ) + .bind(chain_id.cast_signed()) + .bind(addr_bytes(contract)) + .bind(block_number.cast_signed()) + .execute(&mut **tx) + .await + .context("set_checkpoint")?; + Ok(()) +} + +// ── pools ───────────────────────────────────────────────────────────────────── + +#[allow(clippy::too_many_arguments)] +pub async fn insert_pool( + tx: &mut Transaction<'_, Postgres>, + chain_id: u64, + address: &Address, + token0: &Address, + token1: &Address, + fee: u32, + token0_decimals: Option, + token1_decimals: Option, + created_block: u64, +) -> Result<()> { + sqlx::query( + "INSERT INTO uniswap_v3_pools + (chain_id, address, token0, token1, fee, token0_decimals, token1_decimals, \ + created_block) + VALUES ($1, $2, $3, $4, $5, $6, $7, $8) + ON CONFLICT (chain_id, address) DO NOTHING", + ) + .bind(chain_id.cast_signed()) + .bind(addr_bytes(address)) + .bind(addr_bytes(token0)) + .bind(addr_bytes(token1)) + .bind(fee.cast_signed()) + .bind(token0_decimals.map(i16::from)) + .bind(token1_decimals.map(i16::from)) + .bind(created_block.cast_signed()) + .execute(&mut **tx) + .await + .context("insert_pool")?; + Ok(()) +} + +// ── pool state +// ──────────────────────────────────────────────────────────────── + +pub async fn upsert_pool_state( + tx: &mut Transaction<'_, Postgres>, + chain_id: u64, + pool_address: &Address, + block_number: u64, + sqrt_price_x96: alloy_primitives::aliases::U160, + liquidity: u128, + tick: i32, +) -> Result<()> { + sqlx::query( + "INSERT INTO uniswap_v3_pool_states + (chain_id, pool_address, block_number, sqrt_price_x96, liquidity, tick) + SELECT $1, $2, $3, $4, $5, $6 + WHERE EXISTS (SELECT 1 FROM uniswap_v3_pools WHERE chain_id = $1 AND address = $2) + ON CONFLICT (chain_id, pool_address) DO UPDATE + SET block_number = EXCLUDED.block_number, + sqrt_price_x96 = EXCLUDED.sqrt_price_x96, + liquidity = EXCLUDED.liquidity, + tick = EXCLUDED.tick", + ) + .bind(chain_id.cast_signed()) + .bind(addr_bytes(pool_address)) + .bind(block_number.cast_signed()) + .bind(u160_to_decimal(sqrt_price_x96)) + .bind(u128_to_decimal(liquidity)) + .bind(tick) + .execute(&mut **tx) + .await + .context("upsert_pool_state")?; + Ok(()) +} + +pub async fn update_pool_liquidity( + tx: &mut Transaction<'_, Postgres>, + chain_id: u64, + pool_address: &Address, + block_number: u64, + liquidity: u128, +) -> Result<()> { + sqlx::query( + "UPDATE uniswap_v3_pool_states + SET liquidity = $3, block_number = $4 + WHERE chain_id = $1 AND pool_address = $2", + ) + .bind(chain_id.cast_signed()) + .bind(addr_bytes(pool_address)) + .bind(u128_to_decimal(liquidity)) + .bind(block_number.cast_signed()) + .execute(&mut **tx) + .await + .context("update_pool_liquidity")?; + Ok(()) +} + +// ── ticks ───────────────────────────────────────────────────────────────────── + +/// Applies a signed delta to a tick's `liquidity_net`. Rows that reach zero +/// are pruned (Uniswap V3 convention). +pub async fn update_tick_liquidity_net( + tx: &mut Transaction<'_, Postgres>, + chain_id: u64, + pool_address: &Address, + tick_idx: i32, + delta: i128, +) -> Result<()> { + let pool_addr_bytes = addr_bytes(pool_address); + + sqlx::query( + "INSERT INTO uniswap_v3_ticks (chain_id, pool_address, tick_idx, liquidity_net) + SELECT $1, $2, $3, $4 + WHERE EXISTS (SELECT 1 FROM uniswap_v3_pools WHERE chain_id = $1 AND address = $2) + ON CONFLICT (chain_id, pool_address, tick_idx) DO UPDATE + SET liquidity_net = uniswap_v3_ticks.liquidity_net + EXCLUDED.liquidity_net", + ) + .bind(chain_id.cast_signed()) + .bind(pool_addr_bytes.clone()) + .bind(tick_idx) + .bind(i128_to_decimal(delta)) + .execute(&mut **tx) + .await + .context("update_tick_liquidity_net upsert")?; + + sqlx::query( + "DELETE FROM uniswap_v3_ticks + WHERE chain_id = $1 AND pool_address = $2 AND tick_idx = $3 AND liquidity_net = 0", + ) + .bind(chain_id.cast_signed()) + .bind(pool_addr_bytes) + .bind(tick_idx) + .execute(&mut **tx) + .await + .context("update_tick_liquidity_net prune")?; + + Ok(()) +} + +// ── batch write operations +// ──────────────────────────────────────────────────── + +pub async fn batch_insert_pools( + tx: &mut Transaction<'_, Postgres>, + chain_id: u64, + pools: &[NewPoolData], +) -> Result<()> { + if pools.is_empty() { + return Ok(()); + } + let addresses: Vec> = pools.iter().map(|p| addr_bytes(&p.address)).collect(); + let token0s: Vec> = pools.iter().map(|p| addr_bytes(&p.token0)).collect(); + let token1s: Vec> = pools.iter().map(|p| addr_bytes(&p.token1)).collect(); + let fees: Vec = pools.iter().map(|p| p.fee.cast_signed()).collect(); + let t0_decimals: Vec> = pools + .iter() + .map(|p| p.token0_decimals.map(i16::from)) + .collect(); + let t1_decimals: Vec> = pools + .iter() + .map(|p| p.token1_decimals.map(i16::from)) + .collect(); + let t0_symbols: Vec> = pools.iter().map(|p| p.token0_symbol.clone()).collect(); + let t1_symbols: Vec> = pools.iter().map(|p| p.token1_symbol.clone()).collect(); + let created_blocks: Vec = pools + .iter() + .map(|p| p.created_block.cast_signed()) + .collect(); + + sqlx::query( + "INSERT INTO uniswap_v3_pools + (chain_id, address, token0, token1, fee, token0_decimals, token1_decimals, + token0_symbol, token1_symbol, created_block) + SELECT $1, t.addr, t.t0, t.t1, t.fee, t.t0d, t.t1d, t.t0s, t.t1s, t.cblk + FROM UNNEST($2::BYTEA[], $3::BYTEA[], $4::BYTEA[], $5::INT4[], $6::INT2[], $7::INT2[], + $8::TEXT[], $9::TEXT[], $10::INT8[]) + AS t(addr, t0, t1, fee, t0d, t1d, t0s, t1s, cblk) + ON CONFLICT (chain_id, address) DO NOTHING", + ) + .bind(chain_id.cast_signed()) + .bind(addresses) + .bind(token0s) + .bind(token1s) + .bind(fees) + .bind(t0_decimals) + .bind(t1_decimals) + .bind(t0_symbols) + .bind(t1_symbols) + .bind(created_blocks) + .execute(&mut **tx) + .await + .context("batch_insert_pools")?; + Ok(()) +} + +pub async fn batch_upsert_pool_states( + tx: &mut Transaction<'_, Postgres>, + chain_id: u64, + states: &[PoolStateData], +) -> Result<()> { + if states.is_empty() { + return Ok(()); + } + let addresses: Vec> = states.iter().map(|s| addr_bytes(&s.pool_address)).collect(); + let block_numbers: Vec = states + .iter() + .map(|s| s.block_number.cast_signed()) + .collect(); + let sqrt_prices: Vec = states + .iter() + .map(|s| u160_to_decimal(s.sqrt_price_x96)) + .collect(); + let liquidities: Vec = states + .iter() + .map(|s| u128_to_decimal(s.liquidity)) + .collect(); + let ticks: Vec = states.iter().map(|s| s.tick).collect(); + + sqlx::query( + "WITH latest AS ( + SELECT DISTINCT ON (addr) addr, blk, sqrt, liq, tick + FROM UNNEST($2::BYTEA[], $3::INT8[], $4::NUMERIC[], $5::NUMERIC[], $6::INT4[]) + AS t(addr, blk, sqrt, liq, tick) + ORDER BY addr, blk DESC + ) + INSERT INTO uniswap_v3_pool_states + (chain_id, pool_address, block_number, sqrt_price_x96, liquidity, tick) + SELECT $1, l.addr, l.blk, l.sqrt, l.liq, l.tick + FROM latest l + WHERE EXISTS (SELECT 1 FROM uniswap_v3_pools WHERE chain_id = $1 AND address = l.addr) + ON CONFLICT (chain_id, pool_address) DO UPDATE + SET block_number = EXCLUDED.block_number, + sqrt_price_x96 = EXCLUDED.sqrt_price_x96, + liquidity = EXCLUDED.liquidity, + tick = EXCLUDED.tick", + ) + .bind(chain_id.cast_signed()) + .bind(addresses) + .bind(block_numbers) + .bind(sqrt_prices) + .bind(liquidities) + .bind(ticks) + .execute(&mut **tx) + .await + .context("batch_upsert_pool_states")?; + Ok(()) +} + +pub async fn batch_update_pool_liquidity( + tx: &mut Transaction<'_, Postgres>, + chain_id: u64, + updates: &[LiquidityUpdateData], +) -> Result<()> { + if updates.is_empty() { + return Ok(()); + } + let addresses: Vec> = updates + .iter() + .map(|u| addr_bytes(&u.pool_address)) + .collect(); + let liquidities: Vec = updates + .iter() + .map(|u| u128_to_decimal(u.liquidity)) + .collect(); + let block_numbers: Vec = updates + .iter() + .map(|u| u.block_number.cast_signed()) + .collect(); + + sqlx::query( + "WITH latest AS ( + SELECT DISTINCT ON (addr) addr, liq, blk + FROM UNNEST($2::BYTEA[], $3::NUMERIC[], $4::INT8[]) AS t(addr, liq, blk) + ORDER BY addr, blk DESC + ) + UPDATE uniswap_v3_pool_states s + SET liquidity = l.liq, block_number = l.blk + FROM latest l + WHERE s.chain_id = $1 AND s.pool_address = l.addr", + ) + .bind(chain_id.cast_signed()) + .bind(addresses) + .bind(liquidities) + .bind(block_numbers) + .execute(&mut **tx) + .await + .context("batch_update_pool_liquidity")?; + Ok(()) +} + +pub async fn batch_update_ticks( + tx: &mut Transaction<'_, Postgres>, + chain_id: u64, + deltas: &[TickDeltaData], +) -> Result<()> { + if deltas.is_empty() { + return Ok(()); + } + let addresses: Vec> = deltas.iter().map(|d| addr_bytes(&d.pool_address)).collect(); + let tick_idxs: Vec = deltas.iter().map(|d| d.tick_idx).collect(); + let delta_values: Vec = deltas.iter().map(|d| i128_to_decimal(d.delta)).collect(); + + sqlx::query( + "WITH input AS ( + SELECT t.addr, t.tick_idx, SUM(t.delta) AS total_delta + FROM UNNEST($2::BYTEA[], $3::INT4[], $4::NUMERIC[]) AS t(addr, tick_idx, delta) + GROUP BY t.addr, t.tick_idx + ), + upserted AS ( + INSERT INTO uniswap_v3_ticks (chain_id, pool_address, tick_idx, liquidity_net) + SELECT $1, i.addr, i.tick_idx, i.total_delta + FROM input i + WHERE EXISTS (SELECT 1 FROM uniswap_v3_pools WHERE chain_id = $1 AND address = i.addr) + ON CONFLICT (chain_id, pool_address, tick_idx) DO UPDATE + SET liquidity_net = uniswap_v3_ticks.liquidity_net + EXCLUDED.liquidity_net + RETURNING chain_id, pool_address, tick_idx, liquidity_net + ) + DELETE FROM uniswap_v3_ticks ticks + USING upserted + WHERE ticks.chain_id = upserted.chain_id + AND ticks.pool_address = upserted.pool_address + AND ticks.tick_idx = upserted.tick_idx + AND upserted.liquidity_net = 0", + ) + .bind(chain_id.cast_signed()) + .bind(addresses) + .bind(tick_idxs) + .bind(delta_values) + .execute(&mut **tx) + .await + .context("batch_update_ticks")?; + Ok(()) +} + +/// Insert/replace tick `liquidity_net` values directly (no delta accumulation). +/// Used by the subgraph seeder where the subgraph value IS the authoritative +/// net. +pub async fn batch_seed_ticks( + tx: &mut Transaction<'_, Postgres>, + chain_id: u64, + ticks: &[TickDeltaData], +) -> Result<()> { + if ticks.is_empty() { + return Ok(()); + } + let addresses: Vec> = ticks.iter().map(|d| addr_bytes(&d.pool_address)).collect(); + let tick_idxs: Vec = ticks.iter().map(|d| d.tick_idx).collect(); + let values: Vec = ticks.iter().map(|d| i128_to_decimal(d.delta)).collect(); + + sqlx::query( + "WITH input AS ( + SELECT t.addr, t.tick_idx, SUM(t.val) AS net + FROM UNNEST($2::BYTEA[], $3::INT4[], $4::NUMERIC[]) AS t(addr, tick_idx, val) + GROUP BY t.addr, t.tick_idx + ) + INSERT INTO uniswap_v3_ticks (chain_id, pool_address, tick_idx, liquidity_net) + SELECT $1, i.addr, i.tick_idx, i.net + FROM input i + WHERE EXISTS (SELECT 1 FROM uniswap_v3_pools WHERE chain_id = $1 AND address = i.addr) + AND i.net <> 0 + ON CONFLICT (chain_id, pool_address, tick_idx) DO UPDATE + SET liquidity_net = EXCLUDED.liquidity_net", + ) + .bind(chain_id.cast_signed()) + .bind(addresses) + .bind(tick_idxs) + .bind(values) + .execute(&mut **tx) + .await + .context("batch_seed_ticks")?; + Ok(()) +} + +// ── API read queries +// ────────────────────────────────────────────────────────── + +pub struct PoolRow { + pub address: Address, + pub token0: Address, + pub token1: Address, + pub fee: u32, + pub token0_decimals: Option, + pub token1_decimals: Option, + pub token0_symbol: Option, + pub token1_symbol: Option, + pub sqrt_price_x96: alloy_primitives::aliases::U160, + pub liquidity: u128, + pub tick: i32, +} + +pub async fn get_pools( + pool: &PgPool, + chain_id: u64, + after_address: Option>, + limit: i64, +) -> Result> { + let query_no_cursor = "SELECT p.address, p.token0, p.token1, p.fee, + p.token0_decimals, p.token1_decimals, + p.token0_symbol, p.token1_symbol, + s.sqrt_price_x96, s.liquidity, s.tick + FROM uniswap_v3_pools p + JOIN uniswap_v3_pool_states s + ON s.chain_id = p.chain_id AND s.pool_address = p.address + WHERE p.chain_id = $1 + ORDER BY p.address + LIMIT $2"; + + let query_with_cursor = "SELECT p.address, p.token0, p.token1, p.fee, + p.token0_decimals, p.token1_decimals, + p.token0_symbol, p.token1_symbol, + s.sqrt_price_x96, s.liquidity, s.tick + FROM uniswap_v3_pools p + JOIN uniswap_v3_pool_states s + ON s.chain_id = p.chain_id AND s.pool_address = p.address + WHERE p.chain_id = $1 + AND p.address > $2 + ORDER BY p.address + LIMIT $3"; + + let rows = if let Some(cursor) = after_address { + sqlx::query(query_with_cursor) + .bind(chain_id.cast_signed()) + .bind(cursor) + .bind(limit) + .fetch_all(pool) + .await + .context("get_pools with cursor")? + } else { + sqlx::query(query_no_cursor) + .bind(chain_id.cast_signed()) + .bind(limit) + .fetch_all(pool) + .await + .context("get_pools")? + }; + + rows.into_iter() + .map(|r| { + Ok(PoolRow { + address: bytes_to_addr(r.get("address"))?, + token0: bytes_to_addr(r.get("token0"))?, + token1: bytes_to_addr(r.get("token1"))?, + fee: r.get::("fee").cast_unsigned(), + token0_decimals: r + .get::, _>("token0_decimals") + .map(|d| u8::try_from(d).unwrap_or(0)), + token1_decimals: r + .get::, _>("token1_decimals") + .map(|d| u8::try_from(d).unwrap_or(0)), + token0_symbol: r.get("token0_symbol"), + token1_symbol: r.get("token1_symbol"), + sqrt_price_x96: decimal_to_u160(r.get("sqrt_price_x96")), + liquidity: decimal_to_u128(r.get("liquidity")), + tick: r.get("tick"), + }) + }) + .collect() +} + +pub struct TickRow { + pub tick_idx: i32, + pub liquidity_net: i128, +} + +pub async fn get_ticks( + pool: &PgPool, + chain_id: u64, + pool_address: &Address, +) -> Result> { + let rows = sqlx::query( + "SELECT tick_idx, liquidity_net + FROM uniswap_v3_ticks + WHERE chain_id = $1 + AND pool_address = $2 + ORDER BY tick_idx", + ) + .bind(chain_id.cast_signed()) + .bind(addr_bytes(pool_address)) + .fetch_all(pool) + .await + .context("get_ticks")?; + + Ok(rows + .into_iter() + .map(|r| TickRow { + tick_idx: r.get("tick_idx"), + liquidity_net: decimal_to_i128(r.get("liquidity_net")), + }) + .collect()) +} + +/// Returns all distinct token addresses that have no symbol recorded yet. +pub async fn get_tokens_missing_symbols(pool: &PgPool, chain_id: u64) -> Result> { + let rows = sqlx::query( + "SELECT DISTINCT token FROM ( + SELECT token0 AS token FROM uniswap_v3_pools + WHERE chain_id = $1 AND token0_symbol IS NULL + UNION + SELECT token1 AS token FROM uniswap_v3_pools + WHERE chain_id = $1 AND token1_symbol IS NULL + ) t", + ) + .bind(chain_id.cast_signed()) + .fetch_all(pool) + .await + .context("get_tokens_missing_symbols")?; + + rows.into_iter() + .map(|r| bytes_to_addr(r.get("token"))) + .collect() +} + +/// Updates token0_symbol / token1_symbol for all pools containing `token`. +pub async fn set_token_symbol( + pool: &PgPool, + chain_id: u64, + token: &Address, + symbol: &str, +) -> Result<()> { + let token_bytes = addr_bytes(token); + sqlx::query( + "UPDATE uniswap_v3_pools SET token0_symbol = $3 + WHERE chain_id = $1 AND token0 = $2 AND token0_symbol IS NULL", + ) + .bind(chain_id.cast_signed()) + .bind(&token_bytes) + .bind(symbol) + .execute(pool) + .await + .context("set_token_symbol token0")?; + + sqlx::query( + "UPDATE uniswap_v3_pools SET token1_symbol = $3 + WHERE chain_id = $1 AND token1 = $2 AND token1_symbol IS NULL", + ) + .bind(chain_id.cast_signed()) + .bind(&token_bytes) + .bind(symbol) + .execute(pool) + .await + .context("set_token_symbol token1")?; + + Ok(()) +} + +pub async fn get_latest_indexed_block(pool: &PgPool, chain_id: u64) -> Result> { + let row = sqlx::query( + "SELECT MAX(block_number) AS max_block FROM pool_indexer_checkpoints WHERE chain_id = $1", + ) + .bind(chain_id.cast_signed()) + .fetch_one(pool) + .await + .context("get_latest_indexed_block")?; + + Ok(row + .get::, _>("max_block") + .map(|b| b.cast_unsigned())) +} diff --git a/crates/pool-indexer/src/indexer/mod.rs b/crates/pool-indexer/src/indexer/mod.rs new file mode 100644 index 0000000000..c24144d0e0 --- /dev/null +++ b/crates/pool-indexer/src/indexer/mod.rs @@ -0,0 +1 @@ +pub mod uniswap_v3; diff --git a/crates/pool-indexer/src/indexer/uniswap_v3.rs b/crates/pool-indexer/src/indexer/uniswap_v3.rs new file mode 100644 index 0000000000..37e8c73069 --- /dev/null +++ b/crates/pool-indexer/src/indexer/uniswap_v3.rs @@ -0,0 +1,881 @@ +use { + crate::{config::IndexerConfig, db::uniswap_v3 as db}, + alloy::{ + primitives::Address, + providers::Provider, + rpc::types::{BlockNumberOrTag, Filter, FilterSet, Log}, + sol_types::SolEvent, + }, + anyhow::{Context, Result}, + contracts::alloy::{ + ERC20::ERC20, + IUniswapV3Factory::IUniswapV3Factory::PoolCreated, + UniswapV3Pool::UniswapV3Pool::{self, Burn, Initialize, Mint, Swap}, + }, + ethrpc::AlloyProvider, + futures::{StreamExt, TryStreamExt}, + sqlx::PgPool, + std::collections::HashMap, + tracing::instrument, +}; + +/// Cached liquidity value keyed by (pool_address, block_number). +type LiquidityCache = HashMap<(Address, u64), u128>; +/// Cached ERC-20 decimal value keyed by token address. +type DecimalsCache = HashMap; +/// Cached ERC-20 symbol string keyed by token address. +type SymbolsCache = HashMap; + +/// Number of chunk log-fetches issued concurrently (overlap RPC I/O with DB +/// writes). +const FETCH_CONCURRENCY: usize = 8; +/// Max concurrent eth_calls during prefetch phases. +const PREFETCH_CONCURRENCY: usize = 50; + +// ── data types for batch DB operations ─────────────────────────────────────── + +pub struct NewPoolData { + pub address: Address, + pub token0: Address, + pub token1: Address, + pub fee: u32, + pub token0_decimals: Option, + pub token1_decimals: Option, + pub token0_symbol: Option, + pub token1_symbol: Option, + pub created_block: u64, +} + +pub struct PoolStateData { + pub pool_address: Address, + pub block_number: u64, + pub sqrt_price_x96: alloy::primitives::aliases::U160, + pub liquidity: u128, + pub tick: i32, +} + +pub struct LiquidityUpdateData { + pub pool_address: Address, + pub block_number: u64, + pub liquidity: u128, +} + +pub struct TickDeltaData { + pub pool_address: Address, + pub tick_idx: i32, + pub delta: i128, +} + +struct ChunkChanges { + new_pools: Vec, + /// Full state updates (from Initialize / Swap). + pool_states: Vec, + /// Liquidity-only updates (from Mint/Burn with no Swap in this chunk). + liquidity_updates: Vec, + /// Accumulated tick deltas. + tick_deltas: Vec, +} + +// ── indexer +// ─────────────────────────────────────────────────────────────────── + +pub struct UniswapV3Indexer { + provider: AlloyProvider, + db: PgPool, + chain_id: u64, + factory: Address, + chunk_size: u64, + finality_tag: BlockNumberOrTag, +} + +impl UniswapV3Indexer { + pub fn new(provider: AlloyProvider, db: PgPool, config: &IndexerConfig) -> Self { + Self { + provider, + db, + chain_id: config.chain_id, + factory: config.factory_address, + chunk_size: config.chunk_size, + finality_tag: if config.use_latest { + BlockNumberOrTag::Latest + } else { + BlockNumberOrTag::Finalized + }, + } + } + + pub async fn run(self, poll_interval: std::time::Duration) -> ! { + self.backfill_symbols().await; + loop { + if let Err(err) = self.run_once().await { + tracing::error!(?err, "indexer error, retrying after poll interval"); + } + tokio::time::sleep(poll_interval).await; + } + } + + /// Fetches ERC-20 symbols for any token in the DB that is missing one. + /// Runs once at startup; failures for individual tokens are logged and + /// skipped. + async fn backfill_symbols(&self) { + let tokens = match db::get_tokens_missing_symbols(&self.db, self.chain_id).await { + Ok(t) => t, + Err(err) => { + tracing::warn!( + ?err, + "failed to query tokens missing symbols, skipping backfill" + ); + return; + } + }; + if tokens.is_empty() { + return; + } + tracing::info!(count = tokens.len(), "backfilling token symbols"); + + let symbols: Vec<(Address, String)> = futures::stream::iter(tokens) + .map(|token| async move { + let sym = fetch_symbol(&self.provider, token).await; + (token, sym) + }) + .buffer_unordered(PREFETCH_CONCURRENCY) + .filter_map(|(token, opt)| async move { opt.map(|s| (token, s)) }) + .collect() + .await; + + let mut updated = 0usize; + for (token, symbol) in &symbols { + match db::set_token_symbol(&self.db, self.chain_id, token, symbol).await { + Ok(()) => updated += 1, + Err(err) => tracing::warn!(%token, ?err, "failed to backfill symbol"), + } + } + tracing::info!(updated, "token symbol backfill complete"); + } + + async fn run_once(&self) -> Result<()> { + let finalized = self + .provider + .get_block_by_number(self.finality_tag) + .await + .context("get finalized block")? + .context("no finalized block")? + .header + .number; + + let last_indexed = db::get_checkpoint(&self.db, self.chain_id, &self.factory) + .await? + .unwrap_or(0); + + if last_indexed >= finalized { + return Ok(()); + } + + let mut chunks = Vec::new(); + let mut start = last_indexed + 1; + while start <= finalized { + let end = (start + self.chunk_size - 1).min(finalized); + chunks.push((start, end)); + start = end + 1; + } + + // Fetch up to FETCH_CONCURRENCY chunks' logs in parallel; commit in order. + futures::stream::iter(chunks) + .map(|(start, end)| async move { + let logs = self.fetch_logs_bisecting(start, end).await?; + Ok::<_, anyhow::Error>((start, end, logs)) + }) + .buffered(FETCH_CONCURRENCY) + .try_for_each(|(start, end, logs)| self.commit_chunk(start, end, logs)) + .await + } + + /// Fetches logs for `[from, to]`, sequentially bisecting on + /// results-overflow errors. Bisection is sequential within a chunk to + /// avoid exponential RPC fan-out; the outer `buffered` layer provides + /// cross-chunk concurrency. + fn fetch_logs_bisecting( + &self, + from: u64, + to: u64, + ) -> futures::future::BoxFuture<'_, Result>> { + Box::pin(async move { + match self.fetch_logs(from, to).await { + Ok(logs) => Ok(logs), + Err(err) if is_range_too_large(&err) && to > from => { + let mid = (from + to) / 2; + tracing::debug!(from, to, mid, "range too large, bisecting"); + let mut left = self.fetch_logs_bisecting(from, mid).await?; + let right = self.fetch_logs_bisecting(mid + 1, to).await?; + left.extend(right); + Ok(left) + } + Err(err) => Err(err), + } + }) + } + + #[instrument(skip(self, logs), fields(chunk_start, chunk_end))] + async fn commit_chunk(&self, chunk_start: u64, chunk_end: u64, logs: Vec) -> Result<()> { + // Pre-fetch all I/O (liquidity eth_calls + decimals/symbols eth_calls) in + // parallel before opening the DB transaction. + let (liq_cache, dec_cache, sym_cache) = tokio::join!( + self.prefetch_liquidities(&logs), + self.prefetch_decimals(&logs), + self.prefetch_symbols(&logs), + ); + + let changes = self.collect_changes(&logs, &liq_cache, &dec_cache, &sym_cache); + + tracing::debug!( + chunk_start, + chunk_end, + log_count = logs.len(), + new_pools = changes.new_pools.len(), + pool_states = changes.pool_states.len(), + liq_updates = changes.liquidity_updates.len(), + tick_deltas = changes.tick_deltas.len(), + "processing chunk" + ); + + let mut tx = self.db.begin().await.context("begin transaction")?; + db::batch_insert_pools(&mut tx, self.chain_id, &changes.new_pools).await?; + db::batch_upsert_pool_states(&mut tx, self.chain_id, &changes.pool_states).await?; + db::batch_update_pool_liquidity(&mut tx, self.chain_id, &changes.liquidity_updates).await?; + db::batch_update_ticks(&mut tx, self.chain_id, &changes.tick_deltas).await?; + db::set_checkpoint(&mut tx, self.chain_id, &self.factory, chunk_end).await?; + tx.commit().await.context("commit transaction")?; + + Ok(()) + } + + /// Collect all state changes from a set of logs into in-memory structures. + /// This is pure computation — all I/O was done during the prefetch phase. + fn collect_changes( + &self, + logs: &[Log], + liq_cache: &LiquidityCache, + dec_cache: &DecimalsCache, + sym_cache: &SymbolsCache, + ) -> ChunkChanges { + collect_log_changes(self.factory, logs, liq_cache, dec_cache, sym_cache) + } + + /// Parallel-fetch liquidity for every unique (pool, block) pair from + /// Mint/Burn events. + async fn prefetch_liquidities(&self, logs: &[Log]) -> LiquidityCache { + let pairs: Vec<(Address, u64)> = logs + .iter() + .filter_map(|log| { + let t = log.topic0()?; + if *t == Mint::SIGNATURE_HASH || *t == Burn::SIGNATURE_HASH { + Some((log.address(), log.block_number?)) + } else { + None + } + }) + .collect::>() + .into_iter() + .collect(); + + futures::stream::iter(pairs) + .map(|(addr, block)| async move { + let liq = fetch_pool_liquidity(&self.provider, addr, block).await; + ((addr, block), liq) + }) + .buffer_unordered(PREFETCH_CONCURRENCY) + .filter_map(|(key, opt)| async move { opt.map(|v| (key, v)) }) + .collect() + .await + } + + /// Parallel-fetch ERC-20 decimals for all tokens referenced in PoolCreated + /// events. + async fn prefetch_decimals(&self, logs: &[Log]) -> DecimalsCache { + let tokens: Vec
= logs + .iter() + .filter_map(|log| { + let t = log.topic0()?; + if *t != PoolCreated::SIGNATURE_HASH || log.address() != self.factory { + return None; + } + let decoded = PoolCreated::decode_log(&log.inner).ok()?; + Some([decoded.data.token0, decoded.data.token1]) + }) + .flatten() + .collect::>() + .into_iter() + .collect(); + + futures::stream::iter(tokens) + .map(|token| async move { + let dec = fetch_decimals(&self.provider, token).await; + (token, dec) + }) + .buffer_unordered(PREFETCH_CONCURRENCY) + .filter_map(|(token, opt)| async move { opt.map(|d| (token, d)) }) + .collect() + .await + } + + /// Parallel-fetch ERC-20 symbols for all tokens referenced in PoolCreated + /// events. + async fn prefetch_symbols(&self, logs: &[Log]) -> SymbolsCache { + let tokens: Vec
= logs + .iter() + .filter_map(|log| { + let t = log.topic0()?; + if *t != PoolCreated::SIGNATURE_HASH || log.address() != self.factory { + return None; + } + let decoded = PoolCreated::decode_log(&log.inner).ok()?; + Some([decoded.data.token0, decoded.data.token1]) + }) + .flatten() + .collect::>() + .into_iter() + .collect(); + + futures::stream::iter(tokens) + .map(|token| async move { + let sym = fetch_symbol(&self.provider, token).await; + (token, sym) + }) + .buffer_unordered(PREFETCH_CONCURRENCY) + .filter_map(|(token, opt)| async move { opt.map(|s| (token, s)) }) + .collect() + .await + } + + async fn fetch_logs(&self, from: u64, to: u64) -> Result> { + let topics = FilterSet::from_iter([ + PoolCreated::SIGNATURE_HASH, + Initialize::SIGNATURE_HASH, + Mint::SIGNATURE_HASH, + Burn::SIGNATURE_HASH, + Swap::SIGNATURE_HASH, + ]); + let filter = Filter::new() + .from_block(from) + .to_block(to) + .event_signature(topics); + + self.provider + .get_logs(&filter) + .await + .with_context(|| format!("get_logs({from}..={to})")) + } +} + +// ── helpers +// ─────────────────────────────────────────────────────────────────── + +/// Sign-extends a 24-bit signed integer (alloy I24) to i32. +fn signed24_to_i32(v: alloy::primitives::aliases::I24) -> i32 { + let raw = v.into_raw().as_limbs()[0] as u32; + (raw << 8).cast_signed() >> 8 +} + +async fn fetch_pool_liquidity(provider: &AlloyProvider, pool: Address, block: u64) -> Option { + UniswapV3Pool::new(pool, provider.clone()) + .liquidity() + .block(block.into()) + .call() + .await + .ok() +} + +async fn fetch_decimals(provider: &AlloyProvider, token: Address) -> Option { + ERC20::new(token, provider.clone()) + .decimals() + .call() + .await + .ok() +} + +async fn fetch_symbol(provider: &AlloyProvider, token: Address) -> Option { + ERC20::new(token, provider.clone()) + .symbol() + .call() + .await + .ok() +} + +/// Returns true when the RPC rejects a request because the result set would +/// exceed its limit. Checks the full error chain because anyhow context wraps +/// the inner RPC error. +fn is_range_too_large(err: &anyhow::Error) -> bool { + err.chain().any(|e| { + let msg = e.to_string().to_lowercase(); + msg.contains("max results") + || msg.contains("result limit") + || msg.contains("too many results") + }) +} + +fn collect_log_changes( + factory: Address, + logs: &[Log], + liq_cache: &LiquidityCache, + dec_cache: &DecimalsCache, + sym_cache: &SymbolsCache, +) -> ChunkChanges { + // Pool address → latest full state (from Initialize or Swap). + let mut full_states: HashMap = HashMap::new(); + // Pool address → latest liquidity update (from Mint/Burn, only if no full + // state has been established for this pool in the chunk). + let mut liq_only: HashMap = HashMap::new(); + // (pool, tick_idx) → accumulated signed delta. + let mut tick_deltas: HashMap<(Address, i32), i128> = HashMap::new(); + let mut new_pools: HashMap = HashMap::new(); + + for log in logs { + let Some(t) = log.topic0() else { continue }; + + if *t == PoolCreated::SIGNATURE_HASH && log.address() == factory { + let Ok(decoded) = PoolCreated::decode_log(&log.inner) else { + continue; + }; + let e = &decoded.data; + let pool: Address = e.pool; + let token0: Address = e.token0; + let token1: Address = e.token1; + let created_block = log.block_number.unwrap_or(0); + tracing::debug!(%pool, %token0, %token1, fee = e.fee.to::(), "discovered pool"); + new_pools.insert( + pool, + NewPoolData { + address: pool, + token0, + token1, + fee: e.fee.to::(), + token0_decimals: dec_cache.get(&token0).copied(), + token1_decimals: dec_cache.get(&token1).copied(), + token0_symbol: sym_cache.get(&token0).cloned(), + token1_symbol: sym_cache.get(&token1).cloned(), + created_block, + }, + ); + } else if *t == Initialize::SIGNATURE_HASH { + let Ok(decoded) = Initialize::decode_log(&log.inner) else { + continue; + }; + let e = &decoded.data; + let pool = log.address(); + let block = log.block_number.unwrap_or(0); + // Preserve any liquidity already accumulated for this pool in this chunk. + let liquidity = full_states.get(&pool).map(|s| s.liquidity).unwrap_or(0); + full_states.insert( + pool, + PoolStateData { + pool_address: pool, + block_number: block, + sqrt_price_x96: e.sqrtPriceX96, + liquidity, + tick: signed24_to_i32(e.tick), + }, + ); + liq_only.remove(&pool); + } else if *t == Swap::SIGNATURE_HASH { + let Ok(decoded) = Swap::decode_log(&log.inner) else { + continue; + }; + let e = &decoded.data; + let pool = log.address(); + let block = log.block_number.unwrap_or(0); + full_states.insert( + pool, + PoolStateData { + pool_address: pool, + block_number: block, + sqrt_price_x96: e.sqrtPriceX96, + liquidity: e.liquidity, + tick: signed24_to_i32(e.tick), + }, + ); + liq_only.remove(&pool); + } else if *t == Mint::SIGNATURE_HASH { + let Ok(decoded) = Mint::decode_log(&log.inner) else { + continue; + }; + let e = &decoded.data; + let pool = log.address(); + let block = log.block_number.unwrap_or(0); + let amount = e.amount.cast_signed(); + *tick_deltas + .entry((pool, signed24_to_i32(e.tickLower))) + .or_default() += amount as i128; + *tick_deltas + .entry((pool, signed24_to_i32(e.tickUpper))) + .or_default() -= amount as i128; + if let Some(&liq) = liq_cache.get(&(pool, block)) { + if let Some(state) = full_states.get_mut(&pool) { + state.liquidity = liq; + state.block_number = block; + } else { + liq_only.insert(pool, (block, liq)); + } + } + } else if *t == Burn::SIGNATURE_HASH { + let Ok(decoded) = Burn::decode_log(&log.inner) else { + continue; + }; + let e = &decoded.data; + let pool = log.address(); + let block = log.block_number.unwrap_or(0); + let amount = e.amount.cast_signed(); + *tick_deltas + .entry((pool, signed24_to_i32(e.tickLower))) + .or_default() -= amount as i128; + *tick_deltas + .entry((pool, signed24_to_i32(e.tickUpper))) + .or_default() += amount as i128; + if let Some(&liq) = liq_cache.get(&(pool, block)) { + if let Some(state) = full_states.get_mut(&pool) { + state.liquidity = liq; + state.block_number = block; + } else { + liq_only.insert(pool, (block, liq)); + } + } + } + } + + ChunkChanges { + new_pools: new_pools.into_values().collect(), + pool_states: full_states.into_values().collect(), + liquidity_updates: liq_only + .into_iter() + .map(|(pool, (block, liq))| LiquidityUpdateData { + pool_address: pool, + block_number: block, + liquidity: liq, + }) + .collect(), + tick_deltas: tick_deltas + .into_iter() + .filter(|(_, d)| *d != 0) + .map(|((pool, tick), delta)| TickDeltaData { + pool_address: pool, + tick_idx: tick, + delta, + }) + .collect(), + } +} + +#[cfg(test)] +mod tests { + use { + super::*, + alloy::{ + primitives::{ + I256, + aliases::{I24, U24, U160}, + }, + sol_types::SolEvent, + }, + contracts::alloy::{ + IUniswapV3Factory::IUniswapV3Factory::PoolCreated, + UniswapV3Pool::UniswapV3Pool::{Burn, Initialize, Mint, Swap}, + }, + }; + + const FACTORY: Address = Address::repeat_byte(0xFA); + const POOL: Address = Address::repeat_byte(0x01); + const TOKEN0: Address = Address::repeat_byte(0x02); + const TOKEN1: Address = Address::repeat_byte(0x03); + // sqrt(1) * 2^96 — a valid initialised price + const SQRT_PRICE_1: u128 = 79_228_162_514_264_337_593_543_950_336; + + fn t(n: i32) -> I24 { + I24::try_from(n).unwrap() + } + + fn make_log(address: Address, block: u64, event: impl SolEvent) -> Log { + Log { + inner: alloy_primitives::Log { + address, + data: event.encode_log_data(), + }, + block_number: Some(block), + block_hash: None, + block_timestamp: None, + transaction_hash: None, + transaction_index: None, + log_index: None, + removed: false, + } + } + + #[test] + fn empty_logs_produce_empty_changes() { + let c = collect_log_changes( + FACTORY, + &[], + &Default::default(), + &Default::default(), + &Default::default(), + ); + assert!(c.new_pools.is_empty()); + assert!(c.pool_states.is_empty()); + assert!(c.liquidity_updates.is_empty()); + assert!(c.tick_deltas.is_empty()); + } + + #[test] + fn pool_created_from_factory_inserted() { + let event = PoolCreated { + token0: TOKEN0, + token1: TOKEN1, + fee: U24::from(500u32), + tickSpacing: t(10), + pool: POOL, + }; + let log = make_log(FACTORY, 100, event); + let c = collect_log_changes( + FACTORY, + &[log], + &Default::default(), + &Default::default(), + &Default::default(), + ); + assert_eq!(c.new_pools.len(), 1); + assert_eq!(c.new_pools[0].address, POOL); + assert_eq!(c.new_pools[0].fee, 500); + } + + #[test] + fn pool_created_wrong_factory_ignored() { + let event = PoolCreated { + token0: TOKEN0, + token1: TOKEN1, + fee: U24::from(500u32), + tickSpacing: t(10), + pool: POOL, + }; + let log = make_log(Address::repeat_byte(0xBB), 100, event); + let c = collect_log_changes( + FACTORY, + &[log], + &Default::default(), + &Default::default(), + &Default::default(), + ); + assert!(c.new_pools.is_empty()); + } + + #[test] + fn initialize_creates_full_state_with_zero_liquidity() { + let event = Initialize { + sqrtPriceX96: U160::from(SQRT_PRICE_1), + tick: t(0), + }; + let log = make_log(POOL, 100, event); + let c = collect_log_changes( + FACTORY, + &[log], + &Default::default(), + &Default::default(), + &Default::default(), + ); + assert_eq!(c.pool_states.len(), 1); + assert_eq!(c.pool_states[0].pool_address, POOL); + assert_eq!(c.pool_states[0].block_number, 100); + assert_eq!(c.pool_states[0].tick, 0); + assert_eq!(c.pool_states[0].liquidity, 0); + } + + #[test] + fn swap_creates_full_state() { + let event = Swap { + sender: Address::ZERO, + recipient: Address::ZERO, + amount0: I256::ZERO, + amount1: I256::ZERO, + sqrtPriceX96: U160::from(SQRT_PRICE_1), + liquidity: 500_000u128, + tick: t(42), + }; + let log = make_log(POOL, 200, event); + let c = collect_log_changes( + FACTORY, + &[log], + &Default::default(), + &Default::default(), + &Default::default(), + ); + assert_eq!(c.pool_states.len(), 1); + assert_eq!(c.pool_states[0].tick, 42); + assert_eq!(c.pool_states[0].liquidity, 500_000); + assert_eq!(c.pool_states[0].block_number, 200); + } + + #[test] + fn mint_produces_correct_tick_deltas_and_liq_only() { + let amount = 1_000_000u128; + let event = Mint { + sender: Address::ZERO, + owner: Address::ZERO, + tickLower: t(-100), + tickUpper: t(100), + amount, + amount0: alloy::primitives::U256::ZERO, + amount1: alloy::primitives::U256::ZERO, + }; + let liq_cache: LiquidityCache = HashMap::from([((POOL, 100u64), amount)]); + let log = make_log(POOL, 100, event); + let c = collect_log_changes( + FACTORY, + &[log], + &liq_cache, + &Default::default(), + &Default::default(), + ); + + assert_eq!(c.tick_deltas.len(), 2); + let lower = c.tick_deltas.iter().find(|d| d.tick_idx == -100).unwrap(); + let upper = c.tick_deltas.iter().find(|d| d.tick_idx == 100).unwrap(); + assert_eq!(lower.delta, amount as i128); + assert_eq!(upper.delta, -(amount as i128)); + + // No prior full state → goes into liq_only + assert_eq!(c.liquidity_updates.len(), 1); + assert_eq!(c.liquidity_updates[0].liquidity, amount); + assert!(c.pool_states.is_empty()); + } + + #[test] + fn mint_after_swap_updates_full_state_liquidity() { + let swap_liq = 500_000u128; + let after_mint_liq = 600_000u128; + + let swap = Swap { + sender: Address::ZERO, + recipient: Address::ZERO, + amount0: I256::ZERO, + amount1: I256::ZERO, + sqrtPriceX96: U160::from(SQRT_PRICE_1), + liquidity: swap_liq, + tick: t(0), + }; + let mint = Mint { + sender: Address::ZERO, + owner: Address::ZERO, + tickLower: t(-100), + tickUpper: t(100), + amount: 100_000u128, + amount0: alloy::primitives::U256::ZERO, + amount1: alloy::primitives::U256::ZERO, + }; + let liq_cache: LiquidityCache = HashMap::from([((POOL, 201u64), after_mint_liq)]); + let logs = vec![make_log(POOL, 200, swap), make_log(POOL, 201, mint)]; + let c = collect_log_changes( + FACTORY, + &logs, + &liq_cache, + &Default::default(), + &Default::default(), + ); + + assert_eq!(c.pool_states.len(), 1); + // Swap established full_state; Mint updated its liquidity from the cache. + assert_eq!(c.pool_states[0].liquidity, after_mint_liq); + assert_eq!(c.pool_states[0].block_number, 201); + assert!(c.liquidity_updates.is_empty()); + } + + #[test] + fn burn_zeroes_tick_filtered_out() { + let amount = 1_000_000u128; + let mint = Mint { + sender: Address::ZERO, + owner: Address::ZERO, + tickLower: t(-100), + tickUpper: t(100), + amount, + amount0: alloy::primitives::U256::ZERO, + amount1: alloy::primitives::U256::ZERO, + }; + let burn = Burn { + owner: Address::ZERO, + tickLower: t(-100), + tickUpper: t(100), + amount, + amount0: alloy::primitives::U256::ZERO, + amount1: alloy::primitives::U256::ZERO, + }; + let logs = vec![make_log(POOL, 100, mint), make_log(POOL, 101, burn)]; + let c = collect_log_changes( + FACTORY, + &logs, + &Default::default(), + &Default::default(), + &Default::default(), + ); + assert!(c.tick_deltas.is_empty(), "zero-net ticks must be pruned"); + } + + #[test] + fn partial_burn_leaves_nonzero_delta() { + let mint_amount = 1_000_000u128; + let burn_amount = 400_000u128; + let mint = Mint { + sender: Address::ZERO, + owner: Address::ZERO, + tickLower: t(-100), + tickUpper: t(100), + amount: mint_amount, + amount0: alloy::primitives::U256::ZERO, + amount1: alloy::primitives::U256::ZERO, + }; + let burn = Burn { + owner: Address::ZERO, + tickLower: t(-100), + tickUpper: t(100), + amount: burn_amount, + amount0: alloy::primitives::U256::ZERO, + amount1: alloy::primitives::U256::ZERO, + }; + let logs = vec![make_log(POOL, 100, mint), make_log(POOL, 101, burn)]; + let c = collect_log_changes( + FACTORY, + &logs, + &Default::default(), + &Default::default(), + &Default::default(), + ); + + let expected = (mint_amount - burn_amount) as i128; + let lower = c.tick_deltas.iter().find(|d| d.tick_idx == -100).unwrap(); + let upper = c.tick_deltas.iter().find(|d| d.tick_idx == 100).unwrap(); + assert_eq!(lower.delta, expected); + assert_eq!(upper.delta, -expected); + } + + #[test] + fn pool_created_and_initialize_same_chunk() { + let created = PoolCreated { + token0: TOKEN0, + token1: TOKEN1, + fee: U24::from(3000u32), + tickSpacing: t(60), + pool: POOL, + }; + let init = Initialize { + sqrtPriceX96: U160::from(SQRT_PRICE_1), + tick: t(0), + }; + let logs = vec![make_log(FACTORY, 100, created), make_log(POOL, 100, init)]; + let c = collect_log_changes( + FACTORY, + &logs, + &Default::default(), + &Default::default(), + &Default::default(), + ); + assert_eq!(c.new_pools.len(), 1); + assert_eq!(c.pool_states.len(), 1); + assert_eq!(c.pool_states[0].pool_address, POOL); + } +} diff --git a/crates/pool-indexer/src/lib.rs b/crates/pool-indexer/src/lib.rs new file mode 100644 index 0000000000..3f93471dfd --- /dev/null +++ b/crates/pool-indexer/src/lib.rs @@ -0,0 +1,9 @@ +pub mod api; +pub mod arguments; +pub mod config; +pub mod db; +pub mod indexer; +pub mod run; +pub mod seeder; + +pub use run::{run, start}; diff --git a/crates/pool-indexer/src/main.rs b/crates/pool-indexer/src/main.rs new file mode 100644 index 0000000000..646eb280fd --- /dev/null +++ b/crates/pool-indexer/src/main.rs @@ -0,0 +1,12 @@ +#[cfg(feature = "mimalloc-allocator")] +#[global_allocator] +static GLOBAL: mimalloc::MiMalloc = mimalloc::MiMalloc; + +#[cfg(not(feature = "mimalloc-allocator"))] +#[global_allocator] +static GLOBAL: tikv_jemallocator::Jemalloc = tikv_jemallocator::Jemalloc; + +#[tokio::main] +async fn main() { + pool_indexer::start(std::env::args()).await; +} diff --git a/crates/pool-indexer/src/run.rs b/crates/pool-indexer/src/run.rs new file mode 100644 index 0000000000..39659524a2 --- /dev/null +++ b/crates/pool-indexer/src/run.rs @@ -0,0 +1,84 @@ +use { + crate::{ + api::AppState, + arguments::{Arguments, Command}, + config::Configuration, + indexer::uniswap_v3::UniswapV3Indexer, + }, + clap::Parser, + ethrpc::{Config as EthRpcConfig, web3}, + sqlx::postgres::PgPoolOptions, + std::sync::Arc, + tokio::task::JoinSet, +}; + +pub async fn start(args: impl Iterator) { + let args = Arguments::parse_from(args); + let log_filter = std::env::var("RUST_LOG").unwrap_or_else(|_| "info".into()); + observe::tracing::init::initialize(&observe::Config::new(&log_filter, None, false, None)); + observe::panic_hook::install(); + + match args.command { + Command::Run { config } => { + let config = Configuration::from_path(&config).expect("failed to load configuration"); + tracing::info!("pool-indexer starting"); + run(config).await; + } + Command::Seed { + config, + subgraph_url, + block, + } => { + let config = Configuration::from_path(&config).expect("failed to load configuration"); + tracing::info!("pool-indexer seeding from subgraph"); + let db = connect_db(&config).await; + crate::seeder::seed(&db, &config, &subgraph_url, block) + .await + .expect("seeding failed"); + } + } +} + +pub async fn run(config: Configuration) { + let db = connect_db(&config).await; + + let w3 = web3( + EthRpcConfig::default(), + &config.indexer.rpc_url, + Some("pool-indexer"), + ); + + let poll_interval = config.indexer.poll_interval(); + let indexer = UniswapV3Indexer::new(w3.provider.clone(), db.clone(), &config.indexer); + + let api_state = Arc::new(AppState { + db, + chain_id: config.indexer.chain_id, + }); + let router = crate::api::router(api_state); + let bind_address = config.api.bind_address; + + let mut set = JoinSet::new(); + set.spawn(async move { indexer.run(poll_interval).await }); + set.spawn(async move { serve(router, bind_address).await }); + + if let Some(result) = set.join_next().await { + panic!("pool-indexer task exited: {result:?}"); + } +} + +async fn connect_db(config: &Configuration) -> sqlx::PgPool { + PgPoolOptions::new() + .max_connections(config.database.max_connections.get()) + .connect(&config.database.url) + .await + .expect("failed to connect to database") +} + +async fn serve(router: axum::Router, addr: std::net::SocketAddr) { + let listener = tokio::net::TcpListener::bind(addr) + .await + .expect("failed to bind TCP listener"); + tracing::info!(%addr, "serving pool-indexer API"); + axum::serve(listener, router).await.expect("server error"); +} diff --git a/crates/pool-indexer/src/seeder.rs b/crates/pool-indexer/src/seeder.rs new file mode 100644 index 0000000000..3d4d651bdb --- /dev/null +++ b/crates/pool-indexer/src/seeder.rs @@ -0,0 +1,310 @@ +use { + crate::{ + config::Configuration, + db::uniswap_v3 as db, + indexer::uniswap_v3::{NewPoolData, PoolStateData, TickDeltaData}, + }, + alloy_primitives::{Address, aliases::U160}, + anyhow::{Context, Result, bail}, + futures::{StreamExt, TryStreamExt}, + reqwest::Client, + serde::Deserialize, + serde_json::{Value, json}, + sqlx::PgPool, + tracing::info, +}; + +const PAGE_SIZE: usize = 1000; +const TICK_CONCURRENCY: usize = 50; + +// ── Subgraph response types +// ─────────────────────────────────────────────────── + +#[derive(Deserialize)] +struct GqlResponse { + data: Option, + errors: Option, +} + +#[derive(Deserialize)] +struct PoolsPage { + pools: Vec, +} + +#[derive(Deserialize)] +#[serde(rename_all = "camelCase")] +struct SubgraphPool { + id: String, + token0: SubgraphToken, + token1: SubgraphToken, + fee_tier: String, + created_at_block_number: String, + sqrt_price: String, + liquidity: String, + tick: Option, +} + +#[derive(Deserialize)] +struct SubgraphToken { + id: String, + decimals: String, + symbol: Option, +} + +#[derive(Deserialize)] +struct TicksPage { + ticks: Vec, +} + +#[derive(Deserialize)] +#[serde(rename_all = "camelCase")] +struct SubgraphTick { + tick_idx: String, + liquidity_net: String, +} + +#[derive(Deserialize)] +struct MetaPage { + #[serde(rename = "_meta")] + meta: MetaInfo, +} + +#[derive(Deserialize)] +struct MetaInfo { + block: MetaBlock, +} + +#[derive(Deserialize)] +struct MetaBlock { + number: u64, +} + +// ── GraphQL helpers +// ─────────────────────────────────────────────────────────── + +async fn gql Deserialize<'de>>( + client: &Client, + url: &str, + query: &str, + vars: Value, +) -> Result { + let resp = client + .post(url) + .json(&json!({ "query": query, "variables": vars })) + .send() + .await + .context("subgraph HTTP request")?; + let gql_resp: GqlResponse = resp.json().await.context("decode subgraph response")?; + if let Some(errors) = gql_resp.errors { + bail!("subgraph errors: {errors}"); + } + let data = gql_resp.data.context("missing data field")?; + serde_json::from_value(data).context("decode subgraph data") +} + +// ── Fetchers +// ────────────────────────────────────────────────────────────────── + +async fn fetch_current_block(client: &Client, url: &str) -> Result { + let page: MetaPage = gql(client, url, "{ _meta { block { number } } }", json!({})).await?; + Ok(page.meta.block.number) +} + +async fn fetch_pools_page( + client: &Client, + url: &str, + block: u64, + cursor: &str, +) -> Result> { + let query = "query($block: Int!, $cursor: String!) { + pools(first: 1000, orderBy: id, where: {id_gt: $cursor}, block: {number: $block}) { + id + token0 { id decimals symbol } + token1 { id decimals symbol } + feeTier + createdAtBlockNumber + sqrtPrice + liquidity + tick + } + }"; + let page: PoolsPage = gql( + client, + url, + query, + json!({ "block": block, "cursor": cursor }), + ) + .await?; + Ok(page.pools) +} + +async fn fetch_ticks_for_pool( + client: Client, + url: String, + pool_id: String, + block: u64, +) -> Result> { + let query = "query($pool: String!, $cursor: Int!, $block: Int!) { + ticks( + first: 1000, + orderBy: tickIdx, + where: { pool: $pool, tickIdx_gt: $cursor }, + block: { number: $block } + ) { + tickIdx + liquidityNet + } + }"; + + let pool_addr: Address = pool_id.parse().context("parse pool address")?; + let mut ticks = Vec::new(); + // Start below minimum Uniswap V3 tick (-887272) + let mut cursor: i64 = -887_273; + + loop { + let page: TicksPage = gql( + &client, + &url, + query, + json!({ "pool": pool_id, "cursor": cursor, "block": block }), + ) + .await?; + + let n = page.ticks.len(); + for t in &page.ticks { + ticks.push(TickDeltaData { + pool_address: pool_addr, + tick_idx: t.tick_idx.parse().context("parse tickIdx")?, + delta: t.liquidity_net.parse().context("parse liquidityNet")?, + }); + } + + if n < PAGE_SIZE { + break; + } + cursor = ticks.last().unwrap().tick_idx as i64; + } + + Ok(ticks) +} + +// ── Public entry point +// ──────────────────────────────────────────────────────── + +pub async fn seed( + db: &PgPool, + config: &Configuration, + subgraph_url: &str, + block: Option, +) -> Result<()> { + let client = Client::new(); + let chain_id = config.indexer.chain_id; + + let block = match block { + Some(b) => b, + None => fetch_current_block(&client, subgraph_url) + .await + .context("fetch current subgraph block")?, + }; + info!(block, "seeding pool-indexer from subgraph"); + + // ── Phase 1: pools ──────────────────────────────────────────────────────── + let mut pool_ids: Vec = Vec::new(); + let mut cursor = String::new(); + + loop { + let page = fetch_pools_page(&client, subgraph_url, block, &cursor).await?; + let n = page.len(); + + let mut new_pools = Vec::with_capacity(n); + let mut pool_states = Vec::with_capacity(n); + + for p in &page { + let address: Address = p.id.parse().context("parse pool id")?; + new_pools.push(NewPoolData { + address, + token0: p.token0.id.parse().context("parse token0")?, + token1: p.token1.id.parse().context("parse token1")?, + fee: p.fee_tier.parse().context("parse feeTier")?, + token0_decimals: p.token0.decimals.parse::().ok(), + token1_decimals: p.token1.decimals.parse::().ok(), + token0_symbol: p.token0.symbol.clone(), + token1_symbol: p.token1.symbol.clone(), + created_block: p + .created_at_block_number + .parse() + .context("parse createdAtBlockNumber")?, + }); + + if let Some(tick_str) = &p.tick { + if p.sqrt_price != "0" { + pool_states.push(PoolStateData { + pool_address: address, + block_number: block, + sqrt_price_x96: p.sqrt_price.parse::().context("parse sqrtPrice")?, + liquidity: p.liquidity.parse().context("parse liquidity")?, + tick: tick_str.parse().context("parse tick")?, + }); + } + } + + pool_ids.push(p.id.clone()); + } + + let mut tx = db.begin().await.context("begin pool tx")?; + db::batch_insert_pools(&mut tx, chain_id, &new_pools).await?; + db::batch_upsert_pool_states(&mut tx, chain_id, &pool_states).await?; + tx.commit().await.context("commit pool tx")?; + + info!(total = pool_ids.len(), "pools seeded"); + + if n < PAGE_SIZE { + break; + } + cursor = page.last().unwrap().id.clone(); + } + + info!( + total = pool_ids.len(), + "all pools seeded — starting tick seeding" + ); + + // ── Phase 2: ticks (50 pools concurrently) ──────────────────────────────── + let mut total_ticks = 0usize; + let url = subgraph_url.to_owned(); + + for chunk in pool_ids.chunks(TICK_CONCURRENCY) { + let tick_batches: Vec> = futures::stream::iter(chunk) + .map(|pool_id| { + fetch_ticks_for_pool(client.clone(), url.clone(), pool_id.clone(), block) + }) + .buffer_unordered(TICK_CONCURRENCY) + .try_collect() + .await?; + + let ticks: Vec = tick_batches.into_iter().flatten().collect(); + let n = ticks.len(); + + if !ticks.is_empty() { + let mut tx = db.begin().await.context("begin tick tx")?; + db::batch_seed_ticks(&mut tx, chain_id, &ticks).await?; + tx.commit().await.context("commit tick tx")?; + } + + total_ticks += n; + info!(total = total_ticks, "ticks seeded"); + } + + // ── Phase 3: set checkpoint ─────────────────────────────────────────────── + let mut tx = db.begin().await.context("begin checkpoint tx")?; + db::set_checkpoint(&mut tx, chain_id, &config.indexer.factory_address, block).await?; + tx.commit().await.context("commit checkpoint")?; + + info!( + block, + pools = pool_ids.len(), + ticks = total_ticks, + "seeding complete" + ); + Ok(()) +} diff --git a/database/sql/V110__pool_indexer_uniswap_v3.sql b/database/sql/V110__pool_indexer_uniswap_v3.sql new file mode 100644 index 0000000000..7fe5f678c5 --- /dev/null +++ b/database/sql/V110__pool_indexer_uniswap_v3.sql @@ -0,0 +1,44 @@ +-- Tracks the highest finalized block fully processed per chain+contract +CREATE TABLE pool_indexer_checkpoints ( + chain_id BIGINT NOT NULL, + contract BYTEA NOT NULL, -- factory or pool address + block_number BIGINT NOT NULL, + PRIMARY KEY (chain_id, contract) +); + +-- One row per discovered pool (from PoolCreated events on the factory) +CREATE TABLE uniswap_v3_pools ( + chain_id BIGINT NOT NULL, + address BYTEA NOT NULL, -- pool address + token0 BYTEA NOT NULL, + token1 BYTEA NOT NULL, + fee INT NOT NULL, -- fee tier in bps (500, 3000, 10000) + token0_decimals SMALLINT, + token1_decimals SMALLINT, + created_block BIGINT NOT NULL, + PRIMARY KEY (chain_id, address) +); + +-- Current state of each pool (updated on every Swap or Initialize) +CREATE TABLE uniswap_v3_pool_states ( + chain_id BIGINT NOT NULL, + pool_address BYTEA NOT NULL, + block_number BIGINT NOT NULL, + sqrt_price_x96 NUMERIC NOT NULL, -- uint160 + liquidity NUMERIC NOT NULL, -- uint128 + tick INT NOT NULL, + PRIMARY KEY (chain_id, pool_address), + FOREIGN KEY (chain_id, pool_address) REFERENCES uniswap_v3_pools(chain_id, address) +); + +-- Active ticks per pool (rows with liquidity_net = 0 are pruned) +CREATE TABLE uniswap_v3_ticks ( + chain_id BIGINT NOT NULL, + pool_address BYTEA NOT NULL, + tick_idx INT NOT NULL, + liquidity_net NUMERIC NOT NULL, -- int128 (can be negative) + PRIMARY KEY (chain_id, pool_address, tick_idx), + FOREIGN KEY (chain_id, pool_address) REFERENCES uniswap_v3_pools(chain_id, address) +); + +CREATE INDEX ON uniswap_v3_ticks (chain_id, pool_address); diff --git a/database/sql/V111__pool_indexer_token_symbols.sql b/database/sql/V111__pool_indexer_token_symbols.sql new file mode 100644 index 0000000000..79e356505a --- /dev/null +++ b/database/sql/V111__pool_indexer_token_symbols.sql @@ -0,0 +1,3 @@ +ALTER TABLE uniswap_v3_pools + ADD COLUMN token0_symbol TEXT, + ADD COLUMN token1_symbol TEXT; From bdd34c24f136e34fd0301e94a2be7d10b6c61d1d Mon Sep 17 00:00:00 2001 From: Jan P Date: Tue, 24 Mar 2026 15:18:40 +0100 Subject: [PATCH 02/80] Avoid scientific notation string --- crates/pool-indexer/src/db/uniswap_v3.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/pool-indexer/src/db/uniswap_v3.rs b/crates/pool-indexer/src/db/uniswap_v3.rs index f8c22bf6f1..38ad3e6bd1 100644 --- a/crates/pool-indexer/src/db/uniswap_v3.rs +++ b/crates/pool-indexer/src/db/uniswap_v3.rs @@ -41,7 +41,7 @@ fn decimal_to_i128(v: BigDecimal) -> i128 { } pub fn decimal_to_u160(v: BigDecimal) -> alloy_primitives::aliases::U160 { - let s = v.to_string(); + let s = v.to_plain_string(); let int_part = s.split('.').next().unwrap_or(&s); int_part .parse::() From 92df682360be4e2b03e927729fb2c91a733cdbd0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jose=CC=81=20Duarte?= Date: Tue, 24 Mar 2026 16:38:27 +0100 Subject: [PATCH 03/80] pool-indexer: split API handlers and add token symbol search - Split `api/uniswap_v3.rs` into `pools.rs` and `ticks.rs` submodules with shared helpers (`internal_error`, `parse_hex_address`) in `mod.rs` - Add `{network}` path segment to routes; handlers return 404 for unknown networks - Add `token0`/`token1` query params for symbol-based pool search (partial, case-insensitive, order-independent for pairs) - Extract `search_pools` and `list_pools` as focused internal helpers - Document all public structs, fields, and handlers Co-Authored-By: Claude Sonnet 4.6 --- .gitignore | 1 + crates/e2e/tests/e2e/pool_indexer.rs | 69 ++- crates/pool-indexer/FRONTEND_SPEC.md | 155 ----- crates/pool-indexer/frontend/index.html | 1 + crates/pool-indexer/frontend/src/App.css | 68 ++- crates/pool-indexer/frontend/src/App.tsx | 119 +++- crates/pool-indexer/frontend/src/api.ts | 17 +- crates/pool-indexer/frontend/src/utils.ts | 84 +++ crates/pool-indexer/p.md | 234 -------- crates/pool-indexer/src/api/mod.rs | 17 +- crates/pool-indexer/src/api/uniswap_v3.rs | 185 ------ crates/pool-indexer/src/api/uniswap_v3/mod.rs | 22 + .../pool-indexer/src/api/uniswap_v3/pools.rs | 187 ++++++ .../pool-indexer/src/api/uniswap_v3/ticks.rs | 69 +++ crates/pool-indexer/src/arguments.rs | 15 +- crates/pool-indexer/src/db/uniswap_v3.rs | 220 ++++--- crates/pool-indexer/src/indexer/uniswap_v3.rs | 547 +++++++++++------- crates/pool-indexer/src/run.rs | 51 +- crates/pool-indexer/src/seeder.rs | 67 ++- 19 files changed, 1154 insertions(+), 974 deletions(-) delete mode 100644 crates/pool-indexer/FRONTEND_SPEC.md delete mode 100644 crates/pool-indexer/p.md delete mode 100644 crates/pool-indexer/src/api/uniswap_v3.rs create mode 100644 crates/pool-indexer/src/api/uniswap_v3/mod.rs create mode 100644 crates/pool-indexer/src/api/uniswap_v3/pools.rs create mode 100644 crates/pool-indexer/src/api/uniswap_v3/ticks.rs diff --git a/.gitignore b/.gitignore index 0aeaee4b97..19db0e0df1 100644 --- a/.gitignore +++ b/.gitignore @@ -9,3 +9,4 @@ crates/pool-indexer/config.mainnet.toml crates/pool-indexer/frontend/node_modules/ +crates/pool-indexer/compare_subgraph.sh diff --git a/crates/e2e/tests/e2e/pool_indexer.rs b/crates/e2e/tests/e2e/pool_indexer.rs index 01f62bdcb4..87d3383fe9 100644 --- a/crates/e2e/tests/e2e/pool_indexer.rs +++ b/crates/e2e/tests/e2e/pool_indexer.rs @@ -108,7 +108,7 @@ async fn start_pool_indexer(factory: Address) { bind_address: SocketAddr::V4(SocketAddrV4::new(Ipv4Addr::LOCALHOST, POOL_INDEXER_PORT)), }, }; - let handle = tokio::task::spawn(pool_indexer::run(config)); + let handle = tokio::task::spawn(pool_indexer::run(config, None, None)); wait_for_condition(TIMEOUT, || async { reqwest::get(format!("{POOL_INDEXER_HOST}/health")) .await @@ -299,22 +299,25 @@ async fn happy_path(web3: Web3) { start_pool_indexer(factory).await; wait_for_condition(TIMEOUT, || async { - let resp = reqwest::get(format!("{POOL_INDEXER_HOST}/api/v1/uniswap/v3/pools")) - .await - .ok()?; + let resp = reqwest::get(format!( + "{POOL_INDEXER_HOST}/api/v1/mainnet/uniswap/v3/pools" + )) + .await + .ok()?; let body: serde_json::Value = resp.json().await.ok()?; Some(body["block_number"].as_u64()? >= head) }) .await .expect("indexer did not reach head block in time"); - let resp: serde_json::Value = - reqwest::get(format!("{POOL_INDEXER_HOST}/api/v1/uniswap/v3/pools")) - .await - .unwrap() - .json() - .await - .unwrap(); + let resp: serde_json::Value = reqwest::get(format!( + "{POOL_INDEXER_HOST}/api/v1/mainnet/uniswap/v3/pools" + )) + .await + .unwrap() + .json() + .await + .unwrap(); let pools = resp["pools"].as_array().unwrap(); assert!(!pools.is_empty()); @@ -331,7 +334,7 @@ async fn happy_path(web3: Web3) { assert_ne!(our_pool["sqrt_price"].as_str().unwrap(), "0"); let resp: serde_json::Value = reqwest::get(format!( - "{POOL_INDEXER_HOST}/api/v1/uniswap/v3/pools/{pool_addr:?}/ticks" + "{POOL_INDEXER_HOST}/api/v1/mainnet/uniswap/v3/pools/{pool_addr:?}/ticks" )) .await .unwrap() @@ -371,9 +374,11 @@ async fn checkpoint_resume(web3: Web3) { start_pool_indexer(factory).await; wait_for_condition(TIMEOUT, || async { - let resp = reqwest::get(format!("{POOL_INDEXER_HOST}/api/v1/uniswap/v3/pools")) - .await - .ok()?; + let resp = reqwest::get(format!( + "{POOL_INDEXER_HOST}/api/v1/mainnet/uniswap/v3/pools" + )) + .await + .ok()?; let body: serde_json::Value = resp.json().await.ok()?; Some(body["block_number"].as_u64()? >= head) }) @@ -406,9 +411,11 @@ async fn checkpoint_resume(web3: Web3) { start_pool_indexer(factory).await; wait_for_condition(TIMEOUT, || async { - let resp = reqwest::get(format!("{POOL_INDEXER_HOST}/api/v1/uniswap/v3/pools")) - .await - .ok()?; + let resp = reqwest::get(format!( + "{POOL_INDEXER_HOST}/api/v1/mainnet/uniswap/v3/pools" + )) + .await + .ok()?; let body: serde_json::Value = resp.json().await.ok()?; Some(body["block_number"].as_u64()? >= head) }) @@ -485,9 +492,11 @@ async fn api_errors(web3: Web3) { start_pool_indexer(factory).await; wait_for_condition(TIMEOUT, || async { - let resp = reqwest::get(format!("{POOL_INDEXER_HOST}/api/v1/uniswap/v3/pools")) - .await - .ok()?; + let resp = reqwest::get(format!( + "{POOL_INDEXER_HOST}/api/v1/mainnet/uniswap/v3/pools" + )) + .await + .ok()?; let body: serde_json::Value = resp.json().await.ok()?; Some(body["block_number"].as_u64()? >= head) }) @@ -496,7 +505,7 @@ async fn api_errors(web3: Web3) { // Invalid address → 400. let status = reqwest::get(format!( - "{POOL_INDEXER_HOST}/api/v1/uniswap/v3/pools/not-an-address/ticks" + "{POOL_INDEXER_HOST}/api/v1/mainnet/uniswap/v3/pools/not-an-address/ticks" )) .await .unwrap() @@ -506,7 +515,7 @@ async fn api_errors(web3: Web3) { // Valid but unknown address → 200 with empty ticks array. let unknown = Address::from([0xABu8; 20]); let resp: serde_json::Value = reqwest::get(format!( - "{POOL_INDEXER_HOST}/api/v1/uniswap/v3/pools/{unknown:?}/ticks" + "{POOL_INDEXER_HOST}/api/v1/mainnet/uniswap/v3/pools/{unknown:?}/ticks" )) .await .unwrap() @@ -546,9 +555,11 @@ async fn pagination(web3: Web3) { start_pool_indexer(factory).await; wait_for_condition(TIMEOUT, || async { - let resp = reqwest::get(format!("{POOL_INDEXER_HOST}/api/v1/uniswap/v3/pools")) - .await - .ok()?; + let resp = reqwest::get(format!( + "{POOL_INDEXER_HOST}/api/v1/mainnet/uniswap/v3/pools" + )) + .await + .ok()?; let body: serde_json::Value = resp.json().await.ok()?; Some(body["block_number"].as_u64()? >= head) }) @@ -560,8 +571,10 @@ async fn pagination(web3: Web3) { loop { let url = match &cursor { - None => format!("{POOL_INDEXER_HOST}/api/v1/uniswap/v3/pools?limit=1"), - Some(c) => format!("{POOL_INDEXER_HOST}/api/v1/uniswap/v3/pools?limit=1&after={c}"), + None => format!("{POOL_INDEXER_HOST}/api/v1/mainnet/uniswap/v3/pools?limit=1"), + Some(c) => { + format!("{POOL_INDEXER_HOST}/api/v1/mainnet/uniswap/v3/pools?limit=1&after={c}") + } }; let resp: serde_json::Value = reqwest::get(&url).await.unwrap().json().await.unwrap(); let pools = resp["pools"].as_array().unwrap(); diff --git a/crates/pool-indexer/FRONTEND_SPEC.md b/crates/pool-indexer/FRONTEND_SPEC.md deleted file mode 100644 index 98cc7c689e..0000000000 --- a/crates/pool-indexer/FRONTEND_SPEC.md +++ /dev/null @@ -1,155 +0,0 @@ -# Pool Indexer — Frontend Developer Spec - -## What is it? - -`pool-indexer` is a self-hosted Rust microservice that replaces the Uniswap V3 subgraph on The Graph. It reads directly from an Ethereum RPC node, stores Uniswap V3 pool state in Postgres, and exposes a REST API. - -**Why it exists:** The Graph has reliability issues (rate limits, outages, chain support gaps). This is a drop-in replacement with the same data, served reliably from our own infrastructure. - -**Current scope:** Uniswap V3 only. Balancer V2 planned but not implemented. - ---- - -## Base URL - -``` -http://:7777 -``` - -Default port is `7777`. Configured via `bind-address` in the service config. - ---- - -## Endpoints - -### `GET /health` - -Liveness check. - -**Response:** `200 OK` (no body) - ---- - -### `GET /api/v1/uniswap/v3/pools` - -Returns all known Uniswap V3 pools with their current state (price, liquidity, tick). Uses cursor-based pagination. - -**Query parameters:** - -| Name | Type | Required | Default | Description | -|---------|--------|----------|---------|----------------------------------------------------| -| `after` | string | no | — | Cursor: the `id` (address) of the last seen pool | -| `limit` | int | no | 1000 | Page size. Clamped to `[1, 5000]` | - -**Response `200 OK`:** -```json -{ - "block_number": 21800000, - "pools": [ - { - "id": "0x8ad599c3a0ff1de082011efddc58f1908eb6e6d8", - "token0": { - "id": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48", - "decimals": 6 - }, - "token1": { - "id": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "decimals": 18 - }, - "fee_tier": "3000", - "liquidity": "12345678901234", - "sqrt_price": "1234567890123456789", - "tick": -201234, - "ticks": null - } - ], - "next_cursor": "0x8ad599c3a0ff1de082011efddc58f1908eb6e6d8" -} -``` - -**Field notes:** - -- `block_number` — the latest fully-indexed finalized block. Use this to know how fresh the data is. -- `id`, `token0.id`, `token1.id` — checksummed Ethereum addresses (`0x`-prefixed hex). -- `fee_tier` — fee in parts-per-million as a string. Common values: `"500"` (0.05%), `"3000"` (0.3%), `"10000"` (1%). -- `liquidity` — current active liquidity as a decimal string (uint128). Can be large; treat as `BigInt` or use a big-number library. -- `sqrt_price` — `sqrtPriceX96` as a decimal string (uint160). This is the square root of the price in Q64.96 fixed-point format. To get human price: `(sqrtPrice / 2^96)^2`, then adjust for decimal differences between token0 and token1. -- `tick` — current tick index (signed int32). Determines the current price bucket. -- `ticks` — always `null` in this endpoint. Use the dedicated `/ticks` endpoint per pool. -- `next_cursor` — the address to pass as `after` for the next page. `null` when on the last page. - -**Pagination example:** -``` -GET /api/v1/uniswap/v3/pools?limit=500 -→ { "next_cursor": "0xabc...", "pools": [...] } - -GET /api/v1/uniswap/v3/pools?limit=500&after=0xabc... -→ { "next_cursor": null, "pools": [...] } -``` - -**Error responses:** -- `400 Bad Request` — `{"error": "invalid cursor"}` if `after` is not a valid address. -- `503 Service Unavailable` — indexer hasn't processed any blocks yet (cold start). -- `500 Internal Server Error` — unexpected DB error. - ---- - -### `GET /api/v1/uniswap/v3/pools/{pool_address}/ticks` - -Returns all active ticks for a specific pool. Ticks define the liquidity boundaries within the pool. - -**Path parameter:** -- `pool_address` — checksummed or lowercase hex address (`0x...`) - -**Response `200 OK`:** -```json -{ - "block_number": 21800000, - "pool": "0x8ad599c3a0ff1de082011efddc58f1908eb6e6d8", - "ticks": [ - { "tick_idx": -887272, "liquidity_net": "1000000000000" }, - { "tick_idx": -201240, "liquidity_net": "-500000000000" }, - { "tick_idx": 887272, "liquidity_net": "-1000000000000" } - ] -} -``` - -**Field notes:** -- `ticks` — sorted ascending by `tick_idx`. Only active ticks are present; ticks with `liquidity_net == 0` are pruned automatically. -- `liquidity_net` — signed int128 as a decimal string. Positive means liquidity is added when the price crosses this tick going right (up); negative means liquidity is removed. A standard Uniswap V3 liquidity math library will consume this directly. -- `block_number` — same semantics as the pools endpoint. - -**Error responses:** -- `400 Bad Request` — `{"error": "invalid pool address"}` if the path param isn't a valid address. -- `503 Service Unavailable` — not yet indexed. -- `500 Internal Server Error` — unexpected DB error. - ---- - -## Data freshness - -The service only indexes **finalized blocks** (no reorg handling). On mainnet, "finalized" lags the chain tip by ~2 epochs (~12 minutes). The `block_number` field in every response tells you exactly how current the data is. - ---- - -## Key numbers to know - -| Concept | Value | -|---|---| -| Default port | `7777` | -| Mainnet Uniswap V3 factory | `0x1F98431c8aD98523631AE4a59f267346ea31F984` | -| Fee tiers (ppm) | `100`, `500`, `3000`, `10000` | -| `sqrtPriceX96` precision | Q64.96 (divide by `2^96` to get the raw sqrt price) | -| `liquidity` type | uint128 (max ~3.4 × 10³⁸) | -| `liquidity_net` type | int128 (signed, max ~1.7 × 10³⁸) | -| Tick range | `[-887272, 887272]` | - ---- - -## Notes for UI implementation - -1. **Big numbers:** `liquidity`, `sqrt_price`, and `liquidity_net` are all returned as decimal strings because they exceed JavaScript's safe integer range. Use `BigInt` or a library like `ethers.js` / `viem` for arithmetic. -2. **Price from sqrtPriceX96:** `price = (sqrtPriceX96 / 2n**96n) ** 2`, then adjust: `humanPrice = price * 10n**(token0Decimals - token1Decimals)`. -3. **Pagination:** Fetch all pools by following `next_cursor` until it's `null`. The service supports up to 5000 per page. -4. **No `block` filter on queries:** Unlike the subgraph, these endpoints always return the latest indexed state — there is no point-in-time query by block number (despite `block` being mentioned in the original plan spec, it is not implemented in the current code). -5. **503 on cold start:** If the indexer just launched and hasn't finished its first block range, all endpoints return `503`. Implement a retry or loading state. diff --git a/crates/pool-indexer/frontend/index.html b/crates/pool-indexer/frontend/index.html index 4158eae05d..c326e294e3 100644 --- a/crates/pool-indexer/frontend/index.html +++ b/crates/pool-indexer/frontend/index.html @@ -3,6 +3,7 @@ + Pool Indexer diff --git a/crates/pool-indexer/frontend/src/App.css b/crates/pool-indexer/frontend/src/App.css index 10e9a12aaf..62e616e650 100644 --- a/crates/pool-indexer/frontend/src/App.css +++ b/crates/pool-indexer/frontend/src/App.css @@ -63,6 +63,18 @@ header { font-weight: 600; } +.network-badge { + padding: 2px 8px; + border-radius: 10px; + background: rgba(59, 130, 246, 0.12); + border: 1px solid rgba(59, 130, 246, 0.3); + font-size: 11px; + font-weight: 600; + color: var(--accent); + font-family: 'SF Mono', 'Fira Code', monospace; + text-transform: lowercase; +} + .chip { padding: 2px 8px; border-radius: 10px; @@ -263,6 +275,61 @@ header { word-break: break-all; } +.ticks-tokens { + display: flex; + gap: 12px; + margin-top: 6px; +} + +.ticks-tokens a { + font-size: 11px; + color: var(--dim); + text-decoration: none; +} + +.ticks-tokens a:hover { + color: var(--accent); +} + +.ticks-header-actions { + display: flex; + align-items: center; + gap: 6px; + flex-shrink: 0; + margin-left: 8px; +} + +.explain-btn { + background: var(--surface2); + border: 1px solid var(--border); + color: var(--dim); + cursor: pointer; + font-size: 11px; + padding: 3px 8px; + border-radius: 4px; + white-space: nowrap; + transition: border-color 0.15s, color 0.15s; +} +.explain-btn:hover { + border-color: var(--accent); + color: var(--text); +} + +.explain-box { + background: var(--bg); + border-bottom: 1px solid var(--border); + padding: 12px 16px; + font-family: 'SF Mono', 'Fira Code', monospace; + font-size: 11px; + line-height: 1.6; + color: var(--text); + white-space: pre-wrap; + word-break: break-word; + flex-shrink: 0; + overflow-y: auto; + max-height: 300px; +} + .ticks-header .close { background: none; border: none; @@ -273,7 +340,6 @@ header { border-radius: 4px; line-height: 1; flex-shrink: 0; - margin-left: 8px; } .ticks-header .close:hover { color: var(--text); diff --git a/crates/pool-indexer/frontend/src/App.tsx b/crates/pool-indexer/frontend/src/App.tsx index dda0fc36a8..df9262a011 100644 --- a/crates/pool-indexer/frontend/src/App.tsx +++ b/crates/pool-indexer/frontend/src/App.tsx @@ -1,7 +1,7 @@ import { useState, useEffect, useCallback } from 'react' import { fetchPools, fetchTicks } from './api' import type { Pool, Tick } from './api' -import { computePrice, short, feeTierLabel, formatLiquidity } from './utils' +import { computePrice, short, feeTierLabel, formatLiquidity, explainTicks } from './utils' import './App.css' interface TicksState { @@ -10,7 +10,17 @@ interface TicksState { poolId: string } +function getNetworkFromPath(): string { + const segment = window.location.pathname.split('/').filter(Boolean)[0] + if (!segment) { + window.location.replace('/mainnet') + return 'mainnet' + } + return segment +} + export default function App() { + const network = getNetworkFromPath() const [pools, setPools] = useState([]) const [blockNumber, setBlockNumber] = useState(null) // undefined = not yet fetched, null = last page, string = next cursor @@ -21,14 +31,16 @@ export default function App() { const [ticksState, setTicksState] = useState(null) const [loadingTicks, setLoadingTicks] = useState(false) const [ticksError, setTicksError] = useState(null) - const [filter, setFilter] = useState('') + const [showExplain, setShowExplain] = useState(false) + const [filterInput, setFilterInput] = useState('') + const [activeFilter, setActiveFilter] = useState('') const [sortDesc, setSortDesc] = useState(true) const loadPools = useCallback(async (after?: string) => { setLoadingPools(true) setPoolsError(null) try { - const res = await fetchPools(after) + const res = await fetchPools(network, after) setPools(prev => (after ? [...prev, ...res.pools] : res.pools)) setBlockNumber(res.block_number) setCursor(res.next_cursor) @@ -43,25 +55,56 @@ export default function App() { } finally { setLoadingPools(false) } - }, []) + }, [network]) useEffect(() => { loadPools() }, [loadPools]) + const doSearch = useCallback( + async (searchStr: string) => { + const f = searchStr.trim() + setPools([]) + setCursor(undefined) + if (!f) { + loadPools() + return + } + setLoadingPools(true) + setPoolsError(null) + try { + const parts = f.includes('/') ? f.split('/').map(s => s.trim()).filter(Boolean) : [f] + const search = + parts.length >= 2 ? { token0: parts[0], token1: parts[1] } : { token0: parts[0] } + const res = await fetchPools(network, undefined, 5000, search) + setPools(res.pools) + setBlockNumber(res.block_number) + setCursor(res.next_cursor) + } catch (e) { + const msg = e instanceof Error ? e.message : 'Unknown error' + setPoolsError(msg) + } finally { + setLoadingPools(false) + } + }, + [network, loadPools], + ) + const openTicks = useCallback( async (poolId: string) => { if (selectedPool === poolId) { setSelectedPool(null) setTicksState(null) + setShowExplain(false) return } setSelectedPool(poolId) setTicksState(null) setTicksError(null) + setShowExplain(false) setLoadingTicks(true) try { - const res = await fetchTicks(poolId) + const res = await fetchTicks(network, poolId) setTicksState({ data: res.ticks, blockNumber: res.block_number, poolId }) } catch (e) { setTicksError(e instanceof Error ? e.message : 'Unknown error') @@ -72,16 +115,7 @@ export default function App() { [selectedPool], ) - const filteredPools = ( - filter - ? pools.filter( - p => - p.id.toLowerCase().includes(filter.toLowerCase()) || - p.token0.id.toLowerCase().includes(filter.toLowerCase()) || - p.token1.id.toLowerCase().includes(filter.toLowerCase()), - ) - : pools - ).toSorted((a, b) => { + const displayPools = pools.toSorted((a, b) => { try { const diff = BigInt(a.liquidity) - BigInt(b.liquidity) return sortDesc ? (diff < 0n ? 1 : diff > 0n ? -1 : 0) : (diff < 0n ? -1 : diff > 0n ? 1 : 0) @@ -97,6 +131,7 @@ export default function App() {
Uniswap V3 Pools + {network} {blockNumber !== null && ( block {blockNumber.toLocaleString()} )} @@ -107,9 +142,13 @@ export default function App() { )} setFilter(e.target.value)} + placeholder="Symbol, address, or USDC/WETH — press Enter" + value={filterInput} + onChange={e => setFilterInput(e.target.value)} + onKeyDown={e => { + if (e.key === 'Enter') { setActiveFilter(filterInput); doSearch(filterInput) } + if (e.key === 'Escape') { setFilterInput(''); setActiveFilter(''); doSearch('') } + }} spellCheck={false} />
@@ -134,7 +173,7 @@ export default function App() { - {filteredPools.map(pool => ( + {displayPools.map(pool => ( {pool.tick.toLocaleString()} ))} - {!loadingPools && filteredPools.length === 0 && ( + {!loadingPools && displayPools.length === 0 && ( - {filter ? 'No pools match filter.' : 'No pools loaded.'} + {activeFilter ? 'No pools match filter.' : 'No pools loaded.'} )} @@ -190,16 +229,44 @@ export default function App() {

Ticks

{selectedPool} + {selectedPoolData && ( +
+ {[selectedPoolData.token0, selectedPoolData.token1].map((t, i) => ( + + {t.symbol ?? t.id} + {t.decimals}d + + ))} +
+ )}
+
+ {ticksState && selectedPoolData && ( + + )} +
{loadingTicks &&
Loading ticks…
} @@ -215,6 +282,16 @@ export default function App() { {ticksState.data.length > 0 && selectedPoolData && ( )} + {showExplain && selectedPoolData && ( +
+                    {explainTicks({
+                      token0: selectedPoolData.token0.symbol ?? selectedPoolData.token0.id,
+                      token1: selectedPoolData.token1.symbol ?? selectedPoolData.token1.id,
+                      currentTick: selectedPoolData.tick,
+                      ticks: ticksState.data,
+                    })}
+                  
+ )}
diff --git a/crates/pool-indexer/frontend/src/api.ts b/crates/pool-indexer/frontend/src/api.ts index 02f6f69006..6bc4a51579 100644 --- a/crates/pool-indexer/frontend/src/api.ts +++ b/crates/pool-indexer/frontend/src/api.ts @@ -32,10 +32,19 @@ export interface TicksResponse { ticks: Tick[] } -export async function fetchPools(after?: string, limit = 1000): Promise { +export async function fetchPools( + network: string, + after?: string, + limit = 1000, + search?: { token0: string; token1?: string }, +): Promise { const params = new URLSearchParams({ limit: String(limit) }) if (after) params.set('after', after) - const res = await fetch(`/api/v1/uniswap/v3/pools?${params}`) + if (search) { + params.set('token0', search.token0) + if (search.token1) params.set('token1', search.token1) + } + const res = await fetch(`/api/v1/${network}/uniswap/v3/pools?${params}`) if (res.status === 503) throw new Error('not_indexed') if (!res.ok) { const body = await res.json().catch(() => ({})) as { error?: string } @@ -44,8 +53,8 @@ export async function fetchPools(after?: string, limit = 1000): Promise } -export async function fetchTicks(poolAddress: string): Promise { - const res = await fetch(`/api/v1/uniswap/v3/pools/${poolAddress}/ticks`) +export async function fetchTicks(network: string, poolAddress: string): Promise { + const res = await fetch(`/api/v1/${network}/uniswap/v3/pools/${poolAddress}/ticks`) if (res.status === 503) throw new Error('not_indexed') if (!res.ok) { const body = await res.json().catch(() => ({})) as { error?: string } diff --git a/crates/pool-indexer/frontend/src/utils.ts b/crates/pool-indexer/frontend/src/utils.ts index 3d30c1842d..0dd2cbbd87 100644 --- a/crates/pool-indexer/frontend/src/utils.ts +++ b/crates/pool-indexer/frontend/src/utils.ts @@ -61,3 +61,87 @@ export function feeTierLabel(ppm: string): string { const labels: Record = { '100': '0.01%', '500': '0.05%', '3000': '0.3%', '10000': '1%' } return labels[ppm] ?? `${(Number(ppm) / 10000).toFixed(2)}%` } + +function tickToPrice(tick: number): number { + return Math.pow(1.0001, tick) +} + +function inferComposition(currentTick: number, lowerTick: number, upperTick: number): string { + if (currentTick < lowerTick) { + return 'entirely token0 (price is below range, position is out of range)' + } else if (currentTick >= upperTick) { + return 'entirely token1 (price is above range, position is out of range)' + } else { + const progress = (currentTick - lowerTick) / (upperTick - lowerTick) + if (progress < 0.2) return 'mostly token0 (price near lower bound)' + if (progress > 0.8) return 'mostly token1 (price near upper bound)' + return 'roughly balanced between token0 and token1' + } +} + +export function explainTicks({ + token0, + token1, + currentTick, + ticks, +}: { + token0: string + token1: string + currentTick: number + ticks: Array<{ tick_idx: number; liquidity_net: string }> +}): string { + // Pair ticks into LP positions: lower tick has +X liquidity net, upper has -X + const unmatched: Record = {} + const positions: Array<{ + lower: { tick_idx: number; liquidity_net: string } + upper: { tick_idx: number; liquidity_net: string } + }> = [] + + for (const tick of ticks) { + let net: bigint + try { + net = BigInt(tick.liquidity_net) + } catch { + continue + } + const absKey = net < 0n ? (-net).toString() : net.toString() + if (unmatched[absKey]) { + const match = unmatched[absKey] + const lower = net > 0n ? tick : match + const upper = net > 0n ? match : tick + positions.push({ lower, upper }) + delete unmatched[absKey] + } else { + unmatched[absKey] = tick + } + } + + const unmatchedList = Object.values(unmatched) + const currentPrice = tickToPrice(currentTick) + const lines: string[] = [] + + lines.push(`Pool: ${token0}/${token1}`) + lines.push(`Current tick: ${currentTick} → 1 ${token0} = ${currentPrice.toFixed(6)} ${token1}`) + lines.push(`Active ticks: ${ticks.length} → ${positions.length} position(s) detected`) + lines.push('') + + positions.forEach((pos, i) => { + const lowerPrice = tickToPrice(pos.lower.tick_idx) + const upperPrice = tickToPrice(pos.upper.tick_idx) + const composition = inferComposition(currentTick, pos.lower.tick_idx, pos.upper.tick_idx) + const inRange = currentTick >= pos.lower.tick_idx && currentTick < pos.upper.tick_idx + + lines.push(`Position ${i + 1}:`) + lines.push(` Range: tick ${pos.lower.tick_idx} to ${pos.upper.tick_idx}`) + lines.push(` Price range: ${lowerPrice.toFixed(6)} to ${upperPrice.toFixed(6)} ${token1} per ${token0}`) + lines.push(` Status: ${inRange ? 'In range (earning fees)' : 'Out of range (not earning fees)'}`) + lines.push(` Composition: ${composition}`) + lines.push('') + }) + + if (unmatchedList.length > 0) { + lines.push(`${unmatchedList.length} unmatched tick(s) — may indicate partial data or a complex position.`) + } + + return lines.join('\n') +} diff --git a/crates/pool-indexer/p.md b/crates/pool-indexer/p.md deleted file mode 100644 index 4c3fceca52..0000000000 --- a/crates/pool-indexer/p.md +++ /dev/null @@ -1,234 +0,0 @@ -# Plan: Replace Subgraphs with Purpose-Built Pool Indexer - -## Context - -The driver currently bootstraps Uniswap V3 and Balancer V2 liquidity via The Graph subgraphs. Subgraphs are queried once at startup to get pool state at a safe historical block; on-chain events then maintain the state. The problem: subgraph dependency is unreliable (rate limits, outages, versioning, chain support gaps). This plan replaces the subgraph with an in-house indexer service that reads directly from the chain, persists state in Postgres, and exposes a REST API. - -Scope: **Uniswap V3 only** to start. Balancer V2 follows the same pattern and can be added later. - -Finalized blocks only — no reorg handling required. - ---- - -## New Crate: `crates/pool-indexer` - -Follows the same lib + binary pattern as `orderbook`, `autopilot`, etc. - -``` -crates/pool-indexer/ - Cargo.toml - src/ - main.rs → pool_indexer::start(std::env::args()) - lib.rs → pub mod declarations, pub use run::{run, start} - run.rs → parse args, load config, start DB, start indexer, start HTTP server - arguments.rs → clap: --config - config.rs → TOML config struct (serde) - indexer/ - mod.rs - uniswap_v3.rs → event loop: poll finalized block, fetch logs, write to DB - db/ - mod.rs - uniswap_v3.rs → sqlx queries (pools, ticks, state, indexed_block) - api/ - mod.rs → axum Router - uniswap_v3.rs → REST handlers -``` - -Also needs DB migration files under `database/sql/` following the Flyway numbering convention. - ---- - -## Database Schema (new migrations) - -### `V???__pool_indexer_uniswap_v3.sql` - -```sql --- Tracks the highest finalized block fully processed per chain+contract -CREATE TABLE pool_indexer_checkpoints ( - chain_id BIGINT NOT NULL, - contract BYTEA NOT NULL, -- factory or pool address - block_number BIGINT NOT NULL, - PRIMARY KEY (chain_id, contract) -); - --- One row per discovered pool (from PoolCreated events on the factory) -CREATE TABLE uniswap_v3_pools ( - chain_id BIGINT NOT NULL, - address BYTEA NOT NULL, -- pool address - token0 BYTEA NOT NULL, - token1 BYTEA NOT NULL, - fee INT NOT NULL, -- fee tier in bps (500, 3000, 10000) - created_block BIGINT NOT NULL, - PRIMARY KEY (chain_id, address) -); - --- Current state of each pool (updated on every Swap/Mint/Burn that changes it) -CREATE TABLE uniswap_v3_pool_states ( - chain_id BIGINT NOT NULL, - pool_address BYTEA NOT NULL, - block_number BIGINT NOT NULL, - sqrt_price_x96 BYTEA NOT NULL, -- U256 as 32 bytes big-endian - liquidity BYTEA NOT NULL, -- U256 as 32 bytes big-endian - tick INT NOT NULL, - PRIMARY KEY (chain_id, pool_address), - FOREIGN KEY (chain_id, pool_address) REFERENCES uniswap_v3_pools(chain_id, address) -); - --- Active ticks per pool (rows with liquidityNet = 0 are pruned) -CREATE TABLE uniswap_v3_ticks ( - chain_id BIGINT NOT NULL, - pool_address BYTEA NOT NULL, - tick_idx INT NOT NULL, - liquidity_net BYTEA NOT NULL, -- i128 as 16 bytes big-endian (signed) - PRIMARY KEY (chain_id, pool_address, tick_idx), - FOREIGN KEY (chain_id, pool_address) REFERENCES uniswap_v3_pools(chain_id, address) -); - -CREATE INDEX ON uniswap_v3_ticks (chain_id, pool_address); -``` - ---- - -## Indexer Logic (`src/indexer/uniswap_v3.rs`) - -Since we only care about finalized blocks there's no reorg handling — simplified compared to existing `EventHandler`. - -``` -loop: - finalized_block = eth_getBlockByNumber("finalized") - last_indexed = db::get_checkpoint(factory_address) - - if last_indexed >= finalized_block → sleep, continue - - for block_range in chunks(last_indexed+1..=finalized_block, CHUNK_SIZE=500): - logs = eth_getLogs(filter{ - from_block: range.start, - to_block: range.end, - topics: [PoolCreated, Initialize, Mint, Burn, Swap] - // No address filter (perf: same reason as existing event_fetching.rs) - }) - db::apply_logs(tx, logs) // single DB transaction per chunk - db::set_checkpoint(tx, block_range.end) - commit tx -``` - -### Events consumed - -All from `UniswapV3Pool` ABI + `IUniswapV3Factory` ABI (already in `crates/contracts/`): - -| Source | Event | DB effect | -|---|---|---| -| Factory | `PoolCreated(token0, token1, fee, tickSpacing, pool)` | INSERT into `uniswap_v3_pools` | -| Pool | `Initialize(sqrtPriceX96, tick)` | INSERT/UPDATE `uniswap_v3_pool_states` | -| Pool | `Mint(sender, owner, tickLower, tickUpper, amount, ...)` | +amount to tick_lower liquidityNet, -amount from tick_upper | -| Pool | `Burn(owner, tickLower, tickUpper, amount, ...)` | -amount from tick_lower, +amount to tick_upper | -| Pool | `Swap(..., sqrtPriceX96, liquidity, tick)` | UPDATE pool state row | - -Rows with `liquidity_net = 0` in `uniswap_v3_ticks` are deleted (pruned on write). - -We do NOT need: `Collect`, `CollectProtocol`, `Flash`, `SetFeeProtocol`, `IncreaseObservationCardinalityNext`. - ---- - -## REST API (`src/api/uniswap_v3.rs`) - -Base path: `/api/v1` - -### `GET /api/v1/uniswap/v3/latest-block` - -Returns the latest fully-indexed finalized block. Replaces `_meta { block { number } }` subgraph query. - -```json -{ "block_number": 21800000 } -``` - -### `GET /api/v1/uniswap/v3/pools` - -Returns all known pools with current state. Cursor-based pagination to match the existing `SubgraphClient.paginated_query` behaviour. - -Query params: -- `block` (required) — query state at this block number -- `after` (optional) — cursor: last seen pool address (hex) -- `limit` (optional, default 1000) - -Response: -```json -{ - "pools": [ - { - "id": "0x...", - "token0": { "id": "0x...", "decimals": 18 }, - "token1": { "id": "0x...", "decimals": 6 }, - "fee_tier": "3000", - "liquidity": "12345678", - "sqrt_price": "1234567890", - "tick": -887272, - "ticks": null - } - ], - "next_cursor": "0x..." // null if last page -} -``` - -### `GET /api/v1/uniswap/v3/pools/{pool_address}/ticks` - -Query params: -- `block` (required) - -Response: -```json -{ - "pool": "0x...", - "ticks": [ - { "tick_idx": -887272, "liquidity_net": "1000000" }, - ... - ] -} -``` - -This is called in batch by the driver (chunked by `max_pools_per_tick_query`). Having per-pool tick endpoint keeps it simple and avoids a multi-pool batch endpoint for now. - -### `GET /health` - -Standard liveness check. - ---- - -## Configuration (`src/config.rs`) - -```toml -[database] -url = "postgresql://..." -max-connections = 10 - -[indexer] -chain-id = 1 -rpc-url = "https://..." -factory-address = "0x1F98431c8aD98523631AE4a59f267346ea31F984" # UniV3 mainnet factory -chunk-size = 500 # blocks per eth_getLogs call -poll-interval-secs = 3 # how often to poll for new finalized block - -[api] -bind-address = "0.0.0.0:7777" -``` - ---- - -## Critical Files - -| File | Role | -|---|---| -| `crates/contracts/artifacts/UniswapV3Pool.json` | ABI source for event decoding | -| `crates/contracts/artifacts/IUniswapV3Factory.json` | ABI source for PoolCreated event | -| `database/sql/V???__pool_indexer.sql` | New migrations | -| `crates/pool-indexer/` | New crate (lib + binary) | -| `Cargo.toml` (workspace) | Add new crate to workspace members | - ---- - -## Verification - -1. **Unit tests** for DB query functions (using test transactions that rollback). -2. **Integration test**: spin up the indexer against an anvil fork (`FORK_URL_MAINNET`), index a small block range (e.g. 100 blocks), assert known pool addresses appear in DB with correct state. -3. **API test**: call `GET /pools`, `GET /pools/{addr}/ticks`, and `GET /latest-block` against a running indexer, verify responses match known on-chain state. -4. `cargo clippy` + `cargo +nightly fmt --all` before PR. diff --git a/crates/pool-indexer/src/api/mod.rs b/crates/pool-indexer/src/api/mod.rs index 8aaba15aa3..ef783b1c35 100644 --- a/crates/pool-indexer/src/api/mod.rs +++ b/crates/pool-indexer/src/api/mod.rs @@ -4,25 +4,34 @@ use { axum::{Router, http::StatusCode, response::IntoResponse, routing::get}, sqlx::PgPool, std::sync::Arc, - tower_http::trace::TraceLayer, + tower_http::trace::{DefaultMakeSpan, DefaultOnResponse, TraceLayer}, + tracing::Level, }; #[derive(Clone)] pub struct AppState { pub db: PgPool, pub chain_id: u64, + pub network_name: String, } pub fn router(state: Arc) -> Router { Router::new() .route("/health", get(health)) - .route("/api/v1/uniswap/v3/pools", get(uniswap_v3::get_pools)) .route( - "/api/v1/uniswap/v3/pools/{pool_address}/ticks", + "/api/v1/{network}/uniswap/v3/pools", + get(uniswap_v3::get_pools), + ) + .route( + "/api/v1/{network}/uniswap/v3/pools/{pool_address}/ticks", get(uniswap_v3::get_ticks), ) .with_state(state) - .layer(TraceLayer::new_for_http()) + .layer( + TraceLayer::new_for_http() + .make_span_with(DefaultMakeSpan::new().level(Level::INFO)) + .on_response(DefaultOnResponse::new().level(Level::INFO)), + ) } async fn health() -> impl IntoResponse { diff --git a/crates/pool-indexer/src/api/uniswap_v3.rs b/crates/pool-indexer/src/api/uniswap_v3.rs deleted file mode 100644 index 10a6f2e754..0000000000 --- a/crates/pool-indexer/src/api/uniswap_v3.rs +++ /dev/null @@ -1,185 +0,0 @@ -use { - crate::{api::AppState, db::uniswap_v3 as db}, - alloy_primitives::Address, - axum::{ - extract::{Path, Query, State}, - http::StatusCode, - response::{IntoResponse, Json, Response}, - }, - serde::{Deserialize, Serialize}, - std::sync::Arc, -}; - -fn internal_error(err: anyhow::Error) -> Response { - tracing::error!(?err, "internal error"); - StatusCode::INTERNAL_SERVER_ERROR.into_response() -} - -// ── /api/v1/uniswap/v3/pools ───────────────────────────────────────────────── - -#[derive(Deserialize)] -pub struct PoolsQuery { - pub after: Option, - pub limit: Option, -} - -#[derive(Serialize)] -pub struct TokenInfo { - pub id: String, - #[serde(skip_serializing_if = "Option::is_none")] - pub decimals: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub symbol: Option, -} - -#[derive(Serialize)] -pub struct PoolResponse { - pub id: String, - pub token0: TokenInfo, - pub token1: TokenInfo, - pub fee_tier: String, - pub liquidity: String, - pub sqrt_price: String, - pub tick: i32, - pub ticks: Option>, -} - -#[derive(Serialize)] -pub struct PoolsResponse { - pub block_number: u64, - pub pools: Vec, - pub next_cursor: Option, -} - -pub async fn get_pools( - State(state): State>, - Query(query): Query, -) -> Response { - let block_number = match db::get_latest_indexed_block(&state.db, state.chain_id).await { - Ok(Some(block)) => block, - Ok(None) => return StatusCode::SERVICE_UNAVAILABLE.into_response(), - Err(err) => return internal_error(err), - }; - - let limit = query.limit.unwrap_or(1000).clamp(1, 5000); - - let cursor_bytes = match query.after.as_deref().map(parse_hex_address) { - Some(Ok(addr)) => Some(addr.as_slice().to_vec()), - Some(Err(_)) => { - return ( - StatusCode::BAD_REQUEST, - Json(serde_json::json!({"error": "invalid cursor"})), - ) - .into_response(); - } - None => None, - }; - - // Fetch one extra row to determine if there is a next page. - let rows = match db::get_pools(&state.db, state.chain_id, cursor_bytes, limit + 1).await { - Ok(rows) => rows, - Err(err) => return internal_error(err), - }; - - let limit_usize = usize::try_from(limit).unwrap_or(usize::MAX); - let has_next = rows.len() > limit_usize; - let rows = if has_next { - &rows[..limit_usize] - } else { - &rows[..] - }; - - let next_cursor = if has_next { - rows.last().map(|r| format!("{:?}", r.address)) - } else { - None - }; - - let pools = rows - .iter() - .map(|r| PoolResponse { - id: format!("{:?}", r.address), - token0: TokenInfo { - id: format!("{:?}", r.token0), - decimals: r.token0_decimals, - symbol: r.token0_symbol.clone(), - }, - token1: TokenInfo { - id: format!("{:?}", r.token1), - decimals: r.token1_decimals, - symbol: r.token1_symbol.clone(), - }, - fee_tier: r.fee.to_string(), - liquidity: r.liquidity.to_string(), - sqrt_price: r.sqrt_price_x96.to_string(), - tick: r.tick, - ticks: None, - }) - .collect(); - - Json(PoolsResponse { - block_number, - pools, - next_cursor, - }) - .into_response() -} - -// ── /api/v1/uniswap/v3/pools/:pool_address/ticks ──────────────────────────── - -#[derive(Serialize)] -pub struct TickEntry { - pub tick_idx: i32, - pub liquidity_net: String, -} - -#[derive(Serialize)] -pub struct TicksResponse { - pub block_number: u64, - pub pool: String, - pub ticks: Vec, -} - -pub async fn get_ticks( - State(state): State>, - Path(pool_address): Path, -) -> Response { - let addr = match parse_hex_address(&pool_address) { - Ok(a) => a, - Err(_) => { - return ( - StatusCode::BAD_REQUEST, - Json(serde_json::json!({"error": "invalid pool address"})), - ) - .into_response(); - } - }; - - let block_number = match db::get_latest_indexed_block(&state.db, state.chain_id).await { - Ok(Some(block)) => block, - Ok(None) => return StatusCode::SERVICE_UNAVAILABLE.into_response(), - Err(err) => return internal_error(err), - }; - - let ticks = match db::get_ticks(&state.db, state.chain_id, &addr).await { - Ok(ticks) => ticks, - Err(err) => return internal_error(err), - }; - - Json(TicksResponse { - block_number, - pool: format!("{:?}", addr), - ticks: ticks - .into_iter() - .map(|t| TickEntry { - tick_idx: t.tick_idx, - liquidity_net: t.liquidity_net.to_string(), - }) - .collect(), - }) - .into_response() -} - -fn parse_hex_address(s: &str) -> Result { - s.parse::
().map_err(|_| "invalid address") -} diff --git a/crates/pool-indexer/src/api/uniswap_v3/mod.rs b/crates/pool-indexer/src/api/uniswap_v3/mod.rs new file mode 100644 index 0000000000..05a04beb2f --- /dev/null +++ b/crates/pool-indexer/src/api/uniswap_v3/mod.rs @@ -0,0 +1,22 @@ +pub mod pools; +pub mod ticks; + +pub use pools::get_pools; +pub use ticks::get_ticks; + +use { + alloy_primitives::Address, + axum::{ + http::StatusCode, + response::{IntoResponse, Response}, + }, +}; + +pub(super) fn internal_error(err: anyhow::Error) -> Response { + tracing::error!(?err, "internal error"); + StatusCode::INTERNAL_SERVER_ERROR.into_response() +} + +pub(super) fn parse_hex_address(s: &str) -> Result { + s.parse::
().map_err(|_| "invalid address") +} diff --git a/crates/pool-indexer/src/api/uniswap_v3/pools.rs b/crates/pool-indexer/src/api/uniswap_v3/pools.rs new file mode 100644 index 0000000000..a07c6a536b --- /dev/null +++ b/crates/pool-indexer/src/api/uniswap_v3/pools.rs @@ -0,0 +1,187 @@ +use { + crate::{api::AppState, db::uniswap_v3 as db}, + axum::{ + extract::{Path, Query, State}, + http::StatusCode, + response::{IntoResponse, Json, Response}, + }, + serde::{Deserialize, Serialize}, + std::sync::Arc, +}; + +use super::{internal_error, parse_hex_address}; + +/// Query parameters for the `/pools` endpoint. +/// +/// If `token0` is provided the response contains only matching pools (no +/// pagination). If both `token0` and `token1` are provided the search is +/// narrowed to that exact pair. Without any token filter the endpoint returns +/// a cursor-paginated list of all pools. +#[derive(Deserialize)] +pub struct PoolsQuery { + /// Opaque cursor returned by the previous page; omit to start from the beginning. + pub after: Option, + /// Maximum number of pools to return. Clamped to [1, 5000]; defaults to 1000. + pub limit: Option, + /// Filter by token symbol (partial, case-insensitive). Acts as the "base" + /// token when `token1` is also supplied. Matched via SQL `LIKE` against + /// the stored symbol — use a symbol fragment (e.g. `"WETH"`, `"USD"`), + /// not a contract address. + pub token0: Option, + /// Paired with `token0` to filter by an exact token pair (both symbols + /// must match, order-independent). + pub token1: Option, +} + +/// ERC-20 token metadata embedded in pool responses. +#[derive(Serialize)] +pub struct TokenInfo { + /// Checksummed contract address. + pub id: String, + #[serde(skip_serializing_if = "Option::is_none")] + pub decimals: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub symbol: Option, +} + +/// A single Uniswap v3 pool. +#[derive(Serialize)] +pub struct PoolResponse { + /// Checksummed pool contract address. + pub id: String, + pub token0: TokenInfo, + pub token1: TokenInfo, + /// Fee tier in hundredths of a basis point (e.g. 3000 = 0.3%). + pub fee_tier: String, + pub liquidity: String, + pub sqrt_price: String, + pub tick: i32, + /// Populated only when tick data is explicitly requested. + pub ticks: Option>, +} + +/// Response envelope for pool listing and search endpoints. +#[derive(Serialize)] +pub struct PoolsResponse { + /// Latest block that has been fully indexed. + pub block_number: u64, + pub pools: Vec, + /// Cursor to pass as `after` to fetch the next page; `null` on the last page. + pub next_cursor: Option, +} + +fn pool_row_to_response(r: &db::PoolRow) -> PoolResponse { + PoolResponse { + id: format!("{:?}", r.address), + token0: TokenInfo { + id: format!("{:?}", r.token0), + decimals: r.token0_decimals, + symbol: r.token0_symbol.clone(), + }, + token1: TokenInfo { + id: format!("{:?}", r.token1), + decimals: r.token1_decimals, + symbol: r.token1_symbol.clone(), + }, + fee_tier: r.fee.to_string(), + liquidity: r.liquidity.to_string(), + sqrt_price: r.sqrt_price_x96.to_string(), + tick: r.tick, + ticks: None, + } +} + +/// Returns all pools whose token symbols match the given filter(s). +/// When only `token0` is supplied, matches any pool containing that symbol. +/// When both are supplied, both symbols must match (order-independent). +/// Results are ordered by liquidity descending; no pagination is applied. +async fn search_pools( + state: &AppState, + block_number: u64, + token0: &str, + token1: Option<&str>, +) -> Response { + let rows = if let Some(token1) = token1 { + db::search_pools_by_pair(&state.db, state.chain_id, token0, token1).await + } else { + db::search_pools_by_token(&state.db, state.chain_id, token0).await + }; + match rows { + Ok(rows) => Json(PoolsResponse { + block_number, + pools: rows.iter().map(pool_row_to_response).collect(), + next_cursor: None, + }) + .into_response(), + Err(err) => internal_error(err), + } +} + +/// Returns a cursor-paginated list of all indexed pools, ordered by address. +/// Fetches `limit + 1` rows to detect whether a next page exists; the extra +/// row is stripped from the response and its address is returned as `next_cursor`. +async fn list_pools(state: &AppState, block_number: u64, query: &PoolsQuery) -> Response { + let limit = query.limit.unwrap_or(1000).clamp(1, 5000); + + let cursor_bytes = match query.after.as_deref().map(parse_hex_address) { + Some(Ok(addr)) => Some(addr.as_slice().to_vec()), + Some(Err(_)) => { + return ( + StatusCode::BAD_REQUEST, + Json(serde_json::json!({"error": "invalid cursor"})), + ) + .into_response(); + } + None => None, + }; + + // Fetch one extra row to determine if there is a next page. + let rows = match cursor_bytes { + Some(cursor) => db::get_pools_after(&state.db, state.chain_id, cursor, limit + 1).await, + None => db::get_pools(&state.db, state.chain_id, limit + 1).await, + }; + let rows = match rows { + Ok(rows) => rows, + Err(err) => return internal_error(err), + }; + + let limit_usize = usize::try_from(limit).unwrap_or(usize::MAX); + let has_next = rows.len() > limit_usize; + let rows = if has_next { &rows[..limit_usize] } else { &rows[..] }; + let next_cursor = if has_next { + rows.last().map(|r| format!("{:?}", r.address)) + } else { + None + }; + + Json(PoolsResponse { + block_number, + pools: rows.iter().map(pool_row_to_response).collect(), + next_cursor, + }) + .into_response() +} + +/// `GET /api/v1/{network}/uniswap/v3/pools` +/// +/// Dispatches to [`search_pools`] when a token filter is present, or +/// [`list_pools`] for paginated listing of all pools. +pub async fn get_pools( + State(state): State>, + Path(network): Path, + Query(query): Query, +) -> Response { + if network != state.network_name { + return StatusCode::NOT_FOUND.into_response(); + } + let block_number = match db::get_latest_indexed_block(&state.db, state.chain_id).await { + Ok(Some(block)) => block, + Ok(None) => return StatusCode::SERVICE_UNAVAILABLE.into_response(), + Err(err) => return internal_error(err), + }; + + if let Some(token0) = query.token0.as_deref() { + return search_pools(&state, block_number, token0, query.token1.as_deref()).await; + } + list_pools(&state, block_number, &query).await +} diff --git a/crates/pool-indexer/src/api/uniswap_v3/ticks.rs b/crates/pool-indexer/src/api/uniswap_v3/ticks.rs new file mode 100644 index 0000000000..7208896cca --- /dev/null +++ b/crates/pool-indexer/src/api/uniswap_v3/ticks.rs @@ -0,0 +1,69 @@ +use { + crate::{api::AppState, db::uniswap_v3 as db}, + axum::{ + extract::{Path, State}, + http::StatusCode, + response::{IntoResponse, Json, Response}, + }, + serde::Serialize, + std::sync::Arc, +}; + +use super::{internal_error, parse_hex_address}; + +/// A single tick entry with its net liquidity. +#[derive(Serialize)] +pub struct TickEntry { + pub tick_idx: i32, + pub liquidity_net: String, +} + +#[derive(Serialize)] +pub struct TicksResponse { + pub block_number: u64, + pub pool: String, + pub ticks: Vec, +} + +pub async fn get_ticks( + State(state): State>, + Path((network, pool_address)): Path<(String, String)>, +) -> Response { + if network != state.network_name { + return StatusCode::NOT_FOUND.into_response(); + } + let addr = match parse_hex_address(&pool_address) { + Ok(a) => a, + Err(_) => { + return ( + StatusCode::BAD_REQUEST, + Json(serde_json::json!({"error": "invalid pool address"})), + ) + .into_response(); + } + }; + + let block_number = match db::get_latest_indexed_block(&state.db, state.chain_id).await { + Ok(Some(block)) => block, + Ok(None) => return StatusCode::SERVICE_UNAVAILABLE.into_response(), + Err(err) => return internal_error(err), + }; + + let ticks = match db::get_ticks(&state.db, state.chain_id, &addr).await { + Ok(ticks) => ticks, + Err(err) => return internal_error(err), + }; + + Json(TicksResponse { + block_number, + pool: format!("{:?}", addr), + ticks: ticks + .into_iter() + .map(|t| TickEntry { + tick_idx: t.tick_idx, + liquidity_net: t.liquidity_net.to_string(), + }) + .collect(), + }) + .into_response() +} diff --git a/crates/pool-indexer/src/arguments.rs b/crates/pool-indexer/src/arguments.rs index 0555ce110e..56ba153ba6 100644 --- a/crates/pool-indexer/src/arguments.rs +++ b/crates/pool-indexer/src/arguments.rs @@ -12,17 +12,12 @@ pub enum Command { Run { #[clap(long, env)] config: PathBuf, - }, - /// Seed the database from the Uniswap V3 subgraph, then exit. - Seed { - #[clap(long, env)] - config: PathBuf, - /// Subgraph GraphQL endpoint URL. + /// Subgraph GraphQL endpoint. If provided, seeds the DB from the + /// subgraph before starting the event indexer. #[clap(long)] - subgraph_url: String, - /// Block number to seed at. Defaults to the subgraph's current indexed - /// block. + subgraph_url: Option, + /// Block number to seed at (default: subgraph's current block). #[clap(long)] - block: Option, + seed_block: Option, }, } diff --git a/crates/pool-indexer/src/db/uniswap_v3.rs b/crates/pool-indexer/src/db/uniswap_v3.rs index 38ad3e6bd1..7e3f3d4ea6 100644 --- a/crates/pool-indexer/src/db/uniswap_v3.rs +++ b/crates/pool-indexer/src/db/uniswap_v3.rs @@ -3,13 +3,10 @@ use { alloy_primitives::Address, anyhow::{Context, Result}, bigdecimal::BigDecimal, - sqlx::{PgPool, Postgres, Row, Transaction}, + sqlx::{PgPool, Postgres, Row, Transaction, postgres::PgRow}, std::str::FromStr, }; -// ── helpers -// ─────────────────────────────────────────────────────────────────── - fn addr_bytes(a: &Address) -> Vec { a.as_slice().to_vec() } @@ -40,17 +37,15 @@ fn decimal_to_i128(v: BigDecimal) -> i128 { v.to_i128().expect("decimal fits in i128") } +/// Converts a `BigDecimal` to `U160`. Normalises the scale to 0 first to +/// prevent exponential-notation strings (e.g. "1E+28") from failing to parse. pub fn decimal_to_u160(v: BigDecimal) -> alloy_primitives::aliases::U160 { - let s = v.to_plain_string(); - let int_part = s.split('.').next().unwrap_or(&s); - int_part + v.with_scale(0) + .to_string() .parse::() .expect("decimal fits in U160") } -// ── checkpoint -// ──────────────────────────────────────────────────────────────── - pub async fn get_checkpoint( pool: &PgPool, chain_id: u64, @@ -88,8 +83,6 @@ pub async fn set_checkpoint( Ok(()) } -// ── pools ───────────────────────────────────────────────────────────────────── - #[allow(clippy::too_many_arguments)] pub async fn insert_pool( tx: &mut Transaction<'_, Postgres>, @@ -123,9 +116,6 @@ pub async fn insert_pool( Ok(()) } -// ── pool state -// ──────────────────────────────────────────────────────────────── - pub async fn upsert_pool_state( tx: &mut Transaction<'_, Postgres>, chain_id: u64, @@ -180,9 +170,7 @@ pub async fn update_pool_liquidity( Ok(()) } -// ── ticks ───────────────────────────────────────────────────────────────────── - -/// Applies a signed delta to a tick's `liquidity_net`. Rows that reach zero +/// Applies a signed delta to a tick's `liquidity_net`. Rows that reach zero /// are pruned (Uniswap V3 convention). pub async fn update_tick_liquidity_net( tx: &mut Transaction<'_, Postgres>, @@ -222,9 +210,6 @@ pub async fn update_tick_liquidity_net( Ok(()) } -// ── batch write operations -// ──────────────────────────────────────────────────── - pub async fn batch_insert_pools( tx: &mut Transaction<'_, Postgres>, chain_id: u64, @@ -456,9 +441,19 @@ pub async fn batch_seed_ticks( Ok(()) } -// ── API read queries -// ────────────────────────────────────────────────────────── +pub async fn delete_ticks_for_chain( + tx: &mut Transaction<'_, Postgres>, + chain_id: u64, +) -> Result<()> { + sqlx::query("DELETE FROM uniswap_v3_ticks WHERE chain_id = $1") + .bind(chain_id.cast_signed()) + .execute(&mut **tx) + .await + .context("delete_ticks_for_chain")?; + Ok(()) +} +/// A pool with its current on-chain state (price, liquidity, tick). pub struct PoolRow { pub address: Address, pub token0: Address, @@ -473,13 +468,30 @@ pub struct PoolRow { pub tick: i32, } -pub async fn get_pools( - pool: &PgPool, - chain_id: u64, - after_address: Option>, - limit: i64, -) -> Result> { - let query_no_cursor = "SELECT p.address, p.token0, p.token1, p.fee, +fn map_pool_row(r: PgRow) -> Result { + Ok(PoolRow { + address: bytes_to_addr(r.get("address"))?, + token0: bytes_to_addr(r.get("token0"))?, + token1: bytes_to_addr(r.get("token1"))?, + fee: r.get::("fee").cast_unsigned(), + token0_decimals: r + .get::, _>("token0_decimals") + .map(|d| u8::try_from(d).unwrap_or(0)), + token1_decimals: r + .get::, _>("token1_decimals") + .map(|d| u8::try_from(d).unwrap_or(0)), + token0_symbol: r.get("token0_symbol"), + token1_symbol: r.get("token1_symbol"), + sqrt_price_x96: decimal_to_u160(r.get("sqrt_price_x96")), + liquidity: decimal_to_u128(r.get("liquidity")), + tick: r.get("tick"), + }) +} + +/// Fetches a page of pools ordered by address with their current state. +pub async fn get_pools(pool: &PgPool, chain_id: u64, limit: i64) -> Result> { + sqlx::query( + "SELECT p.address, p.token0, p.token1, p.fee, p.token0_decimals, p.token1_decimals, p.token0_symbol, p.token1_symbol, s.sqrt_price_x96, s.liquidity, s.tick @@ -488,9 +500,27 @@ pub async fn get_pools( ON s.chain_id = p.chain_id AND s.pool_address = p.address WHERE p.chain_id = $1 ORDER BY p.address - LIMIT $2"; + LIMIT $2", + ) + .bind(chain_id.cast_signed()) + .bind(limit) + .fetch_all(pool) + .await + .context("get_pools")? + .into_iter() + .map(map_pool_row) + .collect() +} - let query_with_cursor = "SELECT p.address, p.token0, p.token1, p.fee, +/// Fetches the next page of pools after `cursor` address (keyset pagination). +pub async fn get_pools_after( + pool: &PgPool, + chain_id: u64, + cursor: Vec, + limit: i64, +) -> Result> { + sqlx::query( + "SELECT p.address, p.token0, p.token1, p.fee, p.token0_decimals, p.token1_decimals, p.token0_symbol, p.token1_symbol, s.sqrt_price_x96, s.liquidity, s.tick @@ -500,46 +530,17 @@ pub async fn get_pools( WHERE p.chain_id = $1 AND p.address > $2 ORDER BY p.address - LIMIT $3"; - - let rows = if let Some(cursor) = after_address { - sqlx::query(query_with_cursor) - .bind(chain_id.cast_signed()) - .bind(cursor) - .bind(limit) - .fetch_all(pool) - .await - .context("get_pools with cursor")? - } else { - sqlx::query(query_no_cursor) - .bind(chain_id.cast_signed()) - .bind(limit) - .fetch_all(pool) - .await - .context("get_pools")? - }; - - rows.into_iter() - .map(|r| { - Ok(PoolRow { - address: bytes_to_addr(r.get("address"))?, - token0: bytes_to_addr(r.get("token0"))?, - token1: bytes_to_addr(r.get("token1"))?, - fee: r.get::("fee").cast_unsigned(), - token0_decimals: r - .get::, _>("token0_decimals") - .map(|d| u8::try_from(d).unwrap_or(0)), - token1_decimals: r - .get::, _>("token1_decimals") - .map(|d| u8::try_from(d).unwrap_or(0)), - token0_symbol: r.get("token0_symbol"), - token1_symbol: r.get("token1_symbol"), - sqrt_price_x96: decimal_to_u160(r.get("sqrt_price_x96")), - liquidity: decimal_to_u128(r.get("liquidity")), - tick: r.get("tick"), - }) - }) - .collect() + LIMIT $3", + ) + .bind(chain_id.cast_signed()) + .bind(cursor) + .bind(limit) + .fetch_all(pool) + .await + .context("get_pools_after")? + .into_iter() + .map(map_pool_row) + .collect() } pub struct TickRow { @@ -574,6 +575,72 @@ pub async fn get_ticks( .collect()) } +/// Searches pools by a single token symbol (partial, case-insensitive), ordered +/// by liquidity descending. +pub async fn search_pools_by_token( + pool: &PgPool, + chain_id: u64, + token: &str, +) -> Result> { + let pattern = format!("%{}%", token.to_lowercase()); + sqlx::query( + "SELECT p.address, p.token0, p.token1, p.fee, + p.token0_decimals, p.token1_decimals, + p.token0_symbol, p.token1_symbol, + s.sqrt_price_x96, s.liquidity, s.tick + FROM uniswap_v3_pools p + JOIN uniswap_v3_pool_states s + ON s.chain_id = p.chain_id AND s.pool_address = p.address + WHERE p.chain_id = $1 + AND (LOWER(p.token0_symbol) LIKE $2 OR LOWER(p.token1_symbol) LIKE $2) + ORDER BY s.liquidity DESC", + ) + .bind(chain_id.cast_signed()) + .bind(&pattern) + .fetch_all(pool) + .await + .context("search_pools_by_token")? + .into_iter() + .map(map_pool_row) + .collect() +} + +/// Searches pools matching a pair of token symbols (partial, case-insensitive, +/// order-independent), ordered by liquidity descending. +pub async fn search_pools_by_pair( + pool: &PgPool, + chain_id: u64, + token0: &str, + token1: &str, +) -> Result> { + let t0 = format!("%{}%", token0.to_lowercase()); + let t1 = format!("%{}%", token1.to_lowercase()); + sqlx::query( + "SELECT p.address, p.token0, p.token1, p.fee, + p.token0_decimals, p.token1_decimals, + p.token0_symbol, p.token1_symbol, + s.sqrt_price_x96, s.liquidity, s.tick + FROM uniswap_v3_pools p + JOIN uniswap_v3_pool_states s + ON s.chain_id = p.chain_id AND s.pool_address = p.address + WHERE p.chain_id = $1 + AND ( + (LOWER(p.token0_symbol) LIKE $2 AND LOWER(p.token1_symbol) LIKE $3) + OR (LOWER(p.token1_symbol) LIKE $2 AND LOWER(p.token0_symbol) LIKE $3) + ) + ORDER BY s.liquidity DESC", + ) + .bind(chain_id.cast_signed()) + .bind(&t0) + .bind(&t1) + .fetch_all(pool) + .await + .context("search_pools_by_pair")? + .into_iter() + .map(map_pool_row) + .collect() +} + /// Returns all distinct token addresses that have no symbol recorded yet. pub async fn get_tokens_missing_symbols(pool: &PgPool, chain_id: u64) -> Result> { let rows = sqlx::query( @@ -595,7 +662,7 @@ pub async fn get_tokens_missing_symbols(pool: &PgPool, chain_id: u64) -> Result< .collect() } -/// Updates token0_symbol / token1_symbol for all pools containing `token`. +/// Updates `token0_symbol` / `token1_symbol` for all pools containing `token`. pub async fn set_token_symbol( pool: &PgPool, chain_id: u64, @@ -603,6 +670,8 @@ pub async fn set_token_symbol( symbol: &str, ) -> Result<()> { let token_bytes = addr_bytes(token); + let mut tx = pool.begin().await.context("set_token_symbol begin")?; + sqlx::query( "UPDATE uniswap_v3_pools SET token0_symbol = $3 WHERE chain_id = $1 AND token0 = $2 AND token0_symbol IS NULL", @@ -610,7 +679,7 @@ pub async fn set_token_symbol( .bind(chain_id.cast_signed()) .bind(&token_bytes) .bind(symbol) - .execute(pool) + .execute(&mut *tx) .await .context("set_token_symbol token0")?; @@ -621,10 +690,11 @@ pub async fn set_token_symbol( .bind(chain_id.cast_signed()) .bind(&token_bytes) .bind(symbol) - .execute(pool) + .execute(&mut *tx) .await .context("set_token_symbol token1")?; + tx.commit().await.context("set_token_symbol commit")?; Ok(()) } diff --git a/crates/pool-indexer/src/indexer/uniswap_v3.rs b/crates/pool-indexer/src/indexer/uniswap_v3.rs index 37e8c73069..7d0c97b7ab 100644 --- a/crates/pool-indexer/src/indexer/uniswap_v3.rs +++ b/crates/pool-indexer/src/indexer/uniswap_v3.rs @@ -32,12 +32,13 @@ const FETCH_CONCURRENCY: usize = 8; /// Max concurrent eth_calls during prefetch phases. const PREFETCH_CONCURRENCY: usize = 50; -// ── data types for batch DB operations ─────────────────────────────────────── - +/// Data for a newly discovered pool, sourced from a `PoolCreated` factory +/// event. pub struct NewPoolData { pub address: Address, pub token0: Address, pub token1: Address, + /// Raw fee in hundredths of a basis point (e.g. 3000 = 0.3 %). pub fee: u32, pub token0_decimals: Option, pub token1_decimals: Option, @@ -46,6 +47,8 @@ pub struct NewPoolData { pub created_block: u64, } +/// Full pool state as of a given block, sourced from an `Initialize` or `Swap` +/// event (both carry the current price, liquidity, and tick). pub struct PoolStateData { pub pool_address: Address, pub block_number: u64, @@ -54,31 +57,38 @@ pub struct PoolStateData { pub tick: i32, } +/// A liquidity-only pool update sourced from a `Mint` or `Burn` event when no +/// `Swap` or `Initialize` has been seen for the pool in the same chunk. pub struct LiquidityUpdateData { pub pool_address: Address, pub block_number: u64, pub liquidity: u128, } +/// A signed liquidity delta for a single tick boundary, accumulated from +/// `Mint` (+amount) and `Burn` (-amount) events. pub struct TickDeltaData { pub pool_address: Address, pub tick_idx: i32, + /// Net signed change to `liquidity_net` at this tick. pub delta: i128, } +/// All state changes extracted from a single block-range chunk of logs, +/// ready to be written to the database in one transaction. struct ChunkChanges { new_pools: Vec, - /// Full state updates (from Initialize / Swap). + /// Full state updates (from `Initialize` / `Swap`). pool_states: Vec, - /// Liquidity-only updates (from Mint/Burn with no Swap in this chunk). + /// Liquidity-only updates (from `Mint`/`Burn` with no `Swap` in this + /// chunk). liquidity_updates: Vec, /// Accumulated tick deltas. tick_deltas: Vec, } -// ── indexer -// ─────────────────────────────────────────────────────────────────── - +/// Indexes Uniswap V3 events for a single factory contract, persisting pool +/// state and tick liquidity to the database. pub struct UniswapV3Indexer { provider: AlloyProvider, db: PgPool, @@ -105,7 +115,11 @@ impl UniswapV3Indexer { } pub async fn run(self, poll_interval: std::time::Duration) -> ! { - self.backfill_symbols().await; + tokio::spawn(backfill_symbols( + self.provider.clone(), + self.db.clone(), + self.chain_id, + )); loop { if let Err(err) = self.run_once().await { tracing::error!(?err, "indexer error, retrying after poll interval"); @@ -114,43 +128,43 @@ impl UniswapV3Indexer { } } - /// Fetches ERC-20 symbols for any token in the DB that is missing one. - /// Runs once at startup; failures for individual tokens are logged and - /// skipped. - async fn backfill_symbols(&self) { - let tokens = match db::get_tokens_missing_symbols(&self.db, self.chain_id).await { - Ok(t) => t, - Err(err) => { - tracing::warn!( - ?err, - "failed to query tokens missing symbols, skipping backfill" - ); - return; - } - }; - if tokens.is_empty() { - return; - } - tracing::info!(count = tokens.len(), "backfilling token symbols"); - - let symbols: Vec<(Address, String)> = futures::stream::iter(tokens) - .map(|token| async move { - let sym = fetch_symbol(&self.provider, token).await; - (token, sym) - }) - .buffer_unordered(PREFETCH_CONCURRENCY) - .filter_map(|(token, opt)| async move { opt.map(|s| (token, s)) }) - .collect() - .await; - - let mut updated = 0usize; - for (token, symbol) in &symbols { - match db::set_token_symbol(&self.db, self.chain_id, token, symbol).await { - Ok(()) => updated += 1, - Err(err) => tracing::warn!(%token, ?err, "failed to backfill symbol"), + /// Processes all pending blocks starting from `from_block` up to the + /// current finalized block and returns. Loops until no further blocks + /// remain (handles new blocks finalizing during a long catch-up). + /// + /// If no checkpoint exists yet (fresh DB after seeding), the checkpoint is + /// initialized to `from_block - 1` so that `run_once` starts at + /// `from_block`. This means the caller (seeder) does not need to write the + /// checkpoint itself — it advances naturally per-chunk as blocks are + /// indexed. + pub async fn catch_up(&self, from_block: u64) -> Result<()> { + let mut tx = self.db.begin().await.context("begin checkpoint tx")?; + db::set_checkpoint( + &mut tx, + self.chain_id, + &self.factory, + from_block.saturating_sub(1), + ) + .await?; + tx.commit().await.context("commit checkpoint")?; + loop { + let finalized = self + .provider + .get_block_by_number(self.finality_tag) + .await + .context("get finalized block")? + .context("no finalized block")? + .header + .number; + let last = db::get_checkpoint(&self.db, self.chain_id, &self.factory) + .await? + .unwrap_or(0); + if last >= finalized { + tracing::info!(block = finalized, "caught up to finalized block"); + return Ok(()); } + self.run_once().await?; } - tracing::info!(updated, "token symbol backfill complete"); } async fn run_once(&self) -> Result<()> { @@ -292,22 +306,7 @@ impl UniswapV3Indexer { /// Parallel-fetch ERC-20 decimals for all tokens referenced in PoolCreated /// events. async fn prefetch_decimals(&self, logs: &[Log]) -> DecimalsCache { - let tokens: Vec
= logs - .iter() - .filter_map(|log| { - let t = log.topic0()?; - if *t != PoolCreated::SIGNATURE_HASH || log.address() != self.factory { - return None; - } - let decoded = PoolCreated::decode_log(&log.inner).ok()?; - Some([decoded.data.token0, decoded.data.token1]) - }) - .flatten() - .collect::>() - .into_iter() - .collect(); - - futures::stream::iter(tokens) + futures::stream::iter(pool_created_token_addresses(self.factory, logs)) .map(|token| async move { let dec = fetch_decimals(&self.provider, token).await; (token, dec) @@ -321,22 +320,7 @@ impl UniswapV3Indexer { /// Parallel-fetch ERC-20 symbols for all tokens referenced in PoolCreated /// events. async fn prefetch_symbols(&self, logs: &[Log]) -> SymbolsCache { - let tokens: Vec
= logs - .iter() - .filter_map(|log| { - let t = log.topic0()?; - if *t != PoolCreated::SIGNATURE_HASH || log.address() != self.factory { - return None; - } - let decoded = PoolCreated::decode_log(&log.inner).ok()?; - Some([decoded.data.token0, decoded.data.token1]) - }) - .flatten() - .collect::>() - .into_iter() - .collect(); - - futures::stream::iter(tokens) + futures::stream::iter(pool_created_token_addresses(self.factory, logs)) .map(|token| async move { let sym = fetch_symbol(&self.provider, token).await; (token, sym) @@ -367,9 +351,6 @@ impl UniswapV3Indexer { } } -// ── helpers -// ─────────────────────────────────────────────────────────────────── - /// Sign-extends a 24-bit signed integer (alloy I24) to i32. fn signed24_to_i32(v: alloy::primitives::aliases::I24) -> i32 { let raw = v.into_raw().as_limbs()[0] as u32; @@ -393,12 +374,68 @@ async fn fetch_decimals(provider: &AlloyProvider, token: Address) -> Option .ok() } +async fn backfill_symbols(provider: AlloyProvider, db: sqlx::PgPool, chain_id: u64) { + let tokens = match db::get_tokens_missing_symbols(&db, chain_id).await { + Ok(t) => t, + Err(err) => { + tracing::warn!( + ?err, + "failed to query tokens missing symbols, skipping backfill" + ); + return; + } + }; + if tokens.is_empty() { + return; + } + let total = tokens.len(); + tracing::info!(total, "backfilling token symbols"); + + let mut updated = 0usize; + let mut processed = 0usize; + + for chunk in tokens.chunks(500) { + let symbols: Vec<(Address, String)> = futures::stream::iter(chunk.iter().copied()) + .map(|token| { + let provider = provider.clone(); + async move { + let sym = fetch_symbol(&provider, token).await; + (token, sym) + } + }) + .buffer_unordered(PREFETCH_CONCURRENCY) + .filter_map(|(token, opt)| async move { opt.map(|s| (token, s)) }) + .collect() + .await; + + for (token, symbol) in &symbols { + match db::set_token_symbol(&db, chain_id, token, symbol).await { + Ok(()) => updated += 1, + Err(err) => tracing::warn!(%token, ?err, "failed to backfill symbol"), + } + } + + processed += chunk.len(); + tracing::info!(processed, total, updated, "token symbol backfill progress"); + } + + tracing::info!(updated, total, "token symbol backfill complete"); +} + async fn fetch_symbol(provider: &AlloyProvider, token: Address) -> Option { - ERC20::new(token, provider.clone()) + let sym = ERC20::new(token, provider.clone()) .symbol() .call() .await - .ok() + .ok()?; + // Strip null bytes — some tokens embed \x00 in their symbol which Postgres + // rejects. + let cleaned = sym.replace('\x00', ""); + if cleaned.is_empty() { + None + } else { + Some(cleaned) + } } /// Returns true when the RPC rejects a request because the result set would @@ -413,6 +450,216 @@ fn is_range_too_large(err: &anyhow::Error) -> bool { }) } +/// Collects the unique set of token addresses from all `PoolCreated` events +/// emitted by `factory` in `logs`. +fn pool_created_token_addresses(factory: Address, logs: &[Log]) -> Vec
{ + logs.iter() + .filter_map(|log| { + let t = log.topic0()?; + if *t != PoolCreated::SIGNATURE_HASH || log.address() != factory { + return None; + } + let decoded = PoolCreated::decode_log(&log.inner).ok()?; + Some([decoded.data.token0, decoded.data.token1]) + }) + .flatten() + .collect::>() + .into_iter() + .collect() +} + +/// Accumulates per-event-type state changes while iterating over a chunk's +/// logs. +struct LogAccumulator { + new_pools: HashMap, + /// Latest full state per pool, established by `Initialize` or `Swap`. + full_states: HashMap, + /// Liquidity-only update per pool, used when no full state exists yet in + /// the chunk (i.e. neither `Initialize` nor `Swap` has been seen). + liq_only: HashMap, + /// Accumulated signed tick-liquidity deltas, keyed by `(pool, tick_idx)`. + tick_deltas: HashMap<(Address, i32), i128>, +} + +impl LogAccumulator { + fn new() -> Self { + Self { + new_pools: HashMap::new(), + full_states: HashMap::new(), + liq_only: HashMap::new(), + tick_deltas: HashMap::new(), + } + } + + /// Records a newly discovered pool, filling token metadata from the + /// prefetch caches. + fn handle_pool_created( + &mut self, + log: &Log, + dec_cache: &DecimalsCache, + sym_cache: &SymbolsCache, + ) { + let Ok(decoded) = PoolCreated::decode_log(&log.inner) else { + return; + }; + let e = &decoded.data; + let pool: Address = e.pool; + let token0: Address = e.token0; + let token1: Address = e.token1; + let created_block = log.block_number.unwrap_or(0); + tracing::debug!(%pool, %token0, %token1, fee = e.fee.to::(), "discovered pool"); + self.new_pools.insert( + pool, + NewPoolData { + address: pool, + token0, + token1, + fee: e.fee.to::(), + token0_decimals: dec_cache.get(&token0).copied(), + token1_decimals: dec_cache.get(&token1).copied(), + token0_symbol: sym_cache.get(&token0).cloned(), + token1_symbol: sym_cache.get(&token1).cloned(), + created_block, + }, + ); + } + + /// Records the initial price and tick from an `Initialize` event. + /// Preserves any liquidity already seen for this pool earlier in the chunk. + fn handle_initialize(&mut self, log: &Log) { + let Ok(decoded) = Initialize::decode_log(&log.inner) else { + return; + }; + let e = &decoded.data; + let pool = log.address(); + let block = log.block_number.unwrap_or(0); + let liquidity = self + .full_states + .get(&pool) + .map(|s| s.liquidity) + .unwrap_or(0); + self.full_states.insert( + pool, + PoolStateData { + pool_address: pool, + block_number: block, + sqrt_price_x96: e.sqrtPriceX96, + liquidity, + tick: signed24_to_i32(e.tick), + }, + ); + self.liq_only.remove(&pool); + } + + /// Records a full pool-state update (price, liquidity, tick) from a `Swap`. + fn handle_swap(&mut self, log: &Log) { + let Ok(decoded) = Swap::decode_log(&log.inner) else { + return; + }; + let e = &decoded.data; + let pool = log.address(); + let block = log.block_number.unwrap_or(0); + self.full_states.insert( + pool, + PoolStateData { + pool_address: pool, + block_number: block, + sqrt_price_x96: e.sqrtPriceX96, + liquidity: e.liquidity, + tick: signed24_to_i32(e.tick), + }, + ); + self.liq_only.remove(&pool); + } + + /// Applies positive tick-liquidity deltas from a `Mint` and refreshes + /// pool liquidity from the prefetch cache. + fn handle_mint(&mut self, log: &Log, liq_cache: &LiquidityCache) { + let Ok(decoded) = Mint::decode_log(&log.inner) else { + return; + }; + let e = &decoded.data; + let pool = log.address(); + let block = log.block_number.unwrap_or(0); + let amount = e.amount.cast_signed() as i128; + *self + .tick_deltas + .entry((pool, signed24_to_i32(e.tickLower))) + .or_default() += amount; + *self + .tick_deltas + .entry((pool, signed24_to_i32(e.tickUpper))) + .or_default() -= amount; + self.update_liquidity_from_cache(pool, block, liq_cache); + } + + /// Applies negative tick-liquidity deltas from a `Burn` and refreshes + /// pool liquidity from the prefetch cache. + fn handle_burn(&mut self, log: &Log, liq_cache: &LiquidityCache) { + let Ok(decoded) = Burn::decode_log(&log.inner) else { + return; + }; + let e = &decoded.data; + let pool = log.address(); + let block = log.block_number.unwrap_or(0); + let amount = e.amount.cast_signed() as i128; + *self + .tick_deltas + .entry((pool, signed24_to_i32(e.tickLower))) + .or_default() -= amount; + *self + .tick_deltas + .entry((pool, signed24_to_i32(e.tickUpper))) + .or_default() += amount; + self.update_liquidity_from_cache(pool, block, liq_cache); + } + + /// Refreshes the stored liquidity for `pool` at `block` using the + /// prefetch cache. Updates the existing full state in-place if one exists, + /// otherwise stores a liquidity-only record. + fn update_liquidity_from_cache( + &mut self, + pool: Address, + block: u64, + liq_cache: &LiquidityCache, + ) { + if let Some(&liq) = liq_cache.get(&(pool, block)) { + if let Some(state) = self.full_states.get_mut(&pool) { + state.liquidity = liq; + state.block_number = block; + } else { + self.liq_only.insert(pool, (block, liq)); + } + } + } + + fn into_chunk_changes(self) -> ChunkChanges { + ChunkChanges { + new_pools: self.new_pools.into_values().collect(), + pool_states: self.full_states.into_values().collect(), + liquidity_updates: self + .liq_only + .into_iter() + .map(|(pool, (block, liq))| LiquidityUpdateData { + pool_address: pool, + block_number: block, + liquidity: liq, + }) + .collect(), + tick_deltas: self + .tick_deltas + .into_iter() + .filter(|(_, d)| *d != 0) + .map(|((pool, tick), delta)| TickDeltaData { + pool_address: pool, + tick_idx: tick, + delta, + }) + .collect(), + } + } +} + fn collect_log_changes( factory: Address, logs: &[Log], @@ -420,148 +667,22 @@ fn collect_log_changes( dec_cache: &DecimalsCache, sym_cache: &SymbolsCache, ) -> ChunkChanges { - // Pool address → latest full state (from Initialize or Swap). - let mut full_states: HashMap = HashMap::new(); - // Pool address → latest liquidity update (from Mint/Burn, only if no full - // state has been established for this pool in the chunk). - let mut liq_only: HashMap = HashMap::new(); - // (pool, tick_idx) → accumulated signed delta. - let mut tick_deltas: HashMap<(Address, i32), i128> = HashMap::new(); - let mut new_pools: HashMap = HashMap::new(); - + let mut acc = LogAccumulator::new(); for log in logs { let Some(t) = log.topic0() else { continue }; - if *t == PoolCreated::SIGNATURE_HASH && log.address() == factory { - let Ok(decoded) = PoolCreated::decode_log(&log.inner) else { - continue; - }; - let e = &decoded.data; - let pool: Address = e.pool; - let token0: Address = e.token0; - let token1: Address = e.token1; - let created_block = log.block_number.unwrap_or(0); - tracing::debug!(%pool, %token0, %token1, fee = e.fee.to::(), "discovered pool"); - new_pools.insert( - pool, - NewPoolData { - address: pool, - token0, - token1, - fee: e.fee.to::(), - token0_decimals: dec_cache.get(&token0).copied(), - token1_decimals: dec_cache.get(&token1).copied(), - token0_symbol: sym_cache.get(&token0).cloned(), - token1_symbol: sym_cache.get(&token1).cloned(), - created_block, - }, - ); + acc.handle_pool_created(log, dec_cache, sym_cache); } else if *t == Initialize::SIGNATURE_HASH { - let Ok(decoded) = Initialize::decode_log(&log.inner) else { - continue; - }; - let e = &decoded.data; - let pool = log.address(); - let block = log.block_number.unwrap_or(0); - // Preserve any liquidity already accumulated for this pool in this chunk. - let liquidity = full_states.get(&pool).map(|s| s.liquidity).unwrap_or(0); - full_states.insert( - pool, - PoolStateData { - pool_address: pool, - block_number: block, - sqrt_price_x96: e.sqrtPriceX96, - liquidity, - tick: signed24_to_i32(e.tick), - }, - ); - liq_only.remove(&pool); + acc.handle_initialize(log); } else if *t == Swap::SIGNATURE_HASH { - let Ok(decoded) = Swap::decode_log(&log.inner) else { - continue; - }; - let e = &decoded.data; - let pool = log.address(); - let block = log.block_number.unwrap_or(0); - full_states.insert( - pool, - PoolStateData { - pool_address: pool, - block_number: block, - sqrt_price_x96: e.sqrtPriceX96, - liquidity: e.liquidity, - tick: signed24_to_i32(e.tick), - }, - ); - liq_only.remove(&pool); + acc.handle_swap(log); } else if *t == Mint::SIGNATURE_HASH { - let Ok(decoded) = Mint::decode_log(&log.inner) else { - continue; - }; - let e = &decoded.data; - let pool = log.address(); - let block = log.block_number.unwrap_or(0); - let amount = e.amount.cast_signed(); - *tick_deltas - .entry((pool, signed24_to_i32(e.tickLower))) - .or_default() += amount as i128; - *tick_deltas - .entry((pool, signed24_to_i32(e.tickUpper))) - .or_default() -= amount as i128; - if let Some(&liq) = liq_cache.get(&(pool, block)) { - if let Some(state) = full_states.get_mut(&pool) { - state.liquidity = liq; - state.block_number = block; - } else { - liq_only.insert(pool, (block, liq)); - } - } + acc.handle_mint(log, liq_cache); } else if *t == Burn::SIGNATURE_HASH { - let Ok(decoded) = Burn::decode_log(&log.inner) else { - continue; - }; - let e = &decoded.data; - let pool = log.address(); - let block = log.block_number.unwrap_or(0); - let amount = e.amount.cast_signed(); - *tick_deltas - .entry((pool, signed24_to_i32(e.tickLower))) - .or_default() -= amount as i128; - *tick_deltas - .entry((pool, signed24_to_i32(e.tickUpper))) - .or_default() += amount as i128; - if let Some(&liq) = liq_cache.get(&(pool, block)) { - if let Some(state) = full_states.get_mut(&pool) { - state.liquidity = liq; - state.block_number = block; - } else { - liq_only.insert(pool, (block, liq)); - } - } + acc.handle_burn(log, liq_cache); } } - - ChunkChanges { - new_pools: new_pools.into_values().collect(), - pool_states: full_states.into_values().collect(), - liquidity_updates: liq_only - .into_iter() - .map(|(pool, (block, liq))| LiquidityUpdateData { - pool_address: pool, - block_number: block, - liquidity: liq, - }) - .collect(), - tick_deltas: tick_deltas - .into_iter() - .filter(|(_, d)| *d != 0) - .map(|((pool, tick), delta)| TickDeltaData { - pool_address: pool, - tick_idx: tick, - delta, - }) - .collect(), - } + acc.into_chunk_changes() } #[cfg(test)] diff --git a/crates/pool-indexer/src/run.rs b/crates/pool-indexer/src/run.rs index 39659524a2..be2c18a80d 100644 --- a/crates/pool-indexer/src/run.rs +++ b/crates/pool-indexer/src/run.rs @@ -19,27 +19,19 @@ pub async fn start(args: impl Iterator) { observe::panic_hook::install(); match args.command { - Command::Run { config } => { - let config = Configuration::from_path(&config).expect("failed to load configuration"); - tracing::info!("pool-indexer starting"); - run(config).await; - } - Command::Seed { + Command::Run { config, subgraph_url, - block, + seed_block, } => { let config = Configuration::from_path(&config).expect("failed to load configuration"); - tracing::info!("pool-indexer seeding from subgraph"); - let db = connect_db(&config).await; - crate::seeder::seed(&db, &config, &subgraph_url, block) - .await - .expect("seeding failed"); + tracing::info!("pool-indexer starting"); + run(config, subgraph_url, seed_block).await; } } } -pub async fn run(config: Configuration) { +pub async fn run(config: Configuration, subgraph_url: Option, seed_block: Option) { let db = connect_db(&config).await; let w3 = web3( @@ -49,24 +41,51 @@ pub async fn run(config: Configuration) { ); let poll_interval = config.indexer.poll_interval(); + let chain_id = config.indexer.chain_id; let indexer = UniswapV3Indexer::new(w3.provider.clone(), db.clone(), &config.indexer); let api_state = Arc::new(AppState { - db, - chain_id: config.indexer.chain_id, + network_name: chain_id_to_network_name(chain_id), + db: db.clone(), + chain_id, }); let router = crate::api::router(api_state); let bind_address = config.api.bind_address; let mut set = JoinSet::new(); - set.spawn(async move { indexer.run(poll_interval).await }); set.spawn(async move { serve(router, bind_address).await }); + if let Some(url) = subgraph_url { + set.spawn(async move { + let seeded_block = crate::seeder::seed(&db, chain_id, &url, seed_block) + .await + .expect("seeding failed"); + indexer + .catch_up(seeded_block) + .await + .expect("catch-up indexing failed"); + indexer.run(poll_interval).await + }); + } else { + set.spawn(async move { indexer.run(poll_interval).await }); + } + if let Some(result) = set.join_next().await { panic!("pool-indexer task exited: {result:?}"); } } +fn chain_id_to_network_name(chain_id: u64) -> String { + match chain_id { + 1 => "mainnet", + 100 => "gnosis", + 42161 => "arbitrum-one", + 8453 => "base", + _ => "unknown", + } + .to_string() +} + async fn connect_db(config: &Configuration) -> sqlx::PgPool { PgPoolOptions::new() .max_connections(config.database.max_connections.get()) diff --git a/crates/pool-indexer/src/seeder.rs b/crates/pool-indexer/src/seeder.rs index 3d4d651bdb..66f53ea0e5 100644 --- a/crates/pool-indexer/src/seeder.rs +++ b/crates/pool-indexer/src/seeder.rs @@ -1,6 +1,19 @@ +//! Bootstraps the pool-indexer database from a Uniswap V3 subgraph. +//! +//! Seeding happens in two phases: +//! +//! 1. **Pools** — all pools and their current state are fetched with keyset +//! pagination and written to the DB in page-sized transactions. +//! 2. **Ticks** — existing tick rows are cleared, then each pool's ticks are +//! fetched concurrently (up to [`TICK_CONCURRENCY`] at a time) and written. +//! +//! Both phases query the subgraph at the same fixed block number so the +//! snapshot is consistent. After seeding, the caller should invoke +//! `UniswapV3Indexer::catch_up` to replay any blocks the subgraph has already +//! processed but that aren't yet in the DB. + use { crate::{ - config::Configuration, db::uniswap_v3 as db, indexer::uniswap_v3::{NewPoolData, PoolStateData, TickDeltaData}, }, @@ -14,12 +27,11 @@ use { tracing::info, }; +/// Number of pools (or ticks) returned per GraphQL page. const PAGE_SIZE: usize = 1000; +/// Maximum number of pools whose ticks are fetched concurrently. const TICK_CONCURRENCY: usize = 50; -// ── Subgraph response types -// ─────────────────────────────────────────────────── - #[derive(Deserialize)] struct GqlResponse { data: Option, @@ -63,6 +75,7 @@ struct SubgraphTick { liquidity_net: String, } +/// Wrapper around the `{ _meta { block { number } } }` GraphQL response. #[derive(Deserialize)] struct MetaPage { #[serde(rename = "_meta")] @@ -79,9 +92,8 @@ struct MetaBlock { number: u64, } -// ── GraphQL helpers -// ─────────────────────────────────────────────────────────── - +/// Executes a GraphQL query against `url` and deserialises the `data` field. +/// Returns an error if the response contains a top-level `errors` array. async fn gql Deserialize<'de>>( client: &Client, url: &str, @@ -102,14 +114,13 @@ async fn gql Deserialize<'de>>( serde_json::from_value(data).context("decode subgraph data") } -// ── Fetchers -// ────────────────────────────────────────────────────────────────── - async fn fetch_current_block(client: &Client, url: &str) -> Result { let page: MetaPage = gql(client, url, "{ _meta { block { number } } }", json!({})).await?; Ok(page.meta.block.number) } +/// Fetches one page of pools at `block`, ordered by id and starting after +/// `cursor` (empty string to start from the beginning). async fn fetch_pools_page( client: &Client, url: &str, @@ -138,6 +149,9 @@ async fn fetch_pools_page( Ok(page.pools) } +/// Fetches all ticks for `pool_id` at `block` using keyset pagination. +/// Returns each tick as a [`TickDeltaData`] where `delta` is the subgraph's +/// `liquidityNet` (treated as an absolute value, not a running delta). async fn fetch_ticks_for_pool( client: Client, url: String, @@ -188,17 +202,16 @@ async fn fetch_ticks_for_pool( Ok(ticks) } -// ── Public entry point -// ──────────────────────────────────────────────────────── - +/// Seeds pools and ticks from the subgraph and returns the block number that +/// was seeded. The caller is responsible for catching up to the current +/// finalized block via `catch_up`. pub async fn seed( db: &PgPool, - config: &Configuration, + chain_id: u64, subgraph_url: &str, block: Option, -) -> Result<()> { +) -> Result { let client = Client::new(); - let chain_id = config.indexer.chain_id; let block = match block { Some(b) => b, @@ -208,7 +221,6 @@ pub async fn seed( }; info!(block, "seeding pool-indexer from subgraph"); - // ── Phase 1: pools ──────────────────────────────────────────────────────── let mut pool_ids: Vec = Vec::new(); let mut cursor = String::new(); @@ -269,15 +281,19 @@ pub async fn seed( "all pools seeded — starting tick seeding" ); - // ── Phase 2: ticks (50 pools concurrently) ──────────────────────────────── + // Clear all existing tick data so seeded values are authoritative. + // This prevents stale rows (e.g. ticks burned to 0 before the seed block) + // from persisting if the seeder is re-run on a non-empty database. + let mut tx = db.begin().await.context("begin tick clear tx")?; + db::delete_ticks_for_chain(&mut tx, chain_id).await?; + tx.commit().await.context("commit tick clear")?; + let mut total_ticks = 0usize; let url = subgraph_url.to_owned(); for chunk in pool_ids.chunks(TICK_CONCURRENCY) { - let tick_batches: Vec> = futures::stream::iter(chunk) - .map(|pool_id| { - fetch_ticks_for_pool(client.clone(), url.clone(), pool_id.clone(), block) - }) + let tick_batches: Vec> = futures::stream::iter(chunk.iter().cloned()) + .map(|pool_id| fetch_ticks_for_pool(client.clone(), url.clone(), pool_id, block)) .buffer_unordered(TICK_CONCURRENCY) .try_collect() .await?; @@ -295,16 +311,11 @@ pub async fn seed( info!(total = total_ticks, "ticks seeded"); } - // ── Phase 3: set checkpoint ─────────────────────────────────────────────── - let mut tx = db.begin().await.context("begin checkpoint tx")?; - db::set_checkpoint(&mut tx, chain_id, &config.indexer.factory_address, block).await?; - tx.commit().await.context("commit checkpoint")?; - info!( block, pools = pool_ids.len(), ticks = total_ticks, "seeding complete" ); - Ok(()) + Ok(block) } From 00aae52fc1da34a3b691f44a52a3874fdffeb565 Mon Sep 17 00:00:00 2001 From: Jan P Date: Mon, 13 Apr 2026 10:30:21 +0200 Subject: [PATCH 04/80] Clean up types and conversion --- CONTEXT_DUMP.md | 79 ---------- Cargo.lock | 1 + crates/number/src/conversions.rs | 20 +++ crates/pool-indexer/Cargo.toml | 1 + crates/pool-indexer/src/api/uniswap_v3/mod.rs | 4 +- .../pool-indexer/src/api/uniswap_v3/pools.rs | 21 ++- .../pool-indexer/src/api/uniswap_v3/ticks.rs | 3 +- crates/pool-indexer/src/db/uniswap_v3.rs | 139 +++++++----------- crates/pool-indexer/src/indexer/uniswap_v3.rs | 24 +-- crates/pool-indexer/src/seeder.rs | 34 +++-- 10 files changed, 126 insertions(+), 200 deletions(-) delete mode 100644 CONTEXT_DUMP.md diff --git a/CONTEXT_DUMP.md b/CONTEXT_DUMP.md deleted file mode 100644 index d7d5f14058..0000000000 --- a/CONTEXT_DUMP.md +++ /dev/null @@ -1,79 +0,0 @@ -# Context Dump — pool-indexer test fixes - -## What was requested -Fix 4 testing issues in the new `crates/pool-indexer` crate: -1. Add unit tests for `collect_changes` (the pure log-processing function) -2. Fix `local_node_pool_indexer_pagination` — it only created 1 pool, so pagination was never actually tested -3. Improve `checkpoint_resume` — it only checked pool count, not state values -4. Add DB-level unit tests for query functions (deferred — not run by the user's command) - -## Current state: compilation error to fix - -The last `cargo nextest run` failed with: -``` -error[E0599]: no method named `get` found for struct `PgRow` in the current scope - --> crates/e2e/tests/e2e/pool_indexer.rs:399:41 -help: trait `Row` which provides `get` is implemented but not in scope - | -1 + use sqlx::Row; -``` - -### Fix already applied -`sqlx::Row` was added to the import in `pool_indexer.rs`: -```rust -sqlx::{PgPool, Row}, -``` - -The edit was accepted. Then the user interrupted the next test run. So the file should be correct — just need to re-run the tests. - -## Files changed - -### 1. `crates/pool-indexer/src/indexer/uniswap_v3.rs` -- **Extracted** `collect_changes` method body → free function `collect_log_changes(factory, logs, liq_cache, dec_cache, sym_cache) -> ChunkChanges` -- **Method** now delegates: `collect_log_changes(self.factory, logs, liq_cache, dec_cache, sym_cache)` -- **Added** `#[cfg(test)] mod tests { ... }` with 10 unit tests (all passing): - - `empty_logs_produce_empty_changes` - - `pool_created_from_factory_inserted` - - `pool_created_wrong_factory_ignored` - - `initialize_creates_full_state_with_zero_liquidity` - - `swap_creates_full_state` - - `mint_produces_correct_tick_deltas_and_liq_only` - - `mint_after_swap_updates_full_state_liquidity` - - `burn_zeroes_tick_filtered_out` - - `partial_burn_leaves_nonzero_delta` - - `pool_created_and_initialize_same_chunk` - -Note: The user added `SymbolsCache`, `token0_symbol`/`token1_symbol` to `NewPoolData`, `prefetch_symbols` method, etc. while work was ongoing. All these were synced — `collect_log_changes` takes 5 args (factory, logs, liq_cache, dec_cache, sym_cache). - -### 2. `crates/e2e/tests/e2e/pool_indexer.rs` -- **Added** `create_pool(provider, factory_addr, fee) -> Address` helper — creates + initialises a pool in an existing factory using fee as uniqueness key -- **Added** `sqlx::Row` to the use block (needed for `.get()` on PgRow) -- **Fixed `pagination` test**: now deploys 3 pools (fee 500, 3000, 10000) instead of 1 -- **Fixed `checkpoint_resume` test**: after first sync, captures `sqrt_price_x96`, `tick`, `liquidity` from DB; after restart + second sync, asserts all three values are identical - -## Verification so far -- `cargo check -p pool-indexer -p e2e` → clean -- `cargo nextest run -p pool-indexer` → 10/10 unit tests pass -- e2e tests: user interrupted before they ran; need to run: - -```bash -FORK_URL_MAINNET="https://ovh-mainnet-reth-02.nodes.batch.exchange/reth" \ - cargo nextest run -p e2e local_node_pool_indexer \ - --test-threads 1 --failure-output final --run-ignored ignored-only -``` - -## Next step -Run the command above. Fix any failures. Then run `cargo +nightly fmt -- crates/pool-indexer/src/indexer/uniswap_v3.rs crates/e2e/tests/e2e/pool_indexer.rs` when done. - -## Key file locations -- Indexer logic + tests: `crates/pool-indexer/src/indexer/uniswap_v3.rs` -- E2e tests: `crates/e2e/tests/e2e/pool_indexer.rs` -- DB layer: `crates/pool-indexer/src/db/uniswap_v3.rs` -- SQL migration: `database/sql/V110__pool_indexer_uniswap_v3.sql` -- Config: `crates/pool-indexer/src/config.rs` - -## Task list state (tasks 1-3 completed, 4 in_progress) -- #1 ✅ Unit tests for collect_changes -- #2 ✅ Pagination test fixed -- #3 ✅ checkpoint_resume state verification added -- #4 🔄 Run e2e tests + fix failures diff --git a/Cargo.lock b/Cargo.lock index 4b89515e0e..576c9fc597 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -6243,6 +6243,7 @@ dependencies = [ "futures", "mimalloc", "num", + "number", "observe", "reqwest 0.13.2", "serde", diff --git a/crates/number/src/conversions.rs b/crates/number/src/conversions.rs index efccde0a16..4d7daf084a 100644 --- a/crates/number/src/conversions.rs +++ b/crates/number/src/conversions.rs @@ -5,6 +5,8 @@ use { num::{BigInt, BigRational, BigUint, Zero, bigint::Sign, rational::Ratio}, }; +type U160 = alloy_primitives::aliases::U160; + pub fn big_decimal_to_big_uint(big_decimal: &BigDecimal) -> Option { // TODO(vkgnosis): It would be nice to avoid copying the underlying BigInt when // converting BigDecimal to anything else but the simple @@ -77,6 +79,24 @@ pub fn u256_to_big_decimal(u256: &U256) -> BigDecimal { BigDecimal::from(BigInt::from(big_uint)) } +pub fn u160_to_big_decimal(u160: &U160) -> BigDecimal { + let big_uint = BigUint::from_bytes_be(&u160.to_be_bytes::<20>()); + BigDecimal::from(BigInt::from(big_uint)) +} + +pub fn big_decimal_to_u160(big_decimal: &BigDecimal) -> Option { + let big_uint = big_decimal_to_big_uint(big_decimal)?; + big_uint_to_u160(&big_uint).ok() +} + +pub fn big_uint_to_u160(input: &BigUint) -> Result { + let bytes = input.to_bytes_be(); + ensure!(bytes.len() <= 20, "too large for U160"); + let mut buf = [0u8; 20]; + buf[20 - bytes.len()..].copy_from_slice(&bytes); + Ok(U160::from_be_bytes(buf)) +} + pub fn i512_to_big_int(i512: &I512) -> BigInt { BigInt::from_bytes_be( match i512.sign() { diff --git a/crates/pool-indexer/Cargo.toml b/crates/pool-indexer/Cargo.toml index 65f69060f3..e55e00866e 100644 --- a/crates/pool-indexer/Cargo.toml +++ b/crates/pool-indexer/Cargo.toml @@ -26,6 +26,7 @@ ethrpc = { workspace = true } futures = { workspace = true } mimalloc = { workspace = true, optional = true } num = { workspace = true } +number = { workspace = true } observe = { workspace = true } reqwest = { workspace = true, features = ["json"] } serde = { workspace = true } diff --git a/crates/pool-indexer/src/api/uniswap_v3/mod.rs b/crates/pool-indexer/src/api/uniswap_v3/mod.rs index 05a04beb2f..94623d56f8 100644 --- a/crates/pool-indexer/src/api/uniswap_v3/mod.rs +++ b/crates/pool-indexer/src/api/uniswap_v3/mod.rs @@ -1,9 +1,6 @@ pub mod pools; pub mod ticks; -pub use pools::get_pools; -pub use ticks::get_ticks; - use { alloy_primitives::Address, axum::{ @@ -11,6 +8,7 @@ use { response::{IntoResponse, Response}, }, }; +pub use {pools::get_pools, ticks::get_ticks}; pub(super) fn internal_error(err: anyhow::Error) -> Response { tracing::error!(?err, "internal error"); diff --git a/crates/pool-indexer/src/api/uniswap_v3/pools.rs b/crates/pool-indexer/src/api/uniswap_v3/pools.rs index a07c6a536b..0dd2892703 100644 --- a/crates/pool-indexer/src/api/uniswap_v3/pools.rs +++ b/crates/pool-indexer/src/api/uniswap_v3/pools.rs @@ -1,4 +1,5 @@ use { + super::{internal_error, parse_hex_address}, crate::{api::AppState, db::uniswap_v3 as db}, axum::{ extract::{Path, Query, State}, @@ -9,8 +10,6 @@ use { std::sync::Arc, }; -use super::{internal_error, parse_hex_address}; - /// Query parameters for the `/pools` endpoint. /// /// If `token0` is provided the response contains only matching pools (no @@ -19,9 +18,11 @@ use super::{internal_error, parse_hex_address}; /// a cursor-paginated list of all pools. #[derive(Deserialize)] pub struct PoolsQuery { - /// Opaque cursor returned by the previous page; omit to start from the beginning. + /// Opaque cursor returned by the previous page; omit to start from the + /// beginning. pub after: Option, - /// Maximum number of pools to return. Clamped to [1, 5000]; defaults to 1000. + /// Maximum number of pools to return. Clamped to [1, 5000]; defaults to + /// 1000. pub limit: Option, /// Filter by token symbol (partial, case-insensitive). Acts as the "base" /// token when `token1` is also supplied. Matched via SQL `LIKE` against @@ -66,7 +67,8 @@ pub struct PoolsResponse { /// Latest block that has been fully indexed. pub block_number: u64, pub pools: Vec, - /// Cursor to pass as `after` to fetch the next page; `null` on the last page. + /// Cursor to pass as `after` to fetch the next page; `null` on the last + /// page. pub next_cursor: Option, } @@ -119,7 +121,8 @@ async fn search_pools( /// Returns a cursor-paginated list of all indexed pools, ordered by address. /// Fetches `limit + 1` rows to detect whether a next page exists; the extra -/// row is stripped from the response and its address is returned as `next_cursor`. +/// row is stripped from the response and its address is returned as +/// `next_cursor`. async fn list_pools(state: &AppState, block_number: u64, query: &PoolsQuery) -> Response { let limit = query.limit.unwrap_or(1000).clamp(1, 5000); @@ -147,7 +150,11 @@ async fn list_pools(state: &AppState, block_number: u64, query: &PoolsQuery) -> let limit_usize = usize::try_from(limit).unwrap_or(usize::MAX); let has_next = rows.len() > limit_usize; - let rows = if has_next { &rows[..limit_usize] } else { &rows[..] }; + let rows = if has_next { + &rows[..limit_usize] + } else { + &rows[..] + }; let next_cursor = if has_next { rows.last().map(|r| format!("{:?}", r.address)) } else { diff --git a/crates/pool-indexer/src/api/uniswap_v3/ticks.rs b/crates/pool-indexer/src/api/uniswap_v3/ticks.rs index 7208896cca..b965ea9662 100644 --- a/crates/pool-indexer/src/api/uniswap_v3/ticks.rs +++ b/crates/pool-indexer/src/api/uniswap_v3/ticks.rs @@ -1,4 +1,5 @@ use { + super::{internal_error, parse_hex_address}, crate::{api::AppState, db::uniswap_v3 as db}, axum::{ extract::{Path, State}, @@ -9,8 +10,6 @@ use { std::sync::Arc, }; -use super::{internal_error, parse_hex_address}; - /// A single tick entry with its net liquidity. #[derive(Serialize)] pub struct TickEntry { diff --git a/crates/pool-indexer/src/db/uniswap_v3.rs b/crates/pool-indexer/src/db/uniswap_v3.rs index 7e3f3d4ea6..361ba97b28 100644 --- a/crates/pool-indexer/src/db/uniswap_v3.rs +++ b/crates/pool-indexer/src/db/uniswap_v3.rs @@ -3,49 +3,15 @@ use { alloy_primitives::Address, anyhow::{Context, Result}, bigdecimal::BigDecimal, + num::BigInt, + number::conversions::u160_to_big_decimal, sqlx::{PgPool, Postgres, Row, Transaction, postgres::PgRow}, - std::str::FromStr, }; -fn addr_bytes(a: &Address) -> Vec { - a.as_slice().to_vec() -} - fn bytes_to_addr(b: Vec) -> Result
{ Address::try_from(b.as_slice()).context("invalid address bytes") } -fn u128_to_decimal(v: u128) -> BigDecimal { - BigDecimal::from_str(&v.to_string()).expect("u128 decimal conversion") -} - -fn i128_to_decimal(v: i128) -> BigDecimal { - BigDecimal::from_str(&v.to_string()).expect("i128 decimal conversion") -} - -pub fn u160_to_decimal(v: alloy_primitives::aliases::U160) -> BigDecimal { - BigDecimal::from_str(&v.to_string()).expect("U160 decimal conversion") -} - -fn decimal_to_u128(v: BigDecimal) -> u128 { - use num::ToPrimitive; - v.to_u128().expect("decimal fits in u128") -} - -fn decimal_to_i128(v: BigDecimal) -> i128 { - use num::ToPrimitive; - v.to_i128().expect("decimal fits in i128") -} - -/// Converts a `BigDecimal` to `U160`. Normalises the scale to 0 first to -/// prevent exponential-notation strings (e.g. "1E+28") from failing to parse. -pub fn decimal_to_u160(v: BigDecimal) -> alloy_primitives::aliases::U160 { - v.with_scale(0) - .to_string() - .parse::() - .expect("decimal fits in U160") -} - pub async fn get_checkpoint( pool: &PgPool, chain_id: u64, @@ -55,7 +21,7 @@ pub async fn get_checkpoint( "SELECT block_number FROM pool_indexer_checkpoints WHERE chain_id = $1 AND contract = $2", ) .bind(chain_id.cast_signed()) - .bind(addr_bytes(contract)) + .bind(contract.as_slice()) .fetch_optional(pool) .await .context("get_checkpoint")?; @@ -75,7 +41,7 @@ pub async fn set_checkpoint( ON CONFLICT (chain_id, contract) DO UPDATE SET block_number = EXCLUDED.block_number", ) .bind(chain_id.cast_signed()) - .bind(addr_bytes(contract)) + .bind(contract.as_slice()) .bind(block_number.cast_signed()) .execute(&mut **tx) .await @@ -103,9 +69,9 @@ pub async fn insert_pool( ON CONFLICT (chain_id, address) DO NOTHING", ) .bind(chain_id.cast_signed()) - .bind(addr_bytes(address)) - .bind(addr_bytes(token0)) - .bind(addr_bytes(token1)) + .bind(address.as_slice()) + .bind(token0.as_slice()) + .bind(token1.as_slice()) .bind(fee.cast_signed()) .bind(token0_decimals.map(i16::from)) .bind(token1_decimals.map(i16::from)) @@ -137,10 +103,10 @@ pub async fn upsert_pool_state( tick = EXCLUDED.tick", ) .bind(chain_id.cast_signed()) - .bind(addr_bytes(pool_address)) + .bind(pool_address.as_slice()) .bind(block_number.cast_signed()) - .bind(u160_to_decimal(sqrt_price_x96)) - .bind(u128_to_decimal(liquidity)) + .bind(u160_to_big_decimal(&sqrt_price_x96)) + .bind(BigDecimal::from(BigInt::from(liquidity))) .bind(tick) .execute(&mut **tx) .await @@ -161,8 +127,8 @@ pub async fn update_pool_liquidity( WHERE chain_id = $1 AND pool_address = $2", ) .bind(chain_id.cast_signed()) - .bind(addr_bytes(pool_address)) - .bind(u128_to_decimal(liquidity)) + .bind(pool_address.as_slice()) + .bind(BigDecimal::from(BigInt::from(liquidity))) .bind(block_number.cast_signed()) .execute(&mut **tx) .await @@ -179,8 +145,6 @@ pub async fn update_tick_liquidity_net( tick_idx: i32, delta: i128, ) -> Result<()> { - let pool_addr_bytes = addr_bytes(pool_address); - sqlx::query( "INSERT INTO uniswap_v3_ticks (chain_id, pool_address, tick_idx, liquidity_net) SELECT $1, $2, $3, $4 @@ -189,9 +153,9 @@ pub async fn update_tick_liquidity_net( SET liquidity_net = uniswap_v3_ticks.liquidity_net + EXCLUDED.liquidity_net", ) .bind(chain_id.cast_signed()) - .bind(pool_addr_bytes.clone()) + .bind(pool_address.as_slice()) .bind(tick_idx) - .bind(i128_to_decimal(delta)) + .bind(BigDecimal::from(BigInt::from(delta))) .execute(&mut **tx) .await .context("update_tick_liquidity_net upsert")?; @@ -201,7 +165,7 @@ pub async fn update_tick_liquidity_net( WHERE chain_id = $1 AND pool_address = $2 AND tick_idx = $3 AND liquidity_net = 0", ) .bind(chain_id.cast_signed()) - .bind(pool_addr_bytes) + .bind(pool_address.as_slice()) .bind(tick_idx) .execute(&mut **tx) .await @@ -218,9 +182,9 @@ pub async fn batch_insert_pools( if pools.is_empty() { return Ok(()); } - let addresses: Vec> = pools.iter().map(|p| addr_bytes(&p.address)).collect(); - let token0s: Vec> = pools.iter().map(|p| addr_bytes(&p.token0)).collect(); - let token1s: Vec> = pools.iter().map(|p| addr_bytes(&p.token1)).collect(); + let addresses: Vec<&[u8]> = pools.iter().map(|p| p.address.as_slice()).collect(); + let token0s: Vec<&[u8]> = pools.iter().map(|p| p.token0.as_slice()).collect(); + let token1s: Vec<&[u8]> = pools.iter().map(|p| p.token1.as_slice()).collect(); let fees: Vec = pools.iter().map(|p| p.fee.cast_signed()).collect(); let t0_decimals: Vec> = pools .iter() @@ -271,18 +235,18 @@ pub async fn batch_upsert_pool_states( if states.is_empty() { return Ok(()); } - let addresses: Vec> = states.iter().map(|s| addr_bytes(&s.pool_address)).collect(); + let addresses: Vec<&[u8]> = states.iter().map(|s| s.pool_address.as_slice()).collect(); let block_numbers: Vec = states .iter() .map(|s| s.block_number.cast_signed()) .collect(); let sqrt_prices: Vec = states .iter() - .map(|s| u160_to_decimal(s.sqrt_price_x96)) + .map(|s| u160_to_big_decimal(&s.sqrt_price_x96)) .collect(); let liquidities: Vec = states .iter() - .map(|s| u128_to_decimal(s.liquidity)) + .map(|s| BigDecimal::from(BigInt::from(s.liquidity))) .collect(); let ticks: Vec = states.iter().map(|s| s.tick).collect(); @@ -324,13 +288,10 @@ pub async fn batch_update_pool_liquidity( if updates.is_empty() { return Ok(()); } - let addresses: Vec> = updates - .iter() - .map(|u| addr_bytes(&u.pool_address)) - .collect(); + let addresses: Vec<&[u8]> = updates.iter().map(|u| u.pool_address.as_slice()).collect(); let liquidities: Vec = updates .iter() - .map(|u| u128_to_decimal(u.liquidity)) + .map(|u| BigDecimal::from(BigInt::from(u.liquidity))) .collect(); let block_numbers: Vec = updates .iter() @@ -366,9 +327,12 @@ pub async fn batch_update_ticks( if deltas.is_empty() { return Ok(()); } - let addresses: Vec> = deltas.iter().map(|d| addr_bytes(&d.pool_address)).collect(); + let addresses: Vec<&[u8]> = deltas.iter().map(|d| d.pool_address.as_slice()).collect(); let tick_idxs: Vec = deltas.iter().map(|d| d.tick_idx).collect(); - let delta_values: Vec = deltas.iter().map(|d| i128_to_decimal(d.delta)).collect(); + let delta_values: Vec = deltas + .iter() + .map(|d| BigDecimal::from(BigInt::from(d.delta))) + .collect(); sqlx::query( "WITH input AS ( @@ -413,9 +377,12 @@ pub async fn batch_seed_ticks( if ticks.is_empty() { return Ok(()); } - let addresses: Vec> = ticks.iter().map(|d| addr_bytes(&d.pool_address)).collect(); + let addresses: Vec<&[u8]> = ticks.iter().map(|d| d.pool_address.as_slice()).collect(); let tick_idxs: Vec = ticks.iter().map(|d| d.tick_idx).collect(); - let values: Vec = ticks.iter().map(|d| i128_to_decimal(d.delta)).collect(); + let values: Vec = ticks + .iter() + .map(|d| BigDecimal::from(BigInt::from(d.delta))) + .collect(); sqlx::query( "WITH input AS ( @@ -463,8 +430,8 @@ pub struct PoolRow { pub token1_decimals: Option, pub token0_symbol: Option, pub token1_symbol: Option, - pub sqrt_price_x96: alloy_primitives::aliases::U160, - pub liquidity: u128, + pub sqrt_price_x96: BigDecimal, + pub liquidity: BigDecimal, pub tick: i32, } @@ -482,8 +449,8 @@ fn map_pool_row(r: PgRow) -> Result { .map(|d| u8::try_from(d).unwrap_or(0)), token0_symbol: r.get("token0_symbol"), token1_symbol: r.get("token1_symbol"), - sqrt_price_x96: decimal_to_u160(r.get("sqrt_price_x96")), - liquidity: decimal_to_u128(r.get("liquidity")), + sqrt_price_x96: r.get("sqrt_price_x96"), + liquidity: r.get("liquidity"), tick: r.get("tick"), }) } @@ -545,34 +512,39 @@ pub async fn get_pools_after( pub struct TickRow { pub tick_idx: i32, - pub liquidity_net: i128, + pub liquidity_net: BigDecimal, } +/// Maximum number of ticks returned per pool query (safety bound). +const MAX_TICKS_PER_POOL: i64 = 10_000; + pub async fn get_ticks( pool: &PgPool, chain_id: u64, pool_address: &Address, ) -> Result> { - let rows = sqlx::query( + sqlx::query( "SELECT tick_idx, liquidity_net FROM uniswap_v3_ticks WHERE chain_id = $1 AND pool_address = $2 - ORDER BY tick_idx", + ORDER BY tick_idx + LIMIT $3", ) .bind(chain_id.cast_signed()) - .bind(addr_bytes(pool_address)) + .bind(pool_address.as_slice()) + .bind(MAX_TICKS_PER_POOL) .fetch_all(pool) .await - .context("get_ticks")?; - - Ok(rows - .into_iter() - .map(|r| TickRow { + .context("get_ticks")? + .into_iter() + .map(|r| { + Ok(TickRow { tick_idx: r.get("tick_idx"), - liquidity_net: decimal_to_i128(r.get("liquidity_net")), + liquidity_net: r.get("liquidity_net"), }) - .collect()) + }) + .collect() } /// Searches pools by a single token symbol (partial, case-insensitive), ordered @@ -669,7 +641,6 @@ pub async fn set_token_symbol( token: &Address, symbol: &str, ) -> Result<()> { - let token_bytes = addr_bytes(token); let mut tx = pool.begin().await.context("set_token_symbol begin")?; sqlx::query( @@ -677,7 +648,7 @@ pub async fn set_token_symbol( WHERE chain_id = $1 AND token0 = $2 AND token0_symbol IS NULL", ) .bind(chain_id.cast_signed()) - .bind(&token_bytes) + .bind(token.as_slice()) .bind(symbol) .execute(&mut *tx) .await @@ -688,7 +659,7 @@ pub async fn set_token_symbol( WHERE chain_id = $1 AND token1 = $2 AND token1_symbol IS NULL", ) .bind(chain_id.cast_signed()) - .bind(&token_bytes) + .bind(token.as_slice()) .bind(symbol) .execute(&mut *tx) .await diff --git a/crates/pool-indexer/src/indexer/uniswap_v3.rs b/crates/pool-indexer/src/indexer/uniswap_v3.rs index 7d0c97b7ab..349f23a2ad 100644 --- a/crates/pool-indexer/src/indexer/uniswap_v3.rs +++ b/crates/pool-indexer/src/indexer/uniswap_v3.rs @@ -7,10 +7,10 @@ use { sol_types::SolEvent, }, anyhow::{Context, Result}, - contracts::alloy::{ - ERC20::ERC20, + contracts::{ + ERC20, IUniswapV3Factory::IUniswapV3Factory::PoolCreated, - UniswapV3Pool::UniswapV3Pool::{self, Burn, Initialize, Mint, Swap}, + UniswapV3Pool::UniswapV3Pool::{Burn, Initialize, Mint, Swap}, }, ethrpc::AlloyProvider, futures::{StreamExt, TryStreamExt}, @@ -358,7 +358,7 @@ fn signed24_to_i32(v: alloy::primitives::aliases::I24) -> i32 { } async fn fetch_pool_liquidity(provider: &AlloyProvider, pool: Address, block: u64) -> Option { - UniswapV3Pool::new(pool, provider.clone()) + contracts::UniswapV3Pool::Instance::new(pool, provider.clone()) .liquidity() .block(block.into()) .call() @@ -367,7 +367,7 @@ async fn fetch_pool_liquidity(provider: &AlloyProvider, pool: Address, block: u6 } async fn fetch_decimals(provider: &AlloyProvider, token: Address) -> Option { - ERC20::new(token, provider.clone()) + ERC20::Instance::new(token, provider.clone()) .decimals() .call() .await @@ -423,7 +423,7 @@ async fn backfill_symbols(provider: AlloyProvider, db: sqlx::PgPool, chain_id: u } async fn fetch_symbol(provider: &AlloyProvider, token: Address) -> Option { - let sym = ERC20::new(token, provider.clone()) + let sym = ERC20::Instance::new(token, provider.clone()) .symbol() .call() .await @@ -581,7 +581,7 @@ impl LogAccumulator { let e = &decoded.data; let pool = log.address(); let block = log.block_number.unwrap_or(0); - let amount = e.amount.cast_signed() as i128; + let amount = e.amount.cast_signed(); *self .tick_deltas .entry((pool, signed24_to_i32(e.tickLower))) @@ -602,7 +602,7 @@ impl LogAccumulator { let e = &decoded.data; let pool = log.address(); let block = log.block_number.unwrap_or(0); - let amount = e.amount.cast_signed() as i128; + let amount = e.amount.cast_signed(); *self .tick_deltas .entry((pool, signed24_to_i32(e.tickLower))) @@ -696,7 +696,7 @@ mod tests { }, sol_types::SolEvent, }, - contracts::alloy::{ + contracts::{ IUniswapV3Factory::IUniswapV3Factory::PoolCreated, UniswapV3Pool::UniswapV3Pool::{Burn, Initialize, Mint, Swap}, }, @@ -857,8 +857,8 @@ mod tests { assert_eq!(c.tick_deltas.len(), 2); let lower = c.tick_deltas.iter().find(|d| d.tick_idx == -100).unwrap(); let upper = c.tick_deltas.iter().find(|d| d.tick_idx == 100).unwrap(); - assert_eq!(lower.delta, amount as i128); - assert_eq!(upper.delta, -(amount as i128)); + assert_eq!(lower.delta, amount.cast_signed()); + assert_eq!(upper.delta, -amount.cast_signed()); // No prior full state → goes into liq_only assert_eq!(c.liquidity_updates.len(), 1); @@ -967,7 +967,7 @@ mod tests { &Default::default(), ); - let expected = (mint_amount - burn_amount) as i128; + let expected = (mint_amount - burn_amount).cast_signed(); let lower = c.tick_deltas.iter().find(|d| d.tick_idx == -100).unwrap(); let upper = c.tick_deltas.iter().find(|d| d.tick_idx == 100).unwrap(); assert_eq!(lower.delta, expected); diff --git a/crates/pool-indexer/src/seeder.rs b/crates/pool-indexer/src/seeder.rs index 66f53ea0e5..cbe714dc5c 100644 --- a/crates/pool-indexer/src/seeder.rs +++ b/crates/pool-indexer/src/seeder.rs @@ -24,6 +24,7 @@ use { serde::Deserialize, serde_json::{Value, json}, sqlx::PgPool, + std::time::Duration, tracing::info, }; @@ -31,6 +32,11 @@ use { const PAGE_SIZE: usize = 1000; /// Maximum number of pools whose ticks are fetched concurrently. const TICK_CONCURRENCY: usize = 50; +/// Timeout for individual subgraph HTTP requests. +const SUBGRAPH_REQUEST_TIMEOUT: Duration = Duration::from_secs(30); +/// Cursor value below the minimum Uniswap V3 tick index (-887272), ensuring the +/// first GraphQL page includes the lowest possible tick. +const TICK_IDX_CURSOR_START: i64 = -887_273; #[derive(Deserialize)] struct GqlResponse { @@ -172,8 +178,7 @@ async fn fetch_ticks_for_pool( let pool_addr: Address = pool_id.parse().context("parse pool address")?; let mut ticks = Vec::new(); - // Start below minimum Uniswap V3 tick (-887272) - let mut cursor: i64 = -887_273; + let mut cursor: i64 = TICK_IDX_CURSOR_START; loop { let page: TicksPage = gql( @@ -211,7 +216,10 @@ pub async fn seed( subgraph_url: &str, block: Option, ) -> Result { - let client = Client::new(); + let client = Client::builder() + .timeout(SUBGRAPH_REQUEST_TIMEOUT) + .build() + .context("build HTTP client")?; let block = match block { Some(b) => b, @@ -248,16 +256,16 @@ pub async fn seed( .context("parse createdAtBlockNumber")?, }); - if let Some(tick_str) = &p.tick { - if p.sqrt_price != "0" { - pool_states.push(PoolStateData { - pool_address: address, - block_number: block, - sqrt_price_x96: p.sqrt_price.parse::().context("parse sqrtPrice")?, - liquidity: p.liquidity.parse().context("parse liquidity")?, - tick: tick_str.parse().context("parse tick")?, - }); - } + if let Some(tick_str) = &p.tick + && p.sqrt_price != "0" + { + pool_states.push(PoolStateData { + pool_address: address, + block_number: block, + sqrt_price_x96: p.sqrt_price.parse::().context("parse sqrtPrice")?, + liquidity: p.liquidity.parse().context("parse liquidity")?, + tick: tick_str.parse().context("parse tick")?, + }); } pool_ids.push(p.id.clone()); From 1d2279a23408b240e77d03877542e5a2c6885fd6 Mon Sep 17 00:00:00 2001 From: Jan P Date: Mon, 13 Apr 2026 14:57:06 +0200 Subject: [PATCH 05/80] Refactoring --- Cargo.lock | 24 + contracts/artifacts/MockUniswapV3Factory.json | 78 + contracts/artifacts/MockUniswapV3Pool.json | 194 ++ .../generated/contracts-facade/Cargo.toml | 2 + .../generated/contracts-facade/src/lib.rs | 2 + .../mockuniswapv3factory/Cargo.toml | 19 + .../mockuniswapv3factory/src/lib.rs | 851 +++++++ .../mockuniswapv3pool/Cargo.toml | 19 + .../mockuniswapv3pool/src/lib.rs | 2105 +++++++++++++++++ contracts/solidity/Makefile | 2 +- .../solidity/tests/MockUniswapV3Factory.sol | 32 + .../solidity/tests/MockUniswapV3Pool.sol | 45 + contracts/src/main.rs | 2 + crates/e2e/tests/e2e/pool_indexer.rs | 263 +- crates/pool-indexer/Cargo.toml | 2 +- crates/pool-indexer/src/api/mod.rs | 13 +- crates/pool-indexer/src/api/uniswap_v3/mod.rs | 8 + .../pool-indexer/src/api/uniswap_v3/pools.rs | 95 +- .../pool-indexer/src/api/uniswap_v3/ticks.rs | 39 +- crates/pool-indexer/src/arguments.rs | 20 +- crates/pool-indexer/src/config.rs | 66 +- crates/pool-indexer/src/db/uniswap_v3.rs | 64 +- crates/pool-indexer/src/indexer/uniswap_v3.rs | 48 +- crates/pool-indexer/src/run.rs | 104 +- 24 files changed, 3731 insertions(+), 366 deletions(-) create mode 100644 contracts/artifacts/MockUniswapV3Factory.json create mode 100644 contracts/artifacts/MockUniswapV3Pool.json create mode 100644 contracts/generated/contracts-generated/mockuniswapv3factory/Cargo.toml create mode 100644 contracts/generated/contracts-generated/mockuniswapv3factory/src/lib.rs create mode 100644 contracts/generated/contracts-generated/mockuniswapv3pool/Cargo.toml create mode 100644 contracts/generated/contracts-generated/mockuniswapv3pool/src/lib.rs create mode 100644 contracts/solidity/tests/MockUniswapV3Factory.sol create mode 100644 contracts/solidity/tests/MockUniswapV3Pool.sol diff --git a/Cargo.lock b/Cargo.lock index 576c9fc597..1f6e4ee9cd 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2543,6 +2543,8 @@ dependencies = [ "cow-contract-iuniswapv3factory", "cow-contract-izeroex", "cow-contract-liquoricesettlement", + "cow-contract-mockuniswapv3factory", + "cow-contract-mockuniswapv3pool", "cow-contract-nonstandarderc20balances", "cow-contract-pancakerouter", "cow-contract-permit2", @@ -3280,6 +3282,28 @@ dependencies = [ "anyhow", ] +[[package]] +name = "cow-contract-mockuniswapv3factory" +version = "0.1.0" +dependencies = [ + "alloy-contract", + "alloy-primitives", + "alloy-provider", + "alloy-sol-types", + "anyhow", +] + +[[package]] +name = "cow-contract-mockuniswapv3pool" +version = "0.1.0" +dependencies = [ + "alloy-contract", + "alloy-primitives", + "alloy-provider", + "alloy-sol-types", + "anyhow", +] + [[package]] name = "cow-contract-nonstandarderc20balances" version = "0.1.0" diff --git a/contracts/artifacts/MockUniswapV3Factory.json b/contracts/artifacts/MockUniswapV3Factory.json new file mode 100644 index 0000000000..a8db8c45bf --- /dev/null +++ b/contracts/artifacts/MockUniswapV3Factory.json @@ -0,0 +1,78 @@ +{ + "abi": [ + { + "type": "function", + "name": "createPool", + "inputs": [ + { + "name": "tokenA", + "type": "address", + "internalType": "address" + }, + { + "name": "tokenB", + "type": "address", + "internalType": "address" + }, + { + "name": "_fee", + "type": "uint24", + "internalType": "uint24" + } + ], + "outputs": [ + { + "name": "pool", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "nonpayable" + }, + { + "type": "event", + "name": "PoolCreated", + "inputs": [ + { + "name": "token0", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "token1", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "fee", + "type": "uint24", + "indexed": true, + "internalType": "uint24" + }, + { + "name": "tickSpacing", + "type": "int24", + "indexed": false, + "internalType": "int24" + }, + { + "name": "pool", + "type": "address", + "indexed": false, + "internalType": "address" + } + ], + "anonymous": false + } + ], + "bytecode": "0x6080604052348015600e575f5ffd5b50610b1e8061001c5f395ff3fe608060405234801561000f575f5ffd5b5060043610610029575f3560e01c8063a16712951461002d575b5f5ffd5b610047600480360381019061004291906101f7565b61005d565b6040516100549190610256565b60405180910390f35b5f5f5f8473ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff161061009a57848661009d565b85855b915091505f8282866040516100b190610154565b6100bd9392919061027e565b604051809103905ff0801580156100d6573d5f5f3e3d5ffd5b5090508093508462ffffff168273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167f783cca1c0412dd0d695e784568c96da2e9c22ff989357a2e8b1d9b2b4e6b7118600a886040516101429291906102ce565b60405180910390a45050509392505050565b6107f3806102f683390190565b5f5ffd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f61018e82610165565b9050919050565b61019e81610184565b81146101a8575f5ffd5b50565b5f813590506101b981610195565b92915050565b5f62ffffff82169050919050565b6101d6816101bf565b81146101e0575f5ffd5b50565b5f813590506101f1816101cd565b92915050565b5f5f5f6060848603121561020e5761020d610161565b5b5f61021b868287016101ab565b935050602061022c868287016101ab565b925050604061023d868287016101e3565b9150509250925092565b61025081610184565b82525050565b5f6020820190506102695f830184610247565b92915050565b610278816101bf565b82525050565b5f6060820190506102915f830186610247565b61029e6020830185610247565b6102ab604083018461026f565b949350505050565b5f8160020b9050919050565b6102c8816102b3565b82525050565b5f6040820190506102e15f8301856102bf565b6102ee6020830184610247565b939250505056fe60e060405234801561000f575f5ffd5b506040516107f33803806107f383398181016040528101906100319190610149565b8273ffffffffffffffffffffffffffffffffffffffff1660808173ffffffffffffffffffffffffffffffffffffffff16815250508173ffffffffffffffffffffffffffffffffffffffff1660a08173ffffffffffffffffffffffffffffffffffffffff16815250508062ffffff1660c08162ffffff1681525050505050610199565b5f5ffd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f6100e0826100b7565b9050919050565b6100f0816100d6565b81146100fa575f5ffd5b50565b5f8151905061010b816100e7565b92915050565b5f62ffffff82169050919050565b61012881610111565b8114610132575f5ffd5b50565b5f815190506101438161011f565b92915050565b5f5f5f606084860312156101605761015f6100b3565b5b5f61016d868287016100fd565b935050602061017e868287016100fd565b925050604061018f86828701610135565b9150509250925092565b60805160a05160c0516106306101c35f395f61017e01525f61015a01525f61011601526106305ff3fe608060405234801561000f575f5ffd5b5060043610610060575f3560e01c80630dfe1681146100645780631a68650214610082578063d21220a7146100a0578063ddca3f43146100be578063efe27fa3146100dc578063f637731d146100f8575b5f5ffd5b61006c610114565b60405161007991906102de565b60405180910390f35b61008a610138565b6040516100979190610321565b60405180910390f35b6100a8610158565b6040516100b591906102de565b60405180910390f35b6100c661017c565b6040516100d39190610357565b60405180910390f35b6100f660048036038101906100f191906103fe565b6101a0565b005b610112600480360381019061010d919061048c565b610263565b005b7f000000000000000000000000000000000000000000000000000000000000000081565b5f5f9054906101000a90046fffffffffffffffffffffffffffffffff1681565b7f000000000000000000000000000000000000000000000000000000000000000081565b7f000000000000000000000000000000000000000000000000000000000000000081565b805f5f8282829054906101000a90046fffffffffffffffffffffffffffffffff166101cb91906104e4565b92506101000a8154816fffffffffffffffffffffffffffffffff02191690836fffffffffffffffffffffffffffffffff1602179055508160020b8360020b8573ffffffffffffffffffffffffffffffffffffffff167f7a53080ba414158be7ec69b987b5fb7d07dee101fe85488f0853ae16239d0bde33855f5f6040516102559493929190610572565b60405180910390a450505050565b7f98636036cb66a9c19a37435efc1e90142190214e8abeb821bdba3f2990dd4c95815f6040516102949291906105d3565b60405180910390a150565b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f6102c88261029f565b9050919050565b6102d8816102be565b82525050565b5f6020820190506102f15f8301846102cf565b92915050565b5f6fffffffffffffffffffffffffffffffff82169050919050565b61031b816102f7565b82525050565b5f6020820190506103345f830184610312565b92915050565b5f62ffffff82169050919050565b6103518161033a565b82525050565b5f60208201905061036a5f830184610348565b92915050565b5f5ffd5b61037d816102be565b8114610387575f5ffd5b50565b5f8135905061039881610374565b92915050565b5f8160020b9050919050565b6103b38161039e565b81146103bd575f5ffd5b50565b5f813590506103ce816103aa565b92915050565b6103dd816102f7565b81146103e7575f5ffd5b50565b5f813590506103f8816103d4565b92915050565b5f5f5f5f6080858703121561041657610415610370565b5b5f6104238782880161038a565b9450506020610434878288016103c0565b9350506040610445878288016103c0565b9250506060610456878288016103ea565b91505092959194509250565b61046b8161029f565b8114610475575f5ffd5b50565b5f8135905061048681610462565b92915050565b5f602082840312156104a1576104a0610370565b5b5f6104ae84828501610478565b91505092915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f6104ee826102f7565b91506104f9836102f7565b925082820190506fffffffffffffffffffffffffffffffff811115610521576105206104b7565b5b92915050565b5f819050919050565b5f819050919050565b5f819050919050565b5f61055c61055761055284610527565b610539565b610530565b9050919050565b61056c81610542565b82525050565b5f6080820190506105855f8301876102cf565b6105926020830186610312565b61059f6040830185610563565b6105ac6060830184610563565b95945050505050565b6105be8161029f565b82525050565b6105cd8161039e565b82525050565b5f6040820190506105e65f8301856105b5565b6105f360208301846105c4565b939250505056fea2646970667358221220ed63fe890f9816856ae5c5b059064c95931328b3a4d4e05fc390c02f872495f264736f6c634300081e0033a264697066735822122053da3887987836adfd577d8e6d98a266666bfa2a180305300aae19dbb8cd494f64736f6c634300081e0033", + "deployedBytecode": "0x608060405234801561000f575f5ffd5b5060043610610029575f3560e01c8063a16712951461002d575b5f5ffd5b610047600480360381019061004291906101f7565b61005d565b6040516100549190610256565b60405180910390f35b5f5f5f8473ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff161061009a57848661009d565b85855b915091505f8282866040516100b190610154565b6100bd9392919061027e565b604051809103905ff0801580156100d6573d5f5f3e3d5ffd5b5090508093508462ffffff168273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167f783cca1c0412dd0d695e784568c96da2e9c22ff989357a2e8b1d9b2b4e6b7118600a886040516101429291906102ce565b60405180910390a45050509392505050565b6107f3806102f683390190565b5f5ffd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f61018e82610165565b9050919050565b61019e81610184565b81146101a8575f5ffd5b50565b5f813590506101b981610195565b92915050565b5f62ffffff82169050919050565b6101d6816101bf565b81146101e0575f5ffd5b50565b5f813590506101f1816101cd565b92915050565b5f5f5f6060848603121561020e5761020d610161565b5b5f61021b868287016101ab565b935050602061022c868287016101ab565b925050604061023d868287016101e3565b9150509250925092565b61025081610184565b82525050565b5f6020820190506102695f830184610247565b92915050565b610278816101bf565b82525050565b5f6060820190506102915f830186610247565b61029e6020830185610247565b6102ab604083018461026f565b949350505050565b5f8160020b9050919050565b6102c8816102b3565b82525050565b5f6040820190506102e15f8301856102bf565b6102ee6020830184610247565b939250505056fe60e060405234801561000f575f5ffd5b506040516107f33803806107f383398181016040528101906100319190610149565b8273ffffffffffffffffffffffffffffffffffffffff1660808173ffffffffffffffffffffffffffffffffffffffff16815250508173ffffffffffffffffffffffffffffffffffffffff1660a08173ffffffffffffffffffffffffffffffffffffffff16815250508062ffffff1660c08162ffffff1681525050505050610199565b5f5ffd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f6100e0826100b7565b9050919050565b6100f0816100d6565b81146100fa575f5ffd5b50565b5f8151905061010b816100e7565b92915050565b5f62ffffff82169050919050565b61012881610111565b8114610132575f5ffd5b50565b5f815190506101438161011f565b92915050565b5f5f5f606084860312156101605761015f6100b3565b5b5f61016d868287016100fd565b935050602061017e868287016100fd565b925050604061018f86828701610135565b9150509250925092565b60805160a05160c0516106306101c35f395f61017e01525f61015a01525f61011601526106305ff3fe608060405234801561000f575f5ffd5b5060043610610060575f3560e01c80630dfe1681146100645780631a68650214610082578063d21220a7146100a0578063ddca3f43146100be578063efe27fa3146100dc578063f637731d146100f8575b5f5ffd5b61006c610114565b60405161007991906102de565b60405180910390f35b61008a610138565b6040516100979190610321565b60405180910390f35b6100a8610158565b6040516100b591906102de565b60405180910390f35b6100c661017c565b6040516100d39190610357565b60405180910390f35b6100f660048036038101906100f191906103fe565b6101a0565b005b610112600480360381019061010d919061048c565b610263565b005b7f000000000000000000000000000000000000000000000000000000000000000081565b5f5f9054906101000a90046fffffffffffffffffffffffffffffffff1681565b7f000000000000000000000000000000000000000000000000000000000000000081565b7f000000000000000000000000000000000000000000000000000000000000000081565b805f5f8282829054906101000a90046fffffffffffffffffffffffffffffffff166101cb91906104e4565b92506101000a8154816fffffffffffffffffffffffffffffffff02191690836fffffffffffffffffffffffffffffffff1602179055508160020b8360020b8573ffffffffffffffffffffffffffffffffffffffff167f7a53080ba414158be7ec69b987b5fb7d07dee101fe85488f0853ae16239d0bde33855f5f6040516102559493929190610572565b60405180910390a450505050565b7f98636036cb66a9c19a37435efc1e90142190214e8abeb821bdba3f2990dd4c95815f6040516102949291906105d3565b60405180910390a150565b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f6102c88261029f565b9050919050565b6102d8816102be565b82525050565b5f6020820190506102f15f8301846102cf565b92915050565b5f6fffffffffffffffffffffffffffffffff82169050919050565b61031b816102f7565b82525050565b5f6020820190506103345f830184610312565b92915050565b5f62ffffff82169050919050565b6103518161033a565b82525050565b5f60208201905061036a5f830184610348565b92915050565b5f5ffd5b61037d816102be565b8114610387575f5ffd5b50565b5f8135905061039881610374565b92915050565b5f8160020b9050919050565b6103b38161039e565b81146103bd575f5ffd5b50565b5f813590506103ce816103aa565b92915050565b6103dd816102f7565b81146103e7575f5ffd5b50565b5f813590506103f8816103d4565b92915050565b5f5f5f5f6080858703121561041657610415610370565b5b5f6104238782880161038a565b9450506020610434878288016103c0565b9350506040610445878288016103c0565b9250506060610456878288016103ea565b91505092959194509250565b61046b8161029f565b8114610475575f5ffd5b50565b5f8135905061048681610462565b92915050565b5f602082840312156104a1576104a0610370565b5b5f6104ae84828501610478565b91505092915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f6104ee826102f7565b91506104f9836102f7565b925082820190506fffffffffffffffffffffffffffffffff811115610521576105206104b7565b5b92915050565b5f819050919050565b5f819050919050565b5f819050919050565b5f61055c61055761055284610527565b610539565b610530565b9050919050565b61056c81610542565b82525050565b5f6080820190506105855f8301876102cf565b6105926020830186610312565b61059f6040830185610563565b6105ac6060830184610563565b95945050505050565b6105be8161029f565b82525050565b6105cd8161039e565b82525050565b5f6040820190506105e65f8301856105b5565b6105f360208301846105c4565b939250505056fea2646970667358221220ed63fe890f9816856ae5c5b059064c95931328b3a4d4e05fc390c02f872495f264736f6c634300081e0033a264697066735822122053da3887987836adfd577d8e6d98a266666bfa2a180305300aae19dbb8cd494f64736f6c634300081e0033", + "devdoc": { + "methods": {} + }, + "userdoc": { + "methods": {} + } +} diff --git a/contracts/artifacts/MockUniswapV3Pool.json b/contracts/artifacts/MockUniswapV3Pool.json new file mode 100644 index 0000000000..845fcfc370 --- /dev/null +++ b/contracts/artifacts/MockUniswapV3Pool.json @@ -0,0 +1,194 @@ +{ + "abi": [ + { + "type": "constructor", + "inputs": [ + { + "name": "_token0", + "type": "address", + "internalType": "address" + }, + { + "name": "_token1", + "type": "address", + "internalType": "address" + }, + { + "name": "_fee", + "type": "uint24", + "internalType": "uint24" + } + ], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "fee", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint24", + "internalType": "uint24" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "initialize", + "inputs": [ + { + "name": "sqrtPriceX96", + "type": "uint160", + "internalType": "uint160" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "liquidity", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint128", + "internalType": "uint128" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "mockMint", + "inputs": [ + { + "name": "owner", + "type": "address", + "internalType": "address" + }, + { + "name": "tickLower", + "type": "int24", + "internalType": "int24" + }, + { + "name": "tickUpper", + "type": "int24", + "internalType": "int24" + }, + { + "name": "amount", + "type": "uint128", + "internalType": "uint128" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "token0", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "token1", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "event", + "name": "Initialize", + "inputs": [ + { + "name": "sqrtPriceX96", + "type": "uint160", + "indexed": false, + "internalType": "uint160" + }, + { + "name": "tick", + "type": "int24", + "indexed": false, + "internalType": "int24" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "Mint", + "inputs": [ + { + "name": "sender", + "type": "address", + "indexed": false, + "internalType": "address" + }, + { + "name": "owner", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "tickLower", + "type": "int24", + "indexed": true, + "internalType": "int24" + }, + { + "name": "tickUpper", + "type": "int24", + "indexed": true, + "internalType": "int24" + }, + { + "name": "amount", + "type": "uint128", + "indexed": false, + "internalType": "uint128" + }, + { + "name": "amount0", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "amount1", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + } + ], + "bytecode": "0x60e060405234801561000f575f5ffd5b506040516107f33803806107f383398181016040528101906100319190610149565b8273ffffffffffffffffffffffffffffffffffffffff1660808173ffffffffffffffffffffffffffffffffffffffff16815250508173ffffffffffffffffffffffffffffffffffffffff1660a08173ffffffffffffffffffffffffffffffffffffffff16815250508062ffffff1660c08162ffffff1681525050505050610199565b5f5ffd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f6100e0826100b7565b9050919050565b6100f0816100d6565b81146100fa575f5ffd5b50565b5f8151905061010b816100e7565b92915050565b5f62ffffff82169050919050565b61012881610111565b8114610132575f5ffd5b50565b5f815190506101438161011f565b92915050565b5f5f5f606084860312156101605761015f6100b3565b5b5f61016d868287016100fd565b935050602061017e868287016100fd565b925050604061018f86828701610135565b9150509250925092565b60805160a05160c0516106306101c35f395f61017e01525f61015a01525f61011601526106305ff3fe608060405234801561000f575f5ffd5b5060043610610060575f3560e01c80630dfe1681146100645780631a68650214610082578063d21220a7146100a0578063ddca3f43146100be578063efe27fa3146100dc578063f637731d146100f8575b5f5ffd5b61006c610114565b60405161007991906102de565b60405180910390f35b61008a610138565b6040516100979190610321565b60405180910390f35b6100a8610158565b6040516100b591906102de565b60405180910390f35b6100c661017c565b6040516100d39190610357565b60405180910390f35b6100f660048036038101906100f191906103fe565b6101a0565b005b610112600480360381019061010d919061048c565b610263565b005b7f000000000000000000000000000000000000000000000000000000000000000081565b5f5f9054906101000a90046fffffffffffffffffffffffffffffffff1681565b7f000000000000000000000000000000000000000000000000000000000000000081565b7f000000000000000000000000000000000000000000000000000000000000000081565b805f5f8282829054906101000a90046fffffffffffffffffffffffffffffffff166101cb91906104e4565b92506101000a8154816fffffffffffffffffffffffffffffffff02191690836fffffffffffffffffffffffffffffffff1602179055508160020b8360020b8573ffffffffffffffffffffffffffffffffffffffff167f7a53080ba414158be7ec69b987b5fb7d07dee101fe85488f0853ae16239d0bde33855f5f6040516102559493929190610572565b60405180910390a450505050565b7f98636036cb66a9c19a37435efc1e90142190214e8abeb821bdba3f2990dd4c95815f6040516102949291906105d3565b60405180910390a150565b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f6102c88261029f565b9050919050565b6102d8816102be565b82525050565b5f6020820190506102f15f8301846102cf565b92915050565b5f6fffffffffffffffffffffffffffffffff82169050919050565b61031b816102f7565b82525050565b5f6020820190506103345f830184610312565b92915050565b5f62ffffff82169050919050565b6103518161033a565b82525050565b5f60208201905061036a5f830184610348565b92915050565b5f5ffd5b61037d816102be565b8114610387575f5ffd5b50565b5f8135905061039881610374565b92915050565b5f8160020b9050919050565b6103b38161039e565b81146103bd575f5ffd5b50565b5f813590506103ce816103aa565b92915050565b6103dd816102f7565b81146103e7575f5ffd5b50565b5f813590506103f8816103d4565b92915050565b5f5f5f5f6080858703121561041657610415610370565b5b5f6104238782880161038a565b9450506020610434878288016103c0565b9350506040610445878288016103c0565b9250506060610456878288016103ea565b91505092959194509250565b61046b8161029f565b8114610475575f5ffd5b50565b5f8135905061048681610462565b92915050565b5f602082840312156104a1576104a0610370565b5b5f6104ae84828501610478565b91505092915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f6104ee826102f7565b91506104f9836102f7565b925082820190506fffffffffffffffffffffffffffffffff811115610521576105206104b7565b5b92915050565b5f819050919050565b5f819050919050565b5f819050919050565b5f61055c61055761055284610527565b610539565b610530565b9050919050565b61056c81610542565b82525050565b5f6080820190506105855f8301876102cf565b6105926020830186610312565b61059f6040830185610563565b6105ac6060830184610563565b95945050505050565b6105be8161029f565b82525050565b6105cd8161039e565b82525050565b5f6040820190506105e65f8301856105b5565b6105f360208301846105c4565b939250505056fea2646970667358221220ed63fe890f9816856ae5c5b059064c95931328b3a4d4e05fc390c02f872495f264736f6c634300081e0033", + "deployedBytecode": "0x608060405234801561000f575f5ffd5b5060043610610060575f3560e01c80630dfe1681146100645780631a68650214610082578063d21220a7146100a0578063ddca3f43146100be578063efe27fa3146100dc578063f637731d146100f8575b5f5ffd5b61006c610114565b60405161007991906102de565b60405180910390f35b61008a610138565b6040516100979190610321565b60405180910390f35b6100a8610158565b6040516100b591906102de565b60405180910390f35b6100c661017c565b6040516100d39190610357565b60405180910390f35b6100f660048036038101906100f191906103fe565b6101a0565b005b610112600480360381019061010d919061048c565b610263565b005b7f000000000000000000000000000000000000000000000000000000000000000081565b5f5f9054906101000a90046fffffffffffffffffffffffffffffffff1681565b7f000000000000000000000000000000000000000000000000000000000000000081565b7f000000000000000000000000000000000000000000000000000000000000000081565b805f5f8282829054906101000a90046fffffffffffffffffffffffffffffffff166101cb91906104e4565b92506101000a8154816fffffffffffffffffffffffffffffffff02191690836fffffffffffffffffffffffffffffffff1602179055508160020b8360020b8573ffffffffffffffffffffffffffffffffffffffff167f7a53080ba414158be7ec69b987b5fb7d07dee101fe85488f0853ae16239d0bde33855f5f6040516102559493929190610572565b60405180910390a450505050565b7f98636036cb66a9c19a37435efc1e90142190214e8abeb821bdba3f2990dd4c95815f6040516102949291906105d3565b60405180910390a150565b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f6102c88261029f565b9050919050565b6102d8816102be565b82525050565b5f6020820190506102f15f8301846102cf565b92915050565b5f6fffffffffffffffffffffffffffffffff82169050919050565b61031b816102f7565b82525050565b5f6020820190506103345f830184610312565b92915050565b5f62ffffff82169050919050565b6103518161033a565b82525050565b5f60208201905061036a5f830184610348565b92915050565b5f5ffd5b61037d816102be565b8114610387575f5ffd5b50565b5f8135905061039881610374565b92915050565b5f8160020b9050919050565b6103b38161039e565b81146103bd575f5ffd5b50565b5f813590506103ce816103aa565b92915050565b6103dd816102f7565b81146103e7575f5ffd5b50565b5f813590506103f8816103d4565b92915050565b5f5f5f5f6080858703121561041657610415610370565b5b5f6104238782880161038a565b9450506020610434878288016103c0565b9350506040610445878288016103c0565b9250506060610456878288016103ea565b91505092959194509250565b61046b8161029f565b8114610475575f5ffd5b50565b5f8135905061048681610462565b92915050565b5f602082840312156104a1576104a0610370565b5b5f6104ae84828501610478565b91505092915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f6104ee826102f7565b91506104f9836102f7565b925082820190506fffffffffffffffffffffffffffffffff811115610521576105206104b7565b5b92915050565b5f819050919050565b5f819050919050565b5f819050919050565b5f61055c61055761055284610527565b610539565b610530565b9050919050565b61056c81610542565b82525050565b5f6080820190506105855f8301876102cf565b6105926020830186610312565b61059f6040830185610563565b6105ac6060830184610563565b95945050505050565b6105be8161029f565b82525050565b6105cd8161039e565b82525050565b5f6040820190506105e65f8301856105b5565b6105f360208301846105c4565b939250505056fea2646970667358221220ed63fe890f9816856ae5c5b059064c95931328b3a4d4e05fc390c02f872495f264736f6c634300081e0033", + "devdoc": { + "methods": {} + }, + "userdoc": { + "methods": {} + } +} diff --git a/contracts/generated/contracts-facade/Cargo.toml b/contracts/generated/contracts-facade/Cargo.toml index ca824f689c..3c6d49c38c 100644 --- a/contracts/generated/contracts-facade/Cargo.toml +++ b/contracts/generated/contracts-facade/Cargo.toml @@ -65,6 +65,8 @@ cow-contract-iuniswaplikerouter = { path = "../contracts-generated/iuniswapliker cow-contract-iuniswapv3factory = { path = "../contracts-generated/iuniswapv3factory" } cow-contract-izeroex = { path = "../contracts-generated/izeroex" } cow-contract-liquoricesettlement = { path = "../contracts-generated/liquoricesettlement" } +cow-contract-mockuniswapv3factory = { path = "../contracts-generated/mockuniswapv3factory" } +cow-contract-mockuniswapv3pool = { path = "../contracts-generated/mockuniswapv3pool" } cow-contract-nonstandarderc20balances = { path = "../contracts-generated/nonstandarderc20balances" } cow-contract-pancakerouter = { path = "../contracts-generated/pancakerouter" } cow-contract-permit2 = { path = "../contracts-generated/permit2" } diff --git a/contracts/generated/contracts-facade/src/lib.rs b/contracts/generated/contracts-facade/src/lib.rs index 91abfdf567..abd2d2650f 100644 --- a/contracts/generated/contracts-facade/src/lib.rs +++ b/contracts/generated/contracts-facade/src/lib.rs @@ -82,6 +82,8 @@ pub mod test { cow_contract_counter as Counter, cow_contract_cowprotocoltoken as CowProtocolToken, cow_contract_gashog as GasHog, + cow_contract_mockuniswapv3factory as MockUniswapV3Factory, + cow_contract_mockuniswapv3pool as MockUniswapV3Pool, cow_contract_nonstandarderc20balances as NonStandardERC20Balances, cow_contract_remoteerc20balances as RemoteERC20Balances, }; diff --git a/contracts/generated/contracts-generated/mockuniswapv3factory/Cargo.toml b/contracts/generated/contracts-generated/mockuniswapv3factory/Cargo.toml new file mode 100644 index 0000000000..97b7223ac4 --- /dev/null +++ b/contracts/generated/contracts-generated/mockuniswapv3factory/Cargo.toml @@ -0,0 +1,19 @@ +# Auto-generated by contracts-generate. Do not edit. +[package] +name = "cow-contract-mockuniswapv3factory" +version = "0.1.0" +edition = "2024" +publish = false + +[lib] +doctest = false + +[dependencies] +alloy-primitives = { workspace = true } +alloy-sol-types = { workspace = true } +alloy-contract = { workspace = true } +alloy-provider = { workspace = true } +anyhow = { workspace = true } + +[lints] +workspace = true diff --git a/contracts/generated/contracts-generated/mockuniswapv3factory/src/lib.rs b/contracts/generated/contracts-generated/mockuniswapv3factory/src/lib.rs new file mode 100644 index 0000000000..0630a3d004 --- /dev/null +++ b/contracts/generated/contracts-generated/mockuniswapv3factory/src/lib.rs @@ -0,0 +1,851 @@ +#![allow( + unused_imports, + unused_attributes, + clippy::all, + rustdoc::all, + non_snake_case +)] +//! Auto-generated contract bindings. Do not edit. +/** + +Generated by the following Solidity interface... +```solidity +interface MockUniswapV3Factory { + event PoolCreated(address indexed token0, address indexed token1, uint24 indexed fee, int24 tickSpacing, address pool); + + function createPool(address tokenA, address tokenB, uint24 _fee) external returns (address pool); +} +``` + +...which was generated by the following JSON ABI: +```json +[ + { + "type": "function", + "name": "createPool", + "inputs": [ + { + "name": "tokenA", + "type": "address", + "internalType": "address" + }, + { + "name": "tokenB", + "type": "address", + "internalType": "address" + }, + { + "name": "_fee", + "type": "uint24", + "internalType": "uint24" + } + ], + "outputs": [ + { + "name": "pool", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "nonpayable" + }, + { + "type": "event", + "name": "PoolCreated", + "inputs": [ + { + "name": "token0", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "token1", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "fee", + "type": "uint24", + "indexed": true, + "internalType": "uint24" + }, + { + "name": "tickSpacing", + "type": "int24", + "indexed": false, + "internalType": "int24" + }, + { + "name": "pool", + "type": "address", + "indexed": false, + "internalType": "address" + } + ], + "anonymous": false + } +] +```*/ +#[allow( + non_camel_case_types, + non_snake_case, + clippy::pub_underscore_fields, + clippy::style, + clippy::empty_structs_with_brackets +)] +pub mod MockUniswapV3Factory { + use {super::*, alloy_sol_types}; + /// The creation / init bytecode of the contract. + /// + /// ```text + ///0x6080604052348015600e575f5ffd5b50610b1e8061001c5f395ff3fe608060405234801561000f575f5ffd5b5060043610610029575f3560e01c8063a16712951461002d575b5f5ffd5b610047600480360381019061004291906101f7565b61005d565b6040516100549190610256565b60405180910390f35b5f5f5f8473ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff161061009a57848661009d565b85855b915091505f8282866040516100b190610154565b6100bd9392919061027e565b604051809103905ff0801580156100d6573d5f5f3e3d5ffd5b5090508093508462ffffff168273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167f783cca1c0412dd0d695e784568c96da2e9c22ff989357a2e8b1d9b2b4e6b7118600a886040516101429291906102ce565b60405180910390a45050509392505050565b6107f3806102f683390190565b5f5ffd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f61018e82610165565b9050919050565b61019e81610184565b81146101a8575f5ffd5b50565b5f813590506101b981610195565b92915050565b5f62ffffff82169050919050565b6101d6816101bf565b81146101e0575f5ffd5b50565b5f813590506101f1816101cd565b92915050565b5f5f5f6060848603121561020e5761020d610161565b5b5f61021b868287016101ab565b935050602061022c868287016101ab565b925050604061023d868287016101e3565b9150509250925092565b61025081610184565b82525050565b5f6020820190506102695f830184610247565b92915050565b610278816101bf565b82525050565b5f6060820190506102915f830186610247565b61029e6020830185610247565b6102ab604083018461026f565b949350505050565b5f8160020b9050919050565b6102c8816102b3565b82525050565b5f6040820190506102e15f8301856102bf565b6102ee6020830184610247565b939250505056fe60e060405234801561000f575f5ffd5b506040516107f33803806107f383398181016040528101906100319190610149565b8273ffffffffffffffffffffffffffffffffffffffff1660808173ffffffffffffffffffffffffffffffffffffffff16815250508173ffffffffffffffffffffffffffffffffffffffff1660a08173ffffffffffffffffffffffffffffffffffffffff16815250508062ffffff1660c08162ffffff1681525050505050610199565b5f5ffd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f6100e0826100b7565b9050919050565b6100f0816100d6565b81146100fa575f5ffd5b50565b5f8151905061010b816100e7565b92915050565b5f62ffffff82169050919050565b61012881610111565b8114610132575f5ffd5b50565b5f815190506101438161011f565b92915050565b5f5f5f606084860312156101605761015f6100b3565b5b5f61016d868287016100fd565b935050602061017e868287016100fd565b925050604061018f86828701610135565b9150509250925092565b60805160a05160c0516106306101c35f395f61017e01525f61015a01525f61011601526106305ff3fe608060405234801561000f575f5ffd5b5060043610610060575f3560e01c80630dfe1681146100645780631a68650214610082578063d21220a7146100a0578063ddca3f43146100be578063efe27fa3146100dc578063f637731d146100f8575b5f5ffd5b61006c610114565b60405161007991906102de565b60405180910390f35b61008a610138565b6040516100979190610321565b60405180910390f35b6100a8610158565b6040516100b591906102de565b60405180910390f35b6100c661017c565b6040516100d39190610357565b60405180910390f35b6100f660048036038101906100f191906103fe565b6101a0565b005b610112600480360381019061010d919061048c565b610263565b005b7f000000000000000000000000000000000000000000000000000000000000000081565b5f5f9054906101000a90046fffffffffffffffffffffffffffffffff1681565b7f000000000000000000000000000000000000000000000000000000000000000081565b7f000000000000000000000000000000000000000000000000000000000000000081565b805f5f8282829054906101000a90046fffffffffffffffffffffffffffffffff166101cb91906104e4565b92506101000a8154816fffffffffffffffffffffffffffffffff02191690836fffffffffffffffffffffffffffffffff1602179055508160020b8360020b8573ffffffffffffffffffffffffffffffffffffffff167f7a53080ba414158be7ec69b987b5fb7d07dee101fe85488f0853ae16239d0bde33855f5f6040516102559493929190610572565b60405180910390a450505050565b7f98636036cb66a9c19a37435efc1e90142190214e8abeb821bdba3f2990dd4c95815f6040516102949291906105d3565b60405180910390a150565b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f6102c88261029f565b9050919050565b6102d8816102be565b82525050565b5f6020820190506102f15f8301846102cf565b92915050565b5f6fffffffffffffffffffffffffffffffff82169050919050565b61031b816102f7565b82525050565b5f6020820190506103345f830184610312565b92915050565b5f62ffffff82169050919050565b6103518161033a565b82525050565b5f60208201905061036a5f830184610348565b92915050565b5f5ffd5b61037d816102be565b8114610387575f5ffd5b50565b5f8135905061039881610374565b92915050565b5f8160020b9050919050565b6103b38161039e565b81146103bd575f5ffd5b50565b5f813590506103ce816103aa565b92915050565b6103dd816102f7565b81146103e7575f5ffd5b50565b5f813590506103f8816103d4565b92915050565b5f5f5f5f6080858703121561041657610415610370565b5b5f6104238782880161038a565b9450506020610434878288016103c0565b9350506040610445878288016103c0565b9250506060610456878288016103ea565b91505092959194509250565b61046b8161029f565b8114610475575f5ffd5b50565b5f8135905061048681610462565b92915050565b5f602082840312156104a1576104a0610370565b5b5f6104ae84828501610478565b91505092915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f6104ee826102f7565b91506104f9836102f7565b925082820190506fffffffffffffffffffffffffffffffff811115610521576105206104b7565b5b92915050565b5f819050919050565b5f819050919050565b5f819050919050565b5f61055c61055761055284610527565b610539565b610530565b9050919050565b61056c81610542565b82525050565b5f6080820190506105855f8301876102cf565b6105926020830186610312565b61059f6040830185610563565b6105ac6060830184610563565b95945050505050565b6105be8161029f565b82525050565b6105cd8161039e565b82525050565b5f6040820190506105e65f8301856105b5565b6105f360208301846105c4565b939250505056fea2646970667358221220ed63fe890f9816856ae5c5b059064c95931328b3a4d4e05fc390c02f872495f264736f6c634300081e0033a264697066735822122053da3887987836adfd577d8e6d98a266666bfa2a180305300aae19dbb8cd494f64736f6c634300081e0033 + /// ``` + #[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`\x0EW__\xFD[Pa\x0B\x1E\x80a\0\x1C_9_\xF3\xFE`\x80`@R4\x80\x15a\0\x0FW__\xFD[P`\x046\x10a\0)W_5`\xE0\x1C\x80c\xA1g\x12\x95\x14a\0-W[__\xFD[a\0G`\x04\x806\x03\x81\x01\x90a\0B\x91\x90a\x01\xF7V[a\0]V[`@Qa\0T\x91\x90a\x02VV[`@Q\x80\x91\x03\x90\xF3[___\x84s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x86s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x10a\0\x9AW\x84\x86a\0\x9DV[\x85\x85[\x91P\x91P_\x82\x82\x86`@Qa\0\xB1\x90a\x01TV[a\0\xBD\x93\x92\x91\x90a\x02~V[`@Q\x80\x91\x03\x90_\xF0\x80\x15\x80\x15a\0\xD6W=__>=_\xFD[P\x90P\x80\x93P\x84b\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\x84s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x7Fx<\xCA\x1C\x04\x12\xDD\ri^xEh\xC9m\xA2\xE9\xC2/\xF9\x895z.\x8B\x1D\x9B+Nkq\x18`\n\x88`@Qa\x01B\x92\x91\x90a\x02\xCEV[`@Q\x80\x91\x03\x90\xA4PPP\x93\x92PPPV[a\x07\xF3\x80a\x02\xF6\x839\x01\x90V[__\xFD[_s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x82\x16\x90P\x91\x90PV[_a\x01\x8E\x82a\x01eV[\x90P\x91\x90PV[a\x01\x9E\x81a\x01\x84V[\x81\x14a\x01\xA8W__\xFD[PV[_\x815\x90Pa\x01\xB9\x81a\x01\x95V[\x92\x91PPV[_b\xFF\xFF\xFF\x82\x16\x90P\x91\x90PV[a\x01\xD6\x81a\x01\xBFV[\x81\x14a\x01\xE0W__\xFD[PV[_\x815\x90Pa\x01\xF1\x81a\x01\xCDV[\x92\x91PPV[___``\x84\x86\x03\x12\x15a\x02\x0EWa\x02\ra\x01aV[[_a\x02\x1B\x86\x82\x87\x01a\x01\xABV[\x93PP` a\x02,\x86\x82\x87\x01a\x01\xABV[\x92PP`@a\x02=\x86\x82\x87\x01a\x01\xE3V[\x91PP\x92P\x92P\x92V[a\x02P\x81a\x01\x84V[\x82RPPV[_` \x82\x01\x90Pa\x02i_\x83\x01\x84a\x02GV[\x92\x91PPV[a\x02x\x81a\x01\xBFV[\x82RPPV[_``\x82\x01\x90Pa\x02\x91_\x83\x01\x86a\x02GV[a\x02\x9E` \x83\x01\x85a\x02GV[a\x02\xAB`@\x83\x01\x84a\x02oV[\x94\x93PPPPV[_\x81`\x02\x0B\x90P\x91\x90PV[a\x02\xC8\x81a\x02\xB3V[\x82RPPV[_`@\x82\x01\x90Pa\x02\xE1_\x83\x01\x85a\x02\xBFV[a\x02\xEE` \x83\x01\x84a\x02GV[\x93\x92PPPV\xFE`\xE0`@R4\x80\x15a\0\x0FW__\xFD[P`@Qa\x07\xF38\x03\x80a\x07\xF3\x839\x81\x81\x01`@R\x81\x01\x90a\x001\x91\x90a\x01IV[\x82s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16`\x80\x81s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x81RPP\x81s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16`\xA0\x81s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x81RPP\x80b\xFF\xFF\xFF\x16`\xC0\x81b\xFF\xFF\xFF\x16\x81RPPPPPa\x01\x99V[__\xFD[_s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x82\x16\x90P\x91\x90PV[_a\0\xE0\x82a\0\xB7V[\x90P\x91\x90PV[a\0\xF0\x81a\0\xD6V[\x81\x14a\0\xFAW__\xFD[PV[_\x81Q\x90Pa\x01\x0B\x81a\0\xE7V[\x92\x91PPV[_b\xFF\xFF\xFF\x82\x16\x90P\x91\x90PV[a\x01(\x81a\x01\x11V[\x81\x14a\x012W__\xFD[PV[_\x81Q\x90Pa\x01C\x81a\x01\x1FV[\x92\x91PPV[___``\x84\x86\x03\x12\x15a\x01`Wa\x01_a\0\xB3V[[_a\x01m\x86\x82\x87\x01a\0\xFDV[\x93PP` a\x01~\x86\x82\x87\x01a\0\xFDV[\x92PP`@a\x01\x8F\x86\x82\x87\x01a\x015V[\x91PP\x92P\x92P\x92V[`\x80Q`\xA0Q`\xC0Qa\x060a\x01\xC3_9_a\x01~\x01R_a\x01Z\x01R_a\x01\x16\x01Ra\x060_\xF3\xFE`\x80`@R4\x80\x15a\0\x0FW__\xFD[P`\x046\x10a\0`W_5`\xE0\x1C\x80c\r\xFE\x16\x81\x14a\0dW\x80c\x1Ahe\x02\x14a\0\x82W\x80c\xD2\x12 \xA7\x14a\0\xA0W\x80c\xDD\xCA?C\x14a\0\xBEW\x80c\xEF\xE2\x7F\xA3\x14a\0\xDCW\x80c\xF67s\x1D\x14a\0\xF8W[__\xFD[a\0la\x01\x14V[`@Qa\0y\x91\x90a\x02\xDEV[`@Q\x80\x91\x03\x90\xF3[a\0\x8Aa\x018V[`@Qa\0\x97\x91\x90a\x03!V[`@Q\x80\x91\x03\x90\xF3[a\0\xA8a\x01XV[`@Qa\0\xB5\x91\x90a\x02\xDEV[`@Q\x80\x91\x03\x90\xF3[a\0\xC6a\x01|V[`@Qa\0\xD3\x91\x90a\x03WV[`@Q\x80\x91\x03\x90\xF3[a\0\xF6`\x04\x806\x03\x81\x01\x90a\0\xF1\x91\x90a\x03\xFEV[a\x01\xA0V[\0[a\x01\x12`\x04\x806\x03\x81\x01\x90a\x01\r\x91\x90a\x04\x8CV[a\x02cV[\0[\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\x81V[__\x90T\x90a\x01\0\n\x90\x04o\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x81V[\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\x81V[\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\x81V[\x80__\x82\x82\x82\x90T\x90a\x01\0\n\x90\x04o\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16a\x01\xCB\x91\x90a\x04\xE4V[\x92Pa\x01\0\n\x81T\x81o\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x02\x19\x16\x90\x83o\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x02\x17\x90UP\x81`\x02\x0B\x83`\x02\x0B\x85s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x7FzS\x08\x0B\xA4\x14\x15\x8B\xE7\xECi\xB9\x87\xB5\xFB}\x07\xDE\xE1\x01\xFE\x85H\x8F\x08S\xAE\x16#\x9D\x0B\xDE3\x85__`@Qa\x02U\x94\x93\x92\x91\x90a\x05rV[`@Q\x80\x91\x03\x90\xA4PPPPV[\x7F\x98c`6\xCBf\xA9\xC1\x9A7C^\xFC\x1E\x90\x14!\x90!N\x8A\xBE\xB8!\xBD\xBA?)\x90\xDDL\x95\x81_`@Qa\x02\x94\x92\x91\x90a\x05\xD3V[`@Q\x80\x91\x03\x90\xA1PV[_s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x82\x16\x90P\x91\x90PV[_a\x02\xC8\x82a\x02\x9FV[\x90P\x91\x90PV[a\x02\xD8\x81a\x02\xBEV[\x82RPPV[_` \x82\x01\x90Pa\x02\xF1_\x83\x01\x84a\x02\xCFV[\x92\x91PPV[_o\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x82\x16\x90P\x91\x90PV[a\x03\x1B\x81a\x02\xF7V[\x82RPPV[_` \x82\x01\x90Pa\x034_\x83\x01\x84a\x03\x12V[\x92\x91PPV[_b\xFF\xFF\xFF\x82\x16\x90P\x91\x90PV[a\x03Q\x81a\x03:V[\x82RPPV[_` \x82\x01\x90Pa\x03j_\x83\x01\x84a\x03HV[\x92\x91PPV[__\xFD[a\x03}\x81a\x02\xBEV[\x81\x14a\x03\x87W__\xFD[PV[_\x815\x90Pa\x03\x98\x81a\x03tV[\x92\x91PPV[_\x81`\x02\x0B\x90P\x91\x90PV[a\x03\xB3\x81a\x03\x9EV[\x81\x14a\x03\xBDW__\xFD[PV[_\x815\x90Pa\x03\xCE\x81a\x03\xAAV[\x92\x91PPV[a\x03\xDD\x81a\x02\xF7V[\x81\x14a\x03\xE7W__\xFD[PV[_\x815\x90Pa\x03\xF8\x81a\x03\xD4V[\x92\x91PPV[____`\x80\x85\x87\x03\x12\x15a\x04\x16Wa\x04\x15a\x03pV[[_a\x04#\x87\x82\x88\x01a\x03\x8AV[\x94PP` a\x044\x87\x82\x88\x01a\x03\xC0V[\x93PP`@a\x04E\x87\x82\x88\x01a\x03\xC0V[\x92PP``a\x04V\x87\x82\x88\x01a\x03\xEAV[\x91PP\x92\x95\x91\x94P\x92PV[a\x04k\x81a\x02\x9FV[\x81\x14a\x04uW__\xFD[PV[_\x815\x90Pa\x04\x86\x81a\x04bV[\x92\x91PPV[_` \x82\x84\x03\x12\x15a\x04\xA1Wa\x04\xA0a\x03pV[[_a\x04\xAE\x84\x82\x85\x01a\x04xV[\x91PP\x92\x91PPV[\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\x04\xEE\x82a\x02\xF7V[\x91Pa\x04\xF9\x83a\x02\xF7V[\x92P\x82\x82\x01\x90Po\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x11\x15a\x05!Wa\x05 a\x04\xB7V[[\x92\x91PPV[_\x81\x90P\x91\x90PV[_\x81\x90P\x91\x90PV[_\x81\x90P\x91\x90PV[_a\x05\\a\x05Wa\x05R\x84a\x05'V[a\x059V[a\x050V[\x90P\x91\x90PV[a\x05l\x81a\x05BV[\x82RPPV[_`\x80\x82\x01\x90Pa\x05\x85_\x83\x01\x87a\x02\xCFV[a\x05\x92` \x83\x01\x86a\x03\x12V[a\x05\x9F`@\x83\x01\x85a\x05cV[a\x05\xAC``\x83\x01\x84a\x05cV[\x95\x94PPPPPV[a\x05\xBE\x81a\x02\x9FV[\x82RPPV[a\x05\xCD\x81a\x03\x9EV[\x82RPPV[_`@\x82\x01\x90Pa\x05\xE6_\x83\x01\x85a\x05\xB5V[a\x05\xF3` \x83\x01\x84a\x05\xC4V[\x93\x92PPPV\xFE\xA2dipfsX\"\x12 \xEDc\xFE\x89\x0F\x98\x16\x85j\xE5\xC5\xB0Y\x06L\x95\x93\x13(\xB3\xA4\xD4\xE0_\xC3\x90\xC0/\x87$\x95\xF2dsolcC\0\x08\x1E\x003\xA2dipfsX\"\x12 S\xDA8\x87\x98x6\xAD\xFDW}\x8Em\x98\xA2ffk\xFA*\x18\x03\x050\n\xAE\x19\xDB\xB8\xCDIOdsolcC\0\x08\x1E\x003", + ); + /// The runtime bytecode of the contract, as deployed on the network. + /// + /// ```text + ///0x608060405234801561000f575f5ffd5b5060043610610029575f3560e01c8063a16712951461002d575b5f5ffd5b610047600480360381019061004291906101f7565b61005d565b6040516100549190610256565b60405180910390f35b5f5f5f8473ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff161061009a57848661009d565b85855b915091505f8282866040516100b190610154565b6100bd9392919061027e565b604051809103905ff0801580156100d6573d5f5f3e3d5ffd5b5090508093508462ffffff168273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167f783cca1c0412dd0d695e784568c96da2e9c22ff989357a2e8b1d9b2b4e6b7118600a886040516101429291906102ce565b60405180910390a45050509392505050565b6107f3806102f683390190565b5f5ffd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f61018e82610165565b9050919050565b61019e81610184565b81146101a8575f5ffd5b50565b5f813590506101b981610195565b92915050565b5f62ffffff82169050919050565b6101d6816101bf565b81146101e0575f5ffd5b50565b5f813590506101f1816101cd565b92915050565b5f5f5f6060848603121561020e5761020d610161565b5b5f61021b868287016101ab565b935050602061022c868287016101ab565b925050604061023d868287016101e3565b9150509250925092565b61025081610184565b82525050565b5f6020820190506102695f830184610247565b92915050565b610278816101bf565b82525050565b5f6060820190506102915f830186610247565b61029e6020830185610247565b6102ab604083018461026f565b949350505050565b5f8160020b9050919050565b6102c8816102b3565b82525050565b5f6040820190506102e15f8301856102bf565b6102ee6020830184610247565b939250505056fe60e060405234801561000f575f5ffd5b506040516107f33803806107f383398181016040528101906100319190610149565b8273ffffffffffffffffffffffffffffffffffffffff1660808173ffffffffffffffffffffffffffffffffffffffff16815250508173ffffffffffffffffffffffffffffffffffffffff1660a08173ffffffffffffffffffffffffffffffffffffffff16815250508062ffffff1660c08162ffffff1681525050505050610199565b5f5ffd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f6100e0826100b7565b9050919050565b6100f0816100d6565b81146100fa575f5ffd5b50565b5f8151905061010b816100e7565b92915050565b5f62ffffff82169050919050565b61012881610111565b8114610132575f5ffd5b50565b5f815190506101438161011f565b92915050565b5f5f5f606084860312156101605761015f6100b3565b5b5f61016d868287016100fd565b935050602061017e868287016100fd565b925050604061018f86828701610135565b9150509250925092565b60805160a05160c0516106306101c35f395f61017e01525f61015a01525f61011601526106305ff3fe608060405234801561000f575f5ffd5b5060043610610060575f3560e01c80630dfe1681146100645780631a68650214610082578063d21220a7146100a0578063ddca3f43146100be578063efe27fa3146100dc578063f637731d146100f8575b5f5ffd5b61006c610114565b60405161007991906102de565b60405180910390f35b61008a610138565b6040516100979190610321565b60405180910390f35b6100a8610158565b6040516100b591906102de565b60405180910390f35b6100c661017c565b6040516100d39190610357565b60405180910390f35b6100f660048036038101906100f191906103fe565b6101a0565b005b610112600480360381019061010d919061048c565b610263565b005b7f000000000000000000000000000000000000000000000000000000000000000081565b5f5f9054906101000a90046fffffffffffffffffffffffffffffffff1681565b7f000000000000000000000000000000000000000000000000000000000000000081565b7f000000000000000000000000000000000000000000000000000000000000000081565b805f5f8282829054906101000a90046fffffffffffffffffffffffffffffffff166101cb91906104e4565b92506101000a8154816fffffffffffffffffffffffffffffffff02191690836fffffffffffffffffffffffffffffffff1602179055508160020b8360020b8573ffffffffffffffffffffffffffffffffffffffff167f7a53080ba414158be7ec69b987b5fb7d07dee101fe85488f0853ae16239d0bde33855f5f6040516102559493929190610572565b60405180910390a450505050565b7f98636036cb66a9c19a37435efc1e90142190214e8abeb821bdba3f2990dd4c95815f6040516102949291906105d3565b60405180910390a150565b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f6102c88261029f565b9050919050565b6102d8816102be565b82525050565b5f6020820190506102f15f8301846102cf565b92915050565b5f6fffffffffffffffffffffffffffffffff82169050919050565b61031b816102f7565b82525050565b5f6020820190506103345f830184610312565b92915050565b5f62ffffff82169050919050565b6103518161033a565b82525050565b5f60208201905061036a5f830184610348565b92915050565b5f5ffd5b61037d816102be565b8114610387575f5ffd5b50565b5f8135905061039881610374565b92915050565b5f8160020b9050919050565b6103b38161039e565b81146103bd575f5ffd5b50565b5f813590506103ce816103aa565b92915050565b6103dd816102f7565b81146103e7575f5ffd5b50565b5f813590506103f8816103d4565b92915050565b5f5f5f5f6080858703121561041657610415610370565b5b5f6104238782880161038a565b9450506020610434878288016103c0565b9350506040610445878288016103c0565b9250506060610456878288016103ea565b91505092959194509250565b61046b8161029f565b8114610475575f5ffd5b50565b5f8135905061048681610462565b92915050565b5f602082840312156104a1576104a0610370565b5b5f6104ae84828501610478565b91505092915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f6104ee826102f7565b91506104f9836102f7565b925082820190506fffffffffffffffffffffffffffffffff811115610521576105206104b7565b5b92915050565b5f819050919050565b5f819050919050565b5f819050919050565b5f61055c61055761055284610527565b610539565b610530565b9050919050565b61056c81610542565b82525050565b5f6080820190506105855f8301876102cf565b6105926020830186610312565b61059f6040830185610563565b6105ac6060830184610563565b95945050505050565b6105be8161029f565b82525050565b6105cd8161039e565b82525050565b5f6040820190506105e65f8301856105b5565b6105f360208301846105c4565b939250505056fea2646970667358221220ed63fe890f9816856ae5c5b059064c95931328b3a4d4e05fc390c02f872495f264736f6c634300081e0033a264697066735822122053da3887987836adfd577d8e6d98a266666bfa2a180305300aae19dbb8cd494f64736f6c634300081e0033 + /// ``` + #[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\0)W_5`\xE0\x1C\x80c\xA1g\x12\x95\x14a\0-W[__\xFD[a\0G`\x04\x806\x03\x81\x01\x90a\0B\x91\x90a\x01\xF7V[a\0]V[`@Qa\0T\x91\x90a\x02VV[`@Q\x80\x91\x03\x90\xF3[___\x84s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x86s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x10a\0\x9AW\x84\x86a\0\x9DV[\x85\x85[\x91P\x91P_\x82\x82\x86`@Qa\0\xB1\x90a\x01TV[a\0\xBD\x93\x92\x91\x90a\x02~V[`@Q\x80\x91\x03\x90_\xF0\x80\x15\x80\x15a\0\xD6W=__>=_\xFD[P\x90P\x80\x93P\x84b\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\x84s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x7Fx<\xCA\x1C\x04\x12\xDD\ri^xEh\xC9m\xA2\xE9\xC2/\xF9\x895z.\x8B\x1D\x9B+Nkq\x18`\n\x88`@Qa\x01B\x92\x91\x90a\x02\xCEV[`@Q\x80\x91\x03\x90\xA4PPP\x93\x92PPPV[a\x07\xF3\x80a\x02\xF6\x839\x01\x90V[__\xFD[_s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x82\x16\x90P\x91\x90PV[_a\x01\x8E\x82a\x01eV[\x90P\x91\x90PV[a\x01\x9E\x81a\x01\x84V[\x81\x14a\x01\xA8W__\xFD[PV[_\x815\x90Pa\x01\xB9\x81a\x01\x95V[\x92\x91PPV[_b\xFF\xFF\xFF\x82\x16\x90P\x91\x90PV[a\x01\xD6\x81a\x01\xBFV[\x81\x14a\x01\xE0W__\xFD[PV[_\x815\x90Pa\x01\xF1\x81a\x01\xCDV[\x92\x91PPV[___``\x84\x86\x03\x12\x15a\x02\x0EWa\x02\ra\x01aV[[_a\x02\x1B\x86\x82\x87\x01a\x01\xABV[\x93PP` a\x02,\x86\x82\x87\x01a\x01\xABV[\x92PP`@a\x02=\x86\x82\x87\x01a\x01\xE3V[\x91PP\x92P\x92P\x92V[a\x02P\x81a\x01\x84V[\x82RPPV[_` \x82\x01\x90Pa\x02i_\x83\x01\x84a\x02GV[\x92\x91PPV[a\x02x\x81a\x01\xBFV[\x82RPPV[_``\x82\x01\x90Pa\x02\x91_\x83\x01\x86a\x02GV[a\x02\x9E` \x83\x01\x85a\x02GV[a\x02\xAB`@\x83\x01\x84a\x02oV[\x94\x93PPPPV[_\x81`\x02\x0B\x90P\x91\x90PV[a\x02\xC8\x81a\x02\xB3V[\x82RPPV[_`@\x82\x01\x90Pa\x02\xE1_\x83\x01\x85a\x02\xBFV[a\x02\xEE` \x83\x01\x84a\x02GV[\x93\x92PPPV\xFE`\xE0`@R4\x80\x15a\0\x0FW__\xFD[P`@Qa\x07\xF38\x03\x80a\x07\xF3\x839\x81\x81\x01`@R\x81\x01\x90a\x001\x91\x90a\x01IV[\x82s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16`\x80\x81s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x81RPP\x81s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16`\xA0\x81s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x81RPP\x80b\xFF\xFF\xFF\x16`\xC0\x81b\xFF\xFF\xFF\x16\x81RPPPPPa\x01\x99V[__\xFD[_s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x82\x16\x90P\x91\x90PV[_a\0\xE0\x82a\0\xB7V[\x90P\x91\x90PV[a\0\xF0\x81a\0\xD6V[\x81\x14a\0\xFAW__\xFD[PV[_\x81Q\x90Pa\x01\x0B\x81a\0\xE7V[\x92\x91PPV[_b\xFF\xFF\xFF\x82\x16\x90P\x91\x90PV[a\x01(\x81a\x01\x11V[\x81\x14a\x012W__\xFD[PV[_\x81Q\x90Pa\x01C\x81a\x01\x1FV[\x92\x91PPV[___``\x84\x86\x03\x12\x15a\x01`Wa\x01_a\0\xB3V[[_a\x01m\x86\x82\x87\x01a\0\xFDV[\x93PP` a\x01~\x86\x82\x87\x01a\0\xFDV[\x92PP`@a\x01\x8F\x86\x82\x87\x01a\x015V[\x91PP\x92P\x92P\x92V[`\x80Q`\xA0Q`\xC0Qa\x060a\x01\xC3_9_a\x01~\x01R_a\x01Z\x01R_a\x01\x16\x01Ra\x060_\xF3\xFE`\x80`@R4\x80\x15a\0\x0FW__\xFD[P`\x046\x10a\0`W_5`\xE0\x1C\x80c\r\xFE\x16\x81\x14a\0dW\x80c\x1Ahe\x02\x14a\0\x82W\x80c\xD2\x12 \xA7\x14a\0\xA0W\x80c\xDD\xCA?C\x14a\0\xBEW\x80c\xEF\xE2\x7F\xA3\x14a\0\xDCW\x80c\xF67s\x1D\x14a\0\xF8W[__\xFD[a\0la\x01\x14V[`@Qa\0y\x91\x90a\x02\xDEV[`@Q\x80\x91\x03\x90\xF3[a\0\x8Aa\x018V[`@Qa\0\x97\x91\x90a\x03!V[`@Q\x80\x91\x03\x90\xF3[a\0\xA8a\x01XV[`@Qa\0\xB5\x91\x90a\x02\xDEV[`@Q\x80\x91\x03\x90\xF3[a\0\xC6a\x01|V[`@Qa\0\xD3\x91\x90a\x03WV[`@Q\x80\x91\x03\x90\xF3[a\0\xF6`\x04\x806\x03\x81\x01\x90a\0\xF1\x91\x90a\x03\xFEV[a\x01\xA0V[\0[a\x01\x12`\x04\x806\x03\x81\x01\x90a\x01\r\x91\x90a\x04\x8CV[a\x02cV[\0[\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\x81V[__\x90T\x90a\x01\0\n\x90\x04o\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x81V[\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\x81V[\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\x81V[\x80__\x82\x82\x82\x90T\x90a\x01\0\n\x90\x04o\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16a\x01\xCB\x91\x90a\x04\xE4V[\x92Pa\x01\0\n\x81T\x81o\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x02\x19\x16\x90\x83o\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x02\x17\x90UP\x81`\x02\x0B\x83`\x02\x0B\x85s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x7FzS\x08\x0B\xA4\x14\x15\x8B\xE7\xECi\xB9\x87\xB5\xFB}\x07\xDE\xE1\x01\xFE\x85H\x8F\x08S\xAE\x16#\x9D\x0B\xDE3\x85__`@Qa\x02U\x94\x93\x92\x91\x90a\x05rV[`@Q\x80\x91\x03\x90\xA4PPPPV[\x7F\x98c`6\xCBf\xA9\xC1\x9A7C^\xFC\x1E\x90\x14!\x90!N\x8A\xBE\xB8!\xBD\xBA?)\x90\xDDL\x95\x81_`@Qa\x02\x94\x92\x91\x90a\x05\xD3V[`@Q\x80\x91\x03\x90\xA1PV[_s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x82\x16\x90P\x91\x90PV[_a\x02\xC8\x82a\x02\x9FV[\x90P\x91\x90PV[a\x02\xD8\x81a\x02\xBEV[\x82RPPV[_` \x82\x01\x90Pa\x02\xF1_\x83\x01\x84a\x02\xCFV[\x92\x91PPV[_o\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x82\x16\x90P\x91\x90PV[a\x03\x1B\x81a\x02\xF7V[\x82RPPV[_` \x82\x01\x90Pa\x034_\x83\x01\x84a\x03\x12V[\x92\x91PPV[_b\xFF\xFF\xFF\x82\x16\x90P\x91\x90PV[a\x03Q\x81a\x03:V[\x82RPPV[_` \x82\x01\x90Pa\x03j_\x83\x01\x84a\x03HV[\x92\x91PPV[__\xFD[a\x03}\x81a\x02\xBEV[\x81\x14a\x03\x87W__\xFD[PV[_\x815\x90Pa\x03\x98\x81a\x03tV[\x92\x91PPV[_\x81`\x02\x0B\x90P\x91\x90PV[a\x03\xB3\x81a\x03\x9EV[\x81\x14a\x03\xBDW__\xFD[PV[_\x815\x90Pa\x03\xCE\x81a\x03\xAAV[\x92\x91PPV[a\x03\xDD\x81a\x02\xF7V[\x81\x14a\x03\xE7W__\xFD[PV[_\x815\x90Pa\x03\xF8\x81a\x03\xD4V[\x92\x91PPV[____`\x80\x85\x87\x03\x12\x15a\x04\x16Wa\x04\x15a\x03pV[[_a\x04#\x87\x82\x88\x01a\x03\x8AV[\x94PP` a\x044\x87\x82\x88\x01a\x03\xC0V[\x93PP`@a\x04E\x87\x82\x88\x01a\x03\xC0V[\x92PP``a\x04V\x87\x82\x88\x01a\x03\xEAV[\x91PP\x92\x95\x91\x94P\x92PV[a\x04k\x81a\x02\x9FV[\x81\x14a\x04uW__\xFD[PV[_\x815\x90Pa\x04\x86\x81a\x04bV[\x92\x91PPV[_` \x82\x84\x03\x12\x15a\x04\xA1Wa\x04\xA0a\x03pV[[_a\x04\xAE\x84\x82\x85\x01a\x04xV[\x91PP\x92\x91PPV[\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\x04\xEE\x82a\x02\xF7V[\x91Pa\x04\xF9\x83a\x02\xF7V[\x92P\x82\x82\x01\x90Po\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x11\x15a\x05!Wa\x05 a\x04\xB7V[[\x92\x91PPV[_\x81\x90P\x91\x90PV[_\x81\x90P\x91\x90PV[_\x81\x90P\x91\x90PV[_a\x05\\a\x05Wa\x05R\x84a\x05'V[a\x059V[a\x050V[\x90P\x91\x90PV[a\x05l\x81a\x05BV[\x82RPPV[_`\x80\x82\x01\x90Pa\x05\x85_\x83\x01\x87a\x02\xCFV[a\x05\x92` \x83\x01\x86a\x03\x12V[a\x05\x9F`@\x83\x01\x85a\x05cV[a\x05\xAC``\x83\x01\x84a\x05cV[\x95\x94PPPPPV[a\x05\xBE\x81a\x02\x9FV[\x82RPPV[a\x05\xCD\x81a\x03\x9EV[\x82RPPV[_`@\x82\x01\x90Pa\x05\xE6_\x83\x01\x85a\x05\xB5V[a\x05\xF3` \x83\x01\x84a\x05\xC4V[\x93\x92PPPV\xFE\xA2dipfsX\"\x12 \xEDc\xFE\x89\x0F\x98\x16\x85j\xE5\xC5\xB0Y\x06L\x95\x93\x13(\xB3\xA4\xD4\xE0_\xC3\x90\xC0/\x87$\x95\xF2dsolcC\0\x08\x1E\x003\xA2dipfsX\"\x12 S\xDA8\x87\x98x6\xAD\xFDW}\x8Em\x98\xA2ffk\xFA*\x18\x03\x050\n\xAE\x19\xDB\xB8\xCDIOdsolcC\0\x08\x1E\x003", + ); + #[derive(Default, Debug, PartialEq, Eq, Hash)] + /**Event with signature `PoolCreated(address,address,uint24,int24,address)` and selector `0x783cca1c0412dd0d695e784568c96da2e9c22ff989357a2e8b1d9b2b4e6b7118`. + ```solidity + event PoolCreated(address indexed token0, address indexed token1, uint24 indexed fee, int24 tickSpacing, address pool); + ```*/ + #[allow( + non_camel_case_types, + non_snake_case, + clippy::pub_underscore_fields, + clippy::style + )] + #[derive(Clone)] + pub struct PoolCreated { + #[allow(missing_docs)] + pub token0: alloy_sol_types::private::Address, + #[allow(missing_docs)] + pub token1: alloy_sol_types::private::Address, + #[allow(missing_docs)] + pub fee: alloy_sol_types::private::primitives::aliases::U24, + #[allow(missing_docs)] + pub tickSpacing: alloy_sol_types::private::primitives::aliases::I24, + #[allow(missing_docs)] + pub pool: alloy_sol_types::private::Address, + } + #[allow( + non_camel_case_types, + non_snake_case, + clippy::pub_underscore_fields, + clippy::style + )] + const _: () = { + use alloy_sol_types; + #[automatically_derived] + impl alloy_sol_types::SolEvent for PoolCreated { + type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + type DataTuple<'a> = ( + alloy_sol_types::sol_data::Int<24>, + alloy_sol_types::sol_data::Address, + ); + type TopicList = ( + alloy_sol_types::sol_data::FixedBytes<32>, + alloy_sol_types::sol_data::Address, + alloy_sol_types::sol_data::Address, + alloy_sol_types::sol_data::Uint<24>, + ); + + const ANONYMOUS: bool = false; + const SIGNATURE: &'static str = "PoolCreated(address,address,uint24,int24,address)"; + const SIGNATURE_HASH: alloy_sol_types::private::B256 = + alloy_sol_types::private::B256::new([ + 120u8, 60u8, 202u8, 28u8, 4u8, 18u8, 221u8, 13u8, 105u8, 94u8, 120u8, 69u8, + 104u8, 201u8, 109u8, 162u8, 233u8, 194u8, 47u8, 249u8, 137u8, 53u8, 122u8, + 46u8, 139u8, 29u8, 155u8, 43u8, 78u8, 107u8, 113u8, 24u8, + ]); + + #[allow(unused_variables)] + #[inline] + fn new( + topics: ::RustType, + data: as alloy_sol_types::SolType>::RustType, + ) -> Self { + Self { + token0: topics.1, + token1: topics.2, + fee: topics.3, + tickSpacing: data.0, + pool: 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.tickSpacing, + ), + ::tokenize( + &self.pool, + ), + ) + } + + #[inline] + fn topics(&self) -> ::RustType { + ( + Self::SIGNATURE_HASH.into(), + self.token0.clone(), + self.token1.clone(), + self.fee.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.token0, + ); + out[2usize] = ::encode_topic( + &self.token1, + ); + out[3usize] = as alloy_sol_types::EventTopic>::encode_topic(&self.fee); + Ok(()) + } + } + #[automatically_derived] + impl alloy_sol_types::private::IntoLogData for PoolCreated { + 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<&PoolCreated> for alloy_sol_types::private::LogData { + #[inline] + fn from(this: &PoolCreated) -> alloy_sol_types::private::LogData { + alloy_sol_types::SolEvent::encode_log_data(this) + } + } + }; + #[derive(Default, Debug, PartialEq, Eq, Hash)] + /**Function with signature `createPool(address,address,uint24)` and selector `0xa1671295`. + ```solidity + function createPool(address tokenA, address tokenB, uint24 _fee) external returns (address pool); + ```*/ + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] + #[derive(Clone)] + pub struct createPoolCall { + #[allow(missing_docs)] + pub tokenA: alloy_sol_types::private::Address, + #[allow(missing_docs)] + pub tokenB: alloy_sol_types::private::Address, + #[allow(missing_docs)] + pub _fee: alloy_sol_types::private::primitives::aliases::U24, + } + #[derive(Default, Debug, PartialEq, Eq, Hash)] + ///Container type for the return parameters of the + /// [`createPool(address,address,uint24)`](createPoolCall) function. + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] + #[derive(Clone)] + pub struct createPoolReturn { + #[allow(missing_docs)] + pub pool: alloy_sol_types::private::Address, + } + #[allow( + non_camel_case_types, + non_snake_case, + clippy::pub_underscore_fields, + clippy::style + )] + const _: () = { + use alloy_sol_types; + { + #[doc(hidden)] + #[allow(dead_code)] + type UnderlyingSolTuple<'a> = ( + alloy_sol_types::sol_data::Address, + alloy_sol_types::sol_data::Address, + alloy_sol_types::sol_data::Uint<24>, + ); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = ( + alloy_sol_types::private::Address, + alloy_sol_types::private::Address, + alloy_sol_types::private::primitives::aliases::U24, + ); + #[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: createPoolCall) -> Self { + (value.tokenA, value.tokenB, value._fee) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for createPoolCall { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { + tokenA: tuple.0, + tokenB: tuple.1, + _fee: tuple.2, + } + } + } + } + { + #[doc(hidden)] + #[allow(dead_code)] + 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: createPoolReturn) -> Self { + (value.pool,) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for createPoolReturn { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { pool: tuple.0 } + } + } + } + #[automatically_derived] + impl alloy_sol_types::SolCall for createPoolCall { + type Parameters<'a> = ( + alloy_sol_types::sol_data::Address, + alloy_sol_types::sol_data::Address, + alloy_sol_types::sol_data::Uint<24>, + ); + type Return = alloy_sol_types::private::Address; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + type ReturnTuple<'a> = (alloy_sol_types::sol_data::Address,); + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + + const SELECTOR: [u8; 4] = [161u8, 103u8, 18u8, 149u8]; + const SIGNATURE: &'static str = "createPool(address,address,uint24)"; + + #[inline] + fn new<'a>( + tuple: as alloy_sol_types::SolType>::RustType, + ) -> Self { + tuple.into() + } + + #[inline] + fn tokenize(&self) -> Self::Token<'_> { + ( + ::tokenize( + &self.tokenA, + ), + ::tokenize( + &self.tokenB, + ), + as alloy_sol_types::SolType>::tokenize( + &self._fee, + ), + ) + } + + #[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: createPoolReturn = r.into(); + r.pool + }, + ) + } + + #[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: createPoolReturn = r.into(); + r.pool + }) + } + } + }; + ///Container for all the [`MockUniswapV3Factory`](self) function calls. + #[derive(Clone)] + pub enum MockUniswapV3FactoryCalls { + #[allow(missing_docs)] + createPool(createPoolCall), + } + impl MockUniswapV3FactoryCalls { + /// 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]] = &[[161u8, 103u8, 18u8, 149u8]]; + /// The signatures in the same order as `SELECTORS`. + pub const SIGNATURES: &'static [&'static str] = + &[::SIGNATURE]; + /// The names of the variants in the same order as `SELECTORS`. + pub const VARIANT_NAMES: &'static [&'static str] = &[::core::stringify!(createPool)]; + + /// Returns the signature for the given selector, if known. + #[inline] + pub fn signature_by_selector( + selector: [u8; 4usize], + ) -> ::core::option::Option<&'static str> { + match Self::SELECTORS.binary_search(&selector) { + ::core::result::Result::Ok(idx) => { + ::core::option::Option::Some(Self::SIGNATURES[idx]) + } + ::core::result::Result::Err(_) => ::core::option::Option::None, + } + } + + /// Returns the enum variant name for the given selector, if known. + #[inline] + pub fn name_by_selector(selector: [u8; 4usize]) -> ::core::option::Option<&'static str> { + let sig = Self::signature_by_selector(selector)?; + sig.split_once('(').map(|(name, _)| name) + } + } + #[automatically_derived] + impl alloy_sol_types::SolInterface for MockUniswapV3FactoryCalls { + const COUNT: usize = 1usize; + const MIN_DATA_LENGTH: usize = 96usize; + const NAME: &'static str = "MockUniswapV3FactoryCalls"; + + #[inline] + fn selector(&self) -> [u8; 4] { + match self { + Self::createPool(_) => ::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 createPool(data: &[u8]) -> alloy_sol_types::Result { + ::abi_decode_raw(data) + .map(MockUniswapV3FactoryCalls::createPool) + } + createPool + }]; + 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< + MockUniswapV3FactoryCalls, + >] = &[{ + fn createPool(data: &[u8]) -> alloy_sol_types::Result { + ::abi_decode_raw_validate(data) + .map(MockUniswapV3FactoryCalls::createPool) + } + createPool + }]; + 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::createPool(inner) => { + ::abi_encoded_size(inner) + } + } + } + + #[inline] + fn abi_encode_raw(&self, out: &mut alloy_sol_types::private::Vec) { + match self { + Self::createPool(inner) => { + ::abi_encode_raw(inner, out) + } + } + } + } + ///Container for all the [`MockUniswapV3Factory`](self) events. + #[derive(Clone, Debug, PartialEq, Eq, Hash)] + pub enum MockUniswapV3FactoryEvents { + #[allow(missing_docs)] + PoolCreated(PoolCreated), + } + impl MockUniswapV3FactoryEvents { + /// 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]] = &[[ + 120u8, 60u8, 202u8, 28u8, 4u8, 18u8, 221u8, 13u8, 105u8, 94u8, 120u8, 69u8, 104u8, + 201u8, 109u8, 162u8, 233u8, 194u8, 47u8, 249u8, 137u8, 53u8, 122u8, 46u8, 139u8, 29u8, + 155u8, 43u8, 78u8, 107u8, 113u8, 24u8, + ]]; + /// The signatures in the same order as `SELECTORS`. + pub const SIGNATURES: &'static [&'static str] = + &[::SIGNATURE]; + /// The names of the variants in the same order as `SELECTORS`. + pub const VARIANT_NAMES: &'static [&'static str] = &[::core::stringify!(PoolCreated)]; + + /// Returns the signature for the given selector, if known. + #[inline] + pub fn signature_by_selector( + selector: [u8; 32usize], + ) -> ::core::option::Option<&'static str> { + match Self::SELECTORS.binary_search(&selector) { + ::core::result::Result::Ok(idx) => { + ::core::option::Option::Some(Self::SIGNATURES[idx]) + } + ::core::result::Result::Err(_) => ::core::option::Option::None, + } + } + + /// Returns the enum variant name for the given selector, if known. + #[inline] + pub fn name_by_selector(selector: [u8; 32usize]) -> ::core::option::Option<&'static str> { + let sig = Self::signature_by_selector(selector)?; + sig.split_once('(').map(|(name, _)| name) + } + } + #[automatically_derived] + impl alloy_sol_types::SolEventInterface for MockUniswapV3FactoryEvents { + const COUNT: usize = 1usize; + const NAME: &'static str = "MockUniswapV3FactoryEvents"; + + 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::PoolCreated) + } + _ => 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 MockUniswapV3FactoryEvents { + fn to_log_data(&self) -> alloy_sol_types::private::LogData { + match self { + Self::PoolCreated(inner) => { + alloy_sol_types::private::IntoLogData::to_log_data(inner) + } + } + } + + fn into_log_data(self) -> alloy_sol_types::private::LogData { + match self { + Self::PoolCreated(inner) => { + alloy_sol_types::private::IntoLogData::into_log_data(inner) + } + } + } + } + use alloy_contract; + /**Creates a new wrapper around an on-chain [`MockUniswapV3Factory`](self) contract instance. + + See the [wrapper's documentation](`MockUniswapV3FactoryInstance`) 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, + ) -> MockUniswapV3FactoryInstance { + MockUniswapV3FactoryInstance::::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, N: alloy_contract::private::Network>( + __provider: P, + ) -> impl ::core::future::Future>> + { + MockUniswapV3FactoryInstance::::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< + P: alloy_contract::private::Provider, + N: alloy_contract::private::Network, + >( + __provider: P, + ) -> alloy_contract::RawCallBuilder { + MockUniswapV3FactoryInstance::::deploy_builder(__provider) + } + /**A [`MockUniswapV3Factory`](self) instance. + + Contains type-safe methods for interacting with an on-chain instance of the + [`MockUniswapV3Factory`](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 MockUniswapV3FactoryInstance { + address: alloy_sol_types::private::Address, + provider: P, + _network: ::core::marker::PhantomData, + } + #[automatically_derived] + impl ::core::fmt::Debug for MockUniswapV3FactoryInstance { + #[inline] + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { + f.debug_tuple("MockUniswapV3FactoryInstance") + .field(&self.address) + .finish() + } + } + /// Instantiation and getters/setters. + impl, N: alloy_contract::private::Network> + MockUniswapV3FactoryInstance + { + /**Creates a new wrapper around an on-chain [`MockUniswapV3Factory`](self) contract instance. + + See the [wrapper's documentation](`MockUniswapV3FactoryInstance`) for more details.*/ + #[inline] + pub const fn new(address: alloy_sol_types::private::Address, __provider: P) -> Self { + Self { + address, + provider: __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, + ) -> 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 MockUniswapV3FactoryInstance<&P, N> { + /// Clones the provider and returns a new instance with the cloned + /// provider. + #[inline] + pub fn with_cloned_provider(self) -> MockUniswapV3FactoryInstance { + MockUniswapV3FactoryInstance { + address: self.address, + provider: ::core::clone::Clone::clone(&self.provider), + _network: ::core::marker::PhantomData, + } + } + } + /// Function calls. + impl, N: alloy_contract::private::Network> + MockUniswapV3FactoryInstance + { + /// 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 [`createPool`] function. + pub fn createPool( + &self, + tokenA: alloy_sol_types::private::Address, + tokenB: alloy_sol_types::private::Address, + _fee: alloy_sol_types::private::primitives::aliases::U24, + ) -> alloy_contract::SolCallBuilder<&P, createPoolCall, N> { + self.call_builder(&createPoolCall { + tokenA, + tokenB, + _fee, + }) + } + } + /// Event filters. + impl, N: alloy_contract::private::Network> + MockUniswapV3FactoryInstance + { + /// 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 [`PoolCreated`] event. + pub fn PoolCreated_filter(&self) -> alloy_contract::Event<&P, PoolCreated, N> { + self.event_filter::() + } + } +} +pub type Instance = + MockUniswapV3Factory::MockUniswapV3FactoryInstance<::alloy_provider::DynProvider>; diff --git a/contracts/generated/contracts-generated/mockuniswapv3pool/Cargo.toml b/contracts/generated/contracts-generated/mockuniswapv3pool/Cargo.toml new file mode 100644 index 0000000000..e8b2584c68 --- /dev/null +++ b/contracts/generated/contracts-generated/mockuniswapv3pool/Cargo.toml @@ -0,0 +1,19 @@ +# Auto-generated by contracts-generate. Do not edit. +[package] +name = "cow-contract-mockuniswapv3pool" +version = "0.1.0" +edition = "2024" +publish = false + +[lib] +doctest = false + +[dependencies] +alloy-primitives = { workspace = true } +alloy-sol-types = { workspace = true } +alloy-contract = { workspace = true } +alloy-provider = { workspace = true } +anyhow = { workspace = true } + +[lints] +workspace = true diff --git a/contracts/generated/contracts-generated/mockuniswapv3pool/src/lib.rs b/contracts/generated/contracts-generated/mockuniswapv3pool/src/lib.rs new file mode 100644 index 0000000000..eb3f2808c8 --- /dev/null +++ b/contracts/generated/contracts-generated/mockuniswapv3pool/src/lib.rs @@ -0,0 +1,2105 @@ +#![allow( + unused_imports, + unused_attributes, + clippy::all, + rustdoc::all, + non_snake_case +)] +//! Auto-generated contract bindings. Do not edit. +/** + +Generated by the following Solidity interface... +```solidity +interface MockUniswapV3Pool { + event Initialize(uint160 sqrtPriceX96, int24 tick); + event Mint(address sender, address indexed owner, int24 indexed tickLower, int24 indexed tickUpper, uint128 amount, uint256 amount0, uint256 amount1); + + constructor(address _token0, address _token1, uint24 _fee); + + function fee() external view returns (uint24); + function initialize(uint160 sqrtPriceX96) external; + function liquidity() external view returns (uint128); + function mockMint(address owner, int24 tickLower, int24 tickUpper, uint128 amount) external; + function token0() external view returns (address); + function token1() external view returns (address); +} +``` + +...which was generated by the following JSON ABI: +```json +[ + { + "type": "constructor", + "inputs": [ + { + "name": "_token0", + "type": "address", + "internalType": "address" + }, + { + "name": "_token1", + "type": "address", + "internalType": "address" + }, + { + "name": "_fee", + "type": "uint24", + "internalType": "uint24" + } + ], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "fee", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint24", + "internalType": "uint24" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "initialize", + "inputs": [ + { + "name": "sqrtPriceX96", + "type": "uint160", + "internalType": "uint160" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "liquidity", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint128", + "internalType": "uint128" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "mockMint", + "inputs": [ + { + "name": "owner", + "type": "address", + "internalType": "address" + }, + { + "name": "tickLower", + "type": "int24", + "internalType": "int24" + }, + { + "name": "tickUpper", + "type": "int24", + "internalType": "int24" + }, + { + "name": "amount", + "type": "uint128", + "internalType": "uint128" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "token0", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "token1", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "event", + "name": "Initialize", + "inputs": [ + { + "name": "sqrtPriceX96", + "type": "uint160", + "indexed": false, + "internalType": "uint160" + }, + { + "name": "tick", + "type": "int24", + "indexed": false, + "internalType": "int24" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "Mint", + "inputs": [ + { + "name": "sender", + "type": "address", + "indexed": false, + "internalType": "address" + }, + { + "name": "owner", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "tickLower", + "type": "int24", + "indexed": true, + "internalType": "int24" + }, + { + "name": "tickUpper", + "type": "int24", + "indexed": true, + "internalType": "int24" + }, + { + "name": "amount", + "type": "uint128", + "indexed": false, + "internalType": "uint128" + }, + { + "name": "amount0", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "amount1", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + } +] +```*/ +#[allow( + non_camel_case_types, + non_snake_case, + clippy::pub_underscore_fields, + clippy::style, + clippy::empty_structs_with_brackets +)] +pub mod MockUniswapV3Pool { + use {super::*, alloy_sol_types}; + /// The creation / init bytecode of the contract. + /// + /// ```text + ///0x60e060405234801561000f575f5ffd5b506040516107f33803806107f383398181016040528101906100319190610149565b8273ffffffffffffffffffffffffffffffffffffffff1660808173ffffffffffffffffffffffffffffffffffffffff16815250508173ffffffffffffffffffffffffffffffffffffffff1660a08173ffffffffffffffffffffffffffffffffffffffff16815250508062ffffff1660c08162ffffff1681525050505050610199565b5f5ffd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f6100e0826100b7565b9050919050565b6100f0816100d6565b81146100fa575f5ffd5b50565b5f8151905061010b816100e7565b92915050565b5f62ffffff82169050919050565b61012881610111565b8114610132575f5ffd5b50565b5f815190506101438161011f565b92915050565b5f5f5f606084860312156101605761015f6100b3565b5b5f61016d868287016100fd565b935050602061017e868287016100fd565b925050604061018f86828701610135565b9150509250925092565b60805160a05160c0516106306101c35f395f61017e01525f61015a01525f61011601526106305ff3fe608060405234801561000f575f5ffd5b5060043610610060575f3560e01c80630dfe1681146100645780631a68650214610082578063d21220a7146100a0578063ddca3f43146100be578063efe27fa3146100dc578063f637731d146100f8575b5f5ffd5b61006c610114565b60405161007991906102de565b60405180910390f35b61008a610138565b6040516100979190610321565b60405180910390f35b6100a8610158565b6040516100b591906102de565b60405180910390f35b6100c661017c565b6040516100d39190610357565b60405180910390f35b6100f660048036038101906100f191906103fe565b6101a0565b005b610112600480360381019061010d919061048c565b610263565b005b7f000000000000000000000000000000000000000000000000000000000000000081565b5f5f9054906101000a90046fffffffffffffffffffffffffffffffff1681565b7f000000000000000000000000000000000000000000000000000000000000000081565b7f000000000000000000000000000000000000000000000000000000000000000081565b805f5f8282829054906101000a90046fffffffffffffffffffffffffffffffff166101cb91906104e4565b92506101000a8154816fffffffffffffffffffffffffffffffff02191690836fffffffffffffffffffffffffffffffff1602179055508160020b8360020b8573ffffffffffffffffffffffffffffffffffffffff167f7a53080ba414158be7ec69b987b5fb7d07dee101fe85488f0853ae16239d0bde33855f5f6040516102559493929190610572565b60405180910390a450505050565b7f98636036cb66a9c19a37435efc1e90142190214e8abeb821bdba3f2990dd4c95815f6040516102949291906105d3565b60405180910390a150565b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f6102c88261029f565b9050919050565b6102d8816102be565b82525050565b5f6020820190506102f15f8301846102cf565b92915050565b5f6fffffffffffffffffffffffffffffffff82169050919050565b61031b816102f7565b82525050565b5f6020820190506103345f830184610312565b92915050565b5f62ffffff82169050919050565b6103518161033a565b82525050565b5f60208201905061036a5f830184610348565b92915050565b5f5ffd5b61037d816102be565b8114610387575f5ffd5b50565b5f8135905061039881610374565b92915050565b5f8160020b9050919050565b6103b38161039e565b81146103bd575f5ffd5b50565b5f813590506103ce816103aa565b92915050565b6103dd816102f7565b81146103e7575f5ffd5b50565b5f813590506103f8816103d4565b92915050565b5f5f5f5f6080858703121561041657610415610370565b5b5f6104238782880161038a565b9450506020610434878288016103c0565b9350506040610445878288016103c0565b9250506060610456878288016103ea565b91505092959194509250565b61046b8161029f565b8114610475575f5ffd5b50565b5f8135905061048681610462565b92915050565b5f602082840312156104a1576104a0610370565b5b5f6104ae84828501610478565b91505092915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f6104ee826102f7565b91506104f9836102f7565b925082820190506fffffffffffffffffffffffffffffffff811115610521576105206104b7565b5b92915050565b5f819050919050565b5f819050919050565b5f819050919050565b5f61055c61055761055284610527565b610539565b610530565b9050919050565b61056c81610542565b82525050565b5f6080820190506105855f8301876102cf565b6105926020830186610312565b61059f6040830185610563565b6105ac6060830184610563565b95945050505050565b6105be8161029f565b82525050565b6105cd8161039e565b82525050565b5f6040820190506105e65f8301856105b5565b6105f360208301846105c4565b939250505056fea2646970667358221220ed63fe890f9816856ae5c5b059064c95931328b3a4d4e05fc390c02f872495f264736f6c634300081e0033 + /// ``` + #[rustfmt::skip] + #[allow(clippy::all)] + pub static BYTECODE: alloy_sol_types::private::Bytes = alloy_sol_types::private::Bytes::from_static( + b"`\xE0`@R4\x80\x15a\0\x0FW__\xFD[P`@Qa\x07\xF38\x03\x80a\x07\xF3\x839\x81\x81\x01`@R\x81\x01\x90a\x001\x91\x90a\x01IV[\x82s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16`\x80\x81s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x81RPP\x81s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16`\xA0\x81s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x81RPP\x80b\xFF\xFF\xFF\x16`\xC0\x81b\xFF\xFF\xFF\x16\x81RPPPPPa\x01\x99V[__\xFD[_s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x82\x16\x90P\x91\x90PV[_a\0\xE0\x82a\0\xB7V[\x90P\x91\x90PV[a\0\xF0\x81a\0\xD6V[\x81\x14a\0\xFAW__\xFD[PV[_\x81Q\x90Pa\x01\x0B\x81a\0\xE7V[\x92\x91PPV[_b\xFF\xFF\xFF\x82\x16\x90P\x91\x90PV[a\x01(\x81a\x01\x11V[\x81\x14a\x012W__\xFD[PV[_\x81Q\x90Pa\x01C\x81a\x01\x1FV[\x92\x91PPV[___``\x84\x86\x03\x12\x15a\x01`Wa\x01_a\0\xB3V[[_a\x01m\x86\x82\x87\x01a\0\xFDV[\x93PP` a\x01~\x86\x82\x87\x01a\0\xFDV[\x92PP`@a\x01\x8F\x86\x82\x87\x01a\x015V[\x91PP\x92P\x92P\x92V[`\x80Q`\xA0Q`\xC0Qa\x060a\x01\xC3_9_a\x01~\x01R_a\x01Z\x01R_a\x01\x16\x01Ra\x060_\xF3\xFE`\x80`@R4\x80\x15a\0\x0FW__\xFD[P`\x046\x10a\0`W_5`\xE0\x1C\x80c\r\xFE\x16\x81\x14a\0dW\x80c\x1Ahe\x02\x14a\0\x82W\x80c\xD2\x12 \xA7\x14a\0\xA0W\x80c\xDD\xCA?C\x14a\0\xBEW\x80c\xEF\xE2\x7F\xA3\x14a\0\xDCW\x80c\xF67s\x1D\x14a\0\xF8W[__\xFD[a\0la\x01\x14V[`@Qa\0y\x91\x90a\x02\xDEV[`@Q\x80\x91\x03\x90\xF3[a\0\x8Aa\x018V[`@Qa\0\x97\x91\x90a\x03!V[`@Q\x80\x91\x03\x90\xF3[a\0\xA8a\x01XV[`@Qa\0\xB5\x91\x90a\x02\xDEV[`@Q\x80\x91\x03\x90\xF3[a\0\xC6a\x01|V[`@Qa\0\xD3\x91\x90a\x03WV[`@Q\x80\x91\x03\x90\xF3[a\0\xF6`\x04\x806\x03\x81\x01\x90a\0\xF1\x91\x90a\x03\xFEV[a\x01\xA0V[\0[a\x01\x12`\x04\x806\x03\x81\x01\x90a\x01\r\x91\x90a\x04\x8CV[a\x02cV[\0[\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\x81V[__\x90T\x90a\x01\0\n\x90\x04o\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x81V[\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\x81V[\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\x81V[\x80__\x82\x82\x82\x90T\x90a\x01\0\n\x90\x04o\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16a\x01\xCB\x91\x90a\x04\xE4V[\x92Pa\x01\0\n\x81T\x81o\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x02\x19\x16\x90\x83o\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x02\x17\x90UP\x81`\x02\x0B\x83`\x02\x0B\x85s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x7FzS\x08\x0B\xA4\x14\x15\x8B\xE7\xECi\xB9\x87\xB5\xFB}\x07\xDE\xE1\x01\xFE\x85H\x8F\x08S\xAE\x16#\x9D\x0B\xDE3\x85__`@Qa\x02U\x94\x93\x92\x91\x90a\x05rV[`@Q\x80\x91\x03\x90\xA4PPPPV[\x7F\x98c`6\xCBf\xA9\xC1\x9A7C^\xFC\x1E\x90\x14!\x90!N\x8A\xBE\xB8!\xBD\xBA?)\x90\xDDL\x95\x81_`@Qa\x02\x94\x92\x91\x90a\x05\xD3V[`@Q\x80\x91\x03\x90\xA1PV[_s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x82\x16\x90P\x91\x90PV[_a\x02\xC8\x82a\x02\x9FV[\x90P\x91\x90PV[a\x02\xD8\x81a\x02\xBEV[\x82RPPV[_` \x82\x01\x90Pa\x02\xF1_\x83\x01\x84a\x02\xCFV[\x92\x91PPV[_o\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x82\x16\x90P\x91\x90PV[a\x03\x1B\x81a\x02\xF7V[\x82RPPV[_` \x82\x01\x90Pa\x034_\x83\x01\x84a\x03\x12V[\x92\x91PPV[_b\xFF\xFF\xFF\x82\x16\x90P\x91\x90PV[a\x03Q\x81a\x03:V[\x82RPPV[_` \x82\x01\x90Pa\x03j_\x83\x01\x84a\x03HV[\x92\x91PPV[__\xFD[a\x03}\x81a\x02\xBEV[\x81\x14a\x03\x87W__\xFD[PV[_\x815\x90Pa\x03\x98\x81a\x03tV[\x92\x91PPV[_\x81`\x02\x0B\x90P\x91\x90PV[a\x03\xB3\x81a\x03\x9EV[\x81\x14a\x03\xBDW__\xFD[PV[_\x815\x90Pa\x03\xCE\x81a\x03\xAAV[\x92\x91PPV[a\x03\xDD\x81a\x02\xF7V[\x81\x14a\x03\xE7W__\xFD[PV[_\x815\x90Pa\x03\xF8\x81a\x03\xD4V[\x92\x91PPV[____`\x80\x85\x87\x03\x12\x15a\x04\x16Wa\x04\x15a\x03pV[[_a\x04#\x87\x82\x88\x01a\x03\x8AV[\x94PP` a\x044\x87\x82\x88\x01a\x03\xC0V[\x93PP`@a\x04E\x87\x82\x88\x01a\x03\xC0V[\x92PP``a\x04V\x87\x82\x88\x01a\x03\xEAV[\x91PP\x92\x95\x91\x94P\x92PV[a\x04k\x81a\x02\x9FV[\x81\x14a\x04uW__\xFD[PV[_\x815\x90Pa\x04\x86\x81a\x04bV[\x92\x91PPV[_` \x82\x84\x03\x12\x15a\x04\xA1Wa\x04\xA0a\x03pV[[_a\x04\xAE\x84\x82\x85\x01a\x04xV[\x91PP\x92\x91PPV[\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\x04\xEE\x82a\x02\xF7V[\x91Pa\x04\xF9\x83a\x02\xF7V[\x92P\x82\x82\x01\x90Po\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x11\x15a\x05!Wa\x05 a\x04\xB7V[[\x92\x91PPV[_\x81\x90P\x91\x90PV[_\x81\x90P\x91\x90PV[_\x81\x90P\x91\x90PV[_a\x05\\a\x05Wa\x05R\x84a\x05'V[a\x059V[a\x050V[\x90P\x91\x90PV[a\x05l\x81a\x05BV[\x82RPPV[_`\x80\x82\x01\x90Pa\x05\x85_\x83\x01\x87a\x02\xCFV[a\x05\x92` \x83\x01\x86a\x03\x12V[a\x05\x9F`@\x83\x01\x85a\x05cV[a\x05\xAC``\x83\x01\x84a\x05cV[\x95\x94PPPPPV[a\x05\xBE\x81a\x02\x9FV[\x82RPPV[a\x05\xCD\x81a\x03\x9EV[\x82RPPV[_`@\x82\x01\x90Pa\x05\xE6_\x83\x01\x85a\x05\xB5V[a\x05\xF3` \x83\x01\x84a\x05\xC4V[\x93\x92PPPV\xFE\xA2dipfsX\"\x12 \xEDc\xFE\x89\x0F\x98\x16\x85j\xE5\xC5\xB0Y\x06L\x95\x93\x13(\xB3\xA4\xD4\xE0_\xC3\x90\xC0/\x87$\x95\xF2dsolcC\0\x08\x1E\x003", + ); + /// The runtime bytecode of the contract, as deployed on the network. + /// + /// ```text + ///0x608060405234801561000f575f5ffd5b5060043610610060575f3560e01c80630dfe1681146100645780631a68650214610082578063d21220a7146100a0578063ddca3f43146100be578063efe27fa3146100dc578063f637731d146100f8575b5f5ffd5b61006c610114565b60405161007991906102de565b60405180910390f35b61008a610138565b6040516100979190610321565b60405180910390f35b6100a8610158565b6040516100b591906102de565b60405180910390f35b6100c661017c565b6040516100d39190610357565b60405180910390f35b6100f660048036038101906100f191906103fe565b6101a0565b005b610112600480360381019061010d919061048c565b610263565b005b7f000000000000000000000000000000000000000000000000000000000000000081565b5f5f9054906101000a90046fffffffffffffffffffffffffffffffff1681565b7f000000000000000000000000000000000000000000000000000000000000000081565b7f000000000000000000000000000000000000000000000000000000000000000081565b805f5f8282829054906101000a90046fffffffffffffffffffffffffffffffff166101cb91906104e4565b92506101000a8154816fffffffffffffffffffffffffffffffff02191690836fffffffffffffffffffffffffffffffff1602179055508160020b8360020b8573ffffffffffffffffffffffffffffffffffffffff167f7a53080ba414158be7ec69b987b5fb7d07dee101fe85488f0853ae16239d0bde33855f5f6040516102559493929190610572565b60405180910390a450505050565b7f98636036cb66a9c19a37435efc1e90142190214e8abeb821bdba3f2990dd4c95815f6040516102949291906105d3565b60405180910390a150565b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f6102c88261029f565b9050919050565b6102d8816102be565b82525050565b5f6020820190506102f15f8301846102cf565b92915050565b5f6fffffffffffffffffffffffffffffffff82169050919050565b61031b816102f7565b82525050565b5f6020820190506103345f830184610312565b92915050565b5f62ffffff82169050919050565b6103518161033a565b82525050565b5f60208201905061036a5f830184610348565b92915050565b5f5ffd5b61037d816102be565b8114610387575f5ffd5b50565b5f8135905061039881610374565b92915050565b5f8160020b9050919050565b6103b38161039e565b81146103bd575f5ffd5b50565b5f813590506103ce816103aa565b92915050565b6103dd816102f7565b81146103e7575f5ffd5b50565b5f813590506103f8816103d4565b92915050565b5f5f5f5f6080858703121561041657610415610370565b5b5f6104238782880161038a565b9450506020610434878288016103c0565b9350506040610445878288016103c0565b9250506060610456878288016103ea565b91505092959194509250565b61046b8161029f565b8114610475575f5ffd5b50565b5f8135905061048681610462565b92915050565b5f602082840312156104a1576104a0610370565b5b5f6104ae84828501610478565b91505092915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f6104ee826102f7565b91506104f9836102f7565b925082820190506fffffffffffffffffffffffffffffffff811115610521576105206104b7565b5b92915050565b5f819050919050565b5f819050919050565b5f819050919050565b5f61055c61055761055284610527565b610539565b610530565b9050919050565b61056c81610542565b82525050565b5f6080820190506105855f8301876102cf565b6105926020830186610312565b61059f6040830185610563565b6105ac6060830184610563565b95945050505050565b6105be8161029f565b82525050565b6105cd8161039e565b82525050565b5f6040820190506105e65f8301856105b5565b6105f360208301846105c4565b939250505056fea2646970667358221220ed63fe890f9816856ae5c5b059064c95931328b3a4d4e05fc390c02f872495f264736f6c634300081e0033 + /// ``` + #[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\0`W_5`\xE0\x1C\x80c\r\xFE\x16\x81\x14a\0dW\x80c\x1Ahe\x02\x14a\0\x82W\x80c\xD2\x12 \xA7\x14a\0\xA0W\x80c\xDD\xCA?C\x14a\0\xBEW\x80c\xEF\xE2\x7F\xA3\x14a\0\xDCW\x80c\xF67s\x1D\x14a\0\xF8W[__\xFD[a\0la\x01\x14V[`@Qa\0y\x91\x90a\x02\xDEV[`@Q\x80\x91\x03\x90\xF3[a\0\x8Aa\x018V[`@Qa\0\x97\x91\x90a\x03!V[`@Q\x80\x91\x03\x90\xF3[a\0\xA8a\x01XV[`@Qa\0\xB5\x91\x90a\x02\xDEV[`@Q\x80\x91\x03\x90\xF3[a\0\xC6a\x01|V[`@Qa\0\xD3\x91\x90a\x03WV[`@Q\x80\x91\x03\x90\xF3[a\0\xF6`\x04\x806\x03\x81\x01\x90a\0\xF1\x91\x90a\x03\xFEV[a\x01\xA0V[\0[a\x01\x12`\x04\x806\x03\x81\x01\x90a\x01\r\x91\x90a\x04\x8CV[a\x02cV[\0[\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\x81V[__\x90T\x90a\x01\0\n\x90\x04o\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x81V[\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\x81V[\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\x81V[\x80__\x82\x82\x82\x90T\x90a\x01\0\n\x90\x04o\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16a\x01\xCB\x91\x90a\x04\xE4V[\x92Pa\x01\0\n\x81T\x81o\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x02\x19\x16\x90\x83o\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x02\x17\x90UP\x81`\x02\x0B\x83`\x02\x0B\x85s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x7FzS\x08\x0B\xA4\x14\x15\x8B\xE7\xECi\xB9\x87\xB5\xFB}\x07\xDE\xE1\x01\xFE\x85H\x8F\x08S\xAE\x16#\x9D\x0B\xDE3\x85__`@Qa\x02U\x94\x93\x92\x91\x90a\x05rV[`@Q\x80\x91\x03\x90\xA4PPPPV[\x7F\x98c`6\xCBf\xA9\xC1\x9A7C^\xFC\x1E\x90\x14!\x90!N\x8A\xBE\xB8!\xBD\xBA?)\x90\xDDL\x95\x81_`@Qa\x02\x94\x92\x91\x90a\x05\xD3V[`@Q\x80\x91\x03\x90\xA1PV[_s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x82\x16\x90P\x91\x90PV[_a\x02\xC8\x82a\x02\x9FV[\x90P\x91\x90PV[a\x02\xD8\x81a\x02\xBEV[\x82RPPV[_` \x82\x01\x90Pa\x02\xF1_\x83\x01\x84a\x02\xCFV[\x92\x91PPV[_o\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x82\x16\x90P\x91\x90PV[a\x03\x1B\x81a\x02\xF7V[\x82RPPV[_` \x82\x01\x90Pa\x034_\x83\x01\x84a\x03\x12V[\x92\x91PPV[_b\xFF\xFF\xFF\x82\x16\x90P\x91\x90PV[a\x03Q\x81a\x03:V[\x82RPPV[_` \x82\x01\x90Pa\x03j_\x83\x01\x84a\x03HV[\x92\x91PPV[__\xFD[a\x03}\x81a\x02\xBEV[\x81\x14a\x03\x87W__\xFD[PV[_\x815\x90Pa\x03\x98\x81a\x03tV[\x92\x91PPV[_\x81`\x02\x0B\x90P\x91\x90PV[a\x03\xB3\x81a\x03\x9EV[\x81\x14a\x03\xBDW__\xFD[PV[_\x815\x90Pa\x03\xCE\x81a\x03\xAAV[\x92\x91PPV[a\x03\xDD\x81a\x02\xF7V[\x81\x14a\x03\xE7W__\xFD[PV[_\x815\x90Pa\x03\xF8\x81a\x03\xD4V[\x92\x91PPV[____`\x80\x85\x87\x03\x12\x15a\x04\x16Wa\x04\x15a\x03pV[[_a\x04#\x87\x82\x88\x01a\x03\x8AV[\x94PP` a\x044\x87\x82\x88\x01a\x03\xC0V[\x93PP`@a\x04E\x87\x82\x88\x01a\x03\xC0V[\x92PP``a\x04V\x87\x82\x88\x01a\x03\xEAV[\x91PP\x92\x95\x91\x94P\x92PV[a\x04k\x81a\x02\x9FV[\x81\x14a\x04uW__\xFD[PV[_\x815\x90Pa\x04\x86\x81a\x04bV[\x92\x91PPV[_` \x82\x84\x03\x12\x15a\x04\xA1Wa\x04\xA0a\x03pV[[_a\x04\xAE\x84\x82\x85\x01a\x04xV[\x91PP\x92\x91PPV[\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\x04\xEE\x82a\x02\xF7V[\x91Pa\x04\xF9\x83a\x02\xF7V[\x92P\x82\x82\x01\x90Po\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x11\x15a\x05!Wa\x05 a\x04\xB7V[[\x92\x91PPV[_\x81\x90P\x91\x90PV[_\x81\x90P\x91\x90PV[_\x81\x90P\x91\x90PV[_a\x05\\a\x05Wa\x05R\x84a\x05'V[a\x059V[a\x050V[\x90P\x91\x90PV[a\x05l\x81a\x05BV[\x82RPPV[_`\x80\x82\x01\x90Pa\x05\x85_\x83\x01\x87a\x02\xCFV[a\x05\x92` \x83\x01\x86a\x03\x12V[a\x05\x9F`@\x83\x01\x85a\x05cV[a\x05\xAC``\x83\x01\x84a\x05cV[\x95\x94PPPPPV[a\x05\xBE\x81a\x02\x9FV[\x82RPPV[a\x05\xCD\x81a\x03\x9EV[\x82RPPV[_`@\x82\x01\x90Pa\x05\xE6_\x83\x01\x85a\x05\xB5V[a\x05\xF3` \x83\x01\x84a\x05\xC4V[\x93\x92PPPV\xFE\xA2dipfsX\"\x12 \xEDc\xFE\x89\x0F\x98\x16\x85j\xE5\xC5\xB0Y\x06L\x95\x93\x13(\xB3\xA4\xD4\xE0_\xC3\x90\xC0/\x87$\x95\xF2dsolcC\0\x08\x1E\x003", + ); + #[derive(Default, Debug, PartialEq, Eq, Hash)] + /**Event with signature `Initialize(uint160,int24)` and selector `0x98636036cb66a9c19a37435efc1e90142190214e8abeb821bdba3f2990dd4c95`. + ```solidity + event Initialize(uint160 sqrtPriceX96, int24 tick); + ```*/ + #[allow( + non_camel_case_types, + non_snake_case, + clippy::pub_underscore_fields, + clippy::style + )] + #[derive(Clone)] + pub struct Initialize { + #[allow(missing_docs)] + pub sqrtPriceX96: alloy_sol_types::private::primitives::aliases::U160, + #[allow(missing_docs)] + pub tick: alloy_sol_types::private::primitives::aliases::I24, + } + #[allow( + non_camel_case_types, + non_snake_case, + clippy::pub_underscore_fields, + clippy::style + )] + const _: () = { + use alloy_sol_types; + #[automatically_derived] + impl alloy_sol_types::SolEvent for Initialize { + type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + type DataTuple<'a> = ( + alloy_sol_types::sol_data::Uint<160>, + alloy_sol_types::sol_data::Int<24>, + ); + type TopicList = (alloy_sol_types::sol_data::FixedBytes<32>,); + + const ANONYMOUS: bool = false; + const SIGNATURE: &'static str = "Initialize(uint160,int24)"; + const SIGNATURE_HASH: alloy_sol_types::private::B256 = + alloy_sol_types::private::B256::new([ + 152u8, 99u8, 96u8, 54u8, 203u8, 102u8, 169u8, 193u8, 154u8, 55u8, 67u8, 94u8, + 252u8, 30u8, 144u8, 20u8, 33u8, 144u8, 33u8, 78u8, 138u8, 190u8, 184u8, 33u8, + 189u8, 186u8, 63u8, 41u8, 144u8, 221u8, 76u8, 149u8, + ]); + + #[allow(unused_variables)] + #[inline] + fn new( + topics: ::RustType, + data: as alloy_sol_types::SolType>::RustType, + ) -> Self { + Self { + sqrtPriceX96: data.0, + tick: 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.sqrtPriceX96, + ), + as alloy_sol_types::SolType>::tokenize( + &self.tick, + ), + ) + } + + #[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 Initialize { + 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<&Initialize> for alloy_sol_types::private::LogData { + #[inline] + fn from(this: &Initialize) -> alloy_sol_types::private::LogData { + alloy_sol_types::SolEvent::encode_log_data(this) + } + } + }; + #[derive(Default, Debug, PartialEq, Eq, Hash)] + /**Event with signature `Mint(address,address,int24,int24,uint128,uint256,uint256)` and selector `0x7a53080ba414158be7ec69b987b5fb7d07dee101fe85488f0853ae16239d0bde`. + ```solidity + event Mint(address sender, address indexed owner, int24 indexed tickLower, int24 indexed tickUpper, uint128 amount, uint256 amount0, uint256 amount1); + ```*/ + #[allow( + non_camel_case_types, + non_snake_case, + clippy::pub_underscore_fields, + clippy::style + )] + #[derive(Clone)] + pub struct Mint { + #[allow(missing_docs)] + pub sender: alloy_sol_types::private::Address, + #[allow(missing_docs)] + pub owner: alloy_sol_types::private::Address, + #[allow(missing_docs)] + pub tickLower: alloy_sol_types::private::primitives::aliases::I24, + #[allow(missing_docs)] + pub tickUpper: alloy_sol_types::private::primitives::aliases::I24, + #[allow(missing_docs)] + pub amount: u128, + #[allow(missing_docs)] + pub amount0: alloy_sol_types::private::primitives::aliases::U256, + #[allow(missing_docs)] + pub amount1: 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; + #[automatically_derived] + impl alloy_sol_types::SolEvent for Mint { + type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + type DataTuple<'a> = ( + alloy_sol_types::sol_data::Address, + alloy_sol_types::sol_data::Uint<128>, + alloy_sol_types::sol_data::Uint<256>, + alloy_sol_types::sol_data::Uint<256>, + ); + type TopicList = ( + alloy_sol_types::sol_data::FixedBytes<32>, + alloy_sol_types::sol_data::Address, + alloy_sol_types::sol_data::Int<24>, + alloy_sol_types::sol_data::Int<24>, + ); + + const ANONYMOUS: bool = false; + const SIGNATURE: &'static str = + "Mint(address,address,int24,int24,uint128,uint256,uint256)"; + const SIGNATURE_HASH: alloy_sol_types::private::B256 = + alloy_sol_types::private::B256::new([ + 122u8, 83u8, 8u8, 11u8, 164u8, 20u8, 21u8, 139u8, 231u8, 236u8, 105u8, 185u8, + 135u8, 181u8, 251u8, 125u8, 7u8, 222u8, 225u8, 1u8, 254u8, 133u8, 72u8, 143u8, + 8u8, 83u8, 174u8, 22u8, 35u8, 157u8, 11u8, 222u8, + ]); + + #[allow(unused_variables)] + #[inline] + fn new( + topics: ::RustType, + data: as alloy_sol_types::SolType>::RustType, + ) -> Self { + Self { + sender: data.0, + owner: topics.1, + tickLower: topics.2, + tickUpper: topics.3, + amount: data.1, + amount0: data.2, + amount1: data.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<'_> { + ( + ::tokenize( + &self.sender, + ), + as alloy_sol_types::SolType>::tokenize( + &self.amount, + ), + as alloy_sol_types::SolType>::tokenize( + &self.amount0, + ), + as alloy_sol_types::SolType>::tokenize( + &self.amount1, + ), + ) + } + + #[inline] + fn topics(&self) -> ::RustType { + ( + Self::SIGNATURE_HASH.into(), + self.owner.clone(), + self.tickLower.clone(), + self.tickUpper.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] = as alloy_sol_types::EventTopic>::encode_topic(&self.tickLower); + out[3usize] = as alloy_sol_types::EventTopic>::encode_topic(&self.tickUpper); + Ok(()) + } + } + #[automatically_derived] + impl alloy_sol_types::private::IntoLogData for Mint { + 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<&Mint> for alloy_sol_types::private::LogData { + #[inline] + fn from(this: &Mint) -> alloy_sol_types::private::LogData { + alloy_sol_types::SolEvent::encode_log_data(this) + } + } + }; + /**Constructor`. + ```solidity + constructor(address _token0, address _token1, uint24 _fee); + ```*/ + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] + #[derive(Clone)] + pub struct constructorCall { + #[allow(missing_docs)] + pub _token0: alloy_sol_types::private::Address, + #[allow(missing_docs)] + pub _token1: alloy_sol_types::private::Address, + #[allow(missing_docs)] + pub _fee: alloy_sol_types::private::primitives::aliases::U24, + } + const _: () = { + use alloy_sol_types; + { + #[doc(hidden)] + #[allow(dead_code)] + type UnderlyingSolTuple<'a> = ( + alloy_sol_types::sol_data::Address, + alloy_sol_types::sol_data::Address, + alloy_sol_types::sol_data::Uint<24>, + ); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = ( + alloy_sol_types::private::Address, + alloy_sol_types::private::Address, + alloy_sol_types::private::primitives::aliases::U24, + ); + #[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._token0, value._token1, value._fee) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for constructorCall { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { + _token0: tuple.0, + _token1: tuple.1, + _fee: 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, + alloy_sol_types::sol_data::Uint<24>, + ); + 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._token0, + ), + ::tokenize( + &self._token1, + ), + as alloy_sol_types::SolType>::tokenize( + &self._fee, + ), + ) + } + } + }; + #[derive(Default, Debug, PartialEq, Eq, Hash)] + /**Function with signature `fee()` and selector `0xddca3f43`. + ```solidity + function fee() external view returns (uint24); + ```*/ + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] + #[derive(Clone)] + pub struct feeCall; + #[derive(Default, Debug, PartialEq, Eq, Hash)] + ///Container type for the return parameters of the [`fee()`](feeCall) + /// function. + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] + #[derive(Clone)] + pub struct feeReturn { + #[allow(missing_docs)] + pub _0: alloy_sol_types::private::primitives::aliases::U24, + } + #[allow( + non_camel_case_types, + non_snake_case, + clippy::pub_underscore_fields, + clippy::style + )] + const _: () = { + use alloy_sol_types; + { + #[doc(hidden)] + #[allow(dead_code)] + 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: feeCall) -> Self { + () + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for feeCall { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self + } + } + } + { + #[doc(hidden)] + #[allow(dead_code)] + type UnderlyingSolTuple<'a> = (alloy_sol_types::sol_data::Uint<24>,); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (alloy_sol_types::private::primitives::aliases::U24,); + #[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: feeReturn) -> Self { + (value._0,) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for feeReturn { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { _0: tuple.0 } + } + } + } + #[automatically_derived] + impl alloy_sol_types::SolCall for feeCall { + type Parameters<'a> = (); + type Return = alloy_sol_types::private::primitives::aliases::U24; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + type ReturnTuple<'a> = (alloy_sol_types::sol_data::Uint<24>,); + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + + const SELECTOR: [u8; 4] = [221u8, 202u8, 63u8, 67u8]; + const SIGNATURE: &'static str = "fee()"; + + #[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: feeReturn = 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: feeReturn = r.into(); + r._0 + }) + } + } + }; + #[derive(Default, Debug, PartialEq, Eq, Hash)] + /**Function with signature `initialize(uint160)` and selector `0xf637731d`. + ```solidity + function initialize(uint160 sqrtPriceX96) external; + ```*/ + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] + #[derive(Clone)] + pub struct initializeCall { + #[allow(missing_docs)] + pub sqrtPriceX96: alloy_sol_types::private::primitives::aliases::U160, + } + ///Container type for the return parameters of the + /// [`initialize(uint160)`](initializeCall) function. + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] + #[derive(Clone)] + pub struct initializeReturn {} + #[allow( + non_camel_case_types, + non_snake_case, + clippy::pub_underscore_fields, + clippy::style + )] + const _: () = { + use alloy_sol_types; + { + #[doc(hidden)] + #[allow(dead_code)] + type UnderlyingSolTuple<'a> = (alloy_sol_types::sol_data::Uint<160>,); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (alloy_sol_types::private::primitives::aliases::U160,); + #[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: initializeCall) -> Self { + (value.sqrtPriceX96,) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for initializeCall { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { + sqrtPriceX96: tuple.0, + } + } + } + } + { + #[doc(hidden)] + #[allow(dead_code)] + 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: initializeReturn) -> Self { + () + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for initializeReturn { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self {} + } + } + } + impl initializeReturn { + fn _tokenize(&self) -> ::ReturnToken<'_> { + () + } + } + #[automatically_derived] + impl alloy_sol_types::SolCall for initializeCall { + type Parameters<'a> = (alloy_sol_types::sol_data::Uint<160>,); + type Return = initializeReturn; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + type ReturnTuple<'a> = (); + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + + const SELECTOR: [u8; 4] = [246u8, 55u8, 115u8, 29u8]; + const SIGNATURE: &'static str = "initialize(uint160)"; + + #[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.sqrtPriceX96, + ), + ) + } + + #[inline] + fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { + initializeReturn::_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(Default, Debug, PartialEq, Eq, Hash)] + /**Function with signature `liquidity()` and selector `0x1a686502`. + ```solidity + function liquidity() external view returns (uint128); + ```*/ + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] + #[derive(Clone)] + pub struct liquidityCall; + #[derive(Default, Debug, PartialEq, Eq, Hash)] + ///Container type for the return parameters of the + /// [`liquidity()`](liquidityCall) function. + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] + #[derive(Clone)] + pub struct liquidityReturn { + #[allow(missing_docs)] + pub _0: u128, + } + #[allow( + non_camel_case_types, + non_snake_case, + clippy::pub_underscore_fields, + clippy::style + )] + const _: () = { + use alloy_sol_types; + { + #[doc(hidden)] + #[allow(dead_code)] + 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: liquidityCall) -> Self { + () + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for liquidityCall { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self + } + } + } + { + #[doc(hidden)] + #[allow(dead_code)] + type UnderlyingSolTuple<'a> = (alloy_sol_types::sol_data::Uint<128>,); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = (u128,); + #[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: liquidityReturn) -> Self { + (value._0,) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for liquidityReturn { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { _0: tuple.0 } + } + } + } + #[automatically_derived] + impl alloy_sol_types::SolCall for liquidityCall { + type Parameters<'a> = (); + type Return = u128; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + type ReturnTuple<'a> = (alloy_sol_types::sol_data::Uint<128>,); + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + + const SELECTOR: [u8; 4] = [26u8, 104u8, 101u8, 2u8]; + const SIGNATURE: &'static str = "liquidity()"; + + #[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: liquidityReturn = 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: liquidityReturn = r.into(); + r._0 + }) + } + } + }; + #[derive(Default, Debug, PartialEq, Eq, Hash)] + /**Function with signature `mockMint(address,int24,int24,uint128)` and selector `0xefe27fa3`. + ```solidity + function mockMint(address owner, int24 tickLower, int24 tickUpper, uint128 amount) external; + ```*/ + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] + #[derive(Clone)] + pub struct mockMintCall { + #[allow(missing_docs)] + pub owner: alloy_sol_types::private::Address, + #[allow(missing_docs)] + pub tickLower: alloy_sol_types::private::primitives::aliases::I24, + #[allow(missing_docs)] + pub tickUpper: alloy_sol_types::private::primitives::aliases::I24, + #[allow(missing_docs)] + pub amount: u128, + } + ///Container type for the return parameters of the + /// [`mockMint(address,int24,int24,uint128)`](mockMintCall) function. + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] + #[derive(Clone)] + pub struct mockMintReturn {} + #[allow( + non_camel_case_types, + non_snake_case, + clippy::pub_underscore_fields, + clippy::style + )] + const _: () = { + use alloy_sol_types; + { + #[doc(hidden)] + #[allow(dead_code)] + type UnderlyingSolTuple<'a> = ( + alloy_sol_types::sol_data::Address, + alloy_sol_types::sol_data::Int<24>, + alloy_sol_types::sol_data::Int<24>, + alloy_sol_types::sol_data::Uint<128>, + ); + #[doc(hidden)] + type UnderlyingRustTuple<'a> = ( + alloy_sol_types::private::Address, + alloy_sol_types::private::primitives::aliases::I24, + alloy_sol_types::private::primitives::aliases::I24, + u128, + ); + #[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: mockMintCall) -> Self { + (value.owner, value.tickLower, value.tickUpper, value.amount) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for mockMintCall { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { + owner: tuple.0, + tickLower: tuple.1, + tickUpper: tuple.2, + amount: tuple.3, + } + } + } + } + { + #[doc(hidden)] + #[allow(dead_code)] + 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: mockMintReturn) -> Self { + () + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for mockMintReturn { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self {} + } + } + } + impl mockMintReturn { + fn _tokenize(&self) -> ::ReturnToken<'_> { + () + } + } + #[automatically_derived] + impl alloy_sol_types::SolCall for mockMintCall { + type Parameters<'a> = ( + alloy_sol_types::sol_data::Address, + alloy_sol_types::sol_data::Int<24>, + alloy_sol_types::sol_data::Int<24>, + alloy_sol_types::sol_data::Uint<128>, + ); + type Return = mockMintReturn; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + type ReturnTuple<'a> = (); + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + + const SELECTOR: [u8; 4] = [239u8, 226u8, 127u8, 163u8]; + const SIGNATURE: &'static str = "mockMint(address,int24,int24,uint128)"; + + #[inline] + fn new<'a>( + tuple: as alloy_sol_types::SolType>::RustType, + ) -> Self { + tuple.into() + } + + #[inline] + fn tokenize(&self) -> Self::Token<'_> { + ( + ::tokenize( + &self.owner, + ), + as alloy_sol_types::SolType>::tokenize( + &self.tickLower, + ), + as alloy_sol_types::SolType>::tokenize( + &self.tickUpper, + ), + as alloy_sol_types::SolType>::tokenize( + &self.amount, + ), + ) + } + + #[inline] + fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { + mockMintReturn::_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(Default, Debug, PartialEq, Eq, Hash)] + /**Function with signature `token0()` and selector `0x0dfe1681`. + ```solidity + function token0() external view returns (address); + ```*/ + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] + #[derive(Clone)] + pub struct token0Call; + #[derive(Default, Debug, PartialEq, Eq, Hash)] + ///Container type for the return parameters of the [`token0()`](token0Call) + /// function. + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] + #[derive(Clone)] + pub struct token0Return { + #[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; + { + #[doc(hidden)] + #[allow(dead_code)] + 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: token0Call) -> Self { + () + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for token0Call { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self + } + } + } + { + #[doc(hidden)] + #[allow(dead_code)] + 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: token0Return) -> Self { + (value._0,) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for token0Return { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { _0: tuple.0 } + } + } + } + #[automatically_derived] + impl alloy_sol_types::SolCall for token0Call { + type Parameters<'a> = (); + type Return = alloy_sol_types::private::Address; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + type ReturnTuple<'a> = (alloy_sol_types::sol_data::Address,); + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + + const SELECTOR: [u8; 4] = [13u8, 254u8, 22u8, 129u8]; + const SIGNATURE: &'static str = "token0()"; + + #[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: token0Return = 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: token0Return = r.into(); + r._0 + }) + } + } + }; + #[derive(Default, Debug, PartialEq, Eq, Hash)] + /**Function with signature `token1()` and selector `0xd21220a7`. + ```solidity + function token1() external view returns (address); + ```*/ + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] + #[derive(Clone)] + pub struct token1Call; + #[derive(Default, Debug, PartialEq, Eq, Hash)] + ///Container type for the return parameters of the [`token1()`](token1Call) + /// function. + #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] + #[derive(Clone)] + pub struct token1Return { + #[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; + { + #[doc(hidden)] + #[allow(dead_code)] + 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: token1Call) -> Self { + () + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for token1Call { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self + } + } + } + { + #[doc(hidden)] + #[allow(dead_code)] + 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: token1Return) -> Self { + (value._0,) + } + } + #[automatically_derived] + #[doc(hidden)] + impl ::core::convert::From> for token1Return { + fn from(tuple: UnderlyingRustTuple<'_>) -> Self { + Self { _0: tuple.0 } + } + } + } + #[automatically_derived] + impl alloy_sol_types::SolCall for token1Call { + type Parameters<'a> = (); + type Return = alloy_sol_types::private::Address; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + type ReturnTuple<'a> = (alloy_sol_types::sol_data::Address,); + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + + const SELECTOR: [u8; 4] = [210u8, 18u8, 32u8, 167u8]; + const SIGNATURE: &'static str = "token1()"; + + #[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: token1Return = 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: token1Return = r.into(); + r._0 + }) + } + } + }; + ///Container for all the [`MockUniswapV3Pool`](self) function calls. + #[derive(Clone)] + pub enum MockUniswapV3PoolCalls { + #[allow(missing_docs)] + fee(feeCall), + #[allow(missing_docs)] + initialize(initializeCall), + #[allow(missing_docs)] + liquidity(liquidityCall), + #[allow(missing_docs)] + mockMint(mockMintCall), + #[allow(missing_docs)] + token0(token0Call), + #[allow(missing_docs)] + token1(token1Call), + } + impl MockUniswapV3PoolCalls { + /// 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]] = &[ + [13u8, 254u8, 22u8, 129u8], + [26u8, 104u8, 101u8, 2u8], + [210u8, 18u8, 32u8, 167u8], + [221u8, 202u8, 63u8, 67u8], + [239u8, 226u8, 127u8, 163u8], + [246u8, 55u8, 115u8, 29u8], + ]; + /// The signatures in the same order as `SELECTORS`. + pub const SIGNATURES: &'static [&'static str] = &[ + ::SIGNATURE, + ::SIGNATURE, + ::SIGNATURE, + ::SIGNATURE, + ::SIGNATURE, + ::SIGNATURE, + ]; + /// The names of the variants in the same order as `SELECTORS`. + pub const VARIANT_NAMES: &'static [&'static str] = &[ + ::core::stringify!(token0), + ::core::stringify!(liquidity), + ::core::stringify!(token1), + ::core::stringify!(fee), + ::core::stringify!(mockMint), + ::core::stringify!(initialize), + ]; + + /// Returns the signature for the given selector, if known. + #[inline] + pub fn signature_by_selector( + selector: [u8; 4usize], + ) -> ::core::option::Option<&'static str> { + match Self::SELECTORS.binary_search(&selector) { + ::core::result::Result::Ok(idx) => { + ::core::option::Option::Some(Self::SIGNATURES[idx]) + } + ::core::result::Result::Err(_) => ::core::option::Option::None, + } + } + + /// Returns the enum variant name for the given selector, if known. + #[inline] + pub fn name_by_selector(selector: [u8; 4usize]) -> ::core::option::Option<&'static str> { + let sig = Self::signature_by_selector(selector)?; + sig.split_once('(').map(|(name, _)| name) + } + } + #[automatically_derived] + impl alloy_sol_types::SolInterface for MockUniswapV3PoolCalls { + const COUNT: usize = 6usize; + const MIN_DATA_LENGTH: usize = 0usize; + const NAME: &'static str = "MockUniswapV3PoolCalls"; + + #[inline] + fn selector(&self) -> [u8; 4] { + match self { + Self::fee(_) => ::SELECTOR, + Self::initialize(_) => ::SELECTOR, + Self::liquidity(_) => ::SELECTOR, + Self::mockMint(_) => ::SELECTOR, + Self::token0(_) => ::SELECTOR, + Self::token1(_) => ::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 token0(data: &[u8]) -> alloy_sol_types::Result { + ::abi_decode_raw(data) + .map(MockUniswapV3PoolCalls::token0) + } + token0 + }, + { + fn liquidity( + data: &[u8], + ) -> alloy_sol_types::Result + { + ::abi_decode_raw(data) + .map(MockUniswapV3PoolCalls::liquidity) + } + liquidity + }, + { + fn token1(data: &[u8]) -> alloy_sol_types::Result { + ::abi_decode_raw(data) + .map(MockUniswapV3PoolCalls::token1) + } + token1 + }, + { + fn fee(data: &[u8]) -> alloy_sol_types::Result { + ::abi_decode_raw(data) + .map(MockUniswapV3PoolCalls::fee) + } + fee + }, + { + fn mockMint( + data: &[u8], + ) -> alloy_sol_types::Result + { + ::abi_decode_raw(data) + .map(MockUniswapV3PoolCalls::mockMint) + } + mockMint + }, + { + fn initialize( + data: &[u8], + ) -> alloy_sol_types::Result + { + ::abi_decode_raw(data) + .map(MockUniswapV3PoolCalls::initialize) + } + initialize + }, + ]; + 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< + MockUniswapV3PoolCalls, + >] = &[ + { + fn token0(data: &[u8]) -> alloy_sol_types::Result { + ::abi_decode_raw_validate(data) + .map(MockUniswapV3PoolCalls::token0) + } + token0 + }, + { + fn liquidity(data: &[u8]) -> alloy_sol_types::Result { + ::abi_decode_raw_validate(data) + .map(MockUniswapV3PoolCalls::liquidity) + } + liquidity + }, + { + fn token1(data: &[u8]) -> alloy_sol_types::Result { + ::abi_decode_raw_validate(data) + .map(MockUniswapV3PoolCalls::token1) + } + token1 + }, + { + fn fee(data: &[u8]) -> alloy_sol_types::Result { + ::abi_decode_raw_validate(data) + .map(MockUniswapV3PoolCalls::fee) + } + fee + }, + { + fn mockMint(data: &[u8]) -> alloy_sol_types::Result { + ::abi_decode_raw_validate(data) + .map(MockUniswapV3PoolCalls::mockMint) + } + mockMint + }, + { + fn initialize(data: &[u8]) -> alloy_sol_types::Result { + ::abi_decode_raw_validate(data) + .map(MockUniswapV3PoolCalls::initialize) + } + initialize + }, + ]; + 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::fee(inner) => ::abi_encoded_size(inner), + Self::initialize(inner) => { + ::abi_encoded_size(inner) + } + Self::liquidity(inner) => { + ::abi_encoded_size(inner) + } + Self::mockMint(inner) => { + ::abi_encoded_size(inner) + } + Self::token0(inner) => { + ::abi_encoded_size(inner) + } + Self::token1(inner) => { + ::abi_encoded_size(inner) + } + } + } + + #[inline] + fn abi_encode_raw(&self, out: &mut alloy_sol_types::private::Vec) { + match self { + Self::fee(inner) => { + ::abi_encode_raw(inner, out) + } + Self::initialize(inner) => { + ::abi_encode_raw(inner, out) + } + Self::liquidity(inner) => { + ::abi_encode_raw(inner, out) + } + Self::mockMint(inner) => { + ::abi_encode_raw(inner, out) + } + Self::token0(inner) => { + ::abi_encode_raw(inner, out) + } + Self::token1(inner) => { + ::abi_encode_raw(inner, out) + } + } + } + } + ///Container for all the [`MockUniswapV3Pool`](self) events. + #[derive(Clone, Debug, PartialEq, Eq, Hash)] + pub enum MockUniswapV3PoolEvents { + #[allow(missing_docs)] + Initialize(Initialize), + #[allow(missing_docs)] + Mint(Mint), + } + impl MockUniswapV3PoolEvents { + /// 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]] = &[ + [ + 122u8, 83u8, 8u8, 11u8, 164u8, 20u8, 21u8, 139u8, 231u8, 236u8, 105u8, 185u8, + 135u8, 181u8, 251u8, 125u8, 7u8, 222u8, 225u8, 1u8, 254u8, 133u8, 72u8, 143u8, 8u8, + 83u8, 174u8, 22u8, 35u8, 157u8, 11u8, 222u8, + ], + [ + 152u8, 99u8, 96u8, 54u8, 203u8, 102u8, 169u8, 193u8, 154u8, 55u8, 67u8, 94u8, + 252u8, 30u8, 144u8, 20u8, 33u8, 144u8, 33u8, 78u8, 138u8, 190u8, 184u8, 33u8, + 189u8, 186u8, 63u8, 41u8, 144u8, 221u8, 76u8, 149u8, + ], + ]; + /// The signatures in the same order as `SELECTORS`. + pub const SIGNATURES: &'static [&'static str] = &[ + ::SIGNATURE, + ::SIGNATURE, + ]; + /// The names of the variants in the same order as `SELECTORS`. + pub const VARIANT_NAMES: &'static [&'static str] = + &[::core::stringify!(Mint), ::core::stringify!(Initialize)]; + + /// Returns the signature for the given selector, if known. + #[inline] + pub fn signature_by_selector( + selector: [u8; 32usize], + ) -> ::core::option::Option<&'static str> { + match Self::SELECTORS.binary_search(&selector) { + ::core::result::Result::Ok(idx) => { + ::core::option::Option::Some(Self::SIGNATURES[idx]) + } + ::core::result::Result::Err(_) => ::core::option::Option::None, + } + } + + /// Returns the enum variant name for the given selector, if known. + #[inline] + pub fn name_by_selector(selector: [u8; 32usize]) -> ::core::option::Option<&'static str> { + let sig = Self::signature_by_selector(selector)?; + sig.split_once('(').map(|(name, _)| name) + } + } + #[automatically_derived] + impl alloy_sol_types::SolEventInterface for MockUniswapV3PoolEvents { + const COUNT: usize = 2usize; + const NAME: &'static str = "MockUniswapV3PoolEvents"; + + 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::Initialize) + } + Some(::SIGNATURE_HASH) => { + ::decode_raw_log(topics, data) + .map(Self::Mint) + } + _ => 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 MockUniswapV3PoolEvents { + fn to_log_data(&self) -> alloy_sol_types::private::LogData { + match self { + Self::Initialize(inner) => { + alloy_sol_types::private::IntoLogData::to_log_data(inner) + } + Self::Mint(inner) => alloy_sol_types::private::IntoLogData::to_log_data(inner), + } + } + + fn into_log_data(self) -> alloy_sol_types::private::LogData { + match self { + Self::Initialize(inner) => { + alloy_sol_types::private::IntoLogData::into_log_data(inner) + } + Self::Mint(inner) => alloy_sol_types::private::IntoLogData::into_log_data(inner), + } + } + } + use alloy_contract; + /**Creates a new wrapper around an on-chain [`MockUniswapV3Pool`](self) contract instance. + + See the [wrapper's documentation](`MockUniswapV3PoolInstance`) 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, + ) -> MockUniswapV3PoolInstance { + MockUniswapV3PoolInstance::::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, N: alloy_contract::private::Network>( + __provider: P, + _token0: alloy_sol_types::private::Address, + _token1: alloy_sol_types::private::Address, + _fee: alloy_sol_types::private::primitives::aliases::U24, + ) -> impl ::core::future::Future>> + { + MockUniswapV3PoolInstance::::deploy(__provider, _token0, _token1, _fee) + } + /**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, + _token0: alloy_sol_types::private::Address, + _token1: alloy_sol_types::private::Address, + _fee: alloy_sol_types::private::primitives::aliases::U24, + ) -> alloy_contract::RawCallBuilder { + MockUniswapV3PoolInstance::::deploy_builder(__provider, _token0, _token1, _fee) + } + /**A [`MockUniswapV3Pool`](self) instance. + + Contains type-safe methods for interacting with an on-chain instance of the + [`MockUniswapV3Pool`](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 MockUniswapV3PoolInstance { + address: alloy_sol_types::private::Address, + provider: P, + _network: ::core::marker::PhantomData, + } + #[automatically_derived] + impl ::core::fmt::Debug for MockUniswapV3PoolInstance { + #[inline] + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { + f.debug_tuple("MockUniswapV3PoolInstance") + .field(&self.address) + .finish() + } + } + /// Instantiation and getters/setters. + impl, N: alloy_contract::private::Network> + MockUniswapV3PoolInstance + { + /**Creates a new wrapper around an on-chain [`MockUniswapV3Pool`](self) contract instance. + + See the [wrapper's documentation](`MockUniswapV3PoolInstance`) for more details.*/ + #[inline] + pub const fn new(address: alloy_sol_types::private::Address, __provider: P) -> Self { + Self { + address, + provider: __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, + _token0: alloy_sol_types::private::Address, + _token1: alloy_sol_types::private::Address, + _fee: alloy_sol_types::private::primitives::aliases::U24, + ) -> alloy_contract::Result> { + let call_builder = Self::deploy_builder(__provider, _token0, _token1, _fee); + 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, + _token0: alloy_sol_types::private::Address, + _token1: alloy_sol_types::private::Address, + _fee: alloy_sol_types::private::primitives::aliases::U24, + ) -> alloy_contract::RawCallBuilder { + alloy_contract::RawCallBuilder::new_raw_deploy( + __provider, + [ + &BYTECODE[..], + &alloy_sol_types::SolConstructor::abi_encode(&constructorCall { + _token0, + _token1, + _fee, + })[..], + ] + .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 MockUniswapV3PoolInstance<&P, N> { + /// Clones the provider and returns a new instance with the cloned + /// provider. + #[inline] + pub fn with_cloned_provider(self) -> MockUniswapV3PoolInstance { + MockUniswapV3PoolInstance { + address: self.address, + provider: ::core::clone::Clone::clone(&self.provider), + _network: ::core::marker::PhantomData, + } + } + } + /// Function calls. + impl, N: alloy_contract::private::Network> + MockUniswapV3PoolInstance + { + /// 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 [`fee`] function. + pub fn fee(&self) -> alloy_contract::SolCallBuilder<&P, feeCall, N> { + self.call_builder(&feeCall) + } + + ///Creates a new call builder for the [`initialize`] function. + pub fn initialize( + &self, + sqrtPriceX96: alloy_sol_types::private::primitives::aliases::U160, + ) -> alloy_contract::SolCallBuilder<&P, initializeCall, N> { + self.call_builder(&initializeCall { sqrtPriceX96 }) + } + + ///Creates a new call builder for the [`liquidity`] function. + pub fn liquidity(&self) -> alloy_contract::SolCallBuilder<&P, liquidityCall, N> { + self.call_builder(&liquidityCall) + } + + ///Creates a new call builder for the [`mockMint`] function. + pub fn mockMint( + &self, + owner: alloy_sol_types::private::Address, + tickLower: alloy_sol_types::private::primitives::aliases::I24, + tickUpper: alloy_sol_types::private::primitives::aliases::I24, + amount: u128, + ) -> alloy_contract::SolCallBuilder<&P, mockMintCall, N> { + self.call_builder(&mockMintCall { + owner, + tickLower, + tickUpper, + amount, + }) + } + + ///Creates a new call builder for the [`token0`] function. + pub fn token0(&self) -> alloy_contract::SolCallBuilder<&P, token0Call, N> { + self.call_builder(&token0Call) + } + + ///Creates a new call builder for the [`token1`] function. + pub fn token1(&self) -> alloy_contract::SolCallBuilder<&P, token1Call, N> { + self.call_builder(&token1Call) + } + } + /// Event filters. + impl, N: alloy_contract::private::Network> + MockUniswapV3PoolInstance + { + /// 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 [`Initialize`] event. + pub fn Initialize_filter(&self) -> alloy_contract::Event<&P, Initialize, N> { + self.event_filter::() + } + + ///Creates a new event filter for the [`Mint`] event. + pub fn Mint_filter(&self) -> alloy_contract::Event<&P, Mint, N> { + self.event_filter::() + } + } +} +pub type Instance = MockUniswapV3Pool::MockUniswapV3PoolInstance<::alloy_provider::DynProvider>; diff --git a/contracts/solidity/Makefile b/contracts/solidity/Makefile index ef57ef6090..046b4fddc4 100644 --- a/contracts/solidity/Makefile +++ b/contracts/solidity/Makefile @@ -18,7 +18,7 @@ CONTRACTS := \ Trader.sol ARTIFACTS := $(patsubst %.sol,$(ARTIFACTDIR)/%.json,$(CONTRACTS)) -TEST_CONTRACTS := Counter.sol GasHog.sol NonStandardERC20Balances.sol RemoteERC20Balances.sol +TEST_CONTRACTS := Counter.sol GasHog.sol MockUniswapV3Factory.sol MockUniswapV3Pool.sol NonStandardERC20Balances.sol RemoteERC20Balances.sol TEST_ARTIFACTS := $(patsubst %.sol,$(ARTIFACTDIR)/%.json,$(TEST_CONTRACTS)) .PHONY: artifacts diff --git a/contracts/solidity/tests/MockUniswapV3Factory.sol b/contracts/solidity/tests/MockUniswapV3Factory.sol new file mode 100644 index 0000000000..7463f07468 --- /dev/null +++ b/contracts/solidity/tests/MockUniswapV3Factory.sol @@ -0,0 +1,32 @@ +// SPDX-License-Identifier: GPL-3.0-or-later +pragma solidity ^0.8.17; + +import "./MockUniswapV3Pool.sol"; + +/// @title Minimal mock of a Uniswap V3 factory for indexer e2e tests. +/// @dev `createPool` deploys a `MockUniswapV3Pool` and emits the same +/// `PoolCreated` event the pool-indexer listens for. +contract MockUniswapV3Factory { + event PoolCreated( + address indexed token0, + address indexed token1, + uint24 indexed fee, + int24 tickSpacing, + address pool + ); + + function createPool( + address tokenA, + address tokenB, + uint24 _fee + ) external returns (address pool) { + (address t0, address t1) = tokenA < tokenB + ? (tokenA, tokenB) + : (tokenB, tokenA); + + MockUniswapV3Pool p = new MockUniswapV3Pool(t0, t1, _fee); + pool = address(p); + + emit PoolCreated(t0, t1, _fee, int24(10), pool); + } +} diff --git a/contracts/solidity/tests/MockUniswapV3Pool.sol b/contracts/solidity/tests/MockUniswapV3Pool.sol new file mode 100644 index 0000000000..f6fe07f059 --- /dev/null +++ b/contracts/solidity/tests/MockUniswapV3Pool.sol @@ -0,0 +1,45 @@ +// SPDX-License-Identifier: GPL-3.0-or-later +pragma solidity ^0.8.17; + +/// @title Minimal mock of a Uniswap V3 pool for indexer e2e tests. +/// @dev Emits the same events the pool-indexer listens for. Only the +/// subset of state that the indexer actually reads is stored. +contract MockUniswapV3Pool { + address public immutable token0; + address public immutable token1; + uint24 public immutable fee; + + uint128 public liquidity; + + event Initialize(uint160 sqrtPriceX96, int24 tick); + + event Mint( + address sender, + address indexed owner, + int24 indexed tickLower, + int24 indexed tickUpper, + uint128 amount, + uint256 amount0, + uint256 amount1 + ); + + constructor(address _token0, address _token1, uint24 _fee) { + token0 = _token0; + token1 = _token1; + fee = _fee; + } + + function initialize(uint160 sqrtPriceX96) external { + emit Initialize(sqrtPriceX96, int24(0)); + } + + function mockMint( + address owner, + int24 tickLower, + int24 tickUpper, + uint128 amount + ) external { + liquidity += amount; + emit Mint(msg.sender, owner, tickLower, tickUpper, amount, 0, 0); + } +} diff --git a/contracts/src/main.rs b/contracts/src/main.rs index 1f4ed17afa..f26afe145c 100644 --- a/contracts/src/main.rs +++ b/contracts/src/main.rs @@ -505,6 +505,8 @@ fn build_module() -> Module { Submodule::new("test") .add_contract(Contract::new("GasHog")) .add_contract(Contract::new("Counter")) + .add_contract(Contract::new("MockUniswapV3Factory")) + .add_contract(Contract::new("MockUniswapV3Pool")) .add_contract(Contract::new("CowProtocolToken").with_networks(networks![ MAINNET => "0xDEf1CA1fb7FBcDC777520aa7f396b4E015F497aB", GNOSIS => "0x177127622c4A00F3d409B75571e12cB3c8973d3c", diff --git a/crates/e2e/tests/e2e/pool_indexer.rs b/crates/e2e/tests/e2e/pool_indexer.rs index 87d3383fe9..8cbf65ef03 100644 --- a/crates/e2e/tests/e2e/pool_indexer.rs +++ b/crates/e2e/tests/e2e/pool_indexer.rs @@ -1,15 +1,13 @@ use { alloy::{ - network::TransactionBuilder, - primitives::{Address, Bytes, aliases::U160}, + primitives::{Address, aliases::U160}, providers::Provider, - rpc::types::TransactionRequest, - sol_types::{SolCall, SolEvent}, + sol_types::SolEvent, }, + contracts::test::{MockUniswapV3Factory, MockUniswapV3Pool}, e2e::setup::{TIMEOUT, run_test, wait_for_condition}, - ethrpc::{AlloyProvider, Web3}, - hex_literal::hex, - pool_indexer::config::{ApiConfig, Configuration, DatabaseConfig, IndexerConfig}, + ethrpc::Web3, + pool_indexer::config::{ApiConfig, Configuration, DatabaseConfig, NetworkConfig, NetworkName}, sqlx::{PgPool, Row}, std::{ net::{Ipv4Addr, SocketAddr, SocketAddrV4}, @@ -30,32 +28,6 @@ const LOCAL_DB_URL: &str = "postgresql://"; // sqrt(1) * 2^96 — valid starting price const INITIAL_SQRT_PRICE: u128 = 79_228_162_514_264_337_593_543_950_336; -// ABI types only (no bytecode — deployment uses raw transactions below). -alloy::sol! { - contract MockUniswapV3Factory { - event PoolCreated( - address indexed token0, - address indexed token1, - uint24 indexed fee, - int24 tickSpacing, - address pool - ); - function createPool(address tokenA, address tokenB, uint24 fee) external returns (address pool); - } - - contract MockUniswapV3Pool { - function initialize(uint160 sqrtPriceX96) external; - function mockMint(address owner, int24 tickLower, int24 tickUpper, uint128 amount) external; - } -} - -// Factory bytecode compiled from Solidity via `forge build`. The factory -// embeds the pool constructor so only one bytecode blob is needed. -const FACTORY_BYTECODE: &[u8] = &hex!("6080604052348015600e575f5ffd5b50610b708061001c5f395ff3fe608060405234801561000f575f5ffd5b5060043610610029575f3560e01c8063a16712951461002d575b5f5ffd5b610047600480360381019061004291906101f2565b61005d565b6040516100549190610251565b60405180910390f35b5f5f5f8473ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff161061009a57848661009d565b85855b915091508181856040516100b09061014f565b6100bc93929190610279565b604051809103905ff0801580156100d5573d5f5f3e3d5ffd5b5092508362ffffff168173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f783cca1c0412dd0d695e784568c96da2e9c22ff989357a2e8b1d9b2b4e6b7118600a8760405161013e9291906102fc565b60405180910390a450509392505050565b6108178061032483390190565b5f5ffd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f61018982610160565b9050919050565b6101998161017f565b81146101a3575f5ffd5b50565b5f813590506101b481610190565b92915050565b5f62ffffff82169050919050565b6101d1816101ba565b81146101db575f5ffd5b50565b5f813590506101ec816101c8565b92915050565b5f5f5f606084860312156102095761020861015c565b5b5f610216868287016101a6565b9350506020610227868287016101a6565b9250506040610238868287016101de565b9150509250925092565b61024b8161017f565b82525050565b5f6020820190506102645f830184610242565b92915050565b610273816101ba565b82525050565b5f60608201905061028c5f830186610242565b6102996020830185610242565b6102a6604083018461026a565b949350505050565b5f819050919050565b5f8160020b9050919050565b5f819050919050565b5f6102e66102e16102dc846102ae565b6102c3565b6102b7565b9050919050565b6102f6816102cc565b82525050565b5f60408201905061030f5f8301856102ed565b61031c6020830184610242565b939250505056fe60e060405234801561000f575f5ffd5b5060405161081738038061081783398181016040528101906100319190610149565b8273ffffffffffffffffffffffffffffffffffffffff1660808173ffffffffffffffffffffffffffffffffffffffff16815250508173ffffffffffffffffffffffffffffffffffffffff1660a08173ffffffffffffffffffffffffffffffffffffffff16815250508062ffffff1660c08162ffffff1681525050505050610199565b5f5ffd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f6100e0826100b7565b9050919050565b6100f0816100d6565b81146100fa575f5ffd5b50565b5f8151905061010b816100e7565b92915050565b5f62ffffff82169050919050565b61012881610111565b8114610132575f5ffd5b50565b5f815190506101438161011f565b92915050565b5f5f5f606084860312156101605761015f6100b3565b5b5f61016d868287016100fd565b935050602061017e868287016100fd565b925050604061018f86828701610135565b9150509250925092565b60805160a05160c0516106546101c35f395f61018101525f61015d01525f61011601526106545ff3fe608060405234801561000f575f5ffd5b5060043610610060575f3560e01c80630dfe1681146100645780631a68650214610082578063d21220a7146100a0578063ddca3f43146100be578063efe27fa3146100dc578063f637731d146100f8575b5f5ffd5b61006c610114565b60405161007991906102e1565b60405180910390f35b61008a610138565b6040516100979190610324565b60405180910390f35b6100a861015b565b6040516100b591906102e1565b60405180910390f35b6100c661017f565b6040516100d3919061035a565b60405180910390f35b6100f660048036038101906100f19190610401565b6101a3565b005b610112600480360381019061010d919061048f565b610266565b005b7f000000000000000000000000000000000000000000000000000000000000000081565b5f5f5f9054906101000a90046fffffffffffffffffffffffffffffffff16905090565b7f000000000000000000000000000000000000000000000000000000000000000081565b7f000000000000000000000000000000000000000000000000000000000000000081565b805f5f8282829054906101000a90046fffffffffffffffffffffffffffffffff166101ce91906104e7565b92506101000a8154816fffffffffffffffffffffffffffffffff02191690836fffffffffffffffffffffffffffffffff1602179055508160020b8360020b8573ffffffffffffffffffffffffffffffffffffffff167f7a53080ba414158be7ec69b987b5fb7d07dee101fe85488f0853ae16239d0bde33855f5f6040516102589493929190610575565b60405180910390a450505050565b7f98636036cb66a9c19a37435efc1e90142190214e8abeb821bdba3f2990dd4c95815f6040516102979291906105f7565b60405180910390a150565b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f6102cb826102a2565b9050919050565b6102db816102c1565b82525050565b5f6020820190506102f45f8301846102d2565b92915050565b5f6fffffffffffffffffffffffffffffffff82169050919050565b61031e816102fa565b82525050565b5f6020820190506103375f830184610315565b92915050565b5f62ffffff82169050919050565b6103548161033d565b82525050565b5f60208201905061036d5f83018461034b565b92915050565b5f5ffd5b610380816102c1565b811461038a575f5ffd5b50565b5f8135905061039b81610377565b92915050565b5f8160020b9050919050565b6103b6816103a1565b81146103c0575f5ffd5b50565b5f813590506103d1816103ad565b92915050565b6103e0816102fa565b81146103ea575f5ffd5b50565b5f813590506103fb816103d7565b92915050565b5f5f5f5f6080858703121561041957610418610373565b5b5f6104268782880161038d565b9450506020610437878288016103c3565b9350506040610448878288016103c3565b9250506060610459878288016103ed565b91505092959194509250565b61046e816102a2565b8114610478575f5ffd5b50565b5f8135905061048981610465565b92915050565b5f602082840312156104a4576104a3610373565b5b5f6104b18482850161047b565b91505092915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f6104f1826102fa565b91506104fc836102fa565b925082820190506fffffffffffffffffffffffffffffffff811115610524576105236104ba565b5b92915050565b5f819050919050565b5f819050919050565b5f819050919050565b5f61055f61055a6105558461052a565b61053c565b610533565b9050919050565b61056f81610545565b82525050565b5f6080820190506105885f8301876102d2565b6105956020830186610315565b6105a26040830185610566565b6105af6060830184610566565b95945050505050565b6105c1816102a2565b82525050565b5f6105e16105dc6105d78461052a565b61053c565b6103a1565b9050919050565b6105f1816105c7565b82525050565b5f60408201905061060a5f8301856105b8565b61061760208301846105e8565b939250505056fea264697066735822122010bef78e190e08820279eb6767095a2311ec4bd8c78aaa73b1854f67600215cf64736f6c634300081e0033a264697066735822122096722dfd3fb9e8ac23cc5b777ddf98ccc7720d61c61583a6e33fa33bcd92287164736f6c634300081e0033"); - -// ── helpers -// ─────────────────────────────────────────────────────────────────── - async fn clear_pool_indexer_tables(db: &PgPool) { sqlx::query( "TRUNCATE uniswap_v3_ticks, uniswap_v3_pool_states, uniswap_v3_pools, \ @@ -96,19 +68,22 @@ async fn start_pool_indexer(factory: Address) { url: LOCAL_DB_URL.to_owned(), max_connections: NonZeroU32::new(5).unwrap(), }, - indexer: IndexerConfig { + networks: vec![NetworkConfig { + name: NetworkName::new("mainnet"), chain_id: 1, rpc_url: "http://127.0.0.1:8545".parse().unwrap(), factory_address: factory, chunk_size: 1000, poll_interval_secs: 1, use_latest: true, - }, + subgraph_url: None, + seed_block: None, + }], api: ApiConfig { bind_address: SocketAddr::V4(SocketAddrV4::new(Ipv4Addr::LOCALHOST, POOL_INDEXER_PORT)), }, }; - let handle = tokio::task::spawn(pool_indexer::run(config, None, None)); + let handle = tokio::task::spawn(pool_indexer::run(config)); wait_for_condition(TIMEOUT, || async { reqwest::get(format!("{POOL_INDEXER_HOST}/health")) .await @@ -125,50 +100,25 @@ fn stop_pool_indexer() { } } -async fn deploy_raw(provider: &AlloyProvider, bytecode: &[u8]) -> Address { - let tx = TransactionRequest::default().with_deploy_code(Bytes::copy_from_slice(bytecode)); - provider - .send_transaction(tx) - .await - .unwrap() - .get_receipt() - .await - .unwrap() - .contract_address - .unwrap() -} - -async fn send_call(provider: &AlloyProvider, to: Address, calldata: Vec) { - let tx = TransactionRequest::default() - .with_to(to) - .with_input(Bytes::from(calldata)); - provider - .send_transaction(tx) - .await - .unwrap() - .get_receipt() - .await - .unwrap(); -} - /// Create and initialise a single pool inside an already-deployed factory. /// `fee` must be unique within the factory for token0/token1 ([1u8;20], /// [2u8;20]). -async fn create_pool(provider: &AlloyProvider, factory_addr: Address, fee: u32) -> Address { +async fn create_pool( + factory: &MockUniswapV3Factory::Instance, + fee: u32, +) -> (Address, MockUniswapV3Pool::Instance) { + let provider = factory.provider(); let token0 = Address::from([1u8; 20]); let token1 = Address::from([2u8; 20]); - send_call( - provider, - factory_addr, - MockUniswapV3Factory::createPoolCall { - tokenA: token0, - tokenB: token1, - fee: alloy::primitives::aliases::U24::from(fee), - } - .abi_encode(), - ) - .await; + factory + .createPool(token0, token1, alloy::primitives::aliases::U24::from(fee)) + .send() + .await + .unwrap() + .get_receipt() + .await + .unwrap(); let block = provider.get_block_number().await.unwrap(); let logs = provider @@ -176,111 +126,57 @@ async fn create_pool(provider: &AlloyProvider, factory_addr: Address, fee: u32) &alloy::rpc::types::Filter::new() .from_block(block) .to_block(block) - .event_signature(MockUniswapV3Factory::PoolCreated::SIGNATURE_HASH), + .event_signature( + MockUniswapV3Factory::MockUniswapV3Factory::PoolCreated::SIGNATURE_HASH, + ), ) .await .unwrap(); - let pool_addr = MockUniswapV3Factory::PoolCreated::decode_log(&logs[0].inner) + let pool_addr = + MockUniswapV3Factory::MockUniswapV3Factory::PoolCreated::decode_log(&logs[0].inner) + .unwrap() + .data + .pool; + + let pool = MockUniswapV3Pool::Instance::new(pool_addr, provider.clone()); + + pool.initialize(U160::from(INITIAL_SQRT_PRICE)) + .send() + .await .unwrap() - .data - .pool; - - send_call( - provider, - pool_addr, - MockUniswapV3Pool::initializeCall { - sqrtPriceX96: U160::from(INITIAL_SQRT_PRICE), - } - .abi_encode(), - ) - .await; - - send_call( - provider, - pool_addr, - MockUniswapV3Pool::mockMintCall { - owner: token0, - tickLower: alloy::primitives::aliases::I24::try_from(-100i32).unwrap(), - tickUpper: alloy::primitives::aliases::I24::try_from(100i32).unwrap(), - amount: 1_000_000u128, - } - .abi_encode(), + .get_receipt() + .await + .unwrap(); + + pool.mockMint( + token0, + alloy::primitives::aliases::I24::try_from(-100i32).unwrap(), + alloy::primitives::aliases::I24::try_from(100i32).unwrap(), + 1_000_000u128, ) - .await; + .send() + .await + .unwrap() + .get_receipt() + .await + .unwrap(); - pool_addr + (pool_addr, pool) } /// Deploy mock V3 contracts and set up a pool with liquidity. -/// Returns `(factory_address, pool_address)`. -async fn deploy_v3(web3: &Web3) -> (Address, Address) { +/// Returns `(factory, pool_address)`. +async fn deploy_univ3(web3: &Web3) -> (MockUniswapV3Factory::Instance, Address) { let provider = &web3.provider; - let factory_addr = deploy_raw(provider, FACTORY_BYTECODE).await; - - // Two fixed addresses used as token0/token1 (sorted). - let token0 = Address::from([1u8; 20]); - let token1 = Address::from([2u8; 20]); - debug_assert!(token0 < token1, "tokens must be sorted"); - - // createPool(token0, token1, 500) → emits PoolCreated + deploys pool. - send_call( - provider, - factory_addr, - MockUniswapV3Factory::createPoolCall { - tokenA: token0, - tokenB: token1, - fee: alloy::primitives::aliases::U24::from(500u32), - } - .abi_encode(), - ) - .await; - - // Read pool address from the PoolCreated log. - let block = provider.get_block_number().await.unwrap(); - let logs = provider - .get_logs( - &alloy::rpc::types::Filter::new() - .from_block(block) - .to_block(block) - .event_signature(MockUniswapV3Factory::PoolCreated::SIGNATURE_HASH), - ) + let factory = MockUniswapV3Factory::Instance::deploy(provider.clone()) .await .unwrap(); - let pool_addr = MockUniswapV3Factory::PoolCreated::decode_log(&logs[0].inner) - .unwrap() - .data - .pool; - - // initialize(sqrtPriceX96) → emits Initialize. - send_call( - provider, - pool_addr, - MockUniswapV3Pool::initializeCall { - sqrtPriceX96: U160::from(INITIAL_SQRT_PRICE), - } - .abi_encode(), - ) - .await; - - // mockMint(...) → emits Mint (indexer also calls pool.liquidity() after). - send_call( - provider, - pool_addr, - MockUniswapV3Pool::mockMintCall { - owner: token0, - tickLower: alloy::primitives::aliases::I24::try_from(-100i32).unwrap(), - tickUpper: alloy::primitives::aliases::I24::try_from(100i32).unwrap(), - amount: 1_000_000u128, - } - .abi_encode(), - ) - .await; - (factory_addr, pool_addr) -} + let (pool_addr, _pool) = create_pool(&factory, 500).await; -// ── Tests ───────────────────────────────────────────────────────────────────── + (factory, pool_addr) +} #[tokio::test] #[ignore] @@ -292,11 +188,12 @@ async fn happy_path(web3: Web3) { let db = PgPool::connect(LOCAL_DB_URL).await.unwrap(); clear_pool_indexer_tables(&db).await; - let (factory, pool_addr) = deploy_v3(&web3).await; + let (factory, pool_addr) = deploy_univ3(&web3).await; + let factory_addr = *factory.address(); let head = web3.provider.get_block_number().await.unwrap(); - seed_checkpoint(&db, factory, 0).await; - start_pool_indexer(factory).await; + seed_checkpoint(&db, factory_addr, 0).await; + start_pool_indexer(factory_addr).await; wait_for_condition(TIMEOUT, || async { let resp = reqwest::get(format!( @@ -355,9 +252,6 @@ async fn happy_path(web3: Web3) { stop_pool_indexer(); } -// ── Test 2: checkpoint resume -// ───────────────────────────────────────────────── - #[tokio::test] #[ignore] async fn local_node_pool_indexer_checkpoint_resume() { @@ -368,11 +262,12 @@ async fn checkpoint_resume(web3: Web3) { let db = PgPool::connect(LOCAL_DB_URL).await.unwrap(); clear_pool_indexer_tables(&db).await; - let (factory, pool_addr) = deploy_v3(&web3).await; + let (factory, pool_addr) = deploy_univ3(&web3).await; + let factory_addr = *factory.address(); let head = web3.provider.get_block_number().await.unwrap(); - seed_checkpoint(&db, factory, 0).await; + seed_checkpoint(&db, factory_addr, 0).await; - start_pool_indexer(factory).await; + start_pool_indexer(factory_addr).await; wait_for_condition(TIMEOUT, || async { let resp = reqwest::get(format!( "{POOL_INDEXER_HOST}/api/v1/mainnet/uniswap/v3/pools" @@ -409,7 +304,7 @@ async fn checkpoint_resume(web3: Web3) { // will see no old handle, so no extra sleep needed. stop_pool_indexer(); - start_pool_indexer(factory).await; + start_pool_indexer(factory_addr).await; wait_for_condition(TIMEOUT, || async { let resp = reqwest::get(format!( "{POOL_INDEXER_HOST}/api/v1/mainnet/uniswap/v3/pools" @@ -463,7 +358,7 @@ async fn checkpoint_resume(web3: Web3) { "SELECT block_number FROM pool_indexer_checkpoints WHERE chain_id = 1 AND contract = $1", ) - .bind(factory.as_slice()) + .bind(factory_addr.as_slice()) .fetch_one(&db) .await .unwrap(); @@ -485,11 +380,12 @@ async fn api_errors(web3: Web3) { let db = PgPool::connect(LOCAL_DB_URL).await.unwrap(); clear_pool_indexer_tables(&db).await; - let (factory, _pool_addr) = deploy_v3(&web3).await; + let (factory, _pool_addr) = deploy_univ3(&web3).await; + let factory_addr = *factory.address(); let head = web3.provider.get_block_number().await.unwrap(); - seed_checkpoint(&db, factory, 0).await; - start_pool_indexer(factory).await; + seed_checkpoint(&db, factory_addr, 0).await; + start_pool_indexer(factory_addr).await; wait_for_condition(TIMEOUT, || async { let resp = reqwest::get(format!( @@ -546,13 +442,14 @@ async fn pagination(web3: Web3) { // Deploy factory + 3 pools (different fee tiers) so pagination has >1 page // to traverse with limit=1. - let (factory, _pool1) = deploy_v3(&web3).await; - create_pool(&web3.provider, factory, 3000).await; - create_pool(&web3.provider, factory, 10_000).await; + let (factory, _pool1) = deploy_univ3(&web3).await; + let factory_addr = *factory.address(); + create_pool(&factory, 3000).await; + create_pool(&factory, 10_000).await; let head = web3.provider.get_block_number().await.unwrap(); - seed_checkpoint(&db, factory, 0).await; + seed_checkpoint(&db, factory_addr, 0).await; - start_pool_indexer(factory).await; + start_pool_indexer(factory_addr).await; wait_for_condition(TIMEOUT, || async { let resp = reqwest::get(format!( diff --git a/crates/pool-indexer/Cargo.toml b/crates/pool-indexer/Cargo.toml index e55e00866e..0271a6468e 100644 --- a/crates/pool-indexer/Cargo.toml +++ b/crates/pool-indexer/Cargo.toml @@ -16,7 +16,7 @@ path = "src/main.rs" [dependencies] alloy = { workspace = true, features = ["providers", "rpc-types", "sol-types"] } -alloy-primitives = { workspace = true, features = ["std"] } +alloy-primitives = { workspace = true, features = ["serde", "std"] } anyhow = { workspace = true } axum = { workspace = true } bigdecimal = { workspace = true } diff --git a/crates/pool-indexer/src/api/mod.rs b/crates/pool-indexer/src/api/mod.rs index ef783b1c35..55ec0fe6a0 100644 --- a/crates/pool-indexer/src/api/mod.rs +++ b/crates/pool-indexer/src/api/mod.rs @@ -1,9 +1,10 @@ pub mod uniswap_v3; use { + crate::config::NetworkName, axum::{Router, http::StatusCode, response::IntoResponse, routing::get}, sqlx::PgPool, - std::sync::Arc, + std::{collections::HashMap, sync::Arc}, tower_http::trace::{DefaultMakeSpan, DefaultOnResponse, TraceLayer}, tracing::Level, }; @@ -11,8 +12,14 @@ use { #[derive(Clone)] pub struct AppState { pub db: PgPool, - pub chain_id: u64, - pub network_name: String, + /// Maps network name → chain_id for all configured networks. + pub networks: HashMap, +} + +impl AppState { + pub fn resolve_network(&self, name: &str) -> Option { + self.networks.get(&NetworkName::new(name)).copied() + } } pub fn router(state: Arc) -> Router { diff --git a/crates/pool-indexer/src/api/uniswap_v3/mod.rs b/crates/pool-indexer/src/api/uniswap_v3/mod.rs index 94623d56f8..7b9cdcf97f 100644 --- a/crates/pool-indexer/src/api/uniswap_v3/mod.rs +++ b/crates/pool-indexer/src/api/uniswap_v3/mod.rs @@ -10,6 +10,14 @@ use { }; pub use {pools::get_pools, ticks::get_ticks}; +/// Serializes any [`Display`](std::fmt::Display) value as a JSON string. +pub(super) fn serialize_display( + value: &T, + serializer: S, +) -> Result { + serializer.serialize_str(&value.to_string()) +} + pub(super) fn internal_error(err: anyhow::Error) -> Response { tracing::error!(?err, "internal error"); StatusCode::INTERNAL_SERVER_ERROR.into_response() diff --git a/crates/pool-indexer/src/api/uniswap_v3/pools.rs b/crates/pool-indexer/src/api/uniswap_v3/pools.rs index 0dd2892703..9f78392026 100644 --- a/crates/pool-indexer/src/api/uniswap_v3/pools.rs +++ b/crates/pool-indexer/src/api/uniswap_v3/pools.rs @@ -1,11 +1,13 @@ use { - super::{internal_error, parse_hex_address}, + super::{internal_error, parse_hex_address, serialize_display}, crate::{api::AppState, db::uniswap_v3 as db}, + alloy_primitives::Address, axum::{ extract::{Path, Query, State}, http::StatusCode, response::{IntoResponse, Json, Response}, }, + bigdecimal::BigDecimal, serde::{Deserialize, Serialize}, std::sync::Arc, }; @@ -38,7 +40,7 @@ pub struct PoolsQuery { #[derive(Serialize)] pub struct TokenInfo { /// Checksummed contract address. - pub id: String, + pub id: Address, #[serde(skip_serializing_if = "Option::is_none")] pub decimals: Option, #[serde(skip_serializing_if = "Option::is_none")] @@ -49,13 +51,16 @@ pub struct TokenInfo { #[derive(Serialize)] pub struct PoolResponse { /// Checksummed pool contract address. - pub id: String, + pub id: Address, pub token0: TokenInfo, pub token1: TokenInfo, /// Fee tier in hundredths of a basis point (e.g. 3000 = 0.3%). - pub fee_tier: String, - pub liquidity: String, - pub sqrt_price: String, + #[serde(serialize_with = "serialize_display")] + pub fee_tier: u32, + #[serde(serialize_with = "serialize_display")] + pub liquidity: BigDecimal, + #[serde(serialize_with = "serialize_display")] + pub sqrt_price: BigDecimal, pub tick: i32, /// Populated only when tick data is explicitly requested. pub ticks: Option>, @@ -72,24 +77,26 @@ pub struct PoolsResponse { pub next_cursor: Option, } -fn pool_row_to_response(r: &db::PoolRow) -> PoolResponse { - PoolResponse { - id: format!("{:?}", r.address), - token0: TokenInfo { - id: format!("{:?}", r.token0), - decimals: r.token0_decimals, - symbol: r.token0_symbol.clone(), - }, - token1: TokenInfo { - id: format!("{:?}", r.token1), - decimals: r.token1_decimals, - symbol: r.token1_symbol.clone(), - }, - fee_tier: r.fee.to_string(), - liquidity: r.liquidity.to_string(), - sqrt_price: r.sqrt_price_x96.to_string(), - tick: r.tick, - ticks: None, +impl From<&db::PoolRow> for PoolResponse { + fn from(r: &db::PoolRow) -> Self { + Self { + id: r.address, + token0: TokenInfo { + id: r.token0, + decimals: r.token0_decimals, + symbol: r.token0_symbol.clone(), + }, + token1: TokenInfo { + id: r.token1, + decimals: r.token1_decimals, + symbol: r.token1_symbol.clone(), + }, + fee_tier: r.fee, + liquidity: r.liquidity.clone(), + sqrt_price: r.sqrt_price_x96.clone(), + tick: r.tick, + ticks: None, + } } } @@ -99,19 +106,20 @@ fn pool_row_to_response(r: &db::PoolRow) -> PoolResponse { /// Results are ordered by liquidity descending; no pagination is applied. async fn search_pools( state: &AppState, + chain_id: u64, block_number: u64, token0: &str, token1: Option<&str>, ) -> Response { let rows = if let Some(token1) = token1 { - db::search_pools_by_pair(&state.db, state.chain_id, token0, token1).await + db::search_pools_by_pair(&state.db, chain_id, token0, token1).await } else { - db::search_pools_by_token(&state.db, state.chain_id, token0).await + db::search_pools_by_token(&state.db, chain_id, token0).await }; match rows { Ok(rows) => Json(PoolsResponse { block_number, - pools: rows.iter().map(pool_row_to_response).collect(), + pools: rows.iter().map(PoolResponse::from).collect(), next_cursor: None, }) .into_response(), @@ -123,7 +131,12 @@ async fn search_pools( /// Fetches `limit + 1` rows to detect whether a next page exists; the extra /// row is stripped from the response and its address is returned as /// `next_cursor`. -async fn list_pools(state: &AppState, block_number: u64, query: &PoolsQuery) -> Response { +async fn list_pools( + state: &AppState, + chain_id: u64, + block_number: u64, + query: &PoolsQuery, +) -> Response { let limit = query.limit.unwrap_or(1000).clamp(1, 5000); let cursor_bytes = match query.after.as_deref().map(parse_hex_address) { @@ -140,8 +153,8 @@ async fn list_pools(state: &AppState, block_number: u64, query: &PoolsQuery) -> // Fetch one extra row to determine if there is a next page. let rows = match cursor_bytes { - Some(cursor) => db::get_pools_after(&state.db, state.chain_id, cursor, limit + 1).await, - None => db::get_pools(&state.db, state.chain_id, limit + 1).await, + Some(cursor) => db::get_pools_after(&state.db, chain_id, cursor, limit + 1).await, + None => db::get_pools(&state.db, chain_id, limit + 1).await, }; let rows = match rows { Ok(rows) => rows, @@ -163,7 +176,7 @@ async fn list_pools(state: &AppState, block_number: u64, query: &PoolsQuery) -> Json(PoolsResponse { block_number, - pools: rows.iter().map(pool_row_to_response).collect(), + pools: rows.iter().map(PoolResponse::from).collect(), next_cursor, }) .into_response() @@ -178,17 +191,25 @@ pub async fn get_pools( Path(network): Path, Query(query): Query, ) -> Response { - if network != state.network_name { - return StatusCode::NOT_FOUND.into_response(); - } - let block_number = match db::get_latest_indexed_block(&state.db, state.chain_id).await { + let chain_id = match state.resolve_network(&network) { + Some(id) => id, + None => return StatusCode::NOT_FOUND.into_response(), + }; + let block_number = match db::get_latest_indexed_block(&state.db, chain_id).await { Ok(Some(block)) => block, Ok(None) => return StatusCode::SERVICE_UNAVAILABLE.into_response(), Err(err) => return internal_error(err), }; if let Some(token0) = query.token0.as_deref() { - return search_pools(&state, block_number, token0, query.token1.as_deref()).await; + return search_pools( + &state, + chain_id, + block_number, + token0, + query.token1.as_deref(), + ) + .await; } - list_pools(&state, block_number, &query).await + list_pools(&state, chain_id, block_number, &query).await } diff --git a/crates/pool-indexer/src/api/uniswap_v3/ticks.rs b/crates/pool-indexer/src/api/uniswap_v3/ticks.rs index b965ea9662..e2bebac9ba 100644 --- a/crates/pool-indexer/src/api/uniswap_v3/ticks.rs +++ b/crates/pool-indexer/src/api/uniswap_v3/ticks.rs @@ -1,11 +1,13 @@ use { - super::{internal_error, parse_hex_address}, + super::{internal_error, parse_hex_address, serialize_display}, crate::{api::AppState, db::uniswap_v3 as db}, + alloy_primitives::Address, axum::{ extract::{Path, State}, http::StatusCode, response::{IntoResponse, Json, Response}, }, + bigdecimal::BigDecimal, serde::Serialize, std::sync::Arc, }; @@ -14,13 +16,23 @@ use { #[derive(Serialize)] pub struct TickEntry { pub tick_idx: i32, - pub liquidity_net: String, + #[serde(serialize_with = "serialize_display")] + pub liquidity_net: BigDecimal, +} + +impl From for TickEntry { + fn from(t: db::TickRow) -> Self { + Self { + tick_idx: t.tick_idx, + liquidity_net: t.liquidity_net, + } + } } #[derive(Serialize)] pub struct TicksResponse { pub block_number: u64, - pub pool: String, + pub pool: Address, pub ticks: Vec, } @@ -28,9 +40,10 @@ pub async fn get_ticks( State(state): State>, Path((network, pool_address)): Path<(String, String)>, ) -> Response { - if network != state.network_name { - return StatusCode::NOT_FOUND.into_response(); - } + let chain_id = match state.resolve_network(&network) { + Some(id) => id, + None => return StatusCode::NOT_FOUND.into_response(), + }; let addr = match parse_hex_address(&pool_address) { Ok(a) => a, Err(_) => { @@ -42,27 +55,21 @@ pub async fn get_ticks( } }; - let block_number = match db::get_latest_indexed_block(&state.db, state.chain_id).await { + let block_number = match db::get_latest_indexed_block(&state.db, chain_id).await { Ok(Some(block)) => block, Ok(None) => return StatusCode::SERVICE_UNAVAILABLE.into_response(), Err(err) => return internal_error(err), }; - let ticks = match db::get_ticks(&state.db, state.chain_id, &addr).await { + let ticks = match db::get_ticks(&state.db, chain_id, &addr).await { Ok(ticks) => ticks, Err(err) => return internal_error(err), }; Json(TicksResponse { block_number, - pool: format!("{:?}", addr), - ticks: ticks - .into_iter() - .map(|t| TickEntry { - tick_idx: t.tick_idx, - liquidity_net: t.liquidity_net.to_string(), - }) - .collect(), + pool: addr, + ticks: ticks.into_iter().map(TickEntry::from).collect(), }) .into_response() } diff --git a/crates/pool-indexer/src/arguments.rs b/crates/pool-indexer/src/arguments.rs index 56ba153ba6..afd005928a 100644 --- a/crates/pool-indexer/src/arguments.rs +++ b/crates/pool-indexer/src/arguments.rs @@ -2,22 +2,6 @@ use std::path::PathBuf; #[derive(clap::Parser)] pub struct Arguments { - #[clap(subcommand)] - pub command: Command, -} - -#[derive(clap::Subcommand)] -pub enum Command { - /// Run the indexer and API server. - Run { - #[clap(long, env)] - config: PathBuf, - /// Subgraph GraphQL endpoint. If provided, seeds the DB from the - /// subgraph before starting the event indexer. - #[clap(long)] - subgraph_url: Option, - /// Block number to seed at (default: subgraph's current block). - #[clap(long)] - seed_block: Option, - }, + #[clap(long, env)] + pub config: PathBuf, } diff --git a/crates/pool-indexer/src/config.rs b/crates/pool-indexer/src/config.rs index 6494c5500c..93d036f06b 100644 --- a/crates/pool-indexer/src/config.rs +++ b/crates/pool-indexer/src/config.rs @@ -3,6 +3,7 @@ use { anyhow::{Context, Result}, serde::Deserialize, std::{ + fmt, net::{Ipv4Addr, SocketAddr, SocketAddrV4}, num::NonZeroU32, path::Path, @@ -27,6 +28,27 @@ fn default_bind_address() -> SocketAddr { SocketAddr::V4(SocketAddrV4::new(Ipv4Addr::UNSPECIFIED, 7777)) } +/// Network identifier used in API routes (e.g. "mainnet", "arbitrum-one"). +#[derive(Debug, Clone, PartialEq, Eq, Hash, Deserialize)] +#[serde(transparent)] +pub struct NetworkName(String); + +impl NetworkName { + pub fn new(name: impl Into) -> Self { + Self(name.into()) + } + + pub fn as_str(&self) -> &str { + &self.0 + } +} + +impl fmt::Display for NetworkName { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + f.write_str(&self.0) + } +} + #[derive(Debug, Deserialize)] #[serde(rename_all = "kebab-case", deny_unknown_fields)] pub struct DatabaseConfig { @@ -37,7 +59,8 @@ pub struct DatabaseConfig { #[derive(Debug, Deserialize)] #[serde(rename_all = "kebab-case", deny_unknown_fields)] -pub struct IndexerConfig { +pub struct NetworkConfig { + pub name: NetworkName, pub chain_id: u64, pub rpc_url: Url, pub factory_address: Address, @@ -50,6 +73,44 @@ pub struct IndexerConfig { /// Anvil). #[serde(skip)] pub use_latest: bool, + /// Subgraph GraphQL endpoint for seeding initial state. If absent, the + /// indexer starts from genesis event indexing. + pub subgraph_url: Option, + /// Block number to seed at. Defaults to the subgraph's current block when + /// `subgraph_url` is set. + pub seed_block: Option, +} + +/// The subset of [`NetworkConfig`] that [`UniswapV3Indexer`] needs. +#[derive(Debug, Deserialize)] +#[serde(rename_all = "kebab-case", deny_unknown_fields)] +pub struct IndexerConfig { + pub chain_id: u64, + pub rpc_url: Url, + pub factory_address: Address, + #[serde(default = "default_chunk_size")] + pub chunk_size: u64, + #[serde(default = "default_poll_interval_secs")] + pub poll_interval_secs: u64, + #[serde(skip)] + pub use_latest: bool, +} + +impl NetworkConfig { + pub fn poll_interval(&self) -> Duration { + Duration::from_secs(self.poll_interval_secs) + } + + pub fn indexer_config(&self) -> IndexerConfig { + IndexerConfig { + chain_id: self.chain_id, + rpc_url: self.rpc_url.clone(), + factory_address: self.factory_address, + chunk_size: self.chunk_size, + poll_interval_secs: self.poll_interval_secs, + use_latest: self.use_latest, + } + } } impl IndexerConfig { @@ -77,7 +138,8 @@ impl Default for ApiConfig { #[serde(rename_all = "kebab-case", deny_unknown_fields)] pub struct Configuration { pub database: DatabaseConfig, - pub indexer: IndexerConfig, + #[serde(rename = "network")] + pub networks: Vec, #[serde(default)] pub api: ApiConfig, } diff --git a/crates/pool-indexer/src/db/uniswap_v3.rs b/crates/pool-indexer/src/db/uniswap_v3.rs index 361ba97b28..12c7a7c19e 100644 --- a/crates/pool-indexer/src/db/uniswap_v3.rs +++ b/crates/pool-indexer/src/db/uniswap_v3.rs @@ -435,24 +435,28 @@ pub struct PoolRow { pub tick: i32, } -fn map_pool_row(r: PgRow) -> Result { - Ok(PoolRow { - address: bytes_to_addr(r.get("address"))?, - token0: bytes_to_addr(r.get("token0"))?, - token1: bytes_to_addr(r.get("token1"))?, - fee: r.get::("fee").cast_unsigned(), - token0_decimals: r - .get::, _>("token0_decimals") - .map(|d| u8::try_from(d).unwrap_or(0)), - token1_decimals: r - .get::, _>("token1_decimals") - .map(|d| u8::try_from(d).unwrap_or(0)), - token0_symbol: r.get("token0_symbol"), - token1_symbol: r.get("token1_symbol"), - sqrt_price_x96: r.get("sqrt_price_x96"), - liquidity: r.get("liquidity"), - tick: r.get("tick"), - }) +impl TryFrom for PoolRow { + type Error = anyhow::Error; + + fn try_from(r: PgRow) -> Result { + Ok(Self { + address: bytes_to_addr(r.get("address"))?, + token0: bytes_to_addr(r.get("token0"))?, + token1: bytes_to_addr(r.get("token1"))?, + fee: r.get::("fee").cast_unsigned(), + token0_decimals: r + .get::, _>("token0_decimals") + .map(|d| u8::try_from(d).unwrap_or(0)), + token1_decimals: r + .get::, _>("token1_decimals") + .map(|d| u8::try_from(d).unwrap_or(0)), + token0_symbol: r.get("token0_symbol"), + token1_symbol: r.get("token1_symbol"), + sqrt_price_x96: r.get("sqrt_price_x96"), + liquidity: r.get("liquidity"), + tick: r.get("tick"), + }) + } } /// Fetches a page of pools ordered by address with their current state. @@ -475,7 +479,7 @@ pub async fn get_pools(pool: &PgPool, chain_id: u64, limit: i64) -> Result LiquidityCache { - let pairs: Vec<(Address, u64)> = logs + let pairs: std::collections::HashSet<_> = logs .iter() .filter_map(|log| { let t = log.topic0()?; @@ -288,8 +288,6 @@ impl UniswapV3Indexer { None } }) - .collect::>() - .into_iter() .collect(); futures::stream::iter(pairs) @@ -431,11 +429,7 @@ async fn fetch_symbol(provider: &AlloyProvider, token: Address) -> Option bool { /// Collects the unique set of token addresses from all `PoolCreated` events /// emitted by `factory` in `logs`. -fn pool_created_token_addresses(factory: Address, logs: &[Log]) -> Vec
{ +fn pool_created_token_addresses( + factory: Address, + logs: &[Log], +) -> std::collections::HashSet
{ logs.iter() .filter_map(|log| { let t = log.topic0()?; @@ -463,13 +460,12 @@ fn pool_created_token_addresses(factory: Address, logs: &[Log]) -> Vec
Some([decoded.data.token0, decoded.data.token1]) }) .flatten() - .collect::>() - .into_iter() .collect() } /// Accumulates per-event-type state changes while iterating over a chunk's /// logs. +#[derive(Default)] struct LogAccumulator { new_pools: HashMap, /// Latest full state per pool, established by `Initialize` or `Swap`. @@ -482,15 +478,6 @@ struct LogAccumulator { } impl LogAccumulator { - fn new() -> Self { - Self { - new_pools: HashMap::new(), - full_states: HashMap::new(), - liq_only: HashMap::new(), - tick_deltas: HashMap::new(), - } - } - /// Records a newly discovered pool, filling token metadata from the /// prefetch caches. fn handle_pool_created( @@ -667,19 +654,18 @@ fn collect_log_changes( dec_cache: &DecimalsCache, sym_cache: &SymbolsCache, ) -> ChunkChanges { - let mut acc = LogAccumulator::new(); + let mut acc = LogAccumulator::default(); for log in logs { let Some(t) = log.topic0() else { continue }; - if *t == PoolCreated::SIGNATURE_HASH && log.address() == factory { - acc.handle_pool_created(log, dec_cache, sym_cache); - } else if *t == Initialize::SIGNATURE_HASH { - acc.handle_initialize(log); - } else if *t == Swap::SIGNATURE_HASH { - acc.handle_swap(log); - } else if *t == Mint::SIGNATURE_HASH { - acc.handle_mint(log, liq_cache); - } else if *t == Burn::SIGNATURE_HASH { - acc.handle_burn(log, liq_cache); + match *t { + t if t == PoolCreated::SIGNATURE_HASH && log.address() == factory => { + acc.handle_pool_created(log, dec_cache, sym_cache); + } + t if t == Initialize::SIGNATURE_HASH => acc.handle_initialize(log), + t if t == Swap::SIGNATURE_HASH => acc.handle_swap(log), + t if t == Mint::SIGNATURE_HASH => acc.handle_mint(log, liq_cache), + t if t == Burn::SIGNATURE_HASH => acc.handle_burn(log, liq_cache), + _ => {} } } acc.into_chunk_changes() diff --git a/crates/pool-indexer/src/run.rs b/crates/pool-indexer/src/run.rs index be2c18a80d..12b888d9f5 100644 --- a/crates/pool-indexer/src/run.rs +++ b/crates/pool-indexer/src/run.rs @@ -1,14 +1,14 @@ use { crate::{ api::AppState, - arguments::{Arguments, Command}, - config::Configuration, + arguments::Arguments, + config::{Configuration, NetworkConfig}, indexer::uniswap_v3::UniswapV3Indexer, }, clap::Parser, ethrpc::{Config as EthRpcConfig, web3}, sqlx::postgres::PgPoolOptions, - std::sync::Arc, + std::{collections::HashSet, sync::Arc}, tokio::task::JoinSet, }; @@ -18,36 +18,25 @@ pub async fn start(args: impl Iterator) { observe::tracing::init::initialize(&observe::Config::new(&log_filter, None, false, None)); observe::panic_hook::install(); - match args.command { - Command::Run { - config, - subgraph_url, - seed_block, - } => { - let config = Configuration::from_path(&config).expect("failed to load configuration"); - tracing::info!("pool-indexer starting"); - run(config, subgraph_url, seed_block).await; - } - } + let config = Configuration::from_path(&args.config).expect("failed to load configuration"); + tracing::info!("pool-indexer starting"); + run(config).await; } -pub async fn run(config: Configuration, subgraph_url: Option, seed_block: Option) { - let db = connect_db(&config).await; +pub async fn run(config: Configuration) { + validate_networks(&config.networks); - let w3 = web3( - EthRpcConfig::default(), - &config.indexer.rpc_url, - Some("pool-indexer"), - ); + let db = connect_db(&config).await; - let poll_interval = config.indexer.poll_interval(); - let chain_id = config.indexer.chain_id; - let indexer = UniswapV3Indexer::new(w3.provider.clone(), db.clone(), &config.indexer); + let networks = config + .networks + .iter() + .map(|n| (n.name.clone(), n.chain_id)) + .collect(); let api_state = Arc::new(AppState { - network_name: chain_id_to_network_name(chain_id), db: db.clone(), - chain_id, + networks, }); let router = crate::api::router(api_state); let bind_address = config.api.bind_address; @@ -55,19 +44,36 @@ pub async fn run(config: Configuration, subgraph_url: Option, seed_block let mut set = JoinSet::new(); set.spawn(async move { serve(router, bind_address).await }); - if let Some(url) = subgraph_url { + for net in config.networks { + let db = db.clone(); + let w3 = web3( + EthRpcConfig::default(), + &net.rpc_url, + Some(&format!("pool-indexer-{}", net.name)), + ); + + let indexer_config = net.indexer_config(); + let poll_interval = net.poll_interval(); + let chain_id = net.chain_id; + let name = net.name.clone(); + let subgraph_url = net.subgraph_url.clone(); + let seed_block = net.seed_block; + + let indexer = UniswapV3Indexer::new(w3.provider.clone(), db.clone(), &indexer_config); + set.spawn(async move { - let seeded_block = crate::seeder::seed(&db, chain_id, &url, seed_block) - .await - .expect("seeding failed"); - indexer - .catch_up(seeded_block) - .await - .expect("catch-up indexing failed"); + tracing::info!(network = %name, chain_id, "starting indexer"); + if let Some(url) = subgraph_url { + let seeded_block = crate::seeder::seed(&db, chain_id, &url, seed_block) + .await + .expect("seeding failed"); + indexer + .catch_up(seeded_block) + .await + .expect("catch-up indexing failed"); + } indexer.run(poll_interval).await }); - } else { - set.spawn(async move { indexer.run(poll_interval).await }); } if let Some(result) = set.join_next().await { @@ -75,15 +81,25 @@ pub async fn run(config: Configuration, subgraph_url: Option, seed_block } } -fn chain_id_to_network_name(chain_id: u64) -> String { - match chain_id { - 1 => "mainnet", - 100 => "gnosis", - 42161 => "arbitrum-one", - 8453 => "base", - _ => "unknown", +fn validate_networks(networks: &[NetworkConfig]) { + assert!( + !networks.is_empty(), + "at least one [[network]] must be configured" + ); + let mut names = HashSet::new(); + let mut chain_ids = HashSet::new(); + for n in networks { + assert!( + names.insert(n.name.as_str()), + "duplicate network name: {}", + n.name, + ); + assert!( + chain_ids.insert(n.chain_id), + "duplicate chain_id: {}", + n.chain_id, + ); } - .to_string() } async fn connect_db(config: &Configuration) -> sqlx::PgPool { From ed87e458bae4a4735f2fa7ae2e71c98db6a63dce Mon Sep 17 00:00:00 2001 From: Jan P Date: Thu, 16 Apr 2026 08:49:53 +0200 Subject: [PATCH 06/80] Move consts to config --- crates/pool-indexer/src/config.rs | 18 +++++++++++ crates/pool-indexer/src/indexer/uniswap_v3.rs | 30 +++++++++++-------- 2 files changed, 35 insertions(+), 13 deletions(-) diff --git a/crates/pool-indexer/src/config.rs b/crates/pool-indexer/src/config.rs index 93d036f06b..b9fa200c87 100644 --- a/crates/pool-indexer/src/config.rs +++ b/crates/pool-indexer/src/config.rs @@ -24,6 +24,14 @@ fn default_poll_interval_secs() -> u64 { 3 } +fn default_fetch_concurrency() -> usize { + 8 +} + +fn default_prefetch_concurrency() -> usize { + 50 +} + fn default_bind_address() -> SocketAddr { SocketAddr::V4(SocketAddrV4::new(Ipv4Addr::UNSPECIFIED, 7777)) } @@ -79,6 +87,10 @@ pub struct NetworkConfig { /// Block number to seed at. Defaults to the subgraph's current block when /// `subgraph_url` is set. pub seed_block: Option, + #[serde(default = "default_fetch_concurrency")] + pub fetch_concurrency: usize, + #[serde(default = "default_prefetch_concurrency")] + pub prefetch_concurrency: usize, } /// The subset of [`NetworkConfig`] that [`UniswapV3Indexer`] needs. @@ -94,6 +106,10 @@ pub struct IndexerConfig { pub poll_interval_secs: u64, #[serde(skip)] pub use_latest: bool, + #[serde(default = "default_fetch_concurrency")] + pub fetch_concurrency: usize, + #[serde(default = "default_prefetch_concurrency")] + pub prefetch_concurrency: usize, } impl NetworkConfig { @@ -109,6 +125,8 @@ impl NetworkConfig { chunk_size: self.chunk_size, poll_interval_secs: self.poll_interval_secs, use_latest: self.use_latest, + fetch_concurrency: self.fetch_concurrency, + prefetch_concurrency: self.prefetch_concurrency, } } } diff --git a/crates/pool-indexer/src/indexer/uniswap_v3.rs b/crates/pool-indexer/src/indexer/uniswap_v3.rs index a76693a687..d9e33f3108 100644 --- a/crates/pool-indexer/src/indexer/uniswap_v3.rs +++ b/crates/pool-indexer/src/indexer/uniswap_v3.rs @@ -26,12 +26,6 @@ type DecimalsCache = HashMap; /// Cached ERC-20 symbol string keyed by token address. type SymbolsCache = HashMap; -/// Number of chunk log-fetches issued concurrently (overlap RPC I/O with DB -/// writes). -const FETCH_CONCURRENCY: usize = 8; -/// Max concurrent eth_calls during prefetch phases. -const PREFETCH_CONCURRENCY: usize = 50; - /// Data for a newly discovered pool, sourced from a `PoolCreated` factory /// event. pub struct NewPoolData { @@ -96,6 +90,8 @@ pub struct UniswapV3Indexer { factory: Address, chunk_size: u64, finality_tag: BlockNumberOrTag, + fetch_concurrency: usize, + prefetch_concurrency: usize, } impl UniswapV3Indexer { @@ -111,6 +107,8 @@ impl UniswapV3Indexer { } else { BlockNumberOrTag::Finalized }, + fetch_concurrency: config.fetch_concurrency, + prefetch_concurrency: config.prefetch_concurrency, } } @@ -119,6 +117,7 @@ impl UniswapV3Indexer { self.provider.clone(), self.db.clone(), self.chain_id, + self.prefetch_concurrency, )); loop { if let Err(err) = self.run_once().await { @@ -193,13 +192,13 @@ impl UniswapV3Indexer { start = end + 1; } - // Fetch up to FETCH_CONCURRENCY chunks' logs in parallel; commit in order. + // Fetch chunks' logs in parallel; commit in order. futures::stream::iter(chunks) .map(|(start, end)| async move { let logs = self.fetch_logs_bisecting(start, end).await?; Ok::<_, anyhow::Error>((start, end, logs)) }) - .buffered(FETCH_CONCURRENCY) + .buffered(self.fetch_concurrency) .try_for_each(|(start, end, logs)| self.commit_chunk(start, end, logs)) .await } @@ -295,7 +294,7 @@ impl UniswapV3Indexer { let liq = fetch_pool_liquidity(&self.provider, addr, block).await; ((addr, block), liq) }) - .buffer_unordered(PREFETCH_CONCURRENCY) + .buffer_unordered(self.prefetch_concurrency) .filter_map(|(key, opt)| async move { opt.map(|v| (key, v)) }) .collect() .await @@ -309,7 +308,7 @@ impl UniswapV3Indexer { let dec = fetch_decimals(&self.provider, token).await; (token, dec) }) - .buffer_unordered(PREFETCH_CONCURRENCY) + .buffer_unordered(self.prefetch_concurrency) .filter_map(|(token, opt)| async move { opt.map(|d| (token, d)) }) .collect() .await @@ -323,7 +322,7 @@ impl UniswapV3Indexer { let sym = fetch_symbol(&self.provider, token).await; (token, sym) }) - .buffer_unordered(PREFETCH_CONCURRENCY) + .buffer_unordered(self.prefetch_concurrency) .filter_map(|(token, opt)| async move { opt.map(|s| (token, s)) }) .collect() .await @@ -372,7 +371,12 @@ async fn fetch_decimals(provider: &AlloyProvider, token: Address) -> Option .ok() } -async fn backfill_symbols(provider: AlloyProvider, db: sqlx::PgPool, chain_id: u64) { +async fn backfill_symbols( + provider: AlloyProvider, + db: sqlx::PgPool, + chain_id: u64, + prefetch_concurrency: usize, +) { let tokens = match db::get_tokens_missing_symbols(&db, chain_id).await { Ok(t) => t, Err(err) => { @@ -401,7 +405,7 @@ async fn backfill_symbols(provider: AlloyProvider, db: sqlx::PgPool, chain_id: u (token, sym) } }) - .buffer_unordered(PREFETCH_CONCURRENCY) + .buffer_unordered(prefetch_concurrency) .filter_map(|(token, opt)| async move { opt.map(|s| (token, s)) }) .collect() .await; From 6e2862038565cb3ce796aaf1a2ef90eafcdb87d4 Mon Sep 17 00:00:00 2001 From: Jan P Date: Fri, 17 Apr 2026 14:42:27 +0200 Subject: [PATCH 07/80] Make migrations optional --- .../pool-indexer/src/api/uniswap_v3/pools.rs | 10 +- crates/pool-indexer/src/indexer/uniswap_v3.rs | 185 ++++++------------ .../sql/V110__pool_indexer_uniswap_v3.sql | 2 + .../sql/V111__pool_indexer_token_symbols.sql | 3 - 4 files changed, 70 insertions(+), 130 deletions(-) delete mode 100644 database/sql/V111__pool_indexer_token_symbols.sql diff --git a/crates/pool-indexer/src/api/uniswap_v3/pools.rs b/crates/pool-indexer/src/api/uniswap_v3/pools.rs index 9f78392026..e78a475d27 100644 --- a/crates/pool-indexer/src/api/uniswap_v3/pools.rs +++ b/crates/pool-indexer/src/api/uniswap_v3/pools.rs @@ -84,12 +84,12 @@ impl From<&db::PoolRow> for PoolResponse { token0: TokenInfo { id: r.token0, decimals: r.token0_decimals, - symbol: r.token0_symbol.clone(), + symbol: non_empty(&r.token0_symbol), }, token1: TokenInfo { id: r.token1, decimals: r.token1_decimals, - symbol: r.token1_symbol.clone(), + symbol: non_empty(&r.token1_symbol), }, fee_tier: r.fee, liquidity: r.liquidity.clone(), @@ -100,6 +100,12 @@ impl From<&db::PoolRow> for PoolResponse { } } +/// Empty strings are a "tried-and-failed" sentinel written by the symbol +/// backfill task; surface them as missing rather than as `""`. +fn non_empty(s: &Option) -> Option { + s.as_ref().filter(|s| !s.is_empty()).cloned() +} + /// Returns all pools whose token symbols match the given filter(s). /// When only `token0` is supplied, matches any pool containing that symbol. /// When both are supplied, both symbols must match (order-independent). diff --git a/crates/pool-indexer/src/indexer/uniswap_v3.rs b/crates/pool-indexer/src/indexer/uniswap_v3.rs index d9e33f3108..bae0d3acf3 100644 --- a/crates/pool-indexer/src/indexer/uniswap_v3.rs +++ b/crates/pool-indexer/src/indexer/uniswap_v3.rs @@ -23,8 +23,6 @@ use { type LiquidityCache = HashMap<(Address, u64), u128>; /// Cached ERC-20 decimal value keyed by token address. type DecimalsCache = HashMap; -/// Cached ERC-20 symbol string keyed by token address. -type SymbolsCache = HashMap; /// Data for a newly discovered pool, sourced from a `PoolCreated` factory /// event. @@ -118,6 +116,7 @@ impl UniswapV3Indexer { self.db.clone(), self.chain_id, self.prefetch_concurrency, + poll_interval, )); loop { if let Err(err) = self.run_once().await { @@ -230,15 +229,16 @@ impl UniswapV3Indexer { #[instrument(skip(self, logs), fields(chunk_start, chunk_end))] async fn commit_chunk(&self, chunk_start: u64, chunk_end: u64, logs: Vec) -> Result<()> { - // Pre-fetch all I/O (liquidity eth_calls + decimals/symbols eth_calls) in - // parallel before opening the DB transaction. - let (liq_cache, dec_cache, sym_cache) = tokio::join!( + // Pre-fetch all I/O (liquidity + decimals eth_calls) in parallel before + // opening the DB transaction. Symbols are intentionally excluded — a + // hung `symbol()` call must never block pool inserts. They're populated + // later by the async backfill task. + let (liq_cache, dec_cache) = tokio::join!( self.prefetch_liquidities(&logs), self.prefetch_decimals(&logs), - self.prefetch_symbols(&logs), ); - let changes = self.collect_changes(&logs, &liq_cache, &dec_cache, &sym_cache); + let changes = self.collect_changes(&logs, &liq_cache, &dec_cache); tracing::debug!( chunk_start, @@ -269,9 +269,8 @@ impl UniswapV3Indexer { logs: &[Log], liq_cache: &LiquidityCache, dec_cache: &DecimalsCache, - sym_cache: &SymbolsCache, ) -> ChunkChanges { - collect_log_changes(self.factory, logs, liq_cache, dec_cache, sym_cache) + collect_log_changes(self.factory, logs, liq_cache, dec_cache) } /// Parallel-fetch liquidity for every unique (pool, block) pair from @@ -314,20 +313,6 @@ impl UniswapV3Indexer { .await } - /// Parallel-fetch ERC-20 symbols for all tokens referenced in PoolCreated - /// events. - async fn prefetch_symbols(&self, logs: &[Log]) -> SymbolsCache { - futures::stream::iter(pool_created_token_addresses(self.factory, logs)) - .map(|token| async move { - let sym = fetch_symbol(&self.provider, token).await; - (token, sym) - }) - .buffer_unordered(self.prefetch_concurrency) - .filter_map(|(token, opt)| async move { opt.map(|s| (token, s)) }) - .collect() - .await - } - async fn fetch_logs(&self, from: u64, to: u64) -> Result> { let topics = FilterSet::from_iter([ PoolCreated::SIGNATURE_HASH, @@ -371,24 +356,40 @@ async fn fetch_decimals(provider: &AlloyProvider, token: Address) -> Option .ok() } +/// Periodically fills in missing `token{0,1}_symbol` values on +/// `uniswap_v3_pools`. Runs forever, sleeping `poll_interval` between passes so +/// newly-indexed pools get their symbols backfilled. +/// +/// Tokens whose `symbol()` call fails (revert, decode error, empty result) are +/// persisted as the empty string so subsequent passes skip them — otherwise we +/// would hammer known-broken tokens on every tick. A process restart re-probes +/// them once (cheap, and useful if the earlier failure was transient). async fn backfill_symbols( provider: AlloyProvider, db: sqlx::PgPool, chain_id: u64, prefetch_concurrency: usize, -) { - let tokens = match db::get_tokens_missing_symbols(&db, chain_id).await { - Ok(t) => t, - Err(err) => { - tracing::warn!( - ?err, - "failed to query tokens missing symbols, skipping backfill" - ); - return; + poll_interval: std::time::Duration, +) -> ! { + loop { + if let Err(err) = run_backfill_pass(&provider, &db, chain_id, prefetch_concurrency).await { + tracing::warn!(?err, "token symbol backfill pass failed"); } - }; + tokio::time::sleep(poll_interval).await; + } +} + +async fn run_backfill_pass( + provider: &AlloyProvider, + db: &sqlx::PgPool, + chain_id: u64, + prefetch_concurrency: usize, +) -> Result<()> { + let tokens = db::get_tokens_missing_symbols(db, chain_id) + .await + .context("get_tokens_missing_symbols")?; if tokens.is_empty() { - return; + return Ok(()); } let total = tokens.len(); tracing::info!(total, "backfilling token symbols"); @@ -398,20 +399,18 @@ async fn backfill_symbols( for chunk in tokens.chunks(500) { let symbols: Vec<(Address, String)> = futures::stream::iter(chunk.iter().copied()) - .map(|token| { - let provider = provider.clone(); - async move { - let sym = fetch_symbol(&provider, token).await; - (token, sym) - } + .map(|token| async move { + // `None` → "" sentinel: marks the token as "tried and failed" so + // the next backfill pass's `IS NULL` filter skips it. + let sym = fetch_symbol(provider, token).await.unwrap_or_default(); + (token, sym) }) .buffer_unordered(prefetch_concurrency) - .filter_map(|(token, opt)| async move { opt.map(|s| (token, s)) }) .collect() .await; for (token, symbol) in &symbols { - match db::set_token_symbol(&db, chain_id, token, symbol).await { + match db::set_token_symbol(db, chain_id, token, symbol).await { Ok(()) => updated += 1, Err(err) => tracing::warn!(%token, ?err, "failed to backfill symbol"), } @@ -421,7 +420,8 @@ async fn backfill_symbols( tracing::info!(processed, total, updated, "token symbol backfill progress"); } - tracing::info!(updated, total, "token symbol backfill complete"); + tracing::info!(updated, total, "token symbol backfill pass complete"); + Ok(()) } async fn fetch_symbol(provider: &AlloyProvider, token: Address) -> Option { @@ -482,14 +482,10 @@ struct LogAccumulator { } impl LogAccumulator { - /// Records a newly discovered pool, filling token metadata from the - /// prefetch caches. - fn handle_pool_created( - &mut self, - log: &Log, - dec_cache: &DecimalsCache, - sym_cache: &SymbolsCache, - ) { + /// Records a newly discovered pool, filling decimals from the prefetch + /// cache. Symbols are left `None` here and populated later by the + /// background backfill task. + fn handle_pool_created(&mut self, log: &Log, dec_cache: &DecimalsCache) { let Ok(decoded) = PoolCreated::decode_log(&log.inner) else { return; }; @@ -508,8 +504,8 @@ impl LogAccumulator { fee: e.fee.to::(), token0_decimals: dec_cache.get(&token0).copied(), token1_decimals: dec_cache.get(&token1).copied(), - token0_symbol: sym_cache.get(&token0).cloned(), - token1_symbol: sym_cache.get(&token1).cloned(), + token0_symbol: None, + token1_symbol: None, created_block, }, ); @@ -656,14 +652,13 @@ fn collect_log_changes( logs: &[Log], liq_cache: &LiquidityCache, dec_cache: &DecimalsCache, - sym_cache: &SymbolsCache, ) -> ChunkChanges { let mut acc = LogAccumulator::default(); for log in logs { let Some(t) = log.topic0() else { continue }; match *t { t if t == PoolCreated::SIGNATURE_HASH && log.address() == factory => { - acc.handle_pool_created(log, dec_cache, sym_cache); + acc.handle_pool_created(log, dec_cache); } t if t == Initialize::SIGNATURE_HASH => acc.handle_initialize(log), t if t == Swap::SIGNATURE_HASH => acc.handle_swap(log), @@ -721,13 +716,7 @@ mod tests { #[test] fn empty_logs_produce_empty_changes() { - let c = collect_log_changes( - FACTORY, - &[], - &Default::default(), - &Default::default(), - &Default::default(), - ); + let c = collect_log_changes(FACTORY, &[], &Default::default(), &Default::default()); assert!(c.new_pools.is_empty()); assert!(c.pool_states.is_empty()); assert!(c.liquidity_updates.is_empty()); @@ -744,13 +733,7 @@ mod tests { pool: POOL, }; let log = make_log(FACTORY, 100, event); - let c = collect_log_changes( - FACTORY, - &[log], - &Default::default(), - &Default::default(), - &Default::default(), - ); + let c = collect_log_changes(FACTORY, &[log], &Default::default(), &Default::default()); assert_eq!(c.new_pools.len(), 1); assert_eq!(c.new_pools[0].address, POOL); assert_eq!(c.new_pools[0].fee, 500); @@ -766,13 +749,7 @@ mod tests { pool: POOL, }; let log = make_log(Address::repeat_byte(0xBB), 100, event); - let c = collect_log_changes( - FACTORY, - &[log], - &Default::default(), - &Default::default(), - &Default::default(), - ); + let c = collect_log_changes(FACTORY, &[log], &Default::default(), &Default::default()); assert!(c.new_pools.is_empty()); } @@ -783,13 +760,7 @@ mod tests { tick: t(0), }; let log = make_log(POOL, 100, event); - let c = collect_log_changes( - FACTORY, - &[log], - &Default::default(), - &Default::default(), - &Default::default(), - ); + let c = collect_log_changes(FACTORY, &[log], &Default::default(), &Default::default()); assert_eq!(c.pool_states.len(), 1); assert_eq!(c.pool_states[0].pool_address, POOL); assert_eq!(c.pool_states[0].block_number, 100); @@ -809,13 +780,7 @@ mod tests { tick: t(42), }; let log = make_log(POOL, 200, event); - let c = collect_log_changes( - FACTORY, - &[log], - &Default::default(), - &Default::default(), - &Default::default(), - ); + let c = collect_log_changes(FACTORY, &[log], &Default::default(), &Default::default()); assert_eq!(c.pool_states.len(), 1); assert_eq!(c.pool_states[0].tick, 42); assert_eq!(c.pool_states[0].liquidity, 500_000); @@ -836,13 +801,7 @@ mod tests { }; let liq_cache: LiquidityCache = HashMap::from([((POOL, 100u64), amount)]); let log = make_log(POOL, 100, event); - let c = collect_log_changes( - FACTORY, - &[log], - &liq_cache, - &Default::default(), - &Default::default(), - ); + let c = collect_log_changes(FACTORY, &[log], &liq_cache, &Default::default()); assert_eq!(c.tick_deltas.len(), 2); let lower = c.tick_deltas.iter().find(|d| d.tick_idx == -100).unwrap(); @@ -881,13 +840,7 @@ mod tests { }; let liq_cache: LiquidityCache = HashMap::from([((POOL, 201u64), after_mint_liq)]); let logs = vec![make_log(POOL, 200, swap), make_log(POOL, 201, mint)]; - let c = collect_log_changes( - FACTORY, - &logs, - &liq_cache, - &Default::default(), - &Default::default(), - ); + let c = collect_log_changes(FACTORY, &logs, &liq_cache, &Default::default()); assert_eq!(c.pool_states.len(), 1); // Swap established full_state; Mint updated its liquidity from the cache. @@ -917,13 +870,7 @@ mod tests { amount1: alloy::primitives::U256::ZERO, }; let logs = vec![make_log(POOL, 100, mint), make_log(POOL, 101, burn)]; - let c = collect_log_changes( - FACTORY, - &logs, - &Default::default(), - &Default::default(), - &Default::default(), - ); + let c = collect_log_changes(FACTORY, &logs, &Default::default(), &Default::default()); assert!(c.tick_deltas.is_empty(), "zero-net ticks must be pruned"); } @@ -949,13 +896,7 @@ mod tests { amount1: alloy::primitives::U256::ZERO, }; let logs = vec![make_log(POOL, 100, mint), make_log(POOL, 101, burn)]; - let c = collect_log_changes( - FACTORY, - &logs, - &Default::default(), - &Default::default(), - &Default::default(), - ); + let c = collect_log_changes(FACTORY, &logs, &Default::default(), &Default::default()); let expected = (mint_amount - burn_amount).cast_signed(); let lower = c.tick_deltas.iter().find(|d| d.tick_idx == -100).unwrap(); @@ -978,13 +919,7 @@ mod tests { tick: t(0), }; let logs = vec![make_log(FACTORY, 100, created), make_log(POOL, 100, init)]; - let c = collect_log_changes( - FACTORY, - &logs, - &Default::default(), - &Default::default(), - &Default::default(), - ); + let c = collect_log_changes(FACTORY, &logs, &Default::default(), &Default::default()); assert_eq!(c.new_pools.len(), 1); assert_eq!(c.pool_states.len(), 1); assert_eq!(c.pool_states[0].pool_address, POOL); diff --git a/database/sql/V110__pool_indexer_uniswap_v3.sql b/database/sql/V110__pool_indexer_uniswap_v3.sql index 7fe5f678c5..67d9ff4f89 100644 --- a/database/sql/V110__pool_indexer_uniswap_v3.sql +++ b/database/sql/V110__pool_indexer_uniswap_v3.sql @@ -15,6 +15,8 @@ CREATE TABLE uniswap_v3_pools ( fee INT NOT NULL, -- fee tier in bps (500, 3000, 10000) token0_decimals SMALLINT, token1_decimals SMALLINT, + token0_symbol TEXT, + token1_symbol TEXT, created_block BIGINT NOT NULL, PRIMARY KEY (chain_id, address) ); diff --git a/database/sql/V111__pool_indexer_token_symbols.sql b/database/sql/V111__pool_indexer_token_symbols.sql deleted file mode 100644 index 79e356505a..0000000000 --- a/database/sql/V111__pool_indexer_token_symbols.sql +++ /dev/null @@ -1,3 +0,0 @@ -ALTER TABLE uniswap_v3_pools - ADD COLUMN token0_symbol TEXT, - ADD COLUMN token1_symbol TEXT; From 7d47638eb1226d7fe8ee69d20815427b7c8d069d Mon Sep 17 00:00:00 2001 From: Jan P Date: Fri, 17 Apr 2026 14:56:37 +0200 Subject: [PATCH 08/80] Refactoring --- crates/e2e/tests/e2e/pool_indexer.rs | 2 ++ crates/pool-indexer/src/db/uniswap_v3.rs | 12 ++++++------ crates/pool-indexer/src/indexer/uniswap_v3.rs | 12 ++++++------ crates/pool-indexer/src/seeder.rs | 8 ++------ 4 files changed, 16 insertions(+), 18 deletions(-) diff --git a/crates/e2e/tests/e2e/pool_indexer.rs b/crates/e2e/tests/e2e/pool_indexer.rs index 8cbf65ef03..51b2718787 100644 --- a/crates/e2e/tests/e2e/pool_indexer.rs +++ b/crates/e2e/tests/e2e/pool_indexer.rs @@ -78,6 +78,8 @@ async fn start_pool_indexer(factory: Address) { use_latest: true, subgraph_url: None, seed_block: None, + fetch_concurrency: 8, + prefetch_concurrency: 50, }], api: ApiConfig { bind_address: SocketAddr::V4(SocketAddrV4::new(Ipv4Addr::LOCALHOST, POOL_INDEXER_PORT)), diff --git a/crates/pool-indexer/src/db/uniswap_v3.rs b/crates/pool-indexer/src/db/uniswap_v3.rs index 12c7a7c19e..6e483791ad 100644 --- a/crates/pool-indexer/src/db/uniswap_v3.rs +++ b/crates/pool-indexer/src/db/uniswap_v3.rs @@ -30,7 +30,7 @@ pub async fn get_checkpoint( } pub async fn set_checkpoint( - tx: &mut Transaction<'_, Postgres>, + executor: impl sqlx::PgExecutor<'_>, chain_id: u64, contract: &Address, block_number: u64, @@ -43,7 +43,7 @@ pub async fn set_checkpoint( .bind(chain_id.cast_signed()) .bind(contract.as_slice()) .bind(block_number.cast_signed()) - .execute(&mut **tx) + .execute(executor) .await .context("set_checkpoint")?; Ok(()) @@ -370,7 +370,7 @@ pub async fn batch_update_ticks( /// Used by the subgraph seeder where the subgraph value IS the authoritative /// net. pub async fn batch_seed_ticks( - tx: &mut Transaction<'_, Postgres>, + executor: impl sqlx::PgExecutor<'_>, chain_id: u64, ticks: &[TickDeltaData], ) -> Result<()> { @@ -402,19 +402,19 @@ pub async fn batch_seed_ticks( .bind(addresses) .bind(tick_idxs) .bind(values) - .execute(&mut **tx) + .execute(executor) .await .context("batch_seed_ticks")?; Ok(()) } pub async fn delete_ticks_for_chain( - tx: &mut Transaction<'_, Postgres>, + executor: impl sqlx::PgExecutor<'_>, chain_id: u64, ) -> Result<()> { sqlx::query("DELETE FROM uniswap_v3_ticks WHERE chain_id = $1") .bind(chain_id.cast_signed()) - .execute(&mut **tx) + .execute(executor) .await .context("delete_ticks_for_chain")?; Ok(()) diff --git a/crates/pool-indexer/src/indexer/uniswap_v3.rs b/crates/pool-indexer/src/indexer/uniswap_v3.rs index bae0d3acf3..9ed3f9dc08 100644 --- a/crates/pool-indexer/src/indexer/uniswap_v3.rs +++ b/crates/pool-indexer/src/indexer/uniswap_v3.rs @@ -136,15 +136,13 @@ impl UniswapV3Indexer { /// checkpoint itself — it advances naturally per-chunk as blocks are /// indexed. pub async fn catch_up(&self, from_block: u64) -> Result<()> { - let mut tx = self.db.begin().await.context("begin checkpoint tx")?; db::set_checkpoint( - &mut tx, + &self.db, self.chain_id, &self.factory, from_block.saturating_sub(1), ) .await?; - tx.commit().await.context("commit checkpoint")?; loop { let finalized = self .provider @@ -256,7 +254,7 @@ impl UniswapV3Indexer { db::batch_upsert_pool_states(&mut tx, self.chain_id, &changes.pool_states).await?; db::batch_update_pool_liquidity(&mut tx, self.chain_id, &changes.liquidity_updates).await?; db::batch_update_ticks(&mut tx, self.chain_id, &changes.tick_deltas).await?; - db::set_checkpoint(&mut tx, self.chain_id, &self.factory, chunk_end).await?; + db::set_checkpoint(&mut *tx, self.chain_id, &self.factory, chunk_end).await?; tx.commit().await.context("commit transaction")?; Ok(()) @@ -372,14 +370,16 @@ async fn backfill_symbols( poll_interval: std::time::Duration, ) -> ! { loop { - if let Err(err) = run_backfill_pass(&provider, &db, chain_id, prefetch_concurrency).await { + if let Err(err) = + run_symbol_backfill_pass(&provider, &db, chain_id, prefetch_concurrency).await + { tracing::warn!(?err, "token symbol backfill pass failed"); } tokio::time::sleep(poll_interval).await; } } -async fn run_backfill_pass( +async fn run_symbol_backfill_pass( provider: &AlloyProvider, db: &sqlx::PgPool, chain_id: u64, diff --git a/crates/pool-indexer/src/seeder.rs b/crates/pool-indexer/src/seeder.rs index cbe714dc5c..a90824bb3d 100644 --- a/crates/pool-indexer/src/seeder.rs +++ b/crates/pool-indexer/src/seeder.rs @@ -292,9 +292,7 @@ pub async fn seed( // Clear all existing tick data so seeded values are authoritative. // This prevents stale rows (e.g. ticks burned to 0 before the seed block) // from persisting if the seeder is re-run on a non-empty database. - let mut tx = db.begin().await.context("begin tick clear tx")?; - db::delete_ticks_for_chain(&mut tx, chain_id).await?; - tx.commit().await.context("commit tick clear")?; + db::delete_ticks_for_chain(db, chain_id).await?; let mut total_ticks = 0usize; let url = subgraph_url.to_owned(); @@ -310,9 +308,7 @@ pub async fn seed( let n = ticks.len(); if !ticks.is_empty() { - let mut tx = db.begin().await.context("begin tick tx")?; - db::batch_seed_ticks(&mut tx, chain_id, &ticks).await?; - tx.commit().await.context("commit tick tx")?; + db::batch_seed_ticks(db, chain_id, &ticks).await?; } total_ticks += n; From a5e6f4970ca91e6ab4f17ed615e668f9d9abc9e1 Mon Sep 17 00:00:00 2001 From: Jan P Date: Fri, 17 Apr 2026 15:51:15 +0200 Subject: [PATCH 09/80] Extend API and simplify --- crates/pool-indexer/src/api/mod.rs | 4 + crates/pool-indexer/src/api/uniswap_v3/mod.rs | 38 +++++- .../pool-indexer/src/api/uniswap_v3/pools.rs | 66 ++++++++--- .../pool-indexer/src/api/uniswap_v3/ticks.rs | 108 +++++++++++++++--- crates/pool-indexer/src/db/uniswap_v3.rs | 88 +++++++++++++- 5 files changed, 272 insertions(+), 32 deletions(-) diff --git a/crates/pool-indexer/src/api/mod.rs b/crates/pool-indexer/src/api/mod.rs index 55ec0fe6a0..353156659c 100644 --- a/crates/pool-indexer/src/api/mod.rs +++ b/crates/pool-indexer/src/api/mod.rs @@ -29,6 +29,10 @@ pub fn router(state: Arc) -> Router { "/api/v1/{network}/uniswap/v3/pools", get(uniswap_v3::get_pools), ) + .route( + "/api/v1/{network}/uniswap/v3/pools/ticks", + get(uniswap_v3::get_ticks_bulk), + ) .route( "/api/v1/{network}/uniswap/v3/pools/{pool_address}/ticks", get(uniswap_v3::get_ticks), diff --git a/crates/pool-indexer/src/api/uniswap_v3/mod.rs b/crates/pool-indexer/src/api/uniswap_v3/mod.rs index 7b9cdcf97f..b2188ab42e 100644 --- a/crates/pool-indexer/src/api/uniswap_v3/mod.rs +++ b/crates/pool-indexer/src/api/uniswap_v3/mod.rs @@ -5,10 +5,17 @@ use { alloy_primitives::Address, axum::{ http::StatusCode, - response::{IntoResponse, Response}, + response::{IntoResponse, Json, Response}, }, }; -pub use {pools::get_pools, ticks::get_ticks}; +pub use { + pools::get_pools, + ticks::{get_ticks, get_ticks_bulk}, +}; + +/// Upper bound on pool addresses accepted in a single bulk lookup. Keeps the +/// URL under typical proxy limits and bounds DB query size. +pub(super) const MAX_POOL_IDS_PER_REQUEST: usize = 500; /// Serializes any [`Display`](std::fmt::Display) value as a JSON string. pub(super) fn serialize_display( @@ -23,6 +30,33 @@ pub(super) fn internal_error(err: anyhow::Error) -> Response { StatusCode::INTERNAL_SERVER_ERROR.into_response() } +pub(super) fn bad_request(message: impl Into) -> Response { + ( + StatusCode::BAD_REQUEST, + Json(serde_json::json!({ "error": message.into() })), + ) + .into_response() +} + pub(super) fn parse_hex_address(s: &str) -> Result { s.parse::
().map_err(|_| "invalid address") } + +/// Parses a comma-separated list of pool addresses (`0x…,0x…`). Empty entries +/// are skipped. Returns a [`Response`] directly on parse failure or when the +/// list exceeds [`MAX_POOL_IDS_PER_REQUEST`] so handlers can `?`-propagate the +/// error response. +#[allow(clippy::result_large_err)] +pub(super) fn parse_pool_ids(raw: &str) -> Result, Response> { + let mut out = Vec::new(); + for entry in raw.split(',').filter(|s| !s.is_empty()) { + let addr = parse_hex_address(entry.trim()).map_err(|_| bad_request("invalid pool id"))?; + out.push(addr); + } + if out.len() > MAX_POOL_IDS_PER_REQUEST { + return Err(bad_request(format!( + "too many pool ids; max {MAX_POOL_IDS_PER_REQUEST}" + ))); + } + Ok(out) +} diff --git a/crates/pool-indexer/src/api/uniswap_v3/pools.rs b/crates/pool-indexer/src/api/uniswap_v3/pools.rs index e78a475d27..f37987d699 100644 --- a/crates/pool-indexer/src/api/uniswap_v3/pools.rs +++ b/crates/pool-indexer/src/api/uniswap_v3/pools.rs @@ -1,5 +1,5 @@ use { - super::{internal_error, parse_hex_address, serialize_display}, + super::{bad_request, internal_error, parse_hex_address, parse_pool_ids, serialize_display}, crate::{api::AppState, db::uniswap_v3 as db}, alloy_primitives::Address, axum::{ @@ -14,17 +14,24 @@ use { /// Query parameters for the `/pools` endpoint. /// -/// If `token0` is provided the response contains only matching pools (no -/// pagination). If both `token0` and `token1` are provided the search is -/// narrowed to that exact pair. Without any token filter the endpoint returns -/// a cursor-paginated list of all pools. +/// Dispatch (first match wins): +/// 1. `pool_ids` — bulk lookup by pool address, returns only the requested +/// pools (no pagination). Intended for clients that already know the pool +/// addresses they care about, e.g. resolving pools referenced by an auction. +/// 2. `token0` (+ optional `token1`) — symbol search. Returns all matching +/// pools, ordered by liquidity descending. No pagination. +/// 3. Neither — cursor-paginated list of all pools. #[derive(Deserialize)] pub struct PoolsQuery { + /// Comma-separated list of pool addresses (`0x…,0x…`). Capped at + /// [`super::MAX_POOL_IDS_PER_REQUEST`] entries; callers with more + /// addresses should chunk their requests. + pub pool_ids: Option, /// Opaque cursor returned by the previous page; omit to start from the - /// beginning. + /// beginning. Ignored when `pool_ids` or `token0` is set. pub after: Option, /// Maximum number of pools to return. Clamped to [1, 5000]; defaults to - /// 1000. + /// 1000. Ignored when `pool_ids` or `token0` is set. pub limit: Option, /// Filter by token symbol (partial, case-insensitive). Acts as the "base" /// token when `token1` is also supplied. Matched via SQL `LIKE` against @@ -147,13 +154,7 @@ async fn list_pools( let cursor_bytes = match query.after.as_deref().map(parse_hex_address) { Some(Ok(addr)) => Some(addr.as_slice().to_vec()), - Some(Err(_)) => { - return ( - StatusCode::BAD_REQUEST, - Json(serde_json::json!({"error": "invalid cursor"})), - ) - .into_response(); - } + Some(Err(_)) => return bad_request("invalid cursor"), None => None, }; @@ -188,10 +189,38 @@ async fn list_pools( .into_response() } +/// Returns the pools with addresses in `pool_ids` (order not guaranteed to +/// match the request). Silently skips unknown addresses so callers can treat +/// a partial response as "these are the ones I have". Fetches the latest +/// indexed block in parallel with the pool lookup. +async fn lookup_pools_by_ids(state: &AppState, chain_id: u64, raw_ids: &str) -> Response { + let addresses = match parse_pool_ids(raw_ids) { + Ok(a) => a, + Err(resp) => return resp, + }; + let (block_res, pools_res) = tokio::join!( + db::get_latest_indexed_block(&state.db, chain_id), + db::get_pools_by_ids(&state.db, chain_id, &addresses), + ); + let block_number = match block_res { + Ok(Some(block)) => block, + Ok(None) => return StatusCode::SERVICE_UNAVAILABLE.into_response(), + Err(err) => return internal_error(err), + }; + match pools_res { + Ok(rows) => Json(PoolsResponse { + block_number, + pools: rows.iter().map(PoolResponse::from).collect(), + next_cursor: None, + }) + .into_response(), + Err(err) => internal_error(err), + } +} + /// `GET /api/v1/{network}/uniswap/v3/pools` /// -/// Dispatches to [`search_pools`] when a token filter is present, or -/// [`list_pools`] for paginated listing of all pools. +/// Dispatches based on query params — see [`PoolsQuery`]. pub async fn get_pools( State(state): State>, Path(network): Path, @@ -201,6 +230,11 @@ pub async fn get_pools( Some(id) => id, None => return StatusCode::NOT_FOUND.into_response(), }; + + if let Some(pool_ids) = query.pool_ids.as_deref() { + return lookup_pools_by_ids(&state, chain_id, pool_ids).await; + } + let block_number = match db::get_latest_indexed_block(&state.db, chain_id).await { Ok(Some(block)) => block, Ok(None) => return StatusCode::SERVICE_UNAVAILABLE.into_response(), diff --git a/crates/pool-indexer/src/api/uniswap_v3/ticks.rs b/crates/pool-indexer/src/api/uniswap_v3/ticks.rs index e2bebac9ba..5ecd27ad2e 100644 --- a/crates/pool-indexer/src/api/uniswap_v3/ticks.rs +++ b/crates/pool-indexer/src/api/uniswap_v3/ticks.rs @@ -1,14 +1,14 @@ use { - super::{internal_error, parse_hex_address, serialize_display}, + super::{bad_request, internal_error, parse_hex_address, parse_pool_ids, serialize_display}, crate::{api::AppState, db::uniswap_v3 as db}, alloy_primitives::Address, axum::{ - extract::{Path, State}, + extract::{Path, Query, State}, http::StatusCode, response::{IntoResponse, Json, Response}, }, bigdecimal::BigDecimal, - serde::Serialize, + serde::{Deserialize, Serialize}, std::sync::Arc, }; @@ -46,22 +46,19 @@ pub async fn get_ticks( }; let addr = match parse_hex_address(&pool_address) { Ok(a) => a, - Err(_) => { - return ( - StatusCode::BAD_REQUEST, - Json(serde_json::json!({"error": "invalid pool address"})), - ) - .into_response(); - } + Err(_) => return bad_request("invalid pool address"), }; - let block_number = match db::get_latest_indexed_block(&state.db, chain_id).await { + let (block_res, ticks_res) = tokio::join!( + db::get_latest_indexed_block(&state.db, chain_id), + db::get_ticks(&state.db, chain_id, &addr), + ); + let block_number = match block_res { Ok(Some(block)) => block, Ok(None) => return StatusCode::SERVICE_UNAVAILABLE.into_response(), Err(err) => return internal_error(err), }; - - let ticks = match db::get_ticks(&state.db, chain_id, &addr).await { + let ticks = match ticks_res { Ok(ticks) => ticks, Err(err) => return internal_error(err), }; @@ -73,3 +70,88 @@ pub async fn get_ticks( }) .into_response() } + +/// Query parameters for the bulk ticks endpoint. +#[derive(Deserialize)] +pub struct BulkTicksQuery { + /// Comma-separated list of pool addresses (`0x…,0x…`). Capped at + /// [`super::MAX_POOL_IDS_PER_REQUEST`] entries. + pub pool_ids: String, +} + +/// One pool's worth of ticks in a bulk response. +#[derive(Serialize)] +pub struct PoolTicks { + pub pool: Address, + pub ticks: Vec, +} + +/// Envelope for `GET /pools/ticks`. Only pools with at least one non-zero +/// tick appear in `pools` — callers resolving many addresses at once should +/// treat a missing pool as "no active ticks" rather than "unknown pool". +#[derive(Serialize)] +pub struct BulkTicksResponse { + pub block_number: u64, + pub pools: Vec, +} + +/// `GET /api/v1/{network}/uniswap/v3/pools/ticks?pool_ids=0x…,0x…` +/// +/// Bulk tick fetch for many pools in one round trip. Replaces the subgraph's +/// `TICKS_BY_POOL_IDS_QUERY`. Ticks are grouped by pool and sorted by +/// `tick_idx` within each group. Per-pool tick count is bounded by the DB +/// helper (see [`db::MAX_TICKS_PER_POOL`]). +pub async fn get_ticks_bulk( + State(state): State>, + Path(network): Path, + Query(query): Query, +) -> Response { + let chain_id = match state.resolve_network(&network) { + Some(id) => id, + None => return StatusCode::NOT_FOUND.into_response(), + }; + + let addresses = match parse_pool_ids(&query.pool_ids) { + Ok(a) => a, + Err(resp) => return resp, + }; + + let (block_res, ticks_res) = tokio::join!( + db::get_latest_indexed_block(&state.db, chain_id), + db::get_ticks_for_pools(&state.db, chain_id, &addresses), + ); + let block_number = match block_res { + Ok(Some(block)) => block, + Ok(None) => return StatusCode::SERVICE_UNAVAILABLE.into_response(), + Err(err) => return internal_error(err), + }; + let rows = match ticks_res { + Ok(rows) => rows, + Err(err) => return internal_error(err), + }; + + // Rows arrive sorted by (pool_address, tick_idx); collapse consecutive + // runs into per-pool buckets without a HashMap. + let mut pools: Vec = Vec::new(); + for row in rows { + match pools.last_mut() { + Some(last) if last.pool == row.pool_address => last.ticks.push(TickEntry { + tick_idx: row.tick_idx, + liquidity_net: row.liquidity_net, + }), + _ => pools.push(PoolTicks { + pool: row.pool_address, + ticks: vec![TickEntry { + tick_idx: row.tick_idx, + liquidity_net: row.liquidity_net, + }], + }), + } + } + + Json(BulkTicksResponse { + block_number, + pools, + }) + .into_response() +} diff --git a/crates/pool-indexer/src/db/uniswap_v3.rs b/crates/pool-indexer/src/db/uniswap_v3.rs index 6e483791ad..7719321e56 100644 --- a/crates/pool-indexer/src/db/uniswap_v3.rs +++ b/crates/pool-indexer/src/db/uniswap_v3.rs @@ -520,7 +520,93 @@ pub struct TickRow { } /// Maximum number of ticks returned per pool query (safety bound). -const MAX_TICKS_PER_POOL: i64 = 10_000; +pub const MAX_TICKS_PER_POOL: i64 = 10_000; + +/// A tick tagged with its owning pool, used by bulk-tick queries that span +/// multiple pools. +pub struct PoolTickRow { + pub pool_address: Address, + pub tick_idx: i32, + pub liquidity_net: BigDecimal, +} + +/// Fetches pools matching any of `addresses` with their current state. Returns +/// fewer rows than requested when some addresses are unknown. Ordered by +/// address to give callers a stable iteration order. +pub async fn get_pools_by_ids( + pool: &PgPool, + chain_id: u64, + addresses: &[Address], +) -> Result> { + if addresses.is_empty() { + return Ok(Vec::new()); + } + let addrs: Vec<&[u8]> = addresses.iter().map(|a| a.as_slice()).collect(); + sqlx::query( + "SELECT p.address, p.token0, p.token1, p.fee, + p.token0_decimals, p.token1_decimals, + p.token0_symbol, p.token1_symbol, + s.sqrt_price_x96, s.liquidity, s.tick + FROM uniswap_v3_pools p + JOIN uniswap_v3_pool_states s + ON s.chain_id = p.chain_id AND s.pool_address = p.address + WHERE p.chain_id = $1 + AND p.address = ANY($2) + ORDER BY p.address", + ) + .bind(chain_id.cast_signed()) + .bind(addrs) + .fetch_all(pool) + .await + .context("get_pools_by_ids")? + .into_iter() + .map(PoolRow::try_from) + .collect() +} + +/// Fetches ticks for multiple pools in one query, capped at +/// [`MAX_TICKS_PER_POOL`] per pool. Uses a `LATERAL` join so each pool's +/// limit is applied individually via the PK prefix index — a flat +/// `WHERE pool_address = ANY($2)` with a single outer `LIMIT` could starve +/// later pools when one has many ticks. Rows are ordered by +/// `(pool_address, tick_idx)` so callers can group in a single pass. +pub async fn get_ticks_for_pools( + pool: &PgPool, + chain_id: u64, + addresses: &[Address], +) -> Result> { + if addresses.is_empty() { + return Ok(Vec::new()); + } + let addrs: Vec<&[u8]> = addresses.iter().map(|a| a.as_slice()).collect(); + sqlx::query( + "SELECT t.pool_address, t.tick_idx, t.liquidity_net + FROM UNNEST($2::BYTEA[]) AS p(addr) + JOIN LATERAL ( + SELECT pool_address, tick_idx, liquidity_net + FROM uniswap_v3_ticks + WHERE chain_id = $1 AND pool_address = p.addr + ORDER BY tick_idx + LIMIT $3 + ) t ON TRUE + ORDER BY t.pool_address, t.tick_idx", + ) + .bind(chain_id.cast_signed()) + .bind(addrs) + .bind(MAX_TICKS_PER_POOL) + .fetch_all(pool) + .await + .context("get_ticks_for_pools")? + .into_iter() + .map(|r| { + Ok(PoolTickRow { + pool_address: bytes_to_addr(r.get("pool_address"))?, + tick_idx: r.get("tick_idx"), + liquidity_net: r.get("liquidity_net"), + }) + }) + .collect() +} pub async fn get_ticks( pool: &PgPool, From 98e5217ba736f2d73cbb23904d9877bd97e17cb2 Mon Sep 17 00:00:00 2001 From: Jan P Date: Fri, 17 Apr 2026 16:08:42 +0200 Subject: [PATCH 10/80] Readability refactor --- crates/pool-indexer/src/api/mod.rs | 20 + .../pool-indexer/src/api/uniswap_v3/pools.rs | 150 +++--- .../pool-indexer/src/api/uniswap_v3/ticks.rs | 140 ++--- crates/pool-indexer/src/config.rs | 20 +- crates/pool-indexer/src/db/uniswap_v3.rs | 240 +++++---- crates/pool-indexer/src/indexer/uniswap_v3.rs | 199 ++++--- crates/pool-indexer/src/run.rs | 116 +++-- crates/pool-indexer/src/seeder.rs | 488 +++++++++++------- 8 files changed, 804 insertions(+), 569 deletions(-) diff --git a/crates/pool-indexer/src/api/mod.rs b/crates/pool-indexer/src/api/mod.rs index 353156659c..0362c08a09 100644 --- a/crates/pool-indexer/src/api/mod.rs +++ b/crates/pool-indexer/src/api/mod.rs @@ -22,6 +22,26 @@ impl AppState { } } +pub(super) fn resolve_chain_id( + state: &AppState, + network: &str, +) -> Result { + state + .resolve_network(network) + .ok_or_else(|| StatusCode::NOT_FOUND.into_response()) +} + +pub(super) async fn latest_indexed_block( + state: &AppState, + chain_id: u64, +) -> Result { + match crate::db::uniswap_v3::get_latest_indexed_block(&state.db, chain_id).await { + Ok(Some(block_number)) => Ok(block_number), + Ok(None) => Err(StatusCode::SERVICE_UNAVAILABLE.into_response()), + Err(err) => Err(uniswap_v3::internal_error(err)), + } +} + pub fn router(state: Arc) -> Router { Router::new() .route("/health", get(health)) diff --git a/crates/pool-indexer/src/api/uniswap_v3/pools.rs b/crates/pool-indexer/src/api/uniswap_v3/pools.rs index f37987d699..f96e64b115 100644 --- a/crates/pool-indexer/src/api/uniswap_v3/pools.rs +++ b/crates/pool-indexer/src/api/uniswap_v3/pools.rs @@ -1,10 +1,12 @@ use { super::{bad_request, internal_error, parse_hex_address, parse_pool_ids, serialize_display}, - crate::{api::AppState, db::uniswap_v3 as db}, + crate::{ + api::{AppState, latest_indexed_block, resolve_chain_id}, + db::uniswap_v3 as db, + }, alloy_primitives::Address, axum::{ extract::{Path, Query, State}, - http::StatusCode, response::{IntoResponse, Json, Response}, }, bigdecimal::BigDecimal, @@ -84,6 +86,42 @@ pub struct PoolsResponse { pub next_cursor: Option, } +enum PoolsRequest<'a> { + ByIds(&'a str), + Search { + token0: &'a str, + token1: Option<&'a str>, + }, + PaginatedList, +} + +impl PoolsQuery { + fn request(&self) -> PoolsRequest<'_> { + if let Some(pool_ids) = self.pool_ids.as_deref() { + PoolsRequest::ByIds(pool_ids) + } else if let Some(token0) = self.token0.as_deref() { + PoolsRequest::Search { + token0, + token1: self.token1.as_deref(), + } + } else { + PoolsRequest::PaginatedList + } + } + + fn page_limit(&self) -> i64 { + self.limit.unwrap_or(1000).clamp(1, 5000) + } + + fn cursor(&self) -> Result>, Response> { + match self.after.as_deref().map(parse_hex_address) { + Some(Ok(address)) => Ok(Some(address.as_slice().to_vec())), + Some(Err(_)) => Err(bad_request("invalid cursor")), + None => Ok(None), + } + } +} + impl From<&db::PoolRow> for PoolResponse { fn from(r: &db::PoolRow) -> Self { Self { @@ -113,6 +151,19 @@ fn non_empty(s: &Option) -> Option { s.as_ref().filter(|s| !s.is_empty()).cloned() } +fn pools_response( + block_number: u64, + rows: &[db::PoolRow], + next_cursor: Option, +) -> Response { + Json(PoolsResponse { + block_number, + pools: rows.iter().map(PoolResponse::from).collect(), + next_cursor, + }) + .into_response() +} + /// Returns all pools whose token symbols match the given filter(s). /// When only `token0` is supplied, matches any pool containing that symbol. /// When both are supplied, both symbols must match (order-independent). @@ -130,12 +181,7 @@ async fn search_pools( db::search_pools_by_token(&state.db, chain_id, token0).await }; match rows { - Ok(rows) => Json(PoolsResponse { - block_number, - pools: rows.iter().map(PoolResponse::from).collect(), - next_cursor: None, - }) - .into_response(), + Ok(rows) => pools_response(block_number, &rows, None), Err(err) => internal_error(err), } } @@ -150,43 +196,31 @@ async fn list_pools( block_number: u64, query: &PoolsQuery, ) -> Response { - let limit = query.limit.unwrap_or(1000).clamp(1, 5000); - - let cursor_bytes = match query.after.as_deref().map(parse_hex_address) { - Some(Ok(addr)) => Some(addr.as_slice().to_vec()), - Some(Err(_)) => return bad_request("invalid cursor"), - None => None, + let limit = query.page_limit(); + let cursor = match query.cursor() { + Ok(cursor) => cursor, + Err(response) => return response, }; // Fetch one extra row to determine if there is a next page. - let rows = match cursor_bytes { + let rows = match cursor { Some(cursor) => db::get_pools_after(&state.db, chain_id, cursor, limit + 1).await, None => db::get_pools(&state.db, chain_id, limit + 1).await, }; - let rows = match rows { + let mut rows = match rows { Ok(rows) => rows, Err(err) => return internal_error(err), }; let limit_usize = usize::try_from(limit).unwrap_or(usize::MAX); - let has_next = rows.len() > limit_usize; - let rows = if has_next { - &rows[..limit_usize] - } else { - &rows[..] - }; - let next_cursor = if has_next { - rows.last().map(|r| format!("{:?}", r.address)) + let next_cursor = if rows.len() > limit_usize { + rows.truncate(limit_usize); + rows.last().map(|row| format!("{:?}", row.address)) } else { None }; - Json(PoolsResponse { - block_number, - pools: rows.iter().map(PoolResponse::from).collect(), - next_cursor, - }) - .into_response() + pools_response(block_number, &rows, next_cursor) } /// Returns the pools with addresses in `pool_ids` (order not guaranteed to @@ -199,21 +233,15 @@ async fn lookup_pools_by_ids(state: &AppState, chain_id: u64, raw_ids: &str) -> Err(resp) => return resp, }; let (block_res, pools_res) = tokio::join!( - db::get_latest_indexed_block(&state.db, chain_id), + latest_indexed_block(state, chain_id), db::get_pools_by_ids(&state.db, chain_id, &addresses), ); let block_number = match block_res { - Ok(Some(block)) => block, - Ok(None) => return StatusCode::SERVICE_UNAVAILABLE.into_response(), - Err(err) => return internal_error(err), + Ok(block_number) => block_number, + Err(response) => return response, }; match pools_res { - Ok(rows) => Json(PoolsResponse { - block_number, - pools: rows.iter().map(PoolResponse::from).collect(), - next_cursor: None, - }) - .into_response(), + Ok(rows) => pools_response(block_number, &rows, None), Err(err) => internal_error(err), } } @@ -226,30 +254,26 @@ pub async fn get_pools( Path(network): Path, Query(query): Query, ) -> Response { - let chain_id = match state.resolve_network(&network) { - Some(id) => id, - None => return StatusCode::NOT_FOUND.into_response(), - }; - - if let Some(pool_ids) = query.pool_ids.as_deref() { - return lookup_pools_by_ids(&state, chain_id, pool_ids).await; - } - - let block_number = match db::get_latest_indexed_block(&state.db, chain_id).await { - Ok(Some(block)) => block, - Ok(None) => return StatusCode::SERVICE_UNAVAILABLE.into_response(), - Err(err) => return internal_error(err), + let chain_id = match resolve_chain_id(&state, &network) { + Ok(chain_id) => chain_id, + Err(response) => return response, }; - if let Some(token0) = query.token0.as_deref() { - return search_pools( - &state, - chain_id, - block_number, - token0, - query.token1.as_deref(), - ) - .await; + match query.request() { + PoolsRequest::ByIds(pool_ids) => lookup_pools_by_ids(&state, chain_id, pool_ids).await, + PoolsRequest::Search { token0, token1 } => { + let block_number = match latest_indexed_block(&state, chain_id).await { + Ok(block_number) => block_number, + Err(response) => return response, + }; + search_pools(&state, chain_id, block_number, token0, token1).await + } + PoolsRequest::PaginatedList => { + let block_number = match latest_indexed_block(&state, chain_id).await { + Ok(block_number) => block_number, + Err(response) => return response, + }; + list_pools(&state, chain_id, block_number, &query).await + } } - list_pools(&state, chain_id, block_number, &query).await } diff --git a/crates/pool-indexer/src/api/uniswap_v3/ticks.rs b/crates/pool-indexer/src/api/uniswap_v3/ticks.rs index 5ecd27ad2e..db8ede6d9d 100644 --- a/crates/pool-indexer/src/api/uniswap_v3/ticks.rs +++ b/crates/pool-indexer/src/api/uniswap_v3/ticks.rs @@ -1,10 +1,12 @@ use { super::{bad_request, internal_error, parse_hex_address, parse_pool_ids, serialize_display}, - crate::{api::AppState, db::uniswap_v3 as db}, + crate::{ + api::{AppState, latest_indexed_block, resolve_chain_id}, + db::uniswap_v3 as db, + }, alloy_primitives::Address, axum::{ extract::{Path, Query, State}, - http::StatusCode, response::{IntoResponse, Json, Response}, }, bigdecimal::BigDecimal, @@ -21,10 +23,10 @@ pub struct TickEntry { } impl From for TickEntry { - fn from(t: db::TickRow) -> Self { + fn from(tick: db::TickRow) -> Self { Self { - tick_idx: t.tick_idx, - liquidity_net: t.liquidity_net, + tick_idx: tick.tick_idx, + liquidity_net: tick.liquidity_net, } } } @@ -36,41 +38,6 @@ pub struct TicksResponse { pub ticks: Vec, } -pub async fn get_ticks( - State(state): State>, - Path((network, pool_address)): Path<(String, String)>, -) -> Response { - let chain_id = match state.resolve_network(&network) { - Some(id) => id, - None => return StatusCode::NOT_FOUND.into_response(), - }; - let addr = match parse_hex_address(&pool_address) { - Ok(a) => a, - Err(_) => return bad_request("invalid pool address"), - }; - - let (block_res, ticks_res) = tokio::join!( - db::get_latest_indexed_block(&state.db, chain_id), - db::get_ticks(&state.db, chain_id, &addr), - ); - let block_number = match block_res { - Ok(Some(block)) => block, - Ok(None) => return StatusCode::SERVICE_UNAVAILABLE.into_response(), - Err(err) => return internal_error(err), - }; - let ticks = match ticks_res { - Ok(ticks) => ticks, - Err(err) => return internal_error(err), - }; - - Json(TicksResponse { - block_number, - pool: addr, - ticks: ticks.into_iter().map(TickEntry::from).collect(), - }) - .into_response() -} - /// Query parameters for the bulk ticks endpoint. #[derive(Deserialize)] pub struct BulkTicksQuery { @@ -95,6 +62,40 @@ pub struct BulkTicksResponse { pub pools: Vec, } +pub async fn get_ticks( + State(state): State>, + Path((network, pool_address)): Path<(String, String)>, +) -> Response { + let chain_id = match resolve_chain_id(&state, &network) { + Ok(chain_id) => chain_id, + Err(response) => return response, + }; + let pool = match parse_hex_address(&pool_address) { + Ok(pool) => pool, + Err(_) => return bad_request("invalid pool address"), + }; + + let (block_result, ticks_result) = tokio::join!( + latest_indexed_block(&state, chain_id), + db::get_ticks(&state.db, chain_id, &pool), + ); + let block_number = match block_result { + Ok(block_number) => block_number, + Err(response) => return response, + }; + let ticks = match ticks_result { + Ok(rows) => rows, + Err(err) => return internal_error(err), + }; + + Json(TicksResponse { + block_number, + pool, + ticks: ticks.into_iter().map(TickEntry::from).collect(), + }) + .into_response() +} + /// `GET /api/v1/{network}/uniswap/v3/pools/ticks?pool_ids=0x…,0x…` /// /// Bulk tick fetch for many pools in one round trip. Replaces the subgraph's @@ -106,52 +107,53 @@ pub async fn get_ticks_bulk( Path(network): Path, Query(query): Query, ) -> Response { - let chain_id = match state.resolve_network(&network) { - Some(id) => id, - None => return StatusCode::NOT_FOUND.into_response(), + let chain_id = match resolve_chain_id(&state, &network) { + Ok(chain_id) => chain_id, + Err(response) => return response, }; - let addresses = match parse_pool_ids(&query.pool_ids) { - Ok(a) => a, - Err(resp) => return resp, + let pool_ids = match parse_pool_ids(&query.pool_ids) { + Ok(pool_ids) => pool_ids, + Err(response) => return response, }; - let (block_res, ticks_res) = tokio::join!( - db::get_latest_indexed_block(&state.db, chain_id), - db::get_ticks_for_pools(&state.db, chain_id, &addresses), + let (block_result, ticks_result) = tokio::join!( + latest_indexed_block(&state, chain_id), + db::get_ticks_for_pools(&state.db, chain_id, &pool_ids), ); - let block_number = match block_res { - Ok(Some(block)) => block, - Ok(None) => return StatusCode::SERVICE_UNAVAILABLE.into_response(), - Err(err) => return internal_error(err), + let block_number = match block_result { + Ok(block_number) => block_number, + Err(response) => return response, }; - let rows = match ticks_res { + let rows = match ticks_result { Ok(rows) => rows, Err(err) => return internal_error(err), }; - // Rows arrive sorted by (pool_address, tick_idx); collapse consecutive - // runs into per-pool buckets without a HashMap. + Json(BulkTicksResponse { + block_number, + pools: group_ticks_by_pool(rows), + }) + .into_response() +} + +fn group_ticks_by_pool(rows: Vec) -> Vec { let mut pools: Vec = Vec::new(); + for row in rows { + let tick = TickEntry { + tick_idx: row.tick_idx, + liquidity_net: row.liquidity_net, + }; + match pools.last_mut() { - Some(last) if last.pool == row.pool_address => last.ticks.push(TickEntry { - tick_idx: row.tick_idx, - liquidity_net: row.liquidity_net, - }), + Some(last) if last.pool == row.pool_address => last.ticks.push(tick), _ => pools.push(PoolTicks { pool: row.pool_address, - ticks: vec![TickEntry { - tick_idx: row.tick_idx, - liquidity_net: row.liquidity_net, - }], + ticks: vec![tick], }), } } - Json(BulkTicksResponse { - block_number, - pools, - }) - .into_response() + pools } diff --git a/crates/pool-indexer/src/config.rs b/crates/pool-indexer/src/config.rs index b9fa200c87..fa2dbee33d 100644 --- a/crates/pool-indexer/src/config.rs +++ b/crates/pool-indexer/src/config.rs @@ -93,22 +93,14 @@ pub struct NetworkConfig { pub prefetch_concurrency: usize, } -/// The subset of [`NetworkConfig`] that [`UniswapV3Indexer`] needs. -#[derive(Debug, Deserialize)] -#[serde(rename_all = "kebab-case", deny_unknown_fields)] +/// The subset of [`NetworkConfig`] that [`UniswapV3Indexer`] needs at runtime. +#[derive(Debug, Clone, Copy)] pub struct IndexerConfig { pub chain_id: u64, - pub rpc_url: Url, pub factory_address: Address, - #[serde(default = "default_chunk_size")] pub chunk_size: u64, - #[serde(default = "default_poll_interval_secs")] - pub poll_interval_secs: u64, - #[serde(skip)] pub use_latest: bool, - #[serde(default = "default_fetch_concurrency")] pub fetch_concurrency: usize, - #[serde(default = "default_prefetch_concurrency")] pub prefetch_concurrency: usize, } @@ -120,10 +112,8 @@ impl NetworkConfig { pub fn indexer_config(&self) -> IndexerConfig { IndexerConfig { chain_id: self.chain_id, - rpc_url: self.rpc_url.clone(), factory_address: self.factory_address, chunk_size: self.chunk_size, - poll_interval_secs: self.poll_interval_secs, use_latest: self.use_latest, fetch_concurrency: self.fetch_concurrency, prefetch_concurrency: self.prefetch_concurrency, @@ -131,12 +121,6 @@ impl NetworkConfig { } } -impl IndexerConfig { - pub fn poll_interval(&self) -> Duration { - Duration::from_secs(self.poll_interval_secs) - } -} - #[derive(Debug, Deserialize)] #[serde(rename_all = "kebab-case", deny_unknown_fields)] pub struct ApiConfig { diff --git a/crates/pool-indexer/src/db/uniswap_v3.rs b/crates/pool-indexer/src/db/uniswap_v3.rs index 7719321e56..3fc54e223e 100644 --- a/crates/pool-indexer/src/db/uniswap_v3.rs +++ b/crates/pool-indexer/src/db/uniswap_v3.rs @@ -12,6 +12,42 @@ fn bytes_to_addr(b: Vec) -> Result
{ Address::try_from(b.as_slice()).context("invalid address bytes") } +fn sql_chain_id(chain_id: u64) -> i64 { + chain_id.cast_signed() +} + +fn sql_block_number(block_number: u64) -> i64 { + block_number.cast_signed() +} + +fn sql_fee(fee: u32) -> i32 { + fee.cast_signed() +} + +fn sql_decimals(decimals: Option) -> Option { + decimals.map(i16::from) +} + +fn sql_u128(value: u128) -> BigDecimal { + BigDecimal::from(BigInt::from(value)) +} + +fn sql_i128(value: i128) -> BigDecimal { + BigDecimal::from(BigInt::from(value)) +} + +fn address_bytes(address: &Address) -> &[u8] { + address.as_slice() +} + +fn address_bytes_list(addresses: &[Address]) -> Vec<&[u8]> { + addresses.iter().map(|address| address.as_slice()).collect() +} + +fn decode_pool_rows(rows: Vec) -> Result> { + rows.into_iter().map(PoolRow::try_from).collect() +} + pub async fn get_checkpoint( pool: &PgPool, chain_id: u64, @@ -20,8 +56,8 @@ pub async fn get_checkpoint( let row = sqlx::query( "SELECT block_number FROM pool_indexer_checkpoints WHERE chain_id = $1 AND contract = $2", ) - .bind(chain_id.cast_signed()) - .bind(contract.as_slice()) + .bind(sql_chain_id(chain_id)) + .bind(address_bytes(contract)) .fetch_optional(pool) .await .context("get_checkpoint")?; @@ -40,9 +76,9 @@ pub async fn set_checkpoint( VALUES ($1, $2, $3) ON CONFLICT (chain_id, contract) DO UPDATE SET block_number = EXCLUDED.block_number", ) - .bind(chain_id.cast_signed()) - .bind(contract.as_slice()) - .bind(block_number.cast_signed()) + .bind(sql_chain_id(chain_id)) + .bind(address_bytes(contract)) + .bind(sql_block_number(block_number)) .execute(executor) .await .context("set_checkpoint")?; @@ -68,14 +104,14 @@ pub async fn insert_pool( VALUES ($1, $2, $3, $4, $5, $6, $7, $8) ON CONFLICT (chain_id, address) DO NOTHING", ) - .bind(chain_id.cast_signed()) - .bind(address.as_slice()) - .bind(token0.as_slice()) - .bind(token1.as_slice()) - .bind(fee.cast_signed()) - .bind(token0_decimals.map(i16::from)) - .bind(token1_decimals.map(i16::from)) - .bind(created_block.cast_signed()) + .bind(sql_chain_id(chain_id)) + .bind(address_bytes(address)) + .bind(address_bytes(token0)) + .bind(address_bytes(token1)) + .bind(sql_fee(fee)) + .bind(sql_decimals(token0_decimals)) + .bind(sql_decimals(token1_decimals)) + .bind(sql_block_number(created_block)) .execute(&mut **tx) .await .context("insert_pool")?; @@ -102,11 +138,11 @@ pub async fn upsert_pool_state( liquidity = EXCLUDED.liquidity, tick = EXCLUDED.tick", ) - .bind(chain_id.cast_signed()) - .bind(pool_address.as_slice()) - .bind(block_number.cast_signed()) + .bind(sql_chain_id(chain_id)) + .bind(address_bytes(pool_address)) + .bind(sql_block_number(block_number)) .bind(u160_to_big_decimal(&sqrt_price_x96)) - .bind(BigDecimal::from(BigInt::from(liquidity))) + .bind(sql_u128(liquidity)) .bind(tick) .execute(&mut **tx) .await @@ -126,10 +162,10 @@ pub async fn update_pool_liquidity( SET liquidity = $3, block_number = $4 WHERE chain_id = $1 AND pool_address = $2", ) - .bind(chain_id.cast_signed()) - .bind(pool_address.as_slice()) - .bind(BigDecimal::from(BigInt::from(liquidity))) - .bind(block_number.cast_signed()) + .bind(sql_chain_id(chain_id)) + .bind(address_bytes(pool_address)) + .bind(sql_u128(liquidity)) + .bind(sql_block_number(block_number)) .execute(&mut **tx) .await .context("update_pool_liquidity")?; @@ -152,10 +188,10 @@ pub async fn update_tick_liquidity_net( ON CONFLICT (chain_id, pool_address, tick_idx) DO UPDATE SET liquidity_net = uniswap_v3_ticks.liquidity_net + EXCLUDED.liquidity_net", ) - .bind(chain_id.cast_signed()) - .bind(pool_address.as_slice()) + .bind(sql_chain_id(chain_id)) + .bind(address_bytes(pool_address)) .bind(tick_idx) - .bind(BigDecimal::from(BigInt::from(delta))) + .bind(sql_i128(delta)) .execute(&mut **tx) .await .context("update_tick_liquidity_net upsert")?; @@ -164,8 +200,8 @@ pub async fn update_tick_liquidity_net( "DELETE FROM uniswap_v3_ticks WHERE chain_id = $1 AND pool_address = $2 AND tick_idx = $3 AND liquidity_net = 0", ) - .bind(chain_id.cast_signed()) - .bind(pool_address.as_slice()) + .bind(sql_chain_id(chain_id)) + .bind(address_bytes(pool_address)) .bind(tick_idx) .execute(&mut **tx) .await @@ -182,23 +218,32 @@ pub async fn batch_insert_pools( if pools.is_empty() { return Ok(()); } - let addresses: Vec<&[u8]> = pools.iter().map(|p| p.address.as_slice()).collect(); - let token0s: Vec<&[u8]> = pools.iter().map(|p| p.token0.as_slice()).collect(); - let token1s: Vec<&[u8]> = pools.iter().map(|p| p.token1.as_slice()).collect(); - let fees: Vec = pools.iter().map(|p| p.fee.cast_signed()).collect(); + let addresses: Vec<&[u8]> = pools + .iter() + .map(|pool| address_bytes(&pool.address)) + .collect(); + let token0s: Vec<&[u8]> = pools + .iter() + .map(|pool| address_bytes(&pool.token0)) + .collect(); + let token1s: Vec<&[u8]> = pools + .iter() + .map(|pool| address_bytes(&pool.token1)) + .collect(); + let fees: Vec = pools.iter().map(|pool| sql_fee(pool.fee)).collect(); let t0_decimals: Vec> = pools .iter() - .map(|p| p.token0_decimals.map(i16::from)) + .map(|pool| sql_decimals(pool.token0_decimals)) .collect(); let t1_decimals: Vec> = pools .iter() - .map(|p| p.token1_decimals.map(i16::from)) + .map(|pool| sql_decimals(pool.token1_decimals)) .collect(); let t0_symbols: Vec> = pools.iter().map(|p| p.token0_symbol.clone()).collect(); let t1_symbols: Vec> = pools.iter().map(|p| p.token1_symbol.clone()).collect(); let created_blocks: Vec = pools .iter() - .map(|p| p.created_block.cast_signed()) + .map(|pool| sql_block_number(pool.created_block)) .collect(); sqlx::query( @@ -211,7 +256,7 @@ pub async fn batch_insert_pools( AS t(addr, t0, t1, fee, t0d, t1d, t0s, t1s, cblk) ON CONFLICT (chain_id, address) DO NOTHING", ) - .bind(chain_id.cast_signed()) + .bind(sql_chain_id(chain_id)) .bind(addresses) .bind(token0s) .bind(token1s) @@ -235,20 +280,23 @@ pub async fn batch_upsert_pool_states( if states.is_empty() { return Ok(()); } - let addresses: Vec<&[u8]> = states.iter().map(|s| s.pool_address.as_slice()).collect(); + let addresses: Vec<&[u8]> = states + .iter() + .map(|state| address_bytes(&state.pool_address)) + .collect(); let block_numbers: Vec = states .iter() - .map(|s| s.block_number.cast_signed()) + .map(|state| sql_block_number(state.block_number)) .collect(); let sqrt_prices: Vec = states .iter() - .map(|s| u160_to_big_decimal(&s.sqrt_price_x96)) + .map(|state| u160_to_big_decimal(&state.sqrt_price_x96)) .collect(); let liquidities: Vec = states .iter() - .map(|s| BigDecimal::from(BigInt::from(s.liquidity))) + .map(|state| sql_u128(state.liquidity)) .collect(); - let ticks: Vec = states.iter().map(|s| s.tick).collect(); + let ticks: Vec = states.iter().map(|state| state.tick).collect(); sqlx::query( "WITH latest AS ( @@ -268,7 +316,7 @@ pub async fn batch_upsert_pool_states( liquidity = EXCLUDED.liquidity, tick = EXCLUDED.tick", ) - .bind(chain_id.cast_signed()) + .bind(sql_chain_id(chain_id)) .bind(addresses) .bind(block_numbers) .bind(sqrt_prices) @@ -288,14 +336,17 @@ pub async fn batch_update_pool_liquidity( if updates.is_empty() { return Ok(()); } - let addresses: Vec<&[u8]> = updates.iter().map(|u| u.pool_address.as_slice()).collect(); + let addresses: Vec<&[u8]> = updates + .iter() + .map(|update| address_bytes(&update.pool_address)) + .collect(); let liquidities: Vec = updates .iter() - .map(|u| BigDecimal::from(BigInt::from(u.liquidity))) + .map(|update| sql_u128(update.liquidity)) .collect(); let block_numbers: Vec = updates .iter() - .map(|u| u.block_number.cast_signed()) + .map(|update| sql_block_number(update.block_number)) .collect(); sqlx::query( @@ -309,7 +360,7 @@ pub async fn batch_update_pool_liquidity( FROM latest l WHERE s.chain_id = $1 AND s.pool_address = l.addr", ) - .bind(chain_id.cast_signed()) + .bind(sql_chain_id(chain_id)) .bind(addresses) .bind(liquidities) .bind(block_numbers) @@ -327,12 +378,12 @@ pub async fn batch_update_ticks( if deltas.is_empty() { return Ok(()); } - let addresses: Vec<&[u8]> = deltas.iter().map(|d| d.pool_address.as_slice()).collect(); - let tick_idxs: Vec = deltas.iter().map(|d| d.tick_idx).collect(); - let delta_values: Vec = deltas + let addresses: Vec<&[u8]> = deltas .iter() - .map(|d| BigDecimal::from(BigInt::from(d.delta))) + .map(|delta| address_bytes(&delta.pool_address)) .collect(); + let tick_idxs: Vec = deltas.iter().map(|delta| delta.tick_idx).collect(); + let delta_values: Vec = deltas.iter().map(|delta| sql_i128(delta.delta)).collect(); sqlx::query( "WITH input AS ( @@ -356,7 +407,7 @@ pub async fn batch_update_ticks( AND ticks.tick_idx = upserted.tick_idx AND upserted.liquidity_net = 0", ) - .bind(chain_id.cast_signed()) + .bind(sql_chain_id(chain_id)) .bind(addresses) .bind(tick_idxs) .bind(delta_values) @@ -377,12 +428,12 @@ pub async fn batch_seed_ticks( if ticks.is_empty() { return Ok(()); } - let addresses: Vec<&[u8]> = ticks.iter().map(|d| d.pool_address.as_slice()).collect(); - let tick_idxs: Vec = ticks.iter().map(|d| d.tick_idx).collect(); - let values: Vec = ticks + let addresses: Vec<&[u8]> = ticks .iter() - .map(|d| BigDecimal::from(BigInt::from(d.delta))) + .map(|tick| address_bytes(&tick.pool_address)) .collect(); + let tick_idxs: Vec = ticks.iter().map(|tick| tick.tick_idx).collect(); + let values: Vec = ticks.iter().map(|tick| sql_i128(tick.delta)).collect(); sqlx::query( "WITH input AS ( @@ -398,7 +449,7 @@ pub async fn batch_seed_ticks( ON CONFLICT (chain_id, pool_address, tick_idx) DO UPDATE SET liquidity_net = EXCLUDED.liquidity_net", ) - .bind(chain_id.cast_signed()) + .bind(sql_chain_id(chain_id)) .bind(addresses) .bind(tick_idxs) .bind(values) @@ -413,7 +464,7 @@ pub async fn delete_ticks_for_chain( chain_id: u64, ) -> Result<()> { sqlx::query("DELETE FROM uniswap_v3_ticks WHERE chain_id = $1") - .bind(chain_id.cast_signed()) + .bind(sql_chain_id(chain_id)) .execute(executor) .await .context("delete_ticks_for_chain")?; @@ -461,7 +512,7 @@ impl TryFrom for PoolRow { /// Fetches a page of pools ordered by address with their current state. pub async fn get_pools(pool: &PgPool, chain_id: u64, limit: i64) -> Result> { - sqlx::query( + let rows = sqlx::query( "SELECT p.address, p.token0, p.token1, p.fee, p.token0_decimals, p.token1_decimals, p.token0_symbol, p.token1_symbol, @@ -473,14 +524,13 @@ pub async fn get_pools(pool: &PgPool, chain_id: u64, limit: i64) -> Result, limit: i64, ) -> Result> { - sqlx::query( + let rows = sqlx::query( "SELECT p.address, p.token0, p.token1, p.fee, p.token0_decimals, p.token1_decimals, p.token0_symbol, p.token1_symbol, @@ -503,15 +553,14 @@ pub async fn get_pools_after( ORDER BY p.address LIMIT $3", ) - .bind(chain_id.cast_signed()) + .bind(sql_chain_id(chain_id)) .bind(cursor) .bind(limit) .fetch_all(pool) .await - .context("get_pools_after")? - .into_iter() - .map(PoolRow::try_from) - .collect() + .context("get_pools_after")?; + + decode_pool_rows(rows) } pub struct TickRow { @@ -541,8 +590,7 @@ pub async fn get_pools_by_ids( if addresses.is_empty() { return Ok(Vec::new()); } - let addrs: Vec<&[u8]> = addresses.iter().map(|a| a.as_slice()).collect(); - sqlx::query( + let rows = sqlx::query( "SELECT p.address, p.token0, p.token1, p.fee, p.token0_decimals, p.token1_decimals, p.token0_symbol, p.token1_symbol, @@ -554,14 +602,13 @@ pub async fn get_pools_by_ids( AND p.address = ANY($2) ORDER BY p.address", ) - .bind(chain_id.cast_signed()) - .bind(addrs) + .bind(sql_chain_id(chain_id)) + .bind(address_bytes_list(addresses)) .fetch_all(pool) .await - .context("get_pools_by_ids")? - .into_iter() - .map(PoolRow::try_from) - .collect() + .context("get_pools_by_ids")?; + + decode_pool_rows(rows) } /// Fetches ticks for multiple pools in one query, capped at @@ -578,7 +625,6 @@ pub async fn get_ticks_for_pools( if addresses.is_empty() { return Ok(Vec::new()); } - let addrs: Vec<&[u8]> = addresses.iter().map(|a| a.as_slice()).collect(); sqlx::query( "SELECT t.pool_address, t.tick_idx, t.liquidity_net FROM UNNEST($2::BYTEA[]) AS p(addr) @@ -591,8 +637,8 @@ pub async fn get_ticks_for_pools( ) t ON TRUE ORDER BY t.pool_address, t.tick_idx", ) - .bind(chain_id.cast_signed()) - .bind(addrs) + .bind(sql_chain_id(chain_id)) + .bind(address_bytes_list(addresses)) .bind(MAX_TICKS_PER_POOL) .fetch_all(pool) .await @@ -621,8 +667,8 @@ pub async fn get_ticks( ORDER BY tick_idx LIMIT $3", ) - .bind(chain_id.cast_signed()) - .bind(pool_address.as_slice()) + .bind(sql_chain_id(chain_id)) + .bind(address_bytes(pool_address)) .bind(MAX_TICKS_PER_POOL) .fetch_all(pool) .await @@ -645,7 +691,7 @@ pub async fn search_pools_by_token( token: &str, ) -> Result> { let pattern = format!("%{}%", token.to_lowercase()); - sqlx::query( + let rows = sqlx::query( "SELECT p.address, p.token0, p.token1, p.fee, p.token0_decimals, p.token1_decimals, p.token0_symbol, p.token1_symbol, @@ -657,14 +703,13 @@ pub async fn search_pools_by_token( AND (LOWER(p.token0_symbol) LIKE $2 OR LOWER(p.token1_symbol) LIKE $2) ORDER BY s.liquidity DESC", ) - .bind(chain_id.cast_signed()) + .bind(sql_chain_id(chain_id)) .bind(&pattern) .fetch_all(pool) .await - .context("search_pools_by_token")? - .into_iter() - .map(PoolRow::try_from) - .collect() + .context("search_pools_by_token")?; + + decode_pool_rows(rows) } /// Searches pools matching a pair of token symbols (partial, case-insensitive, @@ -677,7 +722,7 @@ pub async fn search_pools_by_pair( ) -> Result> { let t0 = format!("%{}%", token0.to_lowercase()); let t1 = format!("%{}%", token1.to_lowercase()); - sqlx::query( + let rows = sqlx::query( "SELECT p.address, p.token0, p.token1, p.fee, p.token0_decimals, p.token1_decimals, p.token0_symbol, p.token1_symbol, @@ -692,15 +737,14 @@ pub async fn search_pools_by_pair( ) ORDER BY s.liquidity DESC", ) - .bind(chain_id.cast_signed()) + .bind(sql_chain_id(chain_id)) .bind(&t0) .bind(&t1) .fetch_all(pool) .await - .context("search_pools_by_pair")? - .into_iter() - .map(PoolRow::try_from) - .collect() + .context("search_pools_by_pair")?; + + decode_pool_rows(rows) } /// Returns all distinct token addresses that have no symbol recorded yet. @@ -714,7 +758,7 @@ pub async fn get_tokens_missing_symbols(pool: &PgPool, chain_id: u64) -> Result< WHERE chain_id = $1 AND token1_symbol IS NULL ) t", ) - .bind(chain_id.cast_signed()) + .bind(sql_chain_id(chain_id)) .fetch_all(pool) .await .context("get_tokens_missing_symbols")?; @@ -737,8 +781,8 @@ pub async fn set_token_symbol( "UPDATE uniswap_v3_pools SET token0_symbol = $3 WHERE chain_id = $1 AND token0 = $2 AND token0_symbol IS NULL", ) - .bind(chain_id.cast_signed()) - .bind(token.as_slice()) + .bind(sql_chain_id(chain_id)) + .bind(address_bytes(token)) .bind(symbol) .execute(&mut *tx) .await @@ -748,8 +792,8 @@ pub async fn set_token_symbol( "UPDATE uniswap_v3_pools SET token1_symbol = $3 WHERE chain_id = $1 AND token1 = $2 AND token1_symbol IS NULL", ) - .bind(chain_id.cast_signed()) - .bind(token.as_slice()) + .bind(sql_chain_id(chain_id)) + .bind(address_bytes(token)) .bind(symbol) .execute(&mut *tx) .await @@ -763,7 +807,7 @@ pub async fn get_latest_indexed_block(pool: &PgPool, chain_id: u64) -> Result; /// Cached ERC-20 decimal value keyed by token address. type DecimalsCache = HashMap; +const SYMBOL_BACKFILL_BATCH_SIZE: usize = 500; + /// Data for a newly discovered pool, sourced from a `PoolCreated` factory /// event. pub struct NewPoolData { @@ -79,6 +81,17 @@ struct ChunkChanges { tick_deltas: Vec, } +#[derive(Clone, Copy, Debug)] +struct ChunkRange { + start: u64, + end: u64, +} + +struct PrefetchedChunkData { + liquidities: LiquidityCache, + decimals: DecimalsCache, +} + /// Indexes Uniswap V3 events for a single factory contract, persisting pool /// state and tick liquidity to the database. pub struct UniswapV3Indexer { @@ -143,61 +156,70 @@ impl UniswapV3Indexer { from_block.saturating_sub(1), ) .await?; + loop { - let finalized = self - .provider - .get_block_by_number(self.finality_tag) - .await - .context("get finalized block")? - .context("no finalized block")? - .header - .number; - let last = db::get_checkpoint(&self.db, self.chain_id, &self.factory) - .await? - .unwrap_or(0); - if last >= finalized { - tracing::info!(block = finalized, "caught up to finalized block"); + let finalized_block = self.finalized_block().await?; + let last_indexed_block = self.last_indexed_block().await?; + + if last_indexed_block >= finalized_block { + tracing::info!(block = finalized_block, "caught up to finalized block"); return Ok(()); } + self.run_once().await?; } } async fn run_once(&self) -> Result<()> { - let finalized = self + let finalized_block = self.finalized_block().await?; + let last_indexed_block = self.last_indexed_block().await?; + + if last_indexed_block >= finalized_block { + return Ok(()); + } + + // Fetch chunks' logs in parallel; commit in order. + futures::stream::iter(self.pending_chunks(last_indexed_block, finalized_block)) + .map(|chunk| async move { + let logs = self.fetch_logs_bisecting(chunk.start, chunk.end).await?; + Ok::<_, anyhow::Error>((chunk, logs)) + }) + .buffered(self.fetch_concurrency) + .try_for_each(|(chunk, logs)| self.commit_chunk(chunk, logs)) + .await + } + + async fn finalized_block(&self) -> Result { + Ok(self .provider .get_block_by_number(self.finality_tag) .await .context("get finalized block")? .context("no finalized block")? .header - .number; + .number) + } - let last_indexed = db::get_checkpoint(&self.db, self.chain_id, &self.factory) + async fn last_indexed_block(&self) -> Result { + Ok(db::get_checkpoint(&self.db, self.chain_id, &self.factory) .await? - .unwrap_or(0); - - if last_indexed >= finalized { - return Ok(()); - } + .unwrap_or(0)) + } + fn pending_chunks(&self, last_indexed_block: u64, finalized_block: u64) -> Vec { let mut chunks = Vec::new(); - let mut start = last_indexed + 1; - while start <= finalized { - let end = (start + self.chunk_size - 1).min(finalized); - chunks.push((start, end)); - start = end + 1; + let mut next_start = last_indexed_block + 1; + + while next_start <= finalized_block { + let next_end = (next_start + self.chunk_size - 1).min(finalized_block); + chunks.push(ChunkRange { + start: next_start, + end: next_end, + }); + next_start = next_end + 1; } - // Fetch chunks' logs in parallel; commit in order. - futures::stream::iter(chunks) - .map(|(start, end)| async move { - let logs = self.fetch_logs_bisecting(start, end).await?; - Ok::<_, anyhow::Error>((start, end, logs)) - }) - .buffered(self.fetch_concurrency) - .try_for_each(|(start, end, logs)| self.commit_chunk(start, end, logs)) - .await + chunks } /// Fetches logs for `[from, to]`, sequentially bisecting on @@ -225,22 +247,18 @@ impl UniswapV3Indexer { }) } - #[instrument(skip(self, logs), fields(chunk_start, chunk_end))] - async fn commit_chunk(&self, chunk_start: u64, chunk_end: u64, logs: Vec) -> Result<()> { + #[instrument(skip(self, logs), fields(chunk_start = chunk.start, chunk_end = chunk.end))] + async fn commit_chunk(&self, chunk: ChunkRange, logs: Vec) -> Result<()> { // Pre-fetch all I/O (liquidity + decimals eth_calls) in parallel before // opening the DB transaction. Symbols are intentionally excluded — a // hung `symbol()` call must never block pool inserts. They're populated // later by the async backfill task. - let (liq_cache, dec_cache) = tokio::join!( - self.prefetch_liquidities(&logs), - self.prefetch_decimals(&logs), - ); - - let changes = self.collect_changes(&logs, &liq_cache, &dec_cache); + let prefetched = self.prefetch_chunk_data(&logs).await; + let changes = self.collect_changes(&logs, &prefetched); tracing::debug!( - chunk_start, - chunk_end, + chunk_start = chunk.start, + chunk_end = chunk.end, log_count = logs.len(), new_pools = changes.new_pools.len(), pool_states = changes.pool_states.len(), @@ -249,12 +267,16 @@ impl UniswapV3Indexer { "processing chunk" ); + self.persist_chunk(chunk, changes).await + } + + async fn persist_chunk(&self, chunk: ChunkRange, changes: ChunkChanges) -> Result<()> { let mut tx = self.db.begin().await.context("begin transaction")?; db::batch_insert_pools(&mut tx, self.chain_id, &changes.new_pools).await?; db::batch_upsert_pool_states(&mut tx, self.chain_id, &changes.pool_states).await?; db::batch_update_pool_liquidity(&mut tx, self.chain_id, &changes.liquidity_updates).await?; db::batch_update_ticks(&mut tx, self.chain_id, &changes.tick_deltas).await?; - db::set_checkpoint(&mut *tx, self.chain_id, &self.factory, chunk_end).await?; + db::set_checkpoint(&mut *tx, self.chain_id, &self.factory, chunk.end).await?; tx.commit().await.context("commit transaction")?; Ok(()) @@ -262,13 +284,25 @@ impl UniswapV3Indexer { /// Collect all state changes from a set of logs into in-memory structures. /// This is pure computation — all I/O was done during the prefetch phase. - fn collect_changes( - &self, - logs: &[Log], - liq_cache: &LiquidityCache, - dec_cache: &DecimalsCache, - ) -> ChunkChanges { - collect_log_changes(self.factory, logs, liq_cache, dec_cache) + fn collect_changes(&self, logs: &[Log], prefetched: &PrefetchedChunkData) -> ChunkChanges { + collect_log_changes( + self.factory, + logs, + &prefetched.liquidities, + &prefetched.decimals, + ) + } + + async fn prefetch_chunk_data(&self, logs: &[Log]) -> PrefetchedChunkData { + let (liquidities, decimals) = tokio::join!( + self.prefetch_liquidities(logs), + self.prefetch_decimals(logs), + ); + + PrefetchedChunkData { + liquidities, + decimals, + } } /// Parallel-fetch liquidity for every unique (pool, block) pair from @@ -337,6 +371,10 @@ fn signed24_to_i32(v: alloy::primitives::aliases::I24) -> i32 { (raw << 8).cast_signed() >> 8 } +fn log_block_number(log: &Log) -> u64 { + log.block_number.unwrap_or_default() +} + async fn fetch_pool_liquidity(provider: &AlloyProvider, pool: Address, block: u64) -> Option { contracts::UniswapV3Pool::Instance::new(pool, provider.clone()) .liquidity() @@ -397,8 +435,8 @@ async fn run_symbol_backfill_pass( let mut updated = 0usize; let mut processed = 0usize; - for chunk in tokens.chunks(500) { - let symbols: Vec<(Address, String)> = futures::stream::iter(chunk.iter().copied()) + for token_batch in tokens.chunks(SYMBOL_BACKFILL_BATCH_SIZE) { + let symbols: Vec<(Address, String)> = futures::stream::iter(token_batch.iter().copied()) .map(|token| async move { // `None` → "" sentinel: marks the token as "tried and failed" so // the next backfill pass's `IS NULL` filter skips it. @@ -416,7 +454,7 @@ async fn run_symbol_backfill_pass( } } - processed += chunk.len(); + processed += token_batch.len(); tracing::info!(processed, total, updated, "token symbol backfill progress"); } @@ -493,7 +531,7 @@ impl LogAccumulator { let pool: Address = e.pool; let token0: Address = e.token0; let token1: Address = e.token1; - let created_block = log.block_number.unwrap_or(0); + let created_block = log_block_number(log); tracing::debug!(%pool, %token0, %token1, fee = e.fee.to::(), "discovered pool"); self.new_pools.insert( pool, @@ -519,7 +557,7 @@ impl LogAccumulator { }; let e = &decoded.data; let pool = log.address(); - let block = log.block_number.unwrap_or(0); + let block = log_block_number(log); let liquidity = self .full_states .get(&pool) @@ -545,7 +583,7 @@ impl LogAccumulator { }; let e = &decoded.data; let pool = log.address(); - let block = log.block_number.unwrap_or(0); + let block = log_block_number(log); self.full_states.insert( pool, PoolStateData { @@ -567,16 +605,14 @@ impl LogAccumulator { }; let e = &decoded.data; let pool = log.address(); - let block = log.block_number.unwrap_or(0); + let block = log_block_number(log); let amount = e.amount.cast_signed(); - *self - .tick_deltas - .entry((pool, signed24_to_i32(e.tickLower))) - .or_default() += amount; - *self - .tick_deltas - .entry((pool, signed24_to_i32(e.tickUpper))) - .or_default() -= amount; + self.record_tick_range_delta( + pool, + signed24_to_i32(e.tickLower), + signed24_to_i32(e.tickUpper), + amount, + ); self.update_liquidity_from_cache(pool, block, liq_cache); } @@ -588,19 +624,28 @@ impl LogAccumulator { }; let e = &decoded.data; let pool = log.address(); - let block = log.block_number.unwrap_or(0); + let block = log_block_number(log); let amount = e.amount.cast_signed(); - *self - .tick_deltas - .entry((pool, signed24_to_i32(e.tickLower))) - .or_default() -= amount; - *self - .tick_deltas - .entry((pool, signed24_to_i32(e.tickUpper))) - .or_default() += amount; + self.record_tick_range_delta( + pool, + signed24_to_i32(e.tickLower), + signed24_to_i32(e.tickUpper), + -amount, + ); self.update_liquidity_from_cache(pool, block, liq_cache); } + fn record_tick_range_delta( + &mut self, + pool: Address, + lower_tick: i32, + upper_tick: i32, + liquidity_delta: i128, + ) { + *self.tick_deltas.entry((pool, lower_tick)).or_default() += liquidity_delta; + *self.tick_deltas.entry((pool, upper_tick)).or_default() -= liquidity_delta; + } + /// Refreshes the stored liquidity for `pool` at `block` using the /// prefetch cache. Updates the existing full state in-place if one exists, /// otherwise stores a liquidity-only record. diff --git a/crates/pool-indexer/src/run.rs b/crates/pool-indexer/src/run.rs index 12b888d9f5..f49472a4ed 100644 --- a/crates/pool-indexer/src/run.rs +++ b/crates/pool-indexer/src/run.rs @@ -6,19 +6,16 @@ use { indexer::uniswap_v3::UniswapV3Indexer, }, clap::Parser, - ethrpc::{Config as EthRpcConfig, web3}, - sqlx::postgres::PgPoolOptions, - std::{collections::HashSet, sync::Arc}, + ethrpc::{AlloyProvider, Config as EthRpcConfig, web3}, + sqlx::{PgPool, postgres::PgPoolOptions}, + std::{collections::HashSet, net::SocketAddr, sync::Arc}, tokio::task::JoinSet, }; pub async fn start(args: impl Iterator) { let args = Arguments::parse_from(args); - let log_filter = std::env::var("RUST_LOG").unwrap_or_else(|_| "info".into()); - observe::tracing::init::initialize(&observe::Config::new(&log_filter, None, false, None)); - observe::panic_hook::install(); - - let config = Configuration::from_path(&args.config).expect("failed to load configuration"); + initialize_observability(); + let config = load_configuration(&args); tracing::info!("pool-indexer starting"); run(config).await; } @@ -27,58 +24,81 @@ pub async fn run(config: Configuration) { validate_networks(&config.networks); let db = connect_db(&config).await; + let api_state = build_api_state(&db, &config.networks); + + let mut set = JoinSet::new(); + spawn_api_task(&mut set, api_state, config.api.bind_address); + + for network in config.networks { + spawn_network_task(&mut set, db.clone(), network); + } + + if let Some(result) = set.join_next().await { + panic!("pool-indexer task exited: {result:?}"); + } +} + +fn initialize_observability() { + let log_filter = std::env::var("RUST_LOG").unwrap_or_else(|_| "info".into()); + observe::tracing::init::initialize(&observe::Config::new(&log_filter, None, false, None)); + observe::panic_hook::install(); +} + +fn load_configuration(args: &Arguments) -> Configuration { + Configuration::from_path(&args.config).expect("failed to load configuration") +} - let networks = config - .networks +fn build_api_state(db: &PgPool, networks: &[NetworkConfig]) -> Arc { + let networks = networks .iter() - .map(|n| (n.name.clone(), n.chain_id)) + .map(|network| (network.name.clone(), network.chain_id)) .collect(); - let api_state = Arc::new(AppState { + Arc::new(AppState { db: db.clone(), networks, - }); - let router = crate::api::router(api_state); - let bind_address = config.api.bind_address; + }) +} - let mut set = JoinSet::new(); +fn spawn_api_task(set: &mut JoinSet<()>, state: Arc, bind_address: SocketAddr) { + let router = crate::api::router(state); set.spawn(async move { serve(router, bind_address).await }); +} - for net in config.networks { - let db = db.clone(); - let w3 = web3( - EthRpcConfig::default(), - &net.rpc_url, - Some(&format!("pool-indexer-{}", net.name)), - ); +fn spawn_network_task(set: &mut JoinSet<()>, db: PgPool, network: NetworkConfig) { + set.spawn(async move { + run_network_indexer(db, network).await; + }); +} - let indexer_config = net.indexer_config(); - let poll_interval = net.poll_interval(); - let chain_id = net.chain_id; - let name = net.name.clone(); - let subgraph_url = net.subgraph_url.clone(); - let seed_block = net.seed_block; - - let indexer = UniswapV3Indexer::new(w3.provider.clone(), db.clone(), &indexer_config); - - set.spawn(async move { - tracing::info!(network = %name, chain_id, "starting indexer"); - if let Some(url) = subgraph_url { - let seeded_block = crate::seeder::seed(&db, chain_id, &url, seed_block) - .await - .expect("seeding failed"); - indexer - .catch_up(seeded_block) - .await - .expect("catch-up indexing failed"); - } - indexer.run(poll_interval).await - }); - } +async fn run_network_indexer(db: PgPool, network: NetworkConfig) { + tracing::info!(network = %network.name, chain_id = network.chain_id, "starting indexer"); - if let Some(result) = set.join_next().await { - panic!("pool-indexer task exited: {result:?}"); + let provider = build_provider(&network); + let indexer = UniswapV3Indexer::new(provider.clone(), db.clone(), &network.indexer_config()); + + if let Some(subgraph_url) = network.subgraph_url.as_deref() { + let seeded_block = + crate::seeder::seed(&db, network.chain_id, subgraph_url, network.seed_block) + .await + .expect("seeding failed"); + indexer + .catch_up(seeded_block) + .await + .expect("catch-up indexing failed"); } + + indexer.run(network.poll_interval()).await; +} + +fn build_provider(network: &NetworkConfig) -> AlloyProvider { + web3( + EthRpcConfig::default(), + &network.rpc_url, + Some(&format!("pool-indexer-{}", network.name)), + ) + .provider + .clone() } fn validate_networks(networks: &[NetworkConfig]) { diff --git a/crates/pool-indexer/src/seeder.rs b/crates/pool-indexer/src/seeder.rs index a90824bb3d..14cc3e2035 100644 --- a/crates/pool-indexer/src/seeder.rs +++ b/crates/pool-indexer/src/seeder.rs @@ -98,228 +98,324 @@ struct MetaBlock { number: u64, } -/// Executes a GraphQL query against `url` and deserialises the `data` field. -/// Returns an error if the response contains a top-level `errors` array. -async fn gql Deserialize<'de>>( - client: &Client, - url: &str, - query: &str, - vars: Value, -) -> Result { - let resp = client - .post(url) - .json(&json!({ "query": query, "variables": vars })) - .send() - .await - .context("subgraph HTTP request")?; - let gql_resp: GqlResponse = resp.json().await.context("decode subgraph response")?; - if let Some(errors) = gql_resp.errors { - bail!("subgraph errors: {errors}"); - } - let data = gql_resp.data.context("missing data field")?; - serde_json::from_value(data).context("decode subgraph data") +#[derive(Clone)] +struct SubgraphClient { + http: Client, + url: String, } -async fn fetch_current_block(client: &Client, url: &str) -> Result { - let page: MetaPage = gql(client, url, "{ _meta { block { number } } }", json!({})).await?; - Ok(page.meta.block.number) -} +impl SubgraphClient { + fn new(url: &str) -> Result { + let http = Client::builder() + .timeout(SUBGRAPH_REQUEST_TIMEOUT) + .build() + .context("build HTTP client")?; + + Ok(Self { + http, + url: url.to_owned(), + }) + } -/// Fetches one page of pools at `block`, ordered by id and starting after -/// `cursor` (empty string to start from the beginning). -async fn fetch_pools_page( - client: &Client, - url: &str, - block: u64, - cursor: &str, -) -> Result> { - let query = "query($block: Int!, $cursor: String!) { - pools(first: 1000, orderBy: id, where: {id_gt: $cursor}, block: {number: $block}) { - id - token0 { id decimals symbol } - token1 { id decimals symbol } - feeTier - createdAtBlockNumber - sqrtPrice - liquidity - tick - } - }"; - let page: PoolsPage = gql( - client, - url, - query, - json!({ "block": block, "cursor": cursor }), - ) - .await?; - Ok(page.pools) -} + /// Executes a GraphQL query and deserialises the `data` field. + /// Returns an error if the response contains a top-level `errors` array. + async fn query Deserialize<'de>>(&self, query: &str, vars: Value) -> Result { + let response = self + .http + .post(&self.url) + .json(&json!({ "query": query, "variables": vars })) + .send() + .await + .context("subgraph HTTP request")?; -/// Fetches all ticks for `pool_id` at `block` using keyset pagination. -/// Returns each tick as a [`TickDeltaData`] where `delta` is the subgraph's -/// `liquidityNet` (treated as an absolute value, not a running delta). -async fn fetch_ticks_for_pool( - client: Client, - url: String, - pool_id: String, - block: u64, -) -> Result> { - let query = "query($pool: String!, $cursor: Int!, $block: Int!) { - ticks( - first: 1000, - orderBy: tickIdx, - where: { pool: $pool, tickIdx_gt: $cursor }, - block: { number: $block } - ) { - tickIdx - liquidityNet - } - }"; - - let pool_addr: Address = pool_id.parse().context("parse pool address")?; - let mut ticks = Vec::new(); - let mut cursor: i64 = TICK_IDX_CURSOR_START; - - loop { - let page: TicksPage = gql( - &client, - &url, - query, - json!({ "pool": pool_id, "cursor": cursor, "block": block }), - ) - .await?; - - let n = page.ticks.len(); - for t in &page.ticks { - ticks.push(TickDeltaData { - pool_address: pool_addr, - tick_idx: t.tick_idx.parse().context("parse tickIdx")?, - delta: t.liquidity_net.parse().context("parse liquidityNet")?, - }); + let gql_response: GqlResponse = + response.json().await.context("decode subgraph response")?; + if let Some(errors) = gql_response.errors { + bail!("subgraph errors: {errors}"); } - if n < PAGE_SIZE { - break; - } - cursor = ticks.last().unwrap().tick_idx as i64; + let data = gql_response.data.context("missing data field")?; + serde_json::from_value(data).context("decode subgraph data") } - Ok(ticks) -} + async fn current_block(&self) -> Result { + let page: MetaPage = self + .query("{ _meta { block { number } } }", json!({})) + .await?; + Ok(page.meta.block.number) + } -/// Seeds pools and ticks from the subgraph and returns the block number that -/// was seeded. The caller is responsible for catching up to the current -/// finalized block via `catch_up`. -pub async fn seed( - db: &PgPool, - chain_id: u64, - subgraph_url: &str, - block: Option, -) -> Result { - let client = Client::builder() - .timeout(SUBGRAPH_REQUEST_TIMEOUT) - .build() - .context("build HTTP client")?; - - let block = match block { - Some(b) => b, - None => fetch_current_block(&client, subgraph_url) - .await - .context("fetch current subgraph block")?, - }; - info!(block, "seeding pool-indexer from subgraph"); - - let mut pool_ids: Vec = Vec::new(); - let mut cursor = String::new(); - - loop { - let page = fetch_pools_page(&client, subgraph_url, block, &cursor).await?; - let n = page.len(); - - let mut new_pools = Vec::with_capacity(n); - let mut pool_states = Vec::with_capacity(n); - - for p in &page { - let address: Address = p.id.parse().context("parse pool id")?; - new_pools.push(NewPoolData { - address, - token0: p.token0.id.parse().context("parse token0")?, - token1: p.token1.id.parse().context("parse token1")?, - fee: p.fee_tier.parse().context("parse feeTier")?, - token0_decimals: p.token0.decimals.parse::().ok(), - token1_decimals: p.token1.decimals.parse::().ok(), - token0_symbol: p.token0.symbol.clone(), - token1_symbol: p.token1.symbol.clone(), - created_block: p - .created_at_block_number - .parse() - .context("parse createdAtBlockNumber")?, - }); - - if let Some(tick_str) = &p.tick - && p.sqrt_price != "0" - { - pool_states.push(PoolStateData { - pool_address: address, - block_number: block, - sqrt_price_x96: p.sqrt_price.parse::().context("parse sqrtPrice")?, - liquidity: p.liquidity.parse().context("parse liquidity")?, - tick: tick_str.parse().context("parse tick")?, + /// Fetches one page of pools at `block`, ordered by id and starting after + /// `cursor` (empty string to start from the beginning). + async fn fetch_pools_page(&self, block: u64, cursor: &str) -> Result> { + let query = "query($block: Int!, $cursor: String!) { + pools(first: 1000, orderBy: id, where: {id_gt: $cursor}, block: {number: $block}) { + id + token0 { id decimals symbol } + token1 { id decimals symbol } + feeTier + createdAtBlockNumber + sqrtPrice + liquidity + tick + } + }"; + + let page: PoolsPage = self + .query(query, json!({ "block": block, "cursor": cursor })) + .await?; + Ok(page.pools) + } + + /// Fetches all ticks for `pool_id` at `block` using keyset pagination. + /// Returns each tick as a [`TickDeltaData`] where `delta` is the subgraph's + /// `liquidityNet` (treated as an absolute value, not a running delta). + async fn fetch_ticks_for_pool( + &self, + pool_id: String, + block: u64, + ) -> Result> { + let query = "query($pool: String!, $cursor: Int!, $block: Int!) { + ticks( + first: 1000, + orderBy: tickIdx, + where: { pool: $pool, tickIdx_gt: $cursor }, + block: { number: $block } + ) { + tickIdx + liquidityNet + } + }"; + + let pool_address: Address = pool_id.parse().context("parse pool address")?; + let mut ticks = Vec::new(); + let mut cursor = TICK_IDX_CURSOR_START; + + loop { + let page: TicksPage = self + .query( + query, + json!({ "pool": pool_id, "cursor": cursor, "block": block }), + ) + .await?; + + for tick in &page.ticks { + ticks.push(TickDeltaData { + pool_address, + tick_idx: tick.tick_idx.parse().context("parse tickIdx")?, + delta: tick.liquidity_net.parse().context("parse liquidityNet")?, }); } - pool_ids.push(p.id.clone()); + if page.ticks.len() < PAGE_SIZE { + break; + } + + cursor = ticks.last().expect("tick page is non-empty").tick_idx as i64; } - let mut tx = db.begin().await.context("begin pool tx")?; - db::batch_insert_pools(&mut tx, chain_id, &new_pools).await?; - db::batch_upsert_pool_states(&mut tx, chain_id, &pool_states).await?; - tx.commit().await.context("commit pool tx")?; + Ok(ticks) + } +} - info!(total = pool_ids.len(), "pools seeded"); +struct SubgraphSeeder<'a> { + db: &'a PgPool, + chain_id: u64, + subgraph: SubgraphClient, + snapshot_block: u64, +} + +impl<'a> SubgraphSeeder<'a> { + async fn new( + db: &'a PgPool, + chain_id: u64, + subgraph_url: &str, + block: Option, + ) -> Result { + let subgraph = SubgraphClient::new(subgraph_url)?; + let snapshot_block = match block { + Some(block) => block, + None => subgraph + .current_block() + .await + .context("fetch current subgraph block")?, + }; + + Ok(Self { + db, + chain_id, + subgraph, + snapshot_block, + }) + } - if n < PAGE_SIZE { - break; + async fn seed(self) -> Result { + info!( + block = self.snapshot_block, + "seeding pool-indexer from subgraph" + ); + + let pool_ids = self.seed_pools().await?; + let total_ticks = self.seed_ticks(&pool_ids).await?; + + info!( + block = self.snapshot_block, + pools = pool_ids.len(), + ticks = total_ticks, + "seeding complete" + ); + Ok(self.snapshot_block) + } + + async fn seed_pools(&self) -> Result> { + let mut all_pool_ids = Vec::new(); + let mut cursor = String::new(); + + loop { + let page = self + .subgraph + .fetch_pools_page(self.snapshot_block, &cursor) + .await?; + let page_len = page.len(); + + all_pool_ids.extend(self.persist_pool_page(&page).await?); + info!(total = all_pool_ids.len(), "pools seeded"); + + if page_len < PAGE_SIZE { + break; + } + + cursor = page.last().expect("full pages are non-empty").id.clone(); } - cursor = page.last().unwrap().id.clone(); + + info!( + total = all_pool_ids.len(), + "all pools seeded — starting tick seeding" + ); + Ok(all_pool_ids) } - info!( - total = pool_ids.len(), - "all pools seeded — starting tick seeding" - ); + async fn persist_pool_page(&self, page: &[SubgraphPool]) -> Result> { + let mut pool_ids = Vec::with_capacity(page.len()); + let mut new_pools = Vec::with_capacity(page.len()); + let mut pool_states = Vec::with_capacity(page.len()); + + for pool in page { + let (pool_id, new_pool, pool_state) = parse_seeded_pool(pool, self.snapshot_block)?; + pool_ids.push(pool_id); + new_pools.push(new_pool); + + if let Some(pool_state) = pool_state { + pool_states.push(pool_state); + } + } - // Clear all existing tick data so seeded values are authoritative. - // This prevents stale rows (e.g. ticks burned to 0 before the seed block) - // from persisting if the seeder is re-run on a non-empty database. - db::delete_ticks_for_chain(db, chain_id).await?; + let mut tx = self.db.begin().await.context("begin pool tx")?; + db::batch_insert_pools(&mut tx, self.chain_id, &new_pools).await?; + db::batch_upsert_pool_states(&mut tx, self.chain_id, &pool_states).await?; + tx.commit().await.context("commit pool tx")?; - let mut total_ticks = 0usize; - let url = subgraph_url.to_owned(); + Ok(pool_ids) + } - for chunk in pool_ids.chunks(TICK_CONCURRENCY) { - let tick_batches: Vec> = futures::stream::iter(chunk.iter().cloned()) - .map(|pool_id| fetch_ticks_for_pool(client.clone(), url.clone(), pool_id, block)) - .buffer_unordered(TICK_CONCURRENCY) - .try_collect() - .await?; + async fn seed_ticks(&self, pool_ids: &[String]) -> Result { + // Clear all existing tick data so seeded values are authoritative. + // This prevents stale rows (e.g. ticks burned to 0 before the seed block) + // from persisting if the seeder is re-run on a non-empty database. + db::delete_ticks_for_chain(self.db, self.chain_id).await?; - let ticks: Vec = tick_batches.into_iter().flatten().collect(); - let n = ticks.len(); + let mut total_ticks = 0usize; + for pool_batch in pool_ids.chunks(TICK_CONCURRENCY) { + let ticks = self.fetch_tick_batch(pool_batch).await?; - if !ticks.is_empty() { - db::batch_seed_ticks(db, chain_id, &ticks).await?; + if !ticks.is_empty() { + db::batch_seed_ticks(self.db, self.chain_id, &ticks).await?; + } + + total_ticks += ticks.len(); + info!(total = total_ticks, "ticks seeded"); } - total_ticks += n; - info!(total = total_ticks, "ticks seeded"); + Ok(total_ticks) } - info!( - block, - pools = pool_ids.len(), - ticks = total_ticks, - "seeding complete" - ); - Ok(block) + async fn fetch_tick_batch(&self, pool_batch: &[String]) -> Result> { + let subgraph = self.subgraph.clone(); + let snapshot_block = self.snapshot_block; + + let tick_batches: Vec> = + futures::stream::iter(pool_batch.iter().cloned()) + .map(move |pool_id| { + let subgraph = subgraph.clone(); + async move { subgraph.fetch_ticks_for_pool(pool_id, snapshot_block).await } + }) + .buffer_unordered(TICK_CONCURRENCY) + .try_collect() + .await?; + + Ok(tick_batches.into_iter().flatten().collect()) + } +} + +fn parse_seeded_pool( + pool: &SubgraphPool, + snapshot_block: u64, +) -> Result<(String, NewPoolData, Option)> { + let address: Address = pool.id.parse().context("parse pool id")?; + let new_pool = NewPoolData { + address, + token0: pool.token0.id.parse().context("parse token0")?, + token1: pool.token1.id.parse().context("parse token1")?, + fee: pool.fee_tier.parse().context("parse feeTier")?, + token0_decimals: pool.token0.decimals.parse::().ok(), + token1_decimals: pool.token1.decimals.parse::().ok(), + token0_symbol: pool.token0.symbol.clone(), + token1_symbol: pool.token1.symbol.clone(), + created_block: pool + .created_at_block_number + .parse() + .context("parse createdAtBlockNumber")?, + }; + + Ok(( + pool.id.clone(), + new_pool, + parse_seeded_pool_state(pool, address, snapshot_block)?, + )) +} + +fn parse_seeded_pool_state( + pool: &SubgraphPool, + address: Address, + snapshot_block: u64, +) -> Result> { + let Some(tick) = pool.tick.as_deref() else { + return Ok(None); + }; + if pool.sqrt_price == "0" { + return Ok(None); + } + + Ok(Some(PoolStateData { + pool_address: address, + block_number: snapshot_block, + sqrt_price_x96: pool.sqrt_price.parse::().context("parse sqrtPrice")?, + liquidity: pool.liquidity.parse().context("parse liquidity")?, + tick: tick.parse().context("parse tick")?, + })) +} + +/// Seeds pools and ticks from the subgraph and returns the block number that +/// was seeded. The caller is responsible for catching up to the current +/// finalized block via `catch_up`. +pub async fn seed( + db: &PgPool, + chain_id: u64, + subgraph_url: &str, + block: Option, +) -> Result { + SubgraphSeeder::new(db, chain_id, subgraph_url, block) + .await? + .seed() + .await } From 6a91cd2d1f372a476a2f36d16bc81bf6af4bb2bf Mon Sep 17 00:00:00 2001 From: Jan P Date: Fri, 17 Apr 2026 17:11:01 +0200 Subject: [PATCH 11/80] Remove useless wrapper --- crates/pool-indexer/src/indexer/uniswap_v3.rs | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/crates/pool-indexer/src/indexer/uniswap_v3.rs b/crates/pool-indexer/src/indexer/uniswap_v3.rs index 63c044e895..99efc824a3 100644 --- a/crates/pool-indexer/src/indexer/uniswap_v3.rs +++ b/crates/pool-indexer/src/indexer/uniswap_v3.rs @@ -254,7 +254,12 @@ impl UniswapV3Indexer { // hung `symbol()` call must never block pool inserts. They're populated // later by the async backfill task. let prefetched = self.prefetch_chunk_data(&logs).await; - let changes = self.collect_changes(&logs, &prefetched); + let changes = collect_log_changes( + self.factory, + &logs, + &prefetched.liquidities, + &prefetched.decimals, + ); tracing::debug!( chunk_start = chunk.start, @@ -282,17 +287,6 @@ impl UniswapV3Indexer { Ok(()) } - /// Collect all state changes from a set of logs into in-memory structures. - /// This is pure computation — all I/O was done during the prefetch phase. - fn collect_changes(&self, logs: &[Log], prefetched: &PrefetchedChunkData) -> ChunkChanges { - collect_log_changes( - self.factory, - logs, - &prefetched.liquidities, - &prefetched.decimals, - ) - } - async fn prefetch_chunk_data(&self, logs: &[Log]) -> PrefetchedChunkData { let (liquidities, decimals) = tokio::join!( self.prefetch_liquidities(logs), From c0f24e8ba0f82dd8e00d97294ad64e41fece07ae Mon Sep 17 00:00:00 2001 From: Jan P Date: Mon, 20 Apr 2026 16:15:50 +0200 Subject: [PATCH 12/80] Add indexes --- crates/pool-indexer/src/cold_seeder.rs | 391 ++++++++++++++++++ crates/pool-indexer/src/config.rs | 9 +- crates/pool-indexer/src/lib.rs | 3 +- crates/pool-indexer/src/run.rs | 86 +++- .../src/{seeder.rs => subgraph_seeder.rs} | 3 +- .../sql/V110__pool_indexer_uniswap_v3.sql | 7 +- 6 files changed, 487 insertions(+), 12 deletions(-) create mode 100644 crates/pool-indexer/src/cold_seeder.rs rename crates/pool-indexer/src/{seeder.rs => subgraph_seeder.rs} (99%) diff --git a/crates/pool-indexer/src/cold_seeder.rs b/crates/pool-indexer/src/cold_seeder.rs new file mode 100644 index 0000000000..7e4f996227 --- /dev/null +++ b/crates/pool-indexer/src/cold_seeder.rs @@ -0,0 +1,391 @@ +//! Bootstraps the pool-indexer from on-chain data alone. +//! +//! Used when a chain has no Uniswap V3 subgraph. Three phases: +//! +//! 1. **Pool discovery** — scan `PoolCreated` events on the factory from +//! genesis to `snapshot_block`. +//! 2. **State snapshot** — per-pool `slot0()` + `liquidity()` at +//! `snapshot_block`, fanned out across concurrent eth_calls. +//! 3. **Tick reconstruction** — for pools with non-zero liquidity, filter +//! `Mint`/`Burn` logs by pool address over the full history and accumulate +//! `liquidity_net` deltas per tick. +//! +//! The live indexer takes over from `snapshot_block + 1` via `catch_up`. + +use { + crate::{ + db::uniswap_v3 as db, + indexer::uniswap_v3::{ + NewPoolData, + PoolStateData, + TickDeltaData, + is_range_too_large, + signed24_to_i32, + }, + }, + alloy::{ + primitives::Address, + providers::Provider, + rpc::types::{Filter, FilterSet, Log}, + sol_types::SolEvent, + }, + anyhow::{Context, Result}, + contracts::{ + ERC20, + IUniswapV3Factory::IUniswapV3Factory::PoolCreated, + UniswapV3Pool::{ + self, + UniswapV3Pool::{Burn, Mint}, + }, + }, + ethrpc::AlloyProvider, + futures::{StreamExt, TryStreamExt}, + sqlx::PgPool, + std::collections::HashMap, + tracing::{info, instrument, warn}, +}; + +/// Initial block-range size for `PoolCreated` discovery. Bisected on +/// "range too large" errors, so picking too small only costs extra +/// round-trips, never fails. 10k is Alchemy's per-call cap on chains like +/// Ink; more permissive endpoints could run faster with a larger value. +const DISCOVERY_BLOCK_CHUNK: u64 = 10_000; + +/// Initial block-range size for Mint/Burn history scans in phase 3. +const HISTORY_BLOCK_CHUNK: u64 = 10_000; + +/// Number of pools per `eth_getLogs` address-filter list in phase 3. Must stay +/// under the RPC provider's filter-size limit. +const POOL_ADDRESS_BATCH: usize = 100; +/// Concurrency for per-pool eth_calls (decimals, slot0, liquidity). +const ETH_CALL_CONCURRENCY: usize = 50; + +/// Concurrency for concurrent `eth_getLogs` calls. +const LOG_FETCH_CONCURRENCY: usize = 8; + +pub async fn cold_seed( + db: &PgPool, + chain_id: u64, + provider: AlloyProvider, + factory: Address, + snapshot_block: Option, +) -> Result { + let snapshot_block = match snapshot_block { + Some(b) => b, + None => provider + .get_block_number() + .await + .context("fetch current block")?, + }; + + info!( + chain_id, + snapshot_block, "cold-seeding pool-indexer from chain" + ); + + let pools = discover_pools(&provider, factory, snapshot_block).await?; + info!(chain_id, pools = pools.len(), "pools discovered"); + persist_pools(db, chain_id, &pools).await?; + + let states = snapshot_pool_states(&provider, &pools, snapshot_block).await?; + info!(chain_id, states = states.len(), "pool states snapshotted"); + persist_pool_states(db, chain_id, &states).await?; + + let active_pools: Vec
= states + .iter() + .filter(|s| s.liquidity > 0) + .map(|s| s.pool_address) + .collect(); + info!( + chain_id, + active = active_pools.len(), + inactive = pools.len() - active_pools.len(), + "reconstructing ticks for active pools" + ); + + reconstruct_and_persist_ticks(db, chain_id, &provider, &active_pools, snapshot_block).await?; + + info!(chain_id, snapshot_block, "cold seeding complete"); + Ok(snapshot_block) +} + +#[instrument(skip(provider))] +async fn discover_pools( + provider: &AlloyProvider, + factory: Address, + to_block: u64, +) -> Result> { + // Chunk the full block range, fetch in parallel, decode PoolCreated events. + let ranges: Vec<(u64, u64)> = (0..=to_block) + .step_by(DISCOVERY_BLOCK_CHUNK as usize) + .map(|start| (start, (start + DISCOVERY_BLOCK_CHUNK - 1).min(to_block))) + .collect(); + + let logs: Vec = futures::stream::iter(ranges) + .map(|(from, to)| { + let provider = provider.clone(); + async move { fetch_pool_created_logs(&provider, factory, from, to).await } + }) + .buffered(LOG_FETCH_CONCURRENCY) + .try_concat() + .await?; + + let events: Vec<(Log, PoolCreated)> = logs + .into_iter() + .filter_map(|log| { + let decoded = PoolCreated::decode_log(&log.inner).ok()?; + Some((log, decoded.data)) + }) + .collect(); + + // Fetch ERC-20 decimals for every referenced token (dedup first). + let tokens: std::collections::HashSet
= events + .iter() + .flat_map(|(_, e)| [e.token0, e.token1]) + .collect(); + let decimals = fetch_decimals_concurrent(provider, tokens).await; + + Ok(events + .into_iter() + .map(|(log, e)| NewPoolData { + address: e.pool, + token0: e.token0, + token1: e.token1, + fee: e.fee.to::(), + token0_decimals: decimals.get(&e.token0).copied(), + token1_decimals: decimals.get(&e.token1).copied(), + token0_symbol: None, + token1_symbol: None, + created_block: log.block_number.unwrap_or(0), + }) + .collect()) +} + +fn fetch_pool_created_logs( + provider: &AlloyProvider, + factory: Address, + from: u64, + to: u64, +) -> futures::future::BoxFuture<'_, Result>> { + Box::pin(async move { + let filter = Filter::new() + .address(factory) + .event_signature(PoolCreated::SIGNATURE_HASH) + .from_block(from) + .to_block(to); + let err: anyhow::Error = match provider.get_logs(&filter).await { + Ok(logs) => return Ok(logs), + Err(err) => anyhow::Error::new(err), + }; + if is_range_too_large(&err) && to > from { + let mid = (from + to) / 2; + let mut left = fetch_pool_created_logs(provider, factory, from, mid).await?; + let right = fetch_pool_created_logs(provider, factory, mid + 1, to).await?; + left.extend(right); + Ok(left) + } else { + Err(err.context(format!("get_logs({from}..={to})"))) + } + }) +} + +async fn fetch_decimals_concurrent( + provider: &AlloyProvider, + tokens: std::collections::HashSet
, +) -> HashMap { + futures::stream::iter(tokens) + .map(|token| { + let provider = provider.clone(); + async move { + let dec = ERC20::Instance::new(token, provider.clone()) + .decimals() + .call() + .await + .ok(); + (token, dec) + } + }) + .buffer_unordered(ETH_CALL_CONCURRENCY) + .filter_map(|(token, opt)| async move { opt.map(|d| (token, d)) }) + .collect() + .await +} + +async fn persist_pools(db: &PgPool, chain_id: u64, pools: &[NewPoolData]) -> Result<()> { + let mut tx = db.begin().await.context("begin pools tx")?; + db::batch_insert_pools(&mut tx, chain_id, pools).await?; + tx.commit().await.context("commit pools tx")?; + Ok(()) +} + +#[instrument(skip(provider, pools))] +async fn snapshot_pool_states( + provider: &AlloyProvider, + pools: &[NewPoolData], + at_block: u64, +) -> Result> { + let addresses: Vec
= pools.iter().map(|p| p.address).collect(); + let states: Vec = futures::stream::iter(addresses) + .map(|pool| { + let provider = provider.clone(); + async move { fetch_pool_state(&provider, pool, at_block).await } + }) + .buffer_unordered(ETH_CALL_CONCURRENCY) + .filter_map(|res| async move { res }) + .collect() + .await; + Ok(states) +} + +async fn fetch_pool_state( + provider: &AlloyProvider, + pool: Address, + at_block: u64, +) -> Option { + let instance = UniswapV3Pool::Instance::new(pool, provider.clone()); + let slot0_call = instance.slot0().block(at_block.into()); + let liquidity_call = instance.liquidity().block(at_block.into()); + let (slot0, liquidity) = tokio::join!(slot0_call.call(), liquidity_call.call()); + let slot0 = match slot0 { + Ok(s) => s, + Err(err) => { + warn!(%pool, ?err, "slot0 failed"); + return None; + } + }; + let liquidity = match liquidity { + Ok(l) => l, + Err(err) => { + warn!(%pool, ?err, "liquidity failed"); + return None; + } + }; + Some(PoolStateData { + pool_address: pool, + block_number: at_block, + sqrt_price_x96: slot0.sqrtPriceX96, + liquidity, + tick: signed24_to_i32(slot0.tick), + }) +} + +async fn persist_pool_states(db: &PgPool, chain_id: u64, states: &[PoolStateData]) -> Result<()> { + let mut tx = db.begin().await.context("begin states tx")?; + db::batch_upsert_pool_states(&mut tx, chain_id, states).await?; + tx.commit().await.context("commit states tx")?; + Ok(()) +} + +/// Processes active pools one `POOL_ADDRESS_BATCH`-sized group at a time. +/// Each group's full history is fetched, deltas accumulated, and flushed to +/// the DB before moving on — bounds memory to roughly one batch's worth of +/// logs at any moment, and gives operators visible progress on long runs. +#[instrument(skip(db, provider, active_pools))] +async fn reconstruct_and_persist_ticks( + db: &PgPool, + chain_id: u64, + provider: &AlloyProvider, + active_pools: &[Address], + to_block: u64, +) -> Result<()> { + let total = active_pools.len(); + let mut processed = 0usize; + let mut tick_rows = 0usize; + + for pool_batch in active_pools.chunks(POOL_ADDRESS_BATCH) { + let pool_batch = pool_batch.to_vec(); + let batch_size = pool_batch.len(); + + let block_ranges: Vec<(u64, u64)> = (0..=to_block) + .step_by(HISTORY_BLOCK_CHUNK as usize) + .map(|start| (start, (start + HISTORY_BLOCK_CHUNK - 1).min(to_block))) + .collect(); + + let logs: Vec = futures::stream::iter(block_ranges) + .map(|(from, to)| { + let provider = provider.clone(); + let pool_batch = pool_batch.clone(); + async move { fetch_mint_burn_logs(&provider, pool_batch, from, to).await } + }) + .buffered(LOG_FETCH_CONCURRENCY) + .try_concat() + .await?; + + let mut acc: HashMap<(Address, i32), i128> = HashMap::new(); + for log in logs { + let Some(t) = log.topic0() else { continue }; + let pool = log.address(); + if *t == Mint::SIGNATURE_HASH + && let Ok(decoded) = Mint::decode_log(&log.inner) + { + let e = &decoded.data; + let amount = e.amount.cast_signed(); + *acc.entry((pool, signed24_to_i32(e.tickLower))).or_default() += amount; + *acc.entry((pool, signed24_to_i32(e.tickUpper))).or_default() -= amount; + } else if *t == Burn::SIGNATURE_HASH + && let Ok(decoded) = Burn::decode_log(&log.inner) + { + let e = &decoded.data; + let amount = e.amount.cast_signed(); + *acc.entry((pool, signed24_to_i32(e.tickLower))).or_default() -= amount; + *acc.entry((pool, signed24_to_i32(e.tickUpper))).or_default() += amount; + } + } + + let deltas: Vec = acc + .into_iter() + .filter(|(_, d)| *d != 0) + .map(|((pool, tick), delta)| TickDeltaData { + pool_address: pool, + tick_idx: tick, + delta, + }) + .collect(); + + if !deltas.is_empty() { + db::batch_seed_ticks(db, chain_id, &deltas).await?; + tick_rows += deltas.len(); + } + + processed += batch_size; + info!( + chain_id, + processed, total, tick_rows, "tick reconstruction progress" + ); + } + Ok(()) +} + +fn fetch_mint_burn_logs( + provider: &AlloyProvider, + pool_batch: Vec
, + from: u64, + to: u64, +) -> futures::future::BoxFuture<'_, Result>> { + Box::pin(async move { + let filter = Filter::new() + .address(pool_batch.clone()) + .event_signature(FilterSet::from_iter([ + Mint::SIGNATURE_HASH, + Burn::SIGNATURE_HASH, + ])) + .from_block(from) + .to_block(to); + let err: anyhow::Error = match provider.get_logs(&filter).await { + Ok(logs) => return Ok(logs), + Err(err) => anyhow::Error::new(err), + }; + if is_range_too_large(&err) && to > from { + let mid = (from + to) / 2; + let mut left = fetch_mint_burn_logs(provider, pool_batch.clone(), from, mid).await?; + let right = fetch_mint_burn_logs(provider, pool_batch, mid + 1, to).await?; + left.extend(right); + Ok(left) + } else { + Err(err.context(format!( + "mint_burn_logs({from}..={to}, pools={})", + pool_batch.len() + ))) + } + }) +} diff --git a/crates/pool-indexer/src/config.rs b/crates/pool-indexer/src/config.rs index fa2dbee33d..be9b91771a 100644 --- a/crates/pool-indexer/src/config.rs +++ b/crates/pool-indexer/src/config.rs @@ -71,7 +71,10 @@ pub struct NetworkConfig { pub name: NetworkName, pub chain_id: u64, pub rpc_url: Url, - pub factory_address: Address, + /// One or more Uniswap V3 factory addresses to index. Each factory runs + /// its own seed + live-indexing loop; pools from all factories share the + /// per-chain namespace in the DB and API. + pub factories: Vec
, #[serde(default = "default_chunk_size")] pub chunk_size: u64, #[serde(default = "default_poll_interval_secs")] @@ -109,10 +112,10 @@ impl NetworkConfig { Duration::from_secs(self.poll_interval_secs) } - pub fn indexer_config(&self) -> IndexerConfig { + pub fn indexer_config(&self, factory: Address) -> IndexerConfig { IndexerConfig { chain_id: self.chain_id, - factory_address: self.factory_address, + factory_address: factory, chunk_size: self.chunk_size, use_latest: self.use_latest, fetch_concurrency: self.fetch_concurrency, diff --git a/crates/pool-indexer/src/lib.rs b/crates/pool-indexer/src/lib.rs index 3f93471dfd..66409a220c 100644 --- a/crates/pool-indexer/src/lib.rs +++ b/crates/pool-indexer/src/lib.rs @@ -1,9 +1,10 @@ pub mod api; pub mod arguments; +pub mod cold_seeder; pub mod config; pub mod db; pub mod indexer; pub mod run; -pub mod seeder; +pub mod subgraph_seeder; pub use run::{run, start}; diff --git a/crates/pool-indexer/src/run.rs b/crates/pool-indexer/src/run.rs index f49472a4ed..2d42883844 100644 --- a/crates/pool-indexer/src/run.rs +++ b/crates/pool-indexer/src/run.rs @@ -5,6 +5,7 @@ use { config::{Configuration, NetworkConfig}, indexer::uniswap_v3::UniswapV3Indexer, }, + alloy::primitives::Address, clap::Parser, ethrpc::{AlloyProvider, Config as EthRpcConfig, web3}, sqlx::{PgPool, postgres::PgPoolOptions}, @@ -72,16 +73,71 @@ fn spawn_network_task(set: &mut JoinSet<()>, db: PgPool, network: NetworkConfig) } async fn run_network_indexer(db: PgPool, network: NetworkConfig) { - tracing::info!(network = %network.name, chain_id = network.chain_id, "starting indexer"); + tracing::info!( + network = %network.name, + chain_id = network.chain_id, + factories = network.factories.len(), + "starting network indexer", + ); let provider = build_provider(&network); - let indexer = UniswapV3Indexer::new(provider.clone(), db.clone(), &network.indexer_config()); + let network = Arc::new(network); + + // One indexer task per factory, sharing the same provider and DB pool. + // Seeder + catch-up are per-factory because their checkpoints are keyed + // by `(chain_id, contract)`. + let mut factory_set = JoinSet::new(); + for factory in network.factories.iter().copied() { + let indexer = UniswapV3Indexer::new( + provider.clone(), + db.clone(), + &network.indexer_config(factory), + ); + factory_set.spawn(run_factory_indexer( + db.clone(), + provider.clone(), + indexer, + network.clone(), + factory, + )); + } + + if let Some(result) = factory_set.join_next().await { + panic!("pool-indexer factory task exited: {result:?}"); + } +} + +async fn run_factory_indexer( + db: PgPool, + provider: AlloyProvider, + indexer: UniswapV3Indexer, + network: Arc, + factory: Address, +) { + tracing::info!(network = %network.name, chain_id = network.chain_id, %factory, "starting factory indexer"); + + // A checkpoint already means this (chain, factory) has been bootstrapped — + // e.g. a prior run seeded it. Skip the seed and resume live indexing. + let checkpoint = crate::db::uniswap_v3::get_checkpoint(&db, network.chain_id, &factory) + .await + .expect("failed to read checkpoint"); - if let Some(subgraph_url) = network.subgraph_url.as_deref() { - let seeded_block = - crate::seeder::seed(&db, network.chain_id, subgraph_url, network.seed_block) + if checkpoint.is_none() { + let seeded_block = if let Some(subgraph_url) = network.subgraph_url.as_deref() { + crate::subgraph_seeder::seed(&db, network.chain_id, subgraph_url, network.seed_block) .await - .expect("seeding failed"); + .expect("subgraph seeding failed") + } else { + crate::cold_seeder::cold_seed( + &db, + network.chain_id, + provider, + factory, + network.seed_block, + ) + .await + .expect("cold seeding failed") + }; indexer .catch_up(seeded_block) .await @@ -119,6 +175,24 @@ fn validate_networks(networks: &[NetworkConfig]) { "duplicate chain_id: {}", n.chain_id, ); + assert!( + !n.factories.is_empty(), + "network {} must list at least one factory", + n.name, + ); + let mut seen = HashSet::new(); + for f in &n.factories { + assert!(seen.insert(*f), "network {}: duplicate factory {f}", n.name,); + } + // A subgraph indexes one specific factory — applying one URL to many + // factories would double-seed the wrong data. Multi-factory networks + // must cold-seed each factory. + assert!( + !(n.factories.len() > 1 && n.subgraph_url.is_some()), + "network {}: subgraph-url cannot be combined with multiple factories (omit \ + subgraph-url to cold-seed each factory)", + n.name, + ); } } diff --git a/crates/pool-indexer/src/seeder.rs b/crates/pool-indexer/src/subgraph_seeder.rs similarity index 99% rename from crates/pool-indexer/src/seeder.rs rename to crates/pool-indexer/src/subgraph_seeder.rs index 14cc3e2035..ce61fe687c 100644 --- a/crates/pool-indexer/src/seeder.rs +++ b/crates/pool-indexer/src/subgraph_seeder.rs @@ -25,7 +25,7 @@ use { serde_json::{Value, json}, sqlx::PgPool, std::time::Duration, - tracing::info, + tracing::{info, instrument}, }; /// Number of pools (or ticks) returned per GraphQL page. @@ -249,6 +249,7 @@ impl<'a> SubgraphSeeder<'a> { }) } + #[instrument(skip_all, fields(chain_id = self.chain_id))] async fn seed(self) -> Result { info!( block = self.snapshot_block, diff --git a/database/sql/V110__pool_indexer_uniswap_v3.sql b/database/sql/V110__pool_indexer_uniswap_v3.sql index 67d9ff4f89..221a1432af 100644 --- a/database/sql/V110__pool_indexer_uniswap_v3.sql +++ b/database/sql/V110__pool_indexer_uniswap_v3.sql @@ -43,4 +43,9 @@ CREATE TABLE uniswap_v3_ticks ( FOREIGN KEY (chain_id, pool_address) REFERENCES uniswap_v3_pools(chain_id, address) ); -CREATE INDEX ON uniswap_v3_ticks (chain_id, pool_address); +-- Symbol backfill hot paths: both `get_tokens_missing_symbols` (scan for NULL +-- symbols) and `set_token_symbol` (update by token address where symbol IS +-- NULL) hit these. Partial on the IS NULL predicate so the indices shrink to +-- near-empty once most symbols are populated. +CREATE INDEX ON uniswap_v3_pools (chain_id, token0) WHERE token0_symbol IS NULL; +CREATE INDEX ON uniswap_v3_pools (chain_id, token1) WHERE token1_symbol IS NULL; From f32db4695d1bad26d2f4731393db24e5d366c2a0 Mon Sep 17 00:00:00 2001 From: Jan P Date: Mon, 20 Apr 2026 16:33:12 +0200 Subject: [PATCH 13/80] Optimize cold startup and refactor --- crates/e2e/tests/e2e/pool_indexer.rs | 2 +- crates/pool-indexer/src/api/mod.rs | 74 ++++++++--- crates/pool-indexer/src/api/uniswap_v3/mod.rs | 47 +++---- .../pool-indexer/src/api/uniswap_v3/pools.rs | 104 ++++++--------- .../pool-indexer/src/api/uniswap_v3/ticks.rs | 73 ++++------- crates/pool-indexer/src/cold_seeder.rs | 92 +++++-------- crates/pool-indexer/src/db/uniswap_v3.rs | 8 +- crates/pool-indexer/src/indexer/uniswap_v3.rs | 124 +++++++++++------- 8 files changed, 246 insertions(+), 278 deletions(-) diff --git a/crates/e2e/tests/e2e/pool_indexer.rs b/crates/e2e/tests/e2e/pool_indexer.rs index 51b2718787..8ba8fc4670 100644 --- a/crates/e2e/tests/e2e/pool_indexer.rs +++ b/crates/e2e/tests/e2e/pool_indexer.rs @@ -72,7 +72,7 @@ async fn start_pool_indexer(factory: Address) { name: NetworkName::new("mainnet"), chain_id: 1, rpc_url: "http://127.0.0.1:8545".parse().unwrap(), - factory_address: factory, + factories: vec![factory], chunk_size: 1000, poll_interval_secs: 1, use_latest: true, diff --git a/crates/pool-indexer/src/api/mod.rs b/crates/pool-indexer/src/api/mod.rs index 0362c08a09..1e78c89a51 100644 --- a/crates/pool-indexer/src/api/mod.rs +++ b/crates/pool-indexer/src/api/mod.rs @@ -2,7 +2,13 @@ pub mod uniswap_v3; use { crate::config::NetworkName, - axum::{Router, http::StatusCode, response::IntoResponse, routing::get}, + axum::{ + Json, + Router, + http::StatusCode, + response::{IntoResponse, Response}, + routing::get, + }, sqlx::PgPool, std::{collections::HashMap, sync::Arc}, tower_http::trace::{DefaultMakeSpan, DefaultOnResponse, TraceLayer}, @@ -22,24 +28,62 @@ impl AppState { } } -pub(super) fn resolve_chain_id( - state: &AppState, - network: &str, -) -> Result { +/// Structured error type for API handlers. Each variant decides its own HTTP +/// status + body via the `IntoResponse` impl so formatting lives in one place +/// and helpers can `?`-propagate failures instead of handing around prebuilt +/// `Response` values. +#[derive(Debug)] +pub enum ApiError { + NetworkNotFound, + NotReady, + InvalidPoolId, + InvalidPoolAddress, + InvalidCursor, + TooManyPoolIds { max: usize }, + Internal(anyhow::Error), +} + +impl IntoResponse for ApiError { + fn into_response(self) -> Response { + match self { + Self::NetworkNotFound => StatusCode::NOT_FOUND.into_response(), + Self::NotReady => StatusCode::SERVICE_UNAVAILABLE.into_response(), + Self::InvalidPoolId => bad_request("invalid pool id"), + Self::InvalidPoolAddress => bad_request("invalid pool address"), + Self::InvalidCursor => bad_request("invalid cursor"), + Self::TooManyPoolIds { max } => bad_request(format!("too many pool ids; max {max}")), + Self::Internal(err) => { + tracing::error!(?err, "internal error"); + StatusCode::INTERNAL_SERVER_ERROR.into_response() + } + } + } +} + +impl From for ApiError { + fn from(err: anyhow::Error) -> Self { + Self::Internal(err) + } +} + +fn bad_request(message: impl Into) -> Response { + ( + StatusCode::BAD_REQUEST, + Json(serde_json::json!({ "error": message.into() })), + ) + .into_response() +} + +pub(super) fn resolve_chain_id(state: &AppState, network: &str) -> Result { state .resolve_network(network) - .ok_or_else(|| StatusCode::NOT_FOUND.into_response()) + .ok_or(ApiError::NetworkNotFound) } -pub(super) async fn latest_indexed_block( - state: &AppState, - chain_id: u64, -) -> Result { - match crate::db::uniswap_v3::get_latest_indexed_block(&state.db, chain_id).await { - Ok(Some(block_number)) => Ok(block_number), - Ok(None) => Err(StatusCode::SERVICE_UNAVAILABLE.into_response()), - Err(err) => Err(uniswap_v3::internal_error(err)), - } +pub(super) async fn latest_indexed_block(state: &AppState, chain_id: u64) -> Result { + crate::db::uniswap_v3::get_latest_indexed_block(&state.db, chain_id) + .await? + .ok_or(ApiError::NotReady) } pub fn router(state: Arc) -> Router { diff --git a/crates/pool-indexer/src/api/uniswap_v3/mod.rs b/crates/pool-indexer/src/api/uniswap_v3/mod.rs index b2188ab42e..f99dddac5e 100644 --- a/crates/pool-indexer/src/api/uniswap_v3/mod.rs +++ b/crates/pool-indexer/src/api/uniswap_v3/mod.rs @@ -1,13 +1,7 @@ pub mod pools; pub mod ticks; -use { - alloy_primitives::Address, - axum::{ - http::StatusCode, - response::{IntoResponse, Json, Response}, - }, -}; +use {crate::api::ApiError, alloy_primitives::Address}; pub use { pools::get_pools, ticks::{get_ticks, get_ticks_bulk}, @@ -25,38 +19,27 @@ pub(super) fn serialize_display( serializer.serialize_str(&value.to_string()) } -pub(super) fn internal_error(err: anyhow::Error) -> Response { - tracing::error!(?err, "internal error"); - StatusCode::INTERNAL_SERVER_ERROR.into_response() -} - -pub(super) fn bad_request(message: impl Into) -> Response { - ( - StatusCode::BAD_REQUEST, - Json(serde_json::json!({ "error": message.into() })), - ) - .into_response() -} - -pub(super) fn parse_hex_address(s: &str) -> Result { - s.parse::
().map_err(|_| "invalid address") +pub(super) fn parse_hex_address(s: &str) -> Result { + s.parse::
() + .map_err(|_| ApiError::InvalidPoolAddress) } /// Parses a comma-separated list of pool addresses (`0x…,0x…`). Empty entries -/// are skipped. Returns a [`Response`] directly on parse failure or when the -/// list exceeds [`MAX_POOL_IDS_PER_REQUEST`] so handlers can `?`-propagate the -/// error response. -#[allow(clippy::result_large_err)] -pub(super) fn parse_pool_ids(raw: &str) -> Result, Response> { +/// are skipped. +pub(super) fn parse_pool_ids(raw: &str) -> Result, ApiError> { let mut out = Vec::new(); for entry in raw.split(',').filter(|s| !s.is_empty()) { - let addr = parse_hex_address(entry.trim()).map_err(|_| bad_request("invalid pool id"))?; - out.push(addr); + out.push( + entry + .trim() + .parse::
() + .map_err(|_| ApiError::InvalidPoolId)?, + ); } if out.len() > MAX_POOL_IDS_PER_REQUEST { - return Err(bad_request(format!( - "too many pool ids; max {MAX_POOL_IDS_PER_REQUEST}" - ))); + return Err(ApiError::TooManyPoolIds { + max: MAX_POOL_IDS_PER_REQUEST, + }); } Ok(out) } diff --git a/crates/pool-indexer/src/api/uniswap_v3/pools.rs b/crates/pool-indexer/src/api/uniswap_v3/pools.rs index f96e64b115..3c4a901485 100644 --- a/crates/pool-indexer/src/api/uniswap_v3/pools.rs +++ b/crates/pool-indexer/src/api/uniswap_v3/pools.rs @@ -1,7 +1,7 @@ use { - super::{bad_request, internal_error, parse_hex_address, parse_pool_ids, serialize_display}, + super::{parse_pool_ids, serialize_display}, crate::{ - api::{AppState, latest_indexed_block, resolve_chain_id}, + api::{ApiError, AppState, latest_indexed_block, resolve_chain_id}, db::uniswap_v3 as db, }, alloy_primitives::Address, @@ -34,7 +34,7 @@ pub struct PoolsQuery { pub after: Option, /// Maximum number of pools to return. Clamped to [1, 5000]; defaults to /// 1000. Ignored when `pool_ids` or `token0` is set. - pub limit: Option, + pub limit: Option, /// Filter by token symbol (partial, case-insensitive). Acts as the "base" /// token when `token1` is also supplied. Matched via SQL `LIKE` against /// the stored symbol — use a symbol fragment (e.g. `"WETH"`, `"USD"`), @@ -109,16 +109,19 @@ impl PoolsQuery { } } - fn page_limit(&self) -> i64 { + fn page_limit(&self) -> u64 { self.limit.unwrap_or(1000).clamp(1, 5000) } - fn cursor(&self) -> Result>, Response> { - match self.after.as_deref().map(parse_hex_address) { - Some(Ok(address)) => Ok(Some(address.as_slice().to_vec())), - Some(Err(_)) => Err(bad_request("invalid cursor")), - None => Ok(None), - } + fn cursor(&self) -> Result>, ApiError> { + self.after + .as_deref() + .map(|raw| { + raw.parse::
() + .map(|address| address.as_slice().to_vec()) + .map_err(|_| ApiError::InvalidCursor) + }) + .transpose() } } @@ -174,16 +177,13 @@ async fn search_pools( block_number: u64, token0: &str, token1: Option<&str>, -) -> Response { +) -> Result { let rows = if let Some(token1) = token1 { - db::search_pools_by_pair(&state.db, chain_id, token0, token1).await + db::search_pools_by_pair(&state.db, chain_id, token0, token1).await? } else { - db::search_pools_by_token(&state.db, chain_id, token0).await + db::search_pools_by_token(&state.db, chain_id, token0).await? }; - match rows { - Ok(rows) => pools_response(block_number, &rows, None), - Err(err) => internal_error(err), - } + Ok(pools_response(block_number, &rows, None)) } /// Returns a cursor-paginated list of all indexed pools, ordered by address. @@ -195,55 +195,40 @@ async fn list_pools( chain_id: u64, block_number: u64, query: &PoolsQuery, -) -> Response { +) -> Result { let limit = query.page_limit(); - let cursor = match query.cursor() { - Ok(cursor) => cursor, - Err(response) => return response, - }; + let cursor = query.cursor()?; // Fetch one extra row to determine if there is a next page. - let rows = match cursor { - Some(cursor) => db::get_pools_after(&state.db, chain_id, cursor, limit + 1).await, - None => db::get_pools(&state.db, chain_id, limit + 1).await, - }; - let mut rows = match rows { - Ok(rows) => rows, - Err(err) => return internal_error(err), + let mut rows = match cursor { + Some(cursor) => db::get_pools_after(&state.db, chain_id, cursor, limit + 1).await?, + None => db::get_pools(&state.db, chain_id, limit + 1).await?, }; - let limit_usize = usize::try_from(limit).unwrap_or(usize::MAX); - let next_cursor = if rows.len() > limit_usize { - rows.truncate(limit_usize); - rows.last().map(|row| format!("{:?}", row.address)) - } else { - None - }; + let has_next = rows.len() > limit as usize; + rows.truncate(limit as usize); + let next_cursor = has_next + .then(|| rows.last().map(|row| format!("{:?}", row.address))) + .flatten(); - pools_response(block_number, &rows, next_cursor) + Ok(pools_response(block_number, &rows, next_cursor)) } /// Returns the pools with addresses in `pool_ids` (order not guaranteed to /// match the request). Silently skips unknown addresses so callers can treat /// a partial response as "these are the ones I have". Fetches the latest /// indexed block in parallel with the pool lookup. -async fn lookup_pools_by_ids(state: &AppState, chain_id: u64, raw_ids: &str) -> Response { - let addresses = match parse_pool_ids(raw_ids) { - Ok(a) => a, - Err(resp) => return resp, - }; - let (block_res, pools_res) = tokio::join!( +async fn lookup_pools_by_ids( + state: &AppState, + chain_id: u64, + raw_ids: &str, +) -> Result { + let addresses = parse_pool_ids(raw_ids)?; + let (block, pools) = tokio::join!( latest_indexed_block(state, chain_id), db::get_pools_by_ids(&state.db, chain_id, &addresses), ); - let block_number = match block_res { - Ok(block_number) => block_number, - Err(response) => return response, - }; - match pools_res { - Ok(rows) => pools_response(block_number, &rows, None), - Err(err) => internal_error(err), - } + Ok(pools_response(block?, &pools?, None)) } /// `GET /api/v1/{network}/uniswap/v3/pools` @@ -253,26 +238,17 @@ pub async fn get_pools( State(state): State>, Path(network): Path, Query(query): Query, -) -> Response { - let chain_id = match resolve_chain_id(&state, &network) { - Ok(chain_id) => chain_id, - Err(response) => return response, - }; +) -> Result { + let chain_id = resolve_chain_id(&state, &network)?; match query.request() { PoolsRequest::ByIds(pool_ids) => lookup_pools_by_ids(&state, chain_id, pool_ids).await, PoolsRequest::Search { token0, token1 } => { - let block_number = match latest_indexed_block(&state, chain_id).await { - Ok(block_number) => block_number, - Err(response) => return response, - }; + let block_number = latest_indexed_block(&state, chain_id).await?; search_pools(&state, chain_id, block_number, token0, token1).await } PoolsRequest::PaginatedList => { - let block_number = match latest_indexed_block(&state, chain_id).await { - Ok(block_number) => block_number, - Err(response) => return response, - }; + let block_number = latest_indexed_block(&state, chain_id).await?; list_pools(&state, chain_id, block_number, &query).await } } diff --git a/crates/pool-indexer/src/api/uniswap_v3/ticks.rs b/crates/pool-indexer/src/api/uniswap_v3/ticks.rs index db8ede6d9d..fe87145d1d 100644 --- a/crates/pool-indexer/src/api/uniswap_v3/ticks.rs +++ b/crates/pool-indexer/src/api/uniswap_v3/ticks.rs @@ -1,7 +1,7 @@ use { - super::{bad_request, internal_error, parse_hex_address, parse_pool_ids, serialize_display}, + super::{parse_hex_address, parse_pool_ids, serialize_display}, crate::{ - api::{AppState, latest_indexed_block, resolve_chain_id}, + api::{ApiError, AppState, latest_indexed_block, resolve_chain_id}, db::uniswap_v3 as db, }, alloy_primitives::Address, @@ -65,35 +65,21 @@ pub struct BulkTicksResponse { pub async fn get_ticks( State(state): State>, Path((network, pool_address)): Path<(String, String)>, -) -> Response { - let chain_id = match resolve_chain_id(&state, &network) { - Ok(chain_id) => chain_id, - Err(response) => return response, - }; - let pool = match parse_hex_address(&pool_address) { - Ok(pool) => pool, - Err(_) => return bad_request("invalid pool address"), - }; - - let (block_result, ticks_result) = tokio::join!( +) -> Result { + let chain_id = resolve_chain_id(&state, &network)?; + let pool = parse_hex_address(&pool_address)?; + + let (block, ticks) = tokio::join!( latest_indexed_block(&state, chain_id), db::get_ticks(&state.db, chain_id, &pool), ); - let block_number = match block_result { - Ok(block_number) => block_number, - Err(response) => return response, - }; - let ticks = match ticks_result { - Ok(rows) => rows, - Err(err) => return internal_error(err), - }; - - Json(TicksResponse { - block_number, + + Ok(Json(TicksResponse { + block_number: block?, pool, - ticks: ticks.into_iter().map(TickEntry::from).collect(), + ticks: ticks?.into_iter().map(TickEntry::from).collect(), }) - .into_response() + .into_response()) } /// `GET /api/v1/{network}/uniswap/v3/pools/ticks?pool_ids=0x…,0x…` @@ -106,35 +92,20 @@ pub async fn get_ticks_bulk( State(state): State>, Path(network): Path, Query(query): Query, -) -> Response { - let chain_id = match resolve_chain_id(&state, &network) { - Ok(chain_id) => chain_id, - Err(response) => return response, - }; - - let pool_ids = match parse_pool_ids(&query.pool_ids) { - Ok(pool_ids) => pool_ids, - Err(response) => return response, - }; - - let (block_result, ticks_result) = tokio::join!( +) -> Result { + let chain_id = resolve_chain_id(&state, &network)?; + let pool_ids = parse_pool_ids(&query.pool_ids)?; + + let (block, ticks) = tokio::join!( latest_indexed_block(&state, chain_id), db::get_ticks_for_pools(&state.db, chain_id, &pool_ids), ); - let block_number = match block_result { - Ok(block_number) => block_number, - Err(response) => return response, - }; - let rows = match ticks_result { - Ok(rows) => rows, - Err(err) => return internal_error(err), - }; - - Json(BulkTicksResponse { - block_number, - pools: group_ticks_by_pool(rows), + + Ok(Json(BulkTicksResponse { + block_number: block?, + pools: group_ticks_by_pool(ticks?), }) - .into_response() + .into_response()) } fn group_ticks_by_pool(rows: Vec) -> Vec { diff --git a/crates/pool-indexer/src/cold_seeder.rs b/crates/pool-indexer/src/cold_seeder.rs index 7e4f996227..dc568286a8 100644 --- a/crates/pool-indexer/src/cold_seeder.rs +++ b/crates/pool-indexer/src/cold_seeder.rs @@ -19,16 +19,11 @@ use { NewPoolData, PoolStateData, TickDeltaData, - is_range_too_large, + bisecting_get_logs, signed24_to_i32, }, }, - alloy::{ - primitives::Address, - providers::Provider, - rpc::types::{Filter, FilterSet, Log}, - sol_types::SolEvent, - }, + alloy::{primitives::Address, providers::Provider, rpc::types::Log, sol_types::SolEvent}, anyhow::{Context, Result}, contracts::{ ERC20, @@ -57,8 +52,11 @@ const HISTORY_BLOCK_CHUNK: u64 = 10_000; /// Number of pools per `eth_getLogs` address-filter list in phase 3. Must stay /// under the RPC provider's filter-size limit. const POOL_ADDRESS_BATCH: usize = 100; -/// Concurrency for per-pool eth_calls (decimals, slot0, liquidity). -const ETH_CALL_CONCURRENCY: usize = 50; + +/// Concurrent view-call fan-out for the per-contract reads we issue during +/// seeding: ERC-20 `decimals()` in phase 1 and pool `slot0()` / `liquidity()` +/// in phase 2. +const POOL_VIEW_CALL_CONCURRENCY: usize = 50; /// Concurrency for concurrent `eth_getLogs` calls. const LOG_FETCH_CONCURRENCY: usize = 8; @@ -161,32 +159,20 @@ async fn discover_pools( .collect()) } -fn fetch_pool_created_logs( +async fn fetch_pool_created_logs( provider: &AlloyProvider, factory: Address, from: u64, to: u64, -) -> futures::future::BoxFuture<'_, Result>> { - Box::pin(async move { - let filter = Filter::new() - .address(factory) - .event_signature(PoolCreated::SIGNATURE_HASH) - .from_block(from) - .to_block(to); - let err: anyhow::Error = match provider.get_logs(&filter).await { - Ok(logs) => return Ok(logs), - Err(err) => anyhow::Error::new(err), - }; - if is_range_too_large(&err) && to > from { - let mid = (from + to) / 2; - let mut left = fetch_pool_created_logs(provider, factory, from, mid).await?; - let right = fetch_pool_created_logs(provider, factory, mid + 1, to).await?; - left.extend(right); - Ok(left) - } else { - Err(err.context(format!("get_logs({from}..={to})"))) - } - }) +) -> Result> { + bisecting_get_logs( + provider, + from, + to, + vec![factory], + vec![PoolCreated::SIGNATURE_HASH], + ) + .await } async fn fetch_decimals_concurrent( @@ -205,7 +191,7 @@ async fn fetch_decimals_concurrent( (token, dec) } }) - .buffer_unordered(ETH_CALL_CONCURRENCY) + .buffer_unordered(POOL_VIEW_CALL_CONCURRENCY) .filter_map(|(token, opt)| async move { opt.map(|d| (token, d)) }) .collect() .await @@ -230,7 +216,7 @@ async fn snapshot_pool_states( let provider = provider.clone(); async move { fetch_pool_state(&provider, pool, at_block).await } }) - .buffer_unordered(ETH_CALL_CONCURRENCY) + .buffer_unordered(POOL_VIEW_CALL_CONCURRENCY) .filter_map(|res| async move { res }) .collect() .await; @@ -356,36 +342,20 @@ async fn reconstruct_and_persist_ticks( Ok(()) } -fn fetch_mint_burn_logs( +async fn fetch_mint_burn_logs( provider: &AlloyProvider, pool_batch: Vec
, from: u64, to: u64, -) -> futures::future::BoxFuture<'_, Result>> { - Box::pin(async move { - let filter = Filter::new() - .address(pool_batch.clone()) - .event_signature(FilterSet::from_iter([ - Mint::SIGNATURE_HASH, - Burn::SIGNATURE_HASH, - ])) - .from_block(from) - .to_block(to); - let err: anyhow::Error = match provider.get_logs(&filter).await { - Ok(logs) => return Ok(logs), - Err(err) => anyhow::Error::new(err), - }; - if is_range_too_large(&err) && to > from { - let mid = (from + to) / 2; - let mut left = fetch_mint_burn_logs(provider, pool_batch.clone(), from, mid).await?; - let right = fetch_mint_burn_logs(provider, pool_batch, mid + 1, to).await?; - left.extend(right); - Ok(left) - } else { - Err(err.context(format!( - "mint_burn_logs({from}..={to}, pools={})", - pool_batch.len() - ))) - } - }) +) -> Result> { + let pool_count = pool_batch.len(); + bisecting_get_logs( + provider, + from, + to, + pool_batch, + vec![Mint::SIGNATURE_HASH, Burn::SIGNATURE_HASH], + ) + .await + .with_context(|| format!("mint_burn_logs({from}..={to}, pools={pool_count})")) } diff --git a/crates/pool-indexer/src/db/uniswap_v3.rs b/crates/pool-indexer/src/db/uniswap_v3.rs index 3fc54e223e..459e45e8c2 100644 --- a/crates/pool-indexer/src/db/uniswap_v3.rs +++ b/crates/pool-indexer/src/db/uniswap_v3.rs @@ -511,7 +511,7 @@ impl TryFrom for PoolRow { } /// Fetches a page of pools ordered by address with their current state. -pub async fn get_pools(pool: &PgPool, chain_id: u64, limit: i64) -> Result> { +pub async fn get_pools(pool: &PgPool, chain_id: u64, limit: u64) -> Result> { let rows = sqlx::query( "SELECT p.address, p.token0, p.token1, p.fee, p.token0_decimals, p.token1_decimals, @@ -525,7 +525,7 @@ pub async fn get_pools(pool: &PgPool, chain_id: u64, limit: i64) -> Result, - limit: i64, + limit: u64, ) -> Result> { let rows = sqlx::query( "SELECT p.address, p.token0, p.token1, p.fee, @@ -555,7 +555,7 @@ pub async fn get_pools_after( ) .bind(sql_chain_id(chain_id)) .bind(cursor) - .bind(limit) + .bind(limit.cast_signed()) .fetch_all(pool) .await .context("get_pools_after")?; diff --git a/crates/pool-indexer/src/indexer/uniswap_v3.rs b/crates/pool-indexer/src/indexer/uniswap_v3.rs index 99efc824a3..bad885aec0 100644 --- a/crates/pool-indexer/src/indexer/uniswap_v3.rs +++ b/crates/pool-indexer/src/indexer/uniswap_v3.rs @@ -222,29 +222,32 @@ impl UniswapV3Indexer { chunks } - /// Fetches logs for `[from, to]`, sequentially bisecting on - /// results-overflow errors. Bisection is sequential within a chunk to - /// avoid exponential RPC fan-out; the outer `buffered` layer provides - /// cross-chunk concurrency. - fn fetch_logs_bisecting( - &self, - from: u64, - to: u64, - ) -> futures::future::BoxFuture<'_, Result>> { - Box::pin(async move { - match self.fetch_logs(from, to).await { - Ok(logs) => Ok(logs), - Err(err) if is_range_too_large(&err) && to > from => { - let mid = (from + to) / 2; - tracing::debug!(from, to, mid, "range too large, bisecting"); - let mut left = self.fetch_logs_bisecting(from, mid).await?; - let right = self.fetch_logs_bisecting(mid + 1, to).await?; - left.extend(right); - Ok(left) - } - Err(err) => Err(err), - } - }) + async fn fetch_logs_bisecting(&self, from: u64, to: u64) -> Result> { + // No address filter: `PoolCreated` is emitted by the factory but the + // other four events are emitted by each pool contract, and that + // address list (tens of thousands on mainnet) would blow past most + // RPCs' filter-size caps. `eth_getLogs` applies the address filter + // across all events at once, so we can't scope each topic + // independently. Instead, we filter client-side: + // - PoolCreated is matched against `self.factory` in + // `LogAccumulator::handle_pool_created`. + // - Mint/Burn/Swap/Initialize from unknown pools are silently + // dropped by the SQL `WHERE EXISTS (... uniswap_v3_pools ...)` + // guards in the batch writers. + bisecting_get_logs( + &self.provider, + from, + to, + vec![], + vec![ + PoolCreated::SIGNATURE_HASH, + Initialize::SIGNATURE_HASH, + Mint::SIGNATURE_HASH, + Burn::SIGNATURE_HASH, + Swap::SIGNATURE_HASH, + ], + ) + .await } #[instrument(skip(self, logs), fields(chunk_start = chunk.start, chunk_end = chunk.end))] @@ -338,29 +341,10 @@ impl UniswapV3Indexer { .collect() .await } - - async fn fetch_logs(&self, from: u64, to: u64) -> Result> { - let topics = FilterSet::from_iter([ - PoolCreated::SIGNATURE_HASH, - Initialize::SIGNATURE_HASH, - Mint::SIGNATURE_HASH, - Burn::SIGNATURE_HASH, - Swap::SIGNATURE_HASH, - ]); - let filter = Filter::new() - .from_block(from) - .to_block(to) - .event_signature(topics); - - self.provider - .get_logs(&filter) - .await - .with_context(|| format!("get_logs({from}..={to})")) - } } /// Sign-extends a 24-bit signed integer (alloy I24) to i32. -fn signed24_to_i32(v: alloy::primitives::aliases::I24) -> i32 { +pub(crate) fn signed24_to_i32(v: alloy::primitives::aliases::I24) -> i32 { let raw = v.into_raw().as_limbs()[0] as u32; (raw << 8).cast_signed() >> 8 } @@ -468,15 +452,55 @@ async fn fetch_symbol(provider: &AlloyProvider, token: Address) -> Option bool { +/// Returns true when the RPC rejects — or gives up on — a request because +/// the range is too wide. Checks the full error chain because anyhow +/// context wraps the inner RPC error. Extend when a new rejection phrase +/// appears in the wild. +pub(crate) fn is_range_too_large(err: &anyhow::Error) -> bool { err.chain().any(|e| { let msg = e.to_string().to_lowercase(); - msg.contains("max results") - || msg.contains("result limit") - || msg.contains("too many results") + // Alchemy: "query exceeds max block range 10000" + msg.contains("max block range") + // OVH: "request timed out" — the server cuts off oversized queries + // instead of rejecting with a size error, so bisecting on timeout + // eventually lands on a tractable range. + || msg.contains("timed out") + }) +} + +/// Fetches logs for `[from, to]` filtered by the given contract addresses +/// and `topic0` event signatures, sequentially bisecting the block range on +/// "too large" rejections until each sub-range is tractable. An empty +/// `addresses` list means "any contract". +pub(crate) fn bisecting_get_logs( + provider: &AlloyProvider, + from: u64, + to: u64, + addresses: Vec
, + topics: Vec, +) -> futures::future::BoxFuture<'_, Result>> { + Box::pin(async move { + let filter = Filter::new() + .address(addresses.clone()) + .event_signature(FilterSet::from_iter(topics.clone())) + .from_block(from) + .to_block(to); + + let err = match provider.get_logs(&filter).await { + Ok(logs) => return Ok(logs), + Err(err) => anyhow::Error::new(err).context(format!("get_logs({from}..={to})")), + }; + if is_range_too_large(&err) && to > from { + let mid = (from + to) / 2; + tracing::debug!(from, to, mid, "range too large, bisecting"); + let mut left = + bisecting_get_logs(provider, from, mid, addresses.clone(), topics.clone()).await?; + let right = bisecting_get_logs(provider, mid + 1, to, addresses, topics).await?; + left.extend(right); + Ok(left) + } else { + Err(err) + } }) } From 18bffb6e9f0d16d27fca5f5dbfc05ec096808928 Mon Sep 17 00:00:00 2001 From: Jan P Date: Tue, 21 Apr 2026 07:23:24 +0200 Subject: [PATCH 14/80] Fix Dockerfile --- Dockerfile | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 0205d3eda8..b2104f3e31 100644 --- a/Dockerfile +++ b/Dockerfile @@ -19,13 +19,14 @@ RUN rustup install stable && rustup default stable COPY . . RUN --mount=type=cache,target=/usr/local/cargo/registry --mount=type=cache,target=/src/target \ CARGO_PROFILE_RELEASE_DEBUG=1 RUSTFLAGS="${RUSTFLAGS}" cargo build --release \ - -p autopilot -p driver -p orderbook -p refunder -p solvers \ + -p autopilot -p driver -p orderbook -p refunder -p solvers -p pool-indexer \ ${CARGO_BUILD_FEATURES} && \ cp target/release/autopilot / && \ cp target/release/driver / && \ cp target/release/orderbook / && \ cp target/release/refunder / && \ - cp target/release/solvers / + cp target/release/solvers / && \ + cp target/release/pool-indexer / # Create an intermediate image to extract the binaries FROM docker.io/debian:bookworm-slim AS intermediate @@ -53,6 +54,10 @@ FROM intermediate AS solvers COPY --from=cargo-build /solvers /usr/local/bin/solvers ENTRYPOINT [ "solvers" ] +FROM intermediate AS pool-indexer +COPY --from=cargo-build /pool-indexer /usr/local/bin/pool-indexer +ENTRYPOINT [ "pool-indexer" ] + # Extract Binary FROM intermediate @@ -62,5 +67,6 @@ COPY --from=cargo-build /driver /usr/local/bin/driver COPY --from=cargo-build /orderbook /usr/local/bin/orderbook COPY --from=cargo-build /refunder /usr/local/bin/refunder COPY --from=cargo-build /solvers /usr/local/bin/solvers +COPY --from=cargo-build /pool-indexer /usr/local/bin/pool-indexer ENTRYPOINT ["/usr/bin/tini", "-s", "--"] From 8396b99289c7ceb64cc58c42b6e8ca29e3957492 Mon Sep 17 00:00:00 2001 From: Jan P Date: Tue, 21 Apr 2026 08:05:30 +0200 Subject: [PATCH 15/80] Fmt --- crates/pool-indexer/src/cold_seeder.rs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/crates/pool-indexer/src/cold_seeder.rs b/crates/pool-indexer/src/cold_seeder.rs index dc568286a8..c0f9890f06 100644 --- a/crates/pool-indexer/src/cold_seeder.rs +++ b/crates/pool-indexer/src/cold_seeder.rs @@ -334,10 +334,7 @@ async fn reconstruct_and_persist_ticks( } processed += batch_size; - info!( - chain_id, - processed, total, tick_rows, "tick reconstruction progress" - ); + info!(processed, total, tick_rows, "tick reconstruction progress"); } Ok(()) } From d24387829d6f4eb802176b276c00e778dd8c7896 Mon Sep 17 00:00:00 2001 From: Jan P Date: Tue, 21 Apr 2026 08:25:53 +0200 Subject: [PATCH 16/80] Wire up the driver --- .../src/boundary/liquidity/uniswap/v3.rs | 32 ++- crates/driver/src/infra/config/file/load.rs | 54 ++-- crates/driver/src/infra/config/file/mod.rs | 23 +- crates/driver/src/infra/liquidity/config.rs | 18 +- .../src/uniswap_v3/graph_api.rs | 17 ++ .../liquidity-sources/src/uniswap_v3/mod.rs | 29 ++ .../src/uniswap_v3/pool_fetching.rs | 33 +-- .../src/uniswap_v3/pool_indexer.rs | 267 ++++++++++++++++++ crates/pool-indexer/src/indexer/uniswap_v3.rs | 6 +- 9 files changed, 422 insertions(+), 57 deletions(-) create mode 100644 crates/liquidity-sources/src/uniswap_v3/pool_indexer.rs diff --git a/crates/driver/src/boundary/liquidity/uniswap/v3.rs b/crates/driver/src/boundary/liquidity/uniswap/v3.rs index 3dfab84338..e6a7b79521 100644 --- a/crates/driver/src/boundary/liquidity/uniswap/v3.rs +++ b/crates/driver/src/boundary/liquidity/uniswap/v3.rs @@ -13,7 +13,12 @@ use { anyhow::Context, eth_domain_types as eth, event_indexing::{block_retriever::BlockRetrieving, maintenance::ServiceMaintenance}, - liquidity_sources::uniswap_v3::pool_fetching::UniswapV3PoolFetcher, + liquidity_sources::uniswap_v3::{ + V3PoolDataSource, + graph_api::UniV3SubgraphClient, + pool_fetching::UniswapV3PoolFetcher, + pool_indexer::PoolIndexerClient, + }, shared::{http_solver::model::TokenAmount, interaction::Interaction}, solver::{ liquidity::{ @@ -114,15 +119,34 @@ async fn init_liquidity( config: &infra::liquidity::config::UniswapV3, ) -> anyhow::Result> { let web3 = eth.web3().clone(); + let http = boundary::liquidity::http_client(); + + let source: Arc = if let Some(url) = &config.pool_indexer_url { + tracing::info!(%url, "uniswap v3: using pool-indexer as data source"); + Arc::new(PoolIndexerClient::new(url.clone(), http)) + } else { + let graph_url = config + .graph_url + .as_ref() + .context("uniswap v3: graph_url required when pool_indexer_url is unset")?; + tracing::info!(url = %graph_url, "uniswap v3: using subgraph as data source"); + Arc::new( + UniV3SubgraphClient::from_subgraph_url( + graph_url, + http, + config.max_pools_per_tick_query, + ) + .await + .context("failed to construct UniV3 subgraph client")?, + ) + }; let pool_fetcher = Arc::new( UniswapV3PoolFetcher::new( - &config.graph_url, + source, web3.clone(), - boundary::liquidity::http_client(), block_retriever, config.max_pools_to_initialize, - config.max_pools_per_tick_query, ) .await .context("failed to initialise UniswapV3 liquidity")?, diff --git a/crates/driver/src/infra/config/file/load.rs b/crates/driver/src/infra/config/file/load.rs index e8b053f12d..8c1f491887 100644 --- a/crates/driver/src/infra/config/file/load.rs +++ b/crates/driver/src/infra/config/file/load.rs @@ -224,35 +224,51 @@ pub async fn load(chain: Chain, path: &Path) -> infra::Config { preset, max_pools_to_initialize, graph_url, + pool_indexer_url, reinit_interval, max_pools_per_tick_query, - } => liquidity::config::UniswapV3 { - max_pools_to_initialize, - reinit_interval, - ..match preset { - file::UniswapV3Preset::UniswapV3 => { - liquidity::config::UniswapV3::uniswap_v3( - &graph_url, - chain, - max_pools_per_tick_query, - ) + } => { + assert!( + graph_url.is_some() || pool_indexer_url.is_some(), + "uniswap-v3: set at least one of graph-url or pool-indexer-url" + ); + liquidity::config::UniswapV3 { + max_pools_to_initialize, + pool_indexer_url, + reinit_interval, + ..match preset { + file::UniswapV3Preset::UniswapV3 => { + liquidity::config::UniswapV3::uniswap_v3( + graph_url, + chain, + max_pools_per_tick_query, + ) + } } + .expect("no Uniswap V3 preset for current network") } - .expect("no Uniswap V3 preset for current network") - }, + } file::UniswapV3Config::Manual { router, max_pools_to_initialize, graph_url, + pool_indexer_url, reinit_interval, max_pools_per_tick_query, - } => liquidity::config::UniswapV3 { - router: router.into(), - max_pools_to_initialize, - graph_url, - reinit_interval, - max_pools_per_tick_query, - }, + } => { + assert!( + graph_url.is_some() || pool_indexer_url.is_some(), + "uniswap-v3: set at least one of graph-url or pool-indexer-url" + ); + liquidity::config::UniswapV3 { + router: router.into(), + max_pools_to_initialize, + graph_url, + pool_indexer_url, + reinit_interval, + max_pools_per_tick_query, + } + } }) .collect(), balancer_v2: config diff --git a/crates/driver/src/infra/config/file/mod.rs b/crates/driver/src/infra/config/file/mod.rs index d4e689cb69..ad9f8af5c3 100644 --- a/crates/driver/src/infra/config/file/mod.rs +++ b/crates/driver/src/infra/config/file/mod.rs @@ -529,7 +529,16 @@ enum UniswapV3Config { #[serde(default = "uniswap_v3::default_max_pools_to_initialize")] max_pools_to_initialize: usize, - graph_url: Url, + /// The URL used to connect to uniswap v3 subgraph client. At least one + /// of `graph_url` or `pool_indexer_url` must be set; `pool_indexer_url` + /// takes precedence when both are provided. + #[serde(default)] + graph_url: Option, + + /// Optional URL of a CoW pool-indexer service. When set, it replaces + /// the subgraph as the pool metadata source. + #[serde(default)] + pool_indexer_url: Option, /// How many pool IDs can be present in a where clause of a Tick query /// at once. Some subgraphs are overloaded and throw errors when @@ -558,8 +567,16 @@ enum UniswapV3Config { #[serde(default = "uniswap_v3::default_max_pools_per_tick_query")] max_pools_per_tick_query: usize, - /// The URL used to connect to uniswap v3 subgraph client. - graph_url: Url, + /// The URL used to connect to uniswap v3 subgraph client. At least one + /// of `graph_url` or `pool_indexer_url` must be set; `pool_indexer_url` + /// takes precedence when both are provided. + #[serde(default)] + graph_url: Option, + + /// Optional URL of a CoW pool-indexer service. hen set, it replaces + /// the subgraph as the pool metadata source. + #[serde(default)] + pool_indexer_url: Option, /// How often the liquidity source should be reinitialized to get /// access to new pools. diff --git a/crates/driver/src/infra/liquidity/config.rs b/crates/driver/src/infra/liquidity/config.rs index ef05baa2a1..4e1d395bf9 100644 --- a/crates/driver/src/infra/liquidity/config.rs +++ b/crates/driver/src/infra/liquidity/config.rs @@ -167,8 +167,15 @@ pub struct UniswapV3 { /// How many pools should be initialized during start up. pub max_pools_to_initialize: usize, - /// The URL used to connect to uniswap v3 subgraph client. - pub graph_url: Url, + /// URL of the Uniswap V3 subgraph. One of `graph_url` or + /// `pool_indexer_url` must be set; when both are set the pool-indexer + /// wins. Enforced by the config loader. + pub graph_url: Option, + + /// Optional URL of a CoW pool-indexer service exposing the + /// `/api/v1/{network}/uniswap/v3/` endpoints. When set, it takes + /// precedence over `graph_url` for pool metadata and ticks. + pub pool_indexer_url: Option, /// How often the liquidity source should be reinitialized to /// become aware of new pools. @@ -176,7 +183,7 @@ pub struct UniswapV3 { /// How many pool IDs can be present in a where clause of a Tick query at /// once. Some subgraphs are overloaded and throw errors when there are - /// too many. + /// too many. Only applies when using the subgraph source. pub max_pools_per_tick_query: usize, } @@ -184,14 +191,15 @@ impl UniswapV3 { /// Returns the liquidity configuration for Uniswap V3. #[expect(clippy::self_named_constructors)] pub fn uniswap_v3( - graph_url: &Url, + graph_url: Option, chain: Chain, max_pools_per_tick_query: usize, ) -> Option { Some(Self { router: contracts::UniswapV3SwapRouterV2::deployment_address(&chain.id())?.into(), max_pools_to_initialize: 100, - graph_url: graph_url.clone(), + graph_url, + pool_indexer_url: None, reinit_interval: None, max_pools_per_tick_query, }) diff --git a/crates/liquidity-sources/src/uniswap_v3/graph_api.rs b/crates/liquidity-sources/src/uniswap_v3/graph_api.rs index 5eb93d38ea..d299e4bcb2 100644 --- a/crates/liquidity-sources/src/uniswap_v3/graph_api.rs +++ b/crates/liquidity-sources/src/uniswap_v3/graph_api.rs @@ -5,9 +5,11 @@ use { crate::{ json_map, subgraph::{ContainsId, SubgraphClient}, + uniswap_v3::V3PoolDataSource, }, alloy::primitives::{Address, U256}, anyhow::Result, + async_trait::async_trait, event_indexing::event_handler::MAX_REORG_BLOCK_COUNT, num::BigInt, number::serialization::HexOrDecimalU256, @@ -278,6 +280,21 @@ impl UniV3SubgraphClient { } } +#[async_trait] +impl V3PoolDataSource for UniV3SubgraphClient { + async fn get_registered_pools(&self) -> Result { + Self::get_registered_pools(self).await + } + + async fn get_pools_with_ticks_by_ids( + &self, + ids: &[Address], + block_number: u64, + ) -> Result> { + Self::get_pools_with_ticks_by_ids(self, ids, block_number).await + } +} + /// Result of the registered stable pool query. #[derive(Debug, Default, PartialEq)] pub struct RegisteredPools { diff --git a/crates/liquidity-sources/src/uniswap_v3/mod.rs b/crates/liquidity-sources/src/uniswap_v3/mod.rs index 6e90557757..e0bd534ace 100644 --- a/crates/liquidity-sources/src/uniswap_v3/mod.rs +++ b/crates/liquidity-sources/src/uniswap_v3/mod.rs @@ -2,3 +2,32 @@ pub mod event_fetching; pub mod graph_api; pub mod pool_fetching; +pub mod pool_indexer; + +use { + self::graph_api::{PoolData, RegisteredPools}, + alloy::primitives::Address, + anyhow::Result, + async_trait::async_trait, +}; + +/// Abstracts over places we can pull Uniswap V3 pool state + ticks from. +/// Currently there are two backends: the Uniswap V3 subgraph (historical, +/// queryable by block) and our own pool-indexer service (at-head only). +#[async_trait] +pub trait V3PoolDataSource: Send + Sync + 'static { + /// Fetch the full set of pools the source knows about, tagged with the + /// block number the snapshot was taken at. Ticks are NOT populated; use + /// [`Self::get_pools_with_ticks_by_ids`] for that. + async fn get_registered_pools(&self) -> Result; + + /// Fetch pools + their active ticks for the given pool addresses. The + /// `block_number` hint is honored by sources that support historical + /// queries (subgraph); sources that only expose head data (pool-indexer) + /// ignore it and return at-head data. + async fn get_pools_with_ticks_by_ids( + &self, + ids: &[Address], + block_number: u64, + ) -> Result>; +} diff --git a/crates/liquidity-sources/src/uniswap_v3/pool_fetching.rs b/crates/liquidity-sources/src/uniswap_v3/pool_fetching.rs index faa3643715..85dec79f4b 100644 --- a/crates/liquidity-sources/src/uniswap_v3/pool_fetching.rs +++ b/crates/liquidity-sources/src/uniswap_v3/pool_fetching.rs @@ -1,7 +1,8 @@ use { super::{ + V3PoolDataSource, event_fetching::{RecentEventsCache, UniswapV3PoolEventFetcher}, - graph_api::{PoolData, Token, UniV3SubgraphClient}, + graph_api::{PoolData, Token}, }, crate::{recent_block_cache::Block, uniswap_v3::event_fetching::WithAddress}, alloy::{ @@ -22,7 +23,6 @@ use { model::TokenPair, num::{BigInt, Zero, rational::Ratio}, number::serialization::HexOrDecimalU256, - reqwest::{Client, Url}, serde::Serialize, serde_with::{DisplayFromStr, serde_as}, std::{ @@ -124,7 +124,7 @@ struct PoolsCheckpoint { } struct PoolsCheckpointHandler { - graph_api: UniV3SubgraphClient, + source: Arc, /// Address is pool id while TokenPair is a pair or tokens for each pool. pools_by_token_pair: HashMap>, /// Pools state on a specific block number in history considered reorg safe @@ -136,15 +136,10 @@ impl PoolsCheckpointHandler { /// state/ticks). Then fetches state/ticks for the most deepest pools /// (subset of all existing pools) pub async fn new( - subgraph_url: &Url, - client: Client, + source: Arc, max_pools_to_initialize_cache: usize, - max_pools_per_tick_query: usize, ) -> Result { - let graph_api = - UniV3SubgraphClient::from_subgraph_url(subgraph_url, client, max_pools_per_tick_query) - .await?; - let mut registered_pools = graph_api.get_registered_pools().await?; + let mut registered_pools = source.get_registered_pools().await?; tracing::debug!( block = %registered_pools.fetched_block_number, pools = %registered_pools.pools.len(), "initialized registered pools", @@ -171,7 +166,7 @@ impl PoolsCheckpointHandler { .rev() .take(max_pools_to_initialize_cache) .collect::>(); - let pools = graph_api + let pools = source .get_pools_with_ticks_by_ids(&pool_ids, registered_pools.fetched_block_number) .await? .into_iter() @@ -184,7 +179,7 @@ impl PoolsCheckpointHandler { }); Ok(Self { - graph_api, + source, pools_by_token_pair, pools_checkpoint, }) @@ -243,7 +238,7 @@ impl PoolsCheckpointHandler { let pool_ids = missing_pools.into_iter().collect::>(); let start = std::time::Instant::now(); let pools = self - .graph_api + .source .get_pools_with_ticks_by_ids(&pool_ids, block_number) .await; tracing::debug!( @@ -282,21 +277,13 @@ pub struct UniswapV3PoolFetcher { impl UniswapV3PoolFetcher { pub async fn new( - subgraph_url: &Url, + source: Arc, web3: Web3, - client: Client, block_retriever: Arc, max_pools_to_initialize: usize, - max_pools_per_tick_query: usize, ) -> Result { let web3 = web3.labeled("uniswapV3"); - let checkpoint = PoolsCheckpointHandler::new( - subgraph_url, - client, - max_pools_to_initialize, - max_pools_per_tick_query, - ) - .await?; + let checkpoint = PoolsCheckpointHandler::new(source, max_pools_to_initialize).await?; let init_block = checkpoint.pools_checkpoint.lock().unwrap().block_number; let init_block = block_retriever.block(init_block).await?; diff --git a/crates/liquidity-sources/src/uniswap_v3/pool_indexer.rs b/crates/liquidity-sources/src/uniswap_v3/pool_indexer.rs new file mode 100644 index 0000000000..8bef074e3a --- /dev/null +++ b/crates/liquidity-sources/src/uniswap_v3/pool_indexer.rs @@ -0,0 +1,267 @@ +//! HTTP client for CoW Protocol's own pool-indexer service. Implements +//! [`V3PoolDataSource`] so the driver can swap this in place of the subgraph +//! client without touching anything else. +//! +//! The pool-indexer always returns at-head data — it doesn't support +//! historical queries. `block_number` arguments are ignored; the block +//! actually served is returned in the response envelope. For the driver's +//! current use this is fine (see design discussion around cold_seeder and +//! the baseline solver's eth_call delegation). + +use { + crate::uniswap_v3::{ + V3PoolDataSource, + graph_api::{PoolData, RegisteredPools, TickData, Token}, + }, + alloy::primitives::{Address, U256}, + anyhow::{Context, Result}, + async_trait::async_trait, + num::BigInt, + reqwest::{Client, Url}, + serde::Deserialize, + std::{collections::HashMap, str::FromStr}, +}; + +/// Pool-indexer's server-side cap on `pool_ids=` query param size; keep our +/// per-request chunk at or below this. +const POOL_IDS_PER_REQUEST: usize = 500; + +/// Pool-indexer's server-side cap on `limit=` for listing pools. +const LIST_PAGE_SIZE: u64 = 5000; + +pub struct PoolIndexerClient { + /// Base URL including the `/api/v1/{network}/uniswap/v3` prefix. Trailing + /// slash normalization is done at construction. + base_url: Url, + http: Client, +} + +impl PoolIndexerClient { + pub fn new(mut base_url: Url, http: Client) -> Self { + // `Url::join` replaces the last path segment unless the base ends in + // a `/`. Normalize once so every `path()` call behaves like "append". + if !base_url.path().ends_with('/') { + let p = format!("{}/", base_url.path()); + base_url.set_path(&p); + } + Self { base_url, http } + } + + fn path(&self, suffix: &str) -> Result { + self.base_url + .join(suffix) + .with_context(|| format!("joining {suffix} onto {}", self.base_url)) + } +} + +// --- Response DTOs ------------------------------------------------------- + +#[derive(Deserialize)] +struct PoolsResponse { + block_number: u64, + pools: Vec, + #[serde(default)] + next_cursor: Option, +} + +#[derive(Deserialize)] +struct IndexerPool { + id: Address, + token0: IndexerToken, + token1: IndexerToken, + fee_tier: String, + liquidity: String, + sqrt_price: String, + tick: i32, +} + +#[derive(Deserialize)] +struct IndexerToken { + id: Address, + #[serde(default)] + decimals: Option, +} + +#[derive(Deserialize)] +struct BulkTicksResponse { + #[serde(default)] + #[allow(dead_code)] + block_number: u64, + pools: Vec, +} + +#[derive(Deserialize)] +struct IndexerPoolTicks { + pool: Address, + ticks: Vec, +} + +#[derive(Deserialize)] +struct IndexerTick { + tick_idx: i32, + liquidity_net: String, +} + +// --- Conversion into subgraph-shaped types ------------------------------- + +impl IndexerPool { + fn into_pool_data(self) -> Result { + Ok(PoolData { + id: self.id, + token0: Token { + id: self.token0.id, + decimals: self.token0.decimals.unwrap_or(0), + }, + token1: Token { + id: self.token1.id, + decimals: self.token1.decimals.unwrap_or(0), + }, + fee_tier: U256::from_str(&self.fee_tier).context("parse fee_tier")?, + liquidity: U256::from_str(&self.liquidity).context("parse liquidity")?, + sqrt_price: U256::from_str(&self.sqrt_price).context("parse sqrt_price")?, + tick: BigInt::from(self.tick), + ticks: None, + }) + } +} + +impl IndexerTick { + fn into_tick_data(self, pool_address: Address) -> Result { + Ok(TickData { + id: format!("{pool_address:#x}#{}", self.tick_idx), + tick_idx: BigInt::from(self.tick_idx), + liquidity_net: BigInt::from_str(&self.liquidity_net).context("parse liquidity_net")?, + pool_address, + }) + } +} + +// --- V3PoolDataSource implementation ------------------------------------- + +#[async_trait] +impl V3PoolDataSource for PoolIndexerClient { + async fn get_registered_pools(&self) -> Result { + // Paginate through the full pool set. The block_number returned from + // the first page is what we pin the snapshot to — subsequent pages + // may report a higher block, which we tolerate as bounded drift + // (see block-coherence discussion; driver's event replay takes it + // from there). + let mut cursor: Option = None; + let mut pools: Vec = Vec::new(); + let mut fetched_block_number: u64 = 0; + loop { + let mut url = self.path("pools")?; + url.query_pairs_mut() + .append_pair("limit", &LIST_PAGE_SIZE.to_string()); + if let Some(c) = &cursor { + url.query_pairs_mut().append_pair("after", c); + } + let page: PoolsResponse = self + .http + .get(url) + .send() + .await + .context("GET /pools")? + .error_for_status() + .context("pools HTTP status")? + .json() + .await + .context("pools body")?; + + if fetched_block_number == 0 { + fetched_block_number = page.block_number; + } + for p in page.pools { + pools.push(p.into_pool_data()?); + } + match page.next_cursor { + Some(c) => cursor = Some(c), + None => break, + } + } + Ok(RegisteredPools { + fetched_block_number, + pools, + }) + } + + async fn get_pools_with_ticks_by_ids( + &self, + ids: &[Address], + _block_number: u64, + ) -> Result> { + if ids.is_empty() { + return Ok(Vec::new()); + } + + let mut out: Vec = Vec::with_capacity(ids.len()); + for batch in ids.chunks(POOL_IDS_PER_REQUEST) { + let (pools, ticks_by_pool) = futures::try_join!( + fetch_pools_by_ids(self, batch), + fetch_ticks_by_pool_ids(self, batch), + )?; + + for mut pool in pools { + if let Some(ticks) = ticks_by_pool.get(&pool.id) { + pool.ticks = Some(ticks.clone()); + } + out.push(pool); + } + } + Ok(out) + } +} + +fn ids_param(ids: &[Address]) -> String { + ids.iter() + .map(|a| format!("{a:#x}")) + .collect::>() + .join(",") +} + +async fn fetch_pools_by_ids(client: &PoolIndexerClient, ids: &[Address]) -> Result> { + let mut url = client.path("pools")?; + url.query_pairs_mut() + .append_pair("pool_ids", &ids_param(ids)); + let resp: PoolsResponse = client + .http + .get(url) + .send() + .await + .context("GET /pools?pool_ids=")? + .error_for_status() + .context("pools-by-ids HTTP status")? + .json() + .await + .context("pools-by-ids body")?; + resp.pools + .into_iter() + .map(IndexerPool::into_pool_data) + .collect() +} + +async fn fetch_ticks_by_pool_ids( + client: &PoolIndexerClient, + ids: &[Address], +) -> Result>> { + let mut url = client.path("pools/ticks")?; + url.query_pairs_mut() + .append_pair("pool_ids", &ids_param(ids)); + let resp: BulkTicksResponse = client + .http + .get(url) + .send() + .await + .context("GET /pools/ticks")? + .error_for_status() + .context("bulk-ticks HTTP status")? + .json() + .await + .context("bulk-ticks body")?; + let mut out: HashMap> = HashMap::new(); + for IndexerPoolTicks { pool, ticks } in resp.pools { + let mapped: Result> = ticks.into_iter().map(|t| t.into_tick_data(pool)).collect(); + out.insert(pool, mapped?); + } + Ok(out) +} diff --git a/crates/pool-indexer/src/indexer/uniswap_v3.rs b/crates/pool-indexer/src/indexer/uniswap_v3.rs index bad885aec0..959f1954bd 100644 --- a/crates/pool-indexer/src/indexer/uniswap_v3.rs +++ b/crates/pool-indexer/src/indexer/uniswap_v3.rs @@ -231,9 +231,9 @@ impl UniswapV3Indexer { // independently. Instead, we filter client-side: // - PoolCreated is matched against `self.factory` in // `LogAccumulator::handle_pool_created`. - // - Mint/Burn/Swap/Initialize from unknown pools are silently - // dropped by the SQL `WHERE EXISTS (... uniswap_v3_pools ...)` - // guards in the batch writers. + // - Mint/Burn/Swap/Initialize from unknown pools are silently dropped by the + // SQL `WHERE EXISTS (... uniswap_v3_pools ...)` guards in the batch + // writers. bisecting_get_logs( &self.provider, from, From ea7c1191df9b73080620f0762e989512f81207df Mon Sep 17 00:00:00 2001 From: Jan P Date: Tue, 21 Apr 2026 09:27:15 +0200 Subject: [PATCH 17/80] Fmt generated contracts bindings --- .../generated/contracts-facade/src/lib.rs | 172 +- .../anyoneauthenticator/src/lib.rs | 298 +- .../balancerqueries/src/lib.rs | 360 +- .../balancerv2authorizer/src/lib.rs | 606 ++- .../balancerv2basepool/src/lib.rs | 1792 ++++---- .../balancerv2basepoolfactory/src/lib.rs | 205 +- .../balancerv2composablestablepool/src/lib.rs | 2785 ++++++------ .../src/lib.rs | 720 ++-- .../src/lib.rs | 724 ++-- .../src/lib.rs | 748 ++-- .../src/lib.rs | 760 ++-- .../src/lib.rs | 760 ++-- .../src/lib.rs | 2462 +++++------ .../src/lib.rs | 492 +-- .../src/lib.rs | 580 ++- .../balancerv2stablepool/src/lib.rs | 2048 +++++---- .../balancerv2stablepoolfactoryv2/src/lib.rs | 589 ++- .../balancerv2vault/src/lib.rs | 3194 +++++++------- .../balancerv2weightedpool/src/lib.rs | 1896 ++++----- .../src/lib.rs | 551 ++- .../balancerv2weightedpoolfactory/src/lib.rs | 483 +-- .../src/lib.rs | 700 ++- .../src/lib.rs | 736 ++-- .../balancerv3batchrouter/src/lib.rs | 1170 +++--- .../contracts-generated/balances/src/lib.rs | 678 ++- .../baoswaprouter/src/lib.rs | 744 ++-- .../chainalysisoracle/src/lib.rs | 996 ++--- .../contracts-generated/counter/src/lib.rs | 455 +- .../contracts-generated/cowamm/src/lib.rs | 1734 ++++---- .../cowammconstantproductfactory/src/lib.rs | 1360 +++--- .../cowammfactorygetter/src/lib.rs | 257 +- .../cowammlegacyhelper/src/lib.rs | 1333 +++--- .../cowammuniswapv2priceoracle/src/lib.rs | 121 +- .../cowprotocoltoken/src/lib.rs | 1982 ++++----- .../cowsettlementforwarder/src/lib.rs | 702 ++-- .../cowswapethflow/src/lib.rs | 2263 +++++----- .../cowswaponchainorders/src/lib.rs | 724 ++-- .../erc1271signaturevalidator/src/lib.rs | 297 +- .../contracts-generated/erc20/src/lib.rs | 1032 +++-- .../erc20mintable/src/lib.rs | 1079 +++-- .../flashloanrouter/src/lib.rs | 677 ++- .../contracts-generated/gashog/src/lib.rs | 376 +- .../contracts-generated/gnosissafe/src/lib.rs | 1887 ++++----- .../src/lib.rs | 703 ++-- .../gnosissafeproxy/src/lib.rs | 142 +- .../gnosissafeproxyfactory/src/lib.rs | 430 +- .../gpv2allowlistauthentication/src/lib.rs | 1114 +++-- .../gpv2settlement/src/lib.rs | 2239 +++++----- .../honeyswaprouter/src/lib.rs | 756 ++-- .../hookstrampoline/src/lib.rs | 808 ++-- .../icowwrapper/src/lib.rs | 261 +- .../contracts-generated/ierc4626/src/lib.rs | 366 +- .../contracts-generated/iswaprpair/src/lib.rs | 2453 +++++------ .../iuniswaplikepair/src/lib.rs | 2471 +++++------ .../iuniswaplikerouter/src/lib.rs | 724 ++-- .../iuniswapv3factory/src/lib.rs | 747 ++-- .../contracts-generated/izeroex/src/lib.rs | 3226 +++++++------- .../liquoricesettlement/src/lib.rs | 3734 ++++++++--------- .../mockerc4626wrapper/src/lib.rs | 1298 +++--- .../mockuniswapv3factory/src/lib.rs | 442 +- .../mockuniswapv3pool/src/lib.rs | 1060 +++-- .../nonstandarderc20balances/src/lib.rs | 700 ++- .../pancakerouter/src/lib.rs | 780 ++-- .../contracts-generated/permit2/src/lib.rs | 2329 +++++----- .../remoteerc20balances/src/lib.rs | 832 ++-- .../contracts-generated/signatures/src/lib.rs | 691 ++- .../contracts-generated/solver/src/lib.rs | 476 +-- .../contracts-generated/spardose/src/lib.rs | 298 +- .../sushiswaprouter/src/lib.rs | 840 ++-- .../contracts-generated/swapper/src/lib.rs | 726 ++-- .../swaprrouter/src/lib.rs | 760 ++-- .../testnetuniswapv2router02/src/lib.rs | 758 ++-- .../contracts-generated/trader/src/lib.rs | 494 +-- .../uniswapv2factory/src/lib.rs | 646 ++- .../uniswapv2router02/src/lib.rs | 973 ++--- .../uniswapv3pool/src/lib.rs | 2629 ++++++------ .../uniswapv3quoterv2/src/lib.rs | 1333 +++--- .../uniswapv3swaprouterv2/src/lib.rs | 634 ++- .../contracts-generated/weth9/src/lib.rs | 1502 +++---- 79 files changed, 38335 insertions(+), 45568 deletions(-) diff --git a/contracts/generated/contracts-facade/src/lib.rs b/contracts/generated/contracts-facade/src/lib.rs index 4d75f87f7c..586212c05e 100644 --- a/contracts/generated/contracts-facade/src/lib.rs +++ b/contracts/generated/contracts-facade/src/lib.rs @@ -1,87 +1,101 @@ -#![allow(unused_imports, unused_attributes, clippy::all, rustdoc::all, non_snake_case)] +#![allow( + unused_imports, + unused_attributes, + clippy::all, + rustdoc::all, + non_snake_case +)] //! This crate re-exports per-contract crate bindings. //! Auto-generated by contracts-generate. Do not edit. -pub use cow_contract_balancerqueries as BalancerQueries; -pub use cow_contract_balancerv2authorizer as BalancerV2Authorizer; -pub use cow_contract_balancerv2basepool as BalancerV2BasePool; -pub use cow_contract_balancerv2basepoolfactory as BalancerV2BasePoolFactory; -pub use cow_contract_balancerv2composablestablepool as BalancerV2ComposableStablePool; -pub use cow_contract_balancerv2composablestablepoolfactory as BalancerV2ComposableStablePoolFactory; -pub use cow_contract_balancerv2composablestablepoolfactoryv3 as BalancerV2ComposableStablePoolFactoryV3; -pub use cow_contract_balancerv2composablestablepoolfactoryv4 as BalancerV2ComposableStablePoolFactoryV4; -pub use cow_contract_balancerv2composablestablepoolfactoryv5 as BalancerV2ComposableStablePoolFactoryV5; -pub use cow_contract_balancerv2composablestablepoolfactoryv6 as BalancerV2ComposableStablePoolFactoryV6; -pub use cow_contract_balancerv2liquiditybootstrappingpool as BalancerV2LiquidityBootstrappingPool; -pub use cow_contract_balancerv2liquiditybootstrappingpoolfactory as BalancerV2LiquidityBootstrappingPoolFactory; -pub use cow_contract_balancerv2noprotocolfeeliquiditybootstrappingpoolfactory as BalancerV2NoProtocolFeeLiquidityBootstrappingPoolFactory; -pub use cow_contract_balancerv2stablepool as BalancerV2StablePool; -pub use cow_contract_balancerv2stablepoolfactoryv2 as BalancerV2StablePoolFactoryV2; -pub use cow_contract_balancerv2vault as BalancerV2Vault; -pub use cow_contract_balancerv2weightedpool as BalancerV2WeightedPool; -pub use cow_contract_balancerv2weightedpool2tokensfactory as BalancerV2WeightedPool2TokensFactory; -pub use cow_contract_balancerv2weightedpoolfactory as BalancerV2WeightedPoolFactory; -pub use cow_contract_balancerv2weightedpoolfactoryv3 as BalancerV2WeightedPoolFactoryV3; -pub use cow_contract_balancerv2weightedpoolfactoryv4 as BalancerV2WeightedPoolFactoryV4; -pub use cow_contract_balancerv3batchrouter as BalancerV3BatchRouter; -pub use cow_contract_baoswaprouter as BaoswapRouter; -pub use cow_contract_chainalysisoracle as ChainalysisOracle; -pub use cow_contract_cowsettlementforwarder as CowSettlementForwarder; -pub use cow_contract_cowswapethflow as CoWSwapEthFlow; -pub use cow_contract_cowswaponchainorders as CoWSwapOnchainOrders; -pub use cow_contract_erc1271signaturevalidator as ERC1271SignatureValidator; -pub use cow_contract_erc20 as ERC20; -pub use cow_contract_erc20mintable as ERC20Mintable; -pub use cow_contract_flashloanrouter as FlashLoanRouter; -pub use cow_contract_gnosissafe as GnosisSafe; -pub use cow_contract_gnosissafecompatibilityfallbackhandler as GnosisSafeCompatibilityFallbackHandler; -pub use cow_contract_gnosissafeproxy as GnosisSafeProxy; -pub use cow_contract_gnosissafeproxyfactory as GnosisSafeProxyFactory; -pub use cow_contract_gpv2allowlistauthentication as GPv2AllowListAuthentication; -pub use cow_contract_gpv2settlement as GPv2Settlement; -pub use cow_contract_honeyswaprouter as HoneyswapRouter; -pub use cow_contract_hookstrampoline as HooksTrampoline; -pub use cow_contract_icowwrapper as ICowWrapper; -pub use cow_contract_ierc4626 as IERC4626; -pub use cow_contract_iswaprpair as ISwaprPair; -pub use cow_contract_iuniswaplikepair as IUniswapLikePair; -pub use cow_contract_iuniswaplikerouter as IUniswapLikeRouter; -pub use cow_contract_iuniswapv3factory as IUniswapV3Factory; -pub use cow_contract_izeroex as IZeroex; -pub use cow_contract_liquoricesettlement as LiquoriceSettlement; -pub use cow_contract_pancakerouter as PancakeRouter; -pub use cow_contract_permit2 as Permit2; -pub use cow_contract_sushiswaprouter as SushiSwapRouter; -pub use cow_contract_swaprrouter as SwaprRouter; -pub use cow_contract_testnetuniswapv2router02 as TestnetUniswapV2Router02; -pub use cow_contract_uniswapv2factory as UniswapV2Factory; -pub use cow_contract_uniswapv2router02 as UniswapV2Router02; -pub use cow_contract_uniswapv3pool as UniswapV3Pool; -pub use cow_contract_uniswapv3quoterv2 as UniswapV3QuoterV2; -pub use cow_contract_uniswapv3swaprouterv2 as UniswapV3SwapRouterV2; -pub use cow_contract_weth9 as WETH9; +pub use { + cow_contract_balancerqueries as BalancerQueries, + cow_contract_balancerv2authorizer as BalancerV2Authorizer, + cow_contract_balancerv2basepool as BalancerV2BasePool, + cow_contract_balancerv2basepoolfactory as BalancerV2BasePoolFactory, + cow_contract_balancerv2composablestablepool as BalancerV2ComposableStablePool, + cow_contract_balancerv2composablestablepoolfactory as BalancerV2ComposableStablePoolFactory, + cow_contract_balancerv2composablestablepoolfactoryv3 as BalancerV2ComposableStablePoolFactoryV3, + cow_contract_balancerv2composablestablepoolfactoryv4 as BalancerV2ComposableStablePoolFactoryV4, + cow_contract_balancerv2composablestablepoolfactoryv5 as BalancerV2ComposableStablePoolFactoryV5, + cow_contract_balancerv2composablestablepoolfactoryv6 as BalancerV2ComposableStablePoolFactoryV6, + cow_contract_balancerv2liquiditybootstrappingpool as BalancerV2LiquidityBootstrappingPool, + cow_contract_balancerv2liquiditybootstrappingpoolfactory as BalancerV2LiquidityBootstrappingPoolFactory, + cow_contract_balancerv2noprotocolfeeliquiditybootstrappingpoolfactory as BalancerV2NoProtocolFeeLiquidityBootstrappingPoolFactory, + cow_contract_balancerv2stablepool as BalancerV2StablePool, + cow_contract_balancerv2stablepoolfactoryv2 as BalancerV2StablePoolFactoryV2, + cow_contract_balancerv2vault as BalancerV2Vault, + cow_contract_balancerv2weightedpool as BalancerV2WeightedPool, + cow_contract_balancerv2weightedpool2tokensfactory as BalancerV2WeightedPool2TokensFactory, + cow_contract_balancerv2weightedpoolfactory as BalancerV2WeightedPoolFactory, + cow_contract_balancerv2weightedpoolfactoryv3 as BalancerV2WeightedPoolFactoryV3, + cow_contract_balancerv2weightedpoolfactoryv4 as BalancerV2WeightedPoolFactoryV4, + cow_contract_balancerv3batchrouter as BalancerV3BatchRouter, + cow_contract_baoswaprouter as BaoswapRouter, + cow_contract_chainalysisoracle as ChainalysisOracle, + cow_contract_cowsettlementforwarder as CowSettlementForwarder, + cow_contract_cowswapethflow as CoWSwapEthFlow, + cow_contract_cowswaponchainorders as CoWSwapOnchainOrders, + cow_contract_erc20 as ERC20, + cow_contract_erc20mintable as ERC20Mintable, + cow_contract_erc1271signaturevalidator as ERC1271SignatureValidator, + cow_contract_flashloanrouter as FlashLoanRouter, + cow_contract_gnosissafe as GnosisSafe, + cow_contract_gnosissafecompatibilityfallbackhandler as GnosisSafeCompatibilityFallbackHandler, + cow_contract_gnosissafeproxy as GnosisSafeProxy, + cow_contract_gnosissafeproxyfactory as GnosisSafeProxyFactory, + cow_contract_gpv2allowlistauthentication as GPv2AllowListAuthentication, + cow_contract_gpv2settlement as GPv2Settlement, + cow_contract_honeyswaprouter as HoneyswapRouter, + cow_contract_hookstrampoline as HooksTrampoline, + cow_contract_icowwrapper as ICowWrapper, + cow_contract_ierc4626 as IERC4626, + cow_contract_iswaprpair as ISwaprPair, + cow_contract_iuniswaplikepair as IUniswapLikePair, + cow_contract_iuniswaplikerouter as IUniswapLikeRouter, + cow_contract_iuniswapv3factory as IUniswapV3Factory, + cow_contract_izeroex as IZeroex, + cow_contract_liquoricesettlement as LiquoriceSettlement, + cow_contract_pancakerouter as PancakeRouter, + cow_contract_permit2 as Permit2, + cow_contract_sushiswaprouter as SushiSwapRouter, + cow_contract_swaprrouter as SwaprRouter, + cow_contract_testnetuniswapv2router02 as TestnetUniswapV2Router02, + cow_contract_uniswapv2factory as UniswapV2Factory, + cow_contract_uniswapv2router02 as UniswapV2Router02, + cow_contract_uniswapv3pool as UniswapV3Pool, + cow_contract_uniswapv3quoterv2 as UniswapV3QuoterV2, + cow_contract_uniswapv3swaprouterv2 as UniswapV3SwapRouterV2, + cow_contract_weth9 as WETH9, +}; pub mod support { - pub use cow_contract_anyoneauthenticator as AnyoneAuthenticator; - pub use cow_contract_balances as Balances; - pub use cow_contract_signatures as Signatures; - pub use cow_contract_solver as Solver; - pub use cow_contract_spardose as Spardose; - pub use cow_contract_swapper as Swapper; - pub use cow_contract_trader as Trader; + pub use { + cow_contract_anyoneauthenticator as AnyoneAuthenticator, + cow_contract_balances as Balances, + cow_contract_signatures as Signatures, + cow_contract_solver as Solver, + cow_contract_spardose as Spardose, + cow_contract_swapper as Swapper, + cow_contract_trader as Trader, + }; } pub mod test { - pub use cow_contract_counter as Counter; - pub use cow_contract_cowprotocoltoken as CowProtocolToken; - pub use cow_contract_gashog as GasHog; - pub use cow_contract_mockerc4626wrapper as MockERC4626Wrapper; - pub use cow_contract_mockuniswapv3factory as MockUniswapV3Factory; - pub use cow_contract_mockuniswapv3pool as MockUniswapV3Pool; - pub use cow_contract_nonstandarderc20balances as NonStandardERC20Balances; - pub use cow_contract_remoteerc20balances as RemoteERC20Balances; + pub use { + cow_contract_counter as Counter, + cow_contract_cowprotocoltoken as CowProtocolToken, + cow_contract_gashog as GasHog, + cow_contract_mockerc4626wrapper as MockERC4626Wrapper, + cow_contract_mockuniswapv3factory as MockUniswapV3Factory, + cow_contract_mockuniswapv3pool as MockUniswapV3Pool, + cow_contract_nonstandarderc20balances as NonStandardERC20Balances, + cow_contract_remoteerc20balances as RemoteERC20Balances, + }; } pub mod cow_amm { - pub use cow_contract_cowamm as CowAmm; - pub use cow_contract_cowammconstantproductfactory as CowAmmConstantProductFactory; - pub use cow_contract_cowammfactorygetter as CowAmmFactoryGetter; - pub use cow_contract_cowammlegacyhelper as CowAmmLegacyHelper; - pub use cow_contract_cowammuniswapv2priceoracle as CowAmmUniswapV2PriceOracle; + pub use { + cow_contract_cowamm as CowAmm, + cow_contract_cowammconstantproductfactory as CowAmmConstantProductFactory, + cow_contract_cowammfactorygetter as CowAmmFactoryGetter, + cow_contract_cowammlegacyhelper as CowAmmLegacyHelper, + cow_contract_cowammuniswapv2priceoracle as CowAmmUniswapV2PriceOracle, + }; } diff --git a/contracts/generated/contracts-generated/anyoneauthenticator/src/lib.rs b/contracts/generated/contracts-generated/anyoneauthenticator/src/lib.rs index 75b0b43915..c4f71c03f3 100644 --- a/contracts/generated/contracts-generated/anyoneauthenticator/src/lib.rs +++ b/contracts/generated/contracts-generated/anyoneauthenticator/src/lib.rs @@ -1,4 +1,10 @@ -#![allow(unused_imports, unused_attributes, clippy::all, rustdoc::all, non_snake_case)] +#![allow( + unused_imports, + unused_attributes, + clippy::all, + rustdoc::all, + non_snake_case +)] //! Auto-generated contract bindings. Do not edit. /** @@ -41,8 +47,7 @@ interface AnyoneAuthenticator { clippy::empty_structs_with_brackets )] pub mod AnyoneAuthenticator { - use super::*; - use alloy_sol_types as alloy_sol_types; + use {super::*, alloy_sol_types}; /// The creation / init bytecode of the contract. /// /// ```text @@ -65,14 +70,15 @@ pub mod AnyoneAuthenticator { ); #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `isSolver(address)` and selector `0x02cc250d`. -```solidity -function isSolver(address) external pure returns (bool); -```*/ + ```solidity + function isSolver(address) external pure returns (bool); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct isSolverCall(pub alloy_sol_types::private::Address); #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`isSolver(address)`](isSolverCall) function. + ///Container type for the return parameters of the + /// [`isSolver(address)`](isSolverCall) function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct isSolverReturn { @@ -86,7 +92,7 @@ function isSolver(address) external pure returns (bool); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -95,9 +101,7 @@ function isSolver(address) external pure returns (bool); type UnderlyingRustTuple<'a> = (alloy_sol_types::private::Address,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -127,9 +131,7 @@ function isSolver(address) external pure returns (bool); type UnderlyingRustTuple<'a> = (bool,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -154,22 +156,21 @@ function isSolver(address) external pure returns (bool); #[automatically_derived] impl alloy_sol_types::SolCall for isSolverCall { type Parameters<'a> = (alloy_sol_types::sol_data::Address,); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = bool; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (alloy_sol_types::sol_data::Bool,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "isSolver(address)"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [2u8, 204u8, 37u8, 13u8]; + const SIGNATURE: &'static str = "isSolver(address)"; + #[inline] fn new<'a>( tuple: as alloy_sol_types::SolType>::RustType, ) -> Self { tuple.into() } + #[inline] fn tokenize(&self) -> Self::Token<'_> { ( @@ -178,41 +179,36 @@ function isSolver(address) external pure returns (bool); ), ) } + #[inline] fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { - ( - ::tokenize( - ret, - ), - ) + (::tokenize(ret),) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) - .map(|r| { + as alloy_sol_types::SolType>::abi_decode_sequence(data).map( + |r| { let r: isSolverReturn = 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: isSolverReturn = r.into(); - r._0 - }) + 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: isSolverReturn = r.into(); + r._0 + }) } } }; ///Container for all the [`AnyoneAuthenticator`](self) function calls. #[derive(Clone)] - #[derive()] pub enum AnyoneAuthenticatorCalls { #[allow(missing_docs)] isSolver(isSolverCall), @@ -220,19 +216,18 @@ function isSolver(address) external pure returns (bool); impl AnyoneAuthenticatorCalls { /// 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. + /// 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]] = &[[2u8, 204u8, 37u8, 13u8]]; - /// The names of the variants in the same order as `SELECTORS`. - pub const VARIANT_NAMES: &'static [&'static str] = &[ - ::core::stringify!(isSolver), - ]; /// The signatures in the same order as `SELECTORS`. - pub const SIGNATURES: &'static [&'static str] = &[ - ::SIGNATURE, - ]; + pub const SIGNATURES: &'static [&'static str] = + &[::SIGNATURE]; + /// The names of the variants in the same order as `SELECTORS`. + pub const VARIANT_NAMES: &'static [&'static str] = &[::core::stringify!(isSolver)]; + /// Returns the signature for the given selector, if known. #[inline] pub fn signature_by_selector( @@ -245,63 +240,59 @@ function isSolver(address) external pure returns (bool); ::core::result::Result::Err(_) => ::core::option::Option::None, } } + /// Returns the enum variant name for the given selector, if known. #[inline] - pub fn name_by_selector( - selector: [u8; 4usize], - ) -> ::core::option::Option<&'static str> { + pub fn name_by_selector(selector: [u8; 4usize]) -> ::core::option::Option<&'static str> { let sig = Self::signature_by_selector(selector)?; sig.split_once('(').map(|(name, _)| name) } } #[automatically_derived] impl alloy_sol_types::SolInterface for AnyoneAuthenticatorCalls { - const NAME: &'static str = "AnyoneAuthenticatorCalls"; - const MIN_DATA_LENGTH: usize = 32usize; const COUNT: usize = 1usize; + const MIN_DATA_LENGTH: usize = 32usize; + const NAME: &'static str = "AnyoneAuthenticatorCalls"; + #[inline] fn selector(&self) -> [u8; 4] { match self { Self::isSolver(_) => ::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 { + fn abi_decode_raw(selector: [u8; 4], data: &[u8]) -> alloy_sol_types::Result { static DECODE_SHIMS: &[fn( &[u8], - ) -> alloy_sol_types::Result] = &[ - { - fn isSolver( - data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw(data) - .map(AnyoneAuthenticatorCalls::isSolver) - } - isSolver - }, - ]; + ) + -> alloy_sol_types::Result] = &[{ + fn isSolver(data: &[u8]) -> alloy_sol_types::Result { + ::abi_decode_raw(data) + .map(AnyoneAuthenticatorCalls::isSolver) + } + isSolver + }]; let Ok(idx) = Self::SELECTORS.binary_search(&selector) else { - return Err( - alloy_sol_types::Error::unknown_selector( - ::NAME, - selector, - ), - ); + return Err(alloy_sol_types::Error::unknown_selector( + ::NAME, + selector, + )); }; DECODE_SHIMS[idx](data) } + #[inline] #[allow(non_snake_case)] fn abi_decode_raw_validate( @@ -310,29 +301,24 @@ function isSolver(address) external pure returns (bool); ) -> alloy_sol_types::Result { static DECODE_VALIDATE_SHIMS: &[fn( &[u8], - ) -> alloy_sol_types::Result] = &[ - { - fn isSolver( - data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) - .map(AnyoneAuthenticatorCalls::isSolver) - } - isSolver - }, - ]; + ) -> alloy_sol_types::Result< + AnyoneAuthenticatorCalls, + >] = &[{ + fn isSolver(data: &[u8]) -> alloy_sol_types::Result { + ::abi_decode_raw_validate(data) + .map(AnyoneAuthenticatorCalls::isSolver) + } + isSolver + }]; let Ok(idx) = Self::SELECTORS.binary_search(&selector) else { - return Err( - alloy_sol_types::Error::unknown_selector( - ::NAME, - selector, - ), - ); + return Err(alloy_sol_types::Error::unknown_selector( + ::NAME, + selector, + )); }; DECODE_VALIDATE_SHIMS[idx](data) } + #[inline] fn abi_encoded_size(&self) -> usize { match self { @@ -341,22 +327,20 @@ function isSolver(address) external pure returns (bool); } } } + #[inline] fn abi_encode_raw(&self, out: &mut alloy_sol_types::private::Vec) { match self { Self::isSolver(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } } } } - use alloy_contract as alloy_contract; + use alloy_contract; /**Creates a new wrapper around an on-chain [`AnyoneAuthenticator`](self) contract instance. -See the [wrapper's documentation](`AnyoneAuthenticatorInstance`) for more details.*/ + See the [wrapper's documentation](`AnyoneAuthenticatorInstance`) for more details.*/ #[inline] pub const fn new< P: alloy_contract::private::Provider, @@ -369,43 +353,41 @@ See the [wrapper's documentation](`AnyoneAuthenticatorInstance`) for more detail } /**Deploys this contract using the given `provider` and constructor arguments, if any. -Returns a new instance of the contract, if the deployment was successful. + 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.*/ + 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, - >( + pub fn deploy, N: alloy_contract::private::Network>( __provider: P, - ) -> impl ::core::future::Future< - Output = alloy_contract::Result>, - > { + ) -> impl ::core::future::Future>> + { AnyoneAuthenticatorInstance::::deploy(__provider) } /**Creates a `RawCallBuilder` for deploying this contract using the given `provider` -and constructor arguments, if any. + 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.*/ + 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) -> alloy_contract::RawCallBuilder { + >( + __provider: P, + ) -> alloy_contract::RawCallBuilder { AnyoneAuthenticatorInstance::::deploy_builder(__provider) } /**A [`AnyoneAuthenticator`](self) instance. -Contains type-safe methods for interacting with an on-chain instance of the -[`AnyoneAuthenticator`](self) contract located at a given `address`, using a given -provider `P`. + Contains type-safe methods for interacting with an on-chain instance of the + [`AnyoneAuthenticator`](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. + 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.*/ + See the [module-level documentation](self) for all the available methods.*/ #[derive(Clone)] pub struct AnyoneAuthenticatorInstance { address: alloy_sol_types::private::Address, @@ -416,33 +398,32 @@ See the [module-level documentation](self) for all the available methods.*/ impl ::core::fmt::Debug for AnyoneAuthenticatorInstance { #[inline] fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { - f.debug_tuple("AnyoneAuthenticatorInstance").field(&self.address).finish() + f.debug_tuple("AnyoneAuthenticatorInstance") + .field(&self.address) + .finish() } } /// Instantiation and getters/setters. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > AnyoneAuthenticatorInstance { + impl, N: alloy_contract::private::Network> + AnyoneAuthenticatorInstance + { /**Creates a new wrapper around an on-chain [`AnyoneAuthenticator`](self) contract instance. -See the [wrapper's documentation](`AnyoneAuthenticatorInstance`) for more details.*/ + See the [wrapper's documentation](`AnyoneAuthenticatorInstance`) for more details.*/ #[inline] - pub const fn new( - address: alloy_sol_types::private::Address, - __provider: P, - ) -> Self { + pub const fn new(address: alloy_sol_types::private::Address, __provider: P) -> Self { Self { address, provider: __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. + 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.*/ + For more fine-grained control over the deployment process, use [`deploy_builder`] instead.*/ #[inline] pub async fn deploy( __provider: P, @@ -451,11 +432,12 @@ For more fine-grained control over the deployment process, use [`deploy_builder` 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. + 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.*/ + 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( @@ -463,21 +445,25 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ ::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 { @@ -485,7 +471,8 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ } } impl AnyoneAuthenticatorInstance<&P, N> { - /// Clones the provider and returns a new instance with the cloned provider. + /// Clones the provider and returns a new instance with the cloned + /// provider. #[inline] pub fn with_cloned_provider(self) -> AnyoneAuthenticatorInstance { AnyoneAuthenticatorInstance { @@ -496,20 +483,22 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ } } /// Function calls. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > AnyoneAuthenticatorInstance { - /// Creates a new call builder using this contract instance's provider and address. + impl, N: alloy_contract::private::Network> + AnyoneAuthenticatorInstance + { + /// 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. + /// 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 [`isSolver`] function. pub fn isSolver( &self, @@ -519,14 +508,15 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ } } /// Event filters. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > AnyoneAuthenticatorInstance { - /// Creates a new event filter using this contract instance's provider and address. + impl, N: alloy_contract::private::Network> + AnyoneAuthenticatorInstance + { + /// 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. + /// 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> { @@ -534,6 +524,4 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ } } } -pub type Instance = AnyoneAuthenticator::AnyoneAuthenticatorInstance< - ::alloy_provider::DynProvider, ->; +pub type Instance = AnyoneAuthenticator::AnyoneAuthenticatorInstance<::alloy_provider::DynProvider>; diff --git a/contracts/generated/contracts-generated/balancerqueries/src/lib.rs b/contracts/generated/contracts-generated/balancerqueries/src/lib.rs index 3f5beffc0b..ba9d3eb04d 100644 --- a/contracts/generated/contracts-generated/balancerqueries/src/lib.rs +++ b/contracts/generated/contracts-generated/balancerqueries/src/lib.rs @@ -1,4 +1,10 @@ -#![allow(unused_imports, unused_attributes, clippy::all, rustdoc::all, non_snake_case)] +#![allow( + unused_imports, + unused_attributes, + clippy::all, + rustdoc::all, + non_snake_case +)] //! Auto-generated contract bindings. Do not edit. /** @@ -48,12 +54,11 @@ interface BalancerQueries { clippy::empty_structs_with_brackets )] pub mod BalancerQueries { - use super::*; - use alloy_sol_types as alloy_sol_types; + use {super::*, alloy_sol_types}; /**Constructor`. -```solidity -constructor(address _vault); -```*/ + ```solidity + constructor(address _vault); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct constructorCall { @@ -61,7 +66,7 @@ constructor(address _vault); pub _vault: alloy_sol_types::private::Address, } const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -70,9 +75,7 @@ constructor(address _vault); type UnderlyingRustTuple<'a> = (alloy_sol_types::private::Address,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -97,15 +100,15 @@ constructor(address _vault); #[automatically_derived] impl alloy_sol_types::SolConstructor for constructorCall { type Parameters<'a> = (alloy_sol_types::sol_data::Address,); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + 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<'_> { ( @@ -118,14 +121,15 @@ constructor(address _vault); }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `vault()` and selector `0xfbfa77cf`. -```solidity -function vault() external view returns (address); -```*/ + ```solidity + function vault() external view returns (address); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct vaultCall; #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`vault()`](vaultCall) function. + ///Container type for the return parameters of the [`vault()`](vaultCall) + /// function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct vaultReturn { @@ -139,7 +143,7 @@ function vault() external view returns (address); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -148,9 +152,7 @@ function vault() external view returns (address); type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -180,9 +182,7 @@ function vault() external view returns (address); type UnderlyingRustTuple<'a> = (alloy_sol_types::private::Address,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -207,61 +207,55 @@ function vault() external view returns (address); #[automatically_derived] impl alloy_sol_types::SolCall for vaultCall { type Parameters<'a> = (); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = alloy_sol_types::private::Address; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (alloy_sol_types::sol_data::Address,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "vault()"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [251u8, 250u8, 119u8, 207u8]; + const SIGNATURE: &'static str = "vault()"; + #[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, - ), - ) + (::tokenize(ret),) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) - .map(|r| { + as alloy_sol_types::SolType>::abi_decode_sequence(data).map( + |r| { let r: vaultReturn = 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: vaultReturn = r.into(); - r._0 - }) + 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: vaultReturn = r.into(); + r._0 + }) } } }; ///Container for all the [`BalancerQueries`](self) function calls. #[derive(Clone)] - #[derive()] pub enum BalancerQueriesCalls { #[allow(missing_docs)] vault(vaultCall), @@ -269,17 +263,18 @@ function vault() external view returns (address); impl BalancerQueriesCalls { /// 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. + /// 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]] = &[[251u8, 250u8, 119u8, 207u8]]; + /// The signatures in the same order as `SELECTORS`. + pub const SIGNATURES: &'static [&'static str] = + &[::SIGNATURE]; /// The names of the variants in the same order as `SELECTORS`. pub const VARIANT_NAMES: &'static [&'static str] = &[::core::stringify!(vault)]; - /// The signatures in the same order as `SELECTORS`. - pub const SIGNATURES: &'static [&'static str] = &[ - ::SIGNATURE, - ]; + /// Returns the signature for the given selector, if known. #[inline] pub fn signature_by_selector( @@ -292,63 +287,57 @@ function vault() external view returns (address); ::core::result::Result::Err(_) => ::core::option::Option::None, } } + /// Returns the enum variant name for the given selector, if known. #[inline] - pub fn name_by_selector( - selector: [u8; 4usize], - ) -> ::core::option::Option<&'static str> { + pub fn name_by_selector(selector: [u8; 4usize]) -> ::core::option::Option<&'static str> { let sig = Self::signature_by_selector(selector)?; sig.split_once('(').map(|(name, _)| name) } } #[automatically_derived] impl alloy_sol_types::SolInterface for BalancerQueriesCalls { - const NAME: &'static str = "BalancerQueriesCalls"; - const MIN_DATA_LENGTH: usize = 0usize; const COUNT: usize = 1usize; + const MIN_DATA_LENGTH: usize = 0usize; + const NAME: &'static str = "BalancerQueriesCalls"; + #[inline] fn selector(&self) -> [u8; 4] { match self { Self::vault(_) => ::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 vault( - data: &[u8], - ) -> alloy_sol_types::Result { + fn abi_decode_raw(selector: [u8; 4], data: &[u8]) -> alloy_sol_types::Result { + static DECODE_SHIMS: &[fn(&[u8]) -> alloy_sol_types::Result] = + &[{ + fn vault(data: &[u8]) -> alloy_sol_types::Result { ::abi_decode_raw(data) .map(BalancerQueriesCalls::vault) } vault - }, - ]; + }]; let Ok(idx) = Self::SELECTORS.binary_search(&selector) else { - return Err( - alloy_sol_types::Error::unknown_selector( - ::NAME, - selector, - ), - ); + return Err(alloy_sol_types::Error::unknown_selector( + ::NAME, + selector, + )); }; DECODE_SHIMS[idx](data) } + #[inline] #[allow(non_snake_case)] fn abi_decode_raw_validate( @@ -357,29 +346,23 @@ function vault() external view returns (address); ) -> alloy_sol_types::Result { static DECODE_VALIDATE_SHIMS: &[fn( &[u8], - ) -> alloy_sol_types::Result] = &[ - { - fn vault( - data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) - .map(BalancerQueriesCalls::vault) - } - vault - }, - ]; + ) + -> alloy_sol_types::Result] = &[{ + fn vault(data: &[u8]) -> alloy_sol_types::Result { + ::abi_decode_raw_validate(data) + .map(BalancerQueriesCalls::vault) + } + vault + }]; let Ok(idx) = Self::SELECTORS.binary_search(&selector) else { - return Err( - alloy_sol_types::Error::unknown_selector( - ::NAME, - selector, - ), - ); + return Err(alloy_sol_types::Error::unknown_selector( + ::NAME, + selector, + )); }; DECODE_VALIDATE_SHIMS[idx](data) } + #[inline] fn abi_encoded_size(&self) -> usize { match self { @@ -388,6 +371,7 @@ function vault() external view returns (address); } } } + #[inline] fn abi_encode_raw(&self, out: &mut alloy_sol_types::private::Vec) { match self { @@ -397,10 +381,10 @@ function vault() external view returns (address); } } } - use alloy_contract as alloy_contract; + use alloy_contract; /**Creates a new wrapper around an on-chain [`BalancerQueries`](self) contract instance. -See the [wrapper's documentation](`BalancerQueriesInstance`) for more details.*/ + See the [wrapper's documentation](`BalancerQueriesInstance`) for more details.*/ #[inline] pub const fn new< P: alloy_contract::private::Provider, @@ -413,15 +397,15 @@ See the [wrapper's documentation](`BalancerQueriesInstance`) for more details.*/ } /**A [`BalancerQueries`](self) instance. -Contains type-safe methods for interacting with an on-chain instance of the -[`BalancerQueries`](self) contract located at a given `address`, using a given -provider `P`. + Contains type-safe methods for interacting with an on-chain instance of the + [`BalancerQueries`](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. + 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.*/ + See the [module-level documentation](self) for all the available methods.*/ #[derive(Clone)] pub struct BalancerQueriesInstance { address: alloy_sol_types::private::Address, @@ -432,43 +416,45 @@ See the [module-level documentation](self) for all the available methods.*/ impl ::core::fmt::Debug for BalancerQueriesInstance { #[inline] fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { - f.debug_tuple("BalancerQueriesInstance").field(&self.address).finish() + f.debug_tuple("BalancerQueriesInstance") + .field(&self.address) + .finish() } } /// Instantiation and getters/setters. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > BalancerQueriesInstance { + impl, N: alloy_contract::private::Network> + BalancerQueriesInstance + { /**Creates a new wrapper around an on-chain [`BalancerQueries`](self) contract instance. -See the [wrapper's documentation](`BalancerQueriesInstance`) for more details.*/ + See the [wrapper's documentation](`BalancerQueriesInstance`) for more details.*/ #[inline] - pub const fn new( - address: alloy_sol_types::private::Address, - __provider: P, - ) -> Self { + pub const fn new(address: alloy_sol_types::private::Address, __provider: P) -> Self { Self { address, provider: __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 { @@ -476,7 +462,8 @@ See the [wrapper's documentation](`BalancerQueriesInstance`) for more details.*/ } } impl BalancerQueriesInstance<&P, N> { - /// Clones the provider and returns a new instance with the cloned provider. + /// Clones the provider and returns a new instance with the cloned + /// provider. #[inline] pub fn with_cloned_provider(self) -> BalancerQueriesInstance { BalancerQueriesInstance { @@ -487,34 +474,37 @@ See the [wrapper's documentation](`BalancerQueriesInstance`) for more details.*/ } } /// Function calls. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > BalancerQueriesInstance { - /// Creates a new call builder using this contract instance's provider and address. + impl, N: alloy_contract::private::Network> + BalancerQueriesInstance + { + /// 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. + /// 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 [`vault`] function. pub fn vault(&self) -> alloy_contract::SolCallBuilder<&P, vaultCall, N> { self.call_builder(&vaultCall) } } /// Event filters. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > BalancerQueriesInstance { - /// Creates a new event filter using this contract instance's provider and address. + impl, N: alloy_contract::private::Network> + BalancerQueriesInstance + { + /// 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. + /// 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> { @@ -522,73 +512,43 @@ See the [wrapper's documentation](`BalancerQueriesInstance`) for more details.*/ } } } -pub type Instance = BalancerQueries::BalancerQueriesInstance< - ::alloy_provider::DynProvider, ->; +pub type Instance = BalancerQueries::BalancerQueriesInstance<::alloy_provider::DynProvider>; use { - std::{sync::LazyLock, collections::HashMap}, - anyhow::{Result, Context}, - alloy_primitives::{address, Address}, - alloy_provider::{Provider, DynProvider}, + alloy_primitives::{Address, address}, + alloy_provider::{DynProvider, Provider}, + anyhow::{Context, Result}, + std::{collections::HashMap, sync::LazyLock}, }; pub const fn deployment_info(chain_id: u64) -> Option<(Address, Option)> { match chain_id { - 1u64 => { - Some(( - ::alloy_primitives::address!( - "0xE39B5e3B6D74016b2F6A9673D7d7493B6DF549d5" - ), - Some(15188261u64), - )) - } - 10u64 => { - Some(( - ::alloy_primitives::address!( - "0xE39B5e3B6D74016b2F6A9673D7d7493B6DF549d5" - ), - Some(15288107u64), - )) - } - 100u64 => { - Some(( - ::alloy_primitives::address!( - "0x0F3e0c4218b7b0108a3643cFe9D3ec0d4F57c54e" - ), - Some(24821845u64), - )) - } - 137u64 => { - Some(( - ::alloy_primitives::address!( - "0xE39B5e3B6D74016b2F6A9673D7d7493B6DF549d5" - ), - Some(30988035u64), - )) - } - 8453u64 => { - Some(( - ::alloy_primitives::address!( - "0x300Ab2038EAc391f26D9F895dc61F8F66a548833" - ), - Some(1205869u64), - )) - } - 42161u64 => { - Some(( - ::alloy_primitives::address!( - "0xE39B5e3B6D74016b2F6A9673D7d7493B6DF549d5" - ), - Some(18238624u64), - )) - } - 43114u64 => { - Some(( - ::alloy_primitives::address!( - "0xC128468b7Ce63eA702C1f104D55A2566b13D3ABD" - ), - Some(26387068u64), - )) - } + 1u64 => Some(( + ::alloy_primitives::address!("0xE39B5e3B6D74016b2F6A9673D7d7493B6DF549d5"), + Some(15188261u64), + )), + 10u64 => Some(( + ::alloy_primitives::address!("0xE39B5e3B6D74016b2F6A9673D7d7493B6DF549d5"), + Some(15288107u64), + )), + 100u64 => Some(( + ::alloy_primitives::address!("0x0F3e0c4218b7b0108a3643cFe9D3ec0d4F57c54e"), + Some(24821845u64), + )), + 137u64 => Some(( + ::alloy_primitives::address!("0xE39B5e3B6D74016b2F6A9673D7d7493B6DF549d5"), + Some(30988035u64), + )), + 8453u64 => Some(( + ::alloy_primitives::address!("0x300Ab2038EAc391f26D9F895dc61F8F66a548833"), + Some(1205869u64), + )), + 42161u64 => Some(( + ::alloy_primitives::address!("0xE39B5e3B6D74016b2F6A9673D7d7493B6DF549d5"), + Some(18238624u64), + )), + 43114u64 => Some(( + ::alloy_primitives::address!("0xC128468b7Ce63eA702C1f104D55A2566b13D3ABD"), + Some(26387068u64), + )), _ => None, } } @@ -605,9 +565,7 @@ pub const fn deployment_block(chain_id: &u64) -> Option { } } impl Instance { - pub fn deployed( - provider: &DynProvider, - ) -> impl Future> + Send { + pub fn deployed(provider: &DynProvider) -> impl Future> + Send { async move { let chain_id = provider .get_chain_id() diff --git a/contracts/generated/contracts-generated/balancerv2authorizer/src/lib.rs b/contracts/generated/contracts-generated/balancerv2authorizer/src/lib.rs index b46d55b228..e8c3ca7910 100644 --- a/contracts/generated/contracts-generated/balancerv2authorizer/src/lib.rs +++ b/contracts/generated/contracts-generated/balancerv2authorizer/src/lib.rs @@ -1,4 +1,10 @@ -#![allow(unused_imports, unused_attributes, clippy::all, rustdoc::all, non_snake_case)] +#![allow( + unused_imports, + unused_attributes, + clippy::all, + rustdoc::all, + non_snake_case +)] //! Auto-generated contract bindings. Do not edit. /** @@ -151,8 +157,7 @@ interface BalancerV2Authorizer { clippy::empty_structs_with_brackets )] pub mod BalancerV2Authorizer { - use super::*; - use alloy_sol_types as alloy_sol_types; + use {super::*, alloy_sol_types}; /// The creation / init bytecode of the contract. /// /// ```text @@ -165,9 +170,9 @@ pub mod BalancerV2Authorizer { ); #[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); -```*/ + ```solidity + event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole); + ```*/ #[allow( non_camel_case_types, non_snake_case, @@ -190,26 +195,27 @@ event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[automatically_derived] impl alloy_sol_types::SolEvent for RoleAdminChanged { + type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; 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; + 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, + ]); + #[allow(unused_variables)] #[inline] fn new( @@ -222,25 +228,26 @@ event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, 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, - ), - ); + 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 { ( @@ -250,6 +257,7 @@ event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, self.newAdminRole.clone(), ) } + #[inline] fn encode_topics_raw( &self, @@ -258,9 +266,7 @@ event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, if out.len() < ::COUNT { return Err(alloy_sol_types::Error::Overrun); } - out[0usize] = alloy_sol_types::abi::token::WordToken( - Self::SIGNATURE_HASH, - ); + out[0usize] = alloy_sol_types::abi::token::WordToken(Self::SIGNATURE_HASH); out[1usize] = as alloy_sol_types::EventTopic>::encode_topic(&self.role); @@ -278,6 +284,7 @@ event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, 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) } @@ -292,9 +299,9 @@ event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, }; #[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); -```*/ + ```solidity + event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender); + ```*/ #[allow( non_camel_case_types, non_snake_case, @@ -317,26 +324,27 @@ event RoleGranted(bytes32 indexed role, address indexed account, address indexed clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[automatically_derived] impl alloy_sol_types::SolEvent for RoleGranted { + type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; 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; + 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, + ]); + #[allow(unused_variables)] #[inline] fn new( @@ -349,25 +357,26 @@ event RoleGranted(bytes32 indexed role, address indexed account, address indexed 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, - ), - ); + 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 { ( @@ -377,6 +386,7 @@ event RoleGranted(bytes32 indexed role, address indexed account, address indexed self.sender.clone(), ) } + #[inline] fn encode_topics_raw( &self, @@ -385,9 +395,7 @@ event RoleGranted(bytes32 indexed role, address indexed account, address indexed if out.len() < ::COUNT { return Err(alloy_sol_types::Error::Overrun); } - out[0usize] = alloy_sol_types::abi::token::WordToken( - Self::SIGNATURE_HASH, - ); + out[0usize] = alloy_sol_types::abi::token::WordToken(Self::SIGNATURE_HASH); out[1usize] = as alloy_sol_types::EventTopic>::encode_topic(&self.role); @@ -405,6 +413,7 @@ event RoleGranted(bytes32 indexed role, address indexed account, address indexed 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) } @@ -419,9 +428,9 @@ event RoleGranted(bytes32 indexed role, address indexed account, address indexed }; #[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); -```*/ + ```solidity + event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender); + ```*/ #[allow( non_camel_case_types, non_snake_case, @@ -444,26 +453,27 @@ event RoleRevoked(bytes32 indexed role, address indexed account, address indexed clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[automatically_derived] impl alloy_sol_types::SolEvent for RoleRevoked { + type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; 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; + 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, + ]); + #[allow(unused_variables)] #[inline] fn new( @@ -476,25 +486,26 @@ event RoleRevoked(bytes32 indexed role, address indexed account, address indexed 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, - ), - ); + 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 { ( @@ -504,6 +515,7 @@ event RoleRevoked(bytes32 indexed role, address indexed account, address indexed self.sender.clone(), ) } + #[inline] fn encode_topics_raw( &self, @@ -512,9 +524,7 @@ event RoleRevoked(bytes32 indexed role, address indexed account, address indexed if out.len() < ::COUNT { return Err(alloy_sol_types::Error::Overrun); } - out[0usize] = alloy_sol_types::abi::token::WordToken( - Self::SIGNATURE_HASH, - ); + out[0usize] = alloy_sol_types::abi::token::WordToken(Self::SIGNATURE_HASH); out[1usize] = as alloy_sol_types::EventTopic>::encode_topic(&self.role); @@ -532,6 +542,7 @@ event RoleRevoked(bytes32 indexed role, address indexed account, address indexed 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) } @@ -545,9 +556,9 @@ event RoleRevoked(bytes32 indexed role, address indexed account, address indexed } }; /**Constructor`. -```solidity -constructor(address admin); -```*/ + ```solidity + constructor(address admin); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct constructorCall { @@ -555,7 +566,7 @@ constructor(address admin); pub admin: alloy_sol_types::private::Address, } const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -564,9 +575,7 @@ constructor(address admin); type UnderlyingRustTuple<'a> = (alloy_sol_types::private::Address,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -591,15 +600,15 @@ constructor(address admin); #[automatically_derived] impl alloy_sol_types::SolConstructor for constructorCall { type Parameters<'a> = (alloy_sol_types::sol_data::Address,); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + 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<'_> { ( @@ -612,9 +621,9 @@ constructor(address admin); }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `grantRole(bytes32,address)` and selector `0x2f2ff15d`. -```solidity -function grantRole(bytes32 role, address account) external; -```*/ + ```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 { @@ -623,7 +632,8 @@ function grantRole(bytes32 role, address account) external; #[allow(missing_docs)] pub account: alloy_sol_types::private::Address, } - ///Container type for the return parameters of the [`grantRole(bytes32,address)`](grantRoleCall) function. + ///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 {} @@ -634,7 +644,7 @@ function grantRole(bytes32 role, address account) external; clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -649,9 +659,7 @@ function grantRole(bytes32 role, address account) external; ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -684,9 +692,7 @@ function grantRole(bytes32 role, address account) external; type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -709,9 +715,7 @@ function grantRole(bytes32 role, address account) external; } } impl grantRoleReturn { - fn _tokenize( - &self, - ) -> ::ReturnToken<'_> { + fn _tokenize(&self) -> ::ReturnToken<'_> { () } } @@ -721,22 +725,21 @@ function grantRole(bytes32 role, address account) external; 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 ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "grantRole(bytes32,address)"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [47u8, 47u8, 241u8, 93u8]; + const SIGNATURE: &'static str = "grantRole(bytes32,address)"; + #[inline] fn new<'a>( tuple: as alloy_sol_types::SolType>::RustType, ) -> Self { tuple.into() } + #[inline] fn tokenize(&self) -> Self::Token<'_> { ( @@ -748,44 +751,42 @@ function grantRole(bytes32 role, address account) external; ), ) } + #[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) + 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) + 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(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `grantRoles(bytes32[],address)` and selector `0xfcd7627e`. -```solidity -function grantRoles(bytes32[] memory roles, address account) external; -```*/ + ```solidity + function grantRoles(bytes32[] memory roles, address account) external; + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct grantRolesCall { #[allow(missing_docs)] - pub roles: alloy_sol_types::private::Vec< - alloy_sol_types::private::FixedBytes<32>, - >, + pub roles: alloy_sol_types::private::Vec>, #[allow(missing_docs)] pub account: alloy_sol_types::private::Address, } - ///Container type for the return parameters of the [`grantRoles(bytes32[],address)`](grantRolesCall) function. + ///Container type for the return parameters of the + /// [`grantRoles(bytes32[],address)`](grantRolesCall) function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct grantRolesReturn {} @@ -796,14 +797,12 @@ function grantRoles(bytes32[] memory roles, address account) external; clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] type UnderlyingSolTuple<'a> = ( - alloy_sol_types::sol_data::Array< - alloy_sol_types::sol_data::FixedBytes<32>, - >, + alloy_sol_types::sol_data::Array>, alloy_sol_types::sol_data::Address, ); #[doc(hidden)] @@ -813,9 +812,7 @@ function grantRoles(bytes32[] memory roles, address account) external; ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -848,9 +845,7 @@ function grantRoles(bytes32[] memory roles, address account) external; type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -873,36 +868,31 @@ function grantRoles(bytes32[] memory roles, address account) external; } } impl grantRolesReturn { - fn _tokenize( - &self, - ) -> ::ReturnToken<'_> { + fn _tokenize(&self) -> ::ReturnToken<'_> { () } } #[automatically_derived] impl alloy_sol_types::SolCall for grantRolesCall { type Parameters<'a> = ( - alloy_sol_types::sol_data::Array< - alloy_sol_types::sol_data::FixedBytes<32>, - >, + alloy_sol_types::sol_data::Array>, alloy_sol_types::sol_data::Address, ); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = grantRolesReturn; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "grantRoles(bytes32[],address)"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [252u8, 215u8, 98u8, 126u8]; + const SIGNATURE: &'static str = "grantRoles(bytes32[],address)"; + #[inline] fn new<'a>( tuple: as alloy_sol_types::SolType>::RustType, ) -> Self { tuple.into() } + #[inline] fn tokenize(&self) -> Self::Token<'_> { ( @@ -914,31 +904,29 @@ function grantRoles(bytes32[] memory roles, address account) external; ), ) } + #[inline] fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { grantRolesReturn::_tokenize(ret) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) + 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) + 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 [`BalancerV2Authorizer`](self) function calls. #[derive(Clone)] - #[derive()] pub enum BalancerV2AuthorizerCalls { #[allow(missing_docs)] grantRole(grantRoleCall), @@ -948,24 +936,24 @@ function grantRoles(bytes32[] memory roles, address account) external; impl BalancerV2AuthorizerCalls { /// 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. + /// 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]] = &[ - [47u8, 47u8, 241u8, 93u8], - [252u8, 215u8, 98u8, 126u8], + pub const SELECTORS: &'static [[u8; 4usize]] = + &[[47u8, 47u8, 241u8, 93u8], [252u8, 215u8, 98u8, 126u8]]; + /// The signatures in the same order as `SELECTORS`. + pub const SIGNATURES: &'static [&'static str] = &[ + ::SIGNATURE, + ::SIGNATURE, ]; /// The names of the variants in the same order as `SELECTORS`. pub const VARIANT_NAMES: &'static [&'static str] = &[ ::core::stringify!(grantRole), ::core::stringify!(grantRoles), ]; - /// The signatures in the same order as `SELECTORS`. - pub const SIGNATURES: &'static [&'static str] = &[ - ::SIGNATURE, - ::SIGNATURE, - ]; + /// Returns the signature for the given selector, if known. #[inline] pub fn signature_by_selector( @@ -978,48 +966,45 @@ function grantRoles(bytes32[] memory roles, address account) external; ::core::result::Result::Err(_) => ::core::option::Option::None, } } + /// Returns the enum variant name for the given selector, if known. #[inline] - pub fn name_by_selector( - selector: [u8; 4usize], - ) -> ::core::option::Option<&'static str> { + pub fn name_by_selector(selector: [u8; 4usize]) -> ::core::option::Option<&'static str> { let sig = Self::signature_by_selector(selector)?; sig.split_once('(').map(|(name, _)| name) } } #[automatically_derived] impl alloy_sol_types::SolInterface for BalancerV2AuthorizerCalls { - const NAME: &'static str = "BalancerV2AuthorizerCalls"; - const MIN_DATA_LENGTH: usize = 64usize; const COUNT: usize = 2usize; + const MIN_DATA_LENGTH: usize = 64usize; + const NAME: &'static str = "BalancerV2AuthorizerCalls"; + #[inline] fn selector(&self) -> [u8; 4] { match self { - Self::grantRole(_) => { - ::SELECTOR - } - Self::grantRoles(_) => { - ::SELECTOR - } + Self::grantRole(_) => ::SELECTOR, + Self::grantRoles(_) => ::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 { + fn abi_decode_raw(selector: [u8; 4], data: &[u8]) -> alloy_sol_types::Result { static DECODE_SHIMS: &[fn( &[u8], - ) -> alloy_sol_types::Result] = &[ + ) + -> alloy_sol_types::Result] = &[ { fn grantRole( data: &[u8], @@ -1033,24 +1018,21 @@ function grantRoles(bytes32[] memory roles, address account) external; fn grantRoles( data: &[u8], ) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, - ) + ::abi_decode_raw(data) .map(BalancerV2AuthorizerCalls::grantRoles) } grantRoles }, ]; let Ok(idx) = Self::SELECTORS.binary_search(&selector) else { - return Err( - alloy_sol_types::Error::unknown_selector( - ::NAME, - selector, - ), - ); + return Err(alloy_sol_types::Error::unknown_selector( + ::NAME, + selector, + )); }; DECODE_SHIMS[idx](data) } + #[inline] #[allow(non_snake_case)] fn abi_decode_raw_validate( @@ -1059,14 +1041,14 @@ function grantRoles(bytes32[] memory roles, address account) external; ) -> alloy_sol_types::Result { static DECODE_VALIDATE_SHIMS: &[fn( &[u8], - ) -> alloy_sol_types::Result] = &[ + ) -> alloy_sol_types::Result< + BalancerV2AuthorizerCalls, + >] = &[ { fn grantRole( data: &[u8], ) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) + ::abi_decode_raw_validate(data) .map(BalancerV2AuthorizerCalls::grantRole) } grantRole @@ -1075,24 +1057,21 @@ function grantRoles(bytes32[] memory roles, address account) external; fn grantRoles( data: &[u8], ) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) + ::abi_decode_raw_validate(data) .map(BalancerV2AuthorizerCalls::grantRoles) } grantRoles }, ]; let Ok(idx) = Self::SELECTORS.binary_search(&selector) else { - return Err( - alloy_sol_types::Error::unknown_selector( - ::NAME, - selector, - ), - ); + return Err(alloy_sol_types::Error::unknown_selector( + ::NAME, + selector, + )); }; DECODE_VALIDATE_SHIMS[idx](data) } + #[inline] fn abi_encoded_size(&self) -> usize { match self { @@ -1104,27 +1083,21 @@ function grantRoles(bytes32[] memory roles, address account) external; } } } + #[inline] fn abi_encode_raw(&self, out: &mut alloy_sol_types::private::Vec) { match self { Self::grantRole(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } Self::grantRoles(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } } } } ///Container for all the [`BalancerV2Authorizer`](self) events. - #[derive(Clone)] - #[derive(Debug, PartialEq, Eq, Hash)] + #[derive(Clone, Debug, PartialEq, Eq, Hash)] pub enum BalancerV2AuthorizerEvents { #[allow(missing_docs)] RoleAdminChanged(RoleAdminChanged), @@ -1136,39 +1109,41 @@ function grantRoles(bytes32[] memory roles, address account) external; impl BalancerV2AuthorizerEvents { /// 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. + /// 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, + 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, ], [ - 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, + 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, + 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, ], ]; - /// The names of the variants in the same order as `SELECTORS`. - pub const VARIANT_NAMES: &'static [&'static str] = &[ - ::core::stringify!(RoleGranted), - ::core::stringify!(RoleAdminChanged), - ::core::stringify!(RoleRevoked), - ]; /// The signatures in the same order as `SELECTORS`. pub const SIGNATURES: &'static [&'static str] = &[ ::SIGNATURE, ::SIGNATURE, ::SIGNATURE, ]; + /// The names of the variants in the same order as `SELECTORS`. + pub const VARIANT_NAMES: &'static [&'static str] = &[ + ::core::stringify!(RoleGranted), + ::core::stringify!(RoleAdminChanged), + ::core::stringify!(RoleRevoked), + ]; + /// Returns the signature for the given selector, if known. #[inline] pub fn signature_by_selector( @@ -1181,56 +1156,45 @@ function grantRoles(bytes32[] memory roles, address account) external; ::core::result::Result::Err(_) => ::core::option::Option::None, } } + /// Returns the enum variant name for the given selector, if known. #[inline] - pub fn name_by_selector( - selector: [u8; 32usize], - ) -> ::core::option::Option<&'static str> { + pub fn name_by_selector(selector: [u8; 32usize]) -> ::core::option::Option<&'static str> { let sig = Self::signature_by_selector(selector)?; sig.split_once('(').map(|(name, _)| name) } } #[automatically_derived] impl alloy_sol_types::SolEventInterface for BalancerV2AuthorizerEvents { - const NAME: &'static str = "BalancerV2AuthorizerEvents"; const COUNT: usize = 3usize; + const NAME: &'static str = "BalancerV2AuthorizerEvents"; + 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, - ) + ::decode_raw_log(topics, data) .map(Self::RoleAdminChanged) } Some(::SIGNATURE_HASH) => { - ::decode_raw_log( - topics, - data, - ) + ::decode_raw_log(topics, data) .map(Self::RoleGranted) } Some(::SIGNATURE_HASH) => { - ::decode_raw_log( - topics, - data, - ) + ::decode_raw_log(topics, data) .map(Self::RoleRevoked) } - _ => { - 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(), - ), + _ => 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(), ), - }) - } + ), + }), } } } @@ -1249,6 +1213,7 @@ function grantRoles(bytes32[] memory roles, address account) external; } } } + fn into_log_data(self) -> alloy_sol_types::private::LogData { match self { Self::RoleAdminChanged(inner) => { @@ -1263,10 +1228,10 @@ function grantRoles(bytes32[] memory roles, address account) external; } } } - use alloy_contract as alloy_contract; + use alloy_contract; /**Creates a new wrapper around an on-chain [`BalancerV2Authorizer`](self) contract instance. -See the [wrapper's documentation](`BalancerV2AuthorizerInstance`) for more details.*/ + See the [wrapper's documentation](`BalancerV2AuthorizerInstance`) for more details.*/ #[inline] pub const fn new< P: alloy_contract::private::Provider, @@ -1279,26 +1244,22 @@ See the [wrapper's documentation](`BalancerV2AuthorizerInstance`) for more detai } /**Deploys this contract using the given `provider` and constructor arguments, if any. -Returns a new instance of the contract, if the deployment was successful. + 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.*/ + 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, - >( + pub fn deploy, N: alloy_contract::private::Network>( __provider: P, admin: alloy_sol_types::private::Address, - ) -> impl ::core::future::Future< - Output = alloy_contract::Result>, - > { + ) -> impl ::core::future::Future>> + { BalancerV2AuthorizerInstance::::deploy(__provider, admin) } /**Creates a `RawCallBuilder` for deploying this contract using the given `provider` -and constructor arguments, if any. + 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.*/ + 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, @@ -1311,15 +1272,15 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ } /**A [`BalancerV2Authorizer`](self) instance. -Contains type-safe methods for interacting with an on-chain instance of the -[`BalancerV2Authorizer`](self) contract located at a given `address`, using a given -provider `P`. + Contains type-safe methods for interacting with an on-chain instance of the + [`BalancerV2Authorizer`](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. + 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.*/ + See the [module-level documentation](self) for all the available methods.*/ #[derive(Clone)] pub struct BalancerV2AuthorizerInstance { address: alloy_sol_types::private::Address, @@ -1330,33 +1291,32 @@ See the [module-level documentation](self) for all the available methods.*/ impl ::core::fmt::Debug for BalancerV2AuthorizerInstance { #[inline] fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { - f.debug_tuple("BalancerV2AuthorizerInstance").field(&self.address).finish() + f.debug_tuple("BalancerV2AuthorizerInstance") + .field(&self.address) + .finish() } } /// Instantiation and getters/setters. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > BalancerV2AuthorizerInstance { + impl, N: alloy_contract::private::Network> + BalancerV2AuthorizerInstance + { /**Creates a new wrapper around an on-chain [`BalancerV2Authorizer`](self) contract instance. -See the [wrapper's documentation](`BalancerV2AuthorizerInstance`) for more details.*/ + See the [wrapper's documentation](`BalancerV2AuthorizerInstance`) for more details.*/ #[inline] - pub const fn new( - address: alloy_sol_types::private::Address, - __provider: P, - ) -> Self { + pub const fn new(address: alloy_sol_types::private::Address, __provider: P) -> Self { Self { address, provider: __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. + 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.*/ + For more fine-grained control over the deployment process, use [`deploy_builder`] instead.*/ #[inline] pub async fn deploy( __provider: P, @@ -1366,11 +1326,12 @@ For more fine-grained control over the deployment process, use [`deploy_builder` 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. + 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.*/ + 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, @@ -1380,29 +1341,31 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ __provider, [ &BYTECODE[..], - &alloy_sol_types::SolConstructor::abi_encode( - &constructorCall { admin }, - )[..], + &alloy_sol_types::SolConstructor::abi_encode(&constructorCall { admin })[..], ] - .concat() - .into(), + .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 { @@ -1410,7 +1373,8 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ } } impl BalancerV2AuthorizerInstance<&P, N> { - /// Clones the provider and returns a new instance with the cloned provider. + /// Clones the provider and returns a new instance with the cloned + /// provider. #[inline] pub fn with_cloned_provider(self) -> BalancerV2AuthorizerInstance { BalancerV2AuthorizerInstance { @@ -1421,20 +1385,22 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ } } /// Function calls. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > BalancerV2AuthorizerInstance { - /// Creates a new call builder using this contract instance's provider and address. + impl, N: alloy_contract::private::Network> + BalancerV2AuthorizerInstance + { + /// 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. + /// 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 [`grantRole`] function. pub fn grantRole( &self, @@ -1443,47 +1409,47 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ ) -> alloy_contract::SolCallBuilder<&P, grantRoleCall, N> { self.call_builder(&grantRoleCall { role, account }) } + ///Creates a new call builder for the [`grantRoles`] function. pub fn grantRoles( &self, - roles: alloy_sol_types::private::Vec< - alloy_sol_types::private::FixedBytes<32>, - >, + roles: alloy_sol_types::private::Vec>, account: alloy_sol_types::private::Address, ) -> alloy_contract::SolCallBuilder<&P, grantRolesCall, N> { self.call_builder(&grantRolesCall { roles, account }) } } /// Event filters. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > BalancerV2AuthorizerInstance { - /// Creates a new event filter using this contract instance's provider and address. + impl, N: alloy_contract::private::Network> + BalancerV2AuthorizerInstance + { + /// 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. + /// 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 [`RoleAdminChanged`] event. - pub fn RoleAdminChanged_filter( - &self, - ) -> alloy_contract::Event<&P, RoleAdminChanged, N> { + 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::() } } } -pub type Instance = BalancerV2Authorizer::BalancerV2AuthorizerInstance< - ::alloy_provider::DynProvider, ->; +pub type Instance = + BalancerV2Authorizer::BalancerV2AuthorizerInstance<::alloy_provider::DynProvider>; diff --git a/contracts/generated/contracts-generated/balancerv2basepool/src/lib.rs b/contracts/generated/contracts-generated/balancerv2basepool/src/lib.rs index b981836460..fa557b1b9f 100644 --- a/contracts/generated/contracts-generated/balancerv2basepool/src/lib.rs +++ b/contracts/generated/contracts-generated/balancerv2basepool/src/lib.rs @@ -1,4 +1,10 @@ -#![allow(unused_imports, unused_attributes, clippy::all, rustdoc::all, non_snake_case)] +#![allow( + unused_imports, + unused_attributes, + clippy::all, + rustdoc::all, + non_snake_case +)] //! Auto-generated contract bindings. Do not edit. /** @@ -399,13 +405,12 @@ interface BalancerV2BasePool { clippy::empty_structs_with_brackets )] pub mod BalancerV2BasePool { - use super::*; - use alloy_sol_types as alloy_sol_types; + use {super::*, alloy_sol_types}; #[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); -```*/ + ```solidity + event Approval(address indexed owner, address indexed spender, uint256 value); + ```*/ #[allow( non_camel_case_types, non_snake_case, @@ -428,25 +433,26 @@ event Approval(address indexed owner, address indexed spender, uint256 value); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[automatically_derived] impl alloy_sol_types::SolEvent for Approval { + type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; 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; + 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, + ]); + #[allow(unused_variables)] #[inline] fn new( @@ -459,33 +465,39 @@ event Approval(address indexed owner, address indexed spender, uint256 value); 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, - ), - ); + 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), + as alloy_sol_types::SolType>::tokenize( + &self.value, + ), ) } + #[inline] fn topics(&self) -> ::RustType { - (Self::SIGNATURE_HASH.into(), self.owner.clone(), self.spender.clone()) + ( + Self::SIGNATURE_HASH.into(), + self.owner.clone(), + self.spender.clone(), + ) } + #[inline] fn encode_topics_raw( &self, @@ -494,9 +506,7 @@ event Approval(address indexed owner, address indexed spender, uint256 value); if out.len() < ::COUNT { return Err(alloy_sol_types::Error::Overrun); } - out[0usize] = alloy_sol_types::abi::token::WordToken( - Self::SIGNATURE_HASH, - ); + out[0usize] = alloy_sol_types::abi::token::WordToken(Self::SIGNATURE_HASH); out[1usize] = ::encode_topic( &self.owner, ); @@ -511,6 +521,7 @@ event Approval(address indexed owner, address indexed spender, uint256 value); 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) } @@ -525,9 +536,9 @@ event Approval(address indexed owner, address indexed spender, uint256 value); }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Event with signature `PausedStateChanged(bool)` and selector `0x9e3a5e37224532dea67b89face185703738a228a6e8a23dee546960180d3be64`. -```solidity -event PausedStateChanged(bool paused); -```*/ + ```solidity + event PausedStateChanged(bool paused); + ```*/ #[allow( non_camel_case_types, non_snake_case, @@ -546,21 +557,22 @@ event PausedStateChanged(bool paused); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[automatically_derived] impl alloy_sol_types::SolEvent for PausedStateChanged { + type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type DataTuple<'a> = (alloy_sol_types::sol_data::Bool,); - type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type TopicList = (alloy_sol_types::sol_data::FixedBytes<32>,); - const SIGNATURE: &'static str = "PausedStateChanged(bool)"; - const SIGNATURE_HASH: alloy_sol_types::private::B256 = alloy_sol_types::private::B256::new([ - 158u8, 58u8, 94u8, 55u8, 34u8, 69u8, 50u8, 222u8, 166u8, 123u8, 137u8, - 250u8, 206u8, 24u8, 87u8, 3u8, 115u8, 138u8, 34u8, 138u8, 110u8, 138u8, - 35u8, 222u8, 229u8, 70u8, 150u8, 1u8, 128u8, 211u8, 190u8, 100u8, - ]); + const ANONYMOUS: bool = false; + const SIGNATURE: &'static str = "PausedStateChanged(bool)"; + const SIGNATURE_HASH: alloy_sol_types::private::B256 = + alloy_sol_types::private::B256::new([ + 158u8, 58u8, 94u8, 55u8, 34u8, 69u8, 50u8, 222u8, 166u8, 123u8, 137u8, 250u8, + 206u8, 24u8, 87u8, 3u8, 115u8, 138u8, 34u8, 138u8, 110u8, 138u8, 35u8, 222u8, + 229u8, 70u8, 150u8, 1u8, 128u8, 211u8, 190u8, 100u8, + ]); + #[allow(unused_variables)] #[inline] fn new( @@ -569,21 +581,21 @@ event PausedStateChanged(bool paused); ) -> Self { Self { paused: 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, - ), - ); + 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<'_> { ( @@ -592,10 +604,12 @@ event PausedStateChanged(bool paused); ), ) } + #[inline] fn topics(&self) -> ::RustType { (Self::SIGNATURE_HASH.into(),) } + #[inline] fn encode_topics_raw( &self, @@ -604,9 +618,7 @@ event PausedStateChanged(bool paused); if out.len() < ::COUNT { return Err(alloy_sol_types::Error::Overrun); } - out[0usize] = alloy_sol_types::abi::token::WordToken( - Self::SIGNATURE_HASH, - ); + out[0usize] = alloy_sol_types::abi::token::WordToken(Self::SIGNATURE_HASH); Ok(()) } } @@ -615,6 +627,7 @@ event PausedStateChanged(bool 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) } @@ -629,9 +642,9 @@ event PausedStateChanged(bool paused); }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Event with signature `SwapFeePercentageChanged(uint256)` and selector `0xa9ba3ffe0b6c366b81232caab38605a0699ad5398d6cce76f91ee809e322dafc`. -```solidity -event SwapFeePercentageChanged(uint256 swapFeePercentage); -```*/ + ```solidity + event SwapFeePercentageChanged(uint256 swapFeePercentage); + ```*/ #[allow( non_camel_case_types, non_snake_case, @@ -650,56 +663,61 @@ event SwapFeePercentageChanged(uint256 swapFeePercentage); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[automatically_derived] impl alloy_sol_types::SolEvent for SwapFeePercentageChanged { + type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; 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>,); - const SIGNATURE: &'static str = "SwapFeePercentageChanged(uint256)"; - const SIGNATURE_HASH: alloy_sol_types::private::B256 = alloy_sol_types::private::B256::new([ - 169u8, 186u8, 63u8, 254u8, 11u8, 108u8, 54u8, 107u8, 129u8, 35u8, 44u8, - 170u8, 179u8, 134u8, 5u8, 160u8, 105u8, 154u8, 213u8, 57u8, 141u8, 108u8, - 206u8, 118u8, 249u8, 30u8, 232u8, 9u8, 227u8, 34u8, 218u8, 252u8, - ]); + const ANONYMOUS: bool = false; + const SIGNATURE: &'static str = "SwapFeePercentageChanged(uint256)"; + const SIGNATURE_HASH: alloy_sol_types::private::B256 = + alloy_sol_types::private::B256::new([ + 169u8, 186u8, 63u8, 254u8, 11u8, 108u8, 54u8, 107u8, 129u8, 35u8, 44u8, 170u8, + 179u8, 134u8, 5u8, 160u8, 105u8, 154u8, 213u8, 57u8, 141u8, 108u8, 206u8, + 118u8, 249u8, 30u8, 232u8, 9u8, 227u8, 34u8, 218u8, 252u8, + ]); + #[allow(unused_variables)] #[inline] fn new( topics: ::RustType, data: as alloy_sol_types::SolType>::RustType, ) -> Self { - Self { swapFeePercentage: data.0 } + Self { + swapFeePercentage: 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, - ), - ); + 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.swapFeePercentage), + as alloy_sol_types::SolType>::tokenize( + &self.swapFeePercentage, + ), ) } + #[inline] fn topics(&self) -> ::RustType { (Self::SIGNATURE_HASH.into(),) } + #[inline] fn encode_topics_raw( &self, @@ -708,9 +726,7 @@ event SwapFeePercentageChanged(uint256 swapFeePercentage); if out.len() < ::COUNT { return Err(alloy_sol_types::Error::Overrun); } - out[0usize] = alloy_sol_types::abi::token::WordToken( - Self::SIGNATURE_HASH, - ); + out[0usize] = alloy_sol_types::abi::token::WordToken(Self::SIGNATURE_HASH); Ok(()) } } @@ -719,6 +735,7 @@ event SwapFeePercentageChanged(uint256 swapFeePercentage); 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) } @@ -726,18 +743,16 @@ event SwapFeePercentageChanged(uint256 swapFeePercentage); #[automatically_derived] impl From<&SwapFeePercentageChanged> for alloy_sol_types::private::LogData { #[inline] - fn from( - this: &SwapFeePercentageChanged, - ) -> alloy_sol_types::private::LogData { + fn from(this: &SwapFeePercentageChanged) -> alloy_sol_types::private::LogData { alloy_sol_types::SolEvent::encode_log_data(this) } } }; #[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); -```*/ + ```solidity + event Transfer(address indexed from, address indexed to, uint256 value); + ```*/ #[allow( non_camel_case_types, non_snake_case, @@ -760,25 +775,26 @@ event Transfer(address indexed from, address indexed to, uint256 value); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[automatically_derived] impl alloy_sol_types::SolEvent for Transfer { + type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; 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; + 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, + ]); + #[allow(unused_variables)] #[inline] fn new( @@ -791,33 +807,39 @@ event Transfer(address indexed from, address indexed to, uint256 value); 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, - ), - ); + 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), + as alloy_sol_types::SolType>::tokenize( + &self.value, + ), ) } + #[inline] fn topics(&self) -> ::RustType { - (Self::SIGNATURE_HASH.into(), self.from.clone(), self.to.clone()) + ( + Self::SIGNATURE_HASH.into(), + self.from.clone(), + self.to.clone(), + ) } + #[inline] fn encode_topics_raw( &self, @@ -826,9 +848,7 @@ event Transfer(address indexed from, address indexed to, uint256 value); if out.len() < ::COUNT { return Err(alloy_sol_types::Error::Overrun); } - out[0usize] = alloy_sol_types::abi::token::WordToken( - Self::SIGNATURE_HASH, - ); + out[0usize] = alloy_sol_types::abi::token::WordToken(Self::SIGNATURE_HASH); out[1usize] = ::encode_topic( &self.from, ); @@ -843,6 +863,7 @@ event Transfer(address indexed from, address indexed to, uint256 value); 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) } @@ -857,14 +878,15 @@ event Transfer(address indexed from, address indexed to, uint256 value); }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `DOMAIN_SEPARATOR()` and selector `0x3644e515`. -```solidity -function DOMAIN_SEPARATOR() external view returns (bytes32); -```*/ + ```solidity + function DOMAIN_SEPARATOR() external view returns (bytes32); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct DOMAIN_SEPARATORCall; #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`DOMAIN_SEPARATOR()`](DOMAIN_SEPARATORCall) function. + ///Container type for the return parameters of the + /// [`DOMAIN_SEPARATOR()`](DOMAIN_SEPARATORCall) function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct DOMAIN_SEPARATORReturn { @@ -878,7 +900,7 @@ function DOMAIN_SEPARATOR() external view returns (bytes32); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -887,9 +909,7 @@ function DOMAIN_SEPARATOR() external view returns (bytes32); type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -898,16 +918,14 @@ function DOMAIN_SEPARATOR() external view returns (bytes32); } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From - for UnderlyingRustTuple<'_> { + impl ::core::convert::From for UnderlyingRustTuple<'_> { fn from(value: DOMAIN_SEPARATORCall) -> Self { () } } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From> - for DOMAIN_SEPARATORCall { + impl ::core::convert::From> for DOMAIN_SEPARATORCall { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { Self } @@ -921,9 +939,7 @@ function DOMAIN_SEPARATOR() external view returns (bytes32); 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, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -932,16 +948,14 @@ function DOMAIN_SEPARATOR() external view returns (bytes32); } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From - for UnderlyingRustTuple<'_> { + impl ::core::convert::From for UnderlyingRustTuple<'_> { fn from(value: DOMAIN_SEPARATORReturn) -> Self { (value._0,) } } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From> - for DOMAIN_SEPARATORReturn { + impl ::core::convert::From> for DOMAIN_SEPARATORReturn { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { Self { _0: tuple.0 } } @@ -950,26 +964,26 @@ function DOMAIN_SEPARATOR() external view returns (bytes32); #[automatically_derived] impl alloy_sol_types::SolCall for DOMAIN_SEPARATORCall { type Parameters<'a> = (); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = alloy_sol_types::private::FixedBytes<32>; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (alloy_sol_types::sol_data::FixedBytes<32>,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "DOMAIN_SEPARATOR()"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [54u8, 68u8, 229u8, 21u8]; + const SIGNATURE: &'static str = "DOMAIN_SEPARATOR()"; + #[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<'_> { ( @@ -978,35 +992,34 @@ function DOMAIN_SEPARATOR() external view returns (bytes32); > 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| { + as alloy_sol_types::SolType>::abi_decode_sequence(data).map( + |r| { let r: DOMAIN_SEPARATORReturn = 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: DOMAIN_SEPARATORReturn = r.into(); - r._0 - }) + 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: DOMAIN_SEPARATORReturn = r.into(); + r._0 + }) } } }; #[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); -```*/ + ```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 { @@ -1016,7 +1029,8 @@ function allowance(address owner, address spender) external view returns (uint25 pub spender: alloy_sol_types::private::Address, } #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`allowance(address,address)`](allowanceCall) function. + ///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 { @@ -1030,7 +1044,7 @@ function allowance(address owner, address spender) external view returns (uint25 clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -1045,9 +1059,7 @@ function allowance(address owner, address spender) external view returns (uint25 ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1077,14 +1089,10 @@ function allowance(address owner, address spender) external view returns (uint25 #[allow(dead_code)] type UnderlyingSolTuple<'a> = (alloy_sol_types::sol_data::Uint<256>,); #[doc(hidden)] - type UnderlyingRustTuple<'a> = ( - alloy_sol_types::private::primitives::aliases::U256, - ); + 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, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1112,22 +1120,21 @@ function allowance(address owner, address spender) external view returns (uint25 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 ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; 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)"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [221u8, 98u8, 237u8, 62u8]; + const SIGNATURE: &'static str = "allowance(address,address)"; + #[inline] fn new<'a>( tuple: as alloy_sol_types::SolType>::RustType, ) -> Self { tuple.into() } + #[inline] fn tokenize(&self) -> Self::Token<'_> { ( @@ -1139,43 +1146,43 @@ function allowance(address owner, address spender) external view returns (uint25 ), ) } + #[inline] fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { ( - as alloy_sol_types::SolType>::tokenize(ret), + 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| { + 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 - }) + 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(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `approve(address,uint256)` and selector `0x095ea7b3`. -```solidity -function approve(address spender, uint256 amount) external returns (bool); -```*/ + ```solidity + function approve(address spender, uint256 amount) external returns (bool); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct approveCall { @@ -1185,7 +1192,8 @@ function approve(address spender, uint256 amount) external returns (bool); pub amount: alloy_sol_types::private::primitives::aliases::U256, } #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`approve(address,uint256)`](approveCall) function. + ///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 { @@ -1199,7 +1207,7 @@ function approve(address spender, uint256 amount) external returns (bool); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -1214,9 +1222,7 @@ function approve(address spender, uint256 amount) external returns (bool); ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1249,9 +1255,7 @@ function approve(address spender, uint256 amount) external returns (bool); type UnderlyingRustTuple<'a> = (bool,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1279,70 +1283,65 @@ function approve(address spender, uint256 amount) external returns (bool); 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 ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; 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)"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [9u8, 94u8, 167u8, 179u8]; + const SIGNATURE: &'static str = "approve(address,uint256)"; + #[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.amount), + as alloy_sol_types::SolType>::tokenize( + &self.amount, + ), ) } + #[inline] fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { - ( - ::tokenize( - ret, - ), - ) + (::tokenize(ret),) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) - .map(|r| { + 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 - }) + 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(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `balanceOf(address)` and selector `0x70a08231`. -```solidity -function balanceOf(address account) external view returns (uint256); -```*/ + ```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 { @@ -1350,7 +1349,8 @@ function balanceOf(address account) external view returns (uint256); pub account: alloy_sol_types::private::Address, } #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`balanceOf(address)`](balanceOfCall) function. + ///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 { @@ -1364,7 +1364,7 @@ function balanceOf(address account) external view returns (uint256); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -1373,9 +1373,7 @@ function balanceOf(address account) external view returns (uint256); type UnderlyingRustTuple<'a> = (alloy_sol_types::private::Address,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1402,14 +1400,10 @@ function balanceOf(address account) external view returns (uint256); #[allow(dead_code)] type UnderlyingSolTuple<'a> = (alloy_sol_types::sol_data::Uint<256>,); #[doc(hidden)] - type UnderlyingRustTuple<'a> = ( - alloy_sol_types::private::primitives::aliases::U256, - ); + 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, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1434,22 +1428,21 @@ function balanceOf(address account) external view returns (uint256); #[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 ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; 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)"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [112u8, 160u8, 130u8, 49u8]; + const SIGNATURE: &'static str = "balanceOf(address)"; + #[inline] fn new<'a>( tuple: as alloy_sol_types::SolType>::RustType, ) -> Self { tuple.into() } + #[inline] fn tokenize(&self) -> Self::Token<'_> { ( @@ -1458,48 +1451,49 @@ function balanceOf(address account) external view returns (uint256); ), ) } + #[inline] fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { ( - as alloy_sol_types::SolType>::tokenize(ret), + 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| { + 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 - }) + 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(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `decimals()` and selector `0x313ce567`. -```solidity -function decimals() external pure returns (uint8); -```*/ + ```solidity + function decimals() external pure returns (uint8); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct decimalsCall; #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`decimals()`](decimalsCall) function. + ///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 { @@ -1513,7 +1507,7 @@ function decimals() external pure returns (uint8); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -1522,9 +1516,7 @@ function decimals() external pure returns (uint8); type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1554,9 +1546,7 @@ function decimals() external pure returns (uint8); type UnderlyingRustTuple<'a> = (u8,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1581,68 +1571,64 @@ function decimals() external pure returns (uint8); #[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 ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; 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()"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [49u8, 60u8, 229u8, 103u8]; + const SIGNATURE: &'static str = "decimals()"; + #[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), - ) + ( 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| { + 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 - }) + 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(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `getPausedState()` and selector `0x1c0de051`. -```solidity -function getPausedState() external view returns (bool paused, uint256 pauseWindowEndTime, uint256 bufferPeriodEndTime); -```*/ + ```solidity + function getPausedState() external view returns (bool paused, uint256 pauseWindowEndTime, uint256 bufferPeriodEndTime); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct getPausedStateCall; #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`getPausedState()`](getPausedStateCall) function. + ///Container type for the return parameters of the + /// [`getPausedState()`](getPausedStateCall) function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct getPausedStateReturn { @@ -1660,7 +1646,7 @@ function getPausedState() external view returns (bool paused, uint256 pauseWindo clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -1669,9 +1655,7 @@ function getPausedState() external view returns (bool paused, uint256 pauseWindo type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1709,9 +1693,7 @@ function getPausedState() external view returns (bool paused, uint256 pauseWindo ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1720,16 +1702,18 @@ function getPausedState() external view returns (bool paused, uint256 pauseWindo } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From - for UnderlyingRustTuple<'_> { + impl ::core::convert::From for UnderlyingRustTuple<'_> { fn from(value: getPausedStateReturn) -> Self { - (value.paused, value.pauseWindowEndTime, value.bufferPeriodEndTime) + ( + value.paused, + value.pauseWindowEndTime, + value.bufferPeriodEndTime, + ) } } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From> - for getPausedStateReturn { + impl ::core::convert::From> for getPausedStateReturn { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { Self { paused: tuple.0, @@ -1747,74 +1731,73 @@ function getPausedState() external view returns (bool paused, uint256 pauseWindo ::tokenize( &self.paused, ), - as alloy_sol_types::SolType>::tokenize(&self.pauseWindowEndTime), - as alloy_sol_types::SolType>::tokenize(&self.bufferPeriodEndTime), + as alloy_sol_types::SolType>::tokenize( + &self.pauseWindowEndTime, + ), + as alloy_sol_types::SolType>::tokenize( + &self.bufferPeriodEndTime, + ), ) } } #[automatically_derived] impl alloy_sol_types::SolCall for getPausedStateCall { type Parameters<'a> = (); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = getPausedStateReturn; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = ( alloy_sol_types::sol_data::Bool, alloy_sol_types::sol_data::Uint<256>, alloy_sol_types::sol_data::Uint<256>, ); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "getPausedState()"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [28u8, 13u8, 224u8, 81u8]; + const SIGNATURE: &'static str = "getPausedState()"; + #[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<'_> { getPausedStateReturn::_tokenize(ret) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) + 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) + 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(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `getPoolId()` and selector `0x38fff2d0`. -```solidity -function getPoolId() external view returns (bytes32); -```*/ + ```solidity + function getPoolId() external view returns (bytes32); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct getPoolIdCall; #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`getPoolId()`](getPoolIdCall) function. + ///Container type for the return parameters of the + /// [`getPoolId()`](getPoolIdCall) function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct getPoolIdReturn { @@ -1828,7 +1811,7 @@ function getPoolId() external view returns (bytes32); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -1837,9 +1820,7 @@ function getPoolId() external view returns (bytes32); type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1869,9 +1850,7 @@ function getPoolId() external view returns (bytes32); 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, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1896,26 +1875,26 @@ function getPoolId() external view returns (bytes32); #[automatically_derived] impl alloy_sol_types::SolCall for getPoolIdCall { type Parameters<'a> = (); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = alloy_sol_types::private::FixedBytes<32>; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (alloy_sol_types::sol_data::FixedBytes<32>,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "getPoolId()"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [56u8, 255u8, 242u8, 208u8]; + const SIGNATURE: &'static str = "getPoolId()"; + #[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<'_> { ( @@ -1924,40 +1903,40 @@ function getPoolId() external view returns (bytes32); > 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| { + as alloy_sol_types::SolType>::abi_decode_sequence(data).map( + |r| { let r: getPoolIdReturn = 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: getPoolIdReturn = r.into(); - r._0 - }) + 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: getPoolIdReturn = r.into(); + r._0 + }) } } }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `getSwapFeePercentage()` and selector `0x55c67628`. -```solidity -function getSwapFeePercentage() external view returns (uint256); -```*/ + ```solidity + function getSwapFeePercentage() external view returns (uint256); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct getSwapFeePercentageCall; #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`getSwapFeePercentage()`](getSwapFeePercentageCall) function. + ///Container type for the return parameters of the + /// [`getSwapFeePercentage()`](getSwapFeePercentageCall) function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct getSwapFeePercentageReturn { @@ -1971,7 +1950,7 @@ function getSwapFeePercentage() external view returns (uint256); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -1980,9 +1959,7 @@ function getSwapFeePercentage() external view returns (uint256); type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1991,16 +1968,14 @@ function getSwapFeePercentage() external view returns (uint256); } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From - for UnderlyingRustTuple<'_> { + impl ::core::convert::From for UnderlyingRustTuple<'_> { fn from(value: getSwapFeePercentageCall) -> Self { () } } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From> - for getSwapFeePercentageCall { + impl ::core::convert::From> for getSwapFeePercentageCall { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { Self } @@ -2011,14 +1986,10 @@ function getSwapFeePercentage() external view returns (uint256); #[allow(dead_code)] type UnderlyingSolTuple<'a> = (alloy_sol_types::sol_data::Uint<256>,); #[doc(hidden)] - type UnderlyingRustTuple<'a> = ( - alloy_sol_types::private::primitives::aliases::U256, - ); + 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, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -2027,16 +1998,14 @@ function getSwapFeePercentage() external view returns (uint256); } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From - for UnderlyingRustTuple<'_> { + impl ::core::convert::From for UnderlyingRustTuple<'_> { fn from(value: getSwapFeePercentageReturn) -> Self { (value._0,) } } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From> - for getSwapFeePercentageReturn { + impl ::core::convert::From> for getSwapFeePercentageReturn { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { Self { _0: tuple.0 } } @@ -2045,68 +2014,68 @@ function getSwapFeePercentage() external view returns (uint256); #[automatically_derived] impl alloy_sol_types::SolCall for getSwapFeePercentageCall { type Parameters<'a> = (); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = alloy_sol_types::private::primitives::aliases::U256; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (alloy_sol_types::sol_data::Uint<256>,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "getSwapFeePercentage()"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [85u8, 198u8, 118u8, 40u8]; + const SIGNATURE: &'static str = "getSwapFeePercentage()"; + #[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), + 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| { + as alloy_sol_types::SolType>::abi_decode_sequence(data).map( + |r| { let r: getSwapFeePercentageReturn = 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: getSwapFeePercentageReturn = r.into(); - r._0 - }) + 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: getSwapFeePercentageReturn = r.into(); + r._0 + }) } } }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `name()` and selector `0x06fdde03`. -```solidity -function name() external view returns (string memory); -```*/ + ```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(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`name()`](nameCall) function. + ///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 { @@ -2120,7 +2089,7 @@ function name() external view returns (string memory); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -2129,9 +2098,7 @@ function name() external view returns (string memory); type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -2161,9 +2128,7 @@ function name() external view returns (string memory); type UnderlyingRustTuple<'a> = (alloy_sol_types::private::String,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -2188,63 +2153,58 @@ function name() external view returns (string memory); #[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 ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (alloy_sol_types::sol_data::String,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "name()"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [6u8, 253u8, 222u8, 3u8]; + const SIGNATURE: &'static str = "name()"; + #[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, - ), - ) + (::tokenize(ret),) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) - .map(|r| { + 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 - }) + 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(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `nonces(address)` and selector `0x7ecebe00`. -```solidity -function nonces(address owner) external view returns (uint256); -```*/ + ```solidity + function nonces(address owner) external view returns (uint256); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct noncesCall { @@ -2252,7 +2212,8 @@ function nonces(address owner) external view returns (uint256); pub owner: alloy_sol_types::private::Address, } #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`nonces(address)`](noncesCall) function. + ///Container type for the return parameters of the + /// [`nonces(address)`](noncesCall) function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct noncesReturn { @@ -2266,7 +2227,7 @@ function nonces(address owner) external view returns (uint256); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -2275,9 +2236,7 @@ function nonces(address owner) external view returns (uint256); type UnderlyingRustTuple<'a> = (alloy_sol_types::private::Address,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -2304,14 +2263,10 @@ function nonces(address owner) external view returns (uint256); #[allow(dead_code)] type UnderlyingSolTuple<'a> = (alloy_sol_types::sol_data::Uint<256>,); #[doc(hidden)] - type UnderlyingRustTuple<'a> = ( - alloy_sol_types::private::primitives::aliases::U256, - ); + 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, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -2336,22 +2291,21 @@ function nonces(address owner) external view returns (uint256); #[automatically_derived] impl alloy_sol_types::SolCall for noncesCall { 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 ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (alloy_sol_types::sol_data::Uint<256>,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "nonces(address)"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [126u8, 206u8, 190u8, 0u8]; + const SIGNATURE: &'static str = "nonces(address)"; + #[inline] fn new<'a>( tuple: as alloy_sol_types::SolType>::RustType, ) -> Self { tuple.into() } + #[inline] fn tokenize(&self) -> Self::Token<'_> { ( @@ -2360,43 +2314,43 @@ function nonces(address owner) external view returns (uint256); ), ) } + #[inline] fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { ( - as alloy_sol_types::SolType>::tokenize(ret), + 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| { + as alloy_sol_types::SolType>::abi_decode_sequence(data).map( + |r| { let r: noncesReturn = 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: noncesReturn = r.into(); - r._0 - }) + 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: noncesReturn = r.into(); + r._0 + }) } } }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `permit(address,address,uint256,uint256,uint8,bytes32,bytes32)` and selector `0xd505accf`. -```solidity -function permit(address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) external; -```*/ + ```solidity + function permit(address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) external; + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct permitCall { @@ -2415,7 +2369,9 @@ function permit(address owner, address spender, uint256 value, uint256 deadline, #[allow(missing_docs)] pub s: alloy_sol_types::private::FixedBytes<32>, } - ///Container type for the return parameters of the [`permit(address,address,uint256,uint256,uint8,bytes32,bytes32)`](permitCall) function. + ///Container type for the return parameters of the + /// [`permit(address,address,uint256,uint256,uint8,bytes32, + /// bytes32)`](permitCall) function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct permitReturn {} @@ -2426,7 +2382,7 @@ function permit(address owner, address spender, uint256 value, uint256 deadline, clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -2451,9 +2407,7 @@ function permit(address owner, address spender, uint256 value, uint256 deadline, ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -2499,9 +2453,7 @@ function permit(address owner, address spender, uint256 value, uint256 deadline, type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -2524,9 +2476,7 @@ function permit(address owner, address spender, uint256 value, uint256 deadline, } } impl permitReturn { - fn _tokenize( - &self, - ) -> ::ReturnToken<'_> { + fn _tokenize(&self) -> ::ReturnToken<'_> { () } } @@ -2541,22 +2491,22 @@ function permit(address owner, address spender, uint256 value, uint256 deadline, alloy_sol_types::sol_data::FixedBytes<32>, alloy_sol_types::sol_data::FixedBytes<32>, ); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = permitReturn; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "permit(address,address,uint256,uint256,uint8,bytes32,bytes32)"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [213u8, 5u8, 172u8, 207u8]; + const SIGNATURE: &'static str = + "permit(address,address,uint256,uint256,uint8,bytes32,bytes32)"; + #[inline] fn new<'a>( tuple: as alloy_sol_types::SolType>::RustType, ) -> Self { tuple.into() } + #[inline] fn tokenize(&self) -> Self::Token<'_> { ( @@ -2583,38 +2533,38 @@ function permit(address owner, address spender, uint256 value, uint256 deadline, > as alloy_sol_types::SolType>::tokenize(&self.s), ) } + #[inline] fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { permitReturn::_tokenize(ret) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) + 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) + 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(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `symbol()` and selector `0x95d89b41`. -```solidity -function symbol() external view returns (string memory); -```*/ + ```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(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`symbol()`](symbolCall) function. + ///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 { @@ -2628,7 +2578,7 @@ function symbol() external view returns (string memory); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -2637,9 +2587,7 @@ function symbol() external view returns (string memory); type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -2669,9 +2617,7 @@ function symbol() external view returns (string memory); type UnderlyingRustTuple<'a> = (alloy_sol_types::private::String,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -2696,63 +2642,58 @@ function symbol() external view returns (string memory); #[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 ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (alloy_sol_types::sol_data::String,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "symbol()"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [149u8, 216u8, 155u8, 65u8]; + const SIGNATURE: &'static str = "symbol()"; + #[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, - ), - ) + (::tokenize(ret),) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) - .map(|r| { + 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 - }) + 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(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `transfer(address,uint256)` and selector `0xa9059cbb`. -```solidity -function transfer(address recipient, uint256 amount) external returns (bool); -```*/ + ```solidity + function transfer(address recipient, uint256 amount) external returns (bool); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct transferCall { @@ -2762,7 +2703,8 @@ function transfer(address recipient, uint256 amount) external returns (bool); pub amount: alloy_sol_types::private::primitives::aliases::U256, } #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`transfer(address,uint256)`](transferCall) function. + ///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 { @@ -2776,7 +2718,7 @@ function transfer(address recipient, uint256 amount) external returns (bool); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -2791,9 +2733,7 @@ function transfer(address recipient, uint256 amount) external returns (bool); ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -2826,9 +2766,7 @@ function transfer(address recipient, uint256 amount) external returns (bool); type UnderlyingRustTuple<'a> = (bool,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -2856,70 +2794,65 @@ function transfer(address recipient, uint256 amount) external returns (bool); 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 ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; 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)"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [169u8, 5u8, 156u8, 187u8]; + const SIGNATURE: &'static str = "transfer(address,uint256)"; + #[inline] fn new<'a>( tuple: as alloy_sol_types::SolType>::RustType, ) -> Self { tuple.into() } + #[inline] fn tokenize(&self) -> Self::Token<'_> { ( ::tokenize( &self.recipient, ), - as alloy_sol_types::SolType>::tokenize(&self.amount), + as alloy_sol_types::SolType>::tokenize( + &self.amount, + ), ) } + #[inline] fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { - ( - ::tokenize( - ret, - ), - ) + (::tokenize(ret),) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) - .map(|r| { + 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 - }) + 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(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `transferFrom(address,address,uint256)` and selector `0x23b872dd`. -```solidity -function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); -```*/ + ```solidity + function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct transferFromCall { @@ -2931,7 +2864,8 @@ function transferFrom(address sender, address recipient, uint256 amount) externa pub amount: alloy_sol_types::private::primitives::aliases::U256, } #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`transferFrom(address,address,uint256)`](transferFromCall) function. + ///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 { @@ -2945,7 +2879,7 @@ function transferFrom(address sender, address recipient, uint256 amount) externa clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -2962,9 +2896,7 @@ function transferFrom(address sender, address recipient, uint256 amount) externa ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -2998,9 +2930,7 @@ function transferFrom(address sender, address recipient, uint256 amount) externa type UnderlyingRustTuple<'a> = (bool,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -3029,22 +2959,21 @@ function transferFrom(address sender, address recipient, uint256 amount) externa 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 ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; 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)"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [35u8, 184u8, 114u8, 221u8]; + const SIGNATURE: &'static str = "transferFrom(address,address,uint256)"; + #[inline] fn new<'a>( tuple: as alloy_sol_types::SolType>::RustType, ) -> Self { tuple.into() } + #[inline] fn tokenize(&self) -> Self::Token<'_> { ( @@ -3054,46 +2983,41 @@ function transferFrom(address sender, address recipient, uint256 amount) externa ::tokenize( &self.recipient, ), - as alloy_sol_types::SolType>::tokenize(&self.amount), + as alloy_sol_types::SolType>::tokenize( + &self.amount, + ), ) } + #[inline] fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { - ( - ::tokenize( - ret, - ), - ) + (::tokenize(ret),) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) - .map(|r| { + 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 - }) + 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 + }) } } }; ///Container for all the [`BalancerV2BasePool`](self) function calls. #[derive(Clone)] - #[derive()] pub enum BalancerV2BasePoolCalls { #[allow(missing_docs)] DOMAIN_SEPARATOR(DOMAIN_SEPARATORCall), @@ -3127,8 +3051,9 @@ function transferFrom(address sender, address recipient, uint256 amount) externa impl BalancerV2BasePoolCalls { /// 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. + /// 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]] = &[ @@ -3147,23 +3072,6 @@ function transferFrom(address sender, address recipient, uint256 amount) externa [213u8, 5u8, 172u8, 207u8], [221u8, 98u8, 237u8, 62u8], ]; - /// The names of the variants in the same order as `SELECTORS`. - pub const VARIANT_NAMES: &'static [&'static str] = &[ - ::core::stringify!(name), - ::core::stringify!(approve), - ::core::stringify!(getPausedState), - ::core::stringify!(transferFrom), - ::core::stringify!(decimals), - ::core::stringify!(DOMAIN_SEPARATOR), - ::core::stringify!(getPoolId), - ::core::stringify!(getSwapFeePercentage), - ::core::stringify!(balanceOf), - ::core::stringify!(nonces), - ::core::stringify!(symbol), - ::core::stringify!(transfer), - ::core::stringify!(permit), - ::core::stringify!(allowance), - ]; /// The signatures in the same order as `SELECTORS`. pub const SIGNATURES: &'static [&'static str] = &[ ::SIGNATURE, @@ -3181,6 +3089,24 @@ function transferFrom(address sender, address recipient, uint256 amount) externa ::SIGNATURE, ::SIGNATURE, ]; + /// The names of the variants in the same order as `SELECTORS`. + pub const VARIANT_NAMES: &'static [&'static str] = &[ + ::core::stringify!(name), + ::core::stringify!(approve), + ::core::stringify!(getPausedState), + ::core::stringify!(transferFrom), + ::core::stringify!(decimals), + ::core::stringify!(DOMAIN_SEPARATOR), + ::core::stringify!(getPoolId), + ::core::stringify!(getSwapFeePercentage), + ::core::stringify!(balanceOf), + ::core::stringify!(nonces), + ::core::stringify!(symbol), + ::core::stringify!(transfer), + ::core::stringify!(permit), + ::core::stringify!(allowance), + ]; + /// Returns the signature for the given selector, if known. #[inline] pub fn signature_by_selector( @@ -3193,40 +3119,34 @@ function transferFrom(address sender, address recipient, uint256 amount) externa ::core::result::Result::Err(_) => ::core::option::Option::None, } } + /// Returns the enum variant name for the given selector, if known. #[inline] - pub fn name_by_selector( - selector: [u8; 4usize], - ) -> ::core::option::Option<&'static str> { + pub fn name_by_selector(selector: [u8; 4usize]) -> ::core::option::Option<&'static str> { let sig = Self::signature_by_selector(selector)?; sig.split_once('(').map(|(name, _)| name) } } #[automatically_derived] impl alloy_sol_types::SolInterface for BalancerV2BasePoolCalls { - const NAME: &'static str = "BalancerV2BasePoolCalls"; - const MIN_DATA_LENGTH: usize = 0usize; const COUNT: usize = 14usize; + const MIN_DATA_LENGTH: usize = 0usize; + const NAME: &'static str = "BalancerV2BasePoolCalls"; + #[inline] fn selector(&self) -> [u8; 4] { match self { Self::DOMAIN_SEPARATOR(_) => { ::SELECTOR } - Self::allowance(_) => { - ::SELECTOR - } + Self::allowance(_) => ::SELECTOR, Self::approve(_) => ::SELECTOR, - Self::balanceOf(_) => { - ::SELECTOR - } + Self::balanceOf(_) => ::SELECTOR, Self::decimals(_) => ::SELECTOR, Self::getPausedState(_) => { ::SELECTOR } - Self::getPoolId(_) => { - ::SELECTOR - } + Self::getPoolId(_) => ::SELECTOR, Self::getSwapFeePercentage(_) => { ::SELECTOR } @@ -3235,41 +3155,36 @@ function transferFrom(address sender, address recipient, uint256 amount) externa Self::permit(_) => ::SELECTOR, Self::symbol(_) => ::SELECTOR, Self::transfer(_) => ::SELECTOR, - Self::transferFrom(_) => { - ::SELECTOR - } + Self::transferFrom(_) => ::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 { + fn abi_decode_raw(selector: [u8; 4], data: &[u8]) -> alloy_sol_types::Result { static DECODE_SHIMS: &[fn( &[u8], - ) -> alloy_sol_types::Result] = &[ + ) + -> alloy_sol_types::Result] = &[ { - fn name( - data: &[u8], - ) -> alloy_sol_types::Result { + fn name(data: &[u8]) -> alloy_sol_types::Result { ::abi_decode_raw(data) .map(BalancerV2BasePoolCalls::name) } name }, { - fn approve( - data: &[u8], - ) -> alloy_sol_types::Result { + fn approve(data: &[u8]) -> alloy_sol_types::Result { ::abi_decode_raw(data) .map(BalancerV2BasePoolCalls::approve) } @@ -3279,9 +3194,7 @@ function transferFrom(address sender, address recipient, uint256 amount) externa fn getPausedState( data: &[u8], ) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, - ) + ::abi_decode_raw(data) .map(BalancerV2BasePoolCalls::getPausedState) } getPausedState @@ -3290,17 +3203,13 @@ function transferFrom(address sender, address recipient, uint256 amount) externa fn transferFrom( data: &[u8], ) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, - ) + ::abi_decode_raw(data) .map(BalancerV2BasePoolCalls::transferFrom) } transferFrom }, { - fn decimals( - data: &[u8], - ) -> alloy_sol_types::Result { + fn decimals(data: &[u8]) -> alloy_sol_types::Result { ::abi_decode_raw(data) .map(BalancerV2BasePoolCalls::decimals) } @@ -3310,17 +3219,13 @@ function transferFrom(address sender, address recipient, uint256 amount) externa fn DOMAIN_SEPARATOR( data: &[u8], ) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, - ) + ::abi_decode_raw(data) .map(BalancerV2BasePoolCalls::DOMAIN_SEPARATOR) } DOMAIN_SEPARATOR }, { - fn getPoolId( - data: &[u8], - ) -> alloy_sol_types::Result { + fn getPoolId(data: &[u8]) -> alloy_sol_types::Result { ::abi_decode_raw(data) .map(BalancerV2BasePoolCalls::getPoolId) } @@ -3330,62 +3235,48 @@ function transferFrom(address sender, address recipient, uint256 amount) externa fn getSwapFeePercentage( data: &[u8], ) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, - ) + ::abi_decode_raw(data) .map(BalancerV2BasePoolCalls::getSwapFeePercentage) } getSwapFeePercentage }, { - fn balanceOf( - data: &[u8], - ) -> alloy_sol_types::Result { + fn balanceOf(data: &[u8]) -> alloy_sol_types::Result { ::abi_decode_raw(data) .map(BalancerV2BasePoolCalls::balanceOf) } balanceOf }, { - fn nonces( - data: &[u8], - ) -> alloy_sol_types::Result { + fn nonces(data: &[u8]) -> alloy_sol_types::Result { ::abi_decode_raw(data) .map(BalancerV2BasePoolCalls::nonces) } nonces }, { - fn symbol( - data: &[u8], - ) -> alloy_sol_types::Result { + fn symbol(data: &[u8]) -> alloy_sol_types::Result { ::abi_decode_raw(data) .map(BalancerV2BasePoolCalls::symbol) } symbol }, { - fn transfer( - data: &[u8], - ) -> alloy_sol_types::Result { + fn transfer(data: &[u8]) -> alloy_sol_types::Result { ::abi_decode_raw(data) .map(BalancerV2BasePoolCalls::transfer) } transfer }, { - fn permit( - data: &[u8], - ) -> alloy_sol_types::Result { + fn permit(data: &[u8]) -> alloy_sol_types::Result { ::abi_decode_raw(data) .map(BalancerV2BasePoolCalls::permit) } permit }, { - fn allowance( - data: &[u8], - ) -> alloy_sol_types::Result { + fn allowance(data: &[u8]) -> alloy_sol_types::Result { ::abi_decode_raw(data) .map(BalancerV2BasePoolCalls::allowance) } @@ -3393,15 +3284,14 @@ function transferFrom(address sender, address recipient, uint256 amount) externa }, ]; let Ok(idx) = Self::SELECTORS.binary_search(&selector) else { - return Err( - alloy_sol_types::Error::unknown_selector( - ::NAME, - selector, - ), - ); + return Err(alloy_sol_types::Error::unknown_selector( + ::NAME, + selector, + )); }; DECODE_SHIMS[idx](data) } + #[inline] #[allow(non_snake_case)] fn abi_decode_raw_validate( @@ -3410,25 +3300,19 @@ function transferFrom(address sender, address recipient, uint256 amount) externa ) -> alloy_sol_types::Result { static DECODE_VALIDATE_SHIMS: &[fn( &[u8], - ) -> alloy_sol_types::Result] = &[ + ) -> alloy_sol_types::Result< + BalancerV2BasePoolCalls, + >] = &[ { - fn name( - data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) + fn name(data: &[u8]) -> alloy_sol_types::Result { + ::abi_decode_raw_validate(data) .map(BalancerV2BasePoolCalls::name) } name }, { - fn approve( - data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) + fn approve(data: &[u8]) -> alloy_sol_types::Result { + ::abi_decode_raw_validate(data) .map(BalancerV2BasePoolCalls::approve) } approve @@ -3438,9 +3322,9 @@ function transferFrom(address sender, address recipient, uint256 amount) externa data: &[u8], ) -> alloy_sol_types::Result { ::abi_decode_raw_validate( - data, - ) - .map(BalancerV2BasePoolCalls::getPausedState) + data, + ) + .map(BalancerV2BasePoolCalls::getPausedState) } getPausedState }, @@ -3449,19 +3333,15 @@ function transferFrom(address sender, address recipient, uint256 amount) externa data: &[u8], ) -> alloy_sol_types::Result { ::abi_decode_raw_validate( - data, - ) - .map(BalancerV2BasePoolCalls::transferFrom) + data, + ) + .map(BalancerV2BasePoolCalls::transferFrom) } transferFrom }, { - fn decimals( - data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) + fn decimals(data: &[u8]) -> alloy_sol_types::Result { + ::abi_decode_raw_validate(data) .map(BalancerV2BasePoolCalls::decimals) } decimals @@ -3471,19 +3351,15 @@ function transferFrom(address sender, address recipient, uint256 amount) externa data: &[u8], ) -> alloy_sol_types::Result { ::abi_decode_raw_validate( - data, - ) - .map(BalancerV2BasePoolCalls::DOMAIN_SEPARATOR) + data, + ) + .map(BalancerV2BasePoolCalls::DOMAIN_SEPARATOR) } DOMAIN_SEPARATOR }, { - fn getPoolId( - data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) + fn getPoolId(data: &[u8]) -> alloy_sol_types::Result { + ::abi_decode_raw_validate(data) .map(BalancerV2BasePoolCalls::getPoolId) } getPoolId @@ -3500,89 +3376,62 @@ function transferFrom(address sender, address recipient, uint256 amount) externa getSwapFeePercentage }, { - fn balanceOf( - data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) + fn balanceOf(data: &[u8]) -> alloy_sol_types::Result { + ::abi_decode_raw_validate(data) .map(BalancerV2BasePoolCalls::balanceOf) } balanceOf }, { - fn nonces( - data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) + fn nonces(data: &[u8]) -> alloy_sol_types::Result { + ::abi_decode_raw_validate(data) .map(BalancerV2BasePoolCalls::nonces) } nonces }, { - fn symbol( - data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) + fn symbol(data: &[u8]) -> alloy_sol_types::Result { + ::abi_decode_raw_validate(data) .map(BalancerV2BasePoolCalls::symbol) } symbol }, { - fn transfer( - data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) + fn transfer(data: &[u8]) -> alloy_sol_types::Result { + ::abi_decode_raw_validate(data) .map(BalancerV2BasePoolCalls::transfer) } transfer }, { - fn permit( - data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) + fn permit(data: &[u8]) -> alloy_sol_types::Result { + ::abi_decode_raw_validate(data) .map(BalancerV2BasePoolCalls::permit) } permit }, { - fn allowance( - data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) + fn allowance(data: &[u8]) -> alloy_sol_types::Result { + ::abi_decode_raw_validate(data) .map(BalancerV2BasePoolCalls::allowance) } allowance }, ]; let Ok(idx) = Self::SELECTORS.binary_search(&selector) else { - return Err( - alloy_sol_types::Error::unknown_selector( - ::NAME, - selector, - ), - ); + 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::DOMAIN_SEPARATOR(inner) => { - ::abi_encoded_size( - inner, - ) + ::abi_encoded_size(inner) } Self::allowance(inner) => { ::abi_encoded_size(inner) @@ -3597,17 +3446,13 @@ function transferFrom(address sender, address recipient, uint256 amount) externa ::abi_encoded_size(inner) } Self::getPausedState(inner) => { - ::abi_encoded_size( - inner, - ) + ::abi_encoded_size(inner) } Self::getPoolId(inner) => { ::abi_encoded_size(inner) } Self::getSwapFeePercentage(inner) => { - ::abi_encoded_size( - inner, - ) + ::abi_encoded_size(inner) } Self::name(inner) => { ::abi_encoded_size(inner) @@ -3625,58 +3470,38 @@ function transferFrom(address sender, address recipient, uint256 amount) externa ::abi_encoded_size(inner) } Self::transferFrom(inner) => { - ::abi_encoded_size( - inner, - ) + ::abi_encoded_size(inner) } } } + #[inline] fn abi_encode_raw(&self, out: &mut alloy_sol_types::private::Vec) { match self { Self::DOMAIN_SEPARATOR(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } Self::allowance(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } Self::approve(inner) => { ::abi_encode_raw(inner, out) } Self::balanceOf(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } Self::decimals(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } Self::getPausedState(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } Self::getPoolId(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } Self::getSwapFeePercentage(inner) => { ::abi_encode_raw( - inner, - out, + inner, out, ) } Self::name(inner) => { @@ -3692,23 +3517,16 @@ function transferFrom(address sender, address recipient, uint256 amount) externa ::abi_encode_raw(inner, out) } Self::transfer(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } Self::transferFrom(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } } } } ///Container for all the [`BalancerV2BasePool`](self) events. - #[derive(Clone)] - #[derive(Debug, PartialEq, Eq, Hash)] + #[derive(Clone, Debug, PartialEq, Eq, Hash)] pub enum BalancerV2BasePoolEvents { #[allow(missing_docs)] Approval(Approval), @@ -3722,39 +3540,33 @@ function transferFrom(address sender, address recipient, uint256 amount) externa impl BalancerV2BasePoolEvents { /// 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. + /// 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]] = &[ [ - 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, + 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, ], [ - 158u8, 58u8, 94u8, 55u8, 34u8, 69u8, 50u8, 222u8, 166u8, 123u8, 137u8, - 250u8, 206u8, 24u8, 87u8, 3u8, 115u8, 138u8, 34u8, 138u8, 110u8, 138u8, - 35u8, 222u8, 229u8, 70u8, 150u8, 1u8, 128u8, 211u8, 190u8, 100u8, + 158u8, 58u8, 94u8, 55u8, 34u8, 69u8, 50u8, 222u8, 166u8, 123u8, 137u8, 250u8, + 206u8, 24u8, 87u8, 3u8, 115u8, 138u8, 34u8, 138u8, 110u8, 138u8, 35u8, 222u8, + 229u8, 70u8, 150u8, 1u8, 128u8, 211u8, 190u8, 100u8, ], [ - 169u8, 186u8, 63u8, 254u8, 11u8, 108u8, 54u8, 107u8, 129u8, 35u8, 44u8, - 170u8, 179u8, 134u8, 5u8, 160u8, 105u8, 154u8, 213u8, 57u8, 141u8, 108u8, - 206u8, 118u8, 249u8, 30u8, 232u8, 9u8, 227u8, 34u8, 218u8, 252u8, + 169u8, 186u8, 63u8, 254u8, 11u8, 108u8, 54u8, 107u8, 129u8, 35u8, 44u8, 170u8, + 179u8, 134u8, 5u8, 160u8, 105u8, 154u8, 213u8, 57u8, 141u8, 108u8, 206u8, 118u8, + 249u8, 30u8, 232u8, 9u8, 227u8, 34u8, 218u8, 252u8, ], [ - 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, + 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, ], ]; - /// The names of the variants in the same order as `SELECTORS`. - pub const VARIANT_NAMES: &'static [&'static str] = &[ - ::core::stringify!(Approval), - ::core::stringify!(PausedStateChanged), - ::core::stringify!(SwapFeePercentageChanged), - ::core::stringify!(Transfer), - ]; /// The signatures in the same order as `SELECTORS`. pub const SIGNATURES: &'static [&'static str] = &[ ::SIGNATURE, @@ -3762,6 +3574,14 @@ function transferFrom(address sender, address recipient, uint256 amount) externa ::SIGNATURE, ::SIGNATURE, ]; + /// The names of the variants in the same order as `SELECTORS`. + pub const VARIANT_NAMES: &'static [&'static str] = &[ + ::core::stringify!(Approval), + ::core::stringify!(PausedStateChanged), + ::core::stringify!(SwapFeePercentageChanged), + ::core::stringify!(Transfer), + ]; + /// Returns the signature for the given selector, if known. #[inline] pub fn signature_by_selector( @@ -3774,19 +3594,19 @@ function transferFrom(address sender, address recipient, uint256 amount) externa ::core::result::Result::Err(_) => ::core::option::Option::None, } } + /// Returns the enum variant name for the given selector, if known. #[inline] - pub fn name_by_selector( - selector: [u8; 32usize], - ) -> ::core::option::Option<&'static str> { + pub fn name_by_selector(selector: [u8; 32usize]) -> ::core::option::Option<&'static str> { let sig = Self::signature_by_selector(selector)?; sig.split_once('(').map(|(name, _)| name) } } #[automatically_derived] impl alloy_sol_types::SolEventInterface for BalancerV2BasePoolEvents { - const NAME: &'static str = "BalancerV2BasePoolEvents"; const COUNT: usize = 4usize; + const NAME: &'static str = "BalancerV2BasePoolEvents"; + fn decode_raw_log( topics: &[alloy_sol_types::Word], data: &[u8], @@ -3796,39 +3616,29 @@ function transferFrom(address sender, address recipient, uint256 amount) externa ::decode_raw_log(topics, data) .map(Self::Approval) } - Some( - ::SIGNATURE_HASH, - ) => { - ::decode_raw_log( - topics, - data, - ) + Some(::SIGNATURE_HASH) => { + ::decode_raw_log(topics, data) .map(Self::PausedStateChanged) } - Some( - ::SIGNATURE_HASH, - ) => { + Some(::SIGNATURE_HASH) => { ::decode_raw_log( - topics, - data, - ) - .map(Self::SwapFeePercentageChanged) + topics, data, + ) + .map(Self::SwapFeePercentageChanged) } Some(::SIGNATURE_HASH) => { ::decode_raw_log(topics, data) .map(Self::Transfer) } - _ => { - 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(), - ), + _ => 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(), ), - }) - } + ), + }), } } } @@ -3836,20 +3646,17 @@ function transferFrom(address sender, address recipient, uint256 amount) externa impl alloy_sol_types::private::IntoLogData for BalancerV2BasePoolEvents { 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::Approval(inner) => alloy_sol_types::private::IntoLogData::to_log_data(inner), Self::PausedStateChanged(inner) => { alloy_sol_types::private::IntoLogData::to_log_data(inner) } Self::SwapFeePercentageChanged(inner) => { alloy_sol_types::private::IntoLogData::to_log_data(inner) } - Self::Transfer(inner) => { - alloy_sol_types::private::IntoLogData::to_log_data(inner) - } + Self::Transfer(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) => { @@ -3867,10 +3674,10 @@ function transferFrom(address sender, address recipient, uint256 amount) externa } } } - use alloy_contract as alloy_contract; + use alloy_contract; /**Creates a new wrapper around an on-chain [`BalancerV2BasePool`](self) contract instance. -See the [wrapper's documentation](`BalancerV2BasePoolInstance`) for more details.*/ + See the [wrapper's documentation](`BalancerV2BasePoolInstance`) for more details.*/ #[inline] pub const fn new< P: alloy_contract::private::Provider, @@ -3883,15 +3690,15 @@ See the [wrapper's documentation](`BalancerV2BasePoolInstance`) for more details } /**A [`BalancerV2BasePool`](self) instance. -Contains type-safe methods for interacting with an on-chain instance of the -[`BalancerV2BasePool`](self) contract located at a given `address`, using a given -provider `P`. + Contains type-safe methods for interacting with an on-chain instance of the + [`BalancerV2BasePool`](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. + 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.*/ + See the [module-level documentation](self) for all the available methods.*/ #[derive(Clone)] pub struct BalancerV2BasePoolInstance { address: alloy_sol_types::private::Address, @@ -3902,43 +3709,45 @@ See the [module-level documentation](self) for all the available methods.*/ impl ::core::fmt::Debug for BalancerV2BasePoolInstance { #[inline] fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { - f.debug_tuple("BalancerV2BasePoolInstance").field(&self.address).finish() + f.debug_tuple("BalancerV2BasePoolInstance") + .field(&self.address) + .finish() } } /// Instantiation and getters/setters. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > BalancerV2BasePoolInstance { + impl, N: alloy_contract::private::Network> + BalancerV2BasePoolInstance + { /**Creates a new wrapper around an on-chain [`BalancerV2BasePool`](self) contract instance. -See the [wrapper's documentation](`BalancerV2BasePoolInstance`) for more details.*/ + See the [wrapper's documentation](`BalancerV2BasePoolInstance`) for more details.*/ #[inline] - pub const fn new( - address: alloy_sol_types::private::Address, - __provider: P, - ) -> Self { + pub const fn new(address: alloy_sol_types::private::Address, __provider: P) -> Self { Self { address, provider: __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 { @@ -3946,7 +3755,8 @@ See the [wrapper's documentation](`BalancerV2BasePoolInstance`) for more details } } impl BalancerV2BasePoolInstance<&P, N> { - /// Clones the provider and returns a new instance with the cloned provider. + /// Clones the provider and returns a new instance with the cloned + /// provider. #[inline] pub fn with_cloned_provider(self) -> BalancerV2BasePoolInstance { BalancerV2BasePoolInstance { @@ -3957,26 +3767,29 @@ See the [wrapper's documentation](`BalancerV2BasePoolInstance`) for more details } } /// Function calls. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > BalancerV2BasePoolInstance { - /// Creates a new call builder using this contract instance's provider and address. + impl, N: alloy_contract::private::Network> + BalancerV2BasePoolInstance + { + /// 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. + /// 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 [`DOMAIN_SEPARATOR`] function. pub fn DOMAIN_SEPARATOR( &self, ) -> alloy_contract::SolCallBuilder<&P, DOMAIN_SEPARATORCall, N> { self.call_builder(&DOMAIN_SEPARATORCall) } + ///Creates a new call builder for the [`allowance`] function. pub fn allowance( &self, @@ -3985,6 +3798,7 @@ See the [wrapper's documentation](`BalancerV2BasePoolInstance`) for more details ) -> 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, @@ -3993,6 +3807,7 @@ See the [wrapper's documentation](`BalancerV2BasePoolInstance`) for more details ) -> alloy_contract::SolCallBuilder<&P, approveCall, N> { self.call_builder(&approveCall { spender, amount }) } + ///Creates a new call builder for the [`balanceOf`] function. pub fn balanceOf( &self, @@ -4000,30 +3815,35 @@ See the [wrapper's documentation](`BalancerV2BasePoolInstance`) for more details ) -> alloy_contract::SolCallBuilder<&P, balanceOfCall, N> { self.call_builder(&balanceOfCall { account }) } + ///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 [`getPausedState`] function. - pub fn getPausedState( - &self, - ) -> alloy_contract::SolCallBuilder<&P, getPausedStateCall, N> { + pub fn getPausedState(&self) -> alloy_contract::SolCallBuilder<&P, getPausedStateCall, N> { self.call_builder(&getPausedStateCall) } + ///Creates a new call builder for the [`getPoolId`] function. pub fn getPoolId(&self) -> alloy_contract::SolCallBuilder<&P, getPoolIdCall, N> { self.call_builder(&getPoolIdCall) } - ///Creates a new call builder for the [`getSwapFeePercentage`] function. + + ///Creates a new call builder for the [`getSwapFeePercentage`] + /// function. pub fn getSwapFeePercentage( &self, ) -> alloy_contract::SolCallBuilder<&P, getSwapFeePercentageCall, N> { self.call_builder(&getSwapFeePercentageCall) } + ///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 [`nonces`] function. pub fn nonces( &self, @@ -4031,6 +3851,7 @@ See the [wrapper's documentation](`BalancerV2BasePoolInstance`) for more details ) -> alloy_contract::SolCallBuilder<&P, noncesCall, N> { self.call_builder(&noncesCall { owner }) } + ///Creates a new call builder for the [`permit`] function. pub fn permit( &self, @@ -4042,22 +3863,22 @@ See the [wrapper's documentation](`BalancerV2BasePoolInstance`) for more details r: alloy_sol_types::private::FixedBytes<32>, s: alloy_sol_types::private::FixedBytes<32>, ) -> alloy_contract::SolCallBuilder<&P, permitCall, N> { - self.call_builder( - &permitCall { - owner, - spender, - value, - deadline, - v, - r, - s, - }, - ) + self.call_builder(&permitCall { + owner, + spender, + value, + deadline, + v, + r, + s, + }) } + ///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 [`transfer`] function. pub fn transfer( &self, @@ -4066,6 +3887,7 @@ See the [wrapper's documentation](`BalancerV2BasePoolInstance`) for more details ) -> alloy_contract::SolCallBuilder<&P, transferCall, N> { self.call_builder(&transferCall { recipient, amount }) } + ///Creates a new call builder for the [`transferFrom`] function. pub fn transferFrom( &self, @@ -4073,51 +3895,53 @@ See the [wrapper's documentation](`BalancerV2BasePoolInstance`) for more details recipient: alloy_sol_types::private::Address, amount: alloy_sol_types::private::primitives::aliases::U256, ) -> alloy_contract::SolCallBuilder<&P, transferFromCall, N> { - self.call_builder( - &transferFromCall { - sender, - recipient, - amount, - }, - ) + self.call_builder(&transferFromCall { + sender, + recipient, + amount, + }) } } /// Event filters. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > BalancerV2BasePoolInstance { - /// Creates a new event filter using this contract instance's provider and address. + impl, N: alloy_contract::private::Network> + BalancerV2BasePoolInstance + { + /// 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. + /// 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 [`PausedStateChanged`] event. pub fn PausedStateChanged_filter( &self, ) -> alloy_contract::Event<&P, PausedStateChanged, N> { self.event_filter::() } - ///Creates a new event filter for the [`SwapFeePercentageChanged`] event. + + ///Creates a new event filter for the [`SwapFeePercentageChanged`] + /// event. pub fn SwapFeePercentageChanged_filter( &self, ) -> alloy_contract::Event<&P, SwapFeePercentageChanged, 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::() } } } -pub type Instance = BalancerV2BasePool::BalancerV2BasePoolInstance< - ::alloy_provider::DynProvider, ->; +pub type Instance = BalancerV2BasePool::BalancerV2BasePoolInstance<::alloy_provider::DynProvider>; diff --git a/contracts/generated/contracts-generated/balancerv2basepoolfactory/src/lib.rs b/contracts/generated/contracts-generated/balancerv2basepoolfactory/src/lib.rs index c14edf3aa6..4b71d5171c 100644 --- a/contracts/generated/contracts-generated/balancerv2basepoolfactory/src/lib.rs +++ b/contracts/generated/contracts-generated/balancerv2basepoolfactory/src/lib.rs @@ -1,4 +1,10 @@ -#![allow(unused_imports, unused_attributes, clippy::all, rustdoc::all, non_snake_case)] +#![allow( + unused_imports, + unused_attributes, + clippy::all, + rustdoc::all, + non_snake_case +)] //! Auto-generated contract bindings. Do not edit. /** @@ -35,13 +41,12 @@ interface BalancerV2BasePoolFactory { clippy::empty_structs_with_brackets )] pub mod BalancerV2BasePoolFactory { - use super::*; - use alloy_sol_types as alloy_sol_types; + use {super::*, alloy_sol_types}; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Event with signature `PoolCreated(address)` and selector `0x83a48fbcfc991335314e74d0496aab6a1987e992ddc85dddbcc4d6dd6ef2e9fc`. -```solidity -event PoolCreated(address indexed pool); -```*/ + ```solidity + event PoolCreated(address indexed pool); + ```*/ #[allow( non_camel_case_types, non_snake_case, @@ -60,25 +65,25 @@ event PoolCreated(address indexed pool); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[automatically_derived] impl alloy_sol_types::SolEvent for PoolCreated { + type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; 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::Address, ); - const SIGNATURE: &'static str = "PoolCreated(address)"; - const SIGNATURE_HASH: alloy_sol_types::private::B256 = alloy_sol_types::private::B256::new([ - 131u8, 164u8, 143u8, 188u8, 252u8, 153u8, 19u8, 53u8, 49u8, 78u8, 116u8, - 208u8, 73u8, 106u8, 171u8, 106u8, 25u8, 135u8, 233u8, 146u8, 221u8, - 200u8, 93u8, 221u8, 188u8, 196u8, 214u8, 221u8, 110u8, 242u8, 233u8, - 252u8, - ]); + const ANONYMOUS: bool = false; + const SIGNATURE: &'static str = "PoolCreated(address)"; + const SIGNATURE_HASH: alloy_sol_types::private::B256 = + alloy_sol_types::private::B256::new([ + 131u8, 164u8, 143u8, 188u8, 252u8, 153u8, 19u8, 53u8, 49u8, 78u8, 116u8, 208u8, + 73u8, 106u8, 171u8, 106u8, 25u8, 135u8, 233u8, 146u8, 221u8, 200u8, 93u8, + 221u8, 188u8, 196u8, 214u8, 221u8, 110u8, 242u8, 233u8, 252u8, + ]); + #[allow(unused_variables)] #[inline] fn new( @@ -87,29 +92,31 @@ event PoolCreated(address indexed pool); ) -> Self { Self { pool: topics.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, - ), - ); + 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.pool.clone()) } + #[inline] fn encode_topics_raw( &self, @@ -118,9 +125,7 @@ event PoolCreated(address indexed pool); if out.len() < ::COUNT { return Err(alloy_sol_types::Error::Overrun); } - out[0usize] = alloy_sol_types::abi::token::WordToken( - Self::SIGNATURE_HASH, - ); + out[0usize] = alloy_sol_types::abi::token::WordToken(Self::SIGNATURE_HASH); out[1usize] = ::encode_topic( &self.pool, ); @@ -132,6 +137,7 @@ event PoolCreated(address indexed pool); 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) } @@ -145,8 +151,7 @@ event PoolCreated(address indexed pool); } }; ///Container for all the [`BalancerV2BasePoolFactory`](self) events. - #[derive(Clone)] - #[derive(Debug, PartialEq, Eq, Hash)] + #[derive(Clone, Debug, PartialEq, Eq, Hash)] pub enum BalancerV2BasePoolFactoryEvents { #[allow(missing_docs)] PoolCreated(PoolCreated), @@ -154,26 +159,22 @@ event PoolCreated(address indexed pool); impl BalancerV2BasePoolFactoryEvents { /// 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. + /// 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]] = &[ - [ - 131u8, 164u8, 143u8, 188u8, 252u8, 153u8, 19u8, 53u8, 49u8, 78u8, 116u8, - 208u8, 73u8, 106u8, 171u8, 106u8, 25u8, 135u8, 233u8, 146u8, 221u8, - 200u8, 93u8, 221u8, 188u8, 196u8, 214u8, 221u8, 110u8, 242u8, 233u8, - 252u8, - ], - ]; - /// The names of the variants in the same order as `SELECTORS`. - pub const VARIANT_NAMES: &'static [&'static str] = &[ - ::core::stringify!(PoolCreated), - ]; + pub const SELECTORS: &'static [[u8; 32usize]] = &[[ + 131u8, 164u8, 143u8, 188u8, 252u8, 153u8, 19u8, 53u8, 49u8, 78u8, 116u8, 208u8, 73u8, + 106u8, 171u8, 106u8, 25u8, 135u8, 233u8, 146u8, 221u8, 200u8, 93u8, 221u8, 188u8, + 196u8, 214u8, 221u8, 110u8, 242u8, 233u8, 252u8, + ]]; /// The signatures in the same order as `SELECTORS`. - pub const SIGNATURES: &'static [&'static str] = &[ - ::SIGNATURE, - ]; + pub const SIGNATURES: &'static [&'static str] = + &[::SIGNATURE]; + /// The names of the variants in the same order as `SELECTORS`. + pub const VARIANT_NAMES: &'static [&'static str] = &[::core::stringify!(PoolCreated)]; + /// Returns the signature for the given selector, if known. #[inline] pub fn signature_by_selector( @@ -186,42 +187,37 @@ event PoolCreated(address indexed pool); ::core::result::Result::Err(_) => ::core::option::Option::None, } } + /// Returns the enum variant name for the given selector, if known. #[inline] - pub fn name_by_selector( - selector: [u8; 32usize], - ) -> ::core::option::Option<&'static str> { + pub fn name_by_selector(selector: [u8; 32usize]) -> ::core::option::Option<&'static str> { let sig = Self::signature_by_selector(selector)?; sig.split_once('(').map(|(name, _)| name) } } #[automatically_derived] impl alloy_sol_types::SolEventInterface for BalancerV2BasePoolFactoryEvents { - const NAME: &'static str = "BalancerV2BasePoolFactoryEvents"; const COUNT: usize = 1usize; + const NAME: &'static str = "BalancerV2BasePoolFactoryEvents"; + 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, - ) + ::decode_raw_log(topics, data) .map(Self::PoolCreated) } - _ => { - 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(), - ), + _ => 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(), ), - }) - } + ), + }), } } } @@ -234,6 +230,7 @@ event PoolCreated(address indexed pool); } } } + fn into_log_data(self) -> alloy_sol_types::private::LogData { match self { Self::PoolCreated(inner) => { @@ -242,10 +239,10 @@ event PoolCreated(address indexed pool); } } } - use alloy_contract as alloy_contract; + use alloy_contract; /**Creates a new wrapper around an on-chain [`BalancerV2BasePoolFactory`](self) contract instance. -See the [wrapper's documentation](`BalancerV2BasePoolFactoryInstance`) for more details.*/ + See the [wrapper's documentation](`BalancerV2BasePoolFactoryInstance`) for more details.*/ #[inline] pub const fn new< P: alloy_contract::private::Provider, @@ -258,20 +255,17 @@ See the [wrapper's documentation](`BalancerV2BasePoolFactoryInstance`) for more } /**A [`BalancerV2BasePoolFactory`](self) instance. -Contains type-safe methods for interacting with an on-chain instance of the -[`BalancerV2BasePoolFactory`](self) contract located at a given `address`, using a given -provider `P`. + Contains type-safe methods for interacting with an on-chain instance of the + [`BalancerV2BasePoolFactory`](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. + 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.*/ + See the [module-level documentation](self) for all the available methods.*/ #[derive(Clone)] - pub struct BalancerV2BasePoolFactoryInstance< - P, - N = alloy_contract::private::Ethereum, - > { + pub struct BalancerV2BasePoolFactoryInstance { address: alloy_sol_types::private::Address, provider: P, _network: ::core::marker::PhantomData, @@ -286,39 +280,39 @@ See the [module-level documentation](self) for all the available methods.*/ } } /// Instantiation and getters/setters. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > BalancerV2BasePoolFactoryInstance { + impl, N: alloy_contract::private::Network> + BalancerV2BasePoolFactoryInstance + { /**Creates a new wrapper around an on-chain [`BalancerV2BasePoolFactory`](self) contract instance. -See the [wrapper's documentation](`BalancerV2BasePoolFactoryInstance`) for more details.*/ + See the [wrapper's documentation](`BalancerV2BasePoolFactoryInstance`) for more details.*/ #[inline] - pub const fn new( - address: alloy_sol_types::private::Address, - __provider: P, - ) -> Self { + pub const fn new(address: alloy_sol_types::private::Address, __provider: P) -> Self { Self { address, provider: __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 { @@ -326,7 +320,8 @@ See the [wrapper's documentation](`BalancerV2BasePoolFactoryInstance`) for more } } impl BalancerV2BasePoolFactoryInstance<&P, N> { - /// Clones the provider and returns a new instance with the cloned provider. + /// Clones the provider and returns a new instance with the cloned + /// provider. #[inline] pub fn with_cloned_provider(self) -> BalancerV2BasePoolFactoryInstance { BalancerV2BasePoolFactoryInstance { @@ -337,14 +332,15 @@ See the [wrapper's documentation](`BalancerV2BasePoolFactoryInstance`) for more } } /// Function calls. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > BalancerV2BasePoolFactoryInstance { - /// Creates a new call builder using this contract instance's provider and address. + impl, N: alloy_contract::private::Network> + BalancerV2BasePoolFactoryInstance + { + /// 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. + /// 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, @@ -353,25 +349,26 @@ See the [wrapper's documentation](`BalancerV2BasePoolFactoryInstance`) for more } } /// Event filters. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > BalancerV2BasePoolFactoryInstance { - /// Creates a new event filter using this contract instance's provider and address. + impl, N: alloy_contract::private::Network> + BalancerV2BasePoolFactoryInstance + { + /// 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. + /// 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 [`PoolCreated`] event. pub fn PoolCreated_filter(&self) -> alloy_contract::Event<&P, PoolCreated, N> { self.event_filter::() } } } -pub type Instance = BalancerV2BasePoolFactory::BalancerV2BasePoolFactoryInstance< - ::alloy_provider::DynProvider, ->; +pub type Instance = + BalancerV2BasePoolFactory::BalancerV2BasePoolFactoryInstance<::alloy_provider::DynProvider>; diff --git a/contracts/generated/contracts-generated/balancerv2composablestablepool/src/lib.rs b/contracts/generated/contracts-generated/balancerv2composablestablepool/src/lib.rs index 9035a556e2..7a22688432 100644 --- a/contracts/generated/contracts-generated/balancerv2composablestablepool/src/lib.rs +++ b/contracts/generated/contracts-generated/balancerv2composablestablepool/src/lib.rs @@ -1,4 +1,10 @@ -#![allow(unused_imports, unused_attributes, clippy::all, rustdoc::all, non_snake_case)] +#![allow( + unused_imports, + unused_attributes, + clippy::all, + rustdoc::all, + non_snake_case +)] //! Auto-generated contract bindings. Do not edit. ///Module containing a contract's types and functions. /** @@ -16,12 +22,11 @@ library ComposableStablePool { clippy::empty_structs_with_brackets )] pub mod ComposableStablePool { - use super::*; - use alloy_sol_types as alloy_sol_types; + use {super::*, alloy_sol_types}; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**```solidity -struct NewPoolParams { address vault; address protocolFeeProvider; string name; string symbol; address[] tokens; address[] rateProviders; uint256[] tokenRateCacheDurations; bool[] exemptFromYieldProtocolFeeFlags; uint256 amplificationParameter; uint256 swapFeePercentage; uint256 pauseWindowDuration; uint256 bufferPeriodDuration; address owner; string version; } -```*/ + struct NewPoolParams { address vault; address protocolFeeProvider; string name; string symbol; address[] tokens; address[] rateProviders; uint256[] tokenRateCacheDurations; bool[] exemptFromYieldProtocolFeeFlags; uint256 amplificationParameter; uint256 swapFeePercentage; uint256 pauseWindowDuration; uint256 bufferPeriodDuration; address owner; string version; } + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct NewPoolParams { @@ -36,13 +41,10 @@ struct NewPoolParams { address vault; address protocolFeeProvider; string name; #[allow(missing_docs)] pub tokens: alloy_sol_types::private::Vec, #[allow(missing_docs)] - pub rateProviders: alloy_sol_types::private::Vec< - alloy_sol_types::private::Address, - >, + pub rateProviders: alloy_sol_types::private::Vec, #[allow(missing_docs)] - pub tokenRateCacheDurations: alloy_sol_types::private::Vec< - alloy_sol_types::private::primitives::aliases::U256, - >, + pub tokenRateCacheDurations: + alloy_sol_types::private::Vec, #[allow(missing_docs)] pub exemptFromYieldProtocolFeeFlags: alloy_sol_types::private::Vec, #[allow(missing_docs)] @@ -65,7 +67,7 @@ struct NewPoolParams { address vault; address protocolFeeProvider; string name; clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[doc(hidden)] #[allow(dead_code)] type UnderlyingSolTuple<'a> = ( @@ -92,9 +94,7 @@ struct NewPoolParams { address vault; address protocolFeeProvider; string name; alloy_sol_types::private::String, alloy_sol_types::private::Vec, alloy_sol_types::private::Vec, - alloy_sol_types::private::Vec< - alloy_sol_types::private::primitives::aliases::U256, - >, + alloy_sol_types::private::Vec, alloy_sol_types::private::Vec, alloy_sol_types::private::primitives::aliases::U256, alloy_sol_types::private::primitives::aliases::U256, @@ -105,9 +105,7 @@ struct NewPoolParams { address vault; address protocolFeeProvider; string name; ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -217,91 +215,93 @@ struct NewPoolParams { address vault; address protocolFeeProvider; string name; ), ) } + #[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) + 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) + 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) + 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 NewPoolParams { type RustType = Self; - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + + const ENCODED_SIZE: Option = + as alloy_sol_types::SolType>::ENCODED_SIZE; + const PACKED_ENCODED_SIZE: Option = + as alloy_sol_types::SolType>::PACKED_ENCODED_SIZE; 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); + let tuple = as alloy_sol_types::SolType>::detokenize(token); >>::from(tuple) } } #[automatically_derived] impl alloy_sol_types::SolStruct for NewPoolParams { const NAME: &'static str = "NewPoolParams"; + #[inline] fn eip712_root_type() -> alloy_sol_types::private::Cow<'static, str> { alloy_sol_types::private::Cow::Borrowed( - "NewPoolParams(address vault,address protocolFeeProvider,string name,string symbol,address[] tokens,address[] rateProviders,uint256[] tokenRateCacheDurations,bool[] exemptFromYieldProtocolFeeFlags,uint256 amplificationParameter,uint256 swapFeePercentage,uint256 pauseWindowDuration,uint256 bufferPeriodDuration,address owner,string version)", + "NewPoolParams(address vault,address protocolFeeProvider,string name,string \ + symbol,address[] tokens,address[] rateProviders,uint256[] \ + tokenRateCacheDurations,bool[] exemptFromYieldProtocolFeeFlags,uint256 \ + amplificationParameter,uint256 swapFeePercentage,uint256 \ + pauseWindowDuration,uint256 bufferPeriodDuration,address owner,string \ + version)", ) } + #[inline] - fn eip712_components() -> alloy_sol_types::private::Vec< - alloy_sol_types::private::Cow<'static, str>, - > { + fn eip712_components() + -> alloy_sol_types::private::Vec> + { 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 { [ @@ -441,14 +441,13 @@ struct NewPoolParams { address vault; address protocolFeeProvider; string name; &rust.version, ) } + #[inline] fn encode_topic_preimage( rust: &Self::RustType, out: &mut alloy_sol_types::private::Vec, ) { - out.reserve( - ::topic_preimage_length(rust), - ); + out.reserve(::topic_preimage_length(rust)); ::encode_topic_preimage( &rust.vault, out, @@ -522,25 +521,19 @@ struct NewPoolParams { address vault; address protocolFeeProvider; string name; out, ); } + #[inline] - fn encode_topic( - rust: &Self::RustType, - ) -> alloy_sol_types::abi::token::WordToken { + 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), - ) + ::encode_topic_preimage(rust, &mut out); + alloy_sol_types::abi::token::WordToken(alloy_sol_types::private::keccak256(out)) } } }; - use alloy_contract as alloy_contract; + use alloy_contract; /**Creates a new wrapper around an on-chain [`ComposableStablePool`](self) contract instance. -See the [wrapper's documentation](`ComposableStablePoolInstance`) for more details.*/ + See the [wrapper's documentation](`ComposableStablePoolInstance`) for more details.*/ #[inline] pub const fn new< P: alloy_contract::private::Provider, @@ -553,15 +546,15 @@ See the [wrapper's documentation](`ComposableStablePoolInstance`) for more detai } /**A [`ComposableStablePool`](self) instance. -Contains type-safe methods for interacting with an on-chain instance of the -[`ComposableStablePool`](self) contract located at a given `address`, using a given -provider `P`. + Contains type-safe methods for interacting with an on-chain instance of the + [`ComposableStablePool`](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. + 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.*/ + See the [module-level documentation](self) for all the available methods.*/ #[derive(Clone)] pub struct ComposableStablePoolInstance { address: alloy_sol_types::private::Address, @@ -572,43 +565,45 @@ See the [module-level documentation](self) for all the available methods.*/ impl ::core::fmt::Debug for ComposableStablePoolInstance { #[inline] fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { - f.debug_tuple("ComposableStablePoolInstance").field(&self.address).finish() + f.debug_tuple("ComposableStablePoolInstance") + .field(&self.address) + .finish() } } /// Instantiation and getters/setters. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > ComposableStablePoolInstance { + impl, N: alloy_contract::private::Network> + ComposableStablePoolInstance + { /**Creates a new wrapper around an on-chain [`ComposableStablePool`](self) contract instance. -See the [wrapper's documentation](`ComposableStablePoolInstance`) for more details.*/ + See the [wrapper's documentation](`ComposableStablePoolInstance`) for more details.*/ #[inline] - pub const fn new( - address: alloy_sol_types::private::Address, - __provider: P, - ) -> Self { + pub const fn new(address: alloy_sol_types::private::Address, __provider: P) -> Self { Self { address, provider: __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 { @@ -616,7 +611,8 @@ See the [wrapper's documentation](`ComposableStablePoolInstance`) for more detai } } impl ComposableStablePoolInstance<&P, N> { - /// Clones the provider and returns a new instance with the cloned provider. + /// Clones the provider and returns a new instance with the cloned + /// provider. #[inline] pub fn with_cloned_provider(self) -> ComposableStablePoolInstance { ComposableStablePoolInstance { @@ -627,14 +623,15 @@ See the [wrapper's documentation](`ComposableStablePoolInstance`) for more detai } } /// Function calls. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > ComposableStablePoolInstance { - /// Creates a new call builder using this contract instance's provider and address. + impl, N: alloy_contract::private::Network> + ComposableStablePoolInstance + { + /// 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. + /// 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, @@ -643,14 +640,15 @@ See the [wrapper's documentation](`ComposableStablePoolInstance`) for more detai } } /// Event filters. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > ComposableStablePoolInstance { - /// Creates a new event filter using this contract instance's provider and address. + impl, N: alloy_contract::private::Network> + ComposableStablePoolInstance + { + /// 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. + /// 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> { @@ -1347,13 +1345,12 @@ interface BalancerV2ComposableStablePool { clippy::empty_structs_with_brackets )] pub mod BalancerV2ComposableStablePool { - use super::*; - use alloy_sol_types as alloy_sol_types; + use {super::*, alloy_sol_types}; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Event with signature `AmpUpdateStarted(uint256,uint256,uint256,uint256)` and selector `0x1835882ee7a34ac194f717a35e09bb1d24c82a3b9d854ab6c9749525b714cdf2`. -```solidity -event AmpUpdateStarted(uint256 startValue, uint256 endValue, uint256 startTime, uint256 endTime); -```*/ + ```solidity + event AmpUpdateStarted(uint256 startValue, uint256 endValue, uint256 startTime, uint256 endTime); + ```*/ #[allow( non_camel_case_types, non_snake_case, @@ -1378,26 +1375,27 @@ event AmpUpdateStarted(uint256 startValue, uint256 endValue, uint256 startTime, clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[automatically_derived] impl alloy_sol_types::SolEvent for AmpUpdateStarted { + type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type DataTuple<'a> = ( alloy_sol_types::sol_data::Uint<256>, alloy_sol_types::sol_data::Uint<256>, alloy_sol_types::sol_data::Uint<256>, 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>,); - const SIGNATURE: &'static str = "AmpUpdateStarted(uint256,uint256,uint256,uint256)"; - const SIGNATURE_HASH: alloy_sol_types::private::B256 = alloy_sol_types::private::B256::new([ - 24u8, 53u8, 136u8, 46u8, 231u8, 163u8, 74u8, 193u8, 148u8, 247u8, 23u8, - 163u8, 94u8, 9u8, 187u8, 29u8, 36u8, 200u8, 42u8, 59u8, 157u8, 133u8, - 74u8, 182u8, 201u8, 116u8, 149u8, 37u8, 183u8, 20u8, 205u8, 242u8, - ]); + const ANONYMOUS: bool = false; + const SIGNATURE: &'static str = "AmpUpdateStarted(uint256,uint256,uint256,uint256)"; + const SIGNATURE_HASH: alloy_sol_types::private::B256 = + alloy_sol_types::private::B256::new([ + 24u8, 53u8, 136u8, 46u8, 231u8, 163u8, 74u8, 193u8, 148u8, 247u8, 23u8, 163u8, + 94u8, 9u8, 187u8, 29u8, 36u8, 200u8, 42u8, 59u8, 157u8, 133u8, 74u8, 182u8, + 201u8, 116u8, 149u8, 37u8, 183u8, 20u8, 205u8, 242u8, + ]); + #[allow(unused_variables)] #[inline] fn new( @@ -1411,42 +1409,44 @@ event AmpUpdateStarted(uint256 startValue, uint256 endValue, uint256 startTime, endTime: data.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, - ), - ); + 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.startValue), - as alloy_sol_types::SolType>::tokenize(&self.endValue), - as alloy_sol_types::SolType>::tokenize(&self.startTime), - as alloy_sol_types::SolType>::tokenize(&self.endTime), + as alloy_sol_types::SolType>::tokenize( + &self.startValue, + ), + as alloy_sol_types::SolType>::tokenize( + &self.endValue, + ), + as alloy_sol_types::SolType>::tokenize( + &self.startTime, + ), + as alloy_sol_types::SolType>::tokenize( + &self.endTime, + ), ) } + #[inline] fn topics(&self) -> ::RustType { (Self::SIGNATURE_HASH.into(),) } + #[inline] fn encode_topics_raw( &self, @@ -1455,9 +1455,7 @@ event AmpUpdateStarted(uint256 startValue, uint256 endValue, uint256 startTime, if out.len() < ::COUNT { return Err(alloy_sol_types::Error::Overrun); } - out[0usize] = alloy_sol_types::abi::token::WordToken( - Self::SIGNATURE_HASH, - ); + out[0usize] = alloy_sol_types::abi::token::WordToken(Self::SIGNATURE_HASH); Ok(()) } } @@ -1466,6 +1464,7 @@ event AmpUpdateStarted(uint256 startValue, uint256 endValue, uint256 startTime, 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) } @@ -1480,9 +1479,9 @@ event AmpUpdateStarted(uint256 startValue, uint256 endValue, uint256 startTime, }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Event with signature `AmpUpdateStopped(uint256)` and selector `0xa0d01593e47e69d07e0ccd87bece09411e07dd1ed40ca8f2e7af2976542a0233`. -```solidity -event AmpUpdateStopped(uint256 currentValue); -```*/ + ```solidity + event AmpUpdateStopped(uint256 currentValue); + ```*/ #[allow( non_camel_case_types, non_snake_case, @@ -1501,56 +1500,61 @@ event AmpUpdateStopped(uint256 currentValue); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[automatically_derived] impl alloy_sol_types::SolEvent for AmpUpdateStopped { + type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; 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>,); - const SIGNATURE: &'static str = "AmpUpdateStopped(uint256)"; - const SIGNATURE_HASH: alloy_sol_types::private::B256 = alloy_sol_types::private::B256::new([ - 160u8, 208u8, 21u8, 147u8, 228u8, 126u8, 105u8, 208u8, 126u8, 12u8, - 205u8, 135u8, 190u8, 206u8, 9u8, 65u8, 30u8, 7u8, 221u8, 30u8, 212u8, - 12u8, 168u8, 242u8, 231u8, 175u8, 41u8, 118u8, 84u8, 42u8, 2u8, 51u8, - ]); + const ANONYMOUS: bool = false; + const SIGNATURE: &'static str = "AmpUpdateStopped(uint256)"; + const SIGNATURE_HASH: alloy_sol_types::private::B256 = + alloy_sol_types::private::B256::new([ + 160u8, 208u8, 21u8, 147u8, 228u8, 126u8, 105u8, 208u8, 126u8, 12u8, 205u8, + 135u8, 190u8, 206u8, 9u8, 65u8, 30u8, 7u8, 221u8, 30u8, 212u8, 12u8, 168u8, + 242u8, 231u8, 175u8, 41u8, 118u8, 84u8, 42u8, 2u8, 51u8, + ]); + #[allow(unused_variables)] #[inline] fn new( topics: ::RustType, data: as alloy_sol_types::SolType>::RustType, ) -> Self { - Self { currentValue: data.0 } + Self { + currentValue: 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, - ), - ); + 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.currentValue), + as alloy_sol_types::SolType>::tokenize( + &self.currentValue, + ), ) } + #[inline] fn topics(&self) -> ::RustType { (Self::SIGNATURE_HASH.into(),) } + #[inline] fn encode_topics_raw( &self, @@ -1559,9 +1563,7 @@ event AmpUpdateStopped(uint256 currentValue); if out.len() < ::COUNT { return Err(alloy_sol_types::Error::Overrun); } - out[0usize] = alloy_sol_types::abi::token::WordToken( - Self::SIGNATURE_HASH, - ); + out[0usize] = alloy_sol_types::abi::token::WordToken(Self::SIGNATURE_HASH); Ok(()) } } @@ -1570,6 +1572,7 @@ event AmpUpdateStopped(uint256 currentValue); 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) } @@ -1584,9 +1587,9 @@ event AmpUpdateStopped(uint256 currentValue); }; #[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); -```*/ + ```solidity + event Approval(address indexed owner, address indexed spender, uint256 value); + ```*/ #[allow( non_camel_case_types, non_snake_case, @@ -1609,25 +1612,26 @@ event Approval(address indexed owner, address indexed spender, uint256 value); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[automatically_derived] impl alloy_sol_types::SolEvent for Approval { + type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; 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; + 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, + ]); + #[allow(unused_variables)] #[inline] fn new( @@ -1640,33 +1644,39 @@ event Approval(address indexed owner, address indexed spender, uint256 value); 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, - ), - ); + 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), + as alloy_sol_types::SolType>::tokenize( + &self.value, + ), ) } + #[inline] fn topics(&self) -> ::RustType { - (Self::SIGNATURE_HASH.into(), self.owner.clone(), self.spender.clone()) + ( + Self::SIGNATURE_HASH.into(), + self.owner.clone(), + self.spender.clone(), + ) } + #[inline] fn encode_topics_raw( &self, @@ -1675,9 +1685,7 @@ event Approval(address indexed owner, address indexed spender, uint256 value); if out.len() < ::COUNT { return Err(alloy_sol_types::Error::Overrun); } - out[0usize] = alloy_sol_types::abi::token::WordToken( - Self::SIGNATURE_HASH, - ); + out[0usize] = alloy_sol_types::abi::token::WordToken(Self::SIGNATURE_HASH); out[1usize] = ::encode_topic( &self.owner, ); @@ -1692,6 +1700,7 @@ event Approval(address indexed owner, address indexed spender, uint256 value); 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) } @@ -1706,9 +1715,9 @@ event Approval(address indexed owner, address indexed spender, uint256 value); }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Event with signature `PausedStateChanged(bool)` and selector `0x9e3a5e37224532dea67b89face185703738a228a6e8a23dee546960180d3be64`. -```solidity -event PausedStateChanged(bool paused); -```*/ + ```solidity + event PausedStateChanged(bool paused); + ```*/ #[allow( non_camel_case_types, non_snake_case, @@ -1727,21 +1736,22 @@ event PausedStateChanged(bool paused); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[automatically_derived] impl alloy_sol_types::SolEvent for PausedStateChanged { + type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type DataTuple<'a> = (alloy_sol_types::sol_data::Bool,); - type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type TopicList = (alloy_sol_types::sol_data::FixedBytes<32>,); - const SIGNATURE: &'static str = "PausedStateChanged(bool)"; - const SIGNATURE_HASH: alloy_sol_types::private::B256 = alloy_sol_types::private::B256::new([ - 158u8, 58u8, 94u8, 55u8, 34u8, 69u8, 50u8, 222u8, 166u8, 123u8, 137u8, - 250u8, 206u8, 24u8, 87u8, 3u8, 115u8, 138u8, 34u8, 138u8, 110u8, 138u8, - 35u8, 222u8, 229u8, 70u8, 150u8, 1u8, 128u8, 211u8, 190u8, 100u8, - ]); + const ANONYMOUS: bool = false; + const SIGNATURE: &'static str = "PausedStateChanged(bool)"; + const SIGNATURE_HASH: alloy_sol_types::private::B256 = + alloy_sol_types::private::B256::new([ + 158u8, 58u8, 94u8, 55u8, 34u8, 69u8, 50u8, 222u8, 166u8, 123u8, 137u8, 250u8, + 206u8, 24u8, 87u8, 3u8, 115u8, 138u8, 34u8, 138u8, 110u8, 138u8, 35u8, 222u8, + 229u8, 70u8, 150u8, 1u8, 128u8, 211u8, 190u8, 100u8, + ]); + #[allow(unused_variables)] #[inline] fn new( @@ -1750,21 +1760,21 @@ event PausedStateChanged(bool paused); ) -> Self { Self { paused: 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, - ), - ); + 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<'_> { ( @@ -1773,10 +1783,12 @@ event PausedStateChanged(bool paused); ), ) } + #[inline] fn topics(&self) -> ::RustType { (Self::SIGNATURE_HASH.into(),) } + #[inline] fn encode_topics_raw( &self, @@ -1785,9 +1797,7 @@ event PausedStateChanged(bool paused); if out.len() < ::COUNT { return Err(alloy_sol_types::Error::Overrun); } - out[0usize] = alloy_sol_types::abi::token::WordToken( - Self::SIGNATURE_HASH, - ); + out[0usize] = alloy_sol_types::abi::token::WordToken(Self::SIGNATURE_HASH); Ok(()) } } @@ -1796,6 +1806,7 @@ event PausedStateChanged(bool 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) } @@ -1810,9 +1821,9 @@ event PausedStateChanged(bool paused); }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Event with signature `ProtocolFeePercentageCacheUpdated(uint256,uint256)` and selector `0x6bfb689528fa96ec1ad670ad6d6064be1ae96bfd5d2ee35c837fd0fe0c11959a`. -```solidity -event ProtocolFeePercentageCacheUpdated(uint256 indexed feeType, uint256 protocolFeePercentage); -```*/ + ```solidity + event ProtocolFeePercentageCacheUpdated(uint256 indexed feeType, uint256 protocolFeePercentage); + ```*/ #[allow( non_camel_case_types, non_snake_case, @@ -1833,24 +1844,25 @@ event ProtocolFeePercentageCacheUpdated(uint256 indexed feeType, uint256 protoco clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[automatically_derived] impl alloy_sol_types::SolEvent for ProtocolFeePercentageCacheUpdated { + type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; 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::Uint<256>, ); - const SIGNATURE: &'static str = "ProtocolFeePercentageCacheUpdated(uint256,uint256)"; - const SIGNATURE_HASH: alloy_sol_types::private::B256 = alloy_sol_types::private::B256::new([ - 107u8, 251u8, 104u8, 149u8, 40u8, 250u8, 150u8, 236u8, 26u8, 214u8, - 112u8, 173u8, 109u8, 96u8, 100u8, 190u8, 26u8, 233u8, 107u8, 253u8, 93u8, - 46u8, 227u8, 92u8, 131u8, 127u8, 208u8, 254u8, 12u8, 17u8, 149u8, 154u8, - ]); + const ANONYMOUS: bool = false; + const SIGNATURE: &'static str = "ProtocolFeePercentageCacheUpdated(uint256,uint256)"; + const SIGNATURE_HASH: alloy_sol_types::private::B256 = + alloy_sol_types::private::B256::new([ + 107u8, 251u8, 104u8, 149u8, 40u8, 250u8, 150u8, 236u8, 26u8, 214u8, 112u8, + 173u8, 109u8, 96u8, 100u8, 190u8, 26u8, 233u8, 107u8, 253u8, 93u8, 46u8, 227u8, + 92u8, 131u8, 127u8, 208u8, 254u8, 12u8, 17u8, 149u8, 154u8, + ]); + #[allow(unused_variables)] #[inline] fn new( @@ -1862,35 +1874,35 @@ event ProtocolFeePercentageCacheUpdated(uint256 indexed feeType, uint256 protoco protocolFeePercentage: 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, - ), - ); + 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( + as alloy_sol_types::SolType>::tokenize( &self.protocolFeePercentage, ), ) } + #[inline] fn topics(&self) -> ::RustType { (Self::SIGNATURE_HASH.into(), self.feeType.clone()) } + #[inline] fn encode_topics_raw( &self, @@ -1899,9 +1911,7 @@ event ProtocolFeePercentageCacheUpdated(uint256 indexed feeType, uint256 protoco if out.len() < ::COUNT { return Err(alloy_sol_types::Error::Overrun); } - out[0usize] = alloy_sol_types::abi::token::WordToken( - Self::SIGNATURE_HASH, - ); + out[0usize] = alloy_sol_types::abi::token::WordToken(Self::SIGNATURE_HASH); out[1usize] = as alloy_sol_types::EventTopic>::encode_topic(&self.feeType); @@ -1909,31 +1919,28 @@ event ProtocolFeePercentageCacheUpdated(uint256 indexed feeType, uint256 protoco } } #[automatically_derived] - impl alloy_sol_types::private::IntoLogData - for ProtocolFeePercentageCacheUpdated { + impl alloy_sol_types::private::IntoLogData for ProtocolFeePercentageCacheUpdated { 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<&ProtocolFeePercentageCacheUpdated> - for alloy_sol_types::private::LogData { + impl From<&ProtocolFeePercentageCacheUpdated> for alloy_sol_types::private::LogData { #[inline] - fn from( - this: &ProtocolFeePercentageCacheUpdated, - ) -> alloy_sol_types::private::LogData { + fn from(this: &ProtocolFeePercentageCacheUpdated) -> alloy_sol_types::private::LogData { alloy_sol_types::SolEvent::encode_log_data(this) } } }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Event with signature `RecoveryModeStateChanged(bool)` and selector `0xeff3d4d215b42bf0960be9c6d5e05c22cba4df6627a3a523e2acee733b5854c8`. -```solidity -event RecoveryModeStateChanged(bool enabled); -```*/ + ```solidity + event RecoveryModeStateChanged(bool enabled); + ```*/ #[allow( non_camel_case_types, non_snake_case, @@ -1952,21 +1959,22 @@ event RecoveryModeStateChanged(bool enabled); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[automatically_derived] impl alloy_sol_types::SolEvent for RecoveryModeStateChanged { + type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type DataTuple<'a> = (alloy_sol_types::sol_data::Bool,); - type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type TopicList = (alloy_sol_types::sol_data::FixedBytes<32>,); - const SIGNATURE: &'static str = "RecoveryModeStateChanged(bool)"; - const SIGNATURE_HASH: alloy_sol_types::private::B256 = alloy_sol_types::private::B256::new([ - 239u8, 243u8, 212u8, 210u8, 21u8, 180u8, 43u8, 240u8, 150u8, 11u8, 233u8, - 198u8, 213u8, 224u8, 92u8, 34u8, 203u8, 164u8, 223u8, 102u8, 39u8, 163u8, - 165u8, 35u8, 226u8, 172u8, 238u8, 115u8, 59u8, 88u8, 84u8, 200u8, - ]); + const ANONYMOUS: bool = false; + const SIGNATURE: &'static str = "RecoveryModeStateChanged(bool)"; + const SIGNATURE_HASH: alloy_sol_types::private::B256 = + alloy_sol_types::private::B256::new([ + 239u8, 243u8, 212u8, 210u8, 21u8, 180u8, 43u8, 240u8, 150u8, 11u8, 233u8, + 198u8, 213u8, 224u8, 92u8, 34u8, 203u8, 164u8, 223u8, 102u8, 39u8, 163u8, + 165u8, 35u8, 226u8, 172u8, 238u8, 115u8, 59u8, 88u8, 84u8, 200u8, + ]); + #[allow(unused_variables)] #[inline] fn new( @@ -1975,21 +1983,21 @@ event RecoveryModeStateChanged(bool enabled); ) -> Self { Self { enabled: 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, - ), - ); + 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<'_> { ( @@ -1998,10 +2006,12 @@ event RecoveryModeStateChanged(bool enabled); ), ) } + #[inline] fn topics(&self) -> ::RustType { (Self::SIGNATURE_HASH.into(),) } + #[inline] fn encode_topics_raw( &self, @@ -2010,9 +2020,7 @@ event RecoveryModeStateChanged(bool enabled); if out.len() < ::COUNT { return Err(alloy_sol_types::Error::Overrun); } - out[0usize] = alloy_sol_types::abi::token::WordToken( - Self::SIGNATURE_HASH, - ); + out[0usize] = alloy_sol_types::abi::token::WordToken(Self::SIGNATURE_HASH); Ok(()) } } @@ -2021,6 +2029,7 @@ event RecoveryModeStateChanged(bool enabled); 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) } @@ -2028,18 +2037,16 @@ event RecoveryModeStateChanged(bool enabled); #[automatically_derived] impl From<&RecoveryModeStateChanged> for alloy_sol_types::private::LogData { #[inline] - fn from( - this: &RecoveryModeStateChanged, - ) -> alloy_sol_types::private::LogData { + fn from(this: &RecoveryModeStateChanged) -> alloy_sol_types::private::LogData { alloy_sol_types::SolEvent::encode_log_data(this) } } }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Event with signature `SwapFeePercentageChanged(uint256)` and selector `0xa9ba3ffe0b6c366b81232caab38605a0699ad5398d6cce76f91ee809e322dafc`. -```solidity -event SwapFeePercentageChanged(uint256 swapFeePercentage); -```*/ + ```solidity + event SwapFeePercentageChanged(uint256 swapFeePercentage); + ```*/ #[allow( non_camel_case_types, non_snake_case, @@ -2058,56 +2065,61 @@ event SwapFeePercentageChanged(uint256 swapFeePercentage); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[automatically_derived] impl alloy_sol_types::SolEvent for SwapFeePercentageChanged { + type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; 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>,); - const SIGNATURE: &'static str = "SwapFeePercentageChanged(uint256)"; - const SIGNATURE_HASH: alloy_sol_types::private::B256 = alloy_sol_types::private::B256::new([ - 169u8, 186u8, 63u8, 254u8, 11u8, 108u8, 54u8, 107u8, 129u8, 35u8, 44u8, - 170u8, 179u8, 134u8, 5u8, 160u8, 105u8, 154u8, 213u8, 57u8, 141u8, 108u8, - 206u8, 118u8, 249u8, 30u8, 232u8, 9u8, 227u8, 34u8, 218u8, 252u8, - ]); + const ANONYMOUS: bool = false; + const SIGNATURE: &'static str = "SwapFeePercentageChanged(uint256)"; + const SIGNATURE_HASH: alloy_sol_types::private::B256 = + alloy_sol_types::private::B256::new([ + 169u8, 186u8, 63u8, 254u8, 11u8, 108u8, 54u8, 107u8, 129u8, 35u8, 44u8, 170u8, + 179u8, 134u8, 5u8, 160u8, 105u8, 154u8, 213u8, 57u8, 141u8, 108u8, 206u8, + 118u8, 249u8, 30u8, 232u8, 9u8, 227u8, 34u8, 218u8, 252u8, + ]); + #[allow(unused_variables)] #[inline] fn new( topics: ::RustType, data: as alloy_sol_types::SolType>::RustType, ) -> Self { - Self { swapFeePercentage: data.0 } + Self { + swapFeePercentage: 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, - ), - ); + 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.swapFeePercentage), + as alloy_sol_types::SolType>::tokenize( + &self.swapFeePercentage, + ), ) } + #[inline] fn topics(&self) -> ::RustType { (Self::SIGNATURE_HASH.into(),) } + #[inline] fn encode_topics_raw( &self, @@ -2116,9 +2128,7 @@ event SwapFeePercentageChanged(uint256 swapFeePercentage); if out.len() < ::COUNT { return Err(alloy_sol_types::Error::Overrun); } - out[0usize] = alloy_sol_types::abi::token::WordToken( - Self::SIGNATURE_HASH, - ); + out[0usize] = alloy_sol_types::abi::token::WordToken(Self::SIGNATURE_HASH); Ok(()) } } @@ -2127,6 +2137,7 @@ event SwapFeePercentageChanged(uint256 swapFeePercentage); 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) } @@ -2134,18 +2145,16 @@ event SwapFeePercentageChanged(uint256 swapFeePercentage); #[automatically_derived] impl From<&SwapFeePercentageChanged> for alloy_sol_types::private::LogData { #[inline] - fn from( - this: &SwapFeePercentageChanged, - ) -> alloy_sol_types::private::LogData { + fn from(this: &SwapFeePercentageChanged) -> alloy_sol_types::private::LogData { alloy_sol_types::SolEvent::encode_log_data(this) } } }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Event with signature `TokenRateCacheUpdated(uint256,uint256)` and selector `0xb77a83204ca282e08dc3a65b0a1ca32ea4e6875c38ef0bf5bf75e52a67354fac`. -```solidity -event TokenRateCacheUpdated(uint256 indexed tokenIndex, uint256 rate); -```*/ + ```solidity + event TokenRateCacheUpdated(uint256 indexed tokenIndex, uint256 rate); + ```*/ #[allow( non_camel_case_types, non_snake_case, @@ -2166,24 +2175,25 @@ event TokenRateCacheUpdated(uint256 indexed tokenIndex, uint256 rate); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[automatically_derived] impl alloy_sol_types::SolEvent for TokenRateCacheUpdated { + type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; 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::Uint<256>, ); - const SIGNATURE: &'static str = "TokenRateCacheUpdated(uint256,uint256)"; - const SIGNATURE_HASH: alloy_sol_types::private::B256 = alloy_sol_types::private::B256::new([ - 183u8, 122u8, 131u8, 32u8, 76u8, 162u8, 130u8, 224u8, 141u8, 195u8, - 166u8, 91u8, 10u8, 28u8, 163u8, 46u8, 164u8, 230u8, 135u8, 92u8, 56u8, - 239u8, 11u8, 245u8, 191u8, 117u8, 229u8, 42u8, 103u8, 53u8, 79u8, 172u8, - ]); + const ANONYMOUS: bool = false; + const SIGNATURE: &'static str = "TokenRateCacheUpdated(uint256,uint256)"; + const SIGNATURE_HASH: alloy_sol_types::private::B256 = + alloy_sol_types::private::B256::new([ + 183u8, 122u8, 131u8, 32u8, 76u8, 162u8, 130u8, 224u8, 141u8, 195u8, 166u8, + 91u8, 10u8, 28u8, 163u8, 46u8, 164u8, 230u8, 135u8, 92u8, 56u8, 239u8, 11u8, + 245u8, 191u8, 117u8, 229u8, 42u8, 103u8, 53u8, 79u8, 172u8, + ]); + #[allow(unused_variables)] #[inline] fn new( @@ -2195,33 +2205,35 @@ event TokenRateCacheUpdated(uint256 indexed tokenIndex, uint256 rate); rate: 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, - ), - ); + 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.rate), + as alloy_sol_types::SolType>::tokenize( + &self.rate, + ), ) } + #[inline] fn topics(&self) -> ::RustType { (Self::SIGNATURE_HASH.into(), self.tokenIndex.clone()) } + #[inline] fn encode_topics_raw( &self, @@ -2230,9 +2242,7 @@ event TokenRateCacheUpdated(uint256 indexed tokenIndex, uint256 rate); if out.len() < ::COUNT { return Err(alloy_sol_types::Error::Overrun); } - out[0usize] = alloy_sol_types::abi::token::WordToken( - Self::SIGNATURE_HASH, - ); + out[0usize] = alloy_sol_types::abi::token::WordToken(Self::SIGNATURE_HASH); out[1usize] = as alloy_sol_types::EventTopic>::encode_topic(&self.tokenIndex); @@ -2244,6 +2254,7 @@ event TokenRateCacheUpdated(uint256 indexed tokenIndex, uint256 rate); 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) } @@ -2258,9 +2269,9 @@ event TokenRateCacheUpdated(uint256 indexed tokenIndex, uint256 rate); }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Event with signature `TokenRateProviderSet(uint256,address,uint256)` and selector `0xdd6d1c9badb346de6925b358a472c937b41698d2632696759e43fd6527feeec4`. -```solidity -event TokenRateProviderSet(uint256 indexed tokenIndex, address indexed provider, uint256 cacheDuration); -```*/ + ```solidity + event TokenRateProviderSet(uint256 indexed tokenIndex, address indexed provider, uint256 cacheDuration); + ```*/ #[allow( non_camel_case_types, non_snake_case, @@ -2283,25 +2294,26 @@ event TokenRateProviderSet(uint256 indexed tokenIndex, address indexed provider, clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[automatically_derived] impl alloy_sol_types::SolEvent for TokenRateProviderSet { + type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; 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::Uint<256>, alloy_sol_types::sol_data::Address, ); - const SIGNATURE: &'static str = "TokenRateProviderSet(uint256,address,uint256)"; - const SIGNATURE_HASH: alloy_sol_types::private::B256 = alloy_sol_types::private::B256::new([ - 221u8, 109u8, 28u8, 155u8, 173u8, 179u8, 70u8, 222u8, 105u8, 37u8, 179u8, - 88u8, 164u8, 114u8, 201u8, 55u8, 180u8, 22u8, 152u8, 210u8, 99u8, 38u8, - 150u8, 117u8, 158u8, 67u8, 253u8, 101u8, 39u8, 254u8, 238u8, 196u8, - ]); + const ANONYMOUS: bool = false; + const SIGNATURE: &'static str = "TokenRateProviderSet(uint256,address,uint256)"; + const SIGNATURE_HASH: alloy_sol_types::private::B256 = + alloy_sol_types::private::B256::new([ + 221u8, 109u8, 28u8, 155u8, 173u8, 179u8, 70u8, 222u8, 105u8, 37u8, 179u8, 88u8, + 164u8, 114u8, 201u8, 55u8, 180u8, 22u8, 152u8, 210u8, 99u8, 38u8, 150u8, 117u8, + 158u8, 67u8, 253u8, 101u8, 39u8, 254u8, 238u8, 196u8, + ]); + #[allow(unused_variables)] #[inline] fn new( @@ -2314,29 +2326,30 @@ event TokenRateProviderSet(uint256 indexed tokenIndex, address indexed provider, cacheDuration: 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, - ), - ); + 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.cacheDuration), + as alloy_sol_types::SolType>::tokenize( + &self.cacheDuration, + ), ) } + #[inline] fn topics(&self) -> ::RustType { ( @@ -2345,6 +2358,7 @@ event TokenRateProviderSet(uint256 indexed tokenIndex, address indexed provider, self.provider.clone(), ) } + #[inline] fn encode_topics_raw( &self, @@ -2353,9 +2367,7 @@ event TokenRateProviderSet(uint256 indexed tokenIndex, address indexed provider, if out.len() < ::COUNT { return Err(alloy_sol_types::Error::Overrun); } - out[0usize] = alloy_sol_types::abi::token::WordToken( - Self::SIGNATURE_HASH, - ); + out[0usize] = alloy_sol_types::abi::token::WordToken(Self::SIGNATURE_HASH); out[1usize] = as alloy_sol_types::EventTopic>::encode_topic(&self.tokenIndex); @@ -2370,6 +2382,7 @@ event TokenRateProviderSet(uint256 indexed tokenIndex, address indexed provider, 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) } @@ -2384,9 +2397,9 @@ event TokenRateProviderSet(uint256 indexed tokenIndex, address indexed provider, }; #[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); -```*/ + ```solidity + event Transfer(address indexed from, address indexed to, uint256 value); + ```*/ #[allow( non_camel_case_types, non_snake_case, @@ -2409,25 +2422,26 @@ event Transfer(address indexed from, address indexed to, uint256 value); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[automatically_derived] impl alloy_sol_types::SolEvent for Transfer { + type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; 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; + 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, + ]); + #[allow(unused_variables)] #[inline] fn new( @@ -2440,33 +2454,39 @@ event Transfer(address indexed from, address indexed to, uint256 value); 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, - ), - ); + 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), + as alloy_sol_types::SolType>::tokenize( + &self.value, + ), ) } + #[inline] fn topics(&self) -> ::RustType { - (Self::SIGNATURE_HASH.into(), self.from.clone(), self.to.clone()) + ( + Self::SIGNATURE_HASH.into(), + self.from.clone(), + self.to.clone(), + ) } + #[inline] fn encode_topics_raw( &self, @@ -2475,9 +2495,7 @@ event Transfer(address indexed from, address indexed to, uint256 value); if out.len() < ::COUNT { return Err(alloy_sol_types::Error::Overrun); } - out[0usize] = alloy_sol_types::abi::token::WordToken( - Self::SIGNATURE_HASH, - ); + out[0usize] = alloy_sol_types::abi::token::WordToken(Self::SIGNATURE_HASH); out[1usize] = ::encode_topic( &self.from, ); @@ -2492,6 +2510,7 @@ event Transfer(address indexed from, address indexed to, uint256 value); 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) } @@ -2505,9 +2524,9 @@ event Transfer(address indexed from, address indexed to, uint256 value); } }; /**Constructor`. -```solidity -constructor(ComposableStablePool.NewPoolParams params); -```*/ + ```solidity + constructor(ComposableStablePool.NewPoolParams params); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct constructorCall { @@ -2515,20 +2534,17 @@ constructor(ComposableStablePool.NewPoolParams params); pub params: ::RustType, } const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] type UnderlyingSolTuple<'a> = (ComposableStablePool::NewPoolParams,); #[doc(hidden)] - type UnderlyingRustTuple<'a> = ( - ::RustType, - ); + type UnderlyingRustTuple<'a> = + (::RustType,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -2553,15 +2569,15 @@ constructor(ComposableStablePool.NewPoolParams params); #[automatically_derived] impl alloy_sol_types::SolConstructor for constructorCall { type Parameters<'a> = (ComposableStablePool::NewPoolParams,); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + 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<'_> { ( @@ -2574,14 +2590,15 @@ constructor(ComposableStablePool.NewPoolParams params); }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `DOMAIN_SEPARATOR()` and selector `0x3644e515`. -```solidity -function DOMAIN_SEPARATOR() external view returns (bytes32); -```*/ + ```solidity + function DOMAIN_SEPARATOR() external view returns (bytes32); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct DOMAIN_SEPARATORCall; #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`DOMAIN_SEPARATOR()`](DOMAIN_SEPARATORCall) function. + ///Container type for the return parameters of the + /// [`DOMAIN_SEPARATOR()`](DOMAIN_SEPARATORCall) function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct DOMAIN_SEPARATORReturn { @@ -2595,7 +2612,7 @@ function DOMAIN_SEPARATOR() external view returns (bytes32); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -2604,9 +2621,7 @@ function DOMAIN_SEPARATOR() external view returns (bytes32); type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -2615,16 +2630,14 @@ function DOMAIN_SEPARATOR() external view returns (bytes32); } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From - for UnderlyingRustTuple<'_> { + impl ::core::convert::From for UnderlyingRustTuple<'_> { fn from(value: DOMAIN_SEPARATORCall) -> Self { () } } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From> - for DOMAIN_SEPARATORCall { + impl ::core::convert::From> for DOMAIN_SEPARATORCall { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { Self } @@ -2638,9 +2651,7 @@ function DOMAIN_SEPARATOR() external view returns (bytes32); 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, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -2649,16 +2660,14 @@ function DOMAIN_SEPARATOR() external view returns (bytes32); } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From - for UnderlyingRustTuple<'_> { + impl ::core::convert::From for UnderlyingRustTuple<'_> { fn from(value: DOMAIN_SEPARATORReturn) -> Self { (value._0,) } } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From> - for DOMAIN_SEPARATORReturn { + impl ::core::convert::From> for DOMAIN_SEPARATORReturn { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { Self { _0: tuple.0 } } @@ -2667,26 +2676,26 @@ function DOMAIN_SEPARATOR() external view returns (bytes32); #[automatically_derived] impl alloy_sol_types::SolCall for DOMAIN_SEPARATORCall { type Parameters<'a> = (); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = alloy_sol_types::private::FixedBytes<32>; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (alloy_sol_types::sol_data::FixedBytes<32>,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "DOMAIN_SEPARATOR()"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [54u8, 68u8, 229u8, 21u8]; + const SIGNATURE: &'static str = "DOMAIN_SEPARATOR()"; + #[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<'_> { ( @@ -2695,35 +2704,34 @@ function DOMAIN_SEPARATOR() external view returns (bytes32); > 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| { + as alloy_sol_types::SolType>::abi_decode_sequence(data).map( + |r| { let r: DOMAIN_SEPARATORReturn = 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: DOMAIN_SEPARATORReturn = r.into(); - r._0 - }) + 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: DOMAIN_SEPARATORReturn = r.into(); + r._0 + }) } } }; #[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); -```*/ + ```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 { @@ -2733,7 +2741,8 @@ function allowance(address owner, address spender) external view returns (uint25 pub spender: alloy_sol_types::private::Address, } #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`allowance(address,address)`](allowanceCall) function. + ///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 { @@ -2747,7 +2756,7 @@ function allowance(address owner, address spender) external view returns (uint25 clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -2762,9 +2771,7 @@ function allowance(address owner, address spender) external view returns (uint25 ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -2794,14 +2801,10 @@ function allowance(address owner, address spender) external view returns (uint25 #[allow(dead_code)] type UnderlyingSolTuple<'a> = (alloy_sol_types::sol_data::Uint<256>,); #[doc(hidden)] - type UnderlyingRustTuple<'a> = ( - alloy_sol_types::private::primitives::aliases::U256, - ); + 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, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -2829,22 +2832,21 @@ function allowance(address owner, address spender) external view returns (uint25 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 ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; 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)"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [221u8, 98u8, 237u8, 62u8]; + const SIGNATURE: &'static str = "allowance(address,address)"; + #[inline] fn new<'a>( tuple: as alloy_sol_types::SolType>::RustType, ) -> Self { tuple.into() } + #[inline] fn tokenize(&self) -> Self::Token<'_> { ( @@ -2856,43 +2858,43 @@ function allowance(address owner, address spender) external view returns (uint25 ), ) } + #[inline] fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { ( - as alloy_sol_types::SolType>::tokenize(ret), + 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| { + 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 - }) + 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(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `approve(address,uint256)` and selector `0x095ea7b3`. -```solidity -function approve(address spender, uint256 amount) external returns (bool); -```*/ + ```solidity + function approve(address spender, uint256 amount) external returns (bool); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct approveCall { @@ -2902,7 +2904,8 @@ function approve(address spender, uint256 amount) external returns (bool); pub amount: alloy_sol_types::private::primitives::aliases::U256, } #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`approve(address,uint256)`](approveCall) function. + ///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 { @@ -2916,7 +2919,7 @@ function approve(address spender, uint256 amount) external returns (bool); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -2931,9 +2934,7 @@ function approve(address spender, uint256 amount) external returns (bool); ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -2966,9 +2967,7 @@ function approve(address spender, uint256 amount) external returns (bool); type UnderlyingRustTuple<'a> = (bool,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -2996,70 +2995,65 @@ function approve(address spender, uint256 amount) external returns (bool); 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 ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; 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)"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [9u8, 94u8, 167u8, 179u8]; + const SIGNATURE: &'static str = "approve(address,uint256)"; + #[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.amount), + as alloy_sol_types::SolType>::tokenize( + &self.amount, + ), ) } + #[inline] fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { - ( - ::tokenize( - ret, - ), - ) + (::tokenize(ret),) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) - .map(|r| { + 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 - }) + 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(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `balanceOf(address)` and selector `0x70a08231`. -```solidity -function balanceOf(address account) external view returns (uint256); -```*/ + ```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 { @@ -3067,7 +3061,8 @@ function balanceOf(address account) external view returns (uint256); pub account: alloy_sol_types::private::Address, } #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`balanceOf(address)`](balanceOfCall) function. + ///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 { @@ -3081,7 +3076,7 @@ function balanceOf(address account) external view returns (uint256); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -3090,9 +3085,7 @@ function balanceOf(address account) external view returns (uint256); type UnderlyingRustTuple<'a> = (alloy_sol_types::private::Address,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -3119,14 +3112,10 @@ function balanceOf(address account) external view returns (uint256); #[allow(dead_code)] type UnderlyingSolTuple<'a> = (alloy_sol_types::sol_data::Uint<256>,); #[doc(hidden)] - type UnderlyingRustTuple<'a> = ( - alloy_sol_types::private::primitives::aliases::U256, - ); + 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, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -3151,22 +3140,21 @@ function balanceOf(address account) external view returns (uint256); #[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 ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; 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)"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [112u8, 160u8, 130u8, 49u8]; + const SIGNATURE: &'static str = "balanceOf(address)"; + #[inline] fn new<'a>( tuple: as alloy_sol_types::SolType>::RustType, ) -> Self { tuple.into() } + #[inline] fn tokenize(&self) -> Self::Token<'_> { ( @@ -3175,48 +3163,49 @@ function balanceOf(address account) external view returns (uint256); ), ) } + #[inline] fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { ( - as alloy_sol_types::SolType>::tokenize(ret), + 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| { + 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 - }) + 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(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `decimals()` and selector `0x313ce567`. -```solidity -function decimals() external view returns (uint8); -```*/ + ```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(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`decimals()`](decimalsCall) function. + ///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 { @@ -3230,7 +3219,7 @@ function decimals() external view returns (uint8); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -3239,9 +3228,7 @@ function decimals() external view returns (uint8); type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -3271,9 +3258,7 @@ function decimals() external view returns (uint8); type UnderlyingRustTuple<'a> = (u8,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -3298,68 +3283,64 @@ function decimals() external view returns (uint8); #[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 ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; 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()"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [49u8, 60u8, 229u8, 103u8]; + const SIGNATURE: &'static str = "decimals()"; + #[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), - ) + ( 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| { + 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 - }) + 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(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `getAmplificationParameter()` and selector `0x6daccffa`. -```solidity -function getAmplificationParameter() external view returns (uint256 value, bool isUpdating, uint256 precision); -```*/ + ```solidity + function getAmplificationParameter() external view returns (uint256 value, bool isUpdating, uint256 precision); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct getAmplificationParameterCall; #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`getAmplificationParameter()`](getAmplificationParameterCall) function. + ///Container type for the return parameters of the + /// [`getAmplificationParameter()`](getAmplificationParameterCall) function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct getAmplificationParameterReturn { @@ -3377,7 +3358,7 @@ function getAmplificationParameter() external view returns (uint256 value, bool clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -3386,9 +3367,7 @@ function getAmplificationParameter() external view returns (uint256 value, bool type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -3397,16 +3376,14 @@ function getAmplificationParameter() external view returns (uint256 value, bool } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From - for UnderlyingRustTuple<'_> { + impl ::core::convert::From for UnderlyingRustTuple<'_> { fn from(value: getAmplificationParameterCall) -> Self { () } } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From> - for getAmplificationParameterCall { + impl ::core::convert::From> for getAmplificationParameterCall { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { Self } @@ -3428,9 +3405,7 @@ function getAmplificationParameter() external view returns (uint256 value, bool ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -3439,16 +3414,14 @@ function getAmplificationParameter() external view returns (uint256 value, bool } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From - for UnderlyingRustTuple<'_> { + impl ::core::convert::From for UnderlyingRustTuple<'_> { fn from(value: getAmplificationParameterReturn) -> Self { (value.value, value.isUpdating, value.precision) } } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From> - for getAmplificationParameterReturn { + impl ::core::convert::From> for getAmplificationParameterReturn { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { Self { value: tuple.0, @@ -3461,81 +3434,79 @@ function getAmplificationParameter() external view returns (uint256 value, bool impl getAmplificationParameterReturn { fn _tokenize( &self, - ) -> ::ReturnToken< - '_, - > { + ) -> ::ReturnToken<'_> + { ( - as alloy_sol_types::SolType>::tokenize(&self.value), + as alloy_sol_types::SolType>::tokenize( + &self.value, + ), ::tokenize( &self.isUpdating, ), - as alloy_sol_types::SolType>::tokenize(&self.precision), + as alloy_sol_types::SolType>::tokenize( + &self.precision, + ), ) } } #[automatically_derived] impl alloy_sol_types::SolCall for getAmplificationParameterCall { type Parameters<'a> = (); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = getAmplificationParameterReturn; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = ( alloy_sol_types::sol_data::Uint<256>, alloy_sol_types::sol_data::Bool, alloy_sol_types::sol_data::Uint<256>, ); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "getAmplificationParameter()"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [109u8, 172u8, 207u8, 250u8]; + const SIGNATURE: &'static str = "getAmplificationParameter()"; + #[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<'_> { getAmplificationParameterReturn::_tokenize(ret) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) + 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) + 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(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `getPausedState()` and selector `0x1c0de051`. -```solidity -function getPausedState() external view returns (bool paused, uint256 pauseWindowEndTime, uint256 bufferPeriodEndTime); -```*/ + ```solidity + function getPausedState() external view returns (bool paused, uint256 pauseWindowEndTime, uint256 bufferPeriodEndTime); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct getPausedStateCall; #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`getPausedState()`](getPausedStateCall) function. + ///Container type for the return parameters of the + /// [`getPausedState()`](getPausedStateCall) function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct getPausedStateReturn { @@ -3553,7 +3524,7 @@ function getPausedState() external view returns (bool paused, uint256 pauseWindo clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -3562,9 +3533,7 @@ function getPausedState() external view returns (bool paused, uint256 pauseWindo type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -3602,9 +3571,7 @@ function getPausedState() external view returns (bool paused, uint256 pauseWindo ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -3613,16 +3580,18 @@ function getPausedState() external view returns (bool paused, uint256 pauseWindo } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From - for UnderlyingRustTuple<'_> { + impl ::core::convert::From for UnderlyingRustTuple<'_> { fn from(value: getPausedStateReturn) -> Self { - (value.paused, value.pauseWindowEndTime, value.bufferPeriodEndTime) + ( + value.paused, + value.pauseWindowEndTime, + value.bufferPeriodEndTime, + ) } } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From> - for getPausedStateReturn { + impl ::core::convert::From> for getPausedStateReturn { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { Self { paused: tuple.0, @@ -3640,74 +3609,73 @@ function getPausedState() external view returns (bool paused, uint256 pauseWindo ::tokenize( &self.paused, ), - as alloy_sol_types::SolType>::tokenize(&self.pauseWindowEndTime), - as alloy_sol_types::SolType>::tokenize(&self.bufferPeriodEndTime), + as alloy_sol_types::SolType>::tokenize( + &self.pauseWindowEndTime, + ), + as alloy_sol_types::SolType>::tokenize( + &self.bufferPeriodEndTime, + ), ) } } #[automatically_derived] impl alloy_sol_types::SolCall for getPausedStateCall { type Parameters<'a> = (); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = getPausedStateReturn; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = ( alloy_sol_types::sol_data::Bool, alloy_sol_types::sol_data::Uint<256>, alloy_sol_types::sol_data::Uint<256>, ); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "getPausedState()"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [28u8, 13u8, 224u8, 81u8]; + const SIGNATURE: &'static str = "getPausedState()"; + #[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<'_> { getPausedStateReturn::_tokenize(ret) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) + 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) + 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(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `getPoolId()` and selector `0x38fff2d0`. -```solidity -function getPoolId() external view returns (bytes32); -```*/ + ```solidity + function getPoolId() external view returns (bytes32); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct getPoolIdCall; #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`getPoolId()`](getPoolIdCall) function. + ///Container type for the return parameters of the + /// [`getPoolId()`](getPoolIdCall) function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct getPoolIdReturn { @@ -3721,7 +3689,7 @@ function getPoolId() external view returns (bytes32); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -3730,9 +3698,7 @@ function getPoolId() external view returns (bytes32); type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -3762,9 +3728,7 @@ function getPoolId() external view returns (bytes32); 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, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -3789,26 +3753,26 @@ function getPoolId() external view returns (bytes32); #[automatically_derived] impl alloy_sol_types::SolCall for getPoolIdCall { type Parameters<'a> = (); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = alloy_sol_types::private::FixedBytes<32>; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (alloy_sol_types::sol_data::FixedBytes<32>,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "getPoolId()"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [56u8, 255u8, 242u8, 208u8]; + const SIGNATURE: &'static str = "getPoolId()"; + #[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<'_> { ( @@ -3817,47 +3781,45 @@ function getPoolId() external view returns (bytes32); > 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| { + as alloy_sol_types::SolType>::abi_decode_sequence(data).map( + |r| { let r: getPoolIdReturn = 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: getPoolIdReturn = r.into(); - r._0 - }) + 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: getPoolIdReturn = r.into(); + r._0 + }) } } }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `getScalingFactors()` and selector `0x1dd746ea`. -```solidity -function getScalingFactors() external view returns (uint256[] memory); -```*/ + ```solidity + function getScalingFactors() external view returns (uint256[] memory); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct getScalingFactorsCall; #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`getScalingFactors()`](getScalingFactorsCall) function. + ///Container type for the return parameters of the + /// [`getScalingFactors()`](getScalingFactorsCall) function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct getScalingFactorsReturn { #[allow(missing_docs)] - pub _0: alloy_sol_types::private::Vec< - alloy_sol_types::private::primitives::aliases::U256, - >, + pub _0: alloy_sol_types::private::Vec, } #[allow( non_camel_case_types, @@ -3866,7 +3828,7 @@ function getScalingFactors() external view returns (uint256[] memory); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -3875,9 +3837,7 @@ function getScalingFactors() external view returns (uint256[] memory); type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -3886,16 +3846,14 @@ function getScalingFactors() external view returns (uint256[] memory); } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From - for UnderlyingRustTuple<'_> { + impl ::core::convert::From for UnderlyingRustTuple<'_> { fn from(value: getScalingFactorsCall) -> Self { () } } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From> - for getScalingFactorsCall { + impl ::core::convert::From> for getScalingFactorsCall { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { Self } @@ -3904,20 +3862,15 @@ function getScalingFactors() external view returns (uint256[] memory); { #[doc(hidden)] #[allow(dead_code)] - type UnderlyingSolTuple<'a> = ( - alloy_sol_types::sol_data::Array>, - ); + type UnderlyingSolTuple<'a> = + (alloy_sol_types::sol_data::Array>,); #[doc(hidden)] type UnderlyingRustTuple<'a> = ( - alloy_sol_types::private::Vec< - alloy_sol_types::private::primitives::aliases::U256, - >, + alloy_sol_types::private::Vec, ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -3926,16 +3879,14 @@ function getScalingFactors() external view returns (uint256[] memory); } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From - for UnderlyingRustTuple<'_> { + impl ::core::convert::From for UnderlyingRustTuple<'_> { fn from(value: getScalingFactorsReturn) -> Self { (value._0,) } } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From> - for getScalingFactorsReturn { + impl ::core::convert::From> for getScalingFactorsReturn { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { Self { _0: tuple.0 } } @@ -3944,72 +3895,68 @@ function getScalingFactors() external view returns (uint256[] memory); #[automatically_derived] impl alloy_sol_types::SolCall for getScalingFactorsCall { type Parameters<'a> = (); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; - type Return = alloy_sol_types::private::Vec< - alloy_sol_types::private::primitives::aliases::U256, - >; - type ReturnTuple<'a> = ( - alloy_sol_types::sol_data::Array>, - ); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "getScalingFactors()"; + type Return = + alloy_sol_types::private::Vec; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + type ReturnTuple<'a> = + (alloy_sol_types::sol_data::Array>,); + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [29u8, 215u8, 70u8, 234u8]; + const SIGNATURE: &'static str = "getScalingFactors()"; + #[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), - ) + (, + > 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| { + as alloy_sol_types::SolType>::abi_decode_sequence(data).map( + |r| { let r: getScalingFactorsReturn = 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: getScalingFactorsReturn = r.into(); - r._0 - }) + 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: getScalingFactorsReturn = r.into(); + r._0 + }) } } }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `getSwapFeePercentage()` and selector `0x55c67628`. -```solidity -function getSwapFeePercentage() external view returns (uint256); -```*/ + ```solidity + function getSwapFeePercentage() external view returns (uint256); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct getSwapFeePercentageCall; #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`getSwapFeePercentage()`](getSwapFeePercentageCall) function. + ///Container type for the return parameters of the + /// [`getSwapFeePercentage()`](getSwapFeePercentageCall) function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct getSwapFeePercentageReturn { @@ -4023,7 +3970,7 @@ function getSwapFeePercentage() external view returns (uint256); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -4032,9 +3979,7 @@ function getSwapFeePercentage() external view returns (uint256); type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -4043,16 +3988,14 @@ function getSwapFeePercentage() external view returns (uint256); } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From - for UnderlyingRustTuple<'_> { + impl ::core::convert::From for UnderlyingRustTuple<'_> { fn from(value: getSwapFeePercentageCall) -> Self { () } } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From> - for getSwapFeePercentageCall { + impl ::core::convert::From> for getSwapFeePercentageCall { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { Self } @@ -4063,14 +4006,10 @@ function getSwapFeePercentage() external view returns (uint256); #[allow(dead_code)] type UnderlyingSolTuple<'a> = (alloy_sol_types::sol_data::Uint<256>,); #[doc(hidden)] - type UnderlyingRustTuple<'a> = ( - alloy_sol_types::private::primitives::aliases::U256, - ); + 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, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -4079,16 +4018,14 @@ function getSwapFeePercentage() external view returns (uint256); } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From - for UnderlyingRustTuple<'_> { + impl ::core::convert::From for UnderlyingRustTuple<'_> { fn from(value: getSwapFeePercentageReturn) -> Self { (value._0,) } } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From> - for getSwapFeePercentageReturn { + impl ::core::convert::From> for getSwapFeePercentageReturn { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { Self { _0: tuple.0 } } @@ -4097,68 +4034,68 @@ function getSwapFeePercentage() external view returns (uint256); #[automatically_derived] impl alloy_sol_types::SolCall for getSwapFeePercentageCall { type Parameters<'a> = (); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = alloy_sol_types::private::primitives::aliases::U256; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (alloy_sol_types::sol_data::Uint<256>,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "getSwapFeePercentage()"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [85u8, 198u8, 118u8, 40u8]; + const SIGNATURE: &'static str = "getSwapFeePercentage()"; + #[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), + 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| { + as alloy_sol_types::SolType>::abi_decode_sequence(data).map( + |r| { let r: getSwapFeePercentageReturn = 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: getSwapFeePercentageReturn = r.into(); - r._0 - }) + 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: getSwapFeePercentageReturn = r.into(); + r._0 + }) } } }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `name()` and selector `0x06fdde03`. -```solidity -function name() external view returns (string memory); -```*/ + ```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(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`name()`](nameCall) function. + ///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 { @@ -4172,7 +4109,7 @@ function name() external view returns (string memory); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -4181,9 +4118,7 @@ function name() external view returns (string memory); type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -4213,9 +4148,7 @@ function name() external view returns (string memory); type UnderlyingRustTuple<'a> = (alloy_sol_types::private::String,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -4240,63 +4173,58 @@ function name() external view returns (string memory); #[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 ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (alloy_sol_types::sol_data::String,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "name()"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [6u8, 253u8, 222u8, 3u8]; + const SIGNATURE: &'static str = "name()"; + #[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, - ), - ) + (::tokenize(ret),) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) - .map(|r| { + 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 - }) + 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(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `nonces(address)` and selector `0x7ecebe00`. -```solidity -function nonces(address owner) external view returns (uint256); -```*/ + ```solidity + function nonces(address owner) external view returns (uint256); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct noncesCall { @@ -4304,7 +4232,8 @@ function nonces(address owner) external view returns (uint256); pub owner: alloy_sol_types::private::Address, } #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`nonces(address)`](noncesCall) function. + ///Container type for the return parameters of the + /// [`nonces(address)`](noncesCall) function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct noncesReturn { @@ -4318,7 +4247,7 @@ function nonces(address owner) external view returns (uint256); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -4327,9 +4256,7 @@ function nonces(address owner) external view returns (uint256); type UnderlyingRustTuple<'a> = (alloy_sol_types::private::Address,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -4356,14 +4283,10 @@ function nonces(address owner) external view returns (uint256); #[allow(dead_code)] type UnderlyingSolTuple<'a> = (alloy_sol_types::sol_data::Uint<256>,); #[doc(hidden)] - type UnderlyingRustTuple<'a> = ( - alloy_sol_types::private::primitives::aliases::U256, - ); + 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, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -4388,22 +4311,21 @@ function nonces(address owner) external view returns (uint256); #[automatically_derived] impl alloy_sol_types::SolCall for noncesCall { 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 ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (alloy_sol_types::sol_data::Uint<256>,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "nonces(address)"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [126u8, 206u8, 190u8, 0u8]; + const SIGNATURE: &'static str = "nonces(address)"; + #[inline] fn new<'a>( tuple: as alloy_sol_types::SolType>::RustType, ) -> Self { tuple.into() } + #[inline] fn tokenize(&self) -> Self::Token<'_> { ( @@ -4412,47 +4334,48 @@ function nonces(address owner) external view returns (uint256); ), ) } + #[inline] fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { ( - as alloy_sol_types::SolType>::tokenize(ret), + 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| { + as alloy_sol_types::SolType>::abi_decode_sequence(data).map( + |r| { let r: noncesReturn = 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: noncesReturn = r.into(); - r._0 - }) + 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: noncesReturn = r.into(); + r._0 + }) } } }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `pause()` and selector `0x8456cb59`. -```solidity -function pause() external; -```*/ + ```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. + ///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 {} @@ -4463,7 +4386,7 @@ function pause() external; clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -4472,9 +4395,7 @@ function pause() external; type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -4504,9 +4425,7 @@ function pause() external; type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -4529,62 +4448,58 @@ function pause() external; } } impl pauseReturn { - fn _tokenize( - &self, - ) -> ::ReturnToken<'_> { + 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 ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "pause()"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [132u8, 86u8, 203u8, 89u8]; + const SIGNATURE: &'static str = "pause()"; + #[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) + 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) + 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(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `permit(address,address,uint256,uint256,uint8,bytes32,bytes32)` and selector `0xd505accf`. -```solidity -function permit(address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) external; -```*/ + ```solidity + function permit(address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) external; + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct permitCall { @@ -4603,7 +4518,9 @@ function permit(address owner, address spender, uint256 value, uint256 deadline, #[allow(missing_docs)] pub s: alloy_sol_types::private::FixedBytes<32>, } - ///Container type for the return parameters of the [`permit(address,address,uint256,uint256,uint8,bytes32,bytes32)`](permitCall) function. + ///Container type for the return parameters of the + /// [`permit(address,address,uint256,uint256,uint8,bytes32, + /// bytes32)`](permitCall) function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct permitReturn {} @@ -4614,7 +4531,7 @@ function permit(address owner, address spender, uint256 value, uint256 deadline, clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -4639,9 +4556,7 @@ function permit(address owner, address spender, uint256 value, uint256 deadline, ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -4687,9 +4602,7 @@ function permit(address owner, address spender, uint256 value, uint256 deadline, type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -4712,9 +4625,7 @@ function permit(address owner, address spender, uint256 value, uint256 deadline, } } impl permitReturn { - fn _tokenize( - &self, - ) -> ::ReturnToken<'_> { + fn _tokenize(&self) -> ::ReturnToken<'_> { () } } @@ -4729,22 +4640,22 @@ function permit(address owner, address spender, uint256 value, uint256 deadline, alloy_sol_types::sol_data::FixedBytes<32>, alloy_sol_types::sol_data::FixedBytes<32>, ); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = permitReturn; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "permit(address,address,uint256,uint256,uint8,bytes32,bytes32)"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [213u8, 5u8, 172u8, 207u8]; + const SIGNATURE: &'static str = + "permit(address,address,uint256,uint256,uint8,bytes32,bytes32)"; + #[inline] fn new<'a>( tuple: as alloy_sol_types::SolType>::RustType, ) -> Self { tuple.into() } + #[inline] fn tokenize(&self) -> Self::Token<'_> { ( @@ -4771,38 +4682,38 @@ function permit(address owner, address spender, uint256 value, uint256 deadline, > as alloy_sol_types::SolType>::tokenize(&self.s), ) } + #[inline] fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { permitReturn::_tokenize(ret) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) + 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) + 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(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `symbol()` and selector `0x95d89b41`. -```solidity -function symbol() external view returns (string memory); -```*/ + ```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(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`symbol()`](symbolCall) function. + ///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 { @@ -4816,7 +4727,7 @@ function symbol() external view returns (string memory); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -4825,9 +4736,7 @@ function symbol() external view returns (string memory); type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -4857,9 +4766,7 @@ function symbol() external view returns (string memory); type UnderlyingRustTuple<'a> = (alloy_sol_types::private::String,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -4884,63 +4791,58 @@ function symbol() external view returns (string memory); #[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 ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (alloy_sol_types::sol_data::String,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "symbol()"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [149u8, 216u8, 155u8, 65u8]; + const SIGNATURE: &'static str = "symbol()"; + #[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, - ), - ) + (::tokenize(ret),) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) - .map(|r| { + 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 - }) + 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(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `transfer(address,uint256)` and selector `0xa9059cbb`. -```solidity -function transfer(address recipient, uint256 amount) external returns (bool); -```*/ + ```solidity + function transfer(address recipient, uint256 amount) external returns (bool); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct transferCall { @@ -4950,7 +4852,8 @@ function transfer(address recipient, uint256 amount) external returns (bool); pub amount: alloy_sol_types::private::primitives::aliases::U256, } #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`transfer(address,uint256)`](transferCall) function. + ///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 { @@ -4964,7 +4867,7 @@ function transfer(address recipient, uint256 amount) external returns (bool); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -4979,9 +4882,7 @@ function transfer(address recipient, uint256 amount) external returns (bool); ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -5014,9 +4915,7 @@ function transfer(address recipient, uint256 amount) external returns (bool); type UnderlyingRustTuple<'a> = (bool,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -5044,70 +4943,65 @@ function transfer(address recipient, uint256 amount) external returns (bool); 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 ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; 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)"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [169u8, 5u8, 156u8, 187u8]; + const SIGNATURE: &'static str = "transfer(address,uint256)"; + #[inline] fn new<'a>( tuple: as alloy_sol_types::SolType>::RustType, ) -> Self { tuple.into() } + #[inline] fn tokenize(&self) -> Self::Token<'_> { ( ::tokenize( &self.recipient, ), - as alloy_sol_types::SolType>::tokenize(&self.amount), + as alloy_sol_types::SolType>::tokenize( + &self.amount, + ), ) } + #[inline] fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { - ( - ::tokenize( - ret, - ), - ) + (::tokenize(ret),) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) - .map(|r| { + 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 - }) + 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(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `transferFrom(address,address,uint256)` and selector `0x23b872dd`. -```solidity -function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); -```*/ + ```solidity + function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct transferFromCall { @@ -5119,7 +5013,8 @@ function transferFrom(address sender, address recipient, uint256 amount) externa pub amount: alloy_sol_types::private::primitives::aliases::U256, } #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`transferFrom(address,address,uint256)`](transferFromCall) function. + ///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 { @@ -5133,7 +5028,7 @@ function transferFrom(address sender, address recipient, uint256 amount) externa clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -5150,9 +5045,7 @@ function transferFrom(address sender, address recipient, uint256 amount) externa ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -5186,9 +5079,7 @@ function transferFrom(address sender, address recipient, uint256 amount) externa type UnderlyingRustTuple<'a> = (bool,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -5217,22 +5108,21 @@ function transferFrom(address sender, address recipient, uint256 amount) externa 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 ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; 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)"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [35u8, 184u8, 114u8, 221u8]; + const SIGNATURE: &'static str = "transferFrom(address,address,uint256)"; + #[inline] fn new<'a>( tuple: as alloy_sol_types::SolType>::RustType, ) -> Self { tuple.into() } + #[inline] fn tokenize(&self) -> Self::Token<'_> { ( @@ -5242,53 +5132,50 @@ function transferFrom(address sender, address recipient, uint256 amount) externa ::tokenize( &self.recipient, ), - as alloy_sol_types::SolType>::tokenize(&self.amount), + as alloy_sol_types::SolType>::tokenize( + &self.amount, + ), ) } + #[inline] fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { - ( - ::tokenize( - ret, - ), - ) + (::tokenize(ret),) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) - .map(|r| { + 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 - }) + 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(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `version()` and selector `0x54fd4d50`. -```solidity -function version() external view returns (string memory); -```*/ + ```solidity + function version() external view returns (string memory); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct versionCall; #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`version()`](versionCall) function. + ///Container type for the return parameters of the + /// [`version()`](versionCall) function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct versionReturn { @@ -5302,7 +5189,7 @@ function version() external view returns (string memory); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -5311,9 +5198,7 @@ function version() external view returns (string memory); type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -5343,9 +5228,7 @@ function version() external view returns (string memory); type UnderlyingRustTuple<'a> = (alloy_sol_types::private::String,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -5370,61 +5253,56 @@ function version() external view returns (string memory); #[automatically_derived] impl alloy_sol_types::SolCall for versionCall { type Parameters<'a> = (); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = alloy_sol_types::private::String; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (alloy_sol_types::sol_data::String,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "version()"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [84u8, 253u8, 77u8, 80u8]; + const SIGNATURE: &'static str = "version()"; + #[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, - ), - ) + (::tokenize(ret),) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) - .map(|r| { + as alloy_sol_types::SolType>::abi_decode_sequence(data).map( + |r| { let r: versionReturn = 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: versionReturn = r.into(); - r._0 - }) + 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: versionReturn = r.into(); + r._0 + }) } } }; - ///Container for all the [`BalancerV2ComposableStablePool`](self) function calls. + ///Container for all the [`BalancerV2ComposableStablePool`](self) function + /// calls. #[derive(Clone)] - #[derive()] pub enum BalancerV2ComposableStablePoolCalls { #[allow(missing_docs)] DOMAIN_SEPARATOR(DOMAIN_SEPARATORCall), @@ -5466,8 +5344,9 @@ function version() external view returns (string memory); impl BalancerV2ComposableStablePoolCalls { /// 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. + /// 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]] = &[ @@ -5490,27 +5369,6 @@ function version() external view returns (string memory); [213u8, 5u8, 172u8, 207u8], [221u8, 98u8, 237u8, 62u8], ]; - /// The names of the variants in the same order as `SELECTORS`. - pub const VARIANT_NAMES: &'static [&'static str] = &[ - ::core::stringify!(name), - ::core::stringify!(approve), - ::core::stringify!(getPausedState), - ::core::stringify!(getScalingFactors), - ::core::stringify!(transferFrom), - ::core::stringify!(decimals), - ::core::stringify!(DOMAIN_SEPARATOR), - ::core::stringify!(getPoolId), - ::core::stringify!(version), - ::core::stringify!(getSwapFeePercentage), - ::core::stringify!(getAmplificationParameter), - ::core::stringify!(balanceOf), - ::core::stringify!(nonces), - ::core::stringify!(pause), - ::core::stringify!(symbol), - ::core::stringify!(transfer), - ::core::stringify!(permit), - ::core::stringify!(allowance), - ]; /// The signatures in the same order as `SELECTORS`. pub const SIGNATURES: &'static [&'static str] = &[ ::SIGNATURE, @@ -5532,6 +5390,28 @@ function version() external view returns (string memory); ::SIGNATURE, ::SIGNATURE, ]; + /// The names of the variants in the same order as `SELECTORS`. + pub const VARIANT_NAMES: &'static [&'static str] = &[ + ::core::stringify!(name), + ::core::stringify!(approve), + ::core::stringify!(getPausedState), + ::core::stringify!(getScalingFactors), + ::core::stringify!(transferFrom), + ::core::stringify!(decimals), + ::core::stringify!(DOMAIN_SEPARATOR), + ::core::stringify!(getPoolId), + ::core::stringify!(version), + ::core::stringify!(getSwapFeePercentage), + ::core::stringify!(getAmplificationParameter), + ::core::stringify!(balanceOf), + ::core::stringify!(nonces), + ::core::stringify!(pause), + ::core::stringify!(symbol), + ::core::stringify!(transfer), + ::core::stringify!(permit), + ::core::stringify!(allowance), + ]; + /// Returns the signature for the given selector, if known. #[inline] pub fn signature_by_selector( @@ -5544,33 +5424,29 @@ function version() external view returns (string memory); ::core::result::Result::Err(_) => ::core::option::Option::None, } } + /// Returns the enum variant name for the given selector, if known. #[inline] - pub fn name_by_selector( - selector: [u8; 4usize], - ) -> ::core::option::Option<&'static str> { + pub fn name_by_selector(selector: [u8; 4usize]) -> ::core::option::Option<&'static str> { let sig = Self::signature_by_selector(selector)?; sig.split_once('(').map(|(name, _)| name) } } #[automatically_derived] impl alloy_sol_types::SolInterface for BalancerV2ComposableStablePoolCalls { - const NAME: &'static str = "BalancerV2ComposableStablePoolCalls"; - const MIN_DATA_LENGTH: usize = 0usize; const COUNT: usize = 18usize; + const MIN_DATA_LENGTH: usize = 0usize; + const NAME: &'static str = "BalancerV2ComposableStablePoolCalls"; + #[inline] fn selector(&self) -> [u8; 4] { match self { Self::DOMAIN_SEPARATOR(_) => { ::SELECTOR } - Self::allowance(_) => { - ::SELECTOR - } + Self::allowance(_) => ::SELECTOR, Self::approve(_) => ::SELECTOR, - Self::balanceOf(_) => { - ::SELECTOR - } + Self::balanceOf(_) => ::SELECTOR, Self::decimals(_) => ::SELECTOR, Self::getAmplificationParameter(_) => { ::SELECTOR @@ -5578,9 +5454,7 @@ function version() external view returns (string memory); Self::getPausedState(_) => { ::SELECTOR } - Self::getPoolId(_) => { - ::SELECTOR - } + Self::getPoolId(_) => ::SELECTOR, Self::getScalingFactors(_) => { ::SELECTOR } @@ -5593,33 +5467,34 @@ function version() external view returns (string memory); Self::permit(_) => ::SELECTOR, Self::symbol(_) => ::SELECTOR, Self::transfer(_) => ::SELECTOR, - Self::transferFrom(_) => { - ::SELECTOR - } + Self::transferFrom(_) => ::SELECTOR, Self::version(_) => ::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 { + fn abi_decode_raw(selector: [u8; 4], data: &[u8]) -> alloy_sol_types::Result { static DECODE_SHIMS: &[fn( &[u8], - ) -> alloy_sol_types::Result] = &[ + ) -> alloy_sol_types::Result< + BalancerV2ComposableStablePoolCalls, + >] = &[ { fn name( data: &[u8], - ) -> alloy_sol_types::Result { + ) -> alloy_sol_types::Result + { ::abi_decode_raw(data) .map(BalancerV2ComposableStablePoolCalls::name) } @@ -5628,7 +5503,8 @@ function version() external view returns (string memory); { fn approve( data: &[u8], - ) -> alloy_sol_types::Result { + ) -> alloy_sol_types::Result + { ::abi_decode_raw(data) .map(BalancerV2ComposableStablePoolCalls::approve) } @@ -5637,10 +5513,9 @@ function version() external view returns (string memory); { fn getPausedState( data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, - ) + ) -> alloy_sol_types::Result + { + ::abi_decode_raw(data) .map(BalancerV2ComposableStablePoolCalls::getPausedState) } getPausedState @@ -5648,10 +5523,9 @@ function version() external view returns (string memory); { fn getScalingFactors( data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, - ) + ) -> alloy_sol_types::Result + { + ::abi_decode_raw(data) .map(BalancerV2ComposableStablePoolCalls::getScalingFactors) } getScalingFactors @@ -5659,10 +5533,9 @@ function version() external view returns (string memory); { fn transferFrom( data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, - ) + ) -> alloy_sol_types::Result + { + ::abi_decode_raw(data) .map(BalancerV2ComposableStablePoolCalls::transferFrom) } transferFrom @@ -5670,7 +5543,8 @@ function version() external view returns (string memory); { fn decimals( data: &[u8], - ) -> alloy_sol_types::Result { + ) -> alloy_sol_types::Result + { ::abi_decode_raw(data) .map(BalancerV2ComposableStablePoolCalls::decimals) } @@ -5679,10 +5553,9 @@ function version() external view returns (string memory); { fn DOMAIN_SEPARATOR( data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, - ) + ) -> alloy_sol_types::Result + { + ::abi_decode_raw(data) .map(BalancerV2ComposableStablePoolCalls::DOMAIN_SEPARATOR) } DOMAIN_SEPARATOR @@ -5690,7 +5563,8 @@ function version() external view returns (string memory); { fn getPoolId( data: &[u8], - ) -> alloy_sol_types::Result { + ) -> alloy_sol_types::Result + { ::abi_decode_raw(data) .map(BalancerV2ComposableStablePoolCalls::getPoolId) } @@ -5699,7 +5573,8 @@ function version() external view returns (string memory); { fn version( data: &[u8], - ) -> alloy_sol_types::Result { + ) -> alloy_sol_types::Result + { ::abi_decode_raw(data) .map(BalancerV2ComposableStablePoolCalls::version) } @@ -5708,33 +5583,30 @@ function version() external view returns (string memory); { fn getSwapFeePercentage( data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, - ) - .map( - BalancerV2ComposableStablePoolCalls::getSwapFeePercentage, - ) + ) -> alloy_sol_types::Result + { + ::abi_decode_raw(data) + .map(BalancerV2ComposableStablePoolCalls::getSwapFeePercentage) } getSwapFeePercentage }, { fn getAmplificationParameter( data: &[u8], - ) -> alloy_sol_types::Result { + ) -> alloy_sol_types::Result + { ::abi_decode_raw( - data, - ) - .map( - BalancerV2ComposableStablePoolCalls::getAmplificationParameter, - ) + data, + ) + .map(BalancerV2ComposableStablePoolCalls::getAmplificationParameter) } getAmplificationParameter }, { fn balanceOf( data: &[u8], - ) -> alloy_sol_types::Result { + ) -> alloy_sol_types::Result + { ::abi_decode_raw(data) .map(BalancerV2ComposableStablePoolCalls::balanceOf) } @@ -5743,7 +5615,8 @@ function version() external view returns (string memory); { fn nonces( data: &[u8], - ) -> alloy_sol_types::Result { + ) -> alloy_sol_types::Result + { ::abi_decode_raw(data) .map(BalancerV2ComposableStablePoolCalls::nonces) } @@ -5752,7 +5625,8 @@ function version() external view returns (string memory); { fn pause( data: &[u8], - ) -> alloy_sol_types::Result { + ) -> alloy_sol_types::Result + { ::abi_decode_raw(data) .map(BalancerV2ComposableStablePoolCalls::pause) } @@ -5761,7 +5635,8 @@ function version() external view returns (string memory); { fn symbol( data: &[u8], - ) -> alloy_sol_types::Result { + ) -> alloy_sol_types::Result + { ::abi_decode_raw(data) .map(BalancerV2ComposableStablePoolCalls::symbol) } @@ -5770,7 +5645,8 @@ function version() external view returns (string memory); { fn transfer( data: &[u8], - ) -> alloy_sol_types::Result { + ) -> alloy_sol_types::Result + { ::abi_decode_raw(data) .map(BalancerV2ComposableStablePoolCalls::transfer) } @@ -5779,7 +5655,8 @@ function version() external view returns (string memory); { fn permit( data: &[u8], - ) -> alloy_sol_types::Result { + ) -> alloy_sol_types::Result + { ::abi_decode_raw(data) .map(BalancerV2ComposableStablePoolCalls::permit) } @@ -5788,7 +5665,8 @@ function version() external view returns (string memory); { fn allowance( data: &[u8], - ) -> alloy_sol_types::Result { + ) -> alloy_sol_types::Result + { ::abi_decode_raw(data) .map(BalancerV2ComposableStablePoolCalls::allowance) } @@ -5796,15 +5674,14 @@ function version() external view returns (string memory); }, ]; let Ok(idx) = Self::SELECTORS.binary_search(&selector) else { - return Err( - alloy_sol_types::Error::unknown_selector( - ::NAME, - selector, - ), - ); + return Err(alloy_sol_types::Error::unknown_selector( + ::NAME, + selector, + )); }; DECODE_SHIMS[idx](data) } + #[inline] #[allow(non_snake_case)] fn abi_decode_raw_validate( @@ -5813,14 +5690,15 @@ function version() external view returns (string memory); ) -> alloy_sol_types::Result { static DECODE_VALIDATE_SHIMS: &[fn( &[u8], - ) -> alloy_sol_types::Result] = &[ + ) -> alloy_sol_types::Result< + BalancerV2ComposableStablePoolCalls, + >] = &[ { fn name( data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) + ) -> alloy_sol_types::Result + { + ::abi_decode_raw_validate(data) .map(BalancerV2ComposableStablePoolCalls::name) } name @@ -5828,10 +5706,9 @@ function version() external view returns (string memory); { fn approve( data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) + ) -> alloy_sol_types::Result + { + ::abi_decode_raw_validate(data) .map(BalancerV2ComposableStablePoolCalls::approve) } approve @@ -5839,18 +5716,20 @@ function version() external view returns (string memory); { fn getPausedState( data: &[u8], - ) -> alloy_sol_types::Result { + ) -> alloy_sol_types::Result + { ::abi_decode_raw_validate( - data, - ) - .map(BalancerV2ComposableStablePoolCalls::getPausedState) + data, + ) + .map(BalancerV2ComposableStablePoolCalls::getPausedState) } getPausedState }, { fn getScalingFactors( data: &[u8], - ) -> alloy_sol_types::Result { + ) -> alloy_sol_types::Result + { ::abi_decode_raw_validate( data, ) @@ -5861,21 +5740,21 @@ function version() external view returns (string memory); { fn transferFrom( data: &[u8], - ) -> alloy_sol_types::Result { + ) -> alloy_sol_types::Result + { ::abi_decode_raw_validate( - data, - ) - .map(BalancerV2ComposableStablePoolCalls::transferFrom) + data, + ) + .map(BalancerV2ComposableStablePoolCalls::transferFrom) } transferFrom }, { fn decimals( data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) + ) -> alloy_sol_types::Result + { + ::abi_decode_raw_validate(data) .map(BalancerV2ComposableStablePoolCalls::decimals) } decimals @@ -5883,21 +5762,21 @@ function version() external view returns (string memory); { fn DOMAIN_SEPARATOR( data: &[u8], - ) -> alloy_sol_types::Result { + ) -> alloy_sol_types::Result + { ::abi_decode_raw_validate( - data, - ) - .map(BalancerV2ComposableStablePoolCalls::DOMAIN_SEPARATOR) + data, + ) + .map(BalancerV2ComposableStablePoolCalls::DOMAIN_SEPARATOR) } DOMAIN_SEPARATOR }, { fn getPoolId( data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) + ) -> alloy_sol_types::Result + { + ::abi_decode_raw_validate(data) .map(BalancerV2ComposableStablePoolCalls::getPoolId) } getPoolId @@ -5905,10 +5784,9 @@ function version() external view returns (string memory); { fn version( data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) + ) -> alloy_sol_types::Result + { + ::abi_decode_raw_validate(data) .map(BalancerV2ComposableStablePoolCalls::version) } version @@ -5916,7 +5794,8 @@ function version() external view returns (string memory); { fn getSwapFeePercentage( data: &[u8], - ) -> alloy_sol_types::Result { + ) -> alloy_sol_types::Result + { ::abi_decode_raw_validate( data, ) @@ -5929,7 +5808,8 @@ function version() external view returns (string memory); { fn getAmplificationParameter( data: &[u8], - ) -> alloy_sol_types::Result { + ) -> alloy_sol_types::Result + { ::abi_decode_raw_validate( data, ) @@ -5942,10 +5822,9 @@ function version() external view returns (string memory); { fn balanceOf( data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) + ) -> alloy_sol_types::Result + { + ::abi_decode_raw_validate(data) .map(BalancerV2ComposableStablePoolCalls::balanceOf) } balanceOf @@ -5953,10 +5832,9 @@ function version() external view returns (string memory); { fn nonces( data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) + ) -> alloy_sol_types::Result + { + ::abi_decode_raw_validate(data) .map(BalancerV2ComposableStablePoolCalls::nonces) } nonces @@ -5964,10 +5842,9 @@ function version() external view returns (string memory); { fn pause( data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) + ) -> alloy_sol_types::Result + { + ::abi_decode_raw_validate(data) .map(BalancerV2ComposableStablePoolCalls::pause) } pause @@ -5975,10 +5852,9 @@ function version() external view returns (string memory); { fn symbol( data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) + ) -> alloy_sol_types::Result + { + ::abi_decode_raw_validate(data) .map(BalancerV2ComposableStablePoolCalls::symbol) } symbol @@ -5986,10 +5862,9 @@ function version() external view returns (string memory); { fn transfer( data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) + ) -> alloy_sol_types::Result + { + ::abi_decode_raw_validate(data) .map(BalancerV2ComposableStablePoolCalls::transfer) } transfer @@ -5997,10 +5872,9 @@ function version() external view returns (string memory); { fn permit( data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) + ) -> alloy_sol_types::Result + { + ::abi_decode_raw_validate(data) .map(BalancerV2ComposableStablePoolCalls::permit) } permit @@ -6008,32 +5882,28 @@ function version() external view returns (string memory); { fn allowance( data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) + ) -> alloy_sol_types::Result + { + ::abi_decode_raw_validate(data) .map(BalancerV2ComposableStablePoolCalls::allowance) } allowance }, ]; let Ok(idx) = Self::SELECTORS.binary_search(&selector) else { - return Err( - alloy_sol_types::Error::unknown_selector( - ::NAME, - selector, - ), - ); + 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::DOMAIN_SEPARATOR(inner) => { - ::abi_encoded_size( - inner, - ) + ::abi_encoded_size(inner) } Self::allowance(inner) => { ::abi_encoded_size(inner) @@ -6053,22 +5923,16 @@ function version() external view returns (string memory); ) } Self::getPausedState(inner) => { - ::abi_encoded_size( - inner, - ) + ::abi_encoded_size(inner) } Self::getPoolId(inner) => { ::abi_encoded_size(inner) } Self::getScalingFactors(inner) => { - ::abi_encoded_size( - inner, - ) + ::abi_encoded_size(inner) } Self::getSwapFeePercentage(inner) => { - ::abi_encoded_size( - inner, - ) + ::abi_encoded_size(inner) } Self::name(inner) => { ::abi_encoded_size(inner) @@ -6089,73 +5953,49 @@ function version() external view returns (string memory); ::abi_encoded_size(inner) } Self::transferFrom(inner) => { - ::abi_encoded_size( - inner, - ) + ::abi_encoded_size(inner) } Self::version(inner) => { ::abi_encoded_size(inner) } } } + #[inline] fn abi_encode_raw(&self, out: &mut alloy_sol_types::private::Vec) { match self { Self::DOMAIN_SEPARATOR(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } Self::allowance(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } Self::approve(inner) => { ::abi_encode_raw(inner, out) } Self::balanceOf(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } Self::decimals(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } Self::getAmplificationParameter(inner) => { ::abi_encode_raw( - inner, - out, + inner, out, ) } Self::getPausedState(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } Self::getPoolId(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } Self::getScalingFactors(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } Self::getSwapFeePercentage(inner) => { ::abi_encode_raw( - inner, - out, + inner, out, ) } Self::name(inner) => { @@ -6174,16 +6014,10 @@ function version() external view returns (string memory); ::abi_encode_raw(inner, out) } Self::transfer(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } Self::transferFrom(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } Self::version(inner) => { ::abi_encode_raw(inner, out) @@ -6192,8 +6026,7 @@ function version() external view returns (string memory); } } ///Container for all the [`BalancerV2ComposableStablePool`](self) events. - #[derive(Clone)] - #[derive(Debug, PartialEq, Eq, Hash)] + #[derive(Clone, Debug, PartialEq, Eq, Hash)] pub enum BalancerV2ComposableStablePoolEvents { #[allow(missing_docs)] AmpUpdateStarted(AmpUpdateStarted), @@ -6219,75 +6052,63 @@ function version() external view returns (string memory); impl BalancerV2ComposableStablePoolEvents { /// 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. + /// 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]] = &[ [ - 24u8, 53u8, 136u8, 46u8, 231u8, 163u8, 74u8, 193u8, 148u8, 247u8, 23u8, - 163u8, 94u8, 9u8, 187u8, 29u8, 36u8, 200u8, 42u8, 59u8, 157u8, 133u8, - 74u8, 182u8, 201u8, 116u8, 149u8, 37u8, 183u8, 20u8, 205u8, 242u8, + 24u8, 53u8, 136u8, 46u8, 231u8, 163u8, 74u8, 193u8, 148u8, 247u8, 23u8, 163u8, + 94u8, 9u8, 187u8, 29u8, 36u8, 200u8, 42u8, 59u8, 157u8, 133u8, 74u8, 182u8, 201u8, + 116u8, 149u8, 37u8, 183u8, 20u8, 205u8, 242u8, ], [ - 107u8, 251u8, 104u8, 149u8, 40u8, 250u8, 150u8, 236u8, 26u8, 214u8, - 112u8, 173u8, 109u8, 96u8, 100u8, 190u8, 26u8, 233u8, 107u8, 253u8, 93u8, - 46u8, 227u8, 92u8, 131u8, 127u8, 208u8, 254u8, 12u8, 17u8, 149u8, 154u8, + 107u8, 251u8, 104u8, 149u8, 40u8, 250u8, 150u8, 236u8, 26u8, 214u8, 112u8, 173u8, + 109u8, 96u8, 100u8, 190u8, 26u8, 233u8, 107u8, 253u8, 93u8, 46u8, 227u8, 92u8, + 131u8, 127u8, 208u8, 254u8, 12u8, 17u8, 149u8, 154u8, ], [ - 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, + 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, ], [ - 158u8, 58u8, 94u8, 55u8, 34u8, 69u8, 50u8, 222u8, 166u8, 123u8, 137u8, - 250u8, 206u8, 24u8, 87u8, 3u8, 115u8, 138u8, 34u8, 138u8, 110u8, 138u8, - 35u8, 222u8, 229u8, 70u8, 150u8, 1u8, 128u8, 211u8, 190u8, 100u8, + 158u8, 58u8, 94u8, 55u8, 34u8, 69u8, 50u8, 222u8, 166u8, 123u8, 137u8, 250u8, + 206u8, 24u8, 87u8, 3u8, 115u8, 138u8, 34u8, 138u8, 110u8, 138u8, 35u8, 222u8, + 229u8, 70u8, 150u8, 1u8, 128u8, 211u8, 190u8, 100u8, ], [ - 160u8, 208u8, 21u8, 147u8, 228u8, 126u8, 105u8, 208u8, 126u8, 12u8, - 205u8, 135u8, 190u8, 206u8, 9u8, 65u8, 30u8, 7u8, 221u8, 30u8, 212u8, - 12u8, 168u8, 242u8, 231u8, 175u8, 41u8, 118u8, 84u8, 42u8, 2u8, 51u8, + 160u8, 208u8, 21u8, 147u8, 228u8, 126u8, 105u8, 208u8, 126u8, 12u8, 205u8, 135u8, + 190u8, 206u8, 9u8, 65u8, 30u8, 7u8, 221u8, 30u8, 212u8, 12u8, 168u8, 242u8, 231u8, + 175u8, 41u8, 118u8, 84u8, 42u8, 2u8, 51u8, ], [ - 169u8, 186u8, 63u8, 254u8, 11u8, 108u8, 54u8, 107u8, 129u8, 35u8, 44u8, - 170u8, 179u8, 134u8, 5u8, 160u8, 105u8, 154u8, 213u8, 57u8, 141u8, 108u8, - 206u8, 118u8, 249u8, 30u8, 232u8, 9u8, 227u8, 34u8, 218u8, 252u8, + 169u8, 186u8, 63u8, 254u8, 11u8, 108u8, 54u8, 107u8, 129u8, 35u8, 44u8, 170u8, + 179u8, 134u8, 5u8, 160u8, 105u8, 154u8, 213u8, 57u8, 141u8, 108u8, 206u8, 118u8, + 249u8, 30u8, 232u8, 9u8, 227u8, 34u8, 218u8, 252u8, ], [ - 183u8, 122u8, 131u8, 32u8, 76u8, 162u8, 130u8, 224u8, 141u8, 195u8, - 166u8, 91u8, 10u8, 28u8, 163u8, 46u8, 164u8, 230u8, 135u8, 92u8, 56u8, - 239u8, 11u8, 245u8, 191u8, 117u8, 229u8, 42u8, 103u8, 53u8, 79u8, 172u8, + 183u8, 122u8, 131u8, 32u8, 76u8, 162u8, 130u8, 224u8, 141u8, 195u8, 166u8, 91u8, + 10u8, 28u8, 163u8, 46u8, 164u8, 230u8, 135u8, 92u8, 56u8, 239u8, 11u8, 245u8, + 191u8, 117u8, 229u8, 42u8, 103u8, 53u8, 79u8, 172u8, ], [ - 221u8, 109u8, 28u8, 155u8, 173u8, 179u8, 70u8, 222u8, 105u8, 37u8, 179u8, - 88u8, 164u8, 114u8, 201u8, 55u8, 180u8, 22u8, 152u8, 210u8, 99u8, 38u8, - 150u8, 117u8, 158u8, 67u8, 253u8, 101u8, 39u8, 254u8, 238u8, 196u8, + 221u8, 109u8, 28u8, 155u8, 173u8, 179u8, 70u8, 222u8, 105u8, 37u8, 179u8, 88u8, + 164u8, 114u8, 201u8, 55u8, 180u8, 22u8, 152u8, 210u8, 99u8, 38u8, 150u8, 117u8, + 158u8, 67u8, 253u8, 101u8, 39u8, 254u8, 238u8, 196u8, ], [ - 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, + 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, ], [ - 239u8, 243u8, 212u8, 210u8, 21u8, 180u8, 43u8, 240u8, 150u8, 11u8, 233u8, - 198u8, 213u8, 224u8, 92u8, 34u8, 203u8, 164u8, 223u8, 102u8, 39u8, 163u8, - 165u8, 35u8, 226u8, 172u8, 238u8, 115u8, 59u8, 88u8, 84u8, 200u8, + 239u8, 243u8, 212u8, 210u8, 21u8, 180u8, 43u8, 240u8, 150u8, 11u8, 233u8, 198u8, + 213u8, 224u8, 92u8, 34u8, 203u8, 164u8, 223u8, 102u8, 39u8, 163u8, 165u8, 35u8, + 226u8, 172u8, 238u8, 115u8, 59u8, 88u8, 84u8, 200u8, ], ]; - /// The names of the variants in the same order as `SELECTORS`. - pub const VARIANT_NAMES: &'static [&'static str] = &[ - ::core::stringify!(AmpUpdateStarted), - ::core::stringify!(ProtocolFeePercentageCacheUpdated), - ::core::stringify!(Approval), - ::core::stringify!(PausedStateChanged), - ::core::stringify!(AmpUpdateStopped), - ::core::stringify!(SwapFeePercentageChanged), - ::core::stringify!(TokenRateCacheUpdated), - ::core::stringify!(TokenRateProviderSet), - ::core::stringify!(Transfer), - ::core::stringify!(RecoveryModeStateChanged), - ]; /// The signatures in the same order as `SELECTORS`. pub const SIGNATURES: &'static [&'static str] = &[ ::SIGNATURE, @@ -6301,6 +6122,20 @@ function version() external view returns (string memory); ::SIGNATURE, ::SIGNATURE, ]; + /// The names of the variants in the same order as `SELECTORS`. + pub const VARIANT_NAMES: &'static [&'static str] = &[ + ::core::stringify!(AmpUpdateStarted), + ::core::stringify!(ProtocolFeePercentageCacheUpdated), + ::core::stringify!(Approval), + ::core::stringify!(PausedStateChanged), + ::core::stringify!(AmpUpdateStopped), + ::core::stringify!(SwapFeePercentageChanged), + ::core::stringify!(TokenRateCacheUpdated), + ::core::stringify!(TokenRateProviderSet), + ::core::stringify!(Transfer), + ::core::stringify!(RecoveryModeStateChanged), + ]; + /// Returns the signature for the given selector, if known. #[inline] pub fn signature_by_selector( @@ -6313,19 +6148,19 @@ function version() external view returns (string memory); ::core::result::Result::Err(_) => ::core::option::Option::None, } } + /// Returns the enum variant name for the given selector, if known. #[inline] - pub fn name_by_selector( - selector: [u8; 32usize], - ) -> ::core::option::Option<&'static str> { + pub fn name_by_selector(selector: [u8; 32usize]) -> ::core::option::Option<&'static str> { let sig = Self::signature_by_selector(selector)?; sig.split_once('(').map(|(name, _)| name) } } #[automatically_derived] impl alloy_sol_types::SolEventInterface for BalancerV2ComposableStablePoolEvents { - const NAME: &'static str = "BalancerV2ComposableStablePoolEvents"; const COUNT: usize = 10usize; + const NAME: &'static str = "BalancerV2ComposableStablePoolEvents"; + fn decode_raw_log( topics: &[alloy_sol_types::Word], data: &[u8], @@ -6431,9 +6266,7 @@ function version() external view returns (string memory); Self::AmpUpdateStopped(inner) => { alloy_sol_types::private::IntoLogData::to_log_data(inner) } - Self::Approval(inner) => { - alloy_sol_types::private::IntoLogData::to_log_data(inner) - } + Self::Approval(inner) => alloy_sol_types::private::IntoLogData::to_log_data(inner), Self::PausedStateChanged(inner) => { alloy_sol_types::private::IntoLogData::to_log_data(inner) } @@ -6452,11 +6285,10 @@ function version() external view returns (string memory); Self::TokenRateProviderSet(inner) => { alloy_sol_types::private::IntoLogData::to_log_data(inner) } - Self::Transfer(inner) => { - alloy_sol_types::private::IntoLogData::to_log_data(inner) - } + Self::Transfer(inner) => alloy_sol_types::private::IntoLogData::to_log_data(inner), } } + fn into_log_data(self) -> alloy_sol_types::private::LogData { match self { Self::AmpUpdateStarted(inner) => { @@ -6492,10 +6324,10 @@ function version() external view returns (string memory); } } } - use alloy_contract as alloy_contract; + use alloy_contract; /**Creates a new wrapper around an on-chain [`BalancerV2ComposableStablePool`](self) contract instance. -See the [wrapper's documentation](`BalancerV2ComposableStablePoolInstance`) for more details.*/ + See the [wrapper's documentation](`BalancerV2ComposableStablePoolInstance`) for more details.*/ #[inline] pub const fn new< P: alloy_contract::private::Provider, @@ -6508,20 +6340,17 @@ See the [wrapper's documentation](`BalancerV2ComposableStablePoolInstance`) for } /**A [`BalancerV2ComposableStablePool`](self) instance. -Contains type-safe methods for interacting with an on-chain instance of the -[`BalancerV2ComposableStablePool`](self) contract located at a given `address`, using a given -provider `P`. + Contains type-safe methods for interacting with an on-chain instance of the + [`BalancerV2ComposableStablePool`](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. + 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.*/ + See the [module-level documentation](self) for all the available methods.*/ #[derive(Clone)] - pub struct BalancerV2ComposableStablePoolInstance< - P, - N = alloy_contract::private::Ethereum, - > { + pub struct BalancerV2ComposableStablePoolInstance { address: alloy_sol_types::private::Address, provider: P, _network: ::core::marker::PhantomData, @@ -6536,39 +6365,39 @@ See the [module-level documentation](self) for all the available methods.*/ } } /// Instantiation and getters/setters. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > BalancerV2ComposableStablePoolInstance { + impl, N: alloy_contract::private::Network> + BalancerV2ComposableStablePoolInstance + { /**Creates a new wrapper around an on-chain [`BalancerV2ComposableStablePool`](self) contract instance. -See the [wrapper's documentation](`BalancerV2ComposableStablePoolInstance`) for more details.*/ + See the [wrapper's documentation](`BalancerV2ComposableStablePoolInstance`) for more details.*/ #[inline] - pub const fn new( - address: alloy_sol_types::private::Address, - __provider: P, - ) -> Self { + pub const fn new(address: alloy_sol_types::private::Address, __provider: P) -> Self { Self { address, provider: __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 { @@ -6576,11 +6405,10 @@ See the [wrapper's documentation](`BalancerV2ComposableStablePoolInstance`) for } } impl BalancerV2ComposableStablePoolInstance<&P, N> { - /// Clones the provider and returns a new instance with the cloned provider. + /// Clones the provider and returns a new instance with the cloned + /// provider. #[inline] - pub fn with_cloned_provider( - self, - ) -> BalancerV2ComposableStablePoolInstance { + pub fn with_cloned_provider(self) -> BalancerV2ComposableStablePoolInstance { BalancerV2ComposableStablePoolInstance { address: self.address, provider: ::core::clone::Clone::clone(&self.provider), @@ -6589,26 +6417,29 @@ See the [wrapper's documentation](`BalancerV2ComposableStablePoolInstance`) for } } /// Function calls. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > BalancerV2ComposableStablePoolInstance { - /// Creates a new call builder using this contract instance's provider and address. + impl, N: alloy_contract::private::Network> + BalancerV2ComposableStablePoolInstance + { + /// 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. + /// 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 [`DOMAIN_SEPARATOR`] function. pub fn DOMAIN_SEPARATOR( &self, ) -> alloy_contract::SolCallBuilder<&P, DOMAIN_SEPARATORCall, N> { self.call_builder(&DOMAIN_SEPARATORCall) } + ///Creates a new call builder for the [`allowance`] function. pub fn allowance( &self, @@ -6617,6 +6448,7 @@ See the [wrapper's documentation](`BalancerV2ComposableStablePoolInstance`) for ) -> 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, @@ -6625,6 +6457,7 @@ See the [wrapper's documentation](`BalancerV2ComposableStablePoolInstance`) for ) -> alloy_contract::SolCallBuilder<&P, approveCall, N> { self.call_builder(&approveCall { spender, amount }) } + ///Creates a new call builder for the [`balanceOf`] function. pub fn balanceOf( &self, @@ -6632,42 +6465,50 @@ See the [wrapper's documentation](`BalancerV2ComposableStablePoolInstance`) for ) -> alloy_contract::SolCallBuilder<&P, balanceOfCall, N> { self.call_builder(&balanceOfCall { account }) } + ///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 [`getAmplificationParameter`] function. + + ///Creates a new call builder for the [`getAmplificationParameter`] + /// function. pub fn getAmplificationParameter( &self, ) -> alloy_contract::SolCallBuilder<&P, getAmplificationParameterCall, N> { self.call_builder(&getAmplificationParameterCall) } + ///Creates a new call builder for the [`getPausedState`] function. - pub fn getPausedState( - &self, - ) -> alloy_contract::SolCallBuilder<&P, getPausedStateCall, N> { + pub fn getPausedState(&self) -> alloy_contract::SolCallBuilder<&P, getPausedStateCall, N> { self.call_builder(&getPausedStateCall) } + ///Creates a new call builder for the [`getPoolId`] function. pub fn getPoolId(&self) -> alloy_contract::SolCallBuilder<&P, getPoolIdCall, N> { self.call_builder(&getPoolIdCall) } + ///Creates a new call builder for the [`getScalingFactors`] function. pub fn getScalingFactors( &self, ) -> alloy_contract::SolCallBuilder<&P, getScalingFactorsCall, N> { self.call_builder(&getScalingFactorsCall) } - ///Creates a new call builder for the [`getSwapFeePercentage`] function. + + ///Creates a new call builder for the [`getSwapFeePercentage`] + /// function. pub fn getSwapFeePercentage( &self, ) -> alloy_contract::SolCallBuilder<&P, getSwapFeePercentageCall, N> { self.call_builder(&getSwapFeePercentageCall) } + ///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 [`nonces`] function. pub fn nonces( &self, @@ -6675,10 +6516,12 @@ See the [wrapper's documentation](`BalancerV2ComposableStablePoolInstance`) for ) -> alloy_contract::SolCallBuilder<&P, noncesCall, N> { self.call_builder(&noncesCall { owner }) } + ///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 [`permit`] function. pub fn permit( &self, @@ -6690,22 +6533,22 @@ See the [wrapper's documentation](`BalancerV2ComposableStablePoolInstance`) for r: alloy_sol_types::private::FixedBytes<32>, s: alloy_sol_types::private::FixedBytes<32>, ) -> alloy_contract::SolCallBuilder<&P, permitCall, N> { - self.call_builder( - &permitCall { - owner, - spender, - value, - deadline, - v, - r, - s, - }, - ) + self.call_builder(&permitCall { + owner, + spender, + value, + deadline, + v, + r, + s, + }) } + ///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 [`transfer`] function. pub fn transfer( &self, @@ -6714,6 +6557,7 @@ See the [wrapper's documentation](`BalancerV2ComposableStablePoolInstance`) for ) -> alloy_contract::SolCallBuilder<&P, transferCall, N> { self.call_builder(&transferCall { recipient, amount }) } + ///Creates a new call builder for the [`transferFrom`] function. pub fn transferFrom( &self, @@ -6721,85 +6565,94 @@ See the [wrapper's documentation](`BalancerV2ComposableStablePoolInstance`) for recipient: alloy_sol_types::private::Address, amount: alloy_sol_types::private::primitives::aliases::U256, ) -> alloy_contract::SolCallBuilder<&P, transferFromCall, N> { - self.call_builder( - &transferFromCall { - sender, - recipient, - amount, - }, - ) + self.call_builder(&transferFromCall { + sender, + recipient, + amount, + }) } + ///Creates a new call builder for the [`version`] function. pub fn version(&self) -> alloy_contract::SolCallBuilder<&P, versionCall, N> { self.call_builder(&versionCall) } } /// Event filters. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > BalancerV2ComposableStablePoolInstance { - /// Creates a new event filter using this contract instance's provider and address. + impl, N: alloy_contract::private::Network> + BalancerV2ComposableStablePoolInstance + { + /// 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. + /// 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 [`AmpUpdateStarted`] event. - pub fn AmpUpdateStarted_filter( - &self, - ) -> alloy_contract::Event<&P, AmpUpdateStarted, N> { + pub fn AmpUpdateStarted_filter(&self) -> alloy_contract::Event<&P, AmpUpdateStarted, N> { self.event_filter::() } + ///Creates a new event filter for the [`AmpUpdateStopped`] event. - pub fn AmpUpdateStopped_filter( - &self, - ) -> alloy_contract::Event<&P, AmpUpdateStopped, N> { + pub fn AmpUpdateStopped_filter(&self) -> alloy_contract::Event<&P, AmpUpdateStopped, N> { self.event_filter::() } + ///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 [`PausedStateChanged`] event. pub fn PausedStateChanged_filter( &self, ) -> alloy_contract::Event<&P, PausedStateChanged, N> { self.event_filter::() } - ///Creates a new event filter for the [`ProtocolFeePercentageCacheUpdated`] event. + + ///Creates a new event filter for the + /// [`ProtocolFeePercentageCacheUpdated`] event. pub fn ProtocolFeePercentageCacheUpdated_filter( &self, ) -> alloy_contract::Event<&P, ProtocolFeePercentageCacheUpdated, N> { self.event_filter::() } - ///Creates a new event filter for the [`RecoveryModeStateChanged`] event. + + ///Creates a new event filter for the [`RecoveryModeStateChanged`] + /// event. pub fn RecoveryModeStateChanged_filter( &self, ) -> alloy_contract::Event<&P, RecoveryModeStateChanged, N> { self.event_filter::() } - ///Creates a new event filter for the [`SwapFeePercentageChanged`] event. + + ///Creates a new event filter for the [`SwapFeePercentageChanged`] + /// event. pub fn SwapFeePercentageChanged_filter( &self, ) -> alloy_contract::Event<&P, SwapFeePercentageChanged, N> { self.event_filter::() } + ///Creates a new event filter for the [`TokenRateCacheUpdated`] event. pub fn TokenRateCacheUpdated_filter( &self, ) -> alloy_contract::Event<&P, TokenRateCacheUpdated, N> { self.event_filter::() } + ///Creates a new event filter for the [`TokenRateProviderSet`] event. pub fn TokenRateProviderSet_filter( &self, ) -> alloy_contract::Event<&P, TokenRateProviderSet, 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::() diff --git a/contracts/generated/contracts-generated/balancerv2composablestablepoolfactory/src/lib.rs b/contracts/generated/contracts-generated/balancerv2composablestablepoolfactory/src/lib.rs index bffdceb904..37993f652e 100644 --- a/contracts/generated/contracts-generated/balancerv2composablestablepoolfactory/src/lib.rs +++ b/contracts/generated/contracts-generated/balancerv2composablestablepoolfactory/src/lib.rs @@ -1,4 +1,10 @@ -#![allow(unused_imports, unused_attributes, clippy::all, rustdoc::all, non_snake_case)] +#![allow( + unused_imports, + unused_attributes, + clippy::all, + rustdoc::all, + non_snake_case +)] //! Auto-generated contract bindings. Do not edit. /** @@ -153,13 +159,12 @@ interface BalancerV2ComposableStablePoolFactory { clippy::empty_structs_with_brackets )] pub mod BalancerV2ComposableStablePoolFactory { - use super::*; - use alloy_sol_types as alloy_sol_types; + use {super::*, alloy_sol_types}; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Event with signature `FactoryDisabled()` and selector `0x432acbfd662dbb5d8b378384a67159b47ca9d0f1b79f97cf64cf8585fa362d50`. -```solidity -event FactoryDisabled(); -```*/ + ```solidity + event FactoryDisabled(); + ```*/ #[allow( non_camel_case_types, non_snake_case, @@ -175,21 +180,22 @@ event FactoryDisabled(); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[automatically_derived] impl alloy_sol_types::SolEvent for FactoryDisabled { + type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type DataTuple<'a> = (); - type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type TopicList = (alloy_sol_types::sol_data::FixedBytes<32>,); - const SIGNATURE: &'static str = "FactoryDisabled()"; - const SIGNATURE_HASH: alloy_sol_types::private::B256 = alloy_sol_types::private::B256::new([ - 67u8, 42u8, 203u8, 253u8, 102u8, 45u8, 187u8, 93u8, 139u8, 55u8, 131u8, - 132u8, 166u8, 113u8, 89u8, 180u8, 124u8, 169u8, 208u8, 241u8, 183u8, - 159u8, 151u8, 207u8, 100u8, 207u8, 133u8, 133u8, 250u8, 54u8, 45u8, 80u8, - ]); + const ANONYMOUS: bool = false; + const SIGNATURE: &'static str = "FactoryDisabled()"; + const SIGNATURE_HASH: alloy_sol_types::private::B256 = + alloy_sol_types::private::B256::new([ + 67u8, 42u8, 203u8, 253u8, 102u8, 45u8, 187u8, 93u8, 139u8, 55u8, 131u8, 132u8, + 166u8, 113u8, 89u8, 180u8, 124u8, 169u8, 208u8, 241u8, 183u8, 159u8, 151u8, + 207u8, 100u8, 207u8, 133u8, 133u8, 250u8, 54u8, 45u8, 80u8, + ]); + #[allow(unused_variables)] #[inline] fn new( @@ -198,29 +204,31 @@ event FactoryDisabled(); ) -> Self { Self {} } + #[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, - ), - ); + 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(),) } + #[inline] fn encode_topics_raw( &self, @@ -229,9 +237,7 @@ event FactoryDisabled(); if out.len() < ::COUNT { return Err(alloy_sol_types::Error::Overrun); } - out[0usize] = alloy_sol_types::abi::token::WordToken( - Self::SIGNATURE_HASH, - ); + out[0usize] = alloy_sol_types::abi::token::WordToken(Self::SIGNATURE_HASH); Ok(()) } } @@ -240,6 +246,7 @@ event FactoryDisabled(); 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) } @@ -254,9 +261,9 @@ event FactoryDisabled(); }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Event with signature `PoolCreated(address)` and selector `0x83a48fbcfc991335314e74d0496aab6a1987e992ddc85dddbcc4d6dd6ef2e9fc`. -```solidity -event PoolCreated(address indexed pool); -```*/ + ```solidity + event PoolCreated(address indexed pool); + ```*/ #[allow( non_camel_case_types, non_snake_case, @@ -275,25 +282,25 @@ event PoolCreated(address indexed pool); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[automatically_derived] impl alloy_sol_types::SolEvent for PoolCreated { + type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; 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::Address, ); - const SIGNATURE: &'static str = "PoolCreated(address)"; - const SIGNATURE_HASH: alloy_sol_types::private::B256 = alloy_sol_types::private::B256::new([ - 131u8, 164u8, 143u8, 188u8, 252u8, 153u8, 19u8, 53u8, 49u8, 78u8, 116u8, - 208u8, 73u8, 106u8, 171u8, 106u8, 25u8, 135u8, 233u8, 146u8, 221u8, - 200u8, 93u8, 221u8, 188u8, 196u8, 214u8, 221u8, 110u8, 242u8, 233u8, - 252u8, - ]); + const ANONYMOUS: bool = false; + const SIGNATURE: &'static str = "PoolCreated(address)"; + const SIGNATURE_HASH: alloy_sol_types::private::B256 = + alloy_sol_types::private::B256::new([ + 131u8, 164u8, 143u8, 188u8, 252u8, 153u8, 19u8, 53u8, 49u8, 78u8, 116u8, 208u8, + 73u8, 106u8, 171u8, 106u8, 25u8, 135u8, 233u8, 146u8, 221u8, 200u8, 93u8, + 221u8, 188u8, 196u8, 214u8, 221u8, 110u8, 242u8, 233u8, 252u8, + ]); + #[allow(unused_variables)] #[inline] fn new( @@ -302,29 +309,31 @@ event PoolCreated(address indexed pool); ) -> Self { Self { pool: topics.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, - ), - ); + 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.pool.clone()) } + #[inline] fn encode_topics_raw( &self, @@ -333,9 +342,7 @@ event PoolCreated(address indexed pool); if out.len() < ::COUNT { return Err(alloy_sol_types::Error::Overrun); } - out[0usize] = alloy_sol_types::abi::token::WordToken( - Self::SIGNATURE_HASH, - ); + out[0usize] = alloy_sol_types::abi::token::WordToken(Self::SIGNATURE_HASH); out[1usize] = ::encode_topic( &self.pool, ); @@ -347,6 +354,7 @@ event PoolCreated(address indexed pool); 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) } @@ -360,9 +368,9 @@ event PoolCreated(address indexed pool); } }; /**Constructor`. -```solidity -constructor(address vault, address protocolFeeProvider, string factoryVersion, string poolVersion); -```*/ + ```solidity + constructor(address vault, address protocolFeeProvider, string factoryVersion, string poolVersion); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct constructorCall { @@ -376,7 +384,7 @@ constructor(address vault, address protocolFeeProvider, string factoryVersion, s pub poolVersion: alloy_sol_types::private::String, } const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -395,9 +403,7 @@ constructor(address vault, address protocolFeeProvider, string factoryVersion, s ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -437,15 +443,15 @@ constructor(address vault, address protocolFeeProvider, string factoryVersion, s alloy_sol_types::sol_data::String, alloy_sol_types::sol_data::String, ); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + 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<'_> { ( @@ -467,9 +473,9 @@ constructor(address vault, address protocolFeeProvider, string factoryVersion, s }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `create(string,string,address[],uint256,address[],uint256[],bool[],uint256,address)` and selector `0x66b59f6c`. -```solidity -function create(string memory name, string memory symbol, address[] memory tokens, uint256 amplificationParameter, address[] memory rateProviders, uint256[] memory tokenRateCacheDurations, bool[] memory exemptFromYieldProtocolFeeFlags, uint256 swapFeePercentage, address owner) external returns (address); -```*/ + ```solidity + function create(string memory name, string memory symbol, address[] memory tokens, uint256 amplificationParameter, address[] memory rateProviders, uint256[] memory tokenRateCacheDurations, bool[] memory exemptFromYieldProtocolFeeFlags, uint256 swapFeePercentage, address owner) external returns (address); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct createCall { @@ -482,13 +488,10 @@ function create(string memory name, string memory symbol, address[] memory token #[allow(missing_docs)] pub amplificationParameter: alloy_sol_types::private::primitives::aliases::U256, #[allow(missing_docs)] - pub rateProviders: alloy_sol_types::private::Vec< - alloy_sol_types::private::Address, - >, + pub rateProviders: alloy_sol_types::private::Vec, #[allow(missing_docs)] - pub tokenRateCacheDurations: alloy_sol_types::private::Vec< - alloy_sol_types::private::primitives::aliases::U256, - >, + pub tokenRateCacheDurations: + alloy_sol_types::private::Vec, #[allow(missing_docs)] pub exemptFromYieldProtocolFeeFlags: alloy_sol_types::private::Vec, #[allow(missing_docs)] @@ -497,7 +500,9 @@ function create(string memory name, string memory symbol, address[] memory token pub owner: alloy_sol_types::private::Address, } #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`create(string,string,address[],uint256,address[],uint256[],bool[],uint256,address)`](createCall) function. + ///Container type for the return parameters of the + /// [`create(string,string,address[],uint256,address[],uint256[],bool[], + /// uint256,address)`](createCall) function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct createReturn { @@ -511,7 +516,7 @@ function create(string memory name, string memory symbol, address[] memory token clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -533,18 +538,14 @@ function create(string memory name, string memory symbol, address[] memory token alloy_sol_types::private::Vec, alloy_sol_types::private::primitives::aliases::U256, alloy_sol_types::private::Vec, - alloy_sol_types::private::Vec< - alloy_sol_types::private::primitives::aliases::U256, - >, + alloy_sol_types::private::Vec, alloy_sol_types::private::Vec, 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, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -594,9 +595,7 @@ function create(string memory name, string memory symbol, address[] memory token type UnderlyingRustTuple<'a> = (alloy_sol_types::private::Address,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -631,22 +630,22 @@ function create(string memory name, string memory symbol, address[] memory token 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::Address; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (alloy_sol_types::sol_data::Address,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "create(string,string,address[],uint256,address[],uint256[],bool[],uint256,address)"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [102u8, 181u8, 159u8, 108u8]; + const SIGNATURE: &'static str = "create(string,string,address[],uint256,address[],\ + uint256[],bool[],uint256,address)"; + #[inline] fn new<'a>( tuple: as alloy_sol_types::SolType>::RustType, ) -> Self { tuple.into() } + #[inline] fn tokenize(&self) -> Self::Token<'_> { ( @@ -685,47 +684,44 @@ function create(string memory name, string memory symbol, address[] memory token ), ) } + #[inline] fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { - ( - ::tokenize( - ret, - ), - ) + (::tokenize(ret),) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) - .map(|r| { + as alloy_sol_types::SolType>::abi_decode_sequence(data).map( + |r| { let r: createReturn = 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: createReturn = r.into(); - r._0 - }) + 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: createReturn = r.into(); + r._0 + }) } } }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `disable()` and selector `0x2f2770db`. -```solidity -function disable() external; -```*/ + ```solidity + function disable() external; + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct disableCall; - ///Container type for the return parameters of the [`disable()`](disableCall) function. + ///Container type for the return parameters of the + /// [`disable()`](disableCall) function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct disableReturn {} @@ -736,7 +732,7 @@ function disable() external; clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -745,9 +741,7 @@ function disable() external; type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -777,9 +771,7 @@ function disable() external; type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -802,67 +794,64 @@ function disable() external; } } impl disableReturn { - fn _tokenize( - &self, - ) -> ::ReturnToken<'_> { + fn _tokenize(&self) -> ::ReturnToken<'_> { () } } #[automatically_derived] impl alloy_sol_types::SolCall for disableCall { type Parameters<'a> = (); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = disableReturn; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "disable()"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [47u8, 39u8, 112u8, 219u8]; + const SIGNATURE: &'static str = "disable()"; + #[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<'_> { disableReturn::_tokenize(ret) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) + 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) + 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(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `version()` and selector `0x54fd4d50`. -```solidity -function version() external view returns (string memory); -```*/ + ```solidity + function version() external view returns (string memory); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct versionCall; #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`version()`](versionCall) function. + ///Container type for the return parameters of the + /// [`version()`](versionCall) function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct versionReturn { @@ -876,7 +865,7 @@ function version() external view returns (string memory); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -885,9 +874,7 @@ function version() external view returns (string memory); type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -917,9 +904,7 @@ function version() external view returns (string memory); type UnderlyingRustTuple<'a> = (alloy_sol_types::private::String,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -944,61 +929,56 @@ function version() external view returns (string memory); #[automatically_derived] impl alloy_sol_types::SolCall for versionCall { type Parameters<'a> = (); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = alloy_sol_types::private::String; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (alloy_sol_types::sol_data::String,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "version()"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [84u8, 253u8, 77u8, 80u8]; + const SIGNATURE: &'static str = "version()"; + #[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, - ), - ) + (::tokenize(ret),) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) - .map(|r| { + as alloy_sol_types::SolType>::abi_decode_sequence(data).map( + |r| { let r: versionReturn = 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: versionReturn = r.into(); - r._0 - }) + 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: versionReturn = r.into(); + r._0 + }) } } }; - ///Container for all the [`BalancerV2ComposableStablePoolFactory`](self) function calls. + ///Container for all the [`BalancerV2ComposableStablePoolFactory`](self) + /// function calls. #[derive(Clone)] - #[derive()] pub enum BalancerV2ComposableStablePoolFactoryCalls { #[allow(missing_docs)] create(createCall), @@ -1010,8 +990,9 @@ function version() external view returns (string memory); impl BalancerV2ComposableStablePoolFactoryCalls { /// 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. + /// 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]] = &[ @@ -1019,18 +1000,19 @@ function version() external view returns (string memory); [84u8, 253u8, 77u8, 80u8], [102u8, 181u8, 159u8, 108u8], ]; - /// The names of the variants in the same order as `SELECTORS`. - pub const VARIANT_NAMES: &'static [&'static str] = &[ - ::core::stringify!(disable), - ::core::stringify!(version), - ::core::stringify!(create), - ]; /// The signatures in the same order as `SELECTORS`. pub const SIGNATURES: &'static [&'static str] = &[ ::SIGNATURE, ::SIGNATURE, ::SIGNATURE, ]; + /// The names of the variants in the same order as `SELECTORS`. + pub const VARIANT_NAMES: &'static [&'static str] = &[ + ::core::stringify!(disable), + ::core::stringify!(version), + ::core::stringify!(create), + ]; + /// Returns the signature for the given selector, if known. #[inline] pub fn signature_by_selector( @@ -1043,20 +1025,20 @@ function version() external view returns (string memory); ::core::result::Result::Err(_) => ::core::option::Option::None, } } + /// Returns the enum variant name for the given selector, if known. #[inline] - pub fn name_by_selector( - selector: [u8; 4usize], - ) -> ::core::option::Option<&'static str> { + pub fn name_by_selector(selector: [u8; 4usize]) -> ::core::option::Option<&'static str> { let sig = Self::signature_by_selector(selector)?; sig.split_once('(').map(|(name, _)| name) } } #[automatically_derived] impl alloy_sol_types::SolInterface for BalancerV2ComposableStablePoolFactoryCalls { - const NAME: &'static str = "BalancerV2ComposableStablePoolFactoryCalls"; - const MIN_DATA_LENGTH: usize = 0usize; const COUNT: usize = 3usize; + const MIN_DATA_LENGTH: usize = 0usize; + const NAME: &'static str = "BalancerV2ComposableStablePoolFactoryCalls"; + #[inline] fn selector(&self) -> [u8; 4] { match self { @@ -1065,29 +1047,30 @@ function version() external view returns (string memory); Self::version(_) => ::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 { + fn abi_decode_raw(selector: [u8; 4], data: &[u8]) -> alloy_sol_types::Result { static DECODE_SHIMS: &[fn( &[u8], - ) -> alloy_sol_types::Result] = &[ + ) -> alloy_sol_types::Result< + BalancerV2ComposableStablePoolFactoryCalls, + >] = &[ { fn disable( data: &[u8], - ) -> alloy_sol_types::Result< - BalancerV2ComposableStablePoolFactoryCalls, - > { + ) -> alloy_sol_types::Result + { ::abi_decode_raw(data) .map(BalancerV2ComposableStablePoolFactoryCalls::disable) } @@ -1096,9 +1079,8 @@ function version() external view returns (string memory); { fn version( data: &[u8], - ) -> alloy_sol_types::Result< - BalancerV2ComposableStablePoolFactoryCalls, - > { + ) -> alloy_sol_types::Result + { ::abi_decode_raw(data) .map(BalancerV2ComposableStablePoolFactoryCalls::version) } @@ -1107,9 +1089,8 @@ function version() external view returns (string memory); { fn create( data: &[u8], - ) -> alloy_sol_types::Result< - BalancerV2ComposableStablePoolFactoryCalls, - > { + ) -> alloy_sol_types::Result + { ::abi_decode_raw(data) .map(BalancerV2ComposableStablePoolFactoryCalls::create) } @@ -1117,15 +1098,14 @@ function version() external view returns (string memory); }, ]; let Ok(idx) = Self::SELECTORS.binary_search(&selector) else { - return Err( - alloy_sol_types::Error::unknown_selector( - ::NAME, - selector, - ), - ); + return Err(alloy_sol_types::Error::unknown_selector( + ::NAME, + selector, + )); }; DECODE_SHIMS[idx](data) } + #[inline] #[allow(non_snake_case)] fn abi_decode_raw_validate( @@ -1134,16 +1114,15 @@ function version() external view returns (string memory); ) -> alloy_sol_types::Result { static DECODE_VALIDATE_SHIMS: &[fn( &[u8], - ) -> alloy_sol_types::Result] = &[ + ) -> alloy_sol_types::Result< + BalancerV2ComposableStablePoolFactoryCalls, + >] = &[ { fn disable( data: &[u8], - ) -> alloy_sol_types::Result< - BalancerV2ComposableStablePoolFactoryCalls, - > { - ::abi_decode_raw_validate( - data, - ) + ) -> alloy_sol_types::Result + { + ::abi_decode_raw_validate(data) .map(BalancerV2ComposableStablePoolFactoryCalls::disable) } disable @@ -1151,12 +1130,9 @@ function version() external view returns (string memory); { fn version( data: &[u8], - ) -> alloy_sol_types::Result< - BalancerV2ComposableStablePoolFactoryCalls, - > { - ::abi_decode_raw_validate( - data, - ) + ) -> alloy_sol_types::Result + { + ::abi_decode_raw_validate(data) .map(BalancerV2ComposableStablePoolFactoryCalls::version) } version @@ -1164,27 +1140,23 @@ function version() external view returns (string memory); { fn create( data: &[u8], - ) -> alloy_sol_types::Result< - BalancerV2ComposableStablePoolFactoryCalls, - > { - ::abi_decode_raw_validate( - data, - ) + ) -> alloy_sol_types::Result + { + ::abi_decode_raw_validate(data) .map(BalancerV2ComposableStablePoolFactoryCalls::create) } create }, ]; let Ok(idx) = Self::SELECTORS.binary_search(&selector) else { - return Err( - alloy_sol_types::Error::unknown_selector( - ::NAME, - selector, - ), - ); + return Err(alloy_sol_types::Error::unknown_selector( + ::NAME, + selector, + )); }; DECODE_VALIDATE_SHIMS[idx](data) } + #[inline] fn abi_encoded_size(&self) -> usize { match self { @@ -1199,6 +1171,7 @@ function version() external view returns (string memory); } } } + #[inline] fn abi_encode_raw(&self, out: &mut alloy_sol_types::private::Vec) { match self { @@ -1214,9 +1187,9 @@ function version() external view returns (string memory); } } } - ///Container for all the [`BalancerV2ComposableStablePoolFactory`](self) events. - #[derive(Clone)] - #[derive(Debug, PartialEq, Eq, Hash)] + ///Container for all the [`BalancerV2ComposableStablePoolFactory`](self) + /// events. + #[derive(Clone, Debug, PartialEq, Eq, Hash)] pub enum BalancerV2ComposableStablePoolFactoryEvents { #[allow(missing_docs)] FactoryDisabled(FactoryDisabled), @@ -1226,33 +1199,34 @@ function version() external view returns (string memory); impl BalancerV2ComposableStablePoolFactoryEvents { /// 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. + /// 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]] = &[ [ - 67u8, 42u8, 203u8, 253u8, 102u8, 45u8, 187u8, 93u8, 139u8, 55u8, 131u8, - 132u8, 166u8, 113u8, 89u8, 180u8, 124u8, 169u8, 208u8, 241u8, 183u8, - 159u8, 151u8, 207u8, 100u8, 207u8, 133u8, 133u8, 250u8, 54u8, 45u8, 80u8, + 67u8, 42u8, 203u8, 253u8, 102u8, 45u8, 187u8, 93u8, 139u8, 55u8, 131u8, 132u8, + 166u8, 113u8, 89u8, 180u8, 124u8, 169u8, 208u8, 241u8, 183u8, 159u8, 151u8, 207u8, + 100u8, 207u8, 133u8, 133u8, 250u8, 54u8, 45u8, 80u8, ], [ - 131u8, 164u8, 143u8, 188u8, 252u8, 153u8, 19u8, 53u8, 49u8, 78u8, 116u8, - 208u8, 73u8, 106u8, 171u8, 106u8, 25u8, 135u8, 233u8, 146u8, 221u8, - 200u8, 93u8, 221u8, 188u8, 196u8, 214u8, 221u8, 110u8, 242u8, 233u8, - 252u8, + 131u8, 164u8, 143u8, 188u8, 252u8, 153u8, 19u8, 53u8, 49u8, 78u8, 116u8, 208u8, + 73u8, 106u8, 171u8, 106u8, 25u8, 135u8, 233u8, 146u8, 221u8, 200u8, 93u8, 221u8, + 188u8, 196u8, 214u8, 221u8, 110u8, 242u8, 233u8, 252u8, ], ]; - /// The names of the variants in the same order as `SELECTORS`. - pub const VARIANT_NAMES: &'static [&'static str] = &[ - ::core::stringify!(FactoryDisabled), - ::core::stringify!(PoolCreated), - ]; /// The signatures in the same order as `SELECTORS`. pub const SIGNATURES: &'static [&'static str] = &[ ::SIGNATURE, ::SIGNATURE, ]; + /// The names of the variants in the same order as `SELECTORS`. + pub const VARIANT_NAMES: &'static [&'static str] = &[ + ::core::stringify!(FactoryDisabled), + ::core::stringify!(PoolCreated), + ]; + /// Returns the signature for the given selector, if known. #[inline] pub fn signature_by_selector( @@ -1265,56 +1239,46 @@ function version() external view returns (string memory); ::core::result::Result::Err(_) => ::core::option::Option::None, } } + /// Returns the enum variant name for the given selector, if known. #[inline] - pub fn name_by_selector( - selector: [u8; 32usize], - ) -> ::core::option::Option<&'static str> { + pub fn name_by_selector(selector: [u8; 32usize]) -> ::core::option::Option<&'static str> { let sig = Self::signature_by_selector(selector)?; sig.split_once('(').map(|(name, _)| name) } } #[automatically_derived] - impl alloy_sol_types::SolEventInterface - for BalancerV2ComposableStablePoolFactoryEvents { - const NAME: &'static str = "BalancerV2ComposableStablePoolFactoryEvents"; + impl alloy_sol_types::SolEventInterface for BalancerV2ComposableStablePoolFactoryEvents { const COUNT: usize = 2usize; + const NAME: &'static str = "BalancerV2ComposableStablePoolFactoryEvents"; + 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, - ) + ::decode_raw_log(topics, data) .map(Self::FactoryDisabled) } Some(::SIGNATURE_HASH) => { - ::decode_raw_log( - topics, - data, - ) + ::decode_raw_log(topics, data) .map(Self::PoolCreated) } - _ => { - 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(), - ), + _ => 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 BalancerV2ComposableStablePoolFactoryEvents { + impl alloy_sol_types::private::IntoLogData for BalancerV2ComposableStablePoolFactoryEvents { fn to_log_data(&self) -> alloy_sol_types::private::LogData { match self { Self::FactoryDisabled(inner) => { @@ -1325,6 +1289,7 @@ function version() external view returns (string memory); } } } + fn into_log_data(self) -> alloy_sol_types::private::LogData { match self { Self::FactoryDisabled(inner) => { @@ -1336,10 +1301,10 @@ function version() external view returns (string memory); } } } - use alloy_contract as alloy_contract; + use alloy_contract; /**Creates a new wrapper around an on-chain [`BalancerV2ComposableStablePoolFactory`](self) contract instance. -See the [wrapper's documentation](`BalancerV2ComposableStablePoolFactoryInstance`) for more details.*/ + See the [wrapper's documentation](`BalancerV2ComposableStablePoolFactoryInstance`) for more details.*/ #[inline] pub const fn new< P: alloy_contract::private::Provider, @@ -1352,15 +1317,15 @@ See the [wrapper's documentation](`BalancerV2ComposableStablePoolFactoryInstance } /**A [`BalancerV2ComposableStablePoolFactory`](self) instance. -Contains type-safe methods for interacting with an on-chain instance of the -[`BalancerV2ComposableStablePoolFactory`](self) contract located at a given `address`, using a given -provider `P`. + Contains type-safe methods for interacting with an on-chain instance of the + [`BalancerV2ComposableStablePoolFactory`](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. + 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.*/ + See the [module-level documentation](self) for all the available methods.*/ #[derive(Clone)] pub struct BalancerV2ComposableStablePoolFactoryInstance< P, @@ -1371,8 +1336,7 @@ See the [module-level documentation](self) for all the available methods.*/ _network: ::core::marker::PhantomData, } #[automatically_derived] - impl ::core::fmt::Debug - for BalancerV2ComposableStablePoolFactoryInstance { + impl ::core::fmt::Debug for BalancerV2ComposableStablePoolFactoryInstance { #[inline] fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { f.debug_tuple("BalancerV2ComposableStablePoolFactoryInstance") @@ -1381,54 +1345,50 @@ See the [module-level documentation](self) for all the available methods.*/ } } /// Instantiation and getters/setters. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > BalancerV2ComposableStablePoolFactoryInstance { + impl, N: alloy_contract::private::Network> + BalancerV2ComposableStablePoolFactoryInstance + { /**Creates a new wrapper around an on-chain [`BalancerV2ComposableStablePoolFactory`](self) contract instance. -See the [wrapper's documentation](`BalancerV2ComposableStablePoolFactoryInstance`) for more details.*/ + See the [wrapper's documentation](`BalancerV2ComposableStablePoolFactoryInstance`) for more details.*/ #[inline] - pub const fn new( - address: alloy_sol_types::private::Address, - __provider: P, - ) -> Self { + pub const fn new(address: alloy_sol_types::private::Address, __provider: P) -> Self { Self { address, provider: __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< - P: ::core::clone::Clone, - N, - > BalancerV2ComposableStablePoolFactoryInstance<&P, N> { - /// Clones the provider and returns a new instance with the cloned provider. + impl BalancerV2ComposableStablePoolFactoryInstance<&P, N> { + /// Clones the provider and returns a new instance with the cloned + /// provider. #[inline] - pub fn with_cloned_provider( - self, - ) -> BalancerV2ComposableStablePoolFactoryInstance { + pub fn with_cloned_provider(self) -> BalancerV2ComposableStablePoolFactoryInstance { BalancerV2ComposableStablePoolFactoryInstance { address: self.address, provider: ::core::clone::Clone::clone(&self.provider), @@ -1437,20 +1397,22 @@ See the [wrapper's documentation](`BalancerV2ComposableStablePoolFactoryInstance } } /// Function calls. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > BalancerV2ComposableStablePoolFactoryInstance { - /// Creates a new call builder using this contract instance's provider and address. + impl, N: alloy_contract::private::Network> + BalancerV2ComposableStablePoolFactoryInstance + { + /// 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. + /// 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 [`create`] function. pub fn create( &self, @@ -1458,9 +1420,7 @@ See the [wrapper's documentation](`BalancerV2ComposableStablePoolFactoryInstance symbol: alloy_sol_types::private::String, tokens: alloy_sol_types::private::Vec, amplificationParameter: alloy_sol_types::private::primitives::aliases::U256, - rateProviders: alloy_sol_types::private::Vec< - alloy_sol_types::private::Address, - >, + rateProviders: alloy_sol_types::private::Vec, tokenRateCacheDurations: alloy_sol_types::private::Vec< alloy_sol_types::private::primitives::aliases::U256, >, @@ -1468,106 +1428,88 @@ See the [wrapper's documentation](`BalancerV2ComposableStablePoolFactoryInstance swapFeePercentage: alloy_sol_types::private::primitives::aliases::U256, owner: alloy_sol_types::private::Address, ) -> alloy_contract::SolCallBuilder<&P, createCall, N> { - self.call_builder( - &createCall { - name, - symbol, - tokens, - amplificationParameter, - rateProviders, - tokenRateCacheDurations, - exemptFromYieldProtocolFeeFlags, - swapFeePercentage, - owner, - }, - ) + self.call_builder(&createCall { + name, + symbol, + tokens, + amplificationParameter, + rateProviders, + tokenRateCacheDurations, + exemptFromYieldProtocolFeeFlags, + swapFeePercentage, + owner, + }) } + ///Creates a new call builder for the [`disable`] function. pub fn disable(&self) -> alloy_contract::SolCallBuilder<&P, disableCall, N> { self.call_builder(&disableCall) } + ///Creates a new call builder for the [`version`] function. pub fn version(&self) -> alloy_contract::SolCallBuilder<&P, versionCall, N> { self.call_builder(&versionCall) } } /// Event filters. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > BalancerV2ComposableStablePoolFactoryInstance { - /// Creates a new event filter using this contract instance's provider and address. + impl, N: alloy_contract::private::Network> + BalancerV2ComposableStablePoolFactoryInstance + { + /// 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. + /// 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 [`FactoryDisabled`] event. - pub fn FactoryDisabled_filter( - &self, - ) -> alloy_contract::Event<&P, FactoryDisabled, N> { + pub fn FactoryDisabled_filter(&self) -> alloy_contract::Event<&P, FactoryDisabled, N> { self.event_filter::() } + ///Creates a new event filter for the [`PoolCreated`] event. pub fn PoolCreated_filter(&self) -> alloy_contract::Event<&P, PoolCreated, N> { self.event_filter::() } } } -pub type Instance = BalancerV2ComposableStablePoolFactory::BalancerV2ComposableStablePoolFactoryInstance< - ::alloy_provider::DynProvider, ->; +pub type Instance = + BalancerV2ComposableStablePoolFactory::BalancerV2ComposableStablePoolFactoryInstance< + ::alloy_provider::DynProvider, + >; use { - std::{sync::LazyLock, collections::HashMap}, - anyhow::{Result, Context}, - alloy_primitives::{address, Address}, - alloy_provider::{Provider, DynProvider}, + alloy_primitives::{Address, address}, + alloy_provider::{DynProvider, Provider}, + anyhow::{Context, Result}, + std::{collections::HashMap, sync::LazyLock}, }; pub const fn deployment_info(chain_id: u64) -> Option<(Address, Option)> { match chain_id { - 1u64 => { - Some(( - ::alloy_primitives::address!( - "0xf9ac7B9dF2b3454E841110CcE5550bD5AC6f875F" - ), - Some(15485885u64), - )) - } - 10u64 => { - Some(( - ::alloy_primitives::address!( - "0xf145caFB67081895EE80eB7c04A30Cf87f07b745" - ), - Some(22182522u64), - )) - } - 56u64 => { - Some(( - ::alloy_primitives::address!( - "0xf302f9F50958c5593770FDf4d4812309fF77414f" - ), - Some(22691193u64), - )) - } - 137u64 => { - Some(( - ::alloy_primitives::address!( - "0x136FD06Fa01eCF624C7F2B3CB15742c1339dC2c4" - ), - Some(32774224u64), - )) - } - 42161u64 => { - Some(( - ::alloy_primitives::address!( - "0xaEb406b0E430BF5Ea2Dc0B9Fe62E4E53f74B3a33" - ), - Some(23227044u64), - )) - } + 1u64 => Some(( + ::alloy_primitives::address!("0xf9ac7B9dF2b3454E841110CcE5550bD5AC6f875F"), + Some(15485885u64), + )), + 10u64 => Some(( + ::alloy_primitives::address!("0xf145caFB67081895EE80eB7c04A30Cf87f07b745"), + Some(22182522u64), + )), + 56u64 => Some(( + ::alloy_primitives::address!("0xf302f9F50958c5593770FDf4d4812309fF77414f"), + Some(22691193u64), + )), + 137u64 => Some(( + ::alloy_primitives::address!("0x136FD06Fa01eCF624C7F2B3CB15742c1339dC2c4"), + Some(32774224u64), + )), + 42161u64 => Some(( + ::alloy_primitives::address!("0xaEb406b0E430BF5Ea2Dc0B9Fe62E4E53f74B3a33"), + Some(23227044u64), + )), _ => None, } } @@ -1584,9 +1526,7 @@ pub const fn deployment_block(chain_id: &u64) -> Option { } } impl Instance { - pub fn deployed( - provider: &DynProvider, - ) -> impl Future> + Send { + pub fn deployed(provider: &DynProvider) -> impl Future> + Send { async move { let chain_id = provider .get_chain_id() diff --git a/contracts/generated/contracts-generated/balancerv2composablestablepoolfactoryv3/src/lib.rs b/contracts/generated/contracts-generated/balancerv2composablestablepoolfactoryv3/src/lib.rs index 6ba84a57d3..7d75717db0 100644 --- a/contracts/generated/contracts-generated/balancerv2composablestablepoolfactoryv3/src/lib.rs +++ b/contracts/generated/contracts-generated/balancerv2composablestablepoolfactoryv3/src/lib.rs @@ -1,4 +1,10 @@ -#![allow(unused_imports, unused_attributes, clippy::all, rustdoc::all, non_snake_case)] +#![allow( + unused_imports, + unused_attributes, + clippy::all, + rustdoc::all, + non_snake_case +)] //! Auto-generated contract bindings. Do not edit. /** @@ -153,13 +159,12 @@ interface BalancerV2ComposableStablePoolFactoryV3 { clippy::empty_structs_with_brackets )] pub mod BalancerV2ComposableStablePoolFactoryV3 { - use super::*; - use alloy_sol_types as alloy_sol_types; + use {super::*, alloy_sol_types}; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Event with signature `FactoryDisabled()` and selector `0x432acbfd662dbb5d8b378384a67159b47ca9d0f1b79f97cf64cf8585fa362d50`. -```solidity -event FactoryDisabled(); -```*/ + ```solidity + event FactoryDisabled(); + ```*/ #[allow( non_camel_case_types, non_snake_case, @@ -175,21 +180,22 @@ event FactoryDisabled(); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[automatically_derived] impl alloy_sol_types::SolEvent for FactoryDisabled { + type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type DataTuple<'a> = (); - type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type TopicList = (alloy_sol_types::sol_data::FixedBytes<32>,); - const SIGNATURE: &'static str = "FactoryDisabled()"; - const SIGNATURE_HASH: alloy_sol_types::private::B256 = alloy_sol_types::private::B256::new([ - 67u8, 42u8, 203u8, 253u8, 102u8, 45u8, 187u8, 93u8, 139u8, 55u8, 131u8, - 132u8, 166u8, 113u8, 89u8, 180u8, 124u8, 169u8, 208u8, 241u8, 183u8, - 159u8, 151u8, 207u8, 100u8, 207u8, 133u8, 133u8, 250u8, 54u8, 45u8, 80u8, - ]); + const ANONYMOUS: bool = false; + const SIGNATURE: &'static str = "FactoryDisabled()"; + const SIGNATURE_HASH: alloy_sol_types::private::B256 = + alloy_sol_types::private::B256::new([ + 67u8, 42u8, 203u8, 253u8, 102u8, 45u8, 187u8, 93u8, 139u8, 55u8, 131u8, 132u8, + 166u8, 113u8, 89u8, 180u8, 124u8, 169u8, 208u8, 241u8, 183u8, 159u8, 151u8, + 207u8, 100u8, 207u8, 133u8, 133u8, 250u8, 54u8, 45u8, 80u8, + ]); + #[allow(unused_variables)] #[inline] fn new( @@ -198,29 +204,31 @@ event FactoryDisabled(); ) -> Self { Self {} } + #[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, - ), - ); + 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(),) } + #[inline] fn encode_topics_raw( &self, @@ -229,9 +237,7 @@ event FactoryDisabled(); if out.len() < ::COUNT { return Err(alloy_sol_types::Error::Overrun); } - out[0usize] = alloy_sol_types::abi::token::WordToken( - Self::SIGNATURE_HASH, - ); + out[0usize] = alloy_sol_types::abi::token::WordToken(Self::SIGNATURE_HASH); Ok(()) } } @@ -240,6 +246,7 @@ event FactoryDisabled(); 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) } @@ -254,9 +261,9 @@ event FactoryDisabled(); }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Event with signature `PoolCreated(address)` and selector `0x83a48fbcfc991335314e74d0496aab6a1987e992ddc85dddbcc4d6dd6ef2e9fc`. -```solidity -event PoolCreated(address indexed pool); -```*/ + ```solidity + event PoolCreated(address indexed pool); + ```*/ #[allow( non_camel_case_types, non_snake_case, @@ -275,25 +282,25 @@ event PoolCreated(address indexed pool); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[automatically_derived] impl alloy_sol_types::SolEvent for PoolCreated { + type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; 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::Address, ); - const SIGNATURE: &'static str = "PoolCreated(address)"; - const SIGNATURE_HASH: alloy_sol_types::private::B256 = alloy_sol_types::private::B256::new([ - 131u8, 164u8, 143u8, 188u8, 252u8, 153u8, 19u8, 53u8, 49u8, 78u8, 116u8, - 208u8, 73u8, 106u8, 171u8, 106u8, 25u8, 135u8, 233u8, 146u8, 221u8, - 200u8, 93u8, 221u8, 188u8, 196u8, 214u8, 221u8, 110u8, 242u8, 233u8, - 252u8, - ]); + const ANONYMOUS: bool = false; + const SIGNATURE: &'static str = "PoolCreated(address)"; + const SIGNATURE_HASH: alloy_sol_types::private::B256 = + alloy_sol_types::private::B256::new([ + 131u8, 164u8, 143u8, 188u8, 252u8, 153u8, 19u8, 53u8, 49u8, 78u8, 116u8, 208u8, + 73u8, 106u8, 171u8, 106u8, 25u8, 135u8, 233u8, 146u8, 221u8, 200u8, 93u8, + 221u8, 188u8, 196u8, 214u8, 221u8, 110u8, 242u8, 233u8, 252u8, + ]); + #[allow(unused_variables)] #[inline] fn new( @@ -302,29 +309,31 @@ event PoolCreated(address indexed pool); ) -> Self { Self { pool: topics.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, - ), - ); + 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.pool.clone()) } + #[inline] fn encode_topics_raw( &self, @@ -333,9 +342,7 @@ event PoolCreated(address indexed pool); if out.len() < ::COUNT { return Err(alloy_sol_types::Error::Overrun); } - out[0usize] = alloy_sol_types::abi::token::WordToken( - Self::SIGNATURE_HASH, - ); + out[0usize] = alloy_sol_types::abi::token::WordToken(Self::SIGNATURE_HASH); out[1usize] = ::encode_topic( &self.pool, ); @@ -347,6 +354,7 @@ event PoolCreated(address indexed pool); 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) } @@ -360,9 +368,9 @@ event PoolCreated(address indexed pool); } }; /**Constructor`. -```solidity -constructor(address vault, address protocolFeeProvider, string factoryVersion, string poolVersion); -```*/ + ```solidity + constructor(address vault, address protocolFeeProvider, string factoryVersion, string poolVersion); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct constructorCall { @@ -376,7 +384,7 @@ constructor(address vault, address protocolFeeProvider, string factoryVersion, s pub poolVersion: alloy_sol_types::private::String, } const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -395,9 +403,7 @@ constructor(address vault, address protocolFeeProvider, string factoryVersion, s ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -437,15 +443,15 @@ constructor(address vault, address protocolFeeProvider, string factoryVersion, s alloy_sol_types::sol_data::String, alloy_sol_types::sol_data::String, ); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + 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<'_> { ( @@ -467,9 +473,9 @@ constructor(address vault, address protocolFeeProvider, string factoryVersion, s }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `create(string,string,address[],uint256,address[],uint256[],bool[],uint256,address)` and selector `0x66b59f6c`. -```solidity -function create(string memory name, string memory symbol, address[] memory tokens, uint256 amplificationParameter, address[] memory rateProviders, uint256[] memory tokenRateCacheDurations, bool[] memory exemptFromYieldProtocolFeeFlags, uint256 swapFeePercentage, address owner) external returns (address); -```*/ + ```solidity + function create(string memory name, string memory symbol, address[] memory tokens, uint256 amplificationParameter, address[] memory rateProviders, uint256[] memory tokenRateCacheDurations, bool[] memory exemptFromYieldProtocolFeeFlags, uint256 swapFeePercentage, address owner) external returns (address); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct createCall { @@ -482,13 +488,10 @@ function create(string memory name, string memory symbol, address[] memory token #[allow(missing_docs)] pub amplificationParameter: alloy_sol_types::private::primitives::aliases::U256, #[allow(missing_docs)] - pub rateProviders: alloy_sol_types::private::Vec< - alloy_sol_types::private::Address, - >, + pub rateProviders: alloy_sol_types::private::Vec, #[allow(missing_docs)] - pub tokenRateCacheDurations: alloy_sol_types::private::Vec< - alloy_sol_types::private::primitives::aliases::U256, - >, + pub tokenRateCacheDurations: + alloy_sol_types::private::Vec, #[allow(missing_docs)] pub exemptFromYieldProtocolFeeFlags: alloy_sol_types::private::Vec, #[allow(missing_docs)] @@ -497,7 +500,9 @@ function create(string memory name, string memory symbol, address[] memory token pub owner: alloy_sol_types::private::Address, } #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`create(string,string,address[],uint256,address[],uint256[],bool[],uint256,address)`](createCall) function. + ///Container type for the return parameters of the + /// [`create(string,string,address[],uint256,address[],uint256[],bool[], + /// uint256,address)`](createCall) function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct createReturn { @@ -511,7 +516,7 @@ function create(string memory name, string memory symbol, address[] memory token clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -533,18 +538,14 @@ function create(string memory name, string memory symbol, address[] memory token alloy_sol_types::private::Vec, alloy_sol_types::private::primitives::aliases::U256, alloy_sol_types::private::Vec, - alloy_sol_types::private::Vec< - alloy_sol_types::private::primitives::aliases::U256, - >, + alloy_sol_types::private::Vec, alloy_sol_types::private::Vec, 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, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -594,9 +595,7 @@ function create(string memory name, string memory symbol, address[] memory token type UnderlyingRustTuple<'a> = (alloy_sol_types::private::Address,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -631,22 +630,22 @@ function create(string memory name, string memory symbol, address[] memory token 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::Address; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (alloy_sol_types::sol_data::Address,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "create(string,string,address[],uint256,address[],uint256[],bool[],uint256,address)"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [102u8, 181u8, 159u8, 108u8]; + const SIGNATURE: &'static str = "create(string,string,address[],uint256,address[],\ + uint256[],bool[],uint256,address)"; + #[inline] fn new<'a>( tuple: as alloy_sol_types::SolType>::RustType, ) -> Self { tuple.into() } + #[inline] fn tokenize(&self) -> Self::Token<'_> { ( @@ -685,47 +684,44 @@ function create(string memory name, string memory symbol, address[] memory token ), ) } + #[inline] fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { - ( - ::tokenize( - ret, - ), - ) + (::tokenize(ret),) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) - .map(|r| { + as alloy_sol_types::SolType>::abi_decode_sequence(data).map( + |r| { let r: createReturn = 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: createReturn = r.into(); - r._0 - }) + 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: createReturn = r.into(); + r._0 + }) } } }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `disable()` and selector `0x2f2770db`. -```solidity -function disable() external; -```*/ + ```solidity + function disable() external; + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct disableCall; - ///Container type for the return parameters of the [`disable()`](disableCall) function. + ///Container type for the return parameters of the + /// [`disable()`](disableCall) function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct disableReturn {} @@ -736,7 +732,7 @@ function disable() external; clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -745,9 +741,7 @@ function disable() external; type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -777,9 +771,7 @@ function disable() external; type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -802,67 +794,64 @@ function disable() external; } } impl disableReturn { - fn _tokenize( - &self, - ) -> ::ReturnToken<'_> { + fn _tokenize(&self) -> ::ReturnToken<'_> { () } } #[automatically_derived] impl alloy_sol_types::SolCall for disableCall { type Parameters<'a> = (); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = disableReturn; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "disable()"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [47u8, 39u8, 112u8, 219u8]; + const SIGNATURE: &'static str = "disable()"; + #[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<'_> { disableReturn::_tokenize(ret) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) + 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) + 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(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `version()` and selector `0x54fd4d50`. -```solidity -function version() external view returns (string memory); -```*/ + ```solidity + function version() external view returns (string memory); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct versionCall; #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`version()`](versionCall) function. + ///Container type for the return parameters of the + /// [`version()`](versionCall) function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct versionReturn { @@ -876,7 +865,7 @@ function version() external view returns (string memory); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -885,9 +874,7 @@ function version() external view returns (string memory); type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -917,9 +904,7 @@ function version() external view returns (string memory); type UnderlyingRustTuple<'a> = (alloy_sol_types::private::String,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -944,61 +929,56 @@ function version() external view returns (string memory); #[automatically_derived] impl alloy_sol_types::SolCall for versionCall { type Parameters<'a> = (); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = alloy_sol_types::private::String; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (alloy_sol_types::sol_data::String,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "version()"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [84u8, 253u8, 77u8, 80u8]; + const SIGNATURE: &'static str = "version()"; + #[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, - ), - ) + (::tokenize(ret),) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) - .map(|r| { + as alloy_sol_types::SolType>::abi_decode_sequence(data).map( + |r| { let r: versionReturn = 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: versionReturn = r.into(); - r._0 - }) + 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: versionReturn = r.into(); + r._0 + }) } } }; - ///Container for all the [`BalancerV2ComposableStablePoolFactoryV3`](self) function calls. + ///Container for all the [`BalancerV2ComposableStablePoolFactoryV3`](self) + /// function calls. #[derive(Clone)] - #[derive()] pub enum BalancerV2ComposableStablePoolFactoryV3Calls { #[allow(missing_docs)] create(createCall), @@ -1010,8 +990,9 @@ function version() external view returns (string memory); impl BalancerV2ComposableStablePoolFactoryV3Calls { /// 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. + /// 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]] = &[ @@ -1019,18 +1000,19 @@ function version() external view returns (string memory); [84u8, 253u8, 77u8, 80u8], [102u8, 181u8, 159u8, 108u8], ]; - /// The names of the variants in the same order as `SELECTORS`. - pub const VARIANT_NAMES: &'static [&'static str] = &[ - ::core::stringify!(disable), - ::core::stringify!(version), - ::core::stringify!(create), - ]; /// The signatures in the same order as `SELECTORS`. pub const SIGNATURES: &'static [&'static str] = &[ ::SIGNATURE, ::SIGNATURE, ::SIGNATURE, ]; + /// The names of the variants in the same order as `SELECTORS`. + pub const VARIANT_NAMES: &'static [&'static str] = &[ + ::core::stringify!(disable), + ::core::stringify!(version), + ::core::stringify!(create), + ]; + /// Returns the signature for the given selector, if known. #[inline] pub fn signature_by_selector( @@ -1043,20 +1025,20 @@ function version() external view returns (string memory); ::core::result::Result::Err(_) => ::core::option::Option::None, } } + /// Returns the enum variant name for the given selector, if known. #[inline] - pub fn name_by_selector( - selector: [u8; 4usize], - ) -> ::core::option::Option<&'static str> { + pub fn name_by_selector(selector: [u8; 4usize]) -> ::core::option::Option<&'static str> { let sig = Self::signature_by_selector(selector)?; sig.split_once('(').map(|(name, _)| name) } } #[automatically_derived] impl alloy_sol_types::SolInterface for BalancerV2ComposableStablePoolFactoryV3Calls { - const NAME: &'static str = "BalancerV2ComposableStablePoolFactoryV3Calls"; - const MIN_DATA_LENGTH: usize = 0usize; const COUNT: usize = 3usize; + const MIN_DATA_LENGTH: usize = 0usize; + const NAME: &'static str = "BalancerV2ComposableStablePoolFactoryV3Calls"; + #[inline] fn selector(&self) -> [u8; 4] { match self { @@ -1065,20 +1047,20 @@ function version() external view returns (string memory); Self::version(_) => ::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 { + fn abi_decode_raw(selector: [u8; 4], data: &[u8]) -> alloy_sol_types::Result { static DECODE_SHIMS: &[fn( &[u8], ) -> alloy_sol_types::Result< @@ -1087,9 +1069,8 @@ function version() external view returns (string memory); { fn disable( data: &[u8], - ) -> alloy_sol_types::Result< - BalancerV2ComposableStablePoolFactoryV3Calls, - > { + ) -> alloy_sol_types::Result + { ::abi_decode_raw(data) .map(BalancerV2ComposableStablePoolFactoryV3Calls::disable) } @@ -1098,9 +1079,8 @@ function version() external view returns (string memory); { fn version( data: &[u8], - ) -> alloy_sol_types::Result< - BalancerV2ComposableStablePoolFactoryV3Calls, - > { + ) -> alloy_sol_types::Result + { ::abi_decode_raw(data) .map(BalancerV2ComposableStablePoolFactoryV3Calls::version) } @@ -1109,9 +1089,8 @@ function version() external view returns (string memory); { fn create( data: &[u8], - ) -> alloy_sol_types::Result< - BalancerV2ComposableStablePoolFactoryV3Calls, - > { + ) -> alloy_sol_types::Result + { ::abi_decode_raw(data) .map(BalancerV2ComposableStablePoolFactoryV3Calls::create) } @@ -1119,15 +1098,14 @@ function version() external view returns (string memory); }, ]; let Ok(idx) = Self::SELECTORS.binary_search(&selector) else { - return Err( - alloy_sol_types::Error::unknown_selector( - ::NAME, - selector, - ), - ); + return Err(alloy_sol_types::Error::unknown_selector( + ::NAME, + selector, + )); }; DECODE_SHIMS[idx](data) } + #[inline] #[allow(non_snake_case)] fn abi_decode_raw_validate( @@ -1142,12 +1120,9 @@ function version() external view returns (string memory); { fn disable( data: &[u8], - ) -> alloy_sol_types::Result< - BalancerV2ComposableStablePoolFactoryV3Calls, - > { - ::abi_decode_raw_validate( - data, - ) + ) -> alloy_sol_types::Result + { + ::abi_decode_raw_validate(data) .map(BalancerV2ComposableStablePoolFactoryV3Calls::disable) } disable @@ -1155,12 +1130,9 @@ function version() external view returns (string memory); { fn version( data: &[u8], - ) -> alloy_sol_types::Result< - BalancerV2ComposableStablePoolFactoryV3Calls, - > { - ::abi_decode_raw_validate( - data, - ) + ) -> alloy_sol_types::Result + { + ::abi_decode_raw_validate(data) .map(BalancerV2ComposableStablePoolFactoryV3Calls::version) } version @@ -1168,27 +1140,23 @@ function version() external view returns (string memory); { fn create( data: &[u8], - ) -> alloy_sol_types::Result< - BalancerV2ComposableStablePoolFactoryV3Calls, - > { - ::abi_decode_raw_validate( - data, - ) + ) -> alloy_sol_types::Result + { + ::abi_decode_raw_validate(data) .map(BalancerV2ComposableStablePoolFactoryV3Calls::create) } create }, ]; let Ok(idx) = Self::SELECTORS.binary_search(&selector) else { - return Err( - alloy_sol_types::Error::unknown_selector( - ::NAME, - selector, - ), - ); + return Err(alloy_sol_types::Error::unknown_selector( + ::NAME, + selector, + )); }; DECODE_VALIDATE_SHIMS[idx](data) } + #[inline] fn abi_encoded_size(&self) -> usize { match self { @@ -1203,6 +1171,7 @@ function version() external view returns (string memory); } } } + #[inline] fn abi_encode_raw(&self, out: &mut alloy_sol_types::private::Vec) { match self { @@ -1218,9 +1187,9 @@ function version() external view returns (string memory); } } } - ///Container for all the [`BalancerV2ComposableStablePoolFactoryV3`](self) events. - #[derive(Clone)] - #[derive(Debug, PartialEq, Eq, Hash)] + ///Container for all the [`BalancerV2ComposableStablePoolFactoryV3`](self) + /// events. + #[derive(Clone, Debug, PartialEq, Eq, Hash)] pub enum BalancerV2ComposableStablePoolFactoryV3Events { #[allow(missing_docs)] FactoryDisabled(FactoryDisabled), @@ -1230,33 +1199,34 @@ function version() external view returns (string memory); impl BalancerV2ComposableStablePoolFactoryV3Events { /// 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. + /// 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]] = &[ [ - 67u8, 42u8, 203u8, 253u8, 102u8, 45u8, 187u8, 93u8, 139u8, 55u8, 131u8, - 132u8, 166u8, 113u8, 89u8, 180u8, 124u8, 169u8, 208u8, 241u8, 183u8, - 159u8, 151u8, 207u8, 100u8, 207u8, 133u8, 133u8, 250u8, 54u8, 45u8, 80u8, + 67u8, 42u8, 203u8, 253u8, 102u8, 45u8, 187u8, 93u8, 139u8, 55u8, 131u8, 132u8, + 166u8, 113u8, 89u8, 180u8, 124u8, 169u8, 208u8, 241u8, 183u8, 159u8, 151u8, 207u8, + 100u8, 207u8, 133u8, 133u8, 250u8, 54u8, 45u8, 80u8, ], [ - 131u8, 164u8, 143u8, 188u8, 252u8, 153u8, 19u8, 53u8, 49u8, 78u8, 116u8, - 208u8, 73u8, 106u8, 171u8, 106u8, 25u8, 135u8, 233u8, 146u8, 221u8, - 200u8, 93u8, 221u8, 188u8, 196u8, 214u8, 221u8, 110u8, 242u8, 233u8, - 252u8, + 131u8, 164u8, 143u8, 188u8, 252u8, 153u8, 19u8, 53u8, 49u8, 78u8, 116u8, 208u8, + 73u8, 106u8, 171u8, 106u8, 25u8, 135u8, 233u8, 146u8, 221u8, 200u8, 93u8, 221u8, + 188u8, 196u8, 214u8, 221u8, 110u8, 242u8, 233u8, 252u8, ], ]; - /// The names of the variants in the same order as `SELECTORS`. - pub const VARIANT_NAMES: &'static [&'static str] = &[ - ::core::stringify!(FactoryDisabled), - ::core::stringify!(PoolCreated), - ]; /// The signatures in the same order as `SELECTORS`. pub const SIGNATURES: &'static [&'static str] = &[ ::SIGNATURE, ::SIGNATURE, ]; + /// The names of the variants in the same order as `SELECTORS`. + pub const VARIANT_NAMES: &'static [&'static str] = &[ + ::core::stringify!(FactoryDisabled), + ::core::stringify!(PoolCreated), + ]; + /// Returns the signature for the given selector, if known. #[inline] pub fn signature_by_selector( @@ -1269,56 +1239,46 @@ function version() external view returns (string memory); ::core::result::Result::Err(_) => ::core::option::Option::None, } } + /// Returns the enum variant name for the given selector, if known. #[inline] - pub fn name_by_selector( - selector: [u8; 32usize], - ) -> ::core::option::Option<&'static str> { + pub fn name_by_selector(selector: [u8; 32usize]) -> ::core::option::Option<&'static str> { let sig = Self::signature_by_selector(selector)?; sig.split_once('(').map(|(name, _)| name) } } #[automatically_derived] - impl alloy_sol_types::SolEventInterface - for BalancerV2ComposableStablePoolFactoryV3Events { - const NAME: &'static str = "BalancerV2ComposableStablePoolFactoryV3Events"; + impl alloy_sol_types::SolEventInterface for BalancerV2ComposableStablePoolFactoryV3Events { const COUNT: usize = 2usize; + const NAME: &'static str = "BalancerV2ComposableStablePoolFactoryV3Events"; + 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, - ) + ::decode_raw_log(topics, data) .map(Self::FactoryDisabled) } Some(::SIGNATURE_HASH) => { - ::decode_raw_log( - topics, - data, - ) + ::decode_raw_log(topics, data) .map(Self::PoolCreated) } - _ => { - 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(), - ), + _ => 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 BalancerV2ComposableStablePoolFactoryV3Events { + impl alloy_sol_types::private::IntoLogData for BalancerV2ComposableStablePoolFactoryV3Events { fn to_log_data(&self) -> alloy_sol_types::private::LogData { match self { Self::FactoryDisabled(inner) => { @@ -1329,6 +1289,7 @@ function version() external view returns (string memory); } } } + fn into_log_data(self) -> alloy_sol_types::private::LogData { match self { Self::FactoryDisabled(inner) => { @@ -1340,10 +1301,10 @@ function version() external view returns (string memory); } } } - use alloy_contract as alloy_contract; + use alloy_contract; /**Creates a new wrapper around an on-chain [`BalancerV2ComposableStablePoolFactoryV3`](self) contract instance. -See the [wrapper's documentation](`BalancerV2ComposableStablePoolFactoryV3Instance`) for more details.*/ + See the [wrapper's documentation](`BalancerV2ComposableStablePoolFactoryV3Instance`) for more details.*/ #[inline] pub const fn new< P: alloy_contract::private::Provider, @@ -1356,15 +1317,15 @@ See the [wrapper's documentation](`BalancerV2ComposableStablePoolFactoryV3Instan } /**A [`BalancerV2ComposableStablePoolFactoryV3`](self) instance. -Contains type-safe methods for interacting with an on-chain instance of the -[`BalancerV2ComposableStablePoolFactoryV3`](self) contract located at a given `address`, using a given -provider `P`. + Contains type-safe methods for interacting with an on-chain instance of the + [`BalancerV2ComposableStablePoolFactoryV3`](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. + 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.*/ + See the [module-level documentation](self) for all the available methods.*/ #[derive(Clone)] pub struct BalancerV2ComposableStablePoolFactoryV3Instance< P, @@ -1375,8 +1336,7 @@ See the [module-level documentation](self) for all the available methods.*/ _network: ::core::marker::PhantomData, } #[automatically_derived] - impl ::core::fmt::Debug - for BalancerV2ComposableStablePoolFactoryV3Instance { + impl ::core::fmt::Debug for BalancerV2ComposableStablePoolFactoryV3Instance { #[inline] fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { f.debug_tuple("BalancerV2ComposableStablePoolFactoryV3Instance") @@ -1385,54 +1345,50 @@ See the [module-level documentation](self) for all the available methods.*/ } } /// Instantiation and getters/setters. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > BalancerV2ComposableStablePoolFactoryV3Instance { + impl, N: alloy_contract::private::Network> + BalancerV2ComposableStablePoolFactoryV3Instance + { /**Creates a new wrapper around an on-chain [`BalancerV2ComposableStablePoolFactoryV3`](self) contract instance. -See the [wrapper's documentation](`BalancerV2ComposableStablePoolFactoryV3Instance`) for more details.*/ + See the [wrapper's documentation](`BalancerV2ComposableStablePoolFactoryV3Instance`) for more details.*/ #[inline] - pub const fn new( - address: alloy_sol_types::private::Address, - __provider: P, - ) -> Self { + pub const fn new(address: alloy_sol_types::private::Address, __provider: P) -> Self { Self { address, provider: __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< - P: ::core::clone::Clone, - N, - > BalancerV2ComposableStablePoolFactoryV3Instance<&P, N> { - /// Clones the provider and returns a new instance with the cloned provider. + impl BalancerV2ComposableStablePoolFactoryV3Instance<&P, N> { + /// Clones the provider and returns a new instance with the cloned + /// provider. #[inline] - pub fn with_cloned_provider( - self, - ) -> BalancerV2ComposableStablePoolFactoryV3Instance { + pub fn with_cloned_provider(self) -> BalancerV2ComposableStablePoolFactoryV3Instance { BalancerV2ComposableStablePoolFactoryV3Instance { address: self.address, provider: ::core::clone::Clone::clone(&self.provider), @@ -1441,20 +1397,22 @@ See the [wrapper's documentation](`BalancerV2ComposableStablePoolFactoryV3Instan } } /// Function calls. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > BalancerV2ComposableStablePoolFactoryV3Instance { - /// Creates a new call builder using this contract instance's provider and address. + impl, N: alloy_contract::private::Network> + BalancerV2ComposableStablePoolFactoryV3Instance + { + /// 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. + /// 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 [`create`] function. pub fn create( &self, @@ -1462,9 +1420,7 @@ See the [wrapper's documentation](`BalancerV2ComposableStablePoolFactoryV3Instan symbol: alloy_sol_types::private::String, tokens: alloy_sol_types::private::Vec, amplificationParameter: alloy_sol_types::private::primitives::aliases::U256, - rateProviders: alloy_sol_types::private::Vec< - alloy_sol_types::private::Address, - >, + rateProviders: alloy_sol_types::private::Vec, tokenRateCacheDurations: alloy_sol_types::private::Vec< alloy_sol_types::private::primitives::aliases::U256, >, @@ -1472,114 +1428,92 @@ See the [wrapper's documentation](`BalancerV2ComposableStablePoolFactoryV3Instan swapFeePercentage: alloy_sol_types::private::primitives::aliases::U256, owner: alloy_sol_types::private::Address, ) -> alloy_contract::SolCallBuilder<&P, createCall, N> { - self.call_builder( - &createCall { - name, - symbol, - tokens, - amplificationParameter, - rateProviders, - tokenRateCacheDurations, - exemptFromYieldProtocolFeeFlags, - swapFeePercentage, - owner, - }, - ) + self.call_builder(&createCall { + name, + symbol, + tokens, + amplificationParameter, + rateProviders, + tokenRateCacheDurations, + exemptFromYieldProtocolFeeFlags, + swapFeePercentage, + owner, + }) } + ///Creates a new call builder for the [`disable`] function. pub fn disable(&self) -> alloy_contract::SolCallBuilder<&P, disableCall, N> { self.call_builder(&disableCall) } + ///Creates a new call builder for the [`version`] function. pub fn version(&self) -> alloy_contract::SolCallBuilder<&P, versionCall, N> { self.call_builder(&versionCall) } } /// Event filters. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > BalancerV2ComposableStablePoolFactoryV3Instance { - /// Creates a new event filter using this contract instance's provider and address. + impl, N: alloy_contract::private::Network> + BalancerV2ComposableStablePoolFactoryV3Instance + { + /// 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. + /// 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 [`FactoryDisabled`] event. - pub fn FactoryDisabled_filter( - &self, - ) -> alloy_contract::Event<&P, FactoryDisabled, N> { + pub fn FactoryDisabled_filter(&self) -> alloy_contract::Event<&P, FactoryDisabled, N> { self.event_filter::() } + ///Creates a new event filter for the [`PoolCreated`] event. pub fn PoolCreated_filter(&self) -> alloy_contract::Event<&P, PoolCreated, N> { self.event_filter::() } } } -pub type Instance = BalancerV2ComposableStablePoolFactoryV3::BalancerV2ComposableStablePoolFactoryV3Instance< - ::alloy_provider::DynProvider, ->; +pub type Instance = + BalancerV2ComposableStablePoolFactoryV3::BalancerV2ComposableStablePoolFactoryV3Instance< + ::alloy_provider::DynProvider, + >; use { - std::{sync::LazyLock, collections::HashMap}, - anyhow::{Result, Context}, - alloy_primitives::{address, Address}, - alloy_provider::{Provider, DynProvider}, + alloy_primitives::{Address, address}, + alloy_provider::{DynProvider, Provider}, + anyhow::{Context, Result}, + std::{collections::HashMap, sync::LazyLock}, }; pub const fn deployment_info(chain_id: u64) -> Option<(Address, Option)> { match chain_id { - 1u64 => { - Some(( - ::alloy_primitives::address!( - "0xdba127fBc23fb20F5929C546af220A991b5C6e01" - ), - Some(16580899u64), - )) - } - 10u64 => { - Some(( - ::alloy_primitives::address!( - "0xe2E901AB09f37884BA31622dF3Ca7FC19AA443Be" - ), - Some(72832821u64), - )) - } - 56u64 => { - Some(( - ::alloy_primitives::address!( - "0xacAaC3e6D6Df918Bf3c809DFC7d42de0e4a72d4C" - ), - Some(25475700u64), - )) - } - 100u64 => { - Some(( - ::alloy_primitives::address!( - "0xC128468b7Ce63eA702C1f104D55A2566b13D3ABD" - ), - Some(26365805u64), - )) - } - 137u64 => { - Some(( - ::alloy_primitives::address!( - "0x7bc6C0E73EDAa66eF3F6E2f27b0EE8661834c6C9" - ), - Some(39037615u64), - )) - } - 42161u64 => { - Some(( - ::alloy_primitives::address!( - "0x1c99324EDC771c82A0DCCB780CC7DDA0045E50e7" - ), - Some(58948370u64), - )) - } + 1u64 => Some(( + ::alloy_primitives::address!("0xdba127fBc23fb20F5929C546af220A991b5C6e01"), + Some(16580899u64), + )), + 10u64 => Some(( + ::alloy_primitives::address!("0xe2E901AB09f37884BA31622dF3Ca7FC19AA443Be"), + Some(72832821u64), + )), + 56u64 => Some(( + ::alloy_primitives::address!("0xacAaC3e6D6Df918Bf3c809DFC7d42de0e4a72d4C"), + Some(25475700u64), + )), + 100u64 => Some(( + ::alloy_primitives::address!("0xC128468b7Ce63eA702C1f104D55A2566b13D3ABD"), + Some(26365805u64), + )), + 137u64 => Some(( + ::alloy_primitives::address!("0x7bc6C0E73EDAa66eF3F6E2f27b0EE8661834c6C9"), + Some(39037615u64), + )), + 42161u64 => Some(( + ::alloy_primitives::address!("0x1c99324EDC771c82A0DCCB780CC7DDA0045E50e7"), + Some(58948370u64), + )), _ => None, } } @@ -1596,9 +1530,7 @@ pub const fn deployment_block(chain_id: &u64) -> Option { } } impl Instance { - pub fn deployed( - provider: &DynProvider, - ) -> impl Future> + Send { + pub fn deployed(provider: &DynProvider) -> impl Future> + Send { async move { let chain_id = provider .get_chain_id() diff --git a/contracts/generated/contracts-generated/balancerv2composablestablepoolfactoryv4/src/lib.rs b/contracts/generated/contracts-generated/balancerv2composablestablepoolfactoryv4/src/lib.rs index 767777897b..a563e1e24a 100644 --- a/contracts/generated/contracts-generated/balancerv2composablestablepoolfactoryv4/src/lib.rs +++ b/contracts/generated/contracts-generated/balancerv2composablestablepoolfactoryv4/src/lib.rs @@ -1,4 +1,10 @@ -#![allow(unused_imports, unused_attributes, clippy::all, rustdoc::all, non_snake_case)] +#![allow( + unused_imports, + unused_attributes, + clippy::all, + rustdoc::all, + non_snake_case +)] //! Auto-generated contract bindings. Do not edit. /** @@ -153,13 +159,12 @@ interface BalancerV2ComposableStablePoolFactoryV4 { clippy::empty_structs_with_brackets )] pub mod BalancerV2ComposableStablePoolFactoryV4 { - use super::*; - use alloy_sol_types as alloy_sol_types; + use {super::*, alloy_sol_types}; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Event with signature `FactoryDisabled()` and selector `0x432acbfd662dbb5d8b378384a67159b47ca9d0f1b79f97cf64cf8585fa362d50`. -```solidity -event FactoryDisabled(); -```*/ + ```solidity + event FactoryDisabled(); + ```*/ #[allow( non_camel_case_types, non_snake_case, @@ -175,21 +180,22 @@ event FactoryDisabled(); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[automatically_derived] impl alloy_sol_types::SolEvent for FactoryDisabled { + type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type DataTuple<'a> = (); - type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type TopicList = (alloy_sol_types::sol_data::FixedBytes<32>,); - const SIGNATURE: &'static str = "FactoryDisabled()"; - const SIGNATURE_HASH: alloy_sol_types::private::B256 = alloy_sol_types::private::B256::new([ - 67u8, 42u8, 203u8, 253u8, 102u8, 45u8, 187u8, 93u8, 139u8, 55u8, 131u8, - 132u8, 166u8, 113u8, 89u8, 180u8, 124u8, 169u8, 208u8, 241u8, 183u8, - 159u8, 151u8, 207u8, 100u8, 207u8, 133u8, 133u8, 250u8, 54u8, 45u8, 80u8, - ]); + const ANONYMOUS: bool = false; + const SIGNATURE: &'static str = "FactoryDisabled()"; + const SIGNATURE_HASH: alloy_sol_types::private::B256 = + alloy_sol_types::private::B256::new([ + 67u8, 42u8, 203u8, 253u8, 102u8, 45u8, 187u8, 93u8, 139u8, 55u8, 131u8, 132u8, + 166u8, 113u8, 89u8, 180u8, 124u8, 169u8, 208u8, 241u8, 183u8, 159u8, 151u8, + 207u8, 100u8, 207u8, 133u8, 133u8, 250u8, 54u8, 45u8, 80u8, + ]); + #[allow(unused_variables)] #[inline] fn new( @@ -198,29 +204,31 @@ event FactoryDisabled(); ) -> Self { Self {} } + #[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, - ), - ); + 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(),) } + #[inline] fn encode_topics_raw( &self, @@ -229,9 +237,7 @@ event FactoryDisabled(); if out.len() < ::COUNT { return Err(alloy_sol_types::Error::Overrun); } - out[0usize] = alloy_sol_types::abi::token::WordToken( - Self::SIGNATURE_HASH, - ); + out[0usize] = alloy_sol_types::abi::token::WordToken(Self::SIGNATURE_HASH); Ok(()) } } @@ -240,6 +246,7 @@ event FactoryDisabled(); 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) } @@ -254,9 +261,9 @@ event FactoryDisabled(); }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Event with signature `PoolCreated(address)` and selector `0x83a48fbcfc991335314e74d0496aab6a1987e992ddc85dddbcc4d6dd6ef2e9fc`. -```solidity -event PoolCreated(address indexed pool); -```*/ + ```solidity + event PoolCreated(address indexed pool); + ```*/ #[allow( non_camel_case_types, non_snake_case, @@ -275,25 +282,25 @@ event PoolCreated(address indexed pool); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[automatically_derived] impl alloy_sol_types::SolEvent for PoolCreated { + type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; 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::Address, ); - const SIGNATURE: &'static str = "PoolCreated(address)"; - const SIGNATURE_HASH: alloy_sol_types::private::B256 = alloy_sol_types::private::B256::new([ - 131u8, 164u8, 143u8, 188u8, 252u8, 153u8, 19u8, 53u8, 49u8, 78u8, 116u8, - 208u8, 73u8, 106u8, 171u8, 106u8, 25u8, 135u8, 233u8, 146u8, 221u8, - 200u8, 93u8, 221u8, 188u8, 196u8, 214u8, 221u8, 110u8, 242u8, 233u8, - 252u8, - ]); + const ANONYMOUS: bool = false; + const SIGNATURE: &'static str = "PoolCreated(address)"; + const SIGNATURE_HASH: alloy_sol_types::private::B256 = + alloy_sol_types::private::B256::new([ + 131u8, 164u8, 143u8, 188u8, 252u8, 153u8, 19u8, 53u8, 49u8, 78u8, 116u8, 208u8, + 73u8, 106u8, 171u8, 106u8, 25u8, 135u8, 233u8, 146u8, 221u8, 200u8, 93u8, + 221u8, 188u8, 196u8, 214u8, 221u8, 110u8, 242u8, 233u8, 252u8, + ]); + #[allow(unused_variables)] #[inline] fn new( @@ -302,29 +309,31 @@ event PoolCreated(address indexed pool); ) -> Self { Self { pool: topics.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, - ), - ); + 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.pool.clone()) } + #[inline] fn encode_topics_raw( &self, @@ -333,9 +342,7 @@ event PoolCreated(address indexed pool); if out.len() < ::COUNT { return Err(alloy_sol_types::Error::Overrun); } - out[0usize] = alloy_sol_types::abi::token::WordToken( - Self::SIGNATURE_HASH, - ); + out[0usize] = alloy_sol_types::abi::token::WordToken(Self::SIGNATURE_HASH); out[1usize] = ::encode_topic( &self.pool, ); @@ -347,6 +354,7 @@ event PoolCreated(address indexed pool); 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) } @@ -360,9 +368,9 @@ event PoolCreated(address indexed pool); } }; /**Constructor`. -```solidity -constructor(address vault, address protocolFeeProvider, string factoryVersion, string poolVersion); -```*/ + ```solidity + constructor(address vault, address protocolFeeProvider, string factoryVersion, string poolVersion); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct constructorCall { @@ -376,7 +384,7 @@ constructor(address vault, address protocolFeeProvider, string factoryVersion, s pub poolVersion: alloy_sol_types::private::String, } const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -395,9 +403,7 @@ constructor(address vault, address protocolFeeProvider, string factoryVersion, s ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -437,15 +443,15 @@ constructor(address vault, address protocolFeeProvider, string factoryVersion, s alloy_sol_types::sol_data::String, alloy_sol_types::sol_data::String, ); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + 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<'_> { ( @@ -467,9 +473,9 @@ constructor(address vault, address protocolFeeProvider, string factoryVersion, s }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `create(string,string,address[],uint256,address[],uint256[],bool[],uint256,address)` and selector `0x66b59f6c`. -```solidity -function create(string memory name, string memory symbol, address[] memory tokens, uint256 amplificationParameter, address[] memory rateProviders, uint256[] memory tokenRateCacheDurations, bool[] memory exemptFromYieldProtocolFeeFlags, uint256 swapFeePercentage, address owner) external returns (address); -```*/ + ```solidity + function create(string memory name, string memory symbol, address[] memory tokens, uint256 amplificationParameter, address[] memory rateProviders, uint256[] memory tokenRateCacheDurations, bool[] memory exemptFromYieldProtocolFeeFlags, uint256 swapFeePercentage, address owner) external returns (address); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct createCall { @@ -482,13 +488,10 @@ function create(string memory name, string memory symbol, address[] memory token #[allow(missing_docs)] pub amplificationParameter: alloy_sol_types::private::primitives::aliases::U256, #[allow(missing_docs)] - pub rateProviders: alloy_sol_types::private::Vec< - alloy_sol_types::private::Address, - >, + pub rateProviders: alloy_sol_types::private::Vec, #[allow(missing_docs)] - pub tokenRateCacheDurations: alloy_sol_types::private::Vec< - alloy_sol_types::private::primitives::aliases::U256, - >, + pub tokenRateCacheDurations: + alloy_sol_types::private::Vec, #[allow(missing_docs)] pub exemptFromYieldProtocolFeeFlags: alloy_sol_types::private::Vec, #[allow(missing_docs)] @@ -497,7 +500,9 @@ function create(string memory name, string memory symbol, address[] memory token pub owner: alloy_sol_types::private::Address, } #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`create(string,string,address[],uint256,address[],uint256[],bool[],uint256,address)`](createCall) function. + ///Container type for the return parameters of the + /// [`create(string,string,address[],uint256,address[],uint256[],bool[], + /// uint256,address)`](createCall) function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct createReturn { @@ -511,7 +516,7 @@ function create(string memory name, string memory symbol, address[] memory token clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -533,18 +538,14 @@ function create(string memory name, string memory symbol, address[] memory token alloy_sol_types::private::Vec, alloy_sol_types::private::primitives::aliases::U256, alloy_sol_types::private::Vec, - alloy_sol_types::private::Vec< - alloy_sol_types::private::primitives::aliases::U256, - >, + alloy_sol_types::private::Vec, alloy_sol_types::private::Vec, 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, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -594,9 +595,7 @@ function create(string memory name, string memory symbol, address[] memory token type UnderlyingRustTuple<'a> = (alloy_sol_types::private::Address,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -631,22 +630,22 @@ function create(string memory name, string memory symbol, address[] memory token 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::Address; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (alloy_sol_types::sol_data::Address,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "create(string,string,address[],uint256,address[],uint256[],bool[],uint256,address)"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [102u8, 181u8, 159u8, 108u8]; + const SIGNATURE: &'static str = "create(string,string,address[],uint256,address[],\ + uint256[],bool[],uint256,address)"; + #[inline] fn new<'a>( tuple: as alloy_sol_types::SolType>::RustType, ) -> Self { tuple.into() } + #[inline] fn tokenize(&self) -> Self::Token<'_> { ( @@ -685,47 +684,44 @@ function create(string memory name, string memory symbol, address[] memory token ), ) } + #[inline] fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { - ( - ::tokenize( - ret, - ), - ) + (::tokenize(ret),) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) - .map(|r| { + as alloy_sol_types::SolType>::abi_decode_sequence(data).map( + |r| { let r: createReturn = 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: createReturn = r.into(); - r._0 - }) + 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: createReturn = r.into(); + r._0 + }) } } }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `disable()` and selector `0x2f2770db`. -```solidity -function disable() external; -```*/ + ```solidity + function disable() external; + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct disableCall; - ///Container type for the return parameters of the [`disable()`](disableCall) function. + ///Container type for the return parameters of the + /// [`disable()`](disableCall) function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct disableReturn {} @@ -736,7 +732,7 @@ function disable() external; clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -745,9 +741,7 @@ function disable() external; type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -777,9 +771,7 @@ function disable() external; type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -802,67 +794,64 @@ function disable() external; } } impl disableReturn { - fn _tokenize( - &self, - ) -> ::ReturnToken<'_> { + fn _tokenize(&self) -> ::ReturnToken<'_> { () } } #[automatically_derived] impl alloy_sol_types::SolCall for disableCall { type Parameters<'a> = (); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = disableReturn; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "disable()"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [47u8, 39u8, 112u8, 219u8]; + const SIGNATURE: &'static str = "disable()"; + #[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<'_> { disableReturn::_tokenize(ret) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) + 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) + 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(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `version()` and selector `0x54fd4d50`. -```solidity -function version() external view returns (string memory); -```*/ + ```solidity + function version() external view returns (string memory); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct versionCall; #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`version()`](versionCall) function. + ///Container type for the return parameters of the + /// [`version()`](versionCall) function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct versionReturn { @@ -876,7 +865,7 @@ function version() external view returns (string memory); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -885,9 +874,7 @@ function version() external view returns (string memory); type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -917,9 +904,7 @@ function version() external view returns (string memory); type UnderlyingRustTuple<'a> = (alloy_sol_types::private::String,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -944,61 +929,56 @@ function version() external view returns (string memory); #[automatically_derived] impl alloy_sol_types::SolCall for versionCall { type Parameters<'a> = (); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = alloy_sol_types::private::String; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (alloy_sol_types::sol_data::String,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "version()"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [84u8, 253u8, 77u8, 80u8]; + const SIGNATURE: &'static str = "version()"; + #[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, - ), - ) + (::tokenize(ret),) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) - .map(|r| { + as alloy_sol_types::SolType>::abi_decode_sequence(data).map( + |r| { let r: versionReturn = 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: versionReturn = r.into(); - r._0 - }) + 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: versionReturn = r.into(); + r._0 + }) } } }; - ///Container for all the [`BalancerV2ComposableStablePoolFactoryV4`](self) function calls. + ///Container for all the [`BalancerV2ComposableStablePoolFactoryV4`](self) + /// function calls. #[derive(Clone)] - #[derive()] pub enum BalancerV2ComposableStablePoolFactoryV4Calls { #[allow(missing_docs)] create(createCall), @@ -1010,8 +990,9 @@ function version() external view returns (string memory); impl BalancerV2ComposableStablePoolFactoryV4Calls { /// 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. + /// 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]] = &[ @@ -1019,18 +1000,19 @@ function version() external view returns (string memory); [84u8, 253u8, 77u8, 80u8], [102u8, 181u8, 159u8, 108u8], ]; - /// The names of the variants in the same order as `SELECTORS`. - pub const VARIANT_NAMES: &'static [&'static str] = &[ - ::core::stringify!(disable), - ::core::stringify!(version), - ::core::stringify!(create), - ]; /// The signatures in the same order as `SELECTORS`. pub const SIGNATURES: &'static [&'static str] = &[ ::SIGNATURE, ::SIGNATURE, ::SIGNATURE, ]; + /// The names of the variants in the same order as `SELECTORS`. + pub const VARIANT_NAMES: &'static [&'static str] = &[ + ::core::stringify!(disable), + ::core::stringify!(version), + ::core::stringify!(create), + ]; + /// Returns the signature for the given selector, if known. #[inline] pub fn signature_by_selector( @@ -1043,20 +1025,20 @@ function version() external view returns (string memory); ::core::result::Result::Err(_) => ::core::option::Option::None, } } + /// Returns the enum variant name for the given selector, if known. #[inline] - pub fn name_by_selector( - selector: [u8; 4usize], - ) -> ::core::option::Option<&'static str> { + pub fn name_by_selector(selector: [u8; 4usize]) -> ::core::option::Option<&'static str> { let sig = Self::signature_by_selector(selector)?; sig.split_once('(').map(|(name, _)| name) } } #[automatically_derived] impl alloy_sol_types::SolInterface for BalancerV2ComposableStablePoolFactoryV4Calls { - const NAME: &'static str = "BalancerV2ComposableStablePoolFactoryV4Calls"; - const MIN_DATA_LENGTH: usize = 0usize; const COUNT: usize = 3usize; + const MIN_DATA_LENGTH: usize = 0usize; + const NAME: &'static str = "BalancerV2ComposableStablePoolFactoryV4Calls"; + #[inline] fn selector(&self) -> [u8; 4] { match self { @@ -1065,20 +1047,20 @@ function version() external view returns (string memory); Self::version(_) => ::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 { + fn abi_decode_raw(selector: [u8; 4], data: &[u8]) -> alloy_sol_types::Result { static DECODE_SHIMS: &[fn( &[u8], ) -> alloy_sol_types::Result< @@ -1087,9 +1069,8 @@ function version() external view returns (string memory); { fn disable( data: &[u8], - ) -> alloy_sol_types::Result< - BalancerV2ComposableStablePoolFactoryV4Calls, - > { + ) -> alloy_sol_types::Result + { ::abi_decode_raw(data) .map(BalancerV2ComposableStablePoolFactoryV4Calls::disable) } @@ -1098,9 +1079,8 @@ function version() external view returns (string memory); { fn version( data: &[u8], - ) -> alloy_sol_types::Result< - BalancerV2ComposableStablePoolFactoryV4Calls, - > { + ) -> alloy_sol_types::Result + { ::abi_decode_raw(data) .map(BalancerV2ComposableStablePoolFactoryV4Calls::version) } @@ -1109,9 +1089,8 @@ function version() external view returns (string memory); { fn create( data: &[u8], - ) -> alloy_sol_types::Result< - BalancerV2ComposableStablePoolFactoryV4Calls, - > { + ) -> alloy_sol_types::Result + { ::abi_decode_raw(data) .map(BalancerV2ComposableStablePoolFactoryV4Calls::create) } @@ -1119,15 +1098,14 @@ function version() external view returns (string memory); }, ]; let Ok(idx) = Self::SELECTORS.binary_search(&selector) else { - return Err( - alloy_sol_types::Error::unknown_selector( - ::NAME, - selector, - ), - ); + return Err(alloy_sol_types::Error::unknown_selector( + ::NAME, + selector, + )); }; DECODE_SHIMS[idx](data) } + #[inline] #[allow(non_snake_case)] fn abi_decode_raw_validate( @@ -1142,12 +1120,9 @@ function version() external view returns (string memory); { fn disable( data: &[u8], - ) -> alloy_sol_types::Result< - BalancerV2ComposableStablePoolFactoryV4Calls, - > { - ::abi_decode_raw_validate( - data, - ) + ) -> alloy_sol_types::Result + { + ::abi_decode_raw_validate(data) .map(BalancerV2ComposableStablePoolFactoryV4Calls::disable) } disable @@ -1155,12 +1130,9 @@ function version() external view returns (string memory); { fn version( data: &[u8], - ) -> alloy_sol_types::Result< - BalancerV2ComposableStablePoolFactoryV4Calls, - > { - ::abi_decode_raw_validate( - data, - ) + ) -> alloy_sol_types::Result + { + ::abi_decode_raw_validate(data) .map(BalancerV2ComposableStablePoolFactoryV4Calls::version) } version @@ -1168,27 +1140,23 @@ function version() external view returns (string memory); { fn create( data: &[u8], - ) -> alloy_sol_types::Result< - BalancerV2ComposableStablePoolFactoryV4Calls, - > { - ::abi_decode_raw_validate( - data, - ) + ) -> alloy_sol_types::Result + { + ::abi_decode_raw_validate(data) .map(BalancerV2ComposableStablePoolFactoryV4Calls::create) } create }, ]; let Ok(idx) = Self::SELECTORS.binary_search(&selector) else { - return Err( - alloy_sol_types::Error::unknown_selector( - ::NAME, - selector, - ), - ); + return Err(alloy_sol_types::Error::unknown_selector( + ::NAME, + selector, + )); }; DECODE_VALIDATE_SHIMS[idx](data) } + #[inline] fn abi_encoded_size(&self) -> usize { match self { @@ -1203,6 +1171,7 @@ function version() external view returns (string memory); } } } + #[inline] fn abi_encode_raw(&self, out: &mut alloy_sol_types::private::Vec) { match self { @@ -1218,9 +1187,9 @@ function version() external view returns (string memory); } } } - ///Container for all the [`BalancerV2ComposableStablePoolFactoryV4`](self) events. - #[derive(Clone)] - #[derive(Debug, PartialEq, Eq, Hash)] + ///Container for all the [`BalancerV2ComposableStablePoolFactoryV4`](self) + /// events. + #[derive(Clone, Debug, PartialEq, Eq, Hash)] pub enum BalancerV2ComposableStablePoolFactoryV4Events { #[allow(missing_docs)] FactoryDisabled(FactoryDisabled), @@ -1230,33 +1199,34 @@ function version() external view returns (string memory); impl BalancerV2ComposableStablePoolFactoryV4Events { /// 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. + /// 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]] = &[ [ - 67u8, 42u8, 203u8, 253u8, 102u8, 45u8, 187u8, 93u8, 139u8, 55u8, 131u8, - 132u8, 166u8, 113u8, 89u8, 180u8, 124u8, 169u8, 208u8, 241u8, 183u8, - 159u8, 151u8, 207u8, 100u8, 207u8, 133u8, 133u8, 250u8, 54u8, 45u8, 80u8, + 67u8, 42u8, 203u8, 253u8, 102u8, 45u8, 187u8, 93u8, 139u8, 55u8, 131u8, 132u8, + 166u8, 113u8, 89u8, 180u8, 124u8, 169u8, 208u8, 241u8, 183u8, 159u8, 151u8, 207u8, + 100u8, 207u8, 133u8, 133u8, 250u8, 54u8, 45u8, 80u8, ], [ - 131u8, 164u8, 143u8, 188u8, 252u8, 153u8, 19u8, 53u8, 49u8, 78u8, 116u8, - 208u8, 73u8, 106u8, 171u8, 106u8, 25u8, 135u8, 233u8, 146u8, 221u8, - 200u8, 93u8, 221u8, 188u8, 196u8, 214u8, 221u8, 110u8, 242u8, 233u8, - 252u8, + 131u8, 164u8, 143u8, 188u8, 252u8, 153u8, 19u8, 53u8, 49u8, 78u8, 116u8, 208u8, + 73u8, 106u8, 171u8, 106u8, 25u8, 135u8, 233u8, 146u8, 221u8, 200u8, 93u8, 221u8, + 188u8, 196u8, 214u8, 221u8, 110u8, 242u8, 233u8, 252u8, ], ]; - /// The names of the variants in the same order as `SELECTORS`. - pub const VARIANT_NAMES: &'static [&'static str] = &[ - ::core::stringify!(FactoryDisabled), - ::core::stringify!(PoolCreated), - ]; /// The signatures in the same order as `SELECTORS`. pub const SIGNATURES: &'static [&'static str] = &[ ::SIGNATURE, ::SIGNATURE, ]; + /// The names of the variants in the same order as `SELECTORS`. + pub const VARIANT_NAMES: &'static [&'static str] = &[ + ::core::stringify!(FactoryDisabled), + ::core::stringify!(PoolCreated), + ]; + /// Returns the signature for the given selector, if known. #[inline] pub fn signature_by_selector( @@ -1269,56 +1239,46 @@ function version() external view returns (string memory); ::core::result::Result::Err(_) => ::core::option::Option::None, } } + /// Returns the enum variant name for the given selector, if known. #[inline] - pub fn name_by_selector( - selector: [u8; 32usize], - ) -> ::core::option::Option<&'static str> { + pub fn name_by_selector(selector: [u8; 32usize]) -> ::core::option::Option<&'static str> { let sig = Self::signature_by_selector(selector)?; sig.split_once('(').map(|(name, _)| name) } } #[automatically_derived] - impl alloy_sol_types::SolEventInterface - for BalancerV2ComposableStablePoolFactoryV4Events { - const NAME: &'static str = "BalancerV2ComposableStablePoolFactoryV4Events"; + impl alloy_sol_types::SolEventInterface for BalancerV2ComposableStablePoolFactoryV4Events { const COUNT: usize = 2usize; + const NAME: &'static str = "BalancerV2ComposableStablePoolFactoryV4Events"; + 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, - ) + ::decode_raw_log(topics, data) .map(Self::FactoryDisabled) } Some(::SIGNATURE_HASH) => { - ::decode_raw_log( - topics, - data, - ) + ::decode_raw_log(topics, data) .map(Self::PoolCreated) } - _ => { - 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(), - ), + _ => 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 BalancerV2ComposableStablePoolFactoryV4Events { + impl alloy_sol_types::private::IntoLogData for BalancerV2ComposableStablePoolFactoryV4Events { fn to_log_data(&self) -> alloy_sol_types::private::LogData { match self { Self::FactoryDisabled(inner) => { @@ -1329,6 +1289,7 @@ function version() external view returns (string memory); } } } + fn into_log_data(self) -> alloy_sol_types::private::LogData { match self { Self::FactoryDisabled(inner) => { @@ -1340,10 +1301,10 @@ function version() external view returns (string memory); } } } - use alloy_contract as alloy_contract; + use alloy_contract; /**Creates a new wrapper around an on-chain [`BalancerV2ComposableStablePoolFactoryV4`](self) contract instance. -See the [wrapper's documentation](`BalancerV2ComposableStablePoolFactoryV4Instance`) for more details.*/ + See the [wrapper's documentation](`BalancerV2ComposableStablePoolFactoryV4Instance`) for more details.*/ #[inline] pub const fn new< P: alloy_contract::private::Provider, @@ -1356,15 +1317,15 @@ See the [wrapper's documentation](`BalancerV2ComposableStablePoolFactoryV4Instan } /**A [`BalancerV2ComposableStablePoolFactoryV4`](self) instance. -Contains type-safe methods for interacting with an on-chain instance of the -[`BalancerV2ComposableStablePoolFactoryV4`](self) contract located at a given `address`, using a given -provider `P`. + Contains type-safe methods for interacting with an on-chain instance of the + [`BalancerV2ComposableStablePoolFactoryV4`](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. + 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.*/ + See the [module-level documentation](self) for all the available methods.*/ #[derive(Clone)] pub struct BalancerV2ComposableStablePoolFactoryV4Instance< P, @@ -1375,8 +1336,7 @@ See the [module-level documentation](self) for all the available methods.*/ _network: ::core::marker::PhantomData, } #[automatically_derived] - impl ::core::fmt::Debug - for BalancerV2ComposableStablePoolFactoryV4Instance { + impl ::core::fmt::Debug for BalancerV2ComposableStablePoolFactoryV4Instance { #[inline] fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { f.debug_tuple("BalancerV2ComposableStablePoolFactoryV4Instance") @@ -1385,54 +1345,50 @@ See the [module-level documentation](self) for all the available methods.*/ } } /// Instantiation and getters/setters. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > BalancerV2ComposableStablePoolFactoryV4Instance { + impl, N: alloy_contract::private::Network> + BalancerV2ComposableStablePoolFactoryV4Instance + { /**Creates a new wrapper around an on-chain [`BalancerV2ComposableStablePoolFactoryV4`](self) contract instance. -See the [wrapper's documentation](`BalancerV2ComposableStablePoolFactoryV4Instance`) for more details.*/ + See the [wrapper's documentation](`BalancerV2ComposableStablePoolFactoryV4Instance`) for more details.*/ #[inline] - pub const fn new( - address: alloy_sol_types::private::Address, - __provider: P, - ) -> Self { + pub const fn new(address: alloy_sol_types::private::Address, __provider: P) -> Self { Self { address, provider: __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< - P: ::core::clone::Clone, - N, - > BalancerV2ComposableStablePoolFactoryV4Instance<&P, N> { - /// Clones the provider and returns a new instance with the cloned provider. + impl BalancerV2ComposableStablePoolFactoryV4Instance<&P, N> { + /// Clones the provider and returns a new instance with the cloned + /// provider. #[inline] - pub fn with_cloned_provider( - self, - ) -> BalancerV2ComposableStablePoolFactoryV4Instance { + pub fn with_cloned_provider(self) -> BalancerV2ComposableStablePoolFactoryV4Instance { BalancerV2ComposableStablePoolFactoryV4Instance { address: self.address, provider: ::core::clone::Clone::clone(&self.provider), @@ -1441,20 +1397,22 @@ See the [wrapper's documentation](`BalancerV2ComposableStablePoolFactoryV4Instan } } /// Function calls. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > BalancerV2ComposableStablePoolFactoryV4Instance { - /// Creates a new call builder using this contract instance's provider and address. + impl, N: alloy_contract::private::Network> + BalancerV2ComposableStablePoolFactoryV4Instance + { + /// 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. + /// 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 [`create`] function. pub fn create( &self, @@ -1462,9 +1420,7 @@ See the [wrapper's documentation](`BalancerV2ComposableStablePoolFactoryV4Instan symbol: alloy_sol_types::private::String, tokens: alloy_sol_types::private::Vec, amplificationParameter: alloy_sol_types::private::primitives::aliases::U256, - rateProviders: alloy_sol_types::private::Vec< - alloy_sol_types::private::Address, - >, + rateProviders: alloy_sol_types::private::Vec, tokenRateCacheDurations: alloy_sol_types::private::Vec< alloy_sol_types::private::primitives::aliases::U256, >, @@ -1472,130 +1428,100 @@ See the [wrapper's documentation](`BalancerV2ComposableStablePoolFactoryV4Instan swapFeePercentage: alloy_sol_types::private::primitives::aliases::U256, owner: alloy_sol_types::private::Address, ) -> alloy_contract::SolCallBuilder<&P, createCall, N> { - self.call_builder( - &createCall { - name, - symbol, - tokens, - amplificationParameter, - rateProviders, - tokenRateCacheDurations, - exemptFromYieldProtocolFeeFlags, - swapFeePercentage, - owner, - }, - ) + self.call_builder(&createCall { + name, + symbol, + tokens, + amplificationParameter, + rateProviders, + tokenRateCacheDurations, + exemptFromYieldProtocolFeeFlags, + swapFeePercentage, + owner, + }) } + ///Creates a new call builder for the [`disable`] function. pub fn disable(&self) -> alloy_contract::SolCallBuilder<&P, disableCall, N> { self.call_builder(&disableCall) } + ///Creates a new call builder for the [`version`] function. pub fn version(&self) -> alloy_contract::SolCallBuilder<&P, versionCall, N> { self.call_builder(&versionCall) } } /// Event filters. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > BalancerV2ComposableStablePoolFactoryV4Instance { - /// Creates a new event filter using this contract instance's provider and address. + impl, N: alloy_contract::private::Network> + BalancerV2ComposableStablePoolFactoryV4Instance + { + /// 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. + /// 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 [`FactoryDisabled`] event. - pub fn FactoryDisabled_filter( - &self, - ) -> alloy_contract::Event<&P, FactoryDisabled, N> { + pub fn FactoryDisabled_filter(&self) -> alloy_contract::Event<&P, FactoryDisabled, N> { self.event_filter::() } + ///Creates a new event filter for the [`PoolCreated`] event. pub fn PoolCreated_filter(&self) -> alloy_contract::Event<&P, PoolCreated, N> { self.event_filter::() } } } -pub type Instance = BalancerV2ComposableStablePoolFactoryV4::BalancerV2ComposableStablePoolFactoryV4Instance< - ::alloy_provider::DynProvider, ->; +pub type Instance = + BalancerV2ComposableStablePoolFactoryV4::BalancerV2ComposableStablePoolFactoryV4Instance< + ::alloy_provider::DynProvider, + >; use { - std::{sync::LazyLock, collections::HashMap}, - anyhow::{Result, Context}, - alloy_primitives::{address, Address}, - alloy_provider::{Provider, DynProvider}, + alloy_primitives::{Address, address}, + alloy_provider::{DynProvider, Provider}, + anyhow::{Context, Result}, + std::{collections::HashMap, sync::LazyLock}, }; pub const fn deployment_info(chain_id: u64) -> Option<(Address, Option)> { match chain_id { - 1u64 => { - Some(( - ::alloy_primitives::address!( - "0xfADa0f4547AB2de89D1304A668C39B3E09Aa7c76" - ), - Some(16878679u64), - )) - } - 10u64 => { - Some(( - ::alloy_primitives::address!( - "0x1802953277FD955f9a254B80Aa0582f193cF1d77" - ), - Some(82748180u64), - )) - } - 56u64 => { - Some(( - ::alloy_primitives::address!( - "0x1802953277FD955f9a254B80Aa0582f193cF1d77" - ), - Some(26666380u64), - )) - } - 100u64 => { - Some(( - ::alloy_primitives::address!( - "0xD87F44Df0159DC78029AB9CA7D7e57E7249F5ACD" - ), - Some(27056416u64), - )) - } - 137u64 => { - Some(( - ::alloy_primitives::address!( - "0x6Ab5549bBd766A43aFb687776ad8466F8b42f777" - ), - Some(40613553u64), - )) - } - 42161u64 => { - Some(( - ::alloy_primitives::address!( - "0x2498A2B0d6462d2260EAC50aE1C3e03F4829BA95" - ), - Some(72235860u64), - )) - } - 43114u64 => { - Some(( - ::alloy_primitives::address!( - "0x3B1eb8EB7b43882b385aB30533D9A2BeF9052a98" - ), - Some(29221425u64), - )) - } - 11155111u64 => { - Some(( - ::alloy_primitives::address!( - "0xA3fd20E29358c056B727657E83DFd139abBC9924" - ), - Some(3425277u64), - )) - } + 1u64 => Some(( + ::alloy_primitives::address!("0xfADa0f4547AB2de89D1304A668C39B3E09Aa7c76"), + Some(16878679u64), + )), + 10u64 => Some(( + ::alloy_primitives::address!("0x1802953277FD955f9a254B80Aa0582f193cF1d77"), + Some(82748180u64), + )), + 56u64 => Some(( + ::alloy_primitives::address!("0x1802953277FD955f9a254B80Aa0582f193cF1d77"), + Some(26666380u64), + )), + 100u64 => Some(( + ::alloy_primitives::address!("0xD87F44Df0159DC78029AB9CA7D7e57E7249F5ACD"), + Some(27056416u64), + )), + 137u64 => Some(( + ::alloy_primitives::address!("0x6Ab5549bBd766A43aFb687776ad8466F8b42f777"), + Some(40613553u64), + )), + 42161u64 => Some(( + ::alloy_primitives::address!("0x2498A2B0d6462d2260EAC50aE1C3e03F4829BA95"), + Some(72235860u64), + )), + 43114u64 => Some(( + ::alloy_primitives::address!("0x3B1eb8EB7b43882b385aB30533D9A2BeF9052a98"), + Some(29221425u64), + )), + 11155111u64 => Some(( + ::alloy_primitives::address!("0xA3fd20E29358c056B727657E83DFd139abBC9924"), + Some(3425277u64), + )), _ => None, } } @@ -1612,9 +1538,7 @@ pub const fn deployment_block(chain_id: &u64) -> Option { } } impl Instance { - pub fn deployed( - provider: &DynProvider, - ) -> impl Future> + Send { + pub fn deployed(provider: &DynProvider) -> impl Future> + Send { async move { let chain_id = provider .get_chain_id() diff --git a/contracts/generated/contracts-generated/balancerv2composablestablepoolfactoryv5/src/lib.rs b/contracts/generated/contracts-generated/balancerv2composablestablepoolfactoryv5/src/lib.rs index b47717a931..8e2a913865 100644 --- a/contracts/generated/contracts-generated/balancerv2composablestablepoolfactoryv5/src/lib.rs +++ b/contracts/generated/contracts-generated/balancerv2composablestablepoolfactoryv5/src/lib.rs @@ -1,4 +1,10 @@ -#![allow(unused_imports, unused_attributes, clippy::all, rustdoc::all, non_snake_case)] +#![allow( + unused_imports, + unused_attributes, + clippy::all, + rustdoc::all, + non_snake_case +)] //! Auto-generated contract bindings. Do not edit. /** @@ -153,13 +159,12 @@ interface BalancerV2ComposableStablePoolFactoryV5 { clippy::empty_structs_with_brackets )] pub mod BalancerV2ComposableStablePoolFactoryV5 { - use super::*; - use alloy_sol_types as alloy_sol_types; + use {super::*, alloy_sol_types}; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Event with signature `FactoryDisabled()` and selector `0x432acbfd662dbb5d8b378384a67159b47ca9d0f1b79f97cf64cf8585fa362d50`. -```solidity -event FactoryDisabled(); -```*/ + ```solidity + event FactoryDisabled(); + ```*/ #[allow( non_camel_case_types, non_snake_case, @@ -175,21 +180,22 @@ event FactoryDisabled(); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[automatically_derived] impl alloy_sol_types::SolEvent for FactoryDisabled { + type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type DataTuple<'a> = (); - type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type TopicList = (alloy_sol_types::sol_data::FixedBytes<32>,); - const SIGNATURE: &'static str = "FactoryDisabled()"; - const SIGNATURE_HASH: alloy_sol_types::private::B256 = alloy_sol_types::private::B256::new([ - 67u8, 42u8, 203u8, 253u8, 102u8, 45u8, 187u8, 93u8, 139u8, 55u8, 131u8, - 132u8, 166u8, 113u8, 89u8, 180u8, 124u8, 169u8, 208u8, 241u8, 183u8, - 159u8, 151u8, 207u8, 100u8, 207u8, 133u8, 133u8, 250u8, 54u8, 45u8, 80u8, - ]); + const ANONYMOUS: bool = false; + const SIGNATURE: &'static str = "FactoryDisabled()"; + const SIGNATURE_HASH: alloy_sol_types::private::B256 = + alloy_sol_types::private::B256::new([ + 67u8, 42u8, 203u8, 253u8, 102u8, 45u8, 187u8, 93u8, 139u8, 55u8, 131u8, 132u8, + 166u8, 113u8, 89u8, 180u8, 124u8, 169u8, 208u8, 241u8, 183u8, 159u8, 151u8, + 207u8, 100u8, 207u8, 133u8, 133u8, 250u8, 54u8, 45u8, 80u8, + ]); + #[allow(unused_variables)] #[inline] fn new( @@ -198,29 +204,31 @@ event FactoryDisabled(); ) -> Self { Self {} } + #[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, - ), - ); + 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(),) } + #[inline] fn encode_topics_raw( &self, @@ -229,9 +237,7 @@ event FactoryDisabled(); if out.len() < ::COUNT { return Err(alloy_sol_types::Error::Overrun); } - out[0usize] = alloy_sol_types::abi::token::WordToken( - Self::SIGNATURE_HASH, - ); + out[0usize] = alloy_sol_types::abi::token::WordToken(Self::SIGNATURE_HASH); Ok(()) } } @@ -240,6 +246,7 @@ event FactoryDisabled(); 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) } @@ -254,9 +261,9 @@ event FactoryDisabled(); }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Event with signature `PoolCreated(address)` and selector `0x83a48fbcfc991335314e74d0496aab6a1987e992ddc85dddbcc4d6dd6ef2e9fc`. -```solidity -event PoolCreated(address indexed pool); -```*/ + ```solidity + event PoolCreated(address indexed pool); + ```*/ #[allow( non_camel_case_types, non_snake_case, @@ -275,25 +282,25 @@ event PoolCreated(address indexed pool); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[automatically_derived] impl alloy_sol_types::SolEvent for PoolCreated { + type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; 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::Address, ); - const SIGNATURE: &'static str = "PoolCreated(address)"; - const SIGNATURE_HASH: alloy_sol_types::private::B256 = alloy_sol_types::private::B256::new([ - 131u8, 164u8, 143u8, 188u8, 252u8, 153u8, 19u8, 53u8, 49u8, 78u8, 116u8, - 208u8, 73u8, 106u8, 171u8, 106u8, 25u8, 135u8, 233u8, 146u8, 221u8, - 200u8, 93u8, 221u8, 188u8, 196u8, 214u8, 221u8, 110u8, 242u8, 233u8, - 252u8, - ]); + const ANONYMOUS: bool = false; + const SIGNATURE: &'static str = "PoolCreated(address)"; + const SIGNATURE_HASH: alloy_sol_types::private::B256 = + alloy_sol_types::private::B256::new([ + 131u8, 164u8, 143u8, 188u8, 252u8, 153u8, 19u8, 53u8, 49u8, 78u8, 116u8, 208u8, + 73u8, 106u8, 171u8, 106u8, 25u8, 135u8, 233u8, 146u8, 221u8, 200u8, 93u8, + 221u8, 188u8, 196u8, 214u8, 221u8, 110u8, 242u8, 233u8, 252u8, + ]); + #[allow(unused_variables)] #[inline] fn new( @@ -302,29 +309,31 @@ event PoolCreated(address indexed pool); ) -> Self { Self { pool: topics.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, - ), - ); + 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.pool.clone()) } + #[inline] fn encode_topics_raw( &self, @@ -333,9 +342,7 @@ event PoolCreated(address indexed pool); if out.len() < ::COUNT { return Err(alloy_sol_types::Error::Overrun); } - out[0usize] = alloy_sol_types::abi::token::WordToken( - Self::SIGNATURE_HASH, - ); + out[0usize] = alloy_sol_types::abi::token::WordToken(Self::SIGNATURE_HASH); out[1usize] = ::encode_topic( &self.pool, ); @@ -347,6 +354,7 @@ event PoolCreated(address indexed pool); 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) } @@ -360,9 +368,9 @@ event PoolCreated(address indexed pool); } }; /**Constructor`. -```solidity -constructor(address vault, address protocolFeeProvider, string factoryVersion, string poolVersion); -```*/ + ```solidity + constructor(address vault, address protocolFeeProvider, string factoryVersion, string poolVersion); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct constructorCall { @@ -376,7 +384,7 @@ constructor(address vault, address protocolFeeProvider, string factoryVersion, s pub poolVersion: alloy_sol_types::private::String, } const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -395,9 +403,7 @@ constructor(address vault, address protocolFeeProvider, string factoryVersion, s ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -437,15 +443,15 @@ constructor(address vault, address protocolFeeProvider, string factoryVersion, s alloy_sol_types::sol_data::String, alloy_sol_types::sol_data::String, ); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + 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<'_> { ( @@ -467,9 +473,9 @@ constructor(address vault, address protocolFeeProvider, string factoryVersion, s }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `create(string,string,address[],uint256,address[],uint256[],bool[],uint256,address)` and selector `0x66b59f6c`. -```solidity -function create(string memory name, string memory symbol, address[] memory tokens, uint256 amplificationParameter, address[] memory rateProviders, uint256[] memory tokenRateCacheDurations, bool[] memory exemptFromYieldProtocolFeeFlags, uint256 swapFeePercentage, address owner) external returns (address); -```*/ + ```solidity + function create(string memory name, string memory symbol, address[] memory tokens, uint256 amplificationParameter, address[] memory rateProviders, uint256[] memory tokenRateCacheDurations, bool[] memory exemptFromYieldProtocolFeeFlags, uint256 swapFeePercentage, address owner) external returns (address); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct createCall { @@ -482,13 +488,10 @@ function create(string memory name, string memory symbol, address[] memory token #[allow(missing_docs)] pub amplificationParameter: alloy_sol_types::private::primitives::aliases::U256, #[allow(missing_docs)] - pub rateProviders: alloy_sol_types::private::Vec< - alloy_sol_types::private::Address, - >, + pub rateProviders: alloy_sol_types::private::Vec, #[allow(missing_docs)] - pub tokenRateCacheDurations: alloy_sol_types::private::Vec< - alloy_sol_types::private::primitives::aliases::U256, - >, + pub tokenRateCacheDurations: + alloy_sol_types::private::Vec, #[allow(missing_docs)] pub exemptFromYieldProtocolFeeFlags: alloy_sol_types::private::Vec, #[allow(missing_docs)] @@ -497,7 +500,9 @@ function create(string memory name, string memory symbol, address[] memory token pub owner: alloy_sol_types::private::Address, } #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`create(string,string,address[],uint256,address[],uint256[],bool[],uint256,address)`](createCall) function. + ///Container type for the return parameters of the + /// [`create(string,string,address[],uint256,address[],uint256[],bool[], + /// uint256,address)`](createCall) function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct createReturn { @@ -511,7 +516,7 @@ function create(string memory name, string memory symbol, address[] memory token clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -533,18 +538,14 @@ function create(string memory name, string memory symbol, address[] memory token alloy_sol_types::private::Vec, alloy_sol_types::private::primitives::aliases::U256, alloy_sol_types::private::Vec, - alloy_sol_types::private::Vec< - alloy_sol_types::private::primitives::aliases::U256, - >, + alloy_sol_types::private::Vec, alloy_sol_types::private::Vec, 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, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -594,9 +595,7 @@ function create(string memory name, string memory symbol, address[] memory token type UnderlyingRustTuple<'a> = (alloy_sol_types::private::Address,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -631,22 +630,22 @@ function create(string memory name, string memory symbol, address[] memory token 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::Address; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (alloy_sol_types::sol_data::Address,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "create(string,string,address[],uint256,address[],uint256[],bool[],uint256,address)"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [102u8, 181u8, 159u8, 108u8]; + const SIGNATURE: &'static str = "create(string,string,address[],uint256,address[],\ + uint256[],bool[],uint256,address)"; + #[inline] fn new<'a>( tuple: as alloy_sol_types::SolType>::RustType, ) -> Self { tuple.into() } + #[inline] fn tokenize(&self) -> Self::Token<'_> { ( @@ -685,47 +684,44 @@ function create(string memory name, string memory symbol, address[] memory token ), ) } + #[inline] fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { - ( - ::tokenize( - ret, - ), - ) + (::tokenize(ret),) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) - .map(|r| { + as alloy_sol_types::SolType>::abi_decode_sequence(data).map( + |r| { let r: createReturn = 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: createReturn = r.into(); - r._0 - }) + 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: createReturn = r.into(); + r._0 + }) } } }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `disable()` and selector `0x2f2770db`. -```solidity -function disable() external; -```*/ + ```solidity + function disable() external; + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct disableCall; - ///Container type for the return parameters of the [`disable()`](disableCall) function. + ///Container type for the return parameters of the + /// [`disable()`](disableCall) function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct disableReturn {} @@ -736,7 +732,7 @@ function disable() external; clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -745,9 +741,7 @@ function disable() external; type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -777,9 +771,7 @@ function disable() external; type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -802,67 +794,64 @@ function disable() external; } } impl disableReturn { - fn _tokenize( - &self, - ) -> ::ReturnToken<'_> { + fn _tokenize(&self) -> ::ReturnToken<'_> { () } } #[automatically_derived] impl alloy_sol_types::SolCall for disableCall { type Parameters<'a> = (); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = disableReturn; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "disable()"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [47u8, 39u8, 112u8, 219u8]; + const SIGNATURE: &'static str = "disable()"; + #[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<'_> { disableReturn::_tokenize(ret) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) + 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) + 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(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `version()` and selector `0x54fd4d50`. -```solidity -function version() external view returns (string memory); -```*/ + ```solidity + function version() external view returns (string memory); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct versionCall; #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`version()`](versionCall) function. + ///Container type for the return parameters of the + /// [`version()`](versionCall) function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct versionReturn { @@ -876,7 +865,7 @@ function version() external view returns (string memory); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -885,9 +874,7 @@ function version() external view returns (string memory); type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -917,9 +904,7 @@ function version() external view returns (string memory); type UnderlyingRustTuple<'a> = (alloy_sol_types::private::String,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -944,61 +929,56 @@ function version() external view returns (string memory); #[automatically_derived] impl alloy_sol_types::SolCall for versionCall { type Parameters<'a> = (); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = alloy_sol_types::private::String; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (alloy_sol_types::sol_data::String,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "version()"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [84u8, 253u8, 77u8, 80u8]; + const SIGNATURE: &'static str = "version()"; + #[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, - ), - ) + (::tokenize(ret),) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) - .map(|r| { + as alloy_sol_types::SolType>::abi_decode_sequence(data).map( + |r| { let r: versionReturn = 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: versionReturn = r.into(); - r._0 - }) + 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: versionReturn = r.into(); + r._0 + }) } } }; - ///Container for all the [`BalancerV2ComposableStablePoolFactoryV5`](self) function calls. + ///Container for all the [`BalancerV2ComposableStablePoolFactoryV5`](self) + /// function calls. #[derive(Clone)] - #[derive()] pub enum BalancerV2ComposableStablePoolFactoryV5Calls { #[allow(missing_docs)] create(createCall), @@ -1010,8 +990,9 @@ function version() external view returns (string memory); impl BalancerV2ComposableStablePoolFactoryV5Calls { /// 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. + /// 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]] = &[ @@ -1019,18 +1000,19 @@ function version() external view returns (string memory); [84u8, 253u8, 77u8, 80u8], [102u8, 181u8, 159u8, 108u8], ]; - /// The names of the variants in the same order as `SELECTORS`. - pub const VARIANT_NAMES: &'static [&'static str] = &[ - ::core::stringify!(disable), - ::core::stringify!(version), - ::core::stringify!(create), - ]; /// The signatures in the same order as `SELECTORS`. pub const SIGNATURES: &'static [&'static str] = &[ ::SIGNATURE, ::SIGNATURE, ::SIGNATURE, ]; + /// The names of the variants in the same order as `SELECTORS`. + pub const VARIANT_NAMES: &'static [&'static str] = &[ + ::core::stringify!(disable), + ::core::stringify!(version), + ::core::stringify!(create), + ]; + /// Returns the signature for the given selector, if known. #[inline] pub fn signature_by_selector( @@ -1043,20 +1025,20 @@ function version() external view returns (string memory); ::core::result::Result::Err(_) => ::core::option::Option::None, } } + /// Returns the enum variant name for the given selector, if known. #[inline] - pub fn name_by_selector( - selector: [u8; 4usize], - ) -> ::core::option::Option<&'static str> { + pub fn name_by_selector(selector: [u8; 4usize]) -> ::core::option::Option<&'static str> { let sig = Self::signature_by_selector(selector)?; sig.split_once('(').map(|(name, _)| name) } } #[automatically_derived] impl alloy_sol_types::SolInterface for BalancerV2ComposableStablePoolFactoryV5Calls { - const NAME: &'static str = "BalancerV2ComposableStablePoolFactoryV5Calls"; - const MIN_DATA_LENGTH: usize = 0usize; const COUNT: usize = 3usize; + const MIN_DATA_LENGTH: usize = 0usize; + const NAME: &'static str = "BalancerV2ComposableStablePoolFactoryV5Calls"; + #[inline] fn selector(&self) -> [u8; 4] { match self { @@ -1065,20 +1047,20 @@ function version() external view returns (string memory); Self::version(_) => ::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 { + fn abi_decode_raw(selector: [u8; 4], data: &[u8]) -> alloy_sol_types::Result { static DECODE_SHIMS: &[fn( &[u8], ) -> alloy_sol_types::Result< @@ -1087,9 +1069,8 @@ function version() external view returns (string memory); { fn disable( data: &[u8], - ) -> alloy_sol_types::Result< - BalancerV2ComposableStablePoolFactoryV5Calls, - > { + ) -> alloy_sol_types::Result + { ::abi_decode_raw(data) .map(BalancerV2ComposableStablePoolFactoryV5Calls::disable) } @@ -1098,9 +1079,8 @@ function version() external view returns (string memory); { fn version( data: &[u8], - ) -> alloy_sol_types::Result< - BalancerV2ComposableStablePoolFactoryV5Calls, - > { + ) -> alloy_sol_types::Result + { ::abi_decode_raw(data) .map(BalancerV2ComposableStablePoolFactoryV5Calls::version) } @@ -1109,9 +1089,8 @@ function version() external view returns (string memory); { fn create( data: &[u8], - ) -> alloy_sol_types::Result< - BalancerV2ComposableStablePoolFactoryV5Calls, - > { + ) -> alloy_sol_types::Result + { ::abi_decode_raw(data) .map(BalancerV2ComposableStablePoolFactoryV5Calls::create) } @@ -1119,15 +1098,14 @@ function version() external view returns (string memory); }, ]; let Ok(idx) = Self::SELECTORS.binary_search(&selector) else { - return Err( - alloy_sol_types::Error::unknown_selector( - ::NAME, - selector, - ), - ); + return Err(alloy_sol_types::Error::unknown_selector( + ::NAME, + selector, + )); }; DECODE_SHIMS[idx](data) } + #[inline] #[allow(non_snake_case)] fn abi_decode_raw_validate( @@ -1142,12 +1120,9 @@ function version() external view returns (string memory); { fn disable( data: &[u8], - ) -> alloy_sol_types::Result< - BalancerV2ComposableStablePoolFactoryV5Calls, - > { - ::abi_decode_raw_validate( - data, - ) + ) -> alloy_sol_types::Result + { + ::abi_decode_raw_validate(data) .map(BalancerV2ComposableStablePoolFactoryV5Calls::disable) } disable @@ -1155,12 +1130,9 @@ function version() external view returns (string memory); { fn version( data: &[u8], - ) -> alloy_sol_types::Result< - BalancerV2ComposableStablePoolFactoryV5Calls, - > { - ::abi_decode_raw_validate( - data, - ) + ) -> alloy_sol_types::Result + { + ::abi_decode_raw_validate(data) .map(BalancerV2ComposableStablePoolFactoryV5Calls::version) } version @@ -1168,27 +1140,23 @@ function version() external view returns (string memory); { fn create( data: &[u8], - ) -> alloy_sol_types::Result< - BalancerV2ComposableStablePoolFactoryV5Calls, - > { - ::abi_decode_raw_validate( - data, - ) + ) -> alloy_sol_types::Result + { + ::abi_decode_raw_validate(data) .map(BalancerV2ComposableStablePoolFactoryV5Calls::create) } create }, ]; let Ok(idx) = Self::SELECTORS.binary_search(&selector) else { - return Err( - alloy_sol_types::Error::unknown_selector( - ::NAME, - selector, - ), - ); + return Err(alloy_sol_types::Error::unknown_selector( + ::NAME, + selector, + )); }; DECODE_VALIDATE_SHIMS[idx](data) } + #[inline] fn abi_encoded_size(&self) -> usize { match self { @@ -1203,6 +1171,7 @@ function version() external view returns (string memory); } } } + #[inline] fn abi_encode_raw(&self, out: &mut alloy_sol_types::private::Vec) { match self { @@ -1218,9 +1187,9 @@ function version() external view returns (string memory); } } } - ///Container for all the [`BalancerV2ComposableStablePoolFactoryV5`](self) events. - #[derive(Clone)] - #[derive(Debug, PartialEq, Eq, Hash)] + ///Container for all the [`BalancerV2ComposableStablePoolFactoryV5`](self) + /// events. + #[derive(Clone, Debug, PartialEq, Eq, Hash)] pub enum BalancerV2ComposableStablePoolFactoryV5Events { #[allow(missing_docs)] FactoryDisabled(FactoryDisabled), @@ -1230,33 +1199,34 @@ function version() external view returns (string memory); impl BalancerV2ComposableStablePoolFactoryV5Events { /// 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. + /// 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]] = &[ [ - 67u8, 42u8, 203u8, 253u8, 102u8, 45u8, 187u8, 93u8, 139u8, 55u8, 131u8, - 132u8, 166u8, 113u8, 89u8, 180u8, 124u8, 169u8, 208u8, 241u8, 183u8, - 159u8, 151u8, 207u8, 100u8, 207u8, 133u8, 133u8, 250u8, 54u8, 45u8, 80u8, + 67u8, 42u8, 203u8, 253u8, 102u8, 45u8, 187u8, 93u8, 139u8, 55u8, 131u8, 132u8, + 166u8, 113u8, 89u8, 180u8, 124u8, 169u8, 208u8, 241u8, 183u8, 159u8, 151u8, 207u8, + 100u8, 207u8, 133u8, 133u8, 250u8, 54u8, 45u8, 80u8, ], [ - 131u8, 164u8, 143u8, 188u8, 252u8, 153u8, 19u8, 53u8, 49u8, 78u8, 116u8, - 208u8, 73u8, 106u8, 171u8, 106u8, 25u8, 135u8, 233u8, 146u8, 221u8, - 200u8, 93u8, 221u8, 188u8, 196u8, 214u8, 221u8, 110u8, 242u8, 233u8, - 252u8, + 131u8, 164u8, 143u8, 188u8, 252u8, 153u8, 19u8, 53u8, 49u8, 78u8, 116u8, 208u8, + 73u8, 106u8, 171u8, 106u8, 25u8, 135u8, 233u8, 146u8, 221u8, 200u8, 93u8, 221u8, + 188u8, 196u8, 214u8, 221u8, 110u8, 242u8, 233u8, 252u8, ], ]; - /// The names of the variants in the same order as `SELECTORS`. - pub const VARIANT_NAMES: &'static [&'static str] = &[ - ::core::stringify!(FactoryDisabled), - ::core::stringify!(PoolCreated), - ]; /// The signatures in the same order as `SELECTORS`. pub const SIGNATURES: &'static [&'static str] = &[ ::SIGNATURE, ::SIGNATURE, ]; + /// The names of the variants in the same order as `SELECTORS`. + pub const VARIANT_NAMES: &'static [&'static str] = &[ + ::core::stringify!(FactoryDisabled), + ::core::stringify!(PoolCreated), + ]; + /// Returns the signature for the given selector, if known. #[inline] pub fn signature_by_selector( @@ -1269,56 +1239,46 @@ function version() external view returns (string memory); ::core::result::Result::Err(_) => ::core::option::Option::None, } } + /// Returns the enum variant name for the given selector, if known. #[inline] - pub fn name_by_selector( - selector: [u8; 32usize], - ) -> ::core::option::Option<&'static str> { + pub fn name_by_selector(selector: [u8; 32usize]) -> ::core::option::Option<&'static str> { let sig = Self::signature_by_selector(selector)?; sig.split_once('(').map(|(name, _)| name) } } #[automatically_derived] - impl alloy_sol_types::SolEventInterface - for BalancerV2ComposableStablePoolFactoryV5Events { - const NAME: &'static str = "BalancerV2ComposableStablePoolFactoryV5Events"; + impl alloy_sol_types::SolEventInterface for BalancerV2ComposableStablePoolFactoryV5Events { const COUNT: usize = 2usize; + const NAME: &'static str = "BalancerV2ComposableStablePoolFactoryV5Events"; + 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, - ) + ::decode_raw_log(topics, data) .map(Self::FactoryDisabled) } Some(::SIGNATURE_HASH) => { - ::decode_raw_log( - topics, - data, - ) + ::decode_raw_log(topics, data) .map(Self::PoolCreated) } - _ => { - 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(), - ), + _ => 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 BalancerV2ComposableStablePoolFactoryV5Events { + impl alloy_sol_types::private::IntoLogData for BalancerV2ComposableStablePoolFactoryV5Events { fn to_log_data(&self) -> alloy_sol_types::private::LogData { match self { Self::FactoryDisabled(inner) => { @@ -1329,6 +1289,7 @@ function version() external view returns (string memory); } } } + fn into_log_data(self) -> alloy_sol_types::private::LogData { match self { Self::FactoryDisabled(inner) => { @@ -1340,10 +1301,10 @@ function version() external view returns (string memory); } } } - use alloy_contract as alloy_contract; + use alloy_contract; /**Creates a new wrapper around an on-chain [`BalancerV2ComposableStablePoolFactoryV5`](self) contract instance. -See the [wrapper's documentation](`BalancerV2ComposableStablePoolFactoryV5Instance`) for more details.*/ + See the [wrapper's documentation](`BalancerV2ComposableStablePoolFactoryV5Instance`) for more details.*/ #[inline] pub const fn new< P: alloy_contract::private::Provider, @@ -1356,15 +1317,15 @@ See the [wrapper's documentation](`BalancerV2ComposableStablePoolFactoryV5Instan } /**A [`BalancerV2ComposableStablePoolFactoryV5`](self) instance. -Contains type-safe methods for interacting with an on-chain instance of the -[`BalancerV2ComposableStablePoolFactoryV5`](self) contract located at a given `address`, using a given -provider `P`. + Contains type-safe methods for interacting with an on-chain instance of the + [`BalancerV2ComposableStablePoolFactoryV5`](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. + 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.*/ + See the [module-level documentation](self) for all the available methods.*/ #[derive(Clone)] pub struct BalancerV2ComposableStablePoolFactoryV5Instance< P, @@ -1375,8 +1336,7 @@ See the [module-level documentation](self) for all the available methods.*/ _network: ::core::marker::PhantomData, } #[automatically_derived] - impl ::core::fmt::Debug - for BalancerV2ComposableStablePoolFactoryV5Instance { + impl ::core::fmt::Debug for BalancerV2ComposableStablePoolFactoryV5Instance { #[inline] fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { f.debug_tuple("BalancerV2ComposableStablePoolFactoryV5Instance") @@ -1385,54 +1345,50 @@ See the [module-level documentation](self) for all the available methods.*/ } } /// Instantiation and getters/setters. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > BalancerV2ComposableStablePoolFactoryV5Instance { + impl, N: alloy_contract::private::Network> + BalancerV2ComposableStablePoolFactoryV5Instance + { /**Creates a new wrapper around an on-chain [`BalancerV2ComposableStablePoolFactoryV5`](self) contract instance. -See the [wrapper's documentation](`BalancerV2ComposableStablePoolFactoryV5Instance`) for more details.*/ + See the [wrapper's documentation](`BalancerV2ComposableStablePoolFactoryV5Instance`) for more details.*/ #[inline] - pub const fn new( - address: alloy_sol_types::private::Address, - __provider: P, - ) -> Self { + pub const fn new(address: alloy_sol_types::private::Address, __provider: P) -> Self { Self { address, provider: __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< - P: ::core::clone::Clone, - N, - > BalancerV2ComposableStablePoolFactoryV5Instance<&P, N> { - /// Clones the provider and returns a new instance with the cloned provider. + impl BalancerV2ComposableStablePoolFactoryV5Instance<&P, N> { + /// Clones the provider and returns a new instance with the cloned + /// provider. #[inline] - pub fn with_cloned_provider( - self, - ) -> BalancerV2ComposableStablePoolFactoryV5Instance { + pub fn with_cloned_provider(self) -> BalancerV2ComposableStablePoolFactoryV5Instance { BalancerV2ComposableStablePoolFactoryV5Instance { address: self.address, provider: ::core::clone::Clone::clone(&self.provider), @@ -1441,20 +1397,22 @@ See the [wrapper's documentation](`BalancerV2ComposableStablePoolFactoryV5Instan } } /// Function calls. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > BalancerV2ComposableStablePoolFactoryV5Instance { - /// Creates a new call builder using this contract instance's provider and address. + impl, N: alloy_contract::private::Network> + BalancerV2ComposableStablePoolFactoryV5Instance + { + /// 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. + /// 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 [`create`] function. pub fn create( &self, @@ -1462,9 +1420,7 @@ See the [wrapper's documentation](`BalancerV2ComposableStablePoolFactoryV5Instan symbol: alloy_sol_types::private::String, tokens: alloy_sol_types::private::Vec, amplificationParameter: alloy_sol_types::private::primitives::aliases::U256, - rateProviders: alloy_sol_types::private::Vec< - alloy_sol_types::private::Address, - >, + rateProviders: alloy_sol_types::private::Vec, tokenRateCacheDurations: alloy_sol_types::private::Vec< alloy_sol_types::private::primitives::aliases::U256, >, @@ -1472,138 +1428,104 @@ See the [wrapper's documentation](`BalancerV2ComposableStablePoolFactoryV5Instan swapFeePercentage: alloy_sol_types::private::primitives::aliases::U256, owner: alloy_sol_types::private::Address, ) -> alloy_contract::SolCallBuilder<&P, createCall, N> { - self.call_builder( - &createCall { - name, - symbol, - tokens, - amplificationParameter, - rateProviders, - tokenRateCacheDurations, - exemptFromYieldProtocolFeeFlags, - swapFeePercentage, - owner, - }, - ) + self.call_builder(&createCall { + name, + symbol, + tokens, + amplificationParameter, + rateProviders, + tokenRateCacheDurations, + exemptFromYieldProtocolFeeFlags, + swapFeePercentage, + owner, + }) } + ///Creates a new call builder for the [`disable`] function. pub fn disable(&self) -> alloy_contract::SolCallBuilder<&P, disableCall, N> { self.call_builder(&disableCall) } + ///Creates a new call builder for the [`version`] function. pub fn version(&self) -> alloy_contract::SolCallBuilder<&P, versionCall, N> { self.call_builder(&versionCall) } } /// Event filters. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > BalancerV2ComposableStablePoolFactoryV5Instance { - /// Creates a new event filter using this contract instance's provider and address. + impl, N: alloy_contract::private::Network> + BalancerV2ComposableStablePoolFactoryV5Instance + { + /// 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. + /// 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 [`FactoryDisabled`] event. - pub fn FactoryDisabled_filter( - &self, - ) -> alloy_contract::Event<&P, FactoryDisabled, N> { + pub fn FactoryDisabled_filter(&self) -> alloy_contract::Event<&P, FactoryDisabled, N> { self.event_filter::() } + ///Creates a new event filter for the [`PoolCreated`] event. pub fn PoolCreated_filter(&self) -> alloy_contract::Event<&P, PoolCreated, N> { self.event_filter::() } } } -pub type Instance = BalancerV2ComposableStablePoolFactoryV5::BalancerV2ComposableStablePoolFactoryV5Instance< - ::alloy_provider::DynProvider, ->; +pub type Instance = + BalancerV2ComposableStablePoolFactoryV5::BalancerV2ComposableStablePoolFactoryV5Instance< + ::alloy_provider::DynProvider, + >; use { - std::{sync::LazyLock, collections::HashMap}, - anyhow::{Result, Context}, - alloy_primitives::{address, Address}, - alloy_provider::{Provider, DynProvider}, + alloy_primitives::{Address, address}, + alloy_provider::{DynProvider, Provider}, + anyhow::{Context, Result}, + std::{collections::HashMap, sync::LazyLock}, }; pub const fn deployment_info(chain_id: u64) -> Option<(Address, Option)> { match chain_id { - 1u64 => { - Some(( - ::alloy_primitives::address!( - "0xDB8d758BCb971e482B2C45f7F8a7740283A1bd3A" - ), - Some(17672478u64), - )) - } - 10u64 => { - Some(( - ::alloy_primitives::address!( - "0x043A2daD730d585C44FB79D2614F295D2d625412" - ), - Some(106752707u64), - )) - } - 56u64 => { - Some(( - ::alloy_primitives::address!( - "0x4fb47126Fa83A8734991E41B942Ac29A3266C968" - ), - Some(29877945u64), - )) - } - 100u64 => { - Some(( - ::alloy_primitives::address!( - "0x4bdCc2fb18AEb9e2d281b0278D946445070EAda7" - ), - Some(28900564u64), - )) - } - 137u64 => { - Some(( - ::alloy_primitives::address!( - "0xe2fa4e1d17725e72dcdAfe943Ecf45dF4B9E285b" - ), - Some(44961548u64), - )) - } - 8453u64 => { - Some(( - ::alloy_primitives::address!( - "0x8df317a729fcaA260306d7de28888932cb579b88" - ), - Some(1204710u64), - )) - } - 42161u64 => { - Some(( - ::alloy_primitives::address!( - "0xA8920455934Da4D853faac1f94Fe7bEf72943eF1" - ), - Some(110212282u64), - )) - } - 43114u64 => { - Some(( - ::alloy_primitives::address!( - "0xE42FFA682A26EF8F25891db4882932711D42e467" - ), - Some(32478827u64), - )) - } - 11155111u64 => { - Some(( - ::alloy_primitives::address!( - "0xa523f47A933D5020b23629dDf689695AA94612Dc" - ), - Some(3872211u64), - )) - } + 1u64 => Some(( + ::alloy_primitives::address!("0xDB8d758BCb971e482B2C45f7F8a7740283A1bd3A"), + Some(17672478u64), + )), + 10u64 => Some(( + ::alloy_primitives::address!("0x043A2daD730d585C44FB79D2614F295D2d625412"), + Some(106752707u64), + )), + 56u64 => Some(( + ::alloy_primitives::address!("0x4fb47126Fa83A8734991E41B942Ac29A3266C968"), + Some(29877945u64), + )), + 100u64 => Some(( + ::alloy_primitives::address!("0x4bdCc2fb18AEb9e2d281b0278D946445070EAda7"), + Some(28900564u64), + )), + 137u64 => Some(( + ::alloy_primitives::address!("0xe2fa4e1d17725e72dcdAfe943Ecf45dF4B9E285b"), + Some(44961548u64), + )), + 8453u64 => Some(( + ::alloy_primitives::address!("0x8df317a729fcaA260306d7de28888932cb579b88"), + Some(1204710u64), + )), + 42161u64 => Some(( + ::alloy_primitives::address!("0xA8920455934Da4D853faac1f94Fe7bEf72943eF1"), + Some(110212282u64), + )), + 43114u64 => Some(( + ::alloy_primitives::address!("0xE42FFA682A26EF8F25891db4882932711D42e467"), + Some(32478827u64), + )), + 11155111u64 => Some(( + ::alloy_primitives::address!("0xa523f47A933D5020b23629dDf689695AA94612Dc"), + Some(3872211u64), + )), _ => None, } } @@ -1620,9 +1542,7 @@ pub const fn deployment_block(chain_id: &u64) -> Option { } } impl Instance { - pub fn deployed( - provider: &DynProvider, - ) -> impl Future> + Send { + pub fn deployed(provider: &DynProvider) -> impl Future> + Send { async move { let chain_id = provider .get_chain_id() diff --git a/contracts/generated/contracts-generated/balancerv2composablestablepoolfactoryv6/src/lib.rs b/contracts/generated/contracts-generated/balancerv2composablestablepoolfactoryv6/src/lib.rs index fba8767e45..6e0211989e 100644 --- a/contracts/generated/contracts-generated/balancerv2composablestablepoolfactoryv6/src/lib.rs +++ b/contracts/generated/contracts-generated/balancerv2composablestablepoolfactoryv6/src/lib.rs @@ -1,4 +1,10 @@ -#![allow(unused_imports, unused_attributes, clippy::all, rustdoc::all, non_snake_case)] +#![allow( + unused_imports, + unused_attributes, + clippy::all, + rustdoc::all, + non_snake_case +)] //! Auto-generated contract bindings. Do not edit. /** @@ -153,13 +159,12 @@ interface BalancerV2ComposableStablePoolFactoryV6 { clippy::empty_structs_with_brackets )] pub mod BalancerV2ComposableStablePoolFactoryV6 { - use super::*; - use alloy_sol_types as alloy_sol_types; + use {super::*, alloy_sol_types}; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Event with signature `FactoryDisabled()` and selector `0x432acbfd662dbb5d8b378384a67159b47ca9d0f1b79f97cf64cf8585fa362d50`. -```solidity -event FactoryDisabled(); -```*/ + ```solidity + event FactoryDisabled(); + ```*/ #[allow( non_camel_case_types, non_snake_case, @@ -175,21 +180,22 @@ event FactoryDisabled(); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[automatically_derived] impl alloy_sol_types::SolEvent for FactoryDisabled { + type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type DataTuple<'a> = (); - type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type TopicList = (alloy_sol_types::sol_data::FixedBytes<32>,); - const SIGNATURE: &'static str = "FactoryDisabled()"; - const SIGNATURE_HASH: alloy_sol_types::private::B256 = alloy_sol_types::private::B256::new([ - 67u8, 42u8, 203u8, 253u8, 102u8, 45u8, 187u8, 93u8, 139u8, 55u8, 131u8, - 132u8, 166u8, 113u8, 89u8, 180u8, 124u8, 169u8, 208u8, 241u8, 183u8, - 159u8, 151u8, 207u8, 100u8, 207u8, 133u8, 133u8, 250u8, 54u8, 45u8, 80u8, - ]); + const ANONYMOUS: bool = false; + const SIGNATURE: &'static str = "FactoryDisabled()"; + const SIGNATURE_HASH: alloy_sol_types::private::B256 = + alloy_sol_types::private::B256::new([ + 67u8, 42u8, 203u8, 253u8, 102u8, 45u8, 187u8, 93u8, 139u8, 55u8, 131u8, 132u8, + 166u8, 113u8, 89u8, 180u8, 124u8, 169u8, 208u8, 241u8, 183u8, 159u8, 151u8, + 207u8, 100u8, 207u8, 133u8, 133u8, 250u8, 54u8, 45u8, 80u8, + ]); + #[allow(unused_variables)] #[inline] fn new( @@ -198,29 +204,31 @@ event FactoryDisabled(); ) -> Self { Self {} } + #[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, - ), - ); + 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(),) } + #[inline] fn encode_topics_raw( &self, @@ -229,9 +237,7 @@ event FactoryDisabled(); if out.len() < ::COUNT { return Err(alloy_sol_types::Error::Overrun); } - out[0usize] = alloy_sol_types::abi::token::WordToken( - Self::SIGNATURE_HASH, - ); + out[0usize] = alloy_sol_types::abi::token::WordToken(Self::SIGNATURE_HASH); Ok(()) } } @@ -240,6 +246,7 @@ event FactoryDisabled(); 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) } @@ -254,9 +261,9 @@ event FactoryDisabled(); }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Event with signature `PoolCreated(address)` and selector `0x83a48fbcfc991335314e74d0496aab6a1987e992ddc85dddbcc4d6dd6ef2e9fc`. -```solidity -event PoolCreated(address indexed pool); -```*/ + ```solidity + event PoolCreated(address indexed pool); + ```*/ #[allow( non_camel_case_types, non_snake_case, @@ -275,25 +282,25 @@ event PoolCreated(address indexed pool); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[automatically_derived] impl alloy_sol_types::SolEvent for PoolCreated { + type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; 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::Address, ); - const SIGNATURE: &'static str = "PoolCreated(address)"; - const SIGNATURE_HASH: alloy_sol_types::private::B256 = alloy_sol_types::private::B256::new([ - 131u8, 164u8, 143u8, 188u8, 252u8, 153u8, 19u8, 53u8, 49u8, 78u8, 116u8, - 208u8, 73u8, 106u8, 171u8, 106u8, 25u8, 135u8, 233u8, 146u8, 221u8, - 200u8, 93u8, 221u8, 188u8, 196u8, 214u8, 221u8, 110u8, 242u8, 233u8, - 252u8, - ]); + const ANONYMOUS: bool = false; + const SIGNATURE: &'static str = "PoolCreated(address)"; + const SIGNATURE_HASH: alloy_sol_types::private::B256 = + alloy_sol_types::private::B256::new([ + 131u8, 164u8, 143u8, 188u8, 252u8, 153u8, 19u8, 53u8, 49u8, 78u8, 116u8, 208u8, + 73u8, 106u8, 171u8, 106u8, 25u8, 135u8, 233u8, 146u8, 221u8, 200u8, 93u8, + 221u8, 188u8, 196u8, 214u8, 221u8, 110u8, 242u8, 233u8, 252u8, + ]); + #[allow(unused_variables)] #[inline] fn new( @@ -302,29 +309,31 @@ event PoolCreated(address indexed pool); ) -> Self { Self { pool: topics.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, - ), - ); + 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.pool.clone()) } + #[inline] fn encode_topics_raw( &self, @@ -333,9 +342,7 @@ event PoolCreated(address indexed pool); if out.len() < ::COUNT { return Err(alloy_sol_types::Error::Overrun); } - out[0usize] = alloy_sol_types::abi::token::WordToken( - Self::SIGNATURE_HASH, - ); + out[0usize] = alloy_sol_types::abi::token::WordToken(Self::SIGNATURE_HASH); out[1usize] = ::encode_topic( &self.pool, ); @@ -347,6 +354,7 @@ event PoolCreated(address indexed pool); 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) } @@ -360,9 +368,9 @@ event PoolCreated(address indexed pool); } }; /**Constructor`. -```solidity -constructor(address vault, address protocolFeeProvider, string factoryVersion, string poolVersion); -```*/ + ```solidity + constructor(address vault, address protocolFeeProvider, string factoryVersion, string poolVersion); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct constructorCall { @@ -376,7 +384,7 @@ constructor(address vault, address protocolFeeProvider, string factoryVersion, s pub poolVersion: alloy_sol_types::private::String, } const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -395,9 +403,7 @@ constructor(address vault, address protocolFeeProvider, string factoryVersion, s ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -437,15 +443,15 @@ constructor(address vault, address protocolFeeProvider, string factoryVersion, s alloy_sol_types::sol_data::String, alloy_sol_types::sol_data::String, ); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + 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<'_> { ( @@ -467,9 +473,9 @@ constructor(address vault, address protocolFeeProvider, string factoryVersion, s }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `create(string,string,address[],uint256,address[],uint256[],bool[],uint256,address)` and selector `0x66b59f6c`. -```solidity -function create(string memory name, string memory symbol, address[] memory tokens, uint256 amplificationParameter, address[] memory rateProviders, uint256[] memory tokenRateCacheDurations, bool[] memory exemptFromYieldProtocolFeeFlags, uint256 swapFeePercentage, address owner) external returns (address); -```*/ + ```solidity + function create(string memory name, string memory symbol, address[] memory tokens, uint256 amplificationParameter, address[] memory rateProviders, uint256[] memory tokenRateCacheDurations, bool[] memory exemptFromYieldProtocolFeeFlags, uint256 swapFeePercentage, address owner) external returns (address); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct createCall { @@ -482,13 +488,10 @@ function create(string memory name, string memory symbol, address[] memory token #[allow(missing_docs)] pub amplificationParameter: alloy_sol_types::private::primitives::aliases::U256, #[allow(missing_docs)] - pub rateProviders: alloy_sol_types::private::Vec< - alloy_sol_types::private::Address, - >, + pub rateProviders: alloy_sol_types::private::Vec, #[allow(missing_docs)] - pub tokenRateCacheDurations: alloy_sol_types::private::Vec< - alloy_sol_types::private::primitives::aliases::U256, - >, + pub tokenRateCacheDurations: + alloy_sol_types::private::Vec, #[allow(missing_docs)] pub exemptFromYieldProtocolFeeFlags: alloy_sol_types::private::Vec, #[allow(missing_docs)] @@ -497,7 +500,9 @@ function create(string memory name, string memory symbol, address[] memory token pub owner: alloy_sol_types::private::Address, } #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`create(string,string,address[],uint256,address[],uint256[],bool[],uint256,address)`](createCall) function. + ///Container type for the return parameters of the + /// [`create(string,string,address[],uint256,address[],uint256[],bool[], + /// uint256,address)`](createCall) function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct createReturn { @@ -511,7 +516,7 @@ function create(string memory name, string memory symbol, address[] memory token clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -533,18 +538,14 @@ function create(string memory name, string memory symbol, address[] memory token alloy_sol_types::private::Vec, alloy_sol_types::private::primitives::aliases::U256, alloy_sol_types::private::Vec, - alloy_sol_types::private::Vec< - alloy_sol_types::private::primitives::aliases::U256, - >, + alloy_sol_types::private::Vec, alloy_sol_types::private::Vec, 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, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -594,9 +595,7 @@ function create(string memory name, string memory symbol, address[] memory token type UnderlyingRustTuple<'a> = (alloy_sol_types::private::Address,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -631,22 +630,22 @@ function create(string memory name, string memory symbol, address[] memory token 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::Address; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (alloy_sol_types::sol_data::Address,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "create(string,string,address[],uint256,address[],uint256[],bool[],uint256,address)"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [102u8, 181u8, 159u8, 108u8]; + const SIGNATURE: &'static str = "create(string,string,address[],uint256,address[],\ + uint256[],bool[],uint256,address)"; + #[inline] fn new<'a>( tuple: as alloy_sol_types::SolType>::RustType, ) -> Self { tuple.into() } + #[inline] fn tokenize(&self) -> Self::Token<'_> { ( @@ -685,47 +684,44 @@ function create(string memory name, string memory symbol, address[] memory token ), ) } + #[inline] fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { - ( - ::tokenize( - ret, - ), - ) + (::tokenize(ret),) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) - .map(|r| { + as alloy_sol_types::SolType>::abi_decode_sequence(data).map( + |r| { let r: createReturn = 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: createReturn = r.into(); - r._0 - }) + 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: createReturn = r.into(); + r._0 + }) } } }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `disable()` and selector `0x2f2770db`. -```solidity -function disable() external; -```*/ + ```solidity + function disable() external; + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct disableCall; - ///Container type for the return parameters of the [`disable()`](disableCall) function. + ///Container type for the return parameters of the + /// [`disable()`](disableCall) function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct disableReturn {} @@ -736,7 +732,7 @@ function disable() external; clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -745,9 +741,7 @@ function disable() external; type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -777,9 +771,7 @@ function disable() external; type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -802,67 +794,64 @@ function disable() external; } } impl disableReturn { - fn _tokenize( - &self, - ) -> ::ReturnToken<'_> { + fn _tokenize(&self) -> ::ReturnToken<'_> { () } } #[automatically_derived] impl alloy_sol_types::SolCall for disableCall { type Parameters<'a> = (); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = disableReturn; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "disable()"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [47u8, 39u8, 112u8, 219u8]; + const SIGNATURE: &'static str = "disable()"; + #[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<'_> { disableReturn::_tokenize(ret) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) + 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) + 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(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `version()` and selector `0x54fd4d50`. -```solidity -function version() external view returns (string memory); -```*/ + ```solidity + function version() external view returns (string memory); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct versionCall; #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`version()`](versionCall) function. + ///Container type for the return parameters of the + /// [`version()`](versionCall) function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct versionReturn { @@ -876,7 +865,7 @@ function version() external view returns (string memory); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -885,9 +874,7 @@ function version() external view returns (string memory); type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -917,9 +904,7 @@ function version() external view returns (string memory); type UnderlyingRustTuple<'a> = (alloy_sol_types::private::String,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -944,61 +929,56 @@ function version() external view returns (string memory); #[automatically_derived] impl alloy_sol_types::SolCall for versionCall { type Parameters<'a> = (); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = alloy_sol_types::private::String; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (alloy_sol_types::sol_data::String,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "version()"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [84u8, 253u8, 77u8, 80u8]; + const SIGNATURE: &'static str = "version()"; + #[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, - ), - ) + (::tokenize(ret),) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) - .map(|r| { + as alloy_sol_types::SolType>::abi_decode_sequence(data).map( + |r| { let r: versionReturn = 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: versionReturn = r.into(); - r._0 - }) + 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: versionReturn = r.into(); + r._0 + }) } } }; - ///Container for all the [`BalancerV2ComposableStablePoolFactoryV6`](self) function calls. + ///Container for all the [`BalancerV2ComposableStablePoolFactoryV6`](self) + /// function calls. #[derive(Clone)] - #[derive()] pub enum BalancerV2ComposableStablePoolFactoryV6Calls { #[allow(missing_docs)] create(createCall), @@ -1010,8 +990,9 @@ function version() external view returns (string memory); impl BalancerV2ComposableStablePoolFactoryV6Calls { /// 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. + /// 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]] = &[ @@ -1019,18 +1000,19 @@ function version() external view returns (string memory); [84u8, 253u8, 77u8, 80u8], [102u8, 181u8, 159u8, 108u8], ]; - /// The names of the variants in the same order as `SELECTORS`. - pub const VARIANT_NAMES: &'static [&'static str] = &[ - ::core::stringify!(disable), - ::core::stringify!(version), - ::core::stringify!(create), - ]; /// The signatures in the same order as `SELECTORS`. pub const SIGNATURES: &'static [&'static str] = &[ ::SIGNATURE, ::SIGNATURE, ::SIGNATURE, ]; + /// The names of the variants in the same order as `SELECTORS`. + pub const VARIANT_NAMES: &'static [&'static str] = &[ + ::core::stringify!(disable), + ::core::stringify!(version), + ::core::stringify!(create), + ]; + /// Returns the signature for the given selector, if known. #[inline] pub fn signature_by_selector( @@ -1043,20 +1025,20 @@ function version() external view returns (string memory); ::core::result::Result::Err(_) => ::core::option::Option::None, } } + /// Returns the enum variant name for the given selector, if known. #[inline] - pub fn name_by_selector( - selector: [u8; 4usize], - ) -> ::core::option::Option<&'static str> { + pub fn name_by_selector(selector: [u8; 4usize]) -> ::core::option::Option<&'static str> { let sig = Self::signature_by_selector(selector)?; sig.split_once('(').map(|(name, _)| name) } } #[automatically_derived] impl alloy_sol_types::SolInterface for BalancerV2ComposableStablePoolFactoryV6Calls { - const NAME: &'static str = "BalancerV2ComposableStablePoolFactoryV6Calls"; - const MIN_DATA_LENGTH: usize = 0usize; const COUNT: usize = 3usize; + const MIN_DATA_LENGTH: usize = 0usize; + const NAME: &'static str = "BalancerV2ComposableStablePoolFactoryV6Calls"; + #[inline] fn selector(&self) -> [u8; 4] { match self { @@ -1065,20 +1047,20 @@ function version() external view returns (string memory); Self::version(_) => ::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 { + fn abi_decode_raw(selector: [u8; 4], data: &[u8]) -> alloy_sol_types::Result { static DECODE_SHIMS: &[fn( &[u8], ) -> alloy_sol_types::Result< @@ -1087,9 +1069,8 @@ function version() external view returns (string memory); { fn disable( data: &[u8], - ) -> alloy_sol_types::Result< - BalancerV2ComposableStablePoolFactoryV6Calls, - > { + ) -> alloy_sol_types::Result + { ::abi_decode_raw(data) .map(BalancerV2ComposableStablePoolFactoryV6Calls::disable) } @@ -1098,9 +1079,8 @@ function version() external view returns (string memory); { fn version( data: &[u8], - ) -> alloy_sol_types::Result< - BalancerV2ComposableStablePoolFactoryV6Calls, - > { + ) -> alloy_sol_types::Result + { ::abi_decode_raw(data) .map(BalancerV2ComposableStablePoolFactoryV6Calls::version) } @@ -1109,9 +1089,8 @@ function version() external view returns (string memory); { fn create( data: &[u8], - ) -> alloy_sol_types::Result< - BalancerV2ComposableStablePoolFactoryV6Calls, - > { + ) -> alloy_sol_types::Result + { ::abi_decode_raw(data) .map(BalancerV2ComposableStablePoolFactoryV6Calls::create) } @@ -1119,15 +1098,14 @@ function version() external view returns (string memory); }, ]; let Ok(idx) = Self::SELECTORS.binary_search(&selector) else { - return Err( - alloy_sol_types::Error::unknown_selector( - ::NAME, - selector, - ), - ); + return Err(alloy_sol_types::Error::unknown_selector( + ::NAME, + selector, + )); }; DECODE_SHIMS[idx](data) } + #[inline] #[allow(non_snake_case)] fn abi_decode_raw_validate( @@ -1142,12 +1120,9 @@ function version() external view returns (string memory); { fn disable( data: &[u8], - ) -> alloy_sol_types::Result< - BalancerV2ComposableStablePoolFactoryV6Calls, - > { - ::abi_decode_raw_validate( - data, - ) + ) -> alloy_sol_types::Result + { + ::abi_decode_raw_validate(data) .map(BalancerV2ComposableStablePoolFactoryV6Calls::disable) } disable @@ -1155,12 +1130,9 @@ function version() external view returns (string memory); { fn version( data: &[u8], - ) -> alloy_sol_types::Result< - BalancerV2ComposableStablePoolFactoryV6Calls, - > { - ::abi_decode_raw_validate( - data, - ) + ) -> alloy_sol_types::Result + { + ::abi_decode_raw_validate(data) .map(BalancerV2ComposableStablePoolFactoryV6Calls::version) } version @@ -1168,27 +1140,23 @@ function version() external view returns (string memory); { fn create( data: &[u8], - ) -> alloy_sol_types::Result< - BalancerV2ComposableStablePoolFactoryV6Calls, - > { - ::abi_decode_raw_validate( - data, - ) + ) -> alloy_sol_types::Result + { + ::abi_decode_raw_validate(data) .map(BalancerV2ComposableStablePoolFactoryV6Calls::create) } create }, ]; let Ok(idx) = Self::SELECTORS.binary_search(&selector) else { - return Err( - alloy_sol_types::Error::unknown_selector( - ::NAME, - selector, - ), - ); + return Err(alloy_sol_types::Error::unknown_selector( + ::NAME, + selector, + )); }; DECODE_VALIDATE_SHIMS[idx](data) } + #[inline] fn abi_encoded_size(&self) -> usize { match self { @@ -1203,6 +1171,7 @@ function version() external view returns (string memory); } } } + #[inline] fn abi_encode_raw(&self, out: &mut alloy_sol_types::private::Vec) { match self { @@ -1218,9 +1187,9 @@ function version() external view returns (string memory); } } } - ///Container for all the [`BalancerV2ComposableStablePoolFactoryV6`](self) events. - #[derive(Clone)] - #[derive(Debug, PartialEq, Eq, Hash)] + ///Container for all the [`BalancerV2ComposableStablePoolFactoryV6`](self) + /// events. + #[derive(Clone, Debug, PartialEq, Eq, Hash)] pub enum BalancerV2ComposableStablePoolFactoryV6Events { #[allow(missing_docs)] FactoryDisabled(FactoryDisabled), @@ -1230,33 +1199,34 @@ function version() external view returns (string memory); impl BalancerV2ComposableStablePoolFactoryV6Events { /// 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. + /// 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]] = &[ [ - 67u8, 42u8, 203u8, 253u8, 102u8, 45u8, 187u8, 93u8, 139u8, 55u8, 131u8, - 132u8, 166u8, 113u8, 89u8, 180u8, 124u8, 169u8, 208u8, 241u8, 183u8, - 159u8, 151u8, 207u8, 100u8, 207u8, 133u8, 133u8, 250u8, 54u8, 45u8, 80u8, + 67u8, 42u8, 203u8, 253u8, 102u8, 45u8, 187u8, 93u8, 139u8, 55u8, 131u8, 132u8, + 166u8, 113u8, 89u8, 180u8, 124u8, 169u8, 208u8, 241u8, 183u8, 159u8, 151u8, 207u8, + 100u8, 207u8, 133u8, 133u8, 250u8, 54u8, 45u8, 80u8, ], [ - 131u8, 164u8, 143u8, 188u8, 252u8, 153u8, 19u8, 53u8, 49u8, 78u8, 116u8, - 208u8, 73u8, 106u8, 171u8, 106u8, 25u8, 135u8, 233u8, 146u8, 221u8, - 200u8, 93u8, 221u8, 188u8, 196u8, 214u8, 221u8, 110u8, 242u8, 233u8, - 252u8, + 131u8, 164u8, 143u8, 188u8, 252u8, 153u8, 19u8, 53u8, 49u8, 78u8, 116u8, 208u8, + 73u8, 106u8, 171u8, 106u8, 25u8, 135u8, 233u8, 146u8, 221u8, 200u8, 93u8, 221u8, + 188u8, 196u8, 214u8, 221u8, 110u8, 242u8, 233u8, 252u8, ], ]; - /// The names of the variants in the same order as `SELECTORS`. - pub const VARIANT_NAMES: &'static [&'static str] = &[ - ::core::stringify!(FactoryDisabled), - ::core::stringify!(PoolCreated), - ]; /// The signatures in the same order as `SELECTORS`. pub const SIGNATURES: &'static [&'static str] = &[ ::SIGNATURE, ::SIGNATURE, ]; + /// The names of the variants in the same order as `SELECTORS`. + pub const VARIANT_NAMES: &'static [&'static str] = &[ + ::core::stringify!(FactoryDisabled), + ::core::stringify!(PoolCreated), + ]; + /// Returns the signature for the given selector, if known. #[inline] pub fn signature_by_selector( @@ -1269,56 +1239,46 @@ function version() external view returns (string memory); ::core::result::Result::Err(_) => ::core::option::Option::None, } } + /// Returns the enum variant name for the given selector, if known. #[inline] - pub fn name_by_selector( - selector: [u8; 32usize], - ) -> ::core::option::Option<&'static str> { + pub fn name_by_selector(selector: [u8; 32usize]) -> ::core::option::Option<&'static str> { let sig = Self::signature_by_selector(selector)?; sig.split_once('(').map(|(name, _)| name) } } #[automatically_derived] - impl alloy_sol_types::SolEventInterface - for BalancerV2ComposableStablePoolFactoryV6Events { - const NAME: &'static str = "BalancerV2ComposableStablePoolFactoryV6Events"; + impl alloy_sol_types::SolEventInterface for BalancerV2ComposableStablePoolFactoryV6Events { const COUNT: usize = 2usize; + const NAME: &'static str = "BalancerV2ComposableStablePoolFactoryV6Events"; + 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, - ) + ::decode_raw_log(topics, data) .map(Self::FactoryDisabled) } Some(::SIGNATURE_HASH) => { - ::decode_raw_log( - topics, - data, - ) + ::decode_raw_log(topics, data) .map(Self::PoolCreated) } - _ => { - 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(), - ), + _ => 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 BalancerV2ComposableStablePoolFactoryV6Events { + impl alloy_sol_types::private::IntoLogData for BalancerV2ComposableStablePoolFactoryV6Events { fn to_log_data(&self) -> alloy_sol_types::private::LogData { match self { Self::FactoryDisabled(inner) => { @@ -1329,6 +1289,7 @@ function version() external view returns (string memory); } } } + fn into_log_data(self) -> alloy_sol_types::private::LogData { match self { Self::FactoryDisabled(inner) => { @@ -1340,10 +1301,10 @@ function version() external view returns (string memory); } } } - use alloy_contract as alloy_contract; + use alloy_contract; /**Creates a new wrapper around an on-chain [`BalancerV2ComposableStablePoolFactoryV6`](self) contract instance. -See the [wrapper's documentation](`BalancerV2ComposableStablePoolFactoryV6Instance`) for more details.*/ + See the [wrapper's documentation](`BalancerV2ComposableStablePoolFactoryV6Instance`) for more details.*/ #[inline] pub const fn new< P: alloy_contract::private::Provider, @@ -1356,15 +1317,15 @@ See the [wrapper's documentation](`BalancerV2ComposableStablePoolFactoryV6Instan } /**A [`BalancerV2ComposableStablePoolFactoryV6`](self) instance. -Contains type-safe methods for interacting with an on-chain instance of the -[`BalancerV2ComposableStablePoolFactoryV6`](self) contract located at a given `address`, using a given -provider `P`. + Contains type-safe methods for interacting with an on-chain instance of the + [`BalancerV2ComposableStablePoolFactoryV6`](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. + 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.*/ + See the [module-level documentation](self) for all the available methods.*/ #[derive(Clone)] pub struct BalancerV2ComposableStablePoolFactoryV6Instance< P, @@ -1375,8 +1336,7 @@ See the [module-level documentation](self) for all the available methods.*/ _network: ::core::marker::PhantomData, } #[automatically_derived] - impl ::core::fmt::Debug - for BalancerV2ComposableStablePoolFactoryV6Instance { + impl ::core::fmt::Debug for BalancerV2ComposableStablePoolFactoryV6Instance { #[inline] fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { f.debug_tuple("BalancerV2ComposableStablePoolFactoryV6Instance") @@ -1385,54 +1345,50 @@ See the [module-level documentation](self) for all the available methods.*/ } } /// Instantiation and getters/setters. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > BalancerV2ComposableStablePoolFactoryV6Instance { + impl, N: alloy_contract::private::Network> + BalancerV2ComposableStablePoolFactoryV6Instance + { /**Creates a new wrapper around an on-chain [`BalancerV2ComposableStablePoolFactoryV6`](self) contract instance. -See the [wrapper's documentation](`BalancerV2ComposableStablePoolFactoryV6Instance`) for more details.*/ + See the [wrapper's documentation](`BalancerV2ComposableStablePoolFactoryV6Instance`) for more details.*/ #[inline] - pub const fn new( - address: alloy_sol_types::private::Address, - __provider: P, - ) -> Self { + pub const fn new(address: alloy_sol_types::private::Address, __provider: P) -> Self { Self { address, provider: __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< - P: ::core::clone::Clone, - N, - > BalancerV2ComposableStablePoolFactoryV6Instance<&P, N> { - /// Clones the provider and returns a new instance with the cloned provider. + impl BalancerV2ComposableStablePoolFactoryV6Instance<&P, N> { + /// Clones the provider and returns a new instance with the cloned + /// provider. #[inline] - pub fn with_cloned_provider( - self, - ) -> BalancerV2ComposableStablePoolFactoryV6Instance { + pub fn with_cloned_provider(self) -> BalancerV2ComposableStablePoolFactoryV6Instance { BalancerV2ComposableStablePoolFactoryV6Instance { address: self.address, provider: ::core::clone::Clone::clone(&self.provider), @@ -1441,20 +1397,22 @@ See the [wrapper's documentation](`BalancerV2ComposableStablePoolFactoryV6Instan } } /// Function calls. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > BalancerV2ComposableStablePoolFactoryV6Instance { - /// Creates a new call builder using this contract instance's provider and address. + impl, N: alloy_contract::private::Network> + BalancerV2ComposableStablePoolFactoryV6Instance + { + /// 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. + /// 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 [`create`] function. pub fn create( &self, @@ -1462,9 +1420,7 @@ See the [wrapper's documentation](`BalancerV2ComposableStablePoolFactoryV6Instan symbol: alloy_sol_types::private::String, tokens: alloy_sol_types::private::Vec, amplificationParameter: alloy_sol_types::private::primitives::aliases::U256, - rateProviders: alloy_sol_types::private::Vec< - alloy_sol_types::private::Address, - >, + rateProviders: alloy_sol_types::private::Vec, tokenRateCacheDurations: alloy_sol_types::private::Vec< alloy_sol_types::private::primitives::aliases::U256, >, @@ -1472,138 +1428,104 @@ See the [wrapper's documentation](`BalancerV2ComposableStablePoolFactoryV6Instan swapFeePercentage: alloy_sol_types::private::primitives::aliases::U256, owner: alloy_sol_types::private::Address, ) -> alloy_contract::SolCallBuilder<&P, createCall, N> { - self.call_builder( - &createCall { - name, - symbol, - tokens, - amplificationParameter, - rateProviders, - tokenRateCacheDurations, - exemptFromYieldProtocolFeeFlags, - swapFeePercentage, - owner, - }, - ) + self.call_builder(&createCall { + name, + symbol, + tokens, + amplificationParameter, + rateProviders, + tokenRateCacheDurations, + exemptFromYieldProtocolFeeFlags, + swapFeePercentage, + owner, + }) } + ///Creates a new call builder for the [`disable`] function. pub fn disable(&self) -> alloy_contract::SolCallBuilder<&P, disableCall, N> { self.call_builder(&disableCall) } + ///Creates a new call builder for the [`version`] function. pub fn version(&self) -> alloy_contract::SolCallBuilder<&P, versionCall, N> { self.call_builder(&versionCall) } } /// Event filters. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > BalancerV2ComposableStablePoolFactoryV6Instance { - /// Creates a new event filter using this contract instance's provider and address. + impl, N: alloy_contract::private::Network> + BalancerV2ComposableStablePoolFactoryV6Instance + { + /// 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. + /// 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 [`FactoryDisabled`] event. - pub fn FactoryDisabled_filter( - &self, - ) -> alloy_contract::Event<&P, FactoryDisabled, N> { + pub fn FactoryDisabled_filter(&self) -> alloy_contract::Event<&P, FactoryDisabled, N> { self.event_filter::() } + ///Creates a new event filter for the [`PoolCreated`] event. pub fn PoolCreated_filter(&self) -> alloy_contract::Event<&P, PoolCreated, N> { self.event_filter::() } } } -pub type Instance = BalancerV2ComposableStablePoolFactoryV6::BalancerV2ComposableStablePoolFactoryV6Instance< - ::alloy_provider::DynProvider, ->; +pub type Instance = + BalancerV2ComposableStablePoolFactoryV6::BalancerV2ComposableStablePoolFactoryV6Instance< + ::alloy_provider::DynProvider, + >; use { - std::{sync::LazyLock, collections::HashMap}, - anyhow::{Result, Context}, - alloy_primitives::{address, Address}, - alloy_provider::{Provider, DynProvider}, + alloy_primitives::{Address, address}, + alloy_provider::{DynProvider, Provider}, + anyhow::{Context, Result}, + std::{collections::HashMap, sync::LazyLock}, }; pub const fn deployment_info(chain_id: u64) -> Option<(Address, Option)> { match chain_id { - 1u64 => { - Some(( - ::alloy_primitives::address!( - "0x5B42eC6D40f7B7965BE5308c70e2603c0281C1E9" - ), - Some(19314764u64), - )) - } - 10u64 => { - Some(( - ::alloy_primitives::address!( - "0x4bdCc2fb18AEb9e2d281b0278D946445070EAda7" - ), - Some(116694338u64), - )) - } - 56u64 => { - Some(( - ::alloy_primitives::address!( - "0x6B5dA774890Db7B7b96C6f44e6a4b0F657399E2e" - ), - Some(36485719u64), - )) - } - 100u64 => { - Some(( - ::alloy_primitives::address!( - "0x47B489bf5836f83ABD928C316F8e39bC0587B020" - ), - Some(32650879u64), - )) - } - 137u64 => { - Some(( - ::alloy_primitives::address!( - "0xEAedc32a51c510d35ebC11088fD5fF2b47aACF2E" - ), - Some(53996258u64), - )) - } - 8453u64 => { - Some(( - ::alloy_primitives::address!( - "0x956CCab09898C0AF2aCa5e6C228c3aD4E93d9288" - ), - Some(11099703u64), - )) - } - 42161u64 => { - Some(( - ::alloy_primitives::address!( - "0x4bdCc2fb18AEb9e2d281b0278D946445070EAda7" - ), - Some(184805448u64), - )) - } - 43114u64 => { - Some(( - ::alloy_primitives::address!( - "0xb9F8AB3ED3F3aCBa64Bc6cd2DcA74B7F38fD7B88" - ), - Some(42186350u64), - )) - } - 11155111u64 => { - Some(( - ::alloy_primitives::address!( - "0x05503B3aDE04aCA81c8D6F88eCB73Ba156982D2B" - ), - Some(5369821u64), - )) - } + 1u64 => Some(( + ::alloy_primitives::address!("0x5B42eC6D40f7B7965BE5308c70e2603c0281C1E9"), + Some(19314764u64), + )), + 10u64 => Some(( + ::alloy_primitives::address!("0x4bdCc2fb18AEb9e2d281b0278D946445070EAda7"), + Some(116694338u64), + )), + 56u64 => Some(( + ::alloy_primitives::address!("0x6B5dA774890Db7B7b96C6f44e6a4b0F657399E2e"), + Some(36485719u64), + )), + 100u64 => Some(( + ::alloy_primitives::address!("0x47B489bf5836f83ABD928C316F8e39bC0587B020"), + Some(32650879u64), + )), + 137u64 => Some(( + ::alloy_primitives::address!("0xEAedc32a51c510d35ebC11088fD5fF2b47aACF2E"), + Some(53996258u64), + )), + 8453u64 => Some(( + ::alloy_primitives::address!("0x956CCab09898C0AF2aCa5e6C228c3aD4E93d9288"), + Some(11099703u64), + )), + 42161u64 => Some(( + ::alloy_primitives::address!("0x4bdCc2fb18AEb9e2d281b0278D946445070EAda7"), + Some(184805448u64), + )), + 43114u64 => Some(( + ::alloy_primitives::address!("0xb9F8AB3ED3F3aCBa64Bc6cd2DcA74B7F38fD7B88"), + Some(42186350u64), + )), + 11155111u64 => Some(( + ::alloy_primitives::address!("0x05503B3aDE04aCA81c8D6F88eCB73Ba156982D2B"), + Some(5369821u64), + )), _ => None, } } @@ -1620,9 +1542,7 @@ pub const fn deployment_block(chain_id: &u64) -> Option { } } impl Instance { - pub fn deployed( - provider: &DynProvider, - ) -> impl Future> + Send { + pub fn deployed(provider: &DynProvider) -> impl Future> + Send { async move { let chain_id = provider .get_chain_id() diff --git a/contracts/generated/contracts-generated/balancerv2liquiditybootstrappingpool/src/lib.rs b/contracts/generated/contracts-generated/balancerv2liquiditybootstrappingpool/src/lib.rs index 8f1d7d29b2..beb0609a43 100644 --- a/contracts/generated/contracts-generated/balancerv2liquiditybootstrappingpool/src/lib.rs +++ b/contracts/generated/contracts-generated/balancerv2liquiditybootstrappingpool/src/lib.rs @@ -1,4 +1,10 @@ -#![allow(unused_imports, unused_attributes, clippy::all, rustdoc::all, non_snake_case)] +#![allow( + unused_imports, + unused_attributes, + clippy::all, + rustdoc::all, + non_snake_case +)] //! Auto-generated contract bindings. Do not edit. /** @@ -545,13 +551,12 @@ interface BalancerV2LiquidityBootstrappingPool { clippy::empty_structs_with_brackets )] pub mod BalancerV2LiquidityBootstrappingPool { - use super::*; - use alloy_sol_types as alloy_sol_types; + use {super::*, alloy_sol_types}; #[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); -```*/ + ```solidity + event Approval(address indexed owner, address indexed spender, uint256 value); + ```*/ #[allow( non_camel_case_types, non_snake_case, @@ -574,25 +579,26 @@ event Approval(address indexed owner, address indexed spender, uint256 value); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[automatically_derived] impl alloy_sol_types::SolEvent for Approval { + type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; 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; + 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, + ]); + #[allow(unused_variables)] #[inline] fn new( @@ -605,33 +611,39 @@ event Approval(address indexed owner, address indexed spender, uint256 value); 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, - ), - ); + 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), + as alloy_sol_types::SolType>::tokenize( + &self.value, + ), ) } + #[inline] fn topics(&self) -> ::RustType { - (Self::SIGNATURE_HASH.into(), self.owner.clone(), self.spender.clone()) + ( + Self::SIGNATURE_HASH.into(), + self.owner.clone(), + self.spender.clone(), + ) } + #[inline] fn encode_topics_raw( &self, @@ -640,9 +652,7 @@ event Approval(address indexed owner, address indexed spender, uint256 value); if out.len() < ::COUNT { return Err(alloy_sol_types::Error::Overrun); } - out[0usize] = alloy_sol_types::abi::token::WordToken( - Self::SIGNATURE_HASH, - ); + out[0usize] = alloy_sol_types::abi::token::WordToken(Self::SIGNATURE_HASH); out[1usize] = ::encode_topic( &self.owner, ); @@ -657,6 +667,7 @@ event Approval(address indexed owner, address indexed spender, uint256 value); 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) } @@ -671,9 +682,9 @@ event Approval(address indexed owner, address indexed spender, uint256 value); }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Event with signature `GradualWeightUpdateScheduled(uint256,uint256,uint256[],uint256[])` and selector `0x0f3631f9dab08169d1db21c6dc5f32536fb2b0a6b9bb5330d71c52132f968be0`. -```solidity -event GradualWeightUpdateScheduled(uint256 startTime, uint256 endTime, uint256[] startWeights, uint256[] endWeights); -```*/ + ```solidity + event GradualWeightUpdateScheduled(uint256 startTime, uint256 endTime, uint256[] startWeights, uint256[] endWeights); + ```*/ #[allow( non_camel_case_types, non_snake_case, @@ -687,13 +698,11 @@ event GradualWeightUpdateScheduled(uint256 startTime, uint256 endTime, uint256[] #[allow(missing_docs)] pub endTime: alloy_sol_types::private::primitives::aliases::U256, #[allow(missing_docs)] - pub startWeights: alloy_sol_types::private::Vec< - alloy_sol_types::private::primitives::aliases::U256, - >, + pub startWeights: + alloy_sol_types::private::Vec, #[allow(missing_docs)] - pub endWeights: alloy_sol_types::private::Vec< - alloy_sol_types::private::primitives::aliases::U256, - >, + pub endWeights: + alloy_sol_types::private::Vec, } #[allow( non_camel_case_types, @@ -702,26 +711,28 @@ event GradualWeightUpdateScheduled(uint256 startTime, uint256 endTime, uint256[] clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[automatically_derived] impl alloy_sol_types::SolEvent for GradualWeightUpdateScheduled { + type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type DataTuple<'a> = ( alloy_sol_types::sol_data::Uint<256>, alloy_sol_types::sol_data::Uint<256>, alloy_sol_types::sol_data::Array>, alloy_sol_types::sol_data::Array>, ); - type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type TopicList = (alloy_sol_types::sol_data::FixedBytes<32>,); - const SIGNATURE: &'static str = "GradualWeightUpdateScheduled(uint256,uint256,uint256[],uint256[])"; - const SIGNATURE_HASH: alloy_sol_types::private::B256 = alloy_sol_types::private::B256::new([ - 15u8, 54u8, 49u8, 249u8, 218u8, 176u8, 129u8, 105u8, 209u8, 219u8, 33u8, - 198u8, 220u8, 95u8, 50u8, 83u8, 111u8, 178u8, 176u8, 166u8, 185u8, 187u8, - 83u8, 48u8, 215u8, 28u8, 82u8, 19u8, 47u8, 150u8, 139u8, 224u8, - ]); + const ANONYMOUS: bool = false; + const SIGNATURE: &'static str = + "GradualWeightUpdateScheduled(uint256,uint256,uint256[],uint256[])"; + const SIGNATURE_HASH: alloy_sol_types::private::B256 = + alloy_sol_types::private::B256::new([ + 15u8, 54u8, 49u8, 249u8, 218u8, 176u8, 129u8, 105u8, 209u8, 219u8, 33u8, 198u8, + 220u8, 95u8, 50u8, 83u8, 111u8, 178u8, 176u8, 166u8, 185u8, 187u8, 83u8, 48u8, + 215u8, 28u8, 82u8, 19u8, 47u8, 150u8, 139u8, 224u8, + ]); + #[allow(unused_variables)] #[inline] fn new( @@ -735,21 +746,21 @@ event GradualWeightUpdateScheduled(uint256 startTime, uint256 endTime, uint256[] endWeights: data.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, - ), - ); + 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<'_> { ( @@ -767,10 +778,12 @@ event GradualWeightUpdateScheduled(uint256 startTime, uint256 endTime, uint256[] > as alloy_sol_types::SolType>::tokenize(&self.endWeights), ) } + #[inline] fn topics(&self) -> ::RustType { (Self::SIGNATURE_HASH.into(),) } + #[inline] fn encode_topics_raw( &self, @@ -779,9 +792,7 @@ event GradualWeightUpdateScheduled(uint256 startTime, uint256 endTime, uint256[] if out.len() < ::COUNT { return Err(alloy_sol_types::Error::Overrun); } - out[0usize] = alloy_sol_types::abi::token::WordToken( - Self::SIGNATURE_HASH, - ); + out[0usize] = alloy_sol_types::abi::token::WordToken(Self::SIGNATURE_HASH); Ok(()) } } @@ -790,6 +801,7 @@ event GradualWeightUpdateScheduled(uint256 startTime, uint256 endTime, uint256[] 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) } @@ -797,18 +809,16 @@ event GradualWeightUpdateScheduled(uint256 startTime, uint256 endTime, uint256[] #[automatically_derived] impl From<&GradualWeightUpdateScheduled> for alloy_sol_types::private::LogData { #[inline] - fn from( - this: &GradualWeightUpdateScheduled, - ) -> alloy_sol_types::private::LogData { + fn from(this: &GradualWeightUpdateScheduled) -> alloy_sol_types::private::LogData { alloy_sol_types::SolEvent::encode_log_data(this) } } }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Event with signature `PausedStateChanged(bool)` and selector `0x9e3a5e37224532dea67b89face185703738a228a6e8a23dee546960180d3be64`. -```solidity -event PausedStateChanged(bool paused); -```*/ + ```solidity + event PausedStateChanged(bool paused); + ```*/ #[allow( non_camel_case_types, non_snake_case, @@ -827,21 +837,22 @@ event PausedStateChanged(bool paused); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[automatically_derived] impl alloy_sol_types::SolEvent for PausedStateChanged { + type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type DataTuple<'a> = (alloy_sol_types::sol_data::Bool,); - type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type TopicList = (alloy_sol_types::sol_data::FixedBytes<32>,); - const SIGNATURE: &'static str = "PausedStateChanged(bool)"; - const SIGNATURE_HASH: alloy_sol_types::private::B256 = alloy_sol_types::private::B256::new([ - 158u8, 58u8, 94u8, 55u8, 34u8, 69u8, 50u8, 222u8, 166u8, 123u8, 137u8, - 250u8, 206u8, 24u8, 87u8, 3u8, 115u8, 138u8, 34u8, 138u8, 110u8, 138u8, - 35u8, 222u8, 229u8, 70u8, 150u8, 1u8, 128u8, 211u8, 190u8, 100u8, - ]); + const ANONYMOUS: bool = false; + const SIGNATURE: &'static str = "PausedStateChanged(bool)"; + const SIGNATURE_HASH: alloy_sol_types::private::B256 = + alloy_sol_types::private::B256::new([ + 158u8, 58u8, 94u8, 55u8, 34u8, 69u8, 50u8, 222u8, 166u8, 123u8, 137u8, 250u8, + 206u8, 24u8, 87u8, 3u8, 115u8, 138u8, 34u8, 138u8, 110u8, 138u8, 35u8, 222u8, + 229u8, 70u8, 150u8, 1u8, 128u8, 211u8, 190u8, 100u8, + ]); + #[allow(unused_variables)] #[inline] fn new( @@ -850,21 +861,21 @@ event PausedStateChanged(bool paused); ) -> Self { Self { paused: 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, - ), - ); + 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<'_> { ( @@ -873,10 +884,12 @@ event PausedStateChanged(bool paused); ), ) } + #[inline] fn topics(&self) -> ::RustType { (Self::SIGNATURE_HASH.into(),) } + #[inline] fn encode_topics_raw( &self, @@ -885,9 +898,7 @@ event PausedStateChanged(bool paused); if out.len() < ::COUNT { return Err(alloy_sol_types::Error::Overrun); } - out[0usize] = alloy_sol_types::abi::token::WordToken( - Self::SIGNATURE_HASH, - ); + out[0usize] = alloy_sol_types::abi::token::WordToken(Self::SIGNATURE_HASH); Ok(()) } } @@ -896,6 +907,7 @@ event PausedStateChanged(bool 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) } @@ -910,9 +922,9 @@ event PausedStateChanged(bool paused); }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Event with signature `SwapEnabledSet(bool)` and selector `0x5a9e84f78f7957cb4ed7478eb0fcad35ee4ecbe2e0f298420b28a3955392573f`. -```solidity -event SwapEnabledSet(bool swapEnabled); -```*/ + ```solidity + event SwapEnabledSet(bool swapEnabled); + ```*/ #[allow( non_camel_case_types, non_snake_case, @@ -931,44 +943,47 @@ event SwapEnabledSet(bool swapEnabled); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[automatically_derived] impl alloy_sol_types::SolEvent for SwapEnabledSet { + type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type DataTuple<'a> = (alloy_sol_types::sol_data::Bool,); - type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type TopicList = (alloy_sol_types::sol_data::FixedBytes<32>,); - const SIGNATURE: &'static str = "SwapEnabledSet(bool)"; - const SIGNATURE_HASH: alloy_sol_types::private::B256 = alloy_sol_types::private::B256::new([ - 90u8, 158u8, 132u8, 247u8, 143u8, 121u8, 87u8, 203u8, 78u8, 215u8, 71u8, - 142u8, 176u8, 252u8, 173u8, 53u8, 238u8, 78u8, 203u8, 226u8, 224u8, - 242u8, 152u8, 66u8, 11u8, 40u8, 163u8, 149u8, 83u8, 146u8, 87u8, 63u8, - ]); + const ANONYMOUS: bool = false; + const SIGNATURE: &'static str = "SwapEnabledSet(bool)"; + const SIGNATURE_HASH: alloy_sol_types::private::B256 = + alloy_sol_types::private::B256::new([ + 90u8, 158u8, 132u8, 247u8, 143u8, 121u8, 87u8, 203u8, 78u8, 215u8, 71u8, 142u8, + 176u8, 252u8, 173u8, 53u8, 238u8, 78u8, 203u8, 226u8, 224u8, 242u8, 152u8, + 66u8, 11u8, 40u8, 163u8, 149u8, 83u8, 146u8, 87u8, 63u8, + ]); + #[allow(unused_variables)] #[inline] fn new( topics: ::RustType, data: as alloy_sol_types::SolType>::RustType, ) -> Self { - Self { swapEnabled: data.0 } + Self { + swapEnabled: 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, - ), - ); + 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<'_> { ( @@ -977,10 +992,12 @@ event SwapEnabledSet(bool swapEnabled); ), ) } + #[inline] fn topics(&self) -> ::RustType { (Self::SIGNATURE_HASH.into(),) } + #[inline] fn encode_topics_raw( &self, @@ -989,9 +1006,7 @@ event SwapEnabledSet(bool swapEnabled); if out.len() < ::COUNT { return Err(alloy_sol_types::Error::Overrun); } - out[0usize] = alloy_sol_types::abi::token::WordToken( - Self::SIGNATURE_HASH, - ); + out[0usize] = alloy_sol_types::abi::token::WordToken(Self::SIGNATURE_HASH); Ok(()) } } @@ -1000,6 +1015,7 @@ event SwapEnabledSet(bool swapEnabled); 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) } @@ -1014,9 +1030,9 @@ event SwapEnabledSet(bool swapEnabled); }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Event with signature `SwapFeePercentageChanged(uint256)` and selector `0xa9ba3ffe0b6c366b81232caab38605a0699ad5398d6cce76f91ee809e322dafc`. -```solidity -event SwapFeePercentageChanged(uint256 swapFeePercentage); -```*/ + ```solidity + event SwapFeePercentageChanged(uint256 swapFeePercentage); + ```*/ #[allow( non_camel_case_types, non_snake_case, @@ -1035,56 +1051,61 @@ event SwapFeePercentageChanged(uint256 swapFeePercentage); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[automatically_derived] impl alloy_sol_types::SolEvent for SwapFeePercentageChanged { + type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; 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>,); - const SIGNATURE: &'static str = "SwapFeePercentageChanged(uint256)"; - const SIGNATURE_HASH: alloy_sol_types::private::B256 = alloy_sol_types::private::B256::new([ - 169u8, 186u8, 63u8, 254u8, 11u8, 108u8, 54u8, 107u8, 129u8, 35u8, 44u8, - 170u8, 179u8, 134u8, 5u8, 160u8, 105u8, 154u8, 213u8, 57u8, 141u8, 108u8, - 206u8, 118u8, 249u8, 30u8, 232u8, 9u8, 227u8, 34u8, 218u8, 252u8, - ]); + const ANONYMOUS: bool = false; + const SIGNATURE: &'static str = "SwapFeePercentageChanged(uint256)"; + const SIGNATURE_HASH: alloy_sol_types::private::B256 = + alloy_sol_types::private::B256::new([ + 169u8, 186u8, 63u8, 254u8, 11u8, 108u8, 54u8, 107u8, 129u8, 35u8, 44u8, 170u8, + 179u8, 134u8, 5u8, 160u8, 105u8, 154u8, 213u8, 57u8, 141u8, 108u8, 206u8, + 118u8, 249u8, 30u8, 232u8, 9u8, 227u8, 34u8, 218u8, 252u8, + ]); + #[allow(unused_variables)] #[inline] fn new( topics: ::RustType, data: as alloy_sol_types::SolType>::RustType, ) -> Self { - Self { swapFeePercentage: data.0 } + Self { + swapFeePercentage: 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, - ), - ); + 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.swapFeePercentage), + as alloy_sol_types::SolType>::tokenize( + &self.swapFeePercentage, + ), ) } + #[inline] fn topics(&self) -> ::RustType { (Self::SIGNATURE_HASH.into(),) } + #[inline] fn encode_topics_raw( &self, @@ -1093,9 +1114,7 @@ event SwapFeePercentageChanged(uint256 swapFeePercentage); if out.len() < ::COUNT { return Err(alloy_sol_types::Error::Overrun); } - out[0usize] = alloy_sol_types::abi::token::WordToken( - Self::SIGNATURE_HASH, - ); + out[0usize] = alloy_sol_types::abi::token::WordToken(Self::SIGNATURE_HASH); Ok(()) } } @@ -1104,6 +1123,7 @@ event SwapFeePercentageChanged(uint256 swapFeePercentage); 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) } @@ -1111,18 +1131,16 @@ event SwapFeePercentageChanged(uint256 swapFeePercentage); #[automatically_derived] impl From<&SwapFeePercentageChanged> for alloy_sol_types::private::LogData { #[inline] - fn from( - this: &SwapFeePercentageChanged, - ) -> alloy_sol_types::private::LogData { + fn from(this: &SwapFeePercentageChanged) -> alloy_sol_types::private::LogData { alloy_sol_types::SolEvent::encode_log_data(this) } } }; #[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); -```*/ + ```solidity + event Transfer(address indexed from, address indexed to, uint256 value); + ```*/ #[allow( non_camel_case_types, non_snake_case, @@ -1145,25 +1163,26 @@ event Transfer(address indexed from, address indexed to, uint256 value); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[automatically_derived] impl alloy_sol_types::SolEvent for Transfer { + type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; 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; + 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, + ]); + #[allow(unused_variables)] #[inline] fn new( @@ -1176,33 +1195,39 @@ event Transfer(address indexed from, address indexed to, uint256 value); 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, - ), - ); + 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), + as alloy_sol_types::SolType>::tokenize( + &self.value, + ), ) } + #[inline] fn topics(&self) -> ::RustType { - (Self::SIGNATURE_HASH.into(), self.from.clone(), self.to.clone()) + ( + Self::SIGNATURE_HASH.into(), + self.from.clone(), + self.to.clone(), + ) } + #[inline] fn encode_topics_raw( &self, @@ -1211,9 +1236,7 @@ event Transfer(address indexed from, address indexed to, uint256 value); if out.len() < ::COUNT { return Err(alloy_sol_types::Error::Overrun); } - out[0usize] = alloy_sol_types::abi::token::WordToken( - Self::SIGNATURE_HASH, - ); + out[0usize] = alloy_sol_types::abi::token::WordToken(Self::SIGNATURE_HASH); out[1usize] = ::encode_topic( &self.from, ); @@ -1228,6 +1251,7 @@ event Transfer(address indexed from, address indexed to, uint256 value); 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) } @@ -1241,9 +1265,9 @@ event Transfer(address indexed from, address indexed to, uint256 value); } }; /**Constructor`. -```solidity -constructor(address vault, string name, string symbol, address[] tokens, uint256[] normalizedWeights, uint256 swapFeePercentage, uint256 pauseWindowDuration, uint256 bufferPeriodDuration, address owner, bool swapEnabledOnStart); -```*/ + ```solidity + constructor(address vault, string name, string symbol, address[] tokens, uint256[] normalizedWeights, uint256 swapFeePercentage, uint256 pauseWindowDuration, uint256 bufferPeriodDuration, address owner, bool swapEnabledOnStart); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct constructorCall { @@ -1256,9 +1280,8 @@ constructor(address vault, string name, string symbol, address[] tokens, uint256 #[allow(missing_docs)] pub tokens: alloy_sol_types::private::Vec, #[allow(missing_docs)] - pub normalizedWeights: alloy_sol_types::private::Vec< - alloy_sol_types::private::primitives::aliases::U256, - >, + pub normalizedWeights: + alloy_sol_types::private::Vec, #[allow(missing_docs)] pub swapFeePercentage: alloy_sol_types::private::primitives::aliases::U256, #[allow(missing_docs)] @@ -1271,7 +1294,7 @@ constructor(address vault, string name, string symbol, address[] tokens, uint256 pub swapEnabledOnStart: bool, } const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -1293,9 +1316,7 @@ constructor(address vault, string name, string symbol, address[] tokens, uint256 alloy_sol_types::private::String, alloy_sol_types::private::String, alloy_sol_types::private::Vec, - alloy_sol_types::private::Vec< - alloy_sol_types::private::primitives::aliases::U256, - >, + alloy_sol_types::private::Vec, alloy_sol_types::private::primitives::aliases::U256, alloy_sol_types::private::primitives::aliases::U256, alloy_sol_types::private::primitives::aliases::U256, @@ -1304,9 +1325,7 @@ constructor(address vault, string name, string symbol, address[] tokens, uint256 ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1364,15 +1383,15 @@ constructor(address vault, string name, string symbol, address[] tokens, uint256 alloy_sol_types::sol_data::Address, alloy_sol_types::sol_data::Bool, ); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + 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<'_> { ( @@ -1412,14 +1431,15 @@ constructor(address vault, string name, string symbol, address[] tokens, uint256 }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `DOMAIN_SEPARATOR()` and selector `0x3644e515`. -```solidity -function DOMAIN_SEPARATOR() external view returns (bytes32); -```*/ + ```solidity + function DOMAIN_SEPARATOR() external view returns (bytes32); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct DOMAIN_SEPARATORCall; #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`DOMAIN_SEPARATOR()`](DOMAIN_SEPARATORCall) function. + ///Container type for the return parameters of the + /// [`DOMAIN_SEPARATOR()`](DOMAIN_SEPARATORCall) function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct DOMAIN_SEPARATORReturn { @@ -1433,7 +1453,7 @@ function DOMAIN_SEPARATOR() external view returns (bytes32); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -1442,9 +1462,7 @@ function DOMAIN_SEPARATOR() external view returns (bytes32); type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1453,16 +1471,14 @@ function DOMAIN_SEPARATOR() external view returns (bytes32); } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From - for UnderlyingRustTuple<'_> { + impl ::core::convert::From for UnderlyingRustTuple<'_> { fn from(value: DOMAIN_SEPARATORCall) -> Self { () } } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From> - for DOMAIN_SEPARATORCall { + impl ::core::convert::From> for DOMAIN_SEPARATORCall { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { Self } @@ -1476,9 +1492,7 @@ function DOMAIN_SEPARATOR() external view returns (bytes32); 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, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1487,16 +1501,14 @@ function DOMAIN_SEPARATOR() external view returns (bytes32); } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From - for UnderlyingRustTuple<'_> { + impl ::core::convert::From for UnderlyingRustTuple<'_> { fn from(value: DOMAIN_SEPARATORReturn) -> Self { (value._0,) } } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From> - for DOMAIN_SEPARATORReturn { + impl ::core::convert::From> for DOMAIN_SEPARATORReturn { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { Self { _0: tuple.0 } } @@ -1505,26 +1517,26 @@ function DOMAIN_SEPARATOR() external view returns (bytes32); #[automatically_derived] impl alloy_sol_types::SolCall for DOMAIN_SEPARATORCall { type Parameters<'a> = (); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = alloy_sol_types::private::FixedBytes<32>; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (alloy_sol_types::sol_data::FixedBytes<32>,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "DOMAIN_SEPARATOR()"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [54u8, 68u8, 229u8, 21u8]; + const SIGNATURE: &'static str = "DOMAIN_SEPARATOR()"; + #[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<'_> { ( @@ -1533,35 +1545,34 @@ function DOMAIN_SEPARATOR() external view returns (bytes32); > 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| { + as alloy_sol_types::SolType>::abi_decode_sequence(data).map( + |r| { let r: DOMAIN_SEPARATORReturn = 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: DOMAIN_SEPARATORReturn = r.into(); - r._0 - }) + 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: DOMAIN_SEPARATORReturn = r.into(); + r._0 + }) } } }; #[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); -```*/ + ```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 { @@ -1571,7 +1582,8 @@ function allowance(address owner, address spender) external view returns (uint25 pub spender: alloy_sol_types::private::Address, } #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`allowance(address,address)`](allowanceCall) function. + ///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 { @@ -1585,7 +1597,7 @@ function allowance(address owner, address spender) external view returns (uint25 clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -1600,9 +1612,7 @@ function allowance(address owner, address spender) external view returns (uint25 ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1632,14 +1642,10 @@ function allowance(address owner, address spender) external view returns (uint25 #[allow(dead_code)] type UnderlyingSolTuple<'a> = (alloy_sol_types::sol_data::Uint<256>,); #[doc(hidden)] - type UnderlyingRustTuple<'a> = ( - alloy_sol_types::private::primitives::aliases::U256, - ); + 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, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1667,22 +1673,21 @@ function allowance(address owner, address spender) external view returns (uint25 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 ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; 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)"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [221u8, 98u8, 237u8, 62u8]; + const SIGNATURE: &'static str = "allowance(address,address)"; + #[inline] fn new<'a>( tuple: as alloy_sol_types::SolType>::RustType, ) -> Self { tuple.into() } + #[inline] fn tokenize(&self) -> Self::Token<'_> { ( @@ -1694,43 +1699,43 @@ function allowance(address owner, address spender) external view returns (uint25 ), ) } + #[inline] fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { ( - as alloy_sol_types::SolType>::tokenize(ret), + 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| { + 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 - }) + 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(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `approve(address,uint256)` and selector `0x095ea7b3`. -```solidity -function approve(address spender, uint256 amount) external returns (bool); -```*/ + ```solidity + function approve(address spender, uint256 amount) external returns (bool); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct approveCall { @@ -1740,7 +1745,8 @@ function approve(address spender, uint256 amount) external returns (bool); pub amount: alloy_sol_types::private::primitives::aliases::U256, } #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`approve(address,uint256)`](approveCall) function. + ///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 { @@ -1754,7 +1760,7 @@ function approve(address spender, uint256 amount) external returns (bool); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -1769,9 +1775,7 @@ function approve(address spender, uint256 amount) external returns (bool); ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1804,9 +1808,7 @@ function approve(address spender, uint256 amount) external returns (bool); type UnderlyingRustTuple<'a> = (bool,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1834,70 +1836,65 @@ function approve(address spender, uint256 amount) external returns (bool); 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 ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; 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)"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [9u8, 94u8, 167u8, 179u8]; + const SIGNATURE: &'static str = "approve(address,uint256)"; + #[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.amount), + as alloy_sol_types::SolType>::tokenize( + &self.amount, + ), ) } + #[inline] fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { - ( - ::tokenize( - ret, - ), - ) + (::tokenize(ret),) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) - .map(|r| { + 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 - }) + 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(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `balanceOf(address)` and selector `0x70a08231`. -```solidity -function balanceOf(address account) external view returns (uint256); -```*/ + ```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 { @@ -1905,7 +1902,8 @@ function balanceOf(address account) external view returns (uint256); pub account: alloy_sol_types::private::Address, } #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`balanceOf(address)`](balanceOfCall) function. + ///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 { @@ -1919,7 +1917,7 @@ function balanceOf(address account) external view returns (uint256); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -1928,9 +1926,7 @@ function balanceOf(address account) external view returns (uint256); type UnderlyingRustTuple<'a> = (alloy_sol_types::private::Address,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1957,14 +1953,10 @@ function balanceOf(address account) external view returns (uint256); #[allow(dead_code)] type UnderlyingSolTuple<'a> = (alloy_sol_types::sol_data::Uint<256>,); #[doc(hidden)] - type UnderlyingRustTuple<'a> = ( - alloy_sol_types::private::primitives::aliases::U256, - ); + 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, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1989,22 +1981,21 @@ function balanceOf(address account) external view returns (uint256); #[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 ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; 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)"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [112u8, 160u8, 130u8, 49u8]; + const SIGNATURE: &'static str = "balanceOf(address)"; + #[inline] fn new<'a>( tuple: as alloy_sol_types::SolType>::RustType, ) -> Self { tuple.into() } + #[inline] fn tokenize(&self) -> Self::Token<'_> { ( @@ -2013,48 +2004,49 @@ function balanceOf(address account) external view returns (uint256); ), ) } + #[inline] fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { ( - as alloy_sol_types::SolType>::tokenize(ret), + 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| { + 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 - }) + 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(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `decimals()` and selector `0x313ce567`. -```solidity -function decimals() external view returns (uint8); -```*/ + ```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(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`decimals()`](decimalsCall) function. + ///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 { @@ -2068,7 +2060,7 @@ function decimals() external view returns (uint8); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -2077,9 +2069,7 @@ function decimals() external view returns (uint8); type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -2109,9 +2099,7 @@ function decimals() external view returns (uint8); type UnderlyingRustTuple<'a> = (u8,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -2136,75 +2124,69 @@ function decimals() external view returns (uint8); #[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 ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; 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()"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [49u8, 60u8, 229u8, 103u8]; + const SIGNATURE: &'static str = "decimals()"; + #[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), - ) + ( 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| { + 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 - }) + 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(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `getNormalizedWeights()` and selector `0xf89f27ed`. -```solidity -function getNormalizedWeights() external view returns (uint256[] memory); -```*/ + ```solidity + function getNormalizedWeights() external view returns (uint256[] memory); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct getNormalizedWeightsCall; #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`getNormalizedWeights()`](getNormalizedWeightsCall) function. + ///Container type for the return parameters of the + /// [`getNormalizedWeights()`](getNormalizedWeightsCall) function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct getNormalizedWeightsReturn { #[allow(missing_docs)] - pub _0: alloy_sol_types::private::Vec< - alloy_sol_types::private::primitives::aliases::U256, - >, + pub _0: alloy_sol_types::private::Vec, } #[allow( non_camel_case_types, @@ -2213,7 +2195,7 @@ function getNormalizedWeights() external view returns (uint256[] memory); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -2222,9 +2204,7 @@ function getNormalizedWeights() external view returns (uint256[] memory); type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -2233,16 +2213,14 @@ function getNormalizedWeights() external view returns (uint256[] memory); } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From - for UnderlyingRustTuple<'_> { + impl ::core::convert::From for UnderlyingRustTuple<'_> { fn from(value: getNormalizedWeightsCall) -> Self { () } } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From> - for getNormalizedWeightsCall { + impl ::core::convert::From> for getNormalizedWeightsCall { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { Self } @@ -2251,20 +2229,15 @@ function getNormalizedWeights() external view returns (uint256[] memory); { #[doc(hidden)] #[allow(dead_code)] - type UnderlyingSolTuple<'a> = ( - alloy_sol_types::sol_data::Array>, - ); + type UnderlyingSolTuple<'a> = + (alloy_sol_types::sol_data::Array>,); #[doc(hidden)] type UnderlyingRustTuple<'a> = ( - alloy_sol_types::private::Vec< - alloy_sol_types::private::primitives::aliases::U256, - >, + alloy_sol_types::private::Vec, ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -2273,16 +2246,14 @@ function getNormalizedWeights() external view returns (uint256[] memory); } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From - for UnderlyingRustTuple<'_> { + impl ::core::convert::From for UnderlyingRustTuple<'_> { fn from(value: getNormalizedWeightsReturn) -> Self { (value._0,) } } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From> - for getNormalizedWeightsReturn { + impl ::core::convert::From> for getNormalizedWeightsReturn { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { Self { _0: tuple.0 } } @@ -2291,72 +2262,68 @@ function getNormalizedWeights() external view returns (uint256[] memory); #[automatically_derived] impl alloy_sol_types::SolCall for getNormalizedWeightsCall { type Parameters<'a> = (); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; - type Return = alloy_sol_types::private::Vec< - alloy_sol_types::private::primitives::aliases::U256, - >; - type ReturnTuple<'a> = ( - alloy_sol_types::sol_data::Array>, - ); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "getNormalizedWeights()"; + type Return = + alloy_sol_types::private::Vec; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + type ReturnTuple<'a> = + (alloy_sol_types::sol_data::Array>,); + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [248u8, 159u8, 39u8, 237u8]; + const SIGNATURE: &'static str = "getNormalizedWeights()"; + #[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), - ) + (, + > 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| { + as alloy_sol_types::SolType>::abi_decode_sequence(data).map( + |r| { let r: getNormalizedWeightsReturn = 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: getNormalizedWeightsReturn = r.into(); - r._0 - }) + 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: getNormalizedWeightsReturn = r.into(); + r._0 + }) } } }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `getPausedState()` and selector `0x1c0de051`. -```solidity -function getPausedState() external view returns (bool paused, uint256 pauseWindowEndTime, uint256 bufferPeriodEndTime); -```*/ + ```solidity + function getPausedState() external view returns (bool paused, uint256 pauseWindowEndTime, uint256 bufferPeriodEndTime); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct getPausedStateCall; #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`getPausedState()`](getPausedStateCall) function. + ///Container type for the return parameters of the + /// [`getPausedState()`](getPausedStateCall) function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct getPausedStateReturn { @@ -2374,7 +2341,7 @@ function getPausedState() external view returns (bool paused, uint256 pauseWindo clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -2383,9 +2350,7 @@ function getPausedState() external view returns (bool paused, uint256 pauseWindo type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -2423,9 +2388,7 @@ function getPausedState() external view returns (bool paused, uint256 pauseWindo ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -2434,16 +2397,18 @@ function getPausedState() external view returns (bool paused, uint256 pauseWindo } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From - for UnderlyingRustTuple<'_> { + impl ::core::convert::From for UnderlyingRustTuple<'_> { fn from(value: getPausedStateReturn) -> Self { - (value.paused, value.pauseWindowEndTime, value.bufferPeriodEndTime) + ( + value.paused, + value.pauseWindowEndTime, + value.bufferPeriodEndTime, + ) } } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From> - for getPausedStateReturn { + impl ::core::convert::From> for getPausedStateReturn { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { Self { paused: tuple.0, @@ -2461,74 +2426,73 @@ function getPausedState() external view returns (bool paused, uint256 pauseWindo ::tokenize( &self.paused, ), - as alloy_sol_types::SolType>::tokenize(&self.pauseWindowEndTime), - as alloy_sol_types::SolType>::tokenize(&self.bufferPeriodEndTime), + as alloy_sol_types::SolType>::tokenize( + &self.pauseWindowEndTime, + ), + as alloy_sol_types::SolType>::tokenize( + &self.bufferPeriodEndTime, + ), ) } } #[automatically_derived] impl alloy_sol_types::SolCall for getPausedStateCall { type Parameters<'a> = (); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = getPausedStateReturn; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = ( alloy_sol_types::sol_data::Bool, alloy_sol_types::sol_data::Uint<256>, alloy_sol_types::sol_data::Uint<256>, ); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "getPausedState()"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [28u8, 13u8, 224u8, 81u8]; + const SIGNATURE: &'static str = "getPausedState()"; + #[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<'_> { getPausedStateReturn::_tokenize(ret) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) + 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) + 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(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `getPoolId()` and selector `0x38fff2d0`. -```solidity -function getPoolId() external view returns (bytes32); -```*/ + ```solidity + function getPoolId() external view returns (bytes32); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct getPoolIdCall; #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`getPoolId()`](getPoolIdCall) function. + ///Container type for the return parameters of the + /// [`getPoolId()`](getPoolIdCall) function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct getPoolIdReturn { @@ -2542,7 +2506,7 @@ function getPoolId() external view returns (bytes32); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -2551,9 +2515,7 @@ function getPoolId() external view returns (bytes32); type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -2583,9 +2545,7 @@ function getPoolId() external view returns (bytes32); 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, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -2610,26 +2570,26 @@ function getPoolId() external view returns (bytes32); #[automatically_derived] impl alloy_sol_types::SolCall for getPoolIdCall { type Parameters<'a> = (); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = alloy_sol_types::private::FixedBytes<32>; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (alloy_sol_types::sol_data::FixedBytes<32>,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "getPoolId()"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [56u8, 255u8, 242u8, 208u8]; + const SIGNATURE: &'static str = "getPoolId()"; + #[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<'_> { ( @@ -2638,47 +2598,45 @@ function getPoolId() external view returns (bytes32); > 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| { + as alloy_sol_types::SolType>::abi_decode_sequence(data).map( + |r| { let r: getPoolIdReturn = 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: getPoolIdReturn = r.into(); - r._0 - }) + 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: getPoolIdReturn = r.into(); + r._0 + }) } } }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `getScalingFactors()` and selector `0x1dd746ea`. -```solidity -function getScalingFactors() external view returns (uint256[] memory); -```*/ + ```solidity + function getScalingFactors() external view returns (uint256[] memory); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct getScalingFactorsCall; #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`getScalingFactors()`](getScalingFactorsCall) function. + ///Container type for the return parameters of the + /// [`getScalingFactors()`](getScalingFactorsCall) function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct getScalingFactorsReturn { #[allow(missing_docs)] - pub _0: alloy_sol_types::private::Vec< - alloy_sol_types::private::primitives::aliases::U256, - >, + pub _0: alloy_sol_types::private::Vec, } #[allow( non_camel_case_types, @@ -2687,7 +2645,7 @@ function getScalingFactors() external view returns (uint256[] memory); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -2696,9 +2654,7 @@ function getScalingFactors() external view returns (uint256[] memory); type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -2707,16 +2663,14 @@ function getScalingFactors() external view returns (uint256[] memory); } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From - for UnderlyingRustTuple<'_> { + impl ::core::convert::From for UnderlyingRustTuple<'_> { fn from(value: getScalingFactorsCall) -> Self { () } } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From> - for getScalingFactorsCall { + impl ::core::convert::From> for getScalingFactorsCall { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { Self } @@ -2725,20 +2679,15 @@ function getScalingFactors() external view returns (uint256[] memory); { #[doc(hidden)] #[allow(dead_code)] - type UnderlyingSolTuple<'a> = ( - alloy_sol_types::sol_data::Array>, - ); + type UnderlyingSolTuple<'a> = + (alloy_sol_types::sol_data::Array>,); #[doc(hidden)] type UnderlyingRustTuple<'a> = ( - alloy_sol_types::private::Vec< - alloy_sol_types::private::primitives::aliases::U256, - >, + alloy_sol_types::private::Vec, ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -2747,16 +2696,14 @@ function getScalingFactors() external view returns (uint256[] memory); } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From - for UnderlyingRustTuple<'_> { + impl ::core::convert::From for UnderlyingRustTuple<'_> { fn from(value: getScalingFactorsReturn) -> Self { (value._0,) } } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From> - for getScalingFactorsReturn { + impl ::core::convert::From> for getScalingFactorsReturn { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { Self { _0: tuple.0 } } @@ -2765,72 +2712,68 @@ function getScalingFactors() external view returns (uint256[] memory); #[automatically_derived] impl alloy_sol_types::SolCall for getScalingFactorsCall { type Parameters<'a> = (); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; - type Return = alloy_sol_types::private::Vec< - alloy_sol_types::private::primitives::aliases::U256, - >; - type ReturnTuple<'a> = ( - alloy_sol_types::sol_data::Array>, - ); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "getScalingFactors()"; + type Return = + alloy_sol_types::private::Vec; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + type ReturnTuple<'a> = + (alloy_sol_types::sol_data::Array>,); + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [29u8, 215u8, 70u8, 234u8]; + const SIGNATURE: &'static str = "getScalingFactors()"; + #[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), - ) + (, + > 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| { + as alloy_sol_types::SolType>::abi_decode_sequence(data).map( + |r| { let r: getScalingFactorsReturn = 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: getScalingFactorsReturn = r.into(); - r._0 - }) + 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: getScalingFactorsReturn = r.into(); + r._0 + }) } } }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `getSwapEnabled()` and selector `0x47bc4d92`. -```solidity -function getSwapEnabled() external view returns (bool); -```*/ + ```solidity + function getSwapEnabled() external view returns (bool); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct getSwapEnabledCall; #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`getSwapEnabled()`](getSwapEnabledCall) function. + ///Container type for the return parameters of the + /// [`getSwapEnabled()`](getSwapEnabledCall) function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct getSwapEnabledReturn { @@ -2844,7 +2787,7 @@ function getSwapEnabled() external view returns (bool); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -2853,9 +2796,7 @@ function getSwapEnabled() external view returns (bool); type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -2885,9 +2826,7 @@ function getSwapEnabled() external view returns (bool); type UnderlyingRustTuple<'a> = (bool,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -2896,16 +2835,14 @@ function getSwapEnabled() external view returns (bool); } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From - for UnderlyingRustTuple<'_> { + impl ::core::convert::From for UnderlyingRustTuple<'_> { fn from(value: getSwapEnabledReturn) -> Self { (value._0,) } } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From> - for getSwapEnabledReturn { + impl ::core::convert::From> for getSwapEnabledReturn { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { Self { _0: tuple.0 } } @@ -2914,68 +2851,64 @@ function getSwapEnabled() external view returns (bool); #[automatically_derived] impl alloy_sol_types::SolCall for getSwapEnabledCall { type Parameters<'a> = (); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = bool; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (alloy_sol_types::sol_data::Bool,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "getSwapEnabled()"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [71u8, 188u8, 77u8, 146u8]; + const SIGNATURE: &'static str = "getSwapEnabled()"; + #[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, - ), - ) + (::tokenize(ret),) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) - .map(|r| { + as alloy_sol_types::SolType>::abi_decode_sequence(data).map( + |r| { let r: getSwapEnabledReturn = 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: getSwapEnabledReturn = r.into(); - r._0 - }) + 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: getSwapEnabledReturn = r.into(); + r._0 + }) } } }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `getSwapFeePercentage()` and selector `0x55c67628`. -```solidity -function getSwapFeePercentage() external view returns (uint256); -```*/ + ```solidity + function getSwapFeePercentage() external view returns (uint256); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct getSwapFeePercentageCall; #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`getSwapFeePercentage()`](getSwapFeePercentageCall) function. + ///Container type for the return parameters of the + /// [`getSwapFeePercentage()`](getSwapFeePercentageCall) function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct getSwapFeePercentageReturn { @@ -2989,7 +2922,7 @@ function getSwapFeePercentage() external view returns (uint256); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -2998,9 +2931,7 @@ function getSwapFeePercentage() external view returns (uint256); type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -3009,16 +2940,14 @@ function getSwapFeePercentage() external view returns (uint256); } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From - for UnderlyingRustTuple<'_> { + impl ::core::convert::From for UnderlyingRustTuple<'_> { fn from(value: getSwapFeePercentageCall) -> Self { () } } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From> - for getSwapFeePercentageCall { + impl ::core::convert::From> for getSwapFeePercentageCall { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { Self } @@ -3029,14 +2958,10 @@ function getSwapFeePercentage() external view returns (uint256); #[allow(dead_code)] type UnderlyingSolTuple<'a> = (alloy_sol_types::sol_data::Uint<256>,); #[doc(hidden)] - type UnderlyingRustTuple<'a> = ( - alloy_sol_types::private::primitives::aliases::U256, - ); + 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, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -3045,16 +2970,14 @@ function getSwapFeePercentage() external view returns (uint256); } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From - for UnderlyingRustTuple<'_> { + impl ::core::convert::From for UnderlyingRustTuple<'_> { fn from(value: getSwapFeePercentageReturn) -> Self { (value._0,) } } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From> - for getSwapFeePercentageReturn { + impl ::core::convert::From> for getSwapFeePercentageReturn { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { Self { _0: tuple.0 } } @@ -3063,68 +2986,68 @@ function getSwapFeePercentage() external view returns (uint256); #[automatically_derived] impl alloy_sol_types::SolCall for getSwapFeePercentageCall { type Parameters<'a> = (); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = alloy_sol_types::private::primitives::aliases::U256; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (alloy_sol_types::sol_data::Uint<256>,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "getSwapFeePercentage()"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [85u8, 198u8, 118u8, 40u8]; + const SIGNATURE: &'static str = "getSwapFeePercentage()"; + #[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), + 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| { + as alloy_sol_types::SolType>::abi_decode_sequence(data).map( + |r| { let r: getSwapFeePercentageReturn = 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: getSwapFeePercentageReturn = r.into(); - r._0 - }) + 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: getSwapFeePercentageReturn = r.into(); + r._0 + }) } } }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `name()` and selector `0x06fdde03`. -```solidity -function name() external view returns (string memory); -```*/ + ```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(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`name()`](nameCall) function. + ///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 { @@ -3138,7 +3061,7 @@ function name() external view returns (string memory); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -3147,9 +3070,7 @@ function name() external view returns (string memory); type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -3179,9 +3100,7 @@ function name() external view returns (string memory); type UnderlyingRustTuple<'a> = (alloy_sol_types::private::String,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -3206,63 +3125,58 @@ function name() external view returns (string memory); #[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 ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (alloy_sol_types::sol_data::String,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "name()"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [6u8, 253u8, 222u8, 3u8]; + const SIGNATURE: &'static str = "name()"; + #[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, - ), - ) + (::tokenize(ret),) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) - .map(|r| { + 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 - }) + 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(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `nonces(address)` and selector `0x7ecebe00`. -```solidity -function nonces(address owner) external view returns (uint256); -```*/ + ```solidity + function nonces(address owner) external view returns (uint256); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct noncesCall { @@ -3270,7 +3184,8 @@ function nonces(address owner) external view returns (uint256); pub owner: alloy_sol_types::private::Address, } #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`nonces(address)`](noncesCall) function. + ///Container type for the return parameters of the + /// [`nonces(address)`](noncesCall) function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct noncesReturn { @@ -3284,7 +3199,7 @@ function nonces(address owner) external view returns (uint256); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -3293,9 +3208,7 @@ function nonces(address owner) external view returns (uint256); type UnderlyingRustTuple<'a> = (alloy_sol_types::private::Address,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -3322,14 +3235,10 @@ function nonces(address owner) external view returns (uint256); #[allow(dead_code)] type UnderlyingSolTuple<'a> = (alloy_sol_types::sol_data::Uint<256>,); #[doc(hidden)] - type UnderlyingRustTuple<'a> = ( - alloy_sol_types::private::primitives::aliases::U256, - ); + 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, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -3354,22 +3263,21 @@ function nonces(address owner) external view returns (uint256); #[automatically_derived] impl alloy_sol_types::SolCall for noncesCall { 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 ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (alloy_sol_types::sol_data::Uint<256>,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "nonces(address)"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [126u8, 206u8, 190u8, 0u8]; + const SIGNATURE: &'static str = "nonces(address)"; + #[inline] fn new<'a>( tuple: as alloy_sol_types::SolType>::RustType, ) -> Self { tuple.into() } + #[inline] fn tokenize(&self) -> Self::Token<'_> { ( @@ -3378,43 +3286,43 @@ function nonces(address owner) external view returns (uint256); ), ) } + #[inline] fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { ( - as alloy_sol_types::SolType>::tokenize(ret), + 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| { + as alloy_sol_types::SolType>::abi_decode_sequence(data).map( + |r| { let r: noncesReturn = 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: noncesReturn = r.into(); - r._0 - }) + 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: noncesReturn = r.into(); + r._0 + }) } } }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `permit(address,address,uint256,uint256,uint8,bytes32,bytes32)` and selector `0xd505accf`. -```solidity -function permit(address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) external; -```*/ + ```solidity + function permit(address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) external; + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct permitCall { @@ -3433,7 +3341,9 @@ function permit(address owner, address spender, uint256 value, uint256 deadline, #[allow(missing_docs)] pub s: alloy_sol_types::private::FixedBytes<32>, } - ///Container type for the return parameters of the [`permit(address,address,uint256,uint256,uint8,bytes32,bytes32)`](permitCall) function. + ///Container type for the return parameters of the + /// [`permit(address,address,uint256,uint256,uint8,bytes32, + /// bytes32)`](permitCall) function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct permitReturn {} @@ -3444,7 +3354,7 @@ function permit(address owner, address spender, uint256 value, uint256 deadline, clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -3469,9 +3379,7 @@ function permit(address owner, address spender, uint256 value, uint256 deadline, ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -3517,9 +3425,7 @@ function permit(address owner, address spender, uint256 value, uint256 deadline, type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -3542,9 +3448,7 @@ function permit(address owner, address spender, uint256 value, uint256 deadline, } } impl permitReturn { - fn _tokenize( - &self, - ) -> ::ReturnToken<'_> { + fn _tokenize(&self) -> ::ReturnToken<'_> { () } } @@ -3559,22 +3463,22 @@ function permit(address owner, address spender, uint256 value, uint256 deadline, alloy_sol_types::sol_data::FixedBytes<32>, alloy_sol_types::sol_data::FixedBytes<32>, ); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = permitReturn; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "permit(address,address,uint256,uint256,uint8,bytes32,bytes32)"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [213u8, 5u8, 172u8, 207u8]; + const SIGNATURE: &'static str = + "permit(address,address,uint256,uint256,uint8,bytes32,bytes32)"; + #[inline] fn new<'a>( tuple: as alloy_sol_types::SolType>::RustType, ) -> Self { tuple.into() } + #[inline] fn tokenize(&self) -> Self::Token<'_> { ( @@ -3601,38 +3505,38 @@ function permit(address owner, address spender, uint256 value, uint256 deadline, > as alloy_sol_types::SolType>::tokenize(&self.s), ) } + #[inline] fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { permitReturn::_tokenize(ret) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) + 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) + 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(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `symbol()` and selector `0x95d89b41`. -```solidity -function symbol() external view returns (string memory); -```*/ + ```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(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`symbol()`](symbolCall) function. + ///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 { @@ -3646,7 +3550,7 @@ function symbol() external view returns (string memory); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -3655,9 +3559,7 @@ function symbol() external view returns (string memory); type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -3687,9 +3589,7 @@ function symbol() external view returns (string memory); type UnderlyingRustTuple<'a> = (alloy_sol_types::private::String,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -3714,63 +3614,58 @@ function symbol() external view returns (string memory); #[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 ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (alloy_sol_types::sol_data::String,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "symbol()"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [149u8, 216u8, 155u8, 65u8]; + const SIGNATURE: &'static str = "symbol()"; + #[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, - ), - ) + (::tokenize(ret),) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) - .map(|r| { + 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 - }) + 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(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `transfer(address,uint256)` and selector `0xa9059cbb`. -```solidity -function transfer(address recipient, uint256 amount) external returns (bool); -```*/ + ```solidity + function transfer(address recipient, uint256 amount) external returns (bool); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct transferCall { @@ -3780,7 +3675,8 @@ function transfer(address recipient, uint256 amount) external returns (bool); pub amount: alloy_sol_types::private::primitives::aliases::U256, } #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`transfer(address,uint256)`](transferCall) function. + ///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 { @@ -3794,7 +3690,7 @@ function transfer(address recipient, uint256 amount) external returns (bool); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -3809,9 +3705,7 @@ function transfer(address recipient, uint256 amount) external returns (bool); ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -3844,9 +3738,7 @@ function transfer(address recipient, uint256 amount) external returns (bool); type UnderlyingRustTuple<'a> = (bool,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -3874,70 +3766,65 @@ function transfer(address recipient, uint256 amount) external returns (bool); 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 ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; 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)"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [169u8, 5u8, 156u8, 187u8]; + const SIGNATURE: &'static str = "transfer(address,uint256)"; + #[inline] fn new<'a>( tuple: as alloy_sol_types::SolType>::RustType, ) -> Self { tuple.into() } + #[inline] fn tokenize(&self) -> Self::Token<'_> { ( ::tokenize( &self.recipient, ), - as alloy_sol_types::SolType>::tokenize(&self.amount), + as alloy_sol_types::SolType>::tokenize( + &self.amount, + ), ) } + #[inline] fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { - ( - ::tokenize( - ret, - ), - ) + (::tokenize(ret),) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) - .map(|r| { + 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 - }) + 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(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `transferFrom(address,address,uint256)` and selector `0x23b872dd`. -```solidity -function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); -```*/ + ```solidity + function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct transferFromCall { @@ -3949,7 +3836,8 @@ function transferFrom(address sender, address recipient, uint256 amount) externa pub amount: alloy_sol_types::private::primitives::aliases::U256, } #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`transferFrom(address,address,uint256)`](transferFromCall) function. + ///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 { @@ -3963,7 +3851,7 @@ function transferFrom(address sender, address recipient, uint256 amount) externa clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -3980,9 +3868,7 @@ function transferFrom(address sender, address recipient, uint256 amount) externa ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -4016,9 +3902,7 @@ function transferFrom(address sender, address recipient, uint256 amount) externa type UnderlyingRustTuple<'a> = (bool,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -4047,22 +3931,21 @@ function transferFrom(address sender, address recipient, uint256 amount) externa 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 ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; 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)"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [35u8, 184u8, 114u8, 221u8]; + const SIGNATURE: &'static str = "transferFrom(address,address,uint256)"; + #[inline] fn new<'a>( tuple: as alloy_sol_types::SolType>::RustType, ) -> Self { tuple.into() } + #[inline] fn tokenize(&self) -> Self::Token<'_> { ( @@ -4072,46 +3955,42 @@ function transferFrom(address sender, address recipient, uint256 amount) externa ::tokenize( &self.recipient, ), - as alloy_sol_types::SolType>::tokenize(&self.amount), + as alloy_sol_types::SolType>::tokenize( + &self.amount, + ), ) } + #[inline] fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { - ( - ::tokenize( - ret, - ), - ) + (::tokenize(ret),) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) - .map(|r| { + 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 - }) + 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 + }) } } }; - ///Container for all the [`BalancerV2LiquidityBootstrappingPool`](self) function calls. + ///Container for all the [`BalancerV2LiquidityBootstrappingPool`](self) + /// function calls. #[derive(Clone)] - #[derive()] pub enum BalancerV2LiquidityBootstrappingPoolCalls { #[allow(missing_docs)] DOMAIN_SEPARATOR(DOMAIN_SEPARATORCall), @@ -4151,8 +4030,9 @@ function transferFrom(address sender, address recipient, uint256 amount) externa impl BalancerV2LiquidityBootstrappingPoolCalls { /// 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. + /// 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]] = &[ @@ -4174,26 +4054,6 @@ function transferFrom(address sender, address recipient, uint256 amount) externa [221u8, 98u8, 237u8, 62u8], [248u8, 159u8, 39u8, 237u8], ]; - /// The names of the variants in the same order as `SELECTORS`. - pub const VARIANT_NAMES: &'static [&'static str] = &[ - ::core::stringify!(name), - ::core::stringify!(approve), - ::core::stringify!(getPausedState), - ::core::stringify!(getScalingFactors), - ::core::stringify!(transferFrom), - ::core::stringify!(decimals), - ::core::stringify!(DOMAIN_SEPARATOR), - ::core::stringify!(getPoolId), - ::core::stringify!(getSwapEnabled), - ::core::stringify!(getSwapFeePercentage), - ::core::stringify!(balanceOf), - ::core::stringify!(nonces), - ::core::stringify!(symbol), - ::core::stringify!(transfer), - ::core::stringify!(permit), - ::core::stringify!(allowance), - ::core::stringify!(getNormalizedWeights), - ]; /// The signatures in the same order as `SELECTORS`. pub const SIGNATURES: &'static [&'static str] = &[ ::SIGNATURE, @@ -4214,6 +4074,27 @@ function transferFrom(address sender, address recipient, uint256 amount) externa ::SIGNATURE, ::SIGNATURE, ]; + /// The names of the variants in the same order as `SELECTORS`. + pub const VARIANT_NAMES: &'static [&'static str] = &[ + ::core::stringify!(name), + ::core::stringify!(approve), + ::core::stringify!(getPausedState), + ::core::stringify!(getScalingFactors), + ::core::stringify!(transferFrom), + ::core::stringify!(decimals), + ::core::stringify!(DOMAIN_SEPARATOR), + ::core::stringify!(getPoolId), + ::core::stringify!(getSwapEnabled), + ::core::stringify!(getSwapFeePercentage), + ::core::stringify!(balanceOf), + ::core::stringify!(nonces), + ::core::stringify!(symbol), + ::core::stringify!(transfer), + ::core::stringify!(permit), + ::core::stringify!(allowance), + ::core::stringify!(getNormalizedWeights), + ]; + /// Returns the signature for the given selector, if known. #[inline] pub fn signature_by_selector( @@ -4226,33 +4107,29 @@ function transferFrom(address sender, address recipient, uint256 amount) externa ::core::result::Result::Err(_) => ::core::option::Option::None, } } + /// Returns the enum variant name for the given selector, if known. #[inline] - pub fn name_by_selector( - selector: [u8; 4usize], - ) -> ::core::option::Option<&'static str> { + pub fn name_by_selector(selector: [u8; 4usize]) -> ::core::option::Option<&'static str> { let sig = Self::signature_by_selector(selector)?; sig.split_once('(').map(|(name, _)| name) } } #[automatically_derived] impl alloy_sol_types::SolInterface for BalancerV2LiquidityBootstrappingPoolCalls { - const NAME: &'static str = "BalancerV2LiquidityBootstrappingPoolCalls"; - const MIN_DATA_LENGTH: usize = 0usize; const COUNT: usize = 17usize; + const MIN_DATA_LENGTH: usize = 0usize; + const NAME: &'static str = "BalancerV2LiquidityBootstrappingPoolCalls"; + #[inline] fn selector(&self) -> [u8; 4] { match self { Self::DOMAIN_SEPARATOR(_) => { ::SELECTOR } - Self::allowance(_) => { - ::SELECTOR - } + Self::allowance(_) => ::SELECTOR, Self::approve(_) => ::SELECTOR, - Self::balanceOf(_) => { - ::SELECTOR - } + Self::balanceOf(_) => ::SELECTOR, Self::decimals(_) => ::SELECTOR, Self::getNormalizedWeights(_) => { ::SELECTOR @@ -4260,9 +4137,7 @@ function transferFrom(address sender, address recipient, uint256 amount) externa Self::getPausedState(_) => { ::SELECTOR } - Self::getPoolId(_) => { - ::SELECTOR - } + Self::getPoolId(_) => ::SELECTOR, Self::getScalingFactors(_) => { ::SELECTOR } @@ -4277,34 +4152,33 @@ function transferFrom(address sender, address recipient, uint256 amount) externa Self::permit(_) => ::SELECTOR, Self::symbol(_) => ::SELECTOR, Self::transfer(_) => ::SELECTOR, - Self::transferFrom(_) => { - ::SELECTOR - } + Self::transferFrom(_) => ::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 { + fn abi_decode_raw(selector: [u8; 4], data: &[u8]) -> alloy_sol_types::Result { static DECODE_SHIMS: &[fn( &[u8], - ) -> alloy_sol_types::Result] = &[ + ) -> alloy_sol_types::Result< + BalancerV2LiquidityBootstrappingPoolCalls, + >] = &[ { fn name( data: &[u8], - ) -> alloy_sol_types::Result< - BalancerV2LiquidityBootstrappingPoolCalls, - > { + ) -> alloy_sol_types::Result + { ::abi_decode_raw(data) .map(BalancerV2LiquidityBootstrappingPoolCalls::name) } @@ -4313,9 +4187,8 @@ function transferFrom(address sender, address recipient, uint256 amount) externa { fn approve( data: &[u8], - ) -> alloy_sol_types::Result< - BalancerV2LiquidityBootstrappingPoolCalls, - > { + ) -> alloy_sol_types::Result + { ::abi_decode_raw(data) .map(BalancerV2LiquidityBootstrappingPoolCalls::approve) } @@ -4324,42 +4197,29 @@ function transferFrom(address sender, address recipient, uint256 amount) externa { fn getPausedState( data: &[u8], - ) -> alloy_sol_types::Result< - BalancerV2LiquidityBootstrappingPoolCalls, - > { - ::abi_decode_raw( - data, - ) - .map( - BalancerV2LiquidityBootstrappingPoolCalls::getPausedState, - ) + ) -> alloy_sol_types::Result + { + ::abi_decode_raw(data) + .map(BalancerV2LiquidityBootstrappingPoolCalls::getPausedState) } getPausedState }, { fn getScalingFactors( data: &[u8], - ) -> alloy_sol_types::Result< - BalancerV2LiquidityBootstrappingPoolCalls, - > { - ::abi_decode_raw( - data, - ) - .map( - BalancerV2LiquidityBootstrappingPoolCalls::getScalingFactors, - ) + ) -> alloy_sol_types::Result + { + ::abi_decode_raw(data) + .map(BalancerV2LiquidityBootstrappingPoolCalls::getScalingFactors) } getScalingFactors }, { fn transferFrom( data: &[u8], - ) -> alloy_sol_types::Result< - BalancerV2LiquidityBootstrappingPoolCalls, - > { - ::abi_decode_raw( - data, - ) + ) -> alloy_sol_types::Result + { + ::abi_decode_raw(data) .map(BalancerV2LiquidityBootstrappingPoolCalls::transferFrom) } transferFrom @@ -4367,9 +4227,8 @@ function transferFrom(address sender, address recipient, uint256 amount) externa { fn decimals( data: &[u8], - ) -> alloy_sol_types::Result< - BalancerV2LiquidityBootstrappingPoolCalls, - > { + ) -> alloy_sol_types::Result + { ::abi_decode_raw(data) .map(BalancerV2LiquidityBootstrappingPoolCalls::decimals) } @@ -4378,24 +4237,18 @@ function transferFrom(address sender, address recipient, uint256 amount) externa { fn DOMAIN_SEPARATOR( data: &[u8], - ) -> alloy_sol_types::Result< - BalancerV2LiquidityBootstrappingPoolCalls, - > { - ::abi_decode_raw( - data, - ) - .map( - BalancerV2LiquidityBootstrappingPoolCalls::DOMAIN_SEPARATOR, - ) + ) -> alloy_sol_types::Result + { + ::abi_decode_raw(data) + .map(BalancerV2LiquidityBootstrappingPoolCalls::DOMAIN_SEPARATOR) } DOMAIN_SEPARATOR }, { fn getPoolId( data: &[u8], - ) -> alloy_sol_types::Result< - BalancerV2LiquidityBootstrappingPoolCalls, - > { + ) -> alloy_sol_types::Result + { ::abi_decode_raw(data) .map(BalancerV2LiquidityBootstrappingPoolCalls::getPoolId) } @@ -4404,39 +4257,28 @@ function transferFrom(address sender, address recipient, uint256 amount) externa { fn getSwapEnabled( data: &[u8], - ) -> alloy_sol_types::Result< - BalancerV2LiquidityBootstrappingPoolCalls, - > { - ::abi_decode_raw( - data, - ) - .map( - BalancerV2LiquidityBootstrappingPoolCalls::getSwapEnabled, - ) + ) -> alloy_sol_types::Result + { + ::abi_decode_raw(data) + .map(BalancerV2LiquidityBootstrappingPoolCalls::getSwapEnabled) } getSwapEnabled }, { fn getSwapFeePercentage( data: &[u8], - ) -> alloy_sol_types::Result< - BalancerV2LiquidityBootstrappingPoolCalls, - > { - ::abi_decode_raw( - data, - ) - .map( - BalancerV2LiquidityBootstrappingPoolCalls::getSwapFeePercentage, - ) + ) -> alloy_sol_types::Result + { + ::abi_decode_raw(data) + .map(BalancerV2LiquidityBootstrappingPoolCalls::getSwapFeePercentage) } getSwapFeePercentage }, { fn balanceOf( data: &[u8], - ) -> alloy_sol_types::Result< - BalancerV2LiquidityBootstrappingPoolCalls, - > { + ) -> alloy_sol_types::Result + { ::abi_decode_raw(data) .map(BalancerV2LiquidityBootstrappingPoolCalls::balanceOf) } @@ -4445,9 +4287,8 @@ function transferFrom(address sender, address recipient, uint256 amount) externa { fn nonces( data: &[u8], - ) -> alloy_sol_types::Result< - BalancerV2LiquidityBootstrappingPoolCalls, - > { + ) -> alloy_sol_types::Result + { ::abi_decode_raw(data) .map(BalancerV2LiquidityBootstrappingPoolCalls::nonces) } @@ -4456,9 +4297,8 @@ function transferFrom(address sender, address recipient, uint256 amount) externa { fn symbol( data: &[u8], - ) -> alloy_sol_types::Result< - BalancerV2LiquidityBootstrappingPoolCalls, - > { + ) -> alloy_sol_types::Result + { ::abi_decode_raw(data) .map(BalancerV2LiquidityBootstrappingPoolCalls::symbol) } @@ -4467,9 +4307,8 @@ function transferFrom(address sender, address recipient, uint256 amount) externa { fn transfer( data: &[u8], - ) -> alloy_sol_types::Result< - BalancerV2LiquidityBootstrappingPoolCalls, - > { + ) -> alloy_sol_types::Result + { ::abi_decode_raw(data) .map(BalancerV2LiquidityBootstrappingPoolCalls::transfer) } @@ -4478,9 +4317,8 @@ function transferFrom(address sender, address recipient, uint256 amount) externa { fn permit( data: &[u8], - ) -> alloy_sol_types::Result< - BalancerV2LiquidityBootstrappingPoolCalls, - > { + ) -> alloy_sol_types::Result + { ::abi_decode_raw(data) .map(BalancerV2LiquidityBootstrappingPoolCalls::permit) } @@ -4489,9 +4327,8 @@ function transferFrom(address sender, address recipient, uint256 amount) externa { fn allowance( data: &[u8], - ) -> alloy_sol_types::Result< - BalancerV2LiquidityBootstrappingPoolCalls, - > { + ) -> alloy_sol_types::Result + { ::abi_decode_raw(data) .map(BalancerV2LiquidityBootstrappingPoolCalls::allowance) } @@ -4500,29 +4337,23 @@ function transferFrom(address sender, address recipient, uint256 amount) externa { fn getNormalizedWeights( data: &[u8], - ) -> alloy_sol_types::Result< - BalancerV2LiquidityBootstrappingPoolCalls, - > { - ::abi_decode_raw( - data, - ) - .map( - BalancerV2LiquidityBootstrappingPoolCalls::getNormalizedWeights, - ) + ) -> alloy_sol_types::Result + { + ::abi_decode_raw(data) + .map(BalancerV2LiquidityBootstrappingPoolCalls::getNormalizedWeights) } getNormalizedWeights }, ]; let Ok(idx) = Self::SELECTORS.binary_search(&selector) else { - return Err( - alloy_sol_types::Error::unknown_selector( - ::NAME, - selector, - ), - ); + return Err(alloy_sol_types::Error::unknown_selector( + ::NAME, + selector, + )); }; DECODE_SHIMS[idx](data) } + #[inline] #[allow(non_snake_case)] fn abi_decode_raw_validate( @@ -4531,16 +4362,15 @@ function transferFrom(address sender, address recipient, uint256 amount) externa ) -> alloy_sol_types::Result { static DECODE_VALIDATE_SHIMS: &[fn( &[u8], - ) -> alloy_sol_types::Result] = &[ + ) -> alloy_sol_types::Result< + BalancerV2LiquidityBootstrappingPoolCalls, + >] = &[ { fn name( data: &[u8], - ) -> alloy_sol_types::Result< - BalancerV2LiquidityBootstrappingPoolCalls, - > { - ::abi_decode_raw_validate( - data, - ) + ) -> alloy_sol_types::Result + { + ::abi_decode_raw_validate(data) .map(BalancerV2LiquidityBootstrappingPoolCalls::name) } name @@ -4548,12 +4378,9 @@ function transferFrom(address sender, address recipient, uint256 amount) externa { fn approve( data: &[u8], - ) -> alloy_sol_types::Result< - BalancerV2LiquidityBootstrappingPoolCalls, - > { - ::abi_decode_raw_validate( - data, - ) + ) -> alloy_sol_types::Result + { + ::abi_decode_raw_validate(data) .map(BalancerV2LiquidityBootstrappingPoolCalls::approve) } approve @@ -4561,24 +4388,20 @@ function transferFrom(address sender, address recipient, uint256 amount) externa { fn getPausedState( data: &[u8], - ) -> alloy_sol_types::Result< - BalancerV2LiquidityBootstrappingPoolCalls, - > { + ) -> alloy_sol_types::Result + { ::abi_decode_raw_validate( - data, - ) - .map( - BalancerV2LiquidityBootstrappingPoolCalls::getPausedState, - ) + data, + ) + .map(BalancerV2LiquidityBootstrappingPoolCalls::getPausedState) } getPausedState }, { fn getScalingFactors( data: &[u8], - ) -> alloy_sol_types::Result< - BalancerV2LiquidityBootstrappingPoolCalls, - > { + ) -> alloy_sol_types::Result + { ::abi_decode_raw_validate( data, ) @@ -4591,25 +4414,21 @@ function transferFrom(address sender, address recipient, uint256 amount) externa { fn transferFrom( data: &[u8], - ) -> alloy_sol_types::Result< - BalancerV2LiquidityBootstrappingPoolCalls, - > { + ) -> alloy_sol_types::Result + { ::abi_decode_raw_validate( - data, - ) - .map(BalancerV2LiquidityBootstrappingPoolCalls::transferFrom) + data, + ) + .map(BalancerV2LiquidityBootstrappingPoolCalls::transferFrom) } transferFrom }, { fn decimals( data: &[u8], - ) -> alloy_sol_types::Result< - BalancerV2LiquidityBootstrappingPoolCalls, - > { - ::abi_decode_raw_validate( - data, - ) + ) -> alloy_sol_types::Result + { + ::abi_decode_raw_validate(data) .map(BalancerV2LiquidityBootstrappingPoolCalls::decimals) } decimals @@ -4617,27 +4436,21 @@ function transferFrom(address sender, address recipient, uint256 amount) externa { fn DOMAIN_SEPARATOR( data: &[u8], - ) -> alloy_sol_types::Result< - BalancerV2LiquidityBootstrappingPoolCalls, - > { + ) -> alloy_sol_types::Result + { ::abi_decode_raw_validate( - data, - ) - .map( - BalancerV2LiquidityBootstrappingPoolCalls::DOMAIN_SEPARATOR, - ) + data, + ) + .map(BalancerV2LiquidityBootstrappingPoolCalls::DOMAIN_SEPARATOR) } DOMAIN_SEPARATOR }, { fn getPoolId( data: &[u8], - ) -> alloy_sol_types::Result< - BalancerV2LiquidityBootstrappingPoolCalls, - > { - ::abi_decode_raw_validate( - data, - ) + ) -> alloy_sol_types::Result + { + ::abi_decode_raw_validate(data) .map(BalancerV2LiquidityBootstrappingPoolCalls::getPoolId) } getPoolId @@ -4645,24 +4458,20 @@ function transferFrom(address sender, address recipient, uint256 amount) externa { fn getSwapEnabled( data: &[u8], - ) -> alloy_sol_types::Result< - BalancerV2LiquidityBootstrappingPoolCalls, - > { + ) -> alloy_sol_types::Result + { ::abi_decode_raw_validate( - data, - ) - .map( - BalancerV2LiquidityBootstrappingPoolCalls::getSwapEnabled, - ) + data, + ) + .map(BalancerV2LiquidityBootstrappingPoolCalls::getSwapEnabled) } getSwapEnabled }, { fn getSwapFeePercentage( data: &[u8], - ) -> alloy_sol_types::Result< - BalancerV2LiquidityBootstrappingPoolCalls, - > { + ) -> alloy_sol_types::Result + { ::abi_decode_raw_validate( data, ) @@ -4675,12 +4484,9 @@ function transferFrom(address sender, address recipient, uint256 amount) externa { fn balanceOf( data: &[u8], - ) -> alloy_sol_types::Result< - BalancerV2LiquidityBootstrappingPoolCalls, - > { - ::abi_decode_raw_validate( - data, - ) + ) -> alloy_sol_types::Result + { + ::abi_decode_raw_validate(data) .map(BalancerV2LiquidityBootstrappingPoolCalls::balanceOf) } balanceOf @@ -4688,12 +4494,9 @@ function transferFrom(address sender, address recipient, uint256 amount) externa { fn nonces( data: &[u8], - ) -> alloy_sol_types::Result< - BalancerV2LiquidityBootstrappingPoolCalls, - > { - ::abi_decode_raw_validate( - data, - ) + ) -> alloy_sol_types::Result + { + ::abi_decode_raw_validate(data) .map(BalancerV2LiquidityBootstrappingPoolCalls::nonces) } nonces @@ -4701,12 +4504,9 @@ function transferFrom(address sender, address recipient, uint256 amount) externa { fn symbol( data: &[u8], - ) -> alloy_sol_types::Result< - BalancerV2LiquidityBootstrappingPoolCalls, - > { - ::abi_decode_raw_validate( - data, - ) + ) -> alloy_sol_types::Result + { + ::abi_decode_raw_validate(data) .map(BalancerV2LiquidityBootstrappingPoolCalls::symbol) } symbol @@ -4714,12 +4514,9 @@ function transferFrom(address sender, address recipient, uint256 amount) externa { fn transfer( data: &[u8], - ) -> alloy_sol_types::Result< - BalancerV2LiquidityBootstrappingPoolCalls, - > { - ::abi_decode_raw_validate( - data, - ) + ) -> alloy_sol_types::Result + { + ::abi_decode_raw_validate(data) .map(BalancerV2LiquidityBootstrappingPoolCalls::transfer) } transfer @@ -4727,12 +4524,9 @@ function transferFrom(address sender, address recipient, uint256 amount) externa { fn permit( data: &[u8], - ) -> alloy_sol_types::Result< - BalancerV2LiquidityBootstrappingPoolCalls, - > { - ::abi_decode_raw_validate( - data, - ) + ) -> alloy_sol_types::Result + { + ::abi_decode_raw_validate(data) .map(BalancerV2LiquidityBootstrappingPoolCalls::permit) } permit @@ -4740,12 +4534,9 @@ function transferFrom(address sender, address recipient, uint256 amount) externa { fn allowance( data: &[u8], - ) -> alloy_sol_types::Result< - BalancerV2LiquidityBootstrappingPoolCalls, - > { - ::abi_decode_raw_validate( - data, - ) + ) -> alloy_sol_types::Result + { + ::abi_decode_raw_validate(data) .map(BalancerV2LiquidityBootstrappingPoolCalls::allowance) } allowance @@ -4753,9 +4544,8 @@ function transferFrom(address sender, address recipient, uint256 amount) externa { fn getNormalizedWeights( data: &[u8], - ) -> alloy_sol_types::Result< - BalancerV2LiquidityBootstrappingPoolCalls, - > { + ) -> alloy_sol_types::Result + { ::abi_decode_raw_validate( data, ) @@ -4767,22 +4557,19 @@ function transferFrom(address sender, address recipient, uint256 amount) externa }, ]; let Ok(idx) = Self::SELECTORS.binary_search(&selector) else { - return Err( - alloy_sol_types::Error::unknown_selector( - ::NAME, - selector, - ), - ); + 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::DOMAIN_SEPARATOR(inner) => { - ::abi_encoded_size( - inner, - ) + ::abi_encoded_size(inner) } Self::allowance(inner) => { ::abi_encoded_size(inner) @@ -4797,32 +4584,22 @@ function transferFrom(address sender, address recipient, uint256 amount) externa ::abi_encoded_size(inner) } Self::getNormalizedWeights(inner) => { - ::abi_encoded_size( - inner, - ) + ::abi_encoded_size(inner) } Self::getPausedState(inner) => { - ::abi_encoded_size( - inner, - ) + ::abi_encoded_size(inner) } Self::getPoolId(inner) => { ::abi_encoded_size(inner) } Self::getScalingFactors(inner) => { - ::abi_encoded_size( - inner, - ) + ::abi_encoded_size(inner) } Self::getSwapEnabled(inner) => { - ::abi_encoded_size( - inner, - ) + ::abi_encoded_size(inner) } Self::getSwapFeePercentage(inner) => { - ::abi_encoded_size( - inner, - ) + ::abi_encoded_size(inner) } Self::name(inner) => { ::abi_encoded_size(inner) @@ -4840,76 +4617,49 @@ function transferFrom(address sender, address recipient, uint256 amount) externa ::abi_encoded_size(inner) } Self::transferFrom(inner) => { - ::abi_encoded_size( - inner, - ) + ::abi_encoded_size(inner) } } } + #[inline] fn abi_encode_raw(&self, out: &mut alloy_sol_types::private::Vec) { match self { Self::DOMAIN_SEPARATOR(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } Self::allowance(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } Self::approve(inner) => { ::abi_encode_raw(inner, out) } Self::balanceOf(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } Self::decimals(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } Self::getNormalizedWeights(inner) => { ::abi_encode_raw( - inner, - out, + inner, out, ) } Self::getPausedState(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } Self::getPoolId(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } Self::getScalingFactors(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } Self::getSwapEnabled(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } Self::getSwapFeePercentage(inner) => { ::abi_encode_raw( - inner, - out, + inner, out, ) } Self::name(inner) => { @@ -4925,23 +4675,17 @@ function transferFrom(address sender, address recipient, uint256 amount) externa ::abi_encode_raw(inner, out) } Self::transfer(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } Self::transferFrom(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } } } } - ///Container for all the [`BalancerV2LiquidityBootstrappingPool`](self) events. - #[derive(Clone)] - #[derive(Debug, PartialEq, Eq, Hash)] + ///Container for all the [`BalancerV2LiquidityBootstrappingPool`](self) + /// events. + #[derive(Clone, Debug, PartialEq, Eq, Hash)] pub enum BalancerV2LiquidityBootstrappingPoolEvents { #[allow(missing_docs)] Approval(Approval), @@ -4959,51 +4703,43 @@ function transferFrom(address sender, address recipient, uint256 amount) externa impl BalancerV2LiquidityBootstrappingPoolEvents { /// 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. + /// 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]] = &[ [ - 15u8, 54u8, 49u8, 249u8, 218u8, 176u8, 129u8, 105u8, 209u8, 219u8, 33u8, - 198u8, 220u8, 95u8, 50u8, 83u8, 111u8, 178u8, 176u8, 166u8, 185u8, 187u8, - 83u8, 48u8, 215u8, 28u8, 82u8, 19u8, 47u8, 150u8, 139u8, 224u8, + 15u8, 54u8, 49u8, 249u8, 218u8, 176u8, 129u8, 105u8, 209u8, 219u8, 33u8, 198u8, + 220u8, 95u8, 50u8, 83u8, 111u8, 178u8, 176u8, 166u8, 185u8, 187u8, 83u8, 48u8, + 215u8, 28u8, 82u8, 19u8, 47u8, 150u8, 139u8, 224u8, ], [ - 90u8, 158u8, 132u8, 247u8, 143u8, 121u8, 87u8, 203u8, 78u8, 215u8, 71u8, - 142u8, 176u8, 252u8, 173u8, 53u8, 238u8, 78u8, 203u8, 226u8, 224u8, - 242u8, 152u8, 66u8, 11u8, 40u8, 163u8, 149u8, 83u8, 146u8, 87u8, 63u8, + 90u8, 158u8, 132u8, 247u8, 143u8, 121u8, 87u8, 203u8, 78u8, 215u8, 71u8, 142u8, + 176u8, 252u8, 173u8, 53u8, 238u8, 78u8, 203u8, 226u8, 224u8, 242u8, 152u8, 66u8, + 11u8, 40u8, 163u8, 149u8, 83u8, 146u8, 87u8, 63u8, ], [ - 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, + 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, ], [ - 158u8, 58u8, 94u8, 55u8, 34u8, 69u8, 50u8, 222u8, 166u8, 123u8, 137u8, - 250u8, 206u8, 24u8, 87u8, 3u8, 115u8, 138u8, 34u8, 138u8, 110u8, 138u8, - 35u8, 222u8, 229u8, 70u8, 150u8, 1u8, 128u8, 211u8, 190u8, 100u8, + 158u8, 58u8, 94u8, 55u8, 34u8, 69u8, 50u8, 222u8, 166u8, 123u8, 137u8, 250u8, + 206u8, 24u8, 87u8, 3u8, 115u8, 138u8, 34u8, 138u8, 110u8, 138u8, 35u8, 222u8, + 229u8, 70u8, 150u8, 1u8, 128u8, 211u8, 190u8, 100u8, ], [ - 169u8, 186u8, 63u8, 254u8, 11u8, 108u8, 54u8, 107u8, 129u8, 35u8, 44u8, - 170u8, 179u8, 134u8, 5u8, 160u8, 105u8, 154u8, 213u8, 57u8, 141u8, 108u8, - 206u8, 118u8, 249u8, 30u8, 232u8, 9u8, 227u8, 34u8, 218u8, 252u8, + 169u8, 186u8, 63u8, 254u8, 11u8, 108u8, 54u8, 107u8, 129u8, 35u8, 44u8, 170u8, + 179u8, 134u8, 5u8, 160u8, 105u8, 154u8, 213u8, 57u8, 141u8, 108u8, 206u8, 118u8, + 249u8, 30u8, 232u8, 9u8, 227u8, 34u8, 218u8, 252u8, ], [ - 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, + 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, ], ]; - /// The names of the variants in the same order as `SELECTORS`. - pub const VARIANT_NAMES: &'static [&'static str] = &[ - ::core::stringify!(GradualWeightUpdateScheduled), - ::core::stringify!(SwapEnabledSet), - ::core::stringify!(Approval), - ::core::stringify!(PausedStateChanged), - ::core::stringify!(SwapFeePercentageChanged), - ::core::stringify!(Transfer), - ]; /// The signatures in the same order as `SELECTORS`. pub const SIGNATURES: &'static [&'static str] = &[ ::SIGNATURE, @@ -5013,6 +4749,16 @@ function transferFrom(address sender, address recipient, uint256 amount) externa ::SIGNATURE, ::SIGNATURE, ]; + /// The names of the variants in the same order as `SELECTORS`. + pub const VARIANT_NAMES: &'static [&'static str] = &[ + ::core::stringify!(GradualWeightUpdateScheduled), + ::core::stringify!(SwapEnabledSet), + ::core::stringify!(Approval), + ::core::stringify!(PausedStateChanged), + ::core::stringify!(SwapFeePercentageChanged), + ::core::stringify!(Transfer), + ]; + /// Returns the signature for the given selector, if known. #[inline] pub fn signature_by_selector( @@ -5025,20 +4771,19 @@ function transferFrom(address sender, address recipient, uint256 amount) externa ::core::result::Result::Err(_) => ::core::option::Option::None, } } + /// Returns the enum variant name for the given selector, if known. #[inline] - pub fn name_by_selector( - selector: [u8; 32usize], - ) -> ::core::option::Option<&'static str> { + pub fn name_by_selector(selector: [u8; 32usize]) -> ::core::option::Option<&'static str> { let sig = Self::signature_by_selector(selector)?; sig.split_once('(').map(|(name, _)| name) } } #[automatically_derived] - impl alloy_sol_types::SolEventInterface - for BalancerV2LiquidityBootstrappingPoolEvents { - const NAME: &'static str = "BalancerV2LiquidityBootstrappingPoolEvents"; + impl alloy_sol_types::SolEventInterface for BalancerV2LiquidityBootstrappingPoolEvents { const COUNT: usize = 6usize; + const NAME: &'static str = "BalancerV2LiquidityBootstrappingPoolEvents"; + fn decode_raw_log( topics: &[alloy_sol_types::Word], data: &[u8], @@ -5050,64 +4795,45 @@ function transferFrom(address sender, address recipient, uint256 amount) externa } Some( ::SIGNATURE_HASH, - ) => { - ::decode_raw_log( - topics, - data, - ) - .map(Self::GradualWeightUpdateScheduled) - } - Some( - ::SIGNATURE_HASH, - ) => { - ::decode_raw_log( - topics, - data, - ) + ) => ::decode_raw_log( + topics, data, + ) + .map(Self::GradualWeightUpdateScheduled), + Some(::SIGNATURE_HASH) => { + ::decode_raw_log(topics, data) .map(Self::PausedStateChanged) } Some(::SIGNATURE_HASH) => { - ::decode_raw_log( - topics, - data, - ) + ::decode_raw_log(topics, data) .map(Self::SwapEnabledSet) } - Some( - ::SIGNATURE_HASH, - ) => { + Some(::SIGNATURE_HASH) => { ::decode_raw_log( - topics, - data, - ) - .map(Self::SwapFeePercentageChanged) + topics, data, + ) + .map(Self::SwapFeePercentageChanged) } Some(::SIGNATURE_HASH) => { ::decode_raw_log(topics, data) .map(Self::Transfer) } - _ => { - 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(), - ), + _ => 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 BalancerV2LiquidityBootstrappingPoolEvents { + impl alloy_sol_types::private::IntoLogData for BalancerV2LiquidityBootstrappingPoolEvents { 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::Approval(inner) => alloy_sol_types::private::IntoLogData::to_log_data(inner), Self::GradualWeightUpdateScheduled(inner) => { alloy_sol_types::private::IntoLogData::to_log_data(inner) } @@ -5120,11 +4846,10 @@ function transferFrom(address sender, address recipient, uint256 amount) externa Self::SwapFeePercentageChanged(inner) => { alloy_sol_types::private::IntoLogData::to_log_data(inner) } - Self::Transfer(inner) => { - alloy_sol_types::private::IntoLogData::to_log_data(inner) - } + Self::Transfer(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) => { @@ -5148,10 +4873,10 @@ function transferFrom(address sender, address recipient, uint256 amount) externa } } } - use alloy_contract as alloy_contract; + use alloy_contract; /**Creates a new wrapper around an on-chain [`BalancerV2LiquidityBootstrappingPool`](self) contract instance. -See the [wrapper's documentation](`BalancerV2LiquidityBootstrappingPoolInstance`) for more details.*/ + See the [wrapper's documentation](`BalancerV2LiquidityBootstrappingPoolInstance`) for more details.*/ #[inline] pub const fn new< P: alloy_contract::private::Provider, @@ -5164,15 +4889,15 @@ See the [wrapper's documentation](`BalancerV2LiquidityBootstrappingPoolInstance` } /**A [`BalancerV2LiquidityBootstrappingPool`](self) instance. -Contains type-safe methods for interacting with an on-chain instance of the -[`BalancerV2LiquidityBootstrappingPool`](self) contract located at a given `address`, using a given -provider `P`. + Contains type-safe methods for interacting with an on-chain instance of the + [`BalancerV2LiquidityBootstrappingPool`](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. + 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.*/ + See the [module-level documentation](self) for all the available methods.*/ #[derive(Clone)] pub struct BalancerV2LiquidityBootstrappingPoolInstance< P, @@ -5183,8 +4908,7 @@ See the [module-level documentation](self) for all the available methods.*/ _network: ::core::marker::PhantomData, } #[automatically_derived] - impl ::core::fmt::Debug - for BalancerV2LiquidityBootstrappingPoolInstance { + impl ::core::fmt::Debug for BalancerV2LiquidityBootstrappingPoolInstance { #[inline] fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { f.debug_tuple("BalancerV2LiquidityBootstrappingPoolInstance") @@ -5193,54 +4917,50 @@ See the [module-level documentation](self) for all the available methods.*/ } } /// Instantiation and getters/setters. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > BalancerV2LiquidityBootstrappingPoolInstance { + impl, N: alloy_contract::private::Network> + BalancerV2LiquidityBootstrappingPoolInstance + { /**Creates a new wrapper around an on-chain [`BalancerV2LiquidityBootstrappingPool`](self) contract instance. -See the [wrapper's documentation](`BalancerV2LiquidityBootstrappingPoolInstance`) for more details.*/ + See the [wrapper's documentation](`BalancerV2LiquidityBootstrappingPoolInstance`) for more details.*/ #[inline] - pub const fn new( - address: alloy_sol_types::private::Address, - __provider: P, - ) -> Self { + pub const fn new(address: alloy_sol_types::private::Address, __provider: P) -> Self { Self { address, provider: __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< - P: ::core::clone::Clone, - N, - > BalancerV2LiquidityBootstrappingPoolInstance<&P, N> { - /// Clones the provider and returns a new instance with the cloned provider. + impl BalancerV2LiquidityBootstrappingPoolInstance<&P, N> { + /// Clones the provider and returns a new instance with the cloned + /// provider. #[inline] - pub fn with_cloned_provider( - self, - ) -> BalancerV2LiquidityBootstrappingPoolInstance { + pub fn with_cloned_provider(self) -> BalancerV2LiquidityBootstrappingPoolInstance { BalancerV2LiquidityBootstrappingPoolInstance { address: self.address, provider: ::core::clone::Clone::clone(&self.provider), @@ -5249,26 +4969,29 @@ See the [wrapper's documentation](`BalancerV2LiquidityBootstrappingPoolInstance` } } /// Function calls. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > BalancerV2LiquidityBootstrappingPoolInstance { - /// Creates a new call builder using this contract instance's provider and address. + impl, N: alloy_contract::private::Network> + BalancerV2LiquidityBootstrappingPoolInstance + { + /// 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. + /// 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 [`DOMAIN_SEPARATOR`] function. pub fn DOMAIN_SEPARATOR( &self, ) -> alloy_contract::SolCallBuilder<&P, DOMAIN_SEPARATORCall, N> { self.call_builder(&DOMAIN_SEPARATORCall) } + ///Creates a new call builder for the [`allowance`] function. pub fn allowance( &self, @@ -5277,6 +5000,7 @@ See the [wrapper's documentation](`BalancerV2LiquidityBootstrappingPoolInstance` ) -> 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, @@ -5285,6 +5009,7 @@ See the [wrapper's documentation](`BalancerV2LiquidityBootstrappingPoolInstance` ) -> alloy_contract::SolCallBuilder<&P, approveCall, N> { self.call_builder(&approveCall { spender, amount }) } + ///Creates a new call builder for the [`balanceOf`] function. pub fn balanceOf( &self, @@ -5292,48 +5017,55 @@ See the [wrapper's documentation](`BalancerV2LiquidityBootstrappingPoolInstance` ) -> alloy_contract::SolCallBuilder<&P, balanceOfCall, N> { self.call_builder(&balanceOfCall { account }) } + ///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 [`getNormalizedWeights`] function. + + ///Creates a new call builder for the [`getNormalizedWeights`] + /// function. pub fn getNormalizedWeights( &self, ) -> alloy_contract::SolCallBuilder<&P, getNormalizedWeightsCall, N> { self.call_builder(&getNormalizedWeightsCall) } + ///Creates a new call builder for the [`getPausedState`] function. - pub fn getPausedState( - &self, - ) -> alloy_contract::SolCallBuilder<&P, getPausedStateCall, N> { + pub fn getPausedState(&self) -> alloy_contract::SolCallBuilder<&P, getPausedStateCall, N> { self.call_builder(&getPausedStateCall) } + ///Creates a new call builder for the [`getPoolId`] function. pub fn getPoolId(&self) -> alloy_contract::SolCallBuilder<&P, getPoolIdCall, N> { self.call_builder(&getPoolIdCall) } + ///Creates a new call builder for the [`getScalingFactors`] function. pub fn getScalingFactors( &self, ) -> alloy_contract::SolCallBuilder<&P, getScalingFactorsCall, N> { self.call_builder(&getScalingFactorsCall) } + ///Creates a new call builder for the [`getSwapEnabled`] function. - pub fn getSwapEnabled( - &self, - ) -> alloy_contract::SolCallBuilder<&P, getSwapEnabledCall, N> { + pub fn getSwapEnabled(&self) -> alloy_contract::SolCallBuilder<&P, getSwapEnabledCall, N> { self.call_builder(&getSwapEnabledCall) } - ///Creates a new call builder for the [`getSwapFeePercentage`] function. + + ///Creates a new call builder for the [`getSwapFeePercentage`] + /// function. pub fn getSwapFeePercentage( &self, ) -> alloy_contract::SolCallBuilder<&P, getSwapFeePercentageCall, N> { self.call_builder(&getSwapFeePercentageCall) } + ///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 [`nonces`] function. pub fn nonces( &self, @@ -5341,6 +5073,7 @@ See the [wrapper's documentation](`BalancerV2LiquidityBootstrappingPoolInstance` ) -> alloy_contract::SolCallBuilder<&P, noncesCall, N> { self.call_builder(&noncesCall { owner }) } + ///Creates a new call builder for the [`permit`] function. pub fn permit( &self, @@ -5352,22 +5085,22 @@ See the [wrapper's documentation](`BalancerV2LiquidityBootstrappingPoolInstance` r: alloy_sol_types::private::FixedBytes<32>, s: alloy_sol_types::private::FixedBytes<32>, ) -> alloy_contract::SolCallBuilder<&P, permitCall, N> { - self.call_builder( - &permitCall { - owner, - spender, - value, - deadline, - v, - r, - s, - }, - ) + self.call_builder(&permitCall { + owner, + spender, + value, + deadline, + v, + r, + s, + }) } + ///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 [`transfer`] function. pub fn transfer( &self, @@ -5376,6 +5109,7 @@ See the [wrapper's documentation](`BalancerV2LiquidityBootstrappingPoolInstance` ) -> alloy_contract::SolCallBuilder<&P, transferCall, N> { self.call_builder(&transferCall { recipient, amount }) } + ///Creates a new call builder for the [`transferFrom`] function. pub fn transferFrom( &self, @@ -5383,63 +5117,69 @@ See the [wrapper's documentation](`BalancerV2LiquidityBootstrappingPoolInstance` recipient: alloy_sol_types::private::Address, amount: alloy_sol_types::private::primitives::aliases::U256, ) -> alloy_contract::SolCallBuilder<&P, transferFromCall, N> { - self.call_builder( - &transferFromCall { - sender, - recipient, - amount, - }, - ) + self.call_builder(&transferFromCall { + sender, + recipient, + amount, + }) } } /// Event filters. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > BalancerV2LiquidityBootstrappingPoolInstance { - /// Creates a new event filter using this contract instance's provider and address. + impl, N: alloy_contract::private::Network> + BalancerV2LiquidityBootstrappingPoolInstance + { + /// 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. + /// 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 [`GradualWeightUpdateScheduled`] event. + + ///Creates a new event filter for the [`GradualWeightUpdateScheduled`] + /// event. pub fn GradualWeightUpdateScheduled_filter( &self, ) -> alloy_contract::Event<&P, GradualWeightUpdateScheduled, N> { self.event_filter::() } + ///Creates a new event filter for the [`PausedStateChanged`] event. pub fn PausedStateChanged_filter( &self, ) -> alloy_contract::Event<&P, PausedStateChanged, N> { self.event_filter::() } + ///Creates a new event filter for the [`SwapEnabledSet`] event. - pub fn SwapEnabledSet_filter( - &self, - ) -> alloy_contract::Event<&P, SwapEnabledSet, N> { + pub fn SwapEnabledSet_filter(&self) -> alloy_contract::Event<&P, SwapEnabledSet, N> { self.event_filter::() } - ///Creates a new event filter for the [`SwapFeePercentageChanged`] event. + + ///Creates a new event filter for the [`SwapFeePercentageChanged`] + /// event. pub fn SwapFeePercentageChanged_filter( &self, ) -> alloy_contract::Event<&P, SwapFeePercentageChanged, 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::() } } } -pub type Instance = BalancerV2LiquidityBootstrappingPool::BalancerV2LiquidityBootstrappingPoolInstance< - ::alloy_provider::DynProvider, ->; +pub type Instance = + BalancerV2LiquidityBootstrappingPool::BalancerV2LiquidityBootstrappingPoolInstance< + ::alloy_provider::DynProvider, + >; diff --git a/contracts/generated/contracts-generated/balancerv2liquiditybootstrappingpoolfactory/src/lib.rs b/contracts/generated/contracts-generated/balancerv2liquiditybootstrappingpoolfactory/src/lib.rs index e82e2a5ff1..dca2df6fdd 100644 --- a/contracts/generated/contracts-generated/balancerv2liquiditybootstrappingpoolfactory/src/lib.rs +++ b/contracts/generated/contracts-generated/balancerv2liquiditybootstrappingpoolfactory/src/lib.rs @@ -1,4 +1,10 @@ -#![allow(unused_imports, unused_attributes, clippy::all, rustdoc::all, non_snake_case)] +#![allow( + unused_imports, + unused_attributes, + clippy::all, + rustdoc::all, + non_snake_case +)] //! Auto-generated contract bindings. Do not edit. /** @@ -99,13 +105,12 @@ interface BalancerV2LiquidityBootstrappingPoolFactory { clippy::empty_structs_with_brackets )] pub mod BalancerV2LiquidityBootstrappingPoolFactory { - use super::*; - use alloy_sol_types as alloy_sol_types; + use {super::*, alloy_sol_types}; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Event with signature `PoolCreated(address)` and selector `0x83a48fbcfc991335314e74d0496aab6a1987e992ddc85dddbcc4d6dd6ef2e9fc`. -```solidity -event PoolCreated(address indexed pool); -```*/ + ```solidity + event PoolCreated(address indexed pool); + ```*/ #[allow( non_camel_case_types, non_snake_case, @@ -124,25 +129,25 @@ event PoolCreated(address indexed pool); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[automatically_derived] impl alloy_sol_types::SolEvent for PoolCreated { + type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; 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::Address, ); - const SIGNATURE: &'static str = "PoolCreated(address)"; - const SIGNATURE_HASH: alloy_sol_types::private::B256 = alloy_sol_types::private::B256::new([ - 131u8, 164u8, 143u8, 188u8, 252u8, 153u8, 19u8, 53u8, 49u8, 78u8, 116u8, - 208u8, 73u8, 106u8, 171u8, 106u8, 25u8, 135u8, 233u8, 146u8, 221u8, - 200u8, 93u8, 221u8, 188u8, 196u8, 214u8, 221u8, 110u8, 242u8, 233u8, - 252u8, - ]); + const ANONYMOUS: bool = false; + const SIGNATURE: &'static str = "PoolCreated(address)"; + const SIGNATURE_HASH: alloy_sol_types::private::B256 = + alloy_sol_types::private::B256::new([ + 131u8, 164u8, 143u8, 188u8, 252u8, 153u8, 19u8, 53u8, 49u8, 78u8, 116u8, 208u8, + 73u8, 106u8, 171u8, 106u8, 25u8, 135u8, 233u8, 146u8, 221u8, 200u8, 93u8, + 221u8, 188u8, 196u8, 214u8, 221u8, 110u8, 242u8, 233u8, 252u8, + ]); + #[allow(unused_variables)] #[inline] fn new( @@ -151,29 +156,31 @@ event PoolCreated(address indexed pool); ) -> Self { Self { pool: topics.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, - ), - ); + 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.pool.clone()) } + #[inline] fn encode_topics_raw( &self, @@ -182,9 +189,7 @@ event PoolCreated(address indexed pool); if out.len() < ::COUNT { return Err(alloy_sol_types::Error::Overrun); } - out[0usize] = alloy_sol_types::abi::token::WordToken( - Self::SIGNATURE_HASH, - ); + out[0usize] = alloy_sol_types::abi::token::WordToken(Self::SIGNATURE_HASH); out[1usize] = ::encode_topic( &self.pool, ); @@ -196,6 +201,7 @@ event PoolCreated(address indexed pool); 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) } @@ -209,9 +215,9 @@ event PoolCreated(address indexed pool); } }; /**Constructor`. -```solidity -constructor(address vault); -```*/ + ```solidity + constructor(address vault); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct constructorCall { @@ -219,7 +225,7 @@ constructor(address vault); pub vault: alloy_sol_types::private::Address, } const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -228,9 +234,7 @@ constructor(address vault); type UnderlyingRustTuple<'a> = (alloy_sol_types::private::Address,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -255,15 +259,15 @@ constructor(address vault); #[automatically_derived] impl alloy_sol_types::SolConstructor for constructorCall { type Parameters<'a> = (alloy_sol_types::sol_data::Address,); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + 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<'_> { ( @@ -276,9 +280,9 @@ constructor(address vault); }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `create(string,string,address[],uint256[],uint256,address,bool)` and selector `0x23679719`. -```solidity -function create(string memory name, string memory symbol, address[] memory tokens, uint256[] memory weights, uint256 swapFeePercentage, address owner, bool swapEnabledOnStart) external returns (address); -```*/ + ```solidity + function create(string memory name, string memory symbol, address[] memory tokens, uint256[] memory weights, uint256 swapFeePercentage, address owner, bool swapEnabledOnStart) external returns (address); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct createCall { @@ -289,9 +293,8 @@ function create(string memory name, string memory symbol, address[] memory token #[allow(missing_docs)] pub tokens: alloy_sol_types::private::Vec, #[allow(missing_docs)] - pub weights: alloy_sol_types::private::Vec< - alloy_sol_types::private::primitives::aliases::U256, - >, + pub weights: + alloy_sol_types::private::Vec, #[allow(missing_docs)] pub swapFeePercentage: alloy_sol_types::private::primitives::aliases::U256, #[allow(missing_docs)] @@ -300,7 +303,9 @@ function create(string memory name, string memory symbol, address[] memory token pub swapEnabledOnStart: bool, } #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`create(string,string,address[],uint256[],uint256,address,bool)`](createCall) function. + ///Container type for the return parameters of the + /// [`create(string,string,address[],uint256[],uint256,address, + /// bool)`](createCall) function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct createReturn { @@ -314,7 +319,7 @@ function create(string memory name, string memory symbol, address[] memory token clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -332,18 +337,14 @@ function create(string memory name, string memory symbol, address[] memory token alloy_sol_types::private::String, alloy_sol_types::private::String, alloy_sol_types::private::Vec, - alloy_sol_types::private::Vec< - alloy_sol_types::private::primitives::aliases::U256, - >, + alloy_sol_types::private::Vec, alloy_sol_types::private::primitives::aliases::U256, alloy_sol_types::private::Address, bool, ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -389,9 +390,7 @@ function create(string memory name, string memory symbol, address[] memory token type UnderlyingRustTuple<'a> = (alloy_sol_types::private::Address,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -424,22 +423,22 @@ function create(string memory name, string memory symbol, address[] memory token alloy_sol_types::sol_data::Address, alloy_sol_types::sol_data::Bool, ); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = alloy_sol_types::private::Address; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (alloy_sol_types::sol_data::Address,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "create(string,string,address[],uint256[],uint256,address,bool)"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [35u8, 103u8, 151u8, 25u8]; + const SIGNATURE: &'static str = + "create(string,string,address[],uint256[],uint256,address,bool)"; + #[inline] fn new<'a>( tuple: as alloy_sol_types::SolType>::RustType, ) -> Self { tuple.into() } + #[inline] fn tokenize(&self) -> Self::Token<'_> { ( @@ -466,41 +465,37 @@ function create(string memory name, string memory symbol, address[] memory token ), ) } + #[inline] fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { - ( - ::tokenize( - ret, - ), - ) + (::tokenize(ret),) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) - .map(|r| { + as alloy_sol_types::SolType>::abi_decode_sequence(data).map( + |r| { let r: createReturn = 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: createReturn = r.into(); - r._0 - }) + 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: createReturn = r.into(); + r._0 + }) } } }; - ///Container for all the [`BalancerV2LiquidityBootstrappingPoolFactory`](self) function calls. + ///Container for all the + /// [`BalancerV2LiquidityBootstrappingPoolFactory`](self) function calls. #[derive(Clone)] - #[derive()] pub enum BalancerV2LiquidityBootstrappingPoolFactoryCalls { #[allow(missing_docs)] create(createCall), @@ -508,17 +503,18 @@ function create(string memory name, string memory symbol, address[] memory token impl BalancerV2LiquidityBootstrappingPoolFactoryCalls { /// 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. + /// 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]] = &[[35u8, 103u8, 151u8, 25u8]]; + /// The signatures in the same order as `SELECTORS`. + pub const SIGNATURES: &'static [&'static str] = + &[::SIGNATURE]; /// The names of the variants in the same order as `SELECTORS`. pub const VARIANT_NAMES: &'static [&'static str] = &[::core::stringify!(create)]; - /// The signatures in the same order as `SELECTORS`. - pub const SIGNATURES: &'static [&'static str] = &[ - ::SIGNATURE, - ]; + /// Returns the signature for the given selector, if known. #[inline] pub fn signature_by_selector( @@ -531,70 +527,63 @@ function create(string memory name, string memory symbol, address[] memory token ::core::result::Result::Err(_) => ::core::option::Option::None, } } + /// Returns the enum variant name for the given selector, if known. #[inline] - pub fn name_by_selector( - selector: [u8; 4usize], - ) -> ::core::option::Option<&'static str> { + pub fn name_by_selector(selector: [u8; 4usize]) -> ::core::option::Option<&'static str> { let sig = Self::signature_by_selector(selector)?; sig.split_once('(').map(|(name, _)| name) } } #[automatically_derived] - impl alloy_sol_types::SolInterface - for BalancerV2LiquidityBootstrappingPoolFactoryCalls { - const NAME: &'static str = "BalancerV2LiquidityBootstrappingPoolFactoryCalls"; - const MIN_DATA_LENGTH: usize = 352usize; + impl alloy_sol_types::SolInterface for BalancerV2LiquidityBootstrappingPoolFactoryCalls { const COUNT: usize = 1usize; + const MIN_DATA_LENGTH: usize = 352usize; + const NAME: &'static str = "BalancerV2LiquidityBootstrappingPoolFactoryCalls"; + #[inline] fn selector(&self) -> [u8; 4] { match self { Self::create(_) => ::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 { + fn abi_decode_raw(selector: [u8; 4], data: &[u8]) -> alloy_sol_types::Result { static DECODE_SHIMS: &[fn( &[u8], ) -> alloy_sol_types::Result< BalancerV2LiquidityBootstrappingPoolFactoryCalls, - >] = &[ + >] = &[{ + fn create( + data: &[u8], + ) -> alloy_sol_types::Result { - fn create( - data: &[u8], - ) -> alloy_sol_types::Result< - BalancerV2LiquidityBootstrappingPoolFactoryCalls, - > { - ::abi_decode_raw(data) - .map( - BalancerV2LiquidityBootstrappingPoolFactoryCalls::create, - ) - } - create - }, - ]; + ::abi_decode_raw(data) + .map(BalancerV2LiquidityBootstrappingPoolFactoryCalls::create) + } + create + }]; let Ok(idx) = Self::SELECTORS.binary_search(&selector) else { - return Err( - alloy_sol_types::Error::unknown_selector( - ::NAME, - selector, - ), - ); + return Err(alloy_sol_types::Error::unknown_selector( + ::NAME, + selector, + )); }; DECODE_SHIMS[idx](data) } + #[inline] #[allow(non_snake_case)] fn abi_decode_raw_validate( @@ -605,33 +594,25 @@ function create(string memory name, string memory symbol, address[] memory token &[u8], ) -> alloy_sol_types::Result< BalancerV2LiquidityBootstrappingPoolFactoryCalls, - >] = &[ + >] = &[{ + fn create( + data: &[u8], + ) -> alloy_sol_types::Result { - fn create( - data: &[u8], - ) -> alloy_sol_types::Result< - BalancerV2LiquidityBootstrappingPoolFactoryCalls, - > { - ::abi_decode_raw_validate( - data, - ) - .map( - BalancerV2LiquidityBootstrappingPoolFactoryCalls::create, - ) - } - create - }, - ]; + ::abi_decode_raw_validate(data) + .map(BalancerV2LiquidityBootstrappingPoolFactoryCalls::create) + } + create + }]; let Ok(idx) = Self::SELECTORS.binary_search(&selector) else { - return Err( - alloy_sol_types::Error::unknown_selector( - ::NAME, - selector, - ), - ); + return Err(alloy_sol_types::Error::unknown_selector( + ::NAME, + selector, + )); }; DECODE_VALIDATE_SHIMS[idx](data) } + #[inline] fn abi_encoded_size(&self) -> usize { match self { @@ -640,6 +621,7 @@ function create(string memory name, string memory symbol, address[] memory token } } } + #[inline] fn abi_encode_raw(&self, out: &mut alloy_sol_types::private::Vec) { match self { @@ -649,9 +631,9 @@ function create(string memory name, string memory symbol, address[] memory token } } } - ///Container for all the [`BalancerV2LiquidityBootstrappingPoolFactory`](self) events. - #[derive(Clone)] - #[derive(Debug, PartialEq, Eq, Hash)] + ///Container for all the + /// [`BalancerV2LiquidityBootstrappingPoolFactory`](self) events. + #[derive(Clone, Debug, PartialEq, Eq, Hash)] pub enum BalancerV2LiquidityBootstrappingPoolFactoryEvents { #[allow(missing_docs)] PoolCreated(PoolCreated), @@ -659,26 +641,22 @@ function create(string memory name, string memory symbol, address[] memory token impl BalancerV2LiquidityBootstrappingPoolFactoryEvents { /// 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. + /// 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]] = &[ - [ - 131u8, 164u8, 143u8, 188u8, 252u8, 153u8, 19u8, 53u8, 49u8, 78u8, 116u8, - 208u8, 73u8, 106u8, 171u8, 106u8, 25u8, 135u8, 233u8, 146u8, 221u8, - 200u8, 93u8, 221u8, 188u8, 196u8, 214u8, 221u8, 110u8, 242u8, 233u8, - 252u8, - ], - ]; - /// The names of the variants in the same order as `SELECTORS`. - pub const VARIANT_NAMES: &'static [&'static str] = &[ - ::core::stringify!(PoolCreated), - ]; + pub const SELECTORS: &'static [[u8; 32usize]] = &[[ + 131u8, 164u8, 143u8, 188u8, 252u8, 153u8, 19u8, 53u8, 49u8, 78u8, 116u8, 208u8, 73u8, + 106u8, 171u8, 106u8, 25u8, 135u8, 233u8, 146u8, 221u8, 200u8, 93u8, 221u8, 188u8, + 196u8, 214u8, 221u8, 110u8, 242u8, 233u8, 252u8, + ]]; /// The signatures in the same order as `SELECTORS`. - pub const SIGNATURES: &'static [&'static str] = &[ - ::SIGNATURE, - ]; + pub const SIGNATURES: &'static [&'static str] = + &[::SIGNATURE]; + /// The names of the variants in the same order as `SELECTORS`. + pub const VARIANT_NAMES: &'static [&'static str] = &[::core::stringify!(PoolCreated)]; + /// Returns the signature for the given selector, if known. #[inline] pub fn signature_by_selector( @@ -691,49 +669,42 @@ function create(string memory name, string memory symbol, address[] memory token ::core::result::Result::Err(_) => ::core::option::Option::None, } } + /// Returns the enum variant name for the given selector, if known. #[inline] - pub fn name_by_selector( - selector: [u8; 32usize], - ) -> ::core::option::Option<&'static str> { + pub fn name_by_selector(selector: [u8; 32usize]) -> ::core::option::Option<&'static str> { let sig = Self::signature_by_selector(selector)?; sig.split_once('(').map(|(name, _)| name) } } #[automatically_derived] - impl alloy_sol_types::SolEventInterface - for BalancerV2LiquidityBootstrappingPoolFactoryEvents { - const NAME: &'static str = "BalancerV2LiquidityBootstrappingPoolFactoryEvents"; + impl alloy_sol_types::SolEventInterface for BalancerV2LiquidityBootstrappingPoolFactoryEvents { const COUNT: usize = 1usize; + const NAME: &'static str = "BalancerV2LiquidityBootstrappingPoolFactoryEvents"; + 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, - ) + ::decode_raw_log(topics, data) .map(Self::PoolCreated) } - _ => { - 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(), - ), + _ => 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 BalancerV2LiquidityBootstrappingPoolFactoryEvents { + impl alloy_sol_types::private::IntoLogData for BalancerV2LiquidityBootstrappingPoolFactoryEvents { fn to_log_data(&self) -> alloy_sol_types::private::LogData { match self { Self::PoolCreated(inner) => { @@ -741,6 +712,7 @@ function create(string memory name, string memory symbol, address[] memory token } } } + fn into_log_data(self) -> alloy_sol_types::private::LogData { match self { Self::PoolCreated(inner) => { @@ -749,10 +721,10 @@ function create(string memory name, string memory symbol, address[] memory token } } } - use alloy_contract as alloy_contract; + use alloy_contract; /**Creates a new wrapper around an on-chain [`BalancerV2LiquidityBootstrappingPoolFactory`](self) contract instance. -See the [wrapper's documentation](`BalancerV2LiquidityBootstrappingPoolFactoryInstance`) for more details.*/ + See the [wrapper's documentation](`BalancerV2LiquidityBootstrappingPoolFactoryInstance`) for more details.*/ #[inline] pub const fn new< P: alloy_contract::private::Provider, @@ -761,22 +733,19 @@ See the [wrapper's documentation](`BalancerV2LiquidityBootstrappingPoolFactoryIn address: alloy_sol_types::private::Address, __provider: P, ) -> BalancerV2LiquidityBootstrappingPoolFactoryInstance { - BalancerV2LiquidityBootstrappingPoolFactoryInstance::< - P, - N, - >::new(address, __provider) + BalancerV2LiquidityBootstrappingPoolFactoryInstance::::new(address, __provider) } /**A [`BalancerV2LiquidityBootstrappingPoolFactory`](self) instance. -Contains type-safe methods for interacting with an on-chain instance of the -[`BalancerV2LiquidityBootstrappingPoolFactory`](self) contract located at a given `address`, using a given -provider `P`. + Contains type-safe methods for interacting with an on-chain instance of the + [`BalancerV2LiquidityBootstrappingPoolFactory`](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. + 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.*/ + See the [module-level documentation](self) for all the available methods.*/ #[derive(Clone)] pub struct BalancerV2LiquidityBootstrappingPoolFactoryInstance< P, @@ -787,8 +756,7 @@ See the [module-level documentation](self) for all the available methods.*/ _network: ::core::marker::PhantomData, } #[automatically_derived] - impl ::core::fmt::Debug - for BalancerV2LiquidityBootstrappingPoolFactoryInstance { + impl ::core::fmt::Debug for BalancerV2LiquidityBootstrappingPoolFactoryInstance { #[inline] fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { f.debug_tuple("BalancerV2LiquidityBootstrappingPoolFactoryInstance") @@ -797,50 +765,48 @@ See the [module-level documentation](self) for all the available methods.*/ } } /// Instantiation and getters/setters. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > BalancerV2LiquidityBootstrappingPoolFactoryInstance { + impl, N: alloy_contract::private::Network> + BalancerV2LiquidityBootstrappingPoolFactoryInstance + { /**Creates a new wrapper around an on-chain [`BalancerV2LiquidityBootstrappingPoolFactory`](self) contract instance. -See the [wrapper's documentation](`BalancerV2LiquidityBootstrappingPoolFactoryInstance`) for more details.*/ + See the [wrapper's documentation](`BalancerV2LiquidityBootstrappingPoolFactoryInstance`) for more details.*/ #[inline] - pub const fn new( - address: alloy_sol_types::private::Address, - __provider: P, - ) -> Self { + pub const fn new(address: alloy_sol_types::private::Address, __provider: P) -> Self { Self { address, provider: __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< - P: ::core::clone::Clone, - N, - > BalancerV2LiquidityBootstrappingPoolFactoryInstance<&P, N> { - /// Clones the provider and returns a new instance with the cloned provider. + impl BalancerV2LiquidityBootstrappingPoolFactoryInstance<&P, N> { + /// Clones the provider and returns a new instance with the cloned + /// provider. #[inline] pub fn with_cloned_provider( self, @@ -853,20 +819,22 @@ See the [wrapper's documentation](`BalancerV2LiquidityBootstrappingPoolFactoryIn } } /// Function calls. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > BalancerV2LiquidityBootstrappingPoolFactoryInstance { - /// Creates a new call builder using this contract instance's provider and address. + impl, N: alloy_contract::private::Network> + BalancerV2LiquidityBootstrappingPoolFactoryInstance + { + /// 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. + /// 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 [`create`] function. pub fn create( &self, @@ -880,33 +848,33 @@ See the [wrapper's documentation](`BalancerV2LiquidityBootstrappingPoolFactoryIn owner: alloy_sol_types::private::Address, swapEnabledOnStart: bool, ) -> alloy_contract::SolCallBuilder<&P, createCall, N> { - self.call_builder( - &createCall { - name, - symbol, - tokens, - weights, - swapFeePercentage, - owner, - swapEnabledOnStart, - }, - ) + self.call_builder(&createCall { + name, + symbol, + tokens, + weights, + swapFeePercentage, + owner, + swapEnabledOnStart, + }) } } /// Event filters. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > BalancerV2LiquidityBootstrappingPoolFactoryInstance { - /// Creates a new event filter using this contract instance's provider and address. + impl, N: alloy_contract::private::Network> + BalancerV2LiquidityBootstrappingPoolFactoryInstance + { + /// 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. + /// 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 [`PoolCreated`] event. pub fn PoolCreated_filter(&self) -> alloy_contract::Event<&P, PoolCreated, N> { self.event_filter::() @@ -917,37 +885,25 @@ pub type Instance = BalancerV2LiquidityBootstrappingPoolFactory::BalancerV2Liqui ::alloy_provider::DynProvider, >; use { - std::{sync::LazyLock, collections::HashMap}, - anyhow::{Result, Context}, - alloy_primitives::{address, Address}, - alloy_provider::{Provider, DynProvider}, + alloy_primitives::{Address, address}, + alloy_provider::{DynProvider, Provider}, + anyhow::{Context, Result}, + std::{collections::HashMap, sync::LazyLock}, }; pub const fn deployment_info(chain_id: u64) -> Option<(Address, Option)> { match chain_id { - 1u64 => { - Some(( - ::alloy_primitives::address!( - "0x751A0bC0e3f75b38e01Cf25bFCE7fF36DE1C87DE" - ), - Some(12871780u64), - )) - } - 137u64 => { - Some(( - ::alloy_primitives::address!( - "0x751A0bC0e3f75b38e01Cf25bFCE7fF36DE1C87DE" - ), - Some(17116402u64), - )) - } - 42161u64 => { - Some(( - ::alloy_primitives::address!( - "0x142B9666a0a3A30477b052962ddA81547E7029ab" - ), - Some(222870u64), - )) - } + 1u64 => Some(( + ::alloy_primitives::address!("0x751A0bC0e3f75b38e01Cf25bFCE7fF36DE1C87DE"), + Some(12871780u64), + )), + 137u64 => Some(( + ::alloy_primitives::address!("0x751A0bC0e3f75b38e01Cf25bFCE7fF36DE1C87DE"), + Some(17116402u64), + )), + 42161u64 => Some(( + ::alloy_primitives::address!("0x142B9666a0a3A30477b052962ddA81547E7029ab"), + Some(222870u64), + )), _ => None, } } @@ -964,9 +920,7 @@ pub const fn deployment_block(chain_id: &u64) -> Option { } } impl Instance { - pub fn deployed( - provider: &DynProvider, - ) -> impl Future> + Send { + pub fn deployed(provider: &DynProvider) -> impl Future> + Send { async move { let chain_id = provider .get_chain_id() diff --git a/contracts/generated/contracts-generated/balancerv2noprotocolfeeliquiditybootstrappingpoolfactory/src/lib.rs b/contracts/generated/contracts-generated/balancerv2noprotocolfeeliquiditybootstrappingpoolfactory/src/lib.rs index dc0d8c4460..5c3a5c4b69 100644 --- a/contracts/generated/contracts-generated/balancerv2noprotocolfeeliquiditybootstrappingpoolfactory/src/lib.rs +++ b/contracts/generated/contracts-generated/balancerv2noprotocolfeeliquiditybootstrappingpoolfactory/src/lib.rs @@ -1,4 +1,10 @@ -#![allow(unused_imports, unused_attributes, clippy::all, rustdoc::all, non_snake_case)] +#![allow( + unused_imports, + unused_attributes, + clippy::all, + rustdoc::all, + non_snake_case +)] //! Auto-generated contract bindings. Do not edit. /** @@ -99,13 +105,12 @@ interface BalancerV2NoProtocolFeeLiquidityBootstrappingPoolFactory { clippy::empty_structs_with_brackets )] pub mod BalancerV2NoProtocolFeeLiquidityBootstrappingPoolFactory { - use super::*; - use alloy_sol_types as alloy_sol_types; + use {super::*, alloy_sol_types}; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Event with signature `PoolCreated(address)` and selector `0x83a48fbcfc991335314e74d0496aab6a1987e992ddc85dddbcc4d6dd6ef2e9fc`. -```solidity -event PoolCreated(address indexed pool); -```*/ + ```solidity + event PoolCreated(address indexed pool); + ```*/ #[allow( non_camel_case_types, non_snake_case, @@ -124,25 +129,25 @@ event PoolCreated(address indexed pool); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[automatically_derived] impl alloy_sol_types::SolEvent for PoolCreated { + type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; 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::Address, ); - const SIGNATURE: &'static str = "PoolCreated(address)"; - const SIGNATURE_HASH: alloy_sol_types::private::B256 = alloy_sol_types::private::B256::new([ - 131u8, 164u8, 143u8, 188u8, 252u8, 153u8, 19u8, 53u8, 49u8, 78u8, 116u8, - 208u8, 73u8, 106u8, 171u8, 106u8, 25u8, 135u8, 233u8, 146u8, 221u8, - 200u8, 93u8, 221u8, 188u8, 196u8, 214u8, 221u8, 110u8, 242u8, 233u8, - 252u8, - ]); + const ANONYMOUS: bool = false; + const SIGNATURE: &'static str = "PoolCreated(address)"; + const SIGNATURE_HASH: alloy_sol_types::private::B256 = + alloy_sol_types::private::B256::new([ + 131u8, 164u8, 143u8, 188u8, 252u8, 153u8, 19u8, 53u8, 49u8, 78u8, 116u8, 208u8, + 73u8, 106u8, 171u8, 106u8, 25u8, 135u8, 233u8, 146u8, 221u8, 200u8, 93u8, + 221u8, 188u8, 196u8, 214u8, 221u8, 110u8, 242u8, 233u8, 252u8, + ]); + #[allow(unused_variables)] #[inline] fn new( @@ -151,29 +156,31 @@ event PoolCreated(address indexed pool); ) -> Self { Self { pool: topics.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, - ), - ); + 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.pool.clone()) } + #[inline] fn encode_topics_raw( &self, @@ -182,9 +189,7 @@ event PoolCreated(address indexed pool); if out.len() < ::COUNT { return Err(alloy_sol_types::Error::Overrun); } - out[0usize] = alloy_sol_types::abi::token::WordToken( - Self::SIGNATURE_HASH, - ); + out[0usize] = alloy_sol_types::abi::token::WordToken(Self::SIGNATURE_HASH); out[1usize] = ::encode_topic( &self.pool, ); @@ -196,6 +201,7 @@ event PoolCreated(address indexed pool); 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) } @@ -209,9 +215,9 @@ event PoolCreated(address indexed pool); } }; /**Constructor`. -```solidity -constructor(address vault); -```*/ + ```solidity + constructor(address vault); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct constructorCall { @@ -219,7 +225,7 @@ constructor(address vault); pub vault: alloy_sol_types::private::Address, } const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -228,9 +234,7 @@ constructor(address vault); type UnderlyingRustTuple<'a> = (alloy_sol_types::private::Address,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -255,15 +259,15 @@ constructor(address vault); #[automatically_derived] impl alloy_sol_types::SolConstructor for constructorCall { type Parameters<'a> = (alloy_sol_types::sol_data::Address,); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + 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<'_> { ( @@ -276,9 +280,9 @@ constructor(address vault); }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `create(string,string,address[],uint256[],uint256,address,bool)` and selector `0x23679719`. -```solidity -function create(string memory name, string memory symbol, address[] memory tokens, uint256[] memory weights, uint256 swapFeePercentage, address owner, bool swapEnabledOnStart) external returns (address); -```*/ + ```solidity + function create(string memory name, string memory symbol, address[] memory tokens, uint256[] memory weights, uint256 swapFeePercentage, address owner, bool swapEnabledOnStart) external returns (address); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct createCall { @@ -289,9 +293,8 @@ function create(string memory name, string memory symbol, address[] memory token #[allow(missing_docs)] pub tokens: alloy_sol_types::private::Vec, #[allow(missing_docs)] - pub weights: alloy_sol_types::private::Vec< - alloy_sol_types::private::primitives::aliases::U256, - >, + pub weights: + alloy_sol_types::private::Vec, #[allow(missing_docs)] pub swapFeePercentage: alloy_sol_types::private::primitives::aliases::U256, #[allow(missing_docs)] @@ -300,7 +303,9 @@ function create(string memory name, string memory symbol, address[] memory token pub swapEnabledOnStart: bool, } #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`create(string,string,address[],uint256[],uint256,address,bool)`](createCall) function. + ///Container type for the return parameters of the + /// [`create(string,string,address[],uint256[],uint256,address, + /// bool)`](createCall) function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct createReturn { @@ -314,7 +319,7 @@ function create(string memory name, string memory symbol, address[] memory token clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -332,18 +337,14 @@ function create(string memory name, string memory symbol, address[] memory token alloy_sol_types::private::String, alloy_sol_types::private::String, alloy_sol_types::private::Vec, - alloy_sol_types::private::Vec< - alloy_sol_types::private::primitives::aliases::U256, - >, + alloy_sol_types::private::Vec, alloy_sol_types::private::primitives::aliases::U256, alloy_sol_types::private::Address, bool, ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -389,9 +390,7 @@ function create(string memory name, string memory symbol, address[] memory token type UnderlyingRustTuple<'a> = (alloy_sol_types::private::Address,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -424,22 +423,22 @@ function create(string memory name, string memory symbol, address[] memory token alloy_sol_types::sol_data::Address, alloy_sol_types::sol_data::Bool, ); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = alloy_sol_types::private::Address; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (alloy_sol_types::sol_data::Address,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "create(string,string,address[],uint256[],uint256,address,bool)"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [35u8, 103u8, 151u8, 25u8]; + const SIGNATURE: &'static str = + "create(string,string,address[],uint256[],uint256,address,bool)"; + #[inline] fn new<'a>( tuple: as alloy_sol_types::SolType>::RustType, ) -> Self { tuple.into() } + #[inline] fn tokenize(&self) -> Self::Token<'_> { ( @@ -466,41 +465,38 @@ function create(string memory name, string memory symbol, address[] memory token ), ) } + #[inline] fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { - ( - ::tokenize( - ret, - ), - ) + (::tokenize(ret),) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) - .map(|r| { + as alloy_sol_types::SolType>::abi_decode_sequence(data).map( + |r| { let r: createReturn = 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: createReturn = r.into(); - r._0 - }) + 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: createReturn = r.into(); + r._0 + }) } } }; - ///Container for all the [`BalancerV2NoProtocolFeeLiquidityBootstrappingPoolFactory`](self) function calls. + ///Container for all the + /// [`BalancerV2NoProtocolFeeLiquidityBootstrappingPoolFactory`](self) + /// function calls. #[derive(Clone)] - #[derive()] pub enum BalancerV2NoProtocolFeeLiquidityBootstrappingPoolFactoryCalls { #[allow(missing_docs)] create(createCall), @@ -508,17 +504,18 @@ function create(string memory name, string memory symbol, address[] memory token impl BalancerV2NoProtocolFeeLiquidityBootstrappingPoolFactoryCalls { /// 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. + /// 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]] = &[[35u8, 103u8, 151u8, 25u8]]; + /// The signatures in the same order as `SELECTORS`. + pub const SIGNATURES: &'static [&'static str] = + &[::SIGNATURE]; /// The names of the variants in the same order as `SELECTORS`. pub const VARIANT_NAMES: &'static [&'static str] = &[::core::stringify!(create)]; - /// The signatures in the same order as `SELECTORS`. - pub const SIGNATURES: &'static [&'static str] = &[ - ::SIGNATURE, - ]; + /// Returns the signature for the given selector, if known. #[inline] pub fn signature_by_selector( @@ -531,70 +528,66 @@ function create(string memory name, string memory symbol, address[] memory token ::core::result::Result::Err(_) => ::core::option::Option::None, } } + /// Returns the enum variant name for the given selector, if known. #[inline] - pub fn name_by_selector( - selector: [u8; 4usize], - ) -> ::core::option::Option<&'static str> { + pub fn name_by_selector(selector: [u8; 4usize]) -> ::core::option::Option<&'static str> { let sig = Self::signature_by_selector(selector)?; sig.split_once('(').map(|(name, _)| name) } } #[automatically_derived] impl alloy_sol_types::SolInterface - for BalancerV2NoProtocolFeeLiquidityBootstrappingPoolFactoryCalls { - const NAME: &'static str = "BalancerV2NoProtocolFeeLiquidityBootstrappingPoolFactoryCalls"; - const MIN_DATA_LENGTH: usize = 352usize; + for BalancerV2NoProtocolFeeLiquidityBootstrappingPoolFactoryCalls + { const COUNT: usize = 1usize; + const MIN_DATA_LENGTH: usize = 352usize; + const NAME: &'static str = "BalancerV2NoProtocolFeeLiquidityBootstrappingPoolFactoryCalls"; + #[inline] fn selector(&self) -> [u8; 4] { match self { Self::create(_) => ::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 { + fn abi_decode_raw(selector: [u8; 4], data: &[u8]) -> alloy_sol_types::Result { static DECODE_SHIMS: &[fn( &[u8], ) -> alloy_sol_types::Result< BalancerV2NoProtocolFeeLiquidityBootstrappingPoolFactoryCalls, - >] = &[ - { - fn create( - data: &[u8], - ) -> alloy_sol_types::Result< - BalancerV2NoProtocolFeeLiquidityBootstrappingPoolFactoryCalls, - > { - ::abi_decode_raw(data) - .map( - BalancerV2NoProtocolFeeLiquidityBootstrappingPoolFactoryCalls::create, - ) - } - create - }, - ]; + >] = &[{ + fn create( + data: &[u8], + ) -> alloy_sol_types::Result< + BalancerV2NoProtocolFeeLiquidityBootstrappingPoolFactoryCalls, + > { + ::abi_decode_raw(data) + .map(BalancerV2NoProtocolFeeLiquidityBootstrappingPoolFactoryCalls::create) + } + create + }]; let Ok(idx) = Self::SELECTORS.binary_search(&selector) else { - return Err( - alloy_sol_types::Error::unknown_selector( - ::NAME, - selector, - ), - ); + return Err(alloy_sol_types::Error::unknown_selector( + ::NAME, + selector, + )); }; DECODE_SHIMS[idx](data) } + #[inline] #[allow(non_snake_case)] fn abi_decode_raw_validate( @@ -605,33 +598,26 @@ function create(string memory name, string memory symbol, address[] memory token &[u8], ) -> alloy_sol_types::Result< BalancerV2NoProtocolFeeLiquidityBootstrappingPoolFactoryCalls, - >] = &[ - { - fn create( - data: &[u8], - ) -> alloy_sol_types::Result< - BalancerV2NoProtocolFeeLiquidityBootstrappingPoolFactoryCalls, - > { - ::abi_decode_raw_validate( - data, - ) - .map( - BalancerV2NoProtocolFeeLiquidityBootstrappingPoolFactoryCalls::create, - ) - } - create - }, - ]; + >] = &[{ + fn create( + data: &[u8], + ) -> alloy_sol_types::Result< + BalancerV2NoProtocolFeeLiquidityBootstrappingPoolFactoryCalls, + > { + ::abi_decode_raw_validate(data) + .map(BalancerV2NoProtocolFeeLiquidityBootstrappingPoolFactoryCalls::create) + } + create + }]; let Ok(idx) = Self::SELECTORS.binary_search(&selector) else { - return Err( - alloy_sol_types::Error::unknown_selector( - ::NAME, - selector, - ), - ); + return Err(alloy_sol_types::Error::unknown_selector( + ::NAME, + selector, + )); }; DECODE_VALIDATE_SHIMS[idx](data) } + #[inline] fn abi_encoded_size(&self) -> usize { match self { @@ -640,6 +626,7 @@ function create(string memory name, string memory symbol, address[] memory token } } } + #[inline] fn abi_encode_raw(&self, out: &mut alloy_sol_types::private::Vec) { match self { @@ -649,9 +636,10 @@ function create(string memory name, string memory symbol, address[] memory token } } } - ///Container for all the [`BalancerV2NoProtocolFeeLiquidityBootstrappingPoolFactory`](self) events. - #[derive(Clone)] - #[derive(Debug, PartialEq, Eq, Hash)] + ///Container for all the + /// [`BalancerV2NoProtocolFeeLiquidityBootstrappingPoolFactory`](self) + /// events. + #[derive(Clone, Debug, PartialEq, Eq, Hash)] pub enum BalancerV2NoProtocolFeeLiquidityBootstrappingPoolFactoryEvents { #[allow(missing_docs)] PoolCreated(PoolCreated), @@ -659,26 +647,22 @@ function create(string memory name, string memory symbol, address[] memory token impl BalancerV2NoProtocolFeeLiquidityBootstrappingPoolFactoryEvents { /// 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. + /// 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]] = &[ - [ - 131u8, 164u8, 143u8, 188u8, 252u8, 153u8, 19u8, 53u8, 49u8, 78u8, 116u8, - 208u8, 73u8, 106u8, 171u8, 106u8, 25u8, 135u8, 233u8, 146u8, 221u8, - 200u8, 93u8, 221u8, 188u8, 196u8, 214u8, 221u8, 110u8, 242u8, 233u8, - 252u8, - ], - ]; - /// The names of the variants in the same order as `SELECTORS`. - pub const VARIANT_NAMES: &'static [&'static str] = &[ - ::core::stringify!(PoolCreated), - ]; + pub const SELECTORS: &'static [[u8; 32usize]] = &[[ + 131u8, 164u8, 143u8, 188u8, 252u8, 153u8, 19u8, 53u8, 49u8, 78u8, 116u8, 208u8, 73u8, + 106u8, 171u8, 106u8, 25u8, 135u8, 233u8, 146u8, 221u8, 200u8, 93u8, 221u8, 188u8, + 196u8, 214u8, 221u8, 110u8, 242u8, 233u8, 252u8, + ]]; /// The signatures in the same order as `SELECTORS`. - pub const SIGNATURES: &'static [&'static str] = &[ - ::SIGNATURE, - ]; + pub const SIGNATURES: &'static [&'static str] = + &[::SIGNATURE]; + /// The names of the variants in the same order as `SELECTORS`. + pub const VARIANT_NAMES: &'static [&'static str] = &[::core::stringify!(PoolCreated)]; + /// Returns the signature for the given selector, if known. #[inline] pub fn signature_by_selector( @@ -691,49 +675,46 @@ function create(string memory name, string memory symbol, address[] memory token ::core::result::Result::Err(_) => ::core::option::Option::None, } } + /// Returns the enum variant name for the given selector, if known. #[inline] - pub fn name_by_selector( - selector: [u8; 32usize], - ) -> ::core::option::Option<&'static str> { + pub fn name_by_selector(selector: [u8; 32usize]) -> ::core::option::Option<&'static str> { let sig = Self::signature_by_selector(selector)?; sig.split_once('(').map(|(name, _)| name) } } #[automatically_derived] impl alloy_sol_types::SolEventInterface - for BalancerV2NoProtocolFeeLiquidityBootstrappingPoolFactoryEvents { - const NAME: &'static str = "BalancerV2NoProtocolFeeLiquidityBootstrappingPoolFactoryEvents"; + for BalancerV2NoProtocolFeeLiquidityBootstrappingPoolFactoryEvents + { const COUNT: usize = 1usize; + const NAME: &'static str = "BalancerV2NoProtocolFeeLiquidityBootstrappingPoolFactoryEvents"; + 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, - ) + ::decode_raw_log(topics, data) .map(Self::PoolCreated) } - _ => { - 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(), - ), + _ => 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 BalancerV2NoProtocolFeeLiquidityBootstrappingPoolFactoryEvents { + for BalancerV2NoProtocolFeeLiquidityBootstrappingPoolFactoryEvents + { fn to_log_data(&self) -> alloy_sol_types::private::LogData { match self { Self::PoolCreated(inner) => { @@ -741,6 +722,7 @@ function create(string memory name, string memory symbol, address[] memory token } } } + fn into_log_data(self) -> alloy_sol_types::private::LogData { match self { Self::PoolCreated(inner) => { @@ -749,10 +731,10 @@ function create(string memory name, string memory symbol, address[] memory token } } } - use alloy_contract as alloy_contract; + use alloy_contract; /**Creates a new wrapper around an on-chain [`BalancerV2NoProtocolFeeLiquidityBootstrappingPoolFactory`](self) contract instance. -See the [wrapper's documentation](`BalancerV2NoProtocolFeeLiquidityBootstrappingPoolFactoryInstance`) for more details.*/ + See the [wrapper's documentation](`BalancerV2NoProtocolFeeLiquidityBootstrappingPoolFactoryInstance`) for more details.*/ #[inline] pub const fn new< P: alloy_contract::private::Provider, @@ -761,22 +743,21 @@ See the [wrapper's documentation](`BalancerV2NoProtocolFeeLiquidityBootstrapping address: alloy_sol_types::private::Address, __provider: P, ) -> BalancerV2NoProtocolFeeLiquidityBootstrappingPoolFactoryInstance { - BalancerV2NoProtocolFeeLiquidityBootstrappingPoolFactoryInstance::< - P, - N, - >::new(address, __provider) + BalancerV2NoProtocolFeeLiquidityBootstrappingPoolFactoryInstance::::new( + address, __provider, + ) } /**A [`BalancerV2NoProtocolFeeLiquidityBootstrappingPoolFactory`](self) instance. -Contains type-safe methods for interacting with an on-chain instance of the -[`BalancerV2NoProtocolFeeLiquidityBootstrappingPoolFactory`](self) contract located at a given `address`, using a given -provider `P`. + Contains type-safe methods for interacting with an on-chain instance of the + [`BalancerV2NoProtocolFeeLiquidityBootstrappingPoolFactory`](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. + 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.*/ + See the [module-level documentation](self) for all the available methods.*/ #[derive(Clone)] pub struct BalancerV2NoProtocolFeeLiquidityBootstrappingPoolFactoryInstance< P, @@ -788,61 +769,60 @@ See the [module-level documentation](self) for all the available methods.*/ } #[automatically_derived] impl ::core::fmt::Debug - for BalancerV2NoProtocolFeeLiquidityBootstrappingPoolFactoryInstance { + for BalancerV2NoProtocolFeeLiquidityBootstrappingPoolFactoryInstance + { #[inline] fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { - f.debug_tuple( - "BalancerV2NoProtocolFeeLiquidityBootstrappingPoolFactoryInstance", - ) + f.debug_tuple("BalancerV2NoProtocolFeeLiquidityBootstrappingPoolFactoryInstance") .field(&self.address) .finish() } } /// Instantiation and getters/setters. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > BalancerV2NoProtocolFeeLiquidityBootstrappingPoolFactoryInstance { + impl, N: alloy_contract::private::Network> + BalancerV2NoProtocolFeeLiquidityBootstrappingPoolFactoryInstance + { /**Creates a new wrapper around an on-chain [`BalancerV2NoProtocolFeeLiquidityBootstrappingPoolFactory`](self) contract instance. -See the [wrapper's documentation](`BalancerV2NoProtocolFeeLiquidityBootstrappingPoolFactoryInstance`) for more details.*/ + See the [wrapper's documentation](`BalancerV2NoProtocolFeeLiquidityBootstrappingPoolFactoryInstance`) for more details.*/ #[inline] - pub const fn new( - address: alloy_sol_types::private::Address, - __provider: P, - ) -> Self { + pub const fn new(address: alloy_sol_types::private::Address, __provider: P) -> Self { Self { address, provider: __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< - P: ::core::clone::Clone, - N, - > BalancerV2NoProtocolFeeLiquidityBootstrappingPoolFactoryInstance<&P, N> { - /// Clones the provider and returns a new instance with the cloned provider. + impl + BalancerV2NoProtocolFeeLiquidityBootstrappingPoolFactoryInstance<&P, N> + { + /// Clones the provider and returns a new instance with the cloned + /// provider. #[inline] pub fn with_cloned_provider( self, @@ -855,20 +835,22 @@ See the [wrapper's documentation](`BalancerV2NoProtocolFeeLiquidityBootstrapping } } /// Function calls. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > BalancerV2NoProtocolFeeLiquidityBootstrappingPoolFactoryInstance { - /// Creates a new call builder using this contract instance's provider and address. + impl, N: alloy_contract::private::Network> + BalancerV2NoProtocolFeeLiquidityBootstrappingPoolFactoryInstance + { + /// 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. + /// 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 [`create`] function. pub fn create( &self, @@ -882,33 +864,33 @@ See the [wrapper's documentation](`BalancerV2NoProtocolFeeLiquidityBootstrapping owner: alloy_sol_types::private::Address, swapEnabledOnStart: bool, ) -> alloy_contract::SolCallBuilder<&P, createCall, N> { - self.call_builder( - &createCall { - name, - symbol, - tokens, - weights, - swapFeePercentage, - owner, - swapEnabledOnStart, - }, - ) + self.call_builder(&createCall { + name, + symbol, + tokens, + weights, + swapFeePercentage, + owner, + swapEnabledOnStart, + }) } } /// Event filters. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > BalancerV2NoProtocolFeeLiquidityBootstrappingPoolFactoryInstance { - /// Creates a new event filter using this contract instance's provider and address. + impl, N: alloy_contract::private::Network> + BalancerV2NoProtocolFeeLiquidityBootstrappingPoolFactoryInstance + { + /// 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. + /// 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 [`PoolCreated`] event. pub fn PoolCreated_filter(&self) -> alloy_contract::Event<&P, PoolCreated, N> { self.event_filter::() @@ -919,85 +901,49 @@ pub type Instance = BalancerV2NoProtocolFeeLiquidityBootstrappingPoolFactory::Ba ::alloy_provider::DynProvider, >; use { - std::{sync::LazyLock, collections::HashMap}, - anyhow::{Result, Context}, - alloy_primitives::{address, Address}, - alloy_provider::{Provider, DynProvider}, + alloy_primitives::{Address, address}, + alloy_provider::{DynProvider, Provider}, + anyhow::{Context, Result}, + std::{collections::HashMap, sync::LazyLock}, }; pub const fn deployment_info(chain_id: u64) -> Option<(Address, Option)> { match chain_id { - 1u64 => { - Some(( - ::alloy_primitives::address!( - "0x0F3e0c4218b7b0108a3643cFe9D3ec0d4F57c54e" - ), - Some(13730248u64), - )) - } - 10u64 => { - Some(( - ::alloy_primitives::address!( - "0xf302f9F50958c5593770FDf4d4812309fF77414f" - ), - Some(7005915u64), - )) - } - 56u64 => { - Some(( - ::alloy_primitives::address!( - "0xC128468b7Ce63eA702C1f104D55A2566b13D3ABD" - ), - Some(22691243u64), - )) - } - 100u64 => { - Some(( - ::alloy_primitives::address!( - "0x85a80afee867aDf27B50BdB7b76DA70f1E853062" - ), - Some(25415236u64), - )) - } - 137u64 => { - Some(( - ::alloy_primitives::address!( - "0x41B953164995c11C81DA73D212ED8Af25741b7Ac" - ), - Some(22067480u64), - )) - } - 8453u64 => { - Some(( - ::alloy_primitives::address!( - "0x0c6052254551EAe3ECac77B01DFcf1025418828f" - ), - Some(1206531u64), - )) - } - 42161u64 => { - Some(( - ::alloy_primitives::address!( - "0x1802953277FD955f9a254B80Aa0582f193cF1d77" - ), - Some(4859669u64), - )) - } - 43114u64 => { - Some(( - ::alloy_primitives::address!( - "0x0F3e0c4218b7b0108a3643cFe9D3ec0d4F57c54e" - ), - Some(26386552u64), - )) - } - 11155111u64 => { - Some(( - ::alloy_primitives::address!( - "0x45fFd460cC6642B8D8Fb12373DFd77Ceb0f4932B" - ), - Some(3419649u64), - )) - } + 1u64 => Some(( + ::alloy_primitives::address!("0x0F3e0c4218b7b0108a3643cFe9D3ec0d4F57c54e"), + Some(13730248u64), + )), + 10u64 => Some(( + ::alloy_primitives::address!("0xf302f9F50958c5593770FDf4d4812309fF77414f"), + Some(7005915u64), + )), + 56u64 => Some(( + ::alloy_primitives::address!("0xC128468b7Ce63eA702C1f104D55A2566b13D3ABD"), + Some(22691243u64), + )), + 100u64 => Some(( + ::alloy_primitives::address!("0x85a80afee867aDf27B50BdB7b76DA70f1E853062"), + Some(25415236u64), + )), + 137u64 => Some(( + ::alloy_primitives::address!("0x41B953164995c11C81DA73D212ED8Af25741b7Ac"), + Some(22067480u64), + )), + 8453u64 => Some(( + ::alloy_primitives::address!("0x0c6052254551EAe3ECac77B01DFcf1025418828f"), + Some(1206531u64), + )), + 42161u64 => Some(( + ::alloy_primitives::address!("0x1802953277FD955f9a254B80Aa0582f193cF1d77"), + Some(4859669u64), + )), + 43114u64 => Some(( + ::alloy_primitives::address!("0x0F3e0c4218b7b0108a3643cFe9D3ec0d4F57c54e"), + Some(26386552u64), + )), + 11155111u64 => Some(( + ::alloy_primitives::address!("0x45fFd460cC6642B8D8Fb12373DFd77Ceb0f4932B"), + Some(3419649u64), + )), _ => None, } } @@ -1014,9 +960,7 @@ pub const fn deployment_block(chain_id: &u64) -> Option { } } impl Instance { - pub fn deployed( - provider: &DynProvider, - ) -> impl Future> + Send { + pub fn deployed(provider: &DynProvider) -> impl Future> + Send { async move { let chain_id = provider .get_chain_id() diff --git a/contracts/generated/contracts-generated/balancerv2stablepool/src/lib.rs b/contracts/generated/contracts-generated/balancerv2stablepool/src/lib.rs index 093c1e157f..bc74bcee38 100644 --- a/contracts/generated/contracts-generated/balancerv2stablepool/src/lib.rs +++ b/contracts/generated/contracts-generated/balancerv2stablepool/src/lib.rs @@ -1,4 +1,10 @@ -#![allow(unused_imports, unused_attributes, clippy::all, rustdoc::all, non_snake_case)] +#![allow( + unused_imports, + unused_attributes, + clippy::all, + rustdoc::all, + non_snake_case +)] //! Auto-generated contract bindings. Do not edit. /** @@ -522,13 +528,12 @@ interface BalancerV2StablePool { clippy::empty_structs_with_brackets )] pub mod BalancerV2StablePool { - use super::*; - use alloy_sol_types as alloy_sol_types; + use {super::*, alloy_sol_types}; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Event with signature `AmpUpdateStarted(uint256,uint256,uint256,uint256)` and selector `0x1835882ee7a34ac194f717a35e09bb1d24c82a3b9d854ab6c9749525b714cdf2`. -```solidity -event AmpUpdateStarted(uint256 startValue, uint256 endValue, uint256 startTime, uint256 endTime); -```*/ + ```solidity + event AmpUpdateStarted(uint256 startValue, uint256 endValue, uint256 startTime, uint256 endTime); + ```*/ #[allow( non_camel_case_types, non_snake_case, @@ -553,26 +558,27 @@ event AmpUpdateStarted(uint256 startValue, uint256 endValue, uint256 startTime, clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[automatically_derived] impl alloy_sol_types::SolEvent for AmpUpdateStarted { + type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type DataTuple<'a> = ( alloy_sol_types::sol_data::Uint<256>, alloy_sol_types::sol_data::Uint<256>, alloy_sol_types::sol_data::Uint<256>, 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>,); - const SIGNATURE: &'static str = "AmpUpdateStarted(uint256,uint256,uint256,uint256)"; - const SIGNATURE_HASH: alloy_sol_types::private::B256 = alloy_sol_types::private::B256::new([ - 24u8, 53u8, 136u8, 46u8, 231u8, 163u8, 74u8, 193u8, 148u8, 247u8, 23u8, - 163u8, 94u8, 9u8, 187u8, 29u8, 36u8, 200u8, 42u8, 59u8, 157u8, 133u8, - 74u8, 182u8, 201u8, 116u8, 149u8, 37u8, 183u8, 20u8, 205u8, 242u8, - ]); + const ANONYMOUS: bool = false; + const SIGNATURE: &'static str = "AmpUpdateStarted(uint256,uint256,uint256,uint256)"; + const SIGNATURE_HASH: alloy_sol_types::private::B256 = + alloy_sol_types::private::B256::new([ + 24u8, 53u8, 136u8, 46u8, 231u8, 163u8, 74u8, 193u8, 148u8, 247u8, 23u8, 163u8, + 94u8, 9u8, 187u8, 29u8, 36u8, 200u8, 42u8, 59u8, 157u8, 133u8, 74u8, 182u8, + 201u8, 116u8, 149u8, 37u8, 183u8, 20u8, 205u8, 242u8, + ]); + #[allow(unused_variables)] #[inline] fn new( @@ -586,42 +592,44 @@ event AmpUpdateStarted(uint256 startValue, uint256 endValue, uint256 startTime, endTime: data.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, - ), - ); + 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.startValue), - as alloy_sol_types::SolType>::tokenize(&self.endValue), - as alloy_sol_types::SolType>::tokenize(&self.startTime), - as alloy_sol_types::SolType>::tokenize(&self.endTime), + as alloy_sol_types::SolType>::tokenize( + &self.startValue, + ), + as alloy_sol_types::SolType>::tokenize( + &self.endValue, + ), + as alloy_sol_types::SolType>::tokenize( + &self.startTime, + ), + as alloy_sol_types::SolType>::tokenize( + &self.endTime, + ), ) } + #[inline] fn topics(&self) -> ::RustType { (Self::SIGNATURE_HASH.into(),) } + #[inline] fn encode_topics_raw( &self, @@ -630,9 +638,7 @@ event AmpUpdateStarted(uint256 startValue, uint256 endValue, uint256 startTime, if out.len() < ::COUNT { return Err(alloy_sol_types::Error::Overrun); } - out[0usize] = alloy_sol_types::abi::token::WordToken( - Self::SIGNATURE_HASH, - ); + out[0usize] = alloy_sol_types::abi::token::WordToken(Self::SIGNATURE_HASH); Ok(()) } } @@ -641,6 +647,7 @@ event AmpUpdateStarted(uint256 startValue, uint256 endValue, uint256 startTime, 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) } @@ -655,9 +662,9 @@ event AmpUpdateStarted(uint256 startValue, uint256 endValue, uint256 startTime, }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Event with signature `AmpUpdateStopped(uint256)` and selector `0xa0d01593e47e69d07e0ccd87bece09411e07dd1ed40ca8f2e7af2976542a0233`. -```solidity -event AmpUpdateStopped(uint256 currentValue); -```*/ + ```solidity + event AmpUpdateStopped(uint256 currentValue); + ```*/ #[allow( non_camel_case_types, non_snake_case, @@ -676,56 +683,61 @@ event AmpUpdateStopped(uint256 currentValue); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[automatically_derived] impl alloy_sol_types::SolEvent for AmpUpdateStopped { + type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; 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>,); - const SIGNATURE: &'static str = "AmpUpdateStopped(uint256)"; - const SIGNATURE_HASH: alloy_sol_types::private::B256 = alloy_sol_types::private::B256::new([ - 160u8, 208u8, 21u8, 147u8, 228u8, 126u8, 105u8, 208u8, 126u8, 12u8, - 205u8, 135u8, 190u8, 206u8, 9u8, 65u8, 30u8, 7u8, 221u8, 30u8, 212u8, - 12u8, 168u8, 242u8, 231u8, 175u8, 41u8, 118u8, 84u8, 42u8, 2u8, 51u8, - ]); + const ANONYMOUS: bool = false; + const SIGNATURE: &'static str = "AmpUpdateStopped(uint256)"; + const SIGNATURE_HASH: alloy_sol_types::private::B256 = + alloy_sol_types::private::B256::new([ + 160u8, 208u8, 21u8, 147u8, 228u8, 126u8, 105u8, 208u8, 126u8, 12u8, 205u8, + 135u8, 190u8, 206u8, 9u8, 65u8, 30u8, 7u8, 221u8, 30u8, 212u8, 12u8, 168u8, + 242u8, 231u8, 175u8, 41u8, 118u8, 84u8, 42u8, 2u8, 51u8, + ]); + #[allow(unused_variables)] #[inline] fn new( topics: ::RustType, data: as alloy_sol_types::SolType>::RustType, ) -> Self { - Self { currentValue: data.0 } + Self { + currentValue: 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, - ), - ); + 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.currentValue), + as alloy_sol_types::SolType>::tokenize( + &self.currentValue, + ), ) } + #[inline] fn topics(&self) -> ::RustType { (Self::SIGNATURE_HASH.into(),) } + #[inline] fn encode_topics_raw( &self, @@ -734,9 +746,7 @@ event AmpUpdateStopped(uint256 currentValue); if out.len() < ::COUNT { return Err(alloy_sol_types::Error::Overrun); } - out[0usize] = alloy_sol_types::abi::token::WordToken( - Self::SIGNATURE_HASH, - ); + out[0usize] = alloy_sol_types::abi::token::WordToken(Self::SIGNATURE_HASH); Ok(()) } } @@ -745,6 +755,7 @@ event AmpUpdateStopped(uint256 currentValue); 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) } @@ -759,9 +770,9 @@ event AmpUpdateStopped(uint256 currentValue); }; #[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); -```*/ + ```solidity + event Approval(address indexed owner, address indexed spender, uint256 value); + ```*/ #[allow( non_camel_case_types, non_snake_case, @@ -784,25 +795,26 @@ event Approval(address indexed owner, address indexed spender, uint256 value); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[automatically_derived] impl alloy_sol_types::SolEvent for Approval { + type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; 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; + 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, + ]); + #[allow(unused_variables)] #[inline] fn new( @@ -815,33 +827,39 @@ event Approval(address indexed owner, address indexed spender, uint256 value); 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, - ), - ); + 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), + as alloy_sol_types::SolType>::tokenize( + &self.value, + ), ) } + #[inline] fn topics(&self) -> ::RustType { - (Self::SIGNATURE_HASH.into(), self.owner.clone(), self.spender.clone()) + ( + Self::SIGNATURE_HASH.into(), + self.owner.clone(), + self.spender.clone(), + ) } + #[inline] fn encode_topics_raw( &self, @@ -850,9 +868,7 @@ event Approval(address indexed owner, address indexed spender, uint256 value); if out.len() < ::COUNT { return Err(alloy_sol_types::Error::Overrun); } - out[0usize] = alloy_sol_types::abi::token::WordToken( - Self::SIGNATURE_HASH, - ); + out[0usize] = alloy_sol_types::abi::token::WordToken(Self::SIGNATURE_HASH); out[1usize] = ::encode_topic( &self.owner, ); @@ -867,6 +883,7 @@ event Approval(address indexed owner, address indexed spender, uint256 value); 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) } @@ -881,9 +898,9 @@ event Approval(address indexed owner, address indexed spender, uint256 value); }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Event with signature `PausedStateChanged(bool)` and selector `0x9e3a5e37224532dea67b89face185703738a228a6e8a23dee546960180d3be64`. -```solidity -event PausedStateChanged(bool paused); -```*/ + ```solidity + event PausedStateChanged(bool paused); + ```*/ #[allow( non_camel_case_types, non_snake_case, @@ -902,21 +919,22 @@ event PausedStateChanged(bool paused); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[automatically_derived] impl alloy_sol_types::SolEvent for PausedStateChanged { + type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type DataTuple<'a> = (alloy_sol_types::sol_data::Bool,); - type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type TopicList = (alloy_sol_types::sol_data::FixedBytes<32>,); - const SIGNATURE: &'static str = "PausedStateChanged(bool)"; - const SIGNATURE_HASH: alloy_sol_types::private::B256 = alloy_sol_types::private::B256::new([ - 158u8, 58u8, 94u8, 55u8, 34u8, 69u8, 50u8, 222u8, 166u8, 123u8, 137u8, - 250u8, 206u8, 24u8, 87u8, 3u8, 115u8, 138u8, 34u8, 138u8, 110u8, 138u8, - 35u8, 222u8, 229u8, 70u8, 150u8, 1u8, 128u8, 211u8, 190u8, 100u8, - ]); + const ANONYMOUS: bool = false; + const SIGNATURE: &'static str = "PausedStateChanged(bool)"; + const SIGNATURE_HASH: alloy_sol_types::private::B256 = + alloy_sol_types::private::B256::new([ + 158u8, 58u8, 94u8, 55u8, 34u8, 69u8, 50u8, 222u8, 166u8, 123u8, 137u8, 250u8, + 206u8, 24u8, 87u8, 3u8, 115u8, 138u8, 34u8, 138u8, 110u8, 138u8, 35u8, 222u8, + 229u8, 70u8, 150u8, 1u8, 128u8, 211u8, 190u8, 100u8, + ]); + #[allow(unused_variables)] #[inline] fn new( @@ -925,21 +943,21 @@ event PausedStateChanged(bool paused); ) -> Self { Self { paused: 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, - ), - ); + 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<'_> { ( @@ -948,10 +966,12 @@ event PausedStateChanged(bool paused); ), ) } + #[inline] fn topics(&self) -> ::RustType { (Self::SIGNATURE_HASH.into(),) } + #[inline] fn encode_topics_raw( &self, @@ -960,9 +980,7 @@ event PausedStateChanged(bool paused); if out.len() < ::COUNT { return Err(alloy_sol_types::Error::Overrun); } - out[0usize] = alloy_sol_types::abi::token::WordToken( - Self::SIGNATURE_HASH, - ); + out[0usize] = alloy_sol_types::abi::token::WordToken(Self::SIGNATURE_HASH); Ok(()) } } @@ -971,6 +989,7 @@ event PausedStateChanged(bool 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) } @@ -985,9 +1004,9 @@ event PausedStateChanged(bool paused); }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Event with signature `SwapFeePercentageChanged(uint256)` and selector `0xa9ba3ffe0b6c366b81232caab38605a0699ad5398d6cce76f91ee809e322dafc`. -```solidity -event SwapFeePercentageChanged(uint256 swapFeePercentage); -```*/ + ```solidity + event SwapFeePercentageChanged(uint256 swapFeePercentage); + ```*/ #[allow( non_camel_case_types, non_snake_case, @@ -1006,56 +1025,61 @@ event SwapFeePercentageChanged(uint256 swapFeePercentage); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[automatically_derived] impl alloy_sol_types::SolEvent for SwapFeePercentageChanged { + type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; 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>,); - const SIGNATURE: &'static str = "SwapFeePercentageChanged(uint256)"; - const SIGNATURE_HASH: alloy_sol_types::private::B256 = alloy_sol_types::private::B256::new([ - 169u8, 186u8, 63u8, 254u8, 11u8, 108u8, 54u8, 107u8, 129u8, 35u8, 44u8, - 170u8, 179u8, 134u8, 5u8, 160u8, 105u8, 154u8, 213u8, 57u8, 141u8, 108u8, - 206u8, 118u8, 249u8, 30u8, 232u8, 9u8, 227u8, 34u8, 218u8, 252u8, - ]); + const ANONYMOUS: bool = false; + const SIGNATURE: &'static str = "SwapFeePercentageChanged(uint256)"; + const SIGNATURE_HASH: alloy_sol_types::private::B256 = + alloy_sol_types::private::B256::new([ + 169u8, 186u8, 63u8, 254u8, 11u8, 108u8, 54u8, 107u8, 129u8, 35u8, 44u8, 170u8, + 179u8, 134u8, 5u8, 160u8, 105u8, 154u8, 213u8, 57u8, 141u8, 108u8, 206u8, + 118u8, 249u8, 30u8, 232u8, 9u8, 227u8, 34u8, 218u8, 252u8, + ]); + #[allow(unused_variables)] #[inline] fn new( topics: ::RustType, data: as alloy_sol_types::SolType>::RustType, ) -> Self { - Self { swapFeePercentage: data.0 } + Self { + swapFeePercentage: 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, - ), - ); + 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.swapFeePercentage), + as alloy_sol_types::SolType>::tokenize( + &self.swapFeePercentage, + ), ) } + #[inline] fn topics(&self) -> ::RustType { (Self::SIGNATURE_HASH.into(),) } + #[inline] fn encode_topics_raw( &self, @@ -1064,9 +1088,7 @@ event SwapFeePercentageChanged(uint256 swapFeePercentage); if out.len() < ::COUNT { return Err(alloy_sol_types::Error::Overrun); } - out[0usize] = alloy_sol_types::abi::token::WordToken( - Self::SIGNATURE_HASH, - ); + out[0usize] = alloy_sol_types::abi::token::WordToken(Self::SIGNATURE_HASH); Ok(()) } } @@ -1075,6 +1097,7 @@ event SwapFeePercentageChanged(uint256 swapFeePercentage); 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) } @@ -1082,18 +1105,16 @@ event SwapFeePercentageChanged(uint256 swapFeePercentage); #[automatically_derived] impl From<&SwapFeePercentageChanged> for alloy_sol_types::private::LogData { #[inline] - fn from( - this: &SwapFeePercentageChanged, - ) -> alloy_sol_types::private::LogData { + fn from(this: &SwapFeePercentageChanged) -> alloy_sol_types::private::LogData { alloy_sol_types::SolEvent::encode_log_data(this) } } }; #[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); -```*/ + ```solidity + event Transfer(address indexed from, address indexed to, uint256 value); + ```*/ #[allow( non_camel_case_types, non_snake_case, @@ -1116,25 +1137,26 @@ event Transfer(address indexed from, address indexed to, uint256 value); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[automatically_derived] impl alloy_sol_types::SolEvent for Transfer { + type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; 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; + 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, + ]); + #[allow(unused_variables)] #[inline] fn new( @@ -1147,33 +1169,39 @@ event Transfer(address indexed from, address indexed to, uint256 value); 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, - ), - ); + 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), + as alloy_sol_types::SolType>::tokenize( + &self.value, + ), ) } + #[inline] fn topics(&self) -> ::RustType { - (Self::SIGNATURE_HASH.into(), self.from.clone(), self.to.clone()) + ( + Self::SIGNATURE_HASH.into(), + self.from.clone(), + self.to.clone(), + ) } + #[inline] fn encode_topics_raw( &self, @@ -1182,9 +1210,7 @@ event Transfer(address indexed from, address indexed to, uint256 value); if out.len() < ::COUNT { return Err(alloy_sol_types::Error::Overrun); } - out[0usize] = alloy_sol_types::abi::token::WordToken( - Self::SIGNATURE_HASH, - ); + out[0usize] = alloy_sol_types::abi::token::WordToken(Self::SIGNATURE_HASH); out[1usize] = ::encode_topic( &self.from, ); @@ -1199,6 +1225,7 @@ event Transfer(address indexed from, address indexed to, uint256 value); 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) } @@ -1212,9 +1239,9 @@ event Transfer(address indexed from, address indexed to, uint256 value); } }; /**Constructor`. -```solidity -constructor(address vault, string name, string symbol, address[] tokens, uint256 amplificationParameter, uint256 swapFeePercentage, uint256 pauseWindowDuration, uint256 bufferPeriodDuration, address owner); -```*/ + ```solidity + constructor(address vault, string name, string symbol, address[] tokens, uint256 amplificationParameter, uint256 swapFeePercentage, uint256 pauseWindowDuration, uint256 bufferPeriodDuration, address owner); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct constructorCall { @@ -1238,7 +1265,7 @@ constructor(address vault, string name, string symbol, address[] tokens, uint256 pub owner: alloy_sol_types::private::Address, } const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -1267,9 +1294,7 @@ constructor(address vault, string name, string symbol, address[] tokens, uint256 ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1324,15 +1349,15 @@ constructor(address vault, string name, string symbol, address[] tokens, uint256 alloy_sol_types::sol_data::Uint<256>, alloy_sol_types::sol_data::Address, ); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + 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<'_> { ( @@ -1371,14 +1396,15 @@ constructor(address vault, string name, string symbol, address[] tokens, uint256 }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `DOMAIN_SEPARATOR()` and selector `0x3644e515`. -```solidity -function DOMAIN_SEPARATOR() external view returns (bytes32); -```*/ + ```solidity + function DOMAIN_SEPARATOR() external view returns (bytes32); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct DOMAIN_SEPARATORCall; #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`DOMAIN_SEPARATOR()`](DOMAIN_SEPARATORCall) function. + ///Container type for the return parameters of the + /// [`DOMAIN_SEPARATOR()`](DOMAIN_SEPARATORCall) function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct DOMAIN_SEPARATORReturn { @@ -1392,7 +1418,7 @@ function DOMAIN_SEPARATOR() external view returns (bytes32); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -1401,9 +1427,7 @@ function DOMAIN_SEPARATOR() external view returns (bytes32); type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1412,16 +1436,14 @@ function DOMAIN_SEPARATOR() external view returns (bytes32); } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From - for UnderlyingRustTuple<'_> { + impl ::core::convert::From for UnderlyingRustTuple<'_> { fn from(value: DOMAIN_SEPARATORCall) -> Self { () } } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From> - for DOMAIN_SEPARATORCall { + impl ::core::convert::From> for DOMAIN_SEPARATORCall { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { Self } @@ -1435,9 +1457,7 @@ function DOMAIN_SEPARATOR() external view returns (bytes32); 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, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1446,16 +1466,14 @@ function DOMAIN_SEPARATOR() external view returns (bytes32); } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From - for UnderlyingRustTuple<'_> { + impl ::core::convert::From for UnderlyingRustTuple<'_> { fn from(value: DOMAIN_SEPARATORReturn) -> Self { (value._0,) } } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From> - for DOMAIN_SEPARATORReturn { + impl ::core::convert::From> for DOMAIN_SEPARATORReturn { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { Self { _0: tuple.0 } } @@ -1464,26 +1482,26 @@ function DOMAIN_SEPARATOR() external view returns (bytes32); #[automatically_derived] impl alloy_sol_types::SolCall for DOMAIN_SEPARATORCall { type Parameters<'a> = (); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = alloy_sol_types::private::FixedBytes<32>; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (alloy_sol_types::sol_data::FixedBytes<32>,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "DOMAIN_SEPARATOR()"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [54u8, 68u8, 229u8, 21u8]; + const SIGNATURE: &'static str = "DOMAIN_SEPARATOR()"; + #[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<'_> { ( @@ -1492,35 +1510,34 @@ function DOMAIN_SEPARATOR() external view returns (bytes32); > 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| { + as alloy_sol_types::SolType>::abi_decode_sequence(data).map( + |r| { let r: DOMAIN_SEPARATORReturn = 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: DOMAIN_SEPARATORReturn = r.into(); - r._0 - }) + 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: DOMAIN_SEPARATORReturn = r.into(); + r._0 + }) } } }; #[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); -```*/ + ```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 { @@ -1530,7 +1547,8 @@ function allowance(address owner, address spender) external view returns (uint25 pub spender: alloy_sol_types::private::Address, } #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`allowance(address,address)`](allowanceCall) function. + ///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 { @@ -1544,7 +1562,7 @@ function allowance(address owner, address spender) external view returns (uint25 clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -1559,9 +1577,7 @@ function allowance(address owner, address spender) external view returns (uint25 ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1591,14 +1607,10 @@ function allowance(address owner, address spender) external view returns (uint25 #[allow(dead_code)] type UnderlyingSolTuple<'a> = (alloy_sol_types::sol_data::Uint<256>,); #[doc(hidden)] - type UnderlyingRustTuple<'a> = ( - alloy_sol_types::private::primitives::aliases::U256, - ); + 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, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1626,22 +1638,21 @@ function allowance(address owner, address spender) external view returns (uint25 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 ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; 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)"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [221u8, 98u8, 237u8, 62u8]; + const SIGNATURE: &'static str = "allowance(address,address)"; + #[inline] fn new<'a>( tuple: as alloy_sol_types::SolType>::RustType, ) -> Self { tuple.into() } + #[inline] fn tokenize(&self) -> Self::Token<'_> { ( @@ -1653,43 +1664,43 @@ function allowance(address owner, address spender) external view returns (uint25 ), ) } + #[inline] fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { ( - as alloy_sol_types::SolType>::tokenize(ret), + 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| { + 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 - }) + 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(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `approve(address,uint256)` and selector `0x095ea7b3`. -```solidity -function approve(address spender, uint256 amount) external returns (bool); -```*/ + ```solidity + function approve(address spender, uint256 amount) external returns (bool); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct approveCall { @@ -1699,7 +1710,8 @@ function approve(address spender, uint256 amount) external returns (bool); pub amount: alloy_sol_types::private::primitives::aliases::U256, } #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`approve(address,uint256)`](approveCall) function. + ///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 { @@ -1713,7 +1725,7 @@ function approve(address spender, uint256 amount) external returns (bool); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -1728,9 +1740,7 @@ function approve(address spender, uint256 amount) external returns (bool); ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1763,9 +1773,7 @@ function approve(address spender, uint256 amount) external returns (bool); type UnderlyingRustTuple<'a> = (bool,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1793,70 +1801,65 @@ function approve(address spender, uint256 amount) external returns (bool); 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 ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; 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)"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [9u8, 94u8, 167u8, 179u8]; + const SIGNATURE: &'static str = "approve(address,uint256)"; + #[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.amount), + as alloy_sol_types::SolType>::tokenize( + &self.amount, + ), ) } + #[inline] fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { - ( - ::tokenize( - ret, - ), - ) + (::tokenize(ret),) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) - .map(|r| { + 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 - }) + 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(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `balanceOf(address)` and selector `0x70a08231`. -```solidity -function balanceOf(address account) external view returns (uint256); -```*/ + ```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 { @@ -1864,7 +1867,8 @@ function balanceOf(address account) external view returns (uint256); pub account: alloy_sol_types::private::Address, } #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`balanceOf(address)`](balanceOfCall) function. + ///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 { @@ -1878,7 +1882,7 @@ function balanceOf(address account) external view returns (uint256); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -1887,9 +1891,7 @@ function balanceOf(address account) external view returns (uint256); type UnderlyingRustTuple<'a> = (alloy_sol_types::private::Address,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1916,14 +1918,10 @@ function balanceOf(address account) external view returns (uint256); #[allow(dead_code)] type UnderlyingSolTuple<'a> = (alloy_sol_types::sol_data::Uint<256>,); #[doc(hidden)] - type UnderlyingRustTuple<'a> = ( - alloy_sol_types::private::primitives::aliases::U256, - ); + 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, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1948,22 +1946,21 @@ function balanceOf(address account) external view returns (uint256); #[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 ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; 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)"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [112u8, 160u8, 130u8, 49u8]; + const SIGNATURE: &'static str = "balanceOf(address)"; + #[inline] fn new<'a>( tuple: as alloy_sol_types::SolType>::RustType, ) -> Self { tuple.into() } + #[inline] fn tokenize(&self) -> Self::Token<'_> { ( @@ -1972,48 +1969,49 @@ function balanceOf(address account) external view returns (uint256); ), ) } + #[inline] fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { ( - as alloy_sol_types::SolType>::tokenize(ret), + 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| { + 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 - }) + 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(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `decimals()` and selector `0x313ce567`. -```solidity -function decimals() external view returns (uint8); -```*/ + ```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(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`decimals()`](decimalsCall) function. + ///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 { @@ -2027,7 +2025,7 @@ function decimals() external view returns (uint8); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -2036,9 +2034,7 @@ function decimals() external view returns (uint8); type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -2068,9 +2064,7 @@ function decimals() external view returns (uint8); type UnderlyingRustTuple<'a> = (u8,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -2095,68 +2089,64 @@ function decimals() external view returns (uint8); #[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 ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; 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()"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [49u8, 60u8, 229u8, 103u8]; + const SIGNATURE: &'static str = "decimals()"; + #[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), - ) + ( 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| { + 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 - }) + 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(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `getAmplificationParameter()` and selector `0x6daccffa`. -```solidity -function getAmplificationParameter() external view returns (uint256 value, bool isUpdating, uint256 precision); -```*/ + ```solidity + function getAmplificationParameter() external view returns (uint256 value, bool isUpdating, uint256 precision); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct getAmplificationParameterCall; #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`getAmplificationParameter()`](getAmplificationParameterCall) function. + ///Container type for the return parameters of the + /// [`getAmplificationParameter()`](getAmplificationParameterCall) function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct getAmplificationParameterReturn { @@ -2174,7 +2164,7 @@ function getAmplificationParameter() external view returns (uint256 value, bool clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -2183,9 +2173,7 @@ function getAmplificationParameter() external view returns (uint256 value, bool type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -2194,16 +2182,14 @@ function getAmplificationParameter() external view returns (uint256 value, bool } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From - for UnderlyingRustTuple<'_> { + impl ::core::convert::From for UnderlyingRustTuple<'_> { fn from(value: getAmplificationParameterCall) -> Self { () } } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From> - for getAmplificationParameterCall { + impl ::core::convert::From> for getAmplificationParameterCall { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { Self } @@ -2225,9 +2211,7 @@ function getAmplificationParameter() external view returns (uint256 value, bool ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -2236,16 +2220,14 @@ function getAmplificationParameter() external view returns (uint256 value, bool } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From - for UnderlyingRustTuple<'_> { + impl ::core::convert::From for UnderlyingRustTuple<'_> { fn from(value: getAmplificationParameterReturn) -> Self { (value.value, value.isUpdating, value.precision) } } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From> - for getAmplificationParameterReturn { + impl ::core::convert::From> for getAmplificationParameterReturn { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { Self { value: tuple.0, @@ -2258,81 +2240,79 @@ function getAmplificationParameter() external view returns (uint256 value, bool impl getAmplificationParameterReturn { fn _tokenize( &self, - ) -> ::ReturnToken< - '_, - > { + ) -> ::ReturnToken<'_> + { ( - as alloy_sol_types::SolType>::tokenize(&self.value), + as alloy_sol_types::SolType>::tokenize( + &self.value, + ), ::tokenize( &self.isUpdating, ), - as alloy_sol_types::SolType>::tokenize(&self.precision), + as alloy_sol_types::SolType>::tokenize( + &self.precision, + ), ) } } #[automatically_derived] impl alloy_sol_types::SolCall for getAmplificationParameterCall { type Parameters<'a> = (); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = getAmplificationParameterReturn; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = ( alloy_sol_types::sol_data::Uint<256>, alloy_sol_types::sol_data::Bool, alloy_sol_types::sol_data::Uint<256>, ); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "getAmplificationParameter()"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [109u8, 172u8, 207u8, 250u8]; + const SIGNATURE: &'static str = "getAmplificationParameter()"; + #[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<'_> { getAmplificationParameterReturn::_tokenize(ret) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) + 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) + 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(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `getPausedState()` and selector `0x1c0de051`. -```solidity -function getPausedState() external view returns (bool paused, uint256 pauseWindowEndTime, uint256 bufferPeriodEndTime); -```*/ + ```solidity + function getPausedState() external view returns (bool paused, uint256 pauseWindowEndTime, uint256 bufferPeriodEndTime); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct getPausedStateCall; #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`getPausedState()`](getPausedStateCall) function. + ///Container type for the return parameters of the + /// [`getPausedState()`](getPausedStateCall) function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct getPausedStateReturn { @@ -2350,7 +2330,7 @@ function getPausedState() external view returns (bool paused, uint256 pauseWindo clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -2359,9 +2339,7 @@ function getPausedState() external view returns (bool paused, uint256 pauseWindo type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -2399,9 +2377,7 @@ function getPausedState() external view returns (bool paused, uint256 pauseWindo ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -2410,16 +2386,18 @@ function getPausedState() external view returns (bool paused, uint256 pauseWindo } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From - for UnderlyingRustTuple<'_> { + impl ::core::convert::From for UnderlyingRustTuple<'_> { fn from(value: getPausedStateReturn) -> Self { - (value.paused, value.pauseWindowEndTime, value.bufferPeriodEndTime) + ( + value.paused, + value.pauseWindowEndTime, + value.bufferPeriodEndTime, + ) } } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From> - for getPausedStateReturn { + impl ::core::convert::From> for getPausedStateReturn { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { Self { paused: tuple.0, @@ -2437,74 +2415,73 @@ function getPausedState() external view returns (bool paused, uint256 pauseWindo ::tokenize( &self.paused, ), - as alloy_sol_types::SolType>::tokenize(&self.pauseWindowEndTime), - as alloy_sol_types::SolType>::tokenize(&self.bufferPeriodEndTime), + as alloy_sol_types::SolType>::tokenize( + &self.pauseWindowEndTime, + ), + as alloy_sol_types::SolType>::tokenize( + &self.bufferPeriodEndTime, + ), ) } } #[automatically_derived] impl alloy_sol_types::SolCall for getPausedStateCall { type Parameters<'a> = (); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = getPausedStateReturn; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = ( alloy_sol_types::sol_data::Bool, alloy_sol_types::sol_data::Uint<256>, alloy_sol_types::sol_data::Uint<256>, ); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "getPausedState()"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [28u8, 13u8, 224u8, 81u8]; + const SIGNATURE: &'static str = "getPausedState()"; + #[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<'_> { getPausedStateReturn::_tokenize(ret) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) + 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) + 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(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `getPoolId()` and selector `0x38fff2d0`. -```solidity -function getPoolId() external view returns (bytes32); -```*/ + ```solidity + function getPoolId() external view returns (bytes32); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct getPoolIdCall; #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`getPoolId()`](getPoolIdCall) function. + ///Container type for the return parameters of the + /// [`getPoolId()`](getPoolIdCall) function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct getPoolIdReturn { @@ -2518,7 +2495,7 @@ function getPoolId() external view returns (bytes32); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -2527,9 +2504,7 @@ function getPoolId() external view returns (bytes32); type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -2559,9 +2534,7 @@ function getPoolId() external view returns (bytes32); 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, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -2586,26 +2559,26 @@ function getPoolId() external view returns (bytes32); #[automatically_derived] impl alloy_sol_types::SolCall for getPoolIdCall { type Parameters<'a> = (); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = alloy_sol_types::private::FixedBytes<32>; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (alloy_sol_types::sol_data::FixedBytes<32>,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "getPoolId()"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [56u8, 255u8, 242u8, 208u8]; + const SIGNATURE: &'static str = "getPoolId()"; + #[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<'_> { ( @@ -2614,40 +2587,40 @@ function getPoolId() external view returns (bytes32); > 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| { + as alloy_sol_types::SolType>::abi_decode_sequence(data).map( + |r| { let r: getPoolIdReturn = 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: getPoolIdReturn = r.into(); - r._0 - }) + 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: getPoolIdReturn = r.into(); + r._0 + }) } } }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `getSwapFeePercentage()` and selector `0x55c67628`. -```solidity -function getSwapFeePercentage() external view returns (uint256); -```*/ + ```solidity + function getSwapFeePercentage() external view returns (uint256); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct getSwapFeePercentageCall; #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`getSwapFeePercentage()`](getSwapFeePercentageCall) function. + ///Container type for the return parameters of the + /// [`getSwapFeePercentage()`](getSwapFeePercentageCall) function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct getSwapFeePercentageReturn { @@ -2661,7 +2634,7 @@ function getSwapFeePercentage() external view returns (uint256); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -2670,9 +2643,7 @@ function getSwapFeePercentage() external view returns (uint256); type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -2681,16 +2652,14 @@ function getSwapFeePercentage() external view returns (uint256); } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From - for UnderlyingRustTuple<'_> { + impl ::core::convert::From for UnderlyingRustTuple<'_> { fn from(value: getSwapFeePercentageCall) -> Self { () } } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From> - for getSwapFeePercentageCall { + impl ::core::convert::From> for getSwapFeePercentageCall { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { Self } @@ -2701,14 +2670,10 @@ function getSwapFeePercentage() external view returns (uint256); #[allow(dead_code)] type UnderlyingSolTuple<'a> = (alloy_sol_types::sol_data::Uint<256>,); #[doc(hidden)] - type UnderlyingRustTuple<'a> = ( - alloy_sol_types::private::primitives::aliases::U256, - ); + 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, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -2717,16 +2682,14 @@ function getSwapFeePercentage() external view returns (uint256); } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From - for UnderlyingRustTuple<'_> { + impl ::core::convert::From for UnderlyingRustTuple<'_> { fn from(value: getSwapFeePercentageReturn) -> Self { (value._0,) } } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From> - for getSwapFeePercentageReturn { + impl ::core::convert::From> for getSwapFeePercentageReturn { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { Self { _0: tuple.0 } } @@ -2735,68 +2698,68 @@ function getSwapFeePercentage() external view returns (uint256); #[automatically_derived] impl alloy_sol_types::SolCall for getSwapFeePercentageCall { type Parameters<'a> = (); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = alloy_sol_types::private::primitives::aliases::U256; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (alloy_sol_types::sol_data::Uint<256>,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "getSwapFeePercentage()"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [85u8, 198u8, 118u8, 40u8]; + const SIGNATURE: &'static str = "getSwapFeePercentage()"; + #[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), + 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| { + as alloy_sol_types::SolType>::abi_decode_sequence(data).map( + |r| { let r: getSwapFeePercentageReturn = 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: getSwapFeePercentageReturn = r.into(); - r._0 - }) + 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: getSwapFeePercentageReturn = r.into(); + r._0 + }) } } }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `name()` and selector `0x06fdde03`. -```solidity -function name() external view returns (string memory); -```*/ + ```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(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`name()`](nameCall) function. + ///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 { @@ -2810,7 +2773,7 @@ function name() external view returns (string memory); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -2819,9 +2782,7 @@ function name() external view returns (string memory); type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -2851,9 +2812,7 @@ function name() external view returns (string memory); type UnderlyingRustTuple<'a> = (alloy_sol_types::private::String,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -2878,63 +2837,58 @@ function name() external view returns (string memory); #[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 ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (alloy_sol_types::sol_data::String,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "name()"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [6u8, 253u8, 222u8, 3u8]; + const SIGNATURE: &'static str = "name()"; + #[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, - ), - ) + (::tokenize(ret),) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) - .map(|r| { + 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 - }) + 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(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `nonces(address)` and selector `0x7ecebe00`. -```solidity -function nonces(address owner) external view returns (uint256); -```*/ + ```solidity + function nonces(address owner) external view returns (uint256); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct noncesCall { @@ -2942,7 +2896,8 @@ function nonces(address owner) external view returns (uint256); pub owner: alloy_sol_types::private::Address, } #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`nonces(address)`](noncesCall) function. + ///Container type for the return parameters of the + /// [`nonces(address)`](noncesCall) function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct noncesReturn { @@ -2956,7 +2911,7 @@ function nonces(address owner) external view returns (uint256); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -2965,9 +2920,7 @@ function nonces(address owner) external view returns (uint256); type UnderlyingRustTuple<'a> = (alloy_sol_types::private::Address,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -2994,14 +2947,10 @@ function nonces(address owner) external view returns (uint256); #[allow(dead_code)] type UnderlyingSolTuple<'a> = (alloy_sol_types::sol_data::Uint<256>,); #[doc(hidden)] - type UnderlyingRustTuple<'a> = ( - alloy_sol_types::private::primitives::aliases::U256, - ); + 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, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -3026,22 +2975,21 @@ function nonces(address owner) external view returns (uint256); #[automatically_derived] impl alloy_sol_types::SolCall for noncesCall { 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 ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (alloy_sol_types::sol_data::Uint<256>,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "nonces(address)"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [126u8, 206u8, 190u8, 0u8]; + const SIGNATURE: &'static str = "nonces(address)"; + #[inline] fn new<'a>( tuple: as alloy_sol_types::SolType>::RustType, ) -> Self { tuple.into() } + #[inline] fn tokenize(&self) -> Self::Token<'_> { ( @@ -3050,43 +2998,43 @@ function nonces(address owner) external view returns (uint256); ), ) } + #[inline] fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { ( - as alloy_sol_types::SolType>::tokenize(ret), + 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| { + as alloy_sol_types::SolType>::abi_decode_sequence(data).map( + |r| { let r: noncesReturn = 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: noncesReturn = r.into(); - r._0 - }) + 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: noncesReturn = r.into(); + r._0 + }) } } }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `permit(address,address,uint256,uint256,uint8,bytes32,bytes32)` and selector `0xd505accf`. -```solidity -function permit(address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) external; -```*/ + ```solidity + function permit(address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) external; + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct permitCall { @@ -3105,7 +3053,9 @@ function permit(address owner, address spender, uint256 value, uint256 deadline, #[allow(missing_docs)] pub s: alloy_sol_types::private::FixedBytes<32>, } - ///Container type for the return parameters of the [`permit(address,address,uint256,uint256,uint8,bytes32,bytes32)`](permitCall) function. + ///Container type for the return parameters of the + /// [`permit(address,address,uint256,uint256,uint8,bytes32, + /// bytes32)`](permitCall) function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct permitReturn {} @@ -3116,7 +3066,7 @@ function permit(address owner, address spender, uint256 value, uint256 deadline, clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -3141,9 +3091,7 @@ function permit(address owner, address spender, uint256 value, uint256 deadline, ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -3189,9 +3137,7 @@ function permit(address owner, address spender, uint256 value, uint256 deadline, type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -3214,9 +3160,7 @@ function permit(address owner, address spender, uint256 value, uint256 deadline, } } impl permitReturn { - fn _tokenize( - &self, - ) -> ::ReturnToken<'_> { + fn _tokenize(&self) -> ::ReturnToken<'_> { () } } @@ -3231,22 +3175,22 @@ function permit(address owner, address spender, uint256 value, uint256 deadline, alloy_sol_types::sol_data::FixedBytes<32>, alloy_sol_types::sol_data::FixedBytes<32>, ); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = permitReturn; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "permit(address,address,uint256,uint256,uint8,bytes32,bytes32)"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [213u8, 5u8, 172u8, 207u8]; + const SIGNATURE: &'static str = + "permit(address,address,uint256,uint256,uint8,bytes32,bytes32)"; + #[inline] fn new<'a>( tuple: as alloy_sol_types::SolType>::RustType, ) -> Self { tuple.into() } + #[inline] fn tokenize(&self) -> Self::Token<'_> { ( @@ -3273,38 +3217,38 @@ function permit(address owner, address spender, uint256 value, uint256 deadline, > as alloy_sol_types::SolType>::tokenize(&self.s), ) } + #[inline] fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { permitReturn::_tokenize(ret) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) + 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) + 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(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `symbol()` and selector `0x95d89b41`. -```solidity -function symbol() external view returns (string memory); -```*/ + ```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(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`symbol()`](symbolCall) function. + ///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 { @@ -3318,7 +3262,7 @@ function symbol() external view returns (string memory); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -3327,9 +3271,7 @@ function symbol() external view returns (string memory); type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -3359,9 +3301,7 @@ function symbol() external view returns (string memory); type UnderlyingRustTuple<'a> = (alloy_sol_types::private::String,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -3386,63 +3326,58 @@ function symbol() external view returns (string memory); #[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 ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (alloy_sol_types::sol_data::String,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "symbol()"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [149u8, 216u8, 155u8, 65u8]; + const SIGNATURE: &'static str = "symbol()"; + #[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, - ), - ) + (::tokenize(ret),) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) - .map(|r| { + 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 - }) + 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(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `transfer(address,uint256)` and selector `0xa9059cbb`. -```solidity -function transfer(address recipient, uint256 amount) external returns (bool); -```*/ + ```solidity + function transfer(address recipient, uint256 amount) external returns (bool); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct transferCall { @@ -3452,7 +3387,8 @@ function transfer(address recipient, uint256 amount) external returns (bool); pub amount: alloy_sol_types::private::primitives::aliases::U256, } #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`transfer(address,uint256)`](transferCall) function. + ///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 { @@ -3466,7 +3402,7 @@ function transfer(address recipient, uint256 amount) external returns (bool); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -3481,9 +3417,7 @@ function transfer(address recipient, uint256 amount) external returns (bool); ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -3516,9 +3450,7 @@ function transfer(address recipient, uint256 amount) external returns (bool); type UnderlyingRustTuple<'a> = (bool,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -3546,70 +3478,65 @@ function transfer(address recipient, uint256 amount) external returns (bool); 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 ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; 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)"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [169u8, 5u8, 156u8, 187u8]; + const SIGNATURE: &'static str = "transfer(address,uint256)"; + #[inline] fn new<'a>( tuple: as alloy_sol_types::SolType>::RustType, ) -> Self { tuple.into() } + #[inline] fn tokenize(&self) -> Self::Token<'_> { ( ::tokenize( &self.recipient, ), - as alloy_sol_types::SolType>::tokenize(&self.amount), + as alloy_sol_types::SolType>::tokenize( + &self.amount, + ), ) } + #[inline] fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { - ( - ::tokenize( - ret, - ), - ) + (::tokenize(ret),) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) - .map(|r| { + 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 - }) + 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(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `transferFrom(address,address,uint256)` and selector `0x23b872dd`. -```solidity -function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); -```*/ + ```solidity + function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct transferFromCall { @@ -3621,7 +3548,8 @@ function transferFrom(address sender, address recipient, uint256 amount) externa pub amount: alloy_sol_types::private::primitives::aliases::U256, } #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`transferFrom(address,address,uint256)`](transferFromCall) function. + ///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 { @@ -3635,7 +3563,7 @@ function transferFrom(address sender, address recipient, uint256 amount) externa clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -3652,9 +3580,7 @@ function transferFrom(address sender, address recipient, uint256 amount) externa ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -3688,9 +3614,7 @@ function transferFrom(address sender, address recipient, uint256 amount) externa type UnderlyingRustTuple<'a> = (bool,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -3719,22 +3643,21 @@ function transferFrom(address sender, address recipient, uint256 amount) externa 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 ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; 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)"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [35u8, 184u8, 114u8, 221u8]; + const SIGNATURE: &'static str = "transferFrom(address,address,uint256)"; + #[inline] fn new<'a>( tuple: as alloy_sol_types::SolType>::RustType, ) -> Self { tuple.into() } + #[inline] fn tokenize(&self) -> Self::Token<'_> { ( @@ -3744,46 +3667,41 @@ function transferFrom(address sender, address recipient, uint256 amount) externa ::tokenize( &self.recipient, ), - as alloy_sol_types::SolType>::tokenize(&self.amount), + as alloy_sol_types::SolType>::tokenize( + &self.amount, + ), ) } + #[inline] fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { - ( - ::tokenize( - ret, - ), - ) + (::tokenize(ret),) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) - .map(|r| { + 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 - }) + 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 + }) } } }; ///Container for all the [`BalancerV2StablePool`](self) function calls. #[derive(Clone)] - #[derive()] pub enum BalancerV2StablePoolCalls { #[allow(missing_docs)] DOMAIN_SEPARATOR(DOMAIN_SEPARATORCall), @@ -3819,8 +3737,9 @@ function transferFrom(address sender, address recipient, uint256 amount) externa impl BalancerV2StablePoolCalls { /// 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. + /// 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]] = &[ @@ -3840,24 +3759,6 @@ function transferFrom(address sender, address recipient, uint256 amount) externa [213u8, 5u8, 172u8, 207u8], [221u8, 98u8, 237u8, 62u8], ]; - /// The names of the variants in the same order as `SELECTORS`. - pub const VARIANT_NAMES: &'static [&'static str] = &[ - ::core::stringify!(name), - ::core::stringify!(approve), - ::core::stringify!(getPausedState), - ::core::stringify!(transferFrom), - ::core::stringify!(decimals), - ::core::stringify!(DOMAIN_SEPARATOR), - ::core::stringify!(getPoolId), - ::core::stringify!(getSwapFeePercentage), - ::core::stringify!(getAmplificationParameter), - ::core::stringify!(balanceOf), - ::core::stringify!(nonces), - ::core::stringify!(symbol), - ::core::stringify!(transfer), - ::core::stringify!(permit), - ::core::stringify!(allowance), - ]; /// The signatures in the same order as `SELECTORS`. pub const SIGNATURES: &'static [&'static str] = &[ ::SIGNATURE, @@ -3876,6 +3777,25 @@ function transferFrom(address sender, address recipient, uint256 amount) externa ::SIGNATURE, ::SIGNATURE, ]; + /// The names of the variants in the same order as `SELECTORS`. + pub const VARIANT_NAMES: &'static [&'static str] = &[ + ::core::stringify!(name), + ::core::stringify!(approve), + ::core::stringify!(getPausedState), + ::core::stringify!(transferFrom), + ::core::stringify!(decimals), + ::core::stringify!(DOMAIN_SEPARATOR), + ::core::stringify!(getPoolId), + ::core::stringify!(getSwapFeePercentage), + ::core::stringify!(getAmplificationParameter), + ::core::stringify!(balanceOf), + ::core::stringify!(nonces), + ::core::stringify!(symbol), + ::core::stringify!(transfer), + ::core::stringify!(permit), + ::core::stringify!(allowance), + ]; + /// Returns the signature for the given selector, if known. #[inline] pub fn signature_by_selector( @@ -3888,33 +3808,29 @@ function transferFrom(address sender, address recipient, uint256 amount) externa ::core::result::Result::Err(_) => ::core::option::Option::None, } } + /// Returns the enum variant name for the given selector, if known. #[inline] - pub fn name_by_selector( - selector: [u8; 4usize], - ) -> ::core::option::Option<&'static str> { + pub fn name_by_selector(selector: [u8; 4usize]) -> ::core::option::Option<&'static str> { let sig = Self::signature_by_selector(selector)?; sig.split_once('(').map(|(name, _)| name) } } #[automatically_derived] impl alloy_sol_types::SolInterface for BalancerV2StablePoolCalls { - const NAME: &'static str = "BalancerV2StablePoolCalls"; - const MIN_DATA_LENGTH: usize = 0usize; const COUNT: usize = 15usize; + const MIN_DATA_LENGTH: usize = 0usize; + const NAME: &'static str = "BalancerV2StablePoolCalls"; + #[inline] fn selector(&self) -> [u8; 4] { match self { Self::DOMAIN_SEPARATOR(_) => { ::SELECTOR } - Self::allowance(_) => { - ::SELECTOR - } + Self::allowance(_) => ::SELECTOR, Self::approve(_) => ::SELECTOR, - Self::balanceOf(_) => { - ::SELECTOR - } + Self::balanceOf(_) => ::SELECTOR, Self::decimals(_) => ::SELECTOR, Self::getAmplificationParameter(_) => { ::SELECTOR @@ -3922,9 +3838,7 @@ function transferFrom(address sender, address recipient, uint256 amount) externa Self::getPausedState(_) => { ::SELECTOR } - Self::getPoolId(_) => { - ::SELECTOR - } + Self::getPoolId(_) => ::SELECTOR, Self::getSwapFeePercentage(_) => { ::SELECTOR } @@ -3933,41 +3847,36 @@ function transferFrom(address sender, address recipient, uint256 amount) externa Self::permit(_) => ::SELECTOR, Self::symbol(_) => ::SELECTOR, Self::transfer(_) => ::SELECTOR, - Self::transferFrom(_) => { - ::SELECTOR - } + Self::transferFrom(_) => ::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 { + fn abi_decode_raw(selector: [u8; 4], data: &[u8]) -> alloy_sol_types::Result { static DECODE_SHIMS: &[fn( &[u8], - ) -> alloy_sol_types::Result] = &[ + ) + -> alloy_sol_types::Result] = &[ { - fn name( - data: &[u8], - ) -> alloy_sol_types::Result { + fn name(data: &[u8]) -> alloy_sol_types::Result { ::abi_decode_raw(data) .map(BalancerV2StablePoolCalls::name) } name }, { - fn approve( - data: &[u8], - ) -> alloy_sol_types::Result { + fn approve(data: &[u8]) -> alloy_sol_types::Result { ::abi_decode_raw(data) .map(BalancerV2StablePoolCalls::approve) } @@ -3977,9 +3886,7 @@ function transferFrom(address sender, address recipient, uint256 amount) externa fn getPausedState( data: &[u8], ) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, - ) + ::abi_decode_raw(data) .map(BalancerV2StablePoolCalls::getPausedState) } getPausedState @@ -3988,17 +3895,13 @@ function transferFrom(address sender, address recipient, uint256 amount) externa fn transferFrom( data: &[u8], ) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, - ) + ::abi_decode_raw(data) .map(BalancerV2StablePoolCalls::transferFrom) } transferFrom }, { - fn decimals( - data: &[u8], - ) -> alloy_sol_types::Result { + fn decimals(data: &[u8]) -> alloy_sol_types::Result { ::abi_decode_raw(data) .map(BalancerV2StablePoolCalls::decimals) } @@ -4008,9 +3911,7 @@ function transferFrom(address sender, address recipient, uint256 amount) externa fn DOMAIN_SEPARATOR( data: &[u8], ) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, - ) + ::abi_decode_raw(data) .map(BalancerV2StablePoolCalls::DOMAIN_SEPARATOR) } DOMAIN_SEPARATOR @@ -4028,9 +3929,7 @@ function transferFrom(address sender, address recipient, uint256 amount) externa fn getSwapFeePercentage( data: &[u8], ) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, - ) + ::abi_decode_raw(data) .map(BalancerV2StablePoolCalls::getSwapFeePercentage) } getSwapFeePercentage @@ -4040,9 +3939,9 @@ function transferFrom(address sender, address recipient, uint256 amount) externa data: &[u8], ) -> alloy_sol_types::Result { ::abi_decode_raw( - data, - ) - .map(BalancerV2StablePoolCalls::getAmplificationParameter) + data, + ) + .map(BalancerV2StablePoolCalls::getAmplificationParameter) } getAmplificationParameter }, @@ -4056,36 +3955,28 @@ function transferFrom(address sender, address recipient, uint256 amount) externa balanceOf }, { - fn nonces( - data: &[u8], - ) -> alloy_sol_types::Result { + fn nonces(data: &[u8]) -> alloy_sol_types::Result { ::abi_decode_raw(data) .map(BalancerV2StablePoolCalls::nonces) } nonces }, { - fn symbol( - data: &[u8], - ) -> alloy_sol_types::Result { + fn symbol(data: &[u8]) -> alloy_sol_types::Result { ::abi_decode_raw(data) .map(BalancerV2StablePoolCalls::symbol) } symbol }, { - fn transfer( - data: &[u8], - ) -> alloy_sol_types::Result { + fn transfer(data: &[u8]) -> alloy_sol_types::Result { ::abi_decode_raw(data) .map(BalancerV2StablePoolCalls::transfer) } transfer }, { - fn permit( - data: &[u8], - ) -> alloy_sol_types::Result { + fn permit(data: &[u8]) -> alloy_sol_types::Result { ::abi_decode_raw(data) .map(BalancerV2StablePoolCalls::permit) } @@ -4102,15 +3993,14 @@ function transferFrom(address sender, address recipient, uint256 amount) externa }, ]; let Ok(idx) = Self::SELECTORS.binary_search(&selector) else { - return Err( - alloy_sol_types::Error::unknown_selector( - ::NAME, - selector, - ), - ); + return Err(alloy_sol_types::Error::unknown_selector( + ::NAME, + selector, + )); }; DECODE_SHIMS[idx](data) } + #[inline] #[allow(non_snake_case)] fn abi_decode_raw_validate( @@ -4119,25 +4009,19 @@ function transferFrom(address sender, address recipient, uint256 amount) externa ) -> alloy_sol_types::Result { static DECODE_VALIDATE_SHIMS: &[fn( &[u8], - ) -> alloy_sol_types::Result] = &[ + ) -> alloy_sol_types::Result< + BalancerV2StablePoolCalls, + >] = &[ { - fn name( - data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) + fn name(data: &[u8]) -> alloy_sol_types::Result { + ::abi_decode_raw_validate(data) .map(BalancerV2StablePoolCalls::name) } name }, { - fn approve( - data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) + fn approve(data: &[u8]) -> alloy_sol_types::Result { + ::abi_decode_raw_validate(data) .map(BalancerV2StablePoolCalls::approve) } approve @@ -4147,9 +4031,9 @@ function transferFrom(address sender, address recipient, uint256 amount) externa data: &[u8], ) -> alloy_sol_types::Result { ::abi_decode_raw_validate( - data, - ) - .map(BalancerV2StablePoolCalls::getPausedState) + data, + ) + .map(BalancerV2StablePoolCalls::getPausedState) } getPausedState }, @@ -4158,19 +4042,15 @@ function transferFrom(address sender, address recipient, uint256 amount) externa data: &[u8], ) -> alloy_sol_types::Result { ::abi_decode_raw_validate( - data, - ) - .map(BalancerV2StablePoolCalls::transferFrom) + data, + ) + .map(BalancerV2StablePoolCalls::transferFrom) } transferFrom }, { - fn decimals( - data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) + fn decimals(data: &[u8]) -> alloy_sol_types::Result { + ::abi_decode_raw_validate(data) .map(BalancerV2StablePoolCalls::decimals) } decimals @@ -4180,9 +4060,9 @@ function transferFrom(address sender, address recipient, uint256 amount) externa data: &[u8], ) -> alloy_sol_types::Result { ::abi_decode_raw_validate( - data, - ) - .map(BalancerV2StablePoolCalls::DOMAIN_SEPARATOR) + data, + ) + .map(BalancerV2StablePoolCalls::DOMAIN_SEPARATOR) } DOMAIN_SEPARATOR }, @@ -4190,9 +4070,7 @@ function transferFrom(address sender, address recipient, uint256 amount) externa fn getPoolId( data: &[u8], ) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) + ::abi_decode_raw_validate(data) .map(BalancerV2StablePoolCalls::getPoolId) } getPoolId @@ -4223,53 +4101,35 @@ function transferFrom(address sender, address recipient, uint256 amount) externa fn balanceOf( data: &[u8], ) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) + ::abi_decode_raw_validate(data) .map(BalancerV2StablePoolCalls::balanceOf) } balanceOf }, { - fn nonces( - data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) + fn nonces(data: &[u8]) -> alloy_sol_types::Result { + ::abi_decode_raw_validate(data) .map(BalancerV2StablePoolCalls::nonces) } nonces }, { - fn symbol( - data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) + fn symbol(data: &[u8]) -> alloy_sol_types::Result { + ::abi_decode_raw_validate(data) .map(BalancerV2StablePoolCalls::symbol) } symbol }, { - fn transfer( - data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) + fn transfer(data: &[u8]) -> alloy_sol_types::Result { + ::abi_decode_raw_validate(data) .map(BalancerV2StablePoolCalls::transfer) } transfer }, { - fn permit( - data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) + fn permit(data: &[u8]) -> alloy_sol_types::Result { + ::abi_decode_raw_validate(data) .map(BalancerV2StablePoolCalls::permit) } permit @@ -4278,31 +4138,26 @@ function transferFrom(address sender, address recipient, uint256 amount) externa fn allowance( data: &[u8], ) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) + ::abi_decode_raw_validate(data) .map(BalancerV2StablePoolCalls::allowance) } allowance }, ]; let Ok(idx) = Self::SELECTORS.binary_search(&selector) else { - return Err( - alloy_sol_types::Error::unknown_selector( - ::NAME, - selector, - ), - ); + 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::DOMAIN_SEPARATOR(inner) => { - ::abi_encoded_size( - inner, - ) + ::abi_encoded_size(inner) } Self::allowance(inner) => { ::abi_encoded_size(inner) @@ -4322,17 +4177,13 @@ function transferFrom(address sender, address recipient, uint256 amount) externa ) } Self::getPausedState(inner) => { - ::abi_encoded_size( - inner, - ) + ::abi_encoded_size(inner) } Self::getPoolId(inner) => { ::abi_encoded_size(inner) } Self::getSwapFeePercentage(inner) => { - ::abi_encoded_size( - inner, - ) + ::abi_encoded_size(inner) } Self::name(inner) => { ::abi_encoded_size(inner) @@ -4350,64 +4201,43 @@ function transferFrom(address sender, address recipient, uint256 amount) externa ::abi_encoded_size(inner) } Self::transferFrom(inner) => { - ::abi_encoded_size( - inner, - ) + ::abi_encoded_size(inner) } } } + #[inline] fn abi_encode_raw(&self, out: &mut alloy_sol_types::private::Vec) { match self { Self::DOMAIN_SEPARATOR(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } Self::allowance(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } Self::approve(inner) => { ::abi_encode_raw(inner, out) } Self::balanceOf(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } Self::decimals(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } Self::getAmplificationParameter(inner) => { ::abi_encode_raw( - inner, - out, + inner, out, ) } Self::getPausedState(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } Self::getPoolId(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } Self::getSwapFeePercentage(inner) => { ::abi_encode_raw( - inner, - out, + inner, out, ) } Self::name(inner) => { @@ -4423,23 +4253,16 @@ function transferFrom(address sender, address recipient, uint256 amount) externa ::abi_encode_raw(inner, out) } Self::transfer(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } Self::transferFrom(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } } } } ///Container for all the [`BalancerV2StablePool`](self) events. - #[derive(Clone)] - #[derive(Debug, PartialEq, Eq, Hash)] + #[derive(Clone, Debug, PartialEq, Eq, Hash)] pub enum BalancerV2StablePoolEvents { #[allow(missing_docs)] AmpUpdateStarted(AmpUpdateStarted), @@ -4457,51 +4280,43 @@ function transferFrom(address sender, address recipient, uint256 amount) externa impl BalancerV2StablePoolEvents { /// 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. + /// 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]] = &[ [ - 24u8, 53u8, 136u8, 46u8, 231u8, 163u8, 74u8, 193u8, 148u8, 247u8, 23u8, - 163u8, 94u8, 9u8, 187u8, 29u8, 36u8, 200u8, 42u8, 59u8, 157u8, 133u8, - 74u8, 182u8, 201u8, 116u8, 149u8, 37u8, 183u8, 20u8, 205u8, 242u8, + 24u8, 53u8, 136u8, 46u8, 231u8, 163u8, 74u8, 193u8, 148u8, 247u8, 23u8, 163u8, + 94u8, 9u8, 187u8, 29u8, 36u8, 200u8, 42u8, 59u8, 157u8, 133u8, 74u8, 182u8, 201u8, + 116u8, 149u8, 37u8, 183u8, 20u8, 205u8, 242u8, ], [ - 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, + 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, ], [ - 158u8, 58u8, 94u8, 55u8, 34u8, 69u8, 50u8, 222u8, 166u8, 123u8, 137u8, - 250u8, 206u8, 24u8, 87u8, 3u8, 115u8, 138u8, 34u8, 138u8, 110u8, 138u8, - 35u8, 222u8, 229u8, 70u8, 150u8, 1u8, 128u8, 211u8, 190u8, 100u8, + 158u8, 58u8, 94u8, 55u8, 34u8, 69u8, 50u8, 222u8, 166u8, 123u8, 137u8, 250u8, + 206u8, 24u8, 87u8, 3u8, 115u8, 138u8, 34u8, 138u8, 110u8, 138u8, 35u8, 222u8, + 229u8, 70u8, 150u8, 1u8, 128u8, 211u8, 190u8, 100u8, ], [ - 160u8, 208u8, 21u8, 147u8, 228u8, 126u8, 105u8, 208u8, 126u8, 12u8, - 205u8, 135u8, 190u8, 206u8, 9u8, 65u8, 30u8, 7u8, 221u8, 30u8, 212u8, - 12u8, 168u8, 242u8, 231u8, 175u8, 41u8, 118u8, 84u8, 42u8, 2u8, 51u8, + 160u8, 208u8, 21u8, 147u8, 228u8, 126u8, 105u8, 208u8, 126u8, 12u8, 205u8, 135u8, + 190u8, 206u8, 9u8, 65u8, 30u8, 7u8, 221u8, 30u8, 212u8, 12u8, 168u8, 242u8, 231u8, + 175u8, 41u8, 118u8, 84u8, 42u8, 2u8, 51u8, ], [ - 169u8, 186u8, 63u8, 254u8, 11u8, 108u8, 54u8, 107u8, 129u8, 35u8, 44u8, - 170u8, 179u8, 134u8, 5u8, 160u8, 105u8, 154u8, 213u8, 57u8, 141u8, 108u8, - 206u8, 118u8, 249u8, 30u8, 232u8, 9u8, 227u8, 34u8, 218u8, 252u8, + 169u8, 186u8, 63u8, 254u8, 11u8, 108u8, 54u8, 107u8, 129u8, 35u8, 44u8, 170u8, + 179u8, 134u8, 5u8, 160u8, 105u8, 154u8, 213u8, 57u8, 141u8, 108u8, 206u8, 118u8, + 249u8, 30u8, 232u8, 9u8, 227u8, 34u8, 218u8, 252u8, ], [ - 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, + 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, ], ]; - /// The names of the variants in the same order as `SELECTORS`. - pub const VARIANT_NAMES: &'static [&'static str] = &[ - ::core::stringify!(AmpUpdateStarted), - ::core::stringify!(Approval), - ::core::stringify!(PausedStateChanged), - ::core::stringify!(AmpUpdateStopped), - ::core::stringify!(SwapFeePercentageChanged), - ::core::stringify!(Transfer), - ]; /// The signatures in the same order as `SELECTORS`. pub const SIGNATURES: &'static [&'static str] = &[ ::SIGNATURE, @@ -4511,6 +4326,16 @@ function transferFrom(address sender, address recipient, uint256 amount) externa ::SIGNATURE, ::SIGNATURE, ]; + /// The names of the variants in the same order as `SELECTORS`. + pub const VARIANT_NAMES: &'static [&'static str] = &[ + ::core::stringify!(AmpUpdateStarted), + ::core::stringify!(Approval), + ::core::stringify!(PausedStateChanged), + ::core::stringify!(AmpUpdateStopped), + ::core::stringify!(SwapFeePercentageChanged), + ::core::stringify!(Transfer), + ]; + /// Returns the signature for the given selector, if known. #[inline] pub fn signature_by_selector( @@ -4523,75 +4348,59 @@ function transferFrom(address sender, address recipient, uint256 amount) externa ::core::result::Result::Err(_) => ::core::option::Option::None, } } + /// Returns the enum variant name for the given selector, if known. #[inline] - pub fn name_by_selector( - selector: [u8; 32usize], - ) -> ::core::option::Option<&'static str> { + pub fn name_by_selector(selector: [u8; 32usize]) -> ::core::option::Option<&'static str> { let sig = Self::signature_by_selector(selector)?; sig.split_once('(').map(|(name, _)| name) } } #[automatically_derived] impl alloy_sol_types::SolEventInterface for BalancerV2StablePoolEvents { - const NAME: &'static str = "BalancerV2StablePoolEvents"; const COUNT: usize = 6usize; + const NAME: &'static str = "BalancerV2StablePoolEvents"; + 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, - ) + ::decode_raw_log(topics, data) .map(Self::AmpUpdateStarted) } Some(::SIGNATURE_HASH) => { - ::decode_raw_log( - topics, - data, - ) + ::decode_raw_log(topics, data) .map(Self::AmpUpdateStopped) } Some(::SIGNATURE_HASH) => { ::decode_raw_log(topics, data) .map(Self::Approval) } - Some( - ::SIGNATURE_HASH, - ) => { - ::decode_raw_log( - topics, - data, - ) + Some(::SIGNATURE_HASH) => { + ::decode_raw_log(topics, data) .map(Self::PausedStateChanged) } - Some( - ::SIGNATURE_HASH, - ) => { + Some(::SIGNATURE_HASH) => { ::decode_raw_log( - topics, - data, - ) - .map(Self::SwapFeePercentageChanged) + topics, data, + ) + .map(Self::SwapFeePercentageChanged) } Some(::SIGNATURE_HASH) => { ::decode_raw_log(topics, data) .map(Self::Transfer) } - _ => { - 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(), - ), + _ => 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(), ), - }) - } + ), + }), } } } @@ -4605,20 +4414,17 @@ function transferFrom(address sender, address recipient, uint256 amount) externa Self::AmpUpdateStopped(inner) => { alloy_sol_types::private::IntoLogData::to_log_data(inner) } - Self::Approval(inner) => { - alloy_sol_types::private::IntoLogData::to_log_data(inner) - } + Self::Approval(inner) => alloy_sol_types::private::IntoLogData::to_log_data(inner), Self::PausedStateChanged(inner) => { alloy_sol_types::private::IntoLogData::to_log_data(inner) } Self::SwapFeePercentageChanged(inner) => { alloy_sol_types::private::IntoLogData::to_log_data(inner) } - Self::Transfer(inner) => { - alloy_sol_types::private::IntoLogData::to_log_data(inner) - } + Self::Transfer(inner) => alloy_sol_types::private::IntoLogData::to_log_data(inner), } } + fn into_log_data(self) -> alloy_sol_types::private::LogData { match self { Self::AmpUpdateStarted(inner) => { @@ -4642,10 +4448,10 @@ function transferFrom(address sender, address recipient, uint256 amount) externa } } } - use alloy_contract as alloy_contract; + use alloy_contract; /**Creates a new wrapper around an on-chain [`BalancerV2StablePool`](self) contract instance. -See the [wrapper's documentation](`BalancerV2StablePoolInstance`) for more details.*/ + See the [wrapper's documentation](`BalancerV2StablePoolInstance`) for more details.*/ #[inline] pub const fn new< P: alloy_contract::private::Provider, @@ -4658,15 +4464,15 @@ See the [wrapper's documentation](`BalancerV2StablePoolInstance`) for more detai } /**A [`BalancerV2StablePool`](self) instance. -Contains type-safe methods for interacting with an on-chain instance of the -[`BalancerV2StablePool`](self) contract located at a given `address`, using a given -provider `P`. + Contains type-safe methods for interacting with an on-chain instance of the + [`BalancerV2StablePool`](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. + 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.*/ + See the [module-level documentation](self) for all the available methods.*/ #[derive(Clone)] pub struct BalancerV2StablePoolInstance { address: alloy_sol_types::private::Address, @@ -4677,43 +4483,45 @@ See the [module-level documentation](self) for all the available methods.*/ impl ::core::fmt::Debug for BalancerV2StablePoolInstance { #[inline] fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { - f.debug_tuple("BalancerV2StablePoolInstance").field(&self.address).finish() + f.debug_tuple("BalancerV2StablePoolInstance") + .field(&self.address) + .finish() } } /// Instantiation and getters/setters. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > BalancerV2StablePoolInstance { + impl, N: alloy_contract::private::Network> + BalancerV2StablePoolInstance + { /**Creates a new wrapper around an on-chain [`BalancerV2StablePool`](self) contract instance. -See the [wrapper's documentation](`BalancerV2StablePoolInstance`) for more details.*/ + See the [wrapper's documentation](`BalancerV2StablePoolInstance`) for more details.*/ #[inline] - pub const fn new( - address: alloy_sol_types::private::Address, - __provider: P, - ) -> Self { + pub const fn new(address: alloy_sol_types::private::Address, __provider: P) -> Self { Self { address, provider: __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 { @@ -4721,7 +4529,8 @@ See the [wrapper's documentation](`BalancerV2StablePoolInstance`) for more detai } } impl BalancerV2StablePoolInstance<&P, N> { - /// Clones the provider and returns a new instance with the cloned provider. + /// Clones the provider and returns a new instance with the cloned + /// provider. #[inline] pub fn with_cloned_provider(self) -> BalancerV2StablePoolInstance { BalancerV2StablePoolInstance { @@ -4732,26 +4541,29 @@ See the [wrapper's documentation](`BalancerV2StablePoolInstance`) for more detai } } /// Function calls. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > BalancerV2StablePoolInstance { - /// Creates a new call builder using this contract instance's provider and address. + impl, N: alloy_contract::private::Network> + BalancerV2StablePoolInstance + { + /// 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. + /// 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 [`DOMAIN_SEPARATOR`] function. pub fn DOMAIN_SEPARATOR( &self, ) -> alloy_contract::SolCallBuilder<&P, DOMAIN_SEPARATORCall, N> { self.call_builder(&DOMAIN_SEPARATORCall) } + ///Creates a new call builder for the [`allowance`] function. pub fn allowance( &self, @@ -4760,6 +4572,7 @@ See the [wrapper's documentation](`BalancerV2StablePoolInstance`) for more detai ) -> 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, @@ -4768,6 +4581,7 @@ See the [wrapper's documentation](`BalancerV2StablePoolInstance`) for more detai ) -> alloy_contract::SolCallBuilder<&P, approveCall, N> { self.call_builder(&approveCall { spender, amount }) } + ///Creates a new call builder for the [`balanceOf`] function. pub fn balanceOf( &self, @@ -4775,36 +4589,43 @@ See the [wrapper's documentation](`BalancerV2StablePoolInstance`) for more detai ) -> alloy_contract::SolCallBuilder<&P, balanceOfCall, N> { self.call_builder(&balanceOfCall { account }) } + ///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 [`getAmplificationParameter`] function. + + ///Creates a new call builder for the [`getAmplificationParameter`] + /// function. pub fn getAmplificationParameter( &self, ) -> alloy_contract::SolCallBuilder<&P, getAmplificationParameterCall, N> { self.call_builder(&getAmplificationParameterCall) } + ///Creates a new call builder for the [`getPausedState`] function. - pub fn getPausedState( - &self, - ) -> alloy_contract::SolCallBuilder<&P, getPausedStateCall, N> { + pub fn getPausedState(&self) -> alloy_contract::SolCallBuilder<&P, getPausedStateCall, N> { self.call_builder(&getPausedStateCall) } + ///Creates a new call builder for the [`getPoolId`] function. pub fn getPoolId(&self) -> alloy_contract::SolCallBuilder<&P, getPoolIdCall, N> { self.call_builder(&getPoolIdCall) } - ///Creates a new call builder for the [`getSwapFeePercentage`] function. + + ///Creates a new call builder for the [`getSwapFeePercentage`] + /// function. pub fn getSwapFeePercentage( &self, ) -> alloy_contract::SolCallBuilder<&P, getSwapFeePercentageCall, N> { self.call_builder(&getSwapFeePercentageCall) } + ///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 [`nonces`] function. pub fn nonces( &self, @@ -4812,6 +4633,7 @@ See the [wrapper's documentation](`BalancerV2StablePoolInstance`) for more detai ) -> alloy_contract::SolCallBuilder<&P, noncesCall, N> { self.call_builder(&noncesCall { owner }) } + ///Creates a new call builder for the [`permit`] function. pub fn permit( &self, @@ -4823,22 +4645,22 @@ See the [wrapper's documentation](`BalancerV2StablePoolInstance`) for more detai r: alloy_sol_types::private::FixedBytes<32>, s: alloy_sol_types::private::FixedBytes<32>, ) -> alloy_contract::SolCallBuilder<&P, permitCall, N> { - self.call_builder( - &permitCall { - owner, - spender, - value, - deadline, - v, - r, - s, - }, - ) + self.call_builder(&permitCall { + owner, + spender, + value, + deadline, + v, + r, + s, + }) } + ///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 [`transfer`] function. pub fn transfer( &self, @@ -4847,6 +4669,7 @@ See the [wrapper's documentation](`BalancerV2StablePoolInstance`) for more detai ) -> alloy_contract::SolCallBuilder<&P, transferCall, N> { self.call_builder(&transferCall { recipient, amount }) } + ///Creates a new call builder for the [`transferFrom`] function. pub fn transferFrom( &self, @@ -4854,63 +4677,64 @@ See the [wrapper's documentation](`BalancerV2StablePoolInstance`) for more detai recipient: alloy_sol_types::private::Address, amount: alloy_sol_types::private::primitives::aliases::U256, ) -> alloy_contract::SolCallBuilder<&P, transferFromCall, N> { - self.call_builder( - &transferFromCall { - sender, - recipient, - amount, - }, - ) + self.call_builder(&transferFromCall { + sender, + recipient, + amount, + }) } } /// Event filters. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > BalancerV2StablePoolInstance { - /// Creates a new event filter using this contract instance's provider and address. + impl, N: alloy_contract::private::Network> + BalancerV2StablePoolInstance + { + /// 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. + /// 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 [`AmpUpdateStarted`] event. - pub fn AmpUpdateStarted_filter( - &self, - ) -> alloy_contract::Event<&P, AmpUpdateStarted, N> { + pub fn AmpUpdateStarted_filter(&self) -> alloy_contract::Event<&P, AmpUpdateStarted, N> { self.event_filter::() } + ///Creates a new event filter for the [`AmpUpdateStopped`] event. - pub fn AmpUpdateStopped_filter( - &self, - ) -> alloy_contract::Event<&P, AmpUpdateStopped, N> { + pub fn AmpUpdateStopped_filter(&self) -> alloy_contract::Event<&P, AmpUpdateStopped, N> { self.event_filter::() } + ///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 [`PausedStateChanged`] event. pub fn PausedStateChanged_filter( &self, ) -> alloy_contract::Event<&P, PausedStateChanged, N> { self.event_filter::() } - ///Creates a new event filter for the [`SwapFeePercentageChanged`] event. + + ///Creates a new event filter for the [`SwapFeePercentageChanged`] + /// event. pub fn SwapFeePercentageChanged_filter( &self, ) -> alloy_contract::Event<&P, SwapFeePercentageChanged, 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::() } } } -pub type Instance = BalancerV2StablePool::BalancerV2StablePoolInstance< - ::alloy_provider::DynProvider, ->; +pub type Instance = + BalancerV2StablePool::BalancerV2StablePoolInstance<::alloy_provider::DynProvider>; diff --git a/contracts/generated/contracts-generated/balancerv2stablepoolfactoryv2/src/lib.rs b/contracts/generated/contracts-generated/balancerv2stablepoolfactoryv2/src/lib.rs index 548c17c250..a5a8161061 100644 --- a/contracts/generated/contracts-generated/balancerv2stablepoolfactoryv2/src/lib.rs +++ b/contracts/generated/contracts-generated/balancerv2stablepoolfactoryv2/src/lib.rs @@ -1,4 +1,10 @@ -#![allow(unused_imports, unused_attributes, clippy::all, rustdoc::all, non_snake_case)] +#![allow( + unused_imports, + unused_attributes, + clippy::all, + rustdoc::all, + non_snake_case +)] //! Auto-generated contract bindings. Do not edit. /** @@ -109,13 +115,12 @@ interface BalancerV2StablePoolFactoryV2 { clippy::empty_structs_with_brackets )] pub mod BalancerV2StablePoolFactoryV2 { - use super::*; - use alloy_sol_types as alloy_sol_types; + use {super::*, alloy_sol_types}; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Event with signature `FactoryDisabled()` and selector `0x432acbfd662dbb5d8b378384a67159b47ca9d0f1b79f97cf64cf8585fa362d50`. -```solidity -event FactoryDisabled(); -```*/ + ```solidity + event FactoryDisabled(); + ```*/ #[allow( non_camel_case_types, non_snake_case, @@ -131,21 +136,22 @@ event FactoryDisabled(); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[automatically_derived] impl alloy_sol_types::SolEvent for FactoryDisabled { + type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type DataTuple<'a> = (); - type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type TopicList = (alloy_sol_types::sol_data::FixedBytes<32>,); - const SIGNATURE: &'static str = "FactoryDisabled()"; - const SIGNATURE_HASH: alloy_sol_types::private::B256 = alloy_sol_types::private::B256::new([ - 67u8, 42u8, 203u8, 253u8, 102u8, 45u8, 187u8, 93u8, 139u8, 55u8, 131u8, - 132u8, 166u8, 113u8, 89u8, 180u8, 124u8, 169u8, 208u8, 241u8, 183u8, - 159u8, 151u8, 207u8, 100u8, 207u8, 133u8, 133u8, 250u8, 54u8, 45u8, 80u8, - ]); + const ANONYMOUS: bool = false; + const SIGNATURE: &'static str = "FactoryDisabled()"; + const SIGNATURE_HASH: alloy_sol_types::private::B256 = + alloy_sol_types::private::B256::new([ + 67u8, 42u8, 203u8, 253u8, 102u8, 45u8, 187u8, 93u8, 139u8, 55u8, 131u8, 132u8, + 166u8, 113u8, 89u8, 180u8, 124u8, 169u8, 208u8, 241u8, 183u8, 159u8, 151u8, + 207u8, 100u8, 207u8, 133u8, 133u8, 250u8, 54u8, 45u8, 80u8, + ]); + #[allow(unused_variables)] #[inline] fn new( @@ -154,29 +160,31 @@ event FactoryDisabled(); ) -> Self { Self {} } + #[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, - ), - ); + 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(),) } + #[inline] fn encode_topics_raw( &self, @@ -185,9 +193,7 @@ event FactoryDisabled(); if out.len() < ::COUNT { return Err(alloy_sol_types::Error::Overrun); } - out[0usize] = alloy_sol_types::abi::token::WordToken( - Self::SIGNATURE_HASH, - ); + out[0usize] = alloy_sol_types::abi::token::WordToken(Self::SIGNATURE_HASH); Ok(()) } } @@ -196,6 +202,7 @@ event FactoryDisabled(); 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) } @@ -210,9 +217,9 @@ event FactoryDisabled(); }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Event with signature `PoolCreated(address)` and selector `0x83a48fbcfc991335314e74d0496aab6a1987e992ddc85dddbcc4d6dd6ef2e9fc`. -```solidity -event PoolCreated(address indexed pool); -```*/ + ```solidity + event PoolCreated(address indexed pool); + ```*/ #[allow( non_camel_case_types, non_snake_case, @@ -231,25 +238,25 @@ event PoolCreated(address indexed pool); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[automatically_derived] impl alloy_sol_types::SolEvent for PoolCreated { + type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; 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::Address, ); - const SIGNATURE: &'static str = "PoolCreated(address)"; - const SIGNATURE_HASH: alloy_sol_types::private::B256 = alloy_sol_types::private::B256::new([ - 131u8, 164u8, 143u8, 188u8, 252u8, 153u8, 19u8, 53u8, 49u8, 78u8, 116u8, - 208u8, 73u8, 106u8, 171u8, 106u8, 25u8, 135u8, 233u8, 146u8, 221u8, - 200u8, 93u8, 221u8, 188u8, 196u8, 214u8, 221u8, 110u8, 242u8, 233u8, - 252u8, - ]); + const ANONYMOUS: bool = false; + const SIGNATURE: &'static str = "PoolCreated(address)"; + const SIGNATURE_HASH: alloy_sol_types::private::B256 = + alloy_sol_types::private::B256::new([ + 131u8, 164u8, 143u8, 188u8, 252u8, 153u8, 19u8, 53u8, 49u8, 78u8, 116u8, 208u8, + 73u8, 106u8, 171u8, 106u8, 25u8, 135u8, 233u8, 146u8, 221u8, 200u8, 93u8, + 221u8, 188u8, 196u8, 214u8, 221u8, 110u8, 242u8, 233u8, 252u8, + ]); + #[allow(unused_variables)] #[inline] fn new( @@ -258,29 +265,31 @@ event PoolCreated(address indexed pool); ) -> Self { Self { pool: topics.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, - ), - ); + 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.pool.clone()) } + #[inline] fn encode_topics_raw( &self, @@ -289,9 +298,7 @@ event PoolCreated(address indexed pool); if out.len() < ::COUNT { return Err(alloy_sol_types::Error::Overrun); } - out[0usize] = alloy_sol_types::abi::token::WordToken( - Self::SIGNATURE_HASH, - ); + out[0usize] = alloy_sol_types::abi::token::WordToken(Self::SIGNATURE_HASH); out[1usize] = ::encode_topic( &self.pool, ); @@ -303,6 +310,7 @@ event PoolCreated(address indexed pool); 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) } @@ -316,9 +324,9 @@ event PoolCreated(address indexed pool); } }; /**Constructor`. -```solidity -constructor(address vault); -```*/ + ```solidity + constructor(address vault); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct constructorCall { @@ -326,7 +334,7 @@ constructor(address vault); pub vault: alloy_sol_types::private::Address, } const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -335,9 +343,7 @@ constructor(address vault); type UnderlyingRustTuple<'a> = (alloy_sol_types::private::Address,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -362,15 +368,15 @@ constructor(address vault); #[automatically_derived] impl alloy_sol_types::SolConstructor for constructorCall { type Parameters<'a> = (alloy_sol_types::sol_data::Address,); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + 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<'_> { ( @@ -383,9 +389,9 @@ constructor(address vault); }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `create(string,string,address[],uint256,uint256,address)` and selector `0x7932c7f3`. -```solidity -function create(string memory name, string memory symbol, address[] memory tokens, uint256 amplificationParameter, uint256 swapFeePercentage, address owner) external returns (address); -```*/ + ```solidity + function create(string memory name, string memory symbol, address[] memory tokens, uint256 amplificationParameter, uint256 swapFeePercentage, address owner) external returns (address); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct createCall { @@ -403,7 +409,9 @@ function create(string memory name, string memory symbol, address[] memory token pub owner: alloy_sol_types::private::Address, } #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`create(string,string,address[],uint256,uint256,address)`](createCall) function. + ///Container type for the return parameters of the + /// [`create(string,string,address[],uint256,uint256,address)`](createCall) + /// function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct createReturn { @@ -417,7 +425,7 @@ function create(string memory name, string memory symbol, address[] memory token clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -440,9 +448,7 @@ function create(string memory name, string memory symbol, address[] memory token ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -486,9 +492,7 @@ function create(string memory name, string memory symbol, address[] memory token type UnderlyingRustTuple<'a> = (alloy_sol_types::private::Address,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -520,22 +524,22 @@ function create(string memory name, string memory symbol, address[] memory token 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::Address; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (alloy_sol_types::sol_data::Address,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "create(string,string,address[],uint256,uint256,address)"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [121u8, 50u8, 199u8, 243u8]; + const SIGNATURE: &'static str = + "create(string,string,address[],uint256,uint256,address)"; + #[inline] fn new<'a>( tuple: as alloy_sol_types::SolType>::RustType, ) -> Self { tuple.into() } + #[inline] fn tokenize(&self) -> Self::Token<'_> { ( @@ -561,47 +565,44 @@ function create(string memory name, string memory symbol, address[] memory token ), ) } + #[inline] fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { - ( - ::tokenize( - ret, - ), - ) + (::tokenize(ret),) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) - .map(|r| { + as alloy_sol_types::SolType>::abi_decode_sequence(data).map( + |r| { let r: createReturn = 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: createReturn = r.into(); - r._0 - }) + 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: createReturn = r.into(); + r._0 + }) } } }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `disable()` and selector `0x2f2770db`. -```solidity -function disable() external; -```*/ + ```solidity + function disable() external; + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct disableCall; - ///Container type for the return parameters of the [`disable()`](disableCall) function. + ///Container type for the return parameters of the + /// [`disable()`](disableCall) function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct disableReturn {} @@ -612,7 +613,7 @@ function disable() external; clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -621,9 +622,7 @@ function disable() external; type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -653,9 +652,7 @@ function disable() external; type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -678,60 +675,56 @@ function disable() external; } } impl disableReturn { - fn _tokenize( - &self, - ) -> ::ReturnToken<'_> { + fn _tokenize(&self) -> ::ReturnToken<'_> { () } } #[automatically_derived] impl alloy_sol_types::SolCall for disableCall { type Parameters<'a> = (); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = disableReturn; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "disable()"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [47u8, 39u8, 112u8, 219u8]; + const SIGNATURE: &'static str = "disable()"; + #[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<'_> { disableReturn::_tokenize(ret) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) + 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) + 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 [`BalancerV2StablePoolFactoryV2`](self) function calls. + ///Container for all the [`BalancerV2StablePoolFactoryV2`](self) function + /// calls. #[derive(Clone)] - #[derive()] pub enum BalancerV2StablePoolFactoryV2Calls { #[allow(missing_docs)] create(createCall), @@ -741,24 +734,22 @@ function disable() external; impl BalancerV2StablePoolFactoryV2Calls { /// 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. + /// 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]] = &[ - [47u8, 39u8, 112u8, 219u8], - [121u8, 50u8, 199u8, 243u8], - ]; - /// The names of the variants in the same order as `SELECTORS`. - pub const VARIANT_NAMES: &'static [&'static str] = &[ - ::core::stringify!(disable), - ::core::stringify!(create), - ]; + pub const SELECTORS: &'static [[u8; 4usize]] = + &[[47u8, 39u8, 112u8, 219u8], [121u8, 50u8, 199u8, 243u8]]; /// The signatures in the same order as `SELECTORS`. pub const SIGNATURES: &'static [&'static str] = &[ ::SIGNATURE, ::SIGNATURE, ]; + /// The names of the variants in the same order as `SELECTORS`. + pub const VARIANT_NAMES: &'static [&'static str] = + &[::core::stringify!(disable), ::core::stringify!(create)]; + /// Returns the signature for the given selector, if known. #[inline] pub fn signature_by_selector( @@ -771,20 +762,20 @@ function disable() external; ::core::result::Result::Err(_) => ::core::option::Option::None, } } + /// Returns the enum variant name for the given selector, if known. #[inline] - pub fn name_by_selector( - selector: [u8; 4usize], - ) -> ::core::option::Option<&'static str> { + pub fn name_by_selector(selector: [u8; 4usize]) -> ::core::option::Option<&'static str> { let sig = Self::signature_by_selector(selector)?; sig.split_once('(').map(|(name, _)| name) } } #[automatically_derived] impl alloy_sol_types::SolInterface for BalancerV2StablePoolFactoryV2Calls { - const NAME: &'static str = "BalancerV2StablePoolFactoryV2Calls"; - const MIN_DATA_LENGTH: usize = 0usize; const COUNT: usize = 2usize; + const MIN_DATA_LENGTH: usize = 0usize; + const NAME: &'static str = "BalancerV2StablePoolFactoryV2Calls"; + #[inline] fn selector(&self) -> [u8; 4] { match self { @@ -792,27 +783,30 @@ function disable() external; Self::disable(_) => ::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 { + fn abi_decode_raw(selector: [u8; 4], data: &[u8]) -> alloy_sol_types::Result { static DECODE_SHIMS: &[fn( &[u8], - ) -> alloy_sol_types::Result] = &[ + ) -> alloy_sol_types::Result< + BalancerV2StablePoolFactoryV2Calls, + >] = &[ { fn disable( data: &[u8], - ) -> alloy_sol_types::Result { + ) -> alloy_sol_types::Result + { ::abi_decode_raw(data) .map(BalancerV2StablePoolFactoryV2Calls::disable) } @@ -821,7 +815,8 @@ function disable() external; { fn create( data: &[u8], - ) -> alloy_sol_types::Result { + ) -> alloy_sol_types::Result + { ::abi_decode_raw(data) .map(BalancerV2StablePoolFactoryV2Calls::create) } @@ -829,15 +824,14 @@ function disable() external; }, ]; let Ok(idx) = Self::SELECTORS.binary_search(&selector) else { - return Err( - alloy_sol_types::Error::unknown_selector( - ::NAME, - selector, - ), - ); + return Err(alloy_sol_types::Error::unknown_selector( + ::NAME, + selector, + )); }; DECODE_SHIMS[idx](data) } + #[inline] #[allow(non_snake_case)] fn abi_decode_raw_validate( @@ -846,14 +840,15 @@ function disable() external; ) -> alloy_sol_types::Result { static DECODE_VALIDATE_SHIMS: &[fn( &[u8], - ) -> alloy_sol_types::Result] = &[ + ) -> alloy_sol_types::Result< + BalancerV2StablePoolFactoryV2Calls, + >] = &[ { fn disable( data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) + ) -> alloy_sol_types::Result + { + ::abi_decode_raw_validate(data) .map(BalancerV2StablePoolFactoryV2Calls::disable) } disable @@ -861,25 +856,23 @@ function disable() external; { fn create( data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) + ) -> alloy_sol_types::Result + { + ::abi_decode_raw_validate(data) .map(BalancerV2StablePoolFactoryV2Calls::create) } create }, ]; let Ok(idx) = Self::SELECTORS.binary_search(&selector) else { - return Err( - alloy_sol_types::Error::unknown_selector( - ::NAME, - selector, - ), - ); + return Err(alloy_sol_types::Error::unknown_selector( + ::NAME, + selector, + )); }; DECODE_VALIDATE_SHIMS[idx](data) } + #[inline] fn abi_encoded_size(&self) -> usize { match self { @@ -891,6 +884,7 @@ function disable() external; } } } + #[inline] fn abi_encode_raw(&self, out: &mut alloy_sol_types::private::Vec) { match self { @@ -904,8 +898,7 @@ function disable() external; } } ///Container for all the [`BalancerV2StablePoolFactoryV2`](self) events. - #[derive(Clone)] - #[derive(Debug, PartialEq, Eq, Hash)] + #[derive(Clone, Debug, PartialEq, Eq, Hash)] pub enum BalancerV2StablePoolFactoryV2Events { #[allow(missing_docs)] FactoryDisabled(FactoryDisabled), @@ -915,33 +908,34 @@ function disable() external; impl BalancerV2StablePoolFactoryV2Events { /// 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. + /// 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]] = &[ [ - 67u8, 42u8, 203u8, 253u8, 102u8, 45u8, 187u8, 93u8, 139u8, 55u8, 131u8, - 132u8, 166u8, 113u8, 89u8, 180u8, 124u8, 169u8, 208u8, 241u8, 183u8, - 159u8, 151u8, 207u8, 100u8, 207u8, 133u8, 133u8, 250u8, 54u8, 45u8, 80u8, + 67u8, 42u8, 203u8, 253u8, 102u8, 45u8, 187u8, 93u8, 139u8, 55u8, 131u8, 132u8, + 166u8, 113u8, 89u8, 180u8, 124u8, 169u8, 208u8, 241u8, 183u8, 159u8, 151u8, 207u8, + 100u8, 207u8, 133u8, 133u8, 250u8, 54u8, 45u8, 80u8, ], [ - 131u8, 164u8, 143u8, 188u8, 252u8, 153u8, 19u8, 53u8, 49u8, 78u8, 116u8, - 208u8, 73u8, 106u8, 171u8, 106u8, 25u8, 135u8, 233u8, 146u8, 221u8, - 200u8, 93u8, 221u8, 188u8, 196u8, 214u8, 221u8, 110u8, 242u8, 233u8, - 252u8, + 131u8, 164u8, 143u8, 188u8, 252u8, 153u8, 19u8, 53u8, 49u8, 78u8, 116u8, 208u8, + 73u8, 106u8, 171u8, 106u8, 25u8, 135u8, 233u8, 146u8, 221u8, 200u8, 93u8, 221u8, + 188u8, 196u8, 214u8, 221u8, 110u8, 242u8, 233u8, 252u8, ], ]; - /// The names of the variants in the same order as `SELECTORS`. - pub const VARIANT_NAMES: &'static [&'static str] = &[ - ::core::stringify!(FactoryDisabled), - ::core::stringify!(PoolCreated), - ]; /// The signatures in the same order as `SELECTORS`. pub const SIGNATURES: &'static [&'static str] = &[ ::SIGNATURE, ::SIGNATURE, ]; + /// The names of the variants in the same order as `SELECTORS`. + pub const VARIANT_NAMES: &'static [&'static str] = &[ + ::core::stringify!(FactoryDisabled), + ::core::stringify!(PoolCreated), + ]; + /// Returns the signature for the given selector, if known. #[inline] pub fn signature_by_selector( @@ -954,49 +948,41 @@ function disable() external; ::core::result::Result::Err(_) => ::core::option::Option::None, } } + /// Returns the enum variant name for the given selector, if known. #[inline] - pub fn name_by_selector( - selector: [u8; 32usize], - ) -> ::core::option::Option<&'static str> { + pub fn name_by_selector(selector: [u8; 32usize]) -> ::core::option::Option<&'static str> { let sig = Self::signature_by_selector(selector)?; sig.split_once('(').map(|(name, _)| name) } } #[automatically_derived] impl alloy_sol_types::SolEventInterface for BalancerV2StablePoolFactoryV2Events { - const NAME: &'static str = "BalancerV2StablePoolFactoryV2Events"; const COUNT: usize = 2usize; + const NAME: &'static str = "BalancerV2StablePoolFactoryV2Events"; + 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, - ) + ::decode_raw_log(topics, data) .map(Self::FactoryDisabled) } Some(::SIGNATURE_HASH) => { - ::decode_raw_log( - topics, - data, - ) + ::decode_raw_log(topics, data) .map(Self::PoolCreated) } - _ => { - 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(), - ), + _ => 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(), ), - }) - } + ), + }), } } } @@ -1012,6 +998,7 @@ function disable() external; } } } + fn into_log_data(self) -> alloy_sol_types::private::LogData { match self { Self::FactoryDisabled(inner) => { @@ -1023,10 +1010,10 @@ function disable() external; } } } - use alloy_contract as alloy_contract; + use alloy_contract; /**Creates a new wrapper around an on-chain [`BalancerV2StablePoolFactoryV2`](self) contract instance. -See the [wrapper's documentation](`BalancerV2StablePoolFactoryV2Instance`) for more details.*/ + See the [wrapper's documentation](`BalancerV2StablePoolFactoryV2Instance`) for more details.*/ #[inline] pub const fn new< P: alloy_contract::private::Provider, @@ -1039,20 +1026,17 @@ See the [wrapper's documentation](`BalancerV2StablePoolFactoryV2Instance`) for m } /**A [`BalancerV2StablePoolFactoryV2`](self) instance. -Contains type-safe methods for interacting with an on-chain instance of the -[`BalancerV2StablePoolFactoryV2`](self) contract located at a given `address`, using a given -provider `P`. + Contains type-safe methods for interacting with an on-chain instance of the + [`BalancerV2StablePoolFactoryV2`](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. + 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.*/ + See the [module-level documentation](self) for all the available methods.*/ #[derive(Clone)] - pub struct BalancerV2StablePoolFactoryV2Instance< - P, - N = alloy_contract::private::Ethereum, - > { + pub struct BalancerV2StablePoolFactoryV2Instance { address: alloy_sol_types::private::Address, provider: P, _network: ::core::marker::PhantomData, @@ -1067,39 +1051,39 @@ See the [module-level documentation](self) for all the available methods.*/ } } /// Instantiation and getters/setters. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > BalancerV2StablePoolFactoryV2Instance { + impl, N: alloy_contract::private::Network> + BalancerV2StablePoolFactoryV2Instance + { /**Creates a new wrapper around an on-chain [`BalancerV2StablePoolFactoryV2`](self) contract instance. -See the [wrapper's documentation](`BalancerV2StablePoolFactoryV2Instance`) for more details.*/ + See the [wrapper's documentation](`BalancerV2StablePoolFactoryV2Instance`) for more details.*/ #[inline] - pub const fn new( - address: alloy_sol_types::private::Address, - __provider: P, - ) -> Self { + pub const fn new(address: alloy_sol_types::private::Address, __provider: P) -> Self { Self { address, provider: __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 { @@ -1107,11 +1091,10 @@ See the [wrapper's documentation](`BalancerV2StablePoolFactoryV2Instance`) for m } } impl BalancerV2StablePoolFactoryV2Instance<&P, N> { - /// Clones the provider and returns a new instance with the cloned provider. + /// Clones the provider and returns a new instance with the cloned + /// provider. #[inline] - pub fn with_cloned_provider( - self, - ) -> BalancerV2StablePoolFactoryV2Instance { + pub fn with_cloned_provider(self) -> BalancerV2StablePoolFactoryV2Instance { BalancerV2StablePoolFactoryV2Instance { address: self.address, provider: ::core::clone::Clone::clone(&self.provider), @@ -1120,20 +1103,22 @@ See the [wrapper's documentation](`BalancerV2StablePoolFactoryV2Instance`) for m } } /// Function calls. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > BalancerV2StablePoolFactoryV2Instance { - /// Creates a new call builder using this contract instance's provider and address. + impl, N: alloy_contract::private::Network> + BalancerV2StablePoolFactoryV2Instance + { + /// 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. + /// 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 [`create`] function. pub fn create( &self, @@ -1144,42 +1129,42 @@ See the [wrapper's documentation](`BalancerV2StablePoolFactoryV2Instance`) for m swapFeePercentage: alloy_sol_types::private::primitives::aliases::U256, owner: alloy_sol_types::private::Address, ) -> alloy_contract::SolCallBuilder<&P, createCall, N> { - self.call_builder( - &createCall { - name, - symbol, - tokens, - amplificationParameter, - swapFeePercentage, - owner, - }, - ) + self.call_builder(&createCall { + name, + symbol, + tokens, + amplificationParameter, + swapFeePercentage, + owner, + }) } + ///Creates a new call builder for the [`disable`] function. pub fn disable(&self) -> alloy_contract::SolCallBuilder<&P, disableCall, N> { self.call_builder(&disableCall) } } /// Event filters. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > BalancerV2StablePoolFactoryV2Instance { - /// Creates a new event filter using this contract instance's provider and address. + impl, N: alloy_contract::private::Network> + BalancerV2StablePoolFactoryV2Instance + { + /// 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. + /// 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 [`FactoryDisabled`] event. - pub fn FactoryDisabled_filter( - &self, - ) -> alloy_contract::Event<&P, FactoryDisabled, N> { + pub fn FactoryDisabled_filter(&self) -> alloy_contract::Event<&P, FactoryDisabled, N> { self.event_filter::() } + ///Creates a new event filter for the [`PoolCreated`] event. pub fn PoolCreated_filter(&self) -> alloy_contract::Event<&P, PoolCreated, N> { self.event_filter::() @@ -1190,53 +1175,33 @@ pub type Instance = BalancerV2StablePoolFactoryV2::BalancerV2StablePoolFactoryV2 ::alloy_provider::DynProvider, >; use { - std::{sync::LazyLock, collections::HashMap}, - anyhow::{Result, Context}, - alloy_primitives::{address, Address}, - alloy_provider::{Provider, DynProvider}, + alloy_primitives::{Address, address}, + alloy_provider::{DynProvider, Provider}, + anyhow::{Context, Result}, + std::{collections::HashMap, sync::LazyLock}, }; pub const fn deployment_info(chain_id: u64) -> Option<(Address, Option)> { match chain_id { - 1u64 => { - Some(( - ::alloy_primitives::address!( - "0x8df6efec5547e31b0eb7d1291b511ff8a2bf987c" - ), - Some(14934936u64), - )) - } - 10u64 => { - Some(( - ::alloy_primitives::address!( - "0xeb151668006CD04DAdD098AFd0a82e78F77076c3" - ), - Some(11088891u64), - )) - } - 100u64 => { - Some(( - ::alloy_primitives::address!( - "0xf23b4DB826DbA14c0e857029dfF076b1c0264843" - ), - Some(25415344u64), - )) - } - 137u64 => { - Some(( - ::alloy_primitives::address!( - "0xcA96C4f198d343E251b1a01F3EBA061ef3DA73C1" - ), - Some(29371951u64), - )) - } - 42161u64 => { - Some(( - ::alloy_primitives::address!( - "0xEF44D6786b2b4d544b7850Fe67CE6381626Bf2D6" - ), - Some(14244664u64), - )) - } + 1u64 => Some(( + ::alloy_primitives::address!("0x8df6efec5547e31b0eb7d1291b511ff8a2bf987c"), + Some(14934936u64), + )), + 10u64 => Some(( + ::alloy_primitives::address!("0xeb151668006CD04DAdD098AFd0a82e78F77076c3"), + Some(11088891u64), + )), + 100u64 => Some(( + ::alloy_primitives::address!("0xf23b4DB826DbA14c0e857029dfF076b1c0264843"), + Some(25415344u64), + )), + 137u64 => Some(( + ::alloy_primitives::address!("0xcA96C4f198d343E251b1a01F3EBA061ef3DA73C1"), + Some(29371951u64), + )), + 42161u64 => Some(( + ::alloy_primitives::address!("0xEF44D6786b2b4d544b7850Fe67CE6381626Bf2D6"), + Some(14244664u64), + )), _ => None, } } @@ -1253,9 +1218,7 @@ pub const fn deployment_block(chain_id: &u64) -> Option { } } impl Instance { - pub fn deployed( - provider: &DynProvider, - ) -> impl Future> + Send { + pub fn deployed(provider: &DynProvider) -> impl Future> + Send { async move { let chain_id = provider .get_chain_id() diff --git a/contracts/generated/contracts-generated/balancerv2vault/src/lib.rs b/contracts/generated/contracts-generated/balancerv2vault/src/lib.rs index 3115d03f94..7001682f53 100644 --- a/contracts/generated/contracts-generated/balancerv2vault/src/lib.rs +++ b/contracts/generated/contracts-generated/balancerv2vault/src/lib.rs @@ -1,4 +1,10 @@ -#![allow(unused_imports, unused_attributes, clippy::all, rustdoc::all, non_snake_case)] +#![allow( + unused_imports, + unused_attributes, + clippy::all, + rustdoc::all, + non_snake_case +)] //! Auto-generated contract bindings. Do not edit. ///Module containing a contract's types and functions. /** @@ -22,68 +28,67 @@ library IVault { clippy::empty_structs_with_brackets )] pub mod IVault { - use super::*; - use alloy_sol_types as alloy_sol_types; + use {super::*, alloy_sol_types}; #[derive(Default, Debug, PartialEq, Eq, Hash)] #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct PoolSpecialization(u8); const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[automatically_derived] impl alloy_sol_types::private::SolTypeValue for u8 { #[inline] fn stv_to_tokens( &self, - ) -> as alloy_sol_types::SolType>::Token<'_> { + ) -> as alloy_sol_types::SolType>::Token<'_> + { alloy_sol_types::private::SolTypeValue::< alloy_sol_types::sol_data::Uint<8>, >::stv_to_tokens(self) } + #[inline] fn stv_eip712_data_word(&self) -> alloy_sol_types::Word { - as alloy_sol_types::SolType>::tokenize(self) - .0 + as alloy_sol_types::SolType>::tokenize(self).0 } + #[inline] - fn stv_abi_encode_packed_to( - &self, - out: &mut alloy_sol_types::private::Vec, - ) { + fn stv_abi_encode_packed_to(&self, out: &mut alloy_sol_types::private::Vec) { as alloy_sol_types::SolType>::abi_encode_packed_to(self, out) } + #[inline] fn stv_abi_packed_encoded_size(&self) -> usize { - as alloy_sol_types::SolType>::abi_encoded_size(self) + as alloy_sol_types::SolType>::abi_encoded_size( + self, + ) } } impl PoolSpecialization { /// The Solidity type name. pub const NAME: &'static str = stringify!(@ name); + /// Convert from the underlying value type. #[inline] pub const fn from_underlying(value: u8) -> Self { Self(value) } + /// Return the underlying value. #[inline] pub const fn into_underlying(self) -> u8 { self.0 } + /// Return the single encoding of this value, delegating to the /// underlying type. #[inline] pub fn abi_encode(&self) -> alloy_sol_types::private::Vec { ::abi_encode(&self.0) } + /// Return the packed encoding of this value, delegating to the /// underlying type. #[inline] @@ -106,31 +111,29 @@ pub mod IVault { #[automatically_derived] impl alloy_sol_types::SolType for PoolSpecialization { type RustType = u8; - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SOL_NAME: &'static str = Self::NAME; - const ENCODED_SIZE: Option = as alloy_sol_types::SolType>::ENCODED_SIZE; + type Token<'a> = + as alloy_sol_types::SolType>::Token<'a>; + + const ENCODED_SIZE: Option = + as alloy_sol_types::SolType>::ENCODED_SIZE; const PACKED_ENCODED_SIZE: Option = as alloy_sol_types::SolType>::PACKED_ENCODED_SIZE; + const SOL_NAME: &'static str = Self::NAME; + #[inline] fn valid_token(token: &Self::Token<'_>) -> bool { Self::type_check(token).is_ok() } + #[inline] fn type_check(token: &Self::Token<'_>) -> alloy_sol_types::Result<()> { - as alloy_sol_types::SolType>::type_check(token) + as alloy_sol_types::SolType>::type_check(token) } + #[inline] fn detokenize(token: Self::Token<'_>) -> Self::RustType { - as alloy_sol_types::SolType>::detokenize(token) + as alloy_sol_types::SolType>::detokenize(token) } } #[automatically_derived] @@ -141,6 +144,7 @@ pub mod IVault { 8, > as alloy_sol_types::EventTopic>::topic_preimage_length(rust) } + #[inline] fn encode_topic_preimage( rust: &Self::RustType, @@ -150,13 +154,12 @@ pub mod IVault { 8, > as alloy_sol_types::EventTopic>::encode_topic_preimage(rust, out) } + #[inline] - fn encode_topic( - rust: &Self::RustType, - ) -> alloy_sol_types::abi::token::WordToken { - as alloy_sol_types::EventTopic>::encode_topic(rust) + fn encode_topic(rust: &Self::RustType) -> alloy_sol_types::abi::token::WordToken { + as alloy_sol_types::EventTopic>::encode_topic( + rust, + ) } } }; @@ -165,61 +168,61 @@ pub mod IVault { #[derive(Clone)] pub struct SwapKind(u8); const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[automatically_derived] impl alloy_sol_types::private::SolTypeValue for u8 { #[inline] fn stv_to_tokens( &self, - ) -> as alloy_sol_types::SolType>::Token<'_> { + ) -> as alloy_sol_types::SolType>::Token<'_> + { alloy_sol_types::private::SolTypeValue::< alloy_sol_types::sol_data::Uint<8>, >::stv_to_tokens(self) } + #[inline] fn stv_eip712_data_word(&self) -> alloy_sol_types::Word { - as alloy_sol_types::SolType>::tokenize(self) - .0 + as alloy_sol_types::SolType>::tokenize(self).0 } + #[inline] - fn stv_abi_encode_packed_to( - &self, - out: &mut alloy_sol_types::private::Vec, - ) { + fn stv_abi_encode_packed_to(&self, out: &mut alloy_sol_types::private::Vec) { as alloy_sol_types::SolType>::abi_encode_packed_to(self, out) } + #[inline] fn stv_abi_packed_encoded_size(&self) -> usize { - as alloy_sol_types::SolType>::abi_encoded_size(self) + as alloy_sol_types::SolType>::abi_encoded_size( + self, + ) } } impl SwapKind { /// The Solidity type name. pub const NAME: &'static str = stringify!(@ name); + /// Convert from the underlying value type. #[inline] pub const fn from_underlying(value: u8) -> Self { Self(value) } + /// Return the underlying value. #[inline] pub const fn into_underlying(self) -> u8 { self.0 } + /// Return the single encoding of this value, delegating to the /// underlying type. #[inline] pub fn abi_encode(&self) -> alloy_sol_types::private::Vec { ::abi_encode(&self.0) } + /// Return the packed encoding of this value, delegating to the /// underlying type. #[inline] @@ -242,31 +245,29 @@ pub mod IVault { #[automatically_derived] impl alloy_sol_types::SolType for SwapKind { type RustType = u8; - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SOL_NAME: &'static str = Self::NAME; - const ENCODED_SIZE: Option = as alloy_sol_types::SolType>::ENCODED_SIZE; + type Token<'a> = + as alloy_sol_types::SolType>::Token<'a>; + + const ENCODED_SIZE: Option = + as alloy_sol_types::SolType>::ENCODED_SIZE; const PACKED_ENCODED_SIZE: Option = as alloy_sol_types::SolType>::PACKED_ENCODED_SIZE; + const SOL_NAME: &'static str = Self::NAME; + #[inline] fn valid_token(token: &Self::Token<'_>) -> bool { Self::type_check(token).is_ok() } + #[inline] fn type_check(token: &Self::Token<'_>) -> alloy_sol_types::Result<()> { - as alloy_sol_types::SolType>::type_check(token) + as alloy_sol_types::SolType>::type_check(token) } + #[inline] fn detokenize(token: Self::Token<'_>) -> Self::RustType { - as alloy_sol_types::SolType>::detokenize(token) + as alloy_sol_types::SolType>::detokenize(token) } } #[automatically_derived] @@ -277,6 +278,7 @@ pub mod IVault { 8, > as alloy_sol_types::EventTopic>::topic_preimage_length(rust) } + #[inline] fn encode_topic_preimage( rust: &Self::RustType, @@ -286,13 +288,12 @@ pub mod IVault { 8, > as alloy_sol_types::EventTopic>::encode_topic_preimage(rust, out) } + #[inline] - fn encode_topic( - rust: &Self::RustType, - ) -> alloy_sol_types::abi::token::WordToken { - as alloy_sol_types::EventTopic>::encode_topic(rust) + fn encode_topic(rust: &Self::RustType) -> alloy_sol_types::abi::token::WordToken { + as alloy_sol_types::EventTopic>::encode_topic( + rust, + ) } } }; @@ -301,61 +302,61 @@ pub mod IVault { #[derive(Clone)] pub struct UserBalanceOpKind(u8); const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[automatically_derived] impl alloy_sol_types::private::SolTypeValue for u8 { #[inline] fn stv_to_tokens( &self, - ) -> as alloy_sol_types::SolType>::Token<'_> { + ) -> as alloy_sol_types::SolType>::Token<'_> + { alloy_sol_types::private::SolTypeValue::< alloy_sol_types::sol_data::Uint<8>, >::stv_to_tokens(self) } + #[inline] fn stv_eip712_data_word(&self) -> alloy_sol_types::Word { - as alloy_sol_types::SolType>::tokenize(self) - .0 + as alloy_sol_types::SolType>::tokenize(self).0 } + #[inline] - fn stv_abi_encode_packed_to( - &self, - out: &mut alloy_sol_types::private::Vec, - ) { + fn stv_abi_encode_packed_to(&self, out: &mut alloy_sol_types::private::Vec) { as alloy_sol_types::SolType>::abi_encode_packed_to(self, out) } + #[inline] fn stv_abi_packed_encoded_size(&self) -> usize { - as alloy_sol_types::SolType>::abi_encoded_size(self) + as alloy_sol_types::SolType>::abi_encoded_size( + self, + ) } } impl UserBalanceOpKind { /// The Solidity type name. pub const NAME: &'static str = stringify!(@ name); + /// Convert from the underlying value type. #[inline] pub const fn from_underlying(value: u8) -> Self { Self(value) } + /// Return the underlying value. #[inline] pub const fn into_underlying(self) -> u8 { self.0 } + /// Return the single encoding of this value, delegating to the /// underlying type. #[inline] pub fn abi_encode(&self) -> alloy_sol_types::private::Vec { ::abi_encode(&self.0) } + /// Return the packed encoding of this value, delegating to the /// underlying type. #[inline] @@ -378,31 +379,29 @@ pub mod IVault { #[automatically_derived] impl alloy_sol_types::SolType for UserBalanceOpKind { type RustType = u8; - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SOL_NAME: &'static str = Self::NAME; - const ENCODED_SIZE: Option = as alloy_sol_types::SolType>::ENCODED_SIZE; + type Token<'a> = + as alloy_sol_types::SolType>::Token<'a>; + + const ENCODED_SIZE: Option = + as alloy_sol_types::SolType>::ENCODED_SIZE; const PACKED_ENCODED_SIZE: Option = as alloy_sol_types::SolType>::PACKED_ENCODED_SIZE; + const SOL_NAME: &'static str = Self::NAME; + #[inline] fn valid_token(token: &Self::Token<'_>) -> bool { Self::type_check(token).is_ok() } + #[inline] fn type_check(token: &Self::Token<'_>) -> alloy_sol_types::Result<()> { - as alloy_sol_types::SolType>::type_check(token) + as alloy_sol_types::SolType>::type_check(token) } + #[inline] fn detokenize(token: Self::Token<'_>) -> Self::RustType { - as alloy_sol_types::SolType>::detokenize(token) + as alloy_sol_types::SolType>::detokenize(token) } } #[automatically_derived] @@ -413,6 +412,7 @@ pub mod IVault { 8, > as alloy_sol_types::EventTopic>::topic_preimage_length(rust) } + #[inline] fn encode_topic_preimage( rust: &Self::RustType, @@ -422,20 +422,19 @@ pub mod IVault { 8, > as alloy_sol_types::EventTopic>::encode_topic_preimage(rust, out) } + #[inline] - fn encode_topic( - rust: &Self::RustType, - ) -> alloy_sol_types::abi::token::WordToken { - as alloy_sol_types::EventTopic>::encode_topic(rust) + fn encode_topic(rust: &Self::RustType) -> alloy_sol_types::abi::token::WordToken { + as alloy_sol_types::EventTopic>::encode_topic( + rust, + ) } } }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**```solidity -struct BatchSwapStep { bytes32 poolId; uint256 assetInIndex; uint256 assetOutIndex; uint256 amount; bytes userData; } -```*/ + struct BatchSwapStep { bytes32 poolId; uint256 assetInIndex; uint256 assetOutIndex; uint256 amount; bytes userData; } + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct BatchSwapStep { @@ -457,7 +456,7 @@ struct BatchSwapStep { bytes32 poolId; uint256 assetInIndex; uint256 assetOutInd clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[doc(hidden)] #[allow(dead_code)] type UnderlyingSolTuple<'a> = ( @@ -477,9 +476,7 @@ struct BatchSwapStep { bytes32 poolId; uint256 assetInIndex; uint256 assetOutInd ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -538,91 +535,89 @@ struct BatchSwapStep { bytes32 poolId; uint256 assetInIndex; uint256 assetOutInd ), ) } + #[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) + 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) + 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) + 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 BatchSwapStep { type RustType = Self; - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + + const ENCODED_SIZE: Option = + as alloy_sol_types::SolType>::ENCODED_SIZE; + const PACKED_ENCODED_SIZE: Option = + as alloy_sol_types::SolType>::PACKED_ENCODED_SIZE; 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); + let tuple = as alloy_sol_types::SolType>::detokenize(token); >>::from(tuple) } } #[automatically_derived] impl alloy_sol_types::SolStruct for BatchSwapStep { const NAME: &'static str = "BatchSwapStep"; + #[inline] fn eip712_root_type() -> alloy_sol_types::private::Cow<'static, str> { alloy_sol_types::private::Cow::Borrowed( - "BatchSwapStep(bytes32 poolId,uint256 assetInIndex,uint256 assetOutIndex,uint256 amount,bytes userData)", + "BatchSwapStep(bytes32 poolId,uint256 assetInIndex,uint256 \ + assetOutIndex,uint256 amount,bytes userData)", ) } + #[inline] - fn eip712_components() -> alloy_sol_types::private::Vec< - alloy_sol_types::private::Cow<'static, str>, - > { + fn eip712_components() + -> alloy_sol_types::private::Vec> + { 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 { [ @@ -679,14 +674,13 @@ struct BatchSwapStep { bytes32 poolId; uint256 assetInIndex; uint256 assetOutInd &rust.userData, ) } + #[inline] fn encode_topic_preimage( rust: &Self::RustType, out: &mut alloy_sol_types::private::Vec, ) { - out.reserve( - ::topic_preimage_length(rust), - ); + out.reserve(::topic_preimage_length(rust)); as alloy_sol_types::EventTopic>::encode_topic_preimage( @@ -716,25 +710,19 @@ struct BatchSwapStep { bytes32 poolId; uint256 assetInIndex; uint256 assetOutInd out, ); } + #[inline] - fn encode_topic( - rust: &Self::RustType, - ) -> alloy_sol_types::abi::token::WordToken { + 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), - ) + ::encode_topic_preimage(rust, &mut out); + alloy_sol_types::abi::token::WordToken(alloy_sol_types::private::keccak256(out)) } } }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**```solidity -struct FundManagement { address sender; bool fromInternalBalance; address recipient; bool toInternalBalance; } -```*/ + struct FundManagement { address sender; bool fromInternalBalance; address recipient; bool toInternalBalance; } + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct FundManagement { @@ -754,7 +742,7 @@ struct FundManagement { address sender; bool fromInternalBalance; address recipi clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[doc(hidden)] #[allow(dead_code)] type UnderlyingSolTuple<'a> = ( @@ -772,9 +760,7 @@ struct FundManagement { address sender; bool fromInternalBalance; address recipi ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -828,91 +814,89 @@ struct FundManagement { address sender; bool fromInternalBalance; address recipi ), ) } + #[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) + 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) + 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) + 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 FundManagement { type RustType = Self; - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + + const ENCODED_SIZE: Option = + as alloy_sol_types::SolType>::ENCODED_SIZE; + const PACKED_ENCODED_SIZE: Option = + as alloy_sol_types::SolType>::PACKED_ENCODED_SIZE; 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); + let tuple = as alloy_sol_types::SolType>::detokenize(token); >>::from(tuple) } } #[automatically_derived] impl alloy_sol_types::SolStruct for FundManagement { const NAME: &'static str = "FundManagement"; + #[inline] fn eip712_root_type() -> alloy_sol_types::private::Cow<'static, str> { alloy_sol_types::private::Cow::Borrowed( - "FundManagement(address sender,bool fromInternalBalance,address recipient,bool toInternalBalance)", + "FundManagement(address sender,bool fromInternalBalance,address \ + recipient,bool toInternalBalance)", ) } + #[inline] - fn eip712_components() -> alloy_sol_types::private::Vec< - alloy_sol_types::private::Cow<'static, str>, - > { + fn eip712_components() + -> alloy_sol_types::private::Vec> + { 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 { [ @@ -954,14 +938,13 @@ struct FundManagement { address sender; bool fromInternalBalance; address recipi &rust.toInternalBalance, ) } + #[inline] fn encode_topic_preimage( rust: &Self::RustType, out: &mut alloy_sol_types::private::Vec, ) { - out.reserve( - ::topic_preimage_length(rust), - ); + out.reserve(::topic_preimage_length(rust)); ::encode_topic_preimage( &rust.sender, out, @@ -979,25 +962,19 @@ struct FundManagement { address sender; bool fromInternalBalance; address recipi out, ); } + #[inline] - fn encode_topic( - rust: &Self::RustType, - ) -> alloy_sol_types::abi::token::WordToken { + 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), - ) + ::encode_topic_preimage(rust, &mut out); + alloy_sol_types::abi::token::WordToken(alloy_sol_types::private::keccak256(out)) } } }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**```solidity -struct SingleSwap { bytes32 poolId; SwapKind kind; address assetIn; address assetOut; uint256 amount; bytes userData; } -```*/ + struct SingleSwap { bytes32 poolId; SwapKind kind; address assetIn; address assetOut; uint256 amount; bytes userData; } + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct SingleSwap { @@ -1021,7 +998,7 @@ struct SingleSwap { bytes32 poolId; SwapKind kind; address assetIn; address asse clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[doc(hidden)] #[allow(dead_code)] type UnderlyingSolTuple<'a> = ( @@ -1043,9 +1020,7 @@ struct SingleSwap { bytes32 poolId; SwapKind kind; address assetIn; address asse ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1107,91 +1082,89 @@ struct SingleSwap { bytes32 poolId; SwapKind kind; address assetIn; address asse ), ) } + #[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) + 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) + 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) + 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 SingleSwap { type RustType = Self; - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + + const ENCODED_SIZE: Option = + as alloy_sol_types::SolType>::ENCODED_SIZE; + const PACKED_ENCODED_SIZE: Option = + as alloy_sol_types::SolType>::PACKED_ENCODED_SIZE; 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); + let tuple = as alloy_sol_types::SolType>::detokenize(token); >>::from(tuple) } } #[automatically_derived] impl alloy_sol_types::SolStruct for SingleSwap { const NAME: &'static str = "SingleSwap"; + #[inline] fn eip712_root_type() -> alloy_sol_types::private::Cow<'static, str> { alloy_sol_types::private::Cow::Borrowed( - "SingleSwap(bytes32 poolId,uint8 kind,address assetIn,address assetOut,uint256 amount,bytes userData)", + "SingleSwap(bytes32 poolId,uint8 kind,address assetIn,address \ + assetOut,uint256 amount,bytes userData)", ) } + #[inline] - fn eip712_components() -> alloy_sol_types::private::Vec< - alloy_sol_types::private::Cow<'static, str>, - > { + fn eip712_components() + -> alloy_sol_types::private::Vec> + { 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 { [ @@ -1249,24 +1222,20 @@ struct SingleSwap { bytes32 poolId; SwapKind kind; address assetIn; address asse &rust.userData, ) } + #[inline] fn encode_topic_preimage( rust: &Self::RustType, out: &mut alloy_sol_types::private::Vec, ) { - out.reserve( - ::topic_preimage_length(rust), - ); + out.reserve(::topic_preimage_length(rust)); as alloy_sol_types::EventTopic>::encode_topic_preimage( &rust.poolId, out, ); - ::encode_topic_preimage( - &rust.kind, - out, - ); + ::encode_topic_preimage(&rust.kind, out); ::encode_topic_preimage( &rust.assetIn, out, @@ -1286,25 +1255,19 @@ struct SingleSwap { bytes32 poolId; SwapKind kind; address assetIn; address asse out, ); } + #[inline] - fn encode_topic( - rust: &Self::RustType, - ) -> alloy_sol_types::abi::token::WordToken { + 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), - ) + ::encode_topic_preimage(rust, &mut out); + alloy_sol_types::abi::token::WordToken(alloy_sol_types::private::keccak256(out)) } } }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**```solidity -struct UserBalanceOp { UserBalanceOpKind kind; address asset; uint256 amount; address sender; address recipient; } -```*/ + struct UserBalanceOp { UserBalanceOpKind kind; address asset; uint256 amount; address sender; address recipient; } + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct UserBalanceOp { @@ -1326,7 +1289,7 @@ struct UserBalanceOp { UserBalanceOpKind kind; address asset; uint256 amount; ad clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[doc(hidden)] #[allow(dead_code)] type UnderlyingSolTuple<'a> = ( @@ -1346,9 +1309,7 @@ struct UserBalanceOp { UserBalanceOpKind kind; address asset; uint256 amount; ad ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1359,7 +1320,13 @@ struct UserBalanceOp { UserBalanceOpKind kind; address asset; uint256 amount; ad #[doc(hidden)] impl ::core::convert::From for UnderlyingRustTuple<'_> { fn from(value: UserBalanceOp) -> Self { - (value.kind, value.asset, value.amount, value.sender, value.recipient) + ( + value.kind, + value.asset, + value.amount, + value.sender, + value.recipient, + ) } } #[automatically_derived] @@ -1384,15 +1351,13 @@ struct UserBalanceOp { UserBalanceOpKind kind; address asset; uint256 amount; ad #[inline] fn stv_to_tokens(&self) -> ::Token<'_> { ( - ::tokenize( - &self.kind, - ), + ::tokenize(&self.kind), ::tokenize( &self.asset, ), - as alloy_sol_types::SolType>::tokenize(&self.amount), + as alloy_sol_types::SolType>::tokenize( + &self.amount, + ), ::tokenize( &self.sender, ), @@ -1401,91 +1366,89 @@ struct UserBalanceOp { UserBalanceOpKind kind; address asset; uint256 amount; ad ), ) } + #[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) + 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) + 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) + 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 UserBalanceOp { type RustType = Self; - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + + const ENCODED_SIZE: Option = + as alloy_sol_types::SolType>::ENCODED_SIZE; + const PACKED_ENCODED_SIZE: Option = + as alloy_sol_types::SolType>::PACKED_ENCODED_SIZE; 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); + let tuple = as alloy_sol_types::SolType>::detokenize(token); >>::from(tuple) } } #[automatically_derived] impl alloy_sol_types::SolStruct for UserBalanceOp { const NAME: &'static str = "UserBalanceOp"; + #[inline] fn eip712_root_type() -> alloy_sol_types::private::Cow<'static, str> { alloy_sol_types::private::Cow::Borrowed( - "UserBalanceOp(uint8 kind,address asset,uint256 amount,address sender,address recipient)", + "UserBalanceOp(uint8 kind,address asset,uint256 amount,address sender,address \ + recipient)", ) } + #[inline] - fn eip712_components() -> alloy_sol_types::private::Vec< - alloy_sol_types::private::Cow<'static, str>, - > { + fn eip712_components() + -> alloy_sol_types::private::Vec> + { 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 { [ @@ -1536,17 +1499,15 @@ struct UserBalanceOp { UserBalanceOpKind kind; address asset; uint256 amount; ad &rust.recipient, ) } + #[inline] fn encode_topic_preimage( rust: &Self::RustType, out: &mut alloy_sol_types::private::Vec, ) { - out.reserve( - ::topic_preimage_length(rust), - ); + out.reserve(::topic_preimage_length(rust)); ::encode_topic_preimage( - &rust.kind, - out, + &rust.kind, out, ); ::encode_topic_preimage( &rust.asset, @@ -1567,25 +1528,19 @@ struct UserBalanceOp { UserBalanceOpKind kind; address asset; uint256 amount; ad out, ); } + #[inline] - fn encode_topic( - rust: &Self::RustType, - ) -> alloy_sol_types::abi::token::WordToken { + 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), - ) + ::encode_topic_preimage(rust, &mut out); + alloy_sol_types::abi::token::WordToken(alloy_sol_types::private::keccak256(out)) } } }; - use alloy_contract as alloy_contract; + use alloy_contract; /**Creates a new wrapper around an on-chain [`IVault`](self) contract instance. -See the [wrapper's documentation](`IVaultInstance`) for more details.*/ + See the [wrapper's documentation](`IVaultInstance`) for more details.*/ #[inline] pub const fn new< P: alloy_contract::private::Provider, @@ -1598,15 +1553,15 @@ See the [wrapper's documentation](`IVaultInstance`) for more details.*/ } /**A [`IVault`](self) instance. -Contains type-safe methods for interacting with an on-chain instance of the -[`IVault`](self) contract located at a given `address`, using a given -provider `P`. + Contains type-safe methods for interacting with an on-chain instance of the + [`IVault`](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. + 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.*/ + See the [module-level documentation](self) for all the available methods.*/ #[derive(Clone)] pub struct IVaultInstance { address: alloy_sol_types::private::Address, @@ -1617,43 +1572,45 @@ See the [module-level documentation](self) for all the available methods.*/ impl ::core::fmt::Debug for IVaultInstance { #[inline] fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { - f.debug_tuple("IVaultInstance").field(&self.address).finish() + f.debug_tuple("IVaultInstance") + .field(&self.address) + .finish() } } /// Instantiation and getters/setters. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > IVaultInstance { + impl, N: alloy_contract::private::Network> + IVaultInstance + { /**Creates a new wrapper around an on-chain [`IVault`](self) contract instance. -See the [wrapper's documentation](`IVaultInstance`) for more details.*/ + See the [wrapper's documentation](`IVaultInstance`) for more details.*/ #[inline] - pub const fn new( - address: alloy_sol_types::private::Address, - __provider: P, - ) -> Self { + pub const fn new(address: alloy_sol_types::private::Address, __provider: P) -> Self { Self { address, provider: __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 { @@ -1661,7 +1618,8 @@ See the [wrapper's documentation](`IVaultInstance`) for more details.*/ } } impl IVaultInstance<&P, N> { - /// Clones the provider and returns a new instance with the cloned provider. + /// Clones the provider and returns a new instance with the cloned + /// provider. #[inline] pub fn with_cloned_provider(self) -> IVaultInstance { IVaultInstance { @@ -1672,14 +1630,15 @@ See the [wrapper's documentation](`IVaultInstance`) for more details.*/ } } /// Function calls. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > IVaultInstance { - /// Creates a new call builder using this contract instance's provider and address. + impl, N: alloy_contract::private::Network> + IVaultInstance + { + /// 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. + /// 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, @@ -1688,14 +1647,15 @@ See the [wrapper's documentation](`IVaultInstance`) for more details.*/ } } /// Event filters. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > IVaultInstance { - /// Creates a new event filter using this contract instance's provider and address. + impl, N: alloy_contract::private::Network> + IVaultInstance + { + /// 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. + /// 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> { @@ -2543,8 +2503,7 @@ interface BalancerV2Vault { clippy::empty_structs_with_brackets )] pub mod BalancerV2Vault { - use super::*; - use alloy_sol_types as alloy_sol_types; + use {super::*, alloy_sol_types}; /// The creation / init bytecode of the contract. /// /// ```text @@ -2557,9 +2516,9 @@ pub mod BalancerV2Vault { ); #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Event with signature `AuthorizerChanged(address)` and selector `0x94b979b6831a51293e2641426f97747feed46f17779fed9cd18d1ecefcfe92ef`. -```solidity -event AuthorizerChanged(address indexed newAuthorizer); -```*/ + ```solidity + event AuthorizerChanged(address indexed newAuthorizer); + ```*/ #[allow( non_camel_case_types, non_snake_case, @@ -2578,56 +2537,60 @@ event AuthorizerChanged(address indexed newAuthorizer); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[automatically_derived] impl alloy_sol_types::SolEvent for AuthorizerChanged { + type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; 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::Address, ); - const SIGNATURE: &'static str = "AuthorizerChanged(address)"; - const SIGNATURE_HASH: alloy_sol_types::private::B256 = alloy_sol_types::private::B256::new([ - 148u8, 185u8, 121u8, 182u8, 131u8, 26u8, 81u8, 41u8, 62u8, 38u8, 65u8, - 66u8, 111u8, 151u8, 116u8, 127u8, 238u8, 212u8, 111u8, 23u8, 119u8, - 159u8, 237u8, 156u8, 209u8, 141u8, 30u8, 206u8, 252u8, 254u8, 146u8, - 239u8, - ]); + const ANONYMOUS: bool = false; + const SIGNATURE: &'static str = "AuthorizerChanged(address)"; + const SIGNATURE_HASH: alloy_sol_types::private::B256 = + alloy_sol_types::private::B256::new([ + 148u8, 185u8, 121u8, 182u8, 131u8, 26u8, 81u8, 41u8, 62u8, 38u8, 65u8, 66u8, + 111u8, 151u8, 116u8, 127u8, 238u8, 212u8, 111u8, 23u8, 119u8, 159u8, 237u8, + 156u8, 209u8, 141u8, 30u8, 206u8, 252u8, 254u8, 146u8, 239u8, + ]); + #[allow(unused_variables)] #[inline] fn new( topics: ::RustType, data: as alloy_sol_types::SolType>::RustType, ) -> Self { - Self { newAuthorizer: topics.1 } + Self { + newAuthorizer: topics.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, - ), - ); + 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.newAuthorizer.clone()) } + #[inline] fn encode_topics_raw( &self, @@ -2636,9 +2599,7 @@ event AuthorizerChanged(address indexed newAuthorizer); if out.len() < ::COUNT { return Err(alloy_sol_types::Error::Overrun); } - out[0usize] = alloy_sol_types::abi::token::WordToken( - Self::SIGNATURE_HASH, - ); + out[0usize] = alloy_sol_types::abi::token::WordToken(Self::SIGNATURE_HASH); out[1usize] = ::encode_topic( &self.newAuthorizer, ); @@ -2650,6 +2611,7 @@ event AuthorizerChanged(address indexed newAuthorizer); 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) } @@ -2664,9 +2626,9 @@ event AuthorizerChanged(address indexed newAuthorizer); }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Event with signature `ExternalBalanceTransfer(address,address,address,uint256)` and selector `0x540a1a3f28340caec336c81d8d7b3df139ee5cdc1839a4f283d7ebb7eaae2d5c`. -```solidity -event ExternalBalanceTransfer(address indexed token, address indexed sender, address recipient, uint256 amount); -```*/ + ```solidity + event ExternalBalanceTransfer(address indexed token, address indexed sender, address recipient, uint256 amount); + ```*/ #[allow( non_camel_case_types, non_snake_case, @@ -2691,28 +2653,30 @@ event ExternalBalanceTransfer(address indexed token, address indexed sender, add clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[automatically_derived] impl alloy_sol_types::SolEvent for ExternalBalanceTransfer { + type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type DataTuple<'a> = ( alloy_sol_types::sol_data::Address, 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 = "ExternalBalanceTransfer(address,address,address,uint256)"; - const SIGNATURE_HASH: alloy_sol_types::private::B256 = alloy_sol_types::private::B256::new([ - 84u8, 10u8, 26u8, 63u8, 40u8, 52u8, 12u8, 174u8, 195u8, 54u8, 200u8, - 29u8, 141u8, 123u8, 61u8, 241u8, 57u8, 238u8, 92u8, 220u8, 24u8, 57u8, - 164u8, 242u8, 131u8, 215u8, 235u8, 183u8, 234u8, 174u8, 45u8, 92u8, - ]); + const ANONYMOUS: bool = false; + const SIGNATURE: &'static str = + "ExternalBalanceTransfer(address,address,address,uint256)"; + const SIGNATURE_HASH: alloy_sol_types::private::B256 = + alloy_sol_types::private::B256::new([ + 84u8, 10u8, 26u8, 63u8, 40u8, 52u8, 12u8, 174u8, 195u8, 54u8, 200u8, 29u8, + 141u8, 123u8, 61u8, 241u8, 57u8, 238u8, 92u8, 220u8, 24u8, 57u8, 164u8, 242u8, + 131u8, 215u8, 235u8, 183u8, 234u8, 174u8, 45u8, 92u8, + ]); + #[allow(unused_variables)] #[inline] fn new( @@ -2726,36 +2690,42 @@ event ExternalBalanceTransfer(address indexed token, address indexed sender, add amount: 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, - ), - ); + 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.recipient, ), - as alloy_sol_types::SolType>::tokenize(&self.amount), + as alloy_sol_types::SolType>::tokenize( + &self.amount, + ), ) } + #[inline] fn topics(&self) -> ::RustType { - (Self::SIGNATURE_HASH.into(), self.token.clone(), self.sender.clone()) + ( + Self::SIGNATURE_HASH.into(), + self.token.clone(), + self.sender.clone(), + ) } + #[inline] fn encode_topics_raw( &self, @@ -2764,9 +2734,7 @@ event ExternalBalanceTransfer(address indexed token, address indexed sender, add if out.len() < ::COUNT { return Err(alloy_sol_types::Error::Overrun); } - out[0usize] = alloy_sol_types::abi::token::WordToken( - Self::SIGNATURE_HASH, - ); + out[0usize] = alloy_sol_types::abi::token::WordToken(Self::SIGNATURE_HASH); out[1usize] = ::encode_topic( &self.token, ); @@ -2781,6 +2749,7 @@ event ExternalBalanceTransfer(address indexed token, address indexed sender, add 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) } @@ -2788,18 +2757,16 @@ event ExternalBalanceTransfer(address indexed token, address indexed sender, add #[automatically_derived] impl From<&ExternalBalanceTransfer> for alloy_sol_types::private::LogData { #[inline] - fn from( - this: &ExternalBalanceTransfer, - ) -> alloy_sol_types::private::LogData { + fn from(this: &ExternalBalanceTransfer) -> alloy_sol_types::private::LogData { alloy_sol_types::SolEvent::encode_log_data(this) } } }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Event with signature `FlashLoan(address,address,uint256,uint256)` and selector `0x0d7d75e01ab95780d3cd1c8ec0dd6c2ce19e3a20427eec8bf53283b6fb8e95f0`. -```solidity -event FlashLoan(address indexed recipient, address indexed token, uint256 amount, uint256 feeAmount); -```*/ + ```solidity + event FlashLoan(address indexed recipient, address indexed token, uint256 amount, uint256 feeAmount); + ```*/ #[allow( non_camel_case_types, non_snake_case, @@ -2824,28 +2791,29 @@ event FlashLoan(address indexed recipient, address indexed token, uint256 amount clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[automatically_derived] impl alloy_sol_types::SolEvent for FlashLoan { + type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type DataTuple<'a> = ( alloy_sol_types::sol_data::Uint<256>, 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 = "FlashLoan(address,address,uint256,uint256)"; - const SIGNATURE_HASH: alloy_sol_types::private::B256 = alloy_sol_types::private::B256::new([ - 13u8, 125u8, 117u8, 224u8, 26u8, 185u8, 87u8, 128u8, 211u8, 205u8, 28u8, - 142u8, 192u8, 221u8, 108u8, 44u8, 225u8, 158u8, 58u8, 32u8, 66u8, 126u8, - 236u8, 139u8, 245u8, 50u8, 131u8, 182u8, 251u8, 142u8, 149u8, 240u8, - ]); + const ANONYMOUS: bool = false; + const SIGNATURE: &'static str = "FlashLoan(address,address,uint256,uint256)"; + const SIGNATURE_HASH: alloy_sol_types::private::B256 = + alloy_sol_types::private::B256::new([ + 13u8, 125u8, 117u8, 224u8, 26u8, 185u8, 87u8, 128u8, 211u8, 205u8, 28u8, 142u8, + 192u8, 221u8, 108u8, 44u8, 225u8, 158u8, 58u8, 32u8, 66u8, 126u8, 236u8, 139u8, + 245u8, 50u8, 131u8, 182u8, 251u8, 142u8, 149u8, 240u8, + ]); + #[allow(unused_variables)] #[inline] fn new( @@ -2859,36 +2827,42 @@ event FlashLoan(address indexed recipient, address indexed token, uint256 amount feeAmount: 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, - ), - ); + 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), - as alloy_sol_types::SolType>::tokenize(&self.feeAmount), + as alloy_sol_types::SolType>::tokenize( + &self.amount, + ), + as alloy_sol_types::SolType>::tokenize( + &self.feeAmount, + ), ) } + #[inline] fn topics(&self) -> ::RustType { - (Self::SIGNATURE_HASH.into(), self.recipient.clone(), self.token.clone()) + ( + Self::SIGNATURE_HASH.into(), + self.recipient.clone(), + self.token.clone(), + ) } + #[inline] fn encode_topics_raw( &self, @@ -2897,9 +2871,7 @@ event FlashLoan(address indexed recipient, address indexed token, uint256 amount if out.len() < ::COUNT { return Err(alloy_sol_types::Error::Overrun); } - out[0usize] = alloy_sol_types::abi::token::WordToken( - Self::SIGNATURE_HASH, - ); + out[0usize] = alloy_sol_types::abi::token::WordToken(Self::SIGNATURE_HASH); out[1usize] = ::encode_topic( &self.recipient, ); @@ -2914,6 +2886,7 @@ event FlashLoan(address indexed recipient, address indexed token, uint256 amount 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) } @@ -2928,9 +2901,9 @@ event FlashLoan(address indexed recipient, address indexed token, uint256 amount }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Event with signature `InternalBalanceChanged(address,address,int256)` and selector `0x18e1ea4139e68413d7d08aa752e71568e36b2c5bf940893314c2c5b01eaa0c42`. -```solidity -event InternalBalanceChanged(address indexed user, address indexed token, int256 delta); -```*/ + ```solidity + event InternalBalanceChanged(address indexed user, address indexed token, int256 delta); + ```*/ #[allow( non_camel_case_types, non_snake_case, @@ -2953,25 +2926,26 @@ event InternalBalanceChanged(address indexed user, address indexed token, int256 clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[automatically_derived] impl alloy_sol_types::SolEvent for InternalBalanceChanged { + type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type DataTuple<'a> = (alloy_sol_types::sol_data::Int<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 = "InternalBalanceChanged(address,address,int256)"; - const SIGNATURE_HASH: alloy_sol_types::private::B256 = alloy_sol_types::private::B256::new([ - 24u8, 225u8, 234u8, 65u8, 57u8, 230u8, 132u8, 19u8, 215u8, 208u8, 138u8, - 167u8, 82u8, 231u8, 21u8, 104u8, 227u8, 107u8, 44u8, 91u8, 249u8, 64u8, - 137u8, 51u8, 20u8, 194u8, 197u8, 176u8, 30u8, 170u8, 12u8, 66u8, - ]); + const ANONYMOUS: bool = false; + const SIGNATURE: &'static str = "InternalBalanceChanged(address,address,int256)"; + const SIGNATURE_HASH: alloy_sol_types::private::B256 = + alloy_sol_types::private::B256::new([ + 24u8, 225u8, 234u8, 65u8, 57u8, 230u8, 132u8, 19u8, 215u8, 208u8, 138u8, 167u8, + 82u8, 231u8, 21u8, 104u8, 227u8, 107u8, 44u8, 91u8, 249u8, 64u8, 137u8, 51u8, + 20u8, 194u8, 197u8, 176u8, 30u8, 170u8, 12u8, 66u8, + ]); + #[allow(unused_variables)] #[inline] fn new( @@ -2984,33 +2958,39 @@ event InternalBalanceChanged(address indexed user, address indexed token, int256 delta: 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, - ), - ); + 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.delta), + as alloy_sol_types::SolType>::tokenize( + &self.delta, + ), ) } + #[inline] fn topics(&self) -> ::RustType { - (Self::SIGNATURE_HASH.into(), self.user.clone(), self.token.clone()) + ( + Self::SIGNATURE_HASH.into(), + self.user.clone(), + self.token.clone(), + ) } + #[inline] fn encode_topics_raw( &self, @@ -3019,9 +2999,7 @@ event InternalBalanceChanged(address indexed user, address indexed token, int256 if out.len() < ::COUNT { return Err(alloy_sol_types::Error::Overrun); } - out[0usize] = alloy_sol_types::abi::token::WordToken( - Self::SIGNATURE_HASH, - ); + out[0usize] = alloy_sol_types::abi::token::WordToken(Self::SIGNATURE_HASH); out[1usize] = ::encode_topic( &self.user, ); @@ -3036,6 +3014,7 @@ event InternalBalanceChanged(address indexed user, address indexed token, int256 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) } @@ -3050,9 +3029,9 @@ event InternalBalanceChanged(address indexed user, address indexed token, int256 }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Event with signature `PausedStateChanged(bool)` and selector `0x9e3a5e37224532dea67b89face185703738a228a6e8a23dee546960180d3be64`. -```solidity -event PausedStateChanged(bool paused); -```*/ + ```solidity + event PausedStateChanged(bool paused); + ```*/ #[allow( non_camel_case_types, non_snake_case, @@ -3071,21 +3050,22 @@ event PausedStateChanged(bool paused); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[automatically_derived] impl alloy_sol_types::SolEvent for PausedStateChanged { + type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type DataTuple<'a> = (alloy_sol_types::sol_data::Bool,); - type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type TopicList = (alloy_sol_types::sol_data::FixedBytes<32>,); - const SIGNATURE: &'static str = "PausedStateChanged(bool)"; - const SIGNATURE_HASH: alloy_sol_types::private::B256 = alloy_sol_types::private::B256::new([ - 158u8, 58u8, 94u8, 55u8, 34u8, 69u8, 50u8, 222u8, 166u8, 123u8, 137u8, - 250u8, 206u8, 24u8, 87u8, 3u8, 115u8, 138u8, 34u8, 138u8, 110u8, 138u8, - 35u8, 222u8, 229u8, 70u8, 150u8, 1u8, 128u8, 211u8, 190u8, 100u8, - ]); + const ANONYMOUS: bool = false; + const SIGNATURE: &'static str = "PausedStateChanged(bool)"; + const SIGNATURE_HASH: alloy_sol_types::private::B256 = + alloy_sol_types::private::B256::new([ + 158u8, 58u8, 94u8, 55u8, 34u8, 69u8, 50u8, 222u8, 166u8, 123u8, 137u8, 250u8, + 206u8, 24u8, 87u8, 3u8, 115u8, 138u8, 34u8, 138u8, 110u8, 138u8, 35u8, 222u8, + 229u8, 70u8, 150u8, 1u8, 128u8, 211u8, 190u8, 100u8, + ]); + #[allow(unused_variables)] #[inline] fn new( @@ -3094,21 +3074,21 @@ event PausedStateChanged(bool paused); ) -> Self { Self { paused: 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, - ), - ); + 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<'_> { ( @@ -3117,10 +3097,12 @@ event PausedStateChanged(bool paused); ), ) } + #[inline] fn topics(&self) -> ::RustType { (Self::SIGNATURE_HASH.into(),) } + #[inline] fn encode_topics_raw( &self, @@ -3129,9 +3111,7 @@ event PausedStateChanged(bool paused); if out.len() < ::COUNT { return Err(alloy_sol_types::Error::Overrun); } - out[0usize] = alloy_sol_types::abi::token::WordToken( - Self::SIGNATURE_HASH, - ); + out[0usize] = alloy_sol_types::abi::token::WordToken(Self::SIGNATURE_HASH); Ok(()) } } @@ -3140,6 +3120,7 @@ event PausedStateChanged(bool 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) } @@ -3154,9 +3135,9 @@ event PausedStateChanged(bool paused); }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Event with signature `PoolBalanceChanged(bytes32,address,address[],int256[],uint256[])` and selector `0xe5ce249087ce04f05a957192435400fd97868dba0e6a4b4c049abf8af80dae78`. -```solidity -event PoolBalanceChanged(bytes32 indexed poolId, address indexed liquidityProvider, address[] tokens, int256[] deltas, uint256[] protocolFeeAmounts); -```*/ + ```solidity + event PoolBalanceChanged(bytes32 indexed poolId, address indexed liquidityProvider, address[] tokens, int256[] deltas, uint256[] protocolFeeAmounts); + ```*/ #[allow( non_camel_case_types, non_snake_case, @@ -3172,13 +3153,11 @@ event PoolBalanceChanged(bytes32 indexed poolId, address indexed liquidityProvid #[allow(missing_docs)] pub tokens: alloy_sol_types::private::Vec, #[allow(missing_docs)] - pub deltas: alloy_sol_types::private::Vec< - alloy_sol_types::private::primitives::aliases::I256, - >, + pub deltas: + alloy_sol_types::private::Vec, #[allow(missing_docs)] - pub protocolFeeAmounts: alloy_sol_types::private::Vec< - alloy_sol_types::private::primitives::aliases::U256, - >, + pub protocolFeeAmounts: + alloy_sol_types::private::Vec, } #[allow( non_camel_case_types, @@ -3187,29 +3166,31 @@ event PoolBalanceChanged(bytes32 indexed poolId, address indexed liquidityProvid clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[automatically_derived] impl alloy_sol_types::SolEvent for PoolBalanceChanged { + type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type DataTuple<'a> = ( alloy_sol_types::sol_data::Array, alloy_sol_types::sol_data::Array>, alloy_sol_types::sol_data::Array>, ); - 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, ); - const SIGNATURE: &'static str = "PoolBalanceChanged(bytes32,address,address[],int256[],uint256[])"; - const SIGNATURE_HASH: alloy_sol_types::private::B256 = alloy_sol_types::private::B256::new([ - 229u8, 206u8, 36u8, 144u8, 135u8, 206u8, 4u8, 240u8, 90u8, 149u8, 113u8, - 146u8, 67u8, 84u8, 0u8, 253u8, 151u8, 134u8, 141u8, 186u8, 14u8, 106u8, - 75u8, 76u8, 4u8, 154u8, 191u8, 138u8, 248u8, 13u8, 174u8, 120u8, - ]); + const ANONYMOUS: bool = false; + const SIGNATURE: &'static str = + "PoolBalanceChanged(bytes32,address,address[],int256[],uint256[])"; + const SIGNATURE_HASH: alloy_sol_types::private::B256 = + alloy_sol_types::private::B256::new([ + 229u8, 206u8, 36u8, 144u8, 135u8, 206u8, 4u8, 240u8, 90u8, 149u8, 113u8, 146u8, + 67u8, 84u8, 0u8, 253u8, 151u8, 134u8, 141u8, 186u8, 14u8, 106u8, 75u8, 76u8, + 4u8, 154u8, 191u8, 138u8, 248u8, 13u8, 174u8, 120u8, + ]); + #[allow(unused_variables)] #[inline] fn new( @@ -3224,21 +3205,21 @@ event PoolBalanceChanged(bytes32 indexed poolId, address indexed liquidityProvid protocolFeeAmounts: data.2, } } + #[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, - ), - ); + 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<'_> { ( @@ -3253,6 +3234,7 @@ event PoolBalanceChanged(bytes32 indexed poolId, address indexed liquidityProvid > as alloy_sol_types::SolType>::tokenize(&self.protocolFeeAmounts), ) } + #[inline] fn topics(&self) -> ::RustType { ( @@ -3261,6 +3243,7 @@ event PoolBalanceChanged(bytes32 indexed poolId, address indexed liquidityProvid self.liquidityProvider.clone(), ) } + #[inline] fn encode_topics_raw( &self, @@ -3269,9 +3252,7 @@ event PoolBalanceChanged(bytes32 indexed poolId, address indexed liquidityProvid if out.len() < ::COUNT { return Err(alloy_sol_types::Error::Overrun); } - out[0usize] = alloy_sol_types::abi::token::WordToken( - Self::SIGNATURE_HASH, - ); + out[0usize] = alloy_sol_types::abi::token::WordToken(Self::SIGNATURE_HASH); out[1usize] = as alloy_sol_types::EventTopic>::encode_topic(&self.poolId); @@ -3286,6 +3267,7 @@ event PoolBalanceChanged(bytes32 indexed poolId, address indexed liquidityProvid 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) } @@ -3300,9 +3282,9 @@ event PoolBalanceChanged(bytes32 indexed poolId, address indexed liquidityProvid }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Event with signature `PoolBalanceManaged(bytes32,address,address,int256,int256)` and selector `0x6edcaf6241105b4c94c2efdbf3a6b12458eb3d07be3a0e81d24b13c44045fe7a`. -```solidity -event PoolBalanceManaged(bytes32 indexed poolId, address indexed assetManager, address indexed token, int256 cashDelta, int256 managedDelta); -```*/ + ```solidity + event PoolBalanceManaged(bytes32 indexed poolId, address indexed assetManager, address indexed token, int256 cashDelta, int256 managedDelta); + ```*/ #[allow( non_camel_case_types, non_snake_case, @@ -3329,29 +3311,31 @@ event PoolBalanceManaged(bytes32 indexed poolId, address indexed assetManager, a clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[automatically_derived] impl alloy_sol_types::SolEvent for PoolBalanceManaged { + type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type DataTuple<'a> = ( alloy_sol_types::sol_data::Int<256>, alloy_sol_types::sol_data::Int<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::FixedBytes<32>, alloy_sol_types::sol_data::Address, alloy_sol_types::sol_data::Address, ); - const SIGNATURE: &'static str = "PoolBalanceManaged(bytes32,address,address,int256,int256)"; - const SIGNATURE_HASH: alloy_sol_types::private::B256 = alloy_sol_types::private::B256::new([ - 110u8, 220u8, 175u8, 98u8, 65u8, 16u8, 91u8, 76u8, 148u8, 194u8, 239u8, - 219u8, 243u8, 166u8, 177u8, 36u8, 88u8, 235u8, 61u8, 7u8, 190u8, 58u8, - 14u8, 129u8, 210u8, 75u8, 19u8, 196u8, 64u8, 69u8, 254u8, 122u8, - ]); + const ANONYMOUS: bool = false; + const SIGNATURE: &'static str = + "PoolBalanceManaged(bytes32,address,address,int256,int256)"; + const SIGNATURE_HASH: alloy_sol_types::private::B256 = + alloy_sol_types::private::B256::new([ + 110u8, 220u8, 175u8, 98u8, 65u8, 16u8, 91u8, 76u8, 148u8, 194u8, 239u8, 219u8, + 243u8, 166u8, 177u8, 36u8, 88u8, 235u8, 61u8, 7u8, 190u8, 58u8, 14u8, 129u8, + 210u8, 75u8, 19u8, 196u8, 64u8, 69u8, 254u8, 122u8, + ]); + #[allow(unused_variables)] #[inline] fn new( @@ -3366,32 +3350,33 @@ event PoolBalanceManaged(bytes32 indexed poolId, address indexed assetManager, a managedDelta: 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, - ), - ); + 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.cashDelta), - as alloy_sol_types::SolType>::tokenize(&self.managedDelta), + as alloy_sol_types::SolType>::tokenize( + &self.cashDelta, + ), + as alloy_sol_types::SolType>::tokenize( + &self.managedDelta, + ), ) } + #[inline] fn topics(&self) -> ::RustType { ( @@ -3401,6 +3386,7 @@ event PoolBalanceManaged(bytes32 indexed poolId, address indexed assetManager, a self.token.clone(), ) } + #[inline] fn encode_topics_raw( &self, @@ -3409,9 +3395,7 @@ event PoolBalanceManaged(bytes32 indexed poolId, address indexed assetManager, a if out.len() < ::COUNT { return Err(alloy_sol_types::Error::Overrun); } - out[0usize] = alloy_sol_types::abi::token::WordToken( - Self::SIGNATURE_HASH, - ); + out[0usize] = alloy_sol_types::abi::token::WordToken(Self::SIGNATURE_HASH); out[1usize] = as alloy_sol_types::EventTopic>::encode_topic(&self.poolId); @@ -3429,6 +3413,7 @@ event PoolBalanceManaged(bytes32 indexed poolId, address indexed assetManager, a 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) } @@ -3443,9 +3428,9 @@ event PoolBalanceManaged(bytes32 indexed poolId, address indexed assetManager, a }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Event with signature `PoolRegistered(bytes32,address,uint8)` and selector `0x3c13bc30b8e878c53fd2a36b679409c073afd75950be43d8858768e956fbc20e`. -```solidity -event PoolRegistered(bytes32 indexed poolId, address indexed poolAddress, IVault.PoolSpecialization specialization); -```*/ + ```solidity + event PoolRegistered(bytes32 indexed poolId, address indexed poolAddress, IVault.PoolSpecialization specialization); + ```*/ #[allow( non_camel_case_types, non_snake_case, @@ -3468,25 +3453,26 @@ event PoolRegistered(bytes32 indexed poolId, address indexed poolAddress, IVault clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[automatically_derived] impl alloy_sol_types::SolEvent for PoolRegistered { + type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type DataTuple<'a> = (IVault::PoolSpecialization,); - 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, ); - const SIGNATURE: &'static str = "PoolRegistered(bytes32,address,uint8)"; - const SIGNATURE_HASH: alloy_sol_types::private::B256 = alloy_sol_types::private::B256::new([ - 60u8, 19u8, 188u8, 48u8, 184u8, 232u8, 120u8, 197u8, 63u8, 210u8, 163u8, - 107u8, 103u8, 148u8, 9u8, 192u8, 115u8, 175u8, 215u8, 89u8, 80u8, 190u8, - 67u8, 216u8, 133u8, 135u8, 104u8, 233u8, 86u8, 251u8, 194u8, 14u8, - ]); + const ANONYMOUS: bool = false; + const SIGNATURE: &'static str = "PoolRegistered(bytes32,address,uint8)"; + const SIGNATURE_HASH: alloy_sol_types::private::B256 = + alloy_sol_types::private::B256::new([ + 60u8, 19u8, 188u8, 48u8, 184u8, 232u8, 120u8, 197u8, 63u8, 210u8, 163u8, 107u8, + 103u8, 148u8, 9u8, 192u8, 115u8, 175u8, 215u8, 89u8, 80u8, 190u8, 67u8, 216u8, + 133u8, 135u8, 104u8, 233u8, 86u8, 251u8, 194u8, 14u8, + ]); + #[allow(unused_variables)] #[inline] fn new( @@ -3499,21 +3485,21 @@ event PoolRegistered(bytes32 indexed poolId, address indexed poolAddress, IVault specialization: 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, - ), - ); + 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<'_> { ( @@ -3522,6 +3508,7 @@ event PoolRegistered(bytes32 indexed poolId, address indexed poolAddress, IVault ), ) } + #[inline] fn topics(&self) -> ::RustType { ( @@ -3530,6 +3517,7 @@ event PoolRegistered(bytes32 indexed poolId, address indexed poolAddress, IVault self.poolAddress.clone(), ) } + #[inline] fn encode_topics_raw( &self, @@ -3538,9 +3526,7 @@ event PoolRegistered(bytes32 indexed poolId, address indexed poolAddress, IVault if out.len() < ::COUNT { return Err(alloy_sol_types::Error::Overrun); } - out[0usize] = alloy_sol_types::abi::token::WordToken( - Self::SIGNATURE_HASH, - ); + out[0usize] = alloy_sol_types::abi::token::WordToken(Self::SIGNATURE_HASH); out[1usize] = as alloy_sol_types::EventTopic>::encode_topic(&self.poolId); @@ -3555,6 +3541,7 @@ event PoolRegistered(bytes32 indexed poolId, address indexed poolAddress, IVault 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) } @@ -3569,9 +3556,9 @@ event PoolRegistered(bytes32 indexed poolId, address indexed poolAddress, IVault }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Event with signature `RelayerApprovalChanged(address,address,bool)` and selector `0x46961fdb4502b646d5095fba7600486a8ac05041d55cdf0f16ed677180b5cad8`. -```solidity -event RelayerApprovalChanged(address indexed relayer, address indexed sender, bool approved); -```*/ + ```solidity + event RelayerApprovalChanged(address indexed relayer, address indexed sender, bool approved); + ```*/ #[allow( non_camel_case_types, non_snake_case, @@ -3594,25 +3581,26 @@ event RelayerApprovalChanged(address indexed relayer, address indexed sender, bo clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[automatically_derived] impl alloy_sol_types::SolEvent for RelayerApprovalChanged { + type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type DataTuple<'a> = (alloy_sol_types::sol_data::Bool,); - 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 = "RelayerApprovalChanged(address,address,bool)"; - const SIGNATURE_HASH: alloy_sol_types::private::B256 = alloy_sol_types::private::B256::new([ - 70u8, 150u8, 31u8, 219u8, 69u8, 2u8, 182u8, 70u8, 213u8, 9u8, 95u8, - 186u8, 118u8, 0u8, 72u8, 106u8, 138u8, 192u8, 80u8, 65u8, 213u8, 92u8, - 223u8, 15u8, 22u8, 237u8, 103u8, 113u8, 128u8, 181u8, 202u8, 216u8, - ]); + const ANONYMOUS: bool = false; + const SIGNATURE: &'static str = "RelayerApprovalChanged(address,address,bool)"; + const SIGNATURE_HASH: alloy_sol_types::private::B256 = + alloy_sol_types::private::B256::new([ + 70u8, 150u8, 31u8, 219u8, 69u8, 2u8, 182u8, 70u8, 213u8, 9u8, 95u8, 186u8, + 118u8, 0u8, 72u8, 106u8, 138u8, 192u8, 80u8, 65u8, 213u8, 92u8, 223u8, 15u8, + 22u8, 237u8, 103u8, 113u8, 128u8, 181u8, 202u8, 216u8, + ]); + #[allow(unused_variables)] #[inline] fn new( @@ -3625,21 +3613,21 @@ event RelayerApprovalChanged(address indexed relayer, address indexed sender, bo approved: 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, - ), - ); + 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<'_> { ( @@ -3648,10 +3636,16 @@ event RelayerApprovalChanged(address indexed relayer, address indexed sender, bo ), ) } + #[inline] fn topics(&self) -> ::RustType { - (Self::SIGNATURE_HASH.into(), self.relayer.clone(), self.sender.clone()) + ( + Self::SIGNATURE_HASH.into(), + self.relayer.clone(), + self.sender.clone(), + ) } + #[inline] fn encode_topics_raw( &self, @@ -3660,9 +3654,7 @@ event RelayerApprovalChanged(address indexed relayer, address indexed sender, bo if out.len() < ::COUNT { return Err(alloy_sol_types::Error::Overrun); } - out[0usize] = alloy_sol_types::abi::token::WordToken( - Self::SIGNATURE_HASH, - ); + out[0usize] = alloy_sol_types::abi::token::WordToken(Self::SIGNATURE_HASH); out[1usize] = ::encode_topic( &self.relayer, ); @@ -3677,6 +3669,7 @@ event RelayerApprovalChanged(address indexed relayer, address indexed sender, bo 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) } @@ -3691,9 +3684,9 @@ event RelayerApprovalChanged(address indexed relayer, address indexed sender, bo }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Event with signature `Swap(bytes32,address,address,uint256,uint256)` and selector `0x2170c741c41531aec20e7c107c24eecfdd15e69c9bb0a8dd37b1840b9e0b207b`. -```solidity -event Swap(bytes32 indexed poolId, address indexed tokenIn, address indexed tokenOut, uint256 amountIn, uint256 amountOut); -```*/ + ```solidity + event Swap(bytes32 indexed poolId, address indexed tokenIn, address indexed tokenOut, uint256 amountIn, uint256 amountOut); + ```*/ #[allow( non_camel_case_types, non_snake_case, @@ -3720,29 +3713,30 @@ event Swap(bytes32 indexed poolId, address indexed tokenIn, address indexed toke clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[automatically_derived] impl alloy_sol_types::SolEvent for Swap { + type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type DataTuple<'a> = ( alloy_sol_types::sol_data::Uint<256>, 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::FixedBytes<32>, alloy_sol_types::sol_data::Address, alloy_sol_types::sol_data::Address, ); - const SIGNATURE: &'static str = "Swap(bytes32,address,address,uint256,uint256)"; - const SIGNATURE_HASH: alloy_sol_types::private::B256 = alloy_sol_types::private::B256::new([ - 33u8, 112u8, 199u8, 65u8, 196u8, 21u8, 49u8, 174u8, 194u8, 14u8, 124u8, - 16u8, 124u8, 36u8, 238u8, 207u8, 221u8, 21u8, 230u8, 156u8, 155u8, 176u8, - 168u8, 221u8, 55u8, 177u8, 132u8, 11u8, 158u8, 11u8, 32u8, 123u8, - ]); + const ANONYMOUS: bool = false; + const SIGNATURE: &'static str = "Swap(bytes32,address,address,uint256,uint256)"; + const SIGNATURE_HASH: alloy_sol_types::private::B256 = + alloy_sol_types::private::B256::new([ + 33u8, 112u8, 199u8, 65u8, 196u8, 21u8, 49u8, 174u8, 194u8, 14u8, 124u8, 16u8, + 124u8, 36u8, 238u8, 207u8, 221u8, 21u8, 230u8, 156u8, 155u8, 176u8, 168u8, + 221u8, 55u8, 177u8, 132u8, 11u8, 158u8, 11u8, 32u8, 123u8, + ]); + #[allow(unused_variables)] #[inline] fn new( @@ -3757,32 +3751,33 @@ event Swap(bytes32 indexed poolId, address indexed tokenIn, address indexed toke amountOut: 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, - ), - ); + 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.amountIn), - as alloy_sol_types::SolType>::tokenize(&self.amountOut), + as alloy_sol_types::SolType>::tokenize( + &self.amountIn, + ), + as alloy_sol_types::SolType>::tokenize( + &self.amountOut, + ), ) } + #[inline] fn topics(&self) -> ::RustType { ( @@ -3792,6 +3787,7 @@ event Swap(bytes32 indexed poolId, address indexed tokenIn, address indexed toke self.tokenOut.clone(), ) } + #[inline] fn encode_topics_raw( &self, @@ -3800,9 +3796,7 @@ event Swap(bytes32 indexed poolId, address indexed tokenIn, address indexed toke if out.len() < ::COUNT { return Err(alloy_sol_types::Error::Overrun); } - out[0usize] = alloy_sol_types::abi::token::WordToken( - Self::SIGNATURE_HASH, - ); + out[0usize] = alloy_sol_types::abi::token::WordToken(Self::SIGNATURE_HASH); out[1usize] = as alloy_sol_types::EventTopic>::encode_topic(&self.poolId); @@ -3820,6 +3814,7 @@ event Swap(bytes32 indexed poolId, address indexed tokenIn, address indexed toke 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) } @@ -3834,9 +3829,9 @@ event Swap(bytes32 indexed poolId, address indexed tokenIn, address indexed toke }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Event with signature `TokensDeregistered(bytes32,address[])` and selector `0x7dcdc6d02ef40c7c1a7046a011b058bd7f988fa14e20a66344f9d4e60657d610`. -```solidity -event TokensDeregistered(bytes32 indexed poolId, address[] tokens); -```*/ + ```solidity + event TokensDeregistered(bytes32 indexed poolId, address[] tokens); + ```*/ #[allow( non_camel_case_types, non_snake_case, @@ -3857,26 +3852,26 @@ event TokensDeregistered(bytes32 indexed poolId, address[] tokens); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[automatically_derived] impl alloy_sol_types::SolEvent for TokensDeregistered { - type DataTuple<'a> = ( - alloy_sol_types::sol_data::Array, - ); - type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + type DataTuple<'a> = + (alloy_sol_types::sol_data::Array,); type TopicList = ( alloy_sol_types::sol_data::FixedBytes<32>, alloy_sol_types::sol_data::FixedBytes<32>, ); - const SIGNATURE: &'static str = "TokensDeregistered(bytes32,address[])"; - const SIGNATURE_HASH: alloy_sol_types::private::B256 = alloy_sol_types::private::B256::new([ - 125u8, 205u8, 198u8, 208u8, 46u8, 244u8, 12u8, 124u8, 26u8, 112u8, 70u8, - 160u8, 17u8, 176u8, 88u8, 189u8, 127u8, 152u8, 143u8, 161u8, 78u8, 32u8, - 166u8, 99u8, 68u8, 249u8, 212u8, 230u8, 6u8, 87u8, 214u8, 16u8, - ]); + const ANONYMOUS: bool = false; + const SIGNATURE: &'static str = "TokensDeregistered(bytes32,address[])"; + const SIGNATURE_HASH: alloy_sol_types::private::B256 = + alloy_sol_types::private::B256::new([ + 125u8, 205u8, 198u8, 208u8, 46u8, 244u8, 12u8, 124u8, 26u8, 112u8, 70u8, 160u8, + 17u8, 176u8, 88u8, 189u8, 127u8, 152u8, 143u8, 161u8, 78u8, 32u8, 166u8, 99u8, + 68u8, 249u8, 212u8, 230u8, 6u8, 87u8, 214u8, 16u8, + ]); + #[allow(unused_variables)] #[inline] fn new( @@ -3888,33 +3883,35 @@ event TokensDeregistered(bytes32 indexed poolId, address[] tokens); tokens: 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, - ), - ); + 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.tokens), - ) + ( as alloy_sol_types::SolType>::tokenize( + &self.tokens + ),) } + #[inline] fn topics(&self) -> ::RustType { (Self::SIGNATURE_HASH.into(), self.poolId.clone()) } + #[inline] fn encode_topics_raw( &self, @@ -3923,9 +3920,7 @@ event TokensDeregistered(bytes32 indexed poolId, address[] tokens); if out.len() < ::COUNT { return Err(alloy_sol_types::Error::Overrun); } - out[0usize] = alloy_sol_types::abi::token::WordToken( - Self::SIGNATURE_HASH, - ); + out[0usize] = alloy_sol_types::abi::token::WordToken(Self::SIGNATURE_HASH); out[1usize] = as alloy_sol_types::EventTopic>::encode_topic(&self.poolId); @@ -3937,6 +3932,7 @@ event TokensDeregistered(bytes32 indexed poolId, address[] tokens); 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) } @@ -3951,9 +3947,9 @@ event TokensDeregistered(bytes32 indexed poolId, address[] tokens); }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Event with signature `TokensRegistered(bytes32,address[],address[])` and selector `0xf5847d3f2197b16cdcd2098ec95d0905cd1abdaf415f07bb7cef2bba8ac5dec4`. -```solidity -event TokensRegistered(bytes32 indexed poolId, address[] tokens, address[] assetManagers); -```*/ + ```solidity + event TokensRegistered(bytes32 indexed poolId, address[] tokens, address[] assetManagers); + ```*/ #[allow( non_camel_case_types, non_snake_case, @@ -3967,9 +3963,7 @@ event TokensRegistered(bytes32 indexed poolId, address[] tokens, address[] asset #[allow(missing_docs)] pub tokens: alloy_sol_types::private::Vec, #[allow(missing_docs)] - pub assetManagers: alloy_sol_types::private::Vec< - alloy_sol_types::private::Address, - >, + pub assetManagers: alloy_sol_types::private::Vec, } #[allow( non_camel_case_types, @@ -3978,27 +3972,28 @@ event TokensRegistered(bytes32 indexed poolId, address[] tokens, address[] asset clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[automatically_derived] impl alloy_sol_types::SolEvent for TokensRegistered { + type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type DataTuple<'a> = ( alloy_sol_types::sol_data::Array, alloy_sol_types::sol_data::Array, ); - 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>, ); - const SIGNATURE: &'static str = "TokensRegistered(bytes32,address[],address[])"; - const SIGNATURE_HASH: alloy_sol_types::private::B256 = alloy_sol_types::private::B256::new([ - 245u8, 132u8, 125u8, 63u8, 33u8, 151u8, 177u8, 108u8, 220u8, 210u8, 9u8, - 142u8, 201u8, 93u8, 9u8, 5u8, 205u8, 26u8, 189u8, 175u8, 65u8, 95u8, 7u8, - 187u8, 124u8, 239u8, 43u8, 186u8, 138u8, 197u8, 222u8, 196u8, - ]); + const ANONYMOUS: bool = false; + const SIGNATURE: &'static str = "TokensRegistered(bytes32,address[],address[])"; + const SIGNATURE_HASH: alloy_sol_types::private::B256 = + alloy_sol_types::private::B256::new([ + 245u8, 132u8, 125u8, 63u8, 33u8, 151u8, 177u8, 108u8, 220u8, 210u8, 9u8, 142u8, + 201u8, 93u8, 9u8, 5u8, 205u8, 26u8, 189u8, 175u8, 65u8, 95u8, 7u8, 187u8, + 124u8, 239u8, 43u8, 186u8, 138u8, 197u8, 222u8, 196u8, + ]); + #[allow(unused_variables)] #[inline] fn new( @@ -4011,21 +4006,21 @@ event TokensRegistered(bytes32 indexed poolId, address[] tokens, address[] asset assetManagers: 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, - ), - ); + 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<'_> { ( @@ -4037,10 +4032,12 @@ event TokensRegistered(bytes32 indexed poolId, address[] tokens, address[] asset > as alloy_sol_types::SolType>::tokenize(&self.assetManagers), ) } + #[inline] fn topics(&self) -> ::RustType { (Self::SIGNATURE_HASH.into(), self.poolId.clone()) } + #[inline] fn encode_topics_raw( &self, @@ -4049,9 +4046,7 @@ event TokensRegistered(bytes32 indexed poolId, address[] tokens, address[] asset if out.len() < ::COUNT { return Err(alloy_sol_types::Error::Overrun); } - out[0usize] = alloy_sol_types::abi::token::WordToken( - Self::SIGNATURE_HASH, - ); + out[0usize] = alloy_sol_types::abi::token::WordToken(Self::SIGNATURE_HASH); out[1usize] = as alloy_sol_types::EventTopic>::encode_topic(&self.poolId); @@ -4063,6 +4058,7 @@ event TokensRegistered(bytes32 indexed poolId, address[] tokens, address[] asset 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) } @@ -4076,9 +4072,9 @@ event TokensRegistered(bytes32 indexed poolId, address[] tokens, address[] asset } }; /**Constructor`. -```solidity -constructor(address authorizer, address weth, uint256 pauseWindowDuration, uint256 bufferPeriodDuration); -```*/ + ```solidity + constructor(address authorizer, address weth, uint256 pauseWindowDuration, uint256 bufferPeriodDuration); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct constructorCall { @@ -4092,7 +4088,7 @@ constructor(address authorizer, address weth, uint256 pauseWindowDuration, uint2 pub bufferPeriodDuration: alloy_sol_types::private::primitives::aliases::U256, } const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -4111,9 +4107,7 @@ constructor(address authorizer, address weth, uint256 pauseWindowDuration, uint2 ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -4153,15 +4147,15 @@ constructor(address authorizer, address weth, uint256 pauseWindowDuration, uint2 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 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<'_> { ( @@ -4171,26 +4165,27 @@ constructor(address authorizer, address weth, uint256 pauseWindowDuration, uint2 ::tokenize( &self.weth, ), - as alloy_sol_types::SolType>::tokenize(&self.pauseWindowDuration), - as alloy_sol_types::SolType>::tokenize(&self.bufferPeriodDuration), + as alloy_sol_types::SolType>::tokenize( + &self.pauseWindowDuration, + ), + as alloy_sol_types::SolType>::tokenize( + &self.bufferPeriodDuration, + ), ) } } }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `WETH()` and selector `0xad5c4648`. -```solidity -function WETH() external view returns (address); -```*/ + ```solidity + function WETH() external view returns (address); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct WETHCall; #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`WETH()`](WETHCall) function. + ///Container type for the return parameters of the [`WETH()`](WETHCall) + /// function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct WETHReturn { @@ -4204,7 +4199,7 @@ function WETH() external view returns (address); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -4213,9 +4208,7 @@ function WETH() external view returns (address); type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -4245,9 +4238,7 @@ function WETH() external view returns (address); type UnderlyingRustTuple<'a> = (alloy_sol_types::private::Address,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -4272,63 +4263,58 @@ function WETH() external view returns (address); #[automatically_derived] impl alloy_sol_types::SolCall for WETHCall { type Parameters<'a> = (); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = alloy_sol_types::private::Address; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (alloy_sol_types::sol_data::Address,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "WETH()"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [173u8, 92u8, 70u8, 72u8]; + const SIGNATURE: &'static str = "WETH()"; + #[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, - ), - ) + (::tokenize(ret),) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) - .map(|r| { + as alloy_sol_types::SolType>::abi_decode_sequence(data).map( + |r| { let r: WETHReturn = 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: WETHReturn = r.into(); - r._0 - }) + 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: WETHReturn = r.into(); + r._0 + }) } } }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `batchSwap(uint8,(bytes32,uint256,uint256,uint256,bytes)[],address[],(address,bool,address,bool),int256[],uint256)` and selector `0x945bcec9`. -```solidity -function batchSwap(IVault.SwapKind kind, IVault.BatchSwapStep[] memory swaps, address[] memory assets, IVault.FundManagement memory funds, int256[] memory limits, uint256 deadline) external payable returns (int256[] memory assetDeltas); -```*/ + ```solidity + function batchSwap(IVault.SwapKind kind, IVault.BatchSwapStep[] memory swaps, address[] memory assets, IVault.FundManagement memory funds, int256[] memory limits, uint256 deadline) external payable returns (int256[] memory assetDeltas); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct batchSwapCall { @@ -4343,21 +4329,21 @@ function batchSwap(IVault.SwapKind kind, IVault.BatchSwapStep[] memory swaps, ad #[allow(missing_docs)] pub funds: ::RustType, #[allow(missing_docs)] - pub limits: alloy_sol_types::private::Vec< - alloy_sol_types::private::primitives::aliases::I256, - >, + pub limits: + alloy_sol_types::private::Vec, #[allow(missing_docs)] pub deadline: alloy_sol_types::private::primitives::aliases::U256, } #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`batchSwap(uint8,(bytes32,uint256,uint256,uint256,bytes)[],address[],(address,bool,address,bool),int256[],uint256)`](batchSwapCall) function. + ///Container type for the return parameters of the + /// [`batchSwap(uint8,(bytes32,uint256,uint256,uint256,bytes)[],address[], + /// (address,bool,address,bool),int256[],uint256)`](batchSwapCall) function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct batchSwapReturn { #[allow(missing_docs)] - pub assetDeltas: alloy_sol_types::private::Vec< - alloy_sol_types::private::primitives::aliases::I256, - >, + pub assetDeltas: + alloy_sol_types::private::Vec, } #[allow( non_camel_case_types, @@ -4366,7 +4352,7 @@ function batchSwap(IVault.SwapKind kind, IVault.BatchSwapStep[] memory swaps, ad clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -4386,16 +4372,12 @@ function batchSwap(IVault.SwapKind kind, IVault.BatchSwapStep[] memory swaps, ad >, alloy_sol_types::private::Vec, ::RustType, - alloy_sol_types::private::Vec< - alloy_sol_types::private::primitives::aliases::I256, - >, + 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, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -4434,20 +4416,15 @@ function batchSwap(IVault.SwapKind kind, IVault.BatchSwapStep[] memory swaps, ad { #[doc(hidden)] #[allow(dead_code)] - type UnderlyingSolTuple<'a> = ( - alloy_sol_types::sol_data::Array>, - ); + type UnderlyingSolTuple<'a> = + (alloy_sol_types::sol_data::Array>,); #[doc(hidden)] type UnderlyingRustTuple<'a> = ( - alloy_sol_types::private::Vec< - alloy_sol_types::private::primitives::aliases::I256, - >, + alloy_sol_types::private::Vec, ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -4465,7 +4442,9 @@ function batchSwap(IVault.SwapKind kind, IVault.BatchSwapStep[] memory swaps, ad #[doc(hidden)] impl ::core::convert::From> for batchSwapReturn { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { - Self { assetDeltas: tuple.0 } + Self { + assetDeltas: tuple.0, + } } } } @@ -4479,26 +4458,25 @@ function batchSwap(IVault.SwapKind kind, IVault.BatchSwapStep[] memory swaps, ad alloy_sol_types::sol_data::Array>, alloy_sol_types::sol_data::Uint<256>, ); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; - type Return = alloy_sol_types::private::Vec< - alloy_sol_types::private::primitives::aliases::I256, - >; - type ReturnTuple<'a> = ( - alloy_sol_types::sol_data::Array>, - ); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "batchSwap(uint8,(bytes32,uint256,uint256,uint256,bytes)[],address[],(address,bool,address,bool),int256[],uint256)"; + type Return = + alloy_sol_types::private::Vec; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + type ReturnTuple<'a> = + (alloy_sol_types::sol_data::Array>,); + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [148u8, 91u8, 206u8, 201u8]; + const SIGNATURE: &'static str = "batchSwap(uint8,(bytes32,uint256,uint256,uint256,\ + bytes)[],address[],(address,bool,address,bool),\ + int256[],uint256)"; + #[inline] fn new<'a>( tuple: as alloy_sol_types::SolType>::RustType, ) -> Self { tuple.into() } + #[inline] fn tokenize(&self) -> Self::Token<'_> { ( @@ -4520,43 +4498,41 @@ function batchSwap(IVault.SwapKind kind, IVault.BatchSwapStep[] memory swaps, ad > as alloy_sol_types::SolType>::tokenize(&self.deadline), ) } + #[inline] fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { - ( - , - > as alloy_sol_types::SolType>::tokenize(ret), - ) + (, + > 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| { + as alloy_sol_types::SolType>::abi_decode_sequence(data).map( + |r| { let r: batchSwapReturn = r.into(); r.assetDeltas - }) + }, + ) } + #[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: batchSwapReturn = r.into(); - r.assetDeltas - }) + 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: batchSwapReturn = r.into(); + r.assetDeltas + }) } } }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `flashLoan(address,address[],uint256[],bytes)` and selector `0x5c38449e`. -```solidity -function flashLoan(address recipient, address[] memory tokens, uint256[] memory amounts, bytes memory userData) external; -```*/ + ```solidity + function flashLoan(address recipient, address[] memory tokens, uint256[] memory amounts, bytes memory userData) external; + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct flashLoanCall { @@ -4565,13 +4541,14 @@ function flashLoan(address recipient, address[] memory tokens, uint256[] memory #[allow(missing_docs)] pub tokens: alloy_sol_types::private::Vec, #[allow(missing_docs)] - pub amounts: alloy_sol_types::private::Vec< - alloy_sol_types::private::primitives::aliases::U256, - >, + pub amounts: + alloy_sol_types::private::Vec, #[allow(missing_docs)] pub userData: alloy_sol_types::private::Bytes, } - ///Container type for the return parameters of the [`flashLoan(address,address[],uint256[],bytes)`](flashLoanCall) function. + ///Container type for the return parameters of the + /// [`flashLoan(address,address[],uint256[],bytes)`](flashLoanCall) + /// function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct flashLoanReturn {} @@ -4582,7 +4559,7 @@ function flashLoan(address recipient, address[] memory tokens, uint256[] memory clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -4596,16 +4573,12 @@ function flashLoan(address recipient, address[] memory tokens, uint256[] memory type UnderlyingRustTuple<'a> = ( alloy_sol_types::private::Address, alloy_sol_types::private::Vec, - alloy_sol_types::private::Vec< - alloy_sol_types::private::primitives::aliases::U256, - >, + 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, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -4640,9 +4613,7 @@ function flashLoan(address recipient, address[] memory tokens, uint256[] memory type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -4665,9 +4636,7 @@ function flashLoan(address recipient, address[] memory tokens, uint256[] memory } } impl flashLoanReturn { - fn _tokenize( - &self, - ) -> ::ReturnToken<'_> { + fn _tokenize(&self) -> ::ReturnToken<'_> { () } } @@ -4679,22 +4648,21 @@ function flashLoan(address recipient, address[] memory tokens, uint256[] memory alloy_sol_types::sol_data::Array>, alloy_sol_types::sol_data::Bytes, ); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = flashLoanReturn; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "flashLoan(address,address[],uint256[],bytes)"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [92u8, 56u8, 68u8, 158u8]; + const SIGNATURE: &'static str = "flashLoan(address,address[],uint256[],bytes)"; + #[inline] fn new<'a>( tuple: as alloy_sol_types::SolType>::RustType, ) -> Self { tuple.into() } + #[inline] fn tokenize(&self) -> Self::Token<'_> { ( @@ -4712,33 +4680,32 @@ function flashLoan(address recipient, address[] memory tokens, uint256[] memory ), ) } + #[inline] fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { flashLoanReturn::_tokenize(ret) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) + 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) + 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(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `getInternalBalance(address,address[])` and selector `0x0f5a6efa`. -```solidity -function getInternalBalance(address user, address[] memory tokens) external view returns (uint256[] memory balances); -```*/ + ```solidity + function getInternalBalance(address user, address[] memory tokens) external view returns (uint256[] memory balances); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct getInternalBalanceCall { @@ -4748,14 +4715,15 @@ function getInternalBalance(address user, address[] memory tokens) external view pub tokens: alloy_sol_types::private::Vec, } #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`getInternalBalance(address,address[])`](getInternalBalanceCall) function. + ///Container type for the return parameters of the + /// [`getInternalBalance(address,address[])`](getInternalBalanceCall) + /// function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct getInternalBalanceReturn { #[allow(missing_docs)] - pub balances: alloy_sol_types::private::Vec< - alloy_sol_types::private::primitives::aliases::U256, - >, + pub balances: + alloy_sol_types::private::Vec, } #[allow( non_camel_case_types, @@ -4764,7 +4732,7 @@ function getInternalBalance(address user, address[] memory tokens) external view clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -4779,9 +4747,7 @@ function getInternalBalance(address user, address[] memory tokens) external view ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -4790,16 +4756,14 @@ function getInternalBalance(address user, address[] memory tokens) external view } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From - for UnderlyingRustTuple<'_> { + impl ::core::convert::From for UnderlyingRustTuple<'_> { fn from(value: getInternalBalanceCall) -> Self { (value.user, value.tokens) } } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From> - for getInternalBalanceCall { + impl ::core::convert::From> for getInternalBalanceCall { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { Self { user: tuple.0, @@ -4811,20 +4775,15 @@ function getInternalBalance(address user, address[] memory tokens) external view { #[doc(hidden)] #[allow(dead_code)] - type UnderlyingSolTuple<'a> = ( - alloy_sol_types::sol_data::Array>, - ); + type UnderlyingSolTuple<'a> = + (alloy_sol_types::sol_data::Array>,); #[doc(hidden)] type UnderlyingRustTuple<'a> = ( - alloy_sol_types::private::Vec< - alloy_sol_types::private::primitives::aliases::U256, - >, + alloy_sol_types::private::Vec, ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -4833,16 +4792,14 @@ function getInternalBalance(address user, address[] memory tokens) external view } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From - for UnderlyingRustTuple<'_> { + impl ::core::convert::From for UnderlyingRustTuple<'_> { fn from(value: getInternalBalanceReturn) -> Self { (value.balances,) } } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From> - for getInternalBalanceReturn { + impl ::core::convert::From> for getInternalBalanceReturn { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { Self { balances: tuple.0 } } @@ -4854,26 +4811,23 @@ function getInternalBalance(address user, address[] memory tokens) external view alloy_sol_types::sol_data::Address, alloy_sol_types::sol_data::Array, ); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; - type Return = alloy_sol_types::private::Vec< - alloy_sol_types::private::primitives::aliases::U256, - >; - type ReturnTuple<'a> = ( - alloy_sol_types::sol_data::Array>, - ); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "getInternalBalance(address,address[])"; + type Return = + alloy_sol_types::private::Vec; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + type ReturnTuple<'a> = + (alloy_sol_types::sol_data::Array>,); + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [15u8, 90u8, 110u8, 250u8]; + const SIGNATURE: &'static str = "getInternalBalance(address,address[])"; + #[inline] fn new<'a>( tuple: as alloy_sol_types::SolType>::RustType, ) -> Self { tuple.into() } + #[inline] fn tokenize(&self) -> Self::Token<'_> { ( @@ -4885,48 +4839,47 @@ function getInternalBalance(address user, address[] memory tokens) external view > as alloy_sol_types::SolType>::tokenize(&self.tokens), ) } + #[inline] fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { - ( - , - > as alloy_sol_types::SolType>::tokenize(ret), - ) + (, + > 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| { + as alloy_sol_types::SolType>::abi_decode_sequence(data).map( + |r| { let r: getInternalBalanceReturn = r.into(); r.balances - }) + }, + ) } + #[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: getInternalBalanceReturn = r.into(); - r.balances - }) + 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: getInternalBalanceReturn = r.into(); + r.balances + }) } } }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `getPausedState()` and selector `0x1c0de051`. -```solidity -function getPausedState() external view returns (bool paused, uint256 pauseWindowEndTime, uint256 bufferPeriodEndTime); -```*/ + ```solidity + function getPausedState() external view returns (bool paused, uint256 pauseWindowEndTime, uint256 bufferPeriodEndTime); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct getPausedStateCall; #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`getPausedState()`](getPausedStateCall) function. + ///Container type for the return parameters of the + /// [`getPausedState()`](getPausedStateCall) function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct getPausedStateReturn { @@ -4944,7 +4897,7 @@ function getPausedState() external view returns (bool paused, uint256 pauseWindo clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -4953,9 +4906,7 @@ function getPausedState() external view returns (bool paused, uint256 pauseWindo type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -4993,9 +4944,7 @@ function getPausedState() external view returns (bool paused, uint256 pauseWindo ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -5004,16 +4953,18 @@ function getPausedState() external view returns (bool paused, uint256 pauseWindo } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From - for UnderlyingRustTuple<'_> { + impl ::core::convert::From for UnderlyingRustTuple<'_> { fn from(value: getPausedStateReturn) -> Self { - (value.paused, value.pauseWindowEndTime, value.bufferPeriodEndTime) + ( + value.paused, + value.pauseWindowEndTime, + value.bufferPeriodEndTime, + ) } } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From> - for getPausedStateReturn { + impl ::core::convert::From> for getPausedStateReturn { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { Self { paused: tuple.0, @@ -5031,69 +4982,67 @@ function getPausedState() external view returns (bool paused, uint256 pauseWindo ::tokenize( &self.paused, ), - as alloy_sol_types::SolType>::tokenize(&self.pauseWindowEndTime), - as alloy_sol_types::SolType>::tokenize(&self.bufferPeriodEndTime), + as alloy_sol_types::SolType>::tokenize( + &self.pauseWindowEndTime, + ), + as alloy_sol_types::SolType>::tokenize( + &self.bufferPeriodEndTime, + ), ) } } #[automatically_derived] impl alloy_sol_types::SolCall for getPausedStateCall { type Parameters<'a> = (); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = getPausedStateReturn; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = ( alloy_sol_types::sol_data::Bool, alloy_sol_types::sol_data::Uint<256>, alloy_sol_types::sol_data::Uint<256>, ); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "getPausedState()"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [28u8, 13u8, 224u8, 81u8]; + const SIGNATURE: &'static str = "getPausedState()"; + #[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<'_> { getPausedStateReturn::_tokenize(ret) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) + 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) + 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(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `getPool(bytes32)` and selector `0xf6c00927`. -```solidity -function getPool(bytes32 poolId) external view returns (address, IVault.PoolSpecialization); -```*/ + ```solidity + function getPool(bytes32 poolId) external view returns (address, IVault.PoolSpecialization); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct getPoolCall { @@ -5101,7 +5050,8 @@ function getPool(bytes32 poolId) external view returns (address, IVault.PoolSpec pub poolId: alloy_sol_types::private::FixedBytes<32>, } #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`getPool(bytes32)`](getPoolCall) function. + ///Container type for the return parameters of the + /// [`getPool(bytes32)`](getPoolCall) function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct getPoolReturn { @@ -5117,7 +5067,7 @@ function getPool(bytes32 poolId) external view returns (address, IVault.PoolSpec clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -5126,9 +5076,7 @@ function getPool(bytes32 poolId) external view returns (address, IVault.PoolSpec 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, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -5164,9 +5112,7 @@ function getPool(bytes32 poolId) external view returns (address, IVault.PoolSpec ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -5184,46 +5130,44 @@ function getPool(bytes32 poolId) external view returns (address, IVault.PoolSpec #[doc(hidden)] impl ::core::convert::From> for getPoolReturn { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { - Self { _0: tuple.0, _1: tuple.1 } + Self { + _0: tuple.0, + _1: tuple.1, + } } } } impl getPoolReturn { - fn _tokenize( - &self, - ) -> ::ReturnToken<'_> { + fn _tokenize(&self) -> ::ReturnToken<'_> { ( ::tokenize( &self._0, ), - ::tokenize( - &self._1, - ), + ::tokenize(&self._1), ) } } #[automatically_derived] impl alloy_sol_types::SolCall for getPoolCall { type Parameters<'a> = (alloy_sol_types::sol_data::FixedBytes<32>,); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = getPoolReturn; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = ( alloy_sol_types::sol_data::Address, IVault::PoolSpecialization, ); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "getPool(bytes32)"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [246u8, 192u8, 9u8, 39u8]; + const SIGNATURE: &'static str = "getPool(bytes32)"; + #[inline] fn new<'a>( tuple: as alloy_sol_types::SolType>::RustType, ) -> Self { tuple.into() } + #[inline] fn tokenize(&self) -> Self::Token<'_> { ( @@ -5232,33 +5176,32 @@ function getPool(bytes32 poolId) external view returns (address, IVault.PoolSpec > as alloy_sol_types::SolType>::tokenize(&self.poolId), ) } + #[inline] fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { getPoolReturn::_tokenize(ret) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) + 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) + 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(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `getPoolTokens(bytes32)` and selector `0xf94d4668`. -```solidity -function getPoolTokens(bytes32 poolId) external view returns (address[] memory tokens, uint256[] memory balances, uint256 lastChangeBlock); -```*/ + ```solidity + function getPoolTokens(bytes32 poolId) external view returns (address[] memory tokens, uint256[] memory balances, uint256 lastChangeBlock); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct getPoolTokensCall { @@ -5266,16 +5209,16 @@ function getPoolTokens(bytes32 poolId) external view returns (address[] memory t pub poolId: alloy_sol_types::private::FixedBytes<32>, } #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`getPoolTokens(bytes32)`](getPoolTokensCall) function. + ///Container type for the return parameters of the + /// [`getPoolTokens(bytes32)`](getPoolTokensCall) function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct getPoolTokensReturn { #[allow(missing_docs)] pub tokens: alloy_sol_types::private::Vec, #[allow(missing_docs)] - pub balances: alloy_sol_types::private::Vec< - alloy_sol_types::private::primitives::aliases::U256, - >, + pub balances: + alloy_sol_types::private::Vec, #[allow(missing_docs)] pub lastChangeBlock: alloy_sol_types::private::primitives::aliases::U256, } @@ -5286,7 +5229,7 @@ function getPoolTokens(bytes32 poolId) external view returns (address[] memory t clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -5295,9 +5238,7 @@ function getPoolTokens(bytes32 poolId) external view returns (address[] memory t 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, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -5330,16 +5271,12 @@ function getPoolTokens(bytes32 poolId) external view returns (address[] memory t #[doc(hidden)] type UnderlyingRustTuple<'a> = ( alloy_sol_types::private::Vec, - alloy_sol_types::private::Vec< - alloy_sol_types::private::primitives::aliases::U256, - >, + 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, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -5385,26 +5322,25 @@ function getPoolTokens(bytes32 poolId) external view returns (address[] memory t #[automatically_derived] impl alloy_sol_types::SolCall for getPoolTokensCall { type Parameters<'a> = (alloy_sol_types::sol_data::FixedBytes<32>,); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = getPoolTokensReturn; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = ( alloy_sol_types::sol_data::Array, alloy_sol_types::sol_data::Array>, alloy_sol_types::sol_data::Uint<256>, ); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "getPoolTokens(bytes32)"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [249u8, 77u8, 70u8, 104u8]; + const SIGNATURE: &'static str = "getPoolTokens(bytes32)"; + #[inline] fn new<'a>( tuple: as alloy_sol_types::SolType>::RustType, ) -> Self { tuple.into() } + #[inline] fn tokenize(&self) -> Self::Token<'_> { ( @@ -5413,33 +5349,32 @@ function getPoolTokens(bytes32 poolId) external view returns (address[] memory t > as alloy_sol_types::SolType>::tokenize(&self.poolId), ) } + #[inline] fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { getPoolTokensReturn::_tokenize(ret) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) + 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) + 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(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `hasApprovedRelayer(address,address)` and selector `0xfec90d72`. -```solidity -function hasApprovedRelayer(address user, address relayer) external view returns (bool); -```*/ + ```solidity + function hasApprovedRelayer(address user, address relayer) external view returns (bool); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct hasApprovedRelayerCall { @@ -5449,7 +5384,9 @@ function hasApprovedRelayer(address user, address relayer) external view returns pub relayer: alloy_sol_types::private::Address, } #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`hasApprovedRelayer(address,address)`](hasApprovedRelayerCall) function. + ///Container type for the return parameters of the + /// [`hasApprovedRelayer(address,address)`](hasApprovedRelayerCall) + /// function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct hasApprovedRelayerReturn { @@ -5463,7 +5400,7 @@ function hasApprovedRelayer(address user, address relayer) external view returns clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -5478,9 +5415,7 @@ function hasApprovedRelayer(address user, address relayer) external view returns ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -5489,16 +5424,14 @@ function hasApprovedRelayer(address user, address relayer) external view returns } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From - for UnderlyingRustTuple<'_> { + impl ::core::convert::From for UnderlyingRustTuple<'_> { fn from(value: hasApprovedRelayerCall) -> Self { (value.user, value.relayer) } } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From> - for hasApprovedRelayerCall { + impl ::core::convert::From> for hasApprovedRelayerCall { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { Self { user: tuple.0, @@ -5515,9 +5448,7 @@ function hasApprovedRelayer(address user, address relayer) external view returns type UnderlyingRustTuple<'a> = (bool,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -5526,16 +5457,14 @@ function hasApprovedRelayer(address user, address relayer) external view returns } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From - for UnderlyingRustTuple<'_> { + impl ::core::convert::From for UnderlyingRustTuple<'_> { fn from(value: hasApprovedRelayerReturn) -> Self { (value._0,) } } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From> - for hasApprovedRelayerReturn { + impl ::core::convert::From> for hasApprovedRelayerReturn { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { Self { _0: tuple.0 } } @@ -5547,22 +5476,21 @@ function hasApprovedRelayer(address user, address relayer) external view returns alloy_sol_types::sol_data::Address, alloy_sol_types::sol_data::Address, ); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = bool; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (alloy_sol_types::sol_data::Bool,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "hasApprovedRelayer(address,address)"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [254u8, 201u8, 13u8, 114u8]; + const SIGNATURE: &'static str = "hasApprovedRelayer(address,address)"; + #[inline] fn new<'a>( tuple: as alloy_sol_types::SolType>::RustType, ) -> Self { tuple.into() } + #[inline] fn tokenize(&self) -> Self::Token<'_> { ( @@ -5574,43 +5502,39 @@ function hasApprovedRelayer(address user, address relayer) external view returns ), ) } + #[inline] fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { - ( - ::tokenize( - ret, - ), - ) + (::tokenize(ret),) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) - .map(|r| { + as alloy_sol_types::SolType>::abi_decode_sequence(data).map( + |r| { let r: hasApprovedRelayerReturn = 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: hasApprovedRelayerReturn = r.into(); - r._0 - }) + 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: hasApprovedRelayerReturn = r.into(); + r._0 + }) } } }; #[derive()] /**Function with signature `manageUserBalance((uint8,address,uint256,address,address)[])` and selector `0x0e8e3e84`. -```solidity -function manageUserBalance(IVault.UserBalanceOp[] memory ops) external payable; -```*/ + ```solidity + function manageUserBalance(IVault.UserBalanceOp[] memory ops) external payable; + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct manageUserBalanceCall { @@ -5619,7 +5543,9 @@ function manageUserBalance(IVault.UserBalanceOp[] memory ops) external payable; ::RustType, >, } - ///Container type for the return parameters of the [`manageUserBalance((uint8,address,uint256,address,address)[])`](manageUserBalanceCall) function. + ///Container type for the return parameters of the + /// [`manageUserBalance((uint8,address,uint256,address, + /// address)[])`](manageUserBalanceCall) function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct manageUserBalanceReturn {} @@ -5630,13 +5556,12 @@ function manageUserBalance(IVault.UserBalanceOp[] memory ops) external payable; clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] - type UnderlyingSolTuple<'a> = ( - alloy_sol_types::sol_data::Array, - ); + type UnderlyingSolTuple<'a> = + (alloy_sol_types::sol_data::Array,); #[doc(hidden)] type UnderlyingRustTuple<'a> = ( alloy_sol_types::private::Vec< @@ -5645,9 +5570,7 @@ function manageUserBalance(IVault.UserBalanceOp[] memory ops) external payable; ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -5656,16 +5579,14 @@ function manageUserBalance(IVault.UserBalanceOp[] memory ops) external payable; } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From - for UnderlyingRustTuple<'_> { + impl ::core::convert::From for UnderlyingRustTuple<'_> { fn from(value: manageUserBalanceCall) -> Self { (value.ops,) } } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From> - for manageUserBalanceCall { + impl ::core::convert::From> for manageUserBalanceCall { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { Self { ops: tuple.0 } } @@ -5679,9 +5600,7 @@ function manageUserBalance(IVault.UserBalanceOp[] memory ops) external payable; type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -5690,16 +5609,14 @@ function manageUserBalance(IVault.UserBalanceOp[] memory ops) external payable; } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From - for UnderlyingRustTuple<'_> { + impl ::core::convert::From for UnderlyingRustTuple<'_> { fn from(value: manageUserBalanceReturn) -> Self { () } } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From> - for manageUserBalanceReturn { + impl ::core::convert::From> for manageUserBalanceReturn { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { Self {} } @@ -5714,25 +5631,23 @@ function manageUserBalance(IVault.UserBalanceOp[] memory ops) external payable; } #[automatically_derived] impl alloy_sol_types::SolCall for manageUserBalanceCall { - type Parameters<'a> = ( - alloy_sol_types::sol_data::Array, - ); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Parameters<'a> = (alloy_sol_types::sol_data::Array,); type Return = manageUserBalanceReturn; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "manageUserBalance((uint8,address,uint256,address,address)[])"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [14u8, 142u8, 62u8, 132u8]; + const SIGNATURE: &'static str = + "manageUserBalance((uint8,address,uint256,address,address)[])"; + #[inline] fn new<'a>( tuple: as alloy_sol_types::SolType>::RustType, ) -> Self { tuple.into() } + #[inline] fn tokenize(&self) -> Self::Token<'_> { ( @@ -5741,33 +5656,32 @@ function manageUserBalance(IVault.UserBalanceOp[] memory ops) external payable; > as alloy_sol_types::SolType>::tokenize(&self.ops), ) } + #[inline] fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { manageUserBalanceReturn::_tokenize(ret) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) + 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) + 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(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `setRelayerApproval(address,address,bool)` and selector `0xfa6e671d`. -```solidity -function setRelayerApproval(address sender, address relayer, bool approved) external; -```*/ + ```solidity + function setRelayerApproval(address sender, address relayer, bool approved) external; + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct setRelayerApprovalCall { @@ -5778,7 +5692,9 @@ function setRelayerApproval(address sender, address relayer, bool approved) exte #[allow(missing_docs)] pub approved: bool, } - ///Container type for the return parameters of the [`setRelayerApproval(address,address,bool)`](setRelayerApprovalCall) function. + ///Container type for the return parameters of the + /// [`setRelayerApproval(address,address,bool)`](setRelayerApprovalCall) + /// function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct setRelayerApprovalReturn {} @@ -5789,7 +5705,7 @@ function setRelayerApproval(address sender, address relayer, bool approved) exte clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -5806,9 +5722,7 @@ function setRelayerApproval(address sender, address relayer, bool approved) exte ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -5817,16 +5731,14 @@ function setRelayerApproval(address sender, address relayer, bool approved) exte } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From - for UnderlyingRustTuple<'_> { + impl ::core::convert::From for UnderlyingRustTuple<'_> { fn from(value: setRelayerApprovalCall) -> Self { (value.sender, value.relayer, value.approved) } } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From> - for setRelayerApprovalCall { + impl ::core::convert::From> for setRelayerApprovalCall { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { Self { sender: tuple.0, @@ -5844,9 +5756,7 @@ function setRelayerApproval(address sender, address relayer, bool approved) exte type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -5855,16 +5765,14 @@ function setRelayerApproval(address sender, address relayer, bool approved) exte } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From - for UnderlyingRustTuple<'_> { + impl ::core::convert::From for UnderlyingRustTuple<'_> { fn from(value: setRelayerApprovalReturn) -> Self { () } } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From> - for setRelayerApprovalReturn { + impl ::core::convert::From> for setRelayerApprovalReturn { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { Self {} } @@ -5884,22 +5792,21 @@ function setRelayerApproval(address sender, address relayer, bool approved) exte alloy_sol_types::sol_data::Address, alloy_sol_types::sol_data::Bool, ); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = setRelayerApprovalReturn; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "setRelayerApproval(address,address,bool)"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [250u8, 110u8, 103u8, 29u8]; + const SIGNATURE: &'static str = "setRelayerApproval(address,address,bool)"; + #[inline] fn new<'a>( tuple: as alloy_sol_types::SolType>::RustType, ) -> Self { tuple.into() } + #[inline] fn tokenize(&self) -> Self::Token<'_> { ( @@ -5914,33 +5821,32 @@ function setRelayerApproval(address sender, address relayer, bool approved) exte ), ) } + #[inline] fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { setRelayerApprovalReturn::_tokenize(ret) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) + 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) + 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()] /**Function with signature `swap((bytes32,uint8,address,address,uint256,bytes),(address,bool,address,bool),uint256,uint256)` and selector `0x52bbbe29`. -```solidity -function swap(IVault.SingleSwap memory singleSwap, IVault.FundManagement memory funds, uint256 limit, uint256 deadline) external payable returns (uint256 amountCalculated); -```*/ + ```solidity + function swap(IVault.SingleSwap memory singleSwap, IVault.FundManagement memory funds, uint256 limit, uint256 deadline) external payable returns (uint256 amountCalculated); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct swapCall { @@ -5954,7 +5860,9 @@ function swap(IVault.SingleSwap memory singleSwap, IVault.FundManagement memory pub deadline: alloy_sol_types::private::primitives::aliases::U256, } #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`swap((bytes32,uint8,address,address,uint256,bytes),(address,bool,address,bool),uint256,uint256)`](swapCall) function. + ///Container type for the return parameters of the + /// [`swap((bytes32,uint8,address,address,uint256,bytes),(address,bool, + /// address,bool),uint256,uint256)`](swapCall) function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct swapReturn { @@ -5968,7 +5876,7 @@ function swap(IVault.SingleSwap memory singleSwap, IVault.FundManagement memory clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -5987,9 +5895,7 @@ function swap(IVault.SingleSwap memory singleSwap, IVault.FundManagement memory ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -6021,14 +5927,10 @@ function swap(IVault.SingleSwap memory singleSwap, IVault.FundManagement memory #[allow(dead_code)] type UnderlyingSolTuple<'a> = (alloy_sol_types::sol_data::Uint<256>,); #[doc(hidden)] - type UnderlyingRustTuple<'a> = ( - alloy_sol_types::private::primitives::aliases::U256, - ); + 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, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -6046,7 +5948,9 @@ function swap(IVault.SingleSwap memory singleSwap, IVault.FundManagement memory #[doc(hidden)] impl ::core::convert::From> for swapReturn { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { - Self { amountCalculated: tuple.0 } + Self { + amountCalculated: tuple.0, + } } } } @@ -6058,74 +5962,69 @@ function swap(IVault.SingleSwap memory singleSwap, IVault.FundManagement memory 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 = alloy_sol_types::private::primitives::aliases::U256; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (alloy_sol_types::sol_data::Uint<256>,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "swap((bytes32,uint8,address,address,uint256,bytes),(address,bool,address,bool),uint256,uint256)"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [82u8, 187u8, 190u8, 41u8]; + const SIGNATURE: &'static str = "swap((bytes32,uint8,address,address,uint256,bytes),\ + (address,bool,address,bool),uint256,uint256)"; + #[inline] fn new<'a>( tuple: as alloy_sol_types::SolType>::RustType, ) -> Self { tuple.into() } + #[inline] fn tokenize(&self) -> Self::Token<'_> { ( - ::tokenize( - &self.singleSwap, + ::tokenize(&self.singleSwap), + ::tokenize(&self.funds), + as alloy_sol_types::SolType>::tokenize( + &self.limit, ), - ::tokenize( - &self.funds, + as alloy_sol_types::SolType>::tokenize( + &self.deadline, ), - as alloy_sol_types::SolType>::tokenize(&self.limit), - as alloy_sol_types::SolType>::tokenize(&self.deadline), ) } + #[inline] fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { ( - as alloy_sol_types::SolType>::tokenize(ret), + 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| { + as alloy_sol_types::SolType>::abi_decode_sequence(data).map( + |r| { let r: swapReturn = r.into(); r.amountCalculated - }) + }, + ) } + #[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: swapReturn = r.into(); - r.amountCalculated - }) + 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: swapReturn = r.into(); + r.amountCalculated + }) } } }; ///Container for all the [`BalancerV2Vault`](self) function calls. #[derive(Clone)] - #[derive()] pub enum BalancerV2VaultCalls { #[allow(missing_docs)] WETH(WETHCall), @@ -6153,8 +6052,9 @@ function swap(IVault.SingleSwap memory singleSwap, IVault.FundManagement memory impl BalancerV2VaultCalls { /// 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. + /// 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]] = &[ @@ -6170,20 +6070,6 @@ function swap(IVault.SingleSwap memory singleSwap, IVault.FundManagement memory [250u8, 110u8, 103u8, 29u8], [254u8, 201u8, 13u8, 114u8], ]; - /// The names of the variants in the same order as `SELECTORS`. - pub const VARIANT_NAMES: &'static [&'static str] = &[ - ::core::stringify!(manageUserBalance), - ::core::stringify!(getInternalBalance), - ::core::stringify!(getPausedState), - ::core::stringify!(swap), - ::core::stringify!(flashLoan), - ::core::stringify!(batchSwap), - ::core::stringify!(WETH), - ::core::stringify!(getPool), - ::core::stringify!(getPoolTokens), - ::core::stringify!(setRelayerApproval), - ::core::stringify!(hasApprovedRelayer), - ]; /// The signatures in the same order as `SELECTORS`. pub const SIGNATURES: &'static [&'static str] = &[ ::SIGNATURE, @@ -6198,6 +6084,21 @@ function swap(IVault.SingleSwap memory singleSwap, IVault.FundManagement memory ::SIGNATURE, ::SIGNATURE, ]; + /// The names of the variants in the same order as `SELECTORS`. + pub const VARIANT_NAMES: &'static [&'static str] = &[ + ::core::stringify!(manageUserBalance), + ::core::stringify!(getInternalBalance), + ::core::stringify!(getPausedState), + ::core::stringify!(swap), + ::core::stringify!(flashLoan), + ::core::stringify!(batchSwap), + ::core::stringify!(WETH), + ::core::stringify!(getPool), + ::core::stringify!(getPoolTokens), + ::core::stringify!(setRelayerApproval), + ::core::stringify!(hasApprovedRelayer), + ]; + /// Returns the signature for the given selector, if known. #[inline] pub fn signature_by_selector( @@ -6210,30 +6111,26 @@ function swap(IVault.SingleSwap memory singleSwap, IVault.FundManagement memory ::core::result::Result::Err(_) => ::core::option::Option::None, } } + /// Returns the enum variant name for the given selector, if known. #[inline] - pub fn name_by_selector( - selector: [u8; 4usize], - ) -> ::core::option::Option<&'static str> { + pub fn name_by_selector(selector: [u8; 4usize]) -> ::core::option::Option<&'static str> { let sig = Self::signature_by_selector(selector)?; sig.split_once('(').map(|(name, _)| name) } } #[automatically_derived] impl alloy_sol_types::SolInterface for BalancerV2VaultCalls { - const NAME: &'static str = "BalancerV2VaultCalls"; - const MIN_DATA_LENGTH: usize = 0usize; const COUNT: usize = 11usize; + const MIN_DATA_LENGTH: usize = 0usize; + const NAME: &'static str = "BalancerV2VaultCalls"; + #[inline] fn selector(&self) -> [u8; 4] { match self { Self::WETH(_) => ::SELECTOR, - Self::batchSwap(_) => { - ::SELECTOR - } - Self::flashLoan(_) => { - ::SELECTOR - } + Self::batchSwap(_) => ::SELECTOR, + Self::flashLoan(_) => ::SELECTOR, Self::getInternalBalance(_) => { ::SELECTOR } @@ -6241,9 +6138,7 @@ function swap(IVault.SingleSwap memory singleSwap, IVault.FundManagement memory ::SELECTOR } Self::getPool(_) => ::SELECTOR, - Self::getPoolTokens(_) => { - ::SELECTOR - } + Self::getPoolTokens(_) => ::SELECTOR, Self::hasApprovedRelayer(_) => { ::SELECTOR } @@ -6256,30 +6151,26 @@ function swap(IVault.SingleSwap memory singleSwap, IVault.FundManagement memory Self::swap(_) => ::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 abi_decode_raw(selector: [u8; 4], data: &[u8]) -> alloy_sol_types::Result { + static DECODE_SHIMS: &[fn(&[u8]) -> alloy_sol_types::Result] = &[ { fn manageUserBalance( data: &[u8], ) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, - ) + ::abi_decode_raw(data) .map(BalancerV2VaultCalls::manageUserBalance) } manageUserBalance @@ -6288,9 +6179,7 @@ function swap(IVault.SingleSwap memory singleSwap, IVault.FundManagement memory fn getInternalBalance( data: &[u8], ) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, - ) + ::abi_decode_raw(data) .map(BalancerV2VaultCalls::getInternalBalance) } getInternalBalance @@ -6299,65 +6188,49 @@ function swap(IVault.SingleSwap memory singleSwap, IVault.FundManagement memory fn getPausedState( data: &[u8], ) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, - ) + ::abi_decode_raw(data) .map(BalancerV2VaultCalls::getPausedState) } getPausedState }, { - fn swap( - data: &[u8], - ) -> alloy_sol_types::Result { + fn swap(data: &[u8]) -> alloy_sol_types::Result { ::abi_decode_raw(data) .map(BalancerV2VaultCalls::swap) } swap }, { - fn flashLoan( - data: &[u8], - ) -> alloy_sol_types::Result { + fn flashLoan(data: &[u8]) -> alloy_sol_types::Result { ::abi_decode_raw(data) .map(BalancerV2VaultCalls::flashLoan) } flashLoan }, { - fn batchSwap( - data: &[u8], - ) -> alloy_sol_types::Result { + fn batchSwap(data: &[u8]) -> alloy_sol_types::Result { ::abi_decode_raw(data) .map(BalancerV2VaultCalls::batchSwap) } batchSwap }, { - fn WETH( - data: &[u8], - ) -> alloy_sol_types::Result { + fn WETH(data: &[u8]) -> alloy_sol_types::Result { ::abi_decode_raw(data) .map(BalancerV2VaultCalls::WETH) } WETH }, { - fn getPool( - data: &[u8], - ) -> alloy_sol_types::Result { + fn getPool(data: &[u8]) -> alloy_sol_types::Result { ::abi_decode_raw(data) .map(BalancerV2VaultCalls::getPool) } getPool }, { - fn getPoolTokens( - data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, - ) + fn getPoolTokens(data: &[u8]) -> alloy_sol_types::Result { + ::abi_decode_raw(data) .map(BalancerV2VaultCalls::getPoolTokens) } getPoolTokens @@ -6366,9 +6239,7 @@ function swap(IVault.SingleSwap memory singleSwap, IVault.FundManagement memory fn setRelayerApproval( data: &[u8], ) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, - ) + ::abi_decode_raw(data) .map(BalancerV2VaultCalls::setRelayerApproval) } setRelayerApproval @@ -6377,24 +6248,21 @@ function swap(IVault.SingleSwap memory singleSwap, IVault.FundManagement memory fn hasApprovedRelayer( data: &[u8], ) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, - ) + ::abi_decode_raw(data) .map(BalancerV2VaultCalls::hasApprovedRelayer) } hasApprovedRelayer }, ]; let Ok(idx) = Self::SELECTORS.binary_search(&selector) else { - return Err( - alloy_sol_types::Error::unknown_selector( - ::NAME, - selector, - ), - ); + return Err(alloy_sol_types::Error::unknown_selector( + ::NAME, + selector, + )); }; DECODE_SHIMS[idx](data) } + #[inline] #[allow(non_snake_case)] fn abi_decode_raw_validate( @@ -6403,7 +6271,8 @@ function swap(IVault.SingleSwap memory singleSwap, IVault.FundManagement memory ) -> alloy_sol_types::Result { static DECODE_VALIDATE_SHIMS: &[fn( &[u8], - ) -> alloy_sol_types::Result] = &[ + ) + -> alloy_sol_types::Result] = &[ { fn manageUserBalance( data: &[u8], @@ -6431,75 +6300,53 @@ function swap(IVault.SingleSwap memory singleSwap, IVault.FundManagement memory data: &[u8], ) -> alloy_sol_types::Result { ::abi_decode_raw_validate( - data, - ) - .map(BalancerV2VaultCalls::getPausedState) + data, + ) + .map(BalancerV2VaultCalls::getPausedState) } getPausedState }, { - fn swap( - data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) + fn swap(data: &[u8]) -> alloy_sol_types::Result { + ::abi_decode_raw_validate(data) .map(BalancerV2VaultCalls::swap) } swap }, { - fn flashLoan( - data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) + fn flashLoan(data: &[u8]) -> alloy_sol_types::Result { + ::abi_decode_raw_validate(data) .map(BalancerV2VaultCalls::flashLoan) } flashLoan }, { - fn batchSwap( - data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) + fn batchSwap(data: &[u8]) -> alloy_sol_types::Result { + ::abi_decode_raw_validate(data) .map(BalancerV2VaultCalls::batchSwap) } batchSwap }, { - fn WETH( - data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) + fn WETH(data: &[u8]) -> alloy_sol_types::Result { + ::abi_decode_raw_validate(data) .map(BalancerV2VaultCalls::WETH) } WETH }, { - fn getPool( - data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) + fn getPool(data: &[u8]) -> alloy_sol_types::Result { + ::abi_decode_raw_validate(data) .map(BalancerV2VaultCalls::getPool) } getPool }, { - fn getPoolTokens( - data: &[u8], - ) -> alloy_sol_types::Result { + fn getPoolTokens(data: &[u8]) -> alloy_sol_types::Result { ::abi_decode_raw_validate( - data, - ) - .map(BalancerV2VaultCalls::getPoolTokens) + data, + ) + .map(BalancerV2VaultCalls::getPoolTokens) } getPoolTokens }, @@ -6527,15 +6374,14 @@ function swap(IVault.SingleSwap memory singleSwap, IVault.FundManagement memory }, ]; let Ok(idx) = Self::SELECTORS.binary_search(&selector) else { - return Err( - alloy_sol_types::Error::unknown_selector( - ::NAME, - selector, - ), - ); + return Err(alloy_sol_types::Error::unknown_selector( + ::NAME, + selector, + )); }; DECODE_VALIDATE_SHIMS[idx](data) } + #[inline] fn abi_encoded_size(&self) -> usize { match self { @@ -6549,43 +6395,32 @@ function swap(IVault.SingleSwap memory singleSwap, IVault.FundManagement memory ::abi_encoded_size(inner) } Self::getInternalBalance(inner) => { - ::abi_encoded_size( - inner, - ) + ::abi_encoded_size(inner) } Self::getPausedState(inner) => { - ::abi_encoded_size( - inner, - ) + ::abi_encoded_size(inner) } Self::getPool(inner) => { ::abi_encoded_size(inner) } Self::getPoolTokens(inner) => { - ::abi_encoded_size( - inner, - ) + ::abi_encoded_size(inner) } Self::hasApprovedRelayer(inner) => { - ::abi_encoded_size( - inner, - ) + ::abi_encoded_size(inner) } Self::manageUserBalance(inner) => { - ::abi_encoded_size( - inner, - ) + ::abi_encoded_size(inner) } Self::setRelayerApproval(inner) => { - ::abi_encoded_size( - inner, - ) + ::abi_encoded_size(inner) } Self::swap(inner) => { ::abi_encoded_size(inner) } } } + #[inline] fn abi_encode_raw(&self, out: &mut alloy_sol_types::private::Vec) { match self { @@ -6593,55 +6428,31 @@ function swap(IVault.SingleSwap memory singleSwap, IVault.FundManagement memory ::abi_encode_raw(inner, out) } Self::batchSwap(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } Self::flashLoan(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } Self::getInternalBalance(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } Self::getPausedState(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } Self::getPool(inner) => { ::abi_encode_raw(inner, out) } Self::getPoolTokens(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } Self::hasApprovedRelayer(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } Self::manageUserBalance(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } Self::setRelayerApproval(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } Self::swap(inner) => { ::abi_encode_raw(inner, out) @@ -6650,8 +6461,7 @@ function swap(IVault.SingleSwap memory singleSwap, IVault.FundManagement memory } } ///Container for all the [`BalancerV2Vault`](self) events. - #[derive(Clone)] - #[derive(Debug, PartialEq, Eq, Hash)] + #[derive(Clone, Debug, PartialEq, Eq, Hash)] pub enum BalancerV2VaultEvents { #[allow(missing_docs)] AuthorizerChanged(AuthorizerChanged), @@ -6681,88 +6491,73 @@ function swap(IVault.SingleSwap memory singleSwap, IVault.FundManagement memory impl BalancerV2VaultEvents { /// 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. + /// 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]] = &[ [ - 13u8, 125u8, 117u8, 224u8, 26u8, 185u8, 87u8, 128u8, 211u8, 205u8, 28u8, - 142u8, 192u8, 221u8, 108u8, 44u8, 225u8, 158u8, 58u8, 32u8, 66u8, 126u8, - 236u8, 139u8, 245u8, 50u8, 131u8, 182u8, 251u8, 142u8, 149u8, 240u8, + 13u8, 125u8, 117u8, 224u8, 26u8, 185u8, 87u8, 128u8, 211u8, 205u8, 28u8, 142u8, + 192u8, 221u8, 108u8, 44u8, 225u8, 158u8, 58u8, 32u8, 66u8, 126u8, 236u8, 139u8, + 245u8, 50u8, 131u8, 182u8, 251u8, 142u8, 149u8, 240u8, ], [ - 24u8, 225u8, 234u8, 65u8, 57u8, 230u8, 132u8, 19u8, 215u8, 208u8, 138u8, - 167u8, 82u8, 231u8, 21u8, 104u8, 227u8, 107u8, 44u8, 91u8, 249u8, 64u8, - 137u8, 51u8, 20u8, 194u8, 197u8, 176u8, 30u8, 170u8, 12u8, 66u8, + 24u8, 225u8, 234u8, 65u8, 57u8, 230u8, 132u8, 19u8, 215u8, 208u8, 138u8, 167u8, + 82u8, 231u8, 21u8, 104u8, 227u8, 107u8, 44u8, 91u8, 249u8, 64u8, 137u8, 51u8, 20u8, + 194u8, 197u8, 176u8, 30u8, 170u8, 12u8, 66u8, ], [ - 33u8, 112u8, 199u8, 65u8, 196u8, 21u8, 49u8, 174u8, 194u8, 14u8, 124u8, - 16u8, 124u8, 36u8, 238u8, 207u8, 221u8, 21u8, 230u8, 156u8, 155u8, 176u8, - 168u8, 221u8, 55u8, 177u8, 132u8, 11u8, 158u8, 11u8, 32u8, 123u8, + 33u8, 112u8, 199u8, 65u8, 196u8, 21u8, 49u8, 174u8, 194u8, 14u8, 124u8, 16u8, + 124u8, 36u8, 238u8, 207u8, 221u8, 21u8, 230u8, 156u8, 155u8, 176u8, 168u8, 221u8, + 55u8, 177u8, 132u8, 11u8, 158u8, 11u8, 32u8, 123u8, ], [ - 60u8, 19u8, 188u8, 48u8, 184u8, 232u8, 120u8, 197u8, 63u8, 210u8, 163u8, - 107u8, 103u8, 148u8, 9u8, 192u8, 115u8, 175u8, 215u8, 89u8, 80u8, 190u8, - 67u8, 216u8, 133u8, 135u8, 104u8, 233u8, 86u8, 251u8, 194u8, 14u8, + 60u8, 19u8, 188u8, 48u8, 184u8, 232u8, 120u8, 197u8, 63u8, 210u8, 163u8, 107u8, + 103u8, 148u8, 9u8, 192u8, 115u8, 175u8, 215u8, 89u8, 80u8, 190u8, 67u8, 216u8, + 133u8, 135u8, 104u8, 233u8, 86u8, 251u8, 194u8, 14u8, ], [ - 70u8, 150u8, 31u8, 219u8, 69u8, 2u8, 182u8, 70u8, 213u8, 9u8, 95u8, - 186u8, 118u8, 0u8, 72u8, 106u8, 138u8, 192u8, 80u8, 65u8, 213u8, 92u8, - 223u8, 15u8, 22u8, 237u8, 103u8, 113u8, 128u8, 181u8, 202u8, 216u8, + 70u8, 150u8, 31u8, 219u8, 69u8, 2u8, 182u8, 70u8, 213u8, 9u8, 95u8, 186u8, 118u8, + 0u8, 72u8, 106u8, 138u8, 192u8, 80u8, 65u8, 213u8, 92u8, 223u8, 15u8, 22u8, 237u8, + 103u8, 113u8, 128u8, 181u8, 202u8, 216u8, ], [ - 84u8, 10u8, 26u8, 63u8, 40u8, 52u8, 12u8, 174u8, 195u8, 54u8, 200u8, - 29u8, 141u8, 123u8, 61u8, 241u8, 57u8, 238u8, 92u8, 220u8, 24u8, 57u8, - 164u8, 242u8, 131u8, 215u8, 235u8, 183u8, 234u8, 174u8, 45u8, 92u8, + 84u8, 10u8, 26u8, 63u8, 40u8, 52u8, 12u8, 174u8, 195u8, 54u8, 200u8, 29u8, 141u8, + 123u8, 61u8, 241u8, 57u8, 238u8, 92u8, 220u8, 24u8, 57u8, 164u8, 242u8, 131u8, + 215u8, 235u8, 183u8, 234u8, 174u8, 45u8, 92u8, ], [ - 110u8, 220u8, 175u8, 98u8, 65u8, 16u8, 91u8, 76u8, 148u8, 194u8, 239u8, - 219u8, 243u8, 166u8, 177u8, 36u8, 88u8, 235u8, 61u8, 7u8, 190u8, 58u8, - 14u8, 129u8, 210u8, 75u8, 19u8, 196u8, 64u8, 69u8, 254u8, 122u8, + 110u8, 220u8, 175u8, 98u8, 65u8, 16u8, 91u8, 76u8, 148u8, 194u8, 239u8, 219u8, + 243u8, 166u8, 177u8, 36u8, 88u8, 235u8, 61u8, 7u8, 190u8, 58u8, 14u8, 129u8, 210u8, + 75u8, 19u8, 196u8, 64u8, 69u8, 254u8, 122u8, ], [ - 125u8, 205u8, 198u8, 208u8, 46u8, 244u8, 12u8, 124u8, 26u8, 112u8, 70u8, - 160u8, 17u8, 176u8, 88u8, 189u8, 127u8, 152u8, 143u8, 161u8, 78u8, 32u8, - 166u8, 99u8, 68u8, 249u8, 212u8, 230u8, 6u8, 87u8, 214u8, 16u8, + 125u8, 205u8, 198u8, 208u8, 46u8, 244u8, 12u8, 124u8, 26u8, 112u8, 70u8, 160u8, + 17u8, 176u8, 88u8, 189u8, 127u8, 152u8, 143u8, 161u8, 78u8, 32u8, 166u8, 99u8, + 68u8, 249u8, 212u8, 230u8, 6u8, 87u8, 214u8, 16u8, ], [ - 148u8, 185u8, 121u8, 182u8, 131u8, 26u8, 81u8, 41u8, 62u8, 38u8, 65u8, - 66u8, 111u8, 151u8, 116u8, 127u8, 238u8, 212u8, 111u8, 23u8, 119u8, - 159u8, 237u8, 156u8, 209u8, 141u8, 30u8, 206u8, 252u8, 254u8, 146u8, - 239u8, + 148u8, 185u8, 121u8, 182u8, 131u8, 26u8, 81u8, 41u8, 62u8, 38u8, 65u8, 66u8, 111u8, + 151u8, 116u8, 127u8, 238u8, 212u8, 111u8, 23u8, 119u8, 159u8, 237u8, 156u8, 209u8, + 141u8, 30u8, 206u8, 252u8, 254u8, 146u8, 239u8, ], [ - 158u8, 58u8, 94u8, 55u8, 34u8, 69u8, 50u8, 222u8, 166u8, 123u8, 137u8, - 250u8, 206u8, 24u8, 87u8, 3u8, 115u8, 138u8, 34u8, 138u8, 110u8, 138u8, - 35u8, 222u8, 229u8, 70u8, 150u8, 1u8, 128u8, 211u8, 190u8, 100u8, + 158u8, 58u8, 94u8, 55u8, 34u8, 69u8, 50u8, 222u8, 166u8, 123u8, 137u8, 250u8, + 206u8, 24u8, 87u8, 3u8, 115u8, 138u8, 34u8, 138u8, 110u8, 138u8, 35u8, 222u8, + 229u8, 70u8, 150u8, 1u8, 128u8, 211u8, 190u8, 100u8, ], [ - 229u8, 206u8, 36u8, 144u8, 135u8, 206u8, 4u8, 240u8, 90u8, 149u8, 113u8, - 146u8, 67u8, 84u8, 0u8, 253u8, 151u8, 134u8, 141u8, 186u8, 14u8, 106u8, - 75u8, 76u8, 4u8, 154u8, 191u8, 138u8, 248u8, 13u8, 174u8, 120u8, + 229u8, 206u8, 36u8, 144u8, 135u8, 206u8, 4u8, 240u8, 90u8, 149u8, 113u8, 146u8, + 67u8, 84u8, 0u8, 253u8, 151u8, 134u8, 141u8, 186u8, 14u8, 106u8, 75u8, 76u8, 4u8, + 154u8, 191u8, 138u8, 248u8, 13u8, 174u8, 120u8, ], [ - 245u8, 132u8, 125u8, 63u8, 33u8, 151u8, 177u8, 108u8, 220u8, 210u8, 9u8, - 142u8, 201u8, 93u8, 9u8, 5u8, 205u8, 26u8, 189u8, 175u8, 65u8, 95u8, 7u8, - 187u8, 124u8, 239u8, 43u8, 186u8, 138u8, 197u8, 222u8, 196u8, + 245u8, 132u8, 125u8, 63u8, 33u8, 151u8, 177u8, 108u8, 220u8, 210u8, 9u8, 142u8, + 201u8, 93u8, 9u8, 5u8, 205u8, 26u8, 189u8, 175u8, 65u8, 95u8, 7u8, 187u8, 124u8, + 239u8, 43u8, 186u8, 138u8, 197u8, 222u8, 196u8, ], ]; - /// The names of the variants in the same order as `SELECTORS`. - pub const VARIANT_NAMES: &'static [&'static str] = &[ - ::core::stringify!(FlashLoan), - ::core::stringify!(InternalBalanceChanged), - ::core::stringify!(Swap), - ::core::stringify!(PoolRegistered), - ::core::stringify!(RelayerApprovalChanged), - ::core::stringify!(ExternalBalanceTransfer), - ::core::stringify!(PoolBalanceManaged), - ::core::stringify!(TokensDeregistered), - ::core::stringify!(AuthorizerChanged), - ::core::stringify!(PausedStateChanged), - ::core::stringify!(PoolBalanceChanged), - ::core::stringify!(TokensRegistered), - ]; /// The signatures in the same order as `SELECTORS`. pub const SIGNATURES: &'static [&'static str] = &[ ::SIGNATURE, @@ -6778,6 +6573,22 @@ function swap(IVault.SingleSwap memory singleSwap, IVault.FundManagement memory ::SIGNATURE, ::SIGNATURE, ]; + /// The names of the variants in the same order as `SELECTORS`. + pub const VARIANT_NAMES: &'static [&'static str] = &[ + ::core::stringify!(FlashLoan), + ::core::stringify!(InternalBalanceChanged), + ::core::stringify!(Swap), + ::core::stringify!(PoolRegistered), + ::core::stringify!(RelayerApprovalChanged), + ::core::stringify!(ExternalBalanceTransfer), + ::core::stringify!(PoolBalanceManaged), + ::core::stringify!(TokensDeregistered), + ::core::stringify!(AuthorizerChanged), + ::core::stringify!(PausedStateChanged), + ::core::stringify!(PoolBalanceChanged), + ::core::stringify!(TokensRegistered), + ]; + /// Returns the signature for the given selector, if known. #[inline] pub fn signature_by_selector( @@ -6790,132 +6601,87 @@ function swap(IVault.SingleSwap memory singleSwap, IVault.FundManagement memory ::core::result::Result::Err(_) => ::core::option::Option::None, } } + /// Returns the enum variant name for the given selector, if known. #[inline] - pub fn name_by_selector( - selector: [u8; 32usize], - ) -> ::core::option::Option<&'static str> { + pub fn name_by_selector(selector: [u8; 32usize]) -> ::core::option::Option<&'static str> { let sig = Self::signature_by_selector(selector)?; sig.split_once('(').map(|(name, _)| name) } } #[automatically_derived] impl alloy_sol_types::SolEventInterface for BalancerV2VaultEvents { - const NAME: &'static str = "BalancerV2VaultEvents"; const COUNT: usize = 12usize; + const NAME: &'static str = "BalancerV2VaultEvents"; + 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, - ) + Some(::SIGNATURE_HASH) => { + ::decode_raw_log(topics, data) .map(Self::AuthorizerChanged) } - Some( - ::SIGNATURE_HASH, - ) => { + Some(::SIGNATURE_HASH) => { ::decode_raw_log( - topics, - data, - ) - .map(Self::ExternalBalanceTransfer) + topics, data, + ) + .map(Self::ExternalBalanceTransfer) } Some(::SIGNATURE_HASH) => { - ::decode_raw_log( - topics, - data, - ) + ::decode_raw_log(topics, data) .map(Self::FlashLoan) } - Some( - ::SIGNATURE_HASH, - ) => { + Some(::SIGNATURE_HASH) => { ::decode_raw_log( - topics, - data, - ) - .map(Self::InternalBalanceChanged) + topics, data, + ) + .map(Self::InternalBalanceChanged) } - Some( - ::SIGNATURE_HASH, - ) => { - ::decode_raw_log( - topics, - data, - ) + Some(::SIGNATURE_HASH) => { + ::decode_raw_log(topics, data) .map(Self::PausedStateChanged) } - Some( - ::SIGNATURE_HASH, - ) => { - ::decode_raw_log( - topics, - data, - ) + Some(::SIGNATURE_HASH) => { + ::decode_raw_log(topics, data) .map(Self::PoolBalanceChanged) } - Some( - ::SIGNATURE_HASH, - ) => { - ::decode_raw_log( - topics, - data, - ) + Some(::SIGNATURE_HASH) => { + ::decode_raw_log(topics, data) .map(Self::PoolBalanceManaged) } Some(::SIGNATURE_HASH) => { - ::decode_raw_log( - topics, - data, - ) + ::decode_raw_log(topics, data) .map(Self::PoolRegistered) } - Some( - ::SIGNATURE_HASH, - ) => { + Some(::SIGNATURE_HASH) => { ::decode_raw_log( - topics, - data, - ) - .map(Self::RelayerApprovalChanged) + topics, data, + ) + .map(Self::RelayerApprovalChanged) } Some(::SIGNATURE_HASH) => { ::decode_raw_log(topics, data) .map(Self::Swap) } - Some( - ::SIGNATURE_HASH, - ) => { - ::decode_raw_log( - topics, - data, - ) + Some(::SIGNATURE_HASH) => { + ::decode_raw_log(topics, data) .map(Self::TokensDeregistered) } Some(::SIGNATURE_HASH) => { - ::decode_raw_log( - topics, - data, - ) + ::decode_raw_log(topics, data) .map(Self::TokensRegistered) } - _ => { - 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(), - ), + _ => 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(), ), - }) - } + ), + }), } } } @@ -6929,9 +6695,7 @@ function swap(IVault.SingleSwap memory singleSwap, IVault.FundManagement memory Self::ExternalBalanceTransfer(inner) => { alloy_sol_types::private::IntoLogData::to_log_data(inner) } - Self::FlashLoan(inner) => { - alloy_sol_types::private::IntoLogData::to_log_data(inner) - } + Self::FlashLoan(inner) => alloy_sol_types::private::IntoLogData::to_log_data(inner), Self::InternalBalanceChanged(inner) => { alloy_sol_types::private::IntoLogData::to_log_data(inner) } @@ -6950,9 +6714,7 @@ function swap(IVault.SingleSwap memory singleSwap, IVault.FundManagement memory Self::RelayerApprovalChanged(inner) => { alloy_sol_types::private::IntoLogData::to_log_data(inner) } - Self::Swap(inner) => { - alloy_sol_types::private::IntoLogData::to_log_data(inner) - } + Self::Swap(inner) => alloy_sol_types::private::IntoLogData::to_log_data(inner), Self::TokensDeregistered(inner) => { alloy_sol_types::private::IntoLogData::to_log_data(inner) } @@ -6961,6 +6723,7 @@ function swap(IVault.SingleSwap memory singleSwap, IVault.FundManagement memory } } } + fn into_log_data(self) -> alloy_sol_types::private::LogData { match self { Self::AuthorizerChanged(inner) => { @@ -6990,9 +6753,7 @@ function swap(IVault.SingleSwap memory singleSwap, IVault.FundManagement memory Self::RelayerApprovalChanged(inner) => { alloy_sol_types::private::IntoLogData::into_log_data(inner) } - Self::Swap(inner) => { - alloy_sol_types::private::IntoLogData::into_log_data(inner) - } + Self::Swap(inner) => alloy_sol_types::private::IntoLogData::into_log_data(inner), Self::TokensDeregistered(inner) => { alloy_sol_types::private::IntoLogData::into_log_data(inner) } @@ -7002,10 +6763,10 @@ function swap(IVault.SingleSwap memory singleSwap, IVault.FundManagement memory } } } - use alloy_contract as alloy_contract; + use alloy_contract; /**Creates a new wrapper around an on-chain [`BalancerV2Vault`](self) contract instance. -See the [wrapper's documentation](`BalancerV2VaultInstance`) for more details.*/ + See the [wrapper's documentation](`BalancerV2VaultInstance`) for more details.*/ #[inline] pub const fn new< P: alloy_contract::private::Provider, @@ -7018,26 +6779,19 @@ See the [wrapper's documentation](`BalancerV2VaultInstance`) for more details.*/ } /**Deploys this contract using the given `provider` and constructor arguments, if any. -Returns a new instance of the contract, if the deployment was successful. + 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.*/ + 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, - >( + pub fn deploy, N: alloy_contract::private::Network>( __provider: P, authorizer: alloy_sol_types::private::Address, weth: alloy_sol_types::private::Address, pauseWindowDuration: alloy_sol_types::private::primitives::aliases::U256, bufferPeriodDuration: alloy_sol_types::private::primitives::aliases::U256, - ) -> impl ::core::future::Future< - Output = alloy_contract::Result>, - > { - BalancerV2VaultInstance::< - P, - N, - >::deploy( + ) -> impl ::core::future::Future>> + { + BalancerV2VaultInstance::::deploy( __provider, authorizer, weth, @@ -7046,10 +6800,10 @@ For more fine-grained control over the deployment process, use [`deploy_builder` ) } /**Creates a `RawCallBuilder` for deploying this contract using the given `provider` -and constructor arguments, if any. + 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.*/ + 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, @@ -7061,10 +6815,7 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ pauseWindowDuration: alloy_sol_types::private::primitives::aliases::U256, bufferPeriodDuration: alloy_sol_types::private::primitives::aliases::U256, ) -> alloy_contract::RawCallBuilder { - BalancerV2VaultInstance::< - P, - N, - >::deploy_builder( + BalancerV2VaultInstance::::deploy_builder( __provider, authorizer, weth, @@ -7074,15 +6825,15 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ } /**A [`BalancerV2Vault`](self) instance. -Contains type-safe methods for interacting with an on-chain instance of the -[`BalancerV2Vault`](self) contract located at a given `address`, using a given -provider `P`. + Contains type-safe methods for interacting with an on-chain instance of the + [`BalancerV2Vault`](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. + 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.*/ + See the [module-level documentation](self) for all the available methods.*/ #[derive(Clone)] pub struct BalancerV2VaultInstance { address: alloy_sol_types::private::Address, @@ -7093,33 +6844,32 @@ See the [module-level documentation](self) for all the available methods.*/ impl ::core::fmt::Debug for BalancerV2VaultInstance { #[inline] fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { - f.debug_tuple("BalancerV2VaultInstance").field(&self.address).finish() + f.debug_tuple("BalancerV2VaultInstance") + .field(&self.address) + .finish() } } /// Instantiation and getters/setters. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > BalancerV2VaultInstance { + impl, N: alloy_contract::private::Network> + BalancerV2VaultInstance + { /**Creates a new wrapper around an on-chain [`BalancerV2Vault`](self) contract instance. -See the [wrapper's documentation](`BalancerV2VaultInstance`) for more details.*/ + See the [wrapper's documentation](`BalancerV2VaultInstance`) for more details.*/ #[inline] - pub const fn new( - address: alloy_sol_types::private::Address, - __provider: P, - ) -> Self { + pub const fn new(address: alloy_sol_types::private::Address, __provider: P) -> Self { Self { address, provider: __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. + 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.*/ + For more fine-grained control over the deployment process, use [`deploy_builder`] instead.*/ #[inline] pub async fn deploy( __provider: P, @@ -7138,11 +6888,12 @@ For more fine-grained control over the deployment process, use [`deploy_builder` 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. + 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.*/ + 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, @@ -7155,34 +6906,36 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ __provider, [ &BYTECODE[..], - &alloy_sol_types::SolConstructor::abi_encode( - &constructorCall { - authorizer, - weth, - pauseWindowDuration, - bufferPeriodDuration, - }, - )[..], + &alloy_sol_types::SolConstructor::abi_encode(&constructorCall { + authorizer, + weth, + pauseWindowDuration, + bufferPeriodDuration, + })[..], ] - .concat() - .into(), + .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 { @@ -7190,7 +6943,8 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ } } impl BalancerV2VaultInstance<&P, N> { - /// Clones the provider and returns a new instance with the cloned provider. + /// Clones the provider and returns a new instance with the cloned + /// provider. #[inline] pub fn with_cloned_provider(self) -> BalancerV2VaultInstance { BalancerV2VaultInstance { @@ -7201,24 +6955,27 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ } } /// Function calls. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > BalancerV2VaultInstance { - /// Creates a new call builder using this contract instance's provider and address. + impl, N: alloy_contract::private::Network> + BalancerV2VaultInstance + { + /// 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. + /// 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 [`WETH`] function. pub fn WETH(&self) -> alloy_contract::SolCallBuilder<&P, WETHCall, N> { self.call_builder(&WETHCall) } + ///Creates a new call builder for the [`batchSwap`] function. pub fn batchSwap( &self, @@ -7233,17 +6990,16 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ >, deadline: alloy_sol_types::private::primitives::aliases::U256, ) -> alloy_contract::SolCallBuilder<&P, batchSwapCall, N> { - self.call_builder( - &batchSwapCall { - kind, - swaps, - assets, - funds, - limits, - deadline, - }, - ) + self.call_builder(&batchSwapCall { + kind, + swaps, + assets, + funds, + limits, + deadline, + }) } + ///Creates a new call builder for the [`flashLoan`] function. pub fn flashLoan( &self, @@ -7254,34 +7010,28 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ >, userData: alloy_sol_types::private::Bytes, ) -> alloy_contract::SolCallBuilder<&P, flashLoanCall, N> { - self.call_builder( - &flashLoanCall { - recipient, - tokens, - amounts, - userData, - }, - ) + self.call_builder(&flashLoanCall { + recipient, + tokens, + amounts, + userData, + }) } + ///Creates a new call builder for the [`getInternalBalance`] function. pub fn getInternalBalance( &self, user: alloy_sol_types::private::Address, tokens: alloy_sol_types::private::Vec, ) -> alloy_contract::SolCallBuilder<&P, getInternalBalanceCall, N> { - self.call_builder( - &getInternalBalanceCall { - user, - tokens, - }, - ) + self.call_builder(&getInternalBalanceCall { user, tokens }) } + ///Creates a new call builder for the [`getPausedState`] function. - pub fn getPausedState( - &self, - ) -> alloy_contract::SolCallBuilder<&P, getPausedStateCall, N> { + pub fn getPausedState(&self) -> alloy_contract::SolCallBuilder<&P, getPausedStateCall, N> { self.call_builder(&getPausedStateCall) } + ///Creates a new call builder for the [`getPool`] function. pub fn getPool( &self, @@ -7289,6 +7039,7 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ ) -> alloy_contract::SolCallBuilder<&P, getPoolCall, N> { self.call_builder(&getPoolCall { poolId }) } + ///Creates a new call builder for the [`getPoolTokens`] function. pub fn getPoolTokens( &self, @@ -7296,19 +7047,16 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ ) -> alloy_contract::SolCallBuilder<&P, getPoolTokensCall, N> { self.call_builder(&getPoolTokensCall { poolId }) } + ///Creates a new call builder for the [`hasApprovedRelayer`] function. pub fn hasApprovedRelayer( &self, user: alloy_sol_types::private::Address, relayer: alloy_sol_types::private::Address, ) -> alloy_contract::SolCallBuilder<&P, hasApprovedRelayerCall, N> { - self.call_builder( - &hasApprovedRelayerCall { - user, - relayer, - }, - ) + self.call_builder(&hasApprovedRelayerCall { user, relayer }) } + ///Creates a new call builder for the [`manageUserBalance`] function. pub fn manageUserBalance( &self, @@ -7318,6 +7066,7 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ ) -> alloy_contract::SolCallBuilder<&P, manageUserBalanceCall, N> { self.call_builder(&manageUserBalanceCall { ops }) } + ///Creates a new call builder for the [`setRelayerApproval`] function. pub fn setRelayerApproval( &self, @@ -7325,14 +7074,13 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ relayer: alloy_sol_types::private::Address, approved: bool, ) -> alloy_contract::SolCallBuilder<&P, setRelayerApprovalCall, N> { - self.call_builder( - &setRelayerApprovalCall { - sender, - relayer, - approved, - }, - ) + self.call_builder(&setRelayerApprovalCall { + sender, + relayer, + approved, + }) } + ///Creates a new call builder for the [`swap`] function. pub fn swap( &self, @@ -7341,191 +7089,155 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ limit: alloy_sol_types::private::primitives::aliases::U256, deadline: alloy_sol_types::private::primitives::aliases::U256, ) -> alloy_contract::SolCallBuilder<&P, swapCall, N> { - self.call_builder( - &swapCall { - singleSwap, - funds, - limit, - deadline, - }, - ) + self.call_builder(&swapCall { + singleSwap, + funds, + limit, + deadline, + }) } } /// Event filters. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > BalancerV2VaultInstance { - /// Creates a new event filter using this contract instance's provider and address. + impl, N: alloy_contract::private::Network> + BalancerV2VaultInstance + { + /// 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. + /// 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 [`AuthorizerChanged`] event. - pub fn AuthorizerChanged_filter( - &self, - ) -> alloy_contract::Event<&P, AuthorizerChanged, N> { + pub fn AuthorizerChanged_filter(&self) -> alloy_contract::Event<&P, AuthorizerChanged, N> { self.event_filter::() } - ///Creates a new event filter for the [`ExternalBalanceTransfer`] event. + + ///Creates a new event filter for the [`ExternalBalanceTransfer`] + /// event. pub fn ExternalBalanceTransfer_filter( &self, ) -> alloy_contract::Event<&P, ExternalBalanceTransfer, N> { self.event_filter::() } + ///Creates a new event filter for the [`FlashLoan`] event. pub fn FlashLoan_filter(&self) -> alloy_contract::Event<&P, FlashLoan, N> { self.event_filter::() } + ///Creates a new event filter for the [`InternalBalanceChanged`] event. pub fn InternalBalanceChanged_filter( &self, ) -> alloy_contract::Event<&P, InternalBalanceChanged, N> { self.event_filter::() } + ///Creates a new event filter for the [`PausedStateChanged`] event. pub fn PausedStateChanged_filter( &self, ) -> alloy_contract::Event<&P, PausedStateChanged, N> { self.event_filter::() } + ///Creates a new event filter for the [`PoolBalanceChanged`] event. pub fn PoolBalanceChanged_filter( &self, ) -> alloy_contract::Event<&P, PoolBalanceChanged, N> { self.event_filter::() } + ///Creates a new event filter for the [`PoolBalanceManaged`] event. pub fn PoolBalanceManaged_filter( &self, ) -> alloy_contract::Event<&P, PoolBalanceManaged, N> { self.event_filter::() } + ///Creates a new event filter for the [`PoolRegistered`] event. - pub fn PoolRegistered_filter( - &self, - ) -> alloy_contract::Event<&P, PoolRegistered, N> { + pub fn PoolRegistered_filter(&self) -> alloy_contract::Event<&P, PoolRegistered, N> { self.event_filter::() } + ///Creates a new event filter for the [`RelayerApprovalChanged`] event. pub fn RelayerApprovalChanged_filter( &self, ) -> alloy_contract::Event<&P, RelayerApprovalChanged, N> { self.event_filter::() } + ///Creates a new event filter for the [`Swap`] event. pub fn Swap_filter(&self) -> alloy_contract::Event<&P, Swap, N> { self.event_filter::() } + ///Creates a new event filter for the [`TokensDeregistered`] event. pub fn TokensDeregistered_filter( &self, ) -> alloy_contract::Event<&P, TokensDeregistered, N> { self.event_filter::() } + ///Creates a new event filter for the [`TokensRegistered`] event. - pub fn TokensRegistered_filter( - &self, - ) -> alloy_contract::Event<&P, TokensRegistered, N> { + pub fn TokensRegistered_filter(&self) -> alloy_contract::Event<&P, TokensRegistered, N> { self.event_filter::() } } } -pub type Instance = BalancerV2Vault::BalancerV2VaultInstance< - ::alloy_provider::DynProvider, ->; +pub type Instance = BalancerV2Vault::BalancerV2VaultInstance<::alloy_provider::DynProvider>; use { - std::{sync::LazyLock, collections::HashMap}, - anyhow::{Result, Context}, - alloy_primitives::{address, Address}, - alloy_provider::{Provider, DynProvider}, + alloy_primitives::{Address, address}, + alloy_provider::{DynProvider, Provider}, + anyhow::{Context, Result}, + std::{collections::HashMap, sync::LazyLock}, }; pub const fn deployment_info(chain_id: u64) -> Option<(Address, Option)> { match chain_id { - 1u64 => { - Some(( - ::alloy_primitives::address!( - "0xBA12222222228d8Ba445958a75a0704d566BF2C8" - ), - Some(12272146u64), - )) - } - 10u64 => { - Some(( - ::alloy_primitives::address!( - "0xBA12222222228d8Ba445958a75a0704d566BF2C8" - ), - Some(7003431u64), - )) - } - 56u64 => { - Some(( - ::alloy_primitives::address!( - "0xBA12222222228d8Ba445958a75a0704d566BF2C8" - ), - Some(22691002u64), - )) - } - 100u64 => { - Some(( - ::alloy_primitives::address!( - "0xBA12222222228d8Ba445958a75a0704d566BF2C8" - ), - Some(24821598u64), - )) - } - 137u64 => { - Some(( - ::alloy_primitives::address!( - "0xBA12222222228d8Ba445958a75a0704d566BF2C8" - ), - Some(15832990u64), - )) - } - 8453u64 => { - Some(( - ::alloy_primitives::address!( - "0xBA12222222228d8Ba445958a75a0704d566BF2C8" - ), - Some(1196036u64), - )) - } - 42161u64 => { - Some(( - ::alloy_primitives::address!( - "0xBA12222222228d8Ba445958a75a0704d566BF2C8" - ), - Some(222832u64), - )) - } - 43114u64 => { - Some(( - ::alloy_primitives::address!( - "0xBA12222222228d8Ba445958a75a0704d566BF2C8" - ), - Some(26386141u64), - )) - } - 57073u64 => { - Some(( - ::alloy_primitives::address!( - "0xBA12222222228d8Ba445958a75a0704d566BF2C8" - ), - Some(34313901u64), - )) - } - 11155111u64 => { - Some(( - ::alloy_primitives::address!( - "0xBA12222222228d8Ba445958a75a0704d566BF2C8" - ), - Some(3418831u64), - )) - } + 1u64 => Some(( + ::alloy_primitives::address!("0xBA12222222228d8Ba445958a75a0704d566BF2C8"), + Some(12272146u64), + )), + 10u64 => Some(( + ::alloy_primitives::address!("0xBA12222222228d8Ba445958a75a0704d566BF2C8"), + Some(7003431u64), + )), + 56u64 => Some(( + ::alloy_primitives::address!("0xBA12222222228d8Ba445958a75a0704d566BF2C8"), + Some(22691002u64), + )), + 100u64 => Some(( + ::alloy_primitives::address!("0xBA12222222228d8Ba445958a75a0704d566BF2C8"), + Some(24821598u64), + )), + 137u64 => Some(( + ::alloy_primitives::address!("0xBA12222222228d8Ba445958a75a0704d566BF2C8"), + Some(15832990u64), + )), + 8453u64 => Some(( + ::alloy_primitives::address!("0xBA12222222228d8Ba445958a75a0704d566BF2C8"), + Some(1196036u64), + )), + 42161u64 => Some(( + ::alloy_primitives::address!("0xBA12222222228d8Ba445958a75a0704d566BF2C8"), + Some(222832u64), + )), + 43114u64 => Some(( + ::alloy_primitives::address!("0xBA12222222228d8Ba445958a75a0704d566BF2C8"), + Some(26386141u64), + )), + 57073u64 => Some(( + ::alloy_primitives::address!("0xBA12222222228d8Ba445958a75a0704d566BF2C8"), + Some(34313901u64), + )), + 11155111u64 => Some(( + ::alloy_primitives::address!("0xBA12222222228d8Ba445958a75a0704d566BF2C8"), + Some(3418831u64), + )), _ => None, } } @@ -7542,9 +7254,7 @@ pub const fn deployment_block(chain_id: &u64) -> Option { } } impl Instance { - pub fn deployed( - provider: &DynProvider, - ) -> impl Future> + Send { + pub fn deployed(provider: &DynProvider) -> impl Future> + Send { async move { let chain_id = provider .get_chain_id() diff --git a/contracts/generated/contracts-generated/balancerv2weightedpool/src/lib.rs b/contracts/generated/contracts-generated/balancerv2weightedpool/src/lib.rs index 39b4d72ddc..88378b5913 100644 --- a/contracts/generated/contracts-generated/balancerv2weightedpool/src/lib.rs +++ b/contracts/generated/contracts-generated/balancerv2weightedpool/src/lib.rs @@ -1,4 +1,10 @@ -#![allow(unused_imports, unused_attributes, clippy::all, rustdoc::all, non_snake_case)] +#![allow( + unused_imports, + unused_attributes, + clippy::all, + rustdoc::all, + non_snake_case +)] //! Auto-generated contract bindings. Do not edit. /** @@ -466,13 +472,12 @@ interface BalancerV2WeightedPool { clippy::empty_structs_with_brackets )] pub mod BalancerV2WeightedPool { - use super::*; - use alloy_sol_types as alloy_sol_types; + use {super::*, alloy_sol_types}; #[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); -```*/ + ```solidity + event Approval(address indexed owner, address indexed spender, uint256 value); + ```*/ #[allow( non_camel_case_types, non_snake_case, @@ -495,25 +500,26 @@ event Approval(address indexed owner, address indexed spender, uint256 value); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[automatically_derived] impl alloy_sol_types::SolEvent for Approval { + type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; 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; + 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, + ]); + #[allow(unused_variables)] #[inline] fn new( @@ -526,33 +532,39 @@ event Approval(address indexed owner, address indexed spender, uint256 value); 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, - ), - ); + 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), + as alloy_sol_types::SolType>::tokenize( + &self.value, + ), ) } + #[inline] fn topics(&self) -> ::RustType { - (Self::SIGNATURE_HASH.into(), self.owner.clone(), self.spender.clone()) + ( + Self::SIGNATURE_HASH.into(), + self.owner.clone(), + self.spender.clone(), + ) } + #[inline] fn encode_topics_raw( &self, @@ -561,9 +573,7 @@ event Approval(address indexed owner, address indexed spender, uint256 value); if out.len() < ::COUNT { return Err(alloy_sol_types::Error::Overrun); } - out[0usize] = alloy_sol_types::abi::token::WordToken( - Self::SIGNATURE_HASH, - ); + out[0usize] = alloy_sol_types::abi::token::WordToken(Self::SIGNATURE_HASH); out[1usize] = ::encode_topic( &self.owner, ); @@ -578,6 +588,7 @@ event Approval(address indexed owner, address indexed spender, uint256 value); 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) } @@ -592,9 +603,9 @@ event Approval(address indexed owner, address indexed spender, uint256 value); }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Event with signature `PausedStateChanged(bool)` and selector `0x9e3a5e37224532dea67b89face185703738a228a6e8a23dee546960180d3be64`. -```solidity -event PausedStateChanged(bool paused); -```*/ + ```solidity + event PausedStateChanged(bool paused); + ```*/ #[allow( non_camel_case_types, non_snake_case, @@ -613,21 +624,22 @@ event PausedStateChanged(bool paused); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[automatically_derived] impl alloy_sol_types::SolEvent for PausedStateChanged { + type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type DataTuple<'a> = (alloy_sol_types::sol_data::Bool,); - type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type TopicList = (alloy_sol_types::sol_data::FixedBytes<32>,); - const SIGNATURE: &'static str = "PausedStateChanged(bool)"; - const SIGNATURE_HASH: alloy_sol_types::private::B256 = alloy_sol_types::private::B256::new([ - 158u8, 58u8, 94u8, 55u8, 34u8, 69u8, 50u8, 222u8, 166u8, 123u8, 137u8, - 250u8, 206u8, 24u8, 87u8, 3u8, 115u8, 138u8, 34u8, 138u8, 110u8, 138u8, - 35u8, 222u8, 229u8, 70u8, 150u8, 1u8, 128u8, 211u8, 190u8, 100u8, - ]); + const ANONYMOUS: bool = false; + const SIGNATURE: &'static str = "PausedStateChanged(bool)"; + const SIGNATURE_HASH: alloy_sol_types::private::B256 = + alloy_sol_types::private::B256::new([ + 158u8, 58u8, 94u8, 55u8, 34u8, 69u8, 50u8, 222u8, 166u8, 123u8, 137u8, 250u8, + 206u8, 24u8, 87u8, 3u8, 115u8, 138u8, 34u8, 138u8, 110u8, 138u8, 35u8, 222u8, + 229u8, 70u8, 150u8, 1u8, 128u8, 211u8, 190u8, 100u8, + ]); + #[allow(unused_variables)] #[inline] fn new( @@ -636,21 +648,21 @@ event PausedStateChanged(bool paused); ) -> Self { Self { paused: 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, - ), - ); + 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<'_> { ( @@ -659,10 +671,12 @@ event PausedStateChanged(bool paused); ), ) } + #[inline] fn topics(&self) -> ::RustType { (Self::SIGNATURE_HASH.into(),) } + #[inline] fn encode_topics_raw( &self, @@ -671,9 +685,7 @@ event PausedStateChanged(bool paused); if out.len() < ::COUNT { return Err(alloy_sol_types::Error::Overrun); } - out[0usize] = alloy_sol_types::abi::token::WordToken( - Self::SIGNATURE_HASH, - ); + out[0usize] = alloy_sol_types::abi::token::WordToken(Self::SIGNATURE_HASH); Ok(()) } } @@ -682,6 +694,7 @@ event PausedStateChanged(bool 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) } @@ -696,9 +709,9 @@ event PausedStateChanged(bool paused); }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Event with signature `SwapFeePercentageChanged(uint256)` and selector `0xa9ba3ffe0b6c366b81232caab38605a0699ad5398d6cce76f91ee809e322dafc`. -```solidity -event SwapFeePercentageChanged(uint256 swapFeePercentage); -```*/ + ```solidity + event SwapFeePercentageChanged(uint256 swapFeePercentage); + ```*/ #[allow( non_camel_case_types, non_snake_case, @@ -717,56 +730,61 @@ event SwapFeePercentageChanged(uint256 swapFeePercentage); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[automatically_derived] impl alloy_sol_types::SolEvent for SwapFeePercentageChanged { + type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; 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>,); - const SIGNATURE: &'static str = "SwapFeePercentageChanged(uint256)"; - const SIGNATURE_HASH: alloy_sol_types::private::B256 = alloy_sol_types::private::B256::new([ - 169u8, 186u8, 63u8, 254u8, 11u8, 108u8, 54u8, 107u8, 129u8, 35u8, 44u8, - 170u8, 179u8, 134u8, 5u8, 160u8, 105u8, 154u8, 213u8, 57u8, 141u8, 108u8, - 206u8, 118u8, 249u8, 30u8, 232u8, 9u8, 227u8, 34u8, 218u8, 252u8, - ]); + const ANONYMOUS: bool = false; + const SIGNATURE: &'static str = "SwapFeePercentageChanged(uint256)"; + const SIGNATURE_HASH: alloy_sol_types::private::B256 = + alloy_sol_types::private::B256::new([ + 169u8, 186u8, 63u8, 254u8, 11u8, 108u8, 54u8, 107u8, 129u8, 35u8, 44u8, 170u8, + 179u8, 134u8, 5u8, 160u8, 105u8, 154u8, 213u8, 57u8, 141u8, 108u8, 206u8, + 118u8, 249u8, 30u8, 232u8, 9u8, 227u8, 34u8, 218u8, 252u8, + ]); + #[allow(unused_variables)] #[inline] fn new( topics: ::RustType, data: as alloy_sol_types::SolType>::RustType, ) -> Self { - Self { swapFeePercentage: data.0 } + Self { + swapFeePercentage: 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, - ), - ); + 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.swapFeePercentage), + as alloy_sol_types::SolType>::tokenize( + &self.swapFeePercentage, + ), ) } + #[inline] fn topics(&self) -> ::RustType { (Self::SIGNATURE_HASH.into(),) } + #[inline] fn encode_topics_raw( &self, @@ -775,9 +793,7 @@ event SwapFeePercentageChanged(uint256 swapFeePercentage); if out.len() < ::COUNT { return Err(alloy_sol_types::Error::Overrun); } - out[0usize] = alloy_sol_types::abi::token::WordToken( - Self::SIGNATURE_HASH, - ); + out[0usize] = alloy_sol_types::abi::token::WordToken(Self::SIGNATURE_HASH); Ok(()) } } @@ -786,6 +802,7 @@ event SwapFeePercentageChanged(uint256 swapFeePercentage); 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) } @@ -793,18 +810,16 @@ event SwapFeePercentageChanged(uint256 swapFeePercentage); #[automatically_derived] impl From<&SwapFeePercentageChanged> for alloy_sol_types::private::LogData { #[inline] - fn from( - this: &SwapFeePercentageChanged, - ) -> alloy_sol_types::private::LogData { + fn from(this: &SwapFeePercentageChanged) -> alloy_sol_types::private::LogData { alloy_sol_types::SolEvent::encode_log_data(this) } } }; #[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); -```*/ + ```solidity + event Transfer(address indexed from, address indexed to, uint256 value); + ```*/ #[allow( non_camel_case_types, non_snake_case, @@ -827,25 +842,26 @@ event Transfer(address indexed from, address indexed to, uint256 value); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[automatically_derived] impl alloy_sol_types::SolEvent for Transfer { + type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; 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; + 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, + ]); + #[allow(unused_variables)] #[inline] fn new( @@ -858,33 +874,39 @@ event Transfer(address indexed from, address indexed to, uint256 value); 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, - ), - ); + 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), + as alloy_sol_types::SolType>::tokenize( + &self.value, + ), ) } + #[inline] fn topics(&self) -> ::RustType { - (Self::SIGNATURE_HASH.into(), self.from.clone(), self.to.clone()) + ( + Self::SIGNATURE_HASH.into(), + self.from.clone(), + self.to.clone(), + ) } + #[inline] fn encode_topics_raw( &self, @@ -893,9 +915,7 @@ event Transfer(address indexed from, address indexed to, uint256 value); if out.len() < ::COUNT { return Err(alloy_sol_types::Error::Overrun); } - out[0usize] = alloy_sol_types::abi::token::WordToken( - Self::SIGNATURE_HASH, - ); + out[0usize] = alloy_sol_types::abi::token::WordToken(Self::SIGNATURE_HASH); out[1usize] = ::encode_topic( &self.from, ); @@ -910,6 +930,7 @@ event Transfer(address indexed from, address indexed to, uint256 value); 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) } @@ -923,9 +944,9 @@ event Transfer(address indexed from, address indexed to, uint256 value); } }; /**Constructor`. -```solidity -constructor(address vault, string name, string symbol, address[] tokens, uint256[] normalizedWeights, uint256 swapFeePercentage, uint256 pauseWindowDuration, uint256 bufferPeriodDuration, address owner); -```*/ + ```solidity + constructor(address vault, string name, string symbol, address[] tokens, uint256[] normalizedWeights, uint256 swapFeePercentage, uint256 pauseWindowDuration, uint256 bufferPeriodDuration, address owner); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct constructorCall { @@ -938,9 +959,8 @@ constructor(address vault, string name, string symbol, address[] tokens, uint256 #[allow(missing_docs)] pub tokens: alloy_sol_types::private::Vec, #[allow(missing_docs)] - pub normalizedWeights: alloy_sol_types::private::Vec< - alloy_sol_types::private::primitives::aliases::U256, - >, + pub normalizedWeights: + alloy_sol_types::private::Vec, #[allow(missing_docs)] pub swapFeePercentage: alloy_sol_types::private::primitives::aliases::U256, #[allow(missing_docs)] @@ -951,7 +971,7 @@ constructor(address vault, string name, string symbol, address[] tokens, uint256 pub owner: alloy_sol_types::private::Address, } const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -972,9 +992,7 @@ constructor(address vault, string name, string symbol, address[] tokens, uint256 alloy_sol_types::private::String, alloy_sol_types::private::String, alloy_sol_types::private::Vec, - alloy_sol_types::private::Vec< - alloy_sol_types::private::primitives::aliases::U256, - >, + alloy_sol_types::private::Vec, alloy_sol_types::private::primitives::aliases::U256, alloy_sol_types::private::primitives::aliases::U256, alloy_sol_types::private::primitives::aliases::U256, @@ -982,9 +1000,7 @@ constructor(address vault, string name, string symbol, address[] tokens, uint256 ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1039,15 +1055,15 @@ constructor(address vault, string name, string symbol, address[] tokens, uint256 alloy_sol_types::sol_data::Uint<256>, alloy_sol_types::sol_data::Address, ); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + 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<'_> { ( @@ -1084,14 +1100,15 @@ constructor(address vault, string name, string symbol, address[] tokens, uint256 }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `DOMAIN_SEPARATOR()` and selector `0x3644e515`. -```solidity -function DOMAIN_SEPARATOR() external view returns (bytes32); -```*/ + ```solidity + function DOMAIN_SEPARATOR() external view returns (bytes32); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct DOMAIN_SEPARATORCall; #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`DOMAIN_SEPARATOR()`](DOMAIN_SEPARATORCall) function. + ///Container type for the return parameters of the + /// [`DOMAIN_SEPARATOR()`](DOMAIN_SEPARATORCall) function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct DOMAIN_SEPARATORReturn { @@ -1105,7 +1122,7 @@ function DOMAIN_SEPARATOR() external view returns (bytes32); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -1114,9 +1131,7 @@ function DOMAIN_SEPARATOR() external view returns (bytes32); type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1125,16 +1140,14 @@ function DOMAIN_SEPARATOR() external view returns (bytes32); } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From - for UnderlyingRustTuple<'_> { + impl ::core::convert::From for UnderlyingRustTuple<'_> { fn from(value: DOMAIN_SEPARATORCall) -> Self { () } } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From> - for DOMAIN_SEPARATORCall { + impl ::core::convert::From> for DOMAIN_SEPARATORCall { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { Self } @@ -1148,9 +1161,7 @@ function DOMAIN_SEPARATOR() external view returns (bytes32); 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, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1159,16 +1170,14 @@ function DOMAIN_SEPARATOR() external view returns (bytes32); } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From - for UnderlyingRustTuple<'_> { + impl ::core::convert::From for UnderlyingRustTuple<'_> { fn from(value: DOMAIN_SEPARATORReturn) -> Self { (value._0,) } } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From> - for DOMAIN_SEPARATORReturn { + impl ::core::convert::From> for DOMAIN_SEPARATORReturn { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { Self { _0: tuple.0 } } @@ -1177,26 +1186,26 @@ function DOMAIN_SEPARATOR() external view returns (bytes32); #[automatically_derived] impl alloy_sol_types::SolCall for DOMAIN_SEPARATORCall { type Parameters<'a> = (); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = alloy_sol_types::private::FixedBytes<32>; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (alloy_sol_types::sol_data::FixedBytes<32>,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "DOMAIN_SEPARATOR()"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [54u8, 68u8, 229u8, 21u8]; + const SIGNATURE: &'static str = "DOMAIN_SEPARATOR()"; + #[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<'_> { ( @@ -1205,35 +1214,34 @@ function DOMAIN_SEPARATOR() external view returns (bytes32); > 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| { + as alloy_sol_types::SolType>::abi_decode_sequence(data).map( + |r| { let r: DOMAIN_SEPARATORReturn = 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: DOMAIN_SEPARATORReturn = r.into(); - r._0 - }) + 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: DOMAIN_SEPARATORReturn = r.into(); + r._0 + }) } } }; #[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); -```*/ + ```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 { @@ -1243,7 +1251,8 @@ function allowance(address owner, address spender) external view returns (uint25 pub spender: alloy_sol_types::private::Address, } #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`allowance(address,address)`](allowanceCall) function. + ///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 { @@ -1257,7 +1266,7 @@ function allowance(address owner, address spender) external view returns (uint25 clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -1272,9 +1281,7 @@ function allowance(address owner, address spender) external view returns (uint25 ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1304,14 +1311,10 @@ function allowance(address owner, address spender) external view returns (uint25 #[allow(dead_code)] type UnderlyingSolTuple<'a> = (alloy_sol_types::sol_data::Uint<256>,); #[doc(hidden)] - type UnderlyingRustTuple<'a> = ( - alloy_sol_types::private::primitives::aliases::U256, - ); + 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, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1339,22 +1342,21 @@ function allowance(address owner, address spender) external view returns (uint25 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 ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; 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)"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [221u8, 98u8, 237u8, 62u8]; + const SIGNATURE: &'static str = "allowance(address,address)"; + #[inline] fn new<'a>( tuple: as alloy_sol_types::SolType>::RustType, ) -> Self { tuple.into() } + #[inline] fn tokenize(&self) -> Self::Token<'_> { ( @@ -1366,43 +1368,43 @@ function allowance(address owner, address spender) external view returns (uint25 ), ) } + #[inline] fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { ( - as alloy_sol_types::SolType>::tokenize(ret), + 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| { + 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 - }) + 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(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `approve(address,uint256)` and selector `0x095ea7b3`. -```solidity -function approve(address spender, uint256 amount) external returns (bool); -```*/ + ```solidity + function approve(address spender, uint256 amount) external returns (bool); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct approveCall { @@ -1412,7 +1414,8 @@ function approve(address spender, uint256 amount) external returns (bool); pub amount: alloy_sol_types::private::primitives::aliases::U256, } #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`approve(address,uint256)`](approveCall) function. + ///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 { @@ -1426,7 +1429,7 @@ function approve(address spender, uint256 amount) external returns (bool); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -1441,9 +1444,7 @@ function approve(address spender, uint256 amount) external returns (bool); ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1476,9 +1477,7 @@ function approve(address spender, uint256 amount) external returns (bool); type UnderlyingRustTuple<'a> = (bool,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1506,70 +1505,65 @@ function approve(address spender, uint256 amount) external returns (bool); 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 ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; 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)"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [9u8, 94u8, 167u8, 179u8]; + const SIGNATURE: &'static str = "approve(address,uint256)"; + #[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.amount), + as alloy_sol_types::SolType>::tokenize( + &self.amount, + ), ) } + #[inline] fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { - ( - ::tokenize( - ret, - ), - ) + (::tokenize(ret),) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) - .map(|r| { + 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 - }) + 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(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `balanceOf(address)` and selector `0x70a08231`. -```solidity -function balanceOf(address account) external view returns (uint256); -```*/ + ```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 { @@ -1577,7 +1571,8 @@ function balanceOf(address account) external view returns (uint256); pub account: alloy_sol_types::private::Address, } #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`balanceOf(address)`](balanceOfCall) function. + ///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 { @@ -1591,7 +1586,7 @@ function balanceOf(address account) external view returns (uint256); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -1600,9 +1595,7 @@ function balanceOf(address account) external view returns (uint256); type UnderlyingRustTuple<'a> = (alloy_sol_types::private::Address,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1629,14 +1622,10 @@ function balanceOf(address account) external view returns (uint256); #[allow(dead_code)] type UnderlyingSolTuple<'a> = (alloy_sol_types::sol_data::Uint<256>,); #[doc(hidden)] - type UnderlyingRustTuple<'a> = ( - alloy_sol_types::private::primitives::aliases::U256, - ); + 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, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1661,22 +1650,21 @@ function balanceOf(address account) external view returns (uint256); #[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 ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; 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)"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [112u8, 160u8, 130u8, 49u8]; + const SIGNATURE: &'static str = "balanceOf(address)"; + #[inline] fn new<'a>( tuple: as alloy_sol_types::SolType>::RustType, ) -> Self { tuple.into() } + #[inline] fn tokenize(&self) -> Self::Token<'_> { ( @@ -1685,48 +1673,49 @@ function balanceOf(address account) external view returns (uint256); ), ) } + #[inline] fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { ( - as alloy_sol_types::SolType>::tokenize(ret), + 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| { + 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 - }) + 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(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `decimals()` and selector `0x313ce567`. -```solidity -function decimals() external pure returns (uint8); -```*/ + ```solidity + function decimals() external pure returns (uint8); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct decimalsCall; #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`decimals()`](decimalsCall) function. + ///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 { @@ -1740,7 +1729,7 @@ function decimals() external pure returns (uint8); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -1749,9 +1738,7 @@ function decimals() external pure returns (uint8); type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1781,9 +1768,7 @@ function decimals() external pure returns (uint8); type UnderlyingRustTuple<'a> = (u8,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1808,75 +1793,69 @@ function decimals() external pure returns (uint8); #[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 ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; 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()"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [49u8, 60u8, 229u8, 103u8]; + const SIGNATURE: &'static str = "decimals()"; + #[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), - ) + ( 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| { + 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 - }) + 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(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `getNormalizedWeights()` and selector `0xf89f27ed`. -```solidity -function getNormalizedWeights() external view returns (uint256[] memory); -```*/ + ```solidity + function getNormalizedWeights() external view returns (uint256[] memory); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct getNormalizedWeightsCall; #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`getNormalizedWeights()`](getNormalizedWeightsCall) function. + ///Container type for the return parameters of the + /// [`getNormalizedWeights()`](getNormalizedWeightsCall) function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct getNormalizedWeightsReturn { #[allow(missing_docs)] - pub _0: alloy_sol_types::private::Vec< - alloy_sol_types::private::primitives::aliases::U256, - >, + pub _0: alloy_sol_types::private::Vec, } #[allow( non_camel_case_types, @@ -1885,7 +1864,7 @@ function getNormalizedWeights() external view returns (uint256[] memory); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -1894,9 +1873,7 @@ function getNormalizedWeights() external view returns (uint256[] memory); type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1905,16 +1882,14 @@ function getNormalizedWeights() external view returns (uint256[] memory); } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From - for UnderlyingRustTuple<'_> { + impl ::core::convert::From for UnderlyingRustTuple<'_> { fn from(value: getNormalizedWeightsCall) -> Self { () } } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From> - for getNormalizedWeightsCall { + impl ::core::convert::From> for getNormalizedWeightsCall { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { Self } @@ -1923,20 +1898,15 @@ function getNormalizedWeights() external view returns (uint256[] memory); { #[doc(hidden)] #[allow(dead_code)] - type UnderlyingSolTuple<'a> = ( - alloy_sol_types::sol_data::Array>, - ); + type UnderlyingSolTuple<'a> = + (alloy_sol_types::sol_data::Array>,); #[doc(hidden)] type UnderlyingRustTuple<'a> = ( - alloy_sol_types::private::Vec< - alloy_sol_types::private::primitives::aliases::U256, - >, + alloy_sol_types::private::Vec, ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1945,16 +1915,14 @@ function getNormalizedWeights() external view returns (uint256[] memory); } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From - for UnderlyingRustTuple<'_> { + impl ::core::convert::From for UnderlyingRustTuple<'_> { fn from(value: getNormalizedWeightsReturn) -> Self { (value._0,) } } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From> - for getNormalizedWeightsReturn { + impl ::core::convert::From> for getNormalizedWeightsReturn { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { Self { _0: tuple.0 } } @@ -1963,72 +1931,68 @@ function getNormalizedWeights() external view returns (uint256[] memory); #[automatically_derived] impl alloy_sol_types::SolCall for getNormalizedWeightsCall { type Parameters<'a> = (); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; - type Return = alloy_sol_types::private::Vec< - alloy_sol_types::private::primitives::aliases::U256, - >; - type ReturnTuple<'a> = ( - alloy_sol_types::sol_data::Array>, - ); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "getNormalizedWeights()"; + type Return = + alloy_sol_types::private::Vec; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + type ReturnTuple<'a> = + (alloy_sol_types::sol_data::Array>,); + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [248u8, 159u8, 39u8, 237u8]; + const SIGNATURE: &'static str = "getNormalizedWeights()"; + #[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), - ) + (, + > 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| { + as alloy_sol_types::SolType>::abi_decode_sequence(data).map( + |r| { let r: getNormalizedWeightsReturn = 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: getNormalizedWeightsReturn = r.into(); - r._0 - }) + 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: getNormalizedWeightsReturn = r.into(); + r._0 + }) } } }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `getPausedState()` and selector `0x1c0de051`. -```solidity -function getPausedState() external view returns (bool paused, uint256 pauseWindowEndTime, uint256 bufferPeriodEndTime); -```*/ + ```solidity + function getPausedState() external view returns (bool paused, uint256 pauseWindowEndTime, uint256 bufferPeriodEndTime); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct getPausedStateCall; #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`getPausedState()`](getPausedStateCall) function. + ///Container type for the return parameters of the + /// [`getPausedState()`](getPausedStateCall) function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct getPausedStateReturn { @@ -2046,7 +2010,7 @@ function getPausedState() external view returns (bool paused, uint256 pauseWindo clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -2055,9 +2019,7 @@ function getPausedState() external view returns (bool paused, uint256 pauseWindo type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -2095,9 +2057,7 @@ function getPausedState() external view returns (bool paused, uint256 pauseWindo ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -2106,16 +2066,18 @@ function getPausedState() external view returns (bool paused, uint256 pauseWindo } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From - for UnderlyingRustTuple<'_> { + impl ::core::convert::From for UnderlyingRustTuple<'_> { fn from(value: getPausedStateReturn) -> Self { - (value.paused, value.pauseWindowEndTime, value.bufferPeriodEndTime) + ( + value.paused, + value.pauseWindowEndTime, + value.bufferPeriodEndTime, + ) } } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From> - for getPausedStateReturn { + impl ::core::convert::From> for getPausedStateReturn { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { Self { paused: tuple.0, @@ -2133,74 +2095,73 @@ function getPausedState() external view returns (bool paused, uint256 pauseWindo ::tokenize( &self.paused, ), - as alloy_sol_types::SolType>::tokenize(&self.pauseWindowEndTime), - as alloy_sol_types::SolType>::tokenize(&self.bufferPeriodEndTime), + as alloy_sol_types::SolType>::tokenize( + &self.pauseWindowEndTime, + ), + as alloy_sol_types::SolType>::tokenize( + &self.bufferPeriodEndTime, + ), ) } } #[automatically_derived] impl alloy_sol_types::SolCall for getPausedStateCall { type Parameters<'a> = (); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = getPausedStateReturn; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = ( alloy_sol_types::sol_data::Bool, alloy_sol_types::sol_data::Uint<256>, alloy_sol_types::sol_data::Uint<256>, ); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "getPausedState()"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [28u8, 13u8, 224u8, 81u8]; + const SIGNATURE: &'static str = "getPausedState()"; + #[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<'_> { getPausedStateReturn::_tokenize(ret) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) + 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) + 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(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `getPoolId()` and selector `0x38fff2d0`. -```solidity -function getPoolId() external view returns (bytes32); -```*/ + ```solidity + function getPoolId() external view returns (bytes32); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct getPoolIdCall; #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`getPoolId()`](getPoolIdCall) function. + ///Container type for the return parameters of the + /// [`getPoolId()`](getPoolIdCall) function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct getPoolIdReturn { @@ -2214,7 +2175,7 @@ function getPoolId() external view returns (bytes32); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -2223,9 +2184,7 @@ function getPoolId() external view returns (bytes32); type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -2255,9 +2214,7 @@ function getPoolId() external view returns (bytes32); 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, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -2282,26 +2239,26 @@ function getPoolId() external view returns (bytes32); #[automatically_derived] impl alloy_sol_types::SolCall for getPoolIdCall { type Parameters<'a> = (); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = alloy_sol_types::private::FixedBytes<32>; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (alloy_sol_types::sol_data::FixedBytes<32>,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "getPoolId()"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [56u8, 255u8, 242u8, 208u8]; + const SIGNATURE: &'static str = "getPoolId()"; + #[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<'_> { ( @@ -2310,40 +2267,40 @@ function getPoolId() external view returns (bytes32); > 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| { + as alloy_sol_types::SolType>::abi_decode_sequence(data).map( + |r| { let r: getPoolIdReturn = 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: getPoolIdReturn = r.into(); - r._0 - }) + 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: getPoolIdReturn = r.into(); + r._0 + }) } } }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `getSwapFeePercentage()` and selector `0x55c67628`. -```solidity -function getSwapFeePercentage() external view returns (uint256); -```*/ + ```solidity + function getSwapFeePercentage() external view returns (uint256); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct getSwapFeePercentageCall; #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`getSwapFeePercentage()`](getSwapFeePercentageCall) function. + ///Container type for the return parameters of the + /// [`getSwapFeePercentage()`](getSwapFeePercentageCall) function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct getSwapFeePercentageReturn { @@ -2357,7 +2314,7 @@ function getSwapFeePercentage() external view returns (uint256); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -2366,9 +2323,7 @@ function getSwapFeePercentage() external view returns (uint256); type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -2377,16 +2332,14 @@ function getSwapFeePercentage() external view returns (uint256); } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From - for UnderlyingRustTuple<'_> { + impl ::core::convert::From for UnderlyingRustTuple<'_> { fn from(value: getSwapFeePercentageCall) -> Self { () } } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From> - for getSwapFeePercentageCall { + impl ::core::convert::From> for getSwapFeePercentageCall { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { Self } @@ -2397,14 +2350,10 @@ function getSwapFeePercentage() external view returns (uint256); #[allow(dead_code)] type UnderlyingSolTuple<'a> = (alloy_sol_types::sol_data::Uint<256>,); #[doc(hidden)] - type UnderlyingRustTuple<'a> = ( - alloy_sol_types::private::primitives::aliases::U256, - ); + 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, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -2413,16 +2362,14 @@ function getSwapFeePercentage() external view returns (uint256); } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From - for UnderlyingRustTuple<'_> { + impl ::core::convert::From for UnderlyingRustTuple<'_> { fn from(value: getSwapFeePercentageReturn) -> Self { (value._0,) } } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From> - for getSwapFeePercentageReturn { + impl ::core::convert::From> for getSwapFeePercentageReturn { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { Self { _0: tuple.0 } } @@ -2431,68 +2378,68 @@ function getSwapFeePercentage() external view returns (uint256); #[automatically_derived] impl alloy_sol_types::SolCall for getSwapFeePercentageCall { type Parameters<'a> = (); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = alloy_sol_types::private::primitives::aliases::U256; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (alloy_sol_types::sol_data::Uint<256>,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "getSwapFeePercentage()"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [85u8, 198u8, 118u8, 40u8]; - #[inline] + const SIGNATURE: &'static str = "getSwapFeePercentage()"; + + #[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), + 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| { + as alloy_sol_types::SolType>::abi_decode_sequence(data).map( + |r| { let r: getSwapFeePercentageReturn = 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: getSwapFeePercentageReturn = r.into(); - r._0 - }) + 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: getSwapFeePercentageReturn = r.into(); + r._0 + }) } } }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `name()` and selector `0x06fdde03`. -```solidity -function name() external view returns (string memory); -```*/ + ```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(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`name()`](nameCall) function. + ///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 { @@ -2506,7 +2453,7 @@ function name() external view returns (string memory); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -2515,9 +2462,7 @@ function name() external view returns (string memory); type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -2547,9 +2492,7 @@ function name() external view returns (string memory); type UnderlyingRustTuple<'a> = (alloy_sol_types::private::String,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -2574,63 +2517,58 @@ function name() external view returns (string memory); #[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 ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (alloy_sol_types::sol_data::String,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "name()"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [6u8, 253u8, 222u8, 3u8]; + const SIGNATURE: &'static str = "name()"; + #[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, - ), - ) + (::tokenize(ret),) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) - .map(|r| { + 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 - }) + 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(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `nonces(address)` and selector `0x7ecebe00`. -```solidity -function nonces(address owner) external view returns (uint256); -```*/ + ```solidity + function nonces(address owner) external view returns (uint256); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct noncesCall { @@ -2638,7 +2576,8 @@ function nonces(address owner) external view returns (uint256); pub owner: alloy_sol_types::private::Address, } #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`nonces(address)`](noncesCall) function. + ///Container type for the return parameters of the + /// [`nonces(address)`](noncesCall) function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct noncesReturn { @@ -2652,7 +2591,7 @@ function nonces(address owner) external view returns (uint256); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -2661,9 +2600,7 @@ function nonces(address owner) external view returns (uint256); type UnderlyingRustTuple<'a> = (alloy_sol_types::private::Address,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -2690,14 +2627,10 @@ function nonces(address owner) external view returns (uint256); #[allow(dead_code)] type UnderlyingSolTuple<'a> = (alloy_sol_types::sol_data::Uint<256>,); #[doc(hidden)] - type UnderlyingRustTuple<'a> = ( - alloy_sol_types::private::primitives::aliases::U256, - ); + 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, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -2722,22 +2655,21 @@ function nonces(address owner) external view returns (uint256); #[automatically_derived] impl alloy_sol_types::SolCall for noncesCall { 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 ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (alloy_sol_types::sol_data::Uint<256>,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "nonces(address)"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [126u8, 206u8, 190u8, 0u8]; + const SIGNATURE: &'static str = "nonces(address)"; + #[inline] fn new<'a>( tuple: as alloy_sol_types::SolType>::RustType, ) -> Self { tuple.into() } + #[inline] fn tokenize(&self) -> Self::Token<'_> { ( @@ -2746,43 +2678,43 @@ function nonces(address owner) external view returns (uint256); ), ) } + #[inline] fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { ( - as alloy_sol_types::SolType>::tokenize(ret), + 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| { + as alloy_sol_types::SolType>::abi_decode_sequence(data).map( + |r| { let r: noncesReturn = 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: noncesReturn = r.into(); - r._0 - }) + 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: noncesReturn = r.into(); + r._0 + }) } } }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `permit(address,address,uint256,uint256,uint8,bytes32,bytes32)` and selector `0xd505accf`. -```solidity -function permit(address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) external; -```*/ + ```solidity + function permit(address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) external; + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct permitCall { @@ -2801,7 +2733,9 @@ function permit(address owner, address spender, uint256 value, uint256 deadline, #[allow(missing_docs)] pub s: alloy_sol_types::private::FixedBytes<32>, } - ///Container type for the return parameters of the [`permit(address,address,uint256,uint256,uint8,bytes32,bytes32)`](permitCall) function. + ///Container type for the return parameters of the + /// [`permit(address,address,uint256,uint256,uint8,bytes32, + /// bytes32)`](permitCall) function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct permitReturn {} @@ -2812,7 +2746,7 @@ function permit(address owner, address spender, uint256 value, uint256 deadline, clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -2837,9 +2771,7 @@ function permit(address owner, address spender, uint256 value, uint256 deadline, ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -2885,9 +2817,7 @@ function permit(address owner, address spender, uint256 value, uint256 deadline, type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -2910,9 +2840,7 @@ function permit(address owner, address spender, uint256 value, uint256 deadline, } } impl permitReturn { - fn _tokenize( - &self, - ) -> ::ReturnToken<'_> { + fn _tokenize(&self) -> ::ReturnToken<'_> { () } } @@ -2927,22 +2855,22 @@ function permit(address owner, address spender, uint256 value, uint256 deadline, alloy_sol_types::sol_data::FixedBytes<32>, alloy_sol_types::sol_data::FixedBytes<32>, ); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = permitReturn; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "permit(address,address,uint256,uint256,uint8,bytes32,bytes32)"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [213u8, 5u8, 172u8, 207u8]; + const SIGNATURE: &'static str = + "permit(address,address,uint256,uint256,uint8,bytes32,bytes32)"; + #[inline] fn new<'a>( tuple: as alloy_sol_types::SolType>::RustType, ) -> Self { tuple.into() } + #[inline] fn tokenize(&self) -> Self::Token<'_> { ( @@ -2969,38 +2897,38 @@ function permit(address owner, address spender, uint256 value, uint256 deadline, > as alloy_sol_types::SolType>::tokenize(&self.s), ) } + #[inline] fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { permitReturn::_tokenize(ret) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) + 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) + 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(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `symbol()` and selector `0x95d89b41`. -```solidity -function symbol() external view returns (string memory); -```*/ + ```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(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`symbol()`](symbolCall) function. + ///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 { @@ -3014,7 +2942,7 @@ function symbol() external view returns (string memory); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -3023,9 +2951,7 @@ function symbol() external view returns (string memory); type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -3055,9 +2981,7 @@ function symbol() external view returns (string memory); type UnderlyingRustTuple<'a> = (alloy_sol_types::private::String,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -3082,63 +3006,58 @@ function symbol() external view returns (string memory); #[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 ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (alloy_sol_types::sol_data::String,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "symbol()"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [149u8, 216u8, 155u8, 65u8]; + const SIGNATURE: &'static str = "symbol()"; + #[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, - ), - ) + (::tokenize(ret),) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) - .map(|r| { + 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 - }) + 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(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `transfer(address,uint256)` and selector `0xa9059cbb`. -```solidity -function transfer(address recipient, uint256 amount) external returns (bool); -```*/ + ```solidity + function transfer(address recipient, uint256 amount) external returns (bool); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct transferCall { @@ -3148,7 +3067,8 @@ function transfer(address recipient, uint256 amount) external returns (bool); pub amount: alloy_sol_types::private::primitives::aliases::U256, } #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`transfer(address,uint256)`](transferCall) function. + ///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 { @@ -3162,7 +3082,7 @@ function transfer(address recipient, uint256 amount) external returns (bool); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -3177,9 +3097,7 @@ function transfer(address recipient, uint256 amount) external returns (bool); ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -3212,9 +3130,7 @@ function transfer(address recipient, uint256 amount) external returns (bool); type UnderlyingRustTuple<'a> = (bool,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -3242,70 +3158,65 @@ function transfer(address recipient, uint256 amount) external returns (bool); 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 ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; 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)"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [169u8, 5u8, 156u8, 187u8]; + const SIGNATURE: &'static str = "transfer(address,uint256)"; + #[inline] fn new<'a>( tuple: as alloy_sol_types::SolType>::RustType, ) -> Self { tuple.into() } + #[inline] fn tokenize(&self) -> Self::Token<'_> { ( ::tokenize( &self.recipient, ), - as alloy_sol_types::SolType>::tokenize(&self.amount), + as alloy_sol_types::SolType>::tokenize( + &self.amount, + ), ) } + #[inline] fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { - ( - ::tokenize( - ret, - ), - ) + (::tokenize(ret),) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) - .map(|r| { + 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 - }) + 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(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `transferFrom(address,address,uint256)` and selector `0x23b872dd`. -```solidity -function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); -```*/ + ```solidity + function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct transferFromCall { @@ -3317,7 +3228,8 @@ function transferFrom(address sender, address recipient, uint256 amount) externa pub amount: alloy_sol_types::private::primitives::aliases::U256, } #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`transferFrom(address,address,uint256)`](transferFromCall) function. + ///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 { @@ -3331,7 +3243,7 @@ function transferFrom(address sender, address recipient, uint256 amount) externa clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -3348,9 +3260,7 @@ function transferFrom(address sender, address recipient, uint256 amount) externa ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -3384,9 +3294,7 @@ function transferFrom(address sender, address recipient, uint256 amount) externa type UnderlyingRustTuple<'a> = (bool,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -3415,22 +3323,21 @@ function transferFrom(address sender, address recipient, uint256 amount) externa 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 ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; 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)"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [35u8, 184u8, 114u8, 221u8]; + const SIGNATURE: &'static str = "transferFrom(address,address,uint256)"; + #[inline] fn new<'a>( tuple: as alloy_sol_types::SolType>::RustType, ) -> Self { tuple.into() } + #[inline] fn tokenize(&self) -> Self::Token<'_> { ( @@ -3440,46 +3347,41 @@ function transferFrom(address sender, address recipient, uint256 amount) externa ::tokenize( &self.recipient, ), - as alloy_sol_types::SolType>::tokenize(&self.amount), + as alloy_sol_types::SolType>::tokenize( + &self.amount, + ), ) } + #[inline] fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { - ( - ::tokenize( - ret, - ), - ) + (::tokenize(ret),) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) - .map(|r| { + 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 - }) + 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 + }) } } }; ///Container for all the [`BalancerV2WeightedPool`](self) function calls. #[derive(Clone)] - #[derive()] pub enum BalancerV2WeightedPoolCalls { #[allow(missing_docs)] DOMAIN_SEPARATOR(DOMAIN_SEPARATORCall), @@ -3515,8 +3417,9 @@ function transferFrom(address sender, address recipient, uint256 amount) externa impl BalancerV2WeightedPoolCalls { /// 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. + /// 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]] = &[ @@ -3536,24 +3439,6 @@ function transferFrom(address sender, address recipient, uint256 amount) externa [221u8, 98u8, 237u8, 62u8], [248u8, 159u8, 39u8, 237u8], ]; - /// The names of the variants in the same order as `SELECTORS`. - pub const VARIANT_NAMES: &'static [&'static str] = &[ - ::core::stringify!(name), - ::core::stringify!(approve), - ::core::stringify!(getPausedState), - ::core::stringify!(transferFrom), - ::core::stringify!(decimals), - ::core::stringify!(DOMAIN_SEPARATOR), - ::core::stringify!(getPoolId), - ::core::stringify!(getSwapFeePercentage), - ::core::stringify!(balanceOf), - ::core::stringify!(nonces), - ::core::stringify!(symbol), - ::core::stringify!(transfer), - ::core::stringify!(permit), - ::core::stringify!(allowance), - ::core::stringify!(getNormalizedWeights), - ]; /// The signatures in the same order as `SELECTORS`. pub const SIGNATURES: &'static [&'static str] = &[ ::SIGNATURE, @@ -3572,6 +3457,25 @@ function transferFrom(address sender, address recipient, uint256 amount) externa ::SIGNATURE, ::SIGNATURE, ]; + /// The names of the variants in the same order as `SELECTORS`. + pub const VARIANT_NAMES: &'static [&'static str] = &[ + ::core::stringify!(name), + ::core::stringify!(approve), + ::core::stringify!(getPausedState), + ::core::stringify!(transferFrom), + ::core::stringify!(decimals), + ::core::stringify!(DOMAIN_SEPARATOR), + ::core::stringify!(getPoolId), + ::core::stringify!(getSwapFeePercentage), + ::core::stringify!(balanceOf), + ::core::stringify!(nonces), + ::core::stringify!(symbol), + ::core::stringify!(transfer), + ::core::stringify!(permit), + ::core::stringify!(allowance), + ::core::stringify!(getNormalizedWeights), + ]; + /// Returns the signature for the given selector, if known. #[inline] pub fn signature_by_selector( @@ -3584,33 +3488,29 @@ function transferFrom(address sender, address recipient, uint256 amount) externa ::core::result::Result::Err(_) => ::core::option::Option::None, } } + /// Returns the enum variant name for the given selector, if known. #[inline] - pub fn name_by_selector( - selector: [u8; 4usize], - ) -> ::core::option::Option<&'static str> { + pub fn name_by_selector(selector: [u8; 4usize]) -> ::core::option::Option<&'static str> { let sig = Self::signature_by_selector(selector)?; sig.split_once('(').map(|(name, _)| name) } } #[automatically_derived] impl alloy_sol_types::SolInterface for BalancerV2WeightedPoolCalls { - const NAME: &'static str = "BalancerV2WeightedPoolCalls"; - const MIN_DATA_LENGTH: usize = 0usize; const COUNT: usize = 15usize; + const MIN_DATA_LENGTH: usize = 0usize; + const NAME: &'static str = "BalancerV2WeightedPoolCalls"; + #[inline] fn selector(&self) -> [u8; 4] { match self { Self::DOMAIN_SEPARATOR(_) => { ::SELECTOR } - Self::allowance(_) => { - ::SELECTOR - } + Self::allowance(_) => ::SELECTOR, Self::approve(_) => ::SELECTOR, - Self::balanceOf(_) => { - ::SELECTOR - } + Self::balanceOf(_) => ::SELECTOR, Self::decimals(_) => ::SELECTOR, Self::getNormalizedWeights(_) => { ::SELECTOR @@ -3618,9 +3518,7 @@ function transferFrom(address sender, address recipient, uint256 amount) externa Self::getPausedState(_) => { ::SELECTOR } - Self::getPoolId(_) => { - ::SELECTOR - } + Self::getPoolId(_) => ::SELECTOR, Self::getSwapFeePercentage(_) => { ::SELECTOR } @@ -3629,32 +3527,29 @@ function transferFrom(address sender, address recipient, uint256 amount) externa Self::permit(_) => ::SELECTOR, Self::symbol(_) => ::SELECTOR, Self::transfer(_) => ::SELECTOR, - Self::transferFrom(_) => { - ::SELECTOR - } + Self::transferFrom(_) => ::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 { + fn abi_decode_raw(selector: [u8; 4], data: &[u8]) -> alloy_sol_types::Result { static DECODE_SHIMS: &[fn( &[u8], - ) -> alloy_sol_types::Result] = &[ + ) + -> alloy_sol_types::Result] = &[ { - fn name( - data: &[u8], - ) -> alloy_sol_types::Result { + fn name(data: &[u8]) -> alloy_sol_types::Result { ::abi_decode_raw(data) .map(BalancerV2WeightedPoolCalls::name) } @@ -3673,9 +3568,7 @@ function transferFrom(address sender, address recipient, uint256 amount) externa fn getPausedState( data: &[u8], ) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, - ) + ::abi_decode_raw(data) .map(BalancerV2WeightedPoolCalls::getPausedState) } getPausedState @@ -3684,9 +3577,7 @@ function transferFrom(address sender, address recipient, uint256 amount) externa fn transferFrom( data: &[u8], ) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, - ) + ::abi_decode_raw(data) .map(BalancerV2WeightedPoolCalls::transferFrom) } transferFrom @@ -3704,9 +3595,7 @@ function transferFrom(address sender, address recipient, uint256 amount) externa fn DOMAIN_SEPARATOR( data: &[u8], ) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, - ) + ::abi_decode_raw(data) .map(BalancerV2WeightedPoolCalls::DOMAIN_SEPARATOR) } DOMAIN_SEPARATOR @@ -3724,9 +3613,7 @@ function transferFrom(address sender, address recipient, uint256 amount) externa fn getSwapFeePercentage( data: &[u8], ) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, - ) + ::abi_decode_raw(data) .map(BalancerV2WeightedPoolCalls::getSwapFeePercentage) } getSwapFeePercentage @@ -3741,18 +3628,14 @@ function transferFrom(address sender, address recipient, uint256 amount) externa balanceOf }, { - fn nonces( - data: &[u8], - ) -> alloy_sol_types::Result { + fn nonces(data: &[u8]) -> alloy_sol_types::Result { ::abi_decode_raw(data) .map(BalancerV2WeightedPoolCalls::nonces) } nonces }, { - fn symbol( - data: &[u8], - ) -> alloy_sol_types::Result { + fn symbol(data: &[u8]) -> alloy_sol_types::Result { ::abi_decode_raw(data) .map(BalancerV2WeightedPoolCalls::symbol) } @@ -3768,9 +3651,7 @@ function transferFrom(address sender, address recipient, uint256 amount) externa transfer }, { - fn permit( - data: &[u8], - ) -> alloy_sol_types::Result { + fn permit(data: &[u8]) -> alloy_sol_types::Result { ::abi_decode_raw(data) .map(BalancerV2WeightedPoolCalls::permit) } @@ -3789,24 +3670,21 @@ function transferFrom(address sender, address recipient, uint256 amount) externa fn getNormalizedWeights( data: &[u8], ) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, - ) + ::abi_decode_raw(data) .map(BalancerV2WeightedPoolCalls::getNormalizedWeights) } getNormalizedWeights }, ]; let Ok(idx) = Self::SELECTORS.binary_search(&selector) else { - return Err( - alloy_sol_types::Error::unknown_selector( - ::NAME, - selector, - ), - ); + return Err(alloy_sol_types::Error::unknown_selector( + ::NAME, + selector, + )); }; DECODE_SHIMS[idx](data) } + #[inline] #[allow(non_snake_case)] fn abi_decode_raw_validate( @@ -3815,14 +3693,12 @@ function transferFrom(address sender, address recipient, uint256 amount) externa ) -> alloy_sol_types::Result { static DECODE_VALIDATE_SHIMS: &[fn( &[u8], - ) -> alloy_sol_types::Result] = &[ + ) -> alloy_sol_types::Result< + BalancerV2WeightedPoolCalls, + >] = &[ { - fn name( - data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) + fn name(data: &[u8]) -> alloy_sol_types::Result { + ::abi_decode_raw_validate(data) .map(BalancerV2WeightedPoolCalls::name) } name @@ -3831,9 +3707,7 @@ function transferFrom(address sender, address recipient, uint256 amount) externa fn approve( data: &[u8], ) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) + ::abi_decode_raw_validate(data) .map(BalancerV2WeightedPoolCalls::approve) } approve @@ -3843,9 +3717,9 @@ function transferFrom(address sender, address recipient, uint256 amount) externa data: &[u8], ) -> alloy_sol_types::Result { ::abi_decode_raw_validate( - data, - ) - .map(BalancerV2WeightedPoolCalls::getPausedState) + data, + ) + .map(BalancerV2WeightedPoolCalls::getPausedState) } getPausedState }, @@ -3854,9 +3728,9 @@ function transferFrom(address sender, address recipient, uint256 amount) externa data: &[u8], ) -> alloy_sol_types::Result { ::abi_decode_raw_validate( - data, - ) - .map(BalancerV2WeightedPoolCalls::transferFrom) + data, + ) + .map(BalancerV2WeightedPoolCalls::transferFrom) } transferFrom }, @@ -3864,9 +3738,7 @@ function transferFrom(address sender, address recipient, uint256 amount) externa fn decimals( data: &[u8], ) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) + ::abi_decode_raw_validate(data) .map(BalancerV2WeightedPoolCalls::decimals) } decimals @@ -3876,9 +3748,9 @@ function transferFrom(address sender, address recipient, uint256 amount) externa data: &[u8], ) -> alloy_sol_types::Result { ::abi_decode_raw_validate( - data, - ) - .map(BalancerV2WeightedPoolCalls::DOMAIN_SEPARATOR) + data, + ) + .map(BalancerV2WeightedPoolCalls::DOMAIN_SEPARATOR) } DOMAIN_SEPARATOR }, @@ -3886,9 +3758,7 @@ function transferFrom(address sender, address recipient, uint256 amount) externa fn getPoolId( data: &[u8], ) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) + ::abi_decode_raw_validate(data) .map(BalancerV2WeightedPoolCalls::getPoolId) } getPoolId @@ -3908,31 +3778,21 @@ function transferFrom(address sender, address recipient, uint256 amount) externa fn balanceOf( data: &[u8], ) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) + ::abi_decode_raw_validate(data) .map(BalancerV2WeightedPoolCalls::balanceOf) } balanceOf }, { - fn nonces( - data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) + fn nonces(data: &[u8]) -> alloy_sol_types::Result { + ::abi_decode_raw_validate(data) .map(BalancerV2WeightedPoolCalls::nonces) } nonces }, { - fn symbol( - data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) + fn symbol(data: &[u8]) -> alloy_sol_types::Result { + ::abi_decode_raw_validate(data) .map(BalancerV2WeightedPoolCalls::symbol) } symbol @@ -3941,20 +3801,14 @@ function transferFrom(address sender, address recipient, uint256 amount) externa fn transfer( data: &[u8], ) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) + ::abi_decode_raw_validate(data) .map(BalancerV2WeightedPoolCalls::transfer) } transfer }, { - fn permit( - data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) + fn permit(data: &[u8]) -> alloy_sol_types::Result { + ::abi_decode_raw_validate(data) .map(BalancerV2WeightedPoolCalls::permit) } permit @@ -3963,9 +3817,7 @@ function transferFrom(address sender, address recipient, uint256 amount) externa fn allowance( data: &[u8], ) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) + ::abi_decode_raw_validate(data) .map(BalancerV2WeightedPoolCalls::allowance) } allowance @@ -3983,22 +3835,19 @@ function transferFrom(address sender, address recipient, uint256 amount) externa }, ]; let Ok(idx) = Self::SELECTORS.binary_search(&selector) else { - return Err( - alloy_sol_types::Error::unknown_selector( - ::NAME, - selector, - ), - ); + 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::DOMAIN_SEPARATOR(inner) => { - ::abi_encoded_size( - inner, - ) + ::abi_encoded_size(inner) } Self::allowance(inner) => { ::abi_encoded_size(inner) @@ -4013,22 +3862,16 @@ function transferFrom(address sender, address recipient, uint256 amount) externa ::abi_encoded_size(inner) } Self::getNormalizedWeights(inner) => { - ::abi_encoded_size( - inner, - ) + ::abi_encoded_size(inner) } Self::getPausedState(inner) => { - ::abi_encoded_size( - inner, - ) + ::abi_encoded_size(inner) } Self::getPoolId(inner) => { ::abi_encoded_size(inner) } Self::getSwapFeePercentage(inner) => { - ::abi_encoded_size( - inner, - ) + ::abi_encoded_size(inner) } Self::name(inner) => { ::abi_encoded_size(inner) @@ -4046,64 +3889,43 @@ function transferFrom(address sender, address recipient, uint256 amount) externa ::abi_encoded_size(inner) } Self::transferFrom(inner) => { - ::abi_encoded_size( - inner, - ) + ::abi_encoded_size(inner) } } } + #[inline] fn abi_encode_raw(&self, out: &mut alloy_sol_types::private::Vec) { match self { Self::DOMAIN_SEPARATOR(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } Self::allowance(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } Self::approve(inner) => { ::abi_encode_raw(inner, out) } Self::balanceOf(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } Self::decimals(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } Self::getNormalizedWeights(inner) => { ::abi_encode_raw( - inner, - out, + inner, out, ) } Self::getPausedState(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } Self::getPoolId(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } Self::getSwapFeePercentage(inner) => { ::abi_encode_raw( - inner, - out, + inner, out, ) } Self::name(inner) => { @@ -4119,23 +3941,16 @@ function transferFrom(address sender, address recipient, uint256 amount) externa ::abi_encode_raw(inner, out) } Self::transfer(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } Self::transferFrom(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } } } } ///Container for all the [`BalancerV2WeightedPool`](self) events. - #[derive(Clone)] - #[derive(Debug, PartialEq, Eq, Hash)] + #[derive(Clone, Debug, PartialEq, Eq, Hash)] pub enum BalancerV2WeightedPoolEvents { #[allow(missing_docs)] Approval(Approval), @@ -4149,39 +3964,33 @@ function transferFrom(address sender, address recipient, uint256 amount) externa impl BalancerV2WeightedPoolEvents { /// 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. + /// 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]] = &[ [ - 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, + 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, ], [ - 158u8, 58u8, 94u8, 55u8, 34u8, 69u8, 50u8, 222u8, 166u8, 123u8, 137u8, - 250u8, 206u8, 24u8, 87u8, 3u8, 115u8, 138u8, 34u8, 138u8, 110u8, 138u8, - 35u8, 222u8, 229u8, 70u8, 150u8, 1u8, 128u8, 211u8, 190u8, 100u8, + 158u8, 58u8, 94u8, 55u8, 34u8, 69u8, 50u8, 222u8, 166u8, 123u8, 137u8, 250u8, + 206u8, 24u8, 87u8, 3u8, 115u8, 138u8, 34u8, 138u8, 110u8, 138u8, 35u8, 222u8, + 229u8, 70u8, 150u8, 1u8, 128u8, 211u8, 190u8, 100u8, ], [ - 169u8, 186u8, 63u8, 254u8, 11u8, 108u8, 54u8, 107u8, 129u8, 35u8, 44u8, - 170u8, 179u8, 134u8, 5u8, 160u8, 105u8, 154u8, 213u8, 57u8, 141u8, 108u8, - 206u8, 118u8, 249u8, 30u8, 232u8, 9u8, 227u8, 34u8, 218u8, 252u8, + 169u8, 186u8, 63u8, 254u8, 11u8, 108u8, 54u8, 107u8, 129u8, 35u8, 44u8, 170u8, + 179u8, 134u8, 5u8, 160u8, 105u8, 154u8, 213u8, 57u8, 141u8, 108u8, 206u8, 118u8, + 249u8, 30u8, 232u8, 9u8, 227u8, 34u8, 218u8, 252u8, ], [ - 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, + 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, ], ]; - /// The names of the variants in the same order as `SELECTORS`. - pub const VARIANT_NAMES: &'static [&'static str] = &[ - ::core::stringify!(Approval), - ::core::stringify!(PausedStateChanged), - ::core::stringify!(SwapFeePercentageChanged), - ::core::stringify!(Transfer), - ]; /// The signatures in the same order as `SELECTORS`. pub const SIGNATURES: &'static [&'static str] = &[ ::SIGNATURE, @@ -4189,6 +3998,14 @@ function transferFrom(address sender, address recipient, uint256 amount) externa ::SIGNATURE, ::SIGNATURE, ]; + /// The names of the variants in the same order as `SELECTORS`. + pub const VARIANT_NAMES: &'static [&'static str] = &[ + ::core::stringify!(Approval), + ::core::stringify!(PausedStateChanged), + ::core::stringify!(SwapFeePercentageChanged), + ::core::stringify!(Transfer), + ]; + /// Returns the signature for the given selector, if known. #[inline] pub fn signature_by_selector( @@ -4201,19 +4018,19 @@ function transferFrom(address sender, address recipient, uint256 amount) externa ::core::result::Result::Err(_) => ::core::option::Option::None, } } + /// Returns the enum variant name for the given selector, if known. #[inline] - pub fn name_by_selector( - selector: [u8; 32usize], - ) -> ::core::option::Option<&'static str> { + pub fn name_by_selector(selector: [u8; 32usize]) -> ::core::option::Option<&'static str> { let sig = Self::signature_by_selector(selector)?; sig.split_once('(').map(|(name, _)| name) } } #[automatically_derived] impl alloy_sol_types::SolEventInterface for BalancerV2WeightedPoolEvents { - const NAME: &'static str = "BalancerV2WeightedPoolEvents"; const COUNT: usize = 4usize; + const NAME: &'static str = "BalancerV2WeightedPoolEvents"; + fn decode_raw_log( topics: &[alloy_sol_types::Word], data: &[u8], @@ -4223,39 +4040,29 @@ function transferFrom(address sender, address recipient, uint256 amount) externa ::decode_raw_log(topics, data) .map(Self::Approval) } - Some( - ::SIGNATURE_HASH, - ) => { - ::decode_raw_log( - topics, - data, - ) + Some(::SIGNATURE_HASH) => { + ::decode_raw_log(topics, data) .map(Self::PausedStateChanged) } - Some( - ::SIGNATURE_HASH, - ) => { + Some(::SIGNATURE_HASH) => { ::decode_raw_log( - topics, - data, - ) - .map(Self::SwapFeePercentageChanged) + topics, data, + ) + .map(Self::SwapFeePercentageChanged) } Some(::SIGNATURE_HASH) => { ::decode_raw_log(topics, data) .map(Self::Transfer) } - _ => { - 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(), - ), + _ => 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(), ), - }) - } + ), + }), } } } @@ -4263,20 +4070,17 @@ function transferFrom(address sender, address recipient, uint256 amount) externa impl alloy_sol_types::private::IntoLogData for BalancerV2WeightedPoolEvents { 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::Approval(inner) => alloy_sol_types::private::IntoLogData::to_log_data(inner), Self::PausedStateChanged(inner) => { alloy_sol_types::private::IntoLogData::to_log_data(inner) } Self::SwapFeePercentageChanged(inner) => { alloy_sol_types::private::IntoLogData::to_log_data(inner) } - Self::Transfer(inner) => { - alloy_sol_types::private::IntoLogData::to_log_data(inner) - } + Self::Transfer(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) => { @@ -4294,10 +4098,10 @@ function transferFrom(address sender, address recipient, uint256 amount) externa } } } - use alloy_contract as alloy_contract; + use alloy_contract; /**Creates a new wrapper around an on-chain [`BalancerV2WeightedPool`](self) contract instance. -See the [wrapper's documentation](`BalancerV2WeightedPoolInstance`) for more details.*/ + See the [wrapper's documentation](`BalancerV2WeightedPoolInstance`) for more details.*/ #[inline] pub const fn new< P: alloy_contract::private::Provider, @@ -4310,15 +4114,15 @@ See the [wrapper's documentation](`BalancerV2WeightedPoolInstance`) for more det } /**A [`BalancerV2WeightedPool`](self) instance. -Contains type-safe methods for interacting with an on-chain instance of the -[`BalancerV2WeightedPool`](self) contract located at a given `address`, using a given -provider `P`. + Contains type-safe methods for interacting with an on-chain instance of the + [`BalancerV2WeightedPool`](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. + 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.*/ + See the [module-level documentation](self) for all the available methods.*/ #[derive(Clone)] pub struct BalancerV2WeightedPoolInstance { address: alloy_sol_types::private::Address, @@ -4329,43 +4133,45 @@ See the [module-level documentation](self) for all the available methods.*/ impl ::core::fmt::Debug for BalancerV2WeightedPoolInstance { #[inline] fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { - f.debug_tuple("BalancerV2WeightedPoolInstance").field(&self.address).finish() + f.debug_tuple("BalancerV2WeightedPoolInstance") + .field(&self.address) + .finish() } } /// Instantiation and getters/setters. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > BalancerV2WeightedPoolInstance { + impl, N: alloy_contract::private::Network> + BalancerV2WeightedPoolInstance + { /**Creates a new wrapper around an on-chain [`BalancerV2WeightedPool`](self) contract instance. -See the [wrapper's documentation](`BalancerV2WeightedPoolInstance`) for more details.*/ + See the [wrapper's documentation](`BalancerV2WeightedPoolInstance`) for more details.*/ #[inline] - pub const fn new( - address: alloy_sol_types::private::Address, - __provider: P, - ) -> Self { + pub const fn new(address: alloy_sol_types::private::Address, __provider: P) -> Self { Self { address, provider: __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 { @@ -4373,7 +4179,8 @@ See the [wrapper's documentation](`BalancerV2WeightedPoolInstance`) for more det } } impl BalancerV2WeightedPoolInstance<&P, N> { - /// Clones the provider and returns a new instance with the cloned provider. + /// Clones the provider and returns a new instance with the cloned + /// provider. #[inline] pub fn with_cloned_provider(self) -> BalancerV2WeightedPoolInstance { BalancerV2WeightedPoolInstance { @@ -4384,26 +4191,29 @@ See the [wrapper's documentation](`BalancerV2WeightedPoolInstance`) for more det } } /// Function calls. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > BalancerV2WeightedPoolInstance { - /// Creates a new call builder using this contract instance's provider and address. + impl, N: alloy_contract::private::Network> + BalancerV2WeightedPoolInstance + { + /// 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. + /// 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 [`DOMAIN_SEPARATOR`] function. pub fn DOMAIN_SEPARATOR( &self, ) -> alloy_contract::SolCallBuilder<&P, DOMAIN_SEPARATORCall, N> { self.call_builder(&DOMAIN_SEPARATORCall) } + ///Creates a new call builder for the [`allowance`] function. pub fn allowance( &self, @@ -4412,6 +4222,7 @@ See the [wrapper's documentation](`BalancerV2WeightedPoolInstance`) for more det ) -> 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, @@ -4420,6 +4231,7 @@ See the [wrapper's documentation](`BalancerV2WeightedPoolInstance`) for more det ) -> alloy_contract::SolCallBuilder<&P, approveCall, N> { self.call_builder(&approveCall { spender, amount }) } + ///Creates a new call builder for the [`balanceOf`] function. pub fn balanceOf( &self, @@ -4427,36 +4239,43 @@ See the [wrapper's documentation](`BalancerV2WeightedPoolInstance`) for more det ) -> alloy_contract::SolCallBuilder<&P, balanceOfCall, N> { self.call_builder(&balanceOfCall { account }) } + ///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 [`getNormalizedWeights`] function. + + ///Creates a new call builder for the [`getNormalizedWeights`] + /// function. pub fn getNormalizedWeights( &self, ) -> alloy_contract::SolCallBuilder<&P, getNormalizedWeightsCall, N> { self.call_builder(&getNormalizedWeightsCall) } + ///Creates a new call builder for the [`getPausedState`] function. - pub fn getPausedState( - &self, - ) -> alloy_contract::SolCallBuilder<&P, getPausedStateCall, N> { + pub fn getPausedState(&self) -> alloy_contract::SolCallBuilder<&P, getPausedStateCall, N> { self.call_builder(&getPausedStateCall) } + ///Creates a new call builder for the [`getPoolId`] function. pub fn getPoolId(&self) -> alloy_contract::SolCallBuilder<&P, getPoolIdCall, N> { self.call_builder(&getPoolIdCall) } - ///Creates a new call builder for the [`getSwapFeePercentage`] function. + + ///Creates a new call builder for the [`getSwapFeePercentage`] + /// function. pub fn getSwapFeePercentage( &self, ) -> alloy_contract::SolCallBuilder<&P, getSwapFeePercentageCall, N> { self.call_builder(&getSwapFeePercentageCall) } + ///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 [`nonces`] function. pub fn nonces( &self, @@ -4464,6 +4283,7 @@ See the [wrapper's documentation](`BalancerV2WeightedPoolInstance`) for more det ) -> alloy_contract::SolCallBuilder<&P, noncesCall, N> { self.call_builder(&noncesCall { owner }) } + ///Creates a new call builder for the [`permit`] function. pub fn permit( &self, @@ -4475,22 +4295,22 @@ See the [wrapper's documentation](`BalancerV2WeightedPoolInstance`) for more det r: alloy_sol_types::private::FixedBytes<32>, s: alloy_sol_types::private::FixedBytes<32>, ) -> alloy_contract::SolCallBuilder<&P, permitCall, N> { - self.call_builder( - &permitCall { - owner, - spender, - value, - deadline, - v, - r, - s, - }, - ) + self.call_builder(&permitCall { + owner, + spender, + value, + deadline, + v, + r, + s, + }) } + ///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 [`transfer`] function. pub fn transfer( &self, @@ -4499,6 +4319,7 @@ See the [wrapper's documentation](`BalancerV2WeightedPoolInstance`) for more det ) -> alloy_contract::SolCallBuilder<&P, transferCall, N> { self.call_builder(&transferCall { recipient, amount }) } + ///Creates a new call builder for the [`transferFrom`] function. pub fn transferFrom( &self, @@ -4506,51 +4327,54 @@ See the [wrapper's documentation](`BalancerV2WeightedPoolInstance`) for more det recipient: alloy_sol_types::private::Address, amount: alloy_sol_types::private::primitives::aliases::U256, ) -> alloy_contract::SolCallBuilder<&P, transferFromCall, N> { - self.call_builder( - &transferFromCall { - sender, - recipient, - amount, - }, - ) + self.call_builder(&transferFromCall { + sender, + recipient, + amount, + }) } } /// Event filters. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > BalancerV2WeightedPoolInstance { - /// Creates a new event filter using this contract instance's provider and address. + impl, N: alloy_contract::private::Network> + BalancerV2WeightedPoolInstance + { + /// 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. + /// 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 [`PausedStateChanged`] event. pub fn PausedStateChanged_filter( &self, ) -> alloy_contract::Event<&P, PausedStateChanged, N> { self.event_filter::() } - ///Creates a new event filter for the [`SwapFeePercentageChanged`] event. + + ///Creates a new event filter for the [`SwapFeePercentageChanged`] + /// event. pub fn SwapFeePercentageChanged_filter( &self, ) -> alloy_contract::Event<&P, SwapFeePercentageChanged, 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::() } } } -pub type Instance = BalancerV2WeightedPool::BalancerV2WeightedPoolInstance< - ::alloy_provider::DynProvider, ->; +pub type Instance = + BalancerV2WeightedPool::BalancerV2WeightedPoolInstance<::alloy_provider::DynProvider>; diff --git a/contracts/generated/contracts-generated/balancerv2weightedpool2tokensfactory/src/lib.rs b/contracts/generated/contracts-generated/balancerv2weightedpool2tokensfactory/src/lib.rs index 7e055cc7f5..e6f5149677 100644 --- a/contracts/generated/contracts-generated/balancerv2weightedpool2tokensfactory/src/lib.rs +++ b/contracts/generated/contracts-generated/balancerv2weightedpool2tokensfactory/src/lib.rs @@ -1,4 +1,10 @@ -#![allow(unused_imports, unused_attributes, clippy::all, rustdoc::all, non_snake_case)] +#![allow( + unused_imports, + unused_attributes, + clippy::all, + rustdoc::all, + non_snake_case +)] //! Auto-generated contract bindings. Do not edit. /** @@ -99,8 +105,7 @@ interface BalancerV2WeightedPool2TokensFactory { clippy::empty_structs_with_brackets )] pub mod BalancerV2WeightedPool2TokensFactory { - use super::*; - use alloy_sol_types as alloy_sol_types; + use {super::*, alloy_sol_types}; /// The creation / init bytecode of the contract. /// /// ```text @@ -113,9 +118,9 @@ pub mod BalancerV2WeightedPool2TokensFactory { ); #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Event with signature `PoolCreated(address)` and selector `0x83a48fbcfc991335314e74d0496aab6a1987e992ddc85dddbcc4d6dd6ef2e9fc`. -```solidity -event PoolCreated(address indexed pool); -```*/ + ```solidity + event PoolCreated(address indexed pool); + ```*/ #[allow( non_camel_case_types, non_snake_case, @@ -134,25 +139,25 @@ event PoolCreated(address indexed pool); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[automatically_derived] impl alloy_sol_types::SolEvent for PoolCreated { + type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; 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::Address, ); - const SIGNATURE: &'static str = "PoolCreated(address)"; - const SIGNATURE_HASH: alloy_sol_types::private::B256 = alloy_sol_types::private::B256::new([ - 131u8, 164u8, 143u8, 188u8, 252u8, 153u8, 19u8, 53u8, 49u8, 78u8, 116u8, - 208u8, 73u8, 106u8, 171u8, 106u8, 25u8, 135u8, 233u8, 146u8, 221u8, - 200u8, 93u8, 221u8, 188u8, 196u8, 214u8, 221u8, 110u8, 242u8, 233u8, - 252u8, - ]); + const ANONYMOUS: bool = false; + const SIGNATURE: &'static str = "PoolCreated(address)"; + const SIGNATURE_HASH: alloy_sol_types::private::B256 = + alloy_sol_types::private::B256::new([ + 131u8, 164u8, 143u8, 188u8, 252u8, 153u8, 19u8, 53u8, 49u8, 78u8, 116u8, 208u8, + 73u8, 106u8, 171u8, 106u8, 25u8, 135u8, 233u8, 146u8, 221u8, 200u8, 93u8, + 221u8, 188u8, 196u8, 214u8, 221u8, 110u8, 242u8, 233u8, 252u8, + ]); + #[allow(unused_variables)] #[inline] fn new( @@ -161,29 +166,31 @@ event PoolCreated(address indexed pool); ) -> Self { Self { pool: topics.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, - ), - ); + 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.pool.clone()) } + #[inline] fn encode_topics_raw( &self, @@ -192,9 +199,7 @@ event PoolCreated(address indexed pool); if out.len() < ::COUNT { return Err(alloy_sol_types::Error::Overrun); } - out[0usize] = alloy_sol_types::abi::token::WordToken( - Self::SIGNATURE_HASH, - ); + out[0usize] = alloy_sol_types::abi::token::WordToken(Self::SIGNATURE_HASH); out[1usize] = ::encode_topic( &self.pool, ); @@ -206,6 +211,7 @@ event PoolCreated(address indexed pool); 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) } @@ -219,9 +225,9 @@ event PoolCreated(address indexed pool); } }; /**Constructor`. -```solidity -constructor(address vault); -```*/ + ```solidity + constructor(address vault); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct constructorCall { @@ -229,7 +235,7 @@ constructor(address vault); pub vault: alloy_sol_types::private::Address, } const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -238,9 +244,7 @@ constructor(address vault); type UnderlyingRustTuple<'a> = (alloy_sol_types::private::Address,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -265,15 +269,15 @@ constructor(address vault); #[automatically_derived] impl alloy_sol_types::SolConstructor for constructorCall { type Parameters<'a> = (alloy_sol_types::sol_data::Address,); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + 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<'_> { ( @@ -286,9 +290,9 @@ constructor(address vault); }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `create(string,string,address[],uint256[],uint256,bool,address)` and selector `0x1596019b`. -```solidity -function create(string memory name, string memory symbol, address[] memory tokens, uint256[] memory weights, uint256 swapFeePercentage, bool oracleEnabled, address owner) external returns (address); -```*/ + ```solidity + function create(string memory name, string memory symbol, address[] memory tokens, uint256[] memory weights, uint256 swapFeePercentage, bool oracleEnabled, address owner) external returns (address); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct createCall { @@ -299,9 +303,8 @@ function create(string memory name, string memory symbol, address[] memory token #[allow(missing_docs)] pub tokens: alloy_sol_types::private::Vec, #[allow(missing_docs)] - pub weights: alloy_sol_types::private::Vec< - alloy_sol_types::private::primitives::aliases::U256, - >, + pub weights: + alloy_sol_types::private::Vec, #[allow(missing_docs)] pub swapFeePercentage: alloy_sol_types::private::primitives::aliases::U256, #[allow(missing_docs)] @@ -310,7 +313,9 @@ function create(string memory name, string memory symbol, address[] memory token pub owner: alloy_sol_types::private::Address, } #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`create(string,string,address[],uint256[],uint256,bool,address)`](createCall) function. + ///Container type for the return parameters of the + /// [`create(string,string,address[],uint256[],uint256,bool, + /// address)`](createCall) function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct createReturn { @@ -324,7 +329,7 @@ function create(string memory name, string memory symbol, address[] memory token clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -342,18 +347,14 @@ function create(string memory name, string memory symbol, address[] memory token alloy_sol_types::private::String, alloy_sol_types::private::String, alloy_sol_types::private::Vec, - alloy_sol_types::private::Vec< - alloy_sol_types::private::primitives::aliases::U256, - >, + alloy_sol_types::private::Vec, alloy_sol_types::private::primitives::aliases::U256, bool, alloy_sol_types::private::Address, ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -399,9 +400,7 @@ function create(string memory name, string memory symbol, address[] memory token type UnderlyingRustTuple<'a> = (alloy_sol_types::private::Address,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -434,22 +433,22 @@ function create(string memory name, string memory symbol, address[] memory token alloy_sol_types::sol_data::Bool, alloy_sol_types::sol_data::Address, ); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = alloy_sol_types::private::Address; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (alloy_sol_types::sol_data::Address,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "create(string,string,address[],uint256[],uint256,bool,address)"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [21u8, 150u8, 1u8, 155u8]; + const SIGNATURE: &'static str = + "create(string,string,address[],uint256[],uint256,bool,address)"; + #[inline] fn new<'a>( tuple: as alloy_sol_types::SolType>::RustType, ) -> Self { tuple.into() } + #[inline] fn tokenize(&self) -> Self::Token<'_> { ( @@ -476,41 +475,37 @@ function create(string memory name, string memory symbol, address[] memory token ), ) } + #[inline] fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { - ( - ::tokenize( - ret, - ), - ) + (::tokenize(ret),) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) - .map(|r| { + as alloy_sol_types::SolType>::abi_decode_sequence(data).map( + |r| { let r: createReturn = 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: createReturn = r.into(); - r._0 - }) + 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: createReturn = r.into(); + r._0 + }) } } }; - ///Container for all the [`BalancerV2WeightedPool2TokensFactory`](self) function calls. + ///Container for all the [`BalancerV2WeightedPool2TokensFactory`](self) + /// function calls. #[derive(Clone)] - #[derive()] pub enum BalancerV2WeightedPool2TokensFactoryCalls { #[allow(missing_docs)] create(createCall), @@ -518,17 +513,18 @@ function create(string memory name, string memory symbol, address[] memory token impl BalancerV2WeightedPool2TokensFactoryCalls { /// 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. + /// 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]] = &[[21u8, 150u8, 1u8, 155u8]]; + /// The signatures in the same order as `SELECTORS`. + pub const SIGNATURES: &'static [&'static str] = + &[::SIGNATURE]; /// The names of the variants in the same order as `SELECTORS`. pub const VARIANT_NAMES: &'static [&'static str] = &[::core::stringify!(create)]; - /// The signatures in the same order as `SELECTORS`. - pub const SIGNATURES: &'static [&'static str] = &[ - ::SIGNATURE, - ]; + /// Returns the signature for the given selector, if known. #[inline] pub fn signature_by_selector( @@ -541,65 +537,63 @@ function create(string memory name, string memory symbol, address[] memory token ::core::result::Result::Err(_) => ::core::option::Option::None, } } + /// Returns the enum variant name for the given selector, if known. #[inline] - pub fn name_by_selector( - selector: [u8; 4usize], - ) -> ::core::option::Option<&'static str> { + pub fn name_by_selector(selector: [u8; 4usize]) -> ::core::option::Option<&'static str> { let sig = Self::signature_by_selector(selector)?; sig.split_once('(').map(|(name, _)| name) } } #[automatically_derived] impl alloy_sol_types::SolInterface for BalancerV2WeightedPool2TokensFactoryCalls { - const NAME: &'static str = "BalancerV2WeightedPool2TokensFactoryCalls"; - const MIN_DATA_LENGTH: usize = 352usize; const COUNT: usize = 1usize; + const MIN_DATA_LENGTH: usize = 352usize; + const NAME: &'static str = "BalancerV2WeightedPool2TokensFactoryCalls"; + #[inline] fn selector(&self) -> [u8; 4] { match self { Self::create(_) => ::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 { + fn abi_decode_raw(selector: [u8; 4], data: &[u8]) -> alloy_sol_types::Result { static DECODE_SHIMS: &[fn( &[u8], - ) -> alloy_sol_types::Result] = &[ + ) -> alloy_sol_types::Result< + BalancerV2WeightedPool2TokensFactoryCalls, + >] = &[{ + fn create( + data: &[u8], + ) -> alloy_sol_types::Result { - fn create( - data: &[u8], - ) -> alloy_sol_types::Result< - BalancerV2WeightedPool2TokensFactoryCalls, - > { - ::abi_decode_raw(data) - .map(BalancerV2WeightedPool2TokensFactoryCalls::create) - } - create - }, - ]; + ::abi_decode_raw(data) + .map(BalancerV2WeightedPool2TokensFactoryCalls::create) + } + create + }]; let Ok(idx) = Self::SELECTORS.binary_search(&selector) else { - return Err( - alloy_sol_types::Error::unknown_selector( - ::NAME, - selector, - ), - ); + return Err(alloy_sol_types::Error::unknown_selector( + ::NAME, + selector, + )); }; DECODE_SHIMS[idx](data) } + #[inline] #[allow(non_snake_case)] fn abi_decode_raw_validate( @@ -608,31 +602,27 @@ function create(string memory name, string memory symbol, address[] memory token ) -> alloy_sol_types::Result { static DECODE_VALIDATE_SHIMS: &[fn( &[u8], - ) -> alloy_sol_types::Result] = &[ + ) -> alloy_sol_types::Result< + BalancerV2WeightedPool2TokensFactoryCalls, + >] = &[{ + fn create( + data: &[u8], + ) -> alloy_sol_types::Result { - fn create( - data: &[u8], - ) -> alloy_sol_types::Result< - BalancerV2WeightedPool2TokensFactoryCalls, - > { - ::abi_decode_raw_validate( - data, - ) - .map(BalancerV2WeightedPool2TokensFactoryCalls::create) - } - create - }, - ]; + ::abi_decode_raw_validate(data) + .map(BalancerV2WeightedPool2TokensFactoryCalls::create) + } + create + }]; let Ok(idx) = Self::SELECTORS.binary_search(&selector) else { - return Err( - alloy_sol_types::Error::unknown_selector( - ::NAME, - selector, - ), - ); + return Err(alloy_sol_types::Error::unknown_selector( + ::NAME, + selector, + )); }; DECODE_VALIDATE_SHIMS[idx](data) } + #[inline] fn abi_encoded_size(&self) -> usize { match self { @@ -641,6 +631,7 @@ function create(string memory name, string memory symbol, address[] memory token } } } + #[inline] fn abi_encode_raw(&self, out: &mut alloy_sol_types::private::Vec) { match self { @@ -650,9 +641,9 @@ function create(string memory name, string memory symbol, address[] memory token } } } - ///Container for all the [`BalancerV2WeightedPool2TokensFactory`](self) events. - #[derive(Clone)] - #[derive(Debug, PartialEq, Eq, Hash)] + ///Container for all the [`BalancerV2WeightedPool2TokensFactory`](self) + /// events. + #[derive(Clone, Debug, PartialEq, Eq, Hash)] pub enum BalancerV2WeightedPool2TokensFactoryEvents { #[allow(missing_docs)] PoolCreated(PoolCreated), @@ -660,26 +651,22 @@ function create(string memory name, string memory symbol, address[] memory token impl BalancerV2WeightedPool2TokensFactoryEvents { /// 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. + /// 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]] = &[ - [ - 131u8, 164u8, 143u8, 188u8, 252u8, 153u8, 19u8, 53u8, 49u8, 78u8, 116u8, - 208u8, 73u8, 106u8, 171u8, 106u8, 25u8, 135u8, 233u8, 146u8, 221u8, - 200u8, 93u8, 221u8, 188u8, 196u8, 214u8, 221u8, 110u8, 242u8, 233u8, - 252u8, - ], - ]; - /// The names of the variants in the same order as `SELECTORS`. - pub const VARIANT_NAMES: &'static [&'static str] = &[ - ::core::stringify!(PoolCreated), - ]; + pub const SELECTORS: &'static [[u8; 32usize]] = &[[ + 131u8, 164u8, 143u8, 188u8, 252u8, 153u8, 19u8, 53u8, 49u8, 78u8, 116u8, 208u8, 73u8, + 106u8, 171u8, 106u8, 25u8, 135u8, 233u8, 146u8, 221u8, 200u8, 93u8, 221u8, 188u8, + 196u8, 214u8, 221u8, 110u8, 242u8, 233u8, 252u8, + ]]; /// The signatures in the same order as `SELECTORS`. - pub const SIGNATURES: &'static [&'static str] = &[ - ::SIGNATURE, - ]; + pub const SIGNATURES: &'static [&'static str] = + &[::SIGNATURE]; + /// The names of the variants in the same order as `SELECTORS`. + pub const VARIANT_NAMES: &'static [&'static str] = &[::core::stringify!(PoolCreated)]; + /// Returns the signature for the given selector, if known. #[inline] pub fn signature_by_selector( @@ -692,49 +679,42 @@ function create(string memory name, string memory symbol, address[] memory token ::core::result::Result::Err(_) => ::core::option::Option::None, } } + /// Returns the enum variant name for the given selector, if known. #[inline] - pub fn name_by_selector( - selector: [u8; 32usize], - ) -> ::core::option::Option<&'static str> { + pub fn name_by_selector(selector: [u8; 32usize]) -> ::core::option::Option<&'static str> { let sig = Self::signature_by_selector(selector)?; sig.split_once('(').map(|(name, _)| name) } } #[automatically_derived] - impl alloy_sol_types::SolEventInterface - for BalancerV2WeightedPool2TokensFactoryEvents { - const NAME: &'static str = "BalancerV2WeightedPool2TokensFactoryEvents"; + impl alloy_sol_types::SolEventInterface for BalancerV2WeightedPool2TokensFactoryEvents { const COUNT: usize = 1usize; + const NAME: &'static str = "BalancerV2WeightedPool2TokensFactoryEvents"; + 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, - ) + ::decode_raw_log(topics, data) .map(Self::PoolCreated) } - _ => { - 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(), - ), + _ => 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 BalancerV2WeightedPool2TokensFactoryEvents { + impl alloy_sol_types::private::IntoLogData for BalancerV2WeightedPool2TokensFactoryEvents { fn to_log_data(&self) -> alloy_sol_types::private::LogData { match self { Self::PoolCreated(inner) => { @@ -742,6 +722,7 @@ function create(string memory name, string memory symbol, address[] memory token } } } + fn into_log_data(self) -> alloy_sol_types::private::LogData { match self { Self::PoolCreated(inner) => { @@ -750,10 +731,10 @@ function create(string memory name, string memory symbol, address[] memory token } } } - use alloy_contract as alloy_contract; + use alloy_contract; /**Creates a new wrapper around an on-chain [`BalancerV2WeightedPool2TokensFactory`](self) contract instance. -See the [wrapper's documentation](`BalancerV2WeightedPool2TokensFactoryInstance`) for more details.*/ + See the [wrapper's documentation](`BalancerV2WeightedPool2TokensFactoryInstance`) for more details.*/ #[inline] pub const fn new< P: alloy_contract::private::Provider, @@ -766,28 +747,23 @@ See the [wrapper's documentation](`BalancerV2WeightedPool2TokensFactoryInstance` } /**Deploys this contract using the given `provider` and constructor arguments, if any. -Returns a new instance of the contract, if the deployment was successful. + 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.*/ + 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, - >( + pub fn deploy, N: alloy_contract::private::Network>( __provider: P, vault: alloy_sol_types::private::Address, ) -> impl ::core::future::Future< - Output = alloy_contract::Result< - BalancerV2WeightedPool2TokensFactoryInstance, - >, + Output = alloy_contract::Result>, > { BalancerV2WeightedPool2TokensFactoryInstance::::deploy(__provider, vault) } /**Creates a `RawCallBuilder` for deploying this contract using the given `provider` -and constructor arguments, if any. + 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.*/ + 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, @@ -796,22 +772,19 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ __provider: P, vault: alloy_sol_types::private::Address, ) -> alloy_contract::RawCallBuilder { - BalancerV2WeightedPool2TokensFactoryInstance::< - P, - N, - >::deploy_builder(__provider, vault) + BalancerV2WeightedPool2TokensFactoryInstance::::deploy_builder(__provider, vault) } /**A [`BalancerV2WeightedPool2TokensFactory`](self) instance. -Contains type-safe methods for interacting with an on-chain instance of the -[`BalancerV2WeightedPool2TokensFactory`](self) contract located at a given `address`, using a given -provider `P`. + Contains type-safe methods for interacting with an on-chain instance of the + [`BalancerV2WeightedPool2TokensFactory`](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. + 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.*/ + See the [module-level documentation](self) for all the available methods.*/ #[derive(Clone)] pub struct BalancerV2WeightedPool2TokensFactoryInstance< P, @@ -822,8 +795,7 @@ See the [module-level documentation](self) for all the available methods.*/ _network: ::core::marker::PhantomData, } #[automatically_derived] - impl ::core::fmt::Debug - for BalancerV2WeightedPool2TokensFactoryInstance { + impl ::core::fmt::Debug for BalancerV2WeightedPool2TokensFactoryInstance { #[inline] fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { f.debug_tuple("BalancerV2WeightedPool2TokensFactoryInstance") @@ -832,29 +804,26 @@ See the [module-level documentation](self) for all the available methods.*/ } } /// Instantiation and getters/setters. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > BalancerV2WeightedPool2TokensFactoryInstance { + impl, N: alloy_contract::private::Network> + BalancerV2WeightedPool2TokensFactoryInstance + { /**Creates a new wrapper around an on-chain [`BalancerV2WeightedPool2TokensFactory`](self) contract instance. -See the [wrapper's documentation](`BalancerV2WeightedPool2TokensFactoryInstance`) for more details.*/ + See the [wrapper's documentation](`BalancerV2WeightedPool2TokensFactoryInstance`) for more details.*/ #[inline] - pub const fn new( - address: alloy_sol_types::private::Address, - __provider: P, - ) -> Self { + pub const fn new(address: alloy_sol_types::private::Address, __provider: P) -> Self { Self { address, provider: __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. + 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.*/ + For more fine-grained control over the deployment process, use [`deploy_builder`] instead.*/ #[inline] pub async fn deploy( __provider: P, @@ -864,11 +833,12 @@ For more fine-grained control over the deployment process, use [`deploy_builder` 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. + 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.*/ + 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, @@ -878,44 +848,42 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ __provider, [ &BYTECODE[..], - &alloy_sol_types::SolConstructor::abi_encode( - &constructorCall { vault }, - )[..], + &alloy_sol_types::SolConstructor::abi_encode(&constructorCall { vault })[..], ] - .concat() - .into(), + .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< - P: ::core::clone::Clone, - N, - > BalancerV2WeightedPool2TokensFactoryInstance<&P, N> { - /// Clones the provider and returns a new instance with the cloned provider. + impl BalancerV2WeightedPool2TokensFactoryInstance<&P, N> { + /// Clones the provider and returns a new instance with the cloned + /// provider. #[inline] - pub fn with_cloned_provider( - self, - ) -> BalancerV2WeightedPool2TokensFactoryInstance { + pub fn with_cloned_provider(self) -> BalancerV2WeightedPool2TokensFactoryInstance { BalancerV2WeightedPool2TokensFactoryInstance { address: self.address, provider: ::core::clone::Clone::clone(&self.provider), @@ -924,20 +892,22 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ } } /// Function calls. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > BalancerV2WeightedPool2TokensFactoryInstance { - /// Creates a new call builder using this contract instance's provider and address. + impl, N: alloy_contract::private::Network> + BalancerV2WeightedPool2TokensFactoryInstance + { + /// 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. + /// 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 [`create`] function. pub fn create( &self, @@ -951,82 +921,67 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ oracleEnabled: bool, owner: alloy_sol_types::private::Address, ) -> alloy_contract::SolCallBuilder<&P, createCall, N> { - self.call_builder( - &createCall { - name, - symbol, - tokens, - weights, - swapFeePercentage, - oracleEnabled, - owner, - }, - ) + self.call_builder(&createCall { + name, + symbol, + tokens, + weights, + swapFeePercentage, + oracleEnabled, + owner, + }) } } /// Event filters. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > BalancerV2WeightedPool2TokensFactoryInstance { - /// Creates a new event filter using this contract instance's provider and address. + impl, N: alloy_contract::private::Network> + BalancerV2WeightedPool2TokensFactoryInstance + { + /// 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. + /// 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 [`PoolCreated`] event. pub fn PoolCreated_filter(&self) -> alloy_contract::Event<&P, PoolCreated, N> { self.event_filter::() } } } -pub type Instance = BalancerV2WeightedPool2TokensFactory::BalancerV2WeightedPool2TokensFactoryInstance< - ::alloy_provider::DynProvider, ->; +pub type Instance = + BalancerV2WeightedPool2TokensFactory::BalancerV2WeightedPool2TokensFactoryInstance< + ::alloy_provider::DynProvider, + >; use { - std::{sync::LazyLock, collections::HashMap}, - anyhow::{Result, Context}, - alloy_primitives::{address, Address}, - alloy_provider::{Provider, DynProvider}, + alloy_primitives::{Address, address}, + alloy_provider::{DynProvider, Provider}, + anyhow::{Context, Result}, + std::{collections::HashMap, sync::LazyLock}, }; pub const fn deployment_info(chain_id: u64) -> Option<(Address, Option)> { match chain_id { - 1u64 => { - Some(( - ::alloy_primitives::address!( - "0xa5bf2ddf098bb0ef6d120c98217dd6b141c74ee0" - ), - Some(12349891u64), - )) - } - 10u64 => { - Some(( - ::alloy_primitives::address!( - "0xdAE7e32ADc5d490a43cCba1f0c736033F2b4eFca" - ), - Some(7005512u64), - )) - } - 137u64 => { - Some(( - ::alloy_primitives::address!( - "0x8E9aa87E45e92bad84D5F8DD1bff34Fb92637dE9" - ), - Some(15832998u64), - )) - } - 42161u64 => { - Some(( - ::alloy_primitives::address!( - "0xCF0a32Bbef8F064969F21f7e02328FB577382018" - ), - Some(222864u64), - )) - } + 1u64 => Some(( + ::alloy_primitives::address!("0xa5bf2ddf098bb0ef6d120c98217dd6b141c74ee0"), + Some(12349891u64), + )), + 10u64 => Some(( + ::alloy_primitives::address!("0xdAE7e32ADc5d490a43cCba1f0c736033F2b4eFca"), + Some(7005512u64), + )), + 137u64 => Some(( + ::alloy_primitives::address!("0x8E9aa87E45e92bad84D5F8DD1bff34Fb92637dE9"), + Some(15832998u64), + )), + 42161u64 => Some(( + ::alloy_primitives::address!("0xCF0a32Bbef8F064969F21f7e02328FB577382018"), + Some(222864u64), + )), _ => None, } } @@ -1043,9 +998,7 @@ pub const fn deployment_block(chain_id: &u64) -> Option { } } impl Instance { - pub fn deployed( - provider: &DynProvider, - ) -> impl Future> + Send { + pub fn deployed(provider: &DynProvider) -> impl Future> + Send { async move { let chain_id = provider .get_chain_id() diff --git a/contracts/generated/contracts-generated/balancerv2weightedpoolfactory/src/lib.rs b/contracts/generated/contracts-generated/balancerv2weightedpoolfactory/src/lib.rs index 9f228d6f97..d735a11363 100644 --- a/contracts/generated/contracts-generated/balancerv2weightedpoolfactory/src/lib.rs +++ b/contracts/generated/contracts-generated/balancerv2weightedpoolfactory/src/lib.rs @@ -1,4 +1,10 @@ -#![allow(unused_imports, unused_attributes, clippy::all, rustdoc::all, non_snake_case)] +#![allow( + unused_imports, + unused_attributes, + clippy::all, + rustdoc::all, + non_snake_case +)] //! Auto-generated contract bindings. Do not edit. /** @@ -94,8 +100,7 @@ interface BalancerV2WeightedPoolFactory { clippy::empty_structs_with_brackets )] pub mod BalancerV2WeightedPoolFactory { - use super::*; - use alloy_sol_types as alloy_sol_types; + use {super::*, alloy_sol_types}; /// The creation / init bytecode of the contract. /// /// ```text @@ -108,9 +113,9 @@ pub mod BalancerV2WeightedPoolFactory { ); #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Event with signature `PoolCreated(address)` and selector `0x83a48fbcfc991335314e74d0496aab6a1987e992ddc85dddbcc4d6dd6ef2e9fc`. -```solidity -event PoolCreated(address indexed pool); -```*/ + ```solidity + event PoolCreated(address indexed pool); + ```*/ #[allow( non_camel_case_types, non_snake_case, @@ -129,25 +134,25 @@ event PoolCreated(address indexed pool); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[automatically_derived] impl alloy_sol_types::SolEvent for PoolCreated { + type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; 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::Address, ); - const SIGNATURE: &'static str = "PoolCreated(address)"; - const SIGNATURE_HASH: alloy_sol_types::private::B256 = alloy_sol_types::private::B256::new([ - 131u8, 164u8, 143u8, 188u8, 252u8, 153u8, 19u8, 53u8, 49u8, 78u8, 116u8, - 208u8, 73u8, 106u8, 171u8, 106u8, 25u8, 135u8, 233u8, 146u8, 221u8, - 200u8, 93u8, 221u8, 188u8, 196u8, 214u8, 221u8, 110u8, 242u8, 233u8, - 252u8, - ]); + const ANONYMOUS: bool = false; + const SIGNATURE: &'static str = "PoolCreated(address)"; + const SIGNATURE_HASH: alloy_sol_types::private::B256 = + alloy_sol_types::private::B256::new([ + 131u8, 164u8, 143u8, 188u8, 252u8, 153u8, 19u8, 53u8, 49u8, 78u8, 116u8, 208u8, + 73u8, 106u8, 171u8, 106u8, 25u8, 135u8, 233u8, 146u8, 221u8, 200u8, 93u8, + 221u8, 188u8, 196u8, 214u8, 221u8, 110u8, 242u8, 233u8, 252u8, + ]); + #[allow(unused_variables)] #[inline] fn new( @@ -156,29 +161,31 @@ event PoolCreated(address indexed pool); ) -> Self { Self { pool: topics.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, - ), - ); + 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.pool.clone()) } + #[inline] fn encode_topics_raw( &self, @@ -187,9 +194,7 @@ event PoolCreated(address indexed pool); if out.len() < ::COUNT { return Err(alloy_sol_types::Error::Overrun); } - out[0usize] = alloy_sol_types::abi::token::WordToken( - Self::SIGNATURE_HASH, - ); + out[0usize] = alloy_sol_types::abi::token::WordToken(Self::SIGNATURE_HASH); out[1usize] = ::encode_topic( &self.pool, ); @@ -201,6 +206,7 @@ event PoolCreated(address indexed pool); 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) } @@ -214,9 +220,9 @@ event PoolCreated(address indexed pool); } }; /**Constructor`. -```solidity -constructor(address vault); -```*/ + ```solidity + constructor(address vault); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct constructorCall { @@ -224,7 +230,7 @@ constructor(address vault); pub vault: alloy_sol_types::private::Address, } const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -233,9 +239,7 @@ constructor(address vault); type UnderlyingRustTuple<'a> = (alloy_sol_types::private::Address,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -260,15 +264,15 @@ constructor(address vault); #[automatically_derived] impl alloy_sol_types::SolConstructor for constructorCall { type Parameters<'a> = (alloy_sol_types::sol_data::Address,); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + 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<'_> { ( @@ -281,9 +285,9 @@ constructor(address vault); }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `create(string,string,address[],uint256[],uint256,address)` and selector `0xfbce0393`. -```solidity -function create(string memory name, string memory symbol, address[] memory tokens, uint256[] memory weights, uint256 swapFeePercentage, address owner) external returns (address); -```*/ + ```solidity + function create(string memory name, string memory symbol, address[] memory tokens, uint256[] memory weights, uint256 swapFeePercentage, address owner) external returns (address); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct createCall { @@ -294,16 +298,17 @@ function create(string memory name, string memory symbol, address[] memory token #[allow(missing_docs)] pub tokens: alloy_sol_types::private::Vec, #[allow(missing_docs)] - pub weights: alloy_sol_types::private::Vec< - alloy_sol_types::private::primitives::aliases::U256, - >, + pub weights: + alloy_sol_types::private::Vec, #[allow(missing_docs)] pub swapFeePercentage: alloy_sol_types::private::primitives::aliases::U256, #[allow(missing_docs)] pub owner: alloy_sol_types::private::Address, } #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`create(string,string,address[],uint256[],uint256,address)`](createCall) function. + ///Container type for the return parameters of the + /// [`create(string,string,address[],uint256[],uint256, + /// address)`](createCall) function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct createReturn { @@ -317,7 +322,7 @@ function create(string memory name, string memory symbol, address[] memory token clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -334,17 +339,13 @@ function create(string memory name, string memory symbol, address[] memory token alloy_sol_types::private::String, alloy_sol_types::private::String, alloy_sol_types::private::Vec, - alloy_sol_types::private::Vec< - alloy_sol_types::private::primitives::aliases::U256, - >, + alloy_sol_types::private::Vec, 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, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -388,9 +389,7 @@ function create(string memory name, string memory symbol, address[] memory token type UnderlyingRustTuple<'a> = (alloy_sol_types::private::Address,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -422,22 +421,22 @@ function create(string memory name, string memory symbol, address[] memory token 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::Address; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (alloy_sol_types::sol_data::Address,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "create(string,string,address[],uint256[],uint256,address)"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [251u8, 206u8, 3u8, 147u8]; + const SIGNATURE: &'static str = + "create(string,string,address[],uint256[],uint256,address)"; + #[inline] fn new<'a>( tuple: as alloy_sol_types::SolType>::RustType, ) -> Self { tuple.into() } + #[inline] fn tokenize(&self) -> Self::Token<'_> { ( @@ -461,41 +460,37 @@ function create(string memory name, string memory symbol, address[] memory token ), ) } + #[inline] fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { - ( - ::tokenize( - ret, - ), - ) + (::tokenize(ret),) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) - .map(|r| { + as alloy_sol_types::SolType>::abi_decode_sequence(data).map( + |r| { let r: createReturn = 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: createReturn = r.into(); - r._0 - }) + 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: createReturn = r.into(); + r._0 + }) } } }; - ///Container for all the [`BalancerV2WeightedPoolFactory`](self) function calls. + ///Container for all the [`BalancerV2WeightedPoolFactory`](self) function + /// calls. #[derive(Clone)] - #[derive()] pub enum BalancerV2WeightedPoolFactoryCalls { #[allow(missing_docs)] create(createCall), @@ -503,17 +498,18 @@ function create(string memory name, string memory symbol, address[] memory token impl BalancerV2WeightedPoolFactoryCalls { /// 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. + /// 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]] = &[[251u8, 206u8, 3u8, 147u8]]; + /// The signatures in the same order as `SELECTORS`. + pub const SIGNATURES: &'static [&'static str] = + &[::SIGNATURE]; /// The names of the variants in the same order as `SELECTORS`. pub const VARIANT_NAMES: &'static [&'static str] = &[::core::stringify!(create)]; - /// The signatures in the same order as `SELECTORS`. - pub const SIGNATURES: &'static [&'static str] = &[ - ::SIGNATURE, - ]; + /// Returns the signature for the given selector, if known. #[inline] pub fn signature_by_selector( @@ -526,63 +522,62 @@ function create(string memory name, string memory symbol, address[] memory token ::core::result::Result::Err(_) => ::core::option::Option::None, } } + /// Returns the enum variant name for the given selector, if known. #[inline] - pub fn name_by_selector( - selector: [u8; 4usize], - ) -> ::core::option::Option<&'static str> { + pub fn name_by_selector(selector: [u8; 4usize]) -> ::core::option::Option<&'static str> { let sig = Self::signature_by_selector(selector)?; sig.split_once('(').map(|(name, _)| name) } } #[automatically_derived] impl alloy_sol_types::SolInterface for BalancerV2WeightedPoolFactoryCalls { - const NAME: &'static str = "BalancerV2WeightedPoolFactoryCalls"; - const MIN_DATA_LENGTH: usize = 320usize; const COUNT: usize = 1usize; + const MIN_DATA_LENGTH: usize = 320usize; + const NAME: &'static str = "BalancerV2WeightedPoolFactoryCalls"; + #[inline] fn selector(&self) -> [u8; 4] { match self { Self::create(_) => ::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 { + fn abi_decode_raw(selector: [u8; 4], data: &[u8]) -> alloy_sol_types::Result { static DECODE_SHIMS: &[fn( &[u8], - ) -> alloy_sol_types::Result] = &[ - { - fn create( - data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw(data) - .map(BalancerV2WeightedPoolFactoryCalls::create) - } - create - }, - ]; + ) -> alloy_sol_types::Result< + BalancerV2WeightedPoolFactoryCalls, + >] = &[{ + fn create( + data: &[u8], + ) -> alloy_sol_types::Result { + ::abi_decode_raw(data) + .map(BalancerV2WeightedPoolFactoryCalls::create) + } + create + }]; let Ok(idx) = Self::SELECTORS.binary_search(&selector) else { - return Err( - alloy_sol_types::Error::unknown_selector( - ::NAME, - selector, - ), - ); + return Err(alloy_sol_types::Error::unknown_selector( + ::NAME, + selector, + )); }; DECODE_SHIMS[idx](data) } + #[inline] #[allow(non_snake_case)] fn abi_decode_raw_validate( @@ -591,29 +586,26 @@ function create(string memory name, string memory symbol, address[] memory token ) -> alloy_sol_types::Result { static DECODE_VALIDATE_SHIMS: &[fn( &[u8], - ) -> alloy_sol_types::Result] = &[ - { - fn create( - data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) - .map(BalancerV2WeightedPoolFactoryCalls::create) - } - create - }, - ]; + ) -> alloy_sol_types::Result< + BalancerV2WeightedPoolFactoryCalls, + >] = &[{ + fn create( + data: &[u8], + ) -> alloy_sol_types::Result { + ::abi_decode_raw_validate(data) + .map(BalancerV2WeightedPoolFactoryCalls::create) + } + create + }]; let Ok(idx) = Self::SELECTORS.binary_search(&selector) else { - return Err( - alloy_sol_types::Error::unknown_selector( - ::NAME, - selector, - ), - ); + return Err(alloy_sol_types::Error::unknown_selector( + ::NAME, + selector, + )); }; DECODE_VALIDATE_SHIMS[idx](data) } + #[inline] fn abi_encoded_size(&self) -> usize { match self { @@ -622,6 +614,7 @@ function create(string memory name, string memory symbol, address[] memory token } } } + #[inline] fn abi_encode_raw(&self, out: &mut alloy_sol_types::private::Vec) { match self { @@ -632,8 +625,7 @@ function create(string memory name, string memory symbol, address[] memory token } } ///Container for all the [`BalancerV2WeightedPoolFactory`](self) events. - #[derive(Clone)] - #[derive(Debug, PartialEq, Eq, Hash)] + #[derive(Clone, Debug, PartialEq, Eq, Hash)] pub enum BalancerV2WeightedPoolFactoryEvents { #[allow(missing_docs)] PoolCreated(PoolCreated), @@ -641,26 +633,22 @@ function create(string memory name, string memory symbol, address[] memory token impl BalancerV2WeightedPoolFactoryEvents { /// 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. + /// 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]] = &[ - [ - 131u8, 164u8, 143u8, 188u8, 252u8, 153u8, 19u8, 53u8, 49u8, 78u8, 116u8, - 208u8, 73u8, 106u8, 171u8, 106u8, 25u8, 135u8, 233u8, 146u8, 221u8, - 200u8, 93u8, 221u8, 188u8, 196u8, 214u8, 221u8, 110u8, 242u8, 233u8, - 252u8, - ], - ]; - /// The names of the variants in the same order as `SELECTORS`. - pub const VARIANT_NAMES: &'static [&'static str] = &[ - ::core::stringify!(PoolCreated), - ]; + pub const SELECTORS: &'static [[u8; 32usize]] = &[[ + 131u8, 164u8, 143u8, 188u8, 252u8, 153u8, 19u8, 53u8, 49u8, 78u8, 116u8, 208u8, 73u8, + 106u8, 171u8, 106u8, 25u8, 135u8, 233u8, 146u8, 221u8, 200u8, 93u8, 221u8, 188u8, + 196u8, 214u8, 221u8, 110u8, 242u8, 233u8, 252u8, + ]]; /// The signatures in the same order as `SELECTORS`. - pub const SIGNATURES: &'static [&'static str] = &[ - ::SIGNATURE, - ]; + pub const SIGNATURES: &'static [&'static str] = + &[::SIGNATURE]; + /// The names of the variants in the same order as `SELECTORS`. + pub const VARIANT_NAMES: &'static [&'static str] = &[::core::stringify!(PoolCreated)]; + /// Returns the signature for the given selector, if known. #[inline] pub fn signature_by_selector( @@ -673,42 +661,37 @@ function create(string memory name, string memory symbol, address[] memory token ::core::result::Result::Err(_) => ::core::option::Option::None, } } + /// Returns the enum variant name for the given selector, if known. #[inline] - pub fn name_by_selector( - selector: [u8; 32usize], - ) -> ::core::option::Option<&'static str> { + pub fn name_by_selector(selector: [u8; 32usize]) -> ::core::option::Option<&'static str> { let sig = Self::signature_by_selector(selector)?; sig.split_once('(').map(|(name, _)| name) } } #[automatically_derived] impl alloy_sol_types::SolEventInterface for BalancerV2WeightedPoolFactoryEvents { - const NAME: &'static str = "BalancerV2WeightedPoolFactoryEvents"; const COUNT: usize = 1usize; + const NAME: &'static str = "BalancerV2WeightedPoolFactoryEvents"; + 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, - ) + ::decode_raw_log(topics, data) .map(Self::PoolCreated) } - _ => { - 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(), - ), + _ => 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(), ), - }) - } + ), + }), } } } @@ -721,6 +704,7 @@ function create(string memory name, string memory symbol, address[] memory token } } } + fn into_log_data(self) -> alloy_sol_types::private::LogData { match self { Self::PoolCreated(inner) => { @@ -729,10 +713,10 @@ function create(string memory name, string memory symbol, address[] memory token } } } - use alloy_contract as alloy_contract; + use alloy_contract; /**Creates a new wrapper around an on-chain [`BalancerV2WeightedPoolFactory`](self) contract instance. -See the [wrapper's documentation](`BalancerV2WeightedPoolFactoryInstance`) for more details.*/ + See the [wrapper's documentation](`BalancerV2WeightedPoolFactoryInstance`) for more details.*/ #[inline] pub const fn new< P: alloy_contract::private::Provider, @@ -745,14 +729,11 @@ See the [wrapper's documentation](`BalancerV2WeightedPoolFactoryInstance`) for m } /**Deploys this contract using the given `provider` and constructor arguments, if any. -Returns a new instance of the contract, if the deployment was successful. + 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.*/ + 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, - >( + pub fn deploy, N: alloy_contract::private::Network>( __provider: P, vault: alloy_sol_types::private::Address, ) -> impl ::core::future::Future< @@ -761,10 +742,10 @@ For more fine-grained control over the deployment process, use [`deploy_builder` BalancerV2WeightedPoolFactoryInstance::::deploy(__provider, vault) } /**Creates a `RawCallBuilder` for deploying this contract using the given `provider` -and constructor arguments, if any. + 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.*/ + 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, @@ -777,20 +758,17 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ } /**A [`BalancerV2WeightedPoolFactory`](self) instance. -Contains type-safe methods for interacting with an on-chain instance of the -[`BalancerV2WeightedPoolFactory`](self) contract located at a given `address`, using a given -provider `P`. + Contains type-safe methods for interacting with an on-chain instance of the + [`BalancerV2WeightedPoolFactory`](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. + 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.*/ + See the [module-level documentation](self) for all the available methods.*/ #[derive(Clone)] - pub struct BalancerV2WeightedPoolFactoryInstance< - P, - N = alloy_contract::private::Ethereum, - > { + pub struct BalancerV2WeightedPoolFactoryInstance { address: alloy_sol_types::private::Address, provider: P, _network: ::core::marker::PhantomData, @@ -805,29 +783,26 @@ See the [module-level documentation](self) for all the available methods.*/ } } /// Instantiation and getters/setters. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > BalancerV2WeightedPoolFactoryInstance { + impl, N: alloy_contract::private::Network> + BalancerV2WeightedPoolFactoryInstance + { /**Creates a new wrapper around an on-chain [`BalancerV2WeightedPoolFactory`](self) contract instance. -See the [wrapper's documentation](`BalancerV2WeightedPoolFactoryInstance`) for more details.*/ + See the [wrapper's documentation](`BalancerV2WeightedPoolFactoryInstance`) for more details.*/ #[inline] - pub const fn new( - address: alloy_sol_types::private::Address, - __provider: P, - ) -> Self { + pub const fn new(address: alloy_sol_types::private::Address, __provider: P) -> Self { Self { address, provider: __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. + 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.*/ + For more fine-grained control over the deployment process, use [`deploy_builder`] instead.*/ #[inline] pub async fn deploy( __provider: P, @@ -837,11 +812,12 @@ For more fine-grained control over the deployment process, use [`deploy_builder` 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. + 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.*/ + 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, @@ -851,29 +827,31 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ __provider, [ &BYTECODE[..], - &alloy_sol_types::SolConstructor::abi_encode( - &constructorCall { vault }, - )[..], + &alloy_sol_types::SolConstructor::abi_encode(&constructorCall { vault })[..], ] - .concat() - .into(), + .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 { @@ -881,11 +859,10 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ } } impl BalancerV2WeightedPoolFactoryInstance<&P, N> { - /// Clones the provider and returns a new instance with the cloned provider. + /// Clones the provider and returns a new instance with the cloned + /// provider. #[inline] - pub fn with_cloned_provider( - self, - ) -> BalancerV2WeightedPoolFactoryInstance { + pub fn with_cloned_provider(self) -> BalancerV2WeightedPoolFactoryInstance { BalancerV2WeightedPoolFactoryInstance { address: self.address, provider: ::core::clone::Clone::clone(&self.provider), @@ -894,20 +871,22 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ } } /// Function calls. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > BalancerV2WeightedPoolFactoryInstance { - /// Creates a new call builder using this contract instance's provider and address. + impl, N: alloy_contract::private::Network> + BalancerV2WeightedPoolFactoryInstance + { + /// 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. + /// 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 [`create`] function. pub fn create( &self, @@ -920,32 +899,32 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ swapFeePercentage: alloy_sol_types::private::primitives::aliases::U256, owner: alloy_sol_types::private::Address, ) -> alloy_contract::SolCallBuilder<&P, createCall, N> { - self.call_builder( - &createCall { - name, - symbol, - tokens, - weights, - swapFeePercentage, - owner, - }, - ) + self.call_builder(&createCall { + name, + symbol, + tokens, + weights, + swapFeePercentage, + owner, + }) } } /// Event filters. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > BalancerV2WeightedPoolFactoryInstance { - /// Creates a new event filter using this contract instance's provider and address. + impl, N: alloy_contract::private::Network> + BalancerV2WeightedPoolFactoryInstance + { + /// 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. + /// 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 [`PoolCreated`] event. pub fn PoolCreated_filter(&self) -> alloy_contract::Event<&P, PoolCreated, N> { self.event_filter::() @@ -956,21 +935,17 @@ pub type Instance = BalancerV2WeightedPoolFactory::BalancerV2WeightedPoolFactory ::alloy_provider::DynProvider, >; use { - std::{sync::LazyLock, collections::HashMap}, - anyhow::{Result, Context}, - alloy_primitives::{address, Address}, - alloy_provider::{Provider, DynProvider}, + alloy_primitives::{Address, address}, + alloy_provider::{DynProvider, Provider}, + anyhow::{Context, Result}, + std::{collections::HashMap, sync::LazyLock}, }; pub const fn deployment_info(chain_id: u64) -> Option<(Address, Option)> { match chain_id { - 1u64 => { - Some(( - ::alloy_primitives::address!( - "0x8E9aa87E45e92bad84D5F8DD1bff34Fb92637dE9" - ), - Some(12272147u64), - )) - } + 1u64 => Some(( + ::alloy_primitives::address!("0x8E9aa87E45e92bad84D5F8DD1bff34Fb92637dE9"), + Some(12272147u64), + )), _ => None, } } @@ -987,9 +962,7 @@ pub const fn deployment_block(chain_id: &u64) -> Option { } } impl Instance { - pub fn deployed( - provider: &DynProvider, - ) -> impl Future> + Send { + pub fn deployed(provider: &DynProvider) -> impl Future> + Send { async move { let chain_id = provider .get_chain_id() diff --git a/contracts/generated/contracts-generated/balancerv2weightedpoolfactoryv3/src/lib.rs b/contracts/generated/contracts-generated/balancerv2weightedpoolfactoryv3/src/lib.rs index e2dd0dbbd7..ed8832987d 100644 --- a/contracts/generated/contracts-generated/balancerv2weightedpoolfactoryv3/src/lib.rs +++ b/contracts/generated/contracts-generated/balancerv2weightedpoolfactoryv3/src/lib.rs @@ -1,4 +1,10 @@ -#![allow(unused_imports, unused_attributes, clippy::all, rustdoc::all, non_snake_case)] +#![allow( + unused_imports, + unused_attributes, + clippy::all, + rustdoc::all, + non_snake_case +)] //! Auto-generated contract bindings. Do not edit. /** @@ -143,13 +149,12 @@ interface BalancerV2WeightedPoolFactoryV3 { clippy::empty_structs_with_brackets )] pub mod BalancerV2WeightedPoolFactoryV3 { - use super::*; - use alloy_sol_types as alloy_sol_types; + use {super::*, alloy_sol_types}; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Event with signature `FactoryDisabled()` and selector `0x432acbfd662dbb5d8b378384a67159b47ca9d0f1b79f97cf64cf8585fa362d50`. -```solidity -event FactoryDisabled(); -```*/ + ```solidity + event FactoryDisabled(); + ```*/ #[allow( non_camel_case_types, non_snake_case, @@ -165,21 +170,22 @@ event FactoryDisabled(); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[automatically_derived] impl alloy_sol_types::SolEvent for FactoryDisabled { + type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type DataTuple<'a> = (); - type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type TopicList = (alloy_sol_types::sol_data::FixedBytes<32>,); - const SIGNATURE: &'static str = "FactoryDisabled()"; - const SIGNATURE_HASH: alloy_sol_types::private::B256 = alloy_sol_types::private::B256::new([ - 67u8, 42u8, 203u8, 253u8, 102u8, 45u8, 187u8, 93u8, 139u8, 55u8, 131u8, - 132u8, 166u8, 113u8, 89u8, 180u8, 124u8, 169u8, 208u8, 241u8, 183u8, - 159u8, 151u8, 207u8, 100u8, 207u8, 133u8, 133u8, 250u8, 54u8, 45u8, 80u8, - ]); + const ANONYMOUS: bool = false; + const SIGNATURE: &'static str = "FactoryDisabled()"; + const SIGNATURE_HASH: alloy_sol_types::private::B256 = + alloy_sol_types::private::B256::new([ + 67u8, 42u8, 203u8, 253u8, 102u8, 45u8, 187u8, 93u8, 139u8, 55u8, 131u8, 132u8, + 166u8, 113u8, 89u8, 180u8, 124u8, 169u8, 208u8, 241u8, 183u8, 159u8, 151u8, + 207u8, 100u8, 207u8, 133u8, 133u8, 250u8, 54u8, 45u8, 80u8, + ]); + #[allow(unused_variables)] #[inline] fn new( @@ -188,29 +194,31 @@ event FactoryDisabled(); ) -> Self { Self {} } + #[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, - ), - ); + 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(),) } + #[inline] fn encode_topics_raw( &self, @@ -219,9 +227,7 @@ event FactoryDisabled(); if out.len() < ::COUNT { return Err(alloy_sol_types::Error::Overrun); } - out[0usize] = alloy_sol_types::abi::token::WordToken( - Self::SIGNATURE_HASH, - ); + out[0usize] = alloy_sol_types::abi::token::WordToken(Self::SIGNATURE_HASH); Ok(()) } } @@ -230,6 +236,7 @@ event FactoryDisabled(); 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) } @@ -244,9 +251,9 @@ event FactoryDisabled(); }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Event with signature `PoolCreated(address)` and selector `0x83a48fbcfc991335314e74d0496aab6a1987e992ddc85dddbcc4d6dd6ef2e9fc`. -```solidity -event PoolCreated(address indexed pool); -```*/ + ```solidity + event PoolCreated(address indexed pool); + ```*/ #[allow( non_camel_case_types, non_snake_case, @@ -265,25 +272,25 @@ event PoolCreated(address indexed pool); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[automatically_derived] impl alloy_sol_types::SolEvent for PoolCreated { + type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; 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::Address, ); - const SIGNATURE: &'static str = "PoolCreated(address)"; - const SIGNATURE_HASH: alloy_sol_types::private::B256 = alloy_sol_types::private::B256::new([ - 131u8, 164u8, 143u8, 188u8, 252u8, 153u8, 19u8, 53u8, 49u8, 78u8, 116u8, - 208u8, 73u8, 106u8, 171u8, 106u8, 25u8, 135u8, 233u8, 146u8, 221u8, - 200u8, 93u8, 221u8, 188u8, 196u8, 214u8, 221u8, 110u8, 242u8, 233u8, - 252u8, - ]); + const ANONYMOUS: bool = false; + const SIGNATURE: &'static str = "PoolCreated(address)"; + const SIGNATURE_HASH: alloy_sol_types::private::B256 = + alloy_sol_types::private::B256::new([ + 131u8, 164u8, 143u8, 188u8, 252u8, 153u8, 19u8, 53u8, 49u8, 78u8, 116u8, 208u8, + 73u8, 106u8, 171u8, 106u8, 25u8, 135u8, 233u8, 146u8, 221u8, 200u8, 93u8, + 221u8, 188u8, 196u8, 214u8, 221u8, 110u8, 242u8, 233u8, 252u8, + ]); + #[allow(unused_variables)] #[inline] fn new( @@ -292,29 +299,31 @@ event PoolCreated(address indexed pool); ) -> Self { Self { pool: topics.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, - ), - ); + 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.pool.clone()) } + #[inline] fn encode_topics_raw( &self, @@ -323,9 +332,7 @@ event PoolCreated(address indexed pool); if out.len() < ::COUNT { return Err(alloy_sol_types::Error::Overrun); } - out[0usize] = alloy_sol_types::abi::token::WordToken( - Self::SIGNATURE_HASH, - ); + out[0usize] = alloy_sol_types::abi::token::WordToken(Self::SIGNATURE_HASH); out[1usize] = ::encode_topic( &self.pool, ); @@ -337,6 +344,7 @@ event PoolCreated(address indexed pool); 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) } @@ -350,9 +358,9 @@ event PoolCreated(address indexed pool); } }; /**Constructor`. -```solidity -constructor(address vault, address protocolFeeProvider, string factoryVersion, string poolVersion); -```*/ + ```solidity + constructor(address vault, address protocolFeeProvider, string factoryVersion, string poolVersion); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct constructorCall { @@ -366,7 +374,7 @@ constructor(address vault, address protocolFeeProvider, string factoryVersion, s pub poolVersion: alloy_sol_types::private::String, } const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -385,9 +393,7 @@ constructor(address vault, address protocolFeeProvider, string factoryVersion, s ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -427,15 +433,15 @@ constructor(address vault, address protocolFeeProvider, string factoryVersion, s alloy_sol_types::sol_data::String, alloy_sol_types::sol_data::String, ); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + 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<'_> { ( @@ -457,9 +463,9 @@ constructor(address vault, address protocolFeeProvider, string factoryVersion, s }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `create(string,string,address[],uint256[],address[],uint256,address)` and selector `0x80773a93`. -```solidity -function create(string memory name, string memory symbol, address[] memory tokens, uint256[] memory normalizedWeights, address[] memory rateProviders, uint256 swapFeePercentage, address owner) external returns (address); -```*/ + ```solidity + function create(string memory name, string memory symbol, address[] memory tokens, uint256[] memory normalizedWeights, address[] memory rateProviders, uint256 swapFeePercentage, address owner) external returns (address); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct createCall { @@ -470,20 +476,19 @@ function create(string memory name, string memory symbol, address[] memory token #[allow(missing_docs)] pub tokens: alloy_sol_types::private::Vec, #[allow(missing_docs)] - pub normalizedWeights: alloy_sol_types::private::Vec< - alloy_sol_types::private::primitives::aliases::U256, - >, + pub normalizedWeights: + alloy_sol_types::private::Vec, #[allow(missing_docs)] - pub rateProviders: alloy_sol_types::private::Vec< - alloy_sol_types::private::Address, - >, + pub rateProviders: alloy_sol_types::private::Vec, #[allow(missing_docs)] pub swapFeePercentage: alloy_sol_types::private::primitives::aliases::U256, #[allow(missing_docs)] pub owner: alloy_sol_types::private::Address, } #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`create(string,string,address[],uint256[],address[],uint256,address)`](createCall) function. + ///Container type for the return parameters of the + /// [`create(string,string,address[],uint256[],address[],uint256, + /// address)`](createCall) function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct createReturn { @@ -497,7 +502,7 @@ function create(string memory name, string memory symbol, address[] memory token clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -515,18 +520,14 @@ function create(string memory name, string memory symbol, address[] memory token alloy_sol_types::private::String, alloy_sol_types::private::String, alloy_sol_types::private::Vec, - alloy_sol_types::private::Vec< - alloy_sol_types::private::primitives::aliases::U256, - >, + alloy_sol_types::private::Vec, alloy_sol_types::private::Vec, 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, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -572,9 +573,7 @@ function create(string memory name, string memory symbol, address[] memory token type UnderlyingRustTuple<'a> = (alloy_sol_types::private::Address,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -607,22 +606,22 @@ function create(string memory name, string memory symbol, address[] memory token 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::Address; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (alloy_sol_types::sol_data::Address,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "create(string,string,address[],uint256[],address[],uint256,address)"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [128u8, 119u8, 58u8, 147u8]; + const SIGNATURE: &'static str = + "create(string,string,address[],uint256[],address[],uint256,address)"; + #[inline] fn new<'a>( tuple: as alloy_sol_types::SolType>::RustType, ) -> Self { tuple.into() } + #[inline] fn tokenize(&self) -> Self::Token<'_> { ( @@ -649,47 +648,44 @@ function create(string memory name, string memory symbol, address[] memory token ), ) } + #[inline] fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { - ( - ::tokenize( - ret, - ), - ) + (::tokenize(ret),) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) - .map(|r| { + as alloy_sol_types::SolType>::abi_decode_sequence(data).map( + |r| { let r: createReturn = 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: createReturn = r.into(); - r._0 - }) + 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: createReturn = r.into(); + r._0 + }) } } }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `disable()` and selector `0x2f2770db`. -```solidity -function disable() external; -```*/ + ```solidity + function disable() external; + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct disableCall; - ///Container type for the return parameters of the [`disable()`](disableCall) function. + ///Container type for the return parameters of the + /// [`disable()`](disableCall) function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct disableReturn {} @@ -700,7 +696,7 @@ function disable() external; clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -709,9 +705,7 @@ function disable() external; type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -741,9 +735,7 @@ function disable() external; type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -766,67 +758,64 @@ function disable() external; } } impl disableReturn { - fn _tokenize( - &self, - ) -> ::ReturnToken<'_> { + fn _tokenize(&self) -> ::ReturnToken<'_> { () } } #[automatically_derived] impl alloy_sol_types::SolCall for disableCall { type Parameters<'a> = (); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = disableReturn; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "disable()"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [47u8, 39u8, 112u8, 219u8]; + const SIGNATURE: &'static str = "disable()"; + #[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<'_> { disableReturn::_tokenize(ret) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) + 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) + 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(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `version()` and selector `0x54fd4d50`. -```solidity -function version() external view returns (string memory); -```*/ + ```solidity + function version() external view returns (string memory); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct versionCall; #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`version()`](versionCall) function. + ///Container type for the return parameters of the + /// [`version()`](versionCall) function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct versionReturn { @@ -840,7 +829,7 @@ function version() external view returns (string memory); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -849,9 +838,7 @@ function version() external view returns (string memory); type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -881,9 +868,7 @@ function version() external view returns (string memory); type UnderlyingRustTuple<'a> = (alloy_sol_types::private::String,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -908,61 +893,56 @@ function version() external view returns (string memory); #[automatically_derived] impl alloy_sol_types::SolCall for versionCall { type Parameters<'a> = (); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = alloy_sol_types::private::String; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (alloy_sol_types::sol_data::String,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "version()"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [84u8, 253u8, 77u8, 80u8]; + const SIGNATURE: &'static str = "version()"; + #[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, - ), - ) + (::tokenize(ret),) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) - .map(|r| { + as alloy_sol_types::SolType>::abi_decode_sequence(data).map( + |r| { let r: versionReturn = 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: versionReturn = r.into(); - r._0 - }) + 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: versionReturn = r.into(); + r._0 + }) } } }; - ///Container for all the [`BalancerV2WeightedPoolFactoryV3`](self) function calls. + ///Container for all the [`BalancerV2WeightedPoolFactoryV3`](self) function + /// calls. #[derive(Clone)] - #[derive()] pub enum BalancerV2WeightedPoolFactoryV3Calls { #[allow(missing_docs)] create(createCall), @@ -974,8 +954,9 @@ function version() external view returns (string memory); impl BalancerV2WeightedPoolFactoryV3Calls { /// 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. + /// 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]] = &[ @@ -983,18 +964,19 @@ function version() external view returns (string memory); [84u8, 253u8, 77u8, 80u8], [128u8, 119u8, 58u8, 147u8], ]; - /// The names of the variants in the same order as `SELECTORS`. - pub const VARIANT_NAMES: &'static [&'static str] = &[ - ::core::stringify!(disable), - ::core::stringify!(version), - ::core::stringify!(create), - ]; /// The signatures in the same order as `SELECTORS`. pub const SIGNATURES: &'static [&'static str] = &[ ::SIGNATURE, ::SIGNATURE, ::SIGNATURE, ]; + /// The names of the variants in the same order as `SELECTORS`. + pub const VARIANT_NAMES: &'static [&'static str] = &[ + ::core::stringify!(disable), + ::core::stringify!(version), + ::core::stringify!(create), + ]; + /// Returns the signature for the given selector, if known. #[inline] pub fn signature_by_selector( @@ -1007,20 +989,20 @@ function version() external view returns (string memory); ::core::result::Result::Err(_) => ::core::option::Option::None, } } + /// Returns the enum variant name for the given selector, if known. #[inline] - pub fn name_by_selector( - selector: [u8; 4usize], - ) -> ::core::option::Option<&'static str> { + pub fn name_by_selector(selector: [u8; 4usize]) -> ::core::option::Option<&'static str> { let sig = Self::signature_by_selector(selector)?; sig.split_once('(').map(|(name, _)| name) } } #[automatically_derived] impl alloy_sol_types::SolInterface for BalancerV2WeightedPoolFactoryV3Calls { - const NAME: &'static str = "BalancerV2WeightedPoolFactoryV3Calls"; - const MIN_DATA_LENGTH: usize = 0usize; const COUNT: usize = 3usize; + const MIN_DATA_LENGTH: usize = 0usize; + const NAME: &'static str = "BalancerV2WeightedPoolFactoryV3Calls"; + #[inline] fn selector(&self) -> [u8; 4] { match self { @@ -1029,27 +1011,30 @@ function version() external view returns (string memory); Self::version(_) => ::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 { + fn abi_decode_raw(selector: [u8; 4], data: &[u8]) -> alloy_sol_types::Result { static DECODE_SHIMS: &[fn( &[u8], - ) -> alloy_sol_types::Result] = &[ + ) -> alloy_sol_types::Result< + BalancerV2WeightedPoolFactoryV3Calls, + >] = &[ { fn disable( data: &[u8], - ) -> alloy_sol_types::Result { + ) -> alloy_sol_types::Result + { ::abi_decode_raw(data) .map(BalancerV2WeightedPoolFactoryV3Calls::disable) } @@ -1058,7 +1043,8 @@ function version() external view returns (string memory); { fn version( data: &[u8], - ) -> alloy_sol_types::Result { + ) -> alloy_sol_types::Result + { ::abi_decode_raw(data) .map(BalancerV2WeightedPoolFactoryV3Calls::version) } @@ -1067,7 +1053,8 @@ function version() external view returns (string memory); { fn create( data: &[u8], - ) -> alloy_sol_types::Result { + ) -> alloy_sol_types::Result + { ::abi_decode_raw(data) .map(BalancerV2WeightedPoolFactoryV3Calls::create) } @@ -1075,15 +1062,14 @@ function version() external view returns (string memory); }, ]; let Ok(idx) = Self::SELECTORS.binary_search(&selector) else { - return Err( - alloy_sol_types::Error::unknown_selector( - ::NAME, - selector, - ), - ); + return Err(alloy_sol_types::Error::unknown_selector( + ::NAME, + selector, + )); }; DECODE_SHIMS[idx](data) } + #[inline] #[allow(non_snake_case)] fn abi_decode_raw_validate( @@ -1092,14 +1078,15 @@ function version() external view returns (string memory); ) -> alloy_sol_types::Result { static DECODE_VALIDATE_SHIMS: &[fn( &[u8], - ) -> alloy_sol_types::Result] = &[ + ) -> alloy_sol_types::Result< + BalancerV2WeightedPoolFactoryV3Calls, + >] = &[ { fn disable( data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) + ) -> alloy_sol_types::Result + { + ::abi_decode_raw_validate(data) .map(BalancerV2WeightedPoolFactoryV3Calls::disable) } disable @@ -1107,10 +1094,9 @@ function version() external view returns (string memory); { fn version( data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) + ) -> alloy_sol_types::Result + { + ::abi_decode_raw_validate(data) .map(BalancerV2WeightedPoolFactoryV3Calls::version) } version @@ -1118,25 +1104,23 @@ function version() external view returns (string memory); { fn create( data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) + ) -> alloy_sol_types::Result + { + ::abi_decode_raw_validate(data) .map(BalancerV2WeightedPoolFactoryV3Calls::create) } create }, ]; let Ok(idx) = Self::SELECTORS.binary_search(&selector) else { - return Err( - alloy_sol_types::Error::unknown_selector( - ::NAME, - selector, - ), - ); + return Err(alloy_sol_types::Error::unknown_selector( + ::NAME, + selector, + )); }; DECODE_VALIDATE_SHIMS[idx](data) } + #[inline] fn abi_encoded_size(&self) -> usize { match self { @@ -1151,6 +1135,7 @@ function version() external view returns (string memory); } } } + #[inline] fn abi_encode_raw(&self, out: &mut alloy_sol_types::private::Vec) { match self { @@ -1167,8 +1152,7 @@ function version() external view returns (string memory); } } ///Container for all the [`BalancerV2WeightedPoolFactoryV3`](self) events. - #[derive(Clone)] - #[derive(Debug, PartialEq, Eq, Hash)] + #[derive(Clone, Debug, PartialEq, Eq, Hash)] pub enum BalancerV2WeightedPoolFactoryV3Events { #[allow(missing_docs)] FactoryDisabled(FactoryDisabled), @@ -1178,33 +1162,34 @@ function version() external view returns (string memory); impl BalancerV2WeightedPoolFactoryV3Events { /// 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. + /// 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]] = &[ [ - 67u8, 42u8, 203u8, 253u8, 102u8, 45u8, 187u8, 93u8, 139u8, 55u8, 131u8, - 132u8, 166u8, 113u8, 89u8, 180u8, 124u8, 169u8, 208u8, 241u8, 183u8, - 159u8, 151u8, 207u8, 100u8, 207u8, 133u8, 133u8, 250u8, 54u8, 45u8, 80u8, + 67u8, 42u8, 203u8, 253u8, 102u8, 45u8, 187u8, 93u8, 139u8, 55u8, 131u8, 132u8, + 166u8, 113u8, 89u8, 180u8, 124u8, 169u8, 208u8, 241u8, 183u8, 159u8, 151u8, 207u8, + 100u8, 207u8, 133u8, 133u8, 250u8, 54u8, 45u8, 80u8, ], [ - 131u8, 164u8, 143u8, 188u8, 252u8, 153u8, 19u8, 53u8, 49u8, 78u8, 116u8, - 208u8, 73u8, 106u8, 171u8, 106u8, 25u8, 135u8, 233u8, 146u8, 221u8, - 200u8, 93u8, 221u8, 188u8, 196u8, 214u8, 221u8, 110u8, 242u8, 233u8, - 252u8, + 131u8, 164u8, 143u8, 188u8, 252u8, 153u8, 19u8, 53u8, 49u8, 78u8, 116u8, 208u8, + 73u8, 106u8, 171u8, 106u8, 25u8, 135u8, 233u8, 146u8, 221u8, 200u8, 93u8, 221u8, + 188u8, 196u8, 214u8, 221u8, 110u8, 242u8, 233u8, 252u8, ], ]; - /// The names of the variants in the same order as `SELECTORS`. - pub const VARIANT_NAMES: &'static [&'static str] = &[ - ::core::stringify!(FactoryDisabled), - ::core::stringify!(PoolCreated), - ]; /// The signatures in the same order as `SELECTORS`. pub const SIGNATURES: &'static [&'static str] = &[ ::SIGNATURE, ::SIGNATURE, ]; + /// The names of the variants in the same order as `SELECTORS`. + pub const VARIANT_NAMES: &'static [&'static str] = &[ + ::core::stringify!(FactoryDisabled), + ::core::stringify!(PoolCreated), + ]; + /// Returns the signature for the given selector, if known. #[inline] pub fn signature_by_selector( @@ -1217,55 +1202,46 @@ function version() external view returns (string memory); ::core::result::Result::Err(_) => ::core::option::Option::None, } } + /// Returns the enum variant name for the given selector, if known. #[inline] - pub fn name_by_selector( - selector: [u8; 32usize], - ) -> ::core::option::Option<&'static str> { + pub fn name_by_selector(selector: [u8; 32usize]) -> ::core::option::Option<&'static str> { let sig = Self::signature_by_selector(selector)?; sig.split_once('(').map(|(name, _)| name) } } #[automatically_derived] impl alloy_sol_types::SolEventInterface for BalancerV2WeightedPoolFactoryV3Events { - const NAME: &'static str = "BalancerV2WeightedPoolFactoryV3Events"; const COUNT: usize = 2usize; + const NAME: &'static str = "BalancerV2WeightedPoolFactoryV3Events"; + 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, - ) + ::decode_raw_log(topics, data) .map(Self::FactoryDisabled) } Some(::SIGNATURE_HASH) => { - ::decode_raw_log( - topics, - data, - ) + ::decode_raw_log(topics, data) .map(Self::PoolCreated) } - _ => { - 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(), - ), + _ => 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 BalancerV2WeightedPoolFactoryV3Events { + impl alloy_sol_types::private::IntoLogData for BalancerV2WeightedPoolFactoryV3Events { fn to_log_data(&self) -> alloy_sol_types::private::LogData { match self { Self::FactoryDisabled(inner) => { @@ -1276,6 +1252,7 @@ function version() external view returns (string memory); } } } + fn into_log_data(self) -> alloy_sol_types::private::LogData { match self { Self::FactoryDisabled(inner) => { @@ -1287,10 +1264,10 @@ function version() external view returns (string memory); } } } - use alloy_contract as alloy_contract; + use alloy_contract; /**Creates a new wrapper around an on-chain [`BalancerV2WeightedPoolFactoryV3`](self) contract instance. -See the [wrapper's documentation](`BalancerV2WeightedPoolFactoryV3Instance`) for more details.*/ + See the [wrapper's documentation](`BalancerV2WeightedPoolFactoryV3Instance`) for more details.*/ #[inline] pub const fn new< P: alloy_contract::private::Provider, @@ -1303,20 +1280,17 @@ See the [wrapper's documentation](`BalancerV2WeightedPoolFactoryV3Instance`) for } /**A [`BalancerV2WeightedPoolFactoryV3`](self) instance. -Contains type-safe methods for interacting with an on-chain instance of the -[`BalancerV2WeightedPoolFactoryV3`](self) contract located at a given `address`, using a given -provider `P`. + Contains type-safe methods for interacting with an on-chain instance of the + [`BalancerV2WeightedPoolFactoryV3`](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. + 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.*/ + See the [module-level documentation](self) for all the available methods.*/ #[derive(Clone)] - pub struct BalancerV2WeightedPoolFactoryV3Instance< - P, - N = alloy_contract::private::Ethereum, - > { + pub struct BalancerV2WeightedPoolFactoryV3Instance { address: alloy_sol_types::private::Address, provider: P, _network: ::core::marker::PhantomData, @@ -1331,39 +1305,39 @@ See the [module-level documentation](self) for all the available methods.*/ } } /// Instantiation and getters/setters. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > BalancerV2WeightedPoolFactoryV3Instance { + impl, N: alloy_contract::private::Network> + BalancerV2WeightedPoolFactoryV3Instance + { /**Creates a new wrapper around an on-chain [`BalancerV2WeightedPoolFactoryV3`](self) contract instance. -See the [wrapper's documentation](`BalancerV2WeightedPoolFactoryV3Instance`) for more details.*/ + See the [wrapper's documentation](`BalancerV2WeightedPoolFactoryV3Instance`) for more details.*/ #[inline] - pub const fn new( - address: alloy_sol_types::private::Address, - __provider: P, - ) -> Self { + pub const fn new(address: alloy_sol_types::private::Address, __provider: P) -> Self { Self { address, provider: __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 { @@ -1371,11 +1345,10 @@ See the [wrapper's documentation](`BalancerV2WeightedPoolFactoryV3Instance`) for } } impl BalancerV2WeightedPoolFactoryV3Instance<&P, N> { - /// Clones the provider and returns a new instance with the cloned provider. + /// Clones the provider and returns a new instance with the cloned + /// provider. #[inline] - pub fn with_cloned_provider( - self, - ) -> BalancerV2WeightedPoolFactoryV3Instance { + pub fn with_cloned_provider(self) -> BalancerV2WeightedPoolFactoryV3Instance { BalancerV2WeightedPoolFactoryV3Instance { address: self.address, provider: ::core::clone::Clone::clone(&self.provider), @@ -1384,20 +1357,22 @@ See the [wrapper's documentation](`BalancerV2WeightedPoolFactoryV3Instance`) for } } /// Function calls. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > BalancerV2WeightedPoolFactoryV3Instance { - /// Creates a new call builder using this contract instance's provider and address. + impl, N: alloy_contract::private::Network> + BalancerV2WeightedPoolFactoryV3Instance + { + /// 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. + /// 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 [`create`] function. pub fn create( &self, @@ -1407,53 +1382,52 @@ See the [wrapper's documentation](`BalancerV2WeightedPoolFactoryV3Instance`) for normalizedWeights: alloy_sol_types::private::Vec< alloy_sol_types::private::primitives::aliases::U256, >, - rateProviders: alloy_sol_types::private::Vec< - alloy_sol_types::private::Address, - >, + rateProviders: alloy_sol_types::private::Vec, swapFeePercentage: alloy_sol_types::private::primitives::aliases::U256, owner: alloy_sol_types::private::Address, ) -> alloy_contract::SolCallBuilder<&P, createCall, N> { - self.call_builder( - &createCall { - name, - symbol, - tokens, - normalizedWeights, - rateProviders, - swapFeePercentage, - owner, - }, - ) + self.call_builder(&createCall { + name, + symbol, + tokens, + normalizedWeights, + rateProviders, + swapFeePercentage, + owner, + }) } + ///Creates a new call builder for the [`disable`] function. pub fn disable(&self) -> alloy_contract::SolCallBuilder<&P, disableCall, N> { self.call_builder(&disableCall) } + ///Creates a new call builder for the [`version`] function. pub fn version(&self) -> alloy_contract::SolCallBuilder<&P, versionCall, N> { self.call_builder(&versionCall) } } /// Event filters. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > BalancerV2WeightedPoolFactoryV3Instance { - /// Creates a new event filter using this contract instance's provider and address. + impl, N: alloy_contract::private::Network> + BalancerV2WeightedPoolFactoryV3Instance + { + /// 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. + /// 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 [`FactoryDisabled`] event. - pub fn FactoryDisabled_filter( - &self, - ) -> alloy_contract::Event<&P, FactoryDisabled, N> { + pub fn FactoryDisabled_filter(&self) -> alloy_contract::Event<&P, FactoryDisabled, N> { self.event_filter::() } + ///Creates a new event filter for the [`PoolCreated`] event. pub fn PoolCreated_filter(&self) -> alloy_contract::Event<&P, PoolCreated, N> { self.event_filter::() @@ -1464,61 +1438,37 @@ pub type Instance = BalancerV2WeightedPoolFactoryV3::BalancerV2WeightedPoolFacto ::alloy_provider::DynProvider, >; use { - std::{sync::LazyLock, collections::HashMap}, - anyhow::{Result, Context}, - alloy_primitives::{address, Address}, - alloy_provider::{Provider, DynProvider}, + alloy_primitives::{Address, address}, + alloy_provider::{DynProvider, Provider}, + anyhow::{Context, Result}, + std::{collections::HashMap, sync::LazyLock}, }; pub const fn deployment_info(chain_id: u64) -> Option<(Address, Option)> { match chain_id { - 1u64 => { - Some(( - ::alloy_primitives::address!( - "0x5Dd94Da3644DDD055fcf6B3E1aa310Bb7801EB8b" - ), - Some(16520627u64), - )) - } - 10u64 => { - Some(( - ::alloy_primitives::address!( - "0xA0DAbEBAAd1b243BBb243f933013d560819eB66f" - ), - Some(72832703u64), - )) - } - 56u64 => { - Some(( - ::alloy_primitives::address!( - "0x6e4cF292C5349c79cCd66349c3Ed56357dD11B46" - ), - Some(25474982u64), - )) - } - 100u64 => { - Some(( - ::alloy_primitives::address!( - "0xC128a9954e6c874eA3d62ce62B468bA073093F25" - ), - Some(26226256u64), - )) - } - 137u64 => { - Some(( - ::alloy_primitives::address!( - "0x82e4cFaef85b1B6299935340c964C942280327f4" - ), - Some(39036828u64), - )) - } - 43114u64 => { - Some(( - ::alloy_primitives::address!( - "0x94f68b54191F62f781Fe8298A8A5Fa3ed772d227" - ), - Some(26389236u64), - )) - } + 1u64 => Some(( + ::alloy_primitives::address!("0x5Dd94Da3644DDD055fcf6B3E1aa310Bb7801EB8b"), + Some(16520627u64), + )), + 10u64 => Some(( + ::alloy_primitives::address!("0xA0DAbEBAAd1b243BBb243f933013d560819eB66f"), + Some(72832703u64), + )), + 56u64 => Some(( + ::alloy_primitives::address!("0x6e4cF292C5349c79cCd66349c3Ed56357dD11B46"), + Some(25474982u64), + )), + 100u64 => Some(( + ::alloy_primitives::address!("0xC128a9954e6c874eA3d62ce62B468bA073093F25"), + Some(26226256u64), + )), + 137u64 => Some(( + ::alloy_primitives::address!("0x82e4cFaef85b1B6299935340c964C942280327f4"), + Some(39036828u64), + )), + 43114u64 => Some(( + ::alloy_primitives::address!("0x94f68b54191F62f781Fe8298A8A5Fa3ed772d227"), + Some(26389236u64), + )), _ => None, } } @@ -1535,9 +1485,7 @@ pub const fn deployment_block(chain_id: &u64) -> Option { } } impl Instance { - pub fn deployed( - provider: &DynProvider, - ) -> impl Future> + Send { + pub fn deployed(provider: &DynProvider) -> impl Future> + Send { async move { let chain_id = provider .get_chain_id() diff --git a/contracts/generated/contracts-generated/balancerv2weightedpoolfactoryv4/src/lib.rs b/contracts/generated/contracts-generated/balancerv2weightedpoolfactoryv4/src/lib.rs index 7a8e40e7c5..792af07fa8 100644 --- a/contracts/generated/contracts-generated/balancerv2weightedpoolfactoryv4/src/lib.rs +++ b/contracts/generated/contracts-generated/balancerv2weightedpoolfactoryv4/src/lib.rs @@ -1,4 +1,10 @@ -#![allow(unused_imports, unused_attributes, clippy::all, rustdoc::all, non_snake_case)] +#![allow( + unused_imports, + unused_attributes, + clippy::all, + rustdoc::all, + non_snake_case +)] //! Auto-generated contract bindings. Do not edit. /** @@ -143,13 +149,12 @@ interface BalancerV2WeightedPoolFactoryV4 { clippy::empty_structs_with_brackets )] pub mod BalancerV2WeightedPoolFactoryV4 { - use super::*; - use alloy_sol_types as alloy_sol_types; + use {super::*, alloy_sol_types}; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Event with signature `FactoryDisabled()` and selector `0x432acbfd662dbb5d8b378384a67159b47ca9d0f1b79f97cf64cf8585fa362d50`. -```solidity -event FactoryDisabled(); -```*/ + ```solidity + event FactoryDisabled(); + ```*/ #[allow( non_camel_case_types, non_snake_case, @@ -165,21 +170,22 @@ event FactoryDisabled(); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[automatically_derived] impl alloy_sol_types::SolEvent for FactoryDisabled { + type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type DataTuple<'a> = (); - type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type TopicList = (alloy_sol_types::sol_data::FixedBytes<32>,); - const SIGNATURE: &'static str = "FactoryDisabled()"; - const SIGNATURE_HASH: alloy_sol_types::private::B256 = alloy_sol_types::private::B256::new([ - 67u8, 42u8, 203u8, 253u8, 102u8, 45u8, 187u8, 93u8, 139u8, 55u8, 131u8, - 132u8, 166u8, 113u8, 89u8, 180u8, 124u8, 169u8, 208u8, 241u8, 183u8, - 159u8, 151u8, 207u8, 100u8, 207u8, 133u8, 133u8, 250u8, 54u8, 45u8, 80u8, - ]); + const ANONYMOUS: bool = false; + const SIGNATURE: &'static str = "FactoryDisabled()"; + const SIGNATURE_HASH: alloy_sol_types::private::B256 = + alloy_sol_types::private::B256::new([ + 67u8, 42u8, 203u8, 253u8, 102u8, 45u8, 187u8, 93u8, 139u8, 55u8, 131u8, 132u8, + 166u8, 113u8, 89u8, 180u8, 124u8, 169u8, 208u8, 241u8, 183u8, 159u8, 151u8, + 207u8, 100u8, 207u8, 133u8, 133u8, 250u8, 54u8, 45u8, 80u8, + ]); + #[allow(unused_variables)] #[inline] fn new( @@ -188,29 +194,31 @@ event FactoryDisabled(); ) -> Self { Self {} } + #[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, - ), - ); + 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(),) } + #[inline] fn encode_topics_raw( &self, @@ -219,9 +227,7 @@ event FactoryDisabled(); if out.len() < ::COUNT { return Err(alloy_sol_types::Error::Overrun); } - out[0usize] = alloy_sol_types::abi::token::WordToken( - Self::SIGNATURE_HASH, - ); + out[0usize] = alloy_sol_types::abi::token::WordToken(Self::SIGNATURE_HASH); Ok(()) } } @@ -230,6 +236,7 @@ event FactoryDisabled(); 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) } @@ -244,9 +251,9 @@ event FactoryDisabled(); }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Event with signature `PoolCreated(address)` and selector `0x83a48fbcfc991335314e74d0496aab6a1987e992ddc85dddbcc4d6dd6ef2e9fc`. -```solidity -event PoolCreated(address indexed pool); -```*/ + ```solidity + event PoolCreated(address indexed pool); + ```*/ #[allow( non_camel_case_types, non_snake_case, @@ -265,25 +272,25 @@ event PoolCreated(address indexed pool); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[automatically_derived] impl alloy_sol_types::SolEvent for PoolCreated { + type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; 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::Address, ); - const SIGNATURE: &'static str = "PoolCreated(address)"; - const SIGNATURE_HASH: alloy_sol_types::private::B256 = alloy_sol_types::private::B256::new([ - 131u8, 164u8, 143u8, 188u8, 252u8, 153u8, 19u8, 53u8, 49u8, 78u8, 116u8, - 208u8, 73u8, 106u8, 171u8, 106u8, 25u8, 135u8, 233u8, 146u8, 221u8, - 200u8, 93u8, 221u8, 188u8, 196u8, 214u8, 221u8, 110u8, 242u8, 233u8, - 252u8, - ]); + const ANONYMOUS: bool = false; + const SIGNATURE: &'static str = "PoolCreated(address)"; + const SIGNATURE_HASH: alloy_sol_types::private::B256 = + alloy_sol_types::private::B256::new([ + 131u8, 164u8, 143u8, 188u8, 252u8, 153u8, 19u8, 53u8, 49u8, 78u8, 116u8, 208u8, + 73u8, 106u8, 171u8, 106u8, 25u8, 135u8, 233u8, 146u8, 221u8, 200u8, 93u8, + 221u8, 188u8, 196u8, 214u8, 221u8, 110u8, 242u8, 233u8, 252u8, + ]); + #[allow(unused_variables)] #[inline] fn new( @@ -292,29 +299,31 @@ event PoolCreated(address indexed pool); ) -> Self { Self { pool: topics.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, - ), - ); + 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.pool.clone()) } + #[inline] fn encode_topics_raw( &self, @@ -323,9 +332,7 @@ event PoolCreated(address indexed pool); if out.len() < ::COUNT { return Err(alloy_sol_types::Error::Overrun); } - out[0usize] = alloy_sol_types::abi::token::WordToken( - Self::SIGNATURE_HASH, - ); + out[0usize] = alloy_sol_types::abi::token::WordToken(Self::SIGNATURE_HASH); out[1usize] = ::encode_topic( &self.pool, ); @@ -337,6 +344,7 @@ event PoolCreated(address indexed pool); 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) } @@ -350,9 +358,9 @@ event PoolCreated(address indexed pool); } }; /**Constructor`. -```solidity -constructor(address vault, address protocolFeeProvider, string factoryVersion, string poolVersion); -```*/ + ```solidity + constructor(address vault, address protocolFeeProvider, string factoryVersion, string poolVersion); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct constructorCall { @@ -366,7 +374,7 @@ constructor(address vault, address protocolFeeProvider, string factoryVersion, s pub poolVersion: alloy_sol_types::private::String, } const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -385,9 +393,7 @@ constructor(address vault, address protocolFeeProvider, string factoryVersion, s ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -427,15 +433,15 @@ constructor(address vault, address protocolFeeProvider, string factoryVersion, s alloy_sol_types::sol_data::String, alloy_sol_types::sol_data::String, ); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + 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<'_> { ( @@ -457,9 +463,9 @@ constructor(address vault, address protocolFeeProvider, string factoryVersion, s }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `create(string,string,address[],uint256[],address[],uint256,address)` and selector `0x80773a93`. -```solidity -function create(string memory name, string memory symbol, address[] memory tokens, uint256[] memory normalizedWeights, address[] memory rateProviders, uint256 swapFeePercentage, address owner) external returns (address); -```*/ + ```solidity + function create(string memory name, string memory symbol, address[] memory tokens, uint256[] memory normalizedWeights, address[] memory rateProviders, uint256 swapFeePercentage, address owner) external returns (address); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct createCall { @@ -470,20 +476,19 @@ function create(string memory name, string memory symbol, address[] memory token #[allow(missing_docs)] pub tokens: alloy_sol_types::private::Vec, #[allow(missing_docs)] - pub normalizedWeights: alloy_sol_types::private::Vec< - alloy_sol_types::private::primitives::aliases::U256, - >, + pub normalizedWeights: + alloy_sol_types::private::Vec, #[allow(missing_docs)] - pub rateProviders: alloy_sol_types::private::Vec< - alloy_sol_types::private::Address, - >, + pub rateProviders: alloy_sol_types::private::Vec, #[allow(missing_docs)] pub swapFeePercentage: alloy_sol_types::private::primitives::aliases::U256, #[allow(missing_docs)] pub owner: alloy_sol_types::private::Address, } #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`create(string,string,address[],uint256[],address[],uint256,address)`](createCall) function. + ///Container type for the return parameters of the + /// [`create(string,string,address[],uint256[],address[],uint256, + /// address)`](createCall) function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct createReturn { @@ -497,7 +502,7 @@ function create(string memory name, string memory symbol, address[] memory token clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -515,18 +520,14 @@ function create(string memory name, string memory symbol, address[] memory token alloy_sol_types::private::String, alloy_sol_types::private::String, alloy_sol_types::private::Vec, - alloy_sol_types::private::Vec< - alloy_sol_types::private::primitives::aliases::U256, - >, + alloy_sol_types::private::Vec, alloy_sol_types::private::Vec, 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, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -572,9 +573,7 @@ function create(string memory name, string memory symbol, address[] memory token type UnderlyingRustTuple<'a> = (alloy_sol_types::private::Address,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -607,22 +606,22 @@ function create(string memory name, string memory symbol, address[] memory token 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::Address; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (alloy_sol_types::sol_data::Address,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "create(string,string,address[],uint256[],address[],uint256,address)"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [128u8, 119u8, 58u8, 147u8]; + const SIGNATURE: &'static str = + "create(string,string,address[],uint256[],address[],uint256,address)"; + #[inline] fn new<'a>( tuple: as alloy_sol_types::SolType>::RustType, ) -> Self { tuple.into() } + #[inline] fn tokenize(&self) -> Self::Token<'_> { ( @@ -649,47 +648,44 @@ function create(string memory name, string memory symbol, address[] memory token ), ) } + #[inline] fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { - ( - ::tokenize( - ret, - ), - ) + (::tokenize(ret),) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) - .map(|r| { + as alloy_sol_types::SolType>::abi_decode_sequence(data).map( + |r| { let r: createReturn = 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: createReturn = r.into(); - r._0 - }) + 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: createReturn = r.into(); + r._0 + }) } } }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `disable()` and selector `0x2f2770db`. -```solidity -function disable() external; -```*/ + ```solidity + function disable() external; + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct disableCall; - ///Container type for the return parameters of the [`disable()`](disableCall) function. + ///Container type for the return parameters of the + /// [`disable()`](disableCall) function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct disableReturn {} @@ -700,7 +696,7 @@ function disable() external; clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -709,9 +705,7 @@ function disable() external; type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -741,9 +735,7 @@ function disable() external; type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -766,67 +758,64 @@ function disable() external; } } impl disableReturn { - fn _tokenize( - &self, - ) -> ::ReturnToken<'_> { + fn _tokenize(&self) -> ::ReturnToken<'_> { () } } #[automatically_derived] impl alloy_sol_types::SolCall for disableCall { type Parameters<'a> = (); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = disableReturn; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "disable()"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [47u8, 39u8, 112u8, 219u8]; + const SIGNATURE: &'static str = "disable()"; + #[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<'_> { disableReturn::_tokenize(ret) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) + 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) + 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(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `version()` and selector `0x54fd4d50`. -```solidity -function version() external view returns (string memory); -```*/ + ```solidity + function version() external view returns (string memory); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct versionCall; #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`version()`](versionCall) function. + ///Container type for the return parameters of the + /// [`version()`](versionCall) function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct versionReturn { @@ -840,7 +829,7 @@ function version() external view returns (string memory); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -849,9 +838,7 @@ function version() external view returns (string memory); type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -881,9 +868,7 @@ function version() external view returns (string memory); type UnderlyingRustTuple<'a> = (alloy_sol_types::private::String,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -908,61 +893,56 @@ function version() external view returns (string memory); #[automatically_derived] impl alloy_sol_types::SolCall for versionCall { type Parameters<'a> = (); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = alloy_sol_types::private::String; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (alloy_sol_types::sol_data::String,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "version()"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [84u8, 253u8, 77u8, 80u8]; + const SIGNATURE: &'static str = "version()"; + #[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, - ), - ) + (::tokenize(ret),) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) - .map(|r| { + as alloy_sol_types::SolType>::abi_decode_sequence(data).map( + |r| { let r: versionReturn = 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: versionReturn = r.into(); - r._0 - }) + 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: versionReturn = r.into(); + r._0 + }) } } }; - ///Container for all the [`BalancerV2WeightedPoolFactoryV4`](self) function calls. + ///Container for all the [`BalancerV2WeightedPoolFactoryV4`](self) function + /// calls. #[derive(Clone)] - #[derive()] pub enum BalancerV2WeightedPoolFactoryV4Calls { #[allow(missing_docs)] create(createCall), @@ -974,8 +954,9 @@ function version() external view returns (string memory); impl BalancerV2WeightedPoolFactoryV4Calls { /// 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. + /// 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]] = &[ @@ -983,18 +964,19 @@ function version() external view returns (string memory); [84u8, 253u8, 77u8, 80u8], [128u8, 119u8, 58u8, 147u8], ]; - /// The names of the variants in the same order as `SELECTORS`. - pub const VARIANT_NAMES: &'static [&'static str] = &[ - ::core::stringify!(disable), - ::core::stringify!(version), - ::core::stringify!(create), - ]; /// The signatures in the same order as `SELECTORS`. pub const SIGNATURES: &'static [&'static str] = &[ ::SIGNATURE, ::SIGNATURE, ::SIGNATURE, ]; + /// The names of the variants in the same order as `SELECTORS`. + pub const VARIANT_NAMES: &'static [&'static str] = &[ + ::core::stringify!(disable), + ::core::stringify!(version), + ::core::stringify!(create), + ]; + /// Returns the signature for the given selector, if known. #[inline] pub fn signature_by_selector( @@ -1007,20 +989,20 @@ function version() external view returns (string memory); ::core::result::Result::Err(_) => ::core::option::Option::None, } } + /// Returns the enum variant name for the given selector, if known. #[inline] - pub fn name_by_selector( - selector: [u8; 4usize], - ) -> ::core::option::Option<&'static str> { + pub fn name_by_selector(selector: [u8; 4usize]) -> ::core::option::Option<&'static str> { let sig = Self::signature_by_selector(selector)?; sig.split_once('(').map(|(name, _)| name) } } #[automatically_derived] impl alloy_sol_types::SolInterface for BalancerV2WeightedPoolFactoryV4Calls { - const NAME: &'static str = "BalancerV2WeightedPoolFactoryV4Calls"; - const MIN_DATA_LENGTH: usize = 0usize; const COUNT: usize = 3usize; + const MIN_DATA_LENGTH: usize = 0usize; + const NAME: &'static str = "BalancerV2WeightedPoolFactoryV4Calls"; + #[inline] fn selector(&self) -> [u8; 4] { match self { @@ -1029,27 +1011,30 @@ function version() external view returns (string memory); Self::version(_) => ::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 { + fn abi_decode_raw(selector: [u8; 4], data: &[u8]) -> alloy_sol_types::Result { static DECODE_SHIMS: &[fn( &[u8], - ) -> alloy_sol_types::Result] = &[ + ) -> alloy_sol_types::Result< + BalancerV2WeightedPoolFactoryV4Calls, + >] = &[ { fn disable( data: &[u8], - ) -> alloy_sol_types::Result { + ) -> alloy_sol_types::Result + { ::abi_decode_raw(data) .map(BalancerV2WeightedPoolFactoryV4Calls::disable) } @@ -1058,7 +1043,8 @@ function version() external view returns (string memory); { fn version( data: &[u8], - ) -> alloy_sol_types::Result { + ) -> alloy_sol_types::Result + { ::abi_decode_raw(data) .map(BalancerV2WeightedPoolFactoryV4Calls::version) } @@ -1067,7 +1053,8 @@ function version() external view returns (string memory); { fn create( data: &[u8], - ) -> alloy_sol_types::Result { + ) -> alloy_sol_types::Result + { ::abi_decode_raw(data) .map(BalancerV2WeightedPoolFactoryV4Calls::create) } @@ -1075,15 +1062,14 @@ function version() external view returns (string memory); }, ]; let Ok(idx) = Self::SELECTORS.binary_search(&selector) else { - return Err( - alloy_sol_types::Error::unknown_selector( - ::NAME, - selector, - ), - ); + return Err(alloy_sol_types::Error::unknown_selector( + ::NAME, + selector, + )); }; DECODE_SHIMS[idx](data) } + #[inline] #[allow(non_snake_case)] fn abi_decode_raw_validate( @@ -1092,14 +1078,15 @@ function version() external view returns (string memory); ) -> alloy_sol_types::Result { static DECODE_VALIDATE_SHIMS: &[fn( &[u8], - ) -> alloy_sol_types::Result] = &[ + ) -> alloy_sol_types::Result< + BalancerV2WeightedPoolFactoryV4Calls, + >] = &[ { fn disable( data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) + ) -> alloy_sol_types::Result + { + ::abi_decode_raw_validate(data) .map(BalancerV2WeightedPoolFactoryV4Calls::disable) } disable @@ -1107,10 +1094,9 @@ function version() external view returns (string memory); { fn version( data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) + ) -> alloy_sol_types::Result + { + ::abi_decode_raw_validate(data) .map(BalancerV2WeightedPoolFactoryV4Calls::version) } version @@ -1118,25 +1104,23 @@ function version() external view returns (string memory); { fn create( data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) + ) -> alloy_sol_types::Result + { + ::abi_decode_raw_validate(data) .map(BalancerV2WeightedPoolFactoryV4Calls::create) } create }, ]; let Ok(idx) = Self::SELECTORS.binary_search(&selector) else { - return Err( - alloy_sol_types::Error::unknown_selector( - ::NAME, - selector, - ), - ); + return Err(alloy_sol_types::Error::unknown_selector( + ::NAME, + selector, + )); }; DECODE_VALIDATE_SHIMS[idx](data) } + #[inline] fn abi_encoded_size(&self) -> usize { match self { @@ -1151,6 +1135,7 @@ function version() external view returns (string memory); } } } + #[inline] fn abi_encode_raw(&self, out: &mut alloy_sol_types::private::Vec) { match self { @@ -1167,8 +1152,7 @@ function version() external view returns (string memory); } } ///Container for all the [`BalancerV2WeightedPoolFactoryV4`](self) events. - #[derive(Clone)] - #[derive(Debug, PartialEq, Eq, Hash)] + #[derive(Clone, Debug, PartialEq, Eq, Hash)] pub enum BalancerV2WeightedPoolFactoryV4Events { #[allow(missing_docs)] FactoryDisabled(FactoryDisabled), @@ -1178,33 +1162,34 @@ function version() external view returns (string memory); impl BalancerV2WeightedPoolFactoryV4Events { /// 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. + /// 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]] = &[ [ - 67u8, 42u8, 203u8, 253u8, 102u8, 45u8, 187u8, 93u8, 139u8, 55u8, 131u8, - 132u8, 166u8, 113u8, 89u8, 180u8, 124u8, 169u8, 208u8, 241u8, 183u8, - 159u8, 151u8, 207u8, 100u8, 207u8, 133u8, 133u8, 250u8, 54u8, 45u8, 80u8, + 67u8, 42u8, 203u8, 253u8, 102u8, 45u8, 187u8, 93u8, 139u8, 55u8, 131u8, 132u8, + 166u8, 113u8, 89u8, 180u8, 124u8, 169u8, 208u8, 241u8, 183u8, 159u8, 151u8, 207u8, + 100u8, 207u8, 133u8, 133u8, 250u8, 54u8, 45u8, 80u8, ], [ - 131u8, 164u8, 143u8, 188u8, 252u8, 153u8, 19u8, 53u8, 49u8, 78u8, 116u8, - 208u8, 73u8, 106u8, 171u8, 106u8, 25u8, 135u8, 233u8, 146u8, 221u8, - 200u8, 93u8, 221u8, 188u8, 196u8, 214u8, 221u8, 110u8, 242u8, 233u8, - 252u8, + 131u8, 164u8, 143u8, 188u8, 252u8, 153u8, 19u8, 53u8, 49u8, 78u8, 116u8, 208u8, + 73u8, 106u8, 171u8, 106u8, 25u8, 135u8, 233u8, 146u8, 221u8, 200u8, 93u8, 221u8, + 188u8, 196u8, 214u8, 221u8, 110u8, 242u8, 233u8, 252u8, ], ]; - /// The names of the variants in the same order as `SELECTORS`. - pub const VARIANT_NAMES: &'static [&'static str] = &[ - ::core::stringify!(FactoryDisabled), - ::core::stringify!(PoolCreated), - ]; /// The signatures in the same order as `SELECTORS`. pub const SIGNATURES: &'static [&'static str] = &[ ::SIGNATURE, ::SIGNATURE, ]; + /// The names of the variants in the same order as `SELECTORS`. + pub const VARIANT_NAMES: &'static [&'static str] = &[ + ::core::stringify!(FactoryDisabled), + ::core::stringify!(PoolCreated), + ]; + /// Returns the signature for the given selector, if known. #[inline] pub fn signature_by_selector( @@ -1217,55 +1202,46 @@ function version() external view returns (string memory); ::core::result::Result::Err(_) => ::core::option::Option::None, } } + /// Returns the enum variant name for the given selector, if known. #[inline] - pub fn name_by_selector( - selector: [u8; 32usize], - ) -> ::core::option::Option<&'static str> { + pub fn name_by_selector(selector: [u8; 32usize]) -> ::core::option::Option<&'static str> { let sig = Self::signature_by_selector(selector)?; sig.split_once('(').map(|(name, _)| name) } } #[automatically_derived] impl alloy_sol_types::SolEventInterface for BalancerV2WeightedPoolFactoryV4Events { - const NAME: &'static str = "BalancerV2WeightedPoolFactoryV4Events"; const COUNT: usize = 2usize; + const NAME: &'static str = "BalancerV2WeightedPoolFactoryV4Events"; + 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, - ) + ::decode_raw_log(topics, data) .map(Self::FactoryDisabled) } Some(::SIGNATURE_HASH) => { - ::decode_raw_log( - topics, - data, - ) + ::decode_raw_log(topics, data) .map(Self::PoolCreated) } - _ => { - 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(), - ), + _ => 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 BalancerV2WeightedPoolFactoryV4Events { + impl alloy_sol_types::private::IntoLogData for BalancerV2WeightedPoolFactoryV4Events { fn to_log_data(&self) -> alloy_sol_types::private::LogData { match self { Self::FactoryDisabled(inner) => { @@ -1276,6 +1252,7 @@ function version() external view returns (string memory); } } } + fn into_log_data(self) -> alloy_sol_types::private::LogData { match self { Self::FactoryDisabled(inner) => { @@ -1287,10 +1264,10 @@ function version() external view returns (string memory); } } } - use alloy_contract as alloy_contract; + use alloy_contract; /**Creates a new wrapper around an on-chain [`BalancerV2WeightedPoolFactoryV4`](self) contract instance. -See the [wrapper's documentation](`BalancerV2WeightedPoolFactoryV4Instance`) for more details.*/ + See the [wrapper's documentation](`BalancerV2WeightedPoolFactoryV4Instance`) for more details.*/ #[inline] pub const fn new< P: alloy_contract::private::Provider, @@ -1303,20 +1280,17 @@ See the [wrapper's documentation](`BalancerV2WeightedPoolFactoryV4Instance`) for } /**A [`BalancerV2WeightedPoolFactoryV4`](self) instance. -Contains type-safe methods for interacting with an on-chain instance of the -[`BalancerV2WeightedPoolFactoryV4`](self) contract located at a given `address`, using a given -provider `P`. + Contains type-safe methods for interacting with an on-chain instance of the + [`BalancerV2WeightedPoolFactoryV4`](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. + 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.*/ + See the [module-level documentation](self) for all the available methods.*/ #[derive(Clone)] - pub struct BalancerV2WeightedPoolFactoryV4Instance< - P, - N = alloy_contract::private::Ethereum, - > { + pub struct BalancerV2WeightedPoolFactoryV4Instance { address: alloy_sol_types::private::Address, provider: P, _network: ::core::marker::PhantomData, @@ -1331,39 +1305,39 @@ See the [module-level documentation](self) for all the available methods.*/ } } /// Instantiation and getters/setters. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > BalancerV2WeightedPoolFactoryV4Instance { + impl, N: alloy_contract::private::Network> + BalancerV2WeightedPoolFactoryV4Instance + { /**Creates a new wrapper around an on-chain [`BalancerV2WeightedPoolFactoryV4`](self) contract instance. -See the [wrapper's documentation](`BalancerV2WeightedPoolFactoryV4Instance`) for more details.*/ + See the [wrapper's documentation](`BalancerV2WeightedPoolFactoryV4Instance`) for more details.*/ #[inline] - pub const fn new( - address: alloy_sol_types::private::Address, - __provider: P, - ) -> Self { + pub const fn new(address: alloy_sol_types::private::Address, __provider: P) -> Self { Self { address, provider: __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 { @@ -1371,11 +1345,10 @@ See the [wrapper's documentation](`BalancerV2WeightedPoolFactoryV4Instance`) for } } impl BalancerV2WeightedPoolFactoryV4Instance<&P, N> { - /// Clones the provider and returns a new instance with the cloned provider. + /// Clones the provider and returns a new instance with the cloned + /// provider. #[inline] - pub fn with_cloned_provider( - self, - ) -> BalancerV2WeightedPoolFactoryV4Instance { + pub fn with_cloned_provider(self) -> BalancerV2WeightedPoolFactoryV4Instance { BalancerV2WeightedPoolFactoryV4Instance { address: self.address, provider: ::core::clone::Clone::clone(&self.provider), @@ -1384,20 +1357,22 @@ See the [wrapper's documentation](`BalancerV2WeightedPoolFactoryV4Instance`) for } } /// Function calls. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > BalancerV2WeightedPoolFactoryV4Instance { - /// Creates a new call builder using this contract instance's provider and address. + impl, N: alloy_contract::private::Network> + BalancerV2WeightedPoolFactoryV4Instance + { + /// 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. + /// 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 [`create`] function. pub fn create( &self, @@ -1407,53 +1382,52 @@ See the [wrapper's documentation](`BalancerV2WeightedPoolFactoryV4Instance`) for normalizedWeights: alloy_sol_types::private::Vec< alloy_sol_types::private::primitives::aliases::U256, >, - rateProviders: alloy_sol_types::private::Vec< - alloy_sol_types::private::Address, - >, + rateProviders: alloy_sol_types::private::Vec, swapFeePercentage: alloy_sol_types::private::primitives::aliases::U256, owner: alloy_sol_types::private::Address, ) -> alloy_contract::SolCallBuilder<&P, createCall, N> { - self.call_builder( - &createCall { - name, - symbol, - tokens, - normalizedWeights, - rateProviders, - swapFeePercentage, - owner, - }, - ) + self.call_builder(&createCall { + name, + symbol, + tokens, + normalizedWeights, + rateProviders, + swapFeePercentage, + owner, + }) } + ///Creates a new call builder for the [`disable`] function. pub fn disable(&self) -> alloy_contract::SolCallBuilder<&P, disableCall, N> { self.call_builder(&disableCall) } + ///Creates a new call builder for the [`version`] function. pub fn version(&self) -> alloy_contract::SolCallBuilder<&P, versionCall, N> { self.call_builder(&versionCall) } } /// Event filters. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > BalancerV2WeightedPoolFactoryV4Instance { - /// Creates a new event filter using this contract instance's provider and address. + impl, N: alloy_contract::private::Network> + BalancerV2WeightedPoolFactoryV4Instance + { + /// 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. + /// 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 [`FactoryDisabled`] event. - pub fn FactoryDisabled_filter( - &self, - ) -> alloy_contract::Event<&P, FactoryDisabled, N> { + pub fn FactoryDisabled_filter(&self) -> alloy_contract::Event<&P, FactoryDisabled, N> { self.event_filter::() } + ///Creates a new event filter for the [`PoolCreated`] event. pub fn PoolCreated_filter(&self) -> alloy_contract::Event<&P, PoolCreated, N> { self.event_filter::() @@ -1464,85 +1438,49 @@ pub type Instance = BalancerV2WeightedPoolFactoryV4::BalancerV2WeightedPoolFacto ::alloy_provider::DynProvider, >; use { - std::{sync::LazyLock, collections::HashMap}, - anyhow::{Result, Context}, - alloy_primitives::{address, Address}, - alloy_provider::{Provider, DynProvider}, + alloy_primitives::{Address, address}, + alloy_provider::{DynProvider, Provider}, + anyhow::{Context, Result}, + std::{collections::HashMap, sync::LazyLock}, }; pub const fn deployment_info(chain_id: u64) -> Option<(Address, Option)> { match chain_id { - 1u64 => { - Some(( - ::alloy_primitives::address!( - "0x897888115Ada5773E02aA29F775430BFB5F34c51" - ), - Some(16878323u64), - )) - } - 10u64 => { - Some(( - ::alloy_primitives::address!( - "0x230a59F4d9ADc147480f03B0D3fFfeCd56c3289a" - ), - Some(82737545u64), - )) - } - 56u64 => { - Some(( - ::alloy_primitives::address!( - "0x230a59F4d9ADc147480f03B0D3fFfeCd56c3289a" - ), - Some(26665331u64), - )) - } - 100u64 => { - Some(( - ::alloy_primitives::address!( - "0x6CaD2ea22BFA7F4C14Aae92E47F510Cd5C509bc7" - ), - Some(27055829u64), - )) - } - 137u64 => { - Some(( - ::alloy_primitives::address!( - "0xFc8a407Bba312ac761D8BFe04CE1201904842B76" - ), - Some(40611103u64), - )) - } - 8453u64 => { - Some(( - ::alloy_primitives::address!( - "0x4C32a8a8fDa4E24139B51b456B42290f51d6A1c4" - ), - Some(1204869u64), - )) - } - 42161u64 => { - Some(( - ::alloy_primitives::address!( - "0xc7E5ED1054A24Ef31D827E6F86caA58B3Bc168d7" - ), - Some(72222060u64), - )) - } - 43114u64 => { - Some(( - ::alloy_primitives::address!( - "0x230a59F4d9ADc147480f03B0D3fFfeCd56c3289a" - ), - Some(27739006u64), - )) - } - 11155111u64 => { - Some(( - ::alloy_primitives::address!( - "0x7920BFa1b2041911b354747CA7A6cDD2dfC50Cfd" - ), - Some(3424893u64), - )) - } + 1u64 => Some(( + ::alloy_primitives::address!("0x897888115Ada5773E02aA29F775430BFB5F34c51"), + Some(16878323u64), + )), + 10u64 => Some(( + ::alloy_primitives::address!("0x230a59F4d9ADc147480f03B0D3fFfeCd56c3289a"), + Some(82737545u64), + )), + 56u64 => Some(( + ::alloy_primitives::address!("0x230a59F4d9ADc147480f03B0D3fFfeCd56c3289a"), + Some(26665331u64), + )), + 100u64 => Some(( + ::alloy_primitives::address!("0x6CaD2ea22BFA7F4C14Aae92E47F510Cd5C509bc7"), + Some(27055829u64), + )), + 137u64 => Some(( + ::alloy_primitives::address!("0xFc8a407Bba312ac761D8BFe04CE1201904842B76"), + Some(40611103u64), + )), + 8453u64 => Some(( + ::alloy_primitives::address!("0x4C32a8a8fDa4E24139B51b456B42290f51d6A1c4"), + Some(1204869u64), + )), + 42161u64 => Some(( + ::alloy_primitives::address!("0xc7E5ED1054A24Ef31D827E6F86caA58B3Bc168d7"), + Some(72222060u64), + )), + 43114u64 => Some(( + ::alloy_primitives::address!("0x230a59F4d9ADc147480f03B0D3fFfeCd56c3289a"), + Some(27739006u64), + )), + 11155111u64 => Some(( + ::alloy_primitives::address!("0x7920BFa1b2041911b354747CA7A6cDD2dfC50Cfd"), + Some(3424893u64), + )), _ => None, } } @@ -1559,9 +1497,7 @@ pub const fn deployment_block(chain_id: &u64) -> Option { } } impl Instance { - pub fn deployed( - provider: &DynProvider, - ) -> impl Future> + Send { + pub fn deployed(provider: &DynProvider) -> impl Future> + Send { async move { let chain_id = provider .get_chain_id() diff --git a/contracts/generated/contracts-generated/balancerv3batchrouter/src/lib.rs b/contracts/generated/contracts-generated/balancerv3batchrouter/src/lib.rs index dd3cd1fa36..3aab955dfa 100644 --- a/contracts/generated/contracts-generated/balancerv3batchrouter/src/lib.rs +++ b/contracts/generated/contracts-generated/balancerv3batchrouter/src/lib.rs @@ -1,4 +1,10 @@ -#![allow(unused_imports, unused_attributes, clippy::all, rustdoc::all, non_snake_case)] +#![allow( + unused_imports, + unused_attributes, + clippy::all, + rustdoc::all, + non_snake_case +)] //! Auto-generated contract bindings. Do not edit. /** @@ -183,8 +189,7 @@ interface BalancerV3BatchRouter { clippy::empty_structs_with_brackets )] pub mod BalancerV3BatchRouter { - use super::*; - use alloy_sol_types as alloy_sol_types; + use {super::*, alloy_sol_types}; /// The creation / init bytecode of the contract. /// /// ```text @@ -207,9 +212,9 @@ pub mod BalancerV3BatchRouter { ); #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Custom error with signature `AddressEmptyCode(address)` and selector `0x9996b315`. -```solidity -error AddressEmptyCode(address target); -```*/ + ```solidity + error AddressEmptyCode(address target); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct AddressEmptyCode { @@ -223,7 +228,7 @@ error AddressEmptyCode(address target); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[doc(hidden)] #[allow(dead_code)] type UnderlyingSolTuple<'a> = (alloy_sol_types::sol_data::Address,); @@ -231,9 +236,7 @@ error AddressEmptyCode(address target); type UnderlyingRustTuple<'a> = (alloy_sol_types::private::Address,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -257,17 +260,18 @@ error AddressEmptyCode(address target); #[automatically_derived] impl alloy_sol_types::SolError for AddressEmptyCode { type Parameters<'a> = UnderlyingSolTuple<'a>; - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "AddressEmptyCode(address)"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [153u8, 150u8, 179u8, 21u8]; + const SIGNATURE: &'static str = "AddressEmptyCode(address)"; + #[inline] fn new<'a>( tuple: as alloy_sol_types::SolType>::RustType, ) -> Self { tuple.into() } + #[inline] fn tokenize(&self) -> Self::Token<'_> { ( @@ -276,20 +280,21 @@ error AddressEmptyCode(address target); ), ) } + #[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) + as alloy_sol_types::SolType>::abi_decode_sequence_validate( + data, + ) + .map(Self::new) } } }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Custom error with signature `AddressInsufficientBalance(address)` and selector `0xcd786059`. -```solidity -error AddressInsufficientBalance(address account); -```*/ + ```solidity + error AddressInsufficientBalance(address account); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct AddressInsufficientBalance { @@ -303,7 +308,7 @@ error AddressInsufficientBalance(address account); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[doc(hidden)] #[allow(dead_code)] type UnderlyingSolTuple<'a> = (alloy_sol_types::sol_data::Address,); @@ -311,9 +316,7 @@ error AddressInsufficientBalance(address account); type UnderlyingRustTuple<'a> = (alloy_sol_types::private::Address,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -322,16 +325,14 @@ error AddressInsufficientBalance(address account); } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From - for UnderlyingRustTuple<'_> { + impl ::core::convert::From for UnderlyingRustTuple<'_> { fn from(value: AddressInsufficientBalance) -> Self { (value.account,) } } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From> - for AddressInsufficientBalance { + impl ::core::convert::From> for AddressInsufficientBalance { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { Self { account: tuple.0 } } @@ -339,17 +340,18 @@ error AddressInsufficientBalance(address account); #[automatically_derived] impl alloy_sol_types::SolError for AddressInsufficientBalance { type Parameters<'a> = UnderlyingSolTuple<'a>; - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "AddressInsufficientBalance(address)"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [205u8, 120u8, 96u8, 89u8]; + const SIGNATURE: &'static str = "AddressInsufficientBalance(address)"; + #[inline] fn new<'a>( tuple: as alloy_sol_types::SolType>::RustType, ) -> Self { tuple.into() } + #[inline] fn tokenize(&self) -> Self::Token<'_> { ( @@ -358,20 +360,21 @@ error AddressInsufficientBalance(address account); ), ) } + #[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) + as alloy_sol_types::SolType>::abi_decode_sequence_validate( + data, + ) + .map(Self::new) } } }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Custom error with signature `ErrorSelectorNotFound()` and selector `0xa7285689`. -```solidity -error ErrorSelectorNotFound(); -```*/ + ```solidity + error ErrorSelectorNotFound(); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct ErrorSelectorNotFound; @@ -382,7 +385,7 @@ error ErrorSelectorNotFound(); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[doc(hidden)] #[allow(dead_code)] type UnderlyingSolTuple<'a> = (); @@ -390,9 +393,7 @@ error ErrorSelectorNotFound(); type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -416,35 +417,37 @@ error ErrorSelectorNotFound(); #[automatically_derived] impl alloy_sol_types::SolError for ErrorSelectorNotFound { type Parameters<'a> = UnderlyingSolTuple<'a>; - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "ErrorSelectorNotFound()"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [167u8, 40u8, 86u8, 137u8]; + const SIGNATURE: &'static str = "ErrorSelectorNotFound()"; + #[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) + as alloy_sol_types::SolType>::abi_decode_sequence_validate( + data, + ) + .map(Self::new) } } }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Custom error with signature `EthTransfer()` and selector `0x0540ddf6`. -```solidity -error EthTransfer(); -```*/ + ```solidity + error EthTransfer(); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct EthTransfer; @@ -455,7 +458,7 @@ error EthTransfer(); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[doc(hidden)] #[allow(dead_code)] type UnderlyingSolTuple<'a> = (); @@ -463,9 +466,7 @@ error EthTransfer(); type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -489,35 +490,37 @@ error EthTransfer(); #[automatically_derived] impl alloy_sol_types::SolError for EthTransfer { type Parameters<'a> = UnderlyingSolTuple<'a>; - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "EthTransfer()"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [5u8, 64u8, 221u8, 246u8]; + const SIGNATURE: &'static str = "EthTransfer()"; + #[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) + as alloy_sol_types::SolType>::abi_decode_sequence_validate( + data, + ) + .map(Self::new) } } }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Custom error with signature `FailedInnerCall()` and selector `0x1425ea42`. -```solidity -error FailedInnerCall(); -```*/ + ```solidity + error FailedInnerCall(); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct FailedInnerCall; @@ -528,7 +531,7 @@ error FailedInnerCall(); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[doc(hidden)] #[allow(dead_code)] type UnderlyingSolTuple<'a> = (); @@ -536,9 +539,7 @@ error FailedInnerCall(); type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -562,35 +563,37 @@ error FailedInnerCall(); #[automatically_derived] impl alloy_sol_types::SolError for FailedInnerCall { type Parameters<'a> = UnderlyingSolTuple<'a>; - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "FailedInnerCall()"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [20u8, 37u8, 234u8, 66u8]; + const SIGNATURE: &'static str = "FailedInnerCall()"; + #[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) + as alloy_sol_types::SolType>::abi_decode_sequence_validate( + data, + ) + .map(Self::new) } } }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Custom error with signature `InputLengthMismatch()` and selector `0xaaad13f7`. -```solidity -error InputLengthMismatch(); -```*/ + ```solidity + error InputLengthMismatch(); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct InputLengthMismatch; @@ -601,7 +604,7 @@ error InputLengthMismatch(); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[doc(hidden)] #[allow(dead_code)] type UnderlyingSolTuple<'a> = (); @@ -609,9 +612,7 @@ error InputLengthMismatch(); type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -635,35 +636,37 @@ error InputLengthMismatch(); #[automatically_derived] impl alloy_sol_types::SolError for InputLengthMismatch { type Parameters<'a> = UnderlyingSolTuple<'a>; - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "InputLengthMismatch()"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [170u8, 173u8, 19u8, 247u8]; + const SIGNATURE: &'static str = "InputLengthMismatch()"; + #[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) + as alloy_sol_types::SolType>::abi_decode_sequence_validate( + data, + ) + .map(Self::new) } } }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Custom error with signature `InsufficientEth()` and selector `0xa01a9df6`. -```solidity -error InsufficientEth(); -```*/ + ```solidity + error InsufficientEth(); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct InsufficientEth; @@ -674,7 +677,7 @@ error InsufficientEth(); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[doc(hidden)] #[allow(dead_code)] type UnderlyingSolTuple<'a> = (); @@ -682,9 +685,7 @@ error InsufficientEth(); type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -708,35 +709,37 @@ error InsufficientEth(); #[automatically_derived] impl alloy_sol_types::SolError for InsufficientEth { type Parameters<'a> = UnderlyingSolTuple<'a>; - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "InsufficientEth()"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [160u8, 26u8, 157u8, 246u8]; + const SIGNATURE: &'static str = "InsufficientEth()"; + #[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) + as alloy_sol_types::SolType>::abi_decode_sequence_validate( + data, + ) + .map(Self::new) } } }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Custom error with signature `ReentrancyGuardReentrantCall()` and selector `0x3ee5aeb5`. -```solidity -error ReentrancyGuardReentrantCall(); -```*/ + ```solidity + error ReentrancyGuardReentrantCall(); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct ReentrancyGuardReentrantCall; @@ -747,7 +750,7 @@ error ReentrancyGuardReentrantCall(); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[doc(hidden)] #[allow(dead_code)] type UnderlyingSolTuple<'a> = (); @@ -755,9 +758,7 @@ error ReentrancyGuardReentrantCall(); type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -766,16 +767,14 @@ error ReentrancyGuardReentrantCall(); } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From - for UnderlyingRustTuple<'_> { + impl ::core::convert::From for UnderlyingRustTuple<'_> { fn from(value: ReentrancyGuardReentrantCall) -> Self { () } } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From> - for ReentrancyGuardReentrantCall { + impl ::core::convert::From> for ReentrancyGuardReentrantCall { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { Self } @@ -783,35 +782,37 @@ error ReentrancyGuardReentrantCall(); #[automatically_derived] impl alloy_sol_types::SolError for ReentrancyGuardReentrantCall { type Parameters<'a> = UnderlyingSolTuple<'a>; - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "ReentrancyGuardReentrantCall()"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [62u8, 229u8, 174u8, 181u8]; + const SIGNATURE: &'static str = "ReentrancyGuardReentrantCall()"; + #[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) + as alloy_sol_types::SolType>::abi_decode_sequence_validate( + data, + ) + .map(Self::new) } } }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Custom error with signature `SafeCastOverflowedUintDowncast(uint8,uint256)` and selector `0x6dfcc650`. -```solidity -error SafeCastOverflowedUintDowncast(uint8 bits, uint256 value); -```*/ + ```solidity + error SafeCastOverflowedUintDowncast(uint8 bits, uint256 value); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct SafeCastOverflowedUintDowncast { @@ -827,7 +828,7 @@ error SafeCastOverflowedUintDowncast(uint8 bits, uint256 value); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[doc(hidden)] #[allow(dead_code)] type UnderlyingSolTuple<'a> = ( @@ -835,15 +836,10 @@ error SafeCastOverflowedUintDowncast(uint8 bits, uint256 value); alloy_sol_types::sol_data::Uint<256>, ); #[doc(hidden)] - type UnderlyingRustTuple<'a> = ( - u8, - alloy_sol_types::private::primitives::aliases::U256, - ); + type UnderlyingRustTuple<'a> = (u8, alloy_sol_types::private::primitives::aliases::U256); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -852,16 +848,14 @@ error SafeCastOverflowedUintDowncast(uint8 bits, uint256 value); } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From - for UnderlyingRustTuple<'_> { + impl ::core::convert::From for UnderlyingRustTuple<'_> { fn from(value: SafeCastOverflowedUintDowncast) -> Self { (value.bits, value.value) } } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From> - for SafeCastOverflowedUintDowncast { + impl ::core::convert::From> for SafeCastOverflowedUintDowncast { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { Self { bits: tuple.0, @@ -872,42 +866,44 @@ error SafeCastOverflowedUintDowncast(uint8 bits, uint256 value); #[automatically_derived] impl alloy_sol_types::SolError for SafeCastOverflowedUintDowncast { type Parameters<'a> = UnderlyingSolTuple<'a>; - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "SafeCastOverflowedUintDowncast(uint8,uint256)"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [109u8, 252u8, 198u8, 80u8]; + const SIGNATURE: &'static str = "SafeCastOverflowedUintDowncast(uint8,uint256)"; + #[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.bits), - as alloy_sol_types::SolType>::tokenize(&self.value), + as alloy_sol_types::SolType>::tokenize( + &self.bits, + ), + as alloy_sol_types::SolType>::tokenize( + &self.value, + ), ) } + #[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) + as alloy_sol_types::SolType>::abi_decode_sequence_validate( + data, + ) + .map(Self::new) } } }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Custom error with signature `SafeERC20FailedOperation(address)` and selector `0x5274afe7`. -```solidity -error SafeERC20FailedOperation(address token); -```*/ + ```solidity + error SafeERC20FailedOperation(address token); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct SafeERC20FailedOperation { @@ -921,7 +917,7 @@ error SafeERC20FailedOperation(address token); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[doc(hidden)] #[allow(dead_code)] type UnderlyingSolTuple<'a> = (alloy_sol_types::sol_data::Address,); @@ -929,9 +925,7 @@ error SafeERC20FailedOperation(address token); type UnderlyingRustTuple<'a> = (alloy_sol_types::private::Address,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -940,16 +934,14 @@ error SafeERC20FailedOperation(address token); } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From - for UnderlyingRustTuple<'_> { + impl ::core::convert::From for UnderlyingRustTuple<'_> { fn from(value: SafeERC20FailedOperation) -> Self { (value.token,) } } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From> - for SafeERC20FailedOperation { + impl ::core::convert::From> for SafeERC20FailedOperation { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { Self { token: tuple.0 } } @@ -957,17 +949,18 @@ error SafeERC20FailedOperation(address token); #[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)"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [82u8, 116u8, 175u8, 231u8]; + const SIGNATURE: &'static str = "SafeERC20FailedOperation(address)"; + #[inline] fn new<'a>( tuple: as alloy_sol_types::SolType>::RustType, ) -> Self { tuple.into() } + #[inline] fn tokenize(&self) -> Self::Token<'_> { ( @@ -976,20 +969,21 @@ error SafeERC20FailedOperation(address 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) + as alloy_sol_types::SolType>::abi_decode_sequence_validate( + data, + ) + .map(Self::new) } } }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Custom error with signature `SenderIsNotVault(address)` and selector `0x089676d5`. -```solidity -error SenderIsNotVault(address sender); -```*/ + ```solidity + error SenderIsNotVault(address sender); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct SenderIsNotVault { @@ -1003,7 +997,7 @@ error SenderIsNotVault(address sender); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[doc(hidden)] #[allow(dead_code)] type UnderlyingSolTuple<'a> = (alloy_sol_types::sol_data::Address,); @@ -1011,9 +1005,7 @@ error SenderIsNotVault(address sender); type UnderlyingRustTuple<'a> = (alloy_sol_types::private::Address,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1037,17 +1029,18 @@ error SenderIsNotVault(address sender); #[automatically_derived] impl alloy_sol_types::SolError for SenderIsNotVault { type Parameters<'a> = UnderlyingSolTuple<'a>; - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "SenderIsNotVault(address)"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [8u8, 150u8, 118u8, 213u8]; + const SIGNATURE: &'static str = "SenderIsNotVault(address)"; + #[inline] fn new<'a>( tuple: as alloy_sol_types::SolType>::RustType, ) -> Self { tuple.into() } + #[inline] fn tokenize(&self) -> Self::Token<'_> { ( @@ -1056,20 +1049,21 @@ error SenderIsNotVault(address 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) + as alloy_sol_types::SolType>::abi_decode_sequence_validate( + data, + ) + .map(Self::new) } } }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Custom error with signature `SwapDeadline()` and selector `0xe08b8af0`. -```solidity -error SwapDeadline(); -```*/ + ```solidity + error SwapDeadline(); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct SwapDeadline; @@ -1080,7 +1074,7 @@ error SwapDeadline(); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[doc(hidden)] #[allow(dead_code)] type UnderlyingSolTuple<'a> = (); @@ -1088,9 +1082,7 @@ error SwapDeadline(); type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1114,35 +1106,37 @@ error SwapDeadline(); #[automatically_derived] impl alloy_sol_types::SolError for SwapDeadline { type Parameters<'a> = UnderlyingSolTuple<'a>; - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "SwapDeadline()"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [224u8, 139u8, 138u8, 240u8]; + const SIGNATURE: &'static str = "SwapDeadline()"; + #[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) + as alloy_sol_types::SolType>::abi_decode_sequence_validate( + data, + ) + .map(Self::new) } } }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Custom error with signature `TransientIndexOutOfBounds()` and selector `0x0f4ae0e4`. -```solidity -error TransientIndexOutOfBounds(); -```*/ + ```solidity + error TransientIndexOutOfBounds(); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct TransientIndexOutOfBounds; @@ -1153,7 +1147,7 @@ error TransientIndexOutOfBounds(); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[doc(hidden)] #[allow(dead_code)] type UnderlyingSolTuple<'a> = (); @@ -1161,9 +1155,7 @@ error TransientIndexOutOfBounds(); type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1172,16 +1164,14 @@ error TransientIndexOutOfBounds(); } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From - for UnderlyingRustTuple<'_> { + impl ::core::convert::From for UnderlyingRustTuple<'_> { fn from(value: TransientIndexOutOfBounds) -> Self { () } } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From> - for TransientIndexOutOfBounds { + impl ::core::convert::From> for TransientIndexOutOfBounds { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { Self } @@ -1189,34 +1179,36 @@ error TransientIndexOutOfBounds(); #[automatically_derived] impl alloy_sol_types::SolError for TransientIndexOutOfBounds { type Parameters<'a> = UnderlyingSolTuple<'a>; - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "TransientIndexOutOfBounds()"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [15u8, 74u8, 224u8, 228u8]; + const SIGNATURE: &'static str = "TransientIndexOutOfBounds()"; + #[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) + as alloy_sol_types::SolType>::abi_decode_sequence_validate( + data, + ) + .map(Self::new) } } }; /**Constructor`. -```solidity -constructor(address vault, address weth, address permit2, string routerVersion); -```*/ + ```solidity + constructor(address vault, address weth, address permit2, string routerVersion); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct constructorCall { @@ -1230,7 +1222,7 @@ constructor(address vault, address weth, address permit2, string routerVersion); pub routerVersion: alloy_sol_types::private::String, } const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -1249,9 +1241,7 @@ constructor(address vault, address weth, address permit2, string routerVersion); ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1286,15 +1276,15 @@ constructor(address vault, address weth, address permit2, string routerVersion); alloy_sol_types::sol_data::Address, alloy_sol_types::sol_data::String, ); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + 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<'_> { ( @@ -1316,14 +1306,15 @@ constructor(address vault, address weth, address permit2, string routerVersion); }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `version()` and selector `0x54fd4d50`. -```solidity -function version() external view returns (string memory); -```*/ + ```solidity + function version() external view returns (string memory); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct versionCall; #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`version()`](versionCall) function. + ///Container type for the return parameters of the + /// [`version()`](versionCall) function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct versionReturn { @@ -1337,7 +1328,7 @@ function version() external view returns (string memory); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -1346,9 +1337,7 @@ function version() external view returns (string memory); type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1378,9 +1367,7 @@ function version() external view returns (string memory); type UnderlyingRustTuple<'a> = (alloy_sol_types::private::String,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1405,61 +1392,55 @@ function version() external view returns (string memory); #[automatically_derived] impl alloy_sol_types::SolCall for versionCall { type Parameters<'a> = (); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = alloy_sol_types::private::String; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (alloy_sol_types::sol_data::String,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "version()"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [84u8, 253u8, 77u8, 80u8]; + const SIGNATURE: &'static str = "version()"; + #[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, - ), - ) + (::tokenize(ret),) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) - .map(|r| { + as alloy_sol_types::SolType>::abi_decode_sequence(data).map( + |r| { let r: versionReturn = 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: versionReturn = r.into(); - r._0 - }) + 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: versionReturn = r.into(); + r._0 + }) } } }; ///Container for all the [`BalancerV3BatchRouter`](self) function calls. #[derive(Clone)] - #[derive()] pub enum BalancerV3BatchRouterCalls { #[allow(missing_docs)] version(versionCall), @@ -1467,19 +1448,18 @@ function version() external view returns (string memory); impl BalancerV3BatchRouterCalls { /// 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. + /// 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]] = &[[84u8, 253u8, 77u8, 80u8]]; - /// The names of the variants in the same order as `SELECTORS`. - pub const VARIANT_NAMES: &'static [&'static str] = &[ - ::core::stringify!(version), - ]; /// The signatures in the same order as `SELECTORS`. - pub const SIGNATURES: &'static [&'static str] = &[ - ::SIGNATURE, - ]; + pub const SIGNATURES: &'static [&'static str] = + &[::SIGNATURE]; + /// The names of the variants in the same order as `SELECTORS`. + pub const VARIANT_NAMES: &'static [&'static str] = &[::core::stringify!(version)]; + /// Returns the signature for the given selector, if known. #[inline] pub fn signature_by_selector( @@ -1492,63 +1472,59 @@ function version() external view returns (string memory); ::core::result::Result::Err(_) => ::core::option::Option::None, } } + /// Returns the enum variant name for the given selector, if known. #[inline] - pub fn name_by_selector( - selector: [u8; 4usize], - ) -> ::core::option::Option<&'static str> { + pub fn name_by_selector(selector: [u8; 4usize]) -> ::core::option::Option<&'static str> { let sig = Self::signature_by_selector(selector)?; sig.split_once('(').map(|(name, _)| name) } } #[automatically_derived] impl alloy_sol_types::SolInterface for BalancerV3BatchRouterCalls { - const NAME: &'static str = "BalancerV3BatchRouterCalls"; - const MIN_DATA_LENGTH: usize = 0usize; const COUNT: usize = 1usize; + const MIN_DATA_LENGTH: usize = 0usize; + const NAME: &'static str = "BalancerV3BatchRouterCalls"; + #[inline] fn selector(&self) -> [u8; 4] { match self { Self::version(_) => ::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 { + fn abi_decode_raw(selector: [u8; 4], data: &[u8]) -> alloy_sol_types::Result { static DECODE_SHIMS: &[fn( &[u8], - ) -> alloy_sol_types::Result] = &[ - { - fn version( - data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw(data) - .map(BalancerV3BatchRouterCalls::version) - } - version - }, - ]; + ) + -> alloy_sol_types::Result] = &[{ + fn version(data: &[u8]) -> alloy_sol_types::Result { + ::abi_decode_raw(data) + .map(BalancerV3BatchRouterCalls::version) + } + version + }]; let Ok(idx) = Self::SELECTORS.binary_search(&selector) else { - return Err( - alloy_sol_types::Error::unknown_selector( - ::NAME, - selector, - ), - ); + return Err(alloy_sol_types::Error::unknown_selector( + ::NAME, + selector, + )); }; DECODE_SHIMS[idx](data) } + #[inline] #[allow(non_snake_case)] fn abi_decode_raw_validate( @@ -1557,29 +1533,24 @@ function version() external view returns (string memory); ) -> alloy_sol_types::Result { static DECODE_VALIDATE_SHIMS: &[fn( &[u8], - ) -> alloy_sol_types::Result] = &[ - { - fn version( - data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) - .map(BalancerV3BatchRouterCalls::version) - } - version - }, - ]; + ) -> alloy_sol_types::Result< + BalancerV3BatchRouterCalls, + >] = &[{ + fn version(data: &[u8]) -> alloy_sol_types::Result { + ::abi_decode_raw_validate(data) + .map(BalancerV3BatchRouterCalls::version) + } + version + }]; let Ok(idx) = Self::SELECTORS.binary_search(&selector) else { - return Err( - alloy_sol_types::Error::unknown_selector( - ::NAME, - selector, - ), - ); + return Err(alloy_sol_types::Error::unknown_selector( + ::NAME, + selector, + )); }; DECODE_VALIDATE_SHIMS[idx](data) } + #[inline] fn abi_encoded_size(&self) -> usize { match self { @@ -1588,6 +1559,7 @@ function version() external view returns (string memory); } } } + #[inline] fn abi_encode_raw(&self, out: &mut alloy_sol_types::private::Vec) { match self { @@ -1598,8 +1570,7 @@ function version() external view returns (string memory); } } ///Container for all the [`BalancerV3BatchRouter`](self) custom errors. - #[derive(Clone)] - #[derive(Debug, PartialEq, Eq, Hash)] + #[derive(Clone, Debug, PartialEq, Eq, Hash)] pub enum BalancerV3BatchRouterErrors { #[allow(missing_docs)] AddressEmptyCode(AddressEmptyCode), @@ -1631,8 +1602,9 @@ function version() external view returns (string memory); impl BalancerV3BatchRouterErrors { /// 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. + /// 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]] = &[ @@ -1650,22 +1622,6 @@ function version() external view returns (string memory); [205u8, 120u8, 96u8, 89u8], [224u8, 139u8, 138u8, 240u8], ]; - /// The names of the variants in the same order as `SELECTORS`. - pub const VARIANT_NAMES: &'static [&'static str] = &[ - ::core::stringify!(EthTransfer), - ::core::stringify!(SenderIsNotVault), - ::core::stringify!(TransientIndexOutOfBounds), - ::core::stringify!(FailedInnerCall), - ::core::stringify!(ReentrancyGuardReentrantCall), - ::core::stringify!(SafeERC20FailedOperation), - ::core::stringify!(SafeCastOverflowedUintDowncast), - ::core::stringify!(AddressEmptyCode), - ::core::stringify!(InsufficientEth), - ::core::stringify!(ErrorSelectorNotFound), - ::core::stringify!(InputLengthMismatch), - ::core::stringify!(AddressInsufficientBalance), - ::core::stringify!(SwapDeadline), - ]; /// The signatures in the same order as `SELECTORS`. pub const SIGNATURES: &'static [&'static str] = &[ ::SIGNATURE, @@ -1682,6 +1638,23 @@ function version() external view returns (string memory); ::SIGNATURE, ::SIGNATURE, ]; + /// The names of the variants in the same order as `SELECTORS`. + pub const VARIANT_NAMES: &'static [&'static str] = &[ + ::core::stringify!(EthTransfer), + ::core::stringify!(SenderIsNotVault), + ::core::stringify!(TransientIndexOutOfBounds), + ::core::stringify!(FailedInnerCall), + ::core::stringify!(ReentrancyGuardReentrantCall), + ::core::stringify!(SafeERC20FailedOperation), + ::core::stringify!(SafeCastOverflowedUintDowncast), + ::core::stringify!(AddressEmptyCode), + ::core::stringify!(InsufficientEth), + ::core::stringify!(ErrorSelectorNotFound), + ::core::stringify!(InputLengthMismatch), + ::core::stringify!(AddressInsufficientBalance), + ::core::stringify!(SwapDeadline), + ]; + /// Returns the signature for the given selector, if known. #[inline] pub fn signature_by_selector( @@ -1694,20 +1667,20 @@ function version() external view returns (string memory); ::core::result::Result::Err(_) => ::core::option::Option::None, } } + /// Returns the enum variant name for the given selector, if known. #[inline] - pub fn name_by_selector( - selector: [u8; 4usize], - ) -> ::core::option::Option<&'static str> { + pub fn name_by_selector(selector: [u8; 4usize]) -> ::core::option::Option<&'static str> { let sig = Self::signature_by_selector(selector)?; sig.split_once('(').map(|(name, _)| name) } } #[automatically_derived] impl alloy_sol_types::SolInterface for BalancerV3BatchRouterErrors { - const NAME: &'static str = "BalancerV3BatchRouterErrors"; - const MIN_DATA_LENGTH: usize = 0usize; const COUNT: usize = 13usize; + const MIN_DATA_LENGTH: usize = 0usize; + const NAME: &'static str = "BalancerV3BatchRouterErrors"; + #[inline] fn selector(&self) -> [u8; 4] { match self { @@ -1720,9 +1693,7 @@ function version() external view returns (string memory); Self::ErrorSelectorNotFound(_) => { ::SELECTOR } - Self::EthTransfer(_) => { - ::SELECTOR - } + Self::EthTransfer(_) => ::SELECTOR, Self::FailedInnerCall(_) => { ::SELECTOR } @@ -1744,31 +1715,30 @@ function version() external view returns (string memory); Self::SenderIsNotVault(_) => { ::SELECTOR } - Self::SwapDeadline(_) => { - ::SELECTOR - } + Self::SwapDeadline(_) => ::SELECTOR, Self::TransientIndexOutOfBounds(_) => { ::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 { + fn abi_decode_raw(selector: [u8; 4], data: &[u8]) -> alloy_sol_types::Result { static DECODE_SHIMS: &[fn( &[u8], - ) -> alloy_sol_types::Result] = &[ + ) + -> alloy_sol_types::Result] = &[ { fn EthTransfer( data: &[u8], @@ -1782,9 +1752,7 @@ function version() external view returns (string memory); fn SenderIsNotVault( data: &[u8], ) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, - ) + ::abi_decode_raw(data) .map(BalancerV3BatchRouterErrors::SenderIsNotVault) } SenderIsNotVault @@ -1794,9 +1762,9 @@ function version() external view returns (string memory); data: &[u8], ) -> alloy_sol_types::Result { ::abi_decode_raw( - data, - ) - .map(BalancerV3BatchRouterErrors::TransientIndexOutOfBounds) + data, + ) + .map(BalancerV3BatchRouterErrors::TransientIndexOutOfBounds) } TransientIndexOutOfBounds }, @@ -1804,9 +1772,7 @@ function version() external view returns (string memory); fn FailedInnerCall( data: &[u8], ) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, - ) + ::abi_decode_raw(data) .map(BalancerV3BatchRouterErrors::FailedInnerCall) } FailedInnerCall @@ -1816,11 +1782,9 @@ function version() external view returns (string memory); data: &[u8], ) -> alloy_sol_types::Result { ::abi_decode_raw( - data, - ) - .map( - BalancerV3BatchRouterErrors::ReentrancyGuardReentrantCall, - ) + data, + ) + .map(BalancerV3BatchRouterErrors::ReentrancyGuardReentrantCall) } ReentrancyGuardReentrantCall }, @@ -1829,9 +1793,9 @@ function version() external view returns (string memory); data: &[u8], ) -> alloy_sol_types::Result { ::abi_decode_raw( - data, - ) - .map(BalancerV3BatchRouterErrors::SafeERC20FailedOperation) + data, + ) + .map(BalancerV3BatchRouterErrors::SafeERC20FailedOperation) } SafeERC20FailedOperation }, @@ -1852,9 +1816,7 @@ function version() external view returns (string memory); fn AddressEmptyCode( data: &[u8], ) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, - ) + ::abi_decode_raw(data) .map(BalancerV3BatchRouterErrors::AddressEmptyCode) } AddressEmptyCode @@ -1863,9 +1825,7 @@ function version() external view returns (string memory); fn InsufficientEth( data: &[u8], ) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, - ) + ::abi_decode_raw(data) .map(BalancerV3BatchRouterErrors::InsufficientEth) } InsufficientEth @@ -1874,9 +1834,7 @@ function version() external view returns (string memory); fn ErrorSelectorNotFound( data: &[u8], ) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, - ) + ::abi_decode_raw(data) .map(BalancerV3BatchRouterErrors::ErrorSelectorNotFound) } ErrorSelectorNotFound @@ -1885,9 +1843,7 @@ function version() external view returns (string memory); fn InputLengthMismatch( data: &[u8], ) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, - ) + ::abi_decode_raw(data) .map(BalancerV3BatchRouterErrors::InputLengthMismatch) } InputLengthMismatch @@ -1897,9 +1853,9 @@ function version() external view returns (string memory); data: &[u8], ) -> alloy_sol_types::Result { ::abi_decode_raw( - data, - ) - .map(BalancerV3BatchRouterErrors::AddressInsufficientBalance) + data, + ) + .map(BalancerV3BatchRouterErrors::AddressInsufficientBalance) } AddressInsufficientBalance }, @@ -1914,15 +1870,14 @@ function version() external view returns (string memory); }, ]; let Ok(idx) = Self::SELECTORS.binary_search(&selector) else { - return Err( - alloy_sol_types::Error::unknown_selector( - ::NAME, - selector, - ), - ); + return Err(alloy_sol_types::Error::unknown_selector( + ::NAME, + selector, + )); }; DECODE_SHIMS[idx](data) } + #[inline] #[allow(non_snake_case)] fn abi_decode_raw_validate( @@ -1931,14 +1886,14 @@ function version() external view returns (string memory); ) -> alloy_sol_types::Result { static DECODE_VALIDATE_SHIMS: &[fn( &[u8], - ) -> alloy_sol_types::Result] = &[ + ) -> alloy_sol_types::Result< + BalancerV3BatchRouterErrors, + >] = &[ { fn EthTransfer( data: &[u8], ) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) + ::abi_decode_raw_validate(data) .map(BalancerV3BatchRouterErrors::EthTransfer) } EthTransfer @@ -1948,9 +1903,9 @@ function version() external view returns (string memory); data: &[u8], ) -> alloy_sol_types::Result { ::abi_decode_raw_validate( - data, - ) - .map(BalancerV3BatchRouterErrors::SenderIsNotVault) + data, + ) + .map(BalancerV3BatchRouterErrors::SenderIsNotVault) } SenderIsNotVault }, @@ -1970,9 +1925,9 @@ function version() external view returns (string memory); data: &[u8], ) -> alloy_sol_types::Result { ::abi_decode_raw_validate( - data, - ) - .map(BalancerV3BatchRouterErrors::FailedInnerCall) + data, + ) + .map(BalancerV3BatchRouterErrors::FailedInnerCall) } FailedInnerCall }, @@ -2018,9 +1973,9 @@ function version() external view returns (string memory); data: &[u8], ) -> alloy_sol_types::Result { ::abi_decode_raw_validate( - data, - ) - .map(BalancerV3BatchRouterErrors::AddressEmptyCode) + data, + ) + .map(BalancerV3BatchRouterErrors::AddressEmptyCode) } AddressEmptyCode }, @@ -2029,9 +1984,9 @@ function version() external view returns (string memory); data: &[u8], ) -> alloy_sol_types::Result { ::abi_decode_raw_validate( - data, - ) - .map(BalancerV3BatchRouterErrors::InsufficientEth) + data, + ) + .map(BalancerV3BatchRouterErrors::InsufficientEth) } InsufficientEth }, @@ -2051,9 +2006,9 @@ function version() external view returns (string memory); data: &[u8], ) -> alloy_sol_types::Result { ::abi_decode_raw_validate( - data, - ) - .map(BalancerV3BatchRouterErrors::InputLengthMismatch) + data, + ) + .map(BalancerV3BatchRouterErrors::InputLengthMismatch) } InputLengthMismatch }, @@ -2072,31 +2027,26 @@ function version() external view returns (string memory); fn SwapDeadline( data: &[u8], ) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) + ::abi_decode_raw_validate(data) .map(BalancerV3BatchRouterErrors::SwapDeadline) } SwapDeadline }, ]; let Ok(idx) = Self::SELECTORS.binary_search(&selector) else { - return Err( - alloy_sol_types::Error::unknown_selector( - ::NAME, - selector, - ), - ); + 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::AddressEmptyCode(inner) => { - ::abi_encoded_size( - inner, - ) + ::abi_encoded_size(inner) } Self::AddressInsufficientBalance(inner) => { ::abi_encoded_size( @@ -2104,27 +2054,19 @@ function version() external view returns (string memory); ) } Self::ErrorSelectorNotFound(inner) => { - ::abi_encoded_size( - inner, - ) + ::abi_encoded_size(inner) } Self::EthTransfer(inner) => { ::abi_encoded_size(inner) } Self::FailedInnerCall(inner) => { - ::abi_encoded_size( - inner, - ) + ::abi_encoded_size(inner) } Self::InputLengthMismatch(inner) => { - ::abi_encoded_size( - inner, - ) + ::abi_encoded_size(inner) } Self::InsufficientEth(inner) => { - ::abi_encoded_size( - inner, - ) + ::abi_encoded_size(inner) } Self::ReentrancyGuardReentrantCall(inner) => { ::abi_encoded_size( @@ -2137,14 +2079,10 @@ function version() external view returns (string memory); ) } Self::SafeERC20FailedOperation(inner) => { - ::abi_encoded_size( - inner, - ) + ::abi_encoded_size(inner) } Self::SenderIsNotVault(inner) => { - ::abi_encoded_size( - inner, - ) + ::abi_encoded_size(inner) } Self::SwapDeadline(inner) => { ::abi_encoded_size(inner) @@ -2156,94 +2094,66 @@ function version() external view returns (string memory); } } } + #[inline] fn abi_encode_raw(&self, out: &mut alloy_sol_types::private::Vec) { match self { Self::AddressEmptyCode(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } Self::AddressInsufficientBalance(inner) => { ::abi_encode_raw( - inner, - out, + inner, out, ) } Self::ErrorSelectorNotFound(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } Self::EthTransfer(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } Self::FailedInnerCall(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } Self::InputLengthMismatch(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } Self::InsufficientEth(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } Self::ReentrancyGuardReentrantCall(inner) => { ::abi_encode_raw( - inner, - out, + inner, out, ) } Self::SafeCastOverflowedUintDowncast(inner) => { ::abi_encode_raw( - inner, - out, + inner, out, ) } Self::SafeERC20FailedOperation(inner) => { ::abi_encode_raw( - inner, - out, + inner, out, ) } Self::SenderIsNotVault(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } Self::SwapDeadline(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } Self::TransientIndexOutOfBounds(inner) => { ::abi_encode_raw( - inner, - out, + inner, out, ) } } } } - use alloy_contract as alloy_contract; + use alloy_contract; /**Creates a new wrapper around an on-chain [`BalancerV3BatchRouter`](self) contract instance. -See the [wrapper's documentation](`BalancerV3BatchRouterInstance`) for more details.*/ + See the [wrapper's documentation](`BalancerV3BatchRouterInstance`) for more details.*/ #[inline] pub const fn new< P: alloy_contract::private::Provider, @@ -2256,32 +2166,31 @@ See the [wrapper's documentation](`BalancerV3BatchRouterInstance`) for more deta } /**Deploys this contract using the given `provider` and constructor arguments, if any. -Returns a new instance of the contract, if the deployment was successful. + 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.*/ + 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, - >( + pub fn deploy, N: alloy_contract::private::Network>( __provider: P, vault: alloy_sol_types::private::Address, weth: alloy_sol_types::private::Address, permit2: alloy_sol_types::private::Address, routerVersion: alloy_sol_types::private::String, - ) -> impl ::core::future::Future< - Output = alloy_contract::Result>, - > { - BalancerV3BatchRouterInstance::< - P, - N, - >::deploy(__provider, vault, weth, permit2, routerVersion) + ) -> impl ::core::future::Future>> + { + BalancerV3BatchRouterInstance::::deploy( + __provider, + vault, + weth, + permit2, + routerVersion, + ) } /**Creates a `RawCallBuilder` for deploying this contract using the given `provider` -and constructor arguments, if any. + 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.*/ + 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, @@ -2293,22 +2202,25 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ permit2: alloy_sol_types::private::Address, routerVersion: alloy_sol_types::private::String, ) -> alloy_contract::RawCallBuilder { - BalancerV3BatchRouterInstance::< - P, - N, - >::deploy_builder(__provider, vault, weth, permit2, routerVersion) + BalancerV3BatchRouterInstance::::deploy_builder( + __provider, + vault, + weth, + permit2, + routerVersion, + ) } /**A [`BalancerV3BatchRouter`](self) instance. -Contains type-safe methods for interacting with an on-chain instance of the -[`BalancerV3BatchRouter`](self) contract located at a given `address`, using a given -provider `P`. + Contains type-safe methods for interacting with an on-chain instance of the + [`BalancerV3BatchRouter`](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. + 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.*/ + See the [module-level documentation](self) for all the available methods.*/ #[derive(Clone)] pub struct BalancerV3BatchRouterInstance { address: alloy_sol_types::private::Address, @@ -2319,33 +2231,32 @@ See the [module-level documentation](self) for all the available methods.*/ impl ::core::fmt::Debug for BalancerV3BatchRouterInstance { #[inline] fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { - f.debug_tuple("BalancerV3BatchRouterInstance").field(&self.address).finish() + f.debug_tuple("BalancerV3BatchRouterInstance") + .field(&self.address) + .finish() } } /// Instantiation and getters/setters. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > BalancerV3BatchRouterInstance { + impl, N: alloy_contract::private::Network> + BalancerV3BatchRouterInstance + { /**Creates a new wrapper around an on-chain [`BalancerV3BatchRouter`](self) contract instance. -See the [wrapper's documentation](`BalancerV3BatchRouterInstance`) for more details.*/ + See the [wrapper's documentation](`BalancerV3BatchRouterInstance`) for more details.*/ #[inline] - pub const fn new( - address: alloy_sol_types::private::Address, - __provider: P, - ) -> Self { + pub const fn new(address: alloy_sol_types::private::Address, __provider: P) -> Self { Self { address, provider: __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. + 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.*/ + For more fine-grained control over the deployment process, use [`deploy_builder`] instead.*/ #[inline] pub async fn deploy( __provider: P, @@ -2354,21 +2265,17 @@ For more fine-grained control over the deployment process, use [`deploy_builder` permit2: alloy_sol_types::private::Address, routerVersion: alloy_sol_types::private::String, ) -> alloy_contract::Result> { - let call_builder = Self::deploy_builder( - __provider, - vault, - weth, - permit2, - routerVersion, - ); + let call_builder = + Self::deploy_builder(__provider, vault, weth, permit2, routerVersion); 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. + 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.*/ + 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, @@ -2381,34 +2288,36 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ __provider, [ &BYTECODE[..], - &alloy_sol_types::SolConstructor::abi_encode( - &constructorCall { - vault, - weth, - permit2, - routerVersion, - }, - )[..], + &alloy_sol_types::SolConstructor::abi_encode(&constructorCall { + vault, + weth, + permit2, + routerVersion, + })[..], ] - .concat() - .into(), + .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 { @@ -2416,7 +2325,8 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ } } impl BalancerV3BatchRouterInstance<&P, N> { - /// Clones the provider and returns a new instance with the cloned provider. + /// Clones the provider and returns a new instance with the cloned + /// provider. #[inline] pub fn with_cloned_provider(self) -> BalancerV3BatchRouterInstance { BalancerV3BatchRouterInstance { @@ -2427,34 +2337,37 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ } } /// Function calls. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > BalancerV3BatchRouterInstance { - /// Creates a new call builder using this contract instance's provider and address. + impl, N: alloy_contract::private::Network> + BalancerV3BatchRouterInstance + { + /// 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. + /// 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 [`version`] function. pub fn version(&self) -> alloy_contract::SolCallBuilder<&P, versionCall, N> { self.call_builder(&versionCall) } } /// Event filters. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > BalancerV3BatchRouterInstance { - /// Creates a new event filter using this contract instance's provider and address. + impl, N: alloy_contract::private::Network> + BalancerV3BatchRouterInstance + { + /// 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. + /// 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> { @@ -2462,81 +2375,48 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ } } } -pub type Instance = BalancerV3BatchRouter::BalancerV3BatchRouterInstance< - ::alloy_provider::DynProvider, ->; +pub type Instance = + BalancerV3BatchRouter::BalancerV3BatchRouterInstance<::alloy_provider::DynProvider>; use { - std::{sync::LazyLock, collections::HashMap}, - anyhow::{Result, Context}, - alloy_primitives::{address, Address}, - alloy_provider::{Provider, DynProvider}, + alloy_primitives::{Address, address}, + alloy_provider::{DynProvider, Provider}, + anyhow::{Context, Result}, + std::{collections::HashMap, sync::LazyLock}, }; pub const fn deployment_info(chain_id: u64) -> Option<(Address, Option)> { match chain_id { - 1u64 => { - Some(( - ::alloy_primitives::address!( - "0x136f1EFcC3f8f88516B9E94110D56FDBfB1778d1" - ), - Some(21339510u64), - )) - } - 10u64 => { - Some(( - ::alloy_primitives::address!( - "0xaD89051bEd8d96f045E8912aE1672c6C0bF8a85E" - ), - Some(133969588u64), - )) - } - 100u64 => { - Some(( - ::alloy_primitives::address!( - "0xe2fa4e1d17725e72dcdAfe943Ecf45dF4B9E285b" - ), - Some(37377506u64), - )) - } - 8453u64 => { - Some(( - ::alloy_primitives::address!( - "0x85a80afee867aDf27B50BdB7b76DA70f1E853062" - ), - Some(25347205u64), - )) - } - 9745u64 => { - Some(( - ::alloy_primitives::address!( - "0x85a80afee867aDf27B50BdB7b76DA70f1E853062" - ), - Some(782312u64), - )) - } - 42161u64 => { - Some(( - ::alloy_primitives::address!( - "0xaD89051bEd8d96f045E8912aE1672c6C0bF8a85E" - ), - Some(297828544u64), - )) - } - 43114u64 => { - Some(( - ::alloy_primitives::address!( - "0xc9b36096f5201ea332Db35d6D195774ea0D5988f" - ), - Some(59965747u64), - )) - } - 11155111u64 => { - Some(( - ::alloy_primitives::address!( - "0xC85b652685567C1B074e8c0D4389f83a2E458b1C" - ), - Some(7219301u64), - )) - } + 1u64 => Some(( + ::alloy_primitives::address!("0x136f1EFcC3f8f88516B9E94110D56FDBfB1778d1"), + Some(21339510u64), + )), + 10u64 => Some(( + ::alloy_primitives::address!("0xaD89051bEd8d96f045E8912aE1672c6C0bF8a85E"), + Some(133969588u64), + )), + 100u64 => Some(( + ::alloy_primitives::address!("0xe2fa4e1d17725e72dcdAfe943Ecf45dF4B9E285b"), + Some(37377506u64), + )), + 8453u64 => Some(( + ::alloy_primitives::address!("0x85a80afee867aDf27B50BdB7b76DA70f1E853062"), + Some(25347205u64), + )), + 9745u64 => Some(( + ::alloy_primitives::address!("0x85a80afee867aDf27B50BdB7b76DA70f1E853062"), + Some(782312u64), + )), + 42161u64 => Some(( + ::alloy_primitives::address!("0xaD89051bEd8d96f045E8912aE1672c6C0bF8a85E"), + Some(297828544u64), + )), + 43114u64 => Some(( + ::alloy_primitives::address!("0xc9b36096f5201ea332Db35d6D195774ea0D5988f"), + Some(59965747u64), + )), + 11155111u64 => Some(( + ::alloy_primitives::address!("0xC85b652685567C1B074e8c0D4389f83a2E458b1C"), + Some(7219301u64), + )), _ => None, } } @@ -2553,9 +2433,7 @@ pub const fn deployment_block(chain_id: &u64) -> Option { } } impl Instance { - pub fn deployed( - provider: &DynProvider, - ) -> impl Future> + Send { + pub fn deployed(provider: &DynProvider) -> impl Future> + Send { async move { let chain_id = provider .get_chain_id() diff --git a/contracts/generated/contracts-generated/balances/src/lib.rs b/contracts/generated/contracts-generated/balances/src/lib.rs index abd1f55a69..0c4f3080f2 100644 --- a/contracts/generated/contracts-generated/balances/src/lib.rs +++ b/contracts/generated/contracts-generated/balances/src/lib.rs @@ -1,4 +1,10 @@ -#![allow(unused_imports, unused_attributes, clippy::all, rustdoc::all, non_snake_case)] +#![allow( + unused_imports, + unused_attributes, + clippy::all, + rustdoc::all, + non_snake_case +)] //! Auto-generated contract bindings. Do not edit. /** @@ -131,8 +137,7 @@ interface Balances { clippy::empty_structs_with_brackets )] pub mod Balances { - use super::*; - use alloy_sol_types as alloy_sol_types; + use {super::*, alloy_sol_types}; /// The creation / init bytecode of the contract. /// /// ```text @@ -155,8 +160,8 @@ pub mod Balances { ); #[derive(Default, Debug, PartialEq, Eq, Hash)] /**```solidity -struct Contracts { address settlement; address vaultRelayer; address vault; } -```*/ + struct Contracts { address settlement; address vaultRelayer; address vault; } + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct Contracts { @@ -174,7 +179,7 @@ struct Contracts { address settlement; address vaultRelayer; address vault; } clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[doc(hidden)] #[allow(dead_code)] type UnderlyingSolTuple<'a> = ( @@ -190,9 +195,7 @@ struct Contracts { address settlement; address vaultRelayer; address vault; } ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -237,91 +240,88 @@ struct Contracts { address settlement; address vaultRelayer; address vault; } ), ) } + #[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) + 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) + 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) + 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 Contracts { type RustType = Self; - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + + const ENCODED_SIZE: Option = + as alloy_sol_types::SolType>::ENCODED_SIZE; + const PACKED_ENCODED_SIZE: Option = + as alloy_sol_types::SolType>::PACKED_ENCODED_SIZE; 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); + let tuple = as alloy_sol_types::SolType>::detokenize(token); >>::from(tuple) } } #[automatically_derived] impl alloy_sol_types::SolStruct for Contracts { const NAME: &'static str = "Contracts"; + #[inline] fn eip712_root_type() -> alloy_sol_types::private::Cow<'static, str> { alloy_sol_types::private::Cow::Borrowed( "Contracts(address settlement,address vaultRelayer,address vault)", ) } + #[inline] - fn eip712_components() -> alloy_sol_types::private::Vec< - alloy_sol_types::private::Cow<'static, str>, - > { + fn eip712_components() + -> alloy_sol_types::private::Vec> + { 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 { [ @@ -356,14 +356,13 @@ struct Contracts { address settlement; address vaultRelayer; address vault; } &rust.vault, ) } + #[inline] fn encode_topic_preimage( rust: &Self::RustType, out: &mut alloy_sol_types::private::Vec, ) { - out.reserve( - ::topic_preimage_length(rust), - ); + out.reserve(::topic_preimage_length(rust)); ::encode_topic_preimage( &rust.settlement, out, @@ -377,25 +376,19 @@ struct Contracts { address settlement; address vaultRelayer; address vault; } out, ); } + #[inline] - fn encode_topic( - rust: &Self::RustType, - ) -> alloy_sol_types::abi::token::WordToken { + 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), - ) + ::encode_topic_preimage(rust, &mut out); + alloy_sol_types::abi::token::WordToken(alloy_sol_types::private::keccak256(out)) } } }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**```solidity -struct Interaction { address target; uint256 value; bytes callData; } -```*/ + struct Interaction { address target; uint256 value; bytes callData; } + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct Interaction { @@ -413,7 +406,7 @@ struct Interaction { address target; uint256 value; bytes callData; } clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[doc(hidden)] #[allow(dead_code)] type UnderlyingSolTuple<'a> = ( @@ -429,9 +422,7 @@ struct Interaction { address target; uint256 value; bytes callData; } ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -468,99 +459,96 @@ struct Interaction { address target; uint256 value; bytes callData; } ::tokenize( &self.target, ), - as alloy_sol_types::SolType>::tokenize(&self.value), + as alloy_sol_types::SolType>::tokenize( + &self.value, + ), ::tokenize( &self.callData, ), ) } + #[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) + 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) + 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) + 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 Interaction { type RustType = Self; - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + + const ENCODED_SIZE: Option = + as alloy_sol_types::SolType>::ENCODED_SIZE; + const PACKED_ENCODED_SIZE: Option = + as alloy_sol_types::SolType>::PACKED_ENCODED_SIZE; 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); + let tuple = as alloy_sol_types::SolType>::detokenize(token); >>::from(tuple) } } #[automatically_derived] impl alloy_sol_types::SolStruct for Interaction { const NAME: &'static str = "Interaction"; + #[inline] fn eip712_root_type() -> alloy_sol_types::private::Cow<'static, str> { alloy_sol_types::private::Cow::Borrowed( "Interaction(address target,uint256 value,bytes callData)", ) } + #[inline] - fn eip712_components() -> alloy_sol_types::private::Vec< - alloy_sol_types::private::Cow<'static, str>, - > { + fn eip712_components() + -> alloy_sol_types::private::Vec> + { 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 { [ @@ -595,14 +583,13 @@ struct Interaction { address target; uint256 value; bytes callData; } &rust.callData, ) } + #[inline] fn encode_topic_preimage( rust: &Self::RustType, out: &mut alloy_sol_types::private::Vec, ) { - out.reserve( - ::topic_preimage_length(rust), - ); + out.reserve(::topic_preimage_length(rust)); ::encode_topic_preimage( &rust.target, out, @@ -618,26 +605,20 @@ struct Interaction { address target; uint256 value; bytes callData; } out, ); } + #[inline] - fn encode_topic( - rust: &Self::RustType, - ) -> alloy_sol_types::abi::token::WordToken { + 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), - ) + ::encode_topic_preimage(rust, &mut out); + alloy_sol_types::abi::token::WordToken(alloy_sol_types::private::keccak256(out)) } } }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `balance((address,address,address),address,address,uint256,bytes32,(address,uint256,bytes)[])` and selector `0xf88cf6db`. -```solidity -function balance(Contracts memory contracts, address trader, address token, uint256 amount, bytes32 source, Interaction[] memory interactions) external returns (uint256 tokenBalance, uint256 allowance, uint256 effectiveBalance, bool canTransfer, bytes memory transferRevertReason); -```*/ + ```solidity + function balance(Contracts memory contracts, address trader, address token, uint256 amount, bytes32 source, Interaction[] memory interactions) external returns (uint256 tokenBalance, uint256 allowance, uint256 effectiveBalance, bool canTransfer, bytes memory transferRevertReason); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct balanceCall { @@ -652,12 +633,13 @@ function balance(Contracts memory contracts, address trader, address token, uint #[allow(missing_docs)] pub source: alloy_sol_types::private::FixedBytes<32>, #[allow(missing_docs)] - pub interactions: alloy_sol_types::private::Vec< - ::RustType, - >, + pub interactions: + alloy_sol_types::private::Vec<::RustType>, } #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`balance((address,address,address),address,address,uint256,bytes32,(address,uint256,bytes)[])`](balanceCall) function. + ///Container type for the return parameters of the + /// [`balance((address,address,address),address,address,uint256,bytes32, + /// (address,uint256,bytes)[])`](balanceCall) function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct balanceReturn { @@ -679,7 +661,7 @@ function balance(Contracts memory contracts, address trader, address token, uint clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -698,15 +680,11 @@ function balance(Contracts memory contracts, address trader, address token, uint alloy_sol_types::private::Address, alloy_sol_types::private::primitives::aliases::U256, alloy_sol_types::private::FixedBytes<32>, - alloy_sol_types::private::Vec< - ::RustType, - >, + alloy_sol_types::private::Vec<::RustType>, ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -762,9 +740,7 @@ function balance(Contracts memory contracts, address trader, address token, uint ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -799,19 +775,17 @@ function balance(Contracts memory contracts, address trader, address token, uint } } impl balanceReturn { - fn _tokenize( - &self, - ) -> ::ReturnToken<'_> { + fn _tokenize(&self) -> ::ReturnToken<'_> { ( - as alloy_sol_types::SolType>::tokenize(&self.tokenBalance), - as alloy_sol_types::SolType>::tokenize(&self.allowance), - as alloy_sol_types::SolType>::tokenize(&self.effectiveBalance), + as alloy_sol_types::SolType>::tokenize( + &self.tokenBalance, + ), + as alloy_sol_types::SolType>::tokenize( + &self.allowance, + ), + as alloy_sol_types::SolType>::tokenize( + &self.effectiveBalance, + ), ::tokenize( &self.canTransfer, ), @@ -831,10 +805,8 @@ function balance(Contracts memory contracts, address trader, address token, uint alloy_sol_types::sol_data::FixedBytes<32>, alloy_sol_types::sol_data::Array, ); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = balanceReturn; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = ( alloy_sol_types::sol_data::Uint<256>, alloy_sol_types::sol_data::Uint<256>, @@ -842,17 +814,19 @@ function balance(Contracts memory contracts, address trader, address token, uint alloy_sol_types::sol_data::Bool, alloy_sol_types::sol_data::Bytes, ); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "balance((address,address,address),address,address,uint256,bytes32,(address,uint256,bytes)[])"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [248u8, 140u8, 246u8, 219u8]; + const SIGNATURE: &'static str = "balance((address,address,address),address,address,\ + uint256,bytes32,(address,uint256,bytes)[])"; + #[inline] fn new<'a>( tuple: as alloy_sol_types::SolType>::RustType, ) -> Self { tuple.into() } + #[inline] fn tokenize(&self) -> Self::Token<'_> { ( @@ -874,31 +848,29 @@ function balance(Contracts memory contracts, address trader, address token, uint > as alloy_sol_types::SolType>::tokenize(&self.interactions), ) } + #[inline] fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { balanceReturn::_tokenize(ret) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) + 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) + 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 [`Balances`](self) function calls. #[derive(Clone)] - #[derive()] pub enum BalancesCalls { #[allow(missing_docs)] balance(balanceCall), @@ -906,19 +878,18 @@ function balance(Contracts memory contracts, address trader, address token, uint impl BalancesCalls { /// 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. + /// 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]] = &[[248u8, 140u8, 246u8, 219u8]]; - /// The names of the variants in the same order as `SELECTORS`. - pub const VARIANT_NAMES: &'static [&'static str] = &[ - ::core::stringify!(balance), - ]; /// The signatures in the same order as `SELECTORS`. - pub const SIGNATURES: &'static [&'static str] = &[ - ::SIGNATURE, - ]; + pub const SIGNATURES: &'static [&'static str] = + &[::SIGNATURE]; + /// The names of the variants in the same order as `SELECTORS`. + pub const VARIANT_NAMES: &'static [&'static str] = &[::core::stringify!(balance)]; + /// Returns the signature for the given selector, if known. #[inline] pub fn signature_by_selector( @@ -931,90 +902,79 @@ function balance(Contracts memory contracts, address trader, address token, uint ::core::result::Result::Err(_) => ::core::option::Option::None, } } + /// Returns the enum variant name for the given selector, if known. #[inline] - pub fn name_by_selector( - selector: [u8; 4usize], - ) -> ::core::option::Option<&'static str> { + pub fn name_by_selector(selector: [u8; 4usize]) -> ::core::option::Option<&'static str> { let sig = Self::signature_by_selector(selector)?; sig.split_once('(').map(|(name, _)| name) } } #[automatically_derived] impl alloy_sol_types::SolInterface for BalancesCalls { - const NAME: &'static str = "BalancesCalls"; - const MIN_DATA_LENGTH: usize = 288usize; const COUNT: usize = 1usize; + const MIN_DATA_LENGTH: usize = 288usize; + const NAME: &'static str = "BalancesCalls"; + #[inline] fn selector(&self) -> [u8; 4] { match self { Self::balance(_) => ::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 balance(data: &[u8]) -> alloy_sol_types::Result { - ::abi_decode_raw(data) - .map(BalancesCalls::balance) - } - balance - }, - ]; + fn abi_decode_raw(selector: [u8; 4], data: &[u8]) -> alloy_sol_types::Result { + static DECODE_SHIMS: &[fn(&[u8]) -> alloy_sol_types::Result] = &[{ + fn balance(data: &[u8]) -> alloy_sol_types::Result { + ::abi_decode_raw(data) + .map(BalancesCalls::balance) + } + balance + }]; let Ok(idx) = Self::SELECTORS.binary_search(&selector) else { - return Err( - alloy_sol_types::Error::unknown_selector( - ::NAME, - selector, - ), - ); + 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] = &[ - { + static DECODE_VALIDATE_SHIMS: &[fn(&[u8]) -> alloy_sol_types::Result] = + &[{ fn balance(data: &[u8]) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) + ::abi_decode_raw_validate(data) .map(BalancesCalls::balance) } balance - }, - ]; + }]; let Ok(idx) = Self::SELECTORS.binary_search(&selector) else { - return Err( - alloy_sol_types::Error::unknown_selector( - ::NAME, - selector, - ), - ); + return Err(alloy_sol_types::Error::unknown_selector( + ::NAME, + selector, + )); }; DECODE_VALIDATE_SHIMS[idx](data) } + #[inline] fn abi_encoded_size(&self) -> usize { match self { @@ -1023,6 +983,7 @@ function balance(Contracts memory contracts, address trader, address token, uint } } } + #[inline] fn abi_encode_raw(&self, out: &mut alloy_sol_types::private::Vec) { match self { @@ -1032,10 +993,10 @@ function balance(Contracts memory contracts, address trader, address token, uint } } } - use alloy_contract as alloy_contract; + use alloy_contract; /**Creates a new wrapper around an on-chain [`Balances`](self) contract instance. -See the [wrapper's documentation](`BalancesInstance`) for more details.*/ + See the [wrapper's documentation](`BalancesInstance`) for more details.*/ #[inline] pub const fn new< P: alloy_contract::private::Provider, @@ -1048,43 +1009,40 @@ See the [wrapper's documentation](`BalancesInstance`) for more details.*/ } /**Deploys this contract using the given `provider` and constructor arguments, if any. -Returns a new instance of the contract, if the deployment was successful. + 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.*/ + 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, - >( + pub fn deploy, N: alloy_contract::private::Network>( __provider: P, - ) -> impl ::core::future::Future< - Output = alloy_contract::Result>, - > { + ) -> impl ::core::future::Future>> { BalancesInstance::::deploy(__provider) } /**Creates a `RawCallBuilder` for deploying this contract using the given `provider` -and constructor arguments, if any. + 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.*/ + 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) -> alloy_contract::RawCallBuilder { + >( + __provider: P, + ) -> alloy_contract::RawCallBuilder { BalancesInstance::::deploy_builder(__provider) } /**A [`Balances`](self) instance. -Contains type-safe methods for interacting with an on-chain instance of the -[`Balances`](self) contract located at a given `address`, using a given -provider `P`. + Contains type-safe methods for interacting with an on-chain instance of the + [`Balances`](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. + 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.*/ + See the [module-level documentation](self) for all the available methods.*/ #[derive(Clone)] pub struct BalancesInstance { address: alloy_sol_types::private::Address, @@ -1095,46 +1053,44 @@ See the [module-level documentation](self) for all the available methods.*/ impl ::core::fmt::Debug for BalancesInstance { #[inline] fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { - f.debug_tuple("BalancesInstance").field(&self.address).finish() + f.debug_tuple("BalancesInstance") + .field(&self.address) + .finish() } } /// Instantiation and getters/setters. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > BalancesInstance { + impl, N: alloy_contract::private::Network> + BalancesInstance + { /**Creates a new wrapper around an on-chain [`Balances`](self) contract instance. -See the [wrapper's documentation](`BalancesInstance`) for more details.*/ + See the [wrapper's documentation](`BalancesInstance`) for more details.*/ #[inline] - pub const fn new( - address: alloy_sol_types::private::Address, - __provider: P, - ) -> Self { + pub const fn new(address: alloy_sol_types::private::Address, __provider: P) -> Self { Self { address, provider: __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. + 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.*/ + For more fine-grained control over the deployment process, use [`deploy_builder`] instead.*/ #[inline] - pub async fn deploy( - __provider: P, - ) -> alloy_contract::Result> { + 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. + 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.*/ + 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( @@ -1142,21 +1098,25 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ ::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 { @@ -1164,7 +1124,8 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ } } impl BalancesInstance<&P, N> { - /// Clones the provider and returns a new instance with the cloned provider. + /// Clones the provider and returns a new instance with the cloned + /// provider. #[inline] pub fn with_cloned_provider(self) -> BalancesInstance { BalancesInstance { @@ -1175,20 +1136,22 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ } } /// Function calls. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > BalancesInstance { - /// Creates a new call builder using this contract instance's provider and address. + impl, N: alloy_contract::private::Network> + BalancesInstance + { + /// 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. + /// 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 [`balance`] function. pub fn balance( &self, @@ -1201,27 +1164,26 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ ::RustType, >, ) -> alloy_contract::SolCallBuilder<&P, balanceCall, N> { - self.call_builder( - &balanceCall { - contracts, - trader, - token, - amount, - source, - interactions, - }, - ) + self.call_builder(&balanceCall { + contracts, + trader, + token, + amount, + source, + interactions, + }) } } /// Event filters. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > BalancesInstance { - /// Creates a new event filter using this contract instance's provider and address. + impl, N: alloy_contract::private::Network> + BalancesInstance + { + /// 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. + /// 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> { @@ -1231,109 +1193,61 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ } pub type Instance = Balances::BalancesInstance<::alloy_provider::DynProvider>; use { - std::{sync::LazyLock, collections::HashMap}, - anyhow::{Result, Context}, - alloy_primitives::{address, Address}, - alloy_provider::{Provider, DynProvider}, + alloy_primitives::{Address, address}, + alloy_provider::{DynProvider, Provider}, + anyhow::{Context, Result}, + std::{collections::HashMap, sync::LazyLock}, }; pub const fn deployment_info(chain_id: u64) -> Option<(Address, Option)> { match chain_id { - 1u64 => { - Some(( - ::alloy_primitives::address!( - "0x88b4B74082BffB2976C306CB3f7E9093AE48B94F" - ), - None, - )) - } - 10u64 => { - Some(( - ::alloy_primitives::address!( - "0x88b4B74082BffB2976C306CB3f7E9093AE48B94F" - ), - None, - )) - } - 56u64 => { - Some(( - ::alloy_primitives::address!( - "0x88b4B74082BffB2976C306CB3f7E9093AE48B94F" - ), - None, - )) - } - 100u64 => { - Some(( - ::alloy_primitives::address!( - "0x88b4B74082BffB2976C306CB3f7E9093AE48B94F" - ), - None, - )) - } - 137u64 => { - Some(( - ::alloy_primitives::address!( - "0x88b4B74082BffB2976C306CB3f7E9093AE48B94F" - ), - None, - )) - } - 8453u64 => { - Some(( - ::alloy_primitives::address!( - "0x88b4B74082BffB2976C306CB3f7E9093AE48B94F" - ), - None, - )) - } - 9745u64 => { - Some(( - ::alloy_primitives::address!( - "0x88b4B74082BffB2976C306CB3f7E9093AE48B94F" - ), - None, - )) - } - 42161u64 => { - Some(( - ::alloy_primitives::address!( - "0x88b4B74082BffB2976C306CB3f7E9093AE48B94F" - ), - None, - )) - } - 43114u64 => { - Some(( - ::alloy_primitives::address!( - "0x88b4B74082BffB2976C306CB3f7E9093AE48B94F" - ), - None, - )) - } - 57073u64 => { - Some(( - ::alloy_primitives::address!( - "0x88b4B74082BffB2976C306CB3f7E9093AE48B94F" - ), - None, - )) - } - 59144u64 => { - Some(( - ::alloy_primitives::address!( - "0x88b4B74082BffB2976C306CB3f7E9093AE48B94F" - ), - None, - )) - } - 11155111u64 => { - Some(( - ::alloy_primitives::address!( - "0x88b4B74082BffB2976C306CB3f7E9093AE48B94F" - ), - None, - )) - } + 1u64 => Some(( + ::alloy_primitives::address!("0x88b4B74082BffB2976C306CB3f7E9093AE48B94F"), + None, + )), + 10u64 => Some(( + ::alloy_primitives::address!("0x88b4B74082BffB2976C306CB3f7E9093AE48B94F"), + None, + )), + 56u64 => Some(( + ::alloy_primitives::address!("0x88b4B74082BffB2976C306CB3f7E9093AE48B94F"), + None, + )), + 100u64 => Some(( + ::alloy_primitives::address!("0x88b4B74082BffB2976C306CB3f7E9093AE48B94F"), + None, + )), + 137u64 => Some(( + ::alloy_primitives::address!("0x88b4B74082BffB2976C306CB3f7E9093AE48B94F"), + None, + )), + 8453u64 => Some(( + ::alloy_primitives::address!("0x88b4B74082BffB2976C306CB3f7E9093AE48B94F"), + None, + )), + 9745u64 => Some(( + ::alloy_primitives::address!("0x88b4B74082BffB2976C306CB3f7E9093AE48B94F"), + None, + )), + 42161u64 => Some(( + ::alloy_primitives::address!("0x88b4B74082BffB2976C306CB3f7E9093AE48B94F"), + None, + )), + 43114u64 => Some(( + ::alloy_primitives::address!("0x88b4B74082BffB2976C306CB3f7E9093AE48B94F"), + None, + )), + 57073u64 => Some(( + ::alloy_primitives::address!("0x88b4B74082BffB2976C306CB3f7E9093AE48B94F"), + None, + )), + 59144u64 => Some(( + ::alloy_primitives::address!("0x88b4B74082BffB2976C306CB3f7E9093AE48B94F"), + None, + )), + 11155111u64 => Some(( + ::alloy_primitives::address!("0x88b4B74082BffB2976C306CB3f7E9093AE48B94F"), + None, + )), _ => None, } } @@ -1350,9 +1264,7 @@ pub const fn deployment_block(chain_id: &u64) -> Option { } } impl Instance { - pub fn deployed( - provider: &DynProvider, - ) -> impl Future> + Send { + pub fn deployed(provider: &DynProvider) -> impl Future> + Send { async move { let chain_id = provider .get_chain_id() diff --git a/contracts/generated/contracts-generated/baoswaprouter/src/lib.rs b/contracts/generated/contracts-generated/baoswaprouter/src/lib.rs index 763f4222cd..6e40aa5724 100644 --- a/contracts/generated/contracts-generated/baoswaprouter/src/lib.rs +++ b/contracts/generated/contracts-generated/baoswaprouter/src/lib.rs @@ -1,4 +1,10 @@ -#![allow(unused_imports, unused_attributes, clippy::all, rustdoc::all, non_snake_case)] +#![allow( + unused_imports, + unused_attributes, + clippy::all, + rustdoc::all, + non_snake_case +)] //! Auto-generated contract bindings. Do not edit. /** @@ -184,18 +190,18 @@ interface BaoswapRouter { clippy::empty_structs_with_brackets )] pub mod BaoswapRouter { - use super::*; - use alloy_sol_types as alloy_sol_types; + use {super::*, alloy_sol_types}; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `WETH()` and selector `0xad5c4648`. -```solidity -function WETH() external pure returns (address); -```*/ + ```solidity + function WETH() external pure returns (address); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct WETHCall; #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`WETH()`](WETHCall) function. + ///Container type for the return parameters of the [`WETH()`](WETHCall) + /// function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct WETHReturn { @@ -209,7 +215,7 @@ function WETH() external pure returns (address); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -218,9 +224,7 @@ function WETH() external pure returns (address); type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -250,9 +254,7 @@ function WETH() external pure returns (address); type UnderlyingRustTuple<'a> = (alloy_sol_types::private::Address,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -277,63 +279,58 @@ function WETH() external pure returns (address); #[automatically_derived] impl alloy_sol_types::SolCall for WETHCall { type Parameters<'a> = (); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = alloy_sol_types::private::Address; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (alloy_sol_types::sol_data::Address,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "WETH()"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [173u8, 92u8, 70u8, 72u8]; + const SIGNATURE: &'static str = "WETH()"; + #[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, - ), - ) + (::tokenize(ret),) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) - .map(|r| { + as alloy_sol_types::SolType>::abi_decode_sequence(data).map( + |r| { let r: WETHReturn = 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: WETHReturn = r.into(); - r._0 - }) + 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: WETHReturn = r.into(); + r._0 + }) } } }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `addLiquidity(address,address,uint256,uint256,uint256,uint256,address,uint256)` and selector `0xe8e33700`. -```solidity -function addLiquidity(address tokenA, address tokenB, uint256 amountADesired, uint256 amountBDesired, uint256 amountAMin, uint256 amountBMin, address to, uint256 deadline) external returns (uint256 amountA, uint256 amountB, uint256 liquidity); -```*/ + ```solidity + function addLiquidity(address tokenA, address tokenB, uint256 amountADesired, uint256 amountBDesired, uint256 amountAMin, uint256 amountBMin, address to, uint256 deadline) external returns (uint256 amountA, uint256 amountB, uint256 liquidity); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct addLiquidityCall { @@ -355,7 +352,9 @@ function addLiquidity(address tokenA, address tokenB, uint256 amountADesired, ui pub deadline: alloy_sol_types::private::primitives::aliases::U256, } #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`addLiquidity(address,address,uint256,uint256,uint256,uint256,address,uint256)`](addLiquidityCall) function. + ///Container type for the return parameters of the + /// [`addLiquidity(address,address,uint256,uint256,uint256,uint256,address, + /// uint256)`](addLiquidityCall) function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct addLiquidityReturn { @@ -373,7 +372,7 @@ function addLiquidity(address tokenA, address tokenB, uint256 amountADesired, ui clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -400,9 +399,7 @@ function addLiquidity(address tokenA, address tokenB, uint256 amountADesired, ui ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -458,9 +455,7 @@ function addLiquidity(address tokenA, address tokenB, uint256 amountADesired, ui ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -487,19 +482,17 @@ function addLiquidity(address tokenA, address tokenB, uint256 amountADesired, ui } } impl addLiquidityReturn { - fn _tokenize( - &self, - ) -> ::ReturnToken<'_> { + fn _tokenize(&self) -> ::ReturnToken<'_> { ( - as alloy_sol_types::SolType>::tokenize(&self.amountA), - as alloy_sol_types::SolType>::tokenize(&self.amountB), - as alloy_sol_types::SolType>::tokenize(&self.liquidity), + as alloy_sol_types::SolType>::tokenize( + &self.amountA, + ), + as alloy_sol_types::SolType>::tokenize( + &self.amountB, + ), + as alloy_sol_types::SolType>::tokenize( + &self.liquidity, + ), ) } } @@ -515,26 +508,26 @@ function addLiquidity(address tokenA, address tokenB, uint256 amountADesired, ui 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 = addLiquidityReturn; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = ( alloy_sol_types::sol_data::Uint<256>, alloy_sol_types::sol_data::Uint<256>, alloy_sol_types::sol_data::Uint<256>, ); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "addLiquidity(address,address,uint256,uint256,uint256,uint256,address,uint256)"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [232u8, 227u8, 55u8, 0u8]; + const SIGNATURE: &'static str = + "addLiquidity(address,address,uint256,uint256,uint256,uint256,address,uint256)"; + #[inline] fn new<'a>( tuple: as alloy_sol_types::SolType>::RustType, ) -> Self { tuple.into() } + #[inline] fn tokenize(&self) -> Self::Token<'_> { ( @@ -544,58 +537,58 @@ function addLiquidity(address tokenA, address tokenB, uint256 amountADesired, ui ::tokenize( &self.tokenB, ), - as alloy_sol_types::SolType>::tokenize(&self.amountADesired), - as alloy_sol_types::SolType>::tokenize(&self.amountBDesired), - as alloy_sol_types::SolType>::tokenize(&self.amountAMin), - as alloy_sol_types::SolType>::tokenize(&self.amountBMin), + as alloy_sol_types::SolType>::tokenize( + &self.amountADesired, + ), + as alloy_sol_types::SolType>::tokenize( + &self.amountBDesired, + ), + as alloy_sol_types::SolType>::tokenize( + &self.amountAMin, + ), + as alloy_sol_types::SolType>::tokenize( + &self.amountBMin, + ), ::tokenize( &self.to, ), - as alloy_sol_types::SolType>::tokenize(&self.deadline), + as alloy_sol_types::SolType>::tokenize( + &self.deadline, + ), ) } + #[inline] fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { addLiquidityReturn::_tokenize(ret) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) + 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) + 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(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `factory()` and selector `0xc45a0155`. -```solidity -function factory() external pure returns (address); -```*/ + ```solidity + function factory() external pure returns (address); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct factoryCall; #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`factory()`](factoryCall) function. + ///Container type for the return parameters of the + /// [`factory()`](factoryCall) function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct factoryReturn { @@ -609,7 +602,7 @@ function factory() external pure returns (address); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -618,9 +611,7 @@ function factory() external pure returns (address); type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -650,9 +641,7 @@ function factory() external pure returns (address); type UnderlyingRustTuple<'a> = (alloy_sol_types::private::Address,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -677,63 +666,58 @@ function factory() external pure returns (address); #[automatically_derived] impl alloy_sol_types::SolCall for factoryCall { type Parameters<'a> = (); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = alloy_sol_types::private::Address; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (alloy_sol_types::sol_data::Address,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "factory()"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [196u8, 90u8, 1u8, 85u8]; + const SIGNATURE: &'static str = "factory()"; + #[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, - ), - ) + (::tokenize(ret),) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) - .map(|r| { + as alloy_sol_types::SolType>::abi_decode_sequence(data).map( + |r| { let r: factoryReturn = 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: factoryReturn = r.into(); - r._0 - }) + 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: factoryReturn = r.into(); + r._0 + }) } } }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `quote(uint256,uint256,uint256)` and selector `0xad615dec`. -```solidity -function quote(uint256 amountA, uint256 reserveA, uint256 reserveB) external pure returns (uint256 amountB); -```*/ + ```solidity + function quote(uint256 amountA, uint256 reserveA, uint256 reserveB) external pure returns (uint256 amountB); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct quoteCall { @@ -745,7 +729,8 @@ function quote(uint256 amountA, uint256 reserveA, uint256 reserveB) external pur pub reserveB: alloy_sol_types::private::primitives::aliases::U256, } #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`quote(uint256,uint256,uint256)`](quoteCall) function. + ///Container type for the return parameters of the + /// [`quote(uint256,uint256,uint256)`](quoteCall) function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct quoteReturn { @@ -759,7 +744,7 @@ function quote(uint256 amountA, uint256 reserveA, uint256 reserveB) external pur clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -776,9 +761,7 @@ function quote(uint256 amountA, uint256 reserveA, uint256 reserveB) external pur ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -809,14 +792,10 @@ function quote(uint256 amountA, uint256 reserveA, uint256 reserveB) external pur #[allow(dead_code)] type UnderlyingSolTuple<'a> = (alloy_sol_types::sol_data::Uint<256>,); #[doc(hidden)] - type UnderlyingRustTuple<'a> = ( - alloy_sol_types::private::primitives::aliases::U256, - ); + 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, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -845,73 +824,72 @@ function quote(uint256 amountA, uint256 reserveA, uint256 reserveB) external pur 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 = alloy_sol_types::private::primitives::aliases::U256; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (alloy_sol_types::sol_data::Uint<256>,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "quote(uint256,uint256,uint256)"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [173u8, 97u8, 93u8, 236u8]; + const SIGNATURE: &'static str = "quote(uint256,uint256,uint256)"; + #[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.amountA), - as alloy_sol_types::SolType>::tokenize(&self.reserveA), - as alloy_sol_types::SolType>::tokenize(&self.reserveB), + as alloy_sol_types::SolType>::tokenize( + &self.amountA, + ), + as alloy_sol_types::SolType>::tokenize( + &self.reserveA, + ), + as alloy_sol_types::SolType>::tokenize( + &self.reserveB, + ), ) } + #[inline] fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { ( - as alloy_sol_types::SolType>::tokenize(ret), + 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| { + as alloy_sol_types::SolType>::abi_decode_sequence(data).map( + |r| { let r: quoteReturn = r.into(); r.amountB - }) + }, + ) } + #[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: quoteReturn = r.into(); - r.amountB - }) + 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: quoteReturn = r.into(); + r.amountB + }) } } }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `swapTokensForExactTokens(uint256,uint256,address[],address,uint256)` and selector `0x8803dbee`. -```solidity -function swapTokensForExactTokens(uint256 amountOut, uint256 amountInMax, address[] memory path, address to, uint256 deadline) external returns (uint256[] memory amounts); -```*/ + ```solidity + function swapTokensForExactTokens(uint256 amountOut, uint256 amountInMax, address[] memory path, address to, uint256 deadline) external returns (uint256[] memory amounts); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct swapTokensForExactTokensCall { @@ -927,14 +905,15 @@ function swapTokensForExactTokens(uint256 amountOut, uint256 amountInMax, addres pub deadline: alloy_sol_types::private::primitives::aliases::U256, } #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`swapTokensForExactTokens(uint256,uint256,address[],address,uint256)`](swapTokensForExactTokensCall) function. + ///Container type for the return parameters of the + /// [`swapTokensForExactTokens(uint256,uint256,address[],address, + /// uint256)`](swapTokensForExactTokensCall) function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct swapTokensForExactTokensReturn { #[allow(missing_docs)] - pub amounts: alloy_sol_types::private::Vec< - alloy_sol_types::private::primitives::aliases::U256, - >, + pub amounts: + alloy_sol_types::private::Vec, } #[allow( non_camel_case_types, @@ -943,7 +922,7 @@ function swapTokensForExactTokens(uint256 amountOut, uint256 amountInMax, addres clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -964,9 +943,7 @@ function swapTokensForExactTokens(uint256 amountOut, uint256 amountInMax, addres ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -975,8 +952,7 @@ function swapTokensForExactTokens(uint256 amountOut, uint256 amountInMax, addres } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From - for UnderlyingRustTuple<'_> { + impl ::core::convert::From for UnderlyingRustTuple<'_> { fn from(value: swapTokensForExactTokensCall) -> Self { ( value.amountOut, @@ -989,8 +965,7 @@ function swapTokensForExactTokens(uint256 amountOut, uint256 amountInMax, addres } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From> - for swapTokensForExactTokensCall { + impl ::core::convert::From> for swapTokensForExactTokensCall { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { Self { amountOut: tuple.0, @@ -1005,20 +980,15 @@ function swapTokensForExactTokens(uint256 amountOut, uint256 amountInMax, addres { #[doc(hidden)] #[allow(dead_code)] - type UnderlyingSolTuple<'a> = ( - alloy_sol_types::sol_data::Array>, - ); + type UnderlyingSolTuple<'a> = + (alloy_sol_types::sol_data::Array>,); #[doc(hidden)] type UnderlyingRustTuple<'a> = ( - alloy_sol_types::private::Vec< - alloy_sol_types::private::primitives::aliases::U256, - >, + alloy_sol_types::private::Vec, ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1027,16 +997,14 @@ function swapTokensForExactTokens(uint256 amountOut, uint256 amountInMax, addres } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From - for UnderlyingRustTuple<'_> { + impl ::core::convert::From for UnderlyingRustTuple<'_> { fn from(value: swapTokensForExactTokensReturn) -> Self { (value.amounts,) } } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From> - for swapTokensForExactTokensReturn { + impl ::core::convert::From> for swapTokensForExactTokensReturn { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { Self { amounts: tuple.0 } } @@ -1051,26 +1019,24 @@ function swapTokensForExactTokens(uint256 amountOut, uint256 amountInMax, addres 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 = alloy_sol_types::private::Vec< - alloy_sol_types::private::primitives::aliases::U256, - >; - type ReturnTuple<'a> = ( - alloy_sol_types::sol_data::Array>, - ); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "swapTokensForExactTokens(uint256,uint256,address[],address,uint256)"; + type Return = + alloy_sol_types::private::Vec; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + type ReturnTuple<'a> = + (alloy_sol_types::sol_data::Array>,); + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [136u8, 3u8, 219u8, 238u8]; + const SIGNATURE: &'static str = + "swapTokensForExactTokens(uint256,uint256,address[],address,uint256)"; + #[inline] fn new<'a>( tuple: as alloy_sol_types::SolType>::RustType, ) -> Self { tuple.into() } + #[inline] fn tokenize(&self) -> Self::Token<'_> { ( @@ -1091,41 +1057,38 @@ function swapTokensForExactTokens(uint256 amountOut, uint256 amountInMax, addres > as alloy_sol_types::SolType>::tokenize(&self.deadline), ) } + #[inline] fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { - ( - , - > as alloy_sol_types::SolType>::tokenize(ret), - ) + (, + > 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| { + as alloy_sol_types::SolType>::abi_decode_sequence(data).map( + |r| { let r: swapTokensForExactTokensReturn = r.into(); r.amounts - }) + }, + ) } + #[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: swapTokensForExactTokensReturn = r.into(); - r.amounts - }) + 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: swapTokensForExactTokensReturn = r.into(); + r.amounts + }) } } }; ///Container for all the [`BaoswapRouter`](self) function calls. #[derive(Clone)] - #[derive()] pub enum BaoswapRouterCalls { #[allow(missing_docs)] WETH(WETHCall), @@ -1141,8 +1104,9 @@ function swapTokensForExactTokens(uint256 amountOut, uint256 amountInMax, addres impl BaoswapRouterCalls { /// 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. + /// 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]] = &[ @@ -1152,14 +1116,6 @@ function swapTokensForExactTokens(uint256 amountOut, uint256 amountInMax, addres [196u8, 90u8, 1u8, 85u8], [232u8, 227u8, 55u8, 0u8], ]; - /// The names of the variants in the same order as `SELECTORS`. - pub const VARIANT_NAMES: &'static [&'static str] = &[ - ::core::stringify!(swapTokensForExactTokens), - ::core::stringify!(WETH), - ::core::stringify!(quote), - ::core::stringify!(factory), - ::core::stringify!(addLiquidity), - ]; /// The signatures in the same order as `SELECTORS`. pub const SIGNATURES: &'static [&'static str] = &[ ::SIGNATURE, @@ -1168,6 +1124,15 @@ function swapTokensForExactTokens(uint256 amountOut, uint256 amountInMax, addres ::SIGNATURE, ::SIGNATURE, ]; + /// The names of the variants in the same order as `SELECTORS`. + pub const VARIANT_NAMES: &'static [&'static str] = &[ + ::core::stringify!(swapTokensForExactTokens), + ::core::stringify!(WETH), + ::core::stringify!(quote), + ::core::stringify!(factory), + ::core::stringify!(addLiquidity), + ]; + /// Returns the signature for the given selector, if known. #[inline] pub fn signature_by_selector( @@ -1180,27 +1145,25 @@ function swapTokensForExactTokens(uint256 amountOut, uint256 amountInMax, addres ::core::result::Result::Err(_) => ::core::option::Option::None, } } + /// Returns the enum variant name for the given selector, if known. #[inline] - pub fn name_by_selector( - selector: [u8; 4usize], - ) -> ::core::option::Option<&'static str> { + pub fn name_by_selector(selector: [u8; 4usize]) -> ::core::option::Option<&'static str> { let sig = Self::signature_by_selector(selector)?; sig.split_once('(').map(|(name, _)| name) } } #[automatically_derived] impl alloy_sol_types::SolInterface for BaoswapRouterCalls { - const NAME: &'static str = "BaoswapRouterCalls"; - const MIN_DATA_LENGTH: usize = 0usize; const COUNT: usize = 5usize; + const MIN_DATA_LENGTH: usize = 0usize; + const NAME: &'static str = "BaoswapRouterCalls"; + #[inline] fn selector(&self) -> [u8; 4] { match self { Self::WETH(_) => ::SELECTOR, - Self::addLiquidity(_) => { - ::SELECTOR - } + Self::addLiquidity(_) => ::SELECTOR, Self::factory(_) => ::SELECTOR, Self::quote(_) => ::SELECTOR, Self::swapTokensForExactTokens(_) => { @@ -1208,31 +1171,29 @@ function swapTokensForExactTokens(uint256 amountOut, uint256 amountInMax, addres } } } + #[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 abi_decode_raw(selector: [u8; 4], data: &[u8]) -> alloy_sol_types::Result { + static DECODE_SHIMS: &[fn(&[u8]) -> alloy_sol_types::Result] = &[ { fn swapTokensForExactTokens( data: &[u8], ) -> alloy_sol_types::Result { ::abi_decode_raw( - data, - ) - .map(BaoswapRouterCalls::swapTokensForExactTokens) + data, + ) + .map(BaoswapRouterCalls::swapTokensForExactTokens) } swapTokensForExactTokens }, @@ -1244,45 +1205,36 @@ function swapTokensForExactTokens(uint256 amountOut, uint256 amountInMax, addres WETH }, { - fn quote( - data: &[u8], - ) -> alloy_sol_types::Result { + fn quote(data: &[u8]) -> alloy_sol_types::Result { ::abi_decode_raw(data) .map(BaoswapRouterCalls::quote) } quote }, { - fn factory( - data: &[u8], - ) -> alloy_sol_types::Result { + fn factory(data: &[u8]) -> alloy_sol_types::Result { ::abi_decode_raw(data) .map(BaoswapRouterCalls::factory) } factory }, { - fn addLiquidity( - data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, - ) + fn addLiquidity(data: &[u8]) -> alloy_sol_types::Result { + ::abi_decode_raw(data) .map(BaoswapRouterCalls::addLiquidity) } addLiquidity }, ]; let Ok(idx) = Self::SELECTORS.binary_search(&selector) else { - return Err( - alloy_sol_types::Error::unknown_selector( - ::NAME, - selector, - ), - ); + return Err(alloy_sol_types::Error::unknown_selector( + ::NAME, + selector, + )); }; DECODE_SHIMS[idx](data) } + #[inline] #[allow(non_snake_case)] fn abi_decode_raw_validate( @@ -1291,7 +1243,8 @@ function swapTokensForExactTokens(uint256 amountOut, uint256 amountInMax, addres ) -> alloy_sol_types::Result { static DECODE_VALIDATE_SHIMS: &[fn( &[u8], - ) -> alloy_sol_types::Result] = &[ + ) + -> alloy_sol_types::Result] = &[ { fn swapTokensForExactTokens( data: &[u8], @@ -1305,57 +1258,44 @@ function swapTokensForExactTokens(uint256 amountOut, uint256 amountInMax, addres }, { fn WETH(data: &[u8]) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) + ::abi_decode_raw_validate(data) .map(BaoswapRouterCalls::WETH) } WETH }, { - fn quote( - data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) + fn quote(data: &[u8]) -> alloy_sol_types::Result { + ::abi_decode_raw_validate(data) .map(BaoswapRouterCalls::quote) } quote }, { - fn factory( - data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) + fn factory(data: &[u8]) -> alloy_sol_types::Result { + ::abi_decode_raw_validate(data) .map(BaoswapRouterCalls::factory) } factory }, { - fn addLiquidity( - data: &[u8], - ) -> alloy_sol_types::Result { + fn addLiquidity(data: &[u8]) -> alloy_sol_types::Result { ::abi_decode_raw_validate( - data, - ) - .map(BaoswapRouterCalls::addLiquidity) + data, + ) + .map(BaoswapRouterCalls::addLiquidity) } addLiquidity }, ]; let Ok(idx) = Self::SELECTORS.binary_search(&selector) else { - return Err( - alloy_sol_types::Error::unknown_selector( - ::NAME, - selector, - ), - ); + return Err(alloy_sol_types::Error::unknown_selector( + ::NAME, + selector, + )); }; DECODE_VALIDATE_SHIMS[idx](data) } + #[inline] fn abi_encoded_size(&self) -> usize { match self { @@ -1363,9 +1303,7 @@ function swapTokensForExactTokens(uint256 amountOut, uint256 amountInMax, addres ::abi_encoded_size(inner) } Self::addLiquidity(inner) => { - ::abi_encoded_size( - inner, - ) + ::abi_encoded_size(inner) } Self::factory(inner) => { ::abi_encoded_size(inner) @@ -1380,6 +1318,7 @@ function swapTokensForExactTokens(uint256 amountOut, uint256 amountInMax, addres } } } + #[inline] fn abi_encode_raw(&self, out: &mut alloy_sol_types::private::Vec) { match self { @@ -1387,10 +1326,7 @@ function swapTokensForExactTokens(uint256 amountOut, uint256 amountInMax, addres ::abi_encode_raw(inner, out) } Self::addLiquidity(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } Self::factory(inner) => { ::abi_encode_raw(inner, out) @@ -1400,17 +1336,16 @@ function swapTokensForExactTokens(uint256 amountOut, uint256 amountInMax, addres } Self::swapTokensForExactTokens(inner) => { ::abi_encode_raw( - inner, - out, + inner, out, ) } } } } - use alloy_contract as alloy_contract; + use alloy_contract; /**Creates a new wrapper around an on-chain [`BaoswapRouter`](self) contract instance. -See the [wrapper's documentation](`BaoswapRouterInstance`) for more details.*/ + See the [wrapper's documentation](`BaoswapRouterInstance`) for more details.*/ #[inline] pub const fn new< P: alloy_contract::private::Provider, @@ -1423,15 +1358,15 @@ See the [wrapper's documentation](`BaoswapRouterInstance`) for more details.*/ } /**A [`BaoswapRouter`](self) instance. -Contains type-safe methods for interacting with an on-chain instance of the -[`BaoswapRouter`](self) contract located at a given `address`, using a given -provider `P`. + Contains type-safe methods for interacting with an on-chain instance of the + [`BaoswapRouter`](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. + 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.*/ + See the [module-level documentation](self) for all the available methods.*/ #[derive(Clone)] pub struct BaoswapRouterInstance { address: alloy_sol_types::private::Address, @@ -1442,43 +1377,45 @@ See the [module-level documentation](self) for all the available methods.*/ impl ::core::fmt::Debug for BaoswapRouterInstance { #[inline] fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { - f.debug_tuple("BaoswapRouterInstance").field(&self.address).finish() + f.debug_tuple("BaoswapRouterInstance") + .field(&self.address) + .finish() } } /// Instantiation and getters/setters. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > BaoswapRouterInstance { + impl, N: alloy_contract::private::Network> + BaoswapRouterInstance + { /**Creates a new wrapper around an on-chain [`BaoswapRouter`](self) contract instance. -See the [wrapper's documentation](`BaoswapRouterInstance`) for more details.*/ + See the [wrapper's documentation](`BaoswapRouterInstance`) for more details.*/ #[inline] - pub const fn new( - address: alloy_sol_types::private::Address, - __provider: P, - ) -> Self { + pub const fn new(address: alloy_sol_types::private::Address, __provider: P) -> Self { Self { address, provider: __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 { @@ -1486,7 +1423,8 @@ See the [wrapper's documentation](`BaoswapRouterInstance`) for more details.*/ } } impl BaoswapRouterInstance<&P, N> { - /// Clones the provider and returns a new instance with the cloned provider. + /// Clones the provider and returns a new instance with the cloned + /// provider. #[inline] pub fn with_cloned_provider(self) -> BaoswapRouterInstance { BaoswapRouterInstance { @@ -1497,24 +1435,27 @@ See the [wrapper's documentation](`BaoswapRouterInstance`) for more details.*/ } } /// Function calls. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > BaoswapRouterInstance { - /// Creates a new call builder using this contract instance's provider and address. + impl, N: alloy_contract::private::Network> + BaoswapRouterInstance + { + /// 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. + /// 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 [`WETH`] function. pub fn WETH(&self) -> alloy_contract::SolCallBuilder<&P, WETHCall, N> { self.call_builder(&WETHCall) } + ///Creates a new call builder for the [`addLiquidity`] function. pub fn addLiquidity( &self, @@ -1527,23 +1468,23 @@ See the [wrapper's documentation](`BaoswapRouterInstance`) for more details.*/ to: alloy_sol_types::private::Address, deadline: alloy_sol_types::private::primitives::aliases::U256, ) -> alloy_contract::SolCallBuilder<&P, addLiquidityCall, N> { - self.call_builder( - &addLiquidityCall { - tokenA, - tokenB, - amountADesired, - amountBDesired, - amountAMin, - amountBMin, - to, - deadline, - }, - ) + self.call_builder(&addLiquidityCall { + tokenA, + tokenB, + amountADesired, + amountBDesired, + amountAMin, + amountBMin, + to, + deadline, + }) } + ///Creates a new call builder for the [`factory`] function. pub fn factory(&self) -> alloy_contract::SolCallBuilder<&P, factoryCall, N> { self.call_builder(&factoryCall) } + ///Creates a new call builder for the [`quote`] function. pub fn quote( &self, @@ -1551,15 +1492,15 @@ See the [wrapper's documentation](`BaoswapRouterInstance`) for more details.*/ reserveA: alloy_sol_types::private::primitives::aliases::U256, reserveB: alloy_sol_types::private::primitives::aliases::U256, ) -> alloy_contract::SolCallBuilder<&P, quoteCall, N> { - self.call_builder( - "eCall { - amountA, - reserveA, - reserveB, - }, - ) + self.call_builder("eCall { + amountA, + reserveA, + reserveB, + }) } - ///Creates a new call builder for the [`swapTokensForExactTokens`] function. + + ///Creates a new call builder for the [`swapTokensForExactTokens`] + /// function. pub fn swapTokensForExactTokens( &self, amountOut: alloy_sol_types::private::primitives::aliases::U256, @@ -1568,26 +1509,25 @@ See the [wrapper's documentation](`BaoswapRouterInstance`) for more details.*/ to: alloy_sol_types::private::Address, deadline: alloy_sol_types::private::primitives::aliases::U256, ) -> alloy_contract::SolCallBuilder<&P, swapTokensForExactTokensCall, N> { - self.call_builder( - &swapTokensForExactTokensCall { - amountOut, - amountInMax, - path, - to, - deadline, - }, - ) + self.call_builder(&swapTokensForExactTokensCall { + amountOut, + amountInMax, + path, + to, + deadline, + }) } } /// Event filters. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > BaoswapRouterInstance { - /// Creates a new event filter using this contract instance's provider and address. + impl, N: alloy_contract::private::Network> + BaoswapRouterInstance + { + /// 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. + /// 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> { @@ -1597,21 +1537,17 @@ See the [wrapper's documentation](`BaoswapRouterInstance`) for more details.*/ } pub type Instance = BaoswapRouter::BaoswapRouterInstance<::alloy_provider::DynProvider>; use { - std::{sync::LazyLock, collections::HashMap}, - anyhow::{Result, Context}, - alloy_primitives::{address, Address}, - alloy_provider::{Provider, DynProvider}, + alloy_primitives::{Address, address}, + alloy_provider::{DynProvider, Provider}, + anyhow::{Context, Result}, + std::{collections::HashMap, sync::LazyLock}, }; pub const fn deployment_info(chain_id: u64) -> Option<(Address, Option)> { match chain_id { - 100u64 => { - Some(( - ::alloy_primitives::address!( - "0x6093AeBAC87d62b1A5a4cEec91204e35020E38bE" - ), - None, - )) - } + 100u64 => Some(( + ::alloy_primitives::address!("0x6093AeBAC87d62b1A5a4cEec91204e35020E38bE"), + None, + )), _ => None, } } @@ -1628,9 +1564,7 @@ pub const fn deployment_block(chain_id: &u64) -> Option { } } impl Instance { - pub fn deployed( - provider: &DynProvider, - ) -> impl Future> + Send { + pub fn deployed(provider: &DynProvider) -> impl Future> + Send { async move { let chain_id = provider .get_chain_id() diff --git a/contracts/generated/contracts-generated/chainalysisoracle/src/lib.rs b/contracts/generated/contracts-generated/chainalysisoracle/src/lib.rs index 20c8becafd..525e28a420 100644 --- a/contracts/generated/contracts-generated/chainalysisoracle/src/lib.rs +++ b/contracts/generated/contracts-generated/chainalysisoracle/src/lib.rs @@ -1,4 +1,10 @@ -#![allow(unused_imports, unused_attributes, clippy::all, rustdoc::all, non_snake_case)] +#![allow( + unused_imports, + unused_attributes, + clippy::all, + rustdoc::all, + non_snake_case +)] //! Auto-generated contract bindings. Do not edit. /** @@ -153,13 +159,12 @@ interface ChainalysisOracle { clippy::empty_structs_with_brackets )] pub mod ChainalysisOracle { - use super::*; - use alloy_sol_types as alloy_sol_types; + use {super::*, alloy_sol_types}; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Event with signature `NonSanctionedAddress(address)` and selector `0xd595018321fcb8c2bcbf5bfe4b27d74bea505825f7d195abe8517f94a065539c`. -```solidity -event NonSanctionedAddress(address indexed addr); -```*/ + ```solidity + event NonSanctionedAddress(address indexed addr); + ```*/ #[allow( non_camel_case_types, non_snake_case, @@ -178,24 +183,25 @@ event NonSanctionedAddress(address indexed addr); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[automatically_derived] impl alloy_sol_types::SolEvent for NonSanctionedAddress { + type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; 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::Address, ); - const SIGNATURE: &'static str = "NonSanctionedAddress(address)"; - const SIGNATURE_HASH: alloy_sol_types::private::B256 = alloy_sol_types::private::B256::new([ - 213u8, 149u8, 1u8, 131u8, 33u8, 252u8, 184u8, 194u8, 188u8, 191u8, 91u8, - 254u8, 75u8, 39u8, 215u8, 75u8, 234u8, 80u8, 88u8, 37u8, 247u8, 209u8, - 149u8, 171u8, 232u8, 81u8, 127u8, 148u8, 160u8, 101u8, 83u8, 156u8, - ]); + const ANONYMOUS: bool = false; + const SIGNATURE: &'static str = "NonSanctionedAddress(address)"; + const SIGNATURE_HASH: alloy_sol_types::private::B256 = + alloy_sol_types::private::B256::new([ + 213u8, 149u8, 1u8, 131u8, 33u8, 252u8, 184u8, 194u8, 188u8, 191u8, 91u8, 254u8, + 75u8, 39u8, 215u8, 75u8, 234u8, 80u8, 88u8, 37u8, 247u8, 209u8, 149u8, 171u8, + 232u8, 81u8, 127u8, 148u8, 160u8, 101u8, 83u8, 156u8, + ]); + #[allow(unused_variables)] #[inline] fn new( @@ -204,29 +210,31 @@ event NonSanctionedAddress(address indexed addr); ) -> Self { Self { addr: topics.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, - ), - ); + 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.addr.clone()) } + #[inline] fn encode_topics_raw( &self, @@ -235,9 +243,7 @@ event NonSanctionedAddress(address indexed addr); if out.len() < ::COUNT { return Err(alloy_sol_types::Error::Overrun); } - out[0usize] = alloy_sol_types::abi::token::WordToken( - Self::SIGNATURE_HASH, - ); + out[0usize] = alloy_sol_types::abi::token::WordToken(Self::SIGNATURE_HASH); out[1usize] = ::encode_topic( &self.addr, ); @@ -249,6 +255,7 @@ event NonSanctionedAddress(address indexed addr); 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) } @@ -263,9 +270,9 @@ event NonSanctionedAddress(address indexed addr); }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Event with signature `OwnershipTransferred(address,address)` and selector `0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0`. -```solidity -event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); -```*/ + ```solidity + event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); + ```*/ #[allow( non_camel_case_types, non_snake_case, @@ -286,25 +293,26 @@ event OwnershipTransferred(address indexed previousOwner, address indexed newOwn clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[automatically_derived] impl alloy_sol_types::SolEvent for OwnershipTransferred { + type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; 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::Address, alloy_sol_types::sol_data::Address, ); - const SIGNATURE: &'static str = "OwnershipTransferred(address,address)"; - const SIGNATURE_HASH: alloy_sol_types::private::B256 = alloy_sol_types::private::B256::new([ - 139u8, 224u8, 7u8, 156u8, 83u8, 22u8, 89u8, 20u8, 19u8, 68u8, 205u8, - 31u8, 208u8, 164u8, 242u8, 132u8, 25u8, 73u8, 127u8, 151u8, 34u8, 163u8, - 218u8, 175u8, 227u8, 180u8, 24u8, 111u8, 107u8, 100u8, 87u8, 224u8, - ]); + const ANONYMOUS: bool = false; + const SIGNATURE: &'static str = "OwnershipTransferred(address,address)"; + const SIGNATURE_HASH: alloy_sol_types::private::B256 = + alloy_sol_types::private::B256::new([ + 139u8, 224u8, 7u8, 156u8, 83u8, 22u8, 89u8, 20u8, 19u8, 68u8, 205u8, 31u8, + 208u8, 164u8, 242u8, 132u8, 25u8, 73u8, 127u8, 151u8, 34u8, 163u8, 218u8, + 175u8, 227u8, 180u8, 24u8, 111u8, 107u8, 100u8, 87u8, 224u8, + ]); + #[allow(unused_variables)] #[inline] fn new( @@ -316,25 +324,26 @@ event OwnershipTransferred(address indexed previousOwner, address indexed newOwn newOwner: topics.2, } } + #[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, - ), - ); + 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 { ( @@ -343,6 +352,7 @@ event OwnershipTransferred(address indexed previousOwner, address indexed newOwn self.newOwner.clone(), ) } + #[inline] fn encode_topics_raw( &self, @@ -351,9 +361,7 @@ event OwnershipTransferred(address indexed previousOwner, address indexed newOwn if out.len() < ::COUNT { return Err(alloy_sol_types::Error::Overrun); } - out[0usize] = alloy_sol_types::abi::token::WordToken( - Self::SIGNATURE_HASH, - ); + out[0usize] = alloy_sol_types::abi::token::WordToken(Self::SIGNATURE_HASH); out[1usize] = ::encode_topic( &self.previousOwner, ); @@ -368,6 +376,7 @@ event OwnershipTransferred(address indexed previousOwner, address indexed newOwn 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) } @@ -382,9 +391,9 @@ event OwnershipTransferred(address indexed previousOwner, address indexed newOwn }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Event with signature `SanctionedAddress(address)` and selector `0x8027911123971054d93579ebea046c8461473fa4d2e510b9b49eed3bed3270e0`. -```solidity -event SanctionedAddress(address indexed addr); -```*/ + ```solidity + event SanctionedAddress(address indexed addr); + ```*/ #[allow( non_camel_case_types, non_snake_case, @@ -403,24 +412,25 @@ event SanctionedAddress(address indexed addr); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[automatically_derived] impl alloy_sol_types::SolEvent for SanctionedAddress { + type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; 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::Address, ); - const SIGNATURE: &'static str = "SanctionedAddress(address)"; - const SIGNATURE_HASH: alloy_sol_types::private::B256 = alloy_sol_types::private::B256::new([ - 128u8, 39u8, 145u8, 17u8, 35u8, 151u8, 16u8, 84u8, 217u8, 53u8, 121u8, - 235u8, 234u8, 4u8, 108u8, 132u8, 97u8, 71u8, 63u8, 164u8, 210u8, 229u8, - 16u8, 185u8, 180u8, 158u8, 237u8, 59u8, 237u8, 50u8, 112u8, 224u8, - ]); + const ANONYMOUS: bool = false; + const SIGNATURE: &'static str = "SanctionedAddress(address)"; + const SIGNATURE_HASH: alloy_sol_types::private::B256 = + alloy_sol_types::private::B256::new([ + 128u8, 39u8, 145u8, 17u8, 35u8, 151u8, 16u8, 84u8, 217u8, 53u8, 121u8, 235u8, + 234u8, 4u8, 108u8, 132u8, 97u8, 71u8, 63u8, 164u8, 210u8, 229u8, 16u8, 185u8, + 180u8, 158u8, 237u8, 59u8, 237u8, 50u8, 112u8, 224u8, + ]); + #[allow(unused_variables)] #[inline] fn new( @@ -429,29 +439,31 @@ event SanctionedAddress(address indexed addr); ) -> Self { Self { addr: topics.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, - ), - ); + 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.addr.clone()) } + #[inline] fn encode_topics_raw( &self, @@ -460,9 +472,7 @@ event SanctionedAddress(address indexed addr); if out.len() < ::COUNT { return Err(alloy_sol_types::Error::Overrun); } - out[0usize] = alloy_sol_types::abi::token::WordToken( - Self::SIGNATURE_HASH, - ); + out[0usize] = alloy_sol_types::abi::token::WordToken(Self::SIGNATURE_HASH); out[1usize] = ::encode_topic( &self.addr, ); @@ -474,6 +484,7 @@ event SanctionedAddress(address indexed addr); 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) } @@ -488,9 +499,9 @@ event SanctionedAddress(address indexed addr); }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Event with signature `SanctionedAddressesAdded(address[])` and selector `0x2596d7dd6966c5673f9c06ddb0564c4f0e6d8d206ea075b83ad9ddd71a4fb927`. -```solidity -event SanctionedAddressesAdded(address[] addrs); -```*/ + ```solidity + event SanctionedAddressesAdded(address[] addrs); + ```*/ #[allow( non_camel_case_types, non_snake_case, @@ -509,23 +520,23 @@ event SanctionedAddressesAdded(address[] addrs); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[automatically_derived] impl alloy_sol_types::SolEvent for SanctionedAddressesAdded { - type DataTuple<'a> = ( - alloy_sol_types::sol_data::Array, - ); - type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + type DataTuple<'a> = + (alloy_sol_types::sol_data::Array,); type TopicList = (alloy_sol_types::sol_data::FixedBytes<32>,); - const SIGNATURE: &'static str = "SanctionedAddressesAdded(address[])"; - const SIGNATURE_HASH: alloy_sol_types::private::B256 = alloy_sol_types::private::B256::new([ - 37u8, 150u8, 215u8, 221u8, 105u8, 102u8, 197u8, 103u8, 63u8, 156u8, 6u8, - 221u8, 176u8, 86u8, 76u8, 79u8, 14u8, 109u8, 141u8, 32u8, 110u8, 160u8, - 117u8, 184u8, 58u8, 217u8, 221u8, 215u8, 26u8, 79u8, 185u8, 39u8, - ]); + const ANONYMOUS: bool = false; + const SIGNATURE: &'static str = "SanctionedAddressesAdded(address[])"; + const SIGNATURE_HASH: alloy_sol_types::private::B256 = + alloy_sol_types::private::B256::new([ + 37u8, 150u8, 215u8, 221u8, 105u8, 102u8, 197u8, 103u8, 63u8, 156u8, 6u8, 221u8, + 176u8, 86u8, 76u8, 79u8, 14u8, 109u8, 141u8, 32u8, 110u8, 160u8, 117u8, 184u8, + 58u8, 217u8, 221u8, 215u8, 26u8, 79u8, 185u8, 39u8, + ]); + #[allow(unused_variables)] #[inline] fn new( @@ -534,33 +545,35 @@ event SanctionedAddressesAdded(address[] addrs); ) -> Self { Self { addrs: 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, - ), - ); + 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.addrs), - ) + ( as alloy_sol_types::SolType>::tokenize( + &self.addrs + ),) } + #[inline] fn topics(&self) -> ::RustType { (Self::SIGNATURE_HASH.into(),) } + #[inline] fn encode_topics_raw( &self, @@ -569,9 +582,7 @@ event SanctionedAddressesAdded(address[] addrs); if out.len() < ::COUNT { return Err(alloy_sol_types::Error::Overrun); } - out[0usize] = alloy_sol_types::abi::token::WordToken( - Self::SIGNATURE_HASH, - ); + out[0usize] = alloy_sol_types::abi::token::WordToken(Self::SIGNATURE_HASH); Ok(()) } } @@ -580,6 +591,7 @@ event SanctionedAddressesAdded(address[] addrs); 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) } @@ -587,18 +599,16 @@ event SanctionedAddressesAdded(address[] addrs); #[automatically_derived] impl From<&SanctionedAddressesAdded> for alloy_sol_types::private::LogData { #[inline] - fn from( - this: &SanctionedAddressesAdded, - ) -> alloy_sol_types::private::LogData { + fn from(this: &SanctionedAddressesAdded) -> alloy_sol_types::private::LogData { alloy_sol_types::SolEvent::encode_log_data(this) } } }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Event with signature `SanctionedAddressesRemoved(address[])` and selector `0x32aab684eee99db715515d1a9987a8fe33bb6341b0e35e60db7eab48a08f9a3a`. -```solidity -event SanctionedAddressesRemoved(address[] addrs); -```*/ + ```solidity + event SanctionedAddressesRemoved(address[] addrs); + ```*/ #[allow( non_camel_case_types, non_snake_case, @@ -617,23 +627,23 @@ event SanctionedAddressesRemoved(address[] addrs); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[automatically_derived] impl alloy_sol_types::SolEvent for SanctionedAddressesRemoved { - type DataTuple<'a> = ( - alloy_sol_types::sol_data::Array, - ); - type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + type DataTuple<'a> = + (alloy_sol_types::sol_data::Array,); type TopicList = (alloy_sol_types::sol_data::FixedBytes<32>,); - const SIGNATURE: &'static str = "SanctionedAddressesRemoved(address[])"; - const SIGNATURE_HASH: alloy_sol_types::private::B256 = alloy_sol_types::private::B256::new([ - 50u8, 170u8, 182u8, 132u8, 238u8, 233u8, 157u8, 183u8, 21u8, 81u8, 93u8, - 26u8, 153u8, 135u8, 168u8, 254u8, 51u8, 187u8, 99u8, 65u8, 176u8, 227u8, - 94u8, 96u8, 219u8, 126u8, 171u8, 72u8, 160u8, 143u8, 154u8, 58u8, - ]); + const ANONYMOUS: bool = false; + const SIGNATURE: &'static str = "SanctionedAddressesRemoved(address[])"; + const SIGNATURE_HASH: alloy_sol_types::private::B256 = + alloy_sol_types::private::B256::new([ + 50u8, 170u8, 182u8, 132u8, 238u8, 233u8, 157u8, 183u8, 21u8, 81u8, 93u8, 26u8, + 153u8, 135u8, 168u8, 254u8, 51u8, 187u8, 99u8, 65u8, 176u8, 227u8, 94u8, 96u8, + 219u8, 126u8, 171u8, 72u8, 160u8, 143u8, 154u8, 58u8, + ]); + #[allow(unused_variables)] #[inline] fn new( @@ -642,33 +652,35 @@ event SanctionedAddressesRemoved(address[] addrs); ) -> Self { Self { addrs: 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, - ), - ); + 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.addrs), - ) + ( as alloy_sol_types::SolType>::tokenize( + &self.addrs + ),) } + #[inline] fn topics(&self) -> ::RustType { (Self::SIGNATURE_HASH.into(),) } + #[inline] fn encode_topics_raw( &self, @@ -677,9 +689,7 @@ event SanctionedAddressesRemoved(address[] addrs); if out.len() < ::COUNT { return Err(alloy_sol_types::Error::Overrun); } - out[0usize] = alloy_sol_types::abi::token::WordToken( - Self::SIGNATURE_HASH, - ); + out[0usize] = alloy_sol_types::abi::token::WordToken(Self::SIGNATURE_HASH); Ok(()) } } @@ -688,6 +698,7 @@ event SanctionedAddressesRemoved(address[] addrs); 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) } @@ -695,22 +706,20 @@ event SanctionedAddressesRemoved(address[] addrs); #[automatically_derived] impl From<&SanctionedAddressesRemoved> for alloy_sol_types::private::LogData { #[inline] - fn from( - this: &SanctionedAddressesRemoved, - ) -> alloy_sol_types::private::LogData { + fn from(this: &SanctionedAddressesRemoved) -> alloy_sol_types::private::LogData { alloy_sol_types::SolEvent::encode_log_data(this) } } }; /**Constructor`. -```solidity -constructor(); -```*/ + ```solidity + constructor(); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct constructorCall {} const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -719,9 +728,7 @@ constructor(); type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -746,15 +753,15 @@ constructor(); #[automatically_derived] impl alloy_sol_types::SolConstructor for constructorCall { type Parameters<'a> = (); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + 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<'_> { () @@ -763,9 +770,9 @@ constructor(); }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `isSanctioned(address)` and selector `0xdf592f7d`. -```solidity -function isSanctioned(address addr) external view returns (bool); -```*/ + ```solidity + function isSanctioned(address addr) external view returns (bool); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct isSanctionedCall { @@ -773,7 +780,8 @@ function isSanctioned(address addr) external view returns (bool); pub addr: alloy_sol_types::private::Address, } #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`isSanctioned(address)`](isSanctionedCall) function. + ///Container type for the return parameters of the + /// [`isSanctioned(address)`](isSanctionedCall) function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct isSanctionedReturn { @@ -787,7 +795,7 @@ function isSanctioned(address addr) external view returns (bool); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -796,9 +804,7 @@ function isSanctioned(address addr) external view returns (bool); type UnderlyingRustTuple<'a> = (alloy_sol_types::private::Address,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -828,9 +834,7 @@ function isSanctioned(address addr) external view returns (bool); type UnderlyingRustTuple<'a> = (bool,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -855,22 +859,21 @@ function isSanctioned(address addr) external view returns (bool); #[automatically_derived] impl alloy_sol_types::SolCall for isSanctionedCall { type Parameters<'a> = (alloy_sol_types::sol_data::Address,); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = bool; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (alloy_sol_types::sol_data::Bool,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "isSanctioned(address)"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [223u8, 89u8, 47u8, 125u8]; + const SIGNATURE: &'static str = "isSanctioned(address)"; + #[inline] fn new<'a>( tuple: as alloy_sol_types::SolType>::RustType, ) -> Self { tuple.into() } + #[inline] fn tokenize(&self) -> Self::Token<'_> { ( @@ -879,48 +882,45 @@ function isSanctioned(address addr) external view returns (bool); ), ) } + #[inline] fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { - ( - ::tokenize( - ret, - ), - ) + (::tokenize(ret),) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) - .map(|r| { + as alloy_sol_types::SolType>::abi_decode_sequence(data).map( + |r| { let r: isSanctionedReturn = 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: isSanctionedReturn = r.into(); - r._0 - }) + 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: isSanctionedReturn = r.into(); + r._0 + }) } } }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `name()` and selector `0x06fdde03`. -```solidity -function name() external pure returns (string memory); -```*/ + ```solidity + function name() external pure returns (string memory); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct nameCall; #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`name()`](nameCall) function. + ///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 { @@ -934,7 +934,7 @@ function name() external pure returns (string memory); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -943,9 +943,7 @@ function name() external pure returns (string memory); type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -975,9 +973,7 @@ function name() external pure returns (string memory); type UnderlyingRustTuple<'a> = (alloy_sol_types::private::String,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1002,68 +998,64 @@ function name() external pure returns (string memory); #[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 ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (alloy_sol_types::sol_data::String,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "name()"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [6u8, 253u8, 222u8, 3u8]; + const SIGNATURE: &'static str = "name()"; + #[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, - ), - ) + (::tokenize(ret),) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) - .map(|r| { + 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 - }) + 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(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `owner()` and selector `0x8da5cb5b`. -```solidity -function owner() external view returns (address); -```*/ + ```solidity + function owner() external view returns (address); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct ownerCall; #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`owner()`](ownerCall) function. + ///Container type for the return parameters of the [`owner()`](ownerCall) + /// function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct ownerReturn { @@ -1077,7 +1069,7 @@ function owner() external view returns (address); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -1086,9 +1078,7 @@ function owner() external view returns (address); type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1118,9 +1108,7 @@ function owner() external view returns (address); type UnderlyingRustTuple<'a> = (alloy_sol_types::private::Address,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1145,61 +1133,55 @@ function owner() external view returns (address); #[automatically_derived] impl alloy_sol_types::SolCall for ownerCall { type Parameters<'a> = (); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = alloy_sol_types::private::Address; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (alloy_sol_types::sol_data::Address,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "owner()"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [141u8, 165u8, 203u8, 91u8]; + const SIGNATURE: &'static str = "owner()"; + #[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, - ), - ) + (::tokenize(ret),) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) - .map(|r| { + as alloy_sol_types::SolType>::abi_decode_sequence(data).map( + |r| { let r: ownerReturn = 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: ownerReturn = r.into(); - r._0 - }) + 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: ownerReturn = r.into(); + r._0 + }) } } }; ///Container for all the [`ChainalysisOracle`](self) function calls. #[derive(Clone)] - #[derive()] pub enum ChainalysisOracleCalls { #[allow(missing_docs)] isSanctioned(isSanctionedCall), @@ -1211,8 +1193,9 @@ function owner() external view returns (address); impl ChainalysisOracleCalls { /// 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. + /// 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]] = &[ @@ -1220,18 +1203,19 @@ function owner() external view returns (address); [141u8, 165u8, 203u8, 91u8], [223u8, 89u8, 47u8, 125u8], ]; - /// The names of the variants in the same order as `SELECTORS`. - pub const VARIANT_NAMES: &'static [&'static str] = &[ - ::core::stringify!(name), - ::core::stringify!(owner), - ::core::stringify!(isSanctioned), - ]; /// The signatures in the same order as `SELECTORS`. pub const SIGNATURES: &'static [&'static str] = &[ ::SIGNATURE, ::SIGNATURE, ::SIGNATURE, ]; + /// The names of the variants in the same order as `SELECTORS`. + pub const VARIANT_NAMES: &'static [&'static str] = &[ + ::core::stringify!(name), + ::core::stringify!(owner), + ::core::stringify!(isSanctioned), + ]; + /// Returns the signature for the given selector, if known. #[inline] pub fn signature_by_selector( @@ -1244,87 +1228,78 @@ function owner() external view returns (address); ::core::result::Result::Err(_) => ::core::option::Option::None, } } + /// Returns the enum variant name for the given selector, if known. #[inline] - pub fn name_by_selector( - selector: [u8; 4usize], - ) -> ::core::option::Option<&'static str> { + pub fn name_by_selector(selector: [u8; 4usize]) -> ::core::option::Option<&'static str> { let sig = Self::signature_by_selector(selector)?; sig.split_once('(').map(|(name, _)| name) } } #[automatically_derived] impl alloy_sol_types::SolInterface for ChainalysisOracleCalls { - const NAME: &'static str = "ChainalysisOracleCalls"; - const MIN_DATA_LENGTH: usize = 0usize; const COUNT: usize = 3usize; + const MIN_DATA_LENGTH: usize = 0usize; + const NAME: &'static str = "ChainalysisOracleCalls"; + #[inline] fn selector(&self) -> [u8; 4] { match self { - Self::isSanctioned(_) => { - ::SELECTOR - } + Self::isSanctioned(_) => ::SELECTOR, Self::name(_) => ::SELECTOR, Self::owner(_) => ::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 name( - data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw(data) - .map(ChainalysisOracleCalls::name) - } - name - }, - { - fn owner( - data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw(data) - .map(ChainalysisOracleCalls::owner) - } - owner - }, - { - fn isSanctioned( - data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, - ) - .map(ChainalysisOracleCalls::isSanctioned) - } - isSanctioned - }, - ]; + fn abi_decode_raw(selector: [u8; 4], data: &[u8]) -> alloy_sol_types::Result { + static DECODE_SHIMS: &[fn(&[u8]) -> alloy_sol_types::Result] = + &[ + { + fn name(data: &[u8]) -> alloy_sol_types::Result { + ::abi_decode_raw(data) + .map(ChainalysisOracleCalls::name) + } + name + }, + { + fn owner(data: &[u8]) -> alloy_sol_types::Result { + ::abi_decode_raw(data) + .map(ChainalysisOracleCalls::owner) + } + owner + }, + { + fn isSanctioned( + data: &[u8], + ) -> alloy_sol_types::Result + { + ::abi_decode_raw(data) + .map(ChainalysisOracleCalls::isSanctioned) + } + isSanctioned + }, + ]; let Ok(idx) = Self::SELECTORS.binary_search(&selector) else { - return Err( - alloy_sol_types::Error::unknown_selector( - ::NAME, - selector, - ), - ); + return Err(alloy_sol_types::Error::unknown_selector( + ::NAME, + selector, + )); }; DECODE_SHIMS[idx](data) } + #[inline] #[allow(non_snake_case)] fn abi_decode_raw_validate( @@ -1333,25 +1308,19 @@ function owner() external view returns (address); ) -> alloy_sol_types::Result { static DECODE_VALIDATE_SHIMS: &[fn( &[u8], - ) -> alloy_sol_types::Result] = &[ + ) -> alloy_sol_types::Result< + ChainalysisOracleCalls, + >] = &[ { - fn name( - data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) + fn name(data: &[u8]) -> alloy_sol_types::Result { + ::abi_decode_raw_validate(data) .map(ChainalysisOracleCalls::name) } name }, { - fn owner( - data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) + fn owner(data: &[u8]) -> alloy_sol_types::Result { + ::abi_decode_raw_validate(data) .map(ChainalysisOracleCalls::owner) } owner @@ -1361,30 +1330,27 @@ function owner() external view returns (address); data: &[u8], ) -> alloy_sol_types::Result { ::abi_decode_raw_validate( - data, - ) - .map(ChainalysisOracleCalls::isSanctioned) + data, + ) + .map(ChainalysisOracleCalls::isSanctioned) } isSanctioned }, ]; let Ok(idx) = Self::SELECTORS.binary_search(&selector) else { - return Err( - alloy_sol_types::Error::unknown_selector( - ::NAME, - selector, - ), - ); + 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::isSanctioned(inner) => { - ::abi_encoded_size( - inner, - ) + ::abi_encoded_size(inner) } Self::name(inner) => { ::abi_encoded_size(inner) @@ -1394,14 +1360,12 @@ function owner() external view returns (address); } } } + #[inline] fn abi_encode_raw(&self, out: &mut alloy_sol_types::private::Vec) { match self { Self::isSanctioned(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } Self::name(inner) => { ::abi_encode_raw(inner, out) @@ -1413,8 +1377,7 @@ function owner() external view returns (address); } } ///Container for all the [`ChainalysisOracle`](self) events. - #[derive(Clone)] - #[derive(Debug, PartialEq, Eq, Hash)] + #[derive(Clone, Debug, PartialEq, Eq, Hash)] pub enum ChainalysisOracleEvents { #[allow(missing_docs)] NonSanctionedAddress(NonSanctionedAddress), @@ -1430,45 +1393,38 @@ function owner() external view returns (address); impl ChainalysisOracleEvents { /// 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. + /// 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]] = &[ [ - 37u8, 150u8, 215u8, 221u8, 105u8, 102u8, 197u8, 103u8, 63u8, 156u8, 6u8, - 221u8, 176u8, 86u8, 76u8, 79u8, 14u8, 109u8, 141u8, 32u8, 110u8, 160u8, - 117u8, 184u8, 58u8, 217u8, 221u8, 215u8, 26u8, 79u8, 185u8, 39u8, + 37u8, 150u8, 215u8, 221u8, 105u8, 102u8, 197u8, 103u8, 63u8, 156u8, 6u8, 221u8, + 176u8, 86u8, 76u8, 79u8, 14u8, 109u8, 141u8, 32u8, 110u8, 160u8, 117u8, 184u8, + 58u8, 217u8, 221u8, 215u8, 26u8, 79u8, 185u8, 39u8, ], [ - 50u8, 170u8, 182u8, 132u8, 238u8, 233u8, 157u8, 183u8, 21u8, 81u8, 93u8, - 26u8, 153u8, 135u8, 168u8, 254u8, 51u8, 187u8, 99u8, 65u8, 176u8, 227u8, - 94u8, 96u8, 219u8, 126u8, 171u8, 72u8, 160u8, 143u8, 154u8, 58u8, + 50u8, 170u8, 182u8, 132u8, 238u8, 233u8, 157u8, 183u8, 21u8, 81u8, 93u8, 26u8, + 153u8, 135u8, 168u8, 254u8, 51u8, 187u8, 99u8, 65u8, 176u8, 227u8, 94u8, 96u8, + 219u8, 126u8, 171u8, 72u8, 160u8, 143u8, 154u8, 58u8, ], [ - 128u8, 39u8, 145u8, 17u8, 35u8, 151u8, 16u8, 84u8, 217u8, 53u8, 121u8, - 235u8, 234u8, 4u8, 108u8, 132u8, 97u8, 71u8, 63u8, 164u8, 210u8, 229u8, - 16u8, 185u8, 180u8, 158u8, 237u8, 59u8, 237u8, 50u8, 112u8, 224u8, + 128u8, 39u8, 145u8, 17u8, 35u8, 151u8, 16u8, 84u8, 217u8, 53u8, 121u8, 235u8, + 234u8, 4u8, 108u8, 132u8, 97u8, 71u8, 63u8, 164u8, 210u8, 229u8, 16u8, 185u8, + 180u8, 158u8, 237u8, 59u8, 237u8, 50u8, 112u8, 224u8, ], [ - 139u8, 224u8, 7u8, 156u8, 83u8, 22u8, 89u8, 20u8, 19u8, 68u8, 205u8, - 31u8, 208u8, 164u8, 242u8, 132u8, 25u8, 73u8, 127u8, 151u8, 34u8, 163u8, - 218u8, 175u8, 227u8, 180u8, 24u8, 111u8, 107u8, 100u8, 87u8, 224u8, + 139u8, 224u8, 7u8, 156u8, 83u8, 22u8, 89u8, 20u8, 19u8, 68u8, 205u8, 31u8, 208u8, + 164u8, 242u8, 132u8, 25u8, 73u8, 127u8, 151u8, 34u8, 163u8, 218u8, 175u8, 227u8, + 180u8, 24u8, 111u8, 107u8, 100u8, 87u8, 224u8, ], [ - 213u8, 149u8, 1u8, 131u8, 33u8, 252u8, 184u8, 194u8, 188u8, 191u8, 91u8, - 254u8, 75u8, 39u8, 215u8, 75u8, 234u8, 80u8, 88u8, 37u8, 247u8, 209u8, - 149u8, 171u8, 232u8, 81u8, 127u8, 148u8, 160u8, 101u8, 83u8, 156u8, + 213u8, 149u8, 1u8, 131u8, 33u8, 252u8, 184u8, 194u8, 188u8, 191u8, 91u8, 254u8, + 75u8, 39u8, 215u8, 75u8, 234u8, 80u8, 88u8, 37u8, 247u8, 209u8, 149u8, 171u8, + 232u8, 81u8, 127u8, 148u8, 160u8, 101u8, 83u8, 156u8, ], ]; - /// The names of the variants in the same order as `SELECTORS`. - pub const VARIANT_NAMES: &'static [&'static str] = &[ - ::core::stringify!(SanctionedAddressesAdded), - ::core::stringify!(SanctionedAddressesRemoved), - ::core::stringify!(SanctionedAddress), - ::core::stringify!(OwnershipTransferred), - ::core::stringify!(NonSanctionedAddress), - ]; /// The signatures in the same order as `SELECTORS`. pub const SIGNATURES: &'static [&'static str] = &[ ::SIGNATURE, @@ -1477,6 +1433,15 @@ function owner() external view returns (address); ::SIGNATURE, ::SIGNATURE, ]; + /// The names of the variants in the same order as `SELECTORS`. + pub const VARIANT_NAMES: &'static [&'static str] = &[ + ::core::stringify!(SanctionedAddressesAdded), + ::core::stringify!(SanctionedAddressesRemoved), + ::core::stringify!(SanctionedAddress), + ::core::stringify!(OwnershipTransferred), + ::core::stringify!(NonSanctionedAddress), + ]; + /// Returns the signature for the given selector, if known. #[inline] pub fn signature_by_selector( @@ -1489,80 +1454,61 @@ function owner() external view returns (address); ::core::result::Result::Err(_) => ::core::option::Option::None, } } + /// Returns the enum variant name for the given selector, if known. #[inline] - pub fn name_by_selector( - selector: [u8; 32usize], - ) -> ::core::option::Option<&'static str> { + pub fn name_by_selector(selector: [u8; 32usize]) -> ::core::option::Option<&'static str> { let sig = Self::signature_by_selector(selector)?; sig.split_once('(').map(|(name, _)| name) } } #[automatically_derived] impl alloy_sol_types::SolEventInterface for ChainalysisOracleEvents { - const NAME: &'static str = "ChainalysisOracleEvents"; const COUNT: usize = 5usize; + const NAME: &'static str = "ChainalysisOracleEvents"; + fn decode_raw_log( topics: &[alloy_sol_types::Word], data: &[u8], ) -> alloy_sol_types::Result { match topics.first().copied() { - Some( - ::SIGNATURE_HASH, - ) => { + Some(::SIGNATURE_HASH) => { ::decode_raw_log( - topics, - data, - ) - .map(Self::NonSanctionedAddress) + topics, data, + ) + .map(Self::NonSanctionedAddress) } - Some( - ::SIGNATURE_HASH, - ) => { + Some(::SIGNATURE_HASH) => { ::decode_raw_log( - topics, - data, - ) - .map(Self::OwnershipTransferred) + topics, data, + ) + .map(Self::OwnershipTransferred) } - Some( - ::SIGNATURE_HASH, - ) => { - ::decode_raw_log( - topics, - data, - ) + Some(::SIGNATURE_HASH) => { + ::decode_raw_log(topics, data) .map(Self::SanctionedAddress) } - Some( - ::SIGNATURE_HASH, - ) => { + Some(::SIGNATURE_HASH) => { ::decode_raw_log( - topics, - data, - ) - .map(Self::SanctionedAddressesAdded) + topics, data, + ) + .map(Self::SanctionedAddressesAdded) } - Some( - ::SIGNATURE_HASH, - ) => { + Some(::SIGNATURE_HASH) => { ::decode_raw_log( - topics, - data, - ) - .map(Self::SanctionedAddressesRemoved) + topics, data, + ) + .map(Self::SanctionedAddressesRemoved) } - _ => { - 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(), - ), + _ => 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(), ), - }) - } + ), + }), } } } @@ -1587,6 +1533,7 @@ function owner() external view returns (address); } } } + fn into_log_data(self) -> alloy_sol_types::private::LogData { match self { Self::NonSanctionedAddress(inner) => { @@ -1607,10 +1554,10 @@ function owner() external view returns (address); } } } - use alloy_contract as alloy_contract; + use alloy_contract; /**Creates a new wrapper around an on-chain [`ChainalysisOracle`](self) contract instance. -See the [wrapper's documentation](`ChainalysisOracleInstance`) for more details.*/ + See the [wrapper's documentation](`ChainalysisOracleInstance`) for more details.*/ #[inline] pub const fn new< P: alloy_contract::private::Provider, @@ -1623,15 +1570,15 @@ See the [wrapper's documentation](`ChainalysisOracleInstance`) for more details. } /**A [`ChainalysisOracle`](self) instance. -Contains type-safe methods for interacting with an on-chain instance of the -[`ChainalysisOracle`](self) contract located at a given `address`, using a given -provider `P`. + Contains type-safe methods for interacting with an on-chain instance of the + [`ChainalysisOracle`](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. + 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.*/ + See the [module-level documentation](self) for all the available methods.*/ #[derive(Clone)] pub struct ChainalysisOracleInstance { address: alloy_sol_types::private::Address, @@ -1642,43 +1589,45 @@ See the [module-level documentation](self) for all the available methods.*/ impl ::core::fmt::Debug for ChainalysisOracleInstance { #[inline] fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { - f.debug_tuple("ChainalysisOracleInstance").field(&self.address).finish() + f.debug_tuple("ChainalysisOracleInstance") + .field(&self.address) + .finish() } } /// Instantiation and getters/setters. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > ChainalysisOracleInstance { + impl, N: alloy_contract::private::Network> + ChainalysisOracleInstance + { /**Creates a new wrapper around an on-chain [`ChainalysisOracle`](self) contract instance. -See the [wrapper's documentation](`ChainalysisOracleInstance`) for more details.*/ + See the [wrapper's documentation](`ChainalysisOracleInstance`) for more details.*/ #[inline] - pub const fn new( - address: alloy_sol_types::private::Address, - __provider: P, - ) -> Self { + pub const fn new(address: alloy_sol_types::private::Address, __provider: P) -> Self { Self { address, provider: __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 { @@ -1686,7 +1635,8 @@ See the [wrapper's documentation](`ChainalysisOracleInstance`) for more details. } } impl ChainalysisOracleInstance<&P, N> { - /// Clones the provider and returns a new instance with the cloned provider. + /// Clones the provider and returns a new instance with the cloned + /// provider. #[inline] pub fn with_cloned_provider(self) -> ChainalysisOracleInstance { ChainalysisOracleInstance { @@ -1697,20 +1647,22 @@ See the [wrapper's documentation](`ChainalysisOracleInstance`) for more details. } } /// Function calls. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > ChainalysisOracleInstance { - /// Creates a new call builder using this contract instance's provider and address. + impl, N: alloy_contract::private::Network> + ChainalysisOracleInstance + { + /// 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. + /// 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 [`isSanctioned`] function. pub fn isSanctioned( &self, @@ -1718,54 +1670,62 @@ See the [wrapper's documentation](`ChainalysisOracleInstance`) for more details. ) -> alloy_contract::SolCallBuilder<&P, isSanctionedCall, N> { self.call_builder(&isSanctionedCall { addr }) } + ///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 [`owner`] function. pub fn owner(&self) -> alloy_contract::SolCallBuilder<&P, ownerCall, N> { self.call_builder(&ownerCall) } } /// Event filters. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > ChainalysisOracleInstance { - /// Creates a new event filter using this contract instance's provider and address. + impl, N: alloy_contract::private::Network> + ChainalysisOracleInstance + { + /// 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. + /// 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 [`NonSanctionedAddress`] event. pub fn NonSanctionedAddress_filter( &self, ) -> alloy_contract::Event<&P, NonSanctionedAddress, N> { self.event_filter::() } + ///Creates a new event filter for the [`OwnershipTransferred`] event. pub fn OwnershipTransferred_filter( &self, ) -> alloy_contract::Event<&P, OwnershipTransferred, N> { self.event_filter::() } + ///Creates a new event filter for the [`SanctionedAddress`] event. - pub fn SanctionedAddress_filter( - &self, - ) -> alloy_contract::Event<&P, SanctionedAddress, N> { + pub fn SanctionedAddress_filter(&self) -> alloy_contract::Event<&P, SanctionedAddress, N> { self.event_filter::() } - ///Creates a new event filter for the [`SanctionedAddressesAdded`] event. + + ///Creates a new event filter for the [`SanctionedAddressesAdded`] + /// event. pub fn SanctionedAddressesAdded_filter( &self, ) -> alloy_contract::Event<&P, SanctionedAddressesAdded, N> { self.event_filter::() } - ///Creates a new event filter for the [`SanctionedAddressesRemoved`] event. + + ///Creates a new event filter for the [`SanctionedAddressesRemoved`] + /// event. pub fn SanctionedAddressesRemoved_filter( &self, ) -> alloy_contract::Event<&P, SanctionedAddressesRemoved, N> { @@ -1773,73 +1733,43 @@ See the [wrapper's documentation](`ChainalysisOracleInstance`) for more details. } } } -pub type Instance = ChainalysisOracle::ChainalysisOracleInstance< - ::alloy_provider::DynProvider, ->; +pub type Instance = ChainalysisOracle::ChainalysisOracleInstance<::alloy_provider::DynProvider>; use { - std::{sync::LazyLock, collections::HashMap}, - anyhow::{Result, Context}, - alloy_primitives::{address, Address}, - alloy_provider::{Provider, DynProvider}, + alloy_primitives::{Address, address}, + alloy_provider::{DynProvider, Provider}, + anyhow::{Context, Result}, + std::{collections::HashMap, sync::LazyLock}, }; pub const fn deployment_info(chain_id: u64) -> Option<(Address, Option)> { match chain_id { - 1u64 => { - Some(( - ::alloy_primitives::address!( - "0x40C57923924B5c5c5455c48D93317139ADDaC8fb" - ), - None, - )) - } - 10u64 => { - Some(( - ::alloy_primitives::address!( - "0x40C57923924B5c5c5455c48D93317139ADDaC8fb" - ), - None, - )) - } - 56u64 => { - Some(( - ::alloy_primitives::address!( - "0x40C57923924B5c5c5455c48D93317139ADDaC8fb" - ), - None, - )) - } - 137u64 => { - Some(( - ::alloy_primitives::address!( - "0x40C57923924B5c5c5455c48D93317139ADDaC8fb" - ), - None, - )) - } - 8453u64 => { - Some(( - ::alloy_primitives::address!( - "0x3A91A31cB3dC49b4db9Ce721F50a9D076c8D739B" - ), - None, - )) - } - 42161u64 => { - Some(( - ::alloy_primitives::address!( - "0x40C57923924B5c5c5455c48D93317139ADDaC8fb" - ), - None, - )) - } - 43114u64 => { - Some(( - ::alloy_primitives::address!( - "0x40C57923924B5c5c5455c48D93317139ADDaC8fb" - ), - None, - )) - } + 1u64 => Some(( + ::alloy_primitives::address!("0x40C57923924B5c5c5455c48D93317139ADDaC8fb"), + None, + )), + 10u64 => Some(( + ::alloy_primitives::address!("0x40C57923924B5c5c5455c48D93317139ADDaC8fb"), + None, + )), + 56u64 => Some(( + ::alloy_primitives::address!("0x40C57923924B5c5c5455c48D93317139ADDaC8fb"), + None, + )), + 137u64 => Some(( + ::alloy_primitives::address!("0x40C57923924B5c5c5455c48D93317139ADDaC8fb"), + None, + )), + 8453u64 => Some(( + ::alloy_primitives::address!("0x3A91A31cB3dC49b4db9Ce721F50a9D076c8D739B"), + None, + )), + 42161u64 => Some(( + ::alloy_primitives::address!("0x40C57923924B5c5c5455c48D93317139ADDaC8fb"), + None, + )), + 43114u64 => Some(( + ::alloy_primitives::address!("0x40C57923924B5c5c5455c48D93317139ADDaC8fb"), + None, + )), _ => None, } } @@ -1856,9 +1786,7 @@ pub const fn deployment_block(chain_id: &u64) -> Option { } } impl Instance { - pub fn deployed( - provider: &DynProvider, - ) -> impl Future> + Send { + pub fn deployed(provider: &DynProvider) -> impl Future> + Send { async move { let chain_id = provider .get_chain_id() diff --git a/contracts/generated/contracts-generated/counter/src/lib.rs b/contracts/generated/contracts-generated/counter/src/lib.rs index 1d439e1a2a..4815a41f7f 100644 --- a/contracts/generated/contracts-generated/counter/src/lib.rs +++ b/contracts/generated/contracts-generated/counter/src/lib.rs @@ -1,4 +1,10 @@ -#![allow(unused_imports, unused_attributes, clippy::all, rustdoc::all, non_snake_case)] +#![allow( + unused_imports, + unused_attributes, + clippy::all, + rustdoc::all, + non_snake_case +)] //! Auto-generated contract bindings. Do not edit. /** @@ -79,8 +85,7 @@ interface Counter { clippy::empty_structs_with_brackets )] pub mod Counter { - use super::*; - use alloy_sol_types as alloy_sol_types; + use {super::*, alloy_sol_types}; /// The creation / init bytecode of the contract. /// /// ```text @@ -103,14 +108,15 @@ pub mod Counter { ); #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `counters(string)` and selector `0x57cedf40`. -```solidity -function counters(string memory) external view returns (uint256); -```*/ + ```solidity + function counters(string memory) external view returns (uint256); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct countersCall(pub alloy_sol_types::private::String); #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`counters(string)`](countersCall) function. + ///Container type for the return parameters of the + /// [`counters(string)`](countersCall) function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct countersReturn { @@ -124,7 +130,7 @@ function counters(string memory) external view returns (uint256); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -133,9 +139,7 @@ function counters(string memory) external view returns (uint256); type UnderlyingRustTuple<'a> = (alloy_sol_types::private::String,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -162,14 +166,10 @@ function counters(string memory) external view returns (uint256); #[allow(dead_code)] type UnderlyingSolTuple<'a> = (alloy_sol_types::sol_data::Uint<256>,); #[doc(hidden)] - type UnderlyingRustTuple<'a> = ( - alloy_sol_types::private::primitives::aliases::U256, - ); + 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, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -194,22 +194,21 @@ function counters(string memory) external view returns (uint256); #[automatically_derived] impl alloy_sol_types::SolCall for countersCall { type Parameters<'a> = (alloy_sol_types::sol_data::String,); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = alloy_sol_types::private::primitives::aliases::U256; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (alloy_sol_types::sol_data::Uint<256>,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "counters(string)"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [87u8, 206u8, 223u8, 64u8]; + const SIGNATURE: &'static str = "counters(string)"; + #[inline] fn new<'a>( tuple: as alloy_sol_types::SolType>::RustType, ) -> Self { tuple.into() } + #[inline] fn tokenize(&self) -> Self::Token<'_> { ( @@ -218,50 +217,51 @@ function counters(string memory) external view returns (uint256); ), ) } + #[inline] fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { ( - as alloy_sol_types::SolType>::tokenize(ret), + 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| { + as alloy_sol_types::SolType>::abi_decode_sequence(data).map( + |r| { let r: countersReturn = 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: countersReturn = r.into(); - r._0 - }) + 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: countersReturn = r.into(); + r._0 + }) } } }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `incrementCounter(string)` and selector `0x9424c8c8`. -```solidity -function incrementCounter(string memory key) external; -```*/ + ```solidity + function incrementCounter(string memory key) external; + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct incrementCounterCall { #[allow(missing_docs)] pub key: alloy_sol_types::private::String, } - ///Container type for the return parameters of the [`incrementCounter(string)`](incrementCounterCall) function. + ///Container type for the return parameters of the + /// [`incrementCounter(string)`](incrementCounterCall) function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct incrementCounterReturn {} @@ -272,7 +272,7 @@ function incrementCounter(string memory key) external; clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -281,9 +281,7 @@ function incrementCounter(string memory key) external; type UnderlyingRustTuple<'a> = (alloy_sol_types::private::String,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -292,16 +290,14 @@ function incrementCounter(string memory key) external; } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From - for UnderlyingRustTuple<'_> { + impl ::core::convert::From for UnderlyingRustTuple<'_> { fn from(value: incrementCounterCall) -> Self { (value.key,) } } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From> - for incrementCounterCall { + impl ::core::convert::From> for incrementCounterCall { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { Self { key: tuple.0 } } @@ -315,9 +311,7 @@ function incrementCounter(string memory key) external; type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -326,16 +320,14 @@ function incrementCounter(string memory key) external; } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From - for UnderlyingRustTuple<'_> { + impl ::core::convert::From for UnderlyingRustTuple<'_> { fn from(value: incrementCounterReturn) -> Self { () } } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From> - for incrementCounterReturn { + impl ::core::convert::From> for incrementCounterReturn { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { Self {} } @@ -351,22 +343,21 @@ function incrementCounter(string memory key) external; #[automatically_derived] impl alloy_sol_types::SolCall for incrementCounterCall { type Parameters<'a> = (alloy_sol_types::sol_data::String,); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = incrementCounterReturn; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "incrementCounter(string)"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [148u8, 36u8, 200u8, 200u8]; + const SIGNATURE: &'static str = "incrementCounter(string)"; + #[inline] fn new<'a>( tuple: as alloy_sol_types::SolType>::RustType, ) -> Self { tuple.into() } + #[inline] fn tokenize(&self) -> Self::Token<'_> { ( @@ -375,33 +366,32 @@ function incrementCounter(string memory key) external; ), ) } + #[inline] fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { incrementCounterReturn::_tokenize(ret) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) + 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) + 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(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `setCounterToBalance(string,address,address)` and selector `0x0931831e`. -```solidity -function setCounterToBalance(string memory key, address token, address owner) external; -```*/ + ```solidity + function setCounterToBalance(string memory key, address token, address owner) external; + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct setCounterToBalanceCall { @@ -412,7 +402,9 @@ function setCounterToBalance(string memory key, address token, address owner) ex #[allow(missing_docs)] pub owner: alloy_sol_types::private::Address, } - ///Container type for the return parameters of the [`setCounterToBalance(string,address,address)`](setCounterToBalanceCall) function. + ///Container type for the return parameters of the + /// [`setCounterToBalance(string,address,address)`](setCounterToBalanceCall) + /// function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct setCounterToBalanceReturn {} @@ -423,7 +415,7 @@ function setCounterToBalance(string memory key, address token, address owner) ex clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -440,9 +432,7 @@ function setCounterToBalance(string memory key, address token, address owner) ex ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -451,16 +441,14 @@ function setCounterToBalance(string memory key, address token, address owner) ex } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From - for UnderlyingRustTuple<'_> { + impl ::core::convert::From for UnderlyingRustTuple<'_> { fn from(value: setCounterToBalanceCall) -> Self { (value.key, value.token, value.owner) } } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From> - for setCounterToBalanceCall { + impl ::core::convert::From> for setCounterToBalanceCall { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { Self { key: tuple.0, @@ -478,9 +466,7 @@ function setCounterToBalance(string memory key, address token, address owner) ex type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -489,16 +475,14 @@ function setCounterToBalance(string memory key, address token, address owner) ex } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From - for UnderlyingRustTuple<'_> { + impl ::core::convert::From for UnderlyingRustTuple<'_> { fn from(value: setCounterToBalanceReturn) -> Self { () } } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From> - for setCounterToBalanceReturn { + impl ::core::convert::From> for setCounterToBalanceReturn { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { Self {} } @@ -507,7 +491,8 @@ function setCounterToBalance(string memory key, address token, address owner) ex impl setCounterToBalanceReturn { fn _tokenize( &self, - ) -> ::ReturnToken<'_> { + ) -> ::ReturnToken<'_> + { () } } @@ -518,22 +503,21 @@ function setCounterToBalance(string memory key, address token, address owner) ex alloy_sol_types::sol_data::Address, alloy_sol_types::sol_data::Address, ); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = setCounterToBalanceReturn; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "setCounterToBalance(string,address,address)"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [9u8, 49u8, 131u8, 30u8]; + const SIGNATURE: &'static str = "setCounterToBalance(string,address,address)"; + #[inline] fn new<'a>( tuple: as alloy_sol_types::SolType>::RustType, ) -> Self { tuple.into() } + #[inline] fn tokenize(&self) -> Self::Token<'_> { ( @@ -548,31 +532,29 @@ function setCounterToBalance(string memory key, address token, address owner) ex ), ) } + #[inline] fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { setCounterToBalanceReturn::_tokenize(ret) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) + 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) + 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 [`Counter`](self) function calls. #[derive(Clone)] - #[derive()] pub enum CounterCalls { #[allow(missing_docs)] counters(countersCall), @@ -584,8 +566,9 @@ function setCounterToBalance(string memory key, address token, address owner) ex impl CounterCalls { /// 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. + /// 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]] = &[ @@ -593,18 +576,19 @@ function setCounterToBalance(string memory key, address token, address owner) ex [87u8, 206u8, 223u8, 64u8], [148u8, 36u8, 200u8, 200u8], ]; - /// The names of the variants in the same order as `SELECTORS`. - pub const VARIANT_NAMES: &'static [&'static str] = &[ - ::core::stringify!(setCounterToBalance), - ::core::stringify!(counters), - ::core::stringify!(incrementCounter), - ]; /// The signatures in the same order as `SELECTORS`. pub const SIGNATURES: &'static [&'static str] = &[ ::SIGNATURE, ::SIGNATURE, ::SIGNATURE, ]; + /// The names of the variants in the same order as `SELECTORS`. + pub const VARIANT_NAMES: &'static [&'static str] = &[ + ::core::stringify!(setCounterToBalance), + ::core::stringify!(counters), + ::core::stringify!(incrementCounter), + ]; + /// Returns the signature for the given selector, if known. #[inline] pub fn signature_by_selector( @@ -617,20 +601,20 @@ function setCounterToBalance(string memory key, address token, address owner) ex ::core::result::Result::Err(_) => ::core::option::Option::None, } } + /// Returns the enum variant name for the given selector, if known. #[inline] - pub fn name_by_selector( - selector: [u8; 4usize], - ) -> ::core::option::Option<&'static str> { + pub fn name_by_selector(selector: [u8; 4usize]) -> ::core::option::Option<&'static str> { let sig = Self::signature_by_selector(selector)?; sig.split_once('(').map(|(name, _)| name) } } #[automatically_derived] impl alloy_sol_types::SolInterface for CounterCalls { - const NAME: &'static str = "CounterCalls"; - const MIN_DATA_LENGTH: usize = 64usize; const COUNT: usize = 3usize; + const MIN_DATA_LENGTH: usize = 64usize; + const NAME: &'static str = "CounterCalls"; + #[inline] fn selector(&self) -> [u8; 4] { match self { @@ -643,28 +627,24 @@ function setCounterToBalance(string memory key, address token, address owner) ex } } } + #[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 { + fn abi_decode_raw(selector: [u8; 4], data: &[u8]) -> alloy_sol_types::Result { static DECODE_SHIMS: &[fn(&[u8]) -> alloy_sol_types::Result] = &[ { - fn setCounterToBalance( - data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, - ) + fn setCounterToBalance(data: &[u8]) -> alloy_sol_types::Result { + ::abi_decode_raw(data) .map(CounterCalls::setCounterToBalance) } setCounterToBalance @@ -677,40 +657,31 @@ function setCounterToBalance(string memory key, address token, address owner) ex counters }, { - fn incrementCounter( - data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, - ) + fn incrementCounter(data: &[u8]) -> alloy_sol_types::Result { + ::abi_decode_raw(data) .map(CounterCalls::incrementCounter) } incrementCounter }, ]; let Ok(idx) = Self::SELECTORS.binary_search(&selector) else { - return Err( - alloy_sol_types::Error::unknown_selector( - ::NAME, - selector, - ), - ); + 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] = &[ + static DECODE_VALIDATE_SHIMS: &[fn(&[u8]) -> alloy_sol_types::Result] = &[ { - fn setCounterToBalance( - data: &[u8], - ) -> alloy_sol_types::Result { + fn setCounterToBalance(data: &[u8]) -> alloy_sol_types::Result { ::abi_decode_raw_validate( data, ) @@ -720,35 +691,30 @@ function setCounterToBalance(string memory key, address token, address owner) ex }, { fn counters(data: &[u8]) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) + ::abi_decode_raw_validate(data) .map(CounterCalls::counters) } counters }, { - fn incrementCounter( - data: &[u8], - ) -> alloy_sol_types::Result { + fn incrementCounter(data: &[u8]) -> alloy_sol_types::Result { ::abi_decode_raw_validate( - data, - ) - .map(CounterCalls::incrementCounter) + data, + ) + .map(CounterCalls::incrementCounter) } incrementCounter }, ]; let Ok(idx) = Self::SELECTORS.binary_search(&selector) else { - return Err( - alloy_sol_types::Error::unknown_selector( - ::NAME, - selector, - ), - ); + return Err(alloy_sol_types::Error::unknown_selector( + ::NAME, + selector, + )); }; DECODE_VALIDATE_SHIMS[idx](data) } + #[inline] fn abi_encoded_size(&self) -> usize { match self { @@ -756,45 +722,35 @@ function setCounterToBalance(string memory key, address token, address owner) ex ::abi_encoded_size(inner) } Self::incrementCounter(inner) => { - ::abi_encoded_size( - inner, - ) + ::abi_encoded_size(inner) } Self::setCounterToBalance(inner) => { - ::abi_encoded_size( - inner, - ) + ::abi_encoded_size(inner) } } } + #[inline] fn abi_encode_raw(&self, out: &mut alloy_sol_types::private::Vec) { match self { Self::counters(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } Self::incrementCounter(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } Self::setCounterToBalance(inner) => { ::abi_encode_raw( - inner, - out, + inner, out, ) } } } } - use alloy_contract as alloy_contract; + use alloy_contract; /**Creates a new wrapper around an on-chain [`Counter`](self) contract instance. -See the [wrapper's documentation](`CounterInstance`) for more details.*/ + See the [wrapper's documentation](`CounterInstance`) for more details.*/ #[inline] pub const fn new< P: alloy_contract::private::Provider, @@ -807,43 +763,40 @@ See the [wrapper's documentation](`CounterInstance`) for more details.*/ } /**Deploys this contract using the given `provider` and constructor arguments, if any. -Returns a new instance of the contract, if the deployment was successful. + 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.*/ + 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, - >( + pub fn deploy, N: alloy_contract::private::Network>( __provider: P, - ) -> impl ::core::future::Future< - Output = alloy_contract::Result>, - > { + ) -> impl ::core::future::Future>> { CounterInstance::::deploy(__provider) } /**Creates a `RawCallBuilder` for deploying this contract using the given `provider` -and constructor arguments, if any. + 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.*/ + 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) -> alloy_contract::RawCallBuilder { + >( + __provider: P, + ) -> alloy_contract::RawCallBuilder { CounterInstance::::deploy_builder(__provider) } /**A [`Counter`](self) instance. -Contains type-safe methods for interacting with an on-chain instance of the -[`Counter`](self) contract located at a given `address`, using a given -provider `P`. + Contains type-safe methods for interacting with an on-chain instance of the + [`Counter`](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. + 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.*/ + See the [module-level documentation](self) for all the available methods.*/ #[derive(Clone)] pub struct CounterInstance { address: alloy_sol_types::private::Address, @@ -854,46 +807,44 @@ See the [module-level documentation](self) for all the available methods.*/ impl ::core::fmt::Debug for CounterInstance { #[inline] fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { - f.debug_tuple("CounterInstance").field(&self.address).finish() + f.debug_tuple("CounterInstance") + .field(&self.address) + .finish() } } /// Instantiation and getters/setters. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > CounterInstance { + impl, N: alloy_contract::private::Network> + CounterInstance + { /**Creates a new wrapper around an on-chain [`Counter`](self) contract instance. -See the [wrapper's documentation](`CounterInstance`) for more details.*/ + See the [wrapper's documentation](`CounterInstance`) for more details.*/ #[inline] - pub const fn new( - address: alloy_sol_types::private::Address, - __provider: P, - ) -> Self { + pub const fn new(address: alloy_sol_types::private::Address, __provider: P) -> Self { Self { address, provider: __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. + 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.*/ + For more fine-grained control over the deployment process, use [`deploy_builder`] instead.*/ #[inline] - pub async fn deploy( - __provider: P, - ) -> alloy_contract::Result> { + 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. + 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.*/ + 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( @@ -901,21 +852,25 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ ::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 { @@ -923,7 +878,8 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ } } impl CounterInstance<&P, N> { - /// Clones the provider and returns a new instance with the cloned provider. + /// Clones the provider and returns a new instance with the cloned + /// provider. #[inline] pub fn with_cloned_provider(self) -> CounterInstance { CounterInstance { @@ -934,20 +890,22 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ } } /// Function calls. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > CounterInstance { - /// Creates a new call builder using this contract instance's provider and address. + impl, N: alloy_contract::private::Network> + CounterInstance + { + /// 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. + /// 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 [`counters`] function. pub fn counters( &self, @@ -955,6 +913,7 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ ) -> alloy_contract::SolCallBuilder<&P, countersCall, N> { self.call_builder(&countersCall(_0)) } + ///Creates a new call builder for the [`incrementCounter`] function. pub fn incrementCounter( &self, @@ -962,6 +921,7 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ ) -> alloy_contract::SolCallBuilder<&P, incrementCounterCall, N> { self.call_builder(&incrementCounterCall { key }) } + ///Creates a new call builder for the [`setCounterToBalance`] function. pub fn setCounterToBalance( &self, @@ -969,24 +929,19 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ token: alloy_sol_types::private::Address, owner: alloy_sol_types::private::Address, ) -> alloy_contract::SolCallBuilder<&P, setCounterToBalanceCall, N> { - self.call_builder( - &setCounterToBalanceCall { - key, - token, - owner, - }, - ) + self.call_builder(&setCounterToBalanceCall { key, token, owner }) } } /// Event filters. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > CounterInstance { - /// Creates a new event filter using this contract instance's provider and address. + impl, N: alloy_contract::private::Network> + CounterInstance + { + /// 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. + /// 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> { diff --git a/contracts/generated/contracts-generated/cowamm/src/lib.rs b/contracts/generated/contracts-generated/cowamm/src/lib.rs index b1b8b0322a..455d577e4b 100644 --- a/contracts/generated/contracts-generated/cowamm/src/lib.rs +++ b/contracts/generated/contracts-generated/cowamm/src/lib.rs @@ -1,4 +1,10 @@ -#![allow(unused_imports, unused_attributes, clippy::all, rustdoc::all, non_snake_case)] +#![allow( + unused_imports, + unused_attributes, + clippy::all, + rustdoc::all, + non_snake_case +)] //! Auto-generated contract bindings. Do not edit. ///Module containing a contract's types and functions. /** @@ -16,12 +22,11 @@ library ConstantProduct { clippy::empty_structs_with_brackets )] pub mod ConstantProduct { - use super::*; - use alloy_sol_types as alloy_sol_types; + use {super::*, alloy_sol_types}; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**```solidity -struct TradingParams { uint256 minTradedToken0; address priceOracle; bytes priceOracleData; bytes32 appData; } -```*/ + struct TradingParams { uint256 minTradedToken0; address priceOracle; bytes priceOracleData; bytes32 appData; } + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct TradingParams { @@ -41,7 +46,7 @@ struct TradingParams { uint256 minTradedToken0; address priceOracle; bytes price clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[doc(hidden)] #[allow(dead_code)] type UnderlyingSolTuple<'a> = ( @@ -59,9 +64,7 @@ struct TradingParams { uint256 minTradedToken0; address priceOracle; bytes price ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -115,91 +118,89 @@ struct TradingParams { uint256 minTradedToken0; address priceOracle; bytes price > as alloy_sol_types::SolType>::tokenize(&self.appData), ) } + #[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) + 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) + 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) + 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 TradingParams { type RustType = Self; - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + + const ENCODED_SIZE: Option = + as alloy_sol_types::SolType>::ENCODED_SIZE; + const PACKED_ENCODED_SIZE: Option = + as alloy_sol_types::SolType>::PACKED_ENCODED_SIZE; 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); + let tuple = as alloy_sol_types::SolType>::detokenize(token); >>::from(tuple) } } #[automatically_derived] impl alloy_sol_types::SolStruct for TradingParams { const NAME: &'static str = "TradingParams"; + #[inline] fn eip712_root_type() -> alloy_sol_types::private::Cow<'static, str> { alloy_sol_types::private::Cow::Borrowed( - "TradingParams(uint256 minTradedToken0,address priceOracle,bytes priceOracleData,bytes32 appData)", + "TradingParams(uint256 minTradedToken0,address priceOracle,bytes \ + priceOracleData,bytes32 appData)", ) } + #[inline] - fn eip712_components() -> alloy_sol_types::private::Vec< - alloy_sol_types::private::Cow<'static, str>, - > { + fn eip712_components() + -> alloy_sol_types::private::Vec> + { 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 { [ @@ -247,14 +248,13 @@ struct TradingParams { uint256 minTradedToken0; address priceOracle; bytes price &rust.appData, ) } + #[inline] fn encode_topic_preimage( rust: &Self::RustType, out: &mut alloy_sol_types::private::Vec, ) { - out.reserve( - ::topic_preimage_length(rust), - ); + out.reserve(::topic_preimage_length(rust)); as alloy_sol_types::EventTopic>::encode_topic_preimage( @@ -276,25 +276,19 @@ struct TradingParams { uint256 minTradedToken0; address priceOracle; bytes price out, ); } + #[inline] - fn encode_topic( - rust: &Self::RustType, - ) -> alloy_sol_types::abi::token::WordToken { + 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), - ) + ::encode_topic_preimage(rust, &mut out); + alloy_sol_types::abi::token::WordToken(alloy_sol_types::private::keccak256(out)) } } }; - use alloy_contract as alloy_contract; + use alloy_contract; /**Creates a new wrapper around an on-chain [`ConstantProduct`](self) contract instance. -See the [wrapper's documentation](`ConstantProductInstance`) for more details.*/ + See the [wrapper's documentation](`ConstantProductInstance`) for more details.*/ #[inline] pub const fn new< P: alloy_contract::private::Provider, @@ -307,15 +301,15 @@ See the [wrapper's documentation](`ConstantProductInstance`) for more details.*/ } /**A [`ConstantProduct`](self) instance. -Contains type-safe methods for interacting with an on-chain instance of the -[`ConstantProduct`](self) contract located at a given `address`, using a given -provider `P`. + Contains type-safe methods for interacting with an on-chain instance of the + [`ConstantProduct`](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. + 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.*/ + See the [module-level documentation](self) for all the available methods.*/ #[derive(Clone)] pub struct ConstantProductInstance { address: alloy_sol_types::private::Address, @@ -326,43 +320,45 @@ See the [module-level documentation](self) for all the available methods.*/ impl ::core::fmt::Debug for ConstantProductInstance { #[inline] fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { - f.debug_tuple("ConstantProductInstance").field(&self.address).finish() + f.debug_tuple("ConstantProductInstance") + .field(&self.address) + .finish() } } /// Instantiation and getters/setters. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > ConstantProductInstance { + impl, N: alloy_contract::private::Network> + ConstantProductInstance + { /**Creates a new wrapper around an on-chain [`ConstantProduct`](self) contract instance. -See the [wrapper's documentation](`ConstantProductInstance`) for more details.*/ + See the [wrapper's documentation](`ConstantProductInstance`) for more details.*/ #[inline] - pub const fn new( - address: alloy_sol_types::private::Address, - __provider: P, - ) -> Self { + pub const fn new(address: alloy_sol_types::private::Address, __provider: P) -> Self { Self { address, provider: __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 { @@ -370,7 +366,8 @@ See the [wrapper's documentation](`ConstantProductInstance`) for more details.*/ } } impl ConstantProductInstance<&P, N> { - /// Clones the provider and returns a new instance with the cloned provider. + /// Clones the provider and returns a new instance with the cloned + /// provider. #[inline] pub fn with_cloned_provider(self) -> ConstantProductInstance { ConstantProductInstance { @@ -381,14 +378,15 @@ See the [wrapper's documentation](`ConstantProductInstance`) for more details.*/ } } /// Function calls. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > ConstantProductInstance { - /// Creates a new call builder using this contract instance's provider and address. + impl, N: alloy_contract::private::Network> + ConstantProductInstance + { + /// 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. + /// 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, @@ -397,14 +395,15 @@ See the [wrapper's documentation](`ConstantProductInstance`) for more details.*/ } } /// Event filters. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > ConstantProductInstance { - /// Creates a new event filter using this contract instance's provider and address. + impl, N: alloy_contract::private::Network> + ConstantProductInstance + { + /// 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. + /// 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> { @@ -428,12 +427,11 @@ library GPv2Order { clippy::empty_structs_with_brackets )] pub mod GPv2Order { - use super::*; - use alloy_sol_types as alloy_sol_types; + use {super::*, alloy_sol_types}; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**```solidity -struct Data { address sellToken; address buyToken; address receiver; uint256 sellAmount; uint256 buyAmount; uint32 validTo; bytes32 appData; uint256 feeAmount; bytes32 kind; bool partiallyFillable; bytes32 sellTokenBalance; bytes32 buyTokenBalance; } -```*/ + struct Data { address sellToken; address buyToken; address receiver; uint256 sellAmount; uint256 buyAmount; uint32 validTo; bytes32 appData; uint256 feeAmount; bytes32 kind; bool partiallyFillable; bytes32 sellTokenBalance; bytes32 buyTokenBalance; } + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct Data { @@ -469,7 +467,7 @@ struct Data { address sellToken; address buyToken; address receiver; uint256 sel clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[doc(hidden)] #[allow(dead_code)] type UnderlyingSolTuple<'a> = ( @@ -503,9 +501,7 @@ struct Data { address sellToken; address buyToken; address receiver; uint256 sel ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -599,91 +595,91 @@ struct Data { address sellToken; address buyToken; address receiver; uint256 sel > as alloy_sol_types::SolType>::tokenize(&self.buyTokenBalance), ) } + #[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) + 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) + 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) + 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 Data { type RustType = Self; - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + + const ENCODED_SIZE: Option = + as alloy_sol_types::SolType>::ENCODED_SIZE; + const PACKED_ENCODED_SIZE: Option = + as alloy_sol_types::SolType>::PACKED_ENCODED_SIZE; 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); + let tuple = as alloy_sol_types::SolType>::detokenize(token); >>::from(tuple) } } #[automatically_derived] impl alloy_sol_types::SolStruct for Data { const NAME: &'static str = "Data"; + #[inline] fn eip712_root_type() -> alloy_sol_types::private::Cow<'static, str> { alloy_sol_types::private::Cow::Borrowed( - "Data(address sellToken,address buyToken,address receiver,uint256 sellAmount,uint256 buyAmount,uint32 validTo,bytes32 appData,uint256 feeAmount,bytes32 kind,bool partiallyFillable,bytes32 sellTokenBalance,bytes32 buyTokenBalance)", + "Data(address sellToken,address buyToken,address receiver,uint256 \ + sellAmount,uint256 buyAmount,uint32 validTo,bytes32 appData,uint256 \ + feeAmount,bytes32 kind,bool partiallyFillable,bytes32 \ + sellTokenBalance,bytes32 buyTokenBalance)", ) } + #[inline] - fn eip712_components() -> alloy_sol_types::private::Vec< - alloy_sol_types::private::Cow<'static, str>, - > { + fn eip712_components() + -> alloy_sol_types::private::Vec> + { 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 { [ @@ -799,14 +795,13 @@ struct Data { address sellToken; address buyToken; address receiver; uint256 sel &rust.buyTokenBalance, ) } + #[inline] fn encode_topic_preimage( rust: &Self::RustType, out: &mut alloy_sol_types::private::Vec, ) { - out.reserve( - ::topic_preimage_length(rust), - ); + out.reserve(::topic_preimage_length(rust)); ::encode_topic_preimage( &rust.sellToken, out, @@ -872,25 +867,19 @@ struct Data { address sellToken; address buyToken; address receiver; uint256 sel out, ); } + #[inline] - fn encode_topic( - rust: &Self::RustType, - ) -> alloy_sol_types::abi::token::WordToken { + 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), - ) + ::encode_topic_preimage(rust, &mut out); + alloy_sol_types::abi::token::WordToken(alloy_sol_types::private::keccak256(out)) } } }; - use alloy_contract as alloy_contract; + use alloy_contract; /**Creates a new wrapper around an on-chain [`GPv2Order`](self) contract instance. -See the [wrapper's documentation](`GPv2OrderInstance`) for more details.*/ + See the [wrapper's documentation](`GPv2OrderInstance`) for more details.*/ #[inline] pub const fn new< P: alloy_contract::private::Provider, @@ -903,15 +892,15 @@ See the [wrapper's documentation](`GPv2OrderInstance`) for more details.*/ } /**A [`GPv2Order`](self) instance. -Contains type-safe methods for interacting with an on-chain instance of the -[`GPv2Order`](self) contract located at a given `address`, using a given -provider `P`. + Contains type-safe methods for interacting with an on-chain instance of the + [`GPv2Order`](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. + 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.*/ + See the [module-level documentation](self) for all the available methods.*/ #[derive(Clone)] pub struct GPv2OrderInstance { address: alloy_sol_types::private::Address, @@ -922,43 +911,45 @@ See the [module-level documentation](self) for all the available methods.*/ impl ::core::fmt::Debug for GPv2OrderInstance { #[inline] fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { - f.debug_tuple("GPv2OrderInstance").field(&self.address).finish() + f.debug_tuple("GPv2OrderInstance") + .field(&self.address) + .finish() } } /// Instantiation and getters/setters. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > GPv2OrderInstance { + impl, N: alloy_contract::private::Network> + GPv2OrderInstance + { /**Creates a new wrapper around an on-chain [`GPv2Order`](self) contract instance. -See the [wrapper's documentation](`GPv2OrderInstance`) for more details.*/ + See the [wrapper's documentation](`GPv2OrderInstance`) for more details.*/ #[inline] - pub const fn new( - address: alloy_sol_types::private::Address, - __provider: P, - ) -> Self { + pub const fn new(address: alloy_sol_types::private::Address, __provider: P) -> Self { Self { address, provider: __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 { @@ -966,7 +957,8 @@ See the [wrapper's documentation](`GPv2OrderInstance`) for more details.*/ } } impl GPv2OrderInstance<&P, N> { - /// Clones the provider and returns a new instance with the cloned provider. + /// Clones the provider and returns a new instance with the cloned + /// provider. #[inline] pub fn with_cloned_provider(self) -> GPv2OrderInstance { GPv2OrderInstance { @@ -977,14 +969,15 @@ See the [wrapper's documentation](`GPv2OrderInstance`) for more details.*/ } } /// Function calls. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > GPv2OrderInstance { - /// Creates a new call builder using this contract instance's provider and address. + impl, N: alloy_contract::private::Network> + GPv2OrderInstance + { + /// 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. + /// 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, @@ -993,14 +986,15 @@ See the [wrapper's documentation](`GPv2OrderInstance`) for more details.*/ } } /// Event filters. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > GPv2OrderInstance { - /// Creates a new event filter using this contract instance's provider and address. + impl, N: alloy_contract::private::Network> + GPv2OrderInstance + { + /// 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. + /// 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> { @@ -1420,8 +1414,7 @@ interface CowAmm { clippy::empty_structs_with_brackets )] pub mod CowAmm { - use super::*; - use alloy_sol_types as alloy_sol_types; + use {super::*, alloy_sol_types}; /// The creation / init bytecode of the contract. /// /// ```text @@ -1444,9 +1437,9 @@ pub mod CowAmm { ); #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Custom error with signature `CommitOutsideOfSettlement()` and selector `0xbf848977`. -```solidity -error CommitOutsideOfSettlement(); -```*/ + ```solidity + error CommitOutsideOfSettlement(); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct CommitOutsideOfSettlement; @@ -1457,7 +1450,7 @@ error CommitOutsideOfSettlement(); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[doc(hidden)] #[allow(dead_code)] type UnderlyingSolTuple<'a> = (); @@ -1465,9 +1458,7 @@ error CommitOutsideOfSettlement(); type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1476,16 +1467,14 @@ error CommitOutsideOfSettlement(); } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From - for UnderlyingRustTuple<'_> { + impl ::core::convert::From for UnderlyingRustTuple<'_> { fn from(value: CommitOutsideOfSettlement) -> Self { () } } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From> - for CommitOutsideOfSettlement { + impl ::core::convert::From> for CommitOutsideOfSettlement { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { Self } @@ -1493,35 +1482,37 @@ error CommitOutsideOfSettlement(); #[automatically_derived] impl alloy_sol_types::SolError for CommitOutsideOfSettlement { type Parameters<'a> = UnderlyingSolTuple<'a>; - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "CommitOutsideOfSettlement()"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [191u8, 132u8, 137u8, 119u8]; + const SIGNATURE: &'static str = "CommitOutsideOfSettlement()"; + #[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) + as alloy_sol_types::SolType>::abi_decode_sequence_validate( + data, + ) + .map(Self::new) } } }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Custom error with signature `OnlyManagerCanCall()` and selector `0xf87d0d16`. -```solidity -error OnlyManagerCanCall(); -```*/ + ```solidity + error OnlyManagerCanCall(); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct OnlyManagerCanCall; @@ -1532,7 +1523,7 @@ error OnlyManagerCanCall(); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[doc(hidden)] #[allow(dead_code)] type UnderlyingSolTuple<'a> = (); @@ -1540,9 +1531,7 @@ error OnlyManagerCanCall(); type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1566,35 +1555,37 @@ error OnlyManagerCanCall(); #[automatically_derived] impl alloy_sol_types::SolError for OnlyManagerCanCall { type Parameters<'a> = UnderlyingSolTuple<'a>; - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "OnlyManagerCanCall()"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [248u8, 125u8, 13u8, 22u8]; + const SIGNATURE: &'static str = "OnlyManagerCanCall()"; + #[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) + as alloy_sol_types::SolType>::abi_decode_sequence_validate( + data, + ) + .map(Self::new) } } }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Custom error with signature `OrderDoesNotMatchCommitmentHash()` and selector `0xdafbdd1f`. -```solidity -error OrderDoesNotMatchCommitmentHash(); -```*/ + ```solidity + error OrderDoesNotMatchCommitmentHash(); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct OrderDoesNotMatchCommitmentHash; @@ -1605,7 +1596,7 @@ error OrderDoesNotMatchCommitmentHash(); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[doc(hidden)] #[allow(dead_code)] type UnderlyingSolTuple<'a> = (); @@ -1613,9 +1604,7 @@ error OrderDoesNotMatchCommitmentHash(); type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1624,16 +1613,14 @@ error OrderDoesNotMatchCommitmentHash(); } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From - for UnderlyingRustTuple<'_> { + impl ::core::convert::From for UnderlyingRustTuple<'_> { fn from(value: OrderDoesNotMatchCommitmentHash) -> Self { () } } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From> - for OrderDoesNotMatchCommitmentHash { + impl ::core::convert::From> for OrderDoesNotMatchCommitmentHash { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { Self } @@ -1641,35 +1628,37 @@ error OrderDoesNotMatchCommitmentHash(); #[automatically_derived] impl alloy_sol_types::SolError for OrderDoesNotMatchCommitmentHash { type Parameters<'a> = UnderlyingSolTuple<'a>; - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "OrderDoesNotMatchCommitmentHash()"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [218u8, 251u8, 221u8, 31u8]; + const SIGNATURE: &'static str = "OrderDoesNotMatchCommitmentHash()"; + #[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) + as alloy_sol_types::SolType>::abi_decode_sequence_validate( + data, + ) + .map(Self::new) } } }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Custom error with signature `OrderDoesNotMatchDefaultTradeableOrder()` and selector `0xd9ff24c7`. -```solidity -error OrderDoesNotMatchDefaultTradeableOrder(); -```*/ + ```solidity + error OrderDoesNotMatchDefaultTradeableOrder(); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct OrderDoesNotMatchDefaultTradeableOrder; @@ -1680,7 +1669,7 @@ error OrderDoesNotMatchDefaultTradeableOrder(); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[doc(hidden)] #[allow(dead_code)] type UnderlyingSolTuple<'a> = (); @@ -1688,9 +1677,7 @@ error OrderDoesNotMatchDefaultTradeableOrder(); type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1699,16 +1686,14 @@ error OrderDoesNotMatchDefaultTradeableOrder(); } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From - for UnderlyingRustTuple<'_> { + impl ::core::convert::From for UnderlyingRustTuple<'_> { fn from(value: OrderDoesNotMatchDefaultTradeableOrder) -> Self { () } } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From> - for OrderDoesNotMatchDefaultTradeableOrder { + impl ::core::convert::From> for OrderDoesNotMatchDefaultTradeableOrder { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { Self } @@ -1716,35 +1701,37 @@ error OrderDoesNotMatchDefaultTradeableOrder(); #[automatically_derived] impl alloy_sol_types::SolError for OrderDoesNotMatchDefaultTradeableOrder { type Parameters<'a> = UnderlyingSolTuple<'a>; - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "OrderDoesNotMatchDefaultTradeableOrder()"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [217u8, 255u8, 36u8, 199u8]; + const SIGNATURE: &'static str = "OrderDoesNotMatchDefaultTradeableOrder()"; + #[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) + as alloy_sol_types::SolType>::abi_decode_sequence_validate( + data, + ) + .map(Self::new) } } }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Custom error with signature `OrderDoesNotMatchMessageHash()` and selector `0x593fcacd`. -```solidity -error OrderDoesNotMatchMessageHash(); -```*/ + ```solidity + error OrderDoesNotMatchMessageHash(); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct OrderDoesNotMatchMessageHash; @@ -1755,7 +1742,7 @@ error OrderDoesNotMatchMessageHash(); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[doc(hidden)] #[allow(dead_code)] type UnderlyingSolTuple<'a> = (); @@ -1763,9 +1750,7 @@ error OrderDoesNotMatchMessageHash(); type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1774,16 +1759,14 @@ error OrderDoesNotMatchMessageHash(); } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From - for UnderlyingRustTuple<'_> { + impl ::core::convert::From for UnderlyingRustTuple<'_> { fn from(value: OrderDoesNotMatchMessageHash) -> Self { () } } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From> - for OrderDoesNotMatchMessageHash { + impl ::core::convert::From> for OrderDoesNotMatchMessageHash { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { Self } @@ -1791,35 +1774,37 @@ error OrderDoesNotMatchMessageHash(); #[automatically_derived] impl alloy_sol_types::SolError for OrderDoesNotMatchMessageHash { type Parameters<'a> = UnderlyingSolTuple<'a>; - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "OrderDoesNotMatchMessageHash()"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [89u8, 63u8, 202u8, 205u8]; + const SIGNATURE: &'static str = "OrderDoesNotMatchMessageHash()"; + #[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) + as alloy_sol_types::SolType>::abi_decode_sequence_validate( + data, + ) + .map(Self::new) } } }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Custom error with signature `OrderNotValid(string)` and selector `0xc8fc2725`. -```solidity -error OrderNotValid(string); -```*/ + ```solidity + error OrderNotValid(string); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct OrderNotValid(pub alloy_sol_types::private::String); @@ -1830,7 +1815,7 @@ error OrderNotValid(string); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[doc(hidden)] #[allow(dead_code)] type UnderlyingSolTuple<'a> = (alloy_sol_types::sol_data::String,); @@ -1838,9 +1823,7 @@ error OrderNotValid(string); type UnderlyingRustTuple<'a> = (alloy_sol_types::private::String,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1864,17 +1847,18 @@ error OrderNotValid(string); #[automatically_derived] impl alloy_sol_types::SolError for OrderNotValid { type Parameters<'a> = UnderlyingSolTuple<'a>; - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "OrderNotValid(string)"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [200u8, 252u8, 39u8, 37u8]; + const SIGNATURE: &'static str = "OrderNotValid(string)"; + #[inline] fn new<'a>( tuple: as alloy_sol_types::SolType>::RustType, ) -> Self { tuple.into() } + #[inline] fn tokenize(&self) -> Self::Token<'_> { ( @@ -1883,20 +1867,21 @@ error OrderNotValid(string); ), ) } + #[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) + as alloy_sol_types::SolType>::abi_decode_sequence_validate( + data, + ) + .map(Self::new) } } }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Custom error with signature `PollTryAtBlock(uint256,string)` and selector `0x1fe8506e`. -```solidity -error PollTryAtBlock(uint256 blockNumber, string message); -```*/ + ```solidity + error PollTryAtBlock(uint256 blockNumber, string message); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct PollTryAtBlock { @@ -1912,7 +1897,7 @@ error PollTryAtBlock(uint256 blockNumber, string message); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[doc(hidden)] #[allow(dead_code)] type UnderlyingSolTuple<'a> = ( @@ -1926,9 +1911,7 @@ error PollTryAtBlock(uint256 blockNumber, string message); ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1955,42 +1938,44 @@ error PollTryAtBlock(uint256 blockNumber, string message); #[automatically_derived] impl alloy_sol_types::SolError for PollTryAtBlock { type Parameters<'a> = UnderlyingSolTuple<'a>; - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "PollTryAtBlock(uint256,string)"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [31u8, 232u8, 80u8, 110u8]; + const SIGNATURE: &'static str = "PollTryAtBlock(uint256,string)"; + #[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.blockNumber), + as alloy_sol_types::SolType>::tokenize( + &self.blockNumber, + ), ::tokenize( &self.message, ), ) } + #[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) + as alloy_sol_types::SolType>::abi_decode_sequence_validate( + data, + ) + .map(Self::new) } } }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Custom error with signature `TradingParamsDoNotMatchHash()` and selector `0xf1a67890`. -```solidity -error TradingParamsDoNotMatchHash(); -```*/ + ```solidity + error TradingParamsDoNotMatchHash(); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct TradingParamsDoNotMatchHash; @@ -2001,7 +1986,7 @@ error TradingParamsDoNotMatchHash(); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[doc(hidden)] #[allow(dead_code)] type UnderlyingSolTuple<'a> = (); @@ -2009,9 +1994,7 @@ error TradingParamsDoNotMatchHash(); type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -2020,16 +2003,14 @@ error TradingParamsDoNotMatchHash(); } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From - for UnderlyingRustTuple<'_> { + impl ::core::convert::From for UnderlyingRustTuple<'_> { fn from(value: TradingParamsDoNotMatchHash) -> Self { () } } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From> - for TradingParamsDoNotMatchHash { + impl ::core::convert::From> for TradingParamsDoNotMatchHash { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { Self } @@ -2037,35 +2018,37 @@ error TradingParamsDoNotMatchHash(); #[automatically_derived] impl alloy_sol_types::SolError for TradingParamsDoNotMatchHash { type Parameters<'a> = UnderlyingSolTuple<'a>; - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "TradingParamsDoNotMatchHash()"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [241u8, 166u8, 120u8, 144u8]; + const SIGNATURE: &'static str = "TradingParamsDoNotMatchHash()"; + #[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) + as alloy_sol_types::SolType>::abi_decode_sequence_validate( + data, + ) + .map(Self::new) } } }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Event with signature `TradingDisabled()` and selector `0xbcb8b8fbdea8aa6dc4ae41213e4da81e605a3d1a56ed851b9355182321c09190`. -```solidity -event TradingDisabled(); -```*/ + ```solidity + event TradingDisabled(); + ```*/ #[allow( non_camel_case_types, non_snake_case, @@ -2081,21 +2064,22 @@ event TradingDisabled(); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[automatically_derived] impl alloy_sol_types::SolEvent for TradingDisabled { + type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type DataTuple<'a> = (); - type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type TopicList = (alloy_sol_types::sol_data::FixedBytes<32>,); - const SIGNATURE: &'static str = "TradingDisabled()"; - const SIGNATURE_HASH: alloy_sol_types::private::B256 = alloy_sol_types::private::B256::new([ - 188u8, 184u8, 184u8, 251u8, 222u8, 168u8, 170u8, 109u8, 196u8, 174u8, - 65u8, 33u8, 62u8, 77u8, 168u8, 30u8, 96u8, 90u8, 61u8, 26u8, 86u8, 237u8, - 133u8, 27u8, 147u8, 85u8, 24u8, 35u8, 33u8, 192u8, 145u8, 144u8, - ]); + const ANONYMOUS: bool = false; + const SIGNATURE: &'static str = "TradingDisabled()"; + const SIGNATURE_HASH: alloy_sol_types::private::B256 = + alloy_sol_types::private::B256::new([ + 188u8, 184u8, 184u8, 251u8, 222u8, 168u8, 170u8, 109u8, 196u8, 174u8, 65u8, + 33u8, 62u8, 77u8, 168u8, 30u8, 96u8, 90u8, 61u8, 26u8, 86u8, 237u8, 133u8, + 27u8, 147u8, 85u8, 24u8, 35u8, 33u8, 192u8, 145u8, 144u8, + ]); + #[allow(unused_variables)] #[inline] fn new( @@ -2104,29 +2088,31 @@ event TradingDisabled(); ) -> Self { Self {} } + #[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, - ), - ); + 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(),) } + #[inline] fn encode_topics_raw( &self, @@ -2135,9 +2121,7 @@ event TradingDisabled(); if out.len() < ::COUNT { return Err(alloy_sol_types::Error::Overrun); } - out[0usize] = alloy_sol_types::abi::token::WordToken( - Self::SIGNATURE_HASH, - ); + out[0usize] = alloy_sol_types::abi::token::WordToken(Self::SIGNATURE_HASH); Ok(()) } } @@ -2146,6 +2130,7 @@ event TradingDisabled(); 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) } @@ -2160,9 +2145,9 @@ event TradingDisabled(); }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Event with signature `TradingEnabled(bytes32,(uint256,address,bytes,bytes32))` and selector `0x510e4a4f76907c2d6158b343f7c4f2f597df385b727c26e9ef90e75093ace19a`. -```solidity -event TradingEnabled(bytes32 indexed hash, ConstantProduct.TradingParams params); -```*/ + ```solidity + event TradingEnabled(bytes32 indexed hash, ConstantProduct.TradingParams params); + ```*/ #[allow( non_camel_case_types, non_snake_case, @@ -2183,24 +2168,26 @@ event TradingEnabled(bytes32 indexed hash, ConstantProduct.TradingParams params) clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[automatically_derived] impl alloy_sol_types::SolEvent for TradingEnabled { + type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type DataTuple<'a> = (ConstantProduct::TradingParams,); - 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>, ); - const SIGNATURE: &'static str = "TradingEnabled(bytes32,(uint256,address,bytes,bytes32))"; - const SIGNATURE_HASH: alloy_sol_types::private::B256 = alloy_sol_types::private::B256::new([ - 81u8, 14u8, 74u8, 79u8, 118u8, 144u8, 124u8, 45u8, 97u8, 88u8, 179u8, - 67u8, 247u8, 196u8, 242u8, 245u8, 151u8, 223u8, 56u8, 91u8, 114u8, 124u8, - 38u8, 233u8, 239u8, 144u8, 231u8, 80u8, 147u8, 172u8, 225u8, 154u8, - ]); + const ANONYMOUS: bool = false; + const SIGNATURE: &'static str = + "TradingEnabled(bytes32,(uint256,address,bytes,bytes32))"; + const SIGNATURE_HASH: alloy_sol_types::private::B256 = + alloy_sol_types::private::B256::new([ + 81u8, 14u8, 74u8, 79u8, 118u8, 144u8, 124u8, 45u8, 97u8, 88u8, 179u8, 67u8, + 247u8, 196u8, 242u8, 245u8, 151u8, 223u8, 56u8, 91u8, 114u8, 124u8, 38u8, + 233u8, 239u8, 144u8, 231u8, 80u8, 147u8, 172u8, 225u8, 154u8, + ]); + #[allow(unused_variables)] #[inline] fn new( @@ -2212,21 +2199,21 @@ event TradingEnabled(bytes32 indexed hash, ConstantProduct.TradingParams params) params: 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, - ), - ); + 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<'_> { ( @@ -2235,10 +2222,12 @@ event TradingEnabled(bytes32 indexed hash, ConstantProduct.TradingParams params) ), ) } + #[inline] fn topics(&self) -> ::RustType { (Self::SIGNATURE_HASH.into(), self.hash.clone()) } + #[inline] fn encode_topics_raw( &self, @@ -2247,9 +2236,7 @@ event TradingEnabled(bytes32 indexed hash, ConstantProduct.TradingParams params) if out.len() < ::COUNT { return Err(alloy_sol_types::Error::Overrun); } - out[0usize] = alloy_sol_types::abi::token::WordToken( - Self::SIGNATURE_HASH, - ); + out[0usize] = alloy_sol_types::abi::token::WordToken(Self::SIGNATURE_HASH); out[1usize] = as alloy_sol_types::EventTopic>::encode_topic(&self.hash); @@ -2261,6 +2248,7 @@ event TradingEnabled(bytes32 indexed hash, ConstantProduct.TradingParams params) 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) } @@ -2274,9 +2262,9 @@ event TradingEnabled(bytes32 indexed hash, ConstantProduct.TradingParams params) } }; /**Constructor`. -```solidity -constructor(address _solutionSettler, address _token0, address _token1); -```*/ + ```solidity + constructor(address _solutionSettler, address _token0, address _token1); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct constructorCall { @@ -2288,7 +2276,7 @@ constructor(address _solutionSettler, address _token0, address _token1); pub _token1: alloy_sol_types::private::Address, } const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -2305,9 +2293,7 @@ constructor(address _solutionSettler, address _token0, address _token1); ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -2340,15 +2326,15 @@ constructor(address _solutionSettler, address _token0, address _token1); alloy_sol_types::sol_data::Address, alloy_sol_types::sol_data::Address, ); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + 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<'_> { ( @@ -2367,16 +2353,17 @@ constructor(address _solutionSettler, address _token0, address _token1); }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `commit(bytes32)` and selector `0xf14fcbc8`. -```solidity -function commit(bytes32 orderHash) external; -```*/ + ```solidity + function commit(bytes32 orderHash) external; + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct commitCall { #[allow(missing_docs)] pub orderHash: alloy_sol_types::private::FixedBytes<32>, } - ///Container type for the return parameters of the [`commit(bytes32)`](commitCall) function. + ///Container type for the return parameters of the + /// [`commit(bytes32)`](commitCall) function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct commitReturn {} @@ -2387,7 +2374,7 @@ function commit(bytes32 orderHash) external; clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -2396,9 +2383,7 @@ function commit(bytes32 orderHash) external; 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, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -2428,9 +2413,7 @@ function commit(bytes32 orderHash) external; type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -2453,31 +2436,28 @@ function commit(bytes32 orderHash) external; } } impl commitReturn { - fn _tokenize( - &self, - ) -> ::ReturnToken<'_> { + fn _tokenize(&self) -> ::ReturnToken<'_> { () } } #[automatically_derived] impl alloy_sol_types::SolCall for commitCall { type Parameters<'a> = (alloy_sol_types::sol_data::FixedBytes<32>,); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = commitReturn; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "commit(bytes32)"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [241u8, 79u8, 203u8, 200u8]; + const SIGNATURE: &'static str = "commit(bytes32)"; + #[inline] fn new<'a>( tuple: as alloy_sol_types::SolType>::RustType, ) -> Self { tuple.into() } + #[inline] fn tokenize(&self) -> Self::Token<'_> { ( @@ -2486,33 +2466,32 @@ function commit(bytes32 orderHash) external; > as alloy_sol_types::SolType>::tokenize(&self.orderHash), ) } + #[inline] fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { commitReturn::_tokenize(ret) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) + 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) + 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(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `hash((uint256,address,bytes,bytes32))` and selector `0xb09aaaca`. -```solidity -function hash(ConstantProduct.TradingParams memory tradingParams) external pure returns (bytes32); -```*/ + ```solidity + function hash(ConstantProduct.TradingParams memory tradingParams) external pure returns (bytes32); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct hashCall { @@ -2520,7 +2499,8 @@ function hash(ConstantProduct.TradingParams memory tradingParams) external pure pub tradingParams: ::RustType, } #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`hash((uint256,address,bytes,bytes32))`](hashCall) function. + ///Container type for the return parameters of the + /// [`hash((uint256,address,bytes,bytes32))`](hashCall) function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct hashReturn { @@ -2534,20 +2514,17 @@ function hash(ConstantProduct.TradingParams memory tradingParams) external pure clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] type UnderlyingSolTuple<'a> = (ConstantProduct::TradingParams,); #[doc(hidden)] - type UnderlyingRustTuple<'a> = ( - ::RustType, - ); + type UnderlyingRustTuple<'a> = + (::RustType,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -2565,7 +2542,9 @@ function hash(ConstantProduct.TradingParams memory tradingParams) external pure #[doc(hidden)] impl ::core::convert::From> for hashCall { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { - Self { tradingParams: tuple.0 } + Self { + tradingParams: tuple.0, + } } } } @@ -2577,9 +2556,7 @@ function hash(ConstantProduct.TradingParams memory tradingParams) external pure 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, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -2604,22 +2581,21 @@ function hash(ConstantProduct.TradingParams memory tradingParams) external pure #[automatically_derived] impl alloy_sol_types::SolCall for hashCall { type Parameters<'a> = (ConstantProduct::TradingParams,); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = alloy_sol_types::private::FixedBytes<32>; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (alloy_sol_types::sol_data::FixedBytes<32>,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "hash((uint256,address,bytes,bytes32))"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [176u8, 154u8, 170u8, 202u8]; + const SIGNATURE: &'static str = "hash((uint256,address,bytes,bytes32))"; + #[inline] fn new<'a>( tuple: as alloy_sol_types::SolType>::RustType, ) -> Self { tuple.into() } + #[inline] fn tokenize(&self) -> Self::Token<'_> { ( @@ -2628,6 +2604,7 @@ function hash(ConstantProduct.TradingParams memory tradingParams) external pure ), ) } + #[inline] fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { ( @@ -2636,35 +2613,34 @@ function hash(ConstantProduct.TradingParams memory tradingParams) external pure > 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| { + as alloy_sol_types::SolType>::abi_decode_sequence(data).map( + |r| { let r: hashReturn = 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: hashReturn = r.into(); - r._0 - }) + 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: hashReturn = r.into(); + r._0 + }) } } }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `isValidSignature(bytes32,bytes)` and selector `0x1626ba7e`. -```solidity -function isValidSignature(bytes32 _hash, bytes memory signature) external view returns (bytes4); -```*/ + ```solidity + function isValidSignature(bytes32 _hash, bytes memory signature) external view returns (bytes4); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct isValidSignatureCall { @@ -2674,7 +2650,8 @@ function isValidSignature(bytes32 _hash, bytes memory signature) external view r pub signature: alloy_sol_types::private::Bytes, } #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`isValidSignature(bytes32,bytes)`](isValidSignatureCall) function. + ///Container type for the return parameters of the + /// [`isValidSignature(bytes32,bytes)`](isValidSignatureCall) function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct isValidSignatureReturn { @@ -2688,7 +2665,7 @@ function isValidSignature(bytes32 _hash, bytes memory signature) external view r clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -2703,9 +2680,7 @@ function isValidSignature(bytes32 _hash, bytes memory signature) external view r ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -2714,16 +2689,14 @@ function isValidSignature(bytes32 _hash, bytes memory signature) external view r } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From - for UnderlyingRustTuple<'_> { + impl ::core::convert::From for UnderlyingRustTuple<'_> { fn from(value: isValidSignatureCall) -> Self { (value._hash, value.signature) } } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From> - for isValidSignatureCall { + impl ::core::convert::From> for isValidSignatureCall { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { Self { _hash: tuple.0, @@ -2740,9 +2713,7 @@ function isValidSignature(bytes32 _hash, bytes memory signature) external view r 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, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -2751,16 +2722,14 @@ function isValidSignature(bytes32 _hash, bytes memory signature) external view r } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From - for UnderlyingRustTuple<'_> { + impl ::core::convert::From for UnderlyingRustTuple<'_> { fn from(value: isValidSignatureReturn) -> Self { (value._0,) } } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From> - for isValidSignatureReturn { + impl ::core::convert::From> for isValidSignatureReturn { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { Self { _0: tuple.0 } } @@ -2772,22 +2741,21 @@ function isValidSignature(bytes32 _hash, bytes memory signature) external view r alloy_sol_types::sol_data::FixedBytes<32>, alloy_sol_types::sol_data::Bytes, ); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = alloy_sol_types::private::FixedBytes<4>; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (alloy_sol_types::sol_data::FixedBytes<4>,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "isValidSignature(bytes32,bytes)"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [22u8, 38u8, 186u8, 126u8]; + const SIGNATURE: &'static str = "isValidSignature(bytes32,bytes)"; + #[inline] fn new<'a>( tuple: as alloy_sol_types::SolType>::RustType, ) -> Self { tuple.into() } + #[inline] fn tokenize(&self) -> Self::Token<'_> { ( @@ -2799,6 +2767,7 @@ function isValidSignature(bytes32 _hash, bytes memory signature) external view r ), ) } + #[inline] fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { ( @@ -2807,40 +2776,40 @@ function isValidSignature(bytes32 _hash, bytes memory signature) external view r > 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| { + as alloy_sol_types::SolType>::abi_decode_sequence(data).map( + |r| { let r: isValidSignatureReturn = 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: isValidSignatureReturn = r.into(); - r._0 - }) + 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: isValidSignatureReturn = r.into(); + r._0 + }) } } }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `manager()` and selector `0x481c6a75`. -```solidity -function manager() external view returns (address); -```*/ + ```solidity + function manager() external view returns (address); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct managerCall; #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`manager()`](managerCall) function. + ///Container type for the return parameters of the + /// [`manager()`](managerCall) function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct managerReturn { @@ -2854,7 +2823,7 @@ function manager() external view returns (address); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -2863,9 +2832,7 @@ function manager() external view returns (address); type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -2895,9 +2862,7 @@ function manager() external view returns (address); type UnderlyingRustTuple<'a> = (alloy_sol_types::private::Address,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -2922,68 +2887,64 @@ function manager() external view returns (address); #[automatically_derived] impl alloy_sol_types::SolCall for managerCall { type Parameters<'a> = (); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = alloy_sol_types::private::Address; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (alloy_sol_types::sol_data::Address,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "manager()"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [72u8, 28u8, 106u8, 117u8]; + const SIGNATURE: &'static str = "manager()"; + #[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, - ), - ) + (::tokenize(ret),) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) - .map(|r| { + as alloy_sol_types::SolType>::abi_decode_sequence(data).map( + |r| { let r: managerReturn = 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: managerReturn = r.into(); - r._0 - }) + 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: managerReturn = r.into(); + r._0 + }) } } }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `token0()` and selector `0x0dfe1681`. -```solidity -function token0() external view returns (address); -```*/ + ```solidity + function token0() external view returns (address); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct token0Call; #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`token0()`](token0Call) function. + ///Container type for the return parameters of the [`token0()`](token0Call) + /// function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct token0Return { @@ -2997,7 +2958,7 @@ function token0() external view returns (address); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -3006,9 +2967,7 @@ function token0() external view returns (address); type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -3038,9 +2997,7 @@ function token0() external view returns (address); type UnderlyingRustTuple<'a> = (alloy_sol_types::private::Address,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -3065,68 +3022,64 @@ function token0() external view returns (address); #[automatically_derived] impl alloy_sol_types::SolCall for token0Call { type Parameters<'a> = (); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = alloy_sol_types::private::Address; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (alloy_sol_types::sol_data::Address,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "token0()"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [13u8, 254u8, 22u8, 129u8]; + const SIGNATURE: &'static str = "token0()"; + #[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, - ), - ) + (::tokenize(ret),) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) - .map(|r| { + as alloy_sol_types::SolType>::abi_decode_sequence(data).map( + |r| { let r: token0Return = 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: token0Return = r.into(); - r._0 - }) + 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: token0Return = r.into(); + r._0 + }) } } }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `token1()` and selector `0xd21220a7`. -```solidity -function token1() external view returns (address); -```*/ + ```solidity + function token1() external view returns (address); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct token1Call; #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`token1()`](token1Call) function. + ///Container type for the return parameters of the [`token1()`](token1Call) + /// function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct token1Return { @@ -3140,7 +3093,7 @@ function token1() external view returns (address); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -3149,9 +3102,7 @@ function token1() external view returns (address); type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -3181,9 +3132,7 @@ function token1() external view returns (address); type UnderlyingRustTuple<'a> = (alloy_sol_types::private::Address,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -3208,63 +3157,58 @@ function token1() external view returns (address); #[automatically_derived] impl alloy_sol_types::SolCall for token1Call { type Parameters<'a> = (); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = alloy_sol_types::private::Address; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (alloy_sol_types::sol_data::Address,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "token1()"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [210u8, 18u8, 32u8, 167u8]; + const SIGNATURE: &'static str = "token1()"; + #[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, - ), - ) + (::tokenize(ret),) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) - .map(|r| { + as alloy_sol_types::SolType>::abi_decode_sequence(data).map( + |r| { let r: token1Return = 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: token1Return = r.into(); - r._0 - }) + 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: token1Return = r.into(); + r._0 + }) } } }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `verify((uint256,address,bytes,bytes32),(address,address,address,uint256,uint256,uint32,bytes32,uint256,bytes32,bool,bytes32,bytes32))` and selector `0xa029a8d4`. -```solidity -function verify(ConstantProduct.TradingParams memory tradingParams, GPv2Order.Data memory order) external view; -```*/ + ```solidity + function verify(ConstantProduct.TradingParams memory tradingParams, GPv2Order.Data memory order) external view; + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct verifyCall { @@ -3273,7 +3217,10 @@ function verify(ConstantProduct.TradingParams memory tradingParams, GPv2Order.Da #[allow(missing_docs)] pub order: ::RustType, } - ///Container type for the return parameters of the [`verify((uint256,address,bytes,bytes32),(address,address,address,uint256,uint256,uint32,bytes32,uint256,bytes32,bool,bytes32,bytes32))`](verifyCall) function. + ///Container type for the return parameters of the + /// [`verify((uint256,address,bytes,bytes32),(address,address,address, + /// uint256,uint256,uint32,bytes32,uint256,bytes32,bool,bytes32, + /// bytes32))`](verifyCall) function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct verifyReturn {} @@ -3284,14 +3231,11 @@ function verify(ConstantProduct.TradingParams memory tradingParams, GPv2Order.Da clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] - type UnderlyingSolTuple<'a> = ( - ConstantProduct::TradingParams, - GPv2Order::Data, - ); + type UnderlyingSolTuple<'a> = (ConstantProduct::TradingParams, GPv2Order::Data); #[doc(hidden)] type UnderlyingRustTuple<'a> = ( ::RustType, @@ -3299,9 +3243,7 @@ function verify(ConstantProduct.TradingParams memory tradingParams, GPv2Order.Da ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -3334,9 +3276,7 @@ function verify(ConstantProduct.TradingParams memory tradingParams, GPv2Order.Da type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -3359,31 +3299,30 @@ function verify(ConstantProduct.TradingParams memory tradingParams, GPv2Order.Da } } impl verifyReturn { - fn _tokenize( - &self, - ) -> ::ReturnToken<'_> { + fn _tokenize(&self) -> ::ReturnToken<'_> { () } } #[automatically_derived] impl alloy_sol_types::SolCall for verifyCall { type Parameters<'a> = (ConstantProduct::TradingParams, GPv2Order::Data); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = verifyReturn; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "verify((uint256,address,bytes,bytes32),(address,address,address,uint256,uint256,uint32,bytes32,uint256,bytes32,bool,bytes32,bytes32))"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [160u8, 41u8, 168u8, 212u8]; + const SIGNATURE: &'static str = "verify((uint256,address,bytes,bytes32),(address,\ + address,address,uint256,uint256,uint32,bytes32,\ + uint256,bytes32,bool,bytes32,bytes32))"; + #[inline] fn new<'a>( tuple: as alloy_sol_types::SolType>::RustType, ) -> Self { tuple.into() } + #[inline] fn tokenize(&self) -> Self::Token<'_> { ( @@ -3393,31 +3332,29 @@ function verify(ConstantProduct.TradingParams memory tradingParams, GPv2Order.Da ::tokenize(&self.order), ) } + #[inline] fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { verifyReturn::_tokenize(ret) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) + 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) + 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 [`CowAmm`](self) function calls. #[derive(Clone)] - #[derive()] pub enum CowAmmCalls { #[allow(missing_docs)] commit(commitCall), @@ -3437,8 +3374,9 @@ function verify(ConstantProduct.TradingParams memory tradingParams, GPv2Order.Da impl CowAmmCalls { /// 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. + /// 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]] = &[ @@ -3450,16 +3388,6 @@ function verify(ConstantProduct.TradingParams memory tradingParams, GPv2Order.Da [210u8, 18u8, 32u8, 167u8], [241u8, 79u8, 203u8, 200u8], ]; - /// The names of the variants in the same order as `SELECTORS`. - pub const VARIANT_NAMES: &'static [&'static str] = &[ - ::core::stringify!(token0), - ::core::stringify!(isValidSignature), - ::core::stringify!(manager), - ::core::stringify!(verify), - ::core::stringify!(hash), - ::core::stringify!(token1), - ::core::stringify!(commit), - ]; /// The signatures in the same order as `SELECTORS`. pub const SIGNATURES: &'static [&'static str] = &[ ::SIGNATURE, @@ -3470,6 +3398,17 @@ function verify(ConstantProduct.TradingParams memory tradingParams, GPv2Order.Da ::SIGNATURE, ::SIGNATURE, ]; + /// The names of the variants in the same order as `SELECTORS`. + pub const VARIANT_NAMES: &'static [&'static str] = &[ + ::core::stringify!(token0), + ::core::stringify!(isValidSignature), + ::core::stringify!(manager), + ::core::stringify!(verify), + ::core::stringify!(hash), + ::core::stringify!(token1), + ::core::stringify!(commit), + ]; + /// Returns the signature for the given selector, if known. #[inline] pub fn signature_by_selector( @@ -3482,20 +3421,20 @@ function verify(ConstantProduct.TradingParams memory tradingParams, GPv2Order.Da ::core::result::Result::Err(_) => ::core::option::Option::None, } } + /// Returns the enum variant name for the given selector, if known. #[inline] - pub fn name_by_selector( - selector: [u8; 4usize], - ) -> ::core::option::Option<&'static str> { + pub fn name_by_selector(selector: [u8; 4usize]) -> ::core::option::Option<&'static str> { let sig = Self::signature_by_selector(selector)?; sig.split_once('(').map(|(name, _)| name) } } #[automatically_derived] impl alloy_sol_types::SolInterface for CowAmmCalls { - const NAME: &'static str = "CowAmmCalls"; - const MIN_DATA_LENGTH: usize = 0usize; const COUNT: usize = 7usize; + const MIN_DATA_LENGTH: usize = 0usize; + const NAME: &'static str = "CowAmmCalls"; + #[inline] fn selector(&self) -> [u8; 4] { match self { @@ -3510,20 +3449,20 @@ function verify(ConstantProduct.TradingParams memory tradingParams, GPv2Order.Da Self::verify(_) => ::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 { + fn abi_decode_raw(selector: [u8; 4], data: &[u8]) -> alloy_sol_types::Result { static DECODE_SHIMS: &[fn(&[u8]) -> alloy_sol_types::Result] = &[ { fn token0(data: &[u8]) -> alloy_sol_types::Result { @@ -3533,12 +3472,8 @@ function verify(ConstantProduct.TradingParams memory tradingParams, GPv2Order.Da token0 }, { - fn isValidSignature( - data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, - ) + fn isValidSignature(data: &[u8]) -> alloy_sol_types::Result { + ::abi_decode_raw(data) .map(CowAmmCalls::isValidSignature) } isValidSignature @@ -3580,100 +3515,82 @@ function verify(ConstantProduct.TradingParams memory tradingParams, GPv2Order.Da }, ]; let Ok(idx) = Self::SELECTORS.binary_search(&selector) else { - return Err( - alloy_sol_types::Error::unknown_selector( - ::NAME, - selector, - ), - ); + 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] = &[ + static DECODE_VALIDATE_SHIMS: &[fn(&[u8]) -> alloy_sol_types::Result] = &[ { fn token0(data: &[u8]) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) + ::abi_decode_raw_validate(data) .map(CowAmmCalls::token0) } token0 }, { - fn isValidSignature( - data: &[u8], - ) -> alloy_sol_types::Result { + fn isValidSignature(data: &[u8]) -> alloy_sol_types::Result { ::abi_decode_raw_validate( - data, - ) - .map(CowAmmCalls::isValidSignature) + data, + ) + .map(CowAmmCalls::isValidSignature) } isValidSignature }, { fn manager(data: &[u8]) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) + ::abi_decode_raw_validate(data) .map(CowAmmCalls::manager) } manager }, { fn verify(data: &[u8]) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) + ::abi_decode_raw_validate(data) .map(CowAmmCalls::verify) } verify }, { fn hash(data: &[u8]) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) + ::abi_decode_raw_validate(data) .map(CowAmmCalls::hash) } hash }, { fn token1(data: &[u8]) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) + ::abi_decode_raw_validate(data) .map(CowAmmCalls::token1) } token1 }, { fn commit(data: &[u8]) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) + ::abi_decode_raw_validate(data) .map(CowAmmCalls::commit) } commit }, ]; let Ok(idx) = Self::SELECTORS.binary_search(&selector) else { - return Err( - alloy_sol_types::Error::unknown_selector( - ::NAME, - selector, - ), - ); + return Err(alloy_sol_types::Error::unknown_selector( + ::NAME, + selector, + )); }; DECODE_VALIDATE_SHIMS[idx](data) } + #[inline] fn abi_encoded_size(&self) -> usize { match self { @@ -3684,9 +3601,7 @@ function verify(ConstantProduct.TradingParams memory tradingParams, GPv2Order.Da ::abi_encoded_size(inner) } Self::isValidSignature(inner) => { - ::abi_encoded_size( - inner, - ) + ::abi_encoded_size(inner) } Self::manager(inner) => { ::abi_encoded_size(inner) @@ -3702,6 +3617,7 @@ function verify(ConstantProduct.TradingParams memory tradingParams, GPv2Order.Da } } } + #[inline] fn abi_encode_raw(&self, out: &mut alloy_sol_types::private::Vec) { match self { @@ -3712,10 +3628,7 @@ function verify(ConstantProduct.TradingParams memory tradingParams, GPv2Order.Da ::abi_encode_raw(inner, out) } Self::isValidSignature(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } Self::manager(inner) => { ::abi_encode_raw(inner, out) @@ -3733,8 +3646,7 @@ function verify(ConstantProduct.TradingParams memory tradingParams, GPv2Order.Da } } ///Container for all the [`CowAmm`](self) custom errors. - #[derive(Clone)] - #[derive(Debug, PartialEq, Eq, Hash)] + #[derive(Clone, Debug, PartialEq, Eq, Hash)] pub enum CowAmmErrors { #[allow(missing_docs)] CommitOutsideOfSettlement(CommitOutsideOfSettlement), @@ -3756,8 +3668,9 @@ function verify(ConstantProduct.TradingParams memory tradingParams, GPv2Order.Da impl CowAmmErrors { /// 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. + /// 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]] = &[ @@ -3770,17 +3683,6 @@ function verify(ConstantProduct.TradingParams memory tradingParams, GPv2Order.Da [241u8, 166u8, 120u8, 144u8], [248u8, 125u8, 13u8, 22u8], ]; - /// The names of the variants in the same order as `SELECTORS`. - pub const VARIANT_NAMES: &'static [&'static str] = &[ - ::core::stringify!(PollTryAtBlock), - ::core::stringify!(OrderDoesNotMatchMessageHash), - ::core::stringify!(CommitOutsideOfSettlement), - ::core::stringify!(OrderNotValid), - ::core::stringify!(OrderDoesNotMatchDefaultTradeableOrder), - ::core::stringify!(OrderDoesNotMatchCommitmentHash), - ::core::stringify!(TradingParamsDoNotMatchHash), - ::core::stringify!(OnlyManagerCanCall), - ]; /// The signatures in the same order as `SELECTORS`. pub const SIGNATURES: &'static [&'static str] = &[ ::SIGNATURE, @@ -3792,6 +3694,18 @@ function verify(ConstantProduct.TradingParams memory tradingParams, GPv2Order.Da ::SIGNATURE, ::SIGNATURE, ]; + /// The names of the variants in the same order as `SELECTORS`. + pub const VARIANT_NAMES: &'static [&'static str] = &[ + ::core::stringify!(PollTryAtBlock), + ::core::stringify!(OrderDoesNotMatchMessageHash), + ::core::stringify!(CommitOutsideOfSettlement), + ::core::stringify!(OrderNotValid), + ::core::stringify!(OrderDoesNotMatchDefaultTradeableOrder), + ::core::stringify!(OrderDoesNotMatchCommitmentHash), + ::core::stringify!(TradingParamsDoNotMatchHash), + ::core::stringify!(OnlyManagerCanCall), + ]; + /// Returns the signature for the given selector, if known. #[inline] pub fn signature_by_selector( @@ -3804,20 +3718,20 @@ function verify(ConstantProduct.TradingParams memory tradingParams, GPv2Order.Da ::core::result::Result::Err(_) => ::core::option::Option::None, } } + /// Returns the enum variant name for the given selector, if known. #[inline] - pub fn name_by_selector( - selector: [u8; 4usize], - ) -> ::core::option::Option<&'static str> { + pub fn name_by_selector(selector: [u8; 4usize]) -> ::core::option::Option<&'static str> { let sig = Self::signature_by_selector(selector)?; sig.split_once('(').map(|(name, _)| name) } } #[automatically_derived] impl alloy_sol_types::SolInterface for CowAmmErrors { - const NAME: &'static str = "CowAmmErrors"; - const MIN_DATA_LENGTH: usize = 0usize; const COUNT: usize = 8usize; + const MIN_DATA_LENGTH: usize = 0usize; + const NAME: &'static str = "CowAmmErrors"; + #[inline] fn selector(&self) -> [u8; 4] { match self { @@ -3836,39 +3750,31 @@ function verify(ConstantProduct.TradingParams memory tradingParams, GPv2Order.Da Self::OrderDoesNotMatchMessageHash(_) => { ::SELECTOR } - Self::OrderNotValid(_) => { - ::SELECTOR - } - Self::PollTryAtBlock(_) => { - ::SELECTOR - } + Self::OrderNotValid(_) => ::SELECTOR, + Self::PollTryAtBlock(_) => ::SELECTOR, Self::TradingParamsDoNotMatchHash(_) => { ::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 { + fn abi_decode_raw(selector: [u8; 4], data: &[u8]) -> alloy_sol_types::Result { static DECODE_SHIMS: &[fn(&[u8]) -> alloy_sol_types::Result] = &[ { - fn PollTryAtBlock( - data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, - ) + fn PollTryAtBlock(data: &[u8]) -> alloy_sol_types::Result { + ::abi_decode_raw(data) .map(CowAmmErrors::PollTryAtBlock) } PollTryAtBlock @@ -3878,9 +3784,9 @@ function verify(ConstantProduct.TradingParams memory tradingParams, GPv2Order.Da data: &[u8], ) -> alloy_sol_types::Result { ::abi_decode_raw( - data, - ) - .map(CowAmmErrors::OrderDoesNotMatchMessageHash) + data, + ) + .map(CowAmmErrors::OrderDoesNotMatchMessageHash) } OrderDoesNotMatchMessageHash }, @@ -3889,19 +3795,15 @@ function verify(ConstantProduct.TradingParams memory tradingParams, GPv2Order.Da data: &[u8], ) -> alloy_sol_types::Result { ::abi_decode_raw( - data, - ) - .map(CowAmmErrors::CommitOutsideOfSettlement) + data, + ) + .map(CowAmmErrors::CommitOutsideOfSettlement) } CommitOutsideOfSettlement }, { - fn OrderNotValid( - data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, - ) + fn OrderNotValid(data: &[u8]) -> alloy_sol_types::Result { + ::abi_decode_raw(data) .map(CowAmmErrors::OrderNotValid) } OrderNotValid @@ -3933,50 +3835,39 @@ function verify(ConstantProduct.TradingParams memory tradingParams, GPv2Order.Da data: &[u8], ) -> alloy_sol_types::Result { ::abi_decode_raw( - data, - ) - .map(CowAmmErrors::TradingParamsDoNotMatchHash) + data, + ) + .map(CowAmmErrors::TradingParamsDoNotMatchHash) } TradingParamsDoNotMatchHash }, { - fn OnlyManagerCanCall( - data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, - ) + fn OnlyManagerCanCall(data: &[u8]) -> alloy_sol_types::Result { + ::abi_decode_raw(data) .map(CowAmmErrors::OnlyManagerCanCall) } OnlyManagerCanCall }, ]; let Ok(idx) = Self::SELECTORS.binary_search(&selector) else { - return Err( - alloy_sol_types::Error::unknown_selector( - ::NAME, - selector, - ), - ); + 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] = &[ + static DECODE_VALIDATE_SHIMS: &[fn(&[u8]) -> alloy_sol_types::Result] = &[ { - fn PollTryAtBlock( - data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) + fn PollTryAtBlock(data: &[u8]) -> alloy_sol_types::Result { + ::abi_decode_raw_validate(data) .map(CowAmmErrors::PollTryAtBlock) } PollTryAtBlock @@ -4004,12 +3895,8 @@ function verify(ConstantProduct.TradingParams memory tradingParams, GPv2Order.Da CommitOutsideOfSettlement }, { - fn OrderNotValid( - data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) + fn OrderNotValid(data: &[u8]) -> alloy_sol_types::Result { + ::abi_decode_raw_validate(data) .map(CowAmmErrors::OrderNotValid) } OrderNotValid @@ -4048,27 +3935,24 @@ function verify(ConstantProduct.TradingParams memory tradingParams, GPv2Order.Da TradingParamsDoNotMatchHash }, { - fn OnlyManagerCanCall( - data: &[u8], - ) -> alloy_sol_types::Result { + fn OnlyManagerCanCall(data: &[u8]) -> alloy_sol_types::Result { ::abi_decode_raw_validate( - data, - ) - .map(CowAmmErrors::OnlyManagerCanCall) + data, + ) + .map(CowAmmErrors::OnlyManagerCanCall) } OnlyManagerCanCall }, ]; let Ok(idx) = Self::SELECTORS.binary_search(&selector) else { - return Err( - alloy_sol_types::Error::unknown_selector( - ::NAME, - selector, - ), - ); + return Err(alloy_sol_types::Error::unknown_selector( + ::NAME, + selector, + )); }; DECODE_VALIDATE_SHIMS[idx](data) } + #[inline] fn abi_encoded_size(&self) -> usize { match self { @@ -4112,6 +3996,7 @@ function verify(ConstantProduct.TradingParams memory tradingParams, GPv2Order.Da } } } + #[inline] fn abi_encode_raw(&self, out: &mut alloy_sol_types::private::Vec) { match self { @@ -4167,8 +4052,7 @@ function verify(ConstantProduct.TradingParams memory tradingParams, GPv2Order.Da } } ///Container for all the [`CowAmm`](self) events. - #[derive(Clone)] - #[derive(Debug, PartialEq, Eq, Hash)] + #[derive(Clone, Debug, PartialEq, Eq, Hash)] pub enum CowAmmEvents { #[allow(missing_docs)] TradingDisabled(TradingDisabled), @@ -4178,32 +4062,34 @@ function verify(ConstantProduct.TradingParams memory tradingParams, GPv2Order.Da impl CowAmmEvents { /// 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. + /// 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]] = &[ [ - 81u8, 14u8, 74u8, 79u8, 118u8, 144u8, 124u8, 45u8, 97u8, 88u8, 179u8, - 67u8, 247u8, 196u8, 242u8, 245u8, 151u8, 223u8, 56u8, 91u8, 114u8, 124u8, - 38u8, 233u8, 239u8, 144u8, 231u8, 80u8, 147u8, 172u8, 225u8, 154u8, + 81u8, 14u8, 74u8, 79u8, 118u8, 144u8, 124u8, 45u8, 97u8, 88u8, 179u8, 67u8, 247u8, + 196u8, 242u8, 245u8, 151u8, 223u8, 56u8, 91u8, 114u8, 124u8, 38u8, 233u8, 239u8, + 144u8, 231u8, 80u8, 147u8, 172u8, 225u8, 154u8, ], [ - 188u8, 184u8, 184u8, 251u8, 222u8, 168u8, 170u8, 109u8, 196u8, 174u8, - 65u8, 33u8, 62u8, 77u8, 168u8, 30u8, 96u8, 90u8, 61u8, 26u8, 86u8, 237u8, - 133u8, 27u8, 147u8, 85u8, 24u8, 35u8, 33u8, 192u8, 145u8, 144u8, + 188u8, 184u8, 184u8, 251u8, 222u8, 168u8, 170u8, 109u8, 196u8, 174u8, 65u8, 33u8, + 62u8, 77u8, 168u8, 30u8, 96u8, 90u8, 61u8, 26u8, 86u8, 237u8, 133u8, 27u8, 147u8, + 85u8, 24u8, 35u8, 33u8, 192u8, 145u8, 144u8, ], ]; - /// The names of the variants in the same order as `SELECTORS`. - pub const VARIANT_NAMES: &'static [&'static str] = &[ - ::core::stringify!(TradingEnabled), - ::core::stringify!(TradingDisabled), - ]; /// The signatures in the same order as `SELECTORS`. pub const SIGNATURES: &'static [&'static str] = &[ ::SIGNATURE, ::SIGNATURE, ]; + /// The names of the variants in the same order as `SELECTORS`. + pub const VARIANT_NAMES: &'static [&'static str] = &[ + ::core::stringify!(TradingEnabled), + ::core::stringify!(TradingDisabled), + ]; + /// Returns the signature for the given selector, if known. #[inline] pub fn signature_by_selector( @@ -4216,49 +4102,41 @@ function verify(ConstantProduct.TradingParams memory tradingParams, GPv2Order.Da ::core::result::Result::Err(_) => ::core::option::Option::None, } } + /// Returns the enum variant name for the given selector, if known. #[inline] - pub fn name_by_selector( - selector: [u8; 32usize], - ) -> ::core::option::Option<&'static str> { + pub fn name_by_selector(selector: [u8; 32usize]) -> ::core::option::Option<&'static str> { let sig = Self::signature_by_selector(selector)?; sig.split_once('(').map(|(name, _)| name) } } #[automatically_derived] impl alloy_sol_types::SolEventInterface for CowAmmEvents { - const NAME: &'static str = "CowAmmEvents"; const COUNT: usize = 2usize; + const NAME: &'static str = "CowAmmEvents"; + 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, - ) + ::decode_raw_log(topics, data) .map(Self::TradingDisabled) } Some(::SIGNATURE_HASH) => { - ::decode_raw_log( - topics, - data, - ) + ::decode_raw_log(topics, data) .map(Self::TradingEnabled) } - _ => { - 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(), - ), + _ => 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(), ), - }) - } + ), + }), } } } @@ -4274,6 +4152,7 @@ function verify(ConstantProduct.TradingParams memory tradingParams, GPv2Order.Da } } } + fn into_log_data(self) -> alloy_sol_types::private::LogData { match self { Self::TradingDisabled(inner) => { @@ -4285,10 +4164,10 @@ function verify(ConstantProduct.TradingParams memory tradingParams, GPv2Order.Da } } } - use alloy_contract as alloy_contract; + use alloy_contract; /**Creates a new wrapper around an on-chain [`CowAmm`](self) contract instance. -See the [wrapper's documentation](`CowAmmInstance`) for more details.*/ + See the [wrapper's documentation](`CowAmmInstance`) for more details.*/ #[inline] pub const fn new< P: alloy_contract::private::Provider, @@ -4301,28 +4180,23 @@ See the [wrapper's documentation](`CowAmmInstance`) for more details.*/ } /**Deploys this contract using the given `provider` and constructor arguments, if any. -Returns a new instance of the contract, if the deployment was successful. + 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.*/ + 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, - >( + pub fn deploy, N: alloy_contract::private::Network>( __provider: P, _solutionSettler: alloy_sol_types::private::Address, _token0: alloy_sol_types::private::Address, _token1: alloy_sol_types::private::Address, - ) -> impl ::core::future::Future< - Output = alloy_contract::Result>, - > { + ) -> impl ::core::future::Future>> { CowAmmInstance::::deploy(__provider, _solutionSettler, _token0, _token1) } /**Creates a `RawCallBuilder` for deploying this contract using the given `provider` -and constructor arguments, if any. + 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.*/ + 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, @@ -4333,22 +4207,19 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ _token0: alloy_sol_types::private::Address, _token1: alloy_sol_types::private::Address, ) -> alloy_contract::RawCallBuilder { - CowAmmInstance::< - P, - N, - >::deploy_builder(__provider, _solutionSettler, _token0, _token1) + CowAmmInstance::::deploy_builder(__provider, _solutionSettler, _token0, _token1) } /**A [`CowAmm`](self) instance. -Contains type-safe methods for interacting with an on-chain instance of the -[`CowAmm`](self) contract located at a given `address`, using a given -provider `P`. + Contains type-safe methods for interacting with an on-chain instance of the + [`CowAmm`](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. + 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.*/ + See the [module-level documentation](self) for all the available methods.*/ #[derive(Clone)] pub struct CowAmmInstance { address: alloy_sol_types::private::Address, @@ -4359,33 +4230,32 @@ See the [module-level documentation](self) for all the available methods.*/ impl ::core::fmt::Debug for CowAmmInstance { #[inline] fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { - f.debug_tuple("CowAmmInstance").field(&self.address).finish() + f.debug_tuple("CowAmmInstance") + .field(&self.address) + .finish() } } /// Instantiation and getters/setters. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > CowAmmInstance { + impl, N: alloy_contract::private::Network> + CowAmmInstance + { /**Creates a new wrapper around an on-chain [`CowAmm`](self) contract instance. -See the [wrapper's documentation](`CowAmmInstance`) for more details.*/ + See the [wrapper's documentation](`CowAmmInstance`) for more details.*/ #[inline] - pub const fn new( - address: alloy_sol_types::private::Address, - __provider: P, - ) -> Self { + pub const fn new(address: alloy_sol_types::private::Address, __provider: P) -> Self { Self { address, provider: __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. + 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.*/ + For more fine-grained control over the deployment process, use [`deploy_builder`] instead.*/ #[inline] pub async fn deploy( __provider: P, @@ -4393,20 +4263,16 @@ For more fine-grained control over the deployment process, use [`deploy_builder` _token0: alloy_sol_types::private::Address, _token1: alloy_sol_types::private::Address, ) -> alloy_contract::Result> { - let call_builder = Self::deploy_builder( - __provider, - _solutionSettler, - _token0, - _token1, - ); + let call_builder = Self::deploy_builder(__provider, _solutionSettler, _token0, _token1); 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. + 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.*/ + 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, @@ -4418,33 +4284,35 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ __provider, [ &BYTECODE[..], - &alloy_sol_types::SolConstructor::abi_encode( - &constructorCall { - _solutionSettler, - _token0, - _token1, - }, - )[..], + &alloy_sol_types::SolConstructor::abi_encode(&constructorCall { + _solutionSettler, + _token0, + _token1, + })[..], ] - .concat() - .into(), + .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 { @@ -4452,7 +4320,8 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ } } impl CowAmmInstance<&P, N> { - /// Clones the provider and returns a new instance with the cloned provider. + /// Clones the provider and returns a new instance with the cloned + /// provider. #[inline] pub fn with_cloned_provider(self) -> CowAmmInstance { CowAmmInstance { @@ -4463,20 +4332,22 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ } } /// Function calls. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > CowAmmInstance { - /// Creates a new call builder using this contract instance's provider and address. + impl, N: alloy_contract::private::Network> + CowAmmInstance + { + /// 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. + /// 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 [`commit`] function. pub fn commit( &self, @@ -4484,6 +4355,7 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ ) -> alloy_contract::SolCallBuilder<&P, commitCall, N> { self.call_builder(&commitCall { orderHash }) } + ///Creates a new call builder for the [`hash`] function. pub fn hash( &self, @@ -4491,64 +4363,66 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ ) -> alloy_contract::SolCallBuilder<&P, hashCall, N> { self.call_builder(&hashCall { tradingParams }) } + ///Creates a new call builder for the [`isValidSignature`] function. pub fn isValidSignature( &self, _hash: alloy_sol_types::private::FixedBytes<32>, signature: alloy_sol_types::private::Bytes, ) -> alloy_contract::SolCallBuilder<&P, isValidSignatureCall, N> { - self.call_builder( - &isValidSignatureCall { - _hash, - signature, - }, - ) + self.call_builder(&isValidSignatureCall { _hash, signature }) } + ///Creates a new call builder for the [`manager`] function. pub fn manager(&self) -> alloy_contract::SolCallBuilder<&P, managerCall, N> { self.call_builder(&managerCall) } + ///Creates a new call builder for the [`token0`] function. pub fn token0(&self) -> alloy_contract::SolCallBuilder<&P, token0Call, N> { self.call_builder(&token0Call) } + ///Creates a new call builder for the [`token1`] function. pub fn token1(&self) -> alloy_contract::SolCallBuilder<&P, token1Call, N> { self.call_builder(&token1Call) } + ///Creates a new call builder for the [`verify`] function. pub fn verify( &self, tradingParams: ::RustType, order: ::RustType, ) -> alloy_contract::SolCallBuilder<&P, verifyCall, N> { - self.call_builder(&verifyCall { tradingParams, order }) + self.call_builder(&verifyCall { + tradingParams, + order, + }) } } /// Event filters. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > CowAmmInstance { - /// Creates a new event filter using this contract instance's provider and address. + impl, N: alloy_contract::private::Network> + CowAmmInstance + { + /// 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. + /// 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 [`TradingDisabled`] event. - pub fn TradingDisabled_filter( - &self, - ) -> alloy_contract::Event<&P, TradingDisabled, N> { + pub fn TradingDisabled_filter(&self) -> alloy_contract::Event<&P, TradingDisabled, N> { self.event_filter::() } + ///Creates a new event filter for the [`TradingEnabled`] event. - pub fn TradingEnabled_filter( - &self, - ) -> alloy_contract::Event<&P, TradingEnabled, N> { + pub fn TradingEnabled_filter(&self) -> alloy_contract::Event<&P, TradingEnabled, N> { self.event_filter::() } } diff --git a/contracts/generated/contracts-generated/cowammconstantproductfactory/src/lib.rs b/contracts/generated/contracts-generated/cowammconstantproductfactory/src/lib.rs index 4ca3d8310a..ea4a654388 100644 --- a/contracts/generated/contracts-generated/cowammconstantproductfactory/src/lib.rs +++ b/contracts/generated/contracts-generated/cowammconstantproductfactory/src/lib.rs @@ -1,4 +1,10 @@ -#![allow(unused_imports, unused_attributes, clippy::all, rustdoc::all, non_snake_case)] +#![allow( + unused_imports, + unused_attributes, + clippy::all, + rustdoc::all, + non_snake_case +)] //! Auto-generated contract bindings. Do not edit. ///Module containing a contract's types and functions. /** @@ -16,12 +22,11 @@ library IConditionalOrder { clippy::empty_structs_with_brackets )] pub mod IConditionalOrder { - use super::*; - use alloy_sol_types as alloy_sol_types; + use {super::*, alloy_sol_types}; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**```solidity -struct ConditionalOrderParams { address handler; bytes32 salt; bytes staticInput; } -```*/ + struct ConditionalOrderParams { address handler; bytes32 salt; bytes staticInput; } + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct ConditionalOrderParams { @@ -39,7 +44,7 @@ struct ConditionalOrderParams { address handler; bytes32 salt; bytes staticInput clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[doc(hidden)] #[allow(dead_code)] type UnderlyingSolTuple<'a> = ( @@ -55,9 +60,7 @@ struct ConditionalOrderParams { address handler; bytes32 salt; bytes staticInput ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -102,91 +105,88 @@ struct ConditionalOrderParams { address handler; bytes32 salt; bytes staticInput ), ) } + #[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) + 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) + 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) + 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 ConditionalOrderParams { type RustType = Self; - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + + const ENCODED_SIZE: Option = + as alloy_sol_types::SolType>::ENCODED_SIZE; + const PACKED_ENCODED_SIZE: Option = + as alloy_sol_types::SolType>::PACKED_ENCODED_SIZE; 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); + let tuple = as alloy_sol_types::SolType>::detokenize(token); >>::from(tuple) } } #[automatically_derived] impl alloy_sol_types::SolStruct for ConditionalOrderParams { const NAME: &'static str = "ConditionalOrderParams"; + #[inline] fn eip712_root_type() -> alloy_sol_types::private::Cow<'static, str> { alloy_sol_types::private::Cow::Borrowed( "ConditionalOrderParams(address handler,bytes32 salt,bytes staticInput)", ) } + #[inline] - fn eip712_components() -> alloy_sol_types::private::Vec< - alloy_sol_types::private::Cow<'static, str>, - > { + fn eip712_components() + -> alloy_sol_types::private::Vec> + { 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 { [ @@ -221,14 +221,13 @@ struct ConditionalOrderParams { address handler; bytes32 salt; bytes staticInput &rust.staticInput, ) } + #[inline] fn encode_topic_preimage( rust: &Self::RustType, out: &mut alloy_sol_types::private::Vec, ) { - out.reserve( - ::topic_preimage_length(rust), - ); + out.reserve(::topic_preimage_length(rust)); ::encode_topic_preimage( &rust.handler, out, @@ -244,25 +243,19 @@ struct ConditionalOrderParams { address handler; bytes32 salt; bytes staticInput out, ); } + #[inline] - fn encode_topic( - rust: &Self::RustType, - ) -> alloy_sol_types::abi::token::WordToken { + 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), - ) + ::encode_topic_preimage(rust, &mut out); + alloy_sol_types::abi::token::WordToken(alloy_sol_types::private::keccak256(out)) } } }; - use alloy_contract as alloy_contract; + use alloy_contract; /**Creates a new wrapper around an on-chain [`IConditionalOrder`](self) contract instance. -See the [wrapper's documentation](`IConditionalOrderInstance`) for more details.*/ + See the [wrapper's documentation](`IConditionalOrderInstance`) for more details.*/ #[inline] pub const fn new< P: alloy_contract::private::Provider, @@ -275,15 +268,15 @@ See the [wrapper's documentation](`IConditionalOrderInstance`) for more details. } /**A [`IConditionalOrder`](self) instance. -Contains type-safe methods for interacting with an on-chain instance of the -[`IConditionalOrder`](self) contract located at a given `address`, using a given -provider `P`. + Contains type-safe methods for interacting with an on-chain instance of the + [`IConditionalOrder`](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. + 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.*/ + See the [module-level documentation](self) for all the available methods.*/ #[derive(Clone)] pub struct IConditionalOrderInstance { address: alloy_sol_types::private::Address, @@ -294,43 +287,45 @@ See the [module-level documentation](self) for all the available methods.*/ impl ::core::fmt::Debug for IConditionalOrderInstance { #[inline] fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { - f.debug_tuple("IConditionalOrderInstance").field(&self.address).finish() + f.debug_tuple("IConditionalOrderInstance") + .field(&self.address) + .finish() } } /// Instantiation and getters/setters. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > IConditionalOrderInstance { + impl, N: alloy_contract::private::Network> + IConditionalOrderInstance + { /**Creates a new wrapper around an on-chain [`IConditionalOrder`](self) contract instance. -See the [wrapper's documentation](`IConditionalOrderInstance`) for more details.*/ + See the [wrapper's documentation](`IConditionalOrderInstance`) for more details.*/ #[inline] - pub const fn new( - address: alloy_sol_types::private::Address, - __provider: P, - ) -> Self { + pub const fn new(address: alloy_sol_types::private::Address, __provider: P) -> Self { Self { address, provider: __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 { @@ -338,7 +333,8 @@ See the [wrapper's documentation](`IConditionalOrderInstance`) for more details. } } impl IConditionalOrderInstance<&P, N> { - /// Clones the provider and returns a new instance with the cloned provider. + /// Clones the provider and returns a new instance with the cloned + /// provider. #[inline] pub fn with_cloned_provider(self) -> IConditionalOrderInstance { IConditionalOrderInstance { @@ -349,14 +345,15 @@ See the [wrapper's documentation](`IConditionalOrderInstance`) for more details. } } /// Function calls. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > IConditionalOrderInstance { - /// Creates a new call builder using this contract instance's provider and address. + impl, N: alloy_contract::private::Network> + IConditionalOrderInstance + { + /// 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. + /// 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, @@ -365,14 +362,15 @@ See the [wrapper's documentation](`IConditionalOrderInstance`) for more details. } } /// Event filters. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > IConditionalOrderInstance { - /// Creates a new event filter using this contract instance's provider and address. + impl, N: alloy_contract::private::Network> + IConditionalOrderInstance + { + /// 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. + /// 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> { @@ -684,8 +682,7 @@ interface CowAmmConstantProductFactory { clippy::empty_structs_with_brackets )] pub mod CowAmmConstantProductFactory { - use super::*; - use alloy_sol_types as alloy_sol_types; + use {super::*, alloy_sol_types}; /// The creation / init bytecode of the contract. /// /// ```text @@ -708,9 +705,9 @@ pub mod CowAmmConstantProductFactory { ); #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Custom error with signature `OnlyOwnerCanCall(address)` and selector `0x68bafff8`. -```solidity -error OnlyOwnerCanCall(address owner); -```*/ + ```solidity + error OnlyOwnerCanCall(address owner); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct OnlyOwnerCanCall { @@ -724,7 +721,7 @@ error OnlyOwnerCanCall(address owner); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[doc(hidden)] #[allow(dead_code)] type UnderlyingSolTuple<'a> = (alloy_sol_types::sol_data::Address,); @@ -732,9 +729,7 @@ error OnlyOwnerCanCall(address owner); type UnderlyingRustTuple<'a> = (alloy_sol_types::private::Address,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -758,17 +753,18 @@ error OnlyOwnerCanCall(address owner); #[automatically_derived] impl alloy_sol_types::SolError for OnlyOwnerCanCall { type Parameters<'a> = UnderlyingSolTuple<'a>; - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "OnlyOwnerCanCall(address)"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [104u8, 186u8, 255u8, 248u8]; + const SIGNATURE: &'static str = "OnlyOwnerCanCall(address)"; + #[inline] fn new<'a>( tuple: as alloy_sol_types::SolType>::RustType, ) -> Self { tuple.into() } + #[inline] fn tokenize(&self) -> Self::Token<'_> { ( @@ -777,20 +773,21 @@ error OnlyOwnerCanCall(address owner); ), ) } + #[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) + as alloy_sol_types::SolType>::abi_decode_sequence_validate( + data, + ) + .map(Self::new) } } }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Custom error with signature `OrderNotValid(string)` and selector `0xc8fc2725`. -```solidity -error OrderNotValid(string); -```*/ + ```solidity + error OrderNotValid(string); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct OrderNotValid(pub alloy_sol_types::private::String); @@ -801,7 +798,7 @@ error OrderNotValid(string); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[doc(hidden)] #[allow(dead_code)] type UnderlyingSolTuple<'a> = (alloy_sol_types::sol_data::String,); @@ -809,9 +806,7 @@ error OrderNotValid(string); type UnderlyingRustTuple<'a> = (alloy_sol_types::private::String,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -835,17 +830,18 @@ error OrderNotValid(string); #[automatically_derived] impl alloy_sol_types::SolError for OrderNotValid { type Parameters<'a> = UnderlyingSolTuple<'a>; - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "OrderNotValid(string)"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [200u8, 252u8, 39u8, 37u8]; + const SIGNATURE: &'static str = "OrderNotValid(string)"; + #[inline] fn new<'a>( tuple: as alloy_sol_types::SolType>::RustType, ) -> Self { tuple.into() } + #[inline] fn tokenize(&self) -> Self::Token<'_> { ( @@ -854,20 +850,21 @@ error OrderNotValid(string); ), ) } + #[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) + as alloy_sol_types::SolType>::abi_decode_sequence_validate( + data, + ) + .map(Self::new) } } }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Event with signature `ConditionalOrderCreated(address,(address,bytes32,bytes))` and selector `0x2cceac5555b0ca45a3744ced542f54b56ad2eb45e521962372eef212a2cbf361`. -```solidity -event ConditionalOrderCreated(address indexed owner, IConditionalOrder.ConditionalOrderParams params); -```*/ + ```solidity + event ConditionalOrderCreated(address indexed owner, IConditionalOrder.ConditionalOrderParams params); + ```*/ #[allow( non_camel_case_types, non_snake_case, @@ -879,7 +876,8 @@ event ConditionalOrderCreated(address indexed owner, IConditionalOrder.Condition #[allow(missing_docs)] pub owner: alloy_sol_types::private::Address, #[allow(missing_docs)] - pub params: ::RustType, + pub params: + ::RustType, } #[allow( non_camel_case_types, @@ -888,24 +886,26 @@ event ConditionalOrderCreated(address indexed owner, IConditionalOrder.Condition clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[automatically_derived] impl alloy_sol_types::SolEvent for ConditionalOrderCreated { + type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type DataTuple<'a> = (IConditionalOrder::ConditionalOrderParams,); - 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, ); - const SIGNATURE: &'static str = "ConditionalOrderCreated(address,(address,bytes32,bytes))"; - const SIGNATURE_HASH: alloy_sol_types::private::B256 = alloy_sol_types::private::B256::new([ - 44u8, 206u8, 172u8, 85u8, 85u8, 176u8, 202u8, 69u8, 163u8, 116u8, 76u8, - 237u8, 84u8, 47u8, 84u8, 181u8, 106u8, 210u8, 235u8, 69u8, 229u8, 33u8, - 150u8, 35u8, 114u8, 238u8, 242u8, 18u8, 162u8, 203u8, 243u8, 97u8, - ]); + const ANONYMOUS: bool = false; + const SIGNATURE: &'static str = + "ConditionalOrderCreated(address,(address,bytes32,bytes))"; + const SIGNATURE_HASH: alloy_sol_types::private::B256 = + alloy_sol_types::private::B256::new([ + 44u8, 206u8, 172u8, 85u8, 85u8, 176u8, 202u8, 69u8, 163u8, 116u8, 76u8, 237u8, + 84u8, 47u8, 84u8, 181u8, 106u8, 210u8, 235u8, 69u8, 229u8, 33u8, 150u8, 35u8, + 114u8, 238u8, 242u8, 18u8, 162u8, 203u8, 243u8, 97u8, + ]); + #[allow(unused_variables)] #[inline] fn new( @@ -917,21 +917,21 @@ event ConditionalOrderCreated(address indexed owner, IConditionalOrder.Condition params: 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, - ), - ); + 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<'_> { ( @@ -940,10 +940,12 @@ event ConditionalOrderCreated(address indexed owner, IConditionalOrder.Condition ), ) } + #[inline] fn topics(&self) -> ::RustType { (Self::SIGNATURE_HASH.into(), self.owner.clone()) } + #[inline] fn encode_topics_raw( &self, @@ -952,9 +954,7 @@ event ConditionalOrderCreated(address indexed owner, IConditionalOrder.Condition if out.len() < ::COUNT { return Err(alloy_sol_types::Error::Overrun); } - out[0usize] = alloy_sol_types::abi::token::WordToken( - Self::SIGNATURE_HASH, - ); + out[0usize] = alloy_sol_types::abi::token::WordToken(Self::SIGNATURE_HASH); out[1usize] = ::encode_topic( &self.owner, ); @@ -966,6 +966,7 @@ event ConditionalOrderCreated(address indexed owner, IConditionalOrder.Condition 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) } @@ -973,18 +974,16 @@ event ConditionalOrderCreated(address indexed owner, IConditionalOrder.Condition #[automatically_derived] impl From<&ConditionalOrderCreated> for alloy_sol_types::private::LogData { #[inline] - fn from( - this: &ConditionalOrderCreated, - ) -> alloy_sol_types::private::LogData { + fn from(this: &ConditionalOrderCreated) -> alloy_sol_types::private::LogData { alloy_sol_types::SolEvent::encode_log_data(this) } } }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Event with signature `Deployed(address,address,address,address)` and selector `0x6707255b2c5ca81220b2f3e408a269cb83baa6aa7e5e37aa1756883a6cdf06f1`. -```solidity -event Deployed(address indexed amm, address indexed owner, address token0, address token1); -```*/ + ```solidity + event Deployed(address indexed amm, address indexed owner, address token0, address token1); + ```*/ #[allow( non_camel_case_types, non_snake_case, @@ -1009,28 +1008,29 @@ event Deployed(address indexed amm, address indexed owner, address token0, addre clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[automatically_derived] impl alloy_sol_types::SolEvent for Deployed { + type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type DataTuple<'a> = ( alloy_sol_types::sol_data::Address, 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::Address, alloy_sol_types::sol_data::Address, ); - const SIGNATURE: &'static str = "Deployed(address,address,address,address)"; - const SIGNATURE_HASH: alloy_sol_types::private::B256 = alloy_sol_types::private::B256::new([ - 103u8, 7u8, 37u8, 91u8, 44u8, 92u8, 168u8, 18u8, 32u8, 178u8, 243u8, - 228u8, 8u8, 162u8, 105u8, 203u8, 131u8, 186u8, 166u8, 170u8, 126u8, 94u8, - 55u8, 170u8, 23u8, 86u8, 136u8, 58u8, 108u8, 223u8, 6u8, 241u8, - ]); + const ANONYMOUS: bool = false; + const SIGNATURE: &'static str = "Deployed(address,address,address,address)"; + const SIGNATURE_HASH: alloy_sol_types::private::B256 = + alloy_sol_types::private::B256::new([ + 103u8, 7u8, 37u8, 91u8, 44u8, 92u8, 168u8, 18u8, 32u8, 178u8, 243u8, 228u8, + 8u8, 162u8, 105u8, 203u8, 131u8, 186u8, 166u8, 170u8, 126u8, 94u8, 55u8, 170u8, + 23u8, 86u8, 136u8, 58u8, 108u8, 223u8, 6u8, 241u8, + ]); + #[allow(unused_variables)] #[inline] fn new( @@ -1044,21 +1044,21 @@ event Deployed(address indexed amm, address indexed owner, address token0, addre token1: 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, - ), - ); + 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<'_> { ( @@ -1070,10 +1070,16 @@ event Deployed(address indexed amm, address indexed owner, address token0, addre ), ) } + #[inline] fn topics(&self) -> ::RustType { - (Self::SIGNATURE_HASH.into(), self.amm.clone(), self.owner.clone()) + ( + Self::SIGNATURE_HASH.into(), + self.amm.clone(), + self.owner.clone(), + ) } + #[inline] fn encode_topics_raw( &self, @@ -1082,9 +1088,7 @@ event Deployed(address indexed amm, address indexed owner, address token0, addre if out.len() < ::COUNT { return Err(alloy_sol_types::Error::Overrun); } - out[0usize] = alloy_sol_types::abi::token::WordToken( - Self::SIGNATURE_HASH, - ); + out[0usize] = alloy_sol_types::abi::token::WordToken(Self::SIGNATURE_HASH); out[1usize] = ::encode_topic( &self.amm, ); @@ -1099,6 +1103,7 @@ event Deployed(address indexed amm, address indexed owner, address token0, addre 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) } @@ -1113,9 +1118,9 @@ event Deployed(address indexed amm, address indexed owner, address token0, addre }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Event with signature `TradingDisabled(address)` and selector `0xc75bf4f03c02fab9414a7d7a54048c0486722bc72f33ad924709a0593608ad27`. -```solidity -event TradingDisabled(address indexed amm); -```*/ + ```solidity + event TradingDisabled(address indexed amm); + ```*/ #[allow( non_camel_case_types, non_snake_case, @@ -1134,24 +1139,25 @@ event TradingDisabled(address indexed amm); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[automatically_derived] impl alloy_sol_types::SolEvent for TradingDisabled { + type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; 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::Address, ); - const SIGNATURE: &'static str = "TradingDisabled(address)"; - const SIGNATURE_HASH: alloy_sol_types::private::B256 = alloy_sol_types::private::B256::new([ - 199u8, 91u8, 244u8, 240u8, 60u8, 2u8, 250u8, 185u8, 65u8, 74u8, 125u8, - 122u8, 84u8, 4u8, 140u8, 4u8, 134u8, 114u8, 43u8, 199u8, 47u8, 51u8, - 173u8, 146u8, 71u8, 9u8, 160u8, 89u8, 54u8, 8u8, 173u8, 39u8, - ]); + const ANONYMOUS: bool = false; + const SIGNATURE: &'static str = "TradingDisabled(address)"; + const SIGNATURE_HASH: alloy_sol_types::private::B256 = + alloy_sol_types::private::B256::new([ + 199u8, 91u8, 244u8, 240u8, 60u8, 2u8, 250u8, 185u8, 65u8, 74u8, 125u8, 122u8, + 84u8, 4u8, 140u8, 4u8, 134u8, 114u8, 43u8, 199u8, 47u8, 51u8, 173u8, 146u8, + 71u8, 9u8, 160u8, 89u8, 54u8, 8u8, 173u8, 39u8, + ]); + #[allow(unused_variables)] #[inline] fn new( @@ -1160,29 +1166,31 @@ event TradingDisabled(address indexed amm); ) -> Self { Self { amm: topics.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, - ), - ); + 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.amm.clone()) } + #[inline] fn encode_topics_raw( &self, @@ -1191,9 +1199,7 @@ event TradingDisabled(address indexed amm); if out.len() < ::COUNT { return Err(alloy_sol_types::Error::Overrun); } - out[0usize] = alloy_sol_types::abi::token::WordToken( - Self::SIGNATURE_HASH, - ); + out[0usize] = alloy_sol_types::abi::token::WordToken(Self::SIGNATURE_HASH); out[1usize] = ::encode_topic( &self.amm, ); @@ -1205,6 +1211,7 @@ event TradingDisabled(address indexed amm); 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) } @@ -1218,9 +1225,9 @@ event TradingDisabled(address indexed amm); } }; /**Constructor`. -```solidity -constructor(address _settler); -```*/ + ```solidity + constructor(address _settler); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct constructorCall { @@ -1228,7 +1235,7 @@ constructor(address _settler); pub _settler: alloy_sol_types::private::Address, } const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -1237,9 +1244,7 @@ constructor(address _settler); type UnderlyingRustTuple<'a> = (alloy_sol_types::private::Address,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1264,15 +1269,15 @@ constructor(address _settler); #[automatically_derived] impl alloy_sol_types::SolConstructor for constructorCall { type Parameters<'a> = (alloy_sol_types::sol_data::Address,); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + 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<'_> { ( @@ -1285,9 +1290,9 @@ constructor(address _settler); }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `ammDeterministicAddress(address,address,address)` and selector `0x37ebdf50`. -```solidity -function ammDeterministicAddress(address ammOwner, address token0, address token1) external view returns (address); -```*/ + ```solidity + function ammDeterministicAddress(address ammOwner, address token0, address token1) external view returns (address); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct ammDeterministicAddressCall { @@ -1299,7 +1304,9 @@ function ammDeterministicAddress(address ammOwner, address token0, address token pub token1: alloy_sol_types::private::Address, } #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`ammDeterministicAddress(address,address,address)`](ammDeterministicAddressCall) function. + ///Container type for the return parameters of the + /// [`ammDeterministicAddress(address,address, + /// address)`](ammDeterministicAddressCall) function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct ammDeterministicAddressReturn { @@ -1313,7 +1320,7 @@ function ammDeterministicAddress(address ammOwner, address token0, address token clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -1330,9 +1337,7 @@ function ammDeterministicAddress(address ammOwner, address token0, address token ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1341,16 +1346,14 @@ function ammDeterministicAddress(address ammOwner, address token0, address token } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From - for UnderlyingRustTuple<'_> { + impl ::core::convert::From for UnderlyingRustTuple<'_> { fn from(value: ammDeterministicAddressCall) -> Self { (value.ammOwner, value.token0, value.token1) } } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From> - for ammDeterministicAddressCall { + impl ::core::convert::From> for ammDeterministicAddressCall { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { Self { ammOwner: tuple.0, @@ -1368,9 +1371,7 @@ function ammDeterministicAddress(address ammOwner, address token0, address token type UnderlyingRustTuple<'a> = (alloy_sol_types::private::Address,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1379,16 +1380,14 @@ function ammDeterministicAddress(address ammOwner, address token0, address token } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From - for UnderlyingRustTuple<'_> { + impl ::core::convert::From for UnderlyingRustTuple<'_> { fn from(value: ammDeterministicAddressReturn) -> Self { (value._0,) } } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From> - for ammDeterministicAddressReturn { + impl ::core::convert::From> for ammDeterministicAddressReturn { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { Self { _0: tuple.0 } } @@ -1401,22 +1400,21 @@ function ammDeterministicAddress(address ammOwner, address token0, address token 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::Address; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (alloy_sol_types::sol_data::Address,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "ammDeterministicAddress(address,address,address)"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [55u8, 235u8, 223u8, 80u8]; + const SIGNATURE: &'static str = "ammDeterministicAddress(address,address,address)"; + #[inline] fn new<'a>( tuple: as alloy_sol_types::SolType>::RustType, ) -> Self { tuple.into() } + #[inline] fn tokenize(&self) -> Self::Token<'_> { ( @@ -1431,43 +1429,39 @@ function ammDeterministicAddress(address ammOwner, address token0, address token ), ) } + #[inline] fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { - ( - ::tokenize( - ret, - ), - ) + (::tokenize(ret),) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) - .map(|r| { + as alloy_sol_types::SolType>::abi_decode_sequence(data).map( + |r| { let r: ammDeterministicAddressReturn = 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: ammDeterministicAddressReturn = r.into(); - r._0 - }) + 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: ammDeterministicAddressReturn = r.into(); + r._0 + }) } } }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `create(address,uint256,address,uint256,uint256,address,bytes,bytes32)` and selector `0x22b155c6`. -```solidity -function create(address token0, uint256 amount0, address token1, uint256 amount1, uint256 minTradedToken0, address priceOracle, bytes memory priceOracleData, bytes32 appData) external returns (address amm); -```*/ + ```solidity + function create(address token0, uint256 amount0, address token1, uint256 amount1, uint256 minTradedToken0, address priceOracle, bytes memory priceOracleData, bytes32 appData) external returns (address amm); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct createCall { @@ -1489,7 +1483,9 @@ function create(address token0, uint256 amount0, address token1, uint256 amount1 pub appData: alloy_sol_types::private::FixedBytes<32>, } #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`create(address,uint256,address,uint256,uint256,address,bytes,bytes32)`](createCall) function. + ///Container type for the return parameters of the + /// [`create(address,uint256,address,uint256,uint256,address,bytes, + /// bytes32)`](createCall) function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct createReturn { @@ -1503,7 +1499,7 @@ function create(address token0, uint256 amount0, address token1, uint256 amount1 clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -1530,9 +1526,7 @@ function create(address token0, uint256 amount0, address token1, uint256 amount1 ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1580,9 +1574,7 @@ function create(address token0, uint256 amount0, address token1, uint256 amount1 type UnderlyingRustTuple<'a> = (alloy_sol_types::private::Address,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1616,22 +1608,22 @@ function create(address token0, uint256 amount0, address token1, uint256 amount1 alloy_sol_types::sol_data::Bytes, alloy_sol_types::sol_data::FixedBytes<32>, ); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = alloy_sol_types::private::Address; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (alloy_sol_types::sol_data::Address,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "create(address,uint256,address,uint256,uint256,address,bytes,bytes32)"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [34u8, 177u8, 85u8, 198u8]; + const SIGNATURE: &'static str = + "create(address,uint256,address,uint256,uint256,address,bytes,bytes32)"; + #[inline] fn new<'a>( tuple: as alloy_sol_types::SolType>::RustType, ) -> Self { tuple.into() } + #[inline] fn tokenize(&self) -> Self::Token<'_> { ( @@ -1661,43 +1653,39 @@ function create(address token0, uint256 amount0, address token1, uint256 amount1 > as alloy_sol_types::SolType>::tokenize(&self.appData), ) } + #[inline] fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { - ( - ::tokenize( - ret, - ), - ) + (::tokenize(ret),) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) - .map(|r| { + as alloy_sol_types::SolType>::abi_decode_sequence(data).map( + |r| { let r: createReturn = r.into(); r.amm - }) + }, + ) } + #[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: createReturn = r.into(); - r.amm - }) + 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: createReturn = r.into(); + r.amm + }) } } }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `deposit(address,uint256,uint256)` and selector `0x0efe6a8b`. -```solidity -function deposit(address amm, uint256 amount0, uint256 amount1) external; -```*/ + ```solidity + function deposit(address amm, uint256 amount0, uint256 amount1) external; + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct depositCall { @@ -1708,7 +1696,8 @@ function deposit(address amm, uint256 amount0, uint256 amount1) external; #[allow(missing_docs)] pub amount1: alloy_sol_types::private::primitives::aliases::U256, } - ///Container type for the return parameters of the [`deposit(address,uint256,uint256)`](depositCall) function. + ///Container type for the return parameters of the + /// [`deposit(address,uint256,uint256)`](depositCall) function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct depositReturn {} @@ -1719,7 +1708,7 @@ function deposit(address amm, uint256 amount0, uint256 amount1) external; clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -1736,9 +1725,7 @@ function deposit(address amm, uint256 amount0, uint256 amount1) external; ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1772,9 +1759,7 @@ function deposit(address amm, uint256 amount0, uint256 amount1) external; type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1797,9 +1782,7 @@ function deposit(address amm, uint256 amount0, uint256 amount1) external; } } impl depositReturn { - fn _tokenize( - &self, - ) -> ::ReturnToken<'_> { + fn _tokenize(&self) -> ::ReturnToken<'_> { () } } @@ -1810,68 +1793,67 @@ function deposit(address amm, uint256 amount0, uint256 amount1) external; 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 = depositReturn; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "deposit(address,uint256,uint256)"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [14u8, 254u8, 106u8, 139u8]; + const SIGNATURE: &'static str = "deposit(address,uint256,uint256)"; + #[inline] fn new<'a>( tuple: as alloy_sol_types::SolType>::RustType, ) -> Self { tuple.into() } + #[inline] fn tokenize(&self) -> Self::Token<'_> { ( ::tokenize( &self.amm, ), - as alloy_sol_types::SolType>::tokenize(&self.amount0), - as alloy_sol_types::SolType>::tokenize(&self.amount1), + as alloy_sol_types::SolType>::tokenize( + &self.amount0, + ), + as alloy_sol_types::SolType>::tokenize( + &self.amount1, + ), ) } + #[inline] fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { depositReturn::_tokenize(ret) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) + 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) + 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(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `owner(address)` and selector `0x666e1b39`. -```solidity -function owner(address) external view returns (address); -```*/ + ```solidity + function owner(address) external view returns (address); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct ownerCall(pub alloy_sol_types::private::Address); #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`owner(address)`](ownerCall) function. + ///Container type for the return parameters of the + /// [`owner(address)`](ownerCall) function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct ownerReturn { @@ -1885,7 +1867,7 @@ function owner(address) external view returns (address); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -1894,9 +1876,7 @@ function owner(address) external view returns (address); type UnderlyingRustTuple<'a> = (alloy_sol_types::private::Address,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1926,9 +1906,7 @@ function owner(address) external view returns (address); type UnderlyingRustTuple<'a> = (alloy_sol_types::private::Address,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1953,22 +1931,21 @@ function owner(address) external view returns (address); #[automatically_derived] impl alloy_sol_types::SolCall for ownerCall { 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 ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (alloy_sol_types::sol_data::Address,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "owner(address)"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [102u8, 110u8, 27u8, 57u8]; + const SIGNATURE: &'static str = "owner(address)"; + #[inline] fn new<'a>( tuple: as alloy_sol_types::SolType>::RustType, ) -> Self { tuple.into() } + #[inline] fn tokenize(&self) -> Self::Token<'_> { ( @@ -1977,43 +1954,39 @@ function owner(address) external view returns (address); ), ) } + #[inline] fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { - ( - ::tokenize( - ret, - ), - ) + (::tokenize(ret),) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) - .map(|r| { + as alloy_sol_types::SolType>::abi_decode_sequence(data).map( + |r| { let r: ownerReturn = 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: ownerReturn = r.into(); - r._0 - }) + 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: ownerReturn = r.into(); + r._0 + }) } } }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `withdraw(address,uint256,uint256)` and selector `0xb5c5f672`. -```solidity -function withdraw(address amm, uint256 amount0, uint256 amount1) external; -```*/ + ```solidity + function withdraw(address amm, uint256 amount0, uint256 amount1) external; + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct withdrawCall { @@ -2024,7 +1997,8 @@ function withdraw(address amm, uint256 amount0, uint256 amount1) external; #[allow(missing_docs)] pub amount1: alloy_sol_types::private::primitives::aliases::U256, } - ///Container type for the return parameters of the [`withdraw(address,uint256,uint256)`](withdrawCall) function. + ///Container type for the return parameters of the + /// [`withdraw(address,uint256,uint256)`](withdrawCall) function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct withdrawReturn {} @@ -2035,7 +2009,7 @@ function withdraw(address amm, uint256 amount0, uint256 amount1) external; clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -2052,9 +2026,7 @@ function withdraw(address amm, uint256 amount0, uint256 amount1) external; ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -2088,9 +2060,7 @@ function withdraw(address amm, uint256 amount0, uint256 amount1) external; type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -2113,9 +2083,7 @@ function withdraw(address amm, uint256 amount0, uint256 amount1) external; } } impl withdrawReturn { - fn _tokenize( - &self, - ) -> ::ReturnToken<'_> { + fn _tokenize(&self) -> ::ReturnToken<'_> { () } } @@ -2126,61 +2094,59 @@ function withdraw(address amm, uint256 amount0, uint256 amount1) external; 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 = withdrawReturn; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "withdraw(address,uint256,uint256)"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [181u8, 197u8, 246u8, 114u8]; + const SIGNATURE: &'static str = "withdraw(address,uint256,uint256)"; + #[inline] fn new<'a>( tuple: as alloy_sol_types::SolType>::RustType, ) -> Self { tuple.into() } + #[inline] fn tokenize(&self) -> Self::Token<'_> { ( ::tokenize( &self.amm, ), - as alloy_sol_types::SolType>::tokenize(&self.amount0), - as alloy_sol_types::SolType>::tokenize(&self.amount1), + as alloy_sol_types::SolType>::tokenize( + &self.amount0, + ), + as alloy_sol_types::SolType>::tokenize( + &self.amount1, + ), ) } + #[inline] fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { withdrawReturn::_tokenize(ret) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) + 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) + 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 [`CowAmmConstantProductFactory`](self) function calls. + ///Container for all the [`CowAmmConstantProductFactory`](self) function + /// calls. #[derive(Clone)] - #[derive()] pub enum CowAmmConstantProductFactoryCalls { #[allow(missing_docs)] ammDeterministicAddress(ammDeterministicAddressCall), @@ -2196,8 +2162,9 @@ function withdraw(address amm, uint256 amount0, uint256 amount1) external; impl CowAmmConstantProductFactoryCalls { /// 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. + /// 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]] = &[ @@ -2207,14 +2174,6 @@ function withdraw(address amm, uint256 amount0, uint256 amount1) external; [102u8, 110u8, 27u8, 57u8], [181u8, 197u8, 246u8, 114u8], ]; - /// The names of the variants in the same order as `SELECTORS`. - pub const VARIANT_NAMES: &'static [&'static str] = &[ - ::core::stringify!(deposit), - ::core::stringify!(create), - ::core::stringify!(ammDeterministicAddress), - ::core::stringify!(owner), - ::core::stringify!(withdraw), - ]; /// The signatures in the same order as `SELECTORS`. pub const SIGNATURES: &'static [&'static str] = &[ ::SIGNATURE, @@ -2223,6 +2182,15 @@ function withdraw(address amm, uint256 amount0, uint256 amount1) external; ::SIGNATURE, ::SIGNATURE, ]; + /// The names of the variants in the same order as `SELECTORS`. + pub const VARIANT_NAMES: &'static [&'static str] = &[ + ::core::stringify!(deposit), + ::core::stringify!(create), + ::core::stringify!(ammDeterministicAddress), + ::core::stringify!(owner), + ::core::stringify!(withdraw), + ]; + /// Returns the signature for the given selector, if known. #[inline] pub fn signature_by_selector( @@ -2235,20 +2203,20 @@ function withdraw(address amm, uint256 amount0, uint256 amount1) external; ::core::result::Result::Err(_) => ::core::option::Option::None, } } + /// Returns the enum variant name for the given selector, if known. #[inline] - pub fn name_by_selector( - selector: [u8; 4usize], - ) -> ::core::option::Option<&'static str> { + pub fn name_by_selector(selector: [u8; 4usize]) -> ::core::option::Option<&'static str> { let sig = Self::signature_by_selector(selector)?; sig.split_once('(').map(|(name, _)| name) } } #[automatically_derived] impl alloy_sol_types::SolInterface for CowAmmConstantProductFactoryCalls { - const NAME: &'static str = "CowAmmConstantProductFactoryCalls"; - const MIN_DATA_LENGTH: usize = 32usize; const COUNT: usize = 5usize; + const MIN_DATA_LENGTH: usize = 32usize; + const NAME: &'static str = "CowAmmConstantProductFactoryCalls"; + #[inline] fn selector(&self) -> [u8; 4] { match self { @@ -2261,27 +2229,30 @@ function withdraw(address amm, uint256 amount0, uint256 amount1) external; Self::withdraw(_) => ::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 { + fn abi_decode_raw(selector: [u8; 4], data: &[u8]) -> alloy_sol_types::Result { static DECODE_SHIMS: &[fn( &[u8], - ) -> alloy_sol_types::Result] = &[ + ) -> alloy_sol_types::Result< + CowAmmConstantProductFactoryCalls, + >] = &[ { fn deposit( data: &[u8], - ) -> alloy_sol_types::Result { + ) -> alloy_sol_types::Result + { ::abi_decode_raw(data) .map(CowAmmConstantProductFactoryCalls::deposit) } @@ -2290,7 +2261,8 @@ function withdraw(address amm, uint256 amount0, uint256 amount1) external; { fn create( data: &[u8], - ) -> alloy_sol_types::Result { + ) -> alloy_sol_types::Result + { ::abi_decode_raw(data) .map(CowAmmConstantProductFactoryCalls::create) } @@ -2299,20 +2271,20 @@ function withdraw(address amm, uint256 amount0, uint256 amount1) external; { fn ammDeterministicAddress( data: &[u8], - ) -> alloy_sol_types::Result { + ) -> alloy_sol_types::Result + { ::abi_decode_raw( - data, - ) - .map( - CowAmmConstantProductFactoryCalls::ammDeterministicAddress, - ) + data, + ) + .map(CowAmmConstantProductFactoryCalls::ammDeterministicAddress) } ammDeterministicAddress }, { fn owner( data: &[u8], - ) -> alloy_sol_types::Result { + ) -> alloy_sol_types::Result + { ::abi_decode_raw(data) .map(CowAmmConstantProductFactoryCalls::owner) } @@ -2321,7 +2293,8 @@ function withdraw(address amm, uint256 amount0, uint256 amount1) external; { fn withdraw( data: &[u8], - ) -> alloy_sol_types::Result { + ) -> alloy_sol_types::Result + { ::abi_decode_raw(data) .map(CowAmmConstantProductFactoryCalls::withdraw) } @@ -2329,15 +2302,14 @@ function withdraw(address amm, uint256 amount0, uint256 amount1) external; }, ]; let Ok(idx) = Self::SELECTORS.binary_search(&selector) else { - return Err( - alloy_sol_types::Error::unknown_selector( - ::NAME, - selector, - ), - ); + return Err(alloy_sol_types::Error::unknown_selector( + ::NAME, + selector, + )); }; DECODE_SHIMS[idx](data) } + #[inline] #[allow(non_snake_case)] fn abi_decode_raw_validate( @@ -2346,14 +2318,15 @@ function withdraw(address amm, uint256 amount0, uint256 amount1) external; ) -> alloy_sol_types::Result { static DECODE_VALIDATE_SHIMS: &[fn( &[u8], - ) -> alloy_sol_types::Result] = &[ + ) -> alloy_sol_types::Result< + CowAmmConstantProductFactoryCalls, + >] = &[ { fn deposit( data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) + ) -> alloy_sol_types::Result + { + ::abi_decode_raw_validate(data) .map(CowAmmConstantProductFactoryCalls::deposit) } deposit @@ -2361,10 +2334,9 @@ function withdraw(address amm, uint256 amount0, uint256 amount1) external; { fn create( data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) + ) -> alloy_sol_types::Result + { + ::abi_decode_raw_validate(data) .map(CowAmmConstantProductFactoryCalls::create) } create @@ -2372,7 +2344,8 @@ function withdraw(address amm, uint256 amount0, uint256 amount1) external; { fn ammDeterministicAddress( data: &[u8], - ) -> alloy_sol_types::Result { + ) -> alloy_sol_types::Result + { ::abi_decode_raw_validate( data, ) @@ -2385,10 +2358,9 @@ function withdraw(address amm, uint256 amount0, uint256 amount1) external; { fn owner( data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) + ) -> alloy_sol_types::Result + { + ::abi_decode_raw_validate(data) .map(CowAmmConstantProductFactoryCalls::owner) } owner @@ -2396,25 +2368,23 @@ function withdraw(address amm, uint256 amount0, uint256 amount1) external; { fn withdraw( data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) + ) -> alloy_sol_types::Result + { + ::abi_decode_raw_validate(data) .map(CowAmmConstantProductFactoryCalls::withdraw) } withdraw }, ]; let Ok(idx) = Self::SELECTORS.binary_search(&selector) else { - return Err( - alloy_sol_types::Error::unknown_selector( - ::NAME, - selector, - ), - ); + return Err(alloy_sol_types::Error::unknown_selector( + ::NAME, + selector, + )); }; DECODE_VALIDATE_SHIMS[idx](data) } + #[inline] fn abi_encoded_size(&self) -> usize { match self { @@ -2437,13 +2407,13 @@ function withdraw(address amm, uint256 amount0, uint256 amount1) external; } } } + #[inline] fn abi_encode_raw(&self, out: &mut alloy_sol_types::private::Vec) { match self { Self::ammDeterministicAddress(inner) => { ::abi_encode_raw( - inner, - out, + inner, out, ) } Self::create(inner) => { @@ -2456,17 +2426,14 @@ function withdraw(address amm, uint256 amount0, uint256 amount1) external; ::abi_encode_raw(inner, out) } Self::withdraw(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } } } } - ///Container for all the [`CowAmmConstantProductFactory`](self) custom errors. - #[derive(Clone)] - #[derive(Debug, PartialEq, Eq, Hash)] + ///Container for all the [`CowAmmConstantProductFactory`](self) custom + /// errors. + #[derive(Clone, Debug, PartialEq, Eq, Hash)] pub enum CowAmmConstantProductFactoryErrors { #[allow(missing_docs)] OnlyOwnerCanCall(OnlyOwnerCanCall), @@ -2476,24 +2443,24 @@ function withdraw(address amm, uint256 amount0, uint256 amount1) external; impl CowAmmConstantProductFactoryErrors { /// 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. + /// 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]] = &[ - [104u8, 186u8, 255u8, 248u8], - [200u8, 252u8, 39u8, 37u8], + pub const SELECTORS: &'static [[u8; 4usize]] = + &[[104u8, 186u8, 255u8, 248u8], [200u8, 252u8, 39u8, 37u8]]; + /// The signatures in the same order as `SELECTORS`. + pub const SIGNATURES: &'static [&'static str] = &[ + ::SIGNATURE, + ::SIGNATURE, ]; /// The names of the variants in the same order as `SELECTORS`. pub const VARIANT_NAMES: &'static [&'static str] = &[ ::core::stringify!(OnlyOwnerCanCall), ::core::stringify!(OrderNotValid), ]; - /// The signatures in the same order as `SELECTORS`. - pub const SIGNATURES: &'static [&'static str] = &[ - ::SIGNATURE, - ::SIGNATURE, - ]; + /// Returns the signature for the given selector, if known. #[inline] pub fn signature_by_selector( @@ -2506,55 +2473,54 @@ function withdraw(address amm, uint256 amount0, uint256 amount1) external; ::core::result::Result::Err(_) => ::core::option::Option::None, } } + /// Returns the enum variant name for the given selector, if known. #[inline] - pub fn name_by_selector( - selector: [u8; 4usize], - ) -> ::core::option::Option<&'static str> { + pub fn name_by_selector(selector: [u8; 4usize]) -> ::core::option::Option<&'static str> { let sig = Self::signature_by_selector(selector)?; sig.split_once('(').map(|(name, _)| name) } } #[automatically_derived] impl alloy_sol_types::SolInterface for CowAmmConstantProductFactoryErrors { - const NAME: &'static str = "CowAmmConstantProductFactoryErrors"; - const MIN_DATA_LENGTH: usize = 32usize; const COUNT: usize = 2usize; + const MIN_DATA_LENGTH: usize = 32usize; + const NAME: &'static str = "CowAmmConstantProductFactoryErrors"; + #[inline] fn selector(&self) -> [u8; 4] { match self { Self::OnlyOwnerCanCall(_) => { ::SELECTOR } - Self::OrderNotValid(_) => { - ::SELECTOR - } + Self::OrderNotValid(_) => ::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 { + fn abi_decode_raw(selector: [u8; 4], data: &[u8]) -> alloy_sol_types::Result { static DECODE_SHIMS: &[fn( &[u8], - ) -> alloy_sol_types::Result] = &[ + ) -> alloy_sol_types::Result< + CowAmmConstantProductFactoryErrors, + >] = &[ { fn OnlyOwnerCanCall( data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, - ) + ) -> alloy_sol_types::Result + { + ::abi_decode_raw(data) .map(CowAmmConstantProductFactoryErrors::OnlyOwnerCanCall) } OnlyOwnerCanCall @@ -2562,25 +2528,23 @@ function withdraw(address amm, uint256 amount0, uint256 amount1) external; { fn OrderNotValid( data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, - ) + ) -> alloy_sol_types::Result + { + ::abi_decode_raw(data) .map(CowAmmConstantProductFactoryErrors::OrderNotValid) } OrderNotValid }, ]; let Ok(idx) = Self::SELECTORS.binary_search(&selector) else { - return Err( - alloy_sol_types::Error::unknown_selector( - ::NAME, - selector, - ), - ); + return Err(alloy_sol_types::Error::unknown_selector( + ::NAME, + selector, + )); }; DECODE_SHIMS[idx](data) } + #[inline] #[allow(non_snake_case)] fn abi_decode_raw_validate( @@ -2589,74 +2553,67 @@ function withdraw(address amm, uint256 amount0, uint256 amount1) external; ) -> alloy_sol_types::Result { static DECODE_VALIDATE_SHIMS: &[fn( &[u8], - ) -> alloy_sol_types::Result] = &[ + ) -> alloy_sol_types::Result< + CowAmmConstantProductFactoryErrors, + >] = &[ { fn OnlyOwnerCanCall( data: &[u8], - ) -> alloy_sol_types::Result { + ) -> alloy_sol_types::Result + { ::abi_decode_raw_validate( - data, - ) - .map(CowAmmConstantProductFactoryErrors::OnlyOwnerCanCall) + data, + ) + .map(CowAmmConstantProductFactoryErrors::OnlyOwnerCanCall) } OnlyOwnerCanCall }, { fn OrderNotValid( data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) + ) -> alloy_sol_types::Result + { + ::abi_decode_raw_validate(data) .map(CowAmmConstantProductFactoryErrors::OrderNotValid) } OrderNotValid }, ]; let Ok(idx) = Self::SELECTORS.binary_search(&selector) else { - return Err( - alloy_sol_types::Error::unknown_selector( - ::NAME, - selector, - ), - ); + 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::OnlyOwnerCanCall(inner) => { - ::abi_encoded_size( - inner, - ) + ::abi_encoded_size(inner) } Self::OrderNotValid(inner) => { ::abi_encoded_size(inner) } } } + #[inline] fn abi_encode_raw(&self, out: &mut alloy_sol_types::private::Vec) { match self { Self::OnlyOwnerCanCall(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } Self::OrderNotValid(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } } } } ///Container for all the [`CowAmmConstantProductFactory`](self) events. - #[derive(Clone)] - #[derive(Debug, PartialEq, Eq, Hash)] + #[derive(Clone, Debug, PartialEq, Eq, Hash)] pub enum CowAmmConstantProductFactoryEvents { #[allow(missing_docs)] ConditionalOrderCreated(ConditionalOrderCreated), @@ -2668,39 +2625,41 @@ function withdraw(address amm, uint256 amount0, uint256 amount1) external; impl CowAmmConstantProductFactoryEvents { /// 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. + /// 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]] = &[ [ - 44u8, 206u8, 172u8, 85u8, 85u8, 176u8, 202u8, 69u8, 163u8, 116u8, 76u8, - 237u8, 84u8, 47u8, 84u8, 181u8, 106u8, 210u8, 235u8, 69u8, 229u8, 33u8, - 150u8, 35u8, 114u8, 238u8, 242u8, 18u8, 162u8, 203u8, 243u8, 97u8, + 44u8, 206u8, 172u8, 85u8, 85u8, 176u8, 202u8, 69u8, 163u8, 116u8, 76u8, 237u8, + 84u8, 47u8, 84u8, 181u8, 106u8, 210u8, 235u8, 69u8, 229u8, 33u8, 150u8, 35u8, + 114u8, 238u8, 242u8, 18u8, 162u8, 203u8, 243u8, 97u8, ], [ - 103u8, 7u8, 37u8, 91u8, 44u8, 92u8, 168u8, 18u8, 32u8, 178u8, 243u8, - 228u8, 8u8, 162u8, 105u8, 203u8, 131u8, 186u8, 166u8, 170u8, 126u8, 94u8, - 55u8, 170u8, 23u8, 86u8, 136u8, 58u8, 108u8, 223u8, 6u8, 241u8, + 103u8, 7u8, 37u8, 91u8, 44u8, 92u8, 168u8, 18u8, 32u8, 178u8, 243u8, 228u8, 8u8, + 162u8, 105u8, 203u8, 131u8, 186u8, 166u8, 170u8, 126u8, 94u8, 55u8, 170u8, 23u8, + 86u8, 136u8, 58u8, 108u8, 223u8, 6u8, 241u8, ], [ - 199u8, 91u8, 244u8, 240u8, 60u8, 2u8, 250u8, 185u8, 65u8, 74u8, 125u8, - 122u8, 84u8, 4u8, 140u8, 4u8, 134u8, 114u8, 43u8, 199u8, 47u8, 51u8, - 173u8, 146u8, 71u8, 9u8, 160u8, 89u8, 54u8, 8u8, 173u8, 39u8, + 199u8, 91u8, 244u8, 240u8, 60u8, 2u8, 250u8, 185u8, 65u8, 74u8, 125u8, 122u8, 84u8, + 4u8, 140u8, 4u8, 134u8, 114u8, 43u8, 199u8, 47u8, 51u8, 173u8, 146u8, 71u8, 9u8, + 160u8, 89u8, 54u8, 8u8, 173u8, 39u8, ], ]; - /// The names of the variants in the same order as `SELECTORS`. - pub const VARIANT_NAMES: &'static [&'static str] = &[ - ::core::stringify!(ConditionalOrderCreated), - ::core::stringify!(Deployed), - ::core::stringify!(TradingDisabled), - ]; /// The signatures in the same order as `SELECTORS`. pub const SIGNATURES: &'static [&'static str] = &[ ::SIGNATURE, ::SIGNATURE, ::SIGNATURE, ]; + /// The names of the variants in the same order as `SELECTORS`. + pub const VARIANT_NAMES: &'static [&'static str] = &[ + ::core::stringify!(ConditionalOrderCreated), + ::core::stringify!(Deployed), + ::core::stringify!(TradingDisabled), + ]; + /// Returns the signature for the given selector, if known. #[inline] pub fn signature_by_selector( @@ -2713,55 +2672,47 @@ function withdraw(address amm, uint256 amount0, uint256 amount1) external; ::core::result::Result::Err(_) => ::core::option::Option::None, } } + /// Returns the enum variant name for the given selector, if known. #[inline] - pub fn name_by_selector( - selector: [u8; 32usize], - ) -> ::core::option::Option<&'static str> { + pub fn name_by_selector(selector: [u8; 32usize]) -> ::core::option::Option<&'static str> { let sig = Self::signature_by_selector(selector)?; sig.split_once('(').map(|(name, _)| name) } } #[automatically_derived] impl alloy_sol_types::SolEventInterface for CowAmmConstantProductFactoryEvents { - const NAME: &'static str = "CowAmmConstantProductFactoryEvents"; const COUNT: usize = 3usize; + const NAME: &'static str = "CowAmmConstantProductFactoryEvents"; + fn decode_raw_log( topics: &[alloy_sol_types::Word], data: &[u8], ) -> alloy_sol_types::Result { match topics.first().copied() { - Some( - ::SIGNATURE_HASH, - ) => { + Some(::SIGNATURE_HASH) => { ::decode_raw_log( - topics, - data, - ) - .map(Self::ConditionalOrderCreated) + topics, data, + ) + .map(Self::ConditionalOrderCreated) } Some(::SIGNATURE_HASH) => { ::decode_raw_log(topics, data) .map(Self::Deployed) } Some(::SIGNATURE_HASH) => { - ::decode_raw_log( - topics, - data, - ) + ::decode_raw_log(topics, data) .map(Self::TradingDisabled) } - _ => { - 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(), - ), + _ => 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(), ), - }) - } + ), + }), } } } @@ -2772,14 +2723,13 @@ function withdraw(address amm, uint256 amount0, uint256 amount1) external; Self::ConditionalOrderCreated(inner) => { alloy_sol_types::private::IntoLogData::to_log_data(inner) } - Self::Deployed(inner) => { - alloy_sol_types::private::IntoLogData::to_log_data(inner) - } + Self::Deployed(inner) => alloy_sol_types::private::IntoLogData::to_log_data(inner), Self::TradingDisabled(inner) => { alloy_sol_types::private::IntoLogData::to_log_data(inner) } } } + fn into_log_data(self) -> alloy_sol_types::private::LogData { match self { Self::ConditionalOrderCreated(inner) => { @@ -2794,10 +2744,10 @@ function withdraw(address amm, uint256 amount0, uint256 amount1) external; } } } - use alloy_contract as alloy_contract; + use alloy_contract; /**Creates a new wrapper around an on-chain [`CowAmmConstantProductFactory`](self) contract instance. -See the [wrapper's documentation](`CowAmmConstantProductFactoryInstance`) for more details.*/ + See the [wrapper's documentation](`CowAmmConstantProductFactoryInstance`) for more details.*/ #[inline] pub const fn new< P: alloy_contract::private::Provider, @@ -2810,14 +2760,11 @@ See the [wrapper's documentation](`CowAmmConstantProductFactoryInstance`) for mo } /**Deploys this contract using the given `provider` and constructor arguments, if any. -Returns a new instance of the contract, if the deployment was successful. + 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.*/ + 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, - >( + pub fn deploy, N: alloy_contract::private::Network>( __provider: P, _settler: alloy_sol_types::private::Address, ) -> impl ::core::future::Future< @@ -2826,10 +2773,10 @@ For more fine-grained control over the deployment process, use [`deploy_builder` CowAmmConstantProductFactoryInstance::::deploy(__provider, _settler) } /**Creates a `RawCallBuilder` for deploying this contract using the given `provider` -and constructor arguments, if any. + 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.*/ + 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, @@ -2838,27 +2785,21 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ __provider: P, _settler: alloy_sol_types::private::Address, ) -> alloy_contract::RawCallBuilder { - CowAmmConstantProductFactoryInstance::< - P, - N, - >::deploy_builder(__provider, _settler) + CowAmmConstantProductFactoryInstance::::deploy_builder(__provider, _settler) } /**A [`CowAmmConstantProductFactory`](self) instance. -Contains type-safe methods for interacting with an on-chain instance of the -[`CowAmmConstantProductFactory`](self) contract located at a given `address`, using a given -provider `P`. + Contains type-safe methods for interacting with an on-chain instance of the + [`CowAmmConstantProductFactory`](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. + 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.*/ + See the [module-level documentation](self) for all the available methods.*/ #[derive(Clone)] - pub struct CowAmmConstantProductFactoryInstance< - P, - N = alloy_contract::private::Ethereum, - > { + pub struct CowAmmConstantProductFactoryInstance { address: alloy_sol_types::private::Address, provider: P, _network: ::core::marker::PhantomData, @@ -2873,29 +2814,26 @@ See the [module-level documentation](self) for all the available methods.*/ } } /// Instantiation and getters/setters. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > CowAmmConstantProductFactoryInstance { + impl, N: alloy_contract::private::Network> + CowAmmConstantProductFactoryInstance + { /**Creates a new wrapper around an on-chain [`CowAmmConstantProductFactory`](self) contract instance. -See the [wrapper's documentation](`CowAmmConstantProductFactoryInstance`) for more details.*/ + See the [wrapper's documentation](`CowAmmConstantProductFactoryInstance`) for more details.*/ #[inline] - pub const fn new( - address: alloy_sol_types::private::Address, - __provider: P, - ) -> Self { + pub const fn new(address: alloy_sol_types::private::Address, __provider: P) -> Self { Self { address, provider: __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. + 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.*/ + For more fine-grained control over the deployment process, use [`deploy_builder`] instead.*/ #[inline] pub async fn deploy( __provider: P, @@ -2905,11 +2843,12 @@ For more fine-grained control over the deployment process, use [`deploy_builder` 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. + 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.*/ + 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, @@ -2919,29 +2858,31 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ __provider, [ &BYTECODE[..], - &alloy_sol_types::SolConstructor::abi_encode( - &constructorCall { _settler }, - )[..], + &alloy_sol_types::SolConstructor::abi_encode(&constructorCall { _settler })[..], ] - .concat() - .into(), + .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 { @@ -2949,7 +2890,8 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ } } impl CowAmmConstantProductFactoryInstance<&P, N> { - /// Clones the provider and returns a new instance with the cloned provider. + /// Clones the provider and returns a new instance with the cloned + /// provider. #[inline] pub fn with_cloned_provider(self) -> CowAmmConstantProductFactoryInstance { CowAmmConstantProductFactoryInstance { @@ -2960,35 +2902,37 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ } } /// Function calls. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > CowAmmConstantProductFactoryInstance { - /// Creates a new call builder using this contract instance's provider and address. + impl, N: alloy_contract::private::Network> + CowAmmConstantProductFactoryInstance + { + /// 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. + /// 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 [`ammDeterministicAddress`] function. + + ///Creates a new call builder for the [`ammDeterministicAddress`] + /// function. pub fn ammDeterministicAddress( &self, ammOwner: alloy_sol_types::private::Address, token0: alloy_sol_types::private::Address, token1: alloy_sol_types::private::Address, ) -> alloy_contract::SolCallBuilder<&P, ammDeterministicAddressCall, N> { - self.call_builder( - &ammDeterministicAddressCall { - ammOwner, - token0, - token1, - }, - ) + self.call_builder(&ammDeterministicAddressCall { + ammOwner, + token0, + token1, + }) } + ///Creates a new call builder for the [`create`] function. pub fn create( &self, @@ -3001,19 +2945,18 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ priceOracleData: alloy_sol_types::private::Bytes, appData: alloy_sol_types::private::FixedBytes<32>, ) -> alloy_contract::SolCallBuilder<&P, createCall, N> { - self.call_builder( - &createCall { - token0, - amount0, - token1, - amount1, - minTradedToken0, - priceOracle, - priceOracleData, - appData, - }, - ) + self.call_builder(&createCall { + token0, + amount0, + token1, + amount1, + minTradedToken0, + priceOracle, + priceOracleData, + appData, + }) } + ///Creates a new call builder for the [`deposit`] function. pub fn deposit( &self, @@ -3021,14 +2964,13 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ amount0: alloy_sol_types::private::primitives::aliases::U256, amount1: alloy_sol_types::private::primitives::aliases::U256, ) -> alloy_contract::SolCallBuilder<&P, depositCall, N> { - self.call_builder( - &depositCall { - amm, - amount0, - amount1, - }, - ) + self.call_builder(&depositCall { + amm, + amount0, + amount1, + }) } + ///Creates a new call builder for the [`owner`] function. pub fn owner( &self, @@ -3036,6 +2978,7 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ ) -> alloy_contract::SolCallBuilder<&P, ownerCall, N> { self.call_builder(&ownerCall(_0)) } + ///Creates a new call builder for the [`withdraw`] function. pub fn withdraw( &self, @@ -3043,43 +2986,44 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ amount0: alloy_sol_types::private::primitives::aliases::U256, amount1: alloy_sol_types::private::primitives::aliases::U256, ) -> alloy_contract::SolCallBuilder<&P, withdrawCall, N> { - self.call_builder( - &withdrawCall { - amm, - amount0, - amount1, - }, - ) + self.call_builder(&withdrawCall { + amm, + amount0, + amount1, + }) } } /// Event filters. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > CowAmmConstantProductFactoryInstance { - /// Creates a new event filter using this contract instance's provider and address. + impl, N: alloy_contract::private::Network> + CowAmmConstantProductFactoryInstance + { + /// 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. + /// 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 [`ConditionalOrderCreated`] event. + + ///Creates a new event filter for the [`ConditionalOrderCreated`] + /// event. pub fn ConditionalOrderCreated_filter( &self, ) -> alloy_contract::Event<&P, ConditionalOrderCreated, N> { self.event_filter::() } + ///Creates a new event filter for the [`Deployed`] event. pub fn Deployed_filter(&self) -> alloy_contract::Event<&P, Deployed, N> { self.event_filter::() } + ///Creates a new event filter for the [`TradingDisabled`] event. - pub fn TradingDisabled_filter( - &self, - ) -> alloy_contract::Event<&P, TradingDisabled, N> { + pub fn TradingDisabled_filter(&self) -> alloy_contract::Event<&P, TradingDisabled, N> { self.event_filter::() } } @@ -3088,37 +3032,25 @@ pub type Instance = CowAmmConstantProductFactory::CowAmmConstantProductFactoryIn ::alloy_provider::DynProvider, >; use { - std::{sync::LazyLock, collections::HashMap}, - anyhow::{Result, Context}, - alloy_primitives::{address, Address}, - alloy_provider::{Provider, DynProvider}, + alloy_primitives::{Address, address}, + alloy_provider::{DynProvider, Provider}, + anyhow::{Context, Result}, + std::{collections::HashMap, sync::LazyLock}, }; pub const fn deployment_info(chain_id: u64) -> Option<(Address, Option)> { match chain_id { - 1u64 => { - Some(( - ::alloy_primitives::address!( - "0x40664207e3375FB4b733d4743CE9b159331fd034" - ), - Some(19861952u64), - )) - } - 100u64 => { - Some(( - ::alloy_primitives::address!( - "0xdb1cba3a87f2db53b6e1e6af48e28ed877592ec0" - ), - Some(33874317u64), - )) - } - 11155111u64 => { - Some(( - ::alloy_primitives::address!( - "0xb808e8183e3a72d196457d127c7fd4befa0d7fd3" - ), - Some(5874562u64), - )) - } + 1u64 => Some(( + ::alloy_primitives::address!("0x40664207e3375FB4b733d4743CE9b159331fd034"), + Some(19861952u64), + )), + 100u64 => Some(( + ::alloy_primitives::address!("0xdb1cba3a87f2db53b6e1e6af48e28ed877592ec0"), + Some(33874317u64), + )), + 11155111u64 => Some(( + ::alloy_primitives::address!("0xb808e8183e3a72d196457d127c7fd4befa0d7fd3"), + Some(5874562u64), + )), _ => None, } } @@ -3135,9 +3067,7 @@ pub const fn deployment_block(chain_id: &u64) -> Option { } } impl Instance { - pub fn deployed( - provider: &DynProvider, - ) -> impl Future> + Send { + pub fn deployed(provider: &DynProvider) -> impl Future> + Send { async move { let chain_id = provider .get_chain_id() diff --git a/contracts/generated/contracts-generated/cowammfactorygetter/src/lib.rs b/contracts/generated/contracts-generated/cowammfactorygetter/src/lib.rs index 6b4291bc2b..c3dbb5b91f 100644 --- a/contracts/generated/contracts-generated/cowammfactorygetter/src/lib.rs +++ b/contracts/generated/contracts-generated/cowammfactorygetter/src/lib.rs @@ -1,4 +1,10 @@ -#![allow(unused_imports, unused_attributes, clippy::all, rustdoc::all, non_snake_case)] +#![allow( + unused_imports, + unused_attributes, + clippy::all, + rustdoc::all, + non_snake_case +)] //! Auto-generated contract bindings. Do not edit. /** @@ -35,18 +41,18 @@ interface CowAmmFactoryGetter { clippy::empty_structs_with_brackets )] pub mod CowAmmFactoryGetter { - use super::*; - use alloy_sol_types as alloy_sol_types; + use {super::*, alloy_sol_types}; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `FACTORY()` and selector `0x2dd31000`. -```solidity -function FACTORY() external view returns (address); -```*/ + ```solidity + function FACTORY() external view returns (address); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct FACTORYCall; #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`FACTORY()`](FACTORYCall) function. + ///Container type for the return parameters of the + /// [`FACTORY()`](FACTORYCall) function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct FACTORYReturn { @@ -60,7 +66,7 @@ function FACTORY() external view returns (address); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -69,9 +75,7 @@ function FACTORY() external view returns (address); type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -101,9 +105,7 @@ function FACTORY() external view returns (address); type UnderlyingRustTuple<'a> = (alloy_sol_types::private::Address,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -128,61 +130,55 @@ function FACTORY() external view returns (address); #[automatically_derived] impl alloy_sol_types::SolCall for FACTORYCall { type Parameters<'a> = (); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = alloy_sol_types::private::Address; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (alloy_sol_types::sol_data::Address,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "FACTORY()"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [45u8, 211u8, 16u8, 0u8]; + const SIGNATURE: &'static str = "FACTORY()"; + #[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, - ), - ) + (::tokenize(ret),) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) - .map(|r| { + as alloy_sol_types::SolType>::abi_decode_sequence(data).map( + |r| { let r: FACTORYReturn = 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: FACTORYReturn = r.into(); - r._0 - }) + 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: FACTORYReturn = r.into(); + r._0 + }) } } }; ///Container for all the [`CowAmmFactoryGetter`](self) function calls. #[derive(Clone)] - #[derive()] pub enum CowAmmFactoryGetterCalls { #[allow(missing_docs)] FACTORY(FACTORYCall), @@ -190,19 +186,18 @@ function FACTORY() external view returns (address); impl CowAmmFactoryGetterCalls { /// 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. + /// 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]] = &[[45u8, 211u8, 16u8, 0u8]]; - /// The names of the variants in the same order as `SELECTORS`. - pub const VARIANT_NAMES: &'static [&'static str] = &[ - ::core::stringify!(FACTORY), - ]; /// The signatures in the same order as `SELECTORS`. - pub const SIGNATURES: &'static [&'static str] = &[ - ::SIGNATURE, - ]; + pub const SIGNATURES: &'static [&'static str] = + &[::SIGNATURE]; + /// The names of the variants in the same order as `SELECTORS`. + pub const VARIANT_NAMES: &'static [&'static str] = &[::core::stringify!(FACTORY)]; + /// Returns the signature for the given selector, if known. #[inline] pub fn signature_by_selector( @@ -215,63 +210,59 @@ function FACTORY() external view returns (address); ::core::result::Result::Err(_) => ::core::option::Option::None, } } + /// Returns the enum variant name for the given selector, if known. #[inline] - pub fn name_by_selector( - selector: [u8; 4usize], - ) -> ::core::option::Option<&'static str> { + pub fn name_by_selector(selector: [u8; 4usize]) -> ::core::option::Option<&'static str> { let sig = Self::signature_by_selector(selector)?; sig.split_once('(').map(|(name, _)| name) } } #[automatically_derived] impl alloy_sol_types::SolInterface for CowAmmFactoryGetterCalls { - const NAME: &'static str = "CowAmmFactoryGetterCalls"; - const MIN_DATA_LENGTH: usize = 0usize; const COUNT: usize = 1usize; + const MIN_DATA_LENGTH: usize = 0usize; + const NAME: &'static str = "CowAmmFactoryGetterCalls"; + #[inline] fn selector(&self) -> [u8; 4] { match self { Self::FACTORY(_) => ::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 { + fn abi_decode_raw(selector: [u8; 4], data: &[u8]) -> alloy_sol_types::Result { static DECODE_SHIMS: &[fn( &[u8], - ) -> alloy_sol_types::Result] = &[ - { - fn FACTORY( - data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw(data) - .map(CowAmmFactoryGetterCalls::FACTORY) - } - FACTORY - }, - ]; + ) + -> alloy_sol_types::Result] = &[{ + fn FACTORY(data: &[u8]) -> alloy_sol_types::Result { + ::abi_decode_raw(data) + .map(CowAmmFactoryGetterCalls::FACTORY) + } + FACTORY + }]; let Ok(idx) = Self::SELECTORS.binary_search(&selector) else { - return Err( - alloy_sol_types::Error::unknown_selector( - ::NAME, - selector, - ), - ); + return Err(alloy_sol_types::Error::unknown_selector( + ::NAME, + selector, + )); }; DECODE_SHIMS[idx](data) } + #[inline] #[allow(non_snake_case)] fn abi_decode_raw_validate( @@ -280,29 +271,24 @@ function FACTORY() external view returns (address); ) -> alloy_sol_types::Result { static DECODE_VALIDATE_SHIMS: &[fn( &[u8], - ) -> alloy_sol_types::Result] = &[ - { - fn FACTORY( - data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) - .map(CowAmmFactoryGetterCalls::FACTORY) - } - FACTORY - }, - ]; + ) -> alloy_sol_types::Result< + CowAmmFactoryGetterCalls, + >] = &[{ + fn FACTORY(data: &[u8]) -> alloy_sol_types::Result { + ::abi_decode_raw_validate(data) + .map(CowAmmFactoryGetterCalls::FACTORY) + } + FACTORY + }]; let Ok(idx) = Self::SELECTORS.binary_search(&selector) else { - return Err( - alloy_sol_types::Error::unknown_selector( - ::NAME, - selector, - ), - ); + return Err(alloy_sol_types::Error::unknown_selector( + ::NAME, + selector, + )); }; DECODE_VALIDATE_SHIMS[idx](data) } + #[inline] fn abi_encoded_size(&self) -> usize { match self { @@ -311,6 +297,7 @@ function FACTORY() external view returns (address); } } } + #[inline] fn abi_encode_raw(&self, out: &mut alloy_sol_types::private::Vec) { match self { @@ -320,10 +307,10 @@ function FACTORY() external view returns (address); } } } - use alloy_contract as alloy_contract; + use alloy_contract; /**Creates a new wrapper around an on-chain [`CowAmmFactoryGetter`](self) contract instance. -See the [wrapper's documentation](`CowAmmFactoryGetterInstance`) for more details.*/ + See the [wrapper's documentation](`CowAmmFactoryGetterInstance`) for more details.*/ #[inline] pub const fn new< P: alloy_contract::private::Provider, @@ -336,15 +323,15 @@ See the [wrapper's documentation](`CowAmmFactoryGetterInstance`) for more detail } /**A [`CowAmmFactoryGetter`](self) instance. -Contains type-safe methods for interacting with an on-chain instance of the -[`CowAmmFactoryGetter`](self) contract located at a given `address`, using a given -provider `P`. + Contains type-safe methods for interacting with an on-chain instance of the + [`CowAmmFactoryGetter`](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. + 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.*/ + See the [module-level documentation](self) for all the available methods.*/ #[derive(Clone)] pub struct CowAmmFactoryGetterInstance { address: alloy_sol_types::private::Address, @@ -355,43 +342,45 @@ See the [module-level documentation](self) for all the available methods.*/ impl ::core::fmt::Debug for CowAmmFactoryGetterInstance { #[inline] fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { - f.debug_tuple("CowAmmFactoryGetterInstance").field(&self.address).finish() + f.debug_tuple("CowAmmFactoryGetterInstance") + .field(&self.address) + .finish() } } /// Instantiation and getters/setters. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > CowAmmFactoryGetterInstance { + impl, N: alloy_contract::private::Network> + CowAmmFactoryGetterInstance + { /**Creates a new wrapper around an on-chain [`CowAmmFactoryGetter`](self) contract instance. -See the [wrapper's documentation](`CowAmmFactoryGetterInstance`) for more details.*/ + See the [wrapper's documentation](`CowAmmFactoryGetterInstance`) for more details.*/ #[inline] - pub const fn new( - address: alloy_sol_types::private::Address, - __provider: P, - ) -> Self { + pub const fn new(address: alloy_sol_types::private::Address, __provider: P) -> Self { Self { address, provider: __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 { @@ -399,7 +388,8 @@ See the [wrapper's documentation](`CowAmmFactoryGetterInstance`) for more detail } } impl CowAmmFactoryGetterInstance<&P, N> { - /// Clones the provider and returns a new instance with the cloned provider. + /// Clones the provider and returns a new instance with the cloned + /// provider. #[inline] pub fn with_cloned_provider(self) -> CowAmmFactoryGetterInstance { CowAmmFactoryGetterInstance { @@ -410,34 +400,37 @@ See the [wrapper's documentation](`CowAmmFactoryGetterInstance`) for more detail } } /// Function calls. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > CowAmmFactoryGetterInstance { - /// Creates a new call builder using this contract instance's provider and address. + impl, N: alloy_contract::private::Network> + CowAmmFactoryGetterInstance + { + /// 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. + /// 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 [`FACTORY`] function. pub fn FACTORY(&self) -> alloy_contract::SolCallBuilder<&P, FACTORYCall, N> { self.call_builder(&FACTORYCall) } } /// Event filters. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > CowAmmFactoryGetterInstance { - /// Creates a new event filter using this contract instance's provider and address. + impl, N: alloy_contract::private::Network> + CowAmmFactoryGetterInstance + { + /// 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. + /// 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> { @@ -445,6 +438,4 @@ See the [wrapper's documentation](`CowAmmFactoryGetterInstance`) for more detail } } } -pub type Instance = CowAmmFactoryGetter::CowAmmFactoryGetterInstance< - ::alloy_provider::DynProvider, ->; +pub type Instance = CowAmmFactoryGetter::CowAmmFactoryGetterInstance<::alloy_provider::DynProvider>; diff --git a/contracts/generated/contracts-generated/cowammlegacyhelper/src/lib.rs b/contracts/generated/contracts-generated/cowammlegacyhelper/src/lib.rs index 9a846d70d1..e0d8676626 100644 --- a/contracts/generated/contracts-generated/cowammlegacyhelper/src/lib.rs +++ b/contracts/generated/contracts-generated/cowammlegacyhelper/src/lib.rs @@ -1,4 +1,10 @@ -#![allow(unused_imports, unused_attributes, clippy::all, rustdoc::all, non_snake_case)] +#![allow( + unused_imports, + unused_attributes, + clippy::all, + rustdoc::all, + non_snake_case +)] //! Auto-generated contract bindings. Do not edit. ///Module containing a contract's types and functions. /** @@ -16,12 +22,11 @@ library GPv2Interaction { clippy::empty_structs_with_brackets )] pub mod GPv2Interaction { - use super::*; - use alloy_sol_types as alloy_sol_types; + use {super::*, alloy_sol_types}; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**```solidity -struct Data { address target; uint256 value; bytes callData; } -```*/ + struct Data { address target; uint256 value; bytes callData; } + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct Data { @@ -39,7 +44,7 @@ struct Data { address target; uint256 value; bytes callData; } clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[doc(hidden)] #[allow(dead_code)] type UnderlyingSolTuple<'a> = ( @@ -55,9 +60,7 @@ struct Data { address target; uint256 value; bytes callData; } ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -94,99 +97,96 @@ struct Data { address target; uint256 value; bytes callData; } ::tokenize( &self.target, ), - as alloy_sol_types::SolType>::tokenize(&self.value), + as alloy_sol_types::SolType>::tokenize( + &self.value, + ), ::tokenize( &self.callData, ), ) } + #[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) + 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) + 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) + 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 Data { type RustType = Self; - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + + const ENCODED_SIZE: Option = + as alloy_sol_types::SolType>::ENCODED_SIZE; + const PACKED_ENCODED_SIZE: Option = + as alloy_sol_types::SolType>::PACKED_ENCODED_SIZE; 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); + let tuple = as alloy_sol_types::SolType>::detokenize(token); >>::from(tuple) } } #[automatically_derived] impl alloy_sol_types::SolStruct for Data { const NAME: &'static str = "Data"; + #[inline] fn eip712_root_type() -> alloy_sol_types::private::Cow<'static, str> { alloy_sol_types::private::Cow::Borrowed( "Data(address target,uint256 value,bytes callData)", ) } + #[inline] - fn eip712_components() -> alloy_sol_types::private::Vec< - alloy_sol_types::private::Cow<'static, str>, - > { + fn eip712_components() + -> alloy_sol_types::private::Vec> + { 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 { [ @@ -221,14 +221,13 @@ struct Data { address target; uint256 value; bytes callData; } &rust.callData, ) } + #[inline] fn encode_topic_preimage( rust: &Self::RustType, out: &mut alloy_sol_types::private::Vec, ) { - out.reserve( - ::topic_preimage_length(rust), - ); + out.reserve(::topic_preimage_length(rust)); ::encode_topic_preimage( &rust.target, out, @@ -244,25 +243,19 @@ struct Data { address target; uint256 value; bytes callData; } out, ); } + #[inline] - fn encode_topic( - rust: &Self::RustType, - ) -> alloy_sol_types::abi::token::WordToken { + 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), - ) + ::encode_topic_preimage(rust, &mut out); + alloy_sol_types::abi::token::WordToken(alloy_sol_types::private::keccak256(out)) } } }; - use alloy_contract as alloy_contract; + use alloy_contract; /**Creates a new wrapper around an on-chain [`GPv2Interaction`](self) contract instance. -See the [wrapper's documentation](`GPv2InteractionInstance`) for more details.*/ + See the [wrapper's documentation](`GPv2InteractionInstance`) for more details.*/ #[inline] pub const fn new< P: alloy_contract::private::Provider, @@ -275,15 +268,15 @@ See the [wrapper's documentation](`GPv2InteractionInstance`) for more details.*/ } /**A [`GPv2Interaction`](self) instance. -Contains type-safe methods for interacting with an on-chain instance of the -[`GPv2Interaction`](self) contract located at a given `address`, using a given -provider `P`. + Contains type-safe methods for interacting with an on-chain instance of the + [`GPv2Interaction`](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. + 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.*/ + See the [module-level documentation](self) for all the available methods.*/ #[derive(Clone)] pub struct GPv2InteractionInstance { address: alloy_sol_types::private::Address, @@ -294,43 +287,45 @@ See the [module-level documentation](self) for all the available methods.*/ impl ::core::fmt::Debug for GPv2InteractionInstance { #[inline] fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { - f.debug_tuple("GPv2InteractionInstance").field(&self.address).finish() + f.debug_tuple("GPv2InteractionInstance") + .field(&self.address) + .finish() } } /// Instantiation and getters/setters. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > GPv2InteractionInstance { + impl, N: alloy_contract::private::Network> + GPv2InteractionInstance + { /**Creates a new wrapper around an on-chain [`GPv2Interaction`](self) contract instance. -See the [wrapper's documentation](`GPv2InteractionInstance`) for more details.*/ + See the [wrapper's documentation](`GPv2InteractionInstance`) for more details.*/ #[inline] - pub const fn new( - address: alloy_sol_types::private::Address, - __provider: P, - ) -> Self { + pub const fn new(address: alloy_sol_types::private::Address, __provider: P) -> Self { Self { address, provider: __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 { @@ -338,7 +333,8 @@ See the [wrapper's documentation](`GPv2InteractionInstance`) for more details.*/ } } impl GPv2InteractionInstance<&P, N> { - /// Clones the provider and returns a new instance with the cloned provider. + /// Clones the provider and returns a new instance with the cloned + /// provider. #[inline] pub fn with_cloned_provider(self) -> GPv2InteractionInstance { GPv2InteractionInstance { @@ -349,14 +345,15 @@ See the [wrapper's documentation](`GPv2InteractionInstance`) for more details.*/ } } /// Function calls. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > GPv2InteractionInstance { - /// Creates a new call builder using this contract instance's provider and address. + impl, N: alloy_contract::private::Network> + GPv2InteractionInstance + { + /// 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. + /// 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, @@ -365,14 +362,15 @@ See the [wrapper's documentation](`GPv2InteractionInstance`) for more details.*/ } } /// Event filters. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > GPv2InteractionInstance { - /// Creates a new event filter using this contract instance's provider and address. + impl, N: alloy_contract::private::Network> + GPv2InteractionInstance + { + /// 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. + /// 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> { @@ -396,12 +394,11 @@ library GPv2Order { clippy::empty_structs_with_brackets )] pub mod GPv2Order { - use super::*; - use alloy_sol_types as alloy_sol_types; + use {super::*, alloy_sol_types}; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**```solidity -struct Data { address sellToken; address buyToken; address receiver; uint256 sellAmount; uint256 buyAmount; uint32 validTo; bytes32 appData; uint256 feeAmount; bytes32 kind; bool partiallyFillable; bytes32 sellTokenBalance; bytes32 buyTokenBalance; } -```*/ + struct Data { address sellToken; address buyToken; address receiver; uint256 sellAmount; uint256 buyAmount; uint32 validTo; bytes32 appData; uint256 feeAmount; bytes32 kind; bool partiallyFillable; bytes32 sellTokenBalance; bytes32 buyTokenBalance; } + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct Data { @@ -437,7 +434,7 @@ struct Data { address sellToken; address buyToken; address receiver; uint256 sel clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[doc(hidden)] #[allow(dead_code)] type UnderlyingSolTuple<'a> = ( @@ -471,9 +468,7 @@ struct Data { address sellToken; address buyToken; address receiver; uint256 sel ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -567,91 +562,91 @@ struct Data { address sellToken; address buyToken; address receiver; uint256 sel > as alloy_sol_types::SolType>::tokenize(&self.buyTokenBalance), ) } + #[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) + 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) + 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) + 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 Data { type RustType = Self; - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + + const ENCODED_SIZE: Option = + as alloy_sol_types::SolType>::ENCODED_SIZE; + const PACKED_ENCODED_SIZE: Option = + as alloy_sol_types::SolType>::PACKED_ENCODED_SIZE; 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); + let tuple = as alloy_sol_types::SolType>::detokenize(token); >>::from(tuple) } } #[automatically_derived] impl alloy_sol_types::SolStruct for Data { const NAME: &'static str = "Data"; + #[inline] fn eip712_root_type() -> alloy_sol_types::private::Cow<'static, str> { alloy_sol_types::private::Cow::Borrowed( - "Data(address sellToken,address buyToken,address receiver,uint256 sellAmount,uint256 buyAmount,uint32 validTo,bytes32 appData,uint256 feeAmount,bytes32 kind,bool partiallyFillable,bytes32 sellTokenBalance,bytes32 buyTokenBalance)", + "Data(address sellToken,address buyToken,address receiver,uint256 \ + sellAmount,uint256 buyAmount,uint32 validTo,bytes32 appData,uint256 \ + feeAmount,bytes32 kind,bool partiallyFillable,bytes32 \ + sellTokenBalance,bytes32 buyTokenBalance)", ) } + #[inline] - fn eip712_components() -> alloy_sol_types::private::Vec< - alloy_sol_types::private::Cow<'static, str>, - > { + fn eip712_components() + -> alloy_sol_types::private::Vec> + { 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 { [ @@ -767,14 +762,13 @@ struct Data { address sellToken; address buyToken; address receiver; uint256 sel &rust.buyTokenBalance, ) } + #[inline] fn encode_topic_preimage( rust: &Self::RustType, out: &mut alloy_sol_types::private::Vec, ) { - out.reserve( - ::topic_preimage_length(rust), - ); + out.reserve(::topic_preimage_length(rust)); ::encode_topic_preimage( &rust.sellToken, out, @@ -840,25 +834,19 @@ struct Data { address sellToken; address buyToken; address receiver; uint256 sel out, ); } + #[inline] - fn encode_topic( - rust: &Self::RustType, - ) -> alloy_sol_types::abi::token::WordToken { + 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), - ) + ::encode_topic_preimage(rust, &mut out); + alloy_sol_types::abi::token::WordToken(alloy_sol_types::private::keccak256(out)) } } }; - use alloy_contract as alloy_contract; + use alloy_contract; /**Creates a new wrapper around an on-chain [`GPv2Order`](self) contract instance. -See the [wrapper's documentation](`GPv2OrderInstance`) for more details.*/ + See the [wrapper's documentation](`GPv2OrderInstance`) for more details.*/ #[inline] pub const fn new< P: alloy_contract::private::Provider, @@ -871,15 +859,15 @@ See the [wrapper's documentation](`GPv2OrderInstance`) for more details.*/ } /**A [`GPv2Order`](self) instance. -Contains type-safe methods for interacting with an on-chain instance of the -[`GPv2Order`](self) contract located at a given `address`, using a given -provider `P`. + Contains type-safe methods for interacting with an on-chain instance of the + [`GPv2Order`](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. + 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.*/ + See the [module-level documentation](self) for all the available methods.*/ #[derive(Clone)] pub struct GPv2OrderInstance { address: alloy_sol_types::private::Address, @@ -890,43 +878,45 @@ See the [module-level documentation](self) for all the available methods.*/ impl ::core::fmt::Debug for GPv2OrderInstance { #[inline] fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { - f.debug_tuple("GPv2OrderInstance").field(&self.address).finish() + f.debug_tuple("GPv2OrderInstance") + .field(&self.address) + .finish() } } /// Instantiation and getters/setters. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > GPv2OrderInstance { + impl, N: alloy_contract::private::Network> + GPv2OrderInstance + { /**Creates a new wrapper around an on-chain [`GPv2Order`](self) contract instance. -See the [wrapper's documentation](`GPv2OrderInstance`) for more details.*/ + See the [wrapper's documentation](`GPv2OrderInstance`) for more details.*/ #[inline] - pub const fn new( - address: alloy_sol_types::private::Address, - __provider: P, - ) -> Self { + pub const fn new(address: alloy_sol_types::private::Address, __provider: P) -> Self { Self { address, provider: __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 { @@ -934,7 +924,8 @@ See the [wrapper's documentation](`GPv2OrderInstance`) for more details.*/ } } impl GPv2OrderInstance<&P, N> { - /// Clones the provider and returns a new instance with the cloned provider. + /// Clones the provider and returns a new instance with the cloned + /// provider. #[inline] pub fn with_cloned_provider(self) -> GPv2OrderInstance { GPv2OrderInstance { @@ -945,14 +936,15 @@ See the [wrapper's documentation](`GPv2OrderInstance`) for more details.*/ } } /// Function calls. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > GPv2OrderInstance { - /// Creates a new call builder using this contract instance's provider and address. + impl, N: alloy_contract::private::Network> + GPv2OrderInstance + { + /// 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. + /// 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, @@ -961,14 +953,15 @@ See the [wrapper's documentation](`GPv2OrderInstance`) for more details.*/ } } /// Event filters. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > GPv2OrderInstance { - /// Creates a new event filter using this contract instance's provider and address. + impl, N: alloy_contract::private::Network> + GPv2OrderInstance + { + /// 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. + /// 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> { @@ -1251,8 +1244,7 @@ interface CowAmmLegacyHelper { clippy::empty_structs_with_brackets )] pub mod CowAmmLegacyHelper { - use super::*; - use alloy_sol_types as alloy_sol_types; + use {super::*, alloy_sol_types}; /// The creation / init bytecode of the contract. /// /// ```text @@ -1275,9 +1267,9 @@ pub mod CowAmmLegacyHelper { ); #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Custom error with signature `InvalidArrayLength()` and selector `0x9d89020a`. -```solidity -error InvalidArrayLength(); -```*/ + ```solidity + error InvalidArrayLength(); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct InvalidArrayLength; @@ -1288,7 +1280,7 @@ error InvalidArrayLength(); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[doc(hidden)] #[allow(dead_code)] type UnderlyingSolTuple<'a> = (); @@ -1296,9 +1288,7 @@ error InvalidArrayLength(); type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1322,35 +1312,37 @@ error InvalidArrayLength(); #[automatically_derived] impl alloy_sol_types::SolError for InvalidArrayLength { type Parameters<'a> = UnderlyingSolTuple<'a>; - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "InvalidArrayLength()"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [157u8, 137u8, 2u8, 10u8]; + const SIGNATURE: &'static str = "InvalidArrayLength()"; + #[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) + as alloy_sol_types::SolType>::abi_decode_sequence_validate( + data, + ) + .map(Self::new) } } }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Custom error with signature `MathOverflowedMulDiv()` and selector `0x227bc153`. -```solidity -error MathOverflowedMulDiv(); -```*/ + ```solidity + error MathOverflowedMulDiv(); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct MathOverflowedMulDiv; @@ -1361,7 +1353,7 @@ error MathOverflowedMulDiv(); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[doc(hidden)] #[allow(dead_code)] type UnderlyingSolTuple<'a> = (); @@ -1369,9 +1361,7 @@ error MathOverflowedMulDiv(); type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1395,35 +1385,37 @@ error MathOverflowedMulDiv(); #[automatically_derived] impl alloy_sol_types::SolError for MathOverflowedMulDiv { type Parameters<'a> = UnderlyingSolTuple<'a>; - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "MathOverflowedMulDiv()"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [34u8, 123u8, 193u8, 83u8]; + const SIGNATURE: &'static str = "MathOverflowedMulDiv()"; + #[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) + as alloy_sol_types::SolType>::abi_decode_sequence_validate( + data, + ) + .map(Self::new) } } }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Custom error with signature `NoOrder()` and selector `0x19aad573`. -```solidity -error NoOrder(); -```*/ + ```solidity + error NoOrder(); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct NoOrder; @@ -1434,7 +1426,7 @@ error NoOrder(); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[doc(hidden)] #[allow(dead_code)] type UnderlyingSolTuple<'a> = (); @@ -1442,9 +1434,7 @@ error NoOrder(); type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1468,35 +1458,37 @@ error NoOrder(); #[automatically_derived] impl alloy_sol_types::SolError for NoOrder { type Parameters<'a> = UnderlyingSolTuple<'a>; - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "NoOrder()"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [25u8, 170u8, 213u8, 115u8]; + const SIGNATURE: &'static str = "NoOrder()"; + #[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) + as alloy_sol_types::SolType>::abi_decode_sequence_validate( + data, + ) + .map(Self::new) } } }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Custom error with signature `PoolDoesNotExist()` and selector `0x9c8787c0`. -```solidity -error PoolDoesNotExist(); -```*/ + ```solidity + error PoolDoesNotExist(); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct PoolDoesNotExist; @@ -1507,7 +1499,7 @@ error PoolDoesNotExist(); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[doc(hidden)] #[allow(dead_code)] type UnderlyingSolTuple<'a> = (); @@ -1515,9 +1507,7 @@ error PoolDoesNotExist(); type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1541,35 +1531,37 @@ error PoolDoesNotExist(); #[automatically_derived] impl alloy_sol_types::SolError for PoolDoesNotExist { type Parameters<'a> = UnderlyingSolTuple<'a>; - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "PoolDoesNotExist()"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [156u8, 135u8, 135u8, 192u8]; + const SIGNATURE: &'static str = "PoolDoesNotExist()"; + #[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) + as alloy_sol_types::SolType>::abi_decode_sequence_validate( + data, + ) + .map(Self::new) } } }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Custom error with signature `PoolIsClosed()` and selector `0xefc869b4`. -```solidity -error PoolIsClosed(); -```*/ + ```solidity + error PoolIsClosed(); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct PoolIsClosed; @@ -1580,7 +1572,7 @@ error PoolIsClosed(); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[doc(hidden)] #[allow(dead_code)] type UnderlyingSolTuple<'a> = (); @@ -1588,9 +1580,7 @@ error PoolIsClosed(); type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1614,35 +1604,37 @@ error PoolIsClosed(); #[automatically_derived] impl alloy_sol_types::SolError for PoolIsClosed { type Parameters<'a> = UnderlyingSolTuple<'a>; - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "PoolIsClosed()"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [239u8, 200u8, 105u8, 180u8]; + const SIGNATURE: &'static str = "PoolIsClosed()"; + #[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) + as alloy_sol_types::SolType>::abi_decode_sequence_validate( + data, + ) + .map(Self::new) } } }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Custom error with signature `PoolIsPaused()` and selector `0x21081abf`. -```solidity -error PoolIsPaused(); -```*/ + ```solidity + error PoolIsPaused(); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct PoolIsPaused; @@ -1653,7 +1645,7 @@ error PoolIsPaused(); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[doc(hidden)] #[allow(dead_code)] type UnderlyingSolTuple<'a> = (); @@ -1661,9 +1653,7 @@ error PoolIsPaused(); type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1687,35 +1677,37 @@ error PoolIsPaused(); #[automatically_derived] impl alloy_sol_types::SolError for PoolIsPaused { type Parameters<'a> = UnderlyingSolTuple<'a>; - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "PoolIsPaused()"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [33u8, 8u8, 26u8, 191u8]; + const SIGNATURE: &'static str = "PoolIsPaused()"; + #[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) + as alloy_sol_types::SolType>::abi_decode_sequence_validate( + data, + ) + .map(Self::new) } } }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Event with signature `COWAMMPoolCreated(address)` and selector `0x0d03834d0d86c7f57e877af40e26f176dc31bd637535d4ba153d1ac9de88a7ea`. -```solidity -event COWAMMPoolCreated(address indexed amm); -```*/ + ```solidity + event COWAMMPoolCreated(address indexed amm); + ```*/ #[allow( non_camel_case_types, non_snake_case, @@ -1734,24 +1726,25 @@ event COWAMMPoolCreated(address indexed amm); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[automatically_derived] impl alloy_sol_types::SolEvent for COWAMMPoolCreated { + type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; 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::Address, ); - const SIGNATURE: &'static str = "COWAMMPoolCreated(address)"; - const SIGNATURE_HASH: alloy_sol_types::private::B256 = alloy_sol_types::private::B256::new([ - 13u8, 3u8, 131u8, 77u8, 13u8, 134u8, 199u8, 245u8, 126u8, 135u8, 122u8, - 244u8, 14u8, 38u8, 241u8, 118u8, 220u8, 49u8, 189u8, 99u8, 117u8, 53u8, - 212u8, 186u8, 21u8, 61u8, 26u8, 201u8, 222u8, 136u8, 167u8, 234u8, - ]); + const ANONYMOUS: bool = false; + const SIGNATURE: &'static str = "COWAMMPoolCreated(address)"; + const SIGNATURE_HASH: alloy_sol_types::private::B256 = + alloy_sol_types::private::B256::new([ + 13u8, 3u8, 131u8, 77u8, 13u8, 134u8, 199u8, 245u8, 126u8, 135u8, 122u8, 244u8, + 14u8, 38u8, 241u8, 118u8, 220u8, 49u8, 189u8, 99u8, 117u8, 53u8, 212u8, 186u8, + 21u8, 61u8, 26u8, 201u8, 222u8, 136u8, 167u8, 234u8, + ]); + #[allow(unused_variables)] #[inline] fn new( @@ -1760,29 +1753,31 @@ event COWAMMPoolCreated(address indexed amm); ) -> Self { Self { amm: topics.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, - ), - ); + 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.amm.clone()) } + #[inline] fn encode_topics_raw( &self, @@ -1791,9 +1786,7 @@ event COWAMMPoolCreated(address indexed amm); if out.len() < ::COUNT { return Err(alloy_sol_types::Error::Overrun); } - out[0usize] = alloy_sol_types::abi::token::WordToken( - Self::SIGNATURE_HASH, - ); + out[0usize] = alloy_sol_types::abi::token::WordToken(Self::SIGNATURE_HASH); out[1usize] = ::encode_topic( &self.amm, ); @@ -1805,6 +1798,7 @@ event COWAMMPoolCreated(address indexed amm); 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) } @@ -1818,14 +1812,14 @@ event COWAMMPoolCreated(address indexed amm); } }; /**Constructor`. -```solidity -constructor(); -```*/ + ```solidity + constructor(); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct constructorCall {} const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -1834,9 +1828,7 @@ constructor(); type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1861,15 +1853,15 @@ constructor(); #[automatically_derived] impl alloy_sol_types::SolConstructor for constructorCall { type Parameters<'a> = (); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + 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<'_> { () @@ -1878,14 +1870,15 @@ constructor(); }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `factory()` and selector `0xc45a0155`. -```solidity -function factory() external view returns (address); -```*/ + ```solidity + function factory() external view returns (address); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct factoryCall; #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`factory()`](factoryCall) function. + ///Container type for the return parameters of the + /// [`factory()`](factoryCall) function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct factoryReturn { @@ -1899,7 +1892,7 @@ function factory() external view returns (address); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -1908,9 +1901,7 @@ function factory() external view returns (address); type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1940,9 +1931,7 @@ function factory() external view returns (address); type UnderlyingRustTuple<'a> = (alloy_sol_types::private::Address,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1967,75 +1956,70 @@ function factory() external view returns (address); #[automatically_derived] impl alloy_sol_types::SolCall for factoryCall { type Parameters<'a> = (); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = alloy_sol_types::private::Address; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (alloy_sol_types::sol_data::Address,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "factory()"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [196u8, 90u8, 1u8, 85u8]; + const SIGNATURE: &'static str = "factory()"; + #[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, - ), - ) + (::tokenize(ret),) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) - .map(|r| { + as alloy_sol_types::SolType>::abi_decode_sequence(data).map( + |r| { let r: factoryReturn = 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: factoryReturn = r.into(); - r._0 - }) + 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: factoryReturn = r.into(); + r._0 + }) } } }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `order(address,uint256[])` and selector `0x27242c9b`. -```solidity -function order(address pool, uint256[] memory prices) external view returns (GPv2Order.Data memory _order, GPv2Interaction.Data[] memory preInteractions, GPv2Interaction.Data[] memory postInteractions, bytes memory sig); -```*/ + ```solidity + function order(address pool, uint256[] memory prices) external view returns (GPv2Order.Data memory _order, GPv2Interaction.Data[] memory preInteractions, GPv2Interaction.Data[] memory postInteractions, bytes memory sig); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct orderCall { #[allow(missing_docs)] pub pool: alloy_sol_types::private::Address, #[allow(missing_docs)] - pub prices: alloy_sol_types::private::Vec< - alloy_sol_types::private::primitives::aliases::U256, - >, + pub prices: + alloy_sol_types::private::Vec, } #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`order(address,uint256[])`](orderCall) function. + ///Container type for the return parameters of the + /// [`order(address,uint256[])`](orderCall) function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct orderReturn { @@ -2059,7 +2043,7 @@ function order(address pool, uint256[] memory prices) external view returns (GPv clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -2070,15 +2054,11 @@ function order(address pool, uint256[] memory prices) external view returns (GPv #[doc(hidden)] type UnderlyingRustTuple<'a> = ( alloy_sol_types::private::Address, - alloy_sol_types::private::Vec< - alloy_sol_types::private::primitives::aliases::U256, - >, + alloy_sol_types::private::Vec, ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -2125,9 +2105,7 @@ function order(address pool, uint256[] memory prices) external view returns (GPv ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -2160,9 +2138,7 @@ function order(address pool, uint256[] memory prices) external view returns (GPv } } impl orderReturn { - fn _tokenize( - &self, - ) -> ::ReturnToken<'_> { + fn _tokenize(&self) -> ::ReturnToken<'_> { ( ::tokenize( &self._order, @@ -2185,27 +2161,26 @@ function order(address pool, uint256[] memory prices) external view returns (GPv alloy_sol_types::sol_data::Address, alloy_sol_types::sol_data::Array>, ); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = orderReturn; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = ( GPv2Order::Data, alloy_sol_types::sol_data::Array, alloy_sol_types::sol_data::Array, alloy_sol_types::sol_data::Bytes, ); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "order(address,uint256[])"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [39u8, 36u8, 44u8, 155u8]; + const SIGNATURE: &'static str = "order(address,uint256[])"; + #[inline] fn new<'a>( tuple: as alloy_sol_types::SolType>::RustType, ) -> Self { tuple.into() } + #[inline] fn tokenize(&self) -> Self::Token<'_> { ( @@ -2217,33 +2192,32 @@ function order(address pool, uint256[] memory prices) external view returns (GPv > as alloy_sol_types::SolType>::tokenize(&self.prices), ) } + #[inline] fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { orderReturn::_tokenize(ret) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) + 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) + 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(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `tokens(address)` and selector `0xe4860339`. -```solidity -function tokens(address pool) external view returns (address[] memory _tokens); -```*/ + ```solidity + function tokens(address pool) external view returns (address[] memory _tokens); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct tokensCall { @@ -2251,7 +2225,8 @@ function tokens(address pool) external view returns (address[] memory _tokens); pub pool: alloy_sol_types::private::Address, } #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`tokens(address)`](tokensCall) function. + ///Container type for the return parameters of the + /// [`tokens(address)`](tokensCall) function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct tokensReturn { @@ -2265,7 +2240,7 @@ function tokens(address pool) external view returns (address[] memory _tokens); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -2274,9 +2249,7 @@ function tokens(address pool) external view returns (address[] memory _tokens); type UnderlyingRustTuple<'a> = (alloy_sol_types::private::Address,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -2301,18 +2274,14 @@ function tokens(address pool) external view returns (address[] memory _tokens); { #[doc(hidden)] #[allow(dead_code)] - type UnderlyingSolTuple<'a> = ( - alloy_sol_types::sol_data::Array, - ); + type UnderlyingSolTuple<'a> = + (alloy_sol_types::sol_data::Array,); #[doc(hidden)] - type UnderlyingRustTuple<'a> = ( - alloy_sol_types::private::Vec, - ); + type UnderlyingRustTuple<'a> = + (alloy_sol_types::private::Vec,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -2337,26 +2306,22 @@ function tokens(address pool) external view returns (address[] memory _tokens); #[automatically_derived] impl alloy_sol_types::SolCall for tokensCall { 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::Vec< - alloy_sol_types::private::Address, - >; - type ReturnTuple<'a> = ( - alloy_sol_types::sol_data::Array, - ); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "tokens(address)"; + type Return = alloy_sol_types::private::Vec; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + type ReturnTuple<'a> = + (alloy_sol_types::sol_data::Array,); + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [228u8, 134u8, 3u8, 57u8]; + const SIGNATURE: &'static str = "tokens(address)"; + #[inline] fn new<'a>( tuple: as alloy_sol_types::SolType>::RustType, ) -> Self { tuple.into() } + #[inline] fn tokenize(&self) -> Self::Token<'_> { ( @@ -2365,41 +2330,38 @@ function tokens(address pool) external view returns (address[] memory _tokens); ), ) } + #[inline] fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { - ( - as alloy_sol_types::SolType>::tokenize(ret), - ) + ( 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| { + as alloy_sol_types::SolType>::abi_decode_sequence(data).map( + |r| { let r: tokensReturn = r.into(); r._tokens - }) + }, + ) } + #[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: tokensReturn = r.into(); - r._tokens - }) + 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: tokensReturn = r.into(); + r._tokens + }) } } }; ///Container for all the [`CowAmmLegacyHelper`](self) function calls. #[derive(Clone)] - #[derive()] pub enum CowAmmLegacyHelperCalls { #[allow(missing_docs)] factory(factoryCall), @@ -2411,8 +2373,9 @@ function tokens(address pool) external view returns (address[] memory _tokens); impl CowAmmLegacyHelperCalls { /// 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. + /// 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]] = &[ @@ -2420,18 +2383,19 @@ function tokens(address pool) external view returns (address[] memory _tokens); [196u8, 90u8, 1u8, 85u8], [228u8, 134u8, 3u8, 57u8], ]; - /// The names of the variants in the same order as `SELECTORS`. - pub const VARIANT_NAMES: &'static [&'static str] = &[ - ::core::stringify!(order), - ::core::stringify!(factory), - ::core::stringify!(tokens), - ]; /// The signatures in the same order as `SELECTORS`. pub const SIGNATURES: &'static [&'static str] = &[ ::SIGNATURE, ::SIGNATURE, ::SIGNATURE, ]; + /// The names of the variants in the same order as `SELECTORS`. + pub const VARIANT_NAMES: &'static [&'static str] = &[ + ::core::stringify!(order), + ::core::stringify!(factory), + ::core::stringify!(tokens), + ]; + /// Returns the signature for the given selector, if known. #[inline] pub fn signature_by_selector( @@ -2444,20 +2408,20 @@ function tokens(address pool) external view returns (address[] memory _tokens); ::core::result::Result::Err(_) => ::core::option::Option::None, } } + /// Returns the enum variant name for the given selector, if known. #[inline] - pub fn name_by_selector( - selector: [u8; 4usize], - ) -> ::core::option::Option<&'static str> { + pub fn name_by_selector(selector: [u8; 4usize]) -> ::core::option::Option<&'static str> { let sig = Self::signature_by_selector(selector)?; sig.split_once('(').map(|(name, _)| name) } } #[automatically_derived] impl alloy_sol_types::SolInterface for CowAmmLegacyHelperCalls { - const NAME: &'static str = "CowAmmLegacyHelperCalls"; - const MIN_DATA_LENGTH: usize = 0usize; const COUNT: usize = 3usize; + const MIN_DATA_LENGTH: usize = 0usize; + const NAME: &'static str = "CowAmmLegacyHelperCalls"; + #[inline] fn selector(&self) -> [u8; 4] { match self { @@ -2466,45 +2430,40 @@ function tokens(address pool) external view returns (address[] memory _tokens); Self::tokens(_) => ::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 { + fn abi_decode_raw(selector: [u8; 4], data: &[u8]) -> alloy_sol_types::Result { static DECODE_SHIMS: &[fn( &[u8], - ) -> alloy_sol_types::Result] = &[ + ) + -> alloy_sol_types::Result] = &[ { - fn order( - data: &[u8], - ) -> alloy_sol_types::Result { + fn order(data: &[u8]) -> alloy_sol_types::Result { ::abi_decode_raw(data) .map(CowAmmLegacyHelperCalls::order) } order }, { - fn factory( - data: &[u8], - ) -> alloy_sol_types::Result { + fn factory(data: &[u8]) -> alloy_sol_types::Result { ::abi_decode_raw(data) .map(CowAmmLegacyHelperCalls::factory) } factory }, { - fn tokens( - data: &[u8], - ) -> alloy_sol_types::Result { + fn tokens(data: &[u8]) -> alloy_sol_types::Result { ::abi_decode_raw(data) .map(CowAmmLegacyHelperCalls::tokens) } @@ -2512,15 +2471,14 @@ function tokens(address pool) external view returns (address[] memory _tokens); }, ]; let Ok(idx) = Self::SELECTORS.binary_search(&selector) else { - return Err( - alloy_sol_types::Error::unknown_selector( - ::NAME, - selector, - ), - ); + return Err(alloy_sol_types::Error::unknown_selector( + ::NAME, + selector, + )); }; DECODE_SHIMS[idx](data) } + #[inline] #[allow(non_snake_case)] fn abi_decode_raw_validate( @@ -2529,51 +2487,40 @@ function tokens(address pool) external view returns (address[] memory _tokens); ) -> alloy_sol_types::Result { static DECODE_VALIDATE_SHIMS: &[fn( &[u8], - ) -> alloy_sol_types::Result] = &[ + ) -> alloy_sol_types::Result< + CowAmmLegacyHelperCalls, + >] = &[ { - fn order( - data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) + fn order(data: &[u8]) -> alloy_sol_types::Result { + ::abi_decode_raw_validate(data) .map(CowAmmLegacyHelperCalls::order) } order }, { - fn factory( - data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) + fn factory(data: &[u8]) -> alloy_sol_types::Result { + ::abi_decode_raw_validate(data) .map(CowAmmLegacyHelperCalls::factory) } factory }, { - fn tokens( - data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) + fn tokens(data: &[u8]) -> alloy_sol_types::Result { + ::abi_decode_raw_validate(data) .map(CowAmmLegacyHelperCalls::tokens) } tokens }, ]; let Ok(idx) = Self::SELECTORS.binary_search(&selector) else { - return Err( - alloy_sol_types::Error::unknown_selector( - ::NAME, - selector, - ), - ); + return Err(alloy_sol_types::Error::unknown_selector( + ::NAME, + selector, + )); }; DECODE_VALIDATE_SHIMS[idx](data) } + #[inline] fn abi_encoded_size(&self) -> usize { match self { @@ -2588,6 +2535,7 @@ function tokens(address pool) external view returns (address[] memory _tokens); } } } + #[inline] fn abi_encode_raw(&self, out: &mut alloy_sol_types::private::Vec) { match self { @@ -2604,8 +2552,7 @@ function tokens(address pool) external view returns (address[] memory _tokens); } } ///Container for all the [`CowAmmLegacyHelper`](self) custom errors. - #[derive(Clone)] - #[derive(Debug, PartialEq, Eq, Hash)] + #[derive(Clone, Debug, PartialEq, Eq, Hash)] pub enum CowAmmLegacyHelperErrors { #[allow(missing_docs)] InvalidArrayLength(InvalidArrayLength), @@ -2623,8 +2570,9 @@ function tokens(address pool) external view returns (address[] memory _tokens); impl CowAmmLegacyHelperErrors { /// 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. + /// 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]] = &[ @@ -2635,15 +2583,6 @@ function tokens(address pool) external view returns (address[] memory _tokens); [157u8, 137u8, 2u8, 10u8], [239u8, 200u8, 105u8, 180u8], ]; - /// The names of the variants in the same order as `SELECTORS`. - pub const VARIANT_NAMES: &'static [&'static str] = &[ - ::core::stringify!(NoOrder), - ::core::stringify!(PoolIsPaused), - ::core::stringify!(MathOverflowedMulDiv), - ::core::stringify!(PoolDoesNotExist), - ::core::stringify!(InvalidArrayLength), - ::core::stringify!(PoolIsClosed), - ]; /// The signatures in the same order as `SELECTORS`. pub const SIGNATURES: &'static [&'static str] = &[ ::SIGNATURE, @@ -2653,6 +2592,16 @@ function tokens(address pool) external view returns (address[] memory _tokens); ::SIGNATURE, ::SIGNATURE, ]; + /// The names of the variants in the same order as `SELECTORS`. + pub const VARIANT_NAMES: &'static [&'static str] = &[ + ::core::stringify!(NoOrder), + ::core::stringify!(PoolIsPaused), + ::core::stringify!(MathOverflowedMulDiv), + ::core::stringify!(PoolDoesNotExist), + ::core::stringify!(InvalidArrayLength), + ::core::stringify!(PoolIsClosed), + ]; + /// Returns the signature for the given selector, if known. #[inline] pub fn signature_by_selector( @@ -2665,20 +2614,20 @@ function tokens(address pool) external view returns (address[] memory _tokens); ::core::result::Result::Err(_) => ::core::option::Option::None, } } + /// Returns the enum variant name for the given selector, if known. #[inline] - pub fn name_by_selector( - selector: [u8; 4usize], - ) -> ::core::option::Option<&'static str> { + pub fn name_by_selector(selector: [u8; 4usize]) -> ::core::option::Option<&'static str> { let sig = Self::signature_by_selector(selector)?; sig.split_once('(').map(|(name, _)| name) } } #[automatically_derived] impl alloy_sol_types::SolInterface for CowAmmLegacyHelperErrors { - const NAME: &'static str = "CowAmmLegacyHelperErrors"; - const MIN_DATA_LENGTH: usize = 0usize; const COUNT: usize = 6usize; + const MIN_DATA_LENGTH: usize = 0usize; + const NAME: &'static str = "CowAmmLegacyHelperErrors"; + #[inline] fn selector(&self) -> [u8; 4] { match self { @@ -2692,35 +2641,30 @@ function tokens(address pool) external view returns (address[] memory _tokens); Self::PoolDoesNotExist(_) => { ::SELECTOR } - Self::PoolIsClosed(_) => { - ::SELECTOR - } - Self::PoolIsPaused(_) => { - ::SELECTOR - } + Self::PoolIsClosed(_) => ::SELECTOR, + Self::PoolIsPaused(_) => ::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 { + fn abi_decode_raw(selector: [u8; 4], data: &[u8]) -> alloy_sol_types::Result { static DECODE_SHIMS: &[fn( &[u8], - ) -> alloy_sol_types::Result] = &[ + ) + -> alloy_sol_types::Result] = &[ { - fn NoOrder( - data: &[u8], - ) -> alloy_sol_types::Result { + fn NoOrder(data: &[u8]) -> alloy_sol_types::Result { ::abi_decode_raw(data) .map(CowAmmLegacyHelperErrors::NoOrder) } @@ -2739,9 +2683,7 @@ function tokens(address pool) external view returns (address[] memory _tokens); fn MathOverflowedMulDiv( data: &[u8], ) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, - ) + ::abi_decode_raw(data) .map(CowAmmLegacyHelperErrors::MathOverflowedMulDiv) } MathOverflowedMulDiv @@ -2750,9 +2692,7 @@ function tokens(address pool) external view returns (address[] memory _tokens); fn PoolDoesNotExist( data: &[u8], ) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, - ) + ::abi_decode_raw(data) .map(CowAmmLegacyHelperErrors::PoolDoesNotExist) } PoolDoesNotExist @@ -2761,9 +2701,7 @@ function tokens(address pool) external view returns (address[] memory _tokens); fn InvalidArrayLength( data: &[u8], ) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, - ) + ::abi_decode_raw(data) .map(CowAmmLegacyHelperErrors::InvalidArrayLength) } InvalidArrayLength @@ -2779,15 +2717,14 @@ function tokens(address pool) external view returns (address[] memory _tokens); }, ]; let Ok(idx) = Self::SELECTORS.binary_search(&selector) else { - return Err( - alloy_sol_types::Error::unknown_selector( - ::NAME, - selector, - ), - ); + return Err(alloy_sol_types::Error::unknown_selector( + ::NAME, + selector, + )); }; DECODE_SHIMS[idx](data) } + #[inline] #[allow(non_snake_case)] fn abi_decode_raw_validate( @@ -2796,14 +2733,12 @@ function tokens(address pool) external view returns (address[] memory _tokens); ) -> alloy_sol_types::Result { static DECODE_VALIDATE_SHIMS: &[fn( &[u8], - ) -> alloy_sol_types::Result] = &[ + ) -> alloy_sol_types::Result< + CowAmmLegacyHelperErrors, + >] = &[ { - fn NoOrder( - data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) + fn NoOrder(data: &[u8]) -> alloy_sol_types::Result { + ::abi_decode_raw_validate(data) .map(CowAmmLegacyHelperErrors::NoOrder) } NoOrder @@ -2812,9 +2747,7 @@ function tokens(address pool) external view returns (address[] memory _tokens); fn PoolIsPaused( data: &[u8], ) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) + ::abi_decode_raw_validate(data) .map(CowAmmLegacyHelperErrors::PoolIsPaused) } PoolIsPaused @@ -2835,9 +2768,9 @@ function tokens(address pool) external view returns (address[] memory _tokens); data: &[u8], ) -> alloy_sol_types::Result { ::abi_decode_raw_validate( - data, - ) - .map(CowAmmLegacyHelperErrors::PoolDoesNotExist) + data, + ) + .map(CowAmmLegacyHelperErrors::PoolDoesNotExist) } PoolDoesNotExist }, @@ -2846,9 +2779,9 @@ function tokens(address pool) external view returns (address[] memory _tokens); data: &[u8], ) -> alloy_sol_types::Result { ::abi_decode_raw_validate( - data, - ) - .map(CowAmmLegacyHelperErrors::InvalidArrayLength) + data, + ) + .map(CowAmmLegacyHelperErrors::InvalidArrayLength) } InvalidArrayLength }, @@ -2856,44 +2789,35 @@ function tokens(address pool) external view returns (address[] memory _tokens); fn PoolIsClosed( data: &[u8], ) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) + ::abi_decode_raw_validate(data) .map(CowAmmLegacyHelperErrors::PoolIsClosed) } PoolIsClosed }, ]; let Ok(idx) = Self::SELECTORS.binary_search(&selector) else { - return Err( - alloy_sol_types::Error::unknown_selector( - ::NAME, - selector, - ), - ); + 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::InvalidArrayLength(inner) => { - ::abi_encoded_size( - inner, - ) + ::abi_encoded_size(inner) } Self::MathOverflowedMulDiv(inner) => { - ::abi_encoded_size( - inner, - ) + ::abi_encoded_size(inner) } Self::NoOrder(inner) => { ::abi_encoded_size(inner) } Self::PoolDoesNotExist(inner) => { - ::abi_encoded_size( - inner, - ) + ::abi_encoded_size(inner) } Self::PoolIsClosed(inner) => { ::abi_encoded_size(inner) @@ -2903,48 +2827,33 @@ function tokens(address pool) external view returns (address[] memory _tokens); } } } + #[inline] fn abi_encode_raw(&self, out: &mut alloy_sol_types::private::Vec) { match self { Self::InvalidArrayLength(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } Self::MathOverflowedMulDiv(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } Self::NoOrder(inner) => { ::abi_encode_raw(inner, out) } Self::PoolDoesNotExist(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } Self::PoolIsClosed(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } Self::PoolIsPaused(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } } } } ///Container for all the [`CowAmmLegacyHelper`](self) events. - #[derive(Clone)] - #[derive(Debug, PartialEq, Eq, Hash)] + #[derive(Clone, Debug, PartialEq, Eq, Hash)] pub enum CowAmmLegacyHelperEvents { #[allow(missing_docs)] COWAMMPoolCreated(COWAMMPoolCreated), @@ -2952,25 +2861,22 @@ function tokens(address pool) external view returns (address[] memory _tokens); impl CowAmmLegacyHelperEvents { /// 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. + /// 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]] = &[ - [ - 13u8, 3u8, 131u8, 77u8, 13u8, 134u8, 199u8, 245u8, 126u8, 135u8, 122u8, - 244u8, 14u8, 38u8, 241u8, 118u8, 220u8, 49u8, 189u8, 99u8, 117u8, 53u8, - 212u8, 186u8, 21u8, 61u8, 26u8, 201u8, 222u8, 136u8, 167u8, 234u8, - ], - ]; - /// The names of the variants in the same order as `SELECTORS`. - pub const VARIANT_NAMES: &'static [&'static str] = &[ - ::core::stringify!(COWAMMPoolCreated), - ]; + pub const SELECTORS: &'static [[u8; 32usize]] = &[[ + 13u8, 3u8, 131u8, 77u8, 13u8, 134u8, 199u8, 245u8, 126u8, 135u8, 122u8, 244u8, 14u8, + 38u8, 241u8, 118u8, 220u8, 49u8, 189u8, 99u8, 117u8, 53u8, 212u8, 186u8, 21u8, 61u8, + 26u8, 201u8, 222u8, 136u8, 167u8, 234u8, + ]]; /// The signatures in the same order as `SELECTORS`. - pub const SIGNATURES: &'static [&'static str] = &[ - ::SIGNATURE, - ]; + pub const SIGNATURES: &'static [&'static str] = + &[::SIGNATURE]; + /// The names of the variants in the same order as `SELECTORS`. + pub const VARIANT_NAMES: &'static [&'static str] = &[::core::stringify!(COWAMMPoolCreated)]; + /// Returns the signature for the given selector, if known. #[inline] pub fn signature_by_selector( @@ -2983,44 +2889,37 @@ function tokens(address pool) external view returns (address[] memory _tokens); ::core::result::Result::Err(_) => ::core::option::Option::None, } } + /// Returns the enum variant name for the given selector, if known. #[inline] - pub fn name_by_selector( - selector: [u8; 32usize], - ) -> ::core::option::Option<&'static str> { + pub fn name_by_selector(selector: [u8; 32usize]) -> ::core::option::Option<&'static str> { let sig = Self::signature_by_selector(selector)?; sig.split_once('(').map(|(name, _)| name) } } #[automatically_derived] impl alloy_sol_types::SolEventInterface for CowAmmLegacyHelperEvents { - const NAME: &'static str = "CowAmmLegacyHelperEvents"; const COUNT: usize = 1usize; + const NAME: &'static str = "CowAmmLegacyHelperEvents"; + 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, - ) + Some(::SIGNATURE_HASH) => { + ::decode_raw_log(topics, data) .map(Self::COWAMMPoolCreated) } - _ => { - 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(), - ), + _ => 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(), ), - }) - } + ), + }), } } } @@ -3033,6 +2932,7 @@ function tokens(address pool) external view returns (address[] memory _tokens); } } } + fn into_log_data(self) -> alloy_sol_types::private::LogData { match self { Self::COWAMMPoolCreated(inner) => { @@ -3041,10 +2941,10 @@ function tokens(address pool) external view returns (address[] memory _tokens); } } } - use alloy_contract as alloy_contract; + use alloy_contract; /**Creates a new wrapper around an on-chain [`CowAmmLegacyHelper`](self) contract instance. -See the [wrapper's documentation](`CowAmmLegacyHelperInstance`) for more details.*/ + See the [wrapper's documentation](`CowAmmLegacyHelperInstance`) for more details.*/ #[inline] pub const fn new< P: alloy_contract::private::Provider, @@ -3057,43 +2957,41 @@ See the [wrapper's documentation](`CowAmmLegacyHelperInstance`) for more details } /**Deploys this contract using the given `provider` and constructor arguments, if any. -Returns a new instance of the contract, if the deployment was successful. + 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.*/ + 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, - >( + pub fn deploy, N: alloy_contract::private::Network>( __provider: P, - ) -> impl ::core::future::Future< - Output = alloy_contract::Result>, - > { + ) -> impl ::core::future::Future>> + { CowAmmLegacyHelperInstance::::deploy(__provider) } /**Creates a `RawCallBuilder` for deploying this contract using the given `provider` -and constructor arguments, if any. + 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.*/ + 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) -> alloy_contract::RawCallBuilder { + >( + __provider: P, + ) -> alloy_contract::RawCallBuilder { CowAmmLegacyHelperInstance::::deploy_builder(__provider) } /**A [`CowAmmLegacyHelper`](self) instance. -Contains type-safe methods for interacting with an on-chain instance of the -[`CowAmmLegacyHelper`](self) contract located at a given `address`, using a given -provider `P`. + Contains type-safe methods for interacting with an on-chain instance of the + [`CowAmmLegacyHelper`](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. + 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.*/ + See the [module-level documentation](self) for all the available methods.*/ #[derive(Clone)] pub struct CowAmmLegacyHelperInstance { address: alloy_sol_types::private::Address, @@ -3104,33 +3002,32 @@ See the [module-level documentation](self) for all the available methods.*/ impl ::core::fmt::Debug for CowAmmLegacyHelperInstance { #[inline] fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { - f.debug_tuple("CowAmmLegacyHelperInstance").field(&self.address).finish() + f.debug_tuple("CowAmmLegacyHelperInstance") + .field(&self.address) + .finish() } } /// Instantiation and getters/setters. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > CowAmmLegacyHelperInstance { + impl, N: alloy_contract::private::Network> + CowAmmLegacyHelperInstance + { /**Creates a new wrapper around an on-chain [`CowAmmLegacyHelper`](self) contract instance. -See the [wrapper's documentation](`CowAmmLegacyHelperInstance`) for more details.*/ + See the [wrapper's documentation](`CowAmmLegacyHelperInstance`) for more details.*/ #[inline] - pub const fn new( - address: alloy_sol_types::private::Address, - __provider: P, - ) -> Self { + pub const fn new(address: alloy_sol_types::private::Address, __provider: P) -> Self { Self { address, provider: __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. + 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.*/ + For more fine-grained control over the deployment process, use [`deploy_builder`] instead.*/ #[inline] pub async fn deploy( __provider: P, @@ -3139,11 +3036,12 @@ For more fine-grained control over the deployment process, use [`deploy_builder` 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. + 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.*/ + 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( @@ -3151,21 +3049,25 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ ::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 { @@ -3173,7 +3075,8 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ } } impl CowAmmLegacyHelperInstance<&P, N> { - /// Clones the provider and returns a new instance with the cloned provider. + /// Clones the provider and returns a new instance with the cloned + /// provider. #[inline] pub fn with_cloned_provider(self) -> CowAmmLegacyHelperInstance { CowAmmLegacyHelperInstance { @@ -3184,24 +3087,27 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ } } /// Function calls. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > CowAmmLegacyHelperInstance { - /// Creates a new call builder using this contract instance's provider and address. + impl, N: alloy_contract::private::Network> + CowAmmLegacyHelperInstance + { + /// 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. + /// 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 [`factory`] function. pub fn factory(&self) -> alloy_contract::SolCallBuilder<&P, factoryCall, N> { self.call_builder(&factoryCall) } + ///Creates a new call builder for the [`order`] function. pub fn order( &self, @@ -3212,6 +3118,7 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ ) -> alloy_contract::SolCallBuilder<&P, orderCall, N> { self.call_builder(&orderCall { pool, prices }) } + ///Creates a new call builder for the [`tokens`] function. pub fn tokens( &self, @@ -3221,54 +3128,44 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ } } /// Event filters. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > CowAmmLegacyHelperInstance { - /// Creates a new event filter using this contract instance's provider and address. + impl, N: alloy_contract::private::Network> + CowAmmLegacyHelperInstance + { + /// 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. + /// 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 [`COWAMMPoolCreated`] event. - pub fn COWAMMPoolCreated_filter( - &self, - ) -> alloy_contract::Event<&P, COWAMMPoolCreated, N> { + pub fn COWAMMPoolCreated_filter(&self) -> alloy_contract::Event<&P, COWAMMPoolCreated, N> { self.event_filter::() } } } -pub type Instance = CowAmmLegacyHelper::CowAmmLegacyHelperInstance< - ::alloy_provider::DynProvider, ->; +pub type Instance = CowAmmLegacyHelper::CowAmmLegacyHelperInstance<::alloy_provider::DynProvider>; use { - std::{sync::LazyLock, collections::HashMap}, - anyhow::{Result, Context}, - alloy_primitives::{address, Address}, - alloy_provider::{Provider, DynProvider}, + alloy_primitives::{Address, address}, + alloy_provider::{DynProvider, Provider}, + anyhow::{Context, Result}, + std::{collections::HashMap, sync::LazyLock}, }; pub const fn deployment_info(chain_id: u64) -> Option<(Address, Option)> { match chain_id { - 1u64 => { - Some(( - ::alloy_primitives::address!( - "0x3705ceee5eaa561e3157cf92641ce28c45a3999c" - ), - Some(20332745u64), - )) - } - 100u64 => { - Some(( - ::alloy_primitives::address!( - "0xd9ec06b001957498ab1bc716145515d1d0e30ffb" - ), - Some(35026999u64), - )) - } + 1u64 => Some(( + ::alloy_primitives::address!("0x3705ceee5eaa561e3157cf92641ce28c45a3999c"), + Some(20332745u64), + )), + 100u64 => Some(( + ::alloy_primitives::address!("0xd9ec06b001957498ab1bc716145515d1d0e30ffb"), + Some(35026999u64), + )), _ => None, } } @@ -3285,9 +3182,7 @@ pub const fn deployment_block(chain_id: &u64) -> Option { } } impl Instance { - pub fn deployed( - provider: &DynProvider, - ) -> impl Future> + Send { + pub fn deployed(provider: &DynProvider) -> impl Future> + Send { async move { let chain_id = provider .get_chain_id() diff --git a/contracts/generated/contracts-generated/cowammuniswapv2priceoracle/src/lib.rs b/contracts/generated/contracts-generated/cowammuniswapv2priceoracle/src/lib.rs index 7cd66a5943..b7847d6413 100644 --- a/contracts/generated/contracts-generated/cowammuniswapv2priceoracle/src/lib.rs +++ b/contracts/generated/contracts-generated/cowammuniswapv2priceoracle/src/lib.rs @@ -1,4 +1,10 @@ -#![allow(unused_imports, unused_attributes, clippy::all, rustdoc::all, non_snake_case)] +#![allow( + unused_imports, + unused_attributes, + clippy::all, + rustdoc::all, + non_snake_case +)] //! Auto-generated contract bindings. Do not edit. /** @@ -19,8 +25,7 @@ interface CowAmmUniswapV2PriceOracle {} clippy::empty_structs_with_brackets )] pub mod CowAmmUniswapV2PriceOracle { - use super::*; - use alloy_sol_types as alloy_sol_types; + use {super::*, alloy_sol_types}; /// The creation / init bytecode of the contract. /// /// ```text @@ -41,10 +46,10 @@ pub mod CowAmmUniswapV2PriceOracle { pub static DEPLOYED_BYTECODE: alloy_sol_types::private::Bytes = alloy_sol_types::private::Bytes::from_static( b"`\x80`@R4\x80\x15a\0\x0FW_\x80\xFD[P`\x046\x10a\0)W_5`\xE0\x1C\x80c5^\xFD\xD9\x14a\0-W[_\x80\xFD[a\0@a\0;6`\x04a\x03\x86V[a\0YV[`@\x80Q\x92\x83R` \x83\x01\x91\x90\x91R\x01`@Q\x80\x91\x03\x90\xF3[_\x80\x80a\0h\x84\x86\x01\x86a\x04\x11V[\x90P\x80_\x01Qs\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16c\t\x02\xF1\xAC`@Q\x81c\xFF\xFF\xFF\xFF\x16`\xE0\x1B\x81R`\x04\x01```@Q\x80\x83\x03\x81\x86Z\xFA\x15\x80\x15a\0\xB6W=_\x80>=_\xFD[PPPP`@Q=`\x1F\x19`\x1F\x82\x01\x16\x82\x01\x80`@RP\x81\x01\x90a\0\xDA\x91\x90a\x04\xA2V[\x82m\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x92P\x81m\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x91PP\x80\x93P\x81\x94PPP_\x81_\x01Qs\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16c\r\xFE\x16\x81`@Q\x81c\xFF\xFF\xFF\xFF\x16`\xE0\x1B\x81R`\x04\x01` `@Q\x80\x83\x03\x81\x86Z\xFA\x15\x80\x15a\x01VW=_\x80>=_\xFD[PPPP`@Q=`\x1F\x19`\x1F\x82\x01\x16\x82\x01\x80`@RP\x81\x01\x90a\x01z\x91\x90a\x04\xEEV[\x90P_\x82_\x01Qs\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16c\xD2\x12 \xA7`@Q\x81c\xFF\xFF\xFF\xFF\x16`\xE0\x1B\x81R`\x04\x01` `@Q\x80\x83\x03\x81\x86Z\xFA\x15\x80\x15a\x01\xC9W=_\x80>=_\xFD[PPPP`@Q=`\x1F\x19`\x1F\x82\x01\x16\x82\x01\x80`@RP\x81\x01\x90a\x01\xED\x91\x90a\x04\xEEV[\x90P\x80s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x89s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x03a\x02'W\x92\x93\x92\x90[\x81s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x89s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x14a\x02\xC1W`@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\x82\x01R`\x16`$\x82\x01R\x7Foracle: invalid token0\0\0\0\0\0\0\0\0\0\0`D\x82\x01R`d\x01[`@Q\x80\x91\x03\x90\xFD[\x80s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x88s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x14a\x03VW`@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\x82\x01R`\x16`$\x82\x01R\x7Foracle: invalid token1\0\0\0\0\0\0\0\0\0\0`D\x82\x01R`d\x01a\x02\xB8V[PPP\x94P\x94\x92PPPV[s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x16\x81\x14a\x03\x83W_\x80\xFD[PV[_\x80_\x80``\x85\x87\x03\x12\x15a\x03\x99W_\x80\xFD[\x845a\x03\xA4\x81a\x03bV[\x93P` \x85\x015a\x03\xB4\x81a\x03bV[\x92P`@\x85\x015g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x80\x82\x11\x15a\x03\xD0W_\x80\xFD[\x81\x87\x01\x91P\x87`\x1F\x83\x01\x12a\x03\xE3W_\x80\xFD[\x815\x81\x81\x11\x15a\x03\xF1W_\x80\xFD[\x88` \x82\x85\x01\x01\x11\x15a\x04\x02W_\x80\xFD[\x95\x98\x94\x97PP` \x01\x94PPPV[_` \x82\x84\x03\x12\x15a\x04!W_\x80\xFD[`@Q` \x81\x01\x81\x81\x10g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x82\x11\x17\x15a\x04iW\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[`@R\x825a\x04w\x81a\x03bV[\x81R\x93\x92PPPV[\x80Qm\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x16\x81\x14a\x04\x9DW_\x80\xFD[\x91\x90PV[_\x80_``\x84\x86\x03\x12\x15a\x04\xB4W_\x80\xFD[a\x04\xBD\x84a\x04\x80V[\x92Pa\x04\xCB` \x85\x01a\x04\x80V[\x91P`@\x84\x01Qc\xFF\xFF\xFF\xFF\x81\x16\x81\x14a\x04\xE3W_\x80\xFD[\x80\x91PP\x92P\x92P\x92V[_` \x82\x84\x03\x12\x15a\x04\xFEW_\x80\xFD[\x81Qa\x05\t\x81a\x03bV[\x93\x92PPPV\xFE\xA2dipfsX\"\x12 \x1F\xE6\xADMk\x89\xD2\x04\xDBS\x94\xBD\xED\xEF#\xD1\x0E\xD8\xC7\xE4\xF8;\xE4\xC5\xFE\x14\xDC\xC0\x94p\"4dsolcC\0\x08\x19\x003", ); - use alloy_contract as alloy_contract; + use alloy_contract; /**Creates a new wrapper around an on-chain [`CowAmmUniswapV2PriceOracle`](self) contract instance. -See the [wrapper's documentation](`CowAmmUniswapV2PriceOracleInstance`) for more details.*/ + See the [wrapper's documentation](`CowAmmUniswapV2PriceOracleInstance`) for more details.*/ #[inline] pub const fn new< P: alloy_contract::private::Provider, @@ -57,14 +62,11 @@ See the [wrapper's documentation](`CowAmmUniswapV2PriceOracleInstance`) for more } /**Deploys this contract using the given `provider` and constructor arguments, if any. -Returns a new instance of the contract, if the deployment was successful. + 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.*/ + 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, - >( + pub fn deploy, N: alloy_contract::private::Network>( __provider: P, ) -> impl ::core::future::Future< Output = alloy_contract::Result>, @@ -72,33 +74,32 @@ For more fine-grained control over the deployment process, use [`deploy_builder` CowAmmUniswapV2PriceOracleInstance::::deploy(__provider) } /**Creates a `RawCallBuilder` for deploying this contract using the given `provider` -and constructor arguments, if any. + 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.*/ + 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) -> alloy_contract::RawCallBuilder { + >( + __provider: P, + ) -> alloy_contract::RawCallBuilder { CowAmmUniswapV2PriceOracleInstance::::deploy_builder(__provider) } /**A [`CowAmmUniswapV2PriceOracle`](self) instance. -Contains type-safe methods for interacting with an on-chain instance of the -[`CowAmmUniswapV2PriceOracle`](self) contract located at a given `address`, using a given -provider `P`. + Contains type-safe methods for interacting with an on-chain instance of the + [`CowAmmUniswapV2PriceOracle`](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. + 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.*/ + See the [module-level documentation](self) for all the available methods.*/ #[derive(Clone)] - pub struct CowAmmUniswapV2PriceOracleInstance< - P, - N = alloy_contract::private::Ethereum, - > { + pub struct CowAmmUniswapV2PriceOracleInstance { address: alloy_sol_types::private::Address, provider: P, _network: ::core::marker::PhantomData, @@ -113,29 +114,26 @@ See the [module-level documentation](self) for all the available methods.*/ } } /// Instantiation and getters/setters. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > CowAmmUniswapV2PriceOracleInstance { + impl, N: alloy_contract::private::Network> + CowAmmUniswapV2PriceOracleInstance + { /**Creates a new wrapper around an on-chain [`CowAmmUniswapV2PriceOracle`](self) contract instance. -See the [wrapper's documentation](`CowAmmUniswapV2PriceOracleInstance`) for more details.*/ + See the [wrapper's documentation](`CowAmmUniswapV2PriceOracleInstance`) for more details.*/ #[inline] - pub const fn new( - address: alloy_sol_types::private::Address, - __provider: P, - ) -> Self { + pub const fn new(address: alloy_sol_types::private::Address, __provider: P) -> Self { Self { address, provider: __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. + 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.*/ + For more fine-grained control over the deployment process, use [`deploy_builder`] instead.*/ #[inline] pub async fn deploy( __provider: P, @@ -144,11 +142,12 @@ For more fine-grained control over the deployment process, use [`deploy_builder` 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. + 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.*/ + 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( @@ -156,21 +155,25 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ ::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 { @@ -178,7 +181,8 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ } } impl CowAmmUniswapV2PriceOracleInstance<&P, N> { - /// Clones the provider and returns a new instance with the cloned provider. + /// Clones the provider and returns a new instance with the cloned + /// provider. #[inline] pub fn with_cloned_provider(self) -> CowAmmUniswapV2PriceOracleInstance { CowAmmUniswapV2PriceOracleInstance { @@ -189,14 +193,15 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ } } /// Function calls. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > CowAmmUniswapV2PriceOracleInstance { - /// Creates a new call builder using this contract instance's provider and address. + impl, N: alloy_contract::private::Network> + CowAmmUniswapV2PriceOracleInstance + { + /// 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. + /// 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, @@ -205,14 +210,15 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ } } /// Event filters. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > CowAmmUniswapV2PriceOracleInstance { - /// Creates a new event filter using this contract instance's provider and address. + impl, N: alloy_contract::private::Network> + CowAmmUniswapV2PriceOracleInstance + { + /// 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. + /// 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> { @@ -220,6 +226,5 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ } } } -pub type Instance = CowAmmUniswapV2PriceOracle::CowAmmUniswapV2PriceOracleInstance< - ::alloy_provider::DynProvider, ->; +pub type Instance = + CowAmmUniswapV2PriceOracle::CowAmmUniswapV2PriceOracleInstance<::alloy_provider::DynProvider>; diff --git a/contracts/generated/contracts-generated/cowprotocoltoken/src/lib.rs b/contracts/generated/contracts-generated/cowprotocoltoken/src/lib.rs index b7bfdb9b86..784f5bd013 100644 --- a/contracts/generated/contracts-generated/cowprotocoltoken/src/lib.rs +++ b/contracts/generated/contracts-generated/cowprotocoltoken/src/lib.rs @@ -1,4 +1,10 @@ -#![allow(unused_imports, unused_attributes, clippy::all, rustdoc::all, non_snake_case)] +#![allow( + unused_imports, + unused_attributes, + clippy::all, + rustdoc::all, + non_snake_case +)] //! Auto-generated contract bindings. Do not edit. /** @@ -405,8 +411,7 @@ interface CowProtocolToken { clippy::empty_structs_with_brackets )] pub mod CowProtocolToken { - use super::*; - use alloy_sol_types as alloy_sol_types; + use {super::*, alloy_sol_types}; /// The creation / init bytecode of the contract. /// /// ```text @@ -419,9 +424,9 @@ pub mod CowProtocolToken { ); #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Custom error with signature `AlreadyInflated()` and selector `0x7b064715`. -```solidity -error AlreadyInflated(); -```*/ + ```solidity + error AlreadyInflated(); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct AlreadyInflated; @@ -432,7 +437,7 @@ error AlreadyInflated(); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[doc(hidden)] #[allow(dead_code)] type UnderlyingSolTuple<'a> = (); @@ -440,9 +445,7 @@ error AlreadyInflated(); type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -466,35 +469,37 @@ error AlreadyInflated(); #[automatically_derived] impl alloy_sol_types::SolError for AlreadyInflated { type Parameters<'a> = UnderlyingSolTuple<'a>; - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "AlreadyInflated()"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [123u8, 6u8, 71u8, 21u8]; + const SIGNATURE: &'static str = "AlreadyInflated()"; + #[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) + as alloy_sol_types::SolType>::abi_decode_sequence_validate( + data, + ) + .map(Self::new) } } }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Custom error with signature `ExceedingMintCap()` and selector `0x2c6af208`. -```solidity -error ExceedingMintCap(); -```*/ + ```solidity + error ExceedingMintCap(); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct ExceedingMintCap; @@ -505,7 +510,7 @@ error ExceedingMintCap(); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[doc(hidden)] #[allow(dead_code)] type UnderlyingSolTuple<'a> = (); @@ -513,9 +518,7 @@ error ExceedingMintCap(); type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -539,35 +542,37 @@ error ExceedingMintCap(); #[automatically_derived] impl alloy_sol_types::SolError for ExceedingMintCap { type Parameters<'a> = UnderlyingSolTuple<'a>; - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "ExceedingMintCap()"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [44u8, 106u8, 242u8, 8u8]; + const SIGNATURE: &'static str = "ExceedingMintCap()"; + #[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) + as alloy_sol_types::SolType>::abi_decode_sequence_validate( + data, + ) + .map(Self::new) } } }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Custom error with signature `OnlyCowDao()` and selector `0xfe72c36e`. -```solidity -error OnlyCowDao(); -```*/ + ```solidity + error OnlyCowDao(); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct OnlyCowDao; @@ -578,7 +583,7 @@ error OnlyCowDao(); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[doc(hidden)] #[allow(dead_code)] type UnderlyingSolTuple<'a> = (); @@ -586,9 +591,7 @@ error OnlyCowDao(); type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -612,35 +615,37 @@ error OnlyCowDao(); #[automatically_derived] impl alloy_sol_types::SolError for OnlyCowDao { type Parameters<'a> = UnderlyingSolTuple<'a>; - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "OnlyCowDao()"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [254u8, 114u8, 195u8, 110u8]; + const SIGNATURE: &'static str = "OnlyCowDao()"; + #[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) + as alloy_sol_types::SolType>::abi_decode_sequence_validate( + data, + ) + .map(Self::new) } } }; #[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); -```*/ + ```solidity + event Approval(address indexed owner, address indexed spender, uint256 value); + ```*/ #[allow( non_camel_case_types, non_snake_case, @@ -663,25 +668,26 @@ event Approval(address indexed owner, address indexed spender, uint256 value); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[automatically_derived] impl alloy_sol_types::SolEvent for Approval { + type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; 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; + 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, + ]); + #[allow(unused_variables)] #[inline] fn new( @@ -694,33 +700,39 @@ event Approval(address indexed owner, address indexed spender, uint256 value); 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, - ), - ); + 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), + as alloy_sol_types::SolType>::tokenize( + &self.value, + ), ) } + #[inline] fn topics(&self) -> ::RustType { - (Self::SIGNATURE_HASH.into(), self.owner.clone(), self.spender.clone()) + ( + Self::SIGNATURE_HASH.into(), + self.owner.clone(), + self.spender.clone(), + ) } + #[inline] fn encode_topics_raw( &self, @@ -729,9 +741,7 @@ event Approval(address indexed owner, address indexed spender, uint256 value); if out.len() < ::COUNT { return Err(alloy_sol_types::Error::Overrun); } - out[0usize] = alloy_sol_types::abi::token::WordToken( - Self::SIGNATURE_HASH, - ); + out[0usize] = alloy_sol_types::abi::token::WordToken(Self::SIGNATURE_HASH); out[1usize] = ::encode_topic( &self.owner, ); @@ -746,6 +756,7 @@ event Approval(address indexed owner, address indexed spender, uint256 value); 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) } @@ -760,9 +771,9 @@ event Approval(address indexed owner, address indexed spender, uint256 value); }; #[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); -```*/ + ```solidity + event Transfer(address indexed from, address indexed to, uint256 value); + ```*/ #[allow( non_camel_case_types, non_snake_case, @@ -785,25 +796,26 @@ event Transfer(address indexed from, address indexed to, uint256 value); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[automatically_derived] impl alloy_sol_types::SolEvent for Transfer { + type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; 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; + 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, + ]); + #[allow(unused_variables)] #[inline] fn new( @@ -816,33 +828,39 @@ event Transfer(address indexed from, address indexed to, uint256 value); 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, - ), - ); + 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), + as alloy_sol_types::SolType>::tokenize( + &self.value, + ), ) } + #[inline] fn topics(&self) -> ::RustType { - (Self::SIGNATURE_HASH.into(), self.from.clone(), self.to.clone()) + ( + Self::SIGNATURE_HASH.into(), + self.from.clone(), + self.to.clone(), + ) } + #[inline] fn encode_topics_raw( &self, @@ -851,9 +869,7 @@ event Transfer(address indexed from, address indexed to, uint256 value); if out.len() < ::COUNT { return Err(alloy_sol_types::Error::Overrun); } - out[0usize] = alloy_sol_types::abi::token::WordToken( - Self::SIGNATURE_HASH, - ); + out[0usize] = alloy_sol_types::abi::token::WordToken(Self::SIGNATURE_HASH); out[1usize] = ::encode_topic( &self.from, ); @@ -868,6 +884,7 @@ event Transfer(address indexed from, address indexed to, uint256 value); 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) } @@ -881,9 +898,9 @@ event Transfer(address indexed from, address indexed to, uint256 value); } }; /**Constructor`. -```solidity -constructor(address initialTokenHolder, address cowDao, uint256 totalSupply); -```*/ + ```solidity + constructor(address initialTokenHolder, address cowDao, uint256 totalSupply); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct constructorCall { @@ -895,7 +912,7 @@ constructor(address initialTokenHolder, address cowDao, uint256 totalSupply); pub totalSupply: alloy_sol_types::private::primitives::aliases::U256, } const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -912,9 +929,7 @@ constructor(address initialTokenHolder, address cowDao, uint256 totalSupply); ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -947,15 +962,15 @@ constructor(address initialTokenHolder, address cowDao, uint256 totalSupply); alloy_sol_types::sol_data::Address, alloy_sol_types::sol_data::Uint<256>, ); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + 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<'_> { ( @@ -965,23 +980,24 @@ constructor(address initialTokenHolder, address cowDao, uint256 totalSupply); ::tokenize( &self.cowDao, ), - as alloy_sol_types::SolType>::tokenize(&self.totalSupply), + as alloy_sol_types::SolType>::tokenize( + &self.totalSupply, + ), ) } } }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `DOMAIN_SEPARATOR()` and selector `0x3644e515`. -```solidity -function DOMAIN_SEPARATOR() external view returns (bytes32); -```*/ + ```solidity + function DOMAIN_SEPARATOR() external view returns (bytes32); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct DOMAIN_SEPARATORCall; #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`DOMAIN_SEPARATOR()`](DOMAIN_SEPARATORCall) function. + ///Container type for the return parameters of the + /// [`DOMAIN_SEPARATOR()`](DOMAIN_SEPARATORCall) function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct DOMAIN_SEPARATORReturn { @@ -995,7 +1011,7 @@ function DOMAIN_SEPARATOR() external view returns (bytes32); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -1004,9 +1020,7 @@ function DOMAIN_SEPARATOR() external view returns (bytes32); type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1015,16 +1029,14 @@ function DOMAIN_SEPARATOR() external view returns (bytes32); } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From - for UnderlyingRustTuple<'_> { + impl ::core::convert::From for UnderlyingRustTuple<'_> { fn from(value: DOMAIN_SEPARATORCall) -> Self { () } } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From> - for DOMAIN_SEPARATORCall { + impl ::core::convert::From> for DOMAIN_SEPARATORCall { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { Self } @@ -1038,9 +1050,7 @@ function DOMAIN_SEPARATOR() external view returns (bytes32); 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, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1049,16 +1059,14 @@ function DOMAIN_SEPARATOR() external view returns (bytes32); } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From - for UnderlyingRustTuple<'_> { + impl ::core::convert::From for UnderlyingRustTuple<'_> { fn from(value: DOMAIN_SEPARATORReturn) -> Self { (value._0,) } } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From> - for DOMAIN_SEPARATORReturn { + impl ::core::convert::From> for DOMAIN_SEPARATORReturn { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { Self { _0: tuple.0 } } @@ -1067,26 +1075,26 @@ function DOMAIN_SEPARATOR() external view returns (bytes32); #[automatically_derived] impl alloy_sol_types::SolCall for DOMAIN_SEPARATORCall { type Parameters<'a> = (); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = alloy_sol_types::private::FixedBytes<32>; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (alloy_sol_types::sol_data::FixedBytes<32>,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "DOMAIN_SEPARATOR()"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [54u8, 68u8, 229u8, 21u8]; + const SIGNATURE: &'static str = "DOMAIN_SEPARATOR()"; + #[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<'_> { ( @@ -1095,35 +1103,34 @@ function DOMAIN_SEPARATOR() external view returns (bytes32); > 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| { + as alloy_sol_types::SolType>::abi_decode_sequence(data).map( + |r| { let r: DOMAIN_SEPARATORReturn = 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: DOMAIN_SEPARATORReturn = r.into(); - r._0 - }) + 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: DOMAIN_SEPARATORReturn = r.into(); + r._0 + }) } } }; #[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); -```*/ + ```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 { @@ -1133,7 +1140,8 @@ function allowance(address owner, address spender) external view returns (uint25 pub spender: alloy_sol_types::private::Address, } #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`allowance(address,address)`](allowanceCall) function. + ///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 { @@ -1147,7 +1155,7 @@ function allowance(address owner, address spender) external view returns (uint25 clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -1162,9 +1170,7 @@ function allowance(address owner, address spender) external view returns (uint25 ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1194,14 +1200,10 @@ function allowance(address owner, address spender) external view returns (uint25 #[allow(dead_code)] type UnderlyingSolTuple<'a> = (alloy_sol_types::sol_data::Uint<256>,); #[doc(hidden)] - type UnderlyingRustTuple<'a> = ( - alloy_sol_types::private::primitives::aliases::U256, - ); + 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, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1229,22 +1231,21 @@ function allowance(address owner, address spender) external view returns (uint25 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 ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; 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)"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [221u8, 98u8, 237u8, 62u8]; + const SIGNATURE: &'static str = "allowance(address,address)"; + #[inline] fn new<'a>( tuple: as alloy_sol_types::SolType>::RustType, ) -> Self { tuple.into() } + #[inline] fn tokenize(&self) -> Self::Token<'_> { ( @@ -1256,43 +1257,43 @@ function allowance(address owner, address spender) external view returns (uint25 ), ) } + #[inline] fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { ( - as alloy_sol_types::SolType>::tokenize(ret), + 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| { + 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 - }) + 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(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `approve(address,uint256)` and selector `0x095ea7b3`. -```solidity -function approve(address spender, uint256 amount) external returns (bool); -```*/ + ```solidity + function approve(address spender, uint256 amount) external returns (bool); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct approveCall { @@ -1302,7 +1303,8 @@ function approve(address spender, uint256 amount) external returns (bool); pub amount: alloy_sol_types::private::primitives::aliases::U256, } #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`approve(address,uint256)`](approveCall) function. + ///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 { @@ -1316,7 +1318,7 @@ function approve(address spender, uint256 amount) external returns (bool); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -1331,9 +1333,7 @@ function approve(address spender, uint256 amount) external returns (bool); ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1366,9 +1366,7 @@ function approve(address spender, uint256 amount) external returns (bool); type UnderlyingRustTuple<'a> = (bool,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1396,70 +1394,65 @@ function approve(address spender, uint256 amount) external returns (bool); 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 ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; 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)"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [9u8, 94u8, 167u8, 179u8]; + const SIGNATURE: &'static str = "approve(address,uint256)"; + #[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.amount), + as alloy_sol_types::SolType>::tokenize( + &self.amount, + ), ) } + #[inline] fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { - ( - ::tokenize( - ret, - ), - ) + (::tokenize(ret),) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) - .map(|r| { + 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 - }) + 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(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `balanceOf(address)` and selector `0x70a08231`. -```solidity -function balanceOf(address account) external view returns (uint256); -```*/ + ```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 { @@ -1467,7 +1460,8 @@ function balanceOf(address account) external view returns (uint256); pub account: alloy_sol_types::private::Address, } #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`balanceOf(address)`](balanceOfCall) function. + ///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 { @@ -1481,7 +1475,7 @@ function balanceOf(address account) external view returns (uint256); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -1490,9 +1484,7 @@ function balanceOf(address account) external view returns (uint256); type UnderlyingRustTuple<'a> = (alloy_sol_types::private::Address,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1519,14 +1511,10 @@ function balanceOf(address account) external view returns (uint256); #[allow(dead_code)] type UnderlyingSolTuple<'a> = (alloy_sol_types::sol_data::Uint<256>,); #[doc(hidden)] - type UnderlyingRustTuple<'a> = ( - alloy_sol_types::private::primitives::aliases::U256, - ); + 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, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1551,22 +1539,21 @@ function balanceOf(address account) external view returns (uint256); #[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 ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; 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)"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [112u8, 160u8, 130u8, 49u8]; + const SIGNATURE: &'static str = "balanceOf(address)"; + #[inline] fn new<'a>( tuple: as alloy_sol_types::SolType>::RustType, ) -> Self { tuple.into() } + #[inline] fn tokenize(&self) -> Self::Token<'_> { ( @@ -1575,48 +1562,49 @@ function balanceOf(address account) external view returns (uint256); ), ) } + #[inline] fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { ( - as alloy_sol_types::SolType>::tokenize(ret), + 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| { + 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 - }) + 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(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `decimals()` and selector `0x313ce567`. -```solidity -function decimals() external view returns (uint8); -```*/ + ```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(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`decimals()`](decimalsCall) function. + ///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 { @@ -1630,7 +1618,7 @@ function decimals() external view returns (uint8); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -1639,9 +1627,7 @@ function decimals() external view returns (uint8); type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1671,9 +1657,7 @@ function decimals() external view returns (uint8); type UnderlyingRustTuple<'a> = (u8,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1698,63 +1682,58 @@ function decimals() external view returns (uint8); #[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 ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; 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()"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [49u8, 60u8, 229u8, 103u8]; + const SIGNATURE: &'static str = "decimals()"; + #[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), - ) + ( 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| { + 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 - }) + 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(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `mint(address,uint256)` and selector `0x40c10f19`. -```solidity -function mint(address target, uint256 amount) external; -```*/ + ```solidity + function mint(address target, uint256 amount) external; + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct mintCall { @@ -1763,7 +1742,8 @@ function mint(address target, uint256 amount) external; #[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. + ///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 {} @@ -1774,7 +1754,7 @@ function mint(address target, uint256 amount) external; clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -1789,9 +1769,7 @@ function mint(address target, uint256 amount) external; ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1824,9 +1802,7 @@ function mint(address target, uint256 amount) external; type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1849,9 +1825,7 @@ function mint(address target, uint256 amount) external; } } impl mintReturn { - fn _tokenize( - &self, - ) -> ::ReturnToken<'_> { + fn _tokenize(&self) -> ::ReturnToken<'_> { () } } @@ -1861,65 +1835,64 @@ function mint(address target, uint256 amount) external; 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 ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "mint(address,uint256)"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [64u8, 193u8, 15u8, 25u8]; + const SIGNATURE: &'static str = "mint(address,uint256)"; + #[inline] fn new<'a>( tuple: as alloy_sol_types::SolType>::RustType, ) -> Self { tuple.into() } + #[inline] fn tokenize(&self) -> Self::Token<'_> { ( ::tokenize( &self.target, ), - as alloy_sol_types::SolType>::tokenize(&self.amount), + 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) + 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) + 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(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `name()` and selector `0x06fdde03`. -```solidity -function name() external view returns (string memory); -```*/ + ```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(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`name()`](nameCall) function. + ///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 { @@ -1933,7 +1906,7 @@ function name() external view returns (string memory); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -1942,9 +1915,7 @@ function name() external view returns (string memory); type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1974,9 +1945,7 @@ function name() external view returns (string memory); type UnderlyingRustTuple<'a> = (alloy_sol_types::private::String,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -2001,63 +1970,58 @@ function name() external view returns (string memory); #[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 ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (alloy_sol_types::sol_data::String,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "name()"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [6u8, 253u8, 222u8, 3u8]; + const SIGNATURE: &'static str = "name()"; + #[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, - ), - ) + (::tokenize(ret),) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) - .map(|r| { + 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 - }) + 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(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `nonces(address)` and selector `0x7ecebe00`. -```solidity -function nonces(address owner) external view returns (uint256); -```*/ + ```solidity + function nonces(address owner) external view returns (uint256); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct noncesCall { @@ -2065,7 +2029,8 @@ function nonces(address owner) external view returns (uint256); pub owner: alloy_sol_types::private::Address, } #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`nonces(address)`](noncesCall) function. + ///Container type for the return parameters of the + /// [`nonces(address)`](noncesCall) function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct noncesReturn { @@ -2079,7 +2044,7 @@ function nonces(address owner) external view returns (uint256); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -2088,9 +2053,7 @@ function nonces(address owner) external view returns (uint256); type UnderlyingRustTuple<'a> = (alloy_sol_types::private::Address,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -2117,14 +2080,10 @@ function nonces(address owner) external view returns (uint256); #[allow(dead_code)] type UnderlyingSolTuple<'a> = (alloy_sol_types::sol_data::Uint<256>,); #[doc(hidden)] - type UnderlyingRustTuple<'a> = ( - alloy_sol_types::private::primitives::aliases::U256, - ); + 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, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -2149,22 +2108,21 @@ function nonces(address owner) external view returns (uint256); #[automatically_derived] impl alloy_sol_types::SolCall for noncesCall { 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 ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (alloy_sol_types::sol_data::Uint<256>,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "nonces(address)"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [126u8, 206u8, 190u8, 0u8]; + const SIGNATURE: &'static str = "nonces(address)"; + #[inline] fn new<'a>( tuple: as alloy_sol_types::SolType>::RustType, ) -> Self { tuple.into() } + #[inline] fn tokenize(&self) -> Self::Token<'_> { ( @@ -2173,43 +2131,43 @@ function nonces(address owner) external view returns (uint256); ), ) } + #[inline] fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { ( - as alloy_sol_types::SolType>::tokenize(ret), + 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| { + as alloy_sol_types::SolType>::abi_decode_sequence(data).map( + |r| { let r: noncesReturn = 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: noncesReturn = r.into(); - r._0 - }) + 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: noncesReturn = r.into(); + r._0 + }) } } }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `permit(address,address,uint256,uint256,uint8,bytes32,bytes32)` and selector `0xd505accf`. -```solidity -function permit(address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) external; -```*/ + ```solidity + function permit(address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) external; + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct permitCall { @@ -2228,7 +2186,9 @@ function permit(address owner, address spender, uint256 value, uint256 deadline, #[allow(missing_docs)] pub s: alloy_sol_types::private::FixedBytes<32>, } - ///Container type for the return parameters of the [`permit(address,address,uint256,uint256,uint8,bytes32,bytes32)`](permitCall) function. + ///Container type for the return parameters of the + /// [`permit(address,address,uint256,uint256,uint8,bytes32, + /// bytes32)`](permitCall) function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct permitReturn {} @@ -2239,7 +2199,7 @@ function permit(address owner, address spender, uint256 value, uint256 deadline, clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -2264,9 +2224,7 @@ function permit(address owner, address spender, uint256 value, uint256 deadline, ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -2312,9 +2270,7 @@ function permit(address owner, address spender, uint256 value, uint256 deadline, type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -2337,9 +2293,7 @@ function permit(address owner, address spender, uint256 value, uint256 deadline, } } impl permitReturn { - fn _tokenize( - &self, - ) -> ::ReturnToken<'_> { + fn _tokenize(&self) -> ::ReturnToken<'_> { () } } @@ -2354,22 +2308,22 @@ function permit(address owner, address spender, uint256 value, uint256 deadline, alloy_sol_types::sol_data::FixedBytes<32>, alloy_sol_types::sol_data::FixedBytes<32>, ); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = permitReturn; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "permit(address,address,uint256,uint256,uint8,bytes32,bytes32)"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [213u8, 5u8, 172u8, 207u8]; + const SIGNATURE: &'static str = + "permit(address,address,uint256,uint256,uint8,bytes32,bytes32)"; + #[inline] fn new<'a>( tuple: as alloy_sol_types::SolType>::RustType, ) -> Self { tuple.into() } + #[inline] fn tokenize(&self) -> Self::Token<'_> { ( @@ -2396,33 +2350,32 @@ function permit(address owner, address spender, uint256 value, uint256 deadline, > as alloy_sol_types::SolType>::tokenize(&self.s), ) } + #[inline] fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { permitReturn::_tokenize(ret) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) + 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) + 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(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `simulateDelegatecall(address,bytes)` and selector `0xf84436bd`. -```solidity -function simulateDelegatecall(address targetContract, bytes memory calldataPayload) external returns (bytes memory response); -```*/ + ```solidity + function simulateDelegatecall(address targetContract, bytes memory calldataPayload) external returns (bytes memory response); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct simulateDelegatecallCall { @@ -2432,7 +2385,9 @@ function simulateDelegatecall(address targetContract, bytes memory calldataPaylo pub calldataPayload: alloy_sol_types::private::Bytes, } #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`simulateDelegatecall(address,bytes)`](simulateDelegatecallCall) function. + ///Container type for the return parameters of the + /// [`simulateDelegatecall(address,bytes)`](simulateDelegatecallCall) + /// function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct simulateDelegatecallReturn { @@ -2446,7 +2401,7 @@ function simulateDelegatecall(address targetContract, bytes memory calldataPaylo clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -2461,9 +2416,7 @@ function simulateDelegatecall(address targetContract, bytes memory calldataPaylo ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -2472,16 +2425,14 @@ function simulateDelegatecall(address targetContract, bytes memory calldataPaylo } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From - for UnderlyingRustTuple<'_> { + impl ::core::convert::From for UnderlyingRustTuple<'_> { fn from(value: simulateDelegatecallCall) -> Self { (value.targetContract, value.calldataPayload) } } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From> - for simulateDelegatecallCall { + impl ::core::convert::From> for simulateDelegatecallCall { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { Self { targetContract: tuple.0, @@ -2498,9 +2449,7 @@ function simulateDelegatecall(address targetContract, bytes memory calldataPaylo type UnderlyingRustTuple<'a> = (alloy_sol_types::private::Bytes,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -2509,16 +2458,14 @@ function simulateDelegatecall(address targetContract, bytes memory calldataPaylo } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From - for UnderlyingRustTuple<'_> { + impl ::core::convert::From for UnderlyingRustTuple<'_> { fn from(value: simulateDelegatecallReturn) -> Self { (value.response,) } } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From> - for simulateDelegatecallReturn { + impl ::core::convert::From> for simulateDelegatecallReturn { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { Self { response: tuple.0 } } @@ -2530,22 +2477,21 @@ function simulateDelegatecall(address targetContract, bytes memory calldataPaylo alloy_sol_types::sol_data::Address, alloy_sol_types::sol_data::Bytes, ); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = alloy_sol_types::private::Bytes; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (alloy_sol_types::sol_data::Bytes,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "simulateDelegatecall(address,bytes)"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [248u8, 68u8, 54u8, 189u8]; + const SIGNATURE: &'static str = "simulateDelegatecall(address,bytes)"; + #[inline] fn new<'a>( tuple: as alloy_sol_types::SolType>::RustType, ) -> Self { tuple.into() } + #[inline] fn tokenize(&self) -> Self::Token<'_> { ( @@ -2557,48 +2503,45 @@ function simulateDelegatecall(address targetContract, bytes memory calldataPaylo ), ) } + #[inline] fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { - ( - ::tokenize( - ret, - ), - ) + (::tokenize(ret),) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) - .map(|r| { + as alloy_sol_types::SolType>::abi_decode_sequence(data).map( + |r| { let r: simulateDelegatecallReturn = r.into(); r.response - }) + }, + ) } + #[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: simulateDelegatecallReturn = r.into(); - r.response - }) + 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: simulateDelegatecallReturn = r.into(); + r.response + }) } } }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `symbol()` and selector `0x95d89b41`. -```solidity -function symbol() external view returns (string memory); -```*/ + ```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(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`symbol()`](symbolCall) function. + ///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 { @@ -2612,7 +2555,7 @@ function symbol() external view returns (string memory); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -2621,9 +2564,7 @@ function symbol() external view returns (string memory); type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -2653,9 +2594,7 @@ function symbol() external view returns (string memory); type UnderlyingRustTuple<'a> = (alloy_sol_types::private::String,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -2680,63 +2619,58 @@ function symbol() external view returns (string memory); #[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 ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (alloy_sol_types::sol_data::String,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "symbol()"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [149u8, 216u8, 155u8, 65u8]; + const SIGNATURE: &'static str = "symbol()"; + #[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, - ), - ) + (::tokenize(ret),) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) - .map(|r| { + 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 - }) + 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(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `transfer(address,uint256)` and selector `0xa9059cbb`. -```solidity -function transfer(address recipient, uint256 amount) external returns (bool); -```*/ + ```solidity + function transfer(address recipient, uint256 amount) external returns (bool); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct transferCall { @@ -2746,7 +2680,8 @@ function transfer(address recipient, uint256 amount) external returns (bool); pub amount: alloy_sol_types::private::primitives::aliases::U256, } #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`transfer(address,uint256)`](transferCall) function. + ///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 { @@ -2760,7 +2695,7 @@ function transfer(address recipient, uint256 amount) external returns (bool); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -2775,9 +2710,7 @@ function transfer(address recipient, uint256 amount) external returns (bool); ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -2810,9 +2743,7 @@ function transfer(address recipient, uint256 amount) external returns (bool); type UnderlyingRustTuple<'a> = (bool,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -2840,70 +2771,65 @@ function transfer(address recipient, uint256 amount) external returns (bool); 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 ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; 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)"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [169u8, 5u8, 156u8, 187u8]; + const SIGNATURE: &'static str = "transfer(address,uint256)"; + #[inline] fn new<'a>( tuple: as alloy_sol_types::SolType>::RustType, ) -> Self { tuple.into() } + #[inline] fn tokenize(&self) -> Self::Token<'_> { ( ::tokenize( &self.recipient, ), - as alloy_sol_types::SolType>::tokenize(&self.amount), + as alloy_sol_types::SolType>::tokenize( + &self.amount, + ), ) } + #[inline] fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { - ( - ::tokenize( - ret, - ), - ) + (::tokenize(ret),) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) - .map(|r| { + 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 - }) + 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(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `transferFrom(address,address,uint256)` and selector `0x23b872dd`. -```solidity -function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); -```*/ + ```solidity + function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct transferFromCall { @@ -2915,7 +2841,8 @@ function transferFrom(address sender, address recipient, uint256 amount) externa pub amount: alloy_sol_types::private::primitives::aliases::U256, } #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`transferFrom(address,address,uint256)`](transferFromCall) function. + ///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 { @@ -2929,7 +2856,7 @@ function transferFrom(address sender, address recipient, uint256 amount) externa clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -2946,9 +2873,7 @@ function transferFrom(address sender, address recipient, uint256 amount) externa ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -2982,9 +2907,7 @@ function transferFrom(address sender, address recipient, uint256 amount) externa type UnderlyingRustTuple<'a> = (bool,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -3013,22 +2936,21 @@ function transferFrom(address sender, address recipient, uint256 amount) externa 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 ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; 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)"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [35u8, 184u8, 114u8, 221u8]; + const SIGNATURE: &'static str = "transferFrom(address,address,uint256)"; + #[inline] fn new<'a>( tuple: as alloy_sol_types::SolType>::RustType, ) -> Self { tuple.into() } + #[inline] fn tokenize(&self) -> Self::Token<'_> { ( @@ -3038,46 +2960,41 @@ function transferFrom(address sender, address recipient, uint256 amount) externa ::tokenize( &self.recipient, ), - as alloy_sol_types::SolType>::tokenize(&self.amount), + as alloy_sol_types::SolType>::tokenize( + &self.amount, + ), ) } + #[inline] fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { - ( - ::tokenize( - ret, - ), - ) + (::tokenize(ret),) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) - .map(|r| { + 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 - }) + 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 + }) } } }; ///Container for all the [`CowProtocolToken`](self) function calls. #[derive(Clone)] - #[derive()] pub enum CowProtocolTokenCalls { #[allow(missing_docs)] DOMAIN_SEPARATOR(DOMAIN_SEPARATORCall), @@ -3109,8 +3026,9 @@ function transferFrom(address sender, address recipient, uint256 amount) externa impl CowProtocolTokenCalls { /// 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. + /// 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]] = &[ @@ -3128,22 +3046,6 @@ function transferFrom(address sender, address recipient, uint256 amount) externa [221u8, 98u8, 237u8, 62u8], [248u8, 68u8, 54u8, 189u8], ]; - /// The names of the variants in the same order as `SELECTORS`. - pub const VARIANT_NAMES: &'static [&'static str] = &[ - ::core::stringify!(name), - ::core::stringify!(approve), - ::core::stringify!(transferFrom), - ::core::stringify!(decimals), - ::core::stringify!(DOMAIN_SEPARATOR), - ::core::stringify!(mint), - ::core::stringify!(balanceOf), - ::core::stringify!(nonces), - ::core::stringify!(symbol), - ::core::stringify!(transfer), - ::core::stringify!(permit), - ::core::stringify!(allowance), - ::core::stringify!(simulateDelegatecall), - ]; /// The signatures in the same order as `SELECTORS`. pub const SIGNATURES: &'static [&'static str] = &[ ::SIGNATURE, @@ -3160,6 +3062,23 @@ function transferFrom(address sender, address recipient, uint256 amount) externa ::SIGNATURE, ::SIGNATURE, ]; + /// The names of the variants in the same order as `SELECTORS`. + pub const VARIANT_NAMES: &'static [&'static str] = &[ + ::core::stringify!(name), + ::core::stringify!(approve), + ::core::stringify!(transferFrom), + ::core::stringify!(decimals), + ::core::stringify!(DOMAIN_SEPARATOR), + ::core::stringify!(mint), + ::core::stringify!(balanceOf), + ::core::stringify!(nonces), + ::core::stringify!(symbol), + ::core::stringify!(transfer), + ::core::stringify!(permit), + ::core::stringify!(allowance), + ::core::stringify!(simulateDelegatecall), + ]; + /// Returns the signature for the given selector, if known. #[inline] pub fn signature_by_selector( @@ -3172,33 +3091,29 @@ function transferFrom(address sender, address recipient, uint256 amount) externa ::core::result::Result::Err(_) => ::core::option::Option::None, } } + /// Returns the enum variant name for the given selector, if known. #[inline] - pub fn name_by_selector( - selector: [u8; 4usize], - ) -> ::core::option::Option<&'static str> { + pub fn name_by_selector(selector: [u8; 4usize]) -> ::core::option::Option<&'static str> { let sig = Self::signature_by_selector(selector)?; sig.split_once('(').map(|(name, _)| name) } } #[automatically_derived] impl alloy_sol_types::SolInterface for CowProtocolTokenCalls { - const NAME: &'static str = "CowProtocolTokenCalls"; - const MIN_DATA_LENGTH: usize = 0usize; const COUNT: usize = 13usize; + const MIN_DATA_LENGTH: usize = 0usize; + const NAME: &'static str = "CowProtocolTokenCalls"; + #[inline] fn selector(&self) -> [u8; 4] { match self { Self::DOMAIN_SEPARATOR(_) => { ::SELECTOR } - Self::allowance(_) => { - ::SELECTOR - } + Self::allowance(_) => ::SELECTOR, Self::approve(_) => ::SELECTOR, - Self::balanceOf(_) => { - ::SELECTOR - } + Self::balanceOf(_) => ::SELECTOR, Self::decimals(_) => ::SELECTOR, Self::mint(_) => ::SELECTOR, Self::name(_) => ::SELECTOR, @@ -3209,61 +3124,47 @@ function transferFrom(address sender, address recipient, uint256 amount) externa } Self::symbol(_) => ::SELECTOR, Self::transfer(_) => ::SELECTOR, - Self::transferFrom(_) => { - ::SELECTOR - } + Self::transferFrom(_) => ::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 abi_decode_raw(selector: [u8; 4], data: &[u8]) -> alloy_sol_types::Result { + static DECODE_SHIMS: &[fn(&[u8]) -> alloy_sol_types::Result] = &[ { - fn name( - data: &[u8], - ) -> alloy_sol_types::Result { + fn name(data: &[u8]) -> alloy_sol_types::Result { ::abi_decode_raw(data) .map(CowProtocolTokenCalls::name) } name }, { - fn approve( - data: &[u8], - ) -> alloy_sol_types::Result { + fn approve(data: &[u8]) -> alloy_sol_types::Result { ::abi_decode_raw(data) .map(CowProtocolTokenCalls::approve) } approve }, { - fn transferFrom( - data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, - ) + fn transferFrom(data: &[u8]) -> alloy_sol_types::Result { + ::abi_decode_raw(data) .map(CowProtocolTokenCalls::transferFrom) } transferFrom }, { - fn decimals( - data: &[u8], - ) -> alloy_sol_types::Result { + fn decimals(data: &[u8]) -> alloy_sol_types::Result { ::abi_decode_raw(data) .map(CowProtocolTokenCalls::decimals) } @@ -3273,71 +3174,55 @@ function transferFrom(address sender, address recipient, uint256 amount) externa fn DOMAIN_SEPARATOR( data: &[u8], ) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, - ) + ::abi_decode_raw(data) .map(CowProtocolTokenCalls::DOMAIN_SEPARATOR) } DOMAIN_SEPARATOR }, { - fn mint( - data: &[u8], - ) -> alloy_sol_types::Result { + fn mint(data: &[u8]) -> alloy_sol_types::Result { ::abi_decode_raw(data) .map(CowProtocolTokenCalls::mint) } mint }, { - fn balanceOf( - data: &[u8], - ) -> alloy_sol_types::Result { + fn balanceOf(data: &[u8]) -> alloy_sol_types::Result { ::abi_decode_raw(data) .map(CowProtocolTokenCalls::balanceOf) } balanceOf }, { - fn nonces( - data: &[u8], - ) -> alloy_sol_types::Result { + fn nonces(data: &[u8]) -> alloy_sol_types::Result { ::abi_decode_raw(data) .map(CowProtocolTokenCalls::nonces) } nonces }, { - fn symbol( - data: &[u8], - ) -> alloy_sol_types::Result { + fn symbol(data: &[u8]) -> alloy_sol_types::Result { ::abi_decode_raw(data) .map(CowProtocolTokenCalls::symbol) } symbol }, { - fn transfer( - data: &[u8], - ) -> alloy_sol_types::Result { + fn transfer(data: &[u8]) -> alloy_sol_types::Result { ::abi_decode_raw(data) .map(CowProtocolTokenCalls::transfer) } transfer }, { - fn permit( - data: &[u8], - ) -> alloy_sol_types::Result { + fn permit(data: &[u8]) -> alloy_sol_types::Result { ::abi_decode_raw(data) .map(CowProtocolTokenCalls::permit) } permit }, { - fn allowance( - data: &[u8], - ) -> alloy_sol_types::Result { + fn allowance(data: &[u8]) -> alloy_sol_types::Result { ::abi_decode_raw(data) .map(CowProtocolTokenCalls::allowance) } @@ -3347,24 +3232,21 @@ function transferFrom(address sender, address recipient, uint256 amount) externa fn simulateDelegatecall( data: &[u8], ) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, - ) + ::abi_decode_raw(data) .map(CowProtocolTokenCalls::simulateDelegatecall) } simulateDelegatecall }, ]; let Ok(idx) = Self::SELECTORS.binary_search(&selector) else { - return Err( - alloy_sol_types::Error::unknown_selector( - ::NAME, - selector, - ), - ); + return Err(alloy_sol_types::Error::unknown_selector( + ::NAME, + selector, + )); }; DECODE_SHIMS[idx](data) } + #[inline] #[allow(non_snake_case)] fn abi_decode_raw_validate( @@ -3373,47 +3255,35 @@ function transferFrom(address sender, address recipient, uint256 amount) externa ) -> alloy_sol_types::Result { static DECODE_VALIDATE_SHIMS: &[fn( &[u8], - ) -> alloy_sol_types::Result] = &[ + ) -> alloy_sol_types::Result< + CowProtocolTokenCalls, + >] = &[ { - fn name( - data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) + fn name(data: &[u8]) -> alloy_sol_types::Result { + ::abi_decode_raw_validate(data) .map(CowProtocolTokenCalls::name) } name }, { - fn approve( - data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) + fn approve(data: &[u8]) -> alloy_sol_types::Result { + ::abi_decode_raw_validate(data) .map(CowProtocolTokenCalls::approve) } approve }, { - fn transferFrom( - data: &[u8], - ) -> alloy_sol_types::Result { + fn transferFrom(data: &[u8]) -> alloy_sol_types::Result { ::abi_decode_raw_validate( - data, - ) - .map(CowProtocolTokenCalls::transferFrom) + data, + ) + .map(CowProtocolTokenCalls::transferFrom) } transferFrom }, { - fn decimals( - data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) + fn decimals(data: &[u8]) -> alloy_sol_types::Result { + ::abi_decode_raw_validate(data) .map(CowProtocolTokenCalls::decimals) } decimals @@ -3423,85 +3293,57 @@ function transferFrom(address sender, address recipient, uint256 amount) externa data: &[u8], ) -> alloy_sol_types::Result { ::abi_decode_raw_validate( - data, - ) - .map(CowProtocolTokenCalls::DOMAIN_SEPARATOR) + data, + ) + .map(CowProtocolTokenCalls::DOMAIN_SEPARATOR) } DOMAIN_SEPARATOR }, { - fn mint( - data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) + fn mint(data: &[u8]) -> alloy_sol_types::Result { + ::abi_decode_raw_validate(data) .map(CowProtocolTokenCalls::mint) } mint }, { - fn balanceOf( - data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) + fn balanceOf(data: &[u8]) -> alloy_sol_types::Result { + ::abi_decode_raw_validate(data) .map(CowProtocolTokenCalls::balanceOf) } balanceOf }, { - fn nonces( - data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) + fn nonces(data: &[u8]) -> alloy_sol_types::Result { + ::abi_decode_raw_validate(data) .map(CowProtocolTokenCalls::nonces) } nonces }, { - fn symbol( - data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) + fn symbol(data: &[u8]) -> alloy_sol_types::Result { + ::abi_decode_raw_validate(data) .map(CowProtocolTokenCalls::symbol) } symbol }, { - fn transfer( - data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) + fn transfer(data: &[u8]) -> alloy_sol_types::Result { + ::abi_decode_raw_validate(data) .map(CowProtocolTokenCalls::transfer) } transfer }, { - fn permit( - data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) + fn permit(data: &[u8]) -> alloy_sol_types::Result { + ::abi_decode_raw_validate(data) .map(CowProtocolTokenCalls::permit) } permit }, { - fn allowance( - data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) + fn allowance(data: &[u8]) -> alloy_sol_types::Result { + ::abi_decode_raw_validate(data) .map(CowProtocolTokenCalls::allowance) } allowance @@ -3519,22 +3361,19 @@ function transferFrom(address sender, address recipient, uint256 amount) externa }, ]; let Ok(idx) = Self::SELECTORS.binary_search(&selector) else { - return Err( - alloy_sol_types::Error::unknown_selector( - ::NAME, - selector, - ), - ); + 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::DOMAIN_SEPARATOR(inner) => { - ::abi_encoded_size( - inner, - ) + ::abi_encoded_size(inner) } Self::allowance(inner) => { ::abi_encoded_size(inner) @@ -3561,9 +3400,7 @@ function transferFrom(address sender, address recipient, uint256 amount) externa ::abi_encoded_size(inner) } Self::simulateDelegatecall(inner) => { - ::abi_encoded_size( - inner, - ) + ::abi_encoded_size(inner) } Self::symbol(inner) => { ::abi_encoded_size(inner) @@ -3572,41 +3409,28 @@ function transferFrom(address sender, address recipient, uint256 amount) externa ::abi_encoded_size(inner) } Self::transferFrom(inner) => { - ::abi_encoded_size( - inner, - ) + ::abi_encoded_size(inner) } } } + #[inline] fn abi_encode_raw(&self, out: &mut alloy_sol_types::private::Vec) { match self { Self::DOMAIN_SEPARATOR(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } Self::allowance(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } Self::approve(inner) => { ::abi_encode_raw(inner, out) } Self::balanceOf(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } Self::decimals(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } Self::mint(inner) => { ::abi_encode_raw(inner, out) @@ -3622,31 +3446,23 @@ function transferFrom(address sender, address recipient, uint256 amount) externa } Self::simulateDelegatecall(inner) => { ::abi_encode_raw( - inner, - out, + inner, out, ) } Self::symbol(inner) => { ::abi_encode_raw(inner, out) } Self::transfer(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } Self::transferFrom(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } } } } ///Container for all the [`CowProtocolToken`](self) custom errors. - #[derive(Clone)] - #[derive(Debug, PartialEq, Eq, Hash)] + #[derive(Clone, Debug, PartialEq, Eq, Hash)] pub enum CowProtocolTokenErrors { #[allow(missing_docs)] AlreadyInflated(AlreadyInflated), @@ -3658,8 +3474,9 @@ function transferFrom(address sender, address recipient, uint256 amount) externa impl CowProtocolTokenErrors { /// 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. + /// 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]] = &[ @@ -3667,18 +3484,19 @@ function transferFrom(address sender, address recipient, uint256 amount) externa [123u8, 6u8, 71u8, 21u8], [254u8, 114u8, 195u8, 110u8], ]; - /// The names of the variants in the same order as `SELECTORS`. - pub const VARIANT_NAMES: &'static [&'static str] = &[ - ::core::stringify!(ExceedingMintCap), - ::core::stringify!(AlreadyInflated), - ::core::stringify!(OnlyCowDao), - ]; /// The signatures in the same order as `SELECTORS`. pub const SIGNATURES: &'static [&'static str] = &[ ::SIGNATURE, ::SIGNATURE, ::SIGNATURE, ]; + /// The names of the variants in the same order as `SELECTORS`. + pub const VARIANT_NAMES: &'static [&'static str] = &[ + ::core::stringify!(ExceedingMintCap), + ::core::stringify!(AlreadyInflated), + ::core::stringify!(OnlyCowDao), + ]; + /// Returns the signature for the given selector, if known. #[inline] pub fn signature_by_selector( @@ -3691,20 +3509,20 @@ function transferFrom(address sender, address recipient, uint256 amount) externa ::core::result::Result::Err(_) => ::core::option::Option::None, } } + /// Returns the enum variant name for the given selector, if known. #[inline] - pub fn name_by_selector( - selector: [u8; 4usize], - ) -> ::core::option::Option<&'static str> { + pub fn name_by_selector(selector: [u8; 4usize]) -> ::core::option::Option<&'static str> { let sig = Self::signature_by_selector(selector)?; sig.split_once('(').map(|(name, _)| name) } } #[automatically_derived] impl alloy_sol_types::SolInterface for CowProtocolTokenErrors { - const NAME: &'static str = "CowProtocolTokenErrors"; - const MIN_DATA_LENGTH: usize = 0usize; const COUNT: usize = 3usize; + const MIN_DATA_LENGTH: usize = 0usize; + const NAME: &'static str = "CowProtocolTokenErrors"; + #[inline] fn selector(&self) -> [u8; 4] { match self { @@ -3714,70 +3532,65 @@ function transferFrom(address sender, address recipient, uint256 amount) externa Self::ExceedingMintCap(_) => { ::SELECTOR } - Self::OnlyCowDao(_) => { - ::SELECTOR - } + Self::OnlyCowDao(_) => ::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 ExceedingMintCap( - data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, - ) - .map(CowProtocolTokenErrors::ExceedingMintCap) - } - ExceedingMintCap - }, - { - fn AlreadyInflated( - data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, - ) - .map(CowProtocolTokenErrors::AlreadyInflated) - } - AlreadyInflated - }, - { - fn OnlyCowDao( - data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw(data) - .map(CowProtocolTokenErrors::OnlyCowDao) - } - OnlyCowDao - }, - ]; + fn abi_decode_raw(selector: [u8; 4], data: &[u8]) -> alloy_sol_types::Result { + static DECODE_SHIMS: &[fn(&[u8]) -> alloy_sol_types::Result] = + &[ + { + fn ExceedingMintCap( + data: &[u8], + ) -> alloy_sol_types::Result + { + ::abi_decode_raw(data) + .map(CowProtocolTokenErrors::ExceedingMintCap) + } + ExceedingMintCap + }, + { + fn AlreadyInflated( + data: &[u8], + ) -> alloy_sol_types::Result + { + ::abi_decode_raw(data) + .map(CowProtocolTokenErrors::AlreadyInflated) + } + AlreadyInflated + }, + { + fn OnlyCowDao( + data: &[u8], + ) -> alloy_sol_types::Result + { + ::abi_decode_raw(data) + .map(CowProtocolTokenErrors::OnlyCowDao) + } + OnlyCowDao + }, + ]; let Ok(idx) = Self::SELECTORS.binary_search(&selector) else { - return Err( - alloy_sol_types::Error::unknown_selector( - ::NAME, - selector, - ), - ); + return Err(alloy_sol_types::Error::unknown_selector( + ::NAME, + selector, + )); }; DECODE_SHIMS[idx](data) } + #[inline] #[allow(non_snake_case)] fn abi_decode_raw_validate( @@ -3786,15 +3599,17 @@ function transferFrom(address sender, address recipient, uint256 amount) externa ) -> alloy_sol_types::Result { static DECODE_VALIDATE_SHIMS: &[fn( &[u8], - ) -> alloy_sol_types::Result] = &[ + ) -> alloy_sol_types::Result< + CowProtocolTokenErrors, + >] = &[ { fn ExceedingMintCap( data: &[u8], ) -> alloy_sol_types::Result { ::abi_decode_raw_validate( - data, - ) - .map(CowProtocolTokenErrors::ExceedingMintCap) + data, + ) + .map(CowProtocolTokenErrors::ExceedingMintCap) } ExceedingMintCap }, @@ -3803,66 +3618,52 @@ function transferFrom(address sender, address recipient, uint256 amount) externa data: &[u8], ) -> alloy_sol_types::Result { ::abi_decode_raw_validate( - data, - ) - .map(CowProtocolTokenErrors::AlreadyInflated) + data, + ) + .map(CowProtocolTokenErrors::AlreadyInflated) } AlreadyInflated }, { - fn OnlyCowDao( - data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) + fn OnlyCowDao(data: &[u8]) -> alloy_sol_types::Result { + ::abi_decode_raw_validate(data) .map(CowProtocolTokenErrors::OnlyCowDao) } OnlyCowDao }, ]; let Ok(idx) = Self::SELECTORS.binary_search(&selector) else { - return Err( - alloy_sol_types::Error::unknown_selector( - ::NAME, - selector, - ), - ); + 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::AlreadyInflated(inner) => { - ::abi_encoded_size( - inner, - ) + ::abi_encoded_size(inner) } Self::ExceedingMintCap(inner) => { - ::abi_encoded_size( - inner, - ) + ::abi_encoded_size(inner) } Self::OnlyCowDao(inner) => { ::abi_encoded_size(inner) } } } + #[inline] fn abi_encode_raw(&self, out: &mut alloy_sol_types::private::Vec) { match self { Self::AlreadyInflated(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } Self::ExceedingMintCap(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } Self::OnlyCowDao(inner) => { ::abi_encode_raw(inner, out) @@ -3871,8 +3672,7 @@ function transferFrom(address sender, address recipient, uint256 amount) externa } } ///Container for all the [`CowProtocolToken`](self) events. - #[derive(Clone)] - #[derive(Debug, PartialEq, Eq, Hash)] + #[derive(Clone, Debug, PartialEq, Eq, Hash)] pub enum CowProtocolTokenEvents { #[allow(missing_docs)] Approval(Approval), @@ -3882,32 +3682,32 @@ function transferFrom(address sender, address recipient, uint256 amount) externa impl CowProtocolTokenEvents { /// 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. + /// 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]] = &[ [ - 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, + 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, ], [ - 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, + 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, ], ]; - /// The names of the variants in the same order as `SELECTORS`. - pub const VARIANT_NAMES: &'static [&'static str] = &[ - ::core::stringify!(Approval), - ::core::stringify!(Transfer), - ]; /// The signatures in the same order as `SELECTORS`. pub const SIGNATURES: &'static [&'static str] = &[ ::SIGNATURE, ::SIGNATURE, ]; + /// The names of the variants in the same order as `SELECTORS`. + pub const VARIANT_NAMES: &'static [&'static str] = + &[::core::stringify!(Approval), ::core::stringify!(Transfer)]; + /// Returns the signature for the given selector, if known. #[inline] pub fn signature_by_selector( @@ -3920,19 +3720,19 @@ function transferFrom(address sender, address recipient, uint256 amount) externa ::core::result::Result::Err(_) => ::core::option::Option::None, } } + /// Returns the enum variant name for the given selector, if known. #[inline] - pub fn name_by_selector( - selector: [u8; 32usize], - ) -> ::core::option::Option<&'static str> { + pub fn name_by_selector(selector: [u8; 32usize]) -> ::core::option::Option<&'static str> { let sig = Self::signature_by_selector(selector)?; sig.split_once('(').map(|(name, _)| name) } } #[automatically_derived] impl alloy_sol_types::SolEventInterface for CowProtocolTokenEvents { - const NAME: &'static str = "CowProtocolTokenEvents"; const COUNT: usize = 2usize; + const NAME: &'static str = "CowProtocolTokenEvents"; + fn decode_raw_log( topics: &[alloy_sol_types::Word], data: &[u8], @@ -3946,17 +3746,15 @@ function transferFrom(address sender, address recipient, uint256 amount) externa ::decode_raw_log(topics, data) .map(Self::Transfer) } - _ => { - 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(), - ), + _ => 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(), ), - }) - } + ), + }), } } } @@ -3964,14 +3762,11 @@ function transferFrom(address sender, address recipient, uint256 amount) externa impl alloy_sol_types::private::IntoLogData for CowProtocolTokenEvents { 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::Transfer(inner) => { - alloy_sol_types::private::IntoLogData::to_log_data(inner) - } + Self::Approval(inner) => alloy_sol_types::private::IntoLogData::to_log_data(inner), + Self::Transfer(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) => { @@ -3983,10 +3778,10 @@ function transferFrom(address sender, address recipient, uint256 amount) externa } } } - use alloy_contract as alloy_contract; + use alloy_contract; /**Creates a new wrapper around an on-chain [`CowProtocolToken`](self) contract instance. -See the [wrapper's documentation](`CowProtocolTokenInstance`) for more details.*/ + See the [wrapper's documentation](`CowProtocolTokenInstance`) for more details.*/ #[inline] pub const fn new< P: alloy_contract::private::Provider, @@ -3999,31 +3794,29 @@ See the [wrapper's documentation](`CowProtocolTokenInstance`) for more details.* } /**Deploys this contract using the given `provider` and constructor arguments, if any. -Returns a new instance of the contract, if the deployment was successful. + 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.*/ + 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, - >( + pub fn deploy, N: alloy_contract::private::Network>( __provider: P, initialTokenHolder: alloy_sol_types::private::Address, cowDao: alloy_sol_types::private::Address, totalSupply: alloy_sol_types::private::primitives::aliases::U256, - ) -> impl ::core::future::Future< - Output = alloy_contract::Result>, - > { - CowProtocolTokenInstance::< - P, - N, - >::deploy(__provider, initialTokenHolder, cowDao, totalSupply) + ) -> impl ::core::future::Future>> + { + CowProtocolTokenInstance::::deploy( + __provider, + initialTokenHolder, + cowDao, + totalSupply, + ) } /**Creates a `RawCallBuilder` for deploying this contract using the given `provider` -and constructor arguments, if any. + 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.*/ + 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, @@ -4034,22 +3827,24 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ cowDao: alloy_sol_types::private::Address, totalSupply: alloy_sol_types::private::primitives::aliases::U256, ) -> alloy_contract::RawCallBuilder { - CowProtocolTokenInstance::< - P, - N, - >::deploy_builder(__provider, initialTokenHolder, cowDao, totalSupply) + CowProtocolTokenInstance::::deploy_builder( + __provider, + initialTokenHolder, + cowDao, + totalSupply, + ) } /**A [`CowProtocolToken`](self) instance. -Contains type-safe methods for interacting with an on-chain instance of the -[`CowProtocolToken`](self) contract located at a given `address`, using a given -provider `P`. + Contains type-safe methods for interacting with an on-chain instance of the + [`CowProtocolToken`](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. + 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.*/ + See the [module-level documentation](self) for all the available methods.*/ #[derive(Clone)] pub struct CowProtocolTokenInstance { address: alloy_sol_types::private::Address, @@ -4060,33 +3855,32 @@ See the [module-level documentation](self) for all the available methods.*/ impl ::core::fmt::Debug for CowProtocolTokenInstance { #[inline] fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { - f.debug_tuple("CowProtocolTokenInstance").field(&self.address).finish() + f.debug_tuple("CowProtocolTokenInstance") + .field(&self.address) + .finish() } } /// Instantiation and getters/setters. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > CowProtocolTokenInstance { + impl, N: alloy_contract::private::Network> + CowProtocolTokenInstance + { /**Creates a new wrapper around an on-chain [`CowProtocolToken`](self) contract instance. -See the [wrapper's documentation](`CowProtocolTokenInstance`) for more details.*/ + See the [wrapper's documentation](`CowProtocolTokenInstance`) for more details.*/ #[inline] - pub const fn new( - address: alloy_sol_types::private::Address, - __provider: P, - ) -> Self { + pub const fn new(address: alloy_sol_types::private::Address, __provider: P) -> Self { Self { address, provider: __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. + 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.*/ + For more fine-grained control over the deployment process, use [`deploy_builder`] instead.*/ #[inline] pub async fn deploy( __provider: P, @@ -4094,20 +3888,17 @@ For more fine-grained control over the deployment process, use [`deploy_builder` cowDao: alloy_sol_types::private::Address, totalSupply: alloy_sol_types::private::primitives::aliases::U256, ) -> alloy_contract::Result> { - let call_builder = Self::deploy_builder( - __provider, - initialTokenHolder, - cowDao, - totalSupply, - ); + let call_builder = + Self::deploy_builder(__provider, initialTokenHolder, cowDao, totalSupply); 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. + 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.*/ + 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, @@ -4119,33 +3910,35 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ __provider, [ &BYTECODE[..], - &alloy_sol_types::SolConstructor::abi_encode( - &constructorCall { - initialTokenHolder, - cowDao, - totalSupply, - }, - )[..], + &alloy_sol_types::SolConstructor::abi_encode(&constructorCall { + initialTokenHolder, + cowDao, + totalSupply, + })[..], ] - .concat() - .into(), + .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 { @@ -4153,7 +3946,8 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ } } impl CowProtocolTokenInstance<&P, N> { - /// Clones the provider and returns a new instance with the cloned provider. + /// Clones the provider and returns a new instance with the cloned + /// provider. #[inline] pub fn with_cloned_provider(self) -> CowProtocolTokenInstance { CowProtocolTokenInstance { @@ -4164,26 +3958,29 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ } } /// Function calls. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > CowProtocolTokenInstance { - /// Creates a new call builder using this contract instance's provider and address. + impl, N: alloy_contract::private::Network> + CowProtocolTokenInstance + { + /// 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. + /// 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 [`DOMAIN_SEPARATOR`] function. pub fn DOMAIN_SEPARATOR( &self, ) -> alloy_contract::SolCallBuilder<&P, DOMAIN_SEPARATORCall, N> { self.call_builder(&DOMAIN_SEPARATORCall) } + ///Creates a new call builder for the [`allowance`] function. pub fn allowance( &self, @@ -4192,6 +3989,7 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ ) -> 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, @@ -4200,6 +3998,7 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ ) -> alloy_contract::SolCallBuilder<&P, approveCall, N> { self.call_builder(&approveCall { spender, amount }) } + ///Creates a new call builder for the [`balanceOf`] function. pub fn balanceOf( &self, @@ -4207,10 +4006,12 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ ) -> alloy_contract::SolCallBuilder<&P, balanceOfCall, N> { self.call_builder(&balanceOfCall { account }) } + ///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 [`mint`] function. pub fn mint( &self, @@ -4219,10 +4020,12 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ ) -> alloy_contract::SolCallBuilder<&P, mintCall, N> { self.call_builder(&mintCall { target, 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 [`nonces`] function. pub fn nonces( &self, @@ -4230,6 +4033,7 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ ) -> alloy_contract::SolCallBuilder<&P, noncesCall, N> { self.call_builder(&noncesCall { owner }) } + ///Creates a new call builder for the [`permit`] function. pub fn permit( &self, @@ -4241,35 +4045,35 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ r: alloy_sol_types::private::FixedBytes<32>, s: alloy_sol_types::private::FixedBytes<32>, ) -> alloy_contract::SolCallBuilder<&P, permitCall, N> { - self.call_builder( - &permitCall { - owner, - spender, - value, - deadline, - v, - r, - s, - }, - ) + self.call_builder(&permitCall { + owner, + spender, + value, + deadline, + v, + r, + s, + }) } - ///Creates a new call builder for the [`simulateDelegatecall`] function. + + ///Creates a new call builder for the [`simulateDelegatecall`] + /// function. pub fn simulateDelegatecall( &self, targetContract: alloy_sol_types::private::Address, calldataPayload: alloy_sol_types::private::Bytes, ) -> alloy_contract::SolCallBuilder<&P, simulateDelegatecallCall, N> { - self.call_builder( - &simulateDelegatecallCall { - targetContract, - calldataPayload, - }, - ) + self.call_builder(&simulateDelegatecallCall { + targetContract, + calldataPayload, + }) } + ///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 [`transfer`] function. pub fn transfer( &self, @@ -4278,6 +4082,7 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ ) -> alloy_contract::SolCallBuilder<&P, transferCall, N> { self.call_builder(&transferCall { recipient, amount }) } + ///Creates a new call builder for the [`transferFrom`] function. pub fn transferFrom( &self, @@ -4285,90 +4090,69 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ recipient: alloy_sol_types::private::Address, amount: alloy_sol_types::private::primitives::aliases::U256, ) -> alloy_contract::SolCallBuilder<&P, transferFromCall, N> { - self.call_builder( - &transferFromCall { - sender, - recipient, - amount, - }, - ) + self.call_builder(&transferFromCall { + sender, + recipient, + amount, + }) } } /// Event filters. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > CowProtocolTokenInstance { - /// Creates a new event filter using this contract instance's provider and address. + impl, N: alloy_contract::private::Network> + CowProtocolTokenInstance + { + /// 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. + /// 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 [`Transfer`] event. pub fn Transfer_filter(&self) -> alloy_contract::Event<&P, Transfer, N> { self.event_filter::() } } } -pub type Instance = CowProtocolToken::CowProtocolTokenInstance< - ::alloy_provider::DynProvider, ->; +pub type Instance = CowProtocolToken::CowProtocolTokenInstance<::alloy_provider::DynProvider>; use { - std::{sync::LazyLock, collections::HashMap}, - anyhow::{Result, Context}, - alloy_primitives::{address, Address}, - alloy_provider::{Provider, DynProvider}, + alloy_primitives::{Address, address}, + alloy_provider::{DynProvider, Provider}, + anyhow::{Context, Result}, + std::{collections::HashMap, sync::LazyLock}, }; pub const fn deployment_info(chain_id: u64) -> Option<(Address, Option)> { match chain_id { - 1u64 => { - Some(( - ::alloy_primitives::address!( - "0xDEf1CA1fb7FBcDC777520aa7f396b4E015F497aB" - ), - None, - )) - } - 100u64 => { - Some(( - ::alloy_primitives::address!( - "0x177127622c4A00F3d409B75571e12cB3c8973d3c" - ), - None, - )) - } - 8453u64 => { - Some(( - ::alloy_primitives::address!( - "0xc694a91e6b071bF030A18BD3053A7fE09B6DaE69" - ), - None, - )) - } - 42161u64 => { - Some(( - ::alloy_primitives::address!( - "0xcb8b5CD20BdCaea9a010aC1F8d835824F5C87A04" - ), - None, - )) - } - 11155111u64 => { - Some(( - ::alloy_primitives::address!( - "0x0625aFB445C3B6B7B929342a04A22599fd5dBB59" - ), - None, - )) - } + 1u64 => Some(( + ::alloy_primitives::address!("0xDEf1CA1fb7FBcDC777520aa7f396b4E015F497aB"), + None, + )), + 100u64 => Some(( + ::alloy_primitives::address!("0x177127622c4A00F3d409B75571e12cB3c8973d3c"), + None, + )), + 8453u64 => Some(( + ::alloy_primitives::address!("0xc694a91e6b071bF030A18BD3053A7fE09B6DaE69"), + None, + )), + 42161u64 => Some(( + ::alloy_primitives::address!("0xcb8b5CD20BdCaea9a010aC1F8d835824F5C87A04"), + None, + )), + 11155111u64 => Some(( + ::alloy_primitives::address!("0x0625aFB445C3B6B7B929342a04A22599fd5dBB59"), + None, + )), _ => None, } } @@ -4385,9 +4169,7 @@ pub const fn deployment_block(chain_id: &u64) -> Option { } } impl Instance { - pub fn deployed( - provider: &DynProvider, - ) -> impl Future> + Send { + pub fn deployed(provider: &DynProvider) -> impl Future> + Send { async move { let chain_id = provider .get_chain_id() diff --git a/contracts/generated/contracts-generated/cowsettlementforwarder/src/lib.rs b/contracts/generated/contracts-generated/cowsettlementforwarder/src/lib.rs index f6a9b83a32..c22351f5ef 100644 --- a/contracts/generated/contracts-generated/cowsettlementforwarder/src/lib.rs +++ b/contracts/generated/contracts-generated/cowsettlementforwarder/src/lib.rs @@ -1,4 +1,10 @@ -#![allow(unused_imports, unused_attributes, clippy::all, rustdoc::all, non_snake_case)] +#![allow( + unused_imports, + unused_attributes, + clippy::all, + rustdoc::all, + non_snake_case +)] //! Auto-generated contract bindings. Do not edit. /** @@ -107,8 +113,7 @@ interface CowSettlementForwarder { clippy::empty_structs_with_brackets )] pub mod CowSettlementForwarder { - use super::*; - use alloy_sol_types as alloy_sol_types; + use {super::*, alloy_sol_types}; /// The creation / init bytecode of the contract. /// /// ```text @@ -131,9 +136,9 @@ pub mod CowSettlementForwarder { ); #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Custom error with signature `Unauthorized()` and selector `0x82b42900`. -```solidity -error Unauthorized(); -```*/ + ```solidity + error Unauthorized(); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct Unauthorized; @@ -144,7 +149,7 @@ error Unauthorized(); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[doc(hidden)] #[allow(dead_code)] type UnderlyingSolTuple<'a> = (); @@ -152,9 +157,7 @@ error Unauthorized(); type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -178,35 +181,37 @@ error Unauthorized(); #[automatically_derived] impl alloy_sol_types::SolError for Unauthorized { type Parameters<'a> = UnderlyingSolTuple<'a>; - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "Unauthorized()"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [130u8, 180u8, 41u8, 0u8]; + const SIGNATURE: &'static str = "Unauthorized()"; + #[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) + as alloy_sol_types::SolType>::abi_decode_sequence_validate( + data, + ) + .map(Self::new) } } }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Event with signature `ApprovedCallerSet(address,bool)` and selector `0x68ed3b38c2f0d62db783d9c67eaf2c4af5a242f77c7280ef00694036995009f0`. -```solidity -event ApprovedCallerSet(address indexed caller, bool approved); -```*/ + ```solidity + event ApprovedCallerSet(address indexed caller, bool approved); + ```*/ #[allow( non_camel_case_types, non_snake_case, @@ -227,24 +232,25 @@ event ApprovedCallerSet(address indexed caller, bool approved); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[automatically_derived] impl alloy_sol_types::SolEvent for ApprovedCallerSet { + type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type DataTuple<'a> = (alloy_sol_types::sol_data::Bool,); - 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, ); - const SIGNATURE: &'static str = "ApprovedCallerSet(address,bool)"; - const SIGNATURE_HASH: alloy_sol_types::private::B256 = alloy_sol_types::private::B256::new([ - 104u8, 237u8, 59u8, 56u8, 194u8, 240u8, 214u8, 45u8, 183u8, 131u8, 217u8, - 198u8, 126u8, 175u8, 44u8, 74u8, 245u8, 162u8, 66u8, 247u8, 124u8, 114u8, - 128u8, 239u8, 0u8, 105u8, 64u8, 54u8, 153u8, 80u8, 9u8, 240u8, - ]); + const ANONYMOUS: bool = false; + const SIGNATURE: &'static str = "ApprovedCallerSet(address,bool)"; + const SIGNATURE_HASH: alloy_sol_types::private::B256 = + alloy_sol_types::private::B256::new([ + 104u8, 237u8, 59u8, 56u8, 194u8, 240u8, 214u8, 45u8, 183u8, 131u8, 217u8, + 198u8, 126u8, 175u8, 44u8, 74u8, 245u8, 162u8, 66u8, 247u8, 124u8, 114u8, + 128u8, 239u8, 0u8, 105u8, 64u8, 54u8, 153u8, 80u8, 9u8, 240u8, + ]); + #[allow(unused_variables)] #[inline] fn new( @@ -256,21 +262,21 @@ event ApprovedCallerSet(address indexed caller, bool approved); approved: 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, - ), - ); + 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<'_> { ( @@ -279,10 +285,12 @@ event ApprovedCallerSet(address indexed caller, bool approved); ), ) } + #[inline] fn topics(&self) -> ::RustType { (Self::SIGNATURE_HASH.into(), self.caller.clone()) } + #[inline] fn encode_topics_raw( &self, @@ -291,9 +299,7 @@ event ApprovedCallerSet(address indexed caller, bool approved); if out.len() < ::COUNT { return Err(alloy_sol_types::Error::Overrun); } - out[0usize] = alloy_sol_types::abi::token::WordToken( - Self::SIGNATURE_HASH, - ); + out[0usize] = alloy_sol_types::abi::token::WordToken(Self::SIGNATURE_HASH); out[1usize] = ::encode_topic( &self.caller, ); @@ -305,6 +311,7 @@ event ApprovedCallerSet(address indexed caller, bool approved); 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) } @@ -319,9 +326,9 @@ event ApprovedCallerSet(address indexed caller, bool approved); }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `forward(address,bytes)` and selector `0x6fadcf72`. -```solidity -function forward(address target, bytes memory data) external payable; -```*/ + ```solidity + function forward(address target, bytes memory data) external payable; + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct forwardCall { @@ -330,7 +337,8 @@ function forward(address target, bytes memory data) external payable; #[allow(missing_docs)] pub data: alloy_sol_types::private::Bytes, } - ///Container type for the return parameters of the [`forward(address,bytes)`](forwardCall) function. + ///Container type for the return parameters of the + /// [`forward(address,bytes)`](forwardCall) function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct forwardReturn {} @@ -341,7 +349,7 @@ function forward(address target, bytes memory data) external payable; clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -356,9 +364,7 @@ function forward(address target, bytes memory data) external payable; ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -391,9 +397,7 @@ function forward(address target, bytes memory data) external payable; type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -416,9 +420,7 @@ function forward(address target, bytes memory data) external payable; } } impl forwardReturn { - fn _tokenize( - &self, - ) -> ::ReturnToken<'_> { + fn _tokenize(&self) -> ::ReturnToken<'_> { () } } @@ -428,22 +430,21 @@ function forward(address target, bytes memory data) external payable; alloy_sol_types::sol_data::Address, alloy_sol_types::sol_data::Bytes, ); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = forwardReturn; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "forward(address,bytes)"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [111u8, 173u8, 207u8, 114u8]; + const SIGNATURE: &'static str = "forward(address,bytes)"; + #[inline] fn new<'a>( tuple: as alloy_sol_types::SolType>::RustType, ) -> Self { tuple.into() } + #[inline] fn tokenize(&self) -> Self::Token<'_> { ( @@ -455,38 +456,38 @@ function forward(address target, bytes memory data) external payable; ), ) } + #[inline] fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { forwardReturn::_tokenize(ret) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) + 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) + 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(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `isApprovedCaller(address)` and selector `0x91309118`. -```solidity -function isApprovedCaller(address) external view returns (bool); -```*/ + ```solidity + function isApprovedCaller(address) external view returns (bool); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct isApprovedCallerCall(pub alloy_sol_types::private::Address); #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`isApprovedCaller(address)`](isApprovedCallerCall) function. + ///Container type for the return parameters of the + /// [`isApprovedCaller(address)`](isApprovedCallerCall) function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct isApprovedCallerReturn { @@ -500,7 +501,7 @@ function isApprovedCaller(address) external view returns (bool); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -509,9 +510,7 @@ function isApprovedCaller(address) external view returns (bool); type UnderlyingRustTuple<'a> = (alloy_sol_types::private::Address,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -520,16 +519,14 @@ function isApprovedCaller(address) external view returns (bool); } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From - for UnderlyingRustTuple<'_> { + impl ::core::convert::From for UnderlyingRustTuple<'_> { fn from(value: isApprovedCallerCall) -> Self { (value.0,) } } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From> - for isApprovedCallerCall { + impl ::core::convert::From> for isApprovedCallerCall { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { Self(tuple.0) } @@ -543,9 +540,7 @@ function isApprovedCaller(address) external view returns (bool); type UnderlyingRustTuple<'a> = (bool,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -554,16 +549,14 @@ function isApprovedCaller(address) external view returns (bool); } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From - for UnderlyingRustTuple<'_> { + impl ::core::convert::From for UnderlyingRustTuple<'_> { fn from(value: isApprovedCallerReturn) -> Self { (value._0,) } } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From> - for isApprovedCallerReturn { + impl ::core::convert::From> for isApprovedCallerReturn { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { Self { _0: tuple.0 } } @@ -572,22 +565,21 @@ function isApprovedCaller(address) external view returns (bool); #[automatically_derived] impl alloy_sol_types::SolCall for isApprovedCallerCall { type Parameters<'a> = (alloy_sol_types::sol_data::Address,); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = bool; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (alloy_sol_types::sol_data::Bool,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "isApprovedCaller(address)"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [145u8, 48u8, 145u8, 24u8]; + const SIGNATURE: &'static str = "isApprovedCaller(address)"; + #[inline] fn new<'a>( tuple: as alloy_sol_types::SolType>::RustType, ) -> Self { tuple.into() } + #[inline] fn tokenize(&self) -> Self::Token<'_> { ( @@ -596,43 +588,39 @@ function isApprovedCaller(address) external view returns (bool); ), ) } + #[inline] fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { - ( - ::tokenize( - ret, - ), - ) + (::tokenize(ret),) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) - .map(|r| { + as alloy_sol_types::SolType>::abi_decode_sequence(data).map( + |r| { let r: isApprovedCallerReturn = 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: isApprovedCallerReturn = r.into(); - r._0 - }) + 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: isApprovedCallerReturn = r.into(); + r._0 + }) } } }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `setApprovedCallers(address[],bool)` and selector `0xdbce662a`. -```solidity -function setApprovedCallers(address[] memory callers, bool approved) external; -```*/ + ```solidity + function setApprovedCallers(address[] memory callers, bool approved) external; + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct setApprovedCallersCall { @@ -641,7 +629,8 @@ function setApprovedCallers(address[] memory callers, bool approved) external; #[allow(missing_docs)] pub approved: bool, } - ///Container type for the return parameters of the [`setApprovedCallers(address[],bool)`](setApprovedCallersCall) function. + ///Container type for the return parameters of the + /// [`setApprovedCallers(address[],bool)`](setApprovedCallersCall) function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct setApprovedCallersReturn {} @@ -652,7 +641,7 @@ function setApprovedCallers(address[] memory callers, bool approved) external; clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -667,9 +656,7 @@ function setApprovedCallers(address[] memory callers, bool approved) external; ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -678,16 +665,14 @@ function setApprovedCallers(address[] memory callers, bool approved) external; } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From - for UnderlyingRustTuple<'_> { + impl ::core::convert::From for UnderlyingRustTuple<'_> { fn from(value: setApprovedCallersCall) -> Self { (value.callers, value.approved) } } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From> - for setApprovedCallersCall { + impl ::core::convert::From> for setApprovedCallersCall { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { Self { callers: tuple.0, @@ -704,9 +689,7 @@ function setApprovedCallers(address[] memory callers, bool approved) external; type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -715,16 +698,14 @@ function setApprovedCallers(address[] memory callers, bool approved) external; } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From - for UnderlyingRustTuple<'_> { + impl ::core::convert::From for UnderlyingRustTuple<'_> { fn from(value: setApprovedCallersReturn) -> Self { () } } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From> - for setApprovedCallersReturn { + impl ::core::convert::From> for setApprovedCallersReturn { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { Self {} } @@ -743,22 +724,21 @@ function setApprovedCallers(address[] memory callers, bool approved) external; alloy_sol_types::sol_data::Array, alloy_sol_types::sol_data::Bool, ); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = setApprovedCallersReturn; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "setApprovedCallers(address[],bool)"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [219u8, 206u8, 102u8, 42u8]; + const SIGNATURE: &'static str = "setApprovedCallers(address[],bool)"; + #[inline] fn new<'a>( tuple: as alloy_sol_types::SolType>::RustType, ) -> Self { tuple.into() } + #[inline] fn tokenize(&self) -> Self::Token<'_> { ( @@ -770,31 +750,29 @@ function setApprovedCallers(address[] memory callers, bool approved) external; ), ) } + #[inline] fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { setApprovedCallersReturn::_tokenize(ret) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) + 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) + 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 [`CowSettlementForwarder`](self) function calls. #[derive(Clone)] - #[derive()] pub enum CowSettlementForwarderCalls { #[allow(missing_docs)] forward(forwardCall), @@ -806,8 +784,9 @@ function setApprovedCallers(address[] memory callers, bool approved) external; impl CowSettlementForwarderCalls { /// 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. + /// 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]] = &[ @@ -815,18 +794,19 @@ function setApprovedCallers(address[] memory callers, bool approved) external; [145u8, 48u8, 145u8, 24u8], [219u8, 206u8, 102u8, 42u8], ]; - /// The names of the variants in the same order as `SELECTORS`. - pub const VARIANT_NAMES: &'static [&'static str] = &[ - ::core::stringify!(forward), - ::core::stringify!(isApprovedCaller), - ::core::stringify!(setApprovedCallers), - ]; /// The signatures in the same order as `SELECTORS`. pub const SIGNATURES: &'static [&'static str] = &[ ::SIGNATURE, ::SIGNATURE, ::SIGNATURE, ]; + /// The names of the variants in the same order as `SELECTORS`. + pub const VARIANT_NAMES: &'static [&'static str] = &[ + ::core::stringify!(forward), + ::core::stringify!(isApprovedCaller), + ::core::stringify!(setApprovedCallers), + ]; + /// Returns the signature for the given selector, if known. #[inline] pub fn signature_by_selector( @@ -839,20 +819,20 @@ function setApprovedCallers(address[] memory callers, bool approved) external; ::core::result::Result::Err(_) => ::core::option::Option::None, } } + /// Returns the enum variant name for the given selector, if known. #[inline] - pub fn name_by_selector( - selector: [u8; 4usize], - ) -> ::core::option::Option<&'static str> { + pub fn name_by_selector(selector: [u8; 4usize]) -> ::core::option::Option<&'static str> { let sig = Self::signature_by_selector(selector)?; sig.split_once('(').map(|(name, _)| name) } } #[automatically_derived] impl alloy_sol_types::SolInterface for CowSettlementForwarderCalls { - const NAME: &'static str = "CowSettlementForwarderCalls"; - const MIN_DATA_LENGTH: usize = 32usize; const COUNT: usize = 3usize; + const MIN_DATA_LENGTH: usize = 32usize; + const NAME: &'static str = "CowSettlementForwarderCalls"; + #[inline] fn selector(&self) -> [u8; 4] { match self { @@ -865,23 +845,24 @@ function setApprovedCallers(address[] memory callers, bool approved) external; } } } + #[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 { + fn abi_decode_raw(selector: [u8; 4], data: &[u8]) -> alloy_sol_types::Result { static DECODE_SHIMS: &[fn( &[u8], - ) -> alloy_sol_types::Result] = &[ + ) + -> alloy_sol_types::Result] = &[ { fn forward( data: &[u8], @@ -895,9 +876,7 @@ function setApprovedCallers(address[] memory callers, bool approved) external; fn isApprovedCaller( data: &[u8], ) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, - ) + ::abi_decode_raw(data) .map(CowSettlementForwarderCalls::isApprovedCaller) } isApprovedCaller @@ -906,24 +885,21 @@ function setApprovedCallers(address[] memory callers, bool approved) external; fn setApprovedCallers( data: &[u8], ) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, - ) + ::abi_decode_raw(data) .map(CowSettlementForwarderCalls::setApprovedCallers) } setApprovedCallers }, ]; let Ok(idx) = Self::SELECTORS.binary_search(&selector) else { - return Err( - alloy_sol_types::Error::unknown_selector( - ::NAME, - selector, - ), - ); + return Err(alloy_sol_types::Error::unknown_selector( + ::NAME, + selector, + )); }; DECODE_SHIMS[idx](data) } + #[inline] #[allow(non_snake_case)] fn abi_decode_raw_validate( @@ -932,14 +908,14 @@ function setApprovedCallers(address[] memory callers, bool approved) external; ) -> alloy_sol_types::Result { static DECODE_VALIDATE_SHIMS: &[fn( &[u8], - ) -> alloy_sol_types::Result] = &[ + ) -> alloy_sol_types::Result< + CowSettlementForwarderCalls, + >] = &[ { fn forward( data: &[u8], ) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) + ::abi_decode_raw_validate(data) .map(CowSettlementForwarderCalls::forward) } forward @@ -949,9 +925,9 @@ function setApprovedCallers(address[] memory callers, bool approved) external; data: &[u8], ) -> alloy_sol_types::Result { ::abi_decode_raw_validate( - data, - ) - .map(CowSettlementForwarderCalls::isApprovedCaller) + data, + ) + .map(CowSettlementForwarderCalls::isApprovedCaller) } isApprovedCaller }, @@ -968,15 +944,14 @@ function setApprovedCallers(address[] memory callers, bool approved) external; }, ]; let Ok(idx) = Self::SELECTORS.binary_search(&selector) else { - return Err( - alloy_sol_types::Error::unknown_selector( - ::NAME, - selector, - ), - ); + return Err(alloy_sol_types::Error::unknown_selector( + ::NAME, + selector, + )); }; DECODE_VALIDATE_SHIMS[idx](data) } + #[inline] fn abi_encoded_size(&self) -> usize { match self { @@ -984,17 +959,14 @@ function setApprovedCallers(address[] memory callers, bool approved) external; ::abi_encoded_size(inner) } Self::isApprovedCaller(inner) => { - ::abi_encoded_size( - inner, - ) + ::abi_encoded_size(inner) } Self::setApprovedCallers(inner) => { - ::abi_encoded_size( - inner, - ) + ::abi_encoded_size(inner) } } } + #[inline] fn abi_encode_raw(&self, out: &mut alloy_sol_types::private::Vec) { match self { @@ -1002,23 +974,16 @@ function setApprovedCallers(address[] memory callers, bool approved) external; ::abi_encode_raw(inner, out) } Self::isApprovedCaller(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } Self::setApprovedCallers(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } } } } ///Container for all the [`CowSettlementForwarder`](self) custom errors. - #[derive(Clone)] - #[derive(Debug, PartialEq, Eq, Hash)] + #[derive(Clone, Debug, PartialEq, Eq, Hash)] pub enum CowSettlementForwarderErrors { #[allow(missing_docs)] Unauthorized(Unauthorized), @@ -1026,19 +991,18 @@ function setApprovedCallers(address[] memory callers, bool approved) external; impl CowSettlementForwarderErrors { /// 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. + /// 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]] = &[[130u8, 180u8, 41u8, 0u8]]; - /// The names of the variants in the same order as `SELECTORS`. - pub const VARIANT_NAMES: &'static [&'static str] = &[ - ::core::stringify!(Unauthorized), - ]; /// The signatures in the same order as `SELECTORS`. - pub const SIGNATURES: &'static [&'static str] = &[ - ::SIGNATURE, - ]; + pub const SIGNATURES: &'static [&'static str] = + &[::SIGNATURE]; + /// The names of the variants in the same order as `SELECTORS`. + pub const VARIANT_NAMES: &'static [&'static str] = &[::core::stringify!(Unauthorized)]; + /// Returns the signature for the given selector, if known. #[inline] pub fn signature_by_selector( @@ -1051,65 +1015,61 @@ function setApprovedCallers(address[] memory callers, bool approved) external; ::core::result::Result::Err(_) => ::core::option::Option::None, } } + /// Returns the enum variant name for the given selector, if known. #[inline] - pub fn name_by_selector( - selector: [u8; 4usize], - ) -> ::core::option::Option<&'static str> { + pub fn name_by_selector(selector: [u8; 4usize]) -> ::core::option::Option<&'static str> { let sig = Self::signature_by_selector(selector)?; sig.split_once('(').map(|(name, _)| name) } } #[automatically_derived] impl alloy_sol_types::SolInterface for CowSettlementForwarderErrors { - const NAME: &'static str = "CowSettlementForwarderErrors"; - const MIN_DATA_LENGTH: usize = 0usize; const COUNT: usize = 1usize; + const MIN_DATA_LENGTH: usize = 0usize; + const NAME: &'static str = "CowSettlementForwarderErrors"; + #[inline] fn selector(&self) -> [u8; 4] { match self { - Self::Unauthorized(_) => { - ::SELECTOR - } + Self::Unauthorized(_) => ::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 { + fn abi_decode_raw(selector: [u8; 4], data: &[u8]) -> alloy_sol_types::Result { static DECODE_SHIMS: &[fn( &[u8], - ) -> alloy_sol_types::Result] = &[ - { - fn Unauthorized( - data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw(data) - .map(CowSettlementForwarderErrors::Unauthorized) - } - Unauthorized - }, - ]; + ) + -> alloy_sol_types::Result] = &[{ + fn Unauthorized( + data: &[u8], + ) -> alloy_sol_types::Result { + ::abi_decode_raw(data) + .map(CowSettlementForwarderErrors::Unauthorized) + } + Unauthorized + }]; let Ok(idx) = Self::SELECTORS.binary_search(&selector) else { - return Err( - alloy_sol_types::Error::unknown_selector( - ::NAME, - selector, - ), - ); + return Err(alloy_sol_types::Error::unknown_selector( + ::NAME, + selector, + )); }; DECODE_SHIMS[idx](data) } + #[inline] #[allow(non_snake_case)] fn abi_decode_raw_validate( @@ -1118,29 +1078,26 @@ function setApprovedCallers(address[] memory callers, bool approved) external; ) -> alloy_sol_types::Result { static DECODE_VALIDATE_SHIMS: &[fn( &[u8], - ) -> alloy_sol_types::Result] = &[ - { - fn Unauthorized( - data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) - .map(CowSettlementForwarderErrors::Unauthorized) - } - Unauthorized - }, - ]; + ) -> alloy_sol_types::Result< + CowSettlementForwarderErrors, + >] = &[{ + fn Unauthorized( + data: &[u8], + ) -> alloy_sol_types::Result { + ::abi_decode_raw_validate(data) + .map(CowSettlementForwarderErrors::Unauthorized) + } + Unauthorized + }]; let Ok(idx) = Self::SELECTORS.binary_search(&selector) else { - return Err( - alloy_sol_types::Error::unknown_selector( - ::NAME, - selector, - ), - ); + return Err(alloy_sol_types::Error::unknown_selector( + ::NAME, + selector, + )); }; DECODE_VALIDATE_SHIMS[idx](data) } + #[inline] fn abi_encoded_size(&self) -> usize { match self { @@ -1149,21 +1106,18 @@ function setApprovedCallers(address[] memory callers, bool approved) external; } } } + #[inline] fn abi_encode_raw(&self, out: &mut alloy_sol_types::private::Vec) { match self { Self::Unauthorized(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } } } } ///Container for all the [`CowSettlementForwarder`](self) events. - #[derive(Clone)] - #[derive(Debug, PartialEq, Eq, Hash)] + #[derive(Clone, Debug, PartialEq, Eq, Hash)] pub enum CowSettlementForwarderEvents { #[allow(missing_docs)] ApprovedCallerSet(ApprovedCallerSet), @@ -1171,25 +1125,22 @@ function setApprovedCallers(address[] memory callers, bool approved) external; impl CowSettlementForwarderEvents { /// 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. + /// 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]] = &[ - [ - 104u8, 237u8, 59u8, 56u8, 194u8, 240u8, 214u8, 45u8, 183u8, 131u8, 217u8, - 198u8, 126u8, 175u8, 44u8, 74u8, 245u8, 162u8, 66u8, 247u8, 124u8, 114u8, - 128u8, 239u8, 0u8, 105u8, 64u8, 54u8, 153u8, 80u8, 9u8, 240u8, - ], - ]; - /// The names of the variants in the same order as `SELECTORS`. - pub const VARIANT_NAMES: &'static [&'static str] = &[ - ::core::stringify!(ApprovedCallerSet), - ]; + pub const SELECTORS: &'static [[u8; 32usize]] = &[[ + 104u8, 237u8, 59u8, 56u8, 194u8, 240u8, 214u8, 45u8, 183u8, 131u8, 217u8, 198u8, 126u8, + 175u8, 44u8, 74u8, 245u8, 162u8, 66u8, 247u8, 124u8, 114u8, 128u8, 239u8, 0u8, 105u8, + 64u8, 54u8, 153u8, 80u8, 9u8, 240u8, + ]]; /// The signatures in the same order as `SELECTORS`. - pub const SIGNATURES: &'static [&'static str] = &[ - ::SIGNATURE, - ]; + pub const SIGNATURES: &'static [&'static str] = + &[::SIGNATURE]; + /// The names of the variants in the same order as `SELECTORS`. + pub const VARIANT_NAMES: &'static [&'static str] = &[::core::stringify!(ApprovedCallerSet)]; + /// Returns the signature for the given selector, if known. #[inline] pub fn signature_by_selector( @@ -1202,44 +1153,37 @@ function setApprovedCallers(address[] memory callers, bool approved) external; ::core::result::Result::Err(_) => ::core::option::Option::None, } } + /// Returns the enum variant name for the given selector, if known. #[inline] - pub fn name_by_selector( - selector: [u8; 32usize], - ) -> ::core::option::Option<&'static str> { + pub fn name_by_selector(selector: [u8; 32usize]) -> ::core::option::Option<&'static str> { let sig = Self::signature_by_selector(selector)?; sig.split_once('(').map(|(name, _)| name) } } #[automatically_derived] impl alloy_sol_types::SolEventInterface for CowSettlementForwarderEvents { - const NAME: &'static str = "CowSettlementForwarderEvents"; const COUNT: usize = 1usize; + const NAME: &'static str = "CowSettlementForwarderEvents"; + 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, - ) + Some(::SIGNATURE_HASH) => { + ::decode_raw_log(topics, data) .map(Self::ApprovedCallerSet) } - _ => { - 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(), - ), + _ => 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(), ), - }) - } + ), + }), } } } @@ -1252,6 +1196,7 @@ function setApprovedCallers(address[] memory callers, bool approved) external; } } } + fn into_log_data(self) -> alloy_sol_types::private::LogData { match self { Self::ApprovedCallerSet(inner) => { @@ -1260,10 +1205,10 @@ function setApprovedCallers(address[] memory callers, bool approved) external; } } } - use alloy_contract as alloy_contract; + use alloy_contract; /**Creates a new wrapper around an on-chain [`CowSettlementForwarder`](self) contract instance. -See the [wrapper's documentation](`CowSettlementForwarderInstance`) for more details.*/ + See the [wrapper's documentation](`CowSettlementForwarderInstance`) for more details.*/ #[inline] pub const fn new< P: alloy_contract::private::Provider, @@ -1276,43 +1221,41 @@ See the [wrapper's documentation](`CowSettlementForwarderInstance`) for more det } /**Deploys this contract using the given `provider` and constructor arguments, if any. -Returns a new instance of the contract, if the deployment was successful. + 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.*/ + 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, - >( + pub fn deploy, N: alloy_contract::private::Network>( __provider: P, - ) -> impl ::core::future::Future< - Output = alloy_contract::Result>, - > { + ) -> impl ::core::future::Future>> + { CowSettlementForwarderInstance::::deploy(__provider) } /**Creates a `RawCallBuilder` for deploying this contract using the given `provider` -and constructor arguments, if any. + 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.*/ + 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) -> alloy_contract::RawCallBuilder { + >( + __provider: P, + ) -> alloy_contract::RawCallBuilder { CowSettlementForwarderInstance::::deploy_builder(__provider) } /**A [`CowSettlementForwarder`](self) instance. -Contains type-safe methods for interacting with an on-chain instance of the -[`CowSettlementForwarder`](self) contract located at a given `address`, using a given -provider `P`. + Contains type-safe methods for interacting with an on-chain instance of the + [`CowSettlementForwarder`](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. + 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.*/ + See the [module-level documentation](self) for all the available methods.*/ #[derive(Clone)] pub struct CowSettlementForwarderInstance { address: alloy_sol_types::private::Address, @@ -1323,33 +1266,32 @@ See the [module-level documentation](self) for all the available methods.*/ impl ::core::fmt::Debug for CowSettlementForwarderInstance { #[inline] fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { - f.debug_tuple("CowSettlementForwarderInstance").field(&self.address).finish() + f.debug_tuple("CowSettlementForwarderInstance") + .field(&self.address) + .finish() } } /// Instantiation and getters/setters. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > CowSettlementForwarderInstance { + impl, N: alloy_contract::private::Network> + CowSettlementForwarderInstance + { /**Creates a new wrapper around an on-chain [`CowSettlementForwarder`](self) contract instance. -See the [wrapper's documentation](`CowSettlementForwarderInstance`) for more details.*/ + See the [wrapper's documentation](`CowSettlementForwarderInstance`) for more details.*/ #[inline] - pub const fn new( - address: alloy_sol_types::private::Address, - __provider: P, - ) -> Self { + pub const fn new(address: alloy_sol_types::private::Address, __provider: P) -> Self { Self { address, provider: __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. + 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.*/ + For more fine-grained control over the deployment process, use [`deploy_builder`] instead.*/ #[inline] pub async fn deploy( __provider: P, @@ -1358,11 +1300,12 @@ For more fine-grained control over the deployment process, use [`deploy_builder` 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. + 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.*/ + 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( @@ -1370,21 +1313,25 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ ::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 { @@ -1392,7 +1339,8 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ } } impl CowSettlementForwarderInstance<&P, N> { - /// Clones the provider and returns a new instance with the cloned provider. + /// Clones the provider and returns a new instance with the cloned + /// provider. #[inline] pub fn with_cloned_provider(self) -> CowSettlementForwarderInstance { CowSettlementForwarderInstance { @@ -1403,20 +1351,22 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ } } /// Function calls. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > CowSettlementForwarderInstance { - /// Creates a new call builder using this contract instance's provider and address. + impl, N: alloy_contract::private::Network> + CowSettlementForwarderInstance + { + /// 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. + /// 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 [`forward`] function. pub fn forward( &self, @@ -1425,6 +1375,7 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ ) -> alloy_contract::SolCallBuilder<&P, forwardCall, N> { self.call_builder(&forwardCall { target, data }) } + ///Creates a new call builder for the [`isApprovedCaller`] function. pub fn isApprovedCaller( &self, @@ -1432,42 +1383,37 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ ) -> alloy_contract::SolCallBuilder<&P, isApprovedCallerCall, N> { self.call_builder(&isApprovedCallerCall(_0)) } + ///Creates a new call builder for the [`setApprovedCallers`] function. pub fn setApprovedCallers( &self, callers: alloy_sol_types::private::Vec, approved: bool, ) -> alloy_contract::SolCallBuilder<&P, setApprovedCallersCall, N> { - self.call_builder( - &setApprovedCallersCall { - callers, - approved, - }, - ) + self.call_builder(&setApprovedCallersCall { callers, approved }) } } /// Event filters. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > CowSettlementForwarderInstance { - /// Creates a new event filter using this contract instance's provider and address. + impl, N: alloy_contract::private::Network> + CowSettlementForwarderInstance + { + /// 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. + /// 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 [`ApprovedCallerSet`] event. - pub fn ApprovedCallerSet_filter( - &self, - ) -> alloy_contract::Event<&P, ApprovedCallerSet, N> { + pub fn ApprovedCallerSet_filter(&self) -> alloy_contract::Event<&P, ApprovedCallerSet, N> { self.event_filter::() } } } -pub type Instance = CowSettlementForwarder::CowSettlementForwarderInstance< - ::alloy_provider::DynProvider, ->; +pub type Instance = + CowSettlementForwarder::CowSettlementForwarderInstance<::alloy_provider::DynProvider>; diff --git a/contracts/generated/contracts-generated/cowswapethflow/src/lib.rs b/contracts/generated/contracts-generated/cowswapethflow/src/lib.rs index 3f612fe0c4..272812c50a 100644 --- a/contracts/generated/contracts-generated/cowswapethflow/src/lib.rs +++ b/contracts/generated/contracts-generated/cowswapethflow/src/lib.rs @@ -1,4 +1,10 @@ -#![allow(unused_imports, unused_attributes, clippy::all, rustdoc::all, non_snake_case)] +#![allow( + unused_imports, + unused_attributes, + clippy::all, + rustdoc::all, + non_snake_case +)] //! Auto-generated contract bindings. Do not edit. ///Module containing a contract's types and functions. /** @@ -16,12 +22,11 @@ library EthFlowOrder { clippy::empty_structs_with_brackets )] pub mod EthFlowOrder { - use super::*; - use alloy_sol_types as alloy_sol_types; + use {super::*, alloy_sol_types}; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**```solidity -struct Data { address buyToken; address receiver; uint256 sellAmount; uint256 buyAmount; bytes32 appData; uint256 feeAmount; uint32 validTo; bool partiallyFillable; int64 quoteId; } -```*/ + struct Data { address buyToken; address receiver; uint256 sellAmount; uint256 buyAmount; bytes32 appData; uint256 feeAmount; uint32 validTo; bool partiallyFillable; int64 quoteId; } + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct Data { @@ -51,7 +56,7 @@ struct Data { address buyToken; address receiver; uint256 sellAmount; uint256 bu clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[doc(hidden)] #[allow(dead_code)] type UnderlyingSolTuple<'a> = ( @@ -79,9 +84,7 @@ struct Data { address buyToken; address receiver; uint256 sellAmount; uint256 bu ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -160,91 +163,90 @@ struct Data { address buyToken; address receiver; uint256 sellAmount; uint256 bu > as alloy_sol_types::SolType>::tokenize(&self.quoteId), ) } + #[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) + 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) + 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) + 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 Data { type RustType = Self; - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + + const ENCODED_SIZE: Option = + as alloy_sol_types::SolType>::ENCODED_SIZE; + const PACKED_ENCODED_SIZE: Option = + as alloy_sol_types::SolType>::PACKED_ENCODED_SIZE; 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); + let tuple = as alloy_sol_types::SolType>::detokenize(token); >>::from(tuple) } } #[automatically_derived] impl alloy_sol_types::SolStruct for Data { const NAME: &'static str = "Data"; + #[inline] fn eip712_root_type() -> alloy_sol_types::private::Cow<'static, str> { alloy_sol_types::private::Cow::Borrowed( - "Data(address buyToken,address receiver,uint256 sellAmount,uint256 buyAmount,bytes32 appData,uint256 feeAmount,uint32 validTo,bool partiallyFillable,int64 quoteId)", + "Data(address buyToken,address receiver,uint256 sellAmount,uint256 \ + buyAmount,bytes32 appData,uint256 feeAmount,uint32 validTo,bool \ + partiallyFillable,int64 quoteId)", ) } + #[inline] - fn eip712_components() -> alloy_sol_types::private::Vec< - alloy_sol_types::private::Cow<'static, str>, - > { + fn eip712_components() + -> alloy_sol_types::private::Vec> + { 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 { [ @@ -333,14 +335,13 @@ struct Data { address buyToken; address receiver; uint256 sellAmount; uint256 bu &rust.quoteId, ) } + #[inline] fn encode_topic_preimage( rust: &Self::RustType, out: &mut alloy_sol_types::private::Vec, ) { - out.reserve( - ::topic_preimage_length(rust), - ); + out.reserve(::topic_preimage_length(rust)); ::encode_topic_preimage( &rust.buyToken, out, @@ -390,25 +391,19 @@ struct Data { address buyToken; address receiver; uint256 sellAmount; uint256 bu out, ); } + #[inline] - fn encode_topic( - rust: &Self::RustType, - ) -> alloy_sol_types::abi::token::WordToken { + 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), - ) + ::encode_topic_preimage(rust, &mut out); + alloy_sol_types::abi::token::WordToken(alloy_sol_types::private::keccak256(out)) } } }; - use alloy_contract as alloy_contract; + use alloy_contract; /**Creates a new wrapper around an on-chain [`EthFlowOrder`](self) contract instance. -See the [wrapper's documentation](`EthFlowOrderInstance`) for more details.*/ + See the [wrapper's documentation](`EthFlowOrderInstance`) for more details.*/ #[inline] pub const fn new< P: alloy_contract::private::Provider, @@ -421,15 +416,15 @@ See the [wrapper's documentation](`EthFlowOrderInstance`) for more details.*/ } /**A [`EthFlowOrder`](self) instance. -Contains type-safe methods for interacting with an on-chain instance of the -[`EthFlowOrder`](self) contract located at a given `address`, using a given -provider `P`. + Contains type-safe methods for interacting with an on-chain instance of the + [`EthFlowOrder`](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. + 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.*/ + See the [module-level documentation](self) for all the available methods.*/ #[derive(Clone)] pub struct EthFlowOrderInstance { address: alloy_sol_types::private::Address, @@ -440,43 +435,45 @@ See the [module-level documentation](self) for all the available methods.*/ impl ::core::fmt::Debug for EthFlowOrderInstance { #[inline] fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { - f.debug_tuple("EthFlowOrderInstance").field(&self.address).finish() + f.debug_tuple("EthFlowOrderInstance") + .field(&self.address) + .finish() } } /// Instantiation and getters/setters. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > EthFlowOrderInstance { + impl, N: alloy_contract::private::Network> + EthFlowOrderInstance + { /**Creates a new wrapper around an on-chain [`EthFlowOrder`](self) contract instance. -See the [wrapper's documentation](`EthFlowOrderInstance`) for more details.*/ + See the [wrapper's documentation](`EthFlowOrderInstance`) for more details.*/ #[inline] - pub const fn new( - address: alloy_sol_types::private::Address, - __provider: P, - ) -> Self { + pub const fn new(address: alloy_sol_types::private::Address, __provider: P) -> Self { Self { address, provider: __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 { @@ -484,7 +481,8 @@ See the [wrapper's documentation](`EthFlowOrderInstance`) for more details.*/ } } impl EthFlowOrderInstance<&P, N> { - /// Clones the provider and returns a new instance with the cloned provider. + /// Clones the provider and returns a new instance with the cloned + /// provider. #[inline] pub fn with_cloned_provider(self) -> EthFlowOrderInstance { EthFlowOrderInstance { @@ -495,14 +493,15 @@ See the [wrapper's documentation](`EthFlowOrderInstance`) for more details.*/ } } /// Function calls. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > EthFlowOrderInstance { - /// Creates a new call builder using this contract instance's provider and address. + impl, N: alloy_contract::private::Network> + EthFlowOrderInstance + { + /// 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. + /// 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, @@ -511,14 +510,15 @@ See the [wrapper's documentation](`EthFlowOrderInstance`) for more details.*/ } } /// Event filters. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > EthFlowOrderInstance { - /// Creates a new event filter using this contract instance's provider and address. + impl, N: alloy_contract::private::Network> + EthFlowOrderInstance + { + /// 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. + /// 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> { @@ -542,12 +542,11 @@ library GPv2Order { clippy::empty_structs_with_brackets )] pub mod GPv2Order { - use super::*; - use alloy_sol_types as alloy_sol_types; + use {super::*, alloy_sol_types}; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**```solidity -struct Data { address sellToken; address buyToken; address receiver; uint256 sellAmount; uint256 buyAmount; uint32 validTo; bytes32 appData; uint256 feeAmount; bytes32 kind; bool partiallyFillable; bytes32 sellTokenBalance; bytes32 buyTokenBalance; } -```*/ + struct Data { address sellToken; address buyToken; address receiver; uint256 sellAmount; uint256 buyAmount; uint32 validTo; bytes32 appData; uint256 feeAmount; bytes32 kind; bool partiallyFillable; bytes32 sellTokenBalance; bytes32 buyTokenBalance; } + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct Data { @@ -583,7 +582,7 @@ struct Data { address sellToken; address buyToken; address receiver; uint256 sel clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[doc(hidden)] #[allow(dead_code)] type UnderlyingSolTuple<'a> = ( @@ -617,9 +616,7 @@ struct Data { address sellToken; address buyToken; address receiver; uint256 sel ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -713,91 +710,91 @@ struct Data { address sellToken; address buyToken; address receiver; uint256 sel > as alloy_sol_types::SolType>::tokenize(&self.buyTokenBalance), ) } + #[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) + 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) + 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) + 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 Data { type RustType = Self; - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + + const ENCODED_SIZE: Option = + as alloy_sol_types::SolType>::ENCODED_SIZE; + const PACKED_ENCODED_SIZE: Option = + as alloy_sol_types::SolType>::PACKED_ENCODED_SIZE; 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); + let tuple = as alloy_sol_types::SolType>::detokenize(token); >>::from(tuple) } } #[automatically_derived] impl alloy_sol_types::SolStruct for Data { const NAME: &'static str = "Data"; + #[inline] fn eip712_root_type() -> alloy_sol_types::private::Cow<'static, str> { alloy_sol_types::private::Cow::Borrowed( - "Data(address sellToken,address buyToken,address receiver,uint256 sellAmount,uint256 buyAmount,uint32 validTo,bytes32 appData,uint256 feeAmount,bytes32 kind,bool partiallyFillable,bytes32 sellTokenBalance,bytes32 buyTokenBalance)", + "Data(address sellToken,address buyToken,address receiver,uint256 \ + sellAmount,uint256 buyAmount,uint32 validTo,bytes32 appData,uint256 \ + feeAmount,bytes32 kind,bool partiallyFillable,bytes32 \ + sellTokenBalance,bytes32 buyTokenBalance)", ) } + #[inline] - fn eip712_components() -> alloy_sol_types::private::Vec< - alloy_sol_types::private::Cow<'static, str>, - > { + fn eip712_components() + -> alloy_sol_types::private::Vec> + { 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 { [ @@ -913,14 +910,13 @@ struct Data { address sellToken; address buyToken; address receiver; uint256 sel &rust.buyTokenBalance, ) } + #[inline] fn encode_topic_preimage( rust: &Self::RustType, out: &mut alloy_sol_types::private::Vec, ) { - out.reserve( - ::topic_preimage_length(rust), - ); + out.reserve(::topic_preimage_length(rust)); ::encode_topic_preimage( &rust.sellToken, out, @@ -986,25 +982,19 @@ struct Data { address sellToken; address buyToken; address receiver; uint256 sel out, ); } + #[inline] - fn encode_topic( - rust: &Self::RustType, - ) -> alloy_sol_types::abi::token::WordToken { + 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), - ) + ::encode_topic_preimage(rust, &mut out); + alloy_sol_types::abi::token::WordToken(alloy_sol_types::private::keccak256(out)) } } }; - use alloy_contract as alloy_contract; + use alloy_contract; /**Creates a new wrapper around an on-chain [`GPv2Order`](self) contract instance. -See the [wrapper's documentation](`GPv2OrderInstance`) for more details.*/ + See the [wrapper's documentation](`GPv2OrderInstance`) for more details.*/ #[inline] pub const fn new< P: alloy_contract::private::Provider, @@ -1017,15 +1007,15 @@ See the [wrapper's documentation](`GPv2OrderInstance`) for more details.*/ } /**A [`GPv2Order`](self) instance. -Contains type-safe methods for interacting with an on-chain instance of the -[`GPv2Order`](self) contract located at a given `address`, using a given -provider `P`. + Contains type-safe methods for interacting with an on-chain instance of the + [`GPv2Order`](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. + 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.*/ + See the [module-level documentation](self) for all the available methods.*/ #[derive(Clone)] pub struct GPv2OrderInstance { address: alloy_sol_types::private::Address, @@ -1036,43 +1026,45 @@ See the [module-level documentation](self) for all the available methods.*/ impl ::core::fmt::Debug for GPv2OrderInstance { #[inline] fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { - f.debug_tuple("GPv2OrderInstance").field(&self.address).finish() + f.debug_tuple("GPv2OrderInstance") + .field(&self.address) + .finish() } } /// Instantiation and getters/setters. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > GPv2OrderInstance { + impl, N: alloy_contract::private::Network> + GPv2OrderInstance + { /**Creates a new wrapper around an on-chain [`GPv2Order`](self) contract instance. -See the [wrapper's documentation](`GPv2OrderInstance`) for more details.*/ + See the [wrapper's documentation](`GPv2OrderInstance`) for more details.*/ #[inline] - pub const fn new( - address: alloy_sol_types::private::Address, - __provider: P, - ) -> Self { + pub const fn new(address: alloy_sol_types::private::Address, __provider: P) -> Self { Self { address, provider: __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 { @@ -1080,7 +1072,8 @@ See the [wrapper's documentation](`GPv2OrderInstance`) for more details.*/ } } impl GPv2OrderInstance<&P, N> { - /// Clones the provider and returns a new instance with the cloned provider. + /// Clones the provider and returns a new instance with the cloned + /// provider. #[inline] pub fn with_cloned_provider(self) -> GPv2OrderInstance { GPv2OrderInstance { @@ -1091,14 +1084,15 @@ See the [wrapper's documentation](`GPv2OrderInstance`) for more details.*/ } } /// Function calls. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > GPv2OrderInstance { - /// Creates a new call builder using this contract instance's provider and address. + impl, N: alloy_contract::private::Network> + GPv2OrderInstance + { + /// 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. + /// 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, @@ -1107,14 +1101,15 @@ See the [wrapper's documentation](`GPv2OrderInstance`) for more details.*/ } } /// Event filters. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > GPv2OrderInstance { - /// Creates a new event filter using this contract instance's provider and address. + impl, N: alloy_contract::private::Network> + GPv2OrderInstance + { + /// 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. + /// 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> { @@ -1139,68 +1134,67 @@ library ICoWSwapOnchainOrders { clippy::empty_structs_with_brackets )] pub mod ICoWSwapOnchainOrders { - use super::*; - use alloy_sol_types as alloy_sol_types; + use {super::*, alloy_sol_types}; #[derive(Default, Debug, PartialEq, Eq, Hash)] #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct OnchainSigningScheme(u8); const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[automatically_derived] impl alloy_sol_types::private::SolTypeValue for u8 { #[inline] fn stv_to_tokens( &self, - ) -> as alloy_sol_types::SolType>::Token<'_> { + ) -> as alloy_sol_types::SolType>::Token<'_> + { alloy_sol_types::private::SolTypeValue::< alloy_sol_types::sol_data::Uint<8>, >::stv_to_tokens(self) } + #[inline] fn stv_eip712_data_word(&self) -> alloy_sol_types::Word { - as alloy_sol_types::SolType>::tokenize(self) - .0 + as alloy_sol_types::SolType>::tokenize(self).0 } + #[inline] - fn stv_abi_encode_packed_to( - &self, - out: &mut alloy_sol_types::private::Vec, - ) { + fn stv_abi_encode_packed_to(&self, out: &mut alloy_sol_types::private::Vec) { as alloy_sol_types::SolType>::abi_encode_packed_to(self, out) } + #[inline] fn stv_abi_packed_encoded_size(&self) -> usize { - as alloy_sol_types::SolType>::abi_encoded_size(self) + as alloy_sol_types::SolType>::abi_encoded_size( + self, + ) } } impl OnchainSigningScheme { /// The Solidity type name. pub const NAME: &'static str = stringify!(@ name); + /// Convert from the underlying value type. #[inline] pub const fn from_underlying(value: u8) -> Self { Self(value) } + /// Return the underlying value. #[inline] pub const fn into_underlying(self) -> u8 { self.0 } + /// Return the single encoding of this value, delegating to the /// underlying type. #[inline] pub fn abi_encode(&self) -> alloy_sol_types::private::Vec { ::abi_encode(&self.0) } + /// Return the packed encoding of this value, delegating to the /// underlying type. #[inline] @@ -1223,31 +1217,29 @@ pub mod ICoWSwapOnchainOrders { #[automatically_derived] impl alloy_sol_types::SolType for OnchainSigningScheme { type RustType = u8; - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SOL_NAME: &'static str = Self::NAME; - const ENCODED_SIZE: Option = as alloy_sol_types::SolType>::ENCODED_SIZE; + type Token<'a> = + as alloy_sol_types::SolType>::Token<'a>; + + const ENCODED_SIZE: Option = + as alloy_sol_types::SolType>::ENCODED_SIZE; const PACKED_ENCODED_SIZE: Option = as alloy_sol_types::SolType>::PACKED_ENCODED_SIZE; + const SOL_NAME: &'static str = Self::NAME; + #[inline] fn valid_token(token: &Self::Token<'_>) -> bool { Self::type_check(token).is_ok() } + #[inline] fn type_check(token: &Self::Token<'_>) -> alloy_sol_types::Result<()> { - as alloy_sol_types::SolType>::type_check(token) + as alloy_sol_types::SolType>::type_check(token) } + #[inline] fn detokenize(token: Self::Token<'_>) -> Self::RustType { - as alloy_sol_types::SolType>::detokenize(token) + as alloy_sol_types::SolType>::detokenize(token) } } #[automatically_derived] @@ -1258,6 +1250,7 @@ pub mod ICoWSwapOnchainOrders { 8, > as alloy_sol_types::EventTopic>::topic_preimage_length(rust) } + #[inline] fn encode_topic_preimage( rust: &Self::RustType, @@ -1267,20 +1260,19 @@ pub mod ICoWSwapOnchainOrders { 8, > as alloy_sol_types::EventTopic>::encode_topic_preimage(rust, out) } + #[inline] - fn encode_topic( - rust: &Self::RustType, - ) -> alloy_sol_types::abi::token::WordToken { - as alloy_sol_types::EventTopic>::encode_topic(rust) + fn encode_topic(rust: &Self::RustType) -> alloy_sol_types::abi::token::WordToken { + as alloy_sol_types::EventTopic>::encode_topic( + rust, + ) } } }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**```solidity -struct OnchainSignature { OnchainSigningScheme scheme; bytes data; } -```*/ + struct OnchainSignature { OnchainSigningScheme scheme; bytes data; } + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct OnchainSignature { @@ -1296,13 +1288,10 @@ struct OnchainSignature { OnchainSigningScheme scheme; bytes data; } clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[doc(hidden)] #[allow(dead_code)] - type UnderlyingSolTuple<'a> = ( - OnchainSigningScheme, - alloy_sol_types::sol_data::Bytes, - ); + type UnderlyingSolTuple<'a> = (OnchainSigningScheme, alloy_sol_types::sol_data::Bytes); #[doc(hidden)] type UnderlyingRustTuple<'a> = ( ::RustType, @@ -1310,9 +1299,7 @@ struct OnchainSignature { OnchainSigningScheme scheme; bytes data; } ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1345,99 +1332,92 @@ struct OnchainSignature { OnchainSigningScheme scheme; bytes data; } #[inline] fn stv_to_tokens(&self) -> ::Token<'_> { ( - ::tokenize( - &self.scheme, - ), + ::tokenize(&self.scheme), ::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) + 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) + 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) + 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 OnchainSignature { type RustType = Self; - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + + const ENCODED_SIZE: Option = + as alloy_sol_types::SolType>::ENCODED_SIZE; + const PACKED_ENCODED_SIZE: Option = + as alloy_sol_types::SolType>::PACKED_ENCODED_SIZE; 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); + let tuple = as alloy_sol_types::SolType>::detokenize(token); >>::from(tuple) } } #[automatically_derived] impl alloy_sol_types::SolStruct for OnchainSignature { const NAME: &'static str = "OnchainSignature"; + #[inline] fn eip712_root_type() -> alloy_sol_types::private::Cow<'static, str> { - alloy_sol_types::private::Cow::Borrowed( - "OnchainSignature(uint8 scheme,bytes data)", - ) + alloy_sol_types::private::Cow::Borrowed("OnchainSignature(uint8 scheme,bytes data)") } + #[inline] - fn eip712_components() -> alloy_sol_types::private::Vec< - alloy_sol_types::private::Cow<'static, str>, - > { + fn eip712_components() + -> alloy_sol_types::private::Vec> + { 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 { [ @@ -1465,14 +1445,13 @@ struct OnchainSignature { OnchainSigningScheme scheme; bytes data; } &rust.data, ) } + #[inline] fn encode_topic_preimage( rust: &Self::RustType, out: &mut alloy_sol_types::private::Vec, ) { - out.reserve( - ::topic_preimage_length(rust), - ); + out.reserve(::topic_preimage_length(rust)); ::encode_topic_preimage( &rust.scheme, out, @@ -1482,25 +1461,19 @@ struct OnchainSignature { OnchainSigningScheme scheme; bytes data; } out, ); } + #[inline] - fn encode_topic( - rust: &Self::RustType, - ) -> alloy_sol_types::abi::token::WordToken { + 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), - ) + ::encode_topic_preimage(rust, &mut out); + alloy_sol_types::abi::token::WordToken(alloy_sol_types::private::keccak256(out)) } } }; - use alloy_contract as alloy_contract; + use alloy_contract; /**Creates a new wrapper around an on-chain [`ICoWSwapOnchainOrders`](self) contract instance. -See the [wrapper's documentation](`ICoWSwapOnchainOrdersInstance`) for more details.*/ + See the [wrapper's documentation](`ICoWSwapOnchainOrdersInstance`) for more details.*/ #[inline] pub const fn new< P: alloy_contract::private::Provider, @@ -1513,15 +1486,15 @@ See the [wrapper's documentation](`ICoWSwapOnchainOrdersInstance`) for more deta } /**A [`ICoWSwapOnchainOrders`](self) instance. -Contains type-safe methods for interacting with an on-chain instance of the -[`ICoWSwapOnchainOrders`](self) contract located at a given `address`, using a given -provider `P`. + Contains type-safe methods for interacting with an on-chain instance of the + [`ICoWSwapOnchainOrders`](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. + 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.*/ + See the [module-level documentation](self) for all the available methods.*/ #[derive(Clone)] pub struct ICoWSwapOnchainOrdersInstance { address: alloy_sol_types::private::Address, @@ -1532,43 +1505,45 @@ See the [module-level documentation](self) for all the available methods.*/ impl ::core::fmt::Debug for ICoWSwapOnchainOrdersInstance { #[inline] fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { - f.debug_tuple("ICoWSwapOnchainOrdersInstance").field(&self.address).finish() + f.debug_tuple("ICoWSwapOnchainOrdersInstance") + .field(&self.address) + .finish() } } /// Instantiation and getters/setters. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > ICoWSwapOnchainOrdersInstance { + impl, N: alloy_contract::private::Network> + ICoWSwapOnchainOrdersInstance + { /**Creates a new wrapper around an on-chain [`ICoWSwapOnchainOrders`](self) contract instance. -See the [wrapper's documentation](`ICoWSwapOnchainOrdersInstance`) for more details.*/ + See the [wrapper's documentation](`ICoWSwapOnchainOrdersInstance`) for more details.*/ #[inline] - pub const fn new( - address: alloy_sol_types::private::Address, - __provider: P, - ) -> Self { + pub const fn new(address: alloy_sol_types::private::Address, __provider: P) -> Self { Self { address, provider: __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 { @@ -1576,7 +1551,8 @@ See the [wrapper's documentation](`ICoWSwapOnchainOrdersInstance`) for more deta } } impl ICoWSwapOnchainOrdersInstance<&P, N> { - /// Clones the provider and returns a new instance with the cloned provider. + /// Clones the provider and returns a new instance with the cloned + /// provider. #[inline] pub fn with_cloned_provider(self) -> ICoWSwapOnchainOrdersInstance { ICoWSwapOnchainOrdersInstance { @@ -1587,14 +1563,15 @@ See the [wrapper's documentation](`ICoWSwapOnchainOrdersInstance`) for more deta } } /// Function calls. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > ICoWSwapOnchainOrdersInstance { - /// Creates a new call builder using this contract instance's provider and address. + impl, N: alloy_contract::private::Network> + ICoWSwapOnchainOrdersInstance + { + /// 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. + /// 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, @@ -1603,14 +1580,15 @@ See the [wrapper's documentation](`ICoWSwapOnchainOrdersInstance`) for more deta } } /// Event filters. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > ICoWSwapOnchainOrdersInstance { - /// Creates a new event filter using this contract instance's provider and address. + impl, N: alloy_contract::private::Network> + ICoWSwapOnchainOrdersInstance + { + /// 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. + /// 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> { @@ -2165,8 +2143,7 @@ interface CoWSwapEthFlow { clippy::empty_structs_with_brackets )] pub mod CoWSwapEthFlow { - use super::*; - use alloy_sol_types as alloy_sol_types; + use {super::*, alloy_sol_types}; /// The creation / init bytecode of the contract. /// /// ```text @@ -2179,9 +2156,9 @@ pub mod CoWSwapEthFlow { ); #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Custom error with signature `EthTransferFailed()` and selector `0x6d963f88`. -```solidity -error EthTransferFailed(); -```*/ + ```solidity + error EthTransferFailed(); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct EthTransferFailed; @@ -2192,7 +2169,7 @@ error EthTransferFailed(); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[doc(hidden)] #[allow(dead_code)] type UnderlyingSolTuple<'a> = (); @@ -2200,9 +2177,7 @@ error EthTransferFailed(); type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -2226,35 +2201,37 @@ error EthTransferFailed(); #[automatically_derived] impl alloy_sol_types::SolError for EthTransferFailed { type Parameters<'a> = UnderlyingSolTuple<'a>; - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "EthTransferFailed()"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [109u8, 150u8, 63u8, 136u8]; + const SIGNATURE: &'static str = "EthTransferFailed()"; + #[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) + as alloy_sol_types::SolType>::abi_decode_sequence_validate( + data, + ) + .map(Self::new) } } }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Custom error with signature `IncorrectEthAmount()` and selector `0x8b6ebb4d`. -```solidity -error IncorrectEthAmount(); -```*/ + ```solidity + error IncorrectEthAmount(); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct IncorrectEthAmount; @@ -2265,7 +2242,7 @@ error IncorrectEthAmount(); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[doc(hidden)] #[allow(dead_code)] type UnderlyingSolTuple<'a> = (); @@ -2273,9 +2250,7 @@ error IncorrectEthAmount(); type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -2299,35 +2274,37 @@ error IncorrectEthAmount(); #[automatically_derived] impl alloy_sol_types::SolError for IncorrectEthAmount { type Parameters<'a> = UnderlyingSolTuple<'a>; - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "IncorrectEthAmount()"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [139u8, 110u8, 187u8, 77u8]; + const SIGNATURE: &'static str = "IncorrectEthAmount()"; + #[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) + as alloy_sol_types::SolType>::abi_decode_sequence_validate( + data, + ) + .map(Self::new) } } }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Custom error with signature `NotAllowedToInvalidateOrder(bytes32)` and selector `0xf8cc70ce`. -```solidity -error NotAllowedToInvalidateOrder(bytes32 orderHash); -```*/ + ```solidity + error NotAllowedToInvalidateOrder(bytes32 orderHash); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct NotAllowedToInvalidateOrder { @@ -2341,7 +2318,7 @@ error NotAllowedToInvalidateOrder(bytes32 orderHash); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[doc(hidden)] #[allow(dead_code)] type UnderlyingSolTuple<'a> = (alloy_sol_types::sol_data::FixedBytes<32>,); @@ -2349,9 +2326,7 @@ error NotAllowedToInvalidateOrder(bytes32 orderHash); 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, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -2360,16 +2335,14 @@ error NotAllowedToInvalidateOrder(bytes32 orderHash); } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From - for UnderlyingRustTuple<'_> { + impl ::core::convert::From for UnderlyingRustTuple<'_> { fn from(value: NotAllowedToInvalidateOrder) -> Self { (value.orderHash,) } } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From> - for NotAllowedToInvalidateOrder { + impl ::core::convert::From> for NotAllowedToInvalidateOrder { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { Self { orderHash: tuple.0 } } @@ -2377,17 +2350,18 @@ error NotAllowedToInvalidateOrder(bytes32 orderHash); #[automatically_derived] impl alloy_sol_types::SolError for NotAllowedToInvalidateOrder { type Parameters<'a> = UnderlyingSolTuple<'a>; - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "NotAllowedToInvalidateOrder(bytes32)"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [248u8, 204u8, 112u8, 206u8]; + const SIGNATURE: &'static str = "NotAllowedToInvalidateOrder(bytes32)"; + #[inline] fn new<'a>( tuple: as alloy_sol_types::SolType>::RustType, ) -> Self { tuple.into() } + #[inline] fn tokenize(&self) -> Self::Token<'_> { ( @@ -2396,20 +2370,21 @@ error NotAllowedToInvalidateOrder(bytes32 orderHash); > as alloy_sol_types::SolType>::tokenize(&self.orderHash), ) } + #[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) + as alloy_sol_types::SolType>::abi_decode_sequence_validate( + data, + ) + .map(Self::new) } } }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Custom error with signature `NotAllowedZeroSellAmount()` and selector `0xeaec5c9d`. -```solidity -error NotAllowedZeroSellAmount(); -```*/ + ```solidity + error NotAllowedZeroSellAmount(); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct NotAllowedZeroSellAmount; @@ -2420,7 +2395,7 @@ error NotAllowedZeroSellAmount(); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[doc(hidden)] #[allow(dead_code)] type UnderlyingSolTuple<'a> = (); @@ -2428,9 +2403,7 @@ error NotAllowedZeroSellAmount(); type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -2439,16 +2412,14 @@ error NotAllowedZeroSellAmount(); } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From - for UnderlyingRustTuple<'_> { + impl ::core::convert::From for UnderlyingRustTuple<'_> { fn from(value: NotAllowedZeroSellAmount) -> Self { () } } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From> - for NotAllowedZeroSellAmount { + impl ::core::convert::From> for NotAllowedZeroSellAmount { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { Self } @@ -2456,35 +2427,37 @@ error NotAllowedZeroSellAmount(); #[automatically_derived] impl alloy_sol_types::SolError for NotAllowedZeroSellAmount { type Parameters<'a> = UnderlyingSolTuple<'a>; - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "NotAllowedZeroSellAmount()"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [234u8, 236u8, 92u8, 157u8]; + const SIGNATURE: &'static str = "NotAllowedZeroSellAmount()"; + #[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) + as alloy_sol_types::SolType>::abi_decode_sequence_validate( + data, + ) + .map(Self::new) } } }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Custom error with signature `OrderIsAlreadyExpired()` and selector `0x89bb2601`. -```solidity -error OrderIsAlreadyExpired(); -```*/ + ```solidity + error OrderIsAlreadyExpired(); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct OrderIsAlreadyExpired; @@ -2495,7 +2468,7 @@ error OrderIsAlreadyExpired(); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[doc(hidden)] #[allow(dead_code)] type UnderlyingSolTuple<'a> = (); @@ -2503,9 +2476,7 @@ error OrderIsAlreadyExpired(); type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -2529,35 +2500,37 @@ error OrderIsAlreadyExpired(); #[automatically_derived] impl alloy_sol_types::SolError for OrderIsAlreadyExpired { type Parameters<'a> = UnderlyingSolTuple<'a>; - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "OrderIsAlreadyExpired()"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [137u8, 187u8, 38u8, 1u8]; + const SIGNATURE: &'static str = "OrderIsAlreadyExpired()"; + #[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) + as alloy_sol_types::SolType>::abi_decode_sequence_validate( + data, + ) + .map(Self::new) } } }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Custom error with signature `OrderIsAlreadyOwned(bytes32)` and selector `0x56a1d2b2`. -```solidity -error OrderIsAlreadyOwned(bytes32 orderHash); -```*/ + ```solidity + error OrderIsAlreadyOwned(bytes32 orderHash); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct OrderIsAlreadyOwned { @@ -2571,7 +2544,7 @@ error OrderIsAlreadyOwned(bytes32 orderHash); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[doc(hidden)] #[allow(dead_code)] type UnderlyingSolTuple<'a> = (alloy_sol_types::sol_data::FixedBytes<32>,); @@ -2579,9 +2552,7 @@ error OrderIsAlreadyOwned(bytes32 orderHash); 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, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -2605,17 +2576,18 @@ error OrderIsAlreadyOwned(bytes32 orderHash); #[automatically_derived] impl alloy_sol_types::SolError for OrderIsAlreadyOwned { type Parameters<'a> = UnderlyingSolTuple<'a>; - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "OrderIsAlreadyOwned(bytes32)"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [86u8, 161u8, 210u8, 178u8]; + const SIGNATURE: &'static str = "OrderIsAlreadyOwned(bytes32)"; + #[inline] fn new<'a>( tuple: as alloy_sol_types::SolType>::RustType, ) -> Self { tuple.into() } + #[inline] fn tokenize(&self) -> Self::Token<'_> { ( @@ -2624,20 +2596,21 @@ error OrderIsAlreadyOwned(bytes32 orderHash); > as alloy_sol_types::SolType>::tokenize(&self.orderHash), ) } + #[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) + as alloy_sol_types::SolType>::abi_decode_sequence_validate( + data, + ) + .map(Self::new) } } }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Custom error with signature `ReceiverMustBeSet()` and selector `0xefc9ccdf`. -```solidity -error ReceiverMustBeSet(); -```*/ + ```solidity + error ReceiverMustBeSet(); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct ReceiverMustBeSet; @@ -2648,7 +2621,7 @@ error ReceiverMustBeSet(); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[doc(hidden)] #[allow(dead_code)] type UnderlyingSolTuple<'a> = (); @@ -2656,9 +2629,7 @@ error ReceiverMustBeSet(); type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -2682,35 +2653,37 @@ error ReceiverMustBeSet(); #[automatically_derived] impl alloy_sol_types::SolError for ReceiverMustBeSet { type Parameters<'a> = UnderlyingSolTuple<'a>; - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "ReceiverMustBeSet()"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [239u8, 201u8, 204u8, 223u8]; + const SIGNATURE: &'static str = "ReceiverMustBeSet()"; + #[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) + as alloy_sol_types::SolType>::abi_decode_sequence_validate( + data, + ) + .map(Self::new) } } }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Event with signature `OrderInvalidation(bytes)` and selector `0xb8bad102ac8bbacfef31ff1c906ec6d951c230b4dce750bb0376b812ad35852a`. -```solidity -event OrderInvalidation(bytes orderUid); -```*/ + ```solidity + event OrderInvalidation(bytes orderUid); + ```*/ #[allow( non_camel_case_types, non_snake_case, @@ -2729,21 +2702,22 @@ event OrderInvalidation(bytes orderUid); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[automatically_derived] impl alloy_sol_types::SolEvent for OrderInvalidation { + type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type DataTuple<'a> = (alloy_sol_types::sol_data::Bytes,); - type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type TopicList = (alloy_sol_types::sol_data::FixedBytes<32>,); - const SIGNATURE: &'static str = "OrderInvalidation(bytes)"; - const SIGNATURE_HASH: alloy_sol_types::private::B256 = alloy_sol_types::private::B256::new([ - 184u8, 186u8, 209u8, 2u8, 172u8, 139u8, 186u8, 207u8, 239u8, 49u8, 255u8, - 28u8, 144u8, 110u8, 198u8, 217u8, 81u8, 194u8, 48u8, 180u8, 220u8, 231u8, - 80u8, 187u8, 3u8, 118u8, 184u8, 18u8, 173u8, 53u8, 133u8, 42u8, - ]); + const ANONYMOUS: bool = false; + const SIGNATURE: &'static str = "OrderInvalidation(bytes)"; + const SIGNATURE_HASH: alloy_sol_types::private::B256 = + alloy_sol_types::private::B256::new([ + 184u8, 186u8, 209u8, 2u8, 172u8, 139u8, 186u8, 207u8, 239u8, 49u8, 255u8, 28u8, + 144u8, 110u8, 198u8, 217u8, 81u8, 194u8, 48u8, 180u8, 220u8, 231u8, 80u8, + 187u8, 3u8, 118u8, 184u8, 18u8, 173u8, 53u8, 133u8, 42u8, + ]); + #[allow(unused_variables)] #[inline] fn new( @@ -2752,21 +2726,21 @@ event OrderInvalidation(bytes orderUid); ) -> Self { Self { orderUid: 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, - ), - ); + 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<'_> { ( @@ -2775,10 +2749,12 @@ event OrderInvalidation(bytes orderUid); ), ) } + #[inline] fn topics(&self) -> ::RustType { (Self::SIGNATURE_HASH.into(),) } + #[inline] fn encode_topics_raw( &self, @@ -2787,9 +2763,7 @@ event OrderInvalidation(bytes orderUid); if out.len() < ::COUNT { return Err(alloy_sol_types::Error::Overrun); } - out[0usize] = alloy_sol_types::abi::token::WordToken( - Self::SIGNATURE_HASH, - ); + out[0usize] = alloy_sol_types::abi::token::WordToken(Self::SIGNATURE_HASH); Ok(()) } } @@ -2798,6 +2772,7 @@ event OrderInvalidation(bytes orderUid); 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) } @@ -2812,9 +2787,9 @@ event OrderInvalidation(bytes orderUid); }; #[derive()] /**Event with signature `OrderPlacement(address,(address,address,address,uint256,uint256,uint32,bytes32,uint256,bytes32,bool,bytes32,bytes32),(uint8,bytes),bytes)` and selector `0xcf5f9de2984132265203b5c335b25727702ca77262ff622e136baa7362bf1da9`. -```solidity -event OrderPlacement(address indexed sender, GPv2Order.Data order, ICoWSwapOnchainOrders.OnchainSignature signature, bytes data); -```*/ + ```solidity + event OrderPlacement(address indexed sender, GPv2Order.Data order, ICoWSwapOnchainOrders.OnchainSignature signature, bytes data); + ```*/ #[allow( non_camel_case_types, non_snake_case, @@ -2828,7 +2803,8 @@ event OrderPlacement(address indexed sender, GPv2Order.Data order, ICoWSwapOncha #[allow(missing_docs)] pub order: ::RustType, #[allow(missing_docs)] - pub signature: ::RustType, + pub signature: + ::RustType, #[allow(missing_docs)] pub data: alloy_sol_types::private::Bytes, } @@ -2839,28 +2815,31 @@ event OrderPlacement(address indexed sender, GPv2Order.Data order, ICoWSwapOncha clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[automatically_derived] impl alloy_sol_types::SolEvent for OrderPlacement { + type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type DataTuple<'a> = ( GPv2Order::Data, ICoWSwapOnchainOrders::OnchainSignature, alloy_sol_types::sol_data::Bytes, ); - 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, ); - const SIGNATURE: &'static str = "OrderPlacement(address,(address,address,address,uint256,uint256,uint32,bytes32,uint256,bytes32,bool,bytes32,bytes32),(uint8,bytes),bytes)"; - const SIGNATURE_HASH: alloy_sol_types::private::B256 = alloy_sol_types::private::B256::new([ - 207u8, 95u8, 157u8, 226u8, 152u8, 65u8, 50u8, 38u8, 82u8, 3u8, 181u8, - 195u8, 53u8, 178u8, 87u8, 39u8, 112u8, 44u8, 167u8, 114u8, 98u8, 255u8, - 98u8, 46u8, 19u8, 107u8, 170u8, 115u8, 98u8, 191u8, 29u8, 169u8, - ]); + const ANONYMOUS: bool = false; + const SIGNATURE: &'static str = "OrderPlacement(address,(address,address,address,\ + uint256,uint256,uint32,bytes32,uint256,bytes32,bool,\ + bytes32,bytes32),(uint8,bytes),bytes)"; + const SIGNATURE_HASH: alloy_sol_types::private::B256 = + alloy_sol_types::private::B256::new([ + 207u8, 95u8, 157u8, 226u8, 152u8, 65u8, 50u8, 38u8, 82u8, 3u8, 181u8, 195u8, + 53u8, 178u8, 87u8, 39u8, 112u8, 44u8, 167u8, 114u8, 98u8, 255u8, 98u8, 46u8, + 19u8, 107u8, 170u8, 115u8, 98u8, 191u8, 29u8, 169u8, + ]); + #[allow(unused_variables)] #[inline] fn new( @@ -2874,21 +2853,21 @@ event OrderPlacement(address indexed sender, GPv2Order.Data order, ICoWSwapOncha data: data.2, } } + #[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, - ), - ); + 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<'_> { ( @@ -2901,10 +2880,12 @@ event OrderPlacement(address indexed sender, GPv2Order.Data order, ICoWSwapOncha ), ) } + #[inline] fn topics(&self) -> ::RustType { (Self::SIGNATURE_HASH.into(), self.sender.clone()) } + #[inline] fn encode_topics_raw( &self, @@ -2913,9 +2894,7 @@ event OrderPlacement(address indexed sender, GPv2Order.Data order, ICoWSwapOncha if out.len() < ::COUNT { return Err(alloy_sol_types::Error::Overrun); } - out[0usize] = alloy_sol_types::abi::token::WordToken( - Self::SIGNATURE_HASH, - ); + out[0usize] = alloy_sol_types::abi::token::WordToken(Self::SIGNATURE_HASH); out[1usize] = ::encode_topic( &self.sender, ); @@ -2927,6 +2906,7 @@ event OrderPlacement(address indexed sender, GPv2Order.Data order, ICoWSwapOncha 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) } @@ -2941,9 +2921,9 @@ event OrderPlacement(address indexed sender, GPv2Order.Data order, ICoWSwapOncha }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Event with signature `OrderRefund(bytes,address)` and selector `0x195271068a288191e4b265c641a56b9832919f69e9e7d6c2f31ba40278aeb85a`. -```solidity -event OrderRefund(bytes orderUid, address indexed refunder); -```*/ + ```solidity + event OrderRefund(bytes orderUid, address indexed refunder); + ```*/ #[allow( non_camel_case_types, non_snake_case, @@ -2964,24 +2944,25 @@ event OrderRefund(bytes orderUid, address indexed refunder); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[automatically_derived] impl alloy_sol_types::SolEvent for OrderRefund { + type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type DataTuple<'a> = (alloy_sol_types::sol_data::Bytes,); - 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, ); - const SIGNATURE: &'static str = "OrderRefund(bytes,address)"; - const SIGNATURE_HASH: alloy_sol_types::private::B256 = alloy_sol_types::private::B256::new([ - 25u8, 82u8, 113u8, 6u8, 138u8, 40u8, 129u8, 145u8, 228u8, 178u8, 101u8, - 198u8, 65u8, 165u8, 107u8, 152u8, 50u8, 145u8, 159u8, 105u8, 233u8, - 231u8, 214u8, 194u8, 243u8, 27u8, 164u8, 2u8, 120u8, 174u8, 184u8, 90u8, - ]); + const ANONYMOUS: bool = false; + const SIGNATURE: &'static str = "OrderRefund(bytes,address)"; + const SIGNATURE_HASH: alloy_sol_types::private::B256 = + alloy_sol_types::private::B256::new([ + 25u8, 82u8, 113u8, 6u8, 138u8, 40u8, 129u8, 145u8, 228u8, 178u8, 101u8, 198u8, + 65u8, 165u8, 107u8, 152u8, 50u8, 145u8, 159u8, 105u8, 233u8, 231u8, 214u8, + 194u8, 243u8, 27u8, 164u8, 2u8, 120u8, 174u8, 184u8, 90u8, + ]); + #[allow(unused_variables)] #[inline] fn new( @@ -2993,21 +2974,21 @@ event OrderRefund(bytes orderUid, address indexed refunder); refunder: topics.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, - ), - ); + 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<'_> { ( @@ -3016,10 +2997,12 @@ event OrderRefund(bytes orderUid, address indexed refunder); ), ) } + #[inline] fn topics(&self) -> ::RustType { (Self::SIGNATURE_HASH.into(), self.refunder.clone()) } + #[inline] fn encode_topics_raw( &self, @@ -3028,9 +3011,7 @@ event OrderRefund(bytes orderUid, address indexed refunder); if out.len() < ::COUNT { return Err(alloy_sol_types::Error::Overrun); } - out[0usize] = alloy_sol_types::abi::token::WordToken( - Self::SIGNATURE_HASH, - ); + out[0usize] = alloy_sol_types::abi::token::WordToken(Self::SIGNATURE_HASH); out[1usize] = ::encode_topic( &self.refunder, ); @@ -3042,6 +3023,7 @@ event OrderRefund(bytes orderUid, address indexed refunder); 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) } @@ -3055,9 +3037,9 @@ event OrderRefund(bytes orderUid, address indexed refunder); } }; /**Constructor`. -```solidity -constructor(address _cowSwapSettlement, address _wrappedNativeToken); -```*/ + ```solidity + constructor(address _cowSwapSettlement, address _wrappedNativeToken); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct constructorCall { @@ -3067,7 +3049,7 @@ constructor(address _cowSwapSettlement, address _wrappedNativeToken); pub _wrappedNativeToken: alloy_sol_types::private::Address, } const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -3082,9 +3064,7 @@ constructor(address _cowSwapSettlement, address _wrappedNativeToken); ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -3115,15 +3095,15 @@ constructor(address _cowSwapSettlement, address _wrappedNativeToken); alloy_sol_types::sol_data::Address, alloy_sol_types::sol_data::Address, ); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + 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<'_> { ( @@ -3139,9 +3119,9 @@ constructor(address _cowSwapSettlement, address _wrappedNativeToken); }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `createOrder((address,address,uint256,uint256,bytes32,uint256,uint32,bool,int64))` and selector `0x322bba21`. -```solidity -function createOrder(EthFlowOrder.Data memory order) external payable returns (bytes32 orderHash); -```*/ + ```solidity + function createOrder(EthFlowOrder.Data memory order) external payable returns (bytes32 orderHash); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct createOrderCall { @@ -3149,7 +3129,9 @@ function createOrder(EthFlowOrder.Data memory order) external payable returns (b pub order: ::RustType, } #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`createOrder((address,address,uint256,uint256,bytes32,uint256,uint32,bool,int64))`](createOrderCall) function. + ///Container type for the return parameters of the + /// [`createOrder((address,address,uint256,uint256,bytes32,uint256,uint32, + /// bool,int64))`](createOrderCall) function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct createOrderReturn { @@ -3163,20 +3145,17 @@ function createOrder(EthFlowOrder.Data memory order) external payable returns (b clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] type UnderlyingSolTuple<'a> = (EthFlowOrder::Data,); #[doc(hidden)] - type UnderlyingRustTuple<'a> = ( - ::RustType, - ); + type UnderlyingRustTuple<'a> = + (::RustType,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -3206,9 +3185,7 @@ function createOrder(EthFlowOrder.Data memory order) external payable returns (b 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, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -3233,30 +3210,29 @@ function createOrder(EthFlowOrder.Data memory order) external payable returns (b #[automatically_derived] impl alloy_sol_types::SolCall for createOrderCall { type Parameters<'a> = (EthFlowOrder::Data,); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = alloy_sol_types::private::FixedBytes<32>; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (alloy_sol_types::sol_data::FixedBytes<32>,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "createOrder((address,address,uint256,uint256,bytes32,uint256,uint32,bool,int64))"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [50u8, 43u8, 186u8, 33u8]; + const SIGNATURE: &'static str = + "createOrder((address,address,uint256,uint256,bytes32,uint256,uint32,bool,int64))"; + #[inline] fn new<'a>( tuple: as alloy_sol_types::SolType>::RustType, ) -> Self { tuple.into() } + #[inline] fn tokenize(&self) -> Self::Token<'_> { - ( - ::tokenize( - &self.order, - ), - ) + (::tokenize( + &self.order, + ),) } + #[inline] fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { ( @@ -3265,42 +3241,43 @@ function createOrder(EthFlowOrder.Data memory order) external payable returns (b > 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| { + as alloy_sol_types::SolType>::abi_decode_sequence(data).map( + |r| { let r: createOrderReturn = r.into(); r.orderHash - }) + }, + ) } + #[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: createOrderReturn = r.into(); - r.orderHash - }) + 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: createOrderReturn = r.into(); + r.orderHash + }) } } }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `invalidateOrder((address,address,uint256,uint256,bytes32,uint256,uint32,bool,int64))` and selector `0x7bc41b96`. -```solidity -function invalidateOrder(EthFlowOrder.Data memory order) external; -```*/ + ```solidity + function invalidateOrder(EthFlowOrder.Data memory order) external; + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct invalidateOrderCall { #[allow(missing_docs)] pub order: ::RustType, } - ///Container type for the return parameters of the [`invalidateOrder((address,address,uint256,uint256,bytes32,uint256,uint32,bool,int64))`](invalidateOrderCall) function. + ///Container type for the return parameters of the + /// [`invalidateOrder((address,address,uint256,uint256,bytes32,uint256, + /// uint32,bool,int64))`](invalidateOrderCall) function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct invalidateOrderReturn {} @@ -3311,20 +3288,17 @@ function invalidateOrder(EthFlowOrder.Data memory order) external; clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] type UnderlyingSolTuple<'a> = (EthFlowOrder::Data,); #[doc(hidden)] - type UnderlyingRustTuple<'a> = ( - ::RustType, - ); + type UnderlyingRustTuple<'a> = + (::RustType,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -3354,9 +3328,7 @@ function invalidateOrder(EthFlowOrder.Data memory order) external; type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -3365,16 +3337,14 @@ function invalidateOrder(EthFlowOrder.Data memory order) external; } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From - for UnderlyingRustTuple<'_> { + impl ::core::convert::From for UnderlyingRustTuple<'_> { fn from(value: invalidateOrderReturn) -> Self { () } } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From> - for invalidateOrderReturn { + impl ::core::convert::From> for invalidateOrderReturn { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { Self {} } @@ -3390,57 +3360,54 @@ function invalidateOrder(EthFlowOrder.Data memory order) external; #[automatically_derived] impl alloy_sol_types::SolCall for invalidateOrderCall { type Parameters<'a> = (EthFlowOrder::Data,); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = invalidateOrderReturn; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "invalidateOrder((address,address,uint256,uint256,bytes32,uint256,uint32,bool,int64))"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [123u8, 196u8, 27u8, 150u8]; + const SIGNATURE: &'static str = "invalidateOrder((address,address,uint256,uint256,\ + bytes32,uint256,uint32,bool,int64))"; + #[inline] fn new<'a>( tuple: as alloy_sol_types::SolType>::RustType, ) -> Self { tuple.into() } + #[inline] fn tokenize(&self) -> Self::Token<'_> { - ( - ::tokenize( - &self.order, - ), - ) + (::tokenize( + &self.order, + ),) } + #[inline] fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { invalidateOrderReturn::_tokenize(ret) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) + 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) + 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(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `invalidateOrdersIgnoringNotAllowed((address,address,uint256,uint256,bytes32,uint256,uint32,bool,int64)[])` and selector `0x4cb76498`. -```solidity -function invalidateOrdersIgnoringNotAllowed(EthFlowOrder.Data[] memory orderArray) external; -```*/ + ```solidity + function invalidateOrdersIgnoringNotAllowed(EthFlowOrder.Data[] memory orderArray) external; + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct invalidateOrdersIgnoringNotAllowedCall { @@ -3449,7 +3416,10 @@ function invalidateOrdersIgnoringNotAllowed(EthFlowOrder.Data[] memory orderArra ::RustType, >, } - ///Container type for the return parameters of the [`invalidateOrdersIgnoringNotAllowed((address,address,uint256,uint256,bytes32,uint256,uint32,bool,int64)[])`](invalidateOrdersIgnoringNotAllowedCall) function. + ///Container type for the return parameters of the + /// [`invalidateOrdersIgnoringNotAllowed((address,address,uint256,uint256, + /// bytes32,uint256,uint32,bool, + /// int64)[])`](invalidateOrdersIgnoringNotAllowedCall) function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct invalidateOrdersIgnoringNotAllowedReturn {} @@ -3460,13 +3430,11 @@ function invalidateOrdersIgnoringNotAllowed(EthFlowOrder.Data[] memory orderArra clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] - type UnderlyingSolTuple<'a> = ( - alloy_sol_types::sol_data::Array, - ); + type UnderlyingSolTuple<'a> = (alloy_sol_types::sol_data::Array,); #[doc(hidden)] type UnderlyingRustTuple<'a> = ( alloy_sol_types::private::Vec< @@ -3475,9 +3443,7 @@ function invalidateOrdersIgnoringNotAllowed(EthFlowOrder.Data[] memory orderArra ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -3486,18 +3452,18 @@ function invalidateOrdersIgnoringNotAllowed(EthFlowOrder.Data[] memory orderArra } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From - for UnderlyingRustTuple<'_> { + impl ::core::convert::From for UnderlyingRustTuple<'_> { fn from(value: invalidateOrdersIgnoringNotAllowedCall) -> Self { (value.orderArray,) } } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From> - for invalidateOrdersIgnoringNotAllowedCall { + impl ::core::convert::From> for invalidateOrdersIgnoringNotAllowedCall { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { - Self { orderArray: tuple.0 } + Self { + orderArray: tuple.0, + } } } } @@ -3509,9 +3475,7 @@ function invalidateOrdersIgnoringNotAllowed(EthFlowOrder.Data[] memory orderArra type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -3520,16 +3484,14 @@ function invalidateOrdersIgnoringNotAllowed(EthFlowOrder.Data[] memory orderArra } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From - for UnderlyingRustTuple<'_> { + impl ::core::convert::From for UnderlyingRustTuple<'_> { fn from(value: invalidateOrdersIgnoringNotAllowedReturn) -> Self { () } } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From> - for invalidateOrdersIgnoringNotAllowedReturn { + impl ::core::convert::From> for invalidateOrdersIgnoringNotAllowedReturn { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { Self {} } @@ -3538,33 +3500,30 @@ function invalidateOrdersIgnoringNotAllowed(EthFlowOrder.Data[] memory orderArra impl invalidateOrdersIgnoringNotAllowedReturn { fn _tokenize( &self, - ) -> ::ReturnToken< - '_, - > { + ) -> ::ReturnToken<'_> + { () } } #[automatically_derived] impl alloy_sol_types::SolCall for invalidateOrdersIgnoringNotAllowedCall { - type Parameters<'a> = ( - alloy_sol_types::sol_data::Array, - ); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Parameters<'a> = (alloy_sol_types::sol_data::Array,); type Return = invalidateOrdersIgnoringNotAllowedReturn; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "invalidateOrdersIgnoringNotAllowed((address,address,uint256,uint256,bytes32,uint256,uint32,bool,int64)[])"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [76u8, 183u8, 100u8, 152u8]; + const SIGNATURE: &'static str = "invalidateOrdersIgnoringNotAllowed((address,address,\ + uint256,uint256,bytes32,uint256,uint32,bool,int64)[])"; + #[inline] fn new<'a>( tuple: as alloy_sol_types::SolType>::RustType, ) -> Self { tuple.into() } + #[inline] fn tokenize(&self) -> Self::Token<'_> { ( @@ -3573,33 +3532,32 @@ function invalidateOrdersIgnoringNotAllowed(EthFlowOrder.Data[] memory orderArra > as alloy_sol_types::SolType>::tokenize(&self.orderArray), ) } + #[inline] fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { invalidateOrdersIgnoringNotAllowedReturn::_tokenize(ret) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) + 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) + 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(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `isValidSignature(bytes32,bytes)` and selector `0x1626ba7e`. -```solidity -function isValidSignature(bytes32 orderHash, bytes memory) external view returns (bytes4); -```*/ + ```solidity + function isValidSignature(bytes32 orderHash, bytes memory) external view returns (bytes4); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct isValidSignatureCall { @@ -3609,7 +3567,8 @@ function isValidSignature(bytes32 orderHash, bytes memory) external view returns pub _1: alloy_sol_types::private::Bytes, } #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`isValidSignature(bytes32,bytes)`](isValidSignatureCall) function. + ///Container type for the return parameters of the + /// [`isValidSignature(bytes32,bytes)`](isValidSignatureCall) function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct isValidSignatureReturn { @@ -3623,7 +3582,7 @@ function isValidSignature(bytes32 orderHash, bytes memory) external view returns clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -3638,9 +3597,7 @@ function isValidSignature(bytes32 orderHash, bytes memory) external view returns ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -3649,16 +3606,14 @@ function isValidSignature(bytes32 orderHash, bytes memory) external view returns } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From - for UnderlyingRustTuple<'_> { + impl ::core::convert::From for UnderlyingRustTuple<'_> { fn from(value: isValidSignatureCall) -> Self { (value.orderHash, value._1) } } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From> - for isValidSignatureCall { + impl ::core::convert::From> for isValidSignatureCall { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { Self { orderHash: tuple.0, @@ -3675,9 +3630,7 @@ function isValidSignature(bytes32 orderHash, bytes memory) external view returns 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, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -3686,16 +3639,14 @@ function isValidSignature(bytes32 orderHash, bytes memory) external view returns } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From - for UnderlyingRustTuple<'_> { + impl ::core::convert::From for UnderlyingRustTuple<'_> { fn from(value: isValidSignatureReturn) -> Self { (value._0,) } } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From> - for isValidSignatureReturn { + impl ::core::convert::From> for isValidSignatureReturn { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { Self { _0: tuple.0 } } @@ -3707,22 +3658,21 @@ function isValidSignature(bytes32 orderHash, bytes memory) external view returns alloy_sol_types::sol_data::FixedBytes<32>, alloy_sol_types::sol_data::Bytes, ); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = alloy_sol_types::private::FixedBytes<4>; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (alloy_sol_types::sol_data::FixedBytes<4>,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "isValidSignature(bytes32,bytes)"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [22u8, 38u8, 186u8, 126u8]; + const SIGNATURE: &'static str = "isValidSignature(bytes32,bytes)"; + #[inline] fn new<'a>( tuple: as alloy_sol_types::SolType>::RustType, ) -> Self { tuple.into() } + #[inline] fn tokenize(&self) -> Self::Token<'_> { ( @@ -3734,6 +3684,7 @@ function isValidSignature(bytes32 orderHash, bytes memory) external view returns ), ) } + #[inline] fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { ( @@ -3742,40 +3693,40 @@ function isValidSignature(bytes32 orderHash, bytes memory) external view returns > 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| { + as alloy_sol_types::SolType>::abi_decode_sequence(data).map( + |r| { let r: isValidSignatureReturn = 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: isValidSignatureReturn = r.into(); - r._0 - }) + 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: isValidSignatureReturn = r.into(); + r._0 + }) } } }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `orders(bytes32)` and selector `0x9c3f1e90`. -```solidity -function orders(bytes32) external view returns (address owner, uint32 validTo); -```*/ + ```solidity + function orders(bytes32) external view returns (address owner, uint32 validTo); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct ordersCall(pub alloy_sol_types::private::FixedBytes<32>); #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`orders(bytes32)`](ordersCall) function. + ///Container type for the return parameters of the + /// [`orders(bytes32)`](ordersCall) function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct ordersReturn { @@ -3791,7 +3742,7 @@ function orders(bytes32) external view returns (address owner, uint32 validTo); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -3800,9 +3751,7 @@ function orders(bytes32) external view returns (address owner, uint32 validTo); 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, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -3835,9 +3784,7 @@ function orders(bytes32) external view returns (address owner, uint32 validTo); type UnderlyingRustTuple<'a> = (alloy_sol_types::private::Address, u32); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -3863,41 +3810,38 @@ function orders(bytes32) external view returns (address owner, uint32 validTo); } } impl ordersReturn { - fn _tokenize( - &self, - ) -> ::ReturnToken<'_> { + fn _tokenize(&self) -> ::ReturnToken<'_> { ( ::tokenize( &self.owner, ), - as alloy_sol_types::SolType>::tokenize(&self.validTo), + as alloy_sol_types::SolType>::tokenize( + &self.validTo, + ), ) } } #[automatically_derived] impl alloy_sol_types::SolCall for ordersCall { type Parameters<'a> = (alloy_sol_types::sol_data::FixedBytes<32>,); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = ordersReturn; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = ( alloy_sol_types::sol_data::Address, alloy_sol_types::sol_data::Uint<32>, ); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "orders(bytes32)"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [156u8, 63u8, 30u8, 144u8]; + const SIGNATURE: &'static str = "orders(bytes32)"; + #[inline] fn new<'a>( tuple: as alloy_sol_types::SolType>::RustType, ) -> Self { tuple.into() } + #[inline] fn tokenize(&self) -> Self::Token<'_> { ( @@ -3906,40 +3850,40 @@ function orders(bytes32) external view returns (address owner, uint32 validTo); > as alloy_sol_types::SolType>::tokenize(&self.0), ) } + #[inline] fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { ordersReturn::_tokenize(ret) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) + 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) + 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(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `unwrap(uint256)` and selector `0xde0e9a3e`. -```solidity -function unwrap(uint256 amount) external; -```*/ + ```solidity + function unwrap(uint256 amount) external; + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct unwrapCall { #[allow(missing_docs)] pub amount: alloy_sol_types::private::primitives::aliases::U256, } - ///Container type for the return parameters of the [`unwrap(uint256)`](unwrapCall) function. + ///Container type for the return parameters of the + /// [`unwrap(uint256)`](unwrapCall) function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct unwrapReturn {} @@ -3950,20 +3894,16 @@ function unwrap(uint256 amount) external; clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] type UnderlyingSolTuple<'a> = (alloy_sol_types::sol_data::Uint<256>,); #[doc(hidden)] - type UnderlyingRustTuple<'a> = ( - alloy_sol_types::private::primitives::aliases::U256, - ); + 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, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -3993,9 +3933,7 @@ function unwrap(uint256 amount) external; type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -4018,73 +3956,70 @@ function unwrap(uint256 amount) external; } } impl unwrapReturn { - fn _tokenize( - &self, - ) -> ::ReturnToken<'_> { + fn _tokenize(&self) -> ::ReturnToken<'_> { () } } #[automatically_derived] impl alloy_sol_types::SolCall for unwrapCall { type Parameters<'a> = (alloy_sol_types::sol_data::Uint<256>,); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = unwrapReturn; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "unwrap(uint256)"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [222u8, 14u8, 154u8, 62u8]; + const SIGNATURE: &'static str = "unwrap(uint256)"; + #[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.amount), + as alloy_sol_types::SolType>::tokenize( + &self.amount, + ), ) } + #[inline] fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { unwrapReturn::_tokenize(ret) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) + 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) + 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(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `wrap(uint256)` and selector `0xea598cb0`. -```solidity -function wrap(uint256 amount) external; -```*/ + ```solidity + function wrap(uint256 amount) external; + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct wrapCall { #[allow(missing_docs)] pub amount: alloy_sol_types::private::primitives::aliases::U256, } - ///Container type for the return parameters of the [`wrap(uint256)`](wrapCall) function. + ///Container type for the return parameters of the + /// [`wrap(uint256)`](wrapCall) function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct wrapReturn {} @@ -4095,20 +4030,16 @@ function wrap(uint256 amount) external; clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] type UnderlyingSolTuple<'a> = (alloy_sol_types::sol_data::Uint<256>,); #[doc(hidden)] - type UnderlyingRustTuple<'a> = ( - alloy_sol_types::private::primitives::aliases::U256, - ); + 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, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -4138,9 +4069,7 @@ function wrap(uint256 amount) external; type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -4163,64 +4092,59 @@ function wrap(uint256 amount) external; } } impl wrapReturn { - fn _tokenize( - &self, - ) -> ::ReturnToken<'_> { + fn _tokenize(&self) -> ::ReturnToken<'_> { () } } #[automatically_derived] impl alloy_sol_types::SolCall for wrapCall { type Parameters<'a> = (alloy_sol_types::sol_data::Uint<256>,); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = wrapReturn; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "wrap(uint256)"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [234u8, 89u8, 140u8, 176u8]; + const SIGNATURE: &'static str = "wrap(uint256)"; + #[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.amount), + as alloy_sol_types::SolType>::tokenize( + &self.amount, + ), ) } + #[inline] fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { wrapReturn::_tokenize(ret) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) + 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) + 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 [`CoWSwapEthFlow`](self) function calls. #[derive(Clone)] - #[derive()] pub enum CoWSwapEthFlowCalls { #[allow(missing_docs)] createOrder(createOrderCall), @@ -4240,8 +4164,9 @@ function wrap(uint256 amount) external; impl CoWSwapEthFlowCalls { /// 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. + /// 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]] = &[ @@ -4253,16 +4178,6 @@ function wrap(uint256 amount) external; [222u8, 14u8, 154u8, 62u8], [234u8, 89u8, 140u8, 176u8], ]; - /// The names of the variants in the same order as `SELECTORS`. - pub const VARIANT_NAMES: &'static [&'static str] = &[ - ::core::stringify!(isValidSignature), - ::core::stringify!(createOrder), - ::core::stringify!(invalidateOrdersIgnoringNotAllowed), - ::core::stringify!(invalidateOrder), - ::core::stringify!(orders), - ::core::stringify!(unwrap), - ::core::stringify!(wrap), - ]; /// The signatures in the same order as `SELECTORS`. pub const SIGNATURES: &'static [&'static str] = &[ ::SIGNATURE, @@ -4273,6 +4188,17 @@ function wrap(uint256 amount) external; ::SIGNATURE, ::SIGNATURE, ]; + /// The names of the variants in the same order as `SELECTORS`. + pub const VARIANT_NAMES: &'static [&'static str] = &[ + ::core::stringify!(isValidSignature), + ::core::stringify!(createOrder), + ::core::stringify!(invalidateOrdersIgnoringNotAllowed), + ::core::stringify!(invalidateOrder), + ::core::stringify!(orders), + ::core::stringify!(unwrap), + ::core::stringify!(wrap), + ]; + /// Returns the signature for the given selector, if known. #[inline] pub fn signature_by_selector( @@ -4285,26 +4211,24 @@ function wrap(uint256 amount) external; ::core::result::Result::Err(_) => ::core::option::Option::None, } } + /// Returns the enum variant name for the given selector, if known. #[inline] - pub fn name_by_selector( - selector: [u8; 4usize], - ) -> ::core::option::Option<&'static str> { + pub fn name_by_selector(selector: [u8; 4usize]) -> ::core::option::Option<&'static str> { let sig = Self::signature_by_selector(selector)?; sig.split_once('(').map(|(name, _)| name) } } #[automatically_derived] impl alloy_sol_types::SolInterface for CoWSwapEthFlowCalls { - const NAME: &'static str = "CoWSwapEthFlowCalls"; - const MIN_DATA_LENGTH: usize = 32usize; const COUNT: usize = 7usize; + const MIN_DATA_LENGTH: usize = 32usize; + const NAME: &'static str = "CoWSwapEthFlowCalls"; + #[inline] fn selector(&self) -> [u8; 4] { match self { - Self::createOrder(_) => { - ::SELECTOR - } + Self::createOrder(_) => ::SELECTOR, Self::invalidateOrder(_) => { ::SELECTOR } @@ -4319,41 +4243,33 @@ function wrap(uint256 amount) external; Self::wrap(_) => ::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 abi_decode_raw(selector: [u8; 4], data: &[u8]) -> alloy_sol_types::Result { + static DECODE_SHIMS: &[fn(&[u8]) -> alloy_sol_types::Result] = &[ { fn isValidSignature( data: &[u8], ) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, - ) + ::abi_decode_raw(data) .map(CoWSwapEthFlowCalls::isValidSignature) } isValidSignature }, { - fn createOrder( - data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, - ) + fn createOrder(data: &[u8]) -> alloy_sol_types::Result { + ::abi_decode_raw(data) .map(CoWSwapEthFlowCalls::createOrder) } createOrder @@ -4373,35 +4289,27 @@ function wrap(uint256 amount) external; fn invalidateOrder( data: &[u8], ) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, - ) + ::abi_decode_raw(data) .map(CoWSwapEthFlowCalls::invalidateOrder) } invalidateOrder }, { - fn orders( - data: &[u8], - ) -> alloy_sol_types::Result { + fn orders(data: &[u8]) -> alloy_sol_types::Result { ::abi_decode_raw(data) .map(CoWSwapEthFlowCalls::orders) } orders }, { - fn unwrap( - data: &[u8], - ) -> alloy_sol_types::Result { + fn unwrap(data: &[u8]) -> alloy_sol_types::Result { ::abi_decode_raw(data) .map(CoWSwapEthFlowCalls::unwrap) } unwrap }, { - fn wrap( - data: &[u8], - ) -> alloy_sol_types::Result { + fn wrap(data: &[u8]) -> alloy_sol_types::Result { ::abi_decode_raw(data) .map(CoWSwapEthFlowCalls::wrap) } @@ -4409,15 +4317,14 @@ function wrap(uint256 amount) external; }, ]; let Ok(idx) = Self::SELECTORS.binary_search(&selector) else { - return Err( - alloy_sol_types::Error::unknown_selector( - ::NAME, - selector, - ), - ); + return Err(alloy_sol_types::Error::unknown_selector( + ::NAME, + selector, + )); }; DECODE_SHIMS[idx](data) } + #[inline] #[allow(non_snake_case)] fn abi_decode_raw_validate( @@ -4426,25 +4333,22 @@ function wrap(uint256 amount) external; ) -> alloy_sol_types::Result { static DECODE_VALIDATE_SHIMS: &[fn( &[u8], - ) -> alloy_sol_types::Result] = &[ + ) + -> alloy_sol_types::Result] = &[ { fn isValidSignature( data: &[u8], ) -> alloy_sol_types::Result { ::abi_decode_raw_validate( - data, - ) - .map(CoWSwapEthFlowCalls::isValidSignature) + data, + ) + .map(CoWSwapEthFlowCalls::isValidSignature) } isValidSignature }, { - fn createOrder( - data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) + fn createOrder(data: &[u8]) -> alloy_sol_types::Result { + ::abi_decode_raw_validate(data) .map(CoWSwapEthFlowCalls::createOrder) } createOrder @@ -4465,56 +4369,43 @@ function wrap(uint256 amount) external; data: &[u8], ) -> alloy_sol_types::Result { ::abi_decode_raw_validate( - data, - ) - .map(CoWSwapEthFlowCalls::invalidateOrder) + data, + ) + .map(CoWSwapEthFlowCalls::invalidateOrder) } invalidateOrder }, { - fn orders( - data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) + fn orders(data: &[u8]) -> alloy_sol_types::Result { + ::abi_decode_raw_validate(data) .map(CoWSwapEthFlowCalls::orders) } orders }, { - fn unwrap( - data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) + fn unwrap(data: &[u8]) -> alloy_sol_types::Result { + ::abi_decode_raw_validate(data) .map(CoWSwapEthFlowCalls::unwrap) } unwrap }, { - fn wrap( - data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) + fn wrap(data: &[u8]) -> alloy_sol_types::Result { + ::abi_decode_raw_validate(data) .map(CoWSwapEthFlowCalls::wrap) } wrap }, ]; let Ok(idx) = Self::SELECTORS.binary_search(&selector) else { - return Err( - alloy_sol_types::Error::unknown_selector( - ::NAME, - selector, - ), - ); + return Err(alloy_sol_types::Error::unknown_selector( + ::NAME, + selector, + )); }; DECODE_VALIDATE_SHIMS[idx](data) } + #[inline] fn abi_encoded_size(&self) -> usize { match self { @@ -4549,6 +4440,7 @@ function wrap(uint256 amount) external; } } } + #[inline] fn abi_encode_raw(&self, out: &mut alloy_sol_types::private::Vec) { match self { @@ -4589,8 +4481,7 @@ function wrap(uint256 amount) external; } } ///Container for all the [`CoWSwapEthFlow`](self) custom errors. - #[derive(Clone)] - #[derive(Debug, PartialEq, Eq, Hash)] + #[derive(Clone, Debug, PartialEq, Eq, Hash)] pub enum CoWSwapEthFlowErrors { #[allow(missing_docs)] EthTransferFailed(EthTransferFailed), @@ -4610,8 +4501,9 @@ function wrap(uint256 amount) external; impl CoWSwapEthFlowErrors { /// 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. + /// 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]] = &[ @@ -4623,16 +4515,6 @@ function wrap(uint256 amount) external; [239u8, 201u8, 204u8, 223u8], [248u8, 204u8, 112u8, 206u8], ]; - /// The names of the variants in the same order as `SELECTORS`. - pub const VARIANT_NAMES: &'static [&'static str] = &[ - ::core::stringify!(OrderIsAlreadyOwned), - ::core::stringify!(EthTransferFailed), - ::core::stringify!(OrderIsAlreadyExpired), - ::core::stringify!(IncorrectEthAmount), - ::core::stringify!(NotAllowedZeroSellAmount), - ::core::stringify!(ReceiverMustBeSet), - ::core::stringify!(NotAllowedToInvalidateOrder), - ]; /// The signatures in the same order as `SELECTORS`. pub const SIGNATURES: &'static [&'static str] = &[ ::SIGNATURE, @@ -4643,6 +4525,17 @@ function wrap(uint256 amount) external; ::SIGNATURE, ::SIGNATURE, ]; + /// The names of the variants in the same order as `SELECTORS`. + pub const VARIANT_NAMES: &'static [&'static str] = &[ + ::core::stringify!(OrderIsAlreadyOwned), + ::core::stringify!(EthTransferFailed), + ::core::stringify!(OrderIsAlreadyExpired), + ::core::stringify!(IncorrectEthAmount), + ::core::stringify!(NotAllowedZeroSellAmount), + ::core::stringify!(ReceiverMustBeSet), + ::core::stringify!(NotAllowedToInvalidateOrder), + ]; + /// Returns the signature for the given selector, if known. #[inline] pub fn signature_by_selector( @@ -4655,20 +4548,20 @@ function wrap(uint256 amount) external; ::core::result::Result::Err(_) => ::core::option::Option::None, } } + /// Returns the enum variant name for the given selector, if known. #[inline] - pub fn name_by_selector( - selector: [u8; 4usize], - ) -> ::core::option::Option<&'static str> { + pub fn name_by_selector(selector: [u8; 4usize]) -> ::core::option::Option<&'static str> { let sig = Self::signature_by_selector(selector)?; sig.split_once('(').map(|(name, _)| name) } } #[automatically_derived] impl alloy_sol_types::SolInterface for CoWSwapEthFlowErrors { - const NAME: &'static str = "CoWSwapEthFlowErrors"; - const MIN_DATA_LENGTH: usize = 0usize; const COUNT: usize = 7usize; + const MIN_DATA_LENGTH: usize = 0usize; + const NAME: &'static str = "CoWSwapEthFlowErrors"; + #[inline] fn selector(&self) -> [u8; 4] { match self { @@ -4695,30 +4588,26 @@ function wrap(uint256 amount) external; } } } + #[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 abi_decode_raw(selector: [u8; 4], data: &[u8]) -> alloy_sol_types::Result { + static DECODE_SHIMS: &[fn(&[u8]) -> alloy_sol_types::Result] = &[ { fn OrderIsAlreadyOwned( data: &[u8], ) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, - ) + ::abi_decode_raw(data) .map(CoWSwapEthFlowErrors::OrderIsAlreadyOwned) } OrderIsAlreadyOwned @@ -4727,9 +4616,7 @@ function wrap(uint256 amount) external; fn EthTransferFailed( data: &[u8], ) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, - ) + ::abi_decode_raw(data) .map(CoWSwapEthFlowErrors::EthTransferFailed) } EthTransferFailed @@ -4738,9 +4625,7 @@ function wrap(uint256 amount) external; fn OrderIsAlreadyExpired( data: &[u8], ) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, - ) + ::abi_decode_raw(data) .map(CoWSwapEthFlowErrors::OrderIsAlreadyExpired) } OrderIsAlreadyExpired @@ -4749,9 +4634,7 @@ function wrap(uint256 amount) external; fn IncorrectEthAmount( data: &[u8], ) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, - ) + ::abi_decode_raw(data) .map(CoWSwapEthFlowErrors::IncorrectEthAmount) } IncorrectEthAmount @@ -4761,9 +4644,9 @@ function wrap(uint256 amount) external; data: &[u8], ) -> alloy_sol_types::Result { ::abi_decode_raw( - data, - ) - .map(CoWSwapEthFlowErrors::NotAllowedZeroSellAmount) + data, + ) + .map(CoWSwapEthFlowErrors::NotAllowedZeroSellAmount) } NotAllowedZeroSellAmount }, @@ -4771,9 +4654,7 @@ function wrap(uint256 amount) external; fn ReceiverMustBeSet( data: &[u8], ) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, - ) + ::abi_decode_raw(data) .map(CoWSwapEthFlowErrors::ReceiverMustBeSet) } ReceiverMustBeSet @@ -4783,23 +4664,22 @@ function wrap(uint256 amount) external; data: &[u8], ) -> alloy_sol_types::Result { ::abi_decode_raw( - data, - ) - .map(CoWSwapEthFlowErrors::NotAllowedToInvalidateOrder) + data, + ) + .map(CoWSwapEthFlowErrors::NotAllowedToInvalidateOrder) } NotAllowedToInvalidateOrder }, ]; let Ok(idx) = Self::SELECTORS.binary_search(&selector) else { - return Err( - alloy_sol_types::Error::unknown_selector( - ::NAME, - selector, - ), - ); + return Err(alloy_sol_types::Error::unknown_selector( + ::NAME, + selector, + )); }; DECODE_SHIMS[idx](data) } + #[inline] #[allow(non_snake_case)] fn abi_decode_raw_validate( @@ -4808,15 +4688,16 @@ function wrap(uint256 amount) external; ) -> alloy_sol_types::Result { static DECODE_VALIDATE_SHIMS: &[fn( &[u8], - ) -> alloy_sol_types::Result] = &[ + ) + -> alloy_sol_types::Result] = &[ { fn OrderIsAlreadyOwned( data: &[u8], ) -> alloy_sol_types::Result { ::abi_decode_raw_validate( - data, - ) - .map(CoWSwapEthFlowErrors::OrderIsAlreadyOwned) + data, + ) + .map(CoWSwapEthFlowErrors::OrderIsAlreadyOwned) } OrderIsAlreadyOwned }, @@ -4825,9 +4706,9 @@ function wrap(uint256 amount) external; data: &[u8], ) -> alloy_sol_types::Result { ::abi_decode_raw_validate( - data, - ) - .map(CoWSwapEthFlowErrors::EthTransferFailed) + data, + ) + .map(CoWSwapEthFlowErrors::EthTransferFailed) } EthTransferFailed }, @@ -4847,9 +4728,9 @@ function wrap(uint256 amount) external; data: &[u8], ) -> alloy_sol_types::Result { ::abi_decode_raw_validate( - data, - ) - .map(CoWSwapEthFlowErrors::IncorrectEthAmount) + data, + ) + .map(CoWSwapEthFlowErrors::IncorrectEthAmount) } IncorrectEthAmount }, @@ -4869,9 +4750,9 @@ function wrap(uint256 amount) external; data: &[u8], ) -> alloy_sol_types::Result { ::abi_decode_raw_validate( - data, - ) - .map(CoWSwapEthFlowErrors::ReceiverMustBeSet) + data, + ) + .map(CoWSwapEthFlowErrors::ReceiverMustBeSet) } ReceiverMustBeSet }, @@ -4888,27 +4769,22 @@ function wrap(uint256 amount) external; }, ]; let Ok(idx) = Self::SELECTORS.binary_search(&selector) else { - return Err( - alloy_sol_types::Error::unknown_selector( - ::NAME, - selector, - ), - ); + 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::EthTransferFailed(inner) => { - ::abi_encoded_size( - inner, - ) + ::abi_encoded_size(inner) } Self::IncorrectEthAmount(inner) => { - ::abi_encoded_size( - inner, - ) + ::abi_encoded_size(inner) } Self::NotAllowedToInvalidateOrder(inner) => { ::abi_encoded_size( @@ -4916,78 +4792,53 @@ function wrap(uint256 amount) external; ) } Self::NotAllowedZeroSellAmount(inner) => { - ::abi_encoded_size( - inner, - ) + ::abi_encoded_size(inner) } Self::OrderIsAlreadyExpired(inner) => { - ::abi_encoded_size( - inner, - ) + ::abi_encoded_size(inner) } Self::OrderIsAlreadyOwned(inner) => { - ::abi_encoded_size( - inner, - ) + ::abi_encoded_size(inner) } Self::ReceiverMustBeSet(inner) => { - ::abi_encoded_size( - inner, - ) + ::abi_encoded_size(inner) } } } + #[inline] fn abi_encode_raw(&self, out: &mut alloy_sol_types::private::Vec) { match self { Self::EthTransferFailed(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } Self::IncorrectEthAmount(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } Self::NotAllowedToInvalidateOrder(inner) => { ::abi_encode_raw( - inner, - out, + inner, out, ) } Self::NotAllowedZeroSellAmount(inner) => { ::abi_encode_raw( - inner, - out, + inner, out, ) } Self::OrderIsAlreadyExpired(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } Self::OrderIsAlreadyOwned(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } Self::ReceiverMustBeSet(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } } } } ///Container for all the [`CoWSwapEthFlow`](self) events. #[derive(Clone)] - #[derive()] pub enum CoWSwapEthFlowEvents { #[allow(missing_docs)] OrderInvalidation(OrderInvalidation), @@ -4999,39 +4850,41 @@ function wrap(uint256 amount) external; impl CoWSwapEthFlowEvents { /// 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. + /// 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]] = &[ [ - 25u8, 82u8, 113u8, 6u8, 138u8, 40u8, 129u8, 145u8, 228u8, 178u8, 101u8, - 198u8, 65u8, 165u8, 107u8, 152u8, 50u8, 145u8, 159u8, 105u8, 233u8, - 231u8, 214u8, 194u8, 243u8, 27u8, 164u8, 2u8, 120u8, 174u8, 184u8, 90u8, + 25u8, 82u8, 113u8, 6u8, 138u8, 40u8, 129u8, 145u8, 228u8, 178u8, 101u8, 198u8, + 65u8, 165u8, 107u8, 152u8, 50u8, 145u8, 159u8, 105u8, 233u8, 231u8, 214u8, 194u8, + 243u8, 27u8, 164u8, 2u8, 120u8, 174u8, 184u8, 90u8, ], [ - 184u8, 186u8, 209u8, 2u8, 172u8, 139u8, 186u8, 207u8, 239u8, 49u8, 255u8, - 28u8, 144u8, 110u8, 198u8, 217u8, 81u8, 194u8, 48u8, 180u8, 220u8, 231u8, - 80u8, 187u8, 3u8, 118u8, 184u8, 18u8, 173u8, 53u8, 133u8, 42u8, + 184u8, 186u8, 209u8, 2u8, 172u8, 139u8, 186u8, 207u8, 239u8, 49u8, 255u8, 28u8, + 144u8, 110u8, 198u8, 217u8, 81u8, 194u8, 48u8, 180u8, 220u8, 231u8, 80u8, 187u8, + 3u8, 118u8, 184u8, 18u8, 173u8, 53u8, 133u8, 42u8, ], [ - 207u8, 95u8, 157u8, 226u8, 152u8, 65u8, 50u8, 38u8, 82u8, 3u8, 181u8, - 195u8, 53u8, 178u8, 87u8, 39u8, 112u8, 44u8, 167u8, 114u8, 98u8, 255u8, - 98u8, 46u8, 19u8, 107u8, 170u8, 115u8, 98u8, 191u8, 29u8, 169u8, + 207u8, 95u8, 157u8, 226u8, 152u8, 65u8, 50u8, 38u8, 82u8, 3u8, 181u8, 195u8, 53u8, + 178u8, 87u8, 39u8, 112u8, 44u8, 167u8, 114u8, 98u8, 255u8, 98u8, 46u8, 19u8, 107u8, + 170u8, 115u8, 98u8, 191u8, 29u8, 169u8, ], ]; - /// The names of the variants in the same order as `SELECTORS`. - pub const VARIANT_NAMES: &'static [&'static str] = &[ - ::core::stringify!(OrderRefund), - ::core::stringify!(OrderInvalidation), - ::core::stringify!(OrderPlacement), - ]; /// The signatures in the same order as `SELECTORS`. pub const SIGNATURES: &'static [&'static str] = &[ ::SIGNATURE, ::SIGNATURE, ::SIGNATURE, ]; + /// The names of the variants in the same order as `SELECTORS`. + pub const VARIANT_NAMES: &'static [&'static str] = &[ + ::core::stringify!(OrderRefund), + ::core::stringify!(OrderInvalidation), + ::core::stringify!(OrderPlacement), + ]; + /// Returns the signature for the given selector, if known. #[inline] pub fn signature_by_selector( @@ -5044,58 +4897,45 @@ function wrap(uint256 amount) external; ::core::result::Result::Err(_) => ::core::option::Option::None, } } + /// Returns the enum variant name for the given selector, if known. #[inline] - pub fn name_by_selector( - selector: [u8; 32usize], - ) -> ::core::option::Option<&'static str> { + pub fn name_by_selector(selector: [u8; 32usize]) -> ::core::option::Option<&'static str> { let sig = Self::signature_by_selector(selector)?; sig.split_once('(').map(|(name, _)| name) } } #[automatically_derived] impl alloy_sol_types::SolEventInterface for CoWSwapEthFlowEvents { - const NAME: &'static str = "CoWSwapEthFlowEvents"; const COUNT: usize = 3usize; + const NAME: &'static str = "CoWSwapEthFlowEvents"; + 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, - ) + Some(::SIGNATURE_HASH) => { + ::decode_raw_log(topics, data) .map(Self::OrderInvalidation) } Some(::SIGNATURE_HASH) => { - ::decode_raw_log( - topics, - data, - ) + ::decode_raw_log(topics, data) .map(Self::OrderPlacement) } Some(::SIGNATURE_HASH) => { - ::decode_raw_log( - topics, - data, - ) + ::decode_raw_log(topics, data) .map(Self::OrderRefund) } - _ => { - 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(), - ), + _ => 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(), ), - }) - } + ), + }), } } } @@ -5114,6 +4954,7 @@ function wrap(uint256 amount) external; } } } + fn into_log_data(self) -> alloy_sol_types::private::LogData { match self { Self::OrderInvalidation(inner) => { @@ -5128,10 +4969,10 @@ function wrap(uint256 amount) external; } } } - use alloy_contract as alloy_contract; + use alloy_contract; /**Creates a new wrapper around an on-chain [`CoWSwapEthFlow`](self) contract instance. -See the [wrapper's documentation](`CoWSwapEthFlowInstance`) for more details.*/ + See the [wrapper's documentation](`CoWSwapEthFlowInstance`) for more details.*/ #[inline] pub const fn new< P: alloy_contract::private::Provider, @@ -5144,30 +4985,23 @@ See the [wrapper's documentation](`CoWSwapEthFlowInstance`) for more details.*/ } /**Deploys this contract using the given `provider` and constructor arguments, if any. -Returns a new instance of the contract, if the deployment was successful. + 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.*/ + 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, - >( + pub fn deploy, N: alloy_contract::private::Network>( __provider: P, _cowSwapSettlement: alloy_sol_types::private::Address, _wrappedNativeToken: alloy_sol_types::private::Address, - ) -> impl ::core::future::Future< - Output = alloy_contract::Result>, - > { - CoWSwapEthFlowInstance::< - P, - N, - >::deploy(__provider, _cowSwapSettlement, _wrappedNativeToken) + ) -> impl ::core::future::Future>> + { + CoWSwapEthFlowInstance::::deploy(__provider, _cowSwapSettlement, _wrappedNativeToken) } /**Creates a `RawCallBuilder` for deploying this contract using the given `provider` -and constructor arguments, if any. + 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.*/ + 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, @@ -5177,22 +5011,23 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ _cowSwapSettlement: alloy_sol_types::private::Address, _wrappedNativeToken: alloy_sol_types::private::Address, ) -> alloy_contract::RawCallBuilder { - CoWSwapEthFlowInstance::< - P, - N, - >::deploy_builder(__provider, _cowSwapSettlement, _wrappedNativeToken) + CoWSwapEthFlowInstance::::deploy_builder( + __provider, + _cowSwapSettlement, + _wrappedNativeToken, + ) } /**A [`CoWSwapEthFlow`](self) instance. -Contains type-safe methods for interacting with an on-chain instance of the -[`CoWSwapEthFlow`](self) contract located at a given `address`, using a given -provider `P`. + Contains type-safe methods for interacting with an on-chain instance of the + [`CoWSwapEthFlow`](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. + 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.*/ + See the [module-level documentation](self) for all the available methods.*/ #[derive(Clone)] pub struct CoWSwapEthFlowInstance { address: alloy_sol_types::private::Address, @@ -5203,52 +5038,49 @@ See the [module-level documentation](self) for all the available methods.*/ impl ::core::fmt::Debug for CoWSwapEthFlowInstance { #[inline] fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { - f.debug_tuple("CoWSwapEthFlowInstance").field(&self.address).finish() + f.debug_tuple("CoWSwapEthFlowInstance") + .field(&self.address) + .finish() } } /// Instantiation and getters/setters. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > CoWSwapEthFlowInstance { + impl, N: alloy_contract::private::Network> + CoWSwapEthFlowInstance + { /**Creates a new wrapper around an on-chain [`CoWSwapEthFlow`](self) contract instance. -See the [wrapper's documentation](`CoWSwapEthFlowInstance`) for more details.*/ + See the [wrapper's documentation](`CoWSwapEthFlowInstance`) for more details.*/ #[inline] - pub const fn new( - address: alloy_sol_types::private::Address, - __provider: P, - ) -> Self { + pub const fn new(address: alloy_sol_types::private::Address, __provider: P) -> Self { Self { address, provider: __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. + 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.*/ + For more fine-grained control over the deployment process, use [`deploy_builder`] instead.*/ #[inline] pub async fn deploy( __provider: P, _cowSwapSettlement: alloy_sol_types::private::Address, _wrappedNativeToken: alloy_sol_types::private::Address, ) -> alloy_contract::Result> { - let call_builder = Self::deploy_builder( - __provider, - _cowSwapSettlement, - _wrappedNativeToken, - ); + let call_builder = + Self::deploy_builder(__provider, _cowSwapSettlement, _wrappedNativeToken); 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. + 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.*/ + 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, @@ -5259,32 +5091,34 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ __provider, [ &BYTECODE[..], - &alloy_sol_types::SolConstructor::abi_encode( - &constructorCall { - _cowSwapSettlement, - _wrappedNativeToken, - }, - )[..], + &alloy_sol_types::SolConstructor::abi_encode(&constructorCall { + _cowSwapSettlement, + _wrappedNativeToken, + })[..], ] - .concat() - .into(), + .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 { @@ -5292,7 +5126,8 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ } } impl CoWSwapEthFlowInstance<&P, N> { - /// Clones the provider and returns a new instance with the cloned provider. + /// Clones the provider and returns a new instance with the cloned + /// provider. #[inline] pub fn with_cloned_provider(self) -> CoWSwapEthFlowInstance { CoWSwapEthFlowInstance { @@ -5303,20 +5138,22 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ } } /// Function calls. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > CoWSwapEthFlowInstance { - /// Creates a new call builder using this contract instance's provider and address. + impl, N: alloy_contract::private::Network> + CoWSwapEthFlowInstance + { + /// 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. + /// 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 [`createOrder`] function. pub fn createOrder( &self, @@ -5324,6 +5161,7 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ ) -> alloy_contract::SolCallBuilder<&P, createOrderCall, N> { self.call_builder(&createOrderCall { order }) } + ///Creates a new call builder for the [`invalidateOrder`] function. pub fn invalidateOrder( &self, @@ -5331,36 +5169,27 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ ) -> alloy_contract::SolCallBuilder<&P, invalidateOrderCall, N> { self.call_builder(&invalidateOrderCall { order }) } - ///Creates a new call builder for the [`invalidateOrdersIgnoringNotAllowed`] function. + + ///Creates a new call builder for the + /// [`invalidateOrdersIgnoringNotAllowed`] function. pub fn invalidateOrdersIgnoringNotAllowed( &self, orderArray: alloy_sol_types::private::Vec< ::RustType, >, - ) -> alloy_contract::SolCallBuilder< - &P, - invalidateOrdersIgnoringNotAllowedCall, - N, - > { - self.call_builder( - &invalidateOrdersIgnoringNotAllowedCall { - orderArray, - }, - ) + ) -> alloy_contract::SolCallBuilder<&P, invalidateOrdersIgnoringNotAllowedCall, N> { + self.call_builder(&invalidateOrdersIgnoringNotAllowedCall { orderArray }) } + ///Creates a new call builder for the [`isValidSignature`] function. pub fn isValidSignature( &self, orderHash: alloy_sol_types::private::FixedBytes<32>, _1: alloy_sol_types::private::Bytes, ) -> alloy_contract::SolCallBuilder<&P, isValidSignatureCall, N> { - self.call_builder( - &isValidSignatureCall { - orderHash, - _1, - }, - ) + self.call_builder(&isValidSignatureCall { orderHash, _1 }) } + ///Creates a new call builder for the [`orders`] function. pub fn orders( &self, @@ -5368,6 +5197,7 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ ) -> alloy_contract::SolCallBuilder<&P, ordersCall, N> { self.call_builder(&ordersCall(_0)) } + ///Creates a new call builder for the [`unwrap`] function. pub fn unwrap( &self, @@ -5375,6 +5205,7 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ ) -> alloy_contract::SolCallBuilder<&P, unwrapCall, N> { self.call_builder(&unwrapCall { amount }) } + ///Creates a new call builder for the [`wrap`] function. pub fn wrap( &self, @@ -5384,136 +5215,90 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ } } /// Event filters. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > CoWSwapEthFlowInstance { - /// Creates a new event filter using this contract instance's provider and address. + impl, N: alloy_contract::private::Network> + CoWSwapEthFlowInstance + { + /// 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. + /// 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 [`OrderInvalidation`] event. - pub fn OrderInvalidation_filter( - &self, - ) -> alloy_contract::Event<&P, OrderInvalidation, N> { + pub fn OrderInvalidation_filter(&self) -> alloy_contract::Event<&P, OrderInvalidation, N> { self.event_filter::() } + ///Creates a new event filter for the [`OrderPlacement`] event. - pub fn OrderPlacement_filter( - &self, - ) -> alloy_contract::Event<&P, OrderPlacement, N> { + pub fn OrderPlacement_filter(&self) -> alloy_contract::Event<&P, OrderPlacement, N> { self.event_filter::() } + ///Creates a new event filter for the [`OrderRefund`] event. pub fn OrderRefund_filter(&self) -> alloy_contract::Event<&P, OrderRefund, N> { self.event_filter::() } } } -pub type Instance = CoWSwapEthFlow::CoWSwapEthFlowInstance< - ::alloy_provider::DynProvider, ->; +pub type Instance = CoWSwapEthFlow::CoWSwapEthFlowInstance<::alloy_provider::DynProvider>; use { - std::{sync::LazyLock, collections::HashMap}, - anyhow::{Result, Context}, - alloy_primitives::{address, Address}, - alloy_provider::{Provider, DynProvider}, + alloy_primitives::{Address, address}, + alloy_provider::{DynProvider, Provider}, + anyhow::{Context, Result}, + std::{collections::HashMap, sync::LazyLock}, }; pub const fn deployment_info(chain_id: u64) -> Option<(Address, Option)> { match chain_id { - 1u64 => { - Some(( - ::alloy_primitives::address!( - "0x40a50cf069e992aa4536211b23f286ef88752187" - ), - Some(16169866u64), - )) - } - 10u64 => { - Some(( - ::alloy_primitives::address!( - "0x04501b9b1d52e67f6862d157e00d13419d2d6e95" - ), - Some(134607215u64), - )) - } - 56u64 => { - Some(( - ::alloy_primitives::address!( - "0x04501b9b1d52e67f6862d157e00d13419d2d6e95" - ), - Some(48411237u64), - )) - } - 100u64 => { - Some(( - ::alloy_primitives::address!( - "0x40a50cf069e992aa4536211b23f286ef88752187" - ), - Some(25414331u64), - )) - } - 137u64 => { - Some(( - ::alloy_primitives::address!( - "0x04501b9b1d52e67f6862d157e00d13419d2d6e95" - ), - Some(71296258u64), - )) - } - 8453u64 => { - Some(( - ::alloy_primitives::address!( - "0x3C3eA1829891BC9bEC3d06A81d5d169e52a415e3" - ), - Some(21490258u64), - )) - } - 9745u64 => { - Some(( - ::alloy_primitives::address!( - "0x04501b9b1d52e67f6862d157e00d13419d2d6e95" - ), - Some(3521855u64), - )) - } - 42161u64 => { - Some(( - ::alloy_primitives::address!( - "0x6DFE75B5ddce1ADE279D4fa6BD6AeF3cBb6f49dB" - ), - Some(204747458u64), - )) - } - 43114u64 => { - Some(( - ::alloy_primitives::address!( - "0x04501b9b1d52e67f6862d157e00d13419d2d6e95" - ), - Some(60496408u64), - )) - } - 59144u64 => { - Some(( - ::alloy_primitives::address!( - "0x04501b9b1d52e67f6862d157e00d13419d2d6e95" - ), - Some(24522097u64), - )) - } - 11155111u64 => { - Some(( - ::alloy_primitives::address!( - "0x0b7795E18767259CC253a2dF471db34c72B49516" - ), - Some(4718739u64), - )) - } + 1u64 => Some(( + ::alloy_primitives::address!("0x40a50cf069e992aa4536211b23f286ef88752187"), + Some(16169866u64), + )), + 10u64 => Some(( + ::alloy_primitives::address!("0x04501b9b1d52e67f6862d157e00d13419d2d6e95"), + Some(134607215u64), + )), + 56u64 => Some(( + ::alloy_primitives::address!("0x04501b9b1d52e67f6862d157e00d13419d2d6e95"), + Some(48411237u64), + )), + 100u64 => Some(( + ::alloy_primitives::address!("0x40a50cf069e992aa4536211b23f286ef88752187"), + Some(25414331u64), + )), + 137u64 => Some(( + ::alloy_primitives::address!("0x04501b9b1d52e67f6862d157e00d13419d2d6e95"), + Some(71296258u64), + )), + 8453u64 => Some(( + ::alloy_primitives::address!("0x3C3eA1829891BC9bEC3d06A81d5d169e52a415e3"), + Some(21490258u64), + )), + 9745u64 => Some(( + ::alloy_primitives::address!("0x04501b9b1d52e67f6862d157e00d13419d2d6e95"), + Some(3521855u64), + )), + 42161u64 => Some(( + ::alloy_primitives::address!("0x6DFE75B5ddce1ADE279D4fa6BD6AeF3cBb6f49dB"), + Some(204747458u64), + )), + 43114u64 => Some(( + ::alloy_primitives::address!("0x04501b9b1d52e67f6862d157e00d13419d2d6e95"), + Some(60496408u64), + )), + 59144u64 => Some(( + ::alloy_primitives::address!("0x04501b9b1d52e67f6862d157e00d13419d2d6e95"), + Some(24522097u64), + )), + 11155111u64 => Some(( + ::alloy_primitives::address!("0x0b7795E18767259CC253a2dF471db34c72B49516"), + Some(4718739u64), + )), _ => None, } } @@ -5530,9 +5315,7 @@ pub const fn deployment_block(chain_id: &u64) -> Option { } } impl Instance { - pub fn deployed( - provider: &DynProvider, - ) -> impl Future> + Send { + pub fn deployed(provider: &DynProvider) -> impl Future> + Send { async move { let chain_id = provider .get_chain_id() diff --git a/contracts/generated/contracts-generated/cowswaponchainorders/src/lib.rs b/contracts/generated/contracts-generated/cowswaponchainorders/src/lib.rs index 8fe5a7af39..071ff13688 100644 --- a/contracts/generated/contracts-generated/cowswaponchainorders/src/lib.rs +++ b/contracts/generated/contracts-generated/cowswaponchainorders/src/lib.rs @@ -1,4 +1,10 @@ -#![allow(unused_imports, unused_attributes, clippy::all, rustdoc::all, non_snake_case)] +#![allow( + unused_imports, + unused_attributes, + clippy::all, + rustdoc::all, + non_snake_case +)] //! Auto-generated contract bindings. Do not edit. ///Module containing a contract's types and functions. /** @@ -16,12 +22,11 @@ library GPv2Order { clippy::empty_structs_with_brackets )] pub mod GPv2Order { - use super::*; - use alloy_sol_types as alloy_sol_types; + use {super::*, alloy_sol_types}; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**```solidity -struct Data { address sellToken; address buyToken; address receiver; uint256 sellAmount; uint256 buyAmount; uint32 validTo; bytes32 appData; uint256 feeAmount; bytes32 kind; bool partiallyFillable; bytes32 sellTokenBalance; bytes32 buyTokenBalance; } -```*/ + struct Data { address sellToken; address buyToken; address receiver; uint256 sellAmount; uint256 buyAmount; uint32 validTo; bytes32 appData; uint256 feeAmount; bytes32 kind; bool partiallyFillable; bytes32 sellTokenBalance; bytes32 buyTokenBalance; } + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct Data { @@ -57,7 +62,7 @@ struct Data { address sellToken; address buyToken; address receiver; uint256 sel clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[doc(hidden)] #[allow(dead_code)] type UnderlyingSolTuple<'a> = ( @@ -91,9 +96,7 @@ struct Data { address sellToken; address buyToken; address receiver; uint256 sel ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -187,91 +190,91 @@ struct Data { address sellToken; address buyToken; address receiver; uint256 sel > as alloy_sol_types::SolType>::tokenize(&self.buyTokenBalance), ) } + #[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) + 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) + 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) + 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 Data { type RustType = Self; - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + + const ENCODED_SIZE: Option = + as alloy_sol_types::SolType>::ENCODED_SIZE; + const PACKED_ENCODED_SIZE: Option = + as alloy_sol_types::SolType>::PACKED_ENCODED_SIZE; 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); + let tuple = as alloy_sol_types::SolType>::detokenize(token); >>::from(tuple) } } #[automatically_derived] impl alloy_sol_types::SolStruct for Data { const NAME: &'static str = "Data"; + #[inline] fn eip712_root_type() -> alloy_sol_types::private::Cow<'static, str> { alloy_sol_types::private::Cow::Borrowed( - "Data(address sellToken,address buyToken,address receiver,uint256 sellAmount,uint256 buyAmount,uint32 validTo,bytes32 appData,uint256 feeAmount,bytes32 kind,bool partiallyFillable,bytes32 sellTokenBalance,bytes32 buyTokenBalance)", + "Data(address sellToken,address buyToken,address receiver,uint256 \ + sellAmount,uint256 buyAmount,uint32 validTo,bytes32 appData,uint256 \ + feeAmount,bytes32 kind,bool partiallyFillable,bytes32 \ + sellTokenBalance,bytes32 buyTokenBalance)", ) } + #[inline] - fn eip712_components() -> alloy_sol_types::private::Vec< - alloy_sol_types::private::Cow<'static, str>, - > { + fn eip712_components() + -> alloy_sol_types::private::Vec> + { 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 { [ @@ -387,14 +390,13 @@ struct Data { address sellToken; address buyToken; address receiver; uint256 sel &rust.buyTokenBalance, ) } + #[inline] fn encode_topic_preimage( rust: &Self::RustType, out: &mut alloy_sol_types::private::Vec, ) { - out.reserve( - ::topic_preimage_length(rust), - ); + out.reserve(::topic_preimage_length(rust)); ::encode_topic_preimage( &rust.sellToken, out, @@ -460,25 +462,19 @@ struct Data { address sellToken; address buyToken; address receiver; uint256 sel out, ); } + #[inline] - fn encode_topic( - rust: &Self::RustType, - ) -> alloy_sol_types::abi::token::WordToken { + 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), - ) + ::encode_topic_preimage(rust, &mut out); + alloy_sol_types::abi::token::WordToken(alloy_sol_types::private::keccak256(out)) } } }; - use alloy_contract as alloy_contract; + use alloy_contract; /**Creates a new wrapper around an on-chain [`GPv2Order`](self) contract instance. -See the [wrapper's documentation](`GPv2OrderInstance`) for more details.*/ + See the [wrapper's documentation](`GPv2OrderInstance`) for more details.*/ #[inline] pub const fn new< P: alloy_contract::private::Provider, @@ -491,15 +487,15 @@ See the [wrapper's documentation](`GPv2OrderInstance`) for more details.*/ } /**A [`GPv2Order`](self) instance. -Contains type-safe methods for interacting with an on-chain instance of the -[`GPv2Order`](self) contract located at a given `address`, using a given -provider `P`. + Contains type-safe methods for interacting with an on-chain instance of the + [`GPv2Order`](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. + 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.*/ + See the [module-level documentation](self) for all the available methods.*/ #[derive(Clone)] pub struct GPv2OrderInstance { address: alloy_sol_types::private::Address, @@ -510,43 +506,45 @@ See the [module-level documentation](self) for all the available methods.*/ impl ::core::fmt::Debug for GPv2OrderInstance { #[inline] fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { - f.debug_tuple("GPv2OrderInstance").field(&self.address).finish() + f.debug_tuple("GPv2OrderInstance") + .field(&self.address) + .finish() } } /// Instantiation and getters/setters. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > GPv2OrderInstance { + impl, N: alloy_contract::private::Network> + GPv2OrderInstance + { /**Creates a new wrapper around an on-chain [`GPv2Order`](self) contract instance. -See the [wrapper's documentation](`GPv2OrderInstance`) for more details.*/ + See the [wrapper's documentation](`GPv2OrderInstance`) for more details.*/ #[inline] - pub const fn new( - address: alloy_sol_types::private::Address, - __provider: P, - ) -> Self { + pub const fn new(address: alloy_sol_types::private::Address, __provider: P) -> Self { Self { address, provider: __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 { @@ -554,7 +552,8 @@ See the [wrapper's documentation](`GPv2OrderInstance`) for more details.*/ } } impl GPv2OrderInstance<&P, N> { - /// Clones the provider and returns a new instance with the cloned provider. + /// Clones the provider and returns a new instance with the cloned + /// provider. #[inline] pub fn with_cloned_provider(self) -> GPv2OrderInstance { GPv2OrderInstance { @@ -565,14 +564,15 @@ See the [wrapper's documentation](`GPv2OrderInstance`) for more details.*/ } } /// Function calls. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > GPv2OrderInstance { - /// Creates a new call builder using this contract instance's provider and address. + impl, N: alloy_contract::private::Network> + GPv2OrderInstance + { + /// 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. + /// 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, @@ -581,14 +581,15 @@ See the [wrapper's documentation](`GPv2OrderInstance`) for more details.*/ } } /// Event filters. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > GPv2OrderInstance { - /// Creates a new event filter using this contract instance's provider and address. + impl, N: alloy_contract::private::Network> + GPv2OrderInstance + { + /// 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. + /// 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> { @@ -613,68 +614,67 @@ library ICoWSwapOnchainOrders { clippy::empty_structs_with_brackets )] pub mod ICoWSwapOnchainOrders { - use super::*; - use alloy_sol_types as alloy_sol_types; + use {super::*, alloy_sol_types}; #[derive(Default, Debug, PartialEq, Eq, Hash)] #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct OnchainSigningScheme(u8); const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[automatically_derived] impl alloy_sol_types::private::SolTypeValue for u8 { #[inline] fn stv_to_tokens( &self, - ) -> as alloy_sol_types::SolType>::Token<'_> { + ) -> as alloy_sol_types::SolType>::Token<'_> + { alloy_sol_types::private::SolTypeValue::< alloy_sol_types::sol_data::Uint<8>, >::stv_to_tokens(self) } + #[inline] fn stv_eip712_data_word(&self) -> alloy_sol_types::Word { - as alloy_sol_types::SolType>::tokenize(self) - .0 + as alloy_sol_types::SolType>::tokenize(self).0 } + #[inline] - fn stv_abi_encode_packed_to( - &self, - out: &mut alloy_sol_types::private::Vec, - ) { + fn stv_abi_encode_packed_to(&self, out: &mut alloy_sol_types::private::Vec) { as alloy_sol_types::SolType>::abi_encode_packed_to(self, out) } + #[inline] fn stv_abi_packed_encoded_size(&self) -> usize { - as alloy_sol_types::SolType>::abi_encoded_size(self) + as alloy_sol_types::SolType>::abi_encoded_size( + self, + ) } } impl OnchainSigningScheme { /// The Solidity type name. pub const NAME: &'static str = stringify!(@ name); + /// Convert from the underlying value type. #[inline] pub const fn from_underlying(value: u8) -> Self { Self(value) } + /// Return the underlying value. #[inline] pub const fn into_underlying(self) -> u8 { self.0 } + /// Return the single encoding of this value, delegating to the /// underlying type. #[inline] pub fn abi_encode(&self) -> alloy_sol_types::private::Vec { ::abi_encode(&self.0) } + /// Return the packed encoding of this value, delegating to the /// underlying type. #[inline] @@ -697,31 +697,29 @@ pub mod ICoWSwapOnchainOrders { #[automatically_derived] impl alloy_sol_types::SolType for OnchainSigningScheme { type RustType = u8; - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SOL_NAME: &'static str = Self::NAME; - const ENCODED_SIZE: Option = as alloy_sol_types::SolType>::ENCODED_SIZE; + type Token<'a> = + as alloy_sol_types::SolType>::Token<'a>; + + const ENCODED_SIZE: Option = + as alloy_sol_types::SolType>::ENCODED_SIZE; const PACKED_ENCODED_SIZE: Option = as alloy_sol_types::SolType>::PACKED_ENCODED_SIZE; + const SOL_NAME: &'static str = Self::NAME; + #[inline] fn valid_token(token: &Self::Token<'_>) -> bool { Self::type_check(token).is_ok() } + #[inline] fn type_check(token: &Self::Token<'_>) -> alloy_sol_types::Result<()> { - as alloy_sol_types::SolType>::type_check(token) + as alloy_sol_types::SolType>::type_check(token) } + #[inline] fn detokenize(token: Self::Token<'_>) -> Self::RustType { - as alloy_sol_types::SolType>::detokenize(token) + as alloy_sol_types::SolType>::detokenize(token) } } #[automatically_derived] @@ -732,6 +730,7 @@ pub mod ICoWSwapOnchainOrders { 8, > as alloy_sol_types::EventTopic>::topic_preimage_length(rust) } + #[inline] fn encode_topic_preimage( rust: &Self::RustType, @@ -741,20 +740,19 @@ pub mod ICoWSwapOnchainOrders { 8, > as alloy_sol_types::EventTopic>::encode_topic_preimage(rust, out) } + #[inline] - fn encode_topic( - rust: &Self::RustType, - ) -> alloy_sol_types::abi::token::WordToken { - as alloy_sol_types::EventTopic>::encode_topic(rust) + fn encode_topic(rust: &Self::RustType) -> alloy_sol_types::abi::token::WordToken { + as alloy_sol_types::EventTopic>::encode_topic( + rust, + ) } } }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**```solidity -struct OnchainSignature { OnchainSigningScheme scheme; bytes data; } -```*/ + struct OnchainSignature { OnchainSigningScheme scheme; bytes data; } + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct OnchainSignature { @@ -770,13 +768,10 @@ struct OnchainSignature { OnchainSigningScheme scheme; bytes data; } clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[doc(hidden)] #[allow(dead_code)] - type UnderlyingSolTuple<'a> = ( - OnchainSigningScheme, - alloy_sol_types::sol_data::Bytes, - ); + type UnderlyingSolTuple<'a> = (OnchainSigningScheme, alloy_sol_types::sol_data::Bytes); #[doc(hidden)] type UnderlyingRustTuple<'a> = ( ::RustType, @@ -784,9 +779,7 @@ struct OnchainSignature { OnchainSigningScheme scheme; bytes data; } ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -819,99 +812,92 @@ struct OnchainSignature { OnchainSigningScheme scheme; bytes data; } #[inline] fn stv_to_tokens(&self) -> ::Token<'_> { ( - ::tokenize( - &self.scheme, - ), + ::tokenize(&self.scheme), ::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) + 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) + 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) + 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 OnchainSignature { type RustType = Self; - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + + const ENCODED_SIZE: Option = + as alloy_sol_types::SolType>::ENCODED_SIZE; + const PACKED_ENCODED_SIZE: Option = + as alloy_sol_types::SolType>::PACKED_ENCODED_SIZE; 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); + let tuple = as alloy_sol_types::SolType>::detokenize(token); >>::from(tuple) } } #[automatically_derived] impl alloy_sol_types::SolStruct for OnchainSignature { const NAME: &'static str = "OnchainSignature"; + #[inline] fn eip712_root_type() -> alloy_sol_types::private::Cow<'static, str> { - alloy_sol_types::private::Cow::Borrowed( - "OnchainSignature(uint8 scheme,bytes data)", - ) + alloy_sol_types::private::Cow::Borrowed("OnchainSignature(uint8 scheme,bytes data)") } + #[inline] - fn eip712_components() -> alloy_sol_types::private::Vec< - alloy_sol_types::private::Cow<'static, str>, - > { + fn eip712_components() + -> alloy_sol_types::private::Vec> + { 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 { [ @@ -939,14 +925,13 @@ struct OnchainSignature { OnchainSigningScheme scheme; bytes data; } &rust.data, ) } + #[inline] fn encode_topic_preimage( rust: &Self::RustType, out: &mut alloy_sol_types::private::Vec, ) { - out.reserve( - ::topic_preimage_length(rust), - ); + out.reserve(::topic_preimage_length(rust)); ::encode_topic_preimage( &rust.scheme, out, @@ -956,25 +941,19 @@ struct OnchainSignature { OnchainSigningScheme scheme; bytes data; } out, ); } + #[inline] - fn encode_topic( - rust: &Self::RustType, - ) -> alloy_sol_types::abi::token::WordToken { + 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), - ) + ::encode_topic_preimage(rust, &mut out); + alloy_sol_types::abi::token::WordToken(alloy_sol_types::private::keccak256(out)) } } }; - use alloy_contract as alloy_contract; + use alloy_contract; /**Creates a new wrapper around an on-chain [`ICoWSwapOnchainOrders`](self) contract instance. -See the [wrapper's documentation](`ICoWSwapOnchainOrdersInstance`) for more details.*/ + See the [wrapper's documentation](`ICoWSwapOnchainOrdersInstance`) for more details.*/ #[inline] pub const fn new< P: alloy_contract::private::Provider, @@ -987,15 +966,15 @@ See the [wrapper's documentation](`ICoWSwapOnchainOrdersInstance`) for more deta } /**A [`ICoWSwapOnchainOrders`](self) instance. -Contains type-safe methods for interacting with an on-chain instance of the -[`ICoWSwapOnchainOrders`](self) contract located at a given `address`, using a given -provider `P`. + Contains type-safe methods for interacting with an on-chain instance of the + [`ICoWSwapOnchainOrders`](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. + 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.*/ + See the [module-level documentation](self) for all the available methods.*/ #[derive(Clone)] pub struct ICoWSwapOnchainOrdersInstance { address: alloy_sol_types::private::Address, @@ -1006,43 +985,45 @@ See the [module-level documentation](self) for all the available methods.*/ impl ::core::fmt::Debug for ICoWSwapOnchainOrdersInstance { #[inline] fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { - f.debug_tuple("ICoWSwapOnchainOrdersInstance").field(&self.address).finish() + f.debug_tuple("ICoWSwapOnchainOrdersInstance") + .field(&self.address) + .finish() } } /// Instantiation and getters/setters. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > ICoWSwapOnchainOrdersInstance { + impl, N: alloy_contract::private::Network> + ICoWSwapOnchainOrdersInstance + { /**Creates a new wrapper around an on-chain [`ICoWSwapOnchainOrders`](self) contract instance. -See the [wrapper's documentation](`ICoWSwapOnchainOrdersInstance`) for more details.*/ + See the [wrapper's documentation](`ICoWSwapOnchainOrdersInstance`) for more details.*/ #[inline] - pub const fn new( - address: alloy_sol_types::private::Address, - __provider: P, - ) -> Self { + pub const fn new(address: alloy_sol_types::private::Address, __provider: P) -> Self { Self { address, provider: __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 { @@ -1050,7 +1031,8 @@ See the [wrapper's documentation](`ICoWSwapOnchainOrdersInstance`) for more deta } } impl ICoWSwapOnchainOrdersInstance<&P, N> { - /// Clones the provider and returns a new instance with the cloned provider. + /// Clones the provider and returns a new instance with the cloned + /// provider. #[inline] pub fn with_cloned_provider(self) -> ICoWSwapOnchainOrdersInstance { ICoWSwapOnchainOrdersInstance { @@ -1061,14 +1043,15 @@ See the [wrapper's documentation](`ICoWSwapOnchainOrdersInstance`) for more deta } } /// Function calls. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > ICoWSwapOnchainOrdersInstance { - /// Creates a new call builder using this contract instance's provider and address. + impl, N: alloy_contract::private::Network> + ICoWSwapOnchainOrdersInstance + { + /// 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. + /// 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, @@ -1077,14 +1060,15 @@ See the [wrapper's documentation](`ICoWSwapOnchainOrdersInstance`) for more deta } } /// Event filters. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > ICoWSwapOnchainOrdersInstance { - /// Creates a new event filter using this contract instance's provider and address. + impl, N: alloy_contract::private::Network> + ICoWSwapOnchainOrdersInstance + { + /// 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. + /// 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> { @@ -1271,13 +1255,12 @@ interface CoWSwapOnchainOrders { clippy::empty_structs_with_brackets )] pub mod CoWSwapOnchainOrders { - use super::*; - use alloy_sol_types as alloy_sol_types; + use {super::*, alloy_sol_types}; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Event with signature `OrderInvalidation(bytes)` and selector `0xb8bad102ac8bbacfef31ff1c906ec6d951c230b4dce750bb0376b812ad35852a`. -```solidity -event OrderInvalidation(bytes orderUid); -```*/ + ```solidity + event OrderInvalidation(bytes orderUid); + ```*/ #[allow( non_camel_case_types, non_snake_case, @@ -1296,21 +1279,22 @@ event OrderInvalidation(bytes orderUid); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[automatically_derived] impl alloy_sol_types::SolEvent for OrderInvalidation { + type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type DataTuple<'a> = (alloy_sol_types::sol_data::Bytes,); - type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type TopicList = (alloy_sol_types::sol_data::FixedBytes<32>,); - const SIGNATURE: &'static str = "OrderInvalidation(bytes)"; - const SIGNATURE_HASH: alloy_sol_types::private::B256 = alloy_sol_types::private::B256::new([ - 184u8, 186u8, 209u8, 2u8, 172u8, 139u8, 186u8, 207u8, 239u8, 49u8, 255u8, - 28u8, 144u8, 110u8, 198u8, 217u8, 81u8, 194u8, 48u8, 180u8, 220u8, 231u8, - 80u8, 187u8, 3u8, 118u8, 184u8, 18u8, 173u8, 53u8, 133u8, 42u8, - ]); + const ANONYMOUS: bool = false; + const SIGNATURE: &'static str = "OrderInvalidation(bytes)"; + const SIGNATURE_HASH: alloy_sol_types::private::B256 = + alloy_sol_types::private::B256::new([ + 184u8, 186u8, 209u8, 2u8, 172u8, 139u8, 186u8, 207u8, 239u8, 49u8, 255u8, 28u8, + 144u8, 110u8, 198u8, 217u8, 81u8, 194u8, 48u8, 180u8, 220u8, 231u8, 80u8, + 187u8, 3u8, 118u8, 184u8, 18u8, 173u8, 53u8, 133u8, 42u8, + ]); + #[allow(unused_variables)] #[inline] fn new( @@ -1319,21 +1303,21 @@ event OrderInvalidation(bytes orderUid); ) -> Self { Self { orderUid: 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, - ), - ); + 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<'_> { ( @@ -1342,10 +1326,12 @@ event OrderInvalidation(bytes orderUid); ), ) } + #[inline] fn topics(&self) -> ::RustType { (Self::SIGNATURE_HASH.into(),) } + #[inline] fn encode_topics_raw( &self, @@ -1354,9 +1340,7 @@ event OrderInvalidation(bytes orderUid); if out.len() < ::COUNT { return Err(alloy_sol_types::Error::Overrun); } - out[0usize] = alloy_sol_types::abi::token::WordToken( - Self::SIGNATURE_HASH, - ); + out[0usize] = alloy_sol_types::abi::token::WordToken(Self::SIGNATURE_HASH); Ok(()) } } @@ -1365,6 +1349,7 @@ event OrderInvalidation(bytes orderUid); 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) } @@ -1379,9 +1364,9 @@ event OrderInvalidation(bytes orderUid); }; #[derive()] /**Event with signature `OrderPlacement(address,(address,address,address,uint256,uint256,uint32,bytes32,uint256,bytes32,bool,bytes32,bytes32),(uint8,bytes),bytes)` and selector `0xcf5f9de2984132265203b5c335b25727702ca77262ff622e136baa7362bf1da9`. -```solidity -event OrderPlacement(address indexed sender, GPv2Order.Data order, ICoWSwapOnchainOrders.OnchainSignature signature, bytes data); -```*/ + ```solidity + event OrderPlacement(address indexed sender, GPv2Order.Data order, ICoWSwapOnchainOrders.OnchainSignature signature, bytes data); + ```*/ #[allow( non_camel_case_types, non_snake_case, @@ -1395,7 +1380,8 @@ event OrderPlacement(address indexed sender, GPv2Order.Data order, ICoWSwapOncha #[allow(missing_docs)] pub order: ::RustType, #[allow(missing_docs)] - pub signature: ::RustType, + pub signature: + ::RustType, #[allow(missing_docs)] pub data: alloy_sol_types::private::Bytes, } @@ -1406,28 +1392,31 @@ event OrderPlacement(address indexed sender, GPv2Order.Data order, ICoWSwapOncha clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[automatically_derived] impl alloy_sol_types::SolEvent for OrderPlacement { + type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type DataTuple<'a> = ( GPv2Order::Data, ICoWSwapOnchainOrders::OnchainSignature, alloy_sol_types::sol_data::Bytes, ); - 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, ); - const SIGNATURE: &'static str = "OrderPlacement(address,(address,address,address,uint256,uint256,uint32,bytes32,uint256,bytes32,bool,bytes32,bytes32),(uint8,bytes),bytes)"; - const SIGNATURE_HASH: alloy_sol_types::private::B256 = alloy_sol_types::private::B256::new([ - 207u8, 95u8, 157u8, 226u8, 152u8, 65u8, 50u8, 38u8, 82u8, 3u8, 181u8, - 195u8, 53u8, 178u8, 87u8, 39u8, 112u8, 44u8, 167u8, 114u8, 98u8, 255u8, - 98u8, 46u8, 19u8, 107u8, 170u8, 115u8, 98u8, 191u8, 29u8, 169u8, - ]); + const ANONYMOUS: bool = false; + const SIGNATURE: &'static str = "OrderPlacement(address,(address,address,address,\ + uint256,uint256,uint32,bytes32,uint256,bytes32,bool,\ + bytes32,bytes32),(uint8,bytes),bytes)"; + const SIGNATURE_HASH: alloy_sol_types::private::B256 = + alloy_sol_types::private::B256::new([ + 207u8, 95u8, 157u8, 226u8, 152u8, 65u8, 50u8, 38u8, 82u8, 3u8, 181u8, 195u8, + 53u8, 178u8, 87u8, 39u8, 112u8, 44u8, 167u8, 114u8, 98u8, 255u8, 98u8, 46u8, + 19u8, 107u8, 170u8, 115u8, 98u8, 191u8, 29u8, 169u8, + ]); + #[allow(unused_variables)] #[inline] fn new( @@ -1441,21 +1430,21 @@ event OrderPlacement(address indexed sender, GPv2Order.Data order, ICoWSwapOncha data: data.2, } } + #[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, - ), - ); + 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<'_> { ( @@ -1468,10 +1457,12 @@ event OrderPlacement(address indexed sender, GPv2Order.Data order, ICoWSwapOncha ), ) } + #[inline] fn topics(&self) -> ::RustType { (Self::SIGNATURE_HASH.into(), self.sender.clone()) } + #[inline] fn encode_topics_raw( &self, @@ -1480,9 +1471,7 @@ event OrderPlacement(address indexed sender, GPv2Order.Data order, ICoWSwapOncha if out.len() < ::COUNT { return Err(alloy_sol_types::Error::Overrun); } - out[0usize] = alloy_sol_types::abi::token::WordToken( - Self::SIGNATURE_HASH, - ); + out[0usize] = alloy_sol_types::abi::token::WordToken(Self::SIGNATURE_HASH); out[1usize] = ::encode_topic( &self.sender, ); @@ -1494,6 +1483,7 @@ event OrderPlacement(address indexed sender, GPv2Order.Data order, ICoWSwapOncha 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) } @@ -1507,9 +1497,9 @@ event OrderPlacement(address indexed sender, GPv2Order.Data order, ICoWSwapOncha } }; /**Constructor`. -```solidity -constructor(address settlementContractAddress); -```*/ + ```solidity + constructor(address settlementContractAddress); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct constructorCall { @@ -1517,7 +1507,7 @@ constructor(address settlementContractAddress); pub settlementContractAddress: alloy_sol_types::private::Address, } const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -1526,9 +1516,7 @@ constructor(address settlementContractAddress); type UnderlyingRustTuple<'a> = (alloy_sol_types::private::Address,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1555,15 +1543,15 @@ constructor(address settlementContractAddress); #[automatically_derived] impl alloy_sol_types::SolConstructor for constructorCall { type Parameters<'a> = (alloy_sol_types::sol_data::Address,); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + 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<'_> { ( @@ -1576,7 +1564,6 @@ constructor(address settlementContractAddress); }; ///Container for all the [`CoWSwapOnchainOrders`](self) events. #[derive(Clone)] - #[derive()] pub enum CoWSwapOnchainOrdersEvents { #[allow(missing_docs)] OrderInvalidation(OrderInvalidation), @@ -1586,32 +1573,34 @@ constructor(address settlementContractAddress); impl CoWSwapOnchainOrdersEvents { /// 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. + /// 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]] = &[ [ - 184u8, 186u8, 209u8, 2u8, 172u8, 139u8, 186u8, 207u8, 239u8, 49u8, 255u8, - 28u8, 144u8, 110u8, 198u8, 217u8, 81u8, 194u8, 48u8, 180u8, 220u8, 231u8, - 80u8, 187u8, 3u8, 118u8, 184u8, 18u8, 173u8, 53u8, 133u8, 42u8, + 184u8, 186u8, 209u8, 2u8, 172u8, 139u8, 186u8, 207u8, 239u8, 49u8, 255u8, 28u8, + 144u8, 110u8, 198u8, 217u8, 81u8, 194u8, 48u8, 180u8, 220u8, 231u8, 80u8, 187u8, + 3u8, 118u8, 184u8, 18u8, 173u8, 53u8, 133u8, 42u8, ], [ - 207u8, 95u8, 157u8, 226u8, 152u8, 65u8, 50u8, 38u8, 82u8, 3u8, 181u8, - 195u8, 53u8, 178u8, 87u8, 39u8, 112u8, 44u8, 167u8, 114u8, 98u8, 255u8, - 98u8, 46u8, 19u8, 107u8, 170u8, 115u8, 98u8, 191u8, 29u8, 169u8, + 207u8, 95u8, 157u8, 226u8, 152u8, 65u8, 50u8, 38u8, 82u8, 3u8, 181u8, 195u8, 53u8, + 178u8, 87u8, 39u8, 112u8, 44u8, 167u8, 114u8, 98u8, 255u8, 98u8, 46u8, 19u8, 107u8, + 170u8, 115u8, 98u8, 191u8, 29u8, 169u8, ], ]; - /// The names of the variants in the same order as `SELECTORS`. - pub const VARIANT_NAMES: &'static [&'static str] = &[ - ::core::stringify!(OrderInvalidation), - ::core::stringify!(OrderPlacement), - ]; /// The signatures in the same order as `SELECTORS`. pub const SIGNATURES: &'static [&'static str] = &[ ::SIGNATURE, ::SIGNATURE, ]; + /// The names of the variants in the same order as `SELECTORS`. + pub const VARIANT_NAMES: &'static [&'static str] = &[ + ::core::stringify!(OrderInvalidation), + ::core::stringify!(OrderPlacement), + ]; + /// Returns the signature for the given selector, if known. #[inline] pub fn signature_by_selector( @@ -1624,51 +1613,41 @@ constructor(address settlementContractAddress); ::core::result::Result::Err(_) => ::core::option::Option::None, } } + /// Returns the enum variant name for the given selector, if known. #[inline] - pub fn name_by_selector( - selector: [u8; 32usize], - ) -> ::core::option::Option<&'static str> { + pub fn name_by_selector(selector: [u8; 32usize]) -> ::core::option::Option<&'static str> { let sig = Self::signature_by_selector(selector)?; sig.split_once('(').map(|(name, _)| name) } } #[automatically_derived] impl alloy_sol_types::SolEventInterface for CoWSwapOnchainOrdersEvents { - const NAME: &'static str = "CoWSwapOnchainOrdersEvents"; const COUNT: usize = 2usize; + const NAME: &'static str = "CoWSwapOnchainOrdersEvents"; + 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, - ) + Some(::SIGNATURE_HASH) => { + ::decode_raw_log(topics, data) .map(Self::OrderInvalidation) } Some(::SIGNATURE_HASH) => { - ::decode_raw_log( - topics, - data, - ) + ::decode_raw_log(topics, data) .map(Self::OrderPlacement) } - _ => { - 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(), - ), + _ => 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(), ), - }) - } + ), + }), } } } @@ -1684,6 +1663,7 @@ constructor(address settlementContractAddress); } } } + fn into_log_data(self) -> alloy_sol_types::private::LogData { match self { Self::OrderInvalidation(inner) => { @@ -1695,10 +1675,10 @@ constructor(address settlementContractAddress); } } } - use alloy_contract as alloy_contract; + use alloy_contract; /**Creates a new wrapper around an on-chain [`CoWSwapOnchainOrders`](self) contract instance. -See the [wrapper's documentation](`CoWSwapOnchainOrdersInstance`) for more details.*/ + See the [wrapper's documentation](`CoWSwapOnchainOrdersInstance`) for more details.*/ #[inline] pub const fn new< P: alloy_contract::private::Provider, @@ -1711,15 +1691,15 @@ See the [wrapper's documentation](`CoWSwapOnchainOrdersInstance`) for more detai } /**A [`CoWSwapOnchainOrders`](self) instance. -Contains type-safe methods for interacting with an on-chain instance of the -[`CoWSwapOnchainOrders`](self) contract located at a given `address`, using a given -provider `P`. + Contains type-safe methods for interacting with an on-chain instance of the + [`CoWSwapOnchainOrders`](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. + 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.*/ + See the [module-level documentation](self) for all the available methods.*/ #[derive(Clone)] pub struct CoWSwapOnchainOrdersInstance { address: alloy_sol_types::private::Address, @@ -1730,43 +1710,45 @@ See the [module-level documentation](self) for all the available methods.*/ impl ::core::fmt::Debug for CoWSwapOnchainOrdersInstance { #[inline] fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { - f.debug_tuple("CoWSwapOnchainOrdersInstance").field(&self.address).finish() + f.debug_tuple("CoWSwapOnchainOrdersInstance") + .field(&self.address) + .finish() } } /// Instantiation and getters/setters. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > CoWSwapOnchainOrdersInstance { + impl, N: alloy_contract::private::Network> + CoWSwapOnchainOrdersInstance + { /**Creates a new wrapper around an on-chain [`CoWSwapOnchainOrders`](self) contract instance. -See the [wrapper's documentation](`CoWSwapOnchainOrdersInstance`) for more details.*/ + See the [wrapper's documentation](`CoWSwapOnchainOrdersInstance`) for more details.*/ #[inline] - pub const fn new( - address: alloy_sol_types::private::Address, - __provider: P, - ) -> Self { + pub const fn new(address: alloy_sol_types::private::Address, __provider: P) -> Self { Self { address, provider: __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 { @@ -1774,7 +1756,8 @@ See the [wrapper's documentation](`CoWSwapOnchainOrdersInstance`) for more detai } } impl CoWSwapOnchainOrdersInstance<&P, N> { - /// Clones the provider and returns a new instance with the cloned provider. + /// Clones the provider and returns a new instance with the cloned + /// provider. #[inline] pub fn with_cloned_provider(self) -> CoWSwapOnchainOrdersInstance { CoWSwapOnchainOrdersInstance { @@ -1785,14 +1768,15 @@ See the [wrapper's documentation](`CoWSwapOnchainOrdersInstance`) for more detai } } /// Function calls. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > CoWSwapOnchainOrdersInstance { - /// Creates a new call builder using this contract instance's provider and address. + impl, N: alloy_contract::private::Network> + CoWSwapOnchainOrdersInstance + { + /// 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. + /// 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, @@ -1801,33 +1785,31 @@ See the [wrapper's documentation](`CoWSwapOnchainOrdersInstance`) for more detai } } /// Event filters. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > CoWSwapOnchainOrdersInstance { - /// Creates a new event filter using this contract instance's provider and address. + impl, N: alloy_contract::private::Network> + CoWSwapOnchainOrdersInstance + { + /// 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. + /// 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 [`OrderInvalidation`] event. - pub fn OrderInvalidation_filter( - &self, - ) -> alloy_contract::Event<&P, OrderInvalidation, N> { + pub fn OrderInvalidation_filter(&self) -> alloy_contract::Event<&P, OrderInvalidation, N> { self.event_filter::() } + ///Creates a new event filter for the [`OrderPlacement`] event. - pub fn OrderPlacement_filter( - &self, - ) -> alloy_contract::Event<&P, OrderPlacement, N> { + pub fn OrderPlacement_filter(&self) -> alloy_contract::Event<&P, OrderPlacement, N> { self.event_filter::() } } } -pub type Instance = CoWSwapOnchainOrders::CoWSwapOnchainOrdersInstance< - ::alloy_provider::DynProvider, ->; +pub type Instance = + CoWSwapOnchainOrders::CoWSwapOnchainOrdersInstance<::alloy_provider::DynProvider>; diff --git a/contracts/generated/contracts-generated/erc1271signaturevalidator/src/lib.rs b/contracts/generated/contracts-generated/erc1271signaturevalidator/src/lib.rs index 9aa4316958..d57519f715 100644 --- a/contracts/generated/contracts-generated/erc1271signaturevalidator/src/lib.rs +++ b/contracts/generated/contracts-generated/erc1271signaturevalidator/src/lib.rs @@ -1,4 +1,10 @@ -#![allow(unused_imports, unused_attributes, clippy::all, rustdoc::all, non_snake_case)] +#![allow( + unused_imports, + unused_attributes, + clippy::all, + rustdoc::all, + non_snake_case +)] //! Auto-generated contract bindings. Do not edit. /** @@ -46,13 +52,12 @@ interface ERC1271SignatureValidator { clippy::empty_structs_with_brackets )] pub mod ERC1271SignatureValidator { - use super::*; - use alloy_sol_types as alloy_sol_types; + use {super::*, alloy_sol_types}; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `isValidSignature(bytes32,bytes)` and selector `0x1626ba7e`. -```solidity -function isValidSignature(bytes32 hash, bytes memory signature) external view returns (bytes4 magicValue); -```*/ + ```solidity + function isValidSignature(bytes32 hash, bytes memory signature) external view returns (bytes4 magicValue); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct isValidSignatureCall { @@ -62,7 +67,8 @@ function isValidSignature(bytes32 hash, bytes memory signature) external view re pub signature: alloy_sol_types::private::Bytes, } #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`isValidSignature(bytes32,bytes)`](isValidSignatureCall) function. + ///Container type for the return parameters of the + /// [`isValidSignature(bytes32,bytes)`](isValidSignatureCall) function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct isValidSignatureReturn { @@ -76,7 +82,7 @@ function isValidSignature(bytes32 hash, bytes memory signature) external view re clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -91,9 +97,7 @@ function isValidSignature(bytes32 hash, bytes memory signature) external view re ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -102,16 +106,14 @@ function isValidSignature(bytes32 hash, bytes memory signature) external view re } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From - for UnderlyingRustTuple<'_> { + impl ::core::convert::From for UnderlyingRustTuple<'_> { fn from(value: isValidSignatureCall) -> Self { (value.hash, value.signature) } } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From> - for isValidSignatureCall { + impl ::core::convert::From> for isValidSignatureCall { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { Self { hash: tuple.0, @@ -128,9 +130,7 @@ function isValidSignature(bytes32 hash, bytes memory signature) external view re 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, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -139,18 +139,18 @@ function isValidSignature(bytes32 hash, bytes memory signature) external view re } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From - for UnderlyingRustTuple<'_> { + impl ::core::convert::From for UnderlyingRustTuple<'_> { fn from(value: isValidSignatureReturn) -> Self { (value.magicValue,) } } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From> - for isValidSignatureReturn { + impl ::core::convert::From> for isValidSignatureReturn { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { - Self { magicValue: tuple.0 } + Self { + magicValue: tuple.0, + } } } } @@ -160,22 +160,21 @@ function isValidSignature(bytes32 hash, bytes memory signature) external view re alloy_sol_types::sol_data::FixedBytes<32>, alloy_sol_types::sol_data::Bytes, ); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = alloy_sol_types::private::FixedBytes<4>; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (alloy_sol_types::sol_data::FixedBytes<4>,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "isValidSignature(bytes32,bytes)"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [22u8, 38u8, 186u8, 126u8]; + const SIGNATURE: &'static str = "isValidSignature(bytes32,bytes)"; + #[inline] fn new<'a>( tuple: as alloy_sol_types::SolType>::RustType, ) -> Self { tuple.into() } + #[inline] fn tokenize(&self) -> Self::Token<'_> { ( @@ -187,6 +186,7 @@ function isValidSignature(bytes32 hash, bytes memory signature) external view re ), ) } + #[inline] fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { ( @@ -195,33 +195,32 @@ function isValidSignature(bytes32 hash, bytes memory signature) external view re > 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| { + as alloy_sol_types::SolType>::abi_decode_sequence(data).map( + |r| { let r: isValidSignatureReturn = r.into(); r.magicValue - }) + }, + ) } + #[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: isValidSignatureReturn = r.into(); - r.magicValue - }) + 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: isValidSignatureReturn = r.into(); + r.magicValue + }) } } }; - ///Container for all the [`ERC1271SignatureValidator`](self) function calls. + ///Container for all the [`ERC1271SignatureValidator`](self) function + /// calls. #[derive(Clone)] - #[derive()] pub enum ERC1271SignatureValidatorCalls { #[allow(missing_docs)] isValidSignature(isValidSignatureCall), @@ -229,19 +228,18 @@ function isValidSignature(bytes32 hash, bytes memory signature) external view re impl ERC1271SignatureValidatorCalls { /// 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. + /// 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]] = &[[22u8, 38u8, 186u8, 126u8]]; - /// The names of the variants in the same order as `SELECTORS`. - pub const VARIANT_NAMES: &'static [&'static str] = &[ - ::core::stringify!(isValidSignature), - ]; /// The signatures in the same order as `SELECTORS`. - pub const SIGNATURES: &'static [&'static str] = &[ - ::SIGNATURE, - ]; + pub const SIGNATURES: &'static [&'static str] = + &[::SIGNATURE]; + /// The names of the variants in the same order as `SELECTORS`. + pub const VARIANT_NAMES: &'static [&'static str] = &[::core::stringify!(isValidSignature)]; + /// Returns the signature for the given selector, if known. #[inline] pub fn signature_by_selector( @@ -254,20 +252,20 @@ function isValidSignature(bytes32 hash, bytes memory signature) external view re ::core::result::Result::Err(_) => ::core::option::Option::None, } } + /// Returns the enum variant name for the given selector, if known. #[inline] - pub fn name_by_selector( - selector: [u8; 4usize], - ) -> ::core::option::Option<&'static str> { + pub fn name_by_selector(selector: [u8; 4usize]) -> ::core::option::Option<&'static str> { let sig = Self::signature_by_selector(selector)?; sig.split_once('(').map(|(name, _)| name) } } #[automatically_derived] impl alloy_sol_types::SolInterface for ERC1271SignatureValidatorCalls { - const NAME: &'static str = "ERC1271SignatureValidatorCalls"; - const MIN_DATA_LENGTH: usize = 96usize; const COUNT: usize = 1usize; + const MIN_DATA_LENGTH: usize = 96usize; + const NAME: &'static str = "ERC1271SignatureValidatorCalls"; + #[inline] fn selector(&self) -> [u8; 4] { match self { @@ -276,45 +274,42 @@ function isValidSignature(bytes32 hash, bytes memory signature) external view re } } } + #[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 { + fn abi_decode_raw(selector: [u8; 4], data: &[u8]) -> alloy_sol_types::Result { static DECODE_SHIMS: &[fn( &[u8], - ) -> alloy_sol_types::Result] = &[ - { - fn isValidSignature( - data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, - ) - .map(ERC1271SignatureValidatorCalls::isValidSignature) - } - isValidSignature - }, - ]; + ) -> alloy_sol_types::Result< + ERC1271SignatureValidatorCalls, + >] = &[{ + fn isValidSignature( + data: &[u8], + ) -> alloy_sol_types::Result { + ::abi_decode_raw(data) + .map(ERC1271SignatureValidatorCalls::isValidSignature) + } + isValidSignature + }]; let Ok(idx) = Self::SELECTORS.binary_search(&selector) else { - return Err( - alloy_sol_types::Error::unknown_selector( - ::NAME, - selector, - ), - ); + return Err(alloy_sol_types::Error::unknown_selector( + ::NAME, + selector, + )); }; DECODE_SHIMS[idx](data) } + #[inline] #[allow(non_snake_case)] fn abi_decode_raw_validate( @@ -323,55 +318,50 @@ function isValidSignature(bytes32 hash, bytes memory signature) external view re ) -> alloy_sol_types::Result { static DECODE_VALIDATE_SHIMS: &[fn( &[u8], - ) -> alloy_sol_types::Result] = &[ - { - fn isValidSignature( - data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) - .map(ERC1271SignatureValidatorCalls::isValidSignature) - } - isValidSignature - }, - ]; + ) -> alloy_sol_types::Result< + ERC1271SignatureValidatorCalls, + >] = &[{ + fn isValidSignature( + data: &[u8], + ) -> alloy_sol_types::Result { + ::abi_decode_raw_validate( + data, + ) + .map(ERC1271SignatureValidatorCalls::isValidSignature) + } + isValidSignature + }]; let Ok(idx) = Self::SELECTORS.binary_search(&selector) else { - return Err( - alloy_sol_types::Error::unknown_selector( - ::NAME, - selector, - ), - ); + 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::isValidSignature(inner) => { - ::abi_encoded_size( - inner, - ) + ::abi_encoded_size(inner) } } } + #[inline] fn abi_encode_raw(&self, out: &mut alloy_sol_types::private::Vec) { match self { Self::isValidSignature(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } } } } - use alloy_contract as alloy_contract; + use alloy_contract; /**Creates a new wrapper around an on-chain [`ERC1271SignatureValidator`](self) contract instance. -See the [wrapper's documentation](`ERC1271SignatureValidatorInstance`) for more details.*/ + See the [wrapper's documentation](`ERC1271SignatureValidatorInstance`) for more details.*/ #[inline] pub const fn new< P: alloy_contract::private::Provider, @@ -384,20 +374,17 @@ See the [wrapper's documentation](`ERC1271SignatureValidatorInstance`) for more } /**A [`ERC1271SignatureValidator`](self) instance. -Contains type-safe methods for interacting with an on-chain instance of the -[`ERC1271SignatureValidator`](self) contract located at a given `address`, using a given -provider `P`. + Contains type-safe methods for interacting with an on-chain instance of the + [`ERC1271SignatureValidator`](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. + 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.*/ + See the [module-level documentation](self) for all the available methods.*/ #[derive(Clone)] - pub struct ERC1271SignatureValidatorInstance< - P, - N = alloy_contract::private::Ethereum, - > { + pub struct ERC1271SignatureValidatorInstance { address: alloy_sol_types::private::Address, provider: P, _network: ::core::marker::PhantomData, @@ -412,39 +399,39 @@ See the [module-level documentation](self) for all the available methods.*/ } } /// Instantiation and getters/setters. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > ERC1271SignatureValidatorInstance { + impl, N: alloy_contract::private::Network> + ERC1271SignatureValidatorInstance + { /**Creates a new wrapper around an on-chain [`ERC1271SignatureValidator`](self) contract instance. -See the [wrapper's documentation](`ERC1271SignatureValidatorInstance`) for more details.*/ + See the [wrapper's documentation](`ERC1271SignatureValidatorInstance`) for more details.*/ #[inline] - pub const fn new( - address: alloy_sol_types::private::Address, - __provider: P, - ) -> Self { + pub const fn new(address: alloy_sol_types::private::Address, __provider: P) -> Self { Self { address, provider: __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 { @@ -452,7 +439,8 @@ See the [wrapper's documentation](`ERC1271SignatureValidatorInstance`) for more } } impl ERC1271SignatureValidatorInstance<&P, N> { - /// Clones the provider and returns a new instance with the cloned provider. + /// Clones the provider and returns a new instance with the cloned + /// provider. #[inline] pub fn with_cloned_provider(self) -> ERC1271SignatureValidatorInstance { ERC1271SignatureValidatorInstance { @@ -463,43 +451,41 @@ See the [wrapper's documentation](`ERC1271SignatureValidatorInstance`) for more } } /// Function calls. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > ERC1271SignatureValidatorInstance { - /// Creates a new call builder using this contract instance's provider and address. + impl, N: alloy_contract::private::Network> + ERC1271SignatureValidatorInstance + { + /// 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. + /// 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 [`isValidSignature`] function. pub fn isValidSignature( &self, hash: alloy_sol_types::private::FixedBytes<32>, signature: alloy_sol_types::private::Bytes, ) -> alloy_contract::SolCallBuilder<&P, isValidSignatureCall, N> { - self.call_builder( - &isValidSignatureCall { - hash, - signature, - }, - ) + self.call_builder(&isValidSignatureCall { hash, signature }) } } /// Event filters. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > ERC1271SignatureValidatorInstance { - /// Creates a new event filter using this contract instance's provider and address. + impl, N: alloy_contract::private::Network> + ERC1271SignatureValidatorInstance + { + /// 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. + /// 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> { @@ -507,6 +493,5 @@ See the [wrapper's documentation](`ERC1271SignatureValidatorInstance`) for more } } } -pub type Instance = ERC1271SignatureValidator::ERC1271SignatureValidatorInstance< - ::alloy_provider::DynProvider, ->; +pub type Instance = + ERC1271SignatureValidator::ERC1271SignatureValidatorInstance<::alloy_provider::DynProvider>; diff --git a/contracts/generated/contracts-generated/erc20/src/lib.rs b/contracts/generated/contracts-generated/erc20/src/lib.rs index cbff6b30ef..3117b2c8ee 100644 --- a/contracts/generated/contracts-generated/erc20/src/lib.rs +++ b/contracts/generated/contracts-generated/erc20/src/lib.rs @@ -1,4 +1,10 @@ -#![allow(unused_imports, unused_attributes, clippy::all, rustdoc::all, non_snake_case)] +#![allow( + unused_imports, + unused_attributes, + clippy::all, + rustdoc::all, + non_snake_case +)] //! Auto-generated contract bindings. Do not edit. /** @@ -259,13 +265,12 @@ interface ERC20 { clippy::empty_structs_with_brackets )] pub mod ERC20 { - use super::*; - use alloy_sol_types as alloy_sol_types; + use {super::*, alloy_sol_types}; #[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); -```*/ + ```solidity + event Approval(address indexed owner, address indexed spender, uint256 value); + ```*/ #[allow( non_camel_case_types, non_snake_case, @@ -288,25 +293,26 @@ event Approval(address indexed owner, address indexed spender, uint256 value); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[automatically_derived] impl alloy_sol_types::SolEvent for Approval { + type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; 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; + 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, + ]); + #[allow(unused_variables)] #[inline] fn new( @@ -319,33 +325,39 @@ event Approval(address indexed owner, address indexed spender, uint256 value); 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, - ), - ); + 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), + as alloy_sol_types::SolType>::tokenize( + &self.value, + ), ) } + #[inline] fn topics(&self) -> ::RustType { - (Self::SIGNATURE_HASH.into(), self.owner.clone(), self.spender.clone()) + ( + Self::SIGNATURE_HASH.into(), + self.owner.clone(), + self.spender.clone(), + ) } + #[inline] fn encode_topics_raw( &self, @@ -354,9 +366,7 @@ event Approval(address indexed owner, address indexed spender, uint256 value); if out.len() < ::COUNT { return Err(alloy_sol_types::Error::Overrun); } - out[0usize] = alloy_sol_types::abi::token::WordToken( - Self::SIGNATURE_HASH, - ); + out[0usize] = alloy_sol_types::abi::token::WordToken(Self::SIGNATURE_HASH); out[1usize] = ::encode_topic( &self.owner, ); @@ -371,6 +381,7 @@ event Approval(address indexed owner, address indexed spender, uint256 value); 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) } @@ -385,9 +396,9 @@ event Approval(address indexed owner, address indexed spender, uint256 value); }; #[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); -```*/ + ```solidity + event Transfer(address indexed from, address indexed to, uint256 value); + ```*/ #[allow( non_camel_case_types, non_snake_case, @@ -410,25 +421,26 @@ event Transfer(address indexed from, address indexed to, uint256 value); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[automatically_derived] impl alloy_sol_types::SolEvent for Transfer { + type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; 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; + 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, + ]); + #[allow(unused_variables)] #[inline] fn new( @@ -441,33 +453,39 @@ event Transfer(address indexed from, address indexed to, uint256 value); 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, - ), - ); + 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), + as alloy_sol_types::SolType>::tokenize( + &self.value, + ), ) } + #[inline] fn topics(&self) -> ::RustType { - (Self::SIGNATURE_HASH.into(), self.from.clone(), self.to.clone()) + ( + Self::SIGNATURE_HASH.into(), + self.from.clone(), + self.to.clone(), + ) } + #[inline] fn encode_topics_raw( &self, @@ -476,9 +494,7 @@ event Transfer(address indexed from, address indexed to, uint256 value); if out.len() < ::COUNT { return Err(alloy_sol_types::Error::Overrun); } - out[0usize] = alloy_sol_types::abi::token::WordToken( - Self::SIGNATURE_HASH, - ); + out[0usize] = alloy_sol_types::abi::token::WordToken(Self::SIGNATURE_HASH); out[1usize] = ::encode_topic( &self.from, ); @@ -493,6 +509,7 @@ event Transfer(address indexed from, address indexed to, uint256 value); 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) } @@ -506,9 +523,9 @@ event Transfer(address indexed from, address indexed to, uint256 value); } }; /**Constructor`. -```solidity -constructor(string name_, string symbol_); -```*/ + ```solidity + constructor(string name_, string symbol_); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct constructorCall { @@ -518,7 +535,7 @@ constructor(string name_, string symbol_); pub symbol_: alloy_sol_types::private::String, } const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -533,9 +550,7 @@ constructor(string name_, string symbol_); ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -566,15 +581,15 @@ constructor(string name_, string symbol_); alloy_sol_types::sol_data::String, alloy_sol_types::sol_data::String, ); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + 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<'_> { ( @@ -590,9 +605,9 @@ constructor(string name_, string symbol_); }; #[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); -```*/ + ```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 { @@ -602,7 +617,8 @@ function allowance(address owner, address spender) external view returns (uint25 pub spender: alloy_sol_types::private::Address, } #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`allowance(address,address)`](allowanceCall) function. + ///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 { @@ -616,7 +632,7 @@ function allowance(address owner, address spender) external view returns (uint25 clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -631,9 +647,7 @@ function allowance(address owner, address spender) external view returns (uint25 ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -663,14 +677,10 @@ function allowance(address owner, address spender) external view returns (uint25 #[allow(dead_code)] type UnderlyingSolTuple<'a> = (alloy_sol_types::sol_data::Uint<256>,); #[doc(hidden)] - type UnderlyingRustTuple<'a> = ( - alloy_sol_types::private::primitives::aliases::U256, - ); + 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, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -698,22 +708,21 @@ function allowance(address owner, address spender) external view returns (uint25 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 ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; 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)"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [221u8, 98u8, 237u8, 62u8]; + const SIGNATURE: &'static str = "allowance(address,address)"; + #[inline] fn new<'a>( tuple: as alloy_sol_types::SolType>::RustType, ) -> Self { tuple.into() } + #[inline] fn tokenize(&self) -> Self::Token<'_> { ( @@ -725,43 +734,43 @@ function allowance(address owner, address spender) external view returns (uint25 ), ) } + #[inline] fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { ( - as alloy_sol_types::SolType>::tokenize(ret), + 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| { + 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 - }) + 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(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `approve(address,uint256)` and selector `0x095ea7b3`. -```solidity -function approve(address spender, uint256 amount) external returns (bool); -```*/ + ```solidity + function approve(address spender, uint256 amount) external returns (bool); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct approveCall { @@ -771,7 +780,8 @@ function approve(address spender, uint256 amount) external returns (bool); pub amount: alloy_sol_types::private::primitives::aliases::U256, } #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`approve(address,uint256)`](approveCall) function. + ///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 { @@ -785,7 +795,7 @@ function approve(address spender, uint256 amount) external returns (bool); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -800,9 +810,7 @@ function approve(address spender, uint256 amount) external returns (bool); ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -835,9 +843,7 @@ function approve(address spender, uint256 amount) external returns (bool); type UnderlyingRustTuple<'a> = (bool,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -865,70 +871,65 @@ function approve(address spender, uint256 amount) external returns (bool); 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 ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; 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)"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [9u8, 94u8, 167u8, 179u8]; + const SIGNATURE: &'static str = "approve(address,uint256)"; + #[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.amount), + as alloy_sol_types::SolType>::tokenize( + &self.amount, + ), ) } + #[inline] fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { - ( - ::tokenize( - ret, - ), - ) + (::tokenize(ret),) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) - .map(|r| { + 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 - }) + 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(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `balanceOf(address)` and selector `0x70a08231`. -```solidity -function balanceOf(address account) external view returns (uint256); -```*/ + ```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 { @@ -936,7 +937,8 @@ function balanceOf(address account) external view returns (uint256); pub account: alloy_sol_types::private::Address, } #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`balanceOf(address)`](balanceOfCall) function. + ///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 { @@ -950,7 +952,7 @@ function balanceOf(address account) external view returns (uint256); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -959,9 +961,7 @@ function balanceOf(address account) external view returns (uint256); type UnderlyingRustTuple<'a> = (alloy_sol_types::private::Address,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -988,14 +988,10 @@ function balanceOf(address account) external view returns (uint256); #[allow(dead_code)] type UnderlyingSolTuple<'a> = (alloy_sol_types::sol_data::Uint<256>,); #[doc(hidden)] - type UnderlyingRustTuple<'a> = ( - alloy_sol_types::private::primitives::aliases::U256, - ); + 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, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1020,22 +1016,21 @@ function balanceOf(address account) external view returns (uint256); #[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 ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; 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)"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [112u8, 160u8, 130u8, 49u8]; + const SIGNATURE: &'static str = "balanceOf(address)"; + #[inline] fn new<'a>( tuple: as alloy_sol_types::SolType>::RustType, ) -> Self { tuple.into() } + #[inline] fn tokenize(&self) -> Self::Token<'_> { ( @@ -1044,48 +1039,49 @@ function balanceOf(address account) external view returns (uint256); ), ) } + #[inline] fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { ( - as alloy_sol_types::SolType>::tokenize(ret), + 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| { + 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 - }) + 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(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `decimals()` and selector `0x313ce567`. -```solidity -function decimals() external view returns (uint8); -```*/ + ```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(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`decimals()`](decimalsCall) function. + ///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 { @@ -1099,7 +1095,7 @@ function decimals() external view returns (uint8); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -1108,9 +1104,7 @@ function decimals() external view returns (uint8); type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1140,9 +1134,7 @@ function decimals() external view returns (uint8); type UnderlyingRustTuple<'a> = (u8,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1167,68 +1159,64 @@ function decimals() external view returns (uint8); #[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 ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; 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()"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [49u8, 60u8, 229u8, 103u8]; + const SIGNATURE: &'static str = "decimals()"; + #[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), - ) + ( 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| { + 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 - }) + 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(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `name()` and selector `0x06fdde03`. -```solidity -function name() external view returns (string memory); -```*/ + ```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(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`name()`](nameCall) function. + ///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 { @@ -1242,7 +1230,7 @@ function name() external view returns (string memory); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -1251,9 +1239,7 @@ function name() external view returns (string memory); type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1283,9 +1269,7 @@ function name() external view returns (string memory); type UnderlyingRustTuple<'a> = (alloy_sol_types::private::String,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1310,68 +1294,64 @@ function name() external view returns (string memory); #[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 ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (alloy_sol_types::sol_data::String,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "name()"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [6u8, 253u8, 222u8, 3u8]; + const SIGNATURE: &'static str = "name()"; + #[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, - ), - ) + (::tokenize(ret),) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) - .map(|r| { + 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 - }) + 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(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `symbol()` and selector `0x95d89b41`. -```solidity -function symbol() external view returns (string memory); -```*/ + ```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(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`symbol()`](symbolCall) function. + ///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 { @@ -1385,7 +1365,7 @@ function symbol() external view returns (string memory); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -1394,9 +1374,7 @@ function symbol() external view returns (string memory); type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1426,9 +1404,7 @@ function symbol() external view returns (string memory); type UnderlyingRustTuple<'a> = (alloy_sol_types::private::String,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1453,63 +1429,58 @@ function symbol() external view returns (string memory); #[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 ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (alloy_sol_types::sol_data::String,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "symbol()"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [149u8, 216u8, 155u8, 65u8]; + const SIGNATURE: &'static str = "symbol()"; + #[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, - ), - ) + (::tokenize(ret),) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) - .map(|r| { + 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 - }) + 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(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `transfer(address,uint256)` and selector `0xa9059cbb`. -```solidity -function transfer(address recipient, uint256 amount) external returns (bool); -```*/ + ```solidity + function transfer(address recipient, uint256 amount) external returns (bool); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct transferCall { @@ -1519,7 +1490,8 @@ function transfer(address recipient, uint256 amount) external returns (bool); pub amount: alloy_sol_types::private::primitives::aliases::U256, } #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`transfer(address,uint256)`](transferCall) function. + ///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 { @@ -1533,7 +1505,7 @@ function transfer(address recipient, uint256 amount) external returns (bool); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -1548,9 +1520,7 @@ function transfer(address recipient, uint256 amount) external returns (bool); ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1583,9 +1553,7 @@ function transfer(address recipient, uint256 amount) external returns (bool); type UnderlyingRustTuple<'a> = (bool,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1613,70 +1581,65 @@ function transfer(address recipient, uint256 amount) external returns (bool); 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 ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; 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)"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [169u8, 5u8, 156u8, 187u8]; + const SIGNATURE: &'static str = "transfer(address,uint256)"; + #[inline] fn new<'a>( tuple: as alloy_sol_types::SolType>::RustType, ) -> Self { tuple.into() } + #[inline] fn tokenize(&self) -> Self::Token<'_> { ( ::tokenize( &self.recipient, ), - as alloy_sol_types::SolType>::tokenize(&self.amount), + as alloy_sol_types::SolType>::tokenize( + &self.amount, + ), ) } + #[inline] fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { - ( - ::tokenize( - ret, - ), - ) + (::tokenize(ret),) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) - .map(|r| { + 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 - }) + 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(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `transferFrom(address,address,uint256)` and selector `0x23b872dd`. -```solidity -function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); -```*/ + ```solidity + function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct transferFromCall { @@ -1688,7 +1651,8 @@ function transferFrom(address sender, address recipient, uint256 amount) externa pub amount: alloy_sol_types::private::primitives::aliases::U256, } #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`transferFrom(address,address,uint256)`](transferFromCall) function. + ///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 { @@ -1702,7 +1666,7 @@ function transferFrom(address sender, address recipient, uint256 amount) externa clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -1719,9 +1683,7 @@ function transferFrom(address sender, address recipient, uint256 amount) externa ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1755,9 +1717,7 @@ function transferFrom(address sender, address recipient, uint256 amount) externa type UnderlyingRustTuple<'a> = (bool,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1786,22 +1746,21 @@ function transferFrom(address sender, address recipient, uint256 amount) externa 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 ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; 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)"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [35u8, 184u8, 114u8, 221u8]; + const SIGNATURE: &'static str = "transferFrom(address,address,uint256)"; + #[inline] fn new<'a>( tuple: as alloy_sol_types::SolType>::RustType, ) -> Self { tuple.into() } + #[inline] fn tokenize(&self) -> Self::Token<'_> { ( @@ -1811,46 +1770,41 @@ function transferFrom(address sender, address recipient, uint256 amount) externa ::tokenize( &self.recipient, ), - as alloy_sol_types::SolType>::tokenize(&self.amount), + as alloy_sol_types::SolType>::tokenize( + &self.amount, + ), ) } + #[inline] fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { - ( - ::tokenize( - ret, - ), - ) + (::tokenize(ret),) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) - .map(|r| { + 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 - }) + 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 + }) } } }; ///Container for all the [`ERC20`](self) function calls. #[derive(Clone)] - #[derive()] pub enum ERC20Calls { #[allow(missing_docs)] allowance(allowanceCall), @@ -1872,8 +1826,9 @@ function transferFrom(address sender, address recipient, uint256 amount) externa impl ERC20Calls { /// 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. + /// 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]] = &[ @@ -1886,17 +1841,6 @@ function transferFrom(address sender, address recipient, uint256 amount) externa [169u8, 5u8, 156u8, 187u8], [221u8, 98u8, 237u8, 62u8], ]; - /// The names of the variants in the same order as `SELECTORS`. - pub const VARIANT_NAMES: &'static [&'static str] = &[ - ::core::stringify!(name), - ::core::stringify!(approve), - ::core::stringify!(transferFrom), - ::core::stringify!(decimals), - ::core::stringify!(balanceOf), - ::core::stringify!(symbol), - ::core::stringify!(transfer), - ::core::stringify!(allowance), - ]; /// The signatures in the same order as `SELECTORS`. pub const SIGNATURES: &'static [&'static str] = &[ ::SIGNATURE, @@ -1908,6 +1852,18 @@ function transferFrom(address sender, address recipient, uint256 amount) externa ::SIGNATURE, ::SIGNATURE, ]; + /// The names of the variants in the same order as `SELECTORS`. + pub const VARIANT_NAMES: &'static [&'static str] = &[ + ::core::stringify!(name), + ::core::stringify!(approve), + ::core::stringify!(transferFrom), + ::core::stringify!(decimals), + ::core::stringify!(balanceOf), + ::core::stringify!(symbol), + ::core::stringify!(transfer), + ::core::stringify!(allowance), + ]; + /// Returns the signature for the given selector, if known. #[inline] pub fn signature_by_selector( @@ -1920,53 +1876,47 @@ function transferFrom(address sender, address recipient, uint256 amount) externa ::core::result::Result::Err(_) => ::core::option::Option::None, } } + /// Returns the enum variant name for the given selector, if known. #[inline] - pub fn name_by_selector( - selector: [u8; 4usize], - ) -> ::core::option::Option<&'static str> { + pub fn name_by_selector(selector: [u8; 4usize]) -> ::core::option::Option<&'static str> { let sig = Self::signature_by_selector(selector)?; sig.split_once('(').map(|(name, _)| name) } } #[automatically_derived] impl alloy_sol_types::SolInterface for ERC20Calls { - const NAME: &'static str = "ERC20Calls"; - const MIN_DATA_LENGTH: usize = 0usize; const COUNT: usize = 8usize; + const MIN_DATA_LENGTH: usize = 0usize; + const NAME: &'static str = "ERC20Calls"; + #[inline] fn selector(&self) -> [u8; 4] { match self { - Self::allowance(_) => { - ::SELECTOR - } + Self::allowance(_) => ::SELECTOR, Self::approve(_) => ::SELECTOR, - Self::balanceOf(_) => { - ::SELECTOR - } + Self::balanceOf(_) => ::SELECTOR, Self::decimals(_) => ::SELECTOR, Self::name(_) => ::SELECTOR, Self::symbol(_) => ::SELECTOR, Self::transfer(_) => ::SELECTOR, - Self::transferFrom(_) => { - ::SELECTOR - } + Self::transferFrom(_) => ::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 { + fn abi_decode_raw(selector: [u8; 4], data: &[u8]) -> alloy_sol_types::Result { static DECODE_SHIMS: &[fn(&[u8]) -> alloy_sol_types::Result] = &[ { fn name(data: &[u8]) -> alloy_sol_types::Result { @@ -1984,9 +1934,7 @@ function transferFrom(address sender, address recipient, uint256 amount) externa }, { fn transferFrom(data: &[u8]) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, - ) + ::abi_decode_raw(data) .map(ERC20Calls::transferFrom) } transferFrom @@ -2028,38 +1976,31 @@ function transferFrom(address sender, address recipient, uint256 amount) externa }, ]; let Ok(idx) = Self::SELECTORS.binary_search(&selector) else { - return Err( - alloy_sol_types::Error::unknown_selector( - ::NAME, - selector, - ), - ); + 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] = &[ + static DECODE_VALIDATE_SHIMS: &[fn(&[u8]) -> alloy_sol_types::Result] = &[ { fn name(data: &[u8]) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) + ::abi_decode_raw_validate(data) .map(ERC20Calls::name) } name }, { fn approve(data: &[u8]) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) + ::abi_decode_raw_validate(data) .map(ERC20Calls::approve) } approve @@ -2067,68 +2008,57 @@ function transferFrom(address sender, address recipient, uint256 amount) externa { fn transferFrom(data: &[u8]) -> alloy_sol_types::Result { ::abi_decode_raw_validate( - data, - ) - .map(ERC20Calls::transferFrom) + data, + ) + .map(ERC20Calls::transferFrom) } transferFrom }, { fn decimals(data: &[u8]) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) + ::abi_decode_raw_validate(data) .map(ERC20Calls::decimals) } decimals }, { fn balanceOf(data: &[u8]) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) + ::abi_decode_raw_validate(data) .map(ERC20Calls::balanceOf) } balanceOf }, { fn symbol(data: &[u8]) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) + ::abi_decode_raw_validate(data) .map(ERC20Calls::symbol) } symbol }, { fn transfer(data: &[u8]) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) + ::abi_decode_raw_validate(data) .map(ERC20Calls::transfer) } transfer }, { fn allowance(data: &[u8]) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) + ::abi_decode_raw_validate(data) .map(ERC20Calls::allowance) } allowance }, ]; let Ok(idx) = Self::SELECTORS.binary_search(&selector) else { - return Err( - alloy_sol_types::Error::unknown_selector( - ::NAME, - selector, - ), - ); + return Err(alloy_sol_types::Error::unknown_selector( + ::NAME, + selector, + )); }; DECODE_VALIDATE_SHIMS[idx](data) } + #[inline] fn abi_encoded_size(&self) -> usize { match self { @@ -2154,35 +2084,25 @@ function transferFrom(address sender, address recipient, uint256 amount) externa ::abi_encoded_size(inner) } Self::transferFrom(inner) => { - ::abi_encoded_size( - inner, - ) + ::abi_encoded_size(inner) } } } + #[inline] fn abi_encode_raw(&self, out: &mut alloy_sol_types::private::Vec) { match self { Self::allowance(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } Self::approve(inner) => { ::abi_encode_raw(inner, out) } Self::balanceOf(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } Self::decimals(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } Self::name(inner) => { ::abi_encode_raw(inner, out) @@ -2191,23 +2111,16 @@ function transferFrom(address sender, address recipient, uint256 amount) externa ::abi_encode_raw(inner, out) } Self::transfer(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } Self::transferFrom(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } } } } ///Container for all the [`ERC20`](self) events. - #[derive(Clone)] - #[derive(Debug, PartialEq, Eq, Hash)] + #[derive(Clone, Debug, PartialEq, Eq, Hash)] pub enum ERC20Events { #[allow(missing_docs)] Approval(Approval), @@ -2217,32 +2130,32 @@ function transferFrom(address sender, address recipient, uint256 amount) externa impl ERC20Events { /// 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. + /// 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]] = &[ [ - 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, + 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, ], [ - 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, + 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, ], ]; - /// The names of the variants in the same order as `SELECTORS`. - pub const VARIANT_NAMES: &'static [&'static str] = &[ - ::core::stringify!(Approval), - ::core::stringify!(Transfer), - ]; /// The signatures in the same order as `SELECTORS`. pub const SIGNATURES: &'static [&'static str] = &[ ::SIGNATURE, ::SIGNATURE, ]; + /// The names of the variants in the same order as `SELECTORS`. + pub const VARIANT_NAMES: &'static [&'static str] = + &[::core::stringify!(Approval), ::core::stringify!(Transfer)]; + /// Returns the signature for the given selector, if known. #[inline] pub fn signature_by_selector( @@ -2255,19 +2168,19 @@ function transferFrom(address sender, address recipient, uint256 amount) externa ::core::result::Result::Err(_) => ::core::option::Option::None, } } + /// Returns the enum variant name for the given selector, if known. #[inline] - pub fn name_by_selector( - selector: [u8; 32usize], - ) -> ::core::option::Option<&'static str> { + pub fn name_by_selector(selector: [u8; 32usize]) -> ::core::option::Option<&'static str> { let sig = Self::signature_by_selector(selector)?; sig.split_once('(').map(|(name, _)| name) } } #[automatically_derived] impl alloy_sol_types::SolEventInterface for ERC20Events { - const NAME: &'static str = "ERC20Events"; const COUNT: usize = 2usize; + const NAME: &'static str = "ERC20Events"; + fn decode_raw_log( topics: &[alloy_sol_types::Word], data: &[u8], @@ -2281,17 +2194,15 @@ function transferFrom(address sender, address recipient, uint256 amount) externa ::decode_raw_log(topics, data) .map(Self::Transfer) } - _ => { - 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(), - ), + _ => 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(), ), - }) - } + ), + }), } } } @@ -2299,14 +2210,11 @@ function transferFrom(address sender, address recipient, uint256 amount) externa impl alloy_sol_types::private::IntoLogData for ERC20Events { 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::Transfer(inner) => { - alloy_sol_types::private::IntoLogData::to_log_data(inner) - } + Self::Approval(inner) => alloy_sol_types::private::IntoLogData::to_log_data(inner), + Self::Transfer(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) => { @@ -2318,28 +2226,31 @@ function transferFrom(address sender, address recipient, uint256 amount) externa } } } - use alloy_contract as alloy_contract; + use alloy_contract; /**Creates a new wrapper around an on-chain [`ERC20`](self) contract instance. -See the [wrapper's documentation](`ERC20Instance`) for more details.*/ + See the [wrapper's documentation](`ERC20Instance`) 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) -> ERC20Instance { + >( + address: alloy_sol_types::private::Address, + __provider: P, + ) -> ERC20Instance { ERC20Instance::::new(address, __provider) } /**A [`ERC20`](self) instance. -Contains type-safe methods for interacting with an on-chain instance of the -[`ERC20`](self) contract located at a given `address`, using a given -provider `P`. + Contains type-safe methods for interacting with an on-chain instance of the + [`ERC20`](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. + 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.*/ + See the [module-level documentation](self) for all the available methods.*/ #[derive(Clone)] pub struct ERC20Instance { address: alloy_sol_types::private::Address, @@ -2354,39 +2265,39 @@ See the [module-level documentation](self) for all the available methods.*/ } } /// Instantiation and getters/setters. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > ERC20Instance { + impl, N: alloy_contract::private::Network> + ERC20Instance + { /**Creates a new wrapper around an on-chain [`ERC20`](self) contract instance. -See the [wrapper's documentation](`ERC20Instance`) for more details.*/ + See the [wrapper's documentation](`ERC20Instance`) for more details.*/ #[inline] - pub const fn new( - address: alloy_sol_types::private::Address, - __provider: P, - ) -> Self { + pub const fn new(address: alloy_sol_types::private::Address, __provider: P) -> Self { Self { address, provider: __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 { @@ -2394,7 +2305,8 @@ See the [wrapper's documentation](`ERC20Instance`) for more details.*/ } } impl ERC20Instance<&P, N> { - /// Clones the provider and returns a new instance with the cloned provider. + /// Clones the provider and returns a new instance with the cloned + /// provider. #[inline] pub fn with_cloned_provider(self) -> ERC20Instance { ERC20Instance { @@ -2405,20 +2317,22 @@ See the [wrapper's documentation](`ERC20Instance`) for more details.*/ } } /// Function calls. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > ERC20Instance { - /// Creates a new call builder using this contract instance's provider and address. + impl, N: alloy_contract::private::Network> + ERC20Instance + { + /// 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. + /// 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 [`allowance`] function. pub fn allowance( &self, @@ -2427,6 +2341,7 @@ See the [wrapper's documentation](`ERC20Instance`) for more details.*/ ) -> 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, @@ -2435,6 +2350,7 @@ See the [wrapper's documentation](`ERC20Instance`) for more details.*/ ) -> alloy_contract::SolCallBuilder<&P, approveCall, N> { self.call_builder(&approveCall { spender, amount }) } + ///Creates a new call builder for the [`balanceOf`] function. pub fn balanceOf( &self, @@ -2442,18 +2358,22 @@ See the [wrapper's documentation](`ERC20Instance`) for more details.*/ ) -> alloy_contract::SolCallBuilder<&P, balanceOfCall, N> { self.call_builder(&balanceOfCall { account }) } + ///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 [`name`] function. pub fn name(&self) -> alloy_contract::SolCallBuilder<&P, nameCall, N> { self.call_builder(&nameCall) } + ///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 [`transfer`] function. pub fn transfer( &self, @@ -2462,6 +2382,7 @@ See the [wrapper's documentation](`ERC20Instance`) for more details.*/ ) -> alloy_contract::SolCallBuilder<&P, transferCall, N> { self.call_builder(&transferCall { recipient, amount }) } + ///Creates a new call builder for the [`transferFrom`] function. pub fn transferFrom( &self, @@ -2469,33 +2390,34 @@ See the [wrapper's documentation](`ERC20Instance`) for more details.*/ recipient: alloy_sol_types::private::Address, amount: alloy_sol_types::private::primitives::aliases::U256, ) -> alloy_contract::SolCallBuilder<&P, transferFromCall, N> { - self.call_builder( - &transferFromCall { - sender, - recipient, - amount, - }, - ) + self.call_builder(&transferFromCall { + sender, + recipient, + amount, + }) } } /// Event filters. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > ERC20Instance { - /// Creates a new event filter using this contract instance's provider and address. + impl, N: alloy_contract::private::Network> + ERC20Instance + { + /// 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. + /// 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 [`Transfer`] event. pub fn Transfer_filter(&self) -> alloy_contract::Event<&P, Transfer, N> { self.event_filter::() diff --git a/contracts/generated/contracts-generated/erc20mintable/src/lib.rs b/contracts/generated/contracts-generated/erc20mintable/src/lib.rs index 56cfee040b..9491880637 100644 --- a/contracts/generated/contracts-generated/erc20mintable/src/lib.rs +++ b/contracts/generated/contracts-generated/erc20mintable/src/lib.rs @@ -1,4 +1,10 @@ -#![allow(unused_imports, unused_attributes, clippy::all, rustdoc::all, non_snake_case)] +#![allow( + unused_imports, + unused_attributes, + clippy::all, + rustdoc::all, + non_snake_case +)] //! Auto-generated contract bindings. Do not edit. /** @@ -252,8 +258,7 @@ interface ERC20Mintable { clippy::empty_structs_with_brackets )] pub mod ERC20Mintable { - use super::*; - use alloy_sol_types as alloy_sol_types; + use {super::*, alloy_sol_types}; /// The creation / init bytecode of the contract. /// /// ```text @@ -266,9 +271,9 @@ pub mod ERC20Mintable { ); #[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); -```*/ + ```solidity + event Approval(address indexed owner, address indexed spender, uint256 value); + ```*/ #[allow( non_camel_case_types, non_snake_case, @@ -291,25 +296,26 @@ event Approval(address indexed owner, address indexed spender, uint256 value); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[automatically_derived] impl alloy_sol_types::SolEvent for Approval { + type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; 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; + 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, + ]); + #[allow(unused_variables)] #[inline] fn new( @@ -322,33 +328,39 @@ event Approval(address indexed owner, address indexed spender, uint256 value); 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, - ), - ); + 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), + as alloy_sol_types::SolType>::tokenize( + &self.value, + ), ) } + #[inline] fn topics(&self) -> ::RustType { - (Self::SIGNATURE_HASH.into(), self.owner.clone(), self.spender.clone()) + ( + Self::SIGNATURE_HASH.into(), + self.owner.clone(), + self.spender.clone(), + ) } + #[inline] fn encode_topics_raw( &self, @@ -357,9 +369,7 @@ event Approval(address indexed owner, address indexed spender, uint256 value); if out.len() < ::COUNT { return Err(alloy_sol_types::Error::Overrun); } - out[0usize] = alloy_sol_types::abi::token::WordToken( - Self::SIGNATURE_HASH, - ); + out[0usize] = alloy_sol_types::abi::token::WordToken(Self::SIGNATURE_HASH); out[1usize] = ::encode_topic( &self.owner, ); @@ -374,6 +384,7 @@ event Approval(address indexed owner, address indexed spender, uint256 value); 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) } @@ -388,9 +399,9 @@ event Approval(address indexed owner, address indexed spender, uint256 value); }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Event with signature `MinterAdded(address)` and selector `0x6ae172837ea30b801fbfcdd4108aa1d5bf8ff775444fd70256b44e6bf3dfc3f6`. -```solidity -event MinterAdded(address indexed account); -```*/ + ```solidity + event MinterAdded(address indexed account); + ```*/ #[allow( non_camel_case_types, non_snake_case, @@ -409,25 +420,25 @@ event MinterAdded(address indexed account); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[automatically_derived] impl alloy_sol_types::SolEvent for MinterAdded { + type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; 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::Address, ); - const SIGNATURE: &'static str = "MinterAdded(address)"; - const SIGNATURE_HASH: alloy_sol_types::private::B256 = alloy_sol_types::private::B256::new([ - 106u8, 225u8, 114u8, 131u8, 126u8, 163u8, 11u8, 128u8, 31u8, 191u8, - 205u8, 212u8, 16u8, 138u8, 161u8, 213u8, 191u8, 143u8, 247u8, 117u8, - 68u8, 79u8, 215u8, 2u8, 86u8, 180u8, 78u8, 107u8, 243u8, 223u8, 195u8, - 246u8, - ]); + const ANONYMOUS: bool = false; + const SIGNATURE: &'static str = "MinterAdded(address)"; + const SIGNATURE_HASH: alloy_sol_types::private::B256 = + alloy_sol_types::private::B256::new([ + 106u8, 225u8, 114u8, 131u8, 126u8, 163u8, 11u8, 128u8, 31u8, 191u8, 205u8, + 212u8, 16u8, 138u8, 161u8, 213u8, 191u8, 143u8, 247u8, 117u8, 68u8, 79u8, + 215u8, 2u8, 86u8, 180u8, 78u8, 107u8, 243u8, 223u8, 195u8, 246u8, + ]); + #[allow(unused_variables)] #[inline] fn new( @@ -436,29 +447,31 @@ event MinterAdded(address indexed account); ) -> Self { Self { account: topics.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, - ), - ); + 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.account.clone()) } + #[inline] fn encode_topics_raw( &self, @@ -467,9 +480,7 @@ event MinterAdded(address indexed account); if out.len() < ::COUNT { return Err(alloy_sol_types::Error::Overrun); } - out[0usize] = alloy_sol_types::abi::token::WordToken( - Self::SIGNATURE_HASH, - ); + out[0usize] = alloy_sol_types::abi::token::WordToken(Self::SIGNATURE_HASH); out[1usize] = ::encode_topic( &self.account, ); @@ -481,6 +492,7 @@ event MinterAdded(address indexed account); 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) } @@ -495,9 +507,9 @@ event MinterAdded(address indexed account); }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Event with signature `MinterRemoved(address)` and selector `0xe94479a9f7e1952cc78f2d6baab678adc1b772d936c6583def489e524cb66692`. -```solidity -event MinterRemoved(address indexed account); -```*/ + ```solidity + event MinterRemoved(address indexed account); + ```*/ #[allow( non_camel_case_types, non_snake_case, @@ -516,24 +528,25 @@ event MinterRemoved(address indexed account); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[automatically_derived] impl alloy_sol_types::SolEvent for MinterRemoved { + type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; 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::Address, ); - const SIGNATURE: &'static str = "MinterRemoved(address)"; - const SIGNATURE_HASH: alloy_sol_types::private::B256 = alloy_sol_types::private::B256::new([ - 233u8, 68u8, 121u8, 169u8, 247u8, 225u8, 149u8, 44u8, 199u8, 143u8, 45u8, - 107u8, 170u8, 182u8, 120u8, 173u8, 193u8, 183u8, 114u8, 217u8, 54u8, - 198u8, 88u8, 61u8, 239u8, 72u8, 158u8, 82u8, 76u8, 182u8, 102u8, 146u8, - ]); + const ANONYMOUS: bool = false; + const SIGNATURE: &'static str = "MinterRemoved(address)"; + const SIGNATURE_HASH: alloy_sol_types::private::B256 = + alloy_sol_types::private::B256::new([ + 233u8, 68u8, 121u8, 169u8, 247u8, 225u8, 149u8, 44u8, 199u8, 143u8, 45u8, + 107u8, 170u8, 182u8, 120u8, 173u8, 193u8, 183u8, 114u8, 217u8, 54u8, 198u8, + 88u8, 61u8, 239u8, 72u8, 158u8, 82u8, 76u8, 182u8, 102u8, 146u8, + ]); + #[allow(unused_variables)] #[inline] fn new( @@ -542,29 +555,31 @@ event MinterRemoved(address indexed account); ) -> Self { Self { account: topics.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, - ), - ); + 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.account.clone()) } + #[inline] fn encode_topics_raw( &self, @@ -573,9 +588,7 @@ event MinterRemoved(address indexed account); if out.len() < ::COUNT { return Err(alloy_sol_types::Error::Overrun); } - out[0usize] = alloy_sol_types::abi::token::WordToken( - Self::SIGNATURE_HASH, - ); + out[0usize] = alloy_sol_types::abi::token::WordToken(Self::SIGNATURE_HASH); out[1usize] = ::encode_topic( &self.account, ); @@ -587,6 +600,7 @@ event MinterRemoved(address indexed account); 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) } @@ -601,9 +615,9 @@ event MinterRemoved(address indexed account); }; #[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); -```*/ + ```solidity + event Transfer(address indexed from, address indexed to, uint256 value); + ```*/ #[allow( non_camel_case_types, non_snake_case, @@ -626,25 +640,26 @@ event Transfer(address indexed from, address indexed to, uint256 value); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[automatically_derived] impl alloy_sol_types::SolEvent for Transfer { + type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; 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; + 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, + ]); + #[allow(unused_variables)] #[inline] fn new( @@ -657,33 +672,39 @@ event Transfer(address indexed from, address indexed to, uint256 value); 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, - ), - ); + 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), + as alloy_sol_types::SolType>::tokenize( + &self.value, + ), ) } + #[inline] fn topics(&self) -> ::RustType { - (Self::SIGNATURE_HASH.into(), self.from.clone(), self.to.clone()) + ( + Self::SIGNATURE_HASH.into(), + self.from.clone(), + self.to.clone(), + ) } + #[inline] fn encode_topics_raw( &self, @@ -692,9 +713,7 @@ event Transfer(address indexed from, address indexed to, uint256 value); if out.len() < ::COUNT { return Err(alloy_sol_types::Error::Overrun); } - out[0usize] = alloy_sol_types::abi::token::WordToken( - Self::SIGNATURE_HASH, - ); + out[0usize] = alloy_sol_types::abi::token::WordToken(Self::SIGNATURE_HASH); out[1usize] = ::encode_topic( &self.from, ); @@ -709,6 +728,7 @@ event Transfer(address indexed from, address indexed to, uint256 value); 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) } @@ -723,9 +743,9 @@ event Transfer(address indexed from, address indexed to, uint256 value); }; #[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); -```*/ + ```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 { @@ -735,7 +755,8 @@ function allowance(address owner, address spender) external view returns (uint25 pub spender: alloy_sol_types::private::Address, } #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`allowance(address,address)`](allowanceCall) function. + ///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 { @@ -749,7 +770,7 @@ function allowance(address owner, address spender) external view returns (uint25 clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -764,9 +785,7 @@ function allowance(address owner, address spender) external view returns (uint25 ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -796,14 +815,10 @@ function allowance(address owner, address spender) external view returns (uint25 #[allow(dead_code)] type UnderlyingSolTuple<'a> = (alloy_sol_types::sol_data::Uint<256>,); #[doc(hidden)] - type UnderlyingRustTuple<'a> = ( - alloy_sol_types::private::primitives::aliases::U256, - ); + 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, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -831,22 +846,21 @@ function allowance(address owner, address spender) external view returns (uint25 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 ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; 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)"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [221u8, 98u8, 237u8, 62u8]; + const SIGNATURE: &'static str = "allowance(address,address)"; + #[inline] fn new<'a>( tuple: as alloy_sol_types::SolType>::RustType, ) -> Self { tuple.into() } + #[inline] fn tokenize(&self) -> Self::Token<'_> { ( @@ -858,43 +872,43 @@ function allowance(address owner, address spender) external view returns (uint25 ), ) } + #[inline] fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { ( - as alloy_sol_types::SolType>::tokenize(ret), + 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| { + 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 - }) + 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(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `approve(address,uint256)` and selector `0x095ea7b3`. -```solidity -function approve(address spender, uint256 amount) external returns (bool); -```*/ + ```solidity + function approve(address spender, uint256 amount) external returns (bool); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct approveCall { @@ -904,7 +918,8 @@ function approve(address spender, uint256 amount) external returns (bool); pub amount: alloy_sol_types::private::primitives::aliases::U256, } #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`approve(address,uint256)`](approveCall) function. + ///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 { @@ -918,7 +933,7 @@ function approve(address spender, uint256 amount) external returns (bool); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -933,9 +948,7 @@ function approve(address spender, uint256 amount) external returns (bool); ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -968,9 +981,7 @@ function approve(address spender, uint256 amount) external returns (bool); type UnderlyingRustTuple<'a> = (bool,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -998,70 +1009,65 @@ function approve(address spender, uint256 amount) external returns (bool); 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 ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; 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)"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [9u8, 94u8, 167u8, 179u8]; + const SIGNATURE: &'static str = "approve(address,uint256)"; + #[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.amount), + as alloy_sol_types::SolType>::tokenize( + &self.amount, + ), ) } + #[inline] fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { - ( - ::tokenize( - ret, - ), - ) + (::tokenize(ret),) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) - .map(|r| { + 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 - }) + 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(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `balanceOf(address)` and selector `0x70a08231`. -```solidity -function balanceOf(address account) external view returns (uint256); -```*/ + ```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 { @@ -1069,7 +1075,8 @@ function balanceOf(address account) external view returns (uint256); pub account: alloy_sol_types::private::Address, } #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`balanceOf(address)`](balanceOfCall) function. + ///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 { @@ -1083,7 +1090,7 @@ function balanceOf(address account) external view returns (uint256); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -1092,9 +1099,7 @@ function balanceOf(address account) external view returns (uint256); type UnderlyingRustTuple<'a> = (alloy_sol_types::private::Address,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1121,14 +1126,10 @@ function balanceOf(address account) external view returns (uint256); #[allow(dead_code)] type UnderlyingSolTuple<'a> = (alloy_sol_types::sol_data::Uint<256>,); #[doc(hidden)] - type UnderlyingRustTuple<'a> = ( - alloy_sol_types::private::primitives::aliases::U256, - ); + 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, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1153,22 +1154,21 @@ function balanceOf(address account) external view returns (uint256); #[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 ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; 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)"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [112u8, 160u8, 130u8, 49u8]; + const SIGNATURE: &'static str = "balanceOf(address)"; + #[inline] fn new<'a>( tuple: as alloy_sol_types::SolType>::RustType, ) -> Self { tuple.into() } + #[inline] fn tokenize(&self) -> Self::Token<'_> { ( @@ -1177,43 +1177,43 @@ function balanceOf(address account) external view returns (uint256); ), ) } + #[inline] fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { ( - as alloy_sol_types::SolType>::tokenize(ret), + 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| { + 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 - }) + 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(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `mint(address,uint256)` and selector `0x40c10f19`. -```solidity -function mint(address account, uint256 amount) external returns (bool); -```*/ + ```solidity + function mint(address account, uint256 amount) external returns (bool); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct mintCall { @@ -1223,7 +1223,8 @@ function mint(address account, uint256 amount) external returns (bool); pub amount: alloy_sol_types::private::primitives::aliases::U256, } #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`mint(address,uint256)`](mintCall) function. + ///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 { @@ -1237,7 +1238,7 @@ function mint(address account, uint256 amount) external returns (bool); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -1252,9 +1253,7 @@ function mint(address account, uint256 amount) external returns (bool); ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1287,9 +1286,7 @@ function mint(address account, uint256 amount) external returns (bool); type UnderlyingRustTuple<'a> = (bool,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1317,70 +1314,65 @@ function mint(address account, uint256 amount) external returns (bool); 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 ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (alloy_sol_types::sol_data::Bool,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "mint(address,uint256)"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [64u8, 193u8, 15u8, 25u8]; + const SIGNATURE: &'static str = "mint(address,uint256)"; + #[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.amount), + as alloy_sol_types::SolType>::tokenize( + &self.amount, + ), ) } + #[inline] fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { - ( - ::tokenize( - ret, - ), - ) + (::tokenize(ret),) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) - .map(|r| { + as alloy_sol_types::SolType>::abi_decode_sequence(data).map( + |r| { let r: mintReturn = 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: mintReturn = r.into(); - r._0 - }) + 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: mintReturn = r.into(); + r._0 + }) } } }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `transfer(address,uint256)` and selector `0xa9059cbb`. -```solidity -function transfer(address recipient, uint256 amount) external returns (bool); -```*/ + ```solidity + function transfer(address recipient, uint256 amount) external returns (bool); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct transferCall { @@ -1390,7 +1382,8 @@ function transfer(address recipient, uint256 amount) external returns (bool); pub amount: alloy_sol_types::private::primitives::aliases::U256, } #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`transfer(address,uint256)`](transferCall) function. + ///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 { @@ -1404,7 +1397,7 @@ function transfer(address recipient, uint256 amount) external returns (bool); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -1419,9 +1412,7 @@ function transfer(address recipient, uint256 amount) external returns (bool); ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1454,9 +1445,7 @@ function transfer(address recipient, uint256 amount) external returns (bool); type UnderlyingRustTuple<'a> = (bool,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1484,70 +1473,65 @@ function transfer(address recipient, uint256 amount) external returns (bool); 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 ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; 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)"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [169u8, 5u8, 156u8, 187u8]; + const SIGNATURE: &'static str = "transfer(address,uint256)"; + #[inline] fn new<'a>( tuple: as alloy_sol_types::SolType>::RustType, ) -> Self { tuple.into() } + #[inline] fn tokenize(&self) -> Self::Token<'_> { ( ::tokenize( &self.recipient, ), - as alloy_sol_types::SolType>::tokenize(&self.amount), + as alloy_sol_types::SolType>::tokenize( + &self.amount, + ), ) } + #[inline] fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { - ( - ::tokenize( - ret, - ), - ) + (::tokenize(ret),) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) - .map(|r| { + 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 - }) + 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(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `transferFrom(address,address,uint256)` and selector `0x23b872dd`. -```solidity -function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); -```*/ + ```solidity + function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct transferFromCall { @@ -1559,7 +1543,8 @@ function transferFrom(address sender, address recipient, uint256 amount) externa pub amount: alloy_sol_types::private::primitives::aliases::U256, } #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`transferFrom(address,address,uint256)`](transferFromCall) function. + ///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 { @@ -1573,7 +1558,7 @@ function transferFrom(address sender, address recipient, uint256 amount) externa clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -1590,9 +1575,7 @@ function transferFrom(address sender, address recipient, uint256 amount) externa ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1626,9 +1609,7 @@ function transferFrom(address sender, address recipient, uint256 amount) externa type UnderlyingRustTuple<'a> = (bool,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1657,22 +1638,21 @@ function transferFrom(address sender, address recipient, uint256 amount) externa 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 ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; 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)"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [35u8, 184u8, 114u8, 221u8]; + const SIGNATURE: &'static str = "transferFrom(address,address,uint256)"; + #[inline] fn new<'a>( tuple: as alloy_sol_types::SolType>::RustType, ) -> Self { tuple.into() } + #[inline] fn tokenize(&self) -> Self::Token<'_> { ( @@ -1682,46 +1662,41 @@ function transferFrom(address sender, address recipient, uint256 amount) externa ::tokenize( &self.recipient, ), - as alloy_sol_types::SolType>::tokenize(&self.amount), + as alloy_sol_types::SolType>::tokenize( + &self.amount, + ), ) } + #[inline] fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { - ( - ::tokenize( - ret, - ), - ) + (::tokenize(ret),) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) - .map(|r| { + 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 - }) + 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 + }) } } }; ///Container for all the [`ERC20Mintable`](self) function calls. #[derive(Clone)] - #[derive()] pub enum ERC20MintableCalls { #[allow(missing_docs)] allowance(allowanceCall), @@ -1739,8 +1714,9 @@ function transferFrom(address sender, address recipient, uint256 amount) externa impl ERC20MintableCalls { /// 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. + /// 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]] = &[ @@ -1751,15 +1727,6 @@ function transferFrom(address sender, address recipient, uint256 amount) externa [169u8, 5u8, 156u8, 187u8], [221u8, 98u8, 237u8, 62u8], ]; - /// The names of the variants in the same order as `SELECTORS`. - pub const VARIANT_NAMES: &'static [&'static str] = &[ - ::core::stringify!(approve), - ::core::stringify!(transferFrom), - ::core::stringify!(mint), - ::core::stringify!(balanceOf), - ::core::stringify!(transfer), - ::core::stringify!(allowance), - ]; /// The signatures in the same order as `SELECTORS`. pub const SIGNATURES: &'static [&'static str] = &[ ::SIGNATURE, @@ -1769,6 +1736,16 @@ function transferFrom(address sender, address recipient, uint256 amount) externa ::SIGNATURE, ::SIGNATURE, ]; + /// The names of the variants in the same order as `SELECTORS`. + pub const VARIANT_NAMES: &'static [&'static str] = &[ + ::core::stringify!(approve), + ::core::stringify!(transferFrom), + ::core::stringify!(mint), + ::core::stringify!(balanceOf), + ::core::stringify!(transfer), + ::core::stringify!(allowance), + ]; + /// Returns the signature for the given selector, if known. #[inline] pub fn signature_by_selector( @@ -1781,70 +1758,56 @@ function transferFrom(address sender, address recipient, uint256 amount) externa ::core::result::Result::Err(_) => ::core::option::Option::None, } } + /// Returns the enum variant name for the given selector, if known. #[inline] - pub fn name_by_selector( - selector: [u8; 4usize], - ) -> ::core::option::Option<&'static str> { + pub fn name_by_selector(selector: [u8; 4usize]) -> ::core::option::Option<&'static str> { let sig = Self::signature_by_selector(selector)?; sig.split_once('(').map(|(name, _)| name) } } #[automatically_derived] impl alloy_sol_types::SolInterface for ERC20MintableCalls { - const NAME: &'static str = "ERC20MintableCalls"; - const MIN_DATA_LENGTH: usize = 32usize; const COUNT: usize = 6usize; + const MIN_DATA_LENGTH: usize = 32usize; + const NAME: &'static str = "ERC20MintableCalls"; + #[inline] fn selector(&self) -> [u8; 4] { match self { - Self::allowance(_) => { - ::SELECTOR - } + Self::allowance(_) => ::SELECTOR, Self::approve(_) => ::SELECTOR, - Self::balanceOf(_) => { - ::SELECTOR - } + Self::balanceOf(_) => ::SELECTOR, Self::mint(_) => ::SELECTOR, Self::transfer(_) => ::SELECTOR, - Self::transferFrom(_) => { - ::SELECTOR - } + Self::transferFrom(_) => ::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 abi_decode_raw(selector: [u8; 4], data: &[u8]) -> alloy_sol_types::Result { + static DECODE_SHIMS: &[fn(&[u8]) -> alloy_sol_types::Result] = &[ { - fn approve( - data: &[u8], - ) -> alloy_sol_types::Result { + fn approve(data: &[u8]) -> alloy_sol_types::Result { ::abi_decode_raw(data) .map(ERC20MintableCalls::approve) } approve }, { - fn transferFrom( - data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, - ) + fn transferFrom(data: &[u8]) -> alloy_sol_types::Result { + ::abi_decode_raw(data) .map(ERC20MintableCalls::transferFrom) } transferFrom @@ -1857,27 +1820,21 @@ function transferFrom(address sender, address recipient, uint256 amount) externa mint }, { - fn balanceOf( - data: &[u8], - ) -> alloy_sol_types::Result { + fn balanceOf(data: &[u8]) -> alloy_sol_types::Result { ::abi_decode_raw(data) .map(ERC20MintableCalls::balanceOf) } balanceOf }, { - fn transfer( - data: &[u8], - ) -> alloy_sol_types::Result { + fn transfer(data: &[u8]) -> alloy_sol_types::Result { ::abi_decode_raw(data) .map(ERC20MintableCalls::transfer) } transfer }, { - fn allowance( - data: &[u8], - ) -> alloy_sol_types::Result { + fn allowance(data: &[u8]) -> alloy_sol_types::Result { ::abi_decode_raw(data) .map(ERC20MintableCalls::allowance) } @@ -1885,15 +1842,14 @@ function transferFrom(address sender, address recipient, uint256 amount) externa }, ]; let Ok(idx) = Self::SELECTORS.binary_search(&selector) else { - return Err( - alloy_sol_types::Error::unknown_selector( - ::NAME, - selector, - ), - ); + return Err(alloy_sol_types::Error::unknown_selector( + ::NAME, + selector, + )); }; DECODE_SHIMS[idx](data) } + #[inline] #[allow(non_snake_case)] fn abi_decode_raw_validate( @@ -1902,82 +1858,62 @@ function transferFrom(address sender, address recipient, uint256 amount) externa ) -> alloy_sol_types::Result { static DECODE_VALIDATE_SHIMS: &[fn( &[u8], - ) -> alloy_sol_types::Result] = &[ + ) + -> alloy_sol_types::Result] = &[ { - fn approve( - data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) + fn approve(data: &[u8]) -> alloy_sol_types::Result { + ::abi_decode_raw_validate(data) .map(ERC20MintableCalls::approve) } approve }, { - fn transferFrom( - data: &[u8], - ) -> alloy_sol_types::Result { + fn transferFrom(data: &[u8]) -> alloy_sol_types::Result { ::abi_decode_raw_validate( - data, - ) - .map(ERC20MintableCalls::transferFrom) + data, + ) + .map(ERC20MintableCalls::transferFrom) } transferFrom }, { fn mint(data: &[u8]) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) + ::abi_decode_raw_validate(data) .map(ERC20MintableCalls::mint) } mint }, { - fn balanceOf( - data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) + fn balanceOf(data: &[u8]) -> alloy_sol_types::Result { + ::abi_decode_raw_validate(data) .map(ERC20MintableCalls::balanceOf) } balanceOf }, { - fn transfer( - data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) + fn transfer(data: &[u8]) -> alloy_sol_types::Result { + ::abi_decode_raw_validate(data) .map(ERC20MintableCalls::transfer) } transfer }, { - fn allowance( - data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) + fn allowance(data: &[u8]) -> alloy_sol_types::Result { + ::abi_decode_raw_validate(data) .map(ERC20MintableCalls::allowance) } allowance }, ]; let Ok(idx) = Self::SELECTORS.binary_search(&selector) else { - return Err( - alloy_sol_types::Error::unknown_selector( - ::NAME, - selector, - ), - ); + return Err(alloy_sol_types::Error::unknown_selector( + ::NAME, + selector, + )); }; DECODE_VALIDATE_SHIMS[idx](data) } + #[inline] fn abi_encoded_size(&self) -> usize { match self { @@ -1997,51 +1933,37 @@ function transferFrom(address sender, address recipient, uint256 amount) externa ::abi_encoded_size(inner) } Self::transferFrom(inner) => { - ::abi_encoded_size( - inner, - ) + ::abi_encoded_size(inner) } } } + #[inline] fn abi_encode_raw(&self, out: &mut alloy_sol_types::private::Vec) { match self { Self::allowance(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } Self::approve(inner) => { ::abi_encode_raw(inner, out) } Self::balanceOf(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } Self::mint(inner) => { ::abi_encode_raw(inner, out) } Self::transfer(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } Self::transferFrom(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } } } } ///Container for all the [`ERC20Mintable`](self) events. - #[derive(Clone)] - #[derive(Debug, PartialEq, Eq, Hash)] + #[derive(Clone, Debug, PartialEq, Eq, Hash)] pub enum ERC20MintableEvents { #[allow(missing_docs)] Approval(Approval), @@ -2055,40 +1977,33 @@ function transferFrom(address sender, address recipient, uint256 amount) externa impl ERC20MintableEvents { /// 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. + /// 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]] = &[ [ - 106u8, 225u8, 114u8, 131u8, 126u8, 163u8, 11u8, 128u8, 31u8, 191u8, - 205u8, 212u8, 16u8, 138u8, 161u8, 213u8, 191u8, 143u8, 247u8, 117u8, - 68u8, 79u8, 215u8, 2u8, 86u8, 180u8, 78u8, 107u8, 243u8, 223u8, 195u8, - 246u8, + 106u8, 225u8, 114u8, 131u8, 126u8, 163u8, 11u8, 128u8, 31u8, 191u8, 205u8, 212u8, + 16u8, 138u8, 161u8, 213u8, 191u8, 143u8, 247u8, 117u8, 68u8, 79u8, 215u8, 2u8, + 86u8, 180u8, 78u8, 107u8, 243u8, 223u8, 195u8, 246u8, ], [ - 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, + 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, ], [ - 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, + 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, ], [ - 233u8, 68u8, 121u8, 169u8, 247u8, 225u8, 149u8, 44u8, 199u8, 143u8, 45u8, - 107u8, 170u8, 182u8, 120u8, 173u8, 193u8, 183u8, 114u8, 217u8, 54u8, - 198u8, 88u8, 61u8, 239u8, 72u8, 158u8, 82u8, 76u8, 182u8, 102u8, 146u8, + 233u8, 68u8, 121u8, 169u8, 247u8, 225u8, 149u8, 44u8, 199u8, 143u8, 45u8, 107u8, + 170u8, 182u8, 120u8, 173u8, 193u8, 183u8, 114u8, 217u8, 54u8, 198u8, 88u8, 61u8, + 239u8, 72u8, 158u8, 82u8, 76u8, 182u8, 102u8, 146u8, ], ]; - /// The names of the variants in the same order as `SELECTORS`. - pub const VARIANT_NAMES: &'static [&'static str] = &[ - ::core::stringify!(MinterAdded), - ::core::stringify!(Approval), - ::core::stringify!(Transfer), - ::core::stringify!(MinterRemoved), - ]; /// The signatures in the same order as `SELECTORS`. pub const SIGNATURES: &'static [&'static str] = &[ ::SIGNATURE, @@ -2096,6 +2011,14 @@ function transferFrom(address sender, address recipient, uint256 amount) externa ::SIGNATURE, ::SIGNATURE, ]; + /// The names of the variants in the same order as `SELECTORS`. + pub const VARIANT_NAMES: &'static [&'static str] = &[ + ::core::stringify!(MinterAdded), + ::core::stringify!(Approval), + ::core::stringify!(Transfer), + ::core::stringify!(MinterRemoved), + ]; + /// Returns the signature for the given selector, if known. #[inline] pub fn signature_by_selector( @@ -2108,19 +2031,19 @@ function transferFrom(address sender, address recipient, uint256 amount) externa ::core::result::Result::Err(_) => ::core::option::Option::None, } } + /// Returns the enum variant name for the given selector, if known. #[inline] - pub fn name_by_selector( - selector: [u8; 32usize], - ) -> ::core::option::Option<&'static str> { + pub fn name_by_selector(selector: [u8; 32usize]) -> ::core::option::Option<&'static str> { let sig = Self::signature_by_selector(selector)?; sig.split_once('(').map(|(name, _)| name) } } #[automatically_derived] impl alloy_sol_types::SolEventInterface for ERC20MintableEvents { - const NAME: &'static str = "ERC20MintableEvents"; const COUNT: usize = 4usize; + const NAME: &'static str = "ERC20MintableEvents"; + fn decode_raw_log( topics: &[alloy_sol_types::Word], data: &[u8], @@ -2131,34 +2054,26 @@ function transferFrom(address sender, address recipient, uint256 amount) externa .map(Self::Approval) } Some(::SIGNATURE_HASH) => { - ::decode_raw_log( - topics, - data, - ) + ::decode_raw_log(topics, data) .map(Self::MinterAdded) } Some(::SIGNATURE_HASH) => { - ::decode_raw_log( - topics, - data, - ) + ::decode_raw_log(topics, data) .map(Self::MinterRemoved) } Some(::SIGNATURE_HASH) => { ::decode_raw_log(topics, data) .map(Self::Transfer) } - _ => { - 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(), - ), + _ => 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(), ), - }) - } + ), + }), } } } @@ -2166,20 +2081,17 @@ function transferFrom(address sender, address recipient, uint256 amount) externa impl alloy_sol_types::private::IntoLogData for ERC20MintableEvents { 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::Approval(inner) => alloy_sol_types::private::IntoLogData::to_log_data(inner), Self::MinterAdded(inner) => { alloy_sol_types::private::IntoLogData::to_log_data(inner) } Self::MinterRemoved(inner) => { alloy_sol_types::private::IntoLogData::to_log_data(inner) } - Self::Transfer(inner) => { - alloy_sol_types::private::IntoLogData::to_log_data(inner) - } + Self::Transfer(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) => { @@ -2197,10 +2109,10 @@ function transferFrom(address sender, address recipient, uint256 amount) externa } } } - use alloy_contract as alloy_contract; + use alloy_contract; /**Creates a new wrapper around an on-chain [`ERC20Mintable`](self) contract instance. -See the [wrapper's documentation](`ERC20MintableInstance`) for more details.*/ + See the [wrapper's documentation](`ERC20MintableInstance`) for more details.*/ #[inline] pub const fn new< P: alloy_contract::private::Provider, @@ -2213,43 +2125,41 @@ See the [wrapper's documentation](`ERC20MintableInstance`) for more details.*/ } /**Deploys this contract using the given `provider` and constructor arguments, if any. -Returns a new instance of the contract, if the deployment was successful. + 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.*/ + 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, - >( + pub fn deploy, N: alloy_contract::private::Network>( __provider: P, - ) -> impl ::core::future::Future< - Output = alloy_contract::Result>, - > { + ) -> impl ::core::future::Future>> + { ERC20MintableInstance::::deploy(__provider) } /**Creates a `RawCallBuilder` for deploying this contract using the given `provider` -and constructor arguments, if any. + 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.*/ + 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) -> alloy_contract::RawCallBuilder { + >( + __provider: P, + ) -> alloy_contract::RawCallBuilder { ERC20MintableInstance::::deploy_builder(__provider) } /**A [`ERC20Mintable`](self) instance. -Contains type-safe methods for interacting with an on-chain instance of the -[`ERC20Mintable`](self) contract located at a given `address`, using a given -provider `P`. + Contains type-safe methods for interacting with an on-chain instance of the + [`ERC20Mintable`](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. + 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.*/ + See the [module-level documentation](self) for all the available methods.*/ #[derive(Clone)] pub struct ERC20MintableInstance { address: alloy_sol_types::private::Address, @@ -2260,46 +2170,44 @@ See the [module-level documentation](self) for all the available methods.*/ impl ::core::fmt::Debug for ERC20MintableInstance { #[inline] fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { - f.debug_tuple("ERC20MintableInstance").field(&self.address).finish() + f.debug_tuple("ERC20MintableInstance") + .field(&self.address) + .finish() } } /// Instantiation and getters/setters. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > ERC20MintableInstance { + impl, N: alloy_contract::private::Network> + ERC20MintableInstance + { /**Creates a new wrapper around an on-chain [`ERC20Mintable`](self) contract instance. -See the [wrapper's documentation](`ERC20MintableInstance`) for more details.*/ + See the [wrapper's documentation](`ERC20MintableInstance`) for more details.*/ #[inline] - pub const fn new( - address: alloy_sol_types::private::Address, - __provider: P, - ) -> Self { + pub const fn new(address: alloy_sol_types::private::Address, __provider: P) -> Self { Self { address, provider: __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. + 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.*/ + For more fine-grained control over the deployment process, use [`deploy_builder`] instead.*/ #[inline] - pub async fn deploy( - __provider: P, - ) -> alloy_contract::Result> { + 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. + 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.*/ + 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( @@ -2307,21 +2215,25 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ ::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 { @@ -2329,7 +2241,8 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ } } impl ERC20MintableInstance<&P, N> { - /// Clones the provider and returns a new instance with the cloned provider. + /// Clones the provider and returns a new instance with the cloned + /// provider. #[inline] pub fn with_cloned_provider(self) -> ERC20MintableInstance { ERC20MintableInstance { @@ -2340,20 +2253,22 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ } } /// Function calls. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > ERC20MintableInstance { - /// Creates a new call builder using this contract instance's provider and address. + impl, N: alloy_contract::private::Network> + ERC20MintableInstance + { + /// 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. + /// 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 [`allowance`] function. pub fn allowance( &self, @@ -2362,6 +2277,7 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ ) -> 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, @@ -2370,6 +2286,7 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ ) -> alloy_contract::SolCallBuilder<&P, approveCall, N> { self.call_builder(&approveCall { spender, amount }) } + ///Creates a new call builder for the [`balanceOf`] function. pub fn balanceOf( &self, @@ -2377,6 +2294,7 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ ) -> alloy_contract::SolCallBuilder<&P, balanceOfCall, N> { self.call_builder(&balanceOfCall { account }) } + ///Creates a new call builder for the [`mint`] function. pub fn mint( &self, @@ -2385,6 +2303,7 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ ) -> alloy_contract::SolCallBuilder<&P, mintCall, N> { self.call_builder(&mintCall { account, amount }) } + ///Creates a new call builder for the [`transfer`] function. pub fn transfer( &self, @@ -2393,6 +2312,7 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ ) -> alloy_contract::SolCallBuilder<&P, transferCall, N> { self.call_builder(&transferCall { recipient, amount }) } + ///Creates a new call builder for the [`transferFrom`] function. pub fn transferFrom( &self, @@ -2400,43 +2320,44 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ recipient: alloy_sol_types::private::Address, amount: alloy_sol_types::private::primitives::aliases::U256, ) -> alloy_contract::SolCallBuilder<&P, transferFromCall, N> { - self.call_builder( - &transferFromCall { - sender, - recipient, - amount, - }, - ) + self.call_builder(&transferFromCall { + sender, + recipient, + amount, + }) } } /// Event filters. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > ERC20MintableInstance { - /// Creates a new event filter using this contract instance's provider and address. + impl, N: alloy_contract::private::Network> + ERC20MintableInstance + { + /// 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. + /// 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 [`MinterAdded`] event. pub fn MinterAdded_filter(&self) -> alloy_contract::Event<&P, MinterAdded, N> { self.event_filter::() } + ///Creates a new event filter for the [`MinterRemoved`] event. - pub fn MinterRemoved_filter( - &self, - ) -> alloy_contract::Event<&P, MinterRemoved, N> { + pub fn MinterRemoved_filter(&self) -> alloy_contract::Event<&P, MinterRemoved, 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::() diff --git a/contracts/generated/contracts-generated/flashloanrouter/src/lib.rs b/contracts/generated/contracts-generated/flashloanrouter/src/lib.rs index df407f5c33..ef292f4028 100644 --- a/contracts/generated/contracts-generated/flashloanrouter/src/lib.rs +++ b/contracts/generated/contracts-generated/flashloanrouter/src/lib.rs @@ -1,4 +1,10 @@ -#![allow(unused_imports, unused_attributes, clippy::all, rustdoc::all, non_snake_case)] +#![allow( + unused_imports, + unused_attributes, + clippy::all, + rustdoc::all, + non_snake_case +)] //! Auto-generated contract bindings. Do not edit. ///Module containing a contract's types and functions. /** @@ -16,12 +22,11 @@ library LoanRequest { clippy::empty_structs_with_brackets )] pub mod LoanRequest { - use super::*; - use alloy_sol_types as alloy_sol_types; + use {super::*, alloy_sol_types}; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**```solidity -struct Data { uint256 amount; address borrower; address lender; address token; } -```*/ + struct Data { uint256 amount; address borrower; address lender; address token; } + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct Data { @@ -41,7 +46,7 @@ struct Data { uint256 amount; address borrower; address lender; address token; } clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[doc(hidden)] #[allow(dead_code)] type UnderlyingSolTuple<'a> = ( @@ -59,9 +64,7 @@ struct Data { uint256 amount; address borrower; address lender; address token; } ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -96,9 +99,9 @@ struct Data { uint256 amount; address borrower; address lender; address token; } #[inline] fn stv_to_tokens(&self) -> ::Token<'_> { ( - as alloy_sol_types::SolType>::tokenize(&self.amount), + as alloy_sol_types::SolType>::tokenize( + &self.amount, + ), ::tokenize( &self.borrower, ), @@ -110,91 +113,88 @@ struct Data { uint256 amount; address borrower; address lender; address token; } ), ) } + #[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) + 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) + 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) + 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 Data { type RustType = Self; - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + + const ENCODED_SIZE: Option = + as alloy_sol_types::SolType>::ENCODED_SIZE; + const PACKED_ENCODED_SIZE: Option = + as alloy_sol_types::SolType>::PACKED_ENCODED_SIZE; 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); + let tuple = as alloy_sol_types::SolType>::detokenize(token); >>::from(tuple) } } #[automatically_derived] impl alloy_sol_types::SolStruct for Data { const NAME: &'static str = "Data"; + #[inline] fn eip712_root_type() -> alloy_sol_types::private::Cow<'static, str> { alloy_sol_types::private::Cow::Borrowed( "Data(uint256 amount,address borrower,address lender,address token)", ) } + #[inline] - fn eip712_components() -> alloy_sol_types::private::Vec< - alloy_sol_types::private::Cow<'static, str>, - > { + fn eip712_components() + -> alloy_sol_types::private::Vec> + { 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 { [ @@ -238,14 +238,13 @@ struct Data { uint256 amount; address borrower; address lender; address token; } &rust.token, ) } + #[inline] fn encode_topic_preimage( rust: &Self::RustType, out: &mut alloy_sol_types::private::Vec, ) { - out.reserve( - ::topic_preimage_length(rust), - ); + out.reserve(::topic_preimage_length(rust)); as alloy_sol_types::EventTopic>::encode_topic_preimage( @@ -265,25 +264,19 @@ struct Data { uint256 amount; address borrower; address lender; address token; } out, ); } + #[inline] - fn encode_topic( - rust: &Self::RustType, - ) -> alloy_sol_types::abi::token::WordToken { + 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), - ) + ::encode_topic_preimage(rust, &mut out); + alloy_sol_types::abi::token::WordToken(alloy_sol_types::private::keccak256(out)) } } }; - use alloy_contract as alloy_contract; + use alloy_contract; /**Creates a new wrapper around an on-chain [`LoanRequest`](self) contract instance. -See the [wrapper's documentation](`LoanRequestInstance`) for more details.*/ + See the [wrapper's documentation](`LoanRequestInstance`) for more details.*/ #[inline] pub const fn new< P: alloy_contract::private::Provider, @@ -296,15 +289,15 @@ See the [wrapper's documentation](`LoanRequestInstance`) for more details.*/ } /**A [`LoanRequest`](self) instance. -Contains type-safe methods for interacting with an on-chain instance of the -[`LoanRequest`](self) contract located at a given `address`, using a given -provider `P`. + Contains type-safe methods for interacting with an on-chain instance of the + [`LoanRequest`](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. + 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.*/ + See the [module-level documentation](self) for all the available methods.*/ #[derive(Clone)] pub struct LoanRequestInstance { address: alloy_sol_types::private::Address, @@ -315,43 +308,45 @@ See the [module-level documentation](self) for all the available methods.*/ impl ::core::fmt::Debug for LoanRequestInstance { #[inline] fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { - f.debug_tuple("LoanRequestInstance").field(&self.address).finish() + f.debug_tuple("LoanRequestInstance") + .field(&self.address) + .finish() } } /// Instantiation and getters/setters. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > LoanRequestInstance { + impl, N: alloy_contract::private::Network> + LoanRequestInstance + { /**Creates a new wrapper around an on-chain [`LoanRequest`](self) contract instance. -See the [wrapper's documentation](`LoanRequestInstance`) for more details.*/ + See the [wrapper's documentation](`LoanRequestInstance`) for more details.*/ #[inline] - pub const fn new( - address: alloy_sol_types::private::Address, - __provider: P, - ) -> Self { + pub const fn new(address: alloy_sol_types::private::Address, __provider: P) -> Self { Self { address, provider: __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 { @@ -359,7 +354,8 @@ See the [wrapper's documentation](`LoanRequestInstance`) for more details.*/ } } impl LoanRequestInstance<&P, N> { - /// Clones the provider and returns a new instance with the cloned provider. + /// Clones the provider and returns a new instance with the cloned + /// provider. #[inline] pub fn with_cloned_provider(self) -> LoanRequestInstance { LoanRequestInstance { @@ -370,14 +366,15 @@ See the [wrapper's documentation](`LoanRequestInstance`) for more details.*/ } } /// Function calls. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > LoanRequestInstance { - /// Creates a new call builder using this contract instance's provider and address. + impl, N: alloy_contract::private::Network> + LoanRequestInstance + { + /// 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. + /// 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, @@ -386,14 +383,15 @@ See the [wrapper's documentation](`LoanRequestInstance`) for more details.*/ } } /// Event filters. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > LoanRequestInstance { - /// Creates a new event filter using this contract instance's provider and address. + impl, N: alloy_contract::private::Network> + LoanRequestInstance + { + /// 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. + /// 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> { @@ -499,8 +497,7 @@ interface FlashLoanRouter { clippy::empty_structs_with_brackets )] pub mod FlashLoanRouter { - use super::*; - use alloy_sol_types as alloy_sol_types; + use {super::*, alloy_sol_types}; /// The creation / init bytecode of the contract. /// /// ```text @@ -522,9 +519,9 @@ pub mod FlashLoanRouter { b"`\x80`@R4\x80\x15a\0\x0FW__\xFD[P`\x046\x10a\0JW_5`\xE0\x1C\x80c\x02\xEB\xCB\xEA\x14a\0NW\x80c\x0E\xFB\x1F\xB6\x14a\0\x9EW\x80c\xE7\xC48\xC9\x14a\0\xB3W\x80c\xEABA\x8B\x14a\0\xC6W[__\xFD[a\0u\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\x81V[`@Qs\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x90\x91\x16\x81R` \x01`@Q\x80\x91\x03\x90\xF3[a\0\xB1a\0\xAC6`\x04a\x08\xB0V[a\0\xEDV[\0[a\0\xB1a\0\xC16`\x04a\t\xE5V[a\x022V[a\0u\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\x81V[3s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF_\\\x16\x14a\x01rW`@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\x82\x01R`\x19`$\x82\x01R\x7FOnly callable by borrower\0\0\0\0\0\0\0`D\x82\x01R`d\x01[`@Q\x80\x91\x03\x90\xFD[_\x80Ts\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x90\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x81\\\x16\x82\x17\x90]P\x80Q` \x82\x01 `\x01\\\x14a\x02&W`@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\x82\x01R`\x16`$\x82\x01R\x7FBad data from borrower\0\0\0\0\0\0\0\0\0\0`D\x82\x01R`d\x01a\x01iV[a\x02/\x81a\x03cV[PV[`@Q\x7F\x02\xCC%\r\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\x81R3`\x04\x82\x01R\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\0s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x90c\x02\xCC%\r\x90`$\x01` `@Q\x80\x83\x03\x81\x86Z\xFA\x15\x80\x15a\x02\xBAW=__>=_\xFD[PPPP`@Q=`\x1F\x19`\x1F\x82\x01\x16\x82\x01\x80`@RP\x81\x01\x90a\x02\xDE\x91\x90a\n\x80V[a\x03DW`@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\x82\x01R`\x19`$\x82\x01R\x7FOnly callable by a solver\0\0\0\0\0\0\0`D\x82\x01R`d\x01a\x01iV[_a\x03Q\x85\x85\x85\x85a\x04\x8DV[\x90Pa\x03\\\x81a\x03cV[PPPPPV[` \x81\x01Q_\x03a\x03\x7FWa\x02/a\x03z\x82a\x05IV[a\x05\x8BV[_a\x03\x89\x82a\x071V[` \x81\x81\x01Q\x84Q\x91\x85\x01\x91\x90\x91 \x91\x92P\x90\x81_\x80\\\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x16s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x83\x16\x17\x90]P\x80\x80`\x01]P`@\x80Q\x80\x82\x01\x82R``\x85\x01Qs\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x90\x81\x16\x82R\x85Q` \x83\x01R\x85\x83\x01Q\x92Q\x7F\xE0\xBB\xECw\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\x91\x92\x90\x85\x16\x91c\xE0\xBB\xECw\x91a\x04Y\x91\x85\x90\x87\x90\x8B\x90`\x04\x01a\n\xA6V[_`@Q\x80\x83\x03\x81_\x87\x80;\x15\x80\x15a\x04pW__\xFD[PZ\xF1\x15\x80\x15a\x04\x82W=__>=_\xFD[PPPPPPPPPV[``a\x04\xC4a\x04\x9D`\\\x86a\x0BrV[a\x04\xA8\x84` a\x0B\x8FV[a\x04\xB2\x91\x90a\x0B\x8FV[`@\x80Q\x82\x81R\x91\x82\x01` \x01\x90R\x90V[` \x80\x82\x01\x86\x81R\x91\x92Pa\x04\xD9\x90\x82a\x0B\x8FV[\x90P\x82\x84\x827a\x04\xE9\x83\x82a\x0B\x8FV[\x90P\x84[\x80\x15a\x05?W\x80a\x04\xFD\x81a\x0B\xA2V[\x91P\x82\x90Pa\x05,\x88\x88\x84\x81\x81\x10a\x05\x17Wa\x05\x17a\x0B\xD6V[\x90P`\x80\x02\x01\x82a\x08\x18\x90\x91\x90c\xFF\xFF\xFF\xFF\x16V[a\x057`\\\x84a\x0B\x8FV[\x92PPa\x04\xEDV[PP\x94\x93PPPPV[``_`\\a\x05Y\x84` \x01Q\x90V[a\x05c\x91\x90a\x0BrV[` \x84Qa\x05q\x91\x90a\x0C\x03V[a\x05{\x91\x90a\x0C\x03V[` \x93\x90\x93\x01\x92\x83RP\x90\x91\x90PV[\x7F\x13\xD7\x9A\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\0a\x05\xB5\x82a\x08gV[\x7F\xFF\xFF\xFF\xFF\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\x16\x14a\x06>W`@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\x82\x01R`\x18`$\x82\x01R\x7FOnly settle() is allowed\0\0\0\0\0\0\0\0`D\x82\x01R`d\x01a\x01iV[_\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\0s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x82`@Qa\x06\x84\x91\x90a\x0C\x16V[_`@Q\x80\x83\x03\x81_\x86Z\xF1\x91PP=\x80_\x81\x14a\x06\xBDW`@Q\x91P`\x1F\x19`?=\x01\x16\x82\x01`@R=\x82R=_` \x84\x01>a\x06\xC2V[``\x91P[PP\x90P\x80a\x07-W`@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\x82\x01R`\x13`$\x82\x01R\x7FSettlement reverted\0\0\0\0\0\0\0\0\0\0\0\0\0`D\x82\x01R`d\x01a\x01iV[PPV[`@\x80Q`\x80\x81\x01\x82R_\x80\x82R` \x82\x01\x81\x90R\x91\x81\x01\x82\x90R``\x81\x01\x82\x90R\x90`\x01a\x07a\x84` \x01Q\x90V[a\x07k\x91\x90a\x0C\x03V[\x90P_`\\\x84Qa\x07|\x91\x90a\x0C\x03V[\x90P` \x84\x01_a\x07\x8D\x83\x83a\x0B\x8FV[\x90P\x82\x86R\x83\x82Ra\x08\x0E\x81`@\x80Q`\x80\x81\x01\x82R_\x80\x82R` \x82\x01\x81\x90R\x91\x81\x01\x82\x90R``\x81\x01\x91\x90\x91RP\x80Q`\x14\x82\x01Q`(\x83\x01Q`<\x90\x93\x01Q`@\x80Q`\x80\x81\x01\x82R\x93\x84Rs\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x92\x83\x16` \x85\x01R\x93\x82\x16\x93\x83\x01\x93\x90\x93R\x90\x91\x16``\x82\x01R\x90V[\x96\x95PPPPPPV[\x805_a\x08+`@\x84\x01` \x85\x01a\x0CMV[\x90P_a\x08>``\x85\x01`@\x86\x01a\x0CMV[\x90P_a\x08Q`\x80\x86\x01``\x87\x01a\x0CMV[`<\x87\x01RP`(\x85\x01R`\x14\x84\x01R\x90\x91RPV[_\x80` \x83\x01\x90P`\x04\x83Q\x10a\x08}W\x80Q\x91P[P\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[_` \x82\x84\x03\x12\x15a\x08\xC0W__\xFD[\x815g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x11\x15a\x08\xD6W__\xFD[\x82\x01`\x1F\x81\x01\x84\x13a\x08\xE6W__\xFD[\x805g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x11\x15a\t\0Wa\t\0a\x08\x83V[`@Q\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\xE0`?\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\xE0`\x1F\x85\x01\x16\x01\x16\x81\x01\x81\x81\x10g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x82\x11\x17\x15a\tlWa\tla\x08\x83V[`@R\x81\x81R\x82\x82\x01` \x01\x86\x10\x15a\t\x83W__\xFD[\x81` \x84\x01` \x83\x017_\x91\x81\x01` \x01\x91\x90\x91R\x94\x93PPPPV[__\x83`\x1F\x84\x01\x12a\t\xB0W__\xFD[P\x815g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x11\x15a\t\xC7W__\xFD[` \x83\x01\x91P\x83` \x82\x85\x01\x01\x11\x15a\t\xDEW__\xFD[\x92P\x92\x90PV[____`@\x85\x87\x03\x12\x15a\t\xF8W__\xFD[\x845g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x11\x15a\n\x0EW__\xFD[\x85\x01`\x1F\x81\x01\x87\x13a\n\x1EW__\xFD[\x805g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x11\x15a\n4W__\xFD[\x87` \x82`\x07\x1B\x84\x01\x01\x11\x15a\nHW__\xFD[` \x91\x82\x01\x95P\x93P\x85\x015g\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x11\x15a\nhW__\xFD[a\nt\x87\x82\x88\x01a\t\xA0V[\x95\x98\x94\x97P\x95PPPPV[_` \x82\x84\x03\x12\x15a\n\x90W__\xFD[\x81Q\x80\x15\x15\x81\x14a\n\x9FW__\xFD[\x93\x92PPPV[s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x85\x16\x81Rs\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x84Q\x16` \x82\x01R` \x84\x01Q`@\x82\x01R\x82``\x82\x01R`\xA0`\x80\x82\x01R_\x82Q\x80`\xA0\x84\x01R\x80` \x85\x01`\xC0\x85\x01^_`\xC0\x82\x85\x01\x01R`\xC0\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\xE0`\x1F\x83\x01\x16\x84\x01\x01\x91PP\x95\x94PPPPPV[\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[\x80\x82\x02\x81\x15\x82\x82\x04\x84\x14\x17a\x0B\x89Wa\x0B\x89a\x0BEV[\x92\x91PPV[\x80\x82\x01\x80\x82\x11\x15a\x0B\x89Wa\x0B\x89a\x0BEV[_\x81a\x0B\xB0Wa\x0B\xB0a\x0BEV[P\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\x01\x90V[\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`2`\x04R`$_\xFD[\x81\x81\x03\x81\x81\x11\x15a\x0B\x89Wa\x0B\x89a\x0BEV[_\x82Q\x80` \x85\x01\x84^_\x92\x01\x91\x82RP\x91\x90PV[s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x16\x81\x14a\x02/W__\xFD[_` \x82\x84\x03\x12\x15a\x0C]W__\xFD[\x815a\n\x9F\x81a\x0C,V\xFE\xA2dipfsX\"\x12 @\xD87\xBBq#c\x08_\xA1_\x0B)\x0ETY\x08C2\x13B\xF6\x1B/!\xD5$2\xD2\xDC\x8E{dsolcC\0\x08\x1C\x003", ); /**Constructor`. -```solidity -constructor(address _settlementContract); -```*/ + ```solidity + constructor(address _settlementContract); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct constructorCall { @@ -532,7 +529,7 @@ constructor(address _settlementContract); pub _settlementContract: alloy_sol_types::private::Address, } const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -541,9 +538,7 @@ constructor(address _settlementContract); type UnderlyingRustTuple<'a> = (alloy_sol_types::private::Address,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -570,15 +565,15 @@ constructor(address _settlementContract); #[automatically_derived] impl alloy_sol_types::SolConstructor for constructorCall { type Parameters<'a> = (alloy_sol_types::sol_data::Address,); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + 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<'_> { ( @@ -591,9 +586,9 @@ constructor(address _settlementContract); }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `flashLoanAndSettle((uint256,address,address,address)[],bytes)` and selector `0xe7c438c9`. -```solidity -function flashLoanAndSettle(LoanRequest.Data[] memory loans, bytes memory settlement) external; -```*/ + ```solidity + function flashLoanAndSettle(LoanRequest.Data[] memory loans, bytes memory settlement) external; + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct flashLoanAndSettleCall { @@ -604,7 +599,9 @@ function flashLoanAndSettle(LoanRequest.Data[] memory loans, bytes memory settle #[allow(missing_docs)] pub settlement: alloy_sol_types::private::Bytes, } - ///Container type for the return parameters of the [`flashLoanAndSettle((uint256,address,address,address)[],bytes)`](flashLoanAndSettleCall) function. + ///Container type for the return parameters of the + /// [`flashLoanAndSettle((uint256,address,address,address)[], + /// bytes)`](flashLoanAndSettleCall) function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct flashLoanAndSettleReturn {} @@ -615,7 +612,7 @@ function flashLoanAndSettle(LoanRequest.Data[] memory loans, bytes memory settle clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -632,9 +629,7 @@ function flashLoanAndSettle(LoanRequest.Data[] memory loans, bytes memory settle ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -643,16 +638,14 @@ function flashLoanAndSettle(LoanRequest.Data[] memory loans, bytes memory settle } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From - for UnderlyingRustTuple<'_> { + impl ::core::convert::From for UnderlyingRustTuple<'_> { fn from(value: flashLoanAndSettleCall) -> Self { (value.loans, value.settlement) } } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From> - for flashLoanAndSettleCall { + impl ::core::convert::From> for flashLoanAndSettleCall { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { Self { loans: tuple.0, @@ -669,9 +662,7 @@ function flashLoanAndSettle(LoanRequest.Data[] memory loans, bytes memory settle type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -680,16 +671,14 @@ function flashLoanAndSettle(LoanRequest.Data[] memory loans, bytes memory settle } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From - for UnderlyingRustTuple<'_> { + impl ::core::convert::From for UnderlyingRustTuple<'_> { fn from(value: flashLoanAndSettleReturn) -> Self { () } } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From> - for flashLoanAndSettleReturn { + impl ::core::convert::From> for flashLoanAndSettleReturn { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { Self {} } @@ -708,22 +697,22 @@ function flashLoanAndSettle(LoanRequest.Data[] memory loans, bytes memory settle alloy_sol_types::sol_data::Array, alloy_sol_types::sol_data::Bytes, ); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = flashLoanAndSettleReturn; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "flashLoanAndSettle((uint256,address,address,address)[],bytes)"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [231u8, 196u8, 56u8, 201u8]; + const SIGNATURE: &'static str = + "flashLoanAndSettle((uint256,address,address,address)[],bytes)"; + #[inline] fn new<'a>( tuple: as alloy_sol_types::SolType>::RustType, ) -> Self { tuple.into() } + #[inline] fn tokenize(&self) -> Self::Token<'_> { ( @@ -735,38 +724,38 @@ function flashLoanAndSettle(LoanRequest.Data[] memory loans, bytes memory settle ), ) } + #[inline] fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { flashLoanAndSettleReturn::_tokenize(ret) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) + 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) + 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(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `settlementContract()` and selector `0xea42418b`. -```solidity -function settlementContract() external view returns (address); -```*/ + ```solidity + function settlementContract() external view returns (address); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct settlementContractCall; #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`settlementContract()`](settlementContractCall) function. + ///Container type for the return parameters of the + /// [`settlementContract()`](settlementContractCall) function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct settlementContractReturn { @@ -780,7 +769,7 @@ function settlementContract() external view returns (address); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -789,9 +778,7 @@ function settlementContract() external view returns (address); type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -800,16 +787,14 @@ function settlementContract() external view returns (address); } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From - for UnderlyingRustTuple<'_> { + impl ::core::convert::From for UnderlyingRustTuple<'_> { fn from(value: settlementContractCall) -> Self { () } } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From> - for settlementContractCall { + impl ::core::convert::From> for settlementContractCall { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { Self } @@ -823,9 +808,7 @@ function settlementContract() external view returns (address); type UnderlyingRustTuple<'a> = (alloy_sol_types::private::Address,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -834,16 +817,14 @@ function settlementContract() external view returns (address); } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From - for UnderlyingRustTuple<'_> { + impl ::core::convert::From for UnderlyingRustTuple<'_> { fn from(value: settlementContractReturn) -> Self { (value._0,) } } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From> - for settlementContractReturn { + impl ::core::convert::From> for settlementContractReturn { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { Self { _0: tuple.0 } } @@ -852,61 +833,55 @@ function settlementContract() external view returns (address); #[automatically_derived] impl alloy_sol_types::SolCall for settlementContractCall { type Parameters<'a> = (); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = alloy_sol_types::private::Address; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (alloy_sol_types::sol_data::Address,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "settlementContract()"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [234u8, 66u8, 65u8, 139u8]; + const SIGNATURE: &'static str = "settlementContract()"; + #[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, - ), - ) + (::tokenize(ret),) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) - .map(|r| { + as alloy_sol_types::SolType>::abi_decode_sequence(data).map( + |r| { let r: settlementContractReturn = 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: settlementContractReturn = r.into(); - r._0 - }) + 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: settlementContractReturn = r.into(); + r._0 + }) } } }; ///Container for all the [`FlashLoanRouter`](self) function calls. #[derive(Clone)] - #[derive()] pub enum FlashLoanRouterCalls { #[allow(missing_docs)] flashLoanAndSettle(flashLoanAndSettleCall), @@ -916,24 +891,24 @@ function settlementContract() external view returns (address); impl FlashLoanRouterCalls { /// 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. + /// 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]] = &[ - [231u8, 196u8, 56u8, 201u8], - [234u8, 66u8, 65u8, 139u8], + pub const SELECTORS: &'static [[u8; 4usize]] = + &[[231u8, 196u8, 56u8, 201u8], [234u8, 66u8, 65u8, 139u8]]; + /// The signatures in the same order as `SELECTORS`. + pub const SIGNATURES: &'static [&'static str] = &[ + ::SIGNATURE, + ::SIGNATURE, ]; /// The names of the variants in the same order as `SELECTORS`. pub const VARIANT_NAMES: &'static [&'static str] = &[ ::core::stringify!(flashLoanAndSettle), ::core::stringify!(settlementContract), ]; - /// The signatures in the same order as `SELECTORS`. - pub const SIGNATURES: &'static [&'static str] = &[ - ::SIGNATURE, - ::SIGNATURE, - ]; + /// Returns the signature for the given selector, if known. #[inline] pub fn signature_by_selector( @@ -946,20 +921,20 @@ function settlementContract() external view returns (address); ::core::result::Result::Err(_) => ::core::option::Option::None, } } + /// Returns the enum variant name for the given selector, if known. #[inline] - pub fn name_by_selector( - selector: [u8; 4usize], - ) -> ::core::option::Option<&'static str> { + pub fn name_by_selector(selector: [u8; 4usize]) -> ::core::option::Option<&'static str> { let sig = Self::signature_by_selector(selector)?; sig.split_once('(').map(|(name, _)| name) } } #[automatically_derived] impl alloy_sol_types::SolInterface for FlashLoanRouterCalls { - const NAME: &'static str = "FlashLoanRouterCalls"; - const MIN_DATA_LENGTH: usize = 0usize; const COUNT: usize = 2usize; + const MIN_DATA_LENGTH: usize = 0usize; + const NAME: &'static str = "FlashLoanRouterCalls"; + #[inline] fn selector(&self) -> [u8; 4] { match self { @@ -971,30 +946,26 @@ function settlementContract() external view returns (address); } } } + #[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 abi_decode_raw(selector: [u8; 4], data: &[u8]) -> alloy_sol_types::Result { + static DECODE_SHIMS: &[fn(&[u8]) -> alloy_sol_types::Result] = &[ { fn flashLoanAndSettle( data: &[u8], ) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, - ) + ::abi_decode_raw(data) .map(FlashLoanRouterCalls::flashLoanAndSettle) } flashLoanAndSettle @@ -1003,24 +974,21 @@ function settlementContract() external view returns (address); fn settlementContract( data: &[u8], ) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, - ) + ::abi_decode_raw(data) .map(FlashLoanRouterCalls::settlementContract) } settlementContract }, ]; let Ok(idx) = Self::SELECTORS.binary_search(&selector) else { - return Err( - alloy_sol_types::Error::unknown_selector( - ::NAME, - selector, - ), - ); + return Err(alloy_sol_types::Error::unknown_selector( + ::NAME, + selector, + )); }; DECODE_SHIMS[idx](data) } + #[inline] #[allow(non_snake_case)] fn abi_decode_raw_validate( @@ -1029,7 +997,8 @@ function settlementContract() external view returns (address); ) -> alloy_sol_types::Result { static DECODE_VALIDATE_SHIMS: &[fn( &[u8], - ) -> alloy_sol_types::Result] = &[ + ) + -> alloy_sol_types::Result] = &[ { fn flashLoanAndSettle( data: &[u8], @@ -1054,52 +1023,42 @@ function settlementContract() external view returns (address); }, ]; let Ok(idx) = Self::SELECTORS.binary_search(&selector) else { - return Err( - alloy_sol_types::Error::unknown_selector( - ::NAME, - selector, - ), - ); + 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::flashLoanAndSettle(inner) => { - ::abi_encoded_size( - inner, - ) + ::abi_encoded_size(inner) } Self::settlementContract(inner) => { - ::abi_encoded_size( - inner, - ) + ::abi_encoded_size(inner) } } } + #[inline] fn abi_encode_raw(&self, out: &mut alloy_sol_types::private::Vec) { match self { Self::flashLoanAndSettle(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } Self::settlementContract(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } } } } - use alloy_contract as alloy_contract; + use alloy_contract; /**Creates a new wrapper around an on-chain [`FlashLoanRouter`](self) contract instance. -See the [wrapper's documentation](`FlashLoanRouterInstance`) for more details.*/ + See the [wrapper's documentation](`FlashLoanRouterInstance`) for more details.*/ #[inline] pub const fn new< P: alloy_contract::private::Provider, @@ -1112,26 +1071,22 @@ See the [wrapper's documentation](`FlashLoanRouterInstance`) for more details.*/ } /**Deploys this contract using the given `provider` and constructor arguments, if any. -Returns a new instance of the contract, if the deployment was successful. + 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.*/ + 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, - >( + pub fn deploy, N: alloy_contract::private::Network>( __provider: P, _settlementContract: alloy_sol_types::private::Address, - ) -> impl ::core::future::Future< - Output = alloy_contract::Result>, - > { + ) -> impl ::core::future::Future>> + { FlashLoanRouterInstance::::deploy(__provider, _settlementContract) } /**Creates a `RawCallBuilder` for deploying this contract using the given `provider` -and constructor arguments, if any. + 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.*/ + 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, @@ -1144,15 +1099,15 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ } /**A [`FlashLoanRouter`](self) instance. -Contains type-safe methods for interacting with an on-chain instance of the -[`FlashLoanRouter`](self) contract located at a given `address`, using a given -provider `P`. + Contains type-safe methods for interacting with an on-chain instance of the + [`FlashLoanRouter`](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. + 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.*/ + See the [module-level documentation](self) for all the available methods.*/ #[derive(Clone)] pub struct FlashLoanRouterInstance { address: alloy_sol_types::private::Address, @@ -1163,33 +1118,32 @@ See the [module-level documentation](self) for all the available methods.*/ impl ::core::fmt::Debug for FlashLoanRouterInstance { #[inline] fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { - f.debug_tuple("FlashLoanRouterInstance").field(&self.address).finish() + f.debug_tuple("FlashLoanRouterInstance") + .field(&self.address) + .finish() } } /// Instantiation and getters/setters. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > FlashLoanRouterInstance { + impl, N: alloy_contract::private::Network> + FlashLoanRouterInstance + { /**Creates a new wrapper around an on-chain [`FlashLoanRouter`](self) contract instance. -See the [wrapper's documentation](`FlashLoanRouterInstance`) for more details.*/ + See the [wrapper's documentation](`FlashLoanRouterInstance`) for more details.*/ #[inline] - pub const fn new( - address: alloy_sol_types::private::Address, - __provider: P, - ) -> Self { + pub const fn new(address: alloy_sol_types::private::Address, __provider: P) -> Self { Self { address, provider: __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. + 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.*/ + For more fine-grained control over the deployment process, use [`deploy_builder`] instead.*/ #[inline] pub async fn deploy( __provider: P, @@ -1199,11 +1153,12 @@ For more fine-grained control over the deployment process, use [`deploy_builder` 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. + 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.*/ + 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, @@ -1213,31 +1168,33 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ __provider, [ &BYTECODE[..], - &alloy_sol_types::SolConstructor::abi_encode( - &constructorCall { - _settlementContract, - }, - )[..], + &alloy_sol_types::SolConstructor::abi_encode(&constructorCall { + _settlementContract, + })[..], ] - .concat() - .into(), + .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 { @@ -1245,7 +1202,8 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ } } impl FlashLoanRouterInstance<&P, N> { - /// Clones the provider and returns a new instance with the cloned provider. + /// Clones the provider and returns a new instance with the cloned + /// provider. #[inline] pub fn with_cloned_provider(self) -> FlashLoanRouterInstance { FlashLoanRouterInstance { @@ -1256,20 +1214,22 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ } } /// Function calls. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > FlashLoanRouterInstance { - /// Creates a new call builder using this contract instance's provider and address. + impl, N: alloy_contract::private::Network> + FlashLoanRouterInstance + { + /// 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. + /// 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 [`flashLoanAndSettle`] function. pub fn flashLoanAndSettle( &self, @@ -1278,13 +1238,9 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ >, settlement: alloy_sol_types::private::Bytes, ) -> alloy_contract::SolCallBuilder<&P, flashLoanAndSettleCall, N> { - self.call_builder( - &flashLoanAndSettleCall { - loans, - settlement, - }, - ) + self.call_builder(&flashLoanAndSettleCall { loans, settlement }) } + ///Creates a new call builder for the [`settlementContract`] function. pub fn settlementContract( &self, @@ -1293,14 +1249,15 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ } } /// Event filters. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > FlashLoanRouterInstance { - /// Creates a new event filter using this contract instance's provider and address. + impl, N: alloy_contract::private::Network> + FlashLoanRouterInstance + { + /// 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. + /// 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> { @@ -1308,73 +1265,43 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ } } } -pub type Instance = FlashLoanRouter::FlashLoanRouterInstance< - ::alloy_provider::DynProvider, ->; +pub type Instance = FlashLoanRouter::FlashLoanRouterInstance<::alloy_provider::DynProvider>; use { - std::{sync::LazyLock, collections::HashMap}, - anyhow::{Result, Context}, - alloy_primitives::{address, Address}, - alloy_provider::{Provider, DynProvider}, + alloy_primitives::{Address, address}, + alloy_provider::{DynProvider, Provider}, + anyhow::{Context, Result}, + std::{collections::HashMap, sync::LazyLock}, }; pub const fn deployment_info(chain_id: u64) -> Option<(Address, Option)> { match chain_id { - 1u64 => { - Some(( - ::alloy_primitives::address!( - "0x9da8b48441583a2b93e2ef8213aad0ec0b392c69" - ), - None, - )) - } - 100u64 => { - Some(( - ::alloy_primitives::address!( - "0x9da8b48441583a2b93e2ef8213aad0ec0b392c69" - ), - None, - )) - } - 137u64 => { - Some(( - ::alloy_primitives::address!( - "0x9da8b48441583a2b93e2ef8213aad0ec0b392c69" - ), - None, - )) - } - 8453u64 => { - Some(( - ::alloy_primitives::address!( - "0x9da8b48441583a2b93e2ef8213aad0ec0b392c69" - ), - None, - )) - } - 42161u64 => { - Some(( - ::alloy_primitives::address!( - "0x9da8b48441583a2b93e2ef8213aad0ec0b392c69" - ), - None, - )) - } - 43114u64 => { - Some(( - ::alloy_primitives::address!( - "0x9da8b48441583a2b93e2ef8213aad0ec0b392c69" - ), - None, - )) - } - 11155111u64 => { - Some(( - ::alloy_primitives::address!( - "0x9da8b48441583a2b93e2ef8213aad0ec0b392c69" - ), - None, - )) - } + 1u64 => Some(( + ::alloy_primitives::address!("0x9da8b48441583a2b93e2ef8213aad0ec0b392c69"), + None, + )), + 100u64 => Some(( + ::alloy_primitives::address!("0x9da8b48441583a2b93e2ef8213aad0ec0b392c69"), + None, + )), + 137u64 => Some(( + ::alloy_primitives::address!("0x9da8b48441583a2b93e2ef8213aad0ec0b392c69"), + None, + )), + 8453u64 => Some(( + ::alloy_primitives::address!("0x9da8b48441583a2b93e2ef8213aad0ec0b392c69"), + None, + )), + 42161u64 => Some(( + ::alloy_primitives::address!("0x9da8b48441583a2b93e2ef8213aad0ec0b392c69"), + None, + )), + 43114u64 => Some(( + ::alloy_primitives::address!("0x9da8b48441583a2b93e2ef8213aad0ec0b392c69"), + None, + )), + 11155111u64 => Some(( + ::alloy_primitives::address!("0x9da8b48441583a2b93e2ef8213aad0ec0b392c69"), + None, + )), _ => None, } } @@ -1391,9 +1318,7 @@ pub const fn deployment_block(chain_id: &u64) -> Option { } } impl Instance { - pub fn deployed( - provider: &DynProvider, - ) -> impl Future> + Send { + pub fn deployed(provider: &DynProvider) -> impl Future> + Send { async move { let chain_id = provider .get_chain_id() diff --git a/contracts/generated/contracts-generated/gashog/src/lib.rs b/contracts/generated/contracts-generated/gashog/src/lib.rs index 0661975cb3..92965c1e03 100644 --- a/contracts/generated/contracts-generated/gashog/src/lib.rs +++ b/contracts/generated/contracts-generated/gashog/src/lib.rs @@ -1,4 +1,10 @@ -#![allow(unused_imports, unused_attributes, clippy::all, rustdoc::all, non_snake_case)] +#![allow( + unused_imports, + unused_attributes, + clippy::all, + rustdoc::all, + non_snake_case +)] //! Auto-generated contract bindings. Do not edit. /** @@ -70,8 +76,7 @@ interface GasHog { clippy::empty_structs_with_brackets )] pub mod GasHog { - use super::*; - use alloy_sol_types as alloy_sol_types; + use {super::*, alloy_sol_types}; /// The creation / init bytecode of the contract. /// /// ```text @@ -94,9 +99,9 @@ pub mod GasHog { ); #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `approve(address,address,uint256)` and selector `0xe1f21c67`. -```solidity -function approve(address token, address spender, uint256 amount) external; -```*/ + ```solidity + function approve(address token, address spender, uint256 amount) external; + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct approveCall { @@ -107,7 +112,8 @@ function approve(address token, address spender, uint256 amount) external; #[allow(missing_docs)] pub amount: alloy_sol_types::private::primitives::aliases::U256, } - ///Container type for the return parameters of the [`approve(address,address,uint256)`](approveCall) function. + ///Container type for the return parameters of the + /// [`approve(address,address,uint256)`](approveCall) function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct approveReturn {} @@ -118,7 +124,7 @@ function approve(address token, address spender, uint256 amount) external; clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -135,9 +141,7 @@ function approve(address token, address spender, uint256 amount) external; ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -171,9 +175,7 @@ function approve(address token, address spender, uint256 amount) external; type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -196,9 +198,7 @@ function approve(address token, address spender, uint256 amount) external; } } impl approveReturn { - fn _tokenize( - &self, - ) -> ::ReturnToken<'_> { + fn _tokenize(&self) -> ::ReturnToken<'_> { () } } @@ -209,22 +209,21 @@ function approve(address token, address spender, uint256 amount) external; 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 = approveReturn; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "approve(address,address,uint256)"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [225u8, 242u8, 28u8, 103u8]; + const SIGNATURE: &'static str = "approve(address,address,uint256)"; + #[inline] fn new<'a>( tuple: as alloy_sol_types::SolType>::RustType, ) -> Self { tuple.into() } + #[inline] fn tokenize(&self) -> Self::Token<'_> { ( @@ -234,38 +233,37 @@ function approve(address token, address spender, uint256 amount) external; ::tokenize( &self.spender, ), - as alloy_sol_types::SolType>::tokenize(&self.amount), + as alloy_sol_types::SolType>::tokenize( + &self.amount, + ), ) } + #[inline] fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { approveReturn::_tokenize(ret) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) + 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) + 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(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `isValidSignature(bytes32,bytes)` and selector `0x1626ba7e`. -```solidity -function isValidSignature(bytes32 order, bytes memory signature) external view returns (bytes4); -```*/ + ```solidity + function isValidSignature(bytes32 order, bytes memory signature) external view returns (bytes4); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct isValidSignatureCall { @@ -275,7 +273,8 @@ function isValidSignature(bytes32 order, bytes memory signature) external view r pub signature: alloy_sol_types::private::Bytes, } #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`isValidSignature(bytes32,bytes)`](isValidSignatureCall) function. + ///Container type for the return parameters of the + /// [`isValidSignature(bytes32,bytes)`](isValidSignatureCall) function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct isValidSignatureReturn { @@ -289,7 +288,7 @@ function isValidSignature(bytes32 order, bytes memory signature) external view r clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -304,9 +303,7 @@ function isValidSignature(bytes32 order, bytes memory signature) external view r ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -315,16 +312,14 @@ function isValidSignature(bytes32 order, bytes memory signature) external view r } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From - for UnderlyingRustTuple<'_> { + impl ::core::convert::From for UnderlyingRustTuple<'_> { fn from(value: isValidSignatureCall) -> Self { (value.order, value.signature) } } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From> - for isValidSignatureCall { + impl ::core::convert::From> for isValidSignatureCall { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { Self { order: tuple.0, @@ -341,9 +336,7 @@ function isValidSignature(bytes32 order, bytes memory signature) external view r 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, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -352,16 +345,14 @@ function isValidSignature(bytes32 order, bytes memory signature) external view r } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From - for UnderlyingRustTuple<'_> { + impl ::core::convert::From for UnderlyingRustTuple<'_> { fn from(value: isValidSignatureReturn) -> Self { (value._0,) } } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From> - for isValidSignatureReturn { + impl ::core::convert::From> for isValidSignatureReturn { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { Self { _0: tuple.0 } } @@ -373,22 +364,21 @@ function isValidSignature(bytes32 order, bytes memory signature) external view r alloy_sol_types::sol_data::FixedBytes<32>, alloy_sol_types::sol_data::Bytes, ); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = alloy_sol_types::private::FixedBytes<4>; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (alloy_sol_types::sol_data::FixedBytes<4>,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "isValidSignature(bytes32,bytes)"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [22u8, 38u8, 186u8, 126u8]; + const SIGNATURE: &'static str = "isValidSignature(bytes32,bytes)"; + #[inline] fn new<'a>( tuple: as alloy_sol_types::SolType>::RustType, ) -> Self { tuple.into() } + #[inline] fn tokenize(&self) -> Self::Token<'_> { ( @@ -400,6 +390,7 @@ function isValidSignature(bytes32 order, bytes memory signature) external view r ), ) } + #[inline] fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { ( @@ -408,33 +399,31 @@ function isValidSignature(bytes32 order, bytes memory signature) external view r > 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| { + as alloy_sol_types::SolType>::abi_decode_sequence(data).map( + |r| { let r: isValidSignatureReturn = 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: isValidSignatureReturn = r.into(); - r._0 - }) + 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: isValidSignatureReturn = r.into(); + r._0 + }) } } }; ///Container for all the [`GasHog`](self) function calls. #[derive(Clone)] - #[derive()] pub enum GasHogCalls { #[allow(missing_docs)] approve(approveCall), @@ -444,24 +433,24 @@ function isValidSignature(bytes32 order, bytes memory signature) external view r impl GasHogCalls { /// 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. + /// 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]] = &[ - [22u8, 38u8, 186u8, 126u8], - [225u8, 242u8, 28u8, 103u8], + pub const SELECTORS: &'static [[u8; 4usize]] = + &[[22u8, 38u8, 186u8, 126u8], [225u8, 242u8, 28u8, 103u8]]; + /// The signatures in the same order as `SELECTORS`. + pub const SIGNATURES: &'static [&'static str] = &[ + ::SIGNATURE, + ::SIGNATURE, ]; /// The names of the variants in the same order as `SELECTORS`. pub const VARIANT_NAMES: &'static [&'static str] = &[ ::core::stringify!(isValidSignature), ::core::stringify!(approve), ]; - /// The signatures in the same order as `SELECTORS`. - pub const SIGNATURES: &'static [&'static str] = &[ - ::SIGNATURE, - ::SIGNATURE, - ]; + /// Returns the signature for the given selector, if known. #[inline] pub fn signature_by_selector( @@ -474,20 +463,20 @@ function isValidSignature(bytes32 order, bytes memory signature) external view r ::core::result::Result::Err(_) => ::core::option::Option::None, } } + /// Returns the enum variant name for the given selector, if known. #[inline] - pub fn name_by_selector( - selector: [u8; 4usize], - ) -> ::core::option::Option<&'static str> { + pub fn name_by_selector(selector: [u8; 4usize]) -> ::core::option::Option<&'static str> { let sig = Self::signature_by_selector(selector)?; sig.split_once('(').map(|(name, _)| name) } } #[automatically_derived] impl alloy_sol_types::SolInterface for GasHogCalls { - const NAME: &'static str = "GasHogCalls"; - const MIN_DATA_LENGTH: usize = 96usize; const COUNT: usize = 2usize; + const MIN_DATA_LENGTH: usize = 96usize; + const NAME: &'static str = "GasHogCalls"; + #[inline] fn selector(&self) -> [u8; 4] { match self { @@ -497,28 +486,24 @@ function isValidSignature(bytes32 order, bytes memory signature) external view r } } } + #[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 { + fn abi_decode_raw(selector: [u8; 4], data: &[u8]) -> alloy_sol_types::Result { static DECODE_SHIMS: &[fn(&[u8]) -> alloy_sol_types::Result] = &[ { - fn isValidSignature( - data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, - ) + fn isValidSignature(data: &[u8]) -> alloy_sol_types::Result { + ::abi_decode_raw(data) .map(GasHogCalls::isValidSignature) } isValidSignature @@ -532,55 +517,47 @@ function isValidSignature(bytes32 order, bytes memory signature) external view r }, ]; let Ok(idx) = Self::SELECTORS.binary_search(&selector) else { - return Err( - alloy_sol_types::Error::unknown_selector( - ::NAME, - selector, - ), - ); + 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] = &[ + static DECODE_VALIDATE_SHIMS: &[fn(&[u8]) -> alloy_sol_types::Result] = &[ { - fn isValidSignature( - data: &[u8], - ) -> alloy_sol_types::Result { + fn isValidSignature(data: &[u8]) -> alloy_sol_types::Result { ::abi_decode_raw_validate( - data, - ) - .map(GasHogCalls::isValidSignature) + data, + ) + .map(GasHogCalls::isValidSignature) } isValidSignature }, { fn approve(data: &[u8]) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) + ::abi_decode_raw_validate(data) .map(GasHogCalls::approve) } approve }, ]; let Ok(idx) = Self::SELECTORS.binary_search(&selector) else { - return Err( - alloy_sol_types::Error::unknown_selector( - ::NAME, - selector, - ), - ); + return Err(alloy_sol_types::Error::unknown_selector( + ::NAME, + selector, + )); }; DECODE_VALIDATE_SHIMS[idx](data) } + #[inline] fn abi_encoded_size(&self) -> usize { match self { @@ -588,12 +565,11 @@ function isValidSignature(bytes32 order, bytes memory signature) external view r ::abi_encoded_size(inner) } Self::isValidSignature(inner) => { - ::abi_encoded_size( - inner, - ) + ::abi_encoded_size(inner) } } } + #[inline] fn abi_encode_raw(&self, out: &mut alloy_sol_types::private::Vec) { match self { @@ -601,18 +577,15 @@ function isValidSignature(bytes32 order, bytes memory signature) external view r ::abi_encode_raw(inner, out) } Self::isValidSignature(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } } } } - use alloy_contract as alloy_contract; + use alloy_contract; /**Creates a new wrapper around an on-chain [`GasHog`](self) contract instance. -See the [wrapper's documentation](`GasHogInstance`) for more details.*/ + See the [wrapper's documentation](`GasHogInstance`) for more details.*/ #[inline] pub const fn new< P: alloy_contract::private::Provider, @@ -625,43 +598,40 @@ See the [wrapper's documentation](`GasHogInstance`) for more details.*/ } /**Deploys this contract using the given `provider` and constructor arguments, if any. -Returns a new instance of the contract, if the deployment was successful. + 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.*/ + 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, - >( + pub fn deploy, N: alloy_contract::private::Network>( __provider: P, - ) -> impl ::core::future::Future< - Output = alloy_contract::Result>, - > { + ) -> impl ::core::future::Future>> { GasHogInstance::::deploy(__provider) } /**Creates a `RawCallBuilder` for deploying this contract using the given `provider` -and constructor arguments, if any. + 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.*/ + 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) -> alloy_contract::RawCallBuilder { + >( + __provider: P, + ) -> alloy_contract::RawCallBuilder { GasHogInstance::::deploy_builder(__provider) } /**A [`GasHog`](self) instance. -Contains type-safe methods for interacting with an on-chain instance of the -[`GasHog`](self) contract located at a given `address`, using a given -provider `P`. + Contains type-safe methods for interacting with an on-chain instance of the + [`GasHog`](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. + 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.*/ + See the [module-level documentation](self) for all the available methods.*/ #[derive(Clone)] pub struct GasHogInstance { address: alloy_sol_types::private::Address, @@ -672,46 +642,44 @@ See the [module-level documentation](self) for all the available methods.*/ impl ::core::fmt::Debug for GasHogInstance { #[inline] fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { - f.debug_tuple("GasHogInstance").field(&self.address).finish() + f.debug_tuple("GasHogInstance") + .field(&self.address) + .finish() } } /// Instantiation and getters/setters. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > GasHogInstance { + impl, N: alloy_contract::private::Network> + GasHogInstance + { /**Creates a new wrapper around an on-chain [`GasHog`](self) contract instance. -See the [wrapper's documentation](`GasHogInstance`) for more details.*/ + See the [wrapper's documentation](`GasHogInstance`) for more details.*/ #[inline] - pub const fn new( - address: alloy_sol_types::private::Address, - __provider: P, - ) -> Self { + pub const fn new(address: alloy_sol_types::private::Address, __provider: P) -> Self { Self { address, provider: __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. + 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.*/ + For more fine-grained control over the deployment process, use [`deploy_builder`] instead.*/ #[inline] - pub async fn deploy( - __provider: P, - ) -> alloy_contract::Result> { + 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. + 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.*/ + 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( @@ -719,21 +687,25 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ ::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 { @@ -741,7 +713,8 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ } } impl GasHogInstance<&P, N> { - /// Clones the provider and returns a new instance with the cloned provider. + /// Clones the provider and returns a new instance with the cloned + /// provider. #[inline] pub fn with_cloned_provider(self) -> GasHogInstance { GasHogInstance { @@ -752,20 +725,22 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ } } /// Function calls. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > GasHogInstance { - /// Creates a new call builder using this contract instance's provider and address. + impl, N: alloy_contract::private::Network> + GasHogInstance + { + /// 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. + /// 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 [`approve`] function. pub fn approve( &self, @@ -773,37 +748,32 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ spender: alloy_sol_types::private::Address, amount: alloy_sol_types::private::primitives::aliases::U256, ) -> alloy_contract::SolCallBuilder<&P, approveCall, N> { - self.call_builder( - &approveCall { - token, - spender, - amount, - }, - ) + self.call_builder(&approveCall { + token, + spender, + amount, + }) } + ///Creates a new call builder for the [`isValidSignature`] function. pub fn isValidSignature( &self, order: alloy_sol_types::private::FixedBytes<32>, signature: alloy_sol_types::private::Bytes, ) -> alloy_contract::SolCallBuilder<&P, isValidSignatureCall, N> { - self.call_builder( - &isValidSignatureCall { - order, - signature, - }, - ) + self.call_builder(&isValidSignatureCall { order, signature }) } } /// Event filters. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > GasHogInstance { - /// Creates a new event filter using this contract instance's provider and address. + impl, N: alloy_contract::private::Network> + GasHogInstance + { + /// 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. + /// 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> { diff --git a/contracts/generated/contracts-generated/gnosissafe/src/lib.rs b/contracts/generated/contracts-generated/gnosissafe/src/lib.rs index a2238d74f1..53fdeadaef 100644 --- a/contracts/generated/contracts-generated/gnosissafe/src/lib.rs +++ b/contracts/generated/contracts-generated/gnosissafe/src/lib.rs @@ -1,4 +1,10 @@ -#![allow(unused_imports, unused_attributes, clippy::all, rustdoc::all, non_snake_case)] +#![allow( + unused_imports, + unused_attributes, + clippy::all, + rustdoc::all, + non_snake_case +)] //! Auto-generated contract bindings. Do not edit. ///Module containing a contract's types and functions. /** @@ -16,68 +22,67 @@ library Enum { clippy::empty_structs_with_brackets )] pub mod Enum { - use super::*; - use alloy_sol_types as alloy_sol_types; + use {super::*, alloy_sol_types}; #[derive(Default, Debug, PartialEq, Eq, Hash)] #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct Operation(u8); const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[automatically_derived] impl alloy_sol_types::private::SolTypeValue for u8 { #[inline] fn stv_to_tokens( &self, - ) -> as alloy_sol_types::SolType>::Token<'_> { + ) -> as alloy_sol_types::SolType>::Token<'_> + { alloy_sol_types::private::SolTypeValue::< alloy_sol_types::sol_data::Uint<8>, >::stv_to_tokens(self) } + #[inline] fn stv_eip712_data_word(&self) -> alloy_sol_types::Word { - as alloy_sol_types::SolType>::tokenize(self) - .0 + as alloy_sol_types::SolType>::tokenize(self).0 } + #[inline] - fn stv_abi_encode_packed_to( - &self, - out: &mut alloy_sol_types::private::Vec, - ) { + fn stv_abi_encode_packed_to(&self, out: &mut alloy_sol_types::private::Vec) { as alloy_sol_types::SolType>::abi_encode_packed_to(self, out) } + #[inline] fn stv_abi_packed_encoded_size(&self) -> usize { - as alloy_sol_types::SolType>::abi_encoded_size(self) + as alloy_sol_types::SolType>::abi_encoded_size( + self, + ) } } impl Operation { /// The Solidity type name. pub const NAME: &'static str = stringify!(@ name); + /// Convert from the underlying value type. #[inline] pub const fn from_underlying(value: u8) -> Self { Self(value) } + /// Return the underlying value. #[inline] pub const fn into_underlying(self) -> u8 { self.0 } + /// Return the single encoding of this value, delegating to the /// underlying type. #[inline] pub fn abi_encode(&self) -> alloy_sol_types::private::Vec { ::abi_encode(&self.0) } + /// Return the packed encoding of this value, delegating to the /// underlying type. #[inline] @@ -100,31 +105,29 @@ pub mod Enum { #[automatically_derived] impl alloy_sol_types::SolType for Operation { type RustType = u8; - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SOL_NAME: &'static str = Self::NAME; - const ENCODED_SIZE: Option = as alloy_sol_types::SolType>::ENCODED_SIZE; + type Token<'a> = + as alloy_sol_types::SolType>::Token<'a>; + + const ENCODED_SIZE: Option = + as alloy_sol_types::SolType>::ENCODED_SIZE; const PACKED_ENCODED_SIZE: Option = as alloy_sol_types::SolType>::PACKED_ENCODED_SIZE; + const SOL_NAME: &'static str = Self::NAME; + #[inline] fn valid_token(token: &Self::Token<'_>) -> bool { Self::type_check(token).is_ok() } + #[inline] fn type_check(token: &Self::Token<'_>) -> alloy_sol_types::Result<()> { - as alloy_sol_types::SolType>::type_check(token) + as alloy_sol_types::SolType>::type_check(token) } + #[inline] fn detokenize(token: Self::Token<'_>) -> Self::RustType { - as alloy_sol_types::SolType>::detokenize(token) + as alloy_sol_types::SolType>::detokenize(token) } } #[automatically_derived] @@ -135,6 +138,7 @@ pub mod Enum { 8, > as alloy_sol_types::EventTopic>::topic_preimage_length(rust) } + #[inline] fn encode_topic_preimage( rust: &Self::RustType, @@ -144,38 +148,40 @@ pub mod Enum { 8, > as alloy_sol_types::EventTopic>::encode_topic_preimage(rust, out) } + #[inline] - fn encode_topic( - rust: &Self::RustType, - ) -> alloy_sol_types::abi::token::WordToken { - as alloy_sol_types::EventTopic>::encode_topic(rust) + fn encode_topic(rust: &Self::RustType) -> alloy_sol_types::abi::token::WordToken { + as alloy_sol_types::EventTopic>::encode_topic( + rust, + ) } } }; - use alloy_contract as alloy_contract; + use alloy_contract; /**Creates a new wrapper around an on-chain [`Enum`](self) contract instance. -See the [wrapper's documentation](`EnumInstance`) for more details.*/ + See the [wrapper's documentation](`EnumInstance`) 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) -> EnumInstance { + >( + address: alloy_sol_types::private::Address, + __provider: P, + ) -> EnumInstance { EnumInstance::::new(address, __provider) } /**A [`Enum`](self) instance. -Contains type-safe methods for interacting with an on-chain instance of the -[`Enum`](self) contract located at a given `address`, using a given -provider `P`. + Contains type-safe methods for interacting with an on-chain instance of the + [`Enum`](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. + 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.*/ + See the [module-level documentation](self) for all the available methods.*/ #[derive(Clone)] pub struct EnumInstance { address: alloy_sol_types::private::Address, @@ -190,39 +196,39 @@ See the [module-level documentation](self) for all the available methods.*/ } } /// Instantiation and getters/setters. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > EnumInstance { + impl, N: alloy_contract::private::Network> + EnumInstance + { /**Creates a new wrapper around an on-chain [`Enum`](self) contract instance. -See the [wrapper's documentation](`EnumInstance`) for more details.*/ + See the [wrapper's documentation](`EnumInstance`) for more details.*/ #[inline] - pub const fn new( - address: alloy_sol_types::private::Address, - __provider: P, - ) -> Self { + pub const fn new(address: alloy_sol_types::private::Address, __provider: P) -> Self { Self { address, provider: __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 { @@ -230,7 +236,8 @@ See the [wrapper's documentation](`EnumInstance`) for more details.*/ } } impl EnumInstance<&P, N> { - /// Clones the provider and returns a new instance with the cloned provider. + /// Clones the provider and returns a new instance with the cloned + /// provider. #[inline] pub fn with_cloned_provider(self) -> EnumInstance { EnumInstance { @@ -241,14 +248,15 @@ See the [wrapper's documentation](`EnumInstance`) for more details.*/ } } /// Function calls. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > EnumInstance { - /// Creates a new call builder using this contract instance's provider and address. + impl, N: alloy_contract::private::Network> + EnumInstance + { + /// 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. + /// 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, @@ -257,14 +265,15 @@ See the [wrapper's documentation](`EnumInstance`) for more details.*/ } } /// Event filters. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > EnumInstance { - /// Creates a new event filter using this contract instance's provider and address. + impl, N: alloy_contract::private::Network> + EnumInstance + { + /// 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. + /// 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> { @@ -731,8 +740,7 @@ interface GnosisSafe { clippy::empty_structs_with_brackets )] pub mod GnosisSafe { - use super::*; - use alloy_sol_types as alloy_sol_types; + use {super::*, alloy_sol_types}; /// The creation / init bytecode of the contract. /// /// ```text @@ -745,9 +753,9 @@ pub mod GnosisSafe { ); #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Event with signature `AddedOwner(address)` and selector `0x9465fa0c962cc76958e6373a993326400c1c94f8be2fe3a952adfa7f60b2ea26`. -```solidity -event AddedOwner(address owner); -```*/ + ```solidity + event AddedOwner(address owner); + ```*/ #[allow( non_camel_case_types, non_snake_case, @@ -766,21 +774,22 @@ event AddedOwner(address owner); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[automatically_derived] impl alloy_sol_types::SolEvent for AddedOwner { + type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; 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 = "AddedOwner(address)"; - const SIGNATURE_HASH: alloy_sol_types::private::B256 = alloy_sol_types::private::B256::new([ - 148u8, 101u8, 250u8, 12u8, 150u8, 44u8, 199u8, 105u8, 88u8, 230u8, 55u8, - 58u8, 153u8, 51u8, 38u8, 64u8, 12u8, 28u8, 148u8, 248u8, 190u8, 47u8, - 227u8, 169u8, 82u8, 173u8, 250u8, 127u8, 96u8, 178u8, 234u8, 38u8, - ]); + const ANONYMOUS: bool = false; + const SIGNATURE: &'static str = "AddedOwner(address)"; + const SIGNATURE_HASH: alloy_sol_types::private::B256 = + alloy_sol_types::private::B256::new([ + 148u8, 101u8, 250u8, 12u8, 150u8, 44u8, 199u8, 105u8, 88u8, 230u8, 55u8, 58u8, + 153u8, 51u8, 38u8, 64u8, 12u8, 28u8, 148u8, 248u8, 190u8, 47u8, 227u8, 169u8, + 82u8, 173u8, 250u8, 127u8, 96u8, 178u8, 234u8, 38u8, + ]); + #[allow(unused_variables)] #[inline] fn new( @@ -789,21 +798,21 @@ event AddedOwner(address owner); ) -> Self { Self { owner: 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, - ), - ); + 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<'_> { ( @@ -812,10 +821,12 @@ event AddedOwner(address owner); ), ) } + #[inline] fn topics(&self) -> ::RustType { (Self::SIGNATURE_HASH.into(),) } + #[inline] fn encode_topics_raw( &self, @@ -824,9 +835,7 @@ event AddedOwner(address owner); if out.len() < ::COUNT { return Err(alloy_sol_types::Error::Overrun); } - out[0usize] = alloy_sol_types::abi::token::WordToken( - Self::SIGNATURE_HASH, - ); + out[0usize] = alloy_sol_types::abi::token::WordToken(Self::SIGNATURE_HASH); Ok(()) } } @@ -835,6 +844,7 @@ event AddedOwner(address owner); 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) } @@ -849,9 +859,9 @@ event AddedOwner(address owner); }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Event with signature `ApproveHash(bytes32,address)` and selector `0xf2a0eb156472d1440255b0d7c1e19cc07115d1051fe605b0dce69acfec884d9c`. -```solidity -event ApproveHash(bytes32 indexed approvedHash, address indexed owner); -```*/ + ```solidity + event ApproveHash(bytes32 indexed approvedHash, address indexed owner); + ```*/ #[allow( non_camel_case_types, non_snake_case, @@ -872,25 +882,26 @@ event ApproveHash(bytes32 indexed approvedHash, address indexed owner); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[automatically_derived] impl alloy_sol_types::SolEvent for ApproveHash { + type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; 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, ); - const SIGNATURE: &'static str = "ApproveHash(bytes32,address)"; - const SIGNATURE_HASH: alloy_sol_types::private::B256 = alloy_sol_types::private::B256::new([ - 242u8, 160u8, 235u8, 21u8, 100u8, 114u8, 209u8, 68u8, 2u8, 85u8, 176u8, - 215u8, 193u8, 225u8, 156u8, 192u8, 113u8, 21u8, 209u8, 5u8, 31u8, 230u8, - 5u8, 176u8, 220u8, 230u8, 154u8, 207u8, 236u8, 136u8, 77u8, 156u8, - ]); + const ANONYMOUS: bool = false; + const SIGNATURE: &'static str = "ApproveHash(bytes32,address)"; + const SIGNATURE_HASH: alloy_sol_types::private::B256 = + alloy_sol_types::private::B256::new([ + 242u8, 160u8, 235u8, 21u8, 100u8, 114u8, 209u8, 68u8, 2u8, 85u8, 176u8, 215u8, + 193u8, 225u8, 156u8, 192u8, 113u8, 21u8, 209u8, 5u8, 31u8, 230u8, 5u8, 176u8, + 220u8, 230u8, 154u8, 207u8, 236u8, 136u8, 77u8, 156u8, + ]); + #[allow(unused_variables)] #[inline] fn new( @@ -902,25 +913,26 @@ event ApproveHash(bytes32 indexed approvedHash, address indexed owner); owner: topics.2, } } + #[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, - ), - ); + 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 { ( @@ -929,6 +941,7 @@ event ApproveHash(bytes32 indexed approvedHash, address indexed owner); self.owner.clone(), ) } + #[inline] fn encode_topics_raw( &self, @@ -937,9 +950,7 @@ event ApproveHash(bytes32 indexed approvedHash, address indexed owner); if out.len() < ::COUNT { return Err(alloy_sol_types::Error::Overrun); } - out[0usize] = alloy_sol_types::abi::token::WordToken( - Self::SIGNATURE_HASH, - ); + out[0usize] = alloy_sol_types::abi::token::WordToken(Self::SIGNATURE_HASH); out[1usize] = as alloy_sol_types::EventTopic>::encode_topic(&self.approvedHash); @@ -954,6 +965,7 @@ event ApproveHash(bytes32 indexed approvedHash, address indexed owner); 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) } @@ -968,9 +980,9 @@ event ApproveHash(bytes32 indexed approvedHash, address indexed owner); }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Event with signature `ChangedFallbackHandler(address)` and selector `0x5ac6c46c93c8d0e53714ba3b53db3e7c046da994313d7ed0d192028bc7c228b0`. -```solidity -event ChangedFallbackHandler(address handler); -```*/ + ```solidity + event ChangedFallbackHandler(address handler); + ```*/ #[allow( non_camel_case_types, non_snake_case, @@ -989,21 +1001,22 @@ event ChangedFallbackHandler(address handler); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[automatically_derived] impl alloy_sol_types::SolEvent for ChangedFallbackHandler { + type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; 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 = "ChangedFallbackHandler(address)"; - const SIGNATURE_HASH: alloy_sol_types::private::B256 = alloy_sol_types::private::B256::new([ - 90u8, 198u8, 196u8, 108u8, 147u8, 200u8, 208u8, 229u8, 55u8, 20u8, 186u8, - 59u8, 83u8, 219u8, 62u8, 124u8, 4u8, 109u8, 169u8, 148u8, 49u8, 61u8, - 126u8, 208u8, 209u8, 146u8, 2u8, 139u8, 199u8, 194u8, 40u8, 176u8, - ]); + const ANONYMOUS: bool = false; + const SIGNATURE: &'static str = "ChangedFallbackHandler(address)"; + const SIGNATURE_HASH: alloy_sol_types::private::B256 = + alloy_sol_types::private::B256::new([ + 90u8, 198u8, 196u8, 108u8, 147u8, 200u8, 208u8, 229u8, 55u8, 20u8, 186u8, 59u8, + 83u8, 219u8, 62u8, 124u8, 4u8, 109u8, 169u8, 148u8, 49u8, 61u8, 126u8, 208u8, + 209u8, 146u8, 2u8, 139u8, 199u8, 194u8, 40u8, 176u8, + ]); + #[allow(unused_variables)] #[inline] fn new( @@ -1012,21 +1025,21 @@ event ChangedFallbackHandler(address handler); ) -> Self { Self { handler: 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, - ), - ); + 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<'_> { ( @@ -1035,10 +1048,12 @@ event ChangedFallbackHandler(address handler); ), ) } + #[inline] fn topics(&self) -> ::RustType { (Self::SIGNATURE_HASH.into(),) } + #[inline] fn encode_topics_raw( &self, @@ -1047,9 +1062,7 @@ event ChangedFallbackHandler(address handler); if out.len() < ::COUNT { return Err(alloy_sol_types::Error::Overrun); } - out[0usize] = alloy_sol_types::abi::token::WordToken( - Self::SIGNATURE_HASH, - ); + out[0usize] = alloy_sol_types::abi::token::WordToken(Self::SIGNATURE_HASH); Ok(()) } } @@ -1058,6 +1071,7 @@ event ChangedFallbackHandler(address handler); 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) } @@ -1072,9 +1086,9 @@ event ChangedFallbackHandler(address handler); }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Event with signature `ChangedGuard(address)` and selector `0x1151116914515bc0891ff9047a6cb32cf902546f83066499bcf8ba33d2353fa2`. -```solidity -event ChangedGuard(address guard); -```*/ + ```solidity + event ChangedGuard(address guard); + ```*/ #[allow( non_camel_case_types, non_snake_case, @@ -1093,21 +1107,22 @@ event ChangedGuard(address guard); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[automatically_derived] impl alloy_sol_types::SolEvent for ChangedGuard { + type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; 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 = "ChangedGuard(address)"; - const SIGNATURE_HASH: alloy_sol_types::private::B256 = alloy_sol_types::private::B256::new([ - 17u8, 81u8, 17u8, 105u8, 20u8, 81u8, 91u8, 192u8, 137u8, 31u8, 249u8, - 4u8, 122u8, 108u8, 179u8, 44u8, 249u8, 2u8, 84u8, 111u8, 131u8, 6u8, - 100u8, 153u8, 188u8, 248u8, 186u8, 51u8, 210u8, 53u8, 63u8, 162u8, - ]); + const ANONYMOUS: bool = false; + const SIGNATURE: &'static str = "ChangedGuard(address)"; + const SIGNATURE_HASH: alloy_sol_types::private::B256 = + alloy_sol_types::private::B256::new([ + 17u8, 81u8, 17u8, 105u8, 20u8, 81u8, 91u8, 192u8, 137u8, 31u8, 249u8, 4u8, + 122u8, 108u8, 179u8, 44u8, 249u8, 2u8, 84u8, 111u8, 131u8, 6u8, 100u8, 153u8, + 188u8, 248u8, 186u8, 51u8, 210u8, 53u8, 63u8, 162u8, + ]); + #[allow(unused_variables)] #[inline] fn new( @@ -1116,21 +1131,21 @@ event ChangedGuard(address guard); ) -> Self { Self { guard: 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, - ), - ); + 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<'_> { ( @@ -1139,10 +1154,12 @@ event ChangedGuard(address guard); ), ) } + #[inline] fn topics(&self) -> ::RustType { (Self::SIGNATURE_HASH.into(),) } + #[inline] fn encode_topics_raw( &self, @@ -1151,9 +1168,7 @@ event ChangedGuard(address guard); if out.len() < ::COUNT { return Err(alloy_sol_types::Error::Overrun); } - out[0usize] = alloy_sol_types::abi::token::WordToken( - Self::SIGNATURE_HASH, - ); + out[0usize] = alloy_sol_types::abi::token::WordToken(Self::SIGNATURE_HASH); Ok(()) } } @@ -1162,6 +1177,7 @@ event ChangedGuard(address guard); 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) } @@ -1176,9 +1192,9 @@ event ChangedGuard(address guard); }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Event with signature `ChangedThreshold(uint256)` and selector `0x610f7ff2b304ae8903c3de74c60c6ab1f7d6226b3f52c5161905bb5ad4039c93`. -```solidity -event ChangedThreshold(uint256 threshold); -```*/ + ```solidity + event ChangedThreshold(uint256 threshold); + ```*/ #[allow( non_camel_case_types, non_snake_case, @@ -1197,21 +1213,22 @@ event ChangedThreshold(uint256 threshold); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[automatically_derived] impl alloy_sol_types::SolEvent for ChangedThreshold { + type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; 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>,); - const SIGNATURE: &'static str = "ChangedThreshold(uint256)"; - const SIGNATURE_HASH: alloy_sol_types::private::B256 = alloy_sol_types::private::B256::new([ - 97u8, 15u8, 127u8, 242u8, 179u8, 4u8, 174u8, 137u8, 3u8, 195u8, 222u8, - 116u8, 198u8, 12u8, 106u8, 177u8, 247u8, 214u8, 34u8, 107u8, 63u8, 82u8, - 197u8, 22u8, 25u8, 5u8, 187u8, 90u8, 212u8, 3u8, 156u8, 147u8, - ]); + const ANONYMOUS: bool = false; + const SIGNATURE: &'static str = "ChangedThreshold(uint256)"; + const SIGNATURE_HASH: alloy_sol_types::private::B256 = + alloy_sol_types::private::B256::new([ + 97u8, 15u8, 127u8, 242u8, 179u8, 4u8, 174u8, 137u8, 3u8, 195u8, 222u8, 116u8, + 198u8, 12u8, 106u8, 177u8, 247u8, 214u8, 34u8, 107u8, 63u8, 82u8, 197u8, 22u8, + 25u8, 5u8, 187u8, 90u8, 212u8, 3u8, 156u8, 147u8, + ]); + #[allow(unused_variables)] #[inline] fn new( @@ -1220,33 +1237,35 @@ event ChangedThreshold(uint256 threshold); ) -> Self { Self { threshold: 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, - ), - ); + 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.threshold), + as alloy_sol_types::SolType>::tokenize( + &self.threshold, + ), ) } + #[inline] fn topics(&self) -> ::RustType { (Self::SIGNATURE_HASH.into(),) } + #[inline] fn encode_topics_raw( &self, @@ -1255,9 +1274,7 @@ event ChangedThreshold(uint256 threshold); if out.len() < ::COUNT { return Err(alloy_sol_types::Error::Overrun); } - out[0usize] = alloy_sol_types::abi::token::WordToken( - Self::SIGNATURE_HASH, - ); + out[0usize] = alloy_sol_types::abi::token::WordToken(Self::SIGNATURE_HASH); Ok(()) } } @@ -1266,6 +1283,7 @@ event ChangedThreshold(uint256 threshold); 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) } @@ -1280,9 +1298,9 @@ event ChangedThreshold(uint256 threshold); }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Event with signature `DisabledModule(address)` and selector `0xaab4fa2b463f581b2b32cb3b7e3b704b9ce37cc209b5fb4d77e593ace4054276`. -```solidity -event DisabledModule(address module); -```*/ + ```solidity + event DisabledModule(address module); + ```*/ #[allow( non_camel_case_types, non_snake_case, @@ -1301,21 +1319,22 @@ event DisabledModule(address module); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[automatically_derived] impl alloy_sol_types::SolEvent for DisabledModule { + type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; 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 = "DisabledModule(address)"; - const SIGNATURE_HASH: alloy_sol_types::private::B256 = alloy_sol_types::private::B256::new([ - 170u8, 180u8, 250u8, 43u8, 70u8, 63u8, 88u8, 27u8, 43u8, 50u8, 203u8, - 59u8, 126u8, 59u8, 112u8, 75u8, 156u8, 227u8, 124u8, 194u8, 9u8, 181u8, - 251u8, 77u8, 119u8, 229u8, 147u8, 172u8, 228u8, 5u8, 66u8, 118u8, - ]); + const ANONYMOUS: bool = false; + const SIGNATURE: &'static str = "DisabledModule(address)"; + const SIGNATURE_HASH: alloy_sol_types::private::B256 = + alloy_sol_types::private::B256::new([ + 170u8, 180u8, 250u8, 43u8, 70u8, 63u8, 88u8, 27u8, 43u8, 50u8, 203u8, 59u8, + 126u8, 59u8, 112u8, 75u8, 156u8, 227u8, 124u8, 194u8, 9u8, 181u8, 251u8, 77u8, + 119u8, 229u8, 147u8, 172u8, 228u8, 5u8, 66u8, 118u8, + ]); + #[allow(unused_variables)] #[inline] fn new( @@ -1324,21 +1343,21 @@ event DisabledModule(address module); ) -> Self { Self { module: 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, - ), - ); + 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<'_> { ( @@ -1347,10 +1366,12 @@ event DisabledModule(address module); ), ) } + #[inline] fn topics(&self) -> ::RustType { (Self::SIGNATURE_HASH.into(),) } + #[inline] fn encode_topics_raw( &self, @@ -1359,9 +1380,7 @@ event DisabledModule(address module); if out.len() < ::COUNT { return Err(alloy_sol_types::Error::Overrun); } - out[0usize] = alloy_sol_types::abi::token::WordToken( - Self::SIGNATURE_HASH, - ); + out[0usize] = alloy_sol_types::abi::token::WordToken(Self::SIGNATURE_HASH); Ok(()) } } @@ -1370,6 +1389,7 @@ event DisabledModule(address module); 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) } @@ -1384,9 +1404,9 @@ event DisabledModule(address module); }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Event with signature `EnabledModule(address)` and selector `0xecdf3a3effea5783a3c4c2140e677577666428d44ed9d474a0b3a4c9943f8440`. -```solidity -event EnabledModule(address module); -```*/ + ```solidity + event EnabledModule(address module); + ```*/ #[allow( non_camel_case_types, non_snake_case, @@ -1405,21 +1425,22 @@ event EnabledModule(address module); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[automatically_derived] impl alloy_sol_types::SolEvent for EnabledModule { + type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; 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 = "EnabledModule(address)"; - const SIGNATURE_HASH: alloy_sol_types::private::B256 = alloy_sol_types::private::B256::new([ - 236u8, 223u8, 58u8, 62u8, 255u8, 234u8, 87u8, 131u8, 163u8, 196u8, 194u8, - 20u8, 14u8, 103u8, 117u8, 119u8, 102u8, 100u8, 40u8, 212u8, 78u8, 217u8, - 212u8, 116u8, 160u8, 179u8, 164u8, 201u8, 148u8, 63u8, 132u8, 64u8, - ]); + const ANONYMOUS: bool = false; + const SIGNATURE: &'static str = "EnabledModule(address)"; + const SIGNATURE_HASH: alloy_sol_types::private::B256 = + alloy_sol_types::private::B256::new([ + 236u8, 223u8, 58u8, 62u8, 255u8, 234u8, 87u8, 131u8, 163u8, 196u8, 194u8, 20u8, + 14u8, 103u8, 117u8, 119u8, 102u8, 100u8, 40u8, 212u8, 78u8, 217u8, 212u8, + 116u8, 160u8, 179u8, 164u8, 201u8, 148u8, 63u8, 132u8, 64u8, + ]); + #[allow(unused_variables)] #[inline] fn new( @@ -1428,21 +1449,21 @@ event EnabledModule(address module); ) -> Self { Self { module: 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, - ), - ); + 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<'_> { ( @@ -1451,10 +1472,12 @@ event EnabledModule(address module); ), ) } + #[inline] fn topics(&self) -> ::RustType { (Self::SIGNATURE_HASH.into(),) } + #[inline] fn encode_topics_raw( &self, @@ -1463,9 +1486,7 @@ event EnabledModule(address module); if out.len() < ::COUNT { return Err(alloy_sol_types::Error::Overrun); } - out[0usize] = alloy_sol_types::abi::token::WordToken( - Self::SIGNATURE_HASH, - ); + out[0usize] = alloy_sol_types::abi::token::WordToken(Self::SIGNATURE_HASH); Ok(()) } } @@ -1474,6 +1495,7 @@ event EnabledModule(address module); 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) } @@ -1488,9 +1510,9 @@ event EnabledModule(address module); }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Event with signature `ExecutionFailure(bytes32,uint256)` and selector `0x23428b18acfb3ea64b08dc0c1d296ea9c09702c09083ca5272e64d115b687d23`. -```solidity -event ExecutionFailure(bytes32 txHash, uint256 payment); -```*/ + ```solidity + event ExecutionFailure(bytes32 txHash, uint256 payment); + ```*/ #[allow( non_camel_case_types, non_snake_case, @@ -1511,24 +1533,25 @@ event ExecutionFailure(bytes32 txHash, uint256 payment); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[automatically_derived] impl alloy_sol_types::SolEvent for ExecutionFailure { + type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type DataTuple<'a> = ( alloy_sol_types::sol_data::FixedBytes<32>, 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>,); - const SIGNATURE: &'static str = "ExecutionFailure(bytes32,uint256)"; - const SIGNATURE_HASH: alloy_sol_types::private::B256 = alloy_sol_types::private::B256::new([ - 35u8, 66u8, 139u8, 24u8, 172u8, 251u8, 62u8, 166u8, 75u8, 8u8, 220u8, - 12u8, 29u8, 41u8, 110u8, 169u8, 192u8, 151u8, 2u8, 192u8, 144u8, 131u8, - 202u8, 82u8, 114u8, 230u8, 77u8, 17u8, 91u8, 104u8, 125u8, 35u8, - ]); + const ANONYMOUS: bool = false; + const SIGNATURE: &'static str = "ExecutionFailure(bytes32,uint256)"; + const SIGNATURE_HASH: alloy_sol_types::private::B256 = + alloy_sol_types::private::B256::new([ + 35u8, 66u8, 139u8, 24u8, 172u8, 251u8, 62u8, 166u8, 75u8, 8u8, 220u8, 12u8, + 29u8, 41u8, 110u8, 169u8, 192u8, 151u8, 2u8, 192u8, 144u8, 131u8, 202u8, 82u8, + 114u8, 230u8, 77u8, 17u8, 91u8, 104u8, 125u8, 35u8, + ]); + #[allow(unused_variables)] #[inline] fn new( @@ -1540,21 +1563,21 @@ event ExecutionFailure(bytes32 txHash, uint256 payment); payment: 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, - ), - ); + 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<'_> { ( @@ -1566,10 +1589,12 @@ event ExecutionFailure(bytes32 txHash, uint256 payment); > as alloy_sol_types::SolType>::tokenize(&self.payment), ) } + #[inline] fn topics(&self) -> ::RustType { (Self::SIGNATURE_HASH.into(),) } + #[inline] fn encode_topics_raw( &self, @@ -1578,9 +1603,7 @@ event ExecutionFailure(bytes32 txHash, uint256 payment); if out.len() < ::COUNT { return Err(alloy_sol_types::Error::Overrun); } - out[0usize] = alloy_sol_types::abi::token::WordToken( - Self::SIGNATURE_HASH, - ); + out[0usize] = alloy_sol_types::abi::token::WordToken(Self::SIGNATURE_HASH); Ok(()) } } @@ -1589,6 +1612,7 @@ event ExecutionFailure(bytes32 txHash, uint256 payment); 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) } @@ -1603,9 +1627,9 @@ event ExecutionFailure(bytes32 txHash, uint256 payment); }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Event with signature `ExecutionFromModuleFailure(address)` and selector `0xacd2c8702804128fdb0db2bb49f6d127dd0181c13fd45dbfe16de0930e2bd375`. -```solidity -event ExecutionFromModuleFailure(address indexed module); -```*/ + ```solidity + event ExecutionFromModuleFailure(address indexed module); + ```*/ #[allow( non_camel_case_types, non_snake_case, @@ -1624,24 +1648,25 @@ event ExecutionFromModuleFailure(address indexed module); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[automatically_derived] impl alloy_sol_types::SolEvent for ExecutionFromModuleFailure { + type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; 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::Address, ); - const SIGNATURE: &'static str = "ExecutionFromModuleFailure(address)"; - const SIGNATURE_HASH: alloy_sol_types::private::B256 = alloy_sol_types::private::B256::new([ - 172u8, 210u8, 200u8, 112u8, 40u8, 4u8, 18u8, 143u8, 219u8, 13u8, 178u8, - 187u8, 73u8, 246u8, 209u8, 39u8, 221u8, 1u8, 129u8, 193u8, 63u8, 212u8, - 93u8, 191u8, 225u8, 109u8, 224u8, 147u8, 14u8, 43u8, 211u8, 117u8, - ]); + const ANONYMOUS: bool = false; + const SIGNATURE: &'static str = "ExecutionFromModuleFailure(address)"; + const SIGNATURE_HASH: alloy_sol_types::private::B256 = + alloy_sol_types::private::B256::new([ + 172u8, 210u8, 200u8, 112u8, 40u8, 4u8, 18u8, 143u8, 219u8, 13u8, 178u8, 187u8, + 73u8, 246u8, 209u8, 39u8, 221u8, 1u8, 129u8, 193u8, 63u8, 212u8, 93u8, 191u8, + 225u8, 109u8, 224u8, 147u8, 14u8, 43u8, 211u8, 117u8, + ]); + #[allow(unused_variables)] #[inline] fn new( @@ -1650,29 +1675,31 @@ event ExecutionFromModuleFailure(address indexed module); ) -> Self { Self { module: topics.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, - ), - ); + 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.module.clone()) } + #[inline] fn encode_topics_raw( &self, @@ -1681,9 +1708,7 @@ event ExecutionFromModuleFailure(address indexed module); if out.len() < ::COUNT { return Err(alloy_sol_types::Error::Overrun); } - out[0usize] = alloy_sol_types::abi::token::WordToken( - Self::SIGNATURE_HASH, - ); + out[0usize] = alloy_sol_types::abi::token::WordToken(Self::SIGNATURE_HASH); out[1usize] = ::encode_topic( &self.module, ); @@ -1695,6 +1720,7 @@ event ExecutionFromModuleFailure(address indexed module); 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) } @@ -1702,18 +1728,16 @@ event ExecutionFromModuleFailure(address indexed module); #[automatically_derived] impl From<&ExecutionFromModuleFailure> for alloy_sol_types::private::LogData { #[inline] - fn from( - this: &ExecutionFromModuleFailure, - ) -> alloy_sol_types::private::LogData { + fn from(this: &ExecutionFromModuleFailure) -> alloy_sol_types::private::LogData { alloy_sol_types::SolEvent::encode_log_data(this) } } }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Event with signature `ExecutionFromModuleSuccess(address)` and selector `0x6895c13664aa4f67288b25d7a21d7aaa34916e355fb9b6fae0a139a9085becb8`. -```solidity -event ExecutionFromModuleSuccess(address indexed module); -```*/ + ```solidity + event ExecutionFromModuleSuccess(address indexed module); + ```*/ #[allow( non_camel_case_types, non_snake_case, @@ -1732,24 +1756,25 @@ event ExecutionFromModuleSuccess(address indexed module); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[automatically_derived] impl alloy_sol_types::SolEvent for ExecutionFromModuleSuccess { + type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; 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::Address, ); - const SIGNATURE: &'static str = "ExecutionFromModuleSuccess(address)"; - const SIGNATURE_HASH: alloy_sol_types::private::B256 = alloy_sol_types::private::B256::new([ - 104u8, 149u8, 193u8, 54u8, 100u8, 170u8, 79u8, 103u8, 40u8, 139u8, 37u8, - 215u8, 162u8, 29u8, 122u8, 170u8, 52u8, 145u8, 110u8, 53u8, 95u8, 185u8, - 182u8, 250u8, 224u8, 161u8, 57u8, 169u8, 8u8, 91u8, 236u8, 184u8, - ]); + const ANONYMOUS: bool = false; + const SIGNATURE: &'static str = "ExecutionFromModuleSuccess(address)"; + const SIGNATURE_HASH: alloy_sol_types::private::B256 = + alloy_sol_types::private::B256::new([ + 104u8, 149u8, 193u8, 54u8, 100u8, 170u8, 79u8, 103u8, 40u8, 139u8, 37u8, 215u8, + 162u8, 29u8, 122u8, 170u8, 52u8, 145u8, 110u8, 53u8, 95u8, 185u8, 182u8, 250u8, + 224u8, 161u8, 57u8, 169u8, 8u8, 91u8, 236u8, 184u8, + ]); + #[allow(unused_variables)] #[inline] fn new( @@ -1758,29 +1783,31 @@ event ExecutionFromModuleSuccess(address indexed module); ) -> Self { Self { module: topics.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, - ), - ); + 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.module.clone()) } + #[inline] fn encode_topics_raw( &self, @@ -1789,9 +1816,7 @@ event ExecutionFromModuleSuccess(address indexed module); if out.len() < ::COUNT { return Err(alloy_sol_types::Error::Overrun); } - out[0usize] = alloy_sol_types::abi::token::WordToken( - Self::SIGNATURE_HASH, - ); + out[0usize] = alloy_sol_types::abi::token::WordToken(Self::SIGNATURE_HASH); out[1usize] = ::encode_topic( &self.module, ); @@ -1803,6 +1828,7 @@ event ExecutionFromModuleSuccess(address indexed module); 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) } @@ -1810,18 +1836,16 @@ event ExecutionFromModuleSuccess(address indexed module); #[automatically_derived] impl From<&ExecutionFromModuleSuccess> for alloy_sol_types::private::LogData { #[inline] - fn from( - this: &ExecutionFromModuleSuccess, - ) -> alloy_sol_types::private::LogData { + fn from(this: &ExecutionFromModuleSuccess) -> alloy_sol_types::private::LogData { alloy_sol_types::SolEvent::encode_log_data(this) } } }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Event with signature `ExecutionSuccess(bytes32,uint256)` and selector `0x442e715f626346e8c54381002da614f62bee8d27386535b2521ec8540898556e`. -```solidity -event ExecutionSuccess(bytes32 txHash, uint256 payment); -```*/ + ```solidity + event ExecutionSuccess(bytes32 txHash, uint256 payment); + ```*/ #[allow( non_camel_case_types, non_snake_case, @@ -1842,24 +1866,25 @@ event ExecutionSuccess(bytes32 txHash, uint256 payment); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[automatically_derived] impl alloy_sol_types::SolEvent for ExecutionSuccess { + type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type DataTuple<'a> = ( alloy_sol_types::sol_data::FixedBytes<32>, 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>,); - const SIGNATURE: &'static str = "ExecutionSuccess(bytes32,uint256)"; - const SIGNATURE_HASH: alloy_sol_types::private::B256 = alloy_sol_types::private::B256::new([ - 68u8, 46u8, 113u8, 95u8, 98u8, 99u8, 70u8, 232u8, 197u8, 67u8, 129u8, - 0u8, 45u8, 166u8, 20u8, 246u8, 43u8, 238u8, 141u8, 39u8, 56u8, 101u8, - 53u8, 178u8, 82u8, 30u8, 200u8, 84u8, 8u8, 152u8, 85u8, 110u8, - ]); + const ANONYMOUS: bool = false; + const SIGNATURE: &'static str = "ExecutionSuccess(bytes32,uint256)"; + const SIGNATURE_HASH: alloy_sol_types::private::B256 = + alloy_sol_types::private::B256::new([ + 68u8, 46u8, 113u8, 95u8, 98u8, 99u8, 70u8, 232u8, 197u8, 67u8, 129u8, 0u8, + 45u8, 166u8, 20u8, 246u8, 43u8, 238u8, 141u8, 39u8, 56u8, 101u8, 53u8, 178u8, + 82u8, 30u8, 200u8, 84u8, 8u8, 152u8, 85u8, 110u8, + ]); + #[allow(unused_variables)] #[inline] fn new( @@ -1871,21 +1896,21 @@ event ExecutionSuccess(bytes32 txHash, uint256 payment); payment: 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, - ), - ); + 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<'_> { ( @@ -1897,10 +1922,12 @@ event ExecutionSuccess(bytes32 txHash, uint256 payment); > as alloy_sol_types::SolType>::tokenize(&self.payment), ) } + #[inline] fn topics(&self) -> ::RustType { (Self::SIGNATURE_HASH.into(),) } + #[inline] fn encode_topics_raw( &self, @@ -1909,9 +1936,7 @@ event ExecutionSuccess(bytes32 txHash, uint256 payment); if out.len() < ::COUNT { return Err(alloy_sol_types::Error::Overrun); } - out[0usize] = alloy_sol_types::abi::token::WordToken( - Self::SIGNATURE_HASH, - ); + out[0usize] = alloy_sol_types::abi::token::WordToken(Self::SIGNATURE_HASH); Ok(()) } } @@ -1920,6 +1945,7 @@ event ExecutionSuccess(bytes32 txHash, uint256 payment); 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) } @@ -1934,9 +1960,9 @@ event ExecutionSuccess(bytes32 txHash, uint256 payment); }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Event with signature `RemovedOwner(address)` and selector `0xf8d49fc529812e9a7c5c50e69c20f0dccc0db8fa95c98bc58cc9a4f1c1299eaf`. -```solidity -event RemovedOwner(address owner); -```*/ + ```solidity + event RemovedOwner(address owner); + ```*/ #[allow( non_camel_case_types, non_snake_case, @@ -1955,22 +1981,22 @@ event RemovedOwner(address owner); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[automatically_derived] impl alloy_sol_types::SolEvent for RemovedOwner { + type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; 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 = "RemovedOwner(address)"; - const SIGNATURE_HASH: alloy_sol_types::private::B256 = alloy_sol_types::private::B256::new([ - 248u8, 212u8, 159u8, 197u8, 41u8, 129u8, 46u8, 154u8, 124u8, 92u8, 80u8, - 230u8, 156u8, 32u8, 240u8, 220u8, 204u8, 13u8, 184u8, 250u8, 149u8, - 201u8, 139u8, 197u8, 140u8, 201u8, 164u8, 241u8, 193u8, 41u8, 158u8, - 175u8, - ]); + const ANONYMOUS: bool = false; + const SIGNATURE: &'static str = "RemovedOwner(address)"; + const SIGNATURE_HASH: alloy_sol_types::private::B256 = + alloy_sol_types::private::B256::new([ + 248u8, 212u8, 159u8, 197u8, 41u8, 129u8, 46u8, 154u8, 124u8, 92u8, 80u8, 230u8, + 156u8, 32u8, 240u8, 220u8, 204u8, 13u8, 184u8, 250u8, 149u8, 201u8, 139u8, + 197u8, 140u8, 201u8, 164u8, 241u8, 193u8, 41u8, 158u8, 175u8, + ]); + #[allow(unused_variables)] #[inline] fn new( @@ -1979,21 +2005,21 @@ event RemovedOwner(address owner); ) -> Self { Self { owner: 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, - ), - ); + 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<'_> { ( @@ -2002,10 +2028,12 @@ event RemovedOwner(address owner); ), ) } + #[inline] fn topics(&self) -> ::RustType { (Self::SIGNATURE_HASH.into(),) } + #[inline] fn encode_topics_raw( &self, @@ -2014,9 +2042,7 @@ event RemovedOwner(address owner); if out.len() < ::COUNT { return Err(alloy_sol_types::Error::Overrun); } - out[0usize] = alloy_sol_types::abi::token::WordToken( - Self::SIGNATURE_HASH, - ); + out[0usize] = alloy_sol_types::abi::token::WordToken(Self::SIGNATURE_HASH); Ok(()) } } @@ -2025,6 +2051,7 @@ event RemovedOwner(address owner); 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) } @@ -2039,9 +2066,9 @@ event RemovedOwner(address owner); }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Event with signature `SafeReceived(address,uint256)` and selector `0x3d0ce9bfc3ed7d6862dbb28b2dea94561fe714a1b4d019aa8af39730d1ad7c3d`. -```solidity -event SafeReceived(address indexed sender, uint256 value); -```*/ + ```solidity + event SafeReceived(address indexed sender, uint256 value); + ```*/ #[allow( non_camel_case_types, non_snake_case, @@ -2062,24 +2089,25 @@ event SafeReceived(address indexed sender, uint256 value); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[automatically_derived] impl alloy_sol_types::SolEvent for SafeReceived { + type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; 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, ); - const SIGNATURE: &'static str = "SafeReceived(address,uint256)"; - const SIGNATURE_HASH: alloy_sol_types::private::B256 = alloy_sol_types::private::B256::new([ - 61u8, 12u8, 233u8, 191u8, 195u8, 237u8, 125u8, 104u8, 98u8, 219u8, 178u8, - 139u8, 45u8, 234u8, 148u8, 86u8, 31u8, 231u8, 20u8, 161u8, 180u8, 208u8, - 25u8, 170u8, 138u8, 243u8, 151u8, 48u8, 209u8, 173u8, 124u8, 61u8, - ]); + const ANONYMOUS: bool = false; + const SIGNATURE: &'static str = "SafeReceived(address,uint256)"; + const SIGNATURE_HASH: alloy_sol_types::private::B256 = + alloy_sol_types::private::B256::new([ + 61u8, 12u8, 233u8, 191u8, 195u8, 237u8, 125u8, 104u8, 98u8, 219u8, 178u8, + 139u8, 45u8, 234u8, 148u8, 86u8, 31u8, 231u8, 20u8, 161u8, 180u8, 208u8, 25u8, + 170u8, 138u8, 243u8, 151u8, 48u8, 209u8, 173u8, 124u8, 61u8, + ]); + #[allow(unused_variables)] #[inline] fn new( @@ -2091,33 +2119,35 @@ event SafeReceived(address indexed sender, uint256 value); 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, - ), - ); + 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), + as alloy_sol_types::SolType>::tokenize( + &self.value, + ), ) } + #[inline] fn topics(&self) -> ::RustType { (Self::SIGNATURE_HASH.into(), self.sender.clone()) } + #[inline] fn encode_topics_raw( &self, @@ -2126,9 +2156,7 @@ event SafeReceived(address indexed sender, uint256 value); if out.len() < ::COUNT { return Err(alloy_sol_types::Error::Overrun); } - out[0usize] = alloy_sol_types::abi::token::WordToken( - Self::SIGNATURE_HASH, - ); + out[0usize] = alloy_sol_types::abi::token::WordToken(Self::SIGNATURE_HASH); out[1usize] = ::encode_topic( &self.sender, ); @@ -2140,6 +2168,7 @@ event SafeReceived(address indexed sender, uint256 value); 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) } @@ -2154,9 +2183,9 @@ event SafeReceived(address indexed sender, uint256 value); }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Event with signature `SafeSetup(address,address[],uint256,address,address)` and selector `0x141df868a6331af528e38c83b7aa03edc19be66e37ae67f9285bf4f8e3c6a1a8`. -```solidity -event SafeSetup(address indexed initiator, address[] owners, uint256 threshold, address initializer, address fallbackHandler); -```*/ + ```solidity + event SafeSetup(address indexed initiator, address[] owners, uint256 threshold, address initializer, address fallbackHandler); + ```*/ #[allow( non_camel_case_types, non_snake_case, @@ -2183,29 +2212,30 @@ event SafeSetup(address indexed initiator, address[] owners, uint256 threshold, clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[automatically_derived] impl alloy_sol_types::SolEvent for SafeSetup { + type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type DataTuple<'a> = ( alloy_sol_types::sol_data::Array, alloy_sol_types::sol_data::Uint<256>, alloy_sol_types::sol_data::Address, 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::Address, ); - const SIGNATURE: &'static str = "SafeSetup(address,address[],uint256,address,address)"; - const SIGNATURE_HASH: alloy_sol_types::private::B256 = alloy_sol_types::private::B256::new([ - 20u8, 29u8, 248u8, 104u8, 166u8, 51u8, 26u8, 245u8, 40u8, 227u8, 140u8, - 131u8, 183u8, 170u8, 3u8, 237u8, 193u8, 155u8, 230u8, 110u8, 55u8, 174u8, - 103u8, 249u8, 40u8, 91u8, 244u8, 248u8, 227u8, 198u8, 161u8, 168u8, - ]); + const ANONYMOUS: bool = false; + const SIGNATURE: &'static str = "SafeSetup(address,address[],uint256,address,address)"; + const SIGNATURE_HASH: alloy_sol_types::private::B256 = + alloy_sol_types::private::B256::new([ + 20u8, 29u8, 248u8, 104u8, 166u8, 51u8, 26u8, 245u8, 40u8, 227u8, 140u8, 131u8, + 183u8, 170u8, 3u8, 237u8, 193u8, 155u8, 230u8, 110u8, 55u8, 174u8, 103u8, + 249u8, 40u8, 91u8, 244u8, 248u8, 227u8, 198u8, 161u8, 168u8, + ]); + #[allow(unused_variables)] #[inline] fn new( @@ -2220,21 +2250,21 @@ event SafeSetup(address indexed initiator, address[] owners, uint256 threshold, fallbackHandler: data.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, - ), - ); + 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<'_> { ( @@ -2252,10 +2282,12 @@ event SafeSetup(address indexed initiator, address[] owners, uint256 threshold, ), ) } + #[inline] fn topics(&self) -> ::RustType { (Self::SIGNATURE_HASH.into(), self.initiator.clone()) } + #[inline] fn encode_topics_raw( &self, @@ -2264,9 +2296,7 @@ event SafeSetup(address indexed initiator, address[] owners, uint256 threshold, if out.len() < ::COUNT { return Err(alloy_sol_types::Error::Overrun); } - out[0usize] = alloy_sol_types::abi::token::WordToken( - Self::SIGNATURE_HASH, - ); + out[0usize] = alloy_sol_types::abi::token::WordToken(Self::SIGNATURE_HASH); out[1usize] = ::encode_topic( &self.initiator, ); @@ -2278,6 +2308,7 @@ event SafeSetup(address indexed initiator, address[] owners, uint256 threshold, 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) } @@ -2292,9 +2323,9 @@ event SafeSetup(address indexed initiator, address[] owners, uint256 threshold, }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Event with signature `SignMsg(bytes32)` and selector `0xe7f4675038f4f6034dfcbbb24c4dc08e4ebf10eb9d257d3d02c0f38d122ac6e4`. -```solidity -event SignMsg(bytes32 indexed msgHash); -```*/ + ```solidity + event SignMsg(bytes32 indexed msgHash); + ```*/ #[allow( non_camel_case_types, non_snake_case, @@ -2313,24 +2344,25 @@ event SignMsg(bytes32 indexed msgHash); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[automatically_derived] impl alloy_sol_types::SolEvent for SignMsg { + type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; 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>, ); - const SIGNATURE: &'static str = "SignMsg(bytes32)"; - const SIGNATURE_HASH: alloy_sol_types::private::B256 = alloy_sol_types::private::B256::new([ - 231u8, 244u8, 103u8, 80u8, 56u8, 244u8, 246u8, 3u8, 77u8, 252u8, 187u8, - 178u8, 76u8, 77u8, 192u8, 142u8, 78u8, 191u8, 16u8, 235u8, 157u8, 37u8, - 125u8, 61u8, 2u8, 192u8, 243u8, 141u8, 18u8, 42u8, 198u8, 228u8, - ]); + const ANONYMOUS: bool = false; + const SIGNATURE: &'static str = "SignMsg(bytes32)"; + const SIGNATURE_HASH: alloy_sol_types::private::B256 = + alloy_sol_types::private::B256::new([ + 231u8, 244u8, 103u8, 80u8, 56u8, 244u8, 246u8, 3u8, 77u8, 252u8, 187u8, 178u8, + 76u8, 77u8, 192u8, 142u8, 78u8, 191u8, 16u8, 235u8, 157u8, 37u8, 125u8, 61u8, + 2u8, 192u8, 243u8, 141u8, 18u8, 42u8, 198u8, 228u8, + ]); + #[allow(unused_variables)] #[inline] fn new( @@ -2339,29 +2371,31 @@ event SignMsg(bytes32 indexed msgHash); ) -> Self { Self { msgHash: topics.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, - ), - ); + 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.msgHash.clone()) } + #[inline] fn encode_topics_raw( &self, @@ -2370,9 +2404,7 @@ event SignMsg(bytes32 indexed msgHash); if out.len() < ::COUNT { return Err(alloy_sol_types::Error::Overrun); } - out[0usize] = alloy_sol_types::abi::token::WordToken( - Self::SIGNATURE_HASH, - ); + out[0usize] = alloy_sol_types::abi::token::WordToken(Self::SIGNATURE_HASH); out[1usize] = as alloy_sol_types::EventTopic>::encode_topic(&self.msgHash); @@ -2384,6 +2416,7 @@ event SignMsg(bytes32 indexed msgHash); 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) } @@ -2397,14 +2430,14 @@ event SignMsg(bytes32 indexed msgHash); } }; /**Constructor`. -```solidity -constructor(); -```*/ + ```solidity + constructor(); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct constructorCall {} const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -2413,9 +2446,7 @@ constructor(); type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -2440,15 +2471,15 @@ constructor(); #[automatically_derived] impl alloy_sol_types::SolConstructor for constructorCall { type Parameters<'a> = (); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + 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<'_> { () @@ -2457,14 +2488,15 @@ constructor(); }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `VERSION()` and selector `0xffa1ad74`. -```solidity -function VERSION() external view returns (string memory); -```*/ + ```solidity + function VERSION() external view returns (string memory); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct VERSIONCall; #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`VERSION()`](VERSIONCall) function. + ///Container type for the return parameters of the + /// [`VERSION()`](VERSIONCall) function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct VERSIONReturn { @@ -2478,7 +2510,7 @@ function VERSION() external view returns (string memory); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -2487,9 +2519,7 @@ function VERSION() external view returns (string memory); type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -2519,9 +2549,7 @@ function VERSION() external view returns (string memory); type UnderlyingRustTuple<'a> = (alloy_sol_types::private::String,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -2546,68 +2574,64 @@ function VERSION() external view returns (string memory); #[automatically_derived] impl alloy_sol_types::SolCall for VERSIONCall { type Parameters<'a> = (); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = alloy_sol_types::private::String; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (alloy_sol_types::sol_data::String,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "VERSION()"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [255u8, 161u8, 173u8, 116u8]; + const SIGNATURE: &'static str = "VERSION()"; + #[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, - ), - ) + (::tokenize(ret),) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) - .map(|r| { + as alloy_sol_types::SolType>::abi_decode_sequence(data).map( + |r| { let r: VERSIONReturn = 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: VERSIONReturn = r.into(); - r._0 - }) + 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: VERSIONReturn = r.into(); + r._0 + }) } } }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `domainSeparator()` and selector `0xf698da25`. -```solidity -function domainSeparator() external view returns (bytes32); -```*/ + ```solidity + function domainSeparator() external view returns (bytes32); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct domainSeparatorCall; #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`domainSeparator()`](domainSeparatorCall) function. + ///Container type for the return parameters of the + /// [`domainSeparator()`](domainSeparatorCall) function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct domainSeparatorReturn { @@ -2621,7 +2645,7 @@ function domainSeparator() external view returns (bytes32); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -2630,9 +2654,7 @@ function domainSeparator() external view returns (bytes32); type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -2662,9 +2684,7 @@ function domainSeparator() external view returns (bytes32); 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, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -2673,16 +2693,14 @@ function domainSeparator() external view returns (bytes32); } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From - for UnderlyingRustTuple<'_> { + impl ::core::convert::From for UnderlyingRustTuple<'_> { fn from(value: domainSeparatorReturn) -> Self { (value._0,) } } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From> - for domainSeparatorReturn { + impl ::core::convert::From> for domainSeparatorReturn { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { Self { _0: tuple.0 } } @@ -2691,26 +2709,26 @@ function domainSeparator() external view returns (bytes32); #[automatically_derived] impl alloy_sol_types::SolCall for domainSeparatorCall { type Parameters<'a> = (); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = alloy_sol_types::private::FixedBytes<32>; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (alloy_sol_types::sol_data::FixedBytes<32>,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "domainSeparator()"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [246u8, 152u8, 218u8, 37u8]; + const SIGNATURE: &'static str = "domainSeparator()"; + #[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<'_> { ( @@ -2719,35 +2737,34 @@ function domainSeparator() external view returns (bytes32); > 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| { + as alloy_sol_types::SolType>::abi_decode_sequence(data).map( + |r| { let r: domainSeparatorReturn = 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: domainSeparatorReturn = r.into(); - r._0 - }) + 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: domainSeparatorReturn = r.into(); + r._0 + }) } } }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `execTransaction(address,uint256,bytes,uint8,uint256,uint256,uint256,address,address,bytes)` and selector `0x6a761202`. -```solidity -function execTransaction(address to, uint256 value, bytes memory data, Enum.Operation operation, uint256 safeTxGas, uint256 baseGas, uint256 gasPrice, address gasToken, address refundReceiver, bytes memory signatures) external payable returns (bool success); -```*/ + ```solidity + function execTransaction(address to, uint256 value, bytes memory data, Enum.Operation operation, uint256 safeTxGas, uint256 baseGas, uint256 gasPrice, address gasToken, address refundReceiver, bytes memory signatures) external payable returns (bool success); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct execTransactionCall { @@ -2773,7 +2790,9 @@ function execTransaction(address to, uint256 value, bytes memory data, Enum.Oper pub signatures: alloy_sol_types::private::Bytes, } #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`execTransaction(address,uint256,bytes,uint8,uint256,uint256,uint256,address,address,bytes)`](execTransactionCall) function. + ///Container type for the return parameters of the + /// [`execTransaction(address,uint256,bytes,uint8,uint256,uint256,uint256, + /// address,address,bytes)`](execTransactionCall) function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct execTransactionReturn { @@ -2787,7 +2806,7 @@ function execTransaction(address to, uint256 value, bytes memory data, Enum.Oper clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -2818,9 +2837,7 @@ function execTransaction(address to, uint256 value, bytes memory data, Enum.Oper ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -2872,9 +2889,7 @@ function execTransaction(address to, uint256 value, bytes memory data, Enum.Oper type UnderlyingRustTuple<'a> = (bool,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -2883,16 +2898,14 @@ function execTransaction(address to, uint256 value, bytes memory data, Enum.Oper } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From - for UnderlyingRustTuple<'_> { + impl ::core::convert::From for UnderlyingRustTuple<'_> { fn from(value: execTransactionReturn) -> Self { (value.success,) } } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From> - for execTransactionReturn { + impl ::core::convert::From> for execTransactionReturn { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { Self { success: tuple.0 } } @@ -2912,46 +2925,44 @@ function execTransaction(address to, uint256 value, bytes memory data, Enum.Oper alloy_sol_types::sol_data::Address, alloy_sol_types::sol_data::Bytes, ); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = bool; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (alloy_sol_types::sol_data::Bool,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "execTransaction(address,uint256,bytes,uint8,uint256,uint256,uint256,address,address,bytes)"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [106u8, 118u8, 18u8, 2u8]; + const SIGNATURE: &'static str = "execTransaction(address,uint256,bytes,uint8,uint256,\ + uint256,uint256,address,address,bytes)"; + #[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), + as alloy_sol_types::SolType>::tokenize( + &self.value, + ), ::tokenize( &self.data, ), - ::tokenize( - &self.operation, + ::tokenize(&self.operation), + as alloy_sol_types::SolType>::tokenize( + &self.safeTxGas, + ), + as alloy_sol_types::SolType>::tokenize( + &self.baseGas, + ), + as alloy_sol_types::SolType>::tokenize( + &self.gasPrice, ), - as alloy_sol_types::SolType>::tokenize(&self.safeTxGas), - as alloy_sol_types::SolType>::tokenize(&self.baseGas), - as alloy_sol_types::SolType>::tokenize(&self.gasPrice), ::tokenize( &self.gasToken, ), @@ -2963,48 +2974,45 @@ function execTransaction(address to, uint256 value, bytes memory data, Enum.Oper ), ) } + #[inline] fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { - ( - ::tokenize( - ret, - ), - ) + (::tokenize(ret),) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) - .map(|r| { + as alloy_sol_types::SolType>::abi_decode_sequence(data).map( + |r| { let r: execTransactionReturn = r.into(); r.success - }) + }, + ) } + #[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: execTransactionReturn = r.into(); - r.success - }) + 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: execTransactionReturn = r.into(); + r.success + }) } } }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `nonce()` and selector `0xaffed0e0`. -```solidity -function nonce() external view returns (uint256); -```*/ + ```solidity + function nonce() external view returns (uint256); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct nonceCall; #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`nonce()`](nonceCall) function. + ///Container type for the return parameters of the [`nonce()`](nonceCall) + /// function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct nonceReturn { @@ -3018,7 +3026,7 @@ function nonce() external view returns (uint256); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -3027,9 +3035,7 @@ function nonce() external view returns (uint256); type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -3056,14 +3062,10 @@ function nonce() external view returns (uint256); #[allow(dead_code)] type UnderlyingSolTuple<'a> = (alloy_sol_types::sol_data::Uint<256>,); #[doc(hidden)] - type UnderlyingRustTuple<'a> = ( - alloy_sol_types::private::primitives::aliases::U256, - ); + 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, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -3088,63 +3090,62 @@ function nonce() external view returns (uint256); #[automatically_derived] impl alloy_sol_types::SolCall for nonceCall { type Parameters<'a> = (); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = alloy_sol_types::private::primitives::aliases::U256; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (alloy_sol_types::sol_data::Uint<256>,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "nonce()"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [175u8, 254u8, 208u8, 224u8]; + const SIGNATURE: &'static str = "nonce()"; + #[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), + 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| { + as alloy_sol_types::SolType>::abi_decode_sequence(data).map( + |r| { let r: nonceReturn = 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: nonceReturn = r.into(); - r._0 - }) + 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: nonceReturn = r.into(); + r._0 + }) } } }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `setup(address[],uint256,address,bytes,address,address,uint256,address)` and selector `0xb63e800d`. -```solidity -function setup(address[] memory _owners, uint256 _threshold, address to, bytes memory data, address fallbackHandler, address paymentToken, uint256 payment, address paymentReceiver) external; -```*/ + ```solidity + function setup(address[] memory _owners, uint256 _threshold, address to, bytes memory data, address fallbackHandler, address paymentToken, uint256 payment, address paymentReceiver) external; + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct setupCall { @@ -3165,7 +3166,9 @@ function setup(address[] memory _owners, uint256 _threshold, address to, bytes m #[allow(missing_docs)] pub paymentReceiver: alloy_sol_types::private::Address, } - ///Container type for the return parameters of the [`setup(address[],uint256,address,bytes,address,address,uint256,address)`](setupCall) function. + ///Container type for the return parameters of the + /// [`setup(address[],uint256,address,bytes,address,address,uint256, + /// address)`](setupCall) function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct setupReturn {} @@ -3176,7 +3179,7 @@ function setup(address[] memory _owners, uint256 _threshold, address to, bytes m clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -3203,9 +3206,7 @@ function setup(address[] memory _owners, uint256 _threshold, address to, bytes m ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -3253,9 +3254,7 @@ function setup(address[] memory _owners, uint256 _threshold, address to, bytes m type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -3278,9 +3277,7 @@ function setup(address[] memory _owners, uint256 _threshold, address to, bytes m } } impl setupReturn { - fn _tokenize( - &self, - ) -> ::ReturnToken<'_> { + fn _tokenize(&self) -> ::ReturnToken<'_> { () } } @@ -3296,22 +3293,22 @@ function setup(address[] memory _owners, uint256 _threshold, address to, bytes m 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 = setupReturn; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "setup(address[],uint256,address,bytes,address,address,uint256,address)"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [182u8, 62u8, 128u8, 13u8]; + const SIGNATURE: &'static str = + "setup(address[],uint256,address,bytes,address,address,uint256,address)"; + #[inline] fn new<'a>( tuple: as alloy_sol_types::SolType>::RustType, ) -> Self { tuple.into() } + #[inline] fn tokenize(&self) -> Self::Token<'_> { ( @@ -3341,31 +3338,29 @@ function setup(address[] memory _owners, uint256 _threshold, address to, bytes m ), ) } + #[inline] fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { setupReturn::_tokenize(ret) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) + 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) + 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 [`GnosisSafe`](self) function calls. #[derive(Clone)] - #[derive()] pub enum GnosisSafeCalls { #[allow(missing_docs)] VERSION(VERSIONCall), @@ -3381,8 +3376,9 @@ function setup(address[] memory _owners, uint256 _threshold, address to, bytes m impl GnosisSafeCalls { /// 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. + /// 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]] = &[ @@ -3392,14 +3388,6 @@ function setup(address[] memory _owners, uint256 _threshold, address to, bytes m [246u8, 152u8, 218u8, 37u8], [255u8, 161u8, 173u8, 116u8], ]; - /// The names of the variants in the same order as `SELECTORS`. - pub const VARIANT_NAMES: &'static [&'static str] = &[ - ::core::stringify!(execTransaction), - ::core::stringify!(nonce), - ::core::stringify!(setup), - ::core::stringify!(domainSeparator), - ::core::stringify!(VERSION), - ]; /// The signatures in the same order as `SELECTORS`. pub const SIGNATURES: &'static [&'static str] = &[ ::SIGNATURE, @@ -3408,6 +3396,15 @@ function setup(address[] memory _owners, uint256 _threshold, address to, bytes m ::SIGNATURE, ::SIGNATURE, ]; + /// The names of the variants in the same order as `SELECTORS`. + pub const VARIANT_NAMES: &'static [&'static str] = &[ + ::core::stringify!(execTransaction), + ::core::stringify!(nonce), + ::core::stringify!(setup), + ::core::stringify!(domainSeparator), + ::core::stringify!(VERSION), + ]; + /// Returns the signature for the given selector, if known. #[inline] pub fn signature_by_selector( @@ -3420,20 +3417,20 @@ function setup(address[] memory _owners, uint256 _threshold, address to, bytes m ::core::result::Result::Err(_) => ::core::option::Option::None, } } + /// Returns the enum variant name for the given selector, if known. #[inline] - pub fn name_by_selector( - selector: [u8; 4usize], - ) -> ::core::option::Option<&'static str> { + pub fn name_by_selector(selector: [u8; 4usize]) -> ::core::option::Option<&'static str> { let sig = Self::signature_by_selector(selector)?; sig.split_once('(').map(|(name, _)| name) } } #[automatically_derived] impl alloy_sol_types::SolInterface for GnosisSafeCalls { - const NAME: &'static str = "GnosisSafeCalls"; - const MIN_DATA_LENGTH: usize = 0usize; const COUNT: usize = 5usize; + const MIN_DATA_LENGTH: usize = 0usize; + const NAME: &'static str = "GnosisSafeCalls"; + #[inline] fn selector(&self) -> [u8; 4] { match self { @@ -3448,30 +3445,24 @@ function setup(address[] memory _owners, uint256 _threshold, address to, bytes m Self::setup(_) => ::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 abi_decode_raw(selector: [u8; 4], data: &[u8]) -> alloy_sol_types::Result { + static DECODE_SHIMS: &[fn(&[u8]) -> alloy_sol_types::Result] = &[ { - fn execTransaction( - data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, - ) + fn execTransaction(data: &[u8]) -> alloy_sol_types::Result { + ::abi_decode_raw(data) .map(GnosisSafeCalls::execTransaction) } execTransaction @@ -3491,12 +3482,8 @@ function setup(address[] memory _owners, uint256 _threshold, address to, bytes m setup }, { - fn domainSeparator( - data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, - ) + fn domainSeparator(data: &[u8]) -> alloy_sol_types::Result { + ::abi_decode_raw(data) .map(GnosisSafeCalls::domainSeparator) } domainSeparator @@ -3510,15 +3497,14 @@ function setup(address[] memory _owners, uint256 _threshold, address to, bytes m }, ]; let Ok(idx) = Self::SELECTORS.binary_search(&selector) else { - return Err( - alloy_sol_types::Error::unknown_selector( - ::NAME, - selector, - ), - ); + return Err(alloy_sol_types::Error::unknown_selector( + ::NAME, + selector, + )); }; DECODE_SHIMS[idx](data) } + #[inline] #[allow(non_snake_case)] fn abi_decode_raw_validate( @@ -3527,67 +3513,57 @@ function setup(address[] memory _owners, uint256 _threshold, address to, bytes m ) -> alloy_sol_types::Result { static DECODE_VALIDATE_SHIMS: &[fn( &[u8], - ) -> alloy_sol_types::Result] = &[ + ) + -> alloy_sol_types::Result] = &[ { - fn execTransaction( - data: &[u8], - ) -> alloy_sol_types::Result { + fn execTransaction(data: &[u8]) -> alloy_sol_types::Result { ::abi_decode_raw_validate( - data, - ) - .map(GnosisSafeCalls::execTransaction) + data, + ) + .map(GnosisSafeCalls::execTransaction) } execTransaction }, { fn nonce(data: &[u8]) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) + ::abi_decode_raw_validate(data) .map(GnosisSafeCalls::nonce) } nonce }, { fn setup(data: &[u8]) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) + ::abi_decode_raw_validate(data) .map(GnosisSafeCalls::setup) } setup }, { - fn domainSeparator( - data: &[u8], - ) -> alloy_sol_types::Result { + fn domainSeparator(data: &[u8]) -> alloy_sol_types::Result { ::abi_decode_raw_validate( - data, - ) - .map(GnosisSafeCalls::domainSeparator) + data, + ) + .map(GnosisSafeCalls::domainSeparator) } domainSeparator }, { fn VERSION(data: &[u8]) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) + ::abi_decode_raw_validate(data) .map(GnosisSafeCalls::VERSION) } VERSION }, ]; let Ok(idx) = Self::SELECTORS.binary_search(&selector) else { - return Err( - alloy_sol_types::Error::unknown_selector( - ::NAME, - selector, - ), - ); + return Err(alloy_sol_types::Error::unknown_selector( + ::NAME, + selector, + )); }; DECODE_VALIDATE_SHIMS[idx](data) } + #[inline] fn abi_encoded_size(&self) -> usize { match self { @@ -3595,14 +3571,10 @@ function setup(address[] memory _owners, uint256 _threshold, address to, bytes m ::abi_encoded_size(inner) } Self::domainSeparator(inner) => { - ::abi_encoded_size( - inner, - ) + ::abi_encoded_size(inner) } Self::execTransaction(inner) => { - ::abi_encoded_size( - inner, - ) + ::abi_encoded_size(inner) } Self::nonce(inner) => { ::abi_encoded_size(inner) @@ -3612,6 +3584,7 @@ function setup(address[] memory _owners, uint256 _threshold, address to, bytes m } } } + #[inline] fn abi_encode_raw(&self, out: &mut alloy_sol_types::private::Vec) { match self { @@ -3619,16 +3592,10 @@ function setup(address[] memory _owners, uint256 _threshold, address to, bytes m ::abi_encode_raw(inner, out) } Self::domainSeparator(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } Self::execTransaction(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } Self::nonce(inner) => { ::abi_encode_raw(inner, out) @@ -3640,8 +3607,7 @@ function setup(address[] memory _owners, uint256 _threshold, address to, bytes m } } ///Container for all the [`GnosisSafe`](self) events. - #[derive(Clone)] - #[derive(Debug, PartialEq, Eq, Hash)] + #[derive(Clone, Debug, PartialEq, Eq, Hash)] pub enum GnosisSafeEvents { #[allow(missing_docs)] AddedOwner(AddedOwner), @@ -3677,106 +3643,88 @@ function setup(address[] memory _owners, uint256 _threshold, address to, bytes m impl GnosisSafeEvents { /// 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. + /// 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]] = &[ [ - 17u8, 81u8, 17u8, 105u8, 20u8, 81u8, 91u8, 192u8, 137u8, 31u8, 249u8, - 4u8, 122u8, 108u8, 179u8, 44u8, 249u8, 2u8, 84u8, 111u8, 131u8, 6u8, - 100u8, 153u8, 188u8, 248u8, 186u8, 51u8, 210u8, 53u8, 63u8, 162u8, + 17u8, 81u8, 17u8, 105u8, 20u8, 81u8, 91u8, 192u8, 137u8, 31u8, 249u8, 4u8, 122u8, + 108u8, 179u8, 44u8, 249u8, 2u8, 84u8, 111u8, 131u8, 6u8, 100u8, 153u8, 188u8, + 248u8, 186u8, 51u8, 210u8, 53u8, 63u8, 162u8, ], [ - 20u8, 29u8, 248u8, 104u8, 166u8, 51u8, 26u8, 245u8, 40u8, 227u8, 140u8, - 131u8, 183u8, 170u8, 3u8, 237u8, 193u8, 155u8, 230u8, 110u8, 55u8, 174u8, - 103u8, 249u8, 40u8, 91u8, 244u8, 248u8, 227u8, 198u8, 161u8, 168u8, + 20u8, 29u8, 248u8, 104u8, 166u8, 51u8, 26u8, 245u8, 40u8, 227u8, 140u8, 131u8, + 183u8, 170u8, 3u8, 237u8, 193u8, 155u8, 230u8, 110u8, 55u8, 174u8, 103u8, 249u8, + 40u8, 91u8, 244u8, 248u8, 227u8, 198u8, 161u8, 168u8, ], [ - 35u8, 66u8, 139u8, 24u8, 172u8, 251u8, 62u8, 166u8, 75u8, 8u8, 220u8, - 12u8, 29u8, 41u8, 110u8, 169u8, 192u8, 151u8, 2u8, 192u8, 144u8, 131u8, - 202u8, 82u8, 114u8, 230u8, 77u8, 17u8, 91u8, 104u8, 125u8, 35u8, + 35u8, 66u8, 139u8, 24u8, 172u8, 251u8, 62u8, 166u8, 75u8, 8u8, 220u8, 12u8, 29u8, + 41u8, 110u8, 169u8, 192u8, 151u8, 2u8, 192u8, 144u8, 131u8, 202u8, 82u8, 114u8, + 230u8, 77u8, 17u8, 91u8, 104u8, 125u8, 35u8, ], [ - 61u8, 12u8, 233u8, 191u8, 195u8, 237u8, 125u8, 104u8, 98u8, 219u8, 178u8, - 139u8, 45u8, 234u8, 148u8, 86u8, 31u8, 231u8, 20u8, 161u8, 180u8, 208u8, - 25u8, 170u8, 138u8, 243u8, 151u8, 48u8, 209u8, 173u8, 124u8, 61u8, + 61u8, 12u8, 233u8, 191u8, 195u8, 237u8, 125u8, 104u8, 98u8, 219u8, 178u8, 139u8, + 45u8, 234u8, 148u8, 86u8, 31u8, 231u8, 20u8, 161u8, 180u8, 208u8, 25u8, 170u8, + 138u8, 243u8, 151u8, 48u8, 209u8, 173u8, 124u8, 61u8, ], [ - 68u8, 46u8, 113u8, 95u8, 98u8, 99u8, 70u8, 232u8, 197u8, 67u8, 129u8, - 0u8, 45u8, 166u8, 20u8, 246u8, 43u8, 238u8, 141u8, 39u8, 56u8, 101u8, - 53u8, 178u8, 82u8, 30u8, 200u8, 84u8, 8u8, 152u8, 85u8, 110u8, + 68u8, 46u8, 113u8, 95u8, 98u8, 99u8, 70u8, 232u8, 197u8, 67u8, 129u8, 0u8, 45u8, + 166u8, 20u8, 246u8, 43u8, 238u8, 141u8, 39u8, 56u8, 101u8, 53u8, 178u8, 82u8, 30u8, + 200u8, 84u8, 8u8, 152u8, 85u8, 110u8, ], [ - 90u8, 198u8, 196u8, 108u8, 147u8, 200u8, 208u8, 229u8, 55u8, 20u8, 186u8, - 59u8, 83u8, 219u8, 62u8, 124u8, 4u8, 109u8, 169u8, 148u8, 49u8, 61u8, - 126u8, 208u8, 209u8, 146u8, 2u8, 139u8, 199u8, 194u8, 40u8, 176u8, + 90u8, 198u8, 196u8, 108u8, 147u8, 200u8, 208u8, 229u8, 55u8, 20u8, 186u8, 59u8, + 83u8, 219u8, 62u8, 124u8, 4u8, 109u8, 169u8, 148u8, 49u8, 61u8, 126u8, 208u8, + 209u8, 146u8, 2u8, 139u8, 199u8, 194u8, 40u8, 176u8, ], [ - 97u8, 15u8, 127u8, 242u8, 179u8, 4u8, 174u8, 137u8, 3u8, 195u8, 222u8, - 116u8, 198u8, 12u8, 106u8, 177u8, 247u8, 214u8, 34u8, 107u8, 63u8, 82u8, - 197u8, 22u8, 25u8, 5u8, 187u8, 90u8, 212u8, 3u8, 156u8, 147u8, + 97u8, 15u8, 127u8, 242u8, 179u8, 4u8, 174u8, 137u8, 3u8, 195u8, 222u8, 116u8, + 198u8, 12u8, 106u8, 177u8, 247u8, 214u8, 34u8, 107u8, 63u8, 82u8, 197u8, 22u8, + 25u8, 5u8, 187u8, 90u8, 212u8, 3u8, 156u8, 147u8, ], [ - 104u8, 149u8, 193u8, 54u8, 100u8, 170u8, 79u8, 103u8, 40u8, 139u8, 37u8, - 215u8, 162u8, 29u8, 122u8, 170u8, 52u8, 145u8, 110u8, 53u8, 95u8, 185u8, - 182u8, 250u8, 224u8, 161u8, 57u8, 169u8, 8u8, 91u8, 236u8, 184u8, + 104u8, 149u8, 193u8, 54u8, 100u8, 170u8, 79u8, 103u8, 40u8, 139u8, 37u8, 215u8, + 162u8, 29u8, 122u8, 170u8, 52u8, 145u8, 110u8, 53u8, 95u8, 185u8, 182u8, 250u8, + 224u8, 161u8, 57u8, 169u8, 8u8, 91u8, 236u8, 184u8, ], [ - 148u8, 101u8, 250u8, 12u8, 150u8, 44u8, 199u8, 105u8, 88u8, 230u8, 55u8, - 58u8, 153u8, 51u8, 38u8, 64u8, 12u8, 28u8, 148u8, 248u8, 190u8, 47u8, - 227u8, 169u8, 82u8, 173u8, 250u8, 127u8, 96u8, 178u8, 234u8, 38u8, + 148u8, 101u8, 250u8, 12u8, 150u8, 44u8, 199u8, 105u8, 88u8, 230u8, 55u8, 58u8, + 153u8, 51u8, 38u8, 64u8, 12u8, 28u8, 148u8, 248u8, 190u8, 47u8, 227u8, 169u8, 82u8, + 173u8, 250u8, 127u8, 96u8, 178u8, 234u8, 38u8, ], [ - 170u8, 180u8, 250u8, 43u8, 70u8, 63u8, 88u8, 27u8, 43u8, 50u8, 203u8, - 59u8, 126u8, 59u8, 112u8, 75u8, 156u8, 227u8, 124u8, 194u8, 9u8, 181u8, - 251u8, 77u8, 119u8, 229u8, 147u8, 172u8, 228u8, 5u8, 66u8, 118u8, + 170u8, 180u8, 250u8, 43u8, 70u8, 63u8, 88u8, 27u8, 43u8, 50u8, 203u8, 59u8, 126u8, + 59u8, 112u8, 75u8, 156u8, 227u8, 124u8, 194u8, 9u8, 181u8, 251u8, 77u8, 119u8, + 229u8, 147u8, 172u8, 228u8, 5u8, 66u8, 118u8, ], [ - 172u8, 210u8, 200u8, 112u8, 40u8, 4u8, 18u8, 143u8, 219u8, 13u8, 178u8, - 187u8, 73u8, 246u8, 209u8, 39u8, 221u8, 1u8, 129u8, 193u8, 63u8, 212u8, - 93u8, 191u8, 225u8, 109u8, 224u8, 147u8, 14u8, 43u8, 211u8, 117u8, + 172u8, 210u8, 200u8, 112u8, 40u8, 4u8, 18u8, 143u8, 219u8, 13u8, 178u8, 187u8, + 73u8, 246u8, 209u8, 39u8, 221u8, 1u8, 129u8, 193u8, 63u8, 212u8, 93u8, 191u8, + 225u8, 109u8, 224u8, 147u8, 14u8, 43u8, 211u8, 117u8, ], [ - 231u8, 244u8, 103u8, 80u8, 56u8, 244u8, 246u8, 3u8, 77u8, 252u8, 187u8, - 178u8, 76u8, 77u8, 192u8, 142u8, 78u8, 191u8, 16u8, 235u8, 157u8, 37u8, - 125u8, 61u8, 2u8, 192u8, 243u8, 141u8, 18u8, 42u8, 198u8, 228u8, + 231u8, 244u8, 103u8, 80u8, 56u8, 244u8, 246u8, 3u8, 77u8, 252u8, 187u8, 178u8, + 76u8, 77u8, 192u8, 142u8, 78u8, 191u8, 16u8, 235u8, 157u8, 37u8, 125u8, 61u8, 2u8, + 192u8, 243u8, 141u8, 18u8, 42u8, 198u8, 228u8, ], [ - 236u8, 223u8, 58u8, 62u8, 255u8, 234u8, 87u8, 131u8, 163u8, 196u8, 194u8, - 20u8, 14u8, 103u8, 117u8, 119u8, 102u8, 100u8, 40u8, 212u8, 78u8, 217u8, - 212u8, 116u8, 160u8, 179u8, 164u8, 201u8, 148u8, 63u8, 132u8, 64u8, + 236u8, 223u8, 58u8, 62u8, 255u8, 234u8, 87u8, 131u8, 163u8, 196u8, 194u8, 20u8, + 14u8, 103u8, 117u8, 119u8, 102u8, 100u8, 40u8, 212u8, 78u8, 217u8, 212u8, 116u8, + 160u8, 179u8, 164u8, 201u8, 148u8, 63u8, 132u8, 64u8, ], [ - 242u8, 160u8, 235u8, 21u8, 100u8, 114u8, 209u8, 68u8, 2u8, 85u8, 176u8, - 215u8, 193u8, 225u8, 156u8, 192u8, 113u8, 21u8, 209u8, 5u8, 31u8, 230u8, - 5u8, 176u8, 220u8, 230u8, 154u8, 207u8, 236u8, 136u8, 77u8, 156u8, + 242u8, 160u8, 235u8, 21u8, 100u8, 114u8, 209u8, 68u8, 2u8, 85u8, 176u8, 215u8, + 193u8, 225u8, 156u8, 192u8, 113u8, 21u8, 209u8, 5u8, 31u8, 230u8, 5u8, 176u8, + 220u8, 230u8, 154u8, 207u8, 236u8, 136u8, 77u8, 156u8, ], [ - 248u8, 212u8, 159u8, 197u8, 41u8, 129u8, 46u8, 154u8, 124u8, 92u8, 80u8, - 230u8, 156u8, 32u8, 240u8, 220u8, 204u8, 13u8, 184u8, 250u8, 149u8, - 201u8, 139u8, 197u8, 140u8, 201u8, 164u8, 241u8, 193u8, 41u8, 158u8, - 175u8, + 248u8, 212u8, 159u8, 197u8, 41u8, 129u8, 46u8, 154u8, 124u8, 92u8, 80u8, 230u8, + 156u8, 32u8, 240u8, 220u8, 204u8, 13u8, 184u8, 250u8, 149u8, 201u8, 139u8, 197u8, + 140u8, 201u8, 164u8, 241u8, 193u8, 41u8, 158u8, 175u8, ], ]; - /// The names of the variants in the same order as `SELECTORS`. - pub const VARIANT_NAMES: &'static [&'static str] = &[ - ::core::stringify!(ChangedGuard), - ::core::stringify!(SafeSetup), - ::core::stringify!(ExecutionFailure), - ::core::stringify!(SafeReceived), - ::core::stringify!(ExecutionSuccess), - ::core::stringify!(ChangedFallbackHandler), - ::core::stringify!(ChangedThreshold), - ::core::stringify!(ExecutionFromModuleSuccess), - ::core::stringify!(AddedOwner), - ::core::stringify!(DisabledModule), - ::core::stringify!(ExecutionFromModuleFailure), - ::core::stringify!(SignMsg), - ::core::stringify!(EnabledModule), - ::core::stringify!(ApproveHash), - ::core::stringify!(RemovedOwner), - ]; /// The signatures in the same order as `SELECTORS`. pub const SIGNATURES: &'static [&'static str] = &[ ::SIGNATURE, @@ -3795,6 +3743,25 @@ function setup(address[] memory _owners, uint256 _threshold, address to, bytes m ::SIGNATURE, ::SIGNATURE, ]; + /// The names of the variants in the same order as `SELECTORS`. + pub const VARIANT_NAMES: &'static [&'static str] = &[ + ::core::stringify!(ChangedGuard), + ::core::stringify!(SafeSetup), + ::core::stringify!(ExecutionFailure), + ::core::stringify!(SafeReceived), + ::core::stringify!(ExecutionSuccess), + ::core::stringify!(ChangedFallbackHandler), + ::core::stringify!(ChangedThreshold), + ::core::stringify!(ExecutionFromModuleSuccess), + ::core::stringify!(AddedOwner), + ::core::stringify!(DisabledModule), + ::core::stringify!(ExecutionFromModuleFailure), + ::core::stringify!(SignMsg), + ::core::stringify!(EnabledModule), + ::core::stringify!(ApproveHash), + ::core::stringify!(RemovedOwner), + ]; + /// Returns the signature for the given selector, if known. #[inline] pub fn signature_by_selector( @@ -3807,143 +3774,99 @@ function setup(address[] memory _owners, uint256 _threshold, address to, bytes m ::core::result::Result::Err(_) => ::core::option::Option::None, } } + /// Returns the enum variant name for the given selector, if known. #[inline] - pub fn name_by_selector( - selector: [u8; 32usize], - ) -> ::core::option::Option<&'static str> { + pub fn name_by_selector(selector: [u8; 32usize]) -> ::core::option::Option<&'static str> { let sig = Self::signature_by_selector(selector)?; sig.split_once('(').map(|(name, _)| name) } } #[automatically_derived] impl alloy_sol_types::SolEventInterface for GnosisSafeEvents { - const NAME: &'static str = "GnosisSafeEvents"; const COUNT: usize = 15usize; + const NAME: &'static str = "GnosisSafeEvents"; + 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, - ) + ::decode_raw_log(topics, data) .map(Self::AddedOwner) } Some(::SIGNATURE_HASH) => { - ::decode_raw_log( - topics, - data, - ) + ::decode_raw_log(topics, data) .map(Self::ApproveHash) } - Some( - ::SIGNATURE_HASH, - ) => { + Some(::SIGNATURE_HASH) => { ::decode_raw_log( - topics, - data, - ) - .map(Self::ChangedFallbackHandler) + topics, data, + ) + .map(Self::ChangedFallbackHandler) } Some(::SIGNATURE_HASH) => { - ::decode_raw_log( - topics, - data, - ) + ::decode_raw_log(topics, data) .map(Self::ChangedGuard) } Some(::SIGNATURE_HASH) => { - ::decode_raw_log( - topics, - data, - ) + ::decode_raw_log(topics, data) .map(Self::ChangedThreshold) } Some(::SIGNATURE_HASH) => { - ::decode_raw_log( - topics, - data, - ) + ::decode_raw_log(topics, data) .map(Self::DisabledModule) } Some(::SIGNATURE_HASH) => { - ::decode_raw_log( - topics, - data, - ) + ::decode_raw_log(topics, data) .map(Self::EnabledModule) } Some(::SIGNATURE_HASH) => { - ::decode_raw_log( - topics, - data, - ) + ::decode_raw_log(topics, data) .map(Self::ExecutionFailure) } - Some( - ::SIGNATURE_HASH, - ) => { + Some(::SIGNATURE_HASH) => { ::decode_raw_log( - topics, - data, - ) - .map(Self::ExecutionFromModuleFailure) + topics, data, + ) + .map(Self::ExecutionFromModuleFailure) } - Some( - ::SIGNATURE_HASH, - ) => { + Some(::SIGNATURE_HASH) => { ::decode_raw_log( - topics, - data, - ) - .map(Self::ExecutionFromModuleSuccess) + topics, data, + ) + .map(Self::ExecutionFromModuleSuccess) } Some(::SIGNATURE_HASH) => { - ::decode_raw_log( - topics, - data, - ) + ::decode_raw_log(topics, data) .map(Self::ExecutionSuccess) } Some(::SIGNATURE_HASH) => { - ::decode_raw_log( - topics, - data, - ) + ::decode_raw_log(topics, data) .map(Self::RemovedOwner) } Some(::SIGNATURE_HASH) => { - ::decode_raw_log( - topics, - data, - ) + ::decode_raw_log(topics, data) .map(Self::SafeReceived) } Some(::SIGNATURE_HASH) => { - ::decode_raw_log( - topics, - data, - ) + ::decode_raw_log(topics, data) .map(Self::SafeSetup) } Some(::SIGNATURE_HASH) => { ::decode_raw_log(topics, data) .map(Self::SignMsg) } - _ => { - 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(), - ), + _ => 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(), ), - }) - } + ), + }), } } } @@ -3990,14 +3913,11 @@ function setup(address[] memory _owners, uint256 _threshold, address to, bytes m Self::SafeReceived(inner) => { alloy_sol_types::private::IntoLogData::to_log_data(inner) } - Self::SafeSetup(inner) => { - alloy_sol_types::private::IntoLogData::to_log_data(inner) - } - Self::SignMsg(inner) => { - alloy_sol_types::private::IntoLogData::to_log_data(inner) - } + Self::SafeSetup(inner) => alloy_sol_types::private::IntoLogData::to_log_data(inner), + Self::SignMsg(inner) => alloy_sol_types::private::IntoLogData::to_log_data(inner), } } + fn into_log_data(self) -> alloy_sol_types::private::LogData { match self { Self::AddedOwner(inner) => { @@ -4042,16 +3962,14 @@ function setup(address[] memory _owners, uint256 _threshold, address to, bytes m Self::SafeSetup(inner) => { alloy_sol_types::private::IntoLogData::into_log_data(inner) } - Self::SignMsg(inner) => { - alloy_sol_types::private::IntoLogData::into_log_data(inner) - } + Self::SignMsg(inner) => alloy_sol_types::private::IntoLogData::into_log_data(inner), } } } - use alloy_contract as alloy_contract; + use alloy_contract; /**Creates a new wrapper around an on-chain [`GnosisSafe`](self) contract instance. -See the [wrapper's documentation](`GnosisSafeInstance`) for more details.*/ + See the [wrapper's documentation](`GnosisSafeInstance`) for more details.*/ #[inline] pub const fn new< P: alloy_contract::private::Provider, @@ -4064,43 +3982,41 @@ See the [wrapper's documentation](`GnosisSafeInstance`) for more details.*/ } /**Deploys this contract using the given `provider` and constructor arguments, if any. -Returns a new instance of the contract, if the deployment was successful. + 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.*/ + 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, - >( + pub fn deploy, N: alloy_contract::private::Network>( __provider: P, - ) -> impl ::core::future::Future< - Output = alloy_contract::Result>, - > { + ) -> impl ::core::future::Future>> + { GnosisSafeInstance::::deploy(__provider) } /**Creates a `RawCallBuilder` for deploying this contract using the given `provider` -and constructor arguments, if any. + 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.*/ + 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) -> alloy_contract::RawCallBuilder { + >( + __provider: P, + ) -> alloy_contract::RawCallBuilder { GnosisSafeInstance::::deploy_builder(__provider) } /**A [`GnosisSafe`](self) instance. -Contains type-safe methods for interacting with an on-chain instance of the -[`GnosisSafe`](self) contract located at a given `address`, using a given -provider `P`. + Contains type-safe methods for interacting with an on-chain instance of the + [`GnosisSafe`](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. + 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.*/ + See the [module-level documentation](self) for all the available methods.*/ #[derive(Clone)] pub struct GnosisSafeInstance { address: alloy_sol_types::private::Address, @@ -4111,46 +4027,44 @@ See the [module-level documentation](self) for all the available methods.*/ impl ::core::fmt::Debug for GnosisSafeInstance { #[inline] fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { - f.debug_tuple("GnosisSafeInstance").field(&self.address).finish() + f.debug_tuple("GnosisSafeInstance") + .field(&self.address) + .finish() } } /// Instantiation and getters/setters. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > GnosisSafeInstance { + impl, N: alloy_contract::private::Network> + GnosisSafeInstance + { /**Creates a new wrapper around an on-chain [`GnosisSafe`](self) contract instance. -See the [wrapper's documentation](`GnosisSafeInstance`) for more details.*/ + See the [wrapper's documentation](`GnosisSafeInstance`) for more details.*/ #[inline] - pub const fn new( - address: alloy_sol_types::private::Address, - __provider: P, - ) -> Self { + pub const fn new(address: alloy_sol_types::private::Address, __provider: P) -> Self { Self { address, provider: __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. + 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.*/ + For more fine-grained control over the deployment process, use [`deploy_builder`] instead.*/ #[inline] - pub async fn deploy( - __provider: P, - ) -> alloy_contract::Result> { + 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. + 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.*/ + 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( @@ -4158,21 +4072,25 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ ::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 { @@ -4180,7 +4098,8 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ } } impl GnosisSafeInstance<&P, N> { - /// Clones the provider and returns a new instance with the cloned provider. + /// Clones the provider and returns a new instance with the cloned + /// provider. #[inline] pub fn with_cloned_provider(self) -> GnosisSafeInstance { GnosisSafeInstance { @@ -4191,30 +4110,34 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ } } /// Function calls. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > GnosisSafeInstance { - /// Creates a new call builder using this contract instance's provider and address. + impl, N: alloy_contract::private::Network> + GnosisSafeInstance + { + /// 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. + /// 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 [`VERSION`] function. pub fn VERSION(&self) -> alloy_contract::SolCallBuilder<&P, VERSIONCall, N> { self.call_builder(&VERSIONCall) } + ///Creates a new call builder for the [`domainSeparator`] function. pub fn domainSeparator( &self, ) -> alloy_contract::SolCallBuilder<&P, domainSeparatorCall, N> { self.call_builder(&domainSeparatorCall) } + ///Creates a new call builder for the [`execTransaction`] function. pub fn execTransaction( &self, @@ -4229,25 +4152,25 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ refundReceiver: alloy_sol_types::private::Address, signatures: alloy_sol_types::private::Bytes, ) -> alloy_contract::SolCallBuilder<&P, execTransactionCall, N> { - self.call_builder( - &execTransactionCall { - to, - value, - data, - operation, - safeTxGas, - baseGas, - gasPrice, - gasToken, - refundReceiver, - signatures, - }, - ) + self.call_builder(&execTransactionCall { + to, + value, + data, + operation, + safeTxGas, + baseGas, + gasPrice, + gasToken, + refundReceiver, + signatures, + }) } + ///Creates a new call builder for the [`nonce`] function. pub fn nonce(&self) -> alloy_contract::SolCallBuilder<&P, nonceCall, N> { self.call_builder(&nonceCall) } + ///Creates a new call builder for the [`setup`] function. pub fn setup( &self, @@ -4260,106 +4183,112 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ payment: alloy_sol_types::private::primitives::aliases::U256, paymentReceiver: alloy_sol_types::private::Address, ) -> alloy_contract::SolCallBuilder<&P, setupCall, N> { - self.call_builder( - &setupCall { - _owners, - _threshold, - to, - data, - fallbackHandler, - paymentToken, - payment, - paymentReceiver, - }, - ) + self.call_builder(&setupCall { + _owners, + _threshold, + to, + data, + fallbackHandler, + paymentToken, + payment, + paymentReceiver, + }) } } /// Event filters. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > GnosisSafeInstance { - /// Creates a new event filter using this contract instance's provider and address. + impl, N: alloy_contract::private::Network> + GnosisSafeInstance + { + /// 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. + /// 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 [`AddedOwner`] event. pub fn AddedOwner_filter(&self) -> alloy_contract::Event<&P, AddedOwner, N> { self.event_filter::() } + ///Creates a new event filter for the [`ApproveHash`] event. pub fn ApproveHash_filter(&self) -> alloy_contract::Event<&P, ApproveHash, N> { self.event_filter::() } + ///Creates a new event filter for the [`ChangedFallbackHandler`] event. pub fn ChangedFallbackHandler_filter( &self, ) -> alloy_contract::Event<&P, ChangedFallbackHandler, N> { self.event_filter::() } + ///Creates a new event filter for the [`ChangedGuard`] event. pub fn ChangedGuard_filter(&self) -> alloy_contract::Event<&P, ChangedGuard, N> { self.event_filter::() } + ///Creates a new event filter for the [`ChangedThreshold`] event. - pub fn ChangedThreshold_filter( - &self, - ) -> alloy_contract::Event<&P, ChangedThreshold, N> { + pub fn ChangedThreshold_filter(&self) -> alloy_contract::Event<&P, ChangedThreshold, N> { self.event_filter::() } + ///Creates a new event filter for the [`DisabledModule`] event. - pub fn DisabledModule_filter( - &self, - ) -> alloy_contract::Event<&P, DisabledModule, N> { + pub fn DisabledModule_filter(&self) -> alloy_contract::Event<&P, DisabledModule, N> { self.event_filter::() } + ///Creates a new event filter for the [`EnabledModule`] event. - pub fn EnabledModule_filter( - &self, - ) -> alloy_contract::Event<&P, EnabledModule, N> { + pub fn EnabledModule_filter(&self) -> alloy_contract::Event<&P, EnabledModule, N> { self.event_filter::() } + ///Creates a new event filter for the [`ExecutionFailure`] event. - pub fn ExecutionFailure_filter( - &self, - ) -> alloy_contract::Event<&P, ExecutionFailure, N> { + pub fn ExecutionFailure_filter(&self) -> alloy_contract::Event<&P, ExecutionFailure, N> { self.event_filter::() } - ///Creates a new event filter for the [`ExecutionFromModuleFailure`] event. + + ///Creates a new event filter for the [`ExecutionFromModuleFailure`] + /// event. pub fn ExecutionFromModuleFailure_filter( &self, ) -> alloy_contract::Event<&P, ExecutionFromModuleFailure, N> { self.event_filter::() } - ///Creates a new event filter for the [`ExecutionFromModuleSuccess`] event. + + ///Creates a new event filter for the [`ExecutionFromModuleSuccess`] + /// event. pub fn ExecutionFromModuleSuccess_filter( &self, ) -> alloy_contract::Event<&P, ExecutionFromModuleSuccess, N> { self.event_filter::() } + ///Creates a new event filter for the [`ExecutionSuccess`] event. - pub fn ExecutionSuccess_filter( - &self, - ) -> alloy_contract::Event<&P, ExecutionSuccess, N> { + pub fn ExecutionSuccess_filter(&self) -> alloy_contract::Event<&P, ExecutionSuccess, N> { self.event_filter::() } + ///Creates a new event filter for the [`RemovedOwner`] event. pub fn RemovedOwner_filter(&self) -> alloy_contract::Event<&P, RemovedOwner, N> { self.event_filter::() } + ///Creates a new event filter for the [`SafeReceived`] event. pub fn SafeReceived_filter(&self) -> alloy_contract::Event<&P, SafeReceived, N> { self.event_filter::() } + ///Creates a new event filter for the [`SafeSetup`] event. pub fn SafeSetup_filter(&self) -> alloy_contract::Event<&P, SafeSetup, N> { self.event_filter::() } + ///Creates a new event filter for the [`SignMsg`] event. pub fn SignMsg_filter(&self) -> alloy_contract::Event<&P, SignMsg, N> { self.event_filter::() diff --git a/contracts/generated/contracts-generated/gnosissafecompatibilityfallbackhandler/src/lib.rs b/contracts/generated/contracts-generated/gnosissafecompatibilityfallbackhandler/src/lib.rs index 419f867327..ed62c79403 100644 --- a/contracts/generated/contracts-generated/gnosissafecompatibilityfallbackhandler/src/lib.rs +++ b/contracts/generated/contracts-generated/gnosissafecompatibilityfallbackhandler/src/lib.rs @@ -1,4 +1,10 @@ -#![allow(unused_imports, unused_attributes, clippy::all, rustdoc::all, non_snake_case)] +#![allow( + unused_imports, + unused_attributes, + clippy::all, + rustdoc::all, + non_snake_case +)] //! Auto-generated contract bindings. Do not edit. /** @@ -124,8 +130,7 @@ interface GnosisSafeCompatibilityFallbackHandler { clippy::empty_structs_with_brackets )] pub mod GnosisSafeCompatibilityFallbackHandler { - use super::*; - use alloy_sol_types as alloy_sol_types; + use {super::*, alloy_sol_types}; /// The creation / init bytecode of the contract. /// /// ```text @@ -138,14 +143,15 @@ pub mod GnosisSafeCompatibilityFallbackHandler { ); #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `NAME()` and selector `0xa3f4df7e`. -```solidity -function NAME() external view returns (string memory); -```*/ + ```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(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`NAME()`](NAMECall) function. + ///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 { @@ -159,7 +165,7 @@ function NAME() external view returns (string memory); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -168,9 +174,7 @@ function NAME() external view returns (string memory); type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -200,9 +204,7 @@ function NAME() external view returns (string memory); type UnderlyingRustTuple<'a> = (alloy_sol_types::private::String,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -227,68 +229,64 @@ function NAME() external view returns (string memory); #[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 ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (alloy_sol_types::sol_data::String,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "NAME()"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [163u8, 244u8, 223u8, 126u8]; + const SIGNATURE: &'static str = "NAME()"; + #[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, - ), - ) + (::tokenize(ret),) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) - .map(|r| { + 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 - }) + 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(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `VERSION()` and selector `0xffa1ad74`. -```solidity -function VERSION() external view returns (string memory); -```*/ + ```solidity + function VERSION() external view returns (string memory); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct VERSIONCall; #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`VERSION()`](VERSIONCall) function. + ///Container type for the return parameters of the + /// [`VERSION()`](VERSIONCall) function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct VERSIONReturn { @@ -302,7 +300,7 @@ function VERSION() external view returns (string memory); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -311,9 +309,7 @@ function VERSION() external view returns (string memory); type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -343,9 +339,7 @@ function VERSION() external view returns (string memory); type UnderlyingRustTuple<'a> = (alloy_sol_types::private::String,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -370,63 +364,58 @@ function VERSION() external view returns (string memory); #[automatically_derived] impl alloy_sol_types::SolCall for VERSIONCall { type Parameters<'a> = (); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = alloy_sol_types::private::String; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (alloy_sol_types::sol_data::String,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "VERSION()"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [255u8, 161u8, 173u8, 116u8]; + const SIGNATURE: &'static str = "VERSION()"; + #[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, - ), - ) + (::tokenize(ret),) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) - .map(|r| { + as alloy_sol_types::SolType>::abi_decode_sequence(data).map( + |r| { let r: VERSIONReturn = 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: VERSIONReturn = r.into(); - r._0 - }) + 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: VERSIONReturn = r.into(); + r._0 + }) } } }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `isValidSignature(bytes32,bytes)` and selector `0x1626ba7e`. -```solidity -function isValidSignature(bytes32 _dataHash, bytes memory _signature) external view returns (bytes4); -```*/ + ```solidity + function isValidSignature(bytes32 _dataHash, bytes memory _signature) external view returns (bytes4); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct isValidSignature_0Call { @@ -436,7 +425,8 @@ function isValidSignature(bytes32 _dataHash, bytes memory _signature) external v pub _signature: alloy_sol_types::private::Bytes, } #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`isValidSignature(bytes32,bytes)`](isValidSignature_0Call) function. + ///Container type for the return parameters of the + /// [`isValidSignature(bytes32,bytes)`](isValidSignature_0Call) function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct isValidSignature_0Return { @@ -450,7 +440,7 @@ function isValidSignature(bytes32 _dataHash, bytes memory _signature) external v clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -465,9 +455,7 @@ function isValidSignature(bytes32 _dataHash, bytes memory _signature) external v ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -476,16 +464,14 @@ function isValidSignature(bytes32 _dataHash, bytes memory _signature) external v } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From - for UnderlyingRustTuple<'_> { + impl ::core::convert::From for UnderlyingRustTuple<'_> { fn from(value: isValidSignature_0Call) -> Self { (value._dataHash, value._signature) } } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From> - for isValidSignature_0Call { + impl ::core::convert::From> for isValidSignature_0Call { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { Self { _dataHash: tuple.0, @@ -502,9 +488,7 @@ function isValidSignature(bytes32 _dataHash, bytes memory _signature) external v 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, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -513,16 +497,14 @@ function isValidSignature(bytes32 _dataHash, bytes memory _signature) external v } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From - for UnderlyingRustTuple<'_> { + impl ::core::convert::From for UnderlyingRustTuple<'_> { fn from(value: isValidSignature_0Return) -> Self { (value._0,) } } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From> - for isValidSignature_0Return { + impl ::core::convert::From> for isValidSignature_0Return { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { Self { _0: tuple.0 } } @@ -534,22 +516,21 @@ function isValidSignature(bytes32 _dataHash, bytes memory _signature) external v alloy_sol_types::sol_data::FixedBytes<32>, alloy_sol_types::sol_data::Bytes, ); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = alloy_sol_types::private::FixedBytes<4>; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (alloy_sol_types::sol_data::FixedBytes<4>,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "isValidSignature(bytes32,bytes)"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [22u8, 38u8, 186u8, 126u8]; + const SIGNATURE: &'static str = "isValidSignature(bytes32,bytes)"; + #[inline] fn new<'a>( tuple: as alloy_sol_types::SolType>::RustType, ) -> Self { tuple.into() } + #[inline] fn tokenize(&self) -> Self::Token<'_> { ( @@ -561,6 +542,7 @@ function isValidSignature(bytes32 _dataHash, bytes memory _signature) external v ), ) } + #[inline] fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { ( @@ -569,35 +551,34 @@ function isValidSignature(bytes32 _dataHash, bytes memory _signature) external v > 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| { + as alloy_sol_types::SolType>::abi_decode_sequence(data).map( + |r| { let r: isValidSignature_0Return = 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: isValidSignature_0Return = r.into(); - r._0 - }) + 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: isValidSignature_0Return = r.into(); + r._0 + }) } } }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `isValidSignature(bytes,bytes)` and selector `0x20c13b0b`. -```solidity -function isValidSignature(bytes memory _data, bytes memory _signature) external view returns (bytes4); -```*/ + ```solidity + function isValidSignature(bytes memory _data, bytes memory _signature) external view returns (bytes4); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct isValidSignature_1Call { @@ -607,7 +588,8 @@ function isValidSignature(bytes memory _data, bytes memory _signature) external pub _signature: alloy_sol_types::private::Bytes, } #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`isValidSignature(bytes,bytes)`](isValidSignature_1Call) function. + ///Container type for the return parameters of the + /// [`isValidSignature(bytes,bytes)`](isValidSignature_1Call) function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct isValidSignature_1Return { @@ -621,7 +603,7 @@ function isValidSignature(bytes memory _data, bytes memory _signature) external clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -636,9 +618,7 @@ function isValidSignature(bytes memory _data, bytes memory _signature) external ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -647,16 +627,14 @@ function isValidSignature(bytes memory _data, bytes memory _signature) external } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From - for UnderlyingRustTuple<'_> { + impl ::core::convert::From for UnderlyingRustTuple<'_> { fn from(value: isValidSignature_1Call) -> Self { (value._data, value._signature) } } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From> - for isValidSignature_1Call { + impl ::core::convert::From> for isValidSignature_1Call { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { Self { _data: tuple.0, @@ -673,9 +651,7 @@ function isValidSignature(bytes memory _data, bytes memory _signature) external 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, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -684,16 +660,14 @@ function isValidSignature(bytes memory _data, bytes memory _signature) external } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From - for UnderlyingRustTuple<'_> { + impl ::core::convert::From for UnderlyingRustTuple<'_> { fn from(value: isValidSignature_1Return) -> Self { (value._0,) } } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From> - for isValidSignature_1Return { + impl ::core::convert::From> for isValidSignature_1Return { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { Self { _0: tuple.0 } } @@ -705,22 +679,21 @@ function isValidSignature(bytes memory _data, bytes memory _signature) external alloy_sol_types::sol_data::Bytes, alloy_sol_types::sol_data::Bytes, ); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = alloy_sol_types::private::FixedBytes<4>; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (alloy_sol_types::sol_data::FixedBytes<4>,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "isValidSignature(bytes,bytes)"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [32u8, 193u8, 59u8, 11u8]; + const SIGNATURE: &'static str = "isValidSignature(bytes,bytes)"; + #[inline] fn new<'a>( tuple: as alloy_sol_types::SolType>::RustType, ) -> Self { tuple.into() } + #[inline] fn tokenize(&self) -> Self::Token<'_> { ( @@ -732,6 +705,7 @@ function isValidSignature(bytes memory _data, bytes memory _signature) external ), ) } + #[inline] fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { ( @@ -740,35 +714,34 @@ function isValidSignature(bytes memory _data, bytes memory _signature) external > 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| { + as alloy_sol_types::SolType>::abi_decode_sequence(data).map( + |r| { let r: isValidSignature_1Return = 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: isValidSignature_1Return = r.into(); - r._0 - }) + 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: isValidSignature_1Return = r.into(); + r._0 + }) } } }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `simulate(address,bytes)` and selector `0xbd61951d`. -```solidity -function simulate(address targetContract, bytes memory calldataPayload) external returns (bytes memory response); -```*/ + ```solidity + function simulate(address targetContract, bytes memory calldataPayload) external returns (bytes memory response); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct simulateCall { @@ -778,7 +751,8 @@ function simulate(address targetContract, bytes memory calldataPayload) external pub calldataPayload: alloy_sol_types::private::Bytes, } #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`simulate(address,bytes)`](simulateCall) function. + ///Container type for the return parameters of the + /// [`simulate(address,bytes)`](simulateCall) function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct simulateReturn { @@ -792,7 +766,7 @@ function simulate(address targetContract, bytes memory calldataPayload) external clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -807,9 +781,7 @@ function simulate(address targetContract, bytes memory calldataPayload) external ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -842,9 +814,7 @@ function simulate(address targetContract, bytes memory calldataPayload) external type UnderlyingRustTuple<'a> = (alloy_sol_types::private::Bytes,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -872,22 +842,21 @@ function simulate(address targetContract, bytes memory calldataPayload) external alloy_sol_types::sol_data::Address, alloy_sol_types::sol_data::Bytes, ); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = alloy_sol_types::private::Bytes; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (alloy_sol_types::sol_data::Bytes,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "simulate(address,bytes)"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [189u8, 97u8, 149u8, 29u8]; + const SIGNATURE: &'static str = "simulate(address,bytes)"; + #[inline] fn new<'a>( tuple: as alloy_sol_types::SolType>::RustType, ) -> Self { tuple.into() } + #[inline] fn tokenize(&self) -> Self::Token<'_> { ( @@ -899,41 +868,37 @@ function simulate(address targetContract, bytes memory calldataPayload) external ), ) } + #[inline] fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { - ( - ::tokenize( - ret, - ), - ) + (::tokenize(ret),) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) - .map(|r| { + as alloy_sol_types::SolType>::abi_decode_sequence(data).map( + |r| { let r: simulateReturn = r.into(); r.response - }) + }, + ) } + #[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: simulateReturn = r.into(); - r.response - }) + 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: simulateReturn = r.into(); + r.response + }) } } }; - ///Container for all the [`GnosisSafeCompatibilityFallbackHandler`](self) function calls. + ///Container for all the [`GnosisSafeCompatibilityFallbackHandler`](self) + /// function calls. #[derive(Clone)] - #[derive()] pub enum GnosisSafeCompatibilityFallbackHandlerCalls { #[allow(missing_docs)] NAME(NAMECall), @@ -949,8 +914,9 @@ function simulate(address targetContract, bytes memory calldataPayload) external impl GnosisSafeCompatibilityFallbackHandlerCalls { /// 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. + /// 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]] = &[ @@ -960,14 +926,6 @@ function simulate(address targetContract, bytes memory calldataPayload) external [189u8, 97u8, 149u8, 29u8], [255u8, 161u8, 173u8, 116u8], ]; - /// The names of the variants in the same order as `SELECTORS`. - pub const VARIANT_NAMES: &'static [&'static str] = &[ - ::core::stringify!(isValidSignature_0), - ::core::stringify!(isValidSignature_1), - ::core::stringify!(NAME), - ::core::stringify!(simulate), - ::core::stringify!(VERSION), - ]; /// The signatures in the same order as `SELECTORS`. pub const SIGNATURES: &'static [&'static str] = &[ ::SIGNATURE, @@ -976,6 +934,15 @@ function simulate(address targetContract, bytes memory calldataPayload) external ::SIGNATURE, ::SIGNATURE, ]; + /// The names of the variants in the same order as `SELECTORS`. + pub const VARIANT_NAMES: &'static [&'static str] = &[ + ::core::stringify!(isValidSignature_0), + ::core::stringify!(isValidSignature_1), + ::core::stringify!(NAME), + ::core::stringify!(simulate), + ::core::stringify!(VERSION), + ]; + /// Returns the signature for the given selector, if known. #[inline] pub fn signature_by_selector( @@ -988,20 +955,20 @@ function simulate(address targetContract, bytes memory calldataPayload) external ::core::result::Result::Err(_) => ::core::option::Option::None, } } + /// Returns the enum variant name for the given selector, if known. #[inline] - pub fn name_by_selector( - selector: [u8; 4usize], - ) -> ::core::option::Option<&'static str> { + pub fn name_by_selector(selector: [u8; 4usize]) -> ::core::option::Option<&'static str> { let sig = Self::signature_by_selector(selector)?; sig.split_once('(').map(|(name, _)| name) } } #[automatically_derived] impl alloy_sol_types::SolInterface for GnosisSafeCompatibilityFallbackHandlerCalls { - const NAME: &'static str = "GnosisSafeCompatibilityFallbackHandlerCalls"; - const MIN_DATA_LENGTH: usize = 0usize; const COUNT: usize = 5usize; + const MIN_DATA_LENGTH: usize = 0usize; + const NAME: &'static str = "GnosisSafeCompatibilityFallbackHandlerCalls"; + #[inline] fn selector(&self) -> [u8; 4] { match self { @@ -1016,59 +983,50 @@ function simulate(address targetContract, bytes memory calldataPayload) external Self::simulate(_) => ::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 { + fn abi_decode_raw(selector: [u8; 4], data: &[u8]) -> alloy_sol_types::Result { static DECODE_SHIMS: &[fn( &[u8], - ) -> alloy_sol_types::Result] = &[ + ) -> alloy_sol_types::Result< + GnosisSafeCompatibilityFallbackHandlerCalls, + >] = &[ { fn isValidSignature_0( data: &[u8], - ) -> alloy_sol_types::Result< - GnosisSafeCompatibilityFallbackHandlerCalls, - > { - ::abi_decode_raw( - data, - ) - .map( - GnosisSafeCompatibilityFallbackHandlerCalls::isValidSignature_0, - ) + ) -> alloy_sol_types::Result + { + ::abi_decode_raw(data) + .map(GnosisSafeCompatibilityFallbackHandlerCalls::isValidSignature_0) } isValidSignature_0 }, { fn isValidSignature_1( data: &[u8], - ) -> alloy_sol_types::Result< - GnosisSafeCompatibilityFallbackHandlerCalls, - > { - ::abi_decode_raw( - data, - ) - .map( - GnosisSafeCompatibilityFallbackHandlerCalls::isValidSignature_1, - ) + ) -> alloy_sol_types::Result + { + ::abi_decode_raw(data) + .map(GnosisSafeCompatibilityFallbackHandlerCalls::isValidSignature_1) } isValidSignature_1 }, { fn NAME( data: &[u8], - ) -> alloy_sol_types::Result< - GnosisSafeCompatibilityFallbackHandlerCalls, - > { + ) -> alloy_sol_types::Result + { ::abi_decode_raw(data) .map(GnosisSafeCompatibilityFallbackHandlerCalls::NAME) } @@ -1077,9 +1035,8 @@ function simulate(address targetContract, bytes memory calldataPayload) external { fn simulate( data: &[u8], - ) -> alloy_sol_types::Result< - GnosisSafeCompatibilityFallbackHandlerCalls, - > { + ) -> alloy_sol_types::Result + { ::abi_decode_raw(data) .map(GnosisSafeCompatibilityFallbackHandlerCalls::simulate) } @@ -1088,9 +1045,8 @@ function simulate(address targetContract, bytes memory calldataPayload) external { fn VERSION( data: &[u8], - ) -> alloy_sol_types::Result< - GnosisSafeCompatibilityFallbackHandlerCalls, - > { + ) -> alloy_sol_types::Result + { ::abi_decode_raw(data) .map(GnosisSafeCompatibilityFallbackHandlerCalls::VERSION) } @@ -1098,15 +1054,14 @@ function simulate(address targetContract, bytes memory calldataPayload) external }, ]; let Ok(idx) = Self::SELECTORS.binary_search(&selector) else { - return Err( - alloy_sol_types::Error::unknown_selector( - ::NAME, - selector, - ), - ); + return Err(alloy_sol_types::Error::unknown_selector( + ::NAME, + selector, + )); }; DECODE_SHIMS[idx](data) } + #[inline] #[allow(non_snake_case)] fn abi_decode_raw_validate( @@ -1115,13 +1070,14 @@ function simulate(address targetContract, bytes memory calldataPayload) external ) -> alloy_sol_types::Result { static DECODE_VALIDATE_SHIMS: &[fn( &[u8], - ) -> alloy_sol_types::Result] = &[ + ) -> alloy_sol_types::Result< + GnosisSafeCompatibilityFallbackHandlerCalls, + >] = &[ { fn isValidSignature_0( data: &[u8], - ) -> alloy_sol_types::Result< - GnosisSafeCompatibilityFallbackHandlerCalls, - > { + ) -> alloy_sol_types::Result + { ::abi_decode_raw_validate( data, ) @@ -1134,9 +1090,8 @@ function simulate(address targetContract, bytes memory calldataPayload) external { fn isValidSignature_1( data: &[u8], - ) -> alloy_sol_types::Result< - GnosisSafeCompatibilityFallbackHandlerCalls, - > { + ) -> alloy_sol_types::Result + { ::abi_decode_raw_validate( data, ) @@ -1149,12 +1104,9 @@ function simulate(address targetContract, bytes memory calldataPayload) external { fn NAME( data: &[u8], - ) -> alloy_sol_types::Result< - GnosisSafeCompatibilityFallbackHandlerCalls, - > { - ::abi_decode_raw_validate( - data, - ) + ) -> alloy_sol_types::Result + { + ::abi_decode_raw_validate(data) .map(GnosisSafeCompatibilityFallbackHandlerCalls::NAME) } NAME @@ -1162,12 +1114,9 @@ function simulate(address targetContract, bytes memory calldataPayload) external { fn simulate( data: &[u8], - ) -> alloy_sol_types::Result< - GnosisSafeCompatibilityFallbackHandlerCalls, - > { - ::abi_decode_raw_validate( - data, - ) + ) -> alloy_sol_types::Result + { + ::abi_decode_raw_validate(data) .map(GnosisSafeCompatibilityFallbackHandlerCalls::simulate) } simulate @@ -1175,27 +1124,23 @@ function simulate(address targetContract, bytes memory calldataPayload) external { fn VERSION( data: &[u8], - ) -> alloy_sol_types::Result< - GnosisSafeCompatibilityFallbackHandlerCalls, - > { - ::abi_decode_raw_validate( - data, - ) + ) -> alloy_sol_types::Result + { + ::abi_decode_raw_validate(data) .map(GnosisSafeCompatibilityFallbackHandlerCalls::VERSION) } VERSION }, ]; let Ok(idx) = Self::SELECTORS.binary_search(&selector) else { - return Err( - alloy_sol_types::Error::unknown_selector( - ::NAME, - selector, - ), - ); + return Err(alloy_sol_types::Error::unknown_selector( + ::NAME, + selector, + )); }; DECODE_VALIDATE_SHIMS[idx](data) } + #[inline] fn abi_encoded_size(&self) -> usize { match self { @@ -1206,20 +1151,17 @@ function simulate(address targetContract, bytes memory calldataPayload) external ::abi_encoded_size(inner) } Self::isValidSignature_0(inner) => { - ::abi_encoded_size( - inner, - ) + ::abi_encoded_size(inner) } Self::isValidSignature_1(inner) => { - ::abi_encoded_size( - inner, - ) + ::abi_encoded_size(inner) } Self::simulate(inner) => { ::abi_encoded_size(inner) } } } + #[inline] fn abi_encode_raw(&self, out: &mut alloy_sol_types::private::Vec) { match self { @@ -1230,30 +1172,21 @@ function simulate(address targetContract, bytes memory calldataPayload) external ::abi_encode_raw(inner, out) } Self::isValidSignature_0(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } Self::isValidSignature_1(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } Self::simulate(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } } } } - use alloy_contract as alloy_contract; + use alloy_contract; /**Creates a new wrapper around an on-chain [`GnosisSafeCompatibilityFallbackHandler`](self) contract instance. -See the [wrapper's documentation](`GnosisSafeCompatibilityFallbackHandlerInstance`) for more details.*/ + See the [wrapper's documentation](`GnosisSafeCompatibilityFallbackHandlerInstance`) for more details.*/ #[inline] pub const fn new< P: alloy_contract::private::Provider, @@ -1266,48 +1199,42 @@ See the [wrapper's documentation](`GnosisSafeCompatibilityFallbackHandlerInstanc } /**Deploys this contract using the given `provider` and constructor arguments, if any. -Returns a new instance of the contract, if the deployment was successful. + 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.*/ + 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, - >( + pub fn deploy, N: alloy_contract::private::Network>( __provider: P, ) -> impl ::core::future::Future< - Output = alloy_contract::Result< - GnosisSafeCompatibilityFallbackHandlerInstance, - >, + Output = alloy_contract::Result>, > { GnosisSafeCompatibilityFallbackHandlerInstance::::deploy(__provider) } /**Creates a `RawCallBuilder` for deploying this contract using the given `provider` -and constructor arguments, if any. + 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.*/ + 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) -> alloy_contract::RawCallBuilder { - GnosisSafeCompatibilityFallbackHandlerInstance::< - P, - N, - >::deploy_builder(__provider) + >( + __provider: P, + ) -> alloy_contract::RawCallBuilder { + GnosisSafeCompatibilityFallbackHandlerInstance::::deploy_builder(__provider) } /**A [`GnosisSafeCompatibilityFallbackHandler`](self) instance. -Contains type-safe methods for interacting with an on-chain instance of the -[`GnosisSafeCompatibilityFallbackHandler`](self) contract located at a given `address`, using a given -provider `P`. + Contains type-safe methods for interacting with an on-chain instance of the + [`GnosisSafeCompatibilityFallbackHandler`](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. + 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.*/ + See the [module-level documentation](self) for all the available methods.*/ #[derive(Clone)] pub struct GnosisSafeCompatibilityFallbackHandlerInstance< P, @@ -1318,8 +1245,7 @@ See the [module-level documentation](self) for all the available methods.*/ _network: ::core::marker::PhantomData, } #[automatically_derived] - impl ::core::fmt::Debug - for GnosisSafeCompatibilityFallbackHandlerInstance { + impl ::core::fmt::Debug for GnosisSafeCompatibilityFallbackHandlerInstance { #[inline] fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { f.debug_tuple("GnosisSafeCompatibilityFallbackHandlerInstance") @@ -1328,44 +1254,40 @@ See the [module-level documentation](self) for all the available methods.*/ } } /// Instantiation and getters/setters. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > GnosisSafeCompatibilityFallbackHandlerInstance { + impl, N: alloy_contract::private::Network> + GnosisSafeCompatibilityFallbackHandlerInstance + { /**Creates a new wrapper around an on-chain [`GnosisSafeCompatibilityFallbackHandler`](self) contract instance. -See the [wrapper's documentation](`GnosisSafeCompatibilityFallbackHandlerInstance`) for more details.*/ + See the [wrapper's documentation](`GnosisSafeCompatibilityFallbackHandlerInstance`) for more details.*/ #[inline] - pub const fn new( - address: alloy_sol_types::private::Address, - __provider: P, - ) -> Self { + pub const fn new(address: alloy_sol_types::private::Address, __provider: P) -> Self { Self { address, provider: __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. + 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.*/ + For more fine-grained control over the deployment process, use [`deploy_builder`] instead.*/ #[inline] pub async fn deploy( __provider: P, - ) -> alloy_contract::Result< - GnosisSafeCompatibilityFallbackHandlerInstance, - > { + ) -> 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. + 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.*/ + 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( @@ -1373,36 +1295,36 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ ::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< - P: ::core::clone::Clone, - N, - > GnosisSafeCompatibilityFallbackHandlerInstance<&P, N> { - /// Clones the provider and returns a new instance with the cloned provider. + impl GnosisSafeCompatibilityFallbackHandlerInstance<&P, N> { + /// Clones the provider and returns a new instance with the cloned + /// provider. #[inline] - pub fn with_cloned_provider( - self, - ) -> GnosisSafeCompatibilityFallbackHandlerInstance { + pub fn with_cloned_provider(self) -> GnosisSafeCompatibilityFallbackHandlerInstance { GnosisSafeCompatibilityFallbackHandlerInstance { address: self.address, provider: ::core::clone::Clone::clone(&self.provider), @@ -1411,77 +1333,75 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ } } /// Function calls. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > GnosisSafeCompatibilityFallbackHandlerInstance { - /// Creates a new call builder using this contract instance's provider and address. + impl, N: alloy_contract::private::Network> + GnosisSafeCompatibilityFallbackHandlerInstance + { + /// 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. + /// 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 [`NAME`] function. pub fn NAME(&self) -> alloy_contract::SolCallBuilder<&P, NAMECall, N> { self.call_builder(&NAMECall) } + ///Creates a new call builder for the [`VERSION`] function. pub fn VERSION(&self) -> alloy_contract::SolCallBuilder<&P, VERSIONCall, N> { self.call_builder(&VERSIONCall) } + ///Creates a new call builder for the [`isValidSignature_0`] function. pub fn isValidSignature_0( &self, _dataHash: alloy_sol_types::private::FixedBytes<32>, _signature: alloy_sol_types::private::Bytes, ) -> alloy_contract::SolCallBuilder<&P, isValidSignature_0Call, N> { - self.call_builder( - &isValidSignature_0Call { - _dataHash, - _signature, - }, - ) + self.call_builder(&isValidSignature_0Call { + _dataHash, + _signature, + }) } + ///Creates a new call builder for the [`isValidSignature_1`] function. pub fn isValidSignature_1( &self, _data: alloy_sol_types::private::Bytes, _signature: alloy_sol_types::private::Bytes, ) -> alloy_contract::SolCallBuilder<&P, isValidSignature_1Call, N> { - self.call_builder( - &isValidSignature_1Call { - _data, - _signature, - }, - ) + self.call_builder(&isValidSignature_1Call { _data, _signature }) } + ///Creates a new call builder for the [`simulate`] function. pub fn simulate( &self, targetContract: alloy_sol_types::private::Address, calldataPayload: alloy_sol_types::private::Bytes, ) -> alloy_contract::SolCallBuilder<&P, simulateCall, N> { - self.call_builder( - &simulateCall { - targetContract, - calldataPayload, - }, - ) + self.call_builder(&simulateCall { + targetContract, + calldataPayload, + }) } } /// Event filters. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > GnosisSafeCompatibilityFallbackHandlerInstance { - /// Creates a new event filter using this contract instance's provider and address. + impl, N: alloy_contract::private::Network> + GnosisSafeCompatibilityFallbackHandlerInstance + { + /// 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. + /// 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> { @@ -1489,6 +1409,7 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ } } } -pub type Instance = GnosisSafeCompatibilityFallbackHandler::GnosisSafeCompatibilityFallbackHandlerInstance< - ::alloy_provider::DynProvider, ->; +pub type Instance = + GnosisSafeCompatibilityFallbackHandler::GnosisSafeCompatibilityFallbackHandlerInstance< + ::alloy_provider::DynProvider, + >; diff --git a/contracts/generated/contracts-generated/gnosissafeproxy/src/lib.rs b/contracts/generated/contracts-generated/gnosissafeproxy/src/lib.rs index 371cc36ae8..28b7fbe126 100644 --- a/contracts/generated/contracts-generated/gnosissafeproxy/src/lib.rs +++ b/contracts/generated/contracts-generated/gnosissafeproxy/src/lib.rs @@ -1,4 +1,10 @@ -#![allow(unused_imports, unused_attributes, clippy::all, rustdoc::all, non_snake_case)] +#![allow( + unused_imports, + unused_attributes, + clippy::all, + rustdoc::all, + non_snake_case +)] //! Auto-generated contract bindings. Do not edit. /** @@ -39,8 +45,7 @@ interface GnosisSafeProxy { clippy::empty_structs_with_brackets )] pub mod GnosisSafeProxy { - use super::*; - use alloy_sol_types as alloy_sol_types; + use {super::*, alloy_sol_types}; /// The creation / init bytecode of the contract. /// /// ```text @@ -52,9 +57,9 @@ pub mod GnosisSafeProxy { b"`\x80`@R4\x80\x15a\0\x10W`\0\x80\xFD[P`@Qa\x01\xE68\x03\x80a\x01\xE6\x839\x81\x81\x01`@R` \x81\x10\x15a\x003W`\0\x80\xFD[\x81\x01\x90\x80\x80Q\x90` \x01\x90\x92\x91\x90PPP`\0s\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\x14\x15a\0\xCAW`@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\x01\x80\x80` \x01\x82\x81\x03\x82R`\"\x81R` \x01\x80a\x01\xC4`\"\x919`@\x01\x91PP`@Q\x80\x91\x03\x90\xFD[\x80`\0\x80a\x01\0\n\x81T\x81s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x02\x19\x16\x90\x83s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x02\x17\x90UPP`\xAB\x80a\x01\x19`\09`\0\xF3\xFE`\x80`@Rs\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF`\0T\x16\x7F\xA6\x19Hn\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`\x005\x14\x15`PW\x80`\0R` `\0\xF3[6`\0\x807`\0\x806`\0\x84Z\xF4=`\0\x80>`\0\x81\x14\x15`pW=`\0\xFD[=`\0\xF3\xFE\xA2dipfsX\"\x12 \xD1B\x92\x974\x96S\xA4\x91\x80v\xD6P3-\xE1\xA1\x06\x8C_>\x07\xC5\xC8#`\xC2ww\x0B\x95RdsolcC\0\x07\x06\x003Invalid singleton address provided", ); /**Constructor`. -```solidity -constructor(address _singleton); -```*/ + ```solidity + constructor(address _singleton); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct constructorCall { @@ -62,7 +67,7 @@ constructor(address _singleton); pub _singleton: alloy_sol_types::private::Address, } const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -71,9 +76,7 @@ constructor(address _singleton); type UnderlyingRustTuple<'a> = (alloy_sol_types::private::Address,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -91,22 +94,24 @@ constructor(address _singleton); #[doc(hidden)] impl ::core::convert::From> for constructorCall { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { - Self { _singleton: tuple.0 } + Self { + _singleton: tuple.0, + } } } } #[automatically_derived] impl alloy_sol_types::SolConstructor for constructorCall { type Parameters<'a> = (alloy_sol_types::sol_data::Address,); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + 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<'_> { ( @@ -117,10 +122,10 @@ constructor(address _singleton); } } }; - use alloy_contract as alloy_contract; + use alloy_contract; /**Creates a new wrapper around an on-chain [`GnosisSafeProxy`](self) contract instance. -See the [wrapper's documentation](`GnosisSafeProxyInstance`) for more details.*/ + See the [wrapper's documentation](`GnosisSafeProxyInstance`) for more details.*/ #[inline] pub const fn new< P: alloy_contract::private::Provider, @@ -133,26 +138,22 @@ See the [wrapper's documentation](`GnosisSafeProxyInstance`) for more details.*/ } /**Deploys this contract using the given `provider` and constructor arguments, if any. -Returns a new instance of the contract, if the deployment was successful. + 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.*/ + 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, - >( + pub fn deploy, N: alloy_contract::private::Network>( __provider: P, _singleton: alloy_sol_types::private::Address, - ) -> impl ::core::future::Future< - Output = alloy_contract::Result>, - > { + ) -> impl ::core::future::Future>> + { GnosisSafeProxyInstance::::deploy(__provider, _singleton) } /**Creates a `RawCallBuilder` for deploying this contract using the given `provider` -and constructor arguments, if any. + 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.*/ + 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, @@ -165,15 +166,15 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ } /**A [`GnosisSafeProxy`](self) instance. -Contains type-safe methods for interacting with an on-chain instance of the -[`GnosisSafeProxy`](self) contract located at a given `address`, using a given -provider `P`. + Contains type-safe methods for interacting with an on-chain instance of the + [`GnosisSafeProxy`](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. + 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.*/ + See the [module-level documentation](self) for all the available methods.*/ #[derive(Clone)] pub struct GnosisSafeProxyInstance { address: alloy_sol_types::private::Address, @@ -184,33 +185,32 @@ See the [module-level documentation](self) for all the available methods.*/ impl ::core::fmt::Debug for GnosisSafeProxyInstance { #[inline] fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { - f.debug_tuple("GnosisSafeProxyInstance").field(&self.address).finish() + f.debug_tuple("GnosisSafeProxyInstance") + .field(&self.address) + .finish() } } /// Instantiation and getters/setters. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > GnosisSafeProxyInstance { + impl, N: alloy_contract::private::Network> + GnosisSafeProxyInstance + { /**Creates a new wrapper around an on-chain [`GnosisSafeProxy`](self) contract instance. -See the [wrapper's documentation](`GnosisSafeProxyInstance`) for more details.*/ + See the [wrapper's documentation](`GnosisSafeProxyInstance`) for more details.*/ #[inline] - pub const fn new( - address: alloy_sol_types::private::Address, - __provider: P, - ) -> Self { + pub const fn new(address: alloy_sol_types::private::Address, __provider: P) -> Self { Self { address, provider: __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. + 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.*/ + For more fine-grained control over the deployment process, use [`deploy_builder`] instead.*/ #[inline] pub async fn deploy( __provider: P, @@ -220,11 +220,12 @@ For more fine-grained control over the deployment process, use [`deploy_builder` 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. + 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.*/ + 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, @@ -242,21 +243,25 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ .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 { @@ -264,7 +269,8 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ } } impl GnosisSafeProxyInstance<&P, N> { - /// Clones the provider and returns a new instance with the cloned provider. + /// Clones the provider and returns a new instance with the cloned + /// provider. #[inline] pub fn with_cloned_provider(self) -> GnosisSafeProxyInstance { GnosisSafeProxyInstance { @@ -275,14 +281,15 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ } } /// Function calls. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > GnosisSafeProxyInstance { - /// Creates a new call builder using this contract instance's provider and address. + impl, N: alloy_contract::private::Network> + GnosisSafeProxyInstance + { + /// 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. + /// 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, @@ -291,14 +298,15 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ } } /// Event filters. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > GnosisSafeProxyInstance { - /// Creates a new event filter using this contract instance's provider and address. + impl, N: alloy_contract::private::Network> + GnosisSafeProxyInstance + { + /// 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. + /// 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> { @@ -306,6 +314,4 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ } } } -pub type Instance = GnosisSafeProxy::GnosisSafeProxyInstance< - ::alloy_provider::DynProvider, ->; +pub type Instance = GnosisSafeProxy::GnosisSafeProxyInstance<::alloy_provider::DynProvider>; diff --git a/contracts/generated/contracts-generated/gnosissafeproxyfactory/src/lib.rs b/contracts/generated/contracts-generated/gnosissafeproxyfactory/src/lib.rs index 7185ed0508..8a43d2404b 100644 --- a/contracts/generated/contracts-generated/gnosissafeproxyfactory/src/lib.rs +++ b/contracts/generated/contracts-generated/gnosissafeproxyfactory/src/lib.rs @@ -1,4 +1,10 @@ -#![allow(unused_imports, unused_attributes, clippy::all, rustdoc::all, non_snake_case)] +#![allow( + unused_imports, + unused_attributes, + clippy::all, + rustdoc::all, + non_snake_case +)] //! Auto-generated contract bindings. Do not edit. /** @@ -67,8 +73,7 @@ interface GnosisSafeProxyFactory { clippy::empty_structs_with_brackets )] pub mod GnosisSafeProxyFactory { - use super::*; - use alloy_sol_types as alloy_sol_types; + use {super::*, alloy_sol_types}; /// The creation / init bytecode of the contract. /// /// ```text @@ -81,9 +86,9 @@ pub mod GnosisSafeProxyFactory { ); #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Event with signature `ProxyCreation(address,address)` and selector `0x4f51faf6c4561ff95f067657e43439f0f856d97c04d9ec9070a6199ad418e235`. -```solidity -event ProxyCreation(address proxy, address singleton); -```*/ + ```solidity + event ProxyCreation(address proxy, address singleton); + ```*/ #[allow( non_camel_case_types, non_snake_case, @@ -104,24 +109,25 @@ event ProxyCreation(address proxy, address singleton); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[automatically_derived] impl alloy_sol_types::SolEvent for ProxyCreation { + type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type DataTuple<'a> = ( alloy_sol_types::sol_data::Address, 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 = "ProxyCreation(address,address)"; - const SIGNATURE_HASH: alloy_sol_types::private::B256 = alloy_sol_types::private::B256::new([ - 79u8, 81u8, 250u8, 246u8, 196u8, 86u8, 31u8, 249u8, 95u8, 6u8, 118u8, - 87u8, 228u8, 52u8, 57u8, 240u8, 248u8, 86u8, 217u8, 124u8, 4u8, 217u8, - 236u8, 144u8, 112u8, 166u8, 25u8, 154u8, 212u8, 24u8, 226u8, 53u8, - ]); + const ANONYMOUS: bool = false; + const SIGNATURE: &'static str = "ProxyCreation(address,address)"; + const SIGNATURE_HASH: alloy_sol_types::private::B256 = + alloy_sol_types::private::B256::new([ + 79u8, 81u8, 250u8, 246u8, 196u8, 86u8, 31u8, 249u8, 95u8, 6u8, 118u8, 87u8, + 228u8, 52u8, 57u8, 240u8, 248u8, 86u8, 217u8, 124u8, 4u8, 217u8, 236u8, 144u8, + 112u8, 166u8, 25u8, 154u8, 212u8, 24u8, 226u8, 53u8, + ]); + #[allow(unused_variables)] #[inline] fn new( @@ -133,21 +139,21 @@ event ProxyCreation(address proxy, address singleton); singleton: 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, - ), - ); + 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<'_> { ( @@ -159,10 +165,12 @@ event ProxyCreation(address proxy, address singleton); ), ) } + #[inline] fn topics(&self) -> ::RustType { (Self::SIGNATURE_HASH.into(),) } + #[inline] fn encode_topics_raw( &self, @@ -171,9 +179,7 @@ event ProxyCreation(address proxy, address singleton); if out.len() < ::COUNT { return Err(alloy_sol_types::Error::Overrun); } - out[0usize] = alloy_sol_types::abi::token::WordToken( - Self::SIGNATURE_HASH, - ); + out[0usize] = alloy_sol_types::abi::token::WordToken(Self::SIGNATURE_HASH); Ok(()) } } @@ -182,6 +188,7 @@ event ProxyCreation(address proxy, address singleton); 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) } @@ -196,9 +203,9 @@ event ProxyCreation(address proxy, address singleton); }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `createProxy(address,bytes)` and selector `0x61b69abd`. -```solidity -function createProxy(address singleton, bytes memory data) external returns (address proxy); -```*/ + ```solidity + function createProxy(address singleton, bytes memory data) external returns (address proxy); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct createProxyCall { @@ -208,7 +215,8 @@ function createProxy(address singleton, bytes memory data) external returns (add pub data: alloy_sol_types::private::Bytes, } #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`createProxy(address,bytes)`](createProxyCall) function. + ///Container type for the return parameters of the + /// [`createProxy(address,bytes)`](createProxyCall) function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct createProxyReturn { @@ -222,7 +230,7 @@ function createProxy(address singleton, bytes memory data) external returns (add clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -237,9 +245,7 @@ function createProxy(address singleton, bytes memory data) external returns (add ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -272,9 +278,7 @@ function createProxy(address singleton, bytes memory data) external returns (add type UnderlyingRustTuple<'a> = (alloy_sol_types::private::Address,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -302,22 +306,21 @@ function createProxy(address singleton, bytes memory data) external returns (add alloy_sol_types::sol_data::Address, alloy_sol_types::sol_data::Bytes, ); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = alloy_sol_types::private::Address; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (alloy_sol_types::sol_data::Address,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "createProxy(address,bytes)"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [97u8, 182u8, 154u8, 189u8]; + const SIGNATURE: &'static str = "createProxy(address,bytes)"; + #[inline] fn new<'a>( tuple: as alloy_sol_types::SolType>::RustType, ) -> Self { tuple.into() } + #[inline] fn tokenize(&self) -> Self::Token<'_> { ( @@ -329,41 +332,36 @@ function createProxy(address singleton, bytes memory data) external returns (add ), ) } + #[inline] fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { - ( - ::tokenize( - ret, - ), - ) + (::tokenize(ret),) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) - .map(|r| { + as alloy_sol_types::SolType>::abi_decode_sequence(data).map( + |r| { let r: createProxyReturn = r.into(); r.proxy - }) + }, + ) } + #[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: createProxyReturn = r.into(); - r.proxy - }) + 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: createProxyReturn = r.into(); + r.proxy + }) } } }; ///Container for all the [`GnosisSafeProxyFactory`](self) function calls. #[derive(Clone)] - #[derive()] pub enum GnosisSafeProxyFactoryCalls { #[allow(missing_docs)] createProxy(createProxyCall), @@ -371,19 +369,18 @@ function createProxy(address singleton, bytes memory data) external returns (add impl GnosisSafeProxyFactoryCalls { /// 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. + /// 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]] = &[[97u8, 182u8, 154u8, 189u8]]; - /// The names of the variants in the same order as `SELECTORS`. - pub const VARIANT_NAMES: &'static [&'static str] = &[ - ::core::stringify!(createProxy), - ]; /// The signatures in the same order as `SELECTORS`. - pub const SIGNATURES: &'static [&'static str] = &[ - ::SIGNATURE, - ]; + pub const SIGNATURES: &'static [&'static str] = + &[::SIGNATURE]; + /// The names of the variants in the same order as `SELECTORS`. + pub const VARIANT_NAMES: &'static [&'static str] = &[::core::stringify!(createProxy)]; + /// Returns the signature for the given selector, if known. #[inline] pub fn signature_by_selector( @@ -396,67 +393,61 @@ function createProxy(address singleton, bytes memory data) external returns (add ::core::result::Result::Err(_) => ::core::option::Option::None, } } + /// Returns the enum variant name for the given selector, if known. #[inline] - pub fn name_by_selector( - selector: [u8; 4usize], - ) -> ::core::option::Option<&'static str> { + pub fn name_by_selector(selector: [u8; 4usize]) -> ::core::option::Option<&'static str> { let sig = Self::signature_by_selector(selector)?; sig.split_once('(').map(|(name, _)| name) } } #[automatically_derived] impl alloy_sol_types::SolInterface for GnosisSafeProxyFactoryCalls { - const NAME: &'static str = "GnosisSafeProxyFactoryCalls"; - const MIN_DATA_LENGTH: usize = 96usize; const COUNT: usize = 1usize; + const MIN_DATA_LENGTH: usize = 96usize; + const NAME: &'static str = "GnosisSafeProxyFactoryCalls"; + #[inline] fn selector(&self) -> [u8; 4] { match self { - Self::createProxy(_) => { - ::SELECTOR - } + Self::createProxy(_) => ::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 { + fn abi_decode_raw(selector: [u8; 4], data: &[u8]) -> alloy_sol_types::Result { static DECODE_SHIMS: &[fn( &[u8], - ) -> alloy_sol_types::Result] = &[ - { - fn createProxy( - data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, - ) - .map(GnosisSafeProxyFactoryCalls::createProxy) - } - createProxy - }, - ]; + ) + -> alloy_sol_types::Result] = &[{ + fn createProxy( + data: &[u8], + ) -> alloy_sol_types::Result { + ::abi_decode_raw(data) + .map(GnosisSafeProxyFactoryCalls::createProxy) + } + createProxy + }]; let Ok(idx) = Self::SELECTORS.binary_search(&selector) else { - return Err( - alloy_sol_types::Error::unknown_selector( - ::NAME, - selector, - ), - ); + return Err(alloy_sol_types::Error::unknown_selector( + ::NAME, + selector, + )); }; DECODE_SHIMS[idx](data) } + #[inline] #[allow(non_snake_case)] fn abi_decode_raw_validate( @@ -465,54 +456,46 @@ function createProxy(address singleton, bytes memory data) external returns (add ) -> alloy_sol_types::Result { static DECODE_VALIDATE_SHIMS: &[fn( &[u8], - ) -> alloy_sol_types::Result] = &[ - { - fn createProxy( - data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) - .map(GnosisSafeProxyFactoryCalls::createProxy) - } - createProxy - }, - ]; + ) -> alloy_sol_types::Result< + GnosisSafeProxyFactoryCalls, + >] = &[{ + fn createProxy( + data: &[u8], + ) -> alloy_sol_types::Result { + ::abi_decode_raw_validate(data) + .map(GnosisSafeProxyFactoryCalls::createProxy) + } + createProxy + }]; let Ok(idx) = Self::SELECTORS.binary_search(&selector) else { - return Err( - alloy_sol_types::Error::unknown_selector( - ::NAME, - selector, - ), - ); + 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::createProxy(inner) => { - ::abi_encoded_size( - inner, - ) + ::abi_encoded_size(inner) } } } + #[inline] fn abi_encode_raw(&self, out: &mut alloy_sol_types::private::Vec) { match self { Self::createProxy(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } } } } ///Container for all the [`GnosisSafeProxyFactory`](self) events. - #[derive(Clone)] - #[derive(Debug, PartialEq, Eq, Hash)] + #[derive(Clone, Debug, PartialEq, Eq, Hash)] pub enum GnosisSafeProxyFactoryEvents { #[allow(missing_docs)] ProxyCreation(ProxyCreation), @@ -520,25 +503,22 @@ function createProxy(address singleton, bytes memory data) external returns (add impl GnosisSafeProxyFactoryEvents { /// 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. + /// 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]] = &[ - [ - 79u8, 81u8, 250u8, 246u8, 196u8, 86u8, 31u8, 249u8, 95u8, 6u8, 118u8, - 87u8, 228u8, 52u8, 57u8, 240u8, 248u8, 86u8, 217u8, 124u8, 4u8, 217u8, - 236u8, 144u8, 112u8, 166u8, 25u8, 154u8, 212u8, 24u8, 226u8, 53u8, - ], - ]; - /// The names of the variants in the same order as `SELECTORS`. - pub const VARIANT_NAMES: &'static [&'static str] = &[ - ::core::stringify!(ProxyCreation), - ]; + pub const SELECTORS: &'static [[u8; 32usize]] = &[[ + 79u8, 81u8, 250u8, 246u8, 196u8, 86u8, 31u8, 249u8, 95u8, 6u8, 118u8, 87u8, 228u8, + 52u8, 57u8, 240u8, 248u8, 86u8, 217u8, 124u8, 4u8, 217u8, 236u8, 144u8, 112u8, 166u8, + 25u8, 154u8, 212u8, 24u8, 226u8, 53u8, + ]]; /// The signatures in the same order as `SELECTORS`. - pub const SIGNATURES: &'static [&'static str] = &[ - ::SIGNATURE, - ]; + pub const SIGNATURES: &'static [&'static str] = + &[::SIGNATURE]; + /// The names of the variants in the same order as `SELECTORS`. + pub const VARIANT_NAMES: &'static [&'static str] = &[::core::stringify!(ProxyCreation)]; + /// Returns the signature for the given selector, if known. #[inline] pub fn signature_by_selector( @@ -551,42 +531,37 @@ function createProxy(address singleton, bytes memory data) external returns (add ::core::result::Result::Err(_) => ::core::option::Option::None, } } + /// Returns the enum variant name for the given selector, if known. #[inline] - pub fn name_by_selector( - selector: [u8; 32usize], - ) -> ::core::option::Option<&'static str> { + pub fn name_by_selector(selector: [u8; 32usize]) -> ::core::option::Option<&'static str> { let sig = Self::signature_by_selector(selector)?; sig.split_once('(').map(|(name, _)| name) } } #[automatically_derived] impl alloy_sol_types::SolEventInterface for GnosisSafeProxyFactoryEvents { - const NAME: &'static str = "GnosisSafeProxyFactoryEvents"; const COUNT: usize = 1usize; + const NAME: &'static str = "GnosisSafeProxyFactoryEvents"; + 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, - ) + ::decode_raw_log(topics, data) .map(Self::ProxyCreation) } - _ => { - 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(), - ), + _ => 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(), ), - }) - } + ), + }), } } } @@ -599,6 +574,7 @@ function createProxy(address singleton, bytes memory data) external returns (add } } } + fn into_log_data(self) -> alloy_sol_types::private::LogData { match self { Self::ProxyCreation(inner) => { @@ -607,10 +583,10 @@ function createProxy(address singleton, bytes memory data) external returns (add } } } - use alloy_contract as alloy_contract; + use alloy_contract; /**Creates a new wrapper around an on-chain [`GnosisSafeProxyFactory`](self) contract instance. -See the [wrapper's documentation](`GnosisSafeProxyFactoryInstance`) for more details.*/ + See the [wrapper's documentation](`GnosisSafeProxyFactoryInstance`) for more details.*/ #[inline] pub const fn new< P: alloy_contract::private::Provider, @@ -623,43 +599,41 @@ See the [wrapper's documentation](`GnosisSafeProxyFactoryInstance`) for more det } /**Deploys this contract using the given `provider` and constructor arguments, if any. -Returns a new instance of the contract, if the deployment was successful. + 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.*/ + 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, - >( + pub fn deploy, N: alloy_contract::private::Network>( __provider: P, - ) -> impl ::core::future::Future< - Output = alloy_contract::Result>, - > { + ) -> impl ::core::future::Future>> + { GnosisSafeProxyFactoryInstance::::deploy(__provider) } /**Creates a `RawCallBuilder` for deploying this contract using the given `provider` -and constructor arguments, if any. + 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.*/ + 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) -> alloy_contract::RawCallBuilder { + >( + __provider: P, + ) -> alloy_contract::RawCallBuilder { GnosisSafeProxyFactoryInstance::::deploy_builder(__provider) } /**A [`GnosisSafeProxyFactory`](self) instance. -Contains type-safe methods for interacting with an on-chain instance of the -[`GnosisSafeProxyFactory`](self) contract located at a given `address`, using a given -provider `P`. + Contains type-safe methods for interacting with an on-chain instance of the + [`GnosisSafeProxyFactory`](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. + 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.*/ + See the [module-level documentation](self) for all the available methods.*/ #[derive(Clone)] pub struct GnosisSafeProxyFactoryInstance { address: alloy_sol_types::private::Address, @@ -670,33 +644,32 @@ See the [module-level documentation](self) for all the available methods.*/ impl ::core::fmt::Debug for GnosisSafeProxyFactoryInstance { #[inline] fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { - f.debug_tuple("GnosisSafeProxyFactoryInstance").field(&self.address).finish() + f.debug_tuple("GnosisSafeProxyFactoryInstance") + .field(&self.address) + .finish() } } /// Instantiation and getters/setters. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > GnosisSafeProxyFactoryInstance { + impl, N: alloy_contract::private::Network> + GnosisSafeProxyFactoryInstance + { /**Creates a new wrapper around an on-chain [`GnosisSafeProxyFactory`](self) contract instance. -See the [wrapper's documentation](`GnosisSafeProxyFactoryInstance`) for more details.*/ + See the [wrapper's documentation](`GnosisSafeProxyFactoryInstance`) for more details.*/ #[inline] - pub const fn new( - address: alloy_sol_types::private::Address, - __provider: P, - ) -> Self { + pub const fn new(address: alloy_sol_types::private::Address, __provider: P) -> Self { Self { address, provider: __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. + 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.*/ + For more fine-grained control over the deployment process, use [`deploy_builder`] instead.*/ #[inline] pub async fn deploy( __provider: P, @@ -705,11 +678,12 @@ For more fine-grained control over the deployment process, use [`deploy_builder` 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. + 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.*/ + 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( @@ -717,21 +691,25 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ ::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 { @@ -739,7 +717,8 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ } } impl GnosisSafeProxyFactoryInstance<&P, N> { - /// Clones the provider and returns a new instance with the cloned provider. + /// Clones the provider and returns a new instance with the cloned + /// provider. #[inline] pub fn with_cloned_provider(self) -> GnosisSafeProxyFactoryInstance { GnosisSafeProxyFactoryInstance { @@ -750,20 +729,22 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ } } /// Function calls. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > GnosisSafeProxyFactoryInstance { - /// Creates a new call builder using this contract instance's provider and address. + impl, N: alloy_contract::private::Network> + GnosisSafeProxyFactoryInstance + { + /// 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. + /// 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 [`createProxy`] function. pub fn createProxy( &self, @@ -774,27 +755,26 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ } } /// Event filters. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > GnosisSafeProxyFactoryInstance { - /// Creates a new event filter using this contract instance's provider and address. + impl, N: alloy_contract::private::Network> + GnosisSafeProxyFactoryInstance + { + /// 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. + /// 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 [`ProxyCreation`] event. - pub fn ProxyCreation_filter( - &self, - ) -> alloy_contract::Event<&P, ProxyCreation, N> { + pub fn ProxyCreation_filter(&self) -> alloy_contract::Event<&P, ProxyCreation, N> { self.event_filter::() } } } -pub type Instance = GnosisSafeProxyFactory::GnosisSafeProxyFactoryInstance< - ::alloy_provider::DynProvider, ->; +pub type Instance = + GnosisSafeProxyFactory::GnosisSafeProxyFactoryInstance<::alloy_provider::DynProvider>; diff --git a/contracts/generated/contracts-generated/gpv2allowlistauthentication/src/lib.rs b/contracts/generated/contracts-generated/gpv2allowlistauthentication/src/lib.rs index c6ac070ed8..e3bdd29ab2 100644 --- a/contracts/generated/contracts-generated/gpv2allowlistauthentication/src/lib.rs +++ b/contracts/generated/contracts-generated/gpv2allowlistauthentication/src/lib.rs @@ -1,4 +1,10 @@ -#![allow(unused_imports, unused_attributes, clippy::all, rustdoc::all, non_snake_case)] +#![allow( + unused_imports, + unused_attributes, + clippy::all, + rustdoc::all, + non_snake_case +)] //! Auto-generated contract bindings. Do not edit. /** @@ -171,8 +177,7 @@ interface GPv2AllowListAuthentication { clippy::empty_structs_with_brackets )] pub mod GPv2AllowListAuthentication { - use super::*; - use alloy_sol_types as alloy_sol_types; + use {super::*, alloy_sol_types}; /// The creation / init bytecode of the contract. /// /// ```text @@ -185,9 +190,9 @@ pub mod GPv2AllowListAuthentication { ); #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Event with signature `ManagerChanged(address,address)` and selector `0x605c2dbf762e5f7d60a546d42e7205dcb1b011ebc62a61736a57c9089d3a4350`. -```solidity -event ManagerChanged(address newManager, address oldManager); -```*/ + ```solidity + event ManagerChanged(address newManager, address oldManager); + ```*/ #[allow( non_camel_case_types, non_snake_case, @@ -208,24 +213,25 @@ event ManagerChanged(address newManager, address oldManager); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[automatically_derived] impl alloy_sol_types::SolEvent for ManagerChanged { + type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type DataTuple<'a> = ( alloy_sol_types::sol_data::Address, 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 = "ManagerChanged(address,address)"; - const SIGNATURE_HASH: alloy_sol_types::private::B256 = alloy_sol_types::private::B256::new([ - 96u8, 92u8, 45u8, 191u8, 118u8, 46u8, 95u8, 125u8, 96u8, 165u8, 70u8, - 212u8, 46u8, 114u8, 5u8, 220u8, 177u8, 176u8, 17u8, 235u8, 198u8, 42u8, - 97u8, 115u8, 106u8, 87u8, 201u8, 8u8, 157u8, 58u8, 67u8, 80u8, - ]); + const ANONYMOUS: bool = false; + const SIGNATURE: &'static str = "ManagerChanged(address,address)"; + const SIGNATURE_HASH: alloy_sol_types::private::B256 = + alloy_sol_types::private::B256::new([ + 96u8, 92u8, 45u8, 191u8, 118u8, 46u8, 95u8, 125u8, 96u8, 165u8, 70u8, 212u8, + 46u8, 114u8, 5u8, 220u8, 177u8, 176u8, 17u8, 235u8, 198u8, 42u8, 97u8, 115u8, + 106u8, 87u8, 201u8, 8u8, 157u8, 58u8, 67u8, 80u8, + ]); + #[allow(unused_variables)] #[inline] fn new( @@ -237,21 +243,21 @@ event ManagerChanged(address newManager, address oldManager); oldManager: 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, - ), - ); + 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<'_> { ( @@ -263,10 +269,12 @@ event ManagerChanged(address newManager, address oldManager); ), ) } + #[inline] fn topics(&self) -> ::RustType { (Self::SIGNATURE_HASH.into(),) } + #[inline] fn encode_topics_raw( &self, @@ -275,9 +283,7 @@ event ManagerChanged(address newManager, address oldManager); if out.len() < ::COUNT { return Err(alloy_sol_types::Error::Overrun); } - out[0usize] = alloy_sol_types::abi::token::WordToken( - Self::SIGNATURE_HASH, - ); + out[0usize] = alloy_sol_types::abi::token::WordToken(Self::SIGNATURE_HASH); Ok(()) } } @@ -286,6 +292,7 @@ event ManagerChanged(address newManager, address oldManager); 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) } @@ -300,9 +307,9 @@ event ManagerChanged(address newManager, address oldManager); }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Event with signature `SolverAdded(address)` and selector `0x41f9d09dd5159251f8a8e482bbe097b7c01a5e6f70c5a0ddb494906464fc9dd7`. -```solidity -event SolverAdded(address solver); -```*/ + ```solidity + event SolverAdded(address solver); + ```*/ #[allow( non_camel_case_types, non_snake_case, @@ -321,22 +328,22 @@ event SolverAdded(address solver); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[automatically_derived] impl alloy_sol_types::SolEvent for SolverAdded { + type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; 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 = "SolverAdded(address)"; - const SIGNATURE_HASH: alloy_sol_types::private::B256 = alloy_sol_types::private::B256::new([ - 65u8, 249u8, 208u8, 157u8, 213u8, 21u8, 146u8, 81u8, 248u8, 168u8, 228u8, - 130u8, 187u8, 224u8, 151u8, 183u8, 192u8, 26u8, 94u8, 111u8, 112u8, - 197u8, 160u8, 221u8, 180u8, 148u8, 144u8, 100u8, 100u8, 252u8, 157u8, - 215u8, - ]); + const ANONYMOUS: bool = false; + const SIGNATURE: &'static str = "SolverAdded(address)"; + const SIGNATURE_HASH: alloy_sol_types::private::B256 = + alloy_sol_types::private::B256::new([ + 65u8, 249u8, 208u8, 157u8, 213u8, 21u8, 146u8, 81u8, 248u8, 168u8, 228u8, + 130u8, 187u8, 224u8, 151u8, 183u8, 192u8, 26u8, 94u8, 111u8, 112u8, 197u8, + 160u8, 221u8, 180u8, 148u8, 144u8, 100u8, 100u8, 252u8, 157u8, 215u8, + ]); + #[allow(unused_variables)] #[inline] fn new( @@ -345,21 +352,21 @@ event SolverAdded(address solver); ) -> Self { Self { solver: 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, - ), - ); + 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<'_> { ( @@ -368,10 +375,12 @@ event SolverAdded(address solver); ), ) } + #[inline] fn topics(&self) -> ::RustType { (Self::SIGNATURE_HASH.into(),) } + #[inline] fn encode_topics_raw( &self, @@ -380,9 +389,7 @@ event SolverAdded(address solver); if out.len() < ::COUNT { return Err(alloy_sol_types::Error::Overrun); } - out[0usize] = alloy_sol_types::abi::token::WordToken( - Self::SIGNATURE_HASH, - ); + out[0usize] = alloy_sol_types::abi::token::WordToken(Self::SIGNATURE_HASH); Ok(()) } } @@ -391,6 +398,7 @@ event SolverAdded(address solver); 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) } @@ -405,9 +413,9 @@ event SolverAdded(address solver); }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Event with signature `SolverRemoved(address)` and selector `0x640e18a2587e1d83e4fdabf70257d0a800ca4b2c1aaad1dfc485a4ad8bbbd6c6`. -```solidity -event SolverRemoved(address solver); -```*/ + ```solidity + event SolverRemoved(address solver); + ```*/ #[allow( non_camel_case_types, non_snake_case, @@ -426,21 +434,22 @@ event SolverRemoved(address solver); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[automatically_derived] impl alloy_sol_types::SolEvent for SolverRemoved { + type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; 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 = "SolverRemoved(address)"; - const SIGNATURE_HASH: alloy_sol_types::private::B256 = alloy_sol_types::private::B256::new([ - 100u8, 14u8, 24u8, 162u8, 88u8, 126u8, 29u8, 131u8, 228u8, 253u8, 171u8, - 247u8, 2u8, 87u8, 208u8, 168u8, 0u8, 202u8, 75u8, 44u8, 26u8, 170u8, - 209u8, 223u8, 196u8, 133u8, 164u8, 173u8, 139u8, 187u8, 214u8, 198u8, - ]); + const ANONYMOUS: bool = false; + const SIGNATURE: &'static str = "SolverRemoved(address)"; + const SIGNATURE_HASH: alloy_sol_types::private::B256 = + alloy_sol_types::private::B256::new([ + 100u8, 14u8, 24u8, 162u8, 88u8, 126u8, 29u8, 131u8, 228u8, 253u8, 171u8, 247u8, + 2u8, 87u8, 208u8, 168u8, 0u8, 202u8, 75u8, 44u8, 26u8, 170u8, 209u8, 223u8, + 196u8, 133u8, 164u8, 173u8, 139u8, 187u8, 214u8, 198u8, + ]); + #[allow(unused_variables)] #[inline] fn new( @@ -449,21 +458,21 @@ event SolverRemoved(address solver); ) -> Self { Self { solver: 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, - ), - ); + 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<'_> { ( @@ -472,10 +481,12 @@ event SolverRemoved(address solver); ), ) } + #[inline] fn topics(&self) -> ::RustType { (Self::SIGNATURE_HASH.into(),) } + #[inline] fn encode_topics_raw( &self, @@ -484,9 +495,7 @@ event SolverRemoved(address solver); if out.len() < ::COUNT { return Err(alloy_sol_types::Error::Overrun); } - out[0usize] = alloy_sol_types::abi::token::WordToken( - Self::SIGNATURE_HASH, - ); + out[0usize] = alloy_sol_types::abi::token::WordToken(Self::SIGNATURE_HASH); Ok(()) } } @@ -495,6 +504,7 @@ event SolverRemoved(address solver); 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) } @@ -509,16 +519,17 @@ event SolverRemoved(address solver); }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `addSolver(address)` and selector `0xec58f4b8`. -```solidity -function addSolver(address solver) external; -```*/ + ```solidity + function addSolver(address solver) external; + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct addSolverCall { #[allow(missing_docs)] pub solver: alloy_sol_types::private::Address, } - ///Container type for the return parameters of the [`addSolver(address)`](addSolverCall) function. + ///Container type for the return parameters of the + /// [`addSolver(address)`](addSolverCall) function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct addSolverReturn {} @@ -529,7 +540,7 @@ function addSolver(address solver) external; clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -538,9 +549,7 @@ function addSolver(address solver) external; type UnderlyingRustTuple<'a> = (alloy_sol_types::private::Address,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -570,9 +579,7 @@ function addSolver(address solver) external; type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -595,31 +602,28 @@ function addSolver(address solver) external; } } impl addSolverReturn { - fn _tokenize( - &self, - ) -> ::ReturnToken<'_> { + fn _tokenize(&self) -> ::ReturnToken<'_> { () } } #[automatically_derived] impl alloy_sol_types::SolCall for addSolverCall { type Parameters<'a> = (alloy_sol_types::sol_data::Address,); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = addSolverReturn; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "addSolver(address)"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [236u8, 88u8, 244u8, 184u8]; + const SIGNATURE: &'static str = "addSolver(address)"; + #[inline] fn new<'a>( tuple: as alloy_sol_types::SolType>::RustType, ) -> Self { tuple.into() } + #[inline] fn tokenize(&self) -> Self::Token<'_> { ( @@ -628,40 +632,40 @@ function addSolver(address solver) external; ), ) } + #[inline] fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { addSolverReturn::_tokenize(ret) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) + 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) + 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(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `initializeManager(address)` and selector `0x7f7120fe`. -```solidity -function initializeManager(address manager_) external; -```*/ + ```solidity + function initializeManager(address manager_) external; + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct initializeManagerCall { #[allow(missing_docs)] pub manager_: alloy_sol_types::private::Address, } - ///Container type for the return parameters of the [`initializeManager(address)`](initializeManagerCall) function. + ///Container type for the return parameters of the + /// [`initializeManager(address)`](initializeManagerCall) function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct initializeManagerReturn {} @@ -672,7 +676,7 @@ function initializeManager(address manager_) external; clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -681,9 +685,7 @@ function initializeManager(address manager_) external; type UnderlyingRustTuple<'a> = (alloy_sol_types::private::Address,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -692,16 +694,14 @@ function initializeManager(address manager_) external; } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From - for UnderlyingRustTuple<'_> { + impl ::core::convert::From for UnderlyingRustTuple<'_> { fn from(value: initializeManagerCall) -> Self { (value.manager_,) } } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From> - for initializeManagerCall { + impl ::core::convert::From> for initializeManagerCall { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { Self { manager_: tuple.0 } } @@ -715,9 +715,7 @@ function initializeManager(address manager_) external; type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -726,16 +724,14 @@ function initializeManager(address manager_) external; } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From - for UnderlyingRustTuple<'_> { + impl ::core::convert::From for UnderlyingRustTuple<'_> { fn from(value: initializeManagerReturn) -> Self { () } } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From> - for initializeManagerReturn { + impl ::core::convert::From> for initializeManagerReturn { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { Self {} } @@ -751,22 +747,21 @@ function initializeManager(address manager_) external; #[automatically_derived] impl alloy_sol_types::SolCall for initializeManagerCall { type Parameters<'a> = (alloy_sol_types::sol_data::Address,); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = initializeManagerReturn; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "initializeManager(address)"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [127u8, 113u8, 32u8, 254u8]; + const SIGNATURE: &'static str = "initializeManager(address)"; + #[inline] fn new<'a>( tuple: as alloy_sol_types::SolType>::RustType, ) -> Self { tuple.into() } + #[inline] fn tokenize(&self) -> Self::Token<'_> { ( @@ -775,33 +770,32 @@ function initializeManager(address manager_) external; ), ) } + #[inline] fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { initializeManagerReturn::_tokenize(ret) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) + 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) + 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(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `isSolver(address)` and selector `0x02cc250d`. -```solidity -function isSolver(address prospectiveSolver) external view returns (bool); -```*/ + ```solidity + function isSolver(address prospectiveSolver) external view returns (bool); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct isSolverCall { @@ -809,7 +803,8 @@ function isSolver(address prospectiveSolver) external view returns (bool); pub prospectiveSolver: alloy_sol_types::private::Address, } #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`isSolver(address)`](isSolverCall) function. + ///Container type for the return parameters of the + /// [`isSolver(address)`](isSolverCall) function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct isSolverReturn { @@ -823,7 +818,7 @@ function isSolver(address prospectiveSolver) external view returns (bool); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -832,9 +827,7 @@ function isSolver(address prospectiveSolver) external view returns (bool); type UnderlyingRustTuple<'a> = (alloy_sol_types::private::Address,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -852,7 +845,9 @@ function isSolver(address prospectiveSolver) external view returns (bool); #[doc(hidden)] impl ::core::convert::From> for isSolverCall { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { - Self { prospectiveSolver: tuple.0 } + Self { + prospectiveSolver: tuple.0, + } } } } @@ -864,9 +859,7 @@ function isSolver(address prospectiveSolver) external view returns (bool); type UnderlyingRustTuple<'a> = (bool,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -891,22 +884,21 @@ function isSolver(address prospectiveSolver) external view returns (bool); #[automatically_derived] impl alloy_sol_types::SolCall for isSolverCall { type Parameters<'a> = (alloy_sol_types::sol_data::Address,); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = bool; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (alloy_sol_types::sol_data::Bool,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "isSolver(address)"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [2u8, 204u8, 37u8, 13u8]; + const SIGNATURE: &'static str = "isSolver(address)"; + #[inline] fn new<'a>( tuple: as alloy_sol_types::SolType>::RustType, ) -> Self { tuple.into() } + #[inline] fn tokenize(&self) -> Self::Token<'_> { ( @@ -915,48 +907,45 @@ function isSolver(address prospectiveSolver) external view returns (bool); ), ) } + #[inline] fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { - ( - ::tokenize( - ret, - ), - ) + (::tokenize(ret),) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) - .map(|r| { + as alloy_sol_types::SolType>::abi_decode_sequence(data).map( + |r| { let r: isSolverReturn = 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: isSolverReturn = r.into(); - r._0 - }) + 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: isSolverReturn = r.into(); + r._0 + }) } } }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `manager()` and selector `0x481c6a75`. -```solidity -function manager() external view returns (address); -```*/ + ```solidity + function manager() external view returns (address); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct managerCall; #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`manager()`](managerCall) function. + ///Container type for the return parameters of the + /// [`manager()`](managerCall) function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct managerReturn { @@ -970,7 +959,7 @@ function manager() external view returns (address); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -979,9 +968,7 @@ function manager() external view returns (address); type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1011,9 +998,7 @@ function manager() external view returns (address); type UnderlyingRustTuple<'a> = (alloy_sol_types::private::Address,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1038,70 +1023,66 @@ function manager() external view returns (address); #[automatically_derived] impl alloy_sol_types::SolCall for managerCall { type Parameters<'a> = (); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = alloy_sol_types::private::Address; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (alloy_sol_types::sol_data::Address,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "manager()"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [72u8, 28u8, 106u8, 117u8]; + const SIGNATURE: &'static str = "manager()"; + #[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, - ), - ) + (::tokenize(ret),) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) - .map(|r| { + as alloy_sol_types::SolType>::abi_decode_sequence(data).map( + |r| { let r: managerReturn = 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: managerReturn = r.into(); - r._0 - }) + 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: managerReturn = r.into(); + r._0 + }) } } }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `removeSolver(address)` and selector `0x8fd57b92`. -```solidity -function removeSolver(address solver) external; -```*/ + ```solidity + function removeSolver(address solver) external; + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct removeSolverCall { #[allow(missing_docs)] pub solver: alloy_sol_types::private::Address, } - ///Container type for the return parameters of the [`removeSolver(address)`](removeSolverCall) function. + ///Container type for the return parameters of the + /// [`removeSolver(address)`](removeSolverCall) function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct removeSolverReturn {} @@ -1112,7 +1093,7 @@ function removeSolver(address solver) external; clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -1121,9 +1102,7 @@ function removeSolver(address solver) external; type UnderlyingRustTuple<'a> = (alloy_sol_types::private::Address,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1153,9 +1132,7 @@ function removeSolver(address solver) external; type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1178,31 +1155,28 @@ function removeSolver(address solver) external; } } impl removeSolverReturn { - fn _tokenize( - &self, - ) -> ::ReturnToken<'_> { + fn _tokenize(&self) -> ::ReturnToken<'_> { () } } #[automatically_derived] impl alloy_sol_types::SolCall for removeSolverCall { type Parameters<'a> = (alloy_sol_types::sol_data::Address,); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = removeSolverReturn; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "removeSolver(address)"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [143u8, 213u8, 123u8, 146u8]; + const SIGNATURE: &'static str = "removeSolver(address)"; + #[inline] fn new<'a>( tuple: as alloy_sol_types::SolType>::RustType, ) -> Self { tuple.into() } + #[inline] fn tokenize(&self) -> Self::Token<'_> { ( @@ -1211,33 +1185,32 @@ function removeSolver(address solver) external; ), ) } + #[inline] fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { removeSolverReturn::_tokenize(ret) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) + 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) + 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(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `simulateDelegatecall(address,bytes)` and selector `0xf84436bd`. -```solidity -function simulateDelegatecall(address targetContract, bytes memory calldataPayload) external returns (bytes memory response); -```*/ + ```solidity + function simulateDelegatecall(address targetContract, bytes memory calldataPayload) external returns (bytes memory response); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct simulateDelegatecallCall { @@ -1247,7 +1220,9 @@ function simulateDelegatecall(address targetContract, bytes memory calldataPaylo pub calldataPayload: alloy_sol_types::private::Bytes, } #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`simulateDelegatecall(address,bytes)`](simulateDelegatecallCall) function. + ///Container type for the return parameters of the + /// [`simulateDelegatecall(address,bytes)`](simulateDelegatecallCall) + /// function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct simulateDelegatecallReturn { @@ -1261,7 +1236,7 @@ function simulateDelegatecall(address targetContract, bytes memory calldataPaylo clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -1276,9 +1251,7 @@ function simulateDelegatecall(address targetContract, bytes memory calldataPaylo ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1287,16 +1260,14 @@ function simulateDelegatecall(address targetContract, bytes memory calldataPaylo } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From - for UnderlyingRustTuple<'_> { + impl ::core::convert::From for UnderlyingRustTuple<'_> { fn from(value: simulateDelegatecallCall) -> Self { (value.targetContract, value.calldataPayload) } } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From> - for simulateDelegatecallCall { + impl ::core::convert::From> for simulateDelegatecallCall { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { Self { targetContract: tuple.0, @@ -1313,9 +1284,7 @@ function simulateDelegatecall(address targetContract, bytes memory calldataPaylo type UnderlyingRustTuple<'a> = (alloy_sol_types::private::Bytes,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1324,16 +1293,14 @@ function simulateDelegatecall(address targetContract, bytes memory calldataPaylo } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From - for UnderlyingRustTuple<'_> { + impl ::core::convert::From for UnderlyingRustTuple<'_> { fn from(value: simulateDelegatecallReturn) -> Self { (value.response,) } } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From> - for simulateDelegatecallReturn { + impl ::core::convert::From> for simulateDelegatecallReturn { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { Self { response: tuple.0 } } @@ -1345,22 +1312,21 @@ function simulateDelegatecall(address targetContract, bytes memory calldataPaylo alloy_sol_types::sol_data::Address, alloy_sol_types::sol_data::Bytes, ); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = alloy_sol_types::private::Bytes; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (alloy_sol_types::sol_data::Bytes,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "simulateDelegatecall(address,bytes)"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [248u8, 68u8, 54u8, 189u8]; + const SIGNATURE: &'static str = "simulateDelegatecall(address,bytes)"; + #[inline] fn new<'a>( tuple: as alloy_sol_types::SolType>::RustType, ) -> Self { tuple.into() } + #[inline] fn tokenize(&self) -> Self::Token<'_> { ( @@ -1372,41 +1338,37 @@ function simulateDelegatecall(address targetContract, bytes memory calldataPaylo ), ) } + #[inline] fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { - ( - ::tokenize( - ret, - ), - ) + (::tokenize(ret),) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) - .map(|r| { + as alloy_sol_types::SolType>::abi_decode_sequence(data).map( + |r| { let r: simulateDelegatecallReturn = r.into(); r.response - }) + }, + ) } + #[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: simulateDelegatecallReturn = r.into(); - r.response - }) + 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: simulateDelegatecallReturn = r.into(); + r.response + }) } } }; - ///Container for all the [`GPv2AllowListAuthentication`](self) function calls. + ///Container for all the [`GPv2AllowListAuthentication`](self) function + /// calls. #[derive(Clone)] - #[derive()] pub enum GPv2AllowListAuthenticationCalls { #[allow(missing_docs)] addSolver(addSolverCall), @@ -1424,8 +1386,9 @@ function simulateDelegatecall(address targetContract, bytes memory calldataPaylo impl GPv2AllowListAuthenticationCalls { /// 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. + /// 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]] = &[ @@ -1436,15 +1399,6 @@ function simulateDelegatecall(address targetContract, bytes memory calldataPaylo [236u8, 88u8, 244u8, 184u8], [248u8, 68u8, 54u8, 189u8], ]; - /// The names of the variants in the same order as `SELECTORS`. - pub const VARIANT_NAMES: &'static [&'static str] = &[ - ::core::stringify!(isSolver), - ::core::stringify!(manager), - ::core::stringify!(initializeManager), - ::core::stringify!(removeSolver), - ::core::stringify!(addSolver), - ::core::stringify!(simulateDelegatecall), - ]; /// The signatures in the same order as `SELECTORS`. pub const SIGNATURES: &'static [&'static str] = &[ ::SIGNATURE, @@ -1454,6 +1408,16 @@ function simulateDelegatecall(address targetContract, bytes memory calldataPaylo ::SIGNATURE, ::SIGNATURE, ]; + /// The names of the variants in the same order as `SELECTORS`. + pub const VARIANT_NAMES: &'static [&'static str] = &[ + ::core::stringify!(isSolver), + ::core::stringify!(manager), + ::core::stringify!(initializeManager), + ::core::stringify!(removeSolver), + ::core::stringify!(addSolver), + ::core::stringify!(simulateDelegatecall), + ]; + /// Returns the signature for the given selector, if known. #[inline] pub fn signature_by_selector( @@ -1466,60 +1430,59 @@ function simulateDelegatecall(address targetContract, bytes memory calldataPaylo ::core::result::Result::Err(_) => ::core::option::Option::None, } } + /// Returns the enum variant name for the given selector, if known. #[inline] - pub fn name_by_selector( - selector: [u8; 4usize], - ) -> ::core::option::Option<&'static str> { + pub fn name_by_selector(selector: [u8; 4usize]) -> ::core::option::Option<&'static str> { let sig = Self::signature_by_selector(selector)?; sig.split_once('(').map(|(name, _)| name) } } #[automatically_derived] impl alloy_sol_types::SolInterface for GPv2AllowListAuthenticationCalls { - const NAME: &'static str = "GPv2AllowListAuthenticationCalls"; - const MIN_DATA_LENGTH: usize = 0usize; const COUNT: usize = 6usize; + const MIN_DATA_LENGTH: usize = 0usize; + const NAME: &'static str = "GPv2AllowListAuthenticationCalls"; + #[inline] fn selector(&self) -> [u8; 4] { match self { - Self::addSolver(_) => { - ::SELECTOR - } + Self::addSolver(_) => ::SELECTOR, Self::initializeManager(_) => { ::SELECTOR } Self::isSolver(_) => ::SELECTOR, Self::manager(_) => ::SELECTOR, - Self::removeSolver(_) => { - ::SELECTOR - } + Self::removeSolver(_) => ::SELECTOR, Self::simulateDelegatecall(_) => { ::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 { + fn abi_decode_raw(selector: [u8; 4], data: &[u8]) -> alloy_sol_types::Result { static DECODE_SHIMS: &[fn( &[u8], - ) -> alloy_sol_types::Result] = &[ + ) -> alloy_sol_types::Result< + GPv2AllowListAuthenticationCalls, + >] = &[ { fn isSolver( data: &[u8], - ) -> alloy_sol_types::Result { + ) -> alloy_sol_types::Result + { ::abi_decode_raw(data) .map(GPv2AllowListAuthenticationCalls::isSolver) } @@ -1528,7 +1491,8 @@ function simulateDelegatecall(address targetContract, bytes memory calldataPaylo { fn manager( data: &[u8], - ) -> alloy_sol_types::Result { + ) -> alloy_sol_types::Result + { ::abi_decode_raw(data) .map(GPv2AllowListAuthenticationCalls::manager) } @@ -1537,10 +1501,9 @@ function simulateDelegatecall(address targetContract, bytes memory calldataPaylo { fn initializeManager( data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, - ) + ) -> alloy_sol_types::Result + { + ::abi_decode_raw(data) .map(GPv2AllowListAuthenticationCalls::initializeManager) } initializeManager @@ -1548,10 +1511,9 @@ function simulateDelegatecall(address targetContract, bytes memory calldataPaylo { fn removeSolver( data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, - ) + ) -> alloy_sol_types::Result + { + ::abi_decode_raw(data) .map(GPv2AllowListAuthenticationCalls::removeSolver) } removeSolver @@ -1559,7 +1521,8 @@ function simulateDelegatecall(address targetContract, bytes memory calldataPaylo { fn addSolver( data: &[u8], - ) -> alloy_sol_types::Result { + ) -> alloy_sol_types::Result + { ::abi_decode_raw(data) .map(GPv2AllowListAuthenticationCalls::addSolver) } @@ -1568,25 +1531,23 @@ function simulateDelegatecall(address targetContract, bytes memory calldataPaylo { fn simulateDelegatecall( data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, - ) + ) -> alloy_sol_types::Result + { + ::abi_decode_raw(data) .map(GPv2AllowListAuthenticationCalls::simulateDelegatecall) } simulateDelegatecall }, ]; let Ok(idx) = Self::SELECTORS.binary_search(&selector) else { - return Err( - alloy_sol_types::Error::unknown_selector( - ::NAME, - selector, - ), - ); + return Err(alloy_sol_types::Error::unknown_selector( + ::NAME, + selector, + )); }; DECODE_SHIMS[idx](data) } + #[inline] #[allow(non_snake_case)] fn abi_decode_raw_validate( @@ -1595,14 +1556,15 @@ function simulateDelegatecall(address targetContract, bytes memory calldataPaylo ) -> alloy_sol_types::Result { static DECODE_VALIDATE_SHIMS: &[fn( &[u8], - ) -> alloy_sol_types::Result] = &[ + ) -> alloy_sol_types::Result< + GPv2AllowListAuthenticationCalls, + >] = &[ { fn isSolver( data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) + ) -> alloy_sol_types::Result + { + ::abi_decode_raw_validate(data) .map(GPv2AllowListAuthenticationCalls::isSolver) } isSolver @@ -1610,10 +1572,9 @@ function simulateDelegatecall(address targetContract, bytes memory calldataPaylo { fn manager( data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) + ) -> alloy_sol_types::Result + { + ::abi_decode_raw_validate(data) .map(GPv2AllowListAuthenticationCalls::manager) } manager @@ -1621,7 +1582,8 @@ function simulateDelegatecall(address targetContract, bytes memory calldataPaylo { fn initializeManager( data: &[u8], - ) -> alloy_sol_types::Result { + ) -> alloy_sol_types::Result + { ::abi_decode_raw_validate( data, ) @@ -1632,21 +1594,21 @@ function simulateDelegatecall(address targetContract, bytes memory calldataPaylo { fn removeSolver( data: &[u8], - ) -> alloy_sol_types::Result { + ) -> alloy_sol_types::Result + { ::abi_decode_raw_validate( - data, - ) - .map(GPv2AllowListAuthenticationCalls::removeSolver) + data, + ) + .map(GPv2AllowListAuthenticationCalls::removeSolver) } removeSolver }, { fn addSolver( data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) + ) -> alloy_sol_types::Result + { + ::abi_decode_raw_validate(data) .map(GPv2AllowListAuthenticationCalls::addSolver) } addSolver @@ -1654,7 +1616,8 @@ function simulateDelegatecall(address targetContract, bytes memory calldataPaylo { fn simulateDelegatecall( data: &[u8], - ) -> alloy_sol_types::Result { + ) -> alloy_sol_types::Result + { ::abi_decode_raw_validate( data, ) @@ -1664,15 +1627,14 @@ function simulateDelegatecall(address targetContract, bytes memory calldataPaylo }, ]; let Ok(idx) = Self::SELECTORS.binary_search(&selector) else { - return Err( - alloy_sol_types::Error::unknown_selector( - ::NAME, - selector, - ), - ); + return Err(alloy_sol_types::Error::unknown_selector( + ::NAME, + selector, + )); }; DECODE_VALIDATE_SHIMS[idx](data) } + #[inline] fn abi_encoded_size(&self) -> usize { match self { @@ -1680,9 +1642,7 @@ function simulateDelegatecall(address targetContract, bytes memory calldataPaylo ::abi_encoded_size(inner) } Self::initializeManager(inner) => { - ::abi_encoded_size( - inner, - ) + ::abi_encoded_size(inner) } Self::isSolver(inner) => { ::abi_encoded_size(inner) @@ -1691,59 +1651,42 @@ function simulateDelegatecall(address targetContract, bytes memory calldataPaylo ::abi_encoded_size(inner) } Self::removeSolver(inner) => { - ::abi_encoded_size( - inner, - ) + ::abi_encoded_size(inner) } Self::simulateDelegatecall(inner) => { - ::abi_encoded_size( - inner, - ) + ::abi_encoded_size(inner) } } } + #[inline] fn abi_encode_raw(&self, out: &mut alloy_sol_types::private::Vec) { match self { Self::addSolver(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } Self::initializeManager(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } Self::isSolver(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } Self::manager(inner) => { ::abi_encode_raw(inner, out) } Self::removeSolver(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } Self::simulateDelegatecall(inner) => { ::abi_encode_raw( - inner, - out, + inner, out, ) } } } } ///Container for all the [`GPv2AllowListAuthentication`](self) events. - #[derive(Clone)] - #[derive(Debug, PartialEq, Eq, Hash)] + #[derive(Clone, Debug, PartialEq, Eq, Hash)] pub enum GPv2AllowListAuthenticationEvents { #[allow(missing_docs)] ManagerChanged(ManagerChanged), @@ -1755,40 +1698,41 @@ function simulateDelegatecall(address targetContract, bytes memory calldataPaylo impl GPv2AllowListAuthenticationEvents { /// 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. + /// 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]] = &[ [ - 65u8, 249u8, 208u8, 157u8, 213u8, 21u8, 146u8, 81u8, 248u8, 168u8, 228u8, - 130u8, 187u8, 224u8, 151u8, 183u8, 192u8, 26u8, 94u8, 111u8, 112u8, - 197u8, 160u8, 221u8, 180u8, 148u8, 144u8, 100u8, 100u8, 252u8, 157u8, - 215u8, + 65u8, 249u8, 208u8, 157u8, 213u8, 21u8, 146u8, 81u8, 248u8, 168u8, 228u8, 130u8, + 187u8, 224u8, 151u8, 183u8, 192u8, 26u8, 94u8, 111u8, 112u8, 197u8, 160u8, 221u8, + 180u8, 148u8, 144u8, 100u8, 100u8, 252u8, 157u8, 215u8, ], [ - 96u8, 92u8, 45u8, 191u8, 118u8, 46u8, 95u8, 125u8, 96u8, 165u8, 70u8, - 212u8, 46u8, 114u8, 5u8, 220u8, 177u8, 176u8, 17u8, 235u8, 198u8, 42u8, - 97u8, 115u8, 106u8, 87u8, 201u8, 8u8, 157u8, 58u8, 67u8, 80u8, + 96u8, 92u8, 45u8, 191u8, 118u8, 46u8, 95u8, 125u8, 96u8, 165u8, 70u8, 212u8, 46u8, + 114u8, 5u8, 220u8, 177u8, 176u8, 17u8, 235u8, 198u8, 42u8, 97u8, 115u8, 106u8, + 87u8, 201u8, 8u8, 157u8, 58u8, 67u8, 80u8, ], [ - 100u8, 14u8, 24u8, 162u8, 88u8, 126u8, 29u8, 131u8, 228u8, 253u8, 171u8, - 247u8, 2u8, 87u8, 208u8, 168u8, 0u8, 202u8, 75u8, 44u8, 26u8, 170u8, - 209u8, 223u8, 196u8, 133u8, 164u8, 173u8, 139u8, 187u8, 214u8, 198u8, + 100u8, 14u8, 24u8, 162u8, 88u8, 126u8, 29u8, 131u8, 228u8, 253u8, 171u8, 247u8, + 2u8, 87u8, 208u8, 168u8, 0u8, 202u8, 75u8, 44u8, 26u8, 170u8, 209u8, 223u8, 196u8, + 133u8, 164u8, 173u8, 139u8, 187u8, 214u8, 198u8, ], ]; - /// The names of the variants in the same order as `SELECTORS`. - pub const VARIANT_NAMES: &'static [&'static str] = &[ - ::core::stringify!(SolverAdded), - ::core::stringify!(ManagerChanged), - ::core::stringify!(SolverRemoved), - ]; /// The signatures in the same order as `SELECTORS`. pub const SIGNATURES: &'static [&'static str] = &[ ::SIGNATURE, ::SIGNATURE, ::SIGNATURE, ]; + /// The names of the variants in the same order as `SELECTORS`. + pub const VARIANT_NAMES: &'static [&'static str] = &[ + ::core::stringify!(SolverAdded), + ::core::stringify!(ManagerChanged), + ::core::stringify!(SolverRemoved), + ]; + /// Returns the signature for the given selector, if known. #[inline] pub fn signature_by_selector( @@ -1801,56 +1745,45 @@ function simulateDelegatecall(address targetContract, bytes memory calldataPaylo ::core::result::Result::Err(_) => ::core::option::Option::None, } } + /// Returns the enum variant name for the given selector, if known. #[inline] - pub fn name_by_selector( - selector: [u8; 32usize], - ) -> ::core::option::Option<&'static str> { + pub fn name_by_selector(selector: [u8; 32usize]) -> ::core::option::Option<&'static str> { let sig = Self::signature_by_selector(selector)?; sig.split_once('(').map(|(name, _)| name) } } #[automatically_derived] impl alloy_sol_types::SolEventInterface for GPv2AllowListAuthenticationEvents { - const NAME: &'static str = "GPv2AllowListAuthenticationEvents"; const COUNT: usize = 3usize; + const NAME: &'static str = "GPv2AllowListAuthenticationEvents"; + 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, - ) + ::decode_raw_log(topics, data) .map(Self::ManagerChanged) } Some(::SIGNATURE_HASH) => { - ::decode_raw_log( - topics, - data, - ) + ::decode_raw_log(topics, data) .map(Self::SolverAdded) } Some(::SIGNATURE_HASH) => { - ::decode_raw_log( - topics, - data, - ) + ::decode_raw_log(topics, data) .map(Self::SolverRemoved) } - _ => { - 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(), - ), + _ => 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(), ), - }) - } + ), + }), } } } @@ -1869,6 +1802,7 @@ function simulateDelegatecall(address targetContract, bytes memory calldataPaylo } } } + fn into_log_data(self) -> alloy_sol_types::private::LogData { match self { Self::ManagerChanged(inner) => { @@ -1883,10 +1817,10 @@ function simulateDelegatecall(address targetContract, bytes memory calldataPaylo } } } - use alloy_contract as alloy_contract; + use alloy_contract; /**Creates a new wrapper around an on-chain [`GPv2AllowListAuthentication`](self) contract instance. -See the [wrapper's documentation](`GPv2AllowListAuthenticationInstance`) for more details.*/ + See the [wrapper's documentation](`GPv2AllowListAuthenticationInstance`) for more details.*/ #[inline] pub const fn new< P: alloy_contract::private::Provider, @@ -1899,14 +1833,11 @@ See the [wrapper's documentation](`GPv2AllowListAuthenticationInstance`) for mor } /**Deploys this contract using the given `provider` and constructor arguments, if any. -Returns a new instance of the contract, if the deployment was successful. + 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.*/ + 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, - >( + pub fn deploy, N: alloy_contract::private::Network>( __provider: P, ) -> impl ::core::future::Future< Output = alloy_contract::Result>, @@ -1914,33 +1845,32 @@ For more fine-grained control over the deployment process, use [`deploy_builder` GPv2AllowListAuthenticationInstance::::deploy(__provider) } /**Creates a `RawCallBuilder` for deploying this contract using the given `provider` -and constructor arguments, if any. + 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.*/ + 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) -> alloy_contract::RawCallBuilder { + >( + __provider: P, + ) -> alloy_contract::RawCallBuilder { GPv2AllowListAuthenticationInstance::::deploy_builder(__provider) } /**A [`GPv2AllowListAuthentication`](self) instance. -Contains type-safe methods for interacting with an on-chain instance of the -[`GPv2AllowListAuthentication`](self) contract located at a given `address`, using a given -provider `P`. + Contains type-safe methods for interacting with an on-chain instance of the + [`GPv2AllowListAuthentication`](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. + 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.*/ + See the [module-level documentation](self) for all the available methods.*/ #[derive(Clone)] - pub struct GPv2AllowListAuthenticationInstance< - P, - N = alloy_contract::private::Ethereum, - > { + pub struct GPv2AllowListAuthenticationInstance { address: alloy_sol_types::private::Address, provider: P, _network: ::core::marker::PhantomData, @@ -1955,29 +1885,26 @@ See the [module-level documentation](self) for all the available methods.*/ } } /// Instantiation and getters/setters. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > GPv2AllowListAuthenticationInstance { + impl, N: alloy_contract::private::Network> + GPv2AllowListAuthenticationInstance + { /**Creates a new wrapper around an on-chain [`GPv2AllowListAuthentication`](self) contract instance. -See the [wrapper's documentation](`GPv2AllowListAuthenticationInstance`) for more details.*/ + See the [wrapper's documentation](`GPv2AllowListAuthenticationInstance`) for more details.*/ #[inline] - pub const fn new( - address: alloy_sol_types::private::Address, - __provider: P, - ) -> Self { + pub const fn new(address: alloy_sol_types::private::Address, __provider: P) -> Self { Self { address, provider: __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. + 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.*/ + For more fine-grained control over the deployment process, use [`deploy_builder`] instead.*/ #[inline] pub async fn deploy( __provider: P, @@ -1986,11 +1913,12 @@ For more fine-grained control over the deployment process, use [`deploy_builder` 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. + 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.*/ + 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( @@ -1998,21 +1926,25 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ ::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 { @@ -2020,7 +1952,8 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ } } impl GPv2AllowListAuthenticationInstance<&P, N> { - /// Clones the provider and returns a new instance with the cloned provider. + /// Clones the provider and returns a new instance with the cloned + /// provider. #[inline] pub fn with_cloned_provider(self) -> GPv2AllowListAuthenticationInstance { GPv2AllowListAuthenticationInstance { @@ -2031,20 +1964,22 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ } } /// Function calls. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > GPv2AllowListAuthenticationInstance { - /// Creates a new call builder using this contract instance's provider and address. + impl, N: alloy_contract::private::Network> + GPv2AllowListAuthenticationInstance + { + /// 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. + /// 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 [`addSolver`] function. pub fn addSolver( &self, @@ -2052,6 +1987,7 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ ) -> alloy_contract::SolCallBuilder<&P, addSolverCall, N> { self.call_builder(&addSolverCall { solver }) } + ///Creates a new call builder for the [`initializeManager`] function. pub fn initializeManager( &self, @@ -2059,6 +1995,7 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ ) -> alloy_contract::SolCallBuilder<&P, initializeManagerCall, N> { self.call_builder(&initializeManagerCall { manager_ }) } + ///Creates a new call builder for the [`isSolver`] function. pub fn isSolver( &self, @@ -2066,10 +2003,12 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ ) -> alloy_contract::SolCallBuilder<&P, isSolverCall, N> { self.call_builder(&isSolverCall { prospectiveSolver }) } + ///Creates a new call builder for the [`manager`] function. pub fn manager(&self) -> alloy_contract::SolCallBuilder<&P, managerCall, N> { self.call_builder(&managerCall) } + ///Creates a new call builder for the [`removeSolver`] function. pub fn removeSolver( &self, @@ -2077,159 +2016,110 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ ) -> alloy_contract::SolCallBuilder<&P, removeSolverCall, N> { self.call_builder(&removeSolverCall { solver }) } - ///Creates a new call builder for the [`simulateDelegatecall`] function. + + ///Creates a new call builder for the [`simulateDelegatecall`] + /// function. pub fn simulateDelegatecall( &self, targetContract: alloy_sol_types::private::Address, calldataPayload: alloy_sol_types::private::Bytes, ) -> alloy_contract::SolCallBuilder<&P, simulateDelegatecallCall, N> { - self.call_builder( - &simulateDelegatecallCall { - targetContract, - calldataPayload, - }, - ) + self.call_builder(&simulateDelegatecallCall { + targetContract, + calldataPayload, + }) } } /// Event filters. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > GPv2AllowListAuthenticationInstance { - /// Creates a new event filter using this contract instance's provider and address. + impl, N: alloy_contract::private::Network> + GPv2AllowListAuthenticationInstance + { + /// 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. + /// 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 [`ManagerChanged`] event. - pub fn ManagerChanged_filter( - &self, - ) -> alloy_contract::Event<&P, ManagerChanged, N> { + pub fn ManagerChanged_filter(&self) -> alloy_contract::Event<&P, ManagerChanged, N> { self.event_filter::() } + ///Creates a new event filter for the [`SolverAdded`] event. pub fn SolverAdded_filter(&self) -> alloy_contract::Event<&P, SolverAdded, N> { self.event_filter::() } + ///Creates a new event filter for the [`SolverRemoved`] event. - pub fn SolverRemoved_filter( - &self, - ) -> alloy_contract::Event<&P, SolverRemoved, N> { + pub fn SolverRemoved_filter(&self) -> alloy_contract::Event<&P, SolverRemoved, N> { self.event_filter::() } } } -pub type Instance = GPv2AllowListAuthentication::GPv2AllowListAuthenticationInstance< - ::alloy_provider::DynProvider, ->; +pub type Instance = + GPv2AllowListAuthentication::GPv2AllowListAuthenticationInstance<::alloy_provider::DynProvider>; use { - std::{sync::LazyLock, collections::HashMap}, - anyhow::{Result, Context}, - alloy_primitives::{address, Address}, - alloy_provider::{Provider, DynProvider}, + alloy_primitives::{Address, address}, + alloy_provider::{DynProvider, Provider}, + anyhow::{Context, Result}, + std::{collections::HashMap, sync::LazyLock}, }; pub const fn deployment_info(chain_id: u64) -> Option<(Address, Option)> { match chain_id { - 1u64 => { - Some(( - ::alloy_primitives::address!( - "0x2c4c28DDBdAc9C5E7055b4C863b72eA0149D8aFE" - ), - Some(12593263u64), - )) - } - 10u64 => { - Some(( - ::alloy_primitives::address!( - "0x2c4c28DDBdAc9C5E7055b4C863b72eA0149D8aFE" - ), - Some(134254466u64), - )) - } - 56u64 => { - Some(( - ::alloy_primitives::address!( - "0x2c4c28DDBdAc9C5E7055b4C863b72eA0149D8aFE" - ), - Some(48173639u64), - )) - } - 100u64 => { - Some(( - ::alloy_primitives::address!( - "0x2c4c28DDBdAc9C5E7055b4C863b72eA0149D8aFE" - ), - Some(16465099u64), - )) - } - 137u64 => { - Some(( - ::alloy_primitives::address!( - "0x2c4c28DDBdAc9C5E7055b4C863b72eA0149D8aFE" - ), - Some(45854728u64), - )) - } - 8453u64 => { - Some(( - ::alloy_primitives::address!( - "0x2c4c28DDBdAc9C5E7055b4C863b72eA0149D8aFE" - ), - Some(21407137u64), - )) - } - 9745u64 => { - Some(( - ::alloy_primitives::address!( - "0x2c4c28DDBdAc9C5E7055b4C863b72eA0149D8aFE" - ), - Some(3439709u64), - )) - } - 42161u64 => { - Some(( - ::alloy_primitives::address!( - "0x2c4c28DDBdAc9C5E7055b4C863b72eA0149D8aFE" - ), - Some(204702129u64), - )) - } - 43114u64 => { - Some(( - ::alloy_primitives::address!( - "0x2c4c28DDBdAc9C5E7055b4C863b72eA0149D8aFE" - ), - Some(59891351u64), - )) - } - 57073u64 => { - Some(( - ::alloy_primitives::address!( - "0x2c4c28DDBdAc9C5E7055b4C863b72eA0149D8aFE" - ), - Some(34436840u64), - )) - } - 59144u64 => { - Some(( - ::alloy_primitives::address!( - "0x2c4c28DDBdAc9C5E7055b4C863b72eA0149D8aFE" - ), - Some(24333100u64), - )) - } - 11155111u64 => { - Some(( - ::alloy_primitives::address!( - "0x2c4c28DDBdAc9C5E7055b4C863b72eA0149D8aFE" - ), - Some(4717469u64), - )) - } + 1u64 => Some(( + ::alloy_primitives::address!("0x2c4c28DDBdAc9C5E7055b4C863b72eA0149D8aFE"), + Some(12593263u64), + )), + 10u64 => Some(( + ::alloy_primitives::address!("0x2c4c28DDBdAc9C5E7055b4C863b72eA0149D8aFE"), + Some(134254466u64), + )), + 56u64 => Some(( + ::alloy_primitives::address!("0x2c4c28DDBdAc9C5E7055b4C863b72eA0149D8aFE"), + Some(48173639u64), + )), + 100u64 => Some(( + ::alloy_primitives::address!("0x2c4c28DDBdAc9C5E7055b4C863b72eA0149D8aFE"), + Some(16465099u64), + )), + 137u64 => Some(( + ::alloy_primitives::address!("0x2c4c28DDBdAc9C5E7055b4C863b72eA0149D8aFE"), + Some(45854728u64), + )), + 8453u64 => Some(( + ::alloy_primitives::address!("0x2c4c28DDBdAc9C5E7055b4C863b72eA0149D8aFE"), + Some(21407137u64), + )), + 9745u64 => Some(( + ::alloy_primitives::address!("0x2c4c28DDBdAc9C5E7055b4C863b72eA0149D8aFE"), + Some(3439709u64), + )), + 42161u64 => Some(( + ::alloy_primitives::address!("0x2c4c28DDBdAc9C5E7055b4C863b72eA0149D8aFE"), + Some(204702129u64), + )), + 43114u64 => Some(( + ::alloy_primitives::address!("0x2c4c28DDBdAc9C5E7055b4C863b72eA0149D8aFE"), + Some(59891351u64), + )), + 57073u64 => Some(( + ::alloy_primitives::address!("0x2c4c28DDBdAc9C5E7055b4C863b72eA0149D8aFE"), + Some(34436840u64), + )), + 59144u64 => Some(( + ::alloy_primitives::address!("0x2c4c28DDBdAc9C5E7055b4C863b72eA0149D8aFE"), + Some(24333100u64), + )), + 11155111u64 => Some(( + ::alloy_primitives::address!("0x2c4c28DDBdAc9C5E7055b4C863b72eA0149D8aFE"), + Some(4717469u64), + )), _ => None, } } @@ -2246,9 +2136,7 @@ pub const fn deployment_block(chain_id: &u64) -> Option { } } impl Instance { - pub fn deployed( - provider: &DynProvider, - ) -> impl Future> + Send { + pub fn deployed(provider: &DynProvider) -> impl Future> + Send { async move { let chain_id = provider .get_chain_id() diff --git a/contracts/generated/contracts-generated/gpv2settlement/src/lib.rs b/contracts/generated/contracts-generated/gpv2settlement/src/lib.rs index 8ab909a0f4..ca024bc92e 100644 --- a/contracts/generated/contracts-generated/gpv2settlement/src/lib.rs +++ b/contracts/generated/contracts-generated/gpv2settlement/src/lib.rs @@ -1,4 +1,10 @@ -#![allow(unused_imports, unused_attributes, clippy::all, rustdoc::all, non_snake_case)] +#![allow( + unused_imports, + unused_attributes, + clippy::all, + rustdoc::all, + non_snake_case +)] //! Auto-generated contract bindings. Do not edit. ///Module containing a contract's types and functions. /** @@ -16,12 +22,11 @@ library GPv2Interaction { clippy::empty_structs_with_brackets )] pub mod GPv2Interaction { - use super::*; - use alloy_sol_types as alloy_sol_types; + use {super::*, alloy_sol_types}; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**```solidity -struct Data { address target; uint256 value; bytes callData; } -```*/ + struct Data { address target; uint256 value; bytes callData; } + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct Data { @@ -39,7 +44,7 @@ struct Data { address target; uint256 value; bytes callData; } clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[doc(hidden)] #[allow(dead_code)] type UnderlyingSolTuple<'a> = ( @@ -55,9 +60,7 @@ struct Data { address target; uint256 value; bytes callData; } ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -94,99 +97,96 @@ struct Data { address target; uint256 value; bytes callData; } ::tokenize( &self.target, ), - as alloy_sol_types::SolType>::tokenize(&self.value), + as alloy_sol_types::SolType>::tokenize( + &self.value, + ), ::tokenize( &self.callData, ), ) } + #[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) + 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) + 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) + 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 Data { type RustType = Self; - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + + const ENCODED_SIZE: Option = + as alloy_sol_types::SolType>::ENCODED_SIZE; + const PACKED_ENCODED_SIZE: Option = + as alloy_sol_types::SolType>::PACKED_ENCODED_SIZE; 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); + let tuple = as alloy_sol_types::SolType>::detokenize(token); >>::from(tuple) } } #[automatically_derived] impl alloy_sol_types::SolStruct for Data { const NAME: &'static str = "Data"; + #[inline] fn eip712_root_type() -> alloy_sol_types::private::Cow<'static, str> { alloy_sol_types::private::Cow::Borrowed( "Data(address target,uint256 value,bytes callData)", ) } + #[inline] - fn eip712_components() -> alloy_sol_types::private::Vec< - alloy_sol_types::private::Cow<'static, str>, - > { + fn eip712_components() + -> alloy_sol_types::private::Vec> + { 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 { [ @@ -221,14 +221,13 @@ struct Data { address target; uint256 value; bytes callData; } &rust.callData, ) } + #[inline] fn encode_topic_preimage( rust: &Self::RustType, out: &mut alloy_sol_types::private::Vec, ) { - out.reserve( - ::topic_preimage_length(rust), - ); + out.reserve(::topic_preimage_length(rust)); ::encode_topic_preimage( &rust.target, out, @@ -244,25 +243,19 @@ struct Data { address target; uint256 value; bytes callData; } out, ); } + #[inline] - fn encode_topic( - rust: &Self::RustType, - ) -> alloy_sol_types::abi::token::WordToken { + 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), - ) + ::encode_topic_preimage(rust, &mut out); + alloy_sol_types::abi::token::WordToken(alloy_sol_types::private::keccak256(out)) } } }; - use alloy_contract as alloy_contract; + use alloy_contract; /**Creates a new wrapper around an on-chain [`GPv2Interaction`](self) contract instance. -See the [wrapper's documentation](`GPv2InteractionInstance`) for more details.*/ + See the [wrapper's documentation](`GPv2InteractionInstance`) for more details.*/ #[inline] pub const fn new< P: alloy_contract::private::Provider, @@ -275,15 +268,15 @@ See the [wrapper's documentation](`GPv2InteractionInstance`) for more details.*/ } /**A [`GPv2Interaction`](self) instance. -Contains type-safe methods for interacting with an on-chain instance of the -[`GPv2Interaction`](self) contract located at a given `address`, using a given -provider `P`. + Contains type-safe methods for interacting with an on-chain instance of the + [`GPv2Interaction`](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. + 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.*/ + See the [module-level documentation](self) for all the available methods.*/ #[derive(Clone)] pub struct GPv2InteractionInstance { address: alloy_sol_types::private::Address, @@ -294,43 +287,45 @@ See the [module-level documentation](self) for all the available methods.*/ impl ::core::fmt::Debug for GPv2InteractionInstance { #[inline] fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { - f.debug_tuple("GPv2InteractionInstance").field(&self.address).finish() + f.debug_tuple("GPv2InteractionInstance") + .field(&self.address) + .finish() } } /// Instantiation and getters/setters. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > GPv2InteractionInstance { + impl, N: alloy_contract::private::Network> + GPv2InteractionInstance + { /**Creates a new wrapper around an on-chain [`GPv2Interaction`](self) contract instance. -See the [wrapper's documentation](`GPv2InteractionInstance`) for more details.*/ + See the [wrapper's documentation](`GPv2InteractionInstance`) for more details.*/ #[inline] - pub const fn new( - address: alloy_sol_types::private::Address, - __provider: P, - ) -> Self { + pub const fn new(address: alloy_sol_types::private::Address, __provider: P) -> Self { Self { address, provider: __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 { @@ -338,7 +333,8 @@ See the [wrapper's documentation](`GPv2InteractionInstance`) for more details.*/ } } impl GPv2InteractionInstance<&P, N> { - /// Clones the provider and returns a new instance with the cloned provider. + /// Clones the provider and returns a new instance with the cloned + /// provider. #[inline] pub fn with_cloned_provider(self) -> GPv2InteractionInstance { GPv2InteractionInstance { @@ -349,14 +345,15 @@ See the [wrapper's documentation](`GPv2InteractionInstance`) for more details.*/ } } /// Function calls. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > GPv2InteractionInstance { - /// Creates a new call builder using this contract instance's provider and address. + impl, N: alloy_contract::private::Network> + GPv2InteractionInstance + { + /// 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. + /// 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, @@ -365,14 +362,15 @@ See the [wrapper's documentation](`GPv2InteractionInstance`) for more details.*/ } } /// Event filters. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > GPv2InteractionInstance { - /// Creates a new event filter using this contract instance's provider and address. + impl, N: alloy_contract::private::Network> + GPv2InteractionInstance + { + /// 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. + /// 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> { @@ -396,12 +394,11 @@ library GPv2Trade { clippy::empty_structs_with_brackets )] pub mod GPv2Trade { - use super::*; - use alloy_sol_types as alloy_sol_types; + use {super::*, alloy_sol_types}; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**```solidity -struct Data { uint256 sellTokenIndex; uint256 buyTokenIndex; address receiver; uint256 sellAmount; uint256 buyAmount; uint32 validTo; bytes32 appData; uint256 feeAmount; uint256 flags; uint256 executedAmount; bytes signature; } -```*/ + struct Data { uint256 sellTokenIndex; uint256 buyTokenIndex; address receiver; uint256 sellAmount; uint256 buyAmount; uint32 validTo; bytes32 appData; uint256 feeAmount; uint256 flags; uint256 executedAmount; bytes signature; } + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct Data { @@ -435,7 +432,7 @@ struct Data { uint256 sellTokenIndex; uint256 buyTokenIndex; address receiver; u clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[doc(hidden)] #[allow(dead_code)] type UnderlyingSolTuple<'a> = ( @@ -467,9 +464,7 @@ struct Data { uint256 sellTokenIndex; uint256 buyTokenIndex; address receiver; u ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -558,91 +553,90 @@ struct Data { uint256 sellTokenIndex; uint256 buyTokenIndex; address receiver; u ), ) } + #[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) + 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) + 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) + 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 Data { type RustType = Self; - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + + const ENCODED_SIZE: Option = + as alloy_sol_types::SolType>::ENCODED_SIZE; + const PACKED_ENCODED_SIZE: Option = + as alloy_sol_types::SolType>::PACKED_ENCODED_SIZE; 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); + let tuple = as alloy_sol_types::SolType>::detokenize(token); >>::from(tuple) } } #[automatically_derived] impl alloy_sol_types::SolStruct for Data { const NAME: &'static str = "Data"; + #[inline] fn eip712_root_type() -> alloy_sol_types::private::Cow<'static, str> { alloy_sol_types::private::Cow::Borrowed( - "Data(uint256 sellTokenIndex,uint256 buyTokenIndex,address receiver,uint256 sellAmount,uint256 buyAmount,uint32 validTo,bytes32 appData,uint256 feeAmount,uint256 flags,uint256 executedAmount,bytes signature)", + "Data(uint256 sellTokenIndex,uint256 buyTokenIndex,address receiver,uint256 \ + sellAmount,uint256 buyAmount,uint32 validTo,bytes32 appData,uint256 \ + feeAmount,uint256 flags,uint256 executedAmount,bytes signature)", ) } + #[inline] - fn eip712_components() -> alloy_sol_types::private::Vec< - alloy_sol_types::private::Cow<'static, str>, - > { + fn eip712_components() + -> alloy_sol_types::private::Vec> + { 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 { [ @@ -753,14 +747,13 @@ struct Data { uint256 sellTokenIndex; uint256 buyTokenIndex; address receiver; u &rust.signature, ) } + #[inline] fn encode_topic_preimage( rust: &Self::RustType, out: &mut alloy_sol_types::private::Vec, ) { - out.reserve( - ::topic_preimage_length(rust), - ); + out.reserve(::topic_preimage_length(rust)); as alloy_sol_types::EventTopic>::encode_topic_preimage( @@ -824,25 +817,19 @@ struct Data { uint256 sellTokenIndex; uint256 buyTokenIndex; address receiver; u out, ); } + #[inline] - fn encode_topic( - rust: &Self::RustType, - ) -> alloy_sol_types::abi::token::WordToken { + 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), - ) + ::encode_topic_preimage(rust, &mut out); + alloy_sol_types::abi::token::WordToken(alloy_sol_types::private::keccak256(out)) } } }; - use alloy_contract as alloy_contract; + use alloy_contract; /**Creates a new wrapper around an on-chain [`GPv2Trade`](self) contract instance. -See the [wrapper's documentation](`GPv2TradeInstance`) for more details.*/ + See the [wrapper's documentation](`GPv2TradeInstance`) for more details.*/ #[inline] pub const fn new< P: alloy_contract::private::Provider, @@ -855,15 +842,15 @@ See the [wrapper's documentation](`GPv2TradeInstance`) for more details.*/ } /**A [`GPv2Trade`](self) instance. -Contains type-safe methods for interacting with an on-chain instance of the -[`GPv2Trade`](self) contract located at a given `address`, using a given -provider `P`. + Contains type-safe methods for interacting with an on-chain instance of the + [`GPv2Trade`](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. + 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.*/ + See the [module-level documentation](self) for all the available methods.*/ #[derive(Clone)] pub struct GPv2TradeInstance { address: alloy_sol_types::private::Address, @@ -874,43 +861,45 @@ See the [module-level documentation](self) for all the available methods.*/ impl ::core::fmt::Debug for GPv2TradeInstance { #[inline] fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { - f.debug_tuple("GPv2TradeInstance").field(&self.address).finish() + f.debug_tuple("GPv2TradeInstance") + .field(&self.address) + .finish() } } /// Instantiation and getters/setters. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > GPv2TradeInstance { + impl, N: alloy_contract::private::Network> + GPv2TradeInstance + { /**Creates a new wrapper around an on-chain [`GPv2Trade`](self) contract instance. -See the [wrapper's documentation](`GPv2TradeInstance`) for more details.*/ + See the [wrapper's documentation](`GPv2TradeInstance`) for more details.*/ #[inline] - pub const fn new( - address: alloy_sol_types::private::Address, - __provider: P, - ) -> Self { + pub const fn new(address: alloy_sol_types::private::Address, __provider: P) -> Self { Self { address, provider: __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 { @@ -918,7 +907,8 @@ See the [wrapper's documentation](`GPv2TradeInstance`) for more details.*/ } } impl GPv2TradeInstance<&P, N> { - /// Clones the provider and returns a new instance with the cloned provider. + /// Clones the provider and returns a new instance with the cloned + /// provider. #[inline] pub fn with_cloned_provider(self) -> GPv2TradeInstance { GPv2TradeInstance { @@ -929,14 +919,15 @@ See the [wrapper's documentation](`GPv2TradeInstance`) for more details.*/ } } /// Function calls. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > GPv2TradeInstance { - /// Creates a new call builder using this contract instance's provider and address. + impl, N: alloy_contract::private::Network> + GPv2TradeInstance + { + /// 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. + /// 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, @@ -945,14 +936,15 @@ See the [wrapper's documentation](`GPv2TradeInstance`) for more details.*/ } } /// Event filters. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > GPv2TradeInstance { - /// Creates a new event filter using this contract instance's provider and address. + impl, N: alloy_contract::private::Network> + GPv2TradeInstance + { + /// 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. + /// 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> { @@ -976,12 +968,11 @@ library IVault { clippy::empty_structs_with_brackets )] pub mod IVault { - use super::*; - use alloy_sol_types as alloy_sol_types; + use {super::*, alloy_sol_types}; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**```solidity -struct BatchSwapStep { bytes32 poolId; uint256 assetInIndex; uint256 assetOutIndex; uint256 amount; bytes userData; } -```*/ + struct BatchSwapStep { bytes32 poolId; uint256 assetInIndex; uint256 assetOutIndex; uint256 amount; bytes userData; } + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct BatchSwapStep { @@ -1003,7 +994,7 @@ struct BatchSwapStep { bytes32 poolId; uint256 assetInIndex; uint256 assetOutInd clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[doc(hidden)] #[allow(dead_code)] type UnderlyingSolTuple<'a> = ( @@ -1023,9 +1014,7 @@ struct BatchSwapStep { bytes32 poolId; uint256 assetInIndex; uint256 assetOutInd ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1084,91 +1073,89 @@ struct BatchSwapStep { bytes32 poolId; uint256 assetInIndex; uint256 assetOutInd ), ) } + #[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) + 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) + 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) + 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 BatchSwapStep { type RustType = Self; - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + + const ENCODED_SIZE: Option = + as alloy_sol_types::SolType>::ENCODED_SIZE; + const PACKED_ENCODED_SIZE: Option = + as alloy_sol_types::SolType>::PACKED_ENCODED_SIZE; 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); + let tuple = as alloy_sol_types::SolType>::detokenize(token); >>::from(tuple) } } #[automatically_derived] impl alloy_sol_types::SolStruct for BatchSwapStep { const NAME: &'static str = "BatchSwapStep"; + #[inline] fn eip712_root_type() -> alloy_sol_types::private::Cow<'static, str> { alloy_sol_types::private::Cow::Borrowed( - "BatchSwapStep(bytes32 poolId,uint256 assetInIndex,uint256 assetOutIndex,uint256 amount,bytes userData)", + "BatchSwapStep(bytes32 poolId,uint256 assetInIndex,uint256 \ + assetOutIndex,uint256 amount,bytes userData)", ) } + #[inline] - fn eip712_components() -> alloy_sol_types::private::Vec< - alloy_sol_types::private::Cow<'static, str>, - > { + fn eip712_components() + -> alloy_sol_types::private::Vec> + { 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 { [ @@ -1225,14 +1212,13 @@ struct BatchSwapStep { bytes32 poolId; uint256 assetInIndex; uint256 assetOutInd &rust.userData, ) } + #[inline] fn encode_topic_preimage( rust: &Self::RustType, out: &mut alloy_sol_types::private::Vec, ) { - out.reserve( - ::topic_preimage_length(rust), - ); + out.reserve(::topic_preimage_length(rust)); as alloy_sol_types::EventTopic>::encode_topic_preimage( @@ -1262,25 +1248,19 @@ struct BatchSwapStep { bytes32 poolId; uint256 assetInIndex; uint256 assetOutInd out, ); } + #[inline] - fn encode_topic( - rust: &Self::RustType, - ) -> alloy_sol_types::abi::token::WordToken { + 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), - ) + ::encode_topic_preimage(rust, &mut out); + alloy_sol_types::abi::token::WordToken(alloy_sol_types::private::keccak256(out)) } } }; - use alloy_contract as alloy_contract; + use alloy_contract; /**Creates a new wrapper around an on-chain [`IVault`](self) contract instance. -See the [wrapper's documentation](`IVaultInstance`) for more details.*/ + See the [wrapper's documentation](`IVaultInstance`) for more details.*/ #[inline] pub const fn new< P: alloy_contract::private::Provider, @@ -1293,15 +1273,15 @@ See the [wrapper's documentation](`IVaultInstance`) for more details.*/ } /**A [`IVault`](self) instance. -Contains type-safe methods for interacting with an on-chain instance of the -[`IVault`](self) contract located at a given `address`, using a given -provider `P`. + Contains type-safe methods for interacting with an on-chain instance of the + [`IVault`](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. + 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.*/ + See the [module-level documentation](self) for all the available methods.*/ #[derive(Clone)] pub struct IVaultInstance { address: alloy_sol_types::private::Address, @@ -1312,43 +1292,45 @@ See the [module-level documentation](self) for all the available methods.*/ impl ::core::fmt::Debug for IVaultInstance { #[inline] fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { - f.debug_tuple("IVaultInstance").field(&self.address).finish() + f.debug_tuple("IVaultInstance") + .field(&self.address) + .finish() } } /// Instantiation and getters/setters. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > IVaultInstance { + impl, N: alloy_contract::private::Network> + IVaultInstance + { /**Creates a new wrapper around an on-chain [`IVault`](self) contract instance. -See the [wrapper's documentation](`IVaultInstance`) for more details.*/ + See the [wrapper's documentation](`IVaultInstance`) for more details.*/ #[inline] - pub const fn new( - address: alloy_sol_types::private::Address, - __provider: P, - ) -> Self { + pub const fn new(address: alloy_sol_types::private::Address, __provider: P) -> Self { Self { address, provider: __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 { @@ -1356,7 +1338,8 @@ See the [wrapper's documentation](`IVaultInstance`) for more details.*/ } } impl IVaultInstance<&P, N> { - /// Clones the provider and returns a new instance with the cloned provider. + /// Clones the provider and returns a new instance with the cloned + /// provider. #[inline] pub fn with_cloned_provider(self) -> IVaultInstance { IVaultInstance { @@ -1367,14 +1350,15 @@ See the [wrapper's documentation](`IVaultInstance`) for more details.*/ } } /// Function calls. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > IVaultInstance { - /// Creates a new call builder using this contract instance's provider and address. + impl, N: alloy_contract::private::Network> + IVaultInstance + { + /// 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. + /// 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, @@ -1383,14 +1367,15 @@ See the [wrapper's documentation](`IVaultInstance`) for more details.*/ } } /// Event filters. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > IVaultInstance { - /// Creates a new event filter using this contract instance's provider and address. + impl, N: alloy_contract::private::Network> + IVaultInstance + { + /// 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. + /// 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> { @@ -1959,8 +1944,7 @@ interface GPv2Settlement { clippy::empty_structs_with_brackets )] pub mod GPv2Settlement { - use super::*; - use alloy_sol_types as alloy_sol_types; + use {super::*, alloy_sol_types}; /// The creation / init bytecode of the contract. /// /// ```text @@ -1973,9 +1957,9 @@ pub mod GPv2Settlement { ); #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Event with signature `Interaction(address,uint256,bytes4)` and selector `0xed99827efb37016f2275f98c4bcf71c7551c75d59e9b450f79fa32e60be672c2`. -```solidity -event Interaction(address indexed target, uint256 value, bytes4 selector); -```*/ + ```solidity + event Interaction(address indexed target, uint256 value, bytes4 selector); + ```*/ #[allow( non_camel_case_types, non_snake_case, @@ -1998,27 +1982,28 @@ event Interaction(address indexed target, uint256 value, bytes4 selector); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[automatically_derived] impl alloy_sol_types::SolEvent for Interaction { + type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type DataTuple<'a> = ( alloy_sol_types::sol_data::Uint<256>, alloy_sol_types::sol_data::FixedBytes<4>, ); - 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, ); - const SIGNATURE: &'static str = "Interaction(address,uint256,bytes4)"; - const SIGNATURE_HASH: alloy_sol_types::private::B256 = alloy_sol_types::private::B256::new([ - 237u8, 153u8, 130u8, 126u8, 251u8, 55u8, 1u8, 111u8, 34u8, 117u8, 249u8, - 140u8, 75u8, 207u8, 113u8, 199u8, 85u8, 28u8, 117u8, 213u8, 158u8, 155u8, - 69u8, 15u8, 121u8, 250u8, 50u8, 230u8, 11u8, 230u8, 114u8, 194u8, - ]); + const ANONYMOUS: bool = false; + const SIGNATURE: &'static str = "Interaction(address,uint256,bytes4)"; + const SIGNATURE_HASH: alloy_sol_types::private::B256 = + alloy_sol_types::private::B256::new([ + 237u8, 153u8, 130u8, 126u8, 251u8, 55u8, 1u8, 111u8, 34u8, 117u8, 249u8, 140u8, + 75u8, 207u8, 113u8, 199u8, 85u8, 28u8, 117u8, 213u8, 158u8, 155u8, 69u8, 15u8, + 121u8, 250u8, 50u8, 230u8, 11u8, 230u8, 114u8, 194u8, + ]); + #[allow(unused_variables)] #[inline] fn new( @@ -2031,21 +2016,21 @@ event Interaction(address indexed target, uint256 value, bytes4 selector); selector: 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, - ), - ); + 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<'_> { ( @@ -2057,10 +2042,12 @@ event Interaction(address indexed target, uint256 value, bytes4 selector); > as alloy_sol_types::SolType>::tokenize(&self.selector), ) } + #[inline] fn topics(&self) -> ::RustType { (Self::SIGNATURE_HASH.into(), self.target.clone()) } + #[inline] fn encode_topics_raw( &self, @@ -2069,9 +2056,7 @@ event Interaction(address indexed target, uint256 value, bytes4 selector); if out.len() < ::COUNT { return Err(alloy_sol_types::Error::Overrun); } - out[0usize] = alloy_sol_types::abi::token::WordToken( - Self::SIGNATURE_HASH, - ); + out[0usize] = alloy_sol_types::abi::token::WordToken(Self::SIGNATURE_HASH); out[1usize] = ::encode_topic( &self.target, ); @@ -2083,6 +2068,7 @@ event Interaction(address indexed target, uint256 value, bytes4 selector); 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) } @@ -2097,9 +2083,9 @@ event Interaction(address indexed target, uint256 value, bytes4 selector); }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Event with signature `OrderInvalidated(address,bytes)` and selector `0x875b6cb035bbd4ac6500fabc6d1e4ca5bdc58a3e2b424ccb5c24cdbebeb009a9`. -```solidity -event OrderInvalidated(address indexed owner, bytes orderUid); -```*/ + ```solidity + event OrderInvalidated(address indexed owner, bytes orderUid); + ```*/ #[allow( non_camel_case_types, non_snake_case, @@ -2120,24 +2106,25 @@ event OrderInvalidated(address indexed owner, bytes orderUid); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[automatically_derived] impl alloy_sol_types::SolEvent for OrderInvalidated { + type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type DataTuple<'a> = (alloy_sol_types::sol_data::Bytes,); - 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, ); - const SIGNATURE: &'static str = "OrderInvalidated(address,bytes)"; - const SIGNATURE_HASH: alloy_sol_types::private::B256 = alloy_sol_types::private::B256::new([ - 135u8, 91u8, 108u8, 176u8, 53u8, 187u8, 212u8, 172u8, 101u8, 0u8, 250u8, - 188u8, 109u8, 30u8, 76u8, 165u8, 189u8, 197u8, 138u8, 62u8, 43u8, 66u8, - 76u8, 203u8, 92u8, 36u8, 205u8, 190u8, 190u8, 176u8, 9u8, 169u8, - ]); + const ANONYMOUS: bool = false; + const SIGNATURE: &'static str = "OrderInvalidated(address,bytes)"; + const SIGNATURE_HASH: alloy_sol_types::private::B256 = + alloy_sol_types::private::B256::new([ + 135u8, 91u8, 108u8, 176u8, 53u8, 187u8, 212u8, 172u8, 101u8, 0u8, 250u8, 188u8, + 109u8, 30u8, 76u8, 165u8, 189u8, 197u8, 138u8, 62u8, 43u8, 66u8, 76u8, 203u8, + 92u8, 36u8, 205u8, 190u8, 190u8, 176u8, 9u8, 169u8, + ]); + #[allow(unused_variables)] #[inline] fn new( @@ -2149,21 +2136,21 @@ event OrderInvalidated(address indexed owner, bytes orderUid); orderUid: 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, - ), - ); + 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<'_> { ( @@ -2172,10 +2159,12 @@ event OrderInvalidated(address indexed owner, bytes orderUid); ), ) } + #[inline] fn topics(&self) -> ::RustType { (Self::SIGNATURE_HASH.into(), self.owner.clone()) } + #[inline] fn encode_topics_raw( &self, @@ -2184,9 +2173,7 @@ event OrderInvalidated(address indexed owner, bytes orderUid); if out.len() < ::COUNT { return Err(alloy_sol_types::Error::Overrun); } - out[0usize] = alloy_sol_types::abi::token::WordToken( - Self::SIGNATURE_HASH, - ); + out[0usize] = alloy_sol_types::abi::token::WordToken(Self::SIGNATURE_HASH); out[1usize] = ::encode_topic( &self.owner, ); @@ -2198,6 +2185,7 @@ event OrderInvalidated(address indexed owner, bytes orderUid); 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) } @@ -2212,9 +2200,9 @@ event OrderInvalidated(address indexed owner, bytes orderUid); }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Event with signature `PreSignature(address,bytes,bool)` and selector `0x01bf7c8b0ca55deecbea89d7e58295b7ffbf685fd0d96801034ba8c6ffe1c68d`. -```solidity -event PreSignature(address indexed owner, bytes orderUid, bool signed); -```*/ + ```solidity + event PreSignature(address indexed owner, bytes orderUid, bool signed); + ```*/ #[allow( non_camel_case_types, non_snake_case, @@ -2237,27 +2225,28 @@ event PreSignature(address indexed owner, bytes orderUid, bool signed); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[automatically_derived] impl alloy_sol_types::SolEvent for PreSignature { + type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type DataTuple<'a> = ( alloy_sol_types::sol_data::Bytes, alloy_sol_types::sol_data::Bool, ); - 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, ); - const SIGNATURE: &'static str = "PreSignature(address,bytes,bool)"; - const SIGNATURE_HASH: alloy_sol_types::private::B256 = alloy_sol_types::private::B256::new([ - 1u8, 191u8, 124u8, 139u8, 12u8, 165u8, 93u8, 238u8, 203u8, 234u8, 137u8, - 215u8, 229u8, 130u8, 149u8, 183u8, 255u8, 191u8, 104u8, 95u8, 208u8, - 217u8, 104u8, 1u8, 3u8, 75u8, 168u8, 198u8, 255u8, 225u8, 198u8, 141u8, - ]); + const ANONYMOUS: bool = false; + const SIGNATURE: &'static str = "PreSignature(address,bytes,bool)"; + const SIGNATURE_HASH: alloy_sol_types::private::B256 = + alloy_sol_types::private::B256::new([ + 1u8, 191u8, 124u8, 139u8, 12u8, 165u8, 93u8, 238u8, 203u8, 234u8, 137u8, 215u8, + 229u8, 130u8, 149u8, 183u8, 255u8, 191u8, 104u8, 95u8, 208u8, 217u8, 104u8, + 1u8, 3u8, 75u8, 168u8, 198u8, 255u8, 225u8, 198u8, 141u8, + ]); + #[allow(unused_variables)] #[inline] fn new( @@ -2270,21 +2259,21 @@ event PreSignature(address indexed owner, bytes orderUid, bool signed); signed: 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, - ), - ); + 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<'_> { ( @@ -2296,10 +2285,12 @@ event PreSignature(address indexed owner, bytes orderUid, bool signed); ), ) } + #[inline] fn topics(&self) -> ::RustType { (Self::SIGNATURE_HASH.into(), self.owner.clone()) } + #[inline] fn encode_topics_raw( &self, @@ -2308,9 +2299,7 @@ event PreSignature(address indexed owner, bytes orderUid, bool signed); if out.len() < ::COUNT { return Err(alloy_sol_types::Error::Overrun); } - out[0usize] = alloy_sol_types::abi::token::WordToken( - Self::SIGNATURE_HASH, - ); + out[0usize] = alloy_sol_types::abi::token::WordToken(Self::SIGNATURE_HASH); out[1usize] = ::encode_topic( &self.owner, ); @@ -2322,6 +2311,7 @@ event PreSignature(address indexed owner, bytes orderUid, bool signed); 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) } @@ -2336,9 +2326,9 @@ event PreSignature(address indexed owner, bytes orderUid, bool signed); }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Event with signature `Settlement(address)` and selector `0x40338ce1a7c49204f0099533b1e9a7ee0a3d261f84974ab7af36105b8c4e9db4`. -```solidity -event Settlement(address indexed solver); -```*/ + ```solidity + event Settlement(address indexed solver); + ```*/ #[allow( non_camel_case_types, non_snake_case, @@ -2357,24 +2347,25 @@ event Settlement(address indexed solver); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[automatically_derived] impl alloy_sol_types::SolEvent for Settlement { + type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; 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::Address, ); - const SIGNATURE: &'static str = "Settlement(address)"; - const SIGNATURE_HASH: alloy_sol_types::private::B256 = alloy_sol_types::private::B256::new([ - 64u8, 51u8, 140u8, 225u8, 167u8, 196u8, 146u8, 4u8, 240u8, 9u8, 149u8, - 51u8, 177u8, 233u8, 167u8, 238u8, 10u8, 61u8, 38u8, 31u8, 132u8, 151u8, - 74u8, 183u8, 175u8, 54u8, 16u8, 91u8, 140u8, 78u8, 157u8, 180u8, - ]); + const ANONYMOUS: bool = false; + const SIGNATURE: &'static str = "Settlement(address)"; + const SIGNATURE_HASH: alloy_sol_types::private::B256 = + alloy_sol_types::private::B256::new([ + 64u8, 51u8, 140u8, 225u8, 167u8, 196u8, 146u8, 4u8, 240u8, 9u8, 149u8, 51u8, + 177u8, 233u8, 167u8, 238u8, 10u8, 61u8, 38u8, 31u8, 132u8, 151u8, 74u8, 183u8, + 175u8, 54u8, 16u8, 91u8, 140u8, 78u8, 157u8, 180u8, + ]); + #[allow(unused_variables)] #[inline] fn new( @@ -2383,29 +2374,31 @@ event Settlement(address indexed solver); ) -> Self { Self { solver: topics.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, - ), - ); + 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.solver.clone()) } + #[inline] fn encode_topics_raw( &self, @@ -2414,9 +2407,7 @@ event Settlement(address indexed solver); if out.len() < ::COUNT { return Err(alloy_sol_types::Error::Overrun); } - out[0usize] = alloy_sol_types::abi::token::WordToken( - Self::SIGNATURE_HASH, - ); + out[0usize] = alloy_sol_types::abi::token::WordToken(Self::SIGNATURE_HASH); out[1usize] = ::encode_topic( &self.solver, ); @@ -2428,6 +2419,7 @@ event Settlement(address indexed solver); 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) } @@ -2442,9 +2434,9 @@ event Settlement(address indexed solver); }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Event with signature `Trade(address,address,address,uint256,uint256,uint256,bytes)` and selector `0xa07a543ab8a018198e99ca0184c93fe9050a79400a0a723441f84de1d972cc17`. -```solidity -event Trade(address indexed owner, address sellToken, address buyToken, uint256 sellAmount, uint256 buyAmount, uint256 feeAmount, bytes orderUid); -```*/ + ```solidity + event Trade(address indexed owner, address sellToken, address buyToken, uint256 sellAmount, uint256 buyAmount, uint256 feeAmount, bytes orderUid); + ```*/ #[allow( non_camel_case_types, non_snake_case, @@ -2475,9 +2467,10 @@ event Trade(address indexed owner, address sellToken, address buyToken, uint256 clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[automatically_derived] impl alloy_sol_types::SolEvent for Trade { + type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type DataTuple<'a> = ( alloy_sol_types::sol_data::Address, alloy_sol_types::sol_data::Address, @@ -2486,20 +2479,21 @@ event Trade(address indexed owner, address sellToken, address buyToken, uint256 alloy_sol_types::sol_data::Uint<256>, alloy_sol_types::sol_data::Bytes, ); - 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, ); - const SIGNATURE: &'static str = "Trade(address,address,address,uint256,uint256,uint256,bytes)"; - const SIGNATURE_HASH: alloy_sol_types::private::B256 = alloy_sol_types::private::B256::new([ - 160u8, 122u8, 84u8, 58u8, 184u8, 160u8, 24u8, 25u8, 142u8, 153u8, 202u8, - 1u8, 132u8, 201u8, 63u8, 233u8, 5u8, 10u8, 121u8, 64u8, 10u8, 10u8, - 114u8, 52u8, 65u8, 248u8, 77u8, 225u8, 217u8, 114u8, 204u8, 23u8, - ]); + const ANONYMOUS: bool = false; + const SIGNATURE: &'static str = + "Trade(address,address,address,uint256,uint256,uint256,bytes)"; + const SIGNATURE_HASH: alloy_sol_types::private::B256 = + alloy_sol_types::private::B256::new([ + 160u8, 122u8, 84u8, 58u8, 184u8, 160u8, 24u8, 25u8, 142u8, 153u8, 202u8, 1u8, + 132u8, 201u8, 63u8, 233u8, 5u8, 10u8, 121u8, 64u8, 10u8, 10u8, 114u8, 52u8, + 65u8, 248u8, 77u8, 225u8, 217u8, 114u8, 204u8, 23u8, + ]); + #[allow(unused_variables)] #[inline] fn new( @@ -2516,21 +2510,21 @@ event Trade(address indexed owner, address sellToken, address buyToken, uint256 orderUid: data.5, } } + #[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, - ), - ); + 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<'_> { ( @@ -2540,24 +2534,26 @@ event Trade(address indexed owner, address sellToken, address buyToken, uint256 ::tokenize( &self.buyToken, ), - as alloy_sol_types::SolType>::tokenize(&self.sellAmount), - as alloy_sol_types::SolType>::tokenize(&self.buyAmount), - as alloy_sol_types::SolType>::tokenize(&self.feeAmount), + as alloy_sol_types::SolType>::tokenize( + &self.sellAmount, + ), + as alloy_sol_types::SolType>::tokenize( + &self.buyAmount, + ), + as alloy_sol_types::SolType>::tokenize( + &self.feeAmount, + ), ::tokenize( &self.orderUid, ), ) } + #[inline] fn topics(&self) -> ::RustType { (Self::SIGNATURE_HASH.into(), self.owner.clone()) } + #[inline] fn encode_topics_raw( &self, @@ -2566,9 +2562,7 @@ event Trade(address indexed owner, address sellToken, address buyToken, uint256 if out.len() < ::COUNT { return Err(alloy_sol_types::Error::Overrun); } - out[0usize] = alloy_sol_types::abi::token::WordToken( - Self::SIGNATURE_HASH, - ); + out[0usize] = alloy_sol_types::abi::token::WordToken(Self::SIGNATURE_HASH); out[1usize] = ::encode_topic( &self.owner, ); @@ -2580,6 +2574,7 @@ event Trade(address indexed owner, address sellToken, address buyToken, uint256 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) } @@ -2593,9 +2588,9 @@ event Trade(address indexed owner, address sellToken, address buyToken, uint256 } }; /**Constructor`. -```solidity -constructor(address authenticator_, address vault_); -```*/ + ```solidity + constructor(address authenticator_, address vault_); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct constructorCall { @@ -2605,7 +2600,7 @@ constructor(address authenticator_, address vault_); pub vault_: alloy_sol_types::private::Address, } const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -2620,9 +2615,7 @@ constructor(address authenticator_, address vault_); ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -2653,15 +2646,15 @@ constructor(address authenticator_, address vault_); alloy_sol_types::sol_data::Address, alloy_sol_types::sol_data::Address, ); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + 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<'_> { ( @@ -2677,14 +2670,15 @@ constructor(address authenticator_, address vault_); }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `authenticator()` and selector `0x2335c76b`. -```solidity -function authenticator() external view returns (address); -```*/ + ```solidity + function authenticator() external view returns (address); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct authenticatorCall; #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`authenticator()`](authenticatorCall) function. + ///Container type for the return parameters of the + /// [`authenticator()`](authenticatorCall) function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct authenticatorReturn { @@ -2698,7 +2692,7 @@ function authenticator() external view returns (address); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -2707,9 +2701,7 @@ function authenticator() external view returns (address); type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -2739,9 +2731,7 @@ function authenticator() external view returns (address); type UnderlyingRustTuple<'a> = (alloy_sol_types::private::Address,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -2766,68 +2756,64 @@ function authenticator() external view returns (address); #[automatically_derived] impl alloy_sol_types::SolCall for authenticatorCall { type Parameters<'a> = (); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = alloy_sol_types::private::Address; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (alloy_sol_types::sol_data::Address,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "authenticator()"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [35u8, 53u8, 199u8, 107u8]; + const SIGNATURE: &'static str = "authenticator()"; + #[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, - ), - ) + (::tokenize(ret),) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) - .map(|r| { + as alloy_sol_types::SolType>::abi_decode_sequence(data).map( + |r| { let r: authenticatorReturn = 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: authenticatorReturn = r.into(); - r._0 - }) + 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: authenticatorReturn = r.into(); + r._0 + }) } } }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `domainSeparator()` and selector `0xf698da25`. -```solidity -function domainSeparator() external view returns (bytes32); -```*/ + ```solidity + function domainSeparator() external view returns (bytes32); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct domainSeparatorCall; #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`domainSeparator()`](domainSeparatorCall) function. + ///Container type for the return parameters of the + /// [`domainSeparator()`](domainSeparatorCall) function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct domainSeparatorReturn { @@ -2841,7 +2827,7 @@ function domainSeparator() external view returns (bytes32); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -2850,9 +2836,7 @@ function domainSeparator() external view returns (bytes32); type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -2882,9 +2866,7 @@ function domainSeparator() external view returns (bytes32); 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, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -2893,16 +2875,14 @@ function domainSeparator() external view returns (bytes32); } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From - for UnderlyingRustTuple<'_> { + impl ::core::convert::From for UnderlyingRustTuple<'_> { fn from(value: domainSeparatorReturn) -> Self { (value._0,) } } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From> - for domainSeparatorReturn { + impl ::core::convert::From> for domainSeparatorReturn { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { Self { _0: tuple.0 } } @@ -2911,26 +2891,26 @@ function domainSeparator() external view returns (bytes32); #[automatically_derived] impl alloy_sol_types::SolCall for domainSeparatorCall { type Parameters<'a> = (); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = alloy_sol_types::private::FixedBytes<32>; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (alloy_sol_types::sol_data::FixedBytes<32>,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "domainSeparator()"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [246u8, 152u8, 218u8, 37u8]; + const SIGNATURE: &'static str = "domainSeparator()"; + #[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<'_> { ( @@ -2939,40 +2919,40 @@ function domainSeparator() external view returns (bytes32); > 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| { + as alloy_sol_types::SolType>::abi_decode_sequence(data).map( + |r| { let r: domainSeparatorReturn = 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: domainSeparatorReturn = r.into(); - r._0 - }) + 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: domainSeparatorReturn = r.into(); + r._0 + }) } } }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `filledAmount(bytes)` and selector `0x2479fb6e`. -```solidity -function filledAmount(bytes memory) external view returns (uint256); -```*/ + ```solidity + function filledAmount(bytes memory) external view returns (uint256); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct filledAmountCall(pub alloy_sol_types::private::Bytes); #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`filledAmount(bytes)`](filledAmountCall) function. + ///Container type for the return parameters of the + /// [`filledAmount(bytes)`](filledAmountCall) function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct filledAmountReturn { @@ -2986,7 +2966,7 @@ function filledAmount(bytes memory) external view returns (uint256); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -2995,9 +2975,7 @@ function filledAmount(bytes memory) external view returns (uint256); type UnderlyingRustTuple<'a> = (alloy_sol_types::private::Bytes,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -3024,14 +3002,10 @@ function filledAmount(bytes memory) external view returns (uint256); #[allow(dead_code)] type UnderlyingSolTuple<'a> = (alloy_sol_types::sol_data::Uint<256>,); #[doc(hidden)] - type UnderlyingRustTuple<'a> = ( - alloy_sol_types::private::primitives::aliases::U256, - ); + 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, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -3056,22 +3030,21 @@ function filledAmount(bytes memory) external view returns (uint256); #[automatically_derived] impl alloy_sol_types::SolCall for filledAmountCall { type Parameters<'a> = (alloy_sol_types::sol_data::Bytes,); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = alloy_sol_types::private::primitives::aliases::U256; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (alloy_sol_types::sol_data::Uint<256>,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "filledAmount(bytes)"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [36u8, 121u8, 251u8, 110u8]; + const SIGNATURE: &'static str = "filledAmount(bytes)"; + #[inline] fn new<'a>( tuple: as alloy_sol_types::SolType>::RustType, ) -> Self { tuple.into() } + #[inline] fn tokenize(&self) -> Self::Token<'_> { ( @@ -3080,50 +3053,51 @@ function filledAmount(bytes memory) external view returns (uint256); ), ) } + #[inline] fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { ( - as alloy_sol_types::SolType>::tokenize(ret), + 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| { + as alloy_sol_types::SolType>::abi_decode_sequence(data).map( + |r| { let r: filledAmountReturn = 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: filledAmountReturn = r.into(); - r._0 - }) + 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: filledAmountReturn = r.into(); + r._0 + }) } } }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `invalidateOrder(bytes)` and selector `0x15337bc0`. -```solidity -function invalidateOrder(bytes memory orderUid) external; -```*/ + ```solidity + function invalidateOrder(bytes memory orderUid) external; + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct invalidateOrderCall { #[allow(missing_docs)] pub orderUid: alloy_sol_types::private::Bytes, } - ///Container type for the return parameters of the [`invalidateOrder(bytes)`](invalidateOrderCall) function. + ///Container type for the return parameters of the + /// [`invalidateOrder(bytes)`](invalidateOrderCall) function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct invalidateOrderReturn {} @@ -3134,7 +3108,7 @@ function invalidateOrder(bytes memory orderUid) external; clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -3143,9 +3117,7 @@ function invalidateOrder(bytes memory orderUid) external; type UnderlyingRustTuple<'a> = (alloy_sol_types::private::Bytes,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -3175,9 +3147,7 @@ function invalidateOrder(bytes memory orderUid) external; type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -3186,16 +3156,14 @@ function invalidateOrder(bytes memory orderUid) external; } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From - for UnderlyingRustTuple<'_> { + impl ::core::convert::From for UnderlyingRustTuple<'_> { fn from(value: invalidateOrderReturn) -> Self { () } } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From> - for invalidateOrderReturn { + impl ::core::convert::From> for invalidateOrderReturn { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { Self {} } @@ -3211,22 +3179,21 @@ function invalidateOrder(bytes memory orderUid) external; #[automatically_derived] impl alloy_sol_types::SolCall for invalidateOrderCall { type Parameters<'a> = (alloy_sol_types::sol_data::Bytes,); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = invalidateOrderReturn; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "invalidateOrder(bytes)"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [21u8, 51u8, 123u8, 192u8]; + const SIGNATURE: &'static str = "invalidateOrder(bytes)"; + #[inline] fn new<'a>( tuple: as alloy_sol_types::SolType>::RustType, ) -> Self { tuple.into() } + #[inline] fn tokenize(&self) -> Self::Token<'_> { ( @@ -3235,33 +3202,32 @@ function invalidateOrder(bytes memory orderUid) external; ), ) } + #[inline] fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { invalidateOrderReturn::_tokenize(ret) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) + 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) + 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(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `setPreSignature(bytes,bool)` and selector `0xec6cb13f`. -```solidity -function setPreSignature(bytes memory orderUid, bool signed) external; -```*/ + ```solidity + function setPreSignature(bytes memory orderUid, bool signed) external; + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct setPreSignatureCall { @@ -3270,7 +3236,8 @@ function setPreSignature(bytes memory orderUid, bool signed) external; #[allow(missing_docs)] pub signed: bool, } - ///Container type for the return parameters of the [`setPreSignature(bytes,bool)`](setPreSignatureCall) function. + ///Container type for the return parameters of the + /// [`setPreSignature(bytes,bool)`](setPreSignatureCall) function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct setPreSignatureReturn {} @@ -3281,7 +3248,7 @@ function setPreSignature(bytes memory orderUid, bool signed) external; clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -3293,9 +3260,7 @@ function setPreSignature(bytes memory orderUid, bool signed) external; type UnderlyingRustTuple<'a> = (alloy_sol_types::private::Bytes, bool); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -3328,9 +3293,7 @@ function setPreSignature(bytes memory orderUid, bool signed) external; type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -3339,16 +3302,14 @@ function setPreSignature(bytes memory orderUid, bool signed) external; } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From - for UnderlyingRustTuple<'_> { + impl ::core::convert::From for UnderlyingRustTuple<'_> { fn from(value: setPreSignatureReturn) -> Self { () } } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From> - for setPreSignatureReturn { + impl ::core::convert::From> for setPreSignatureReturn { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { Self {} } @@ -3367,22 +3328,21 @@ function setPreSignature(bytes memory orderUid, bool signed) external; alloy_sol_types::sol_data::Bytes, alloy_sol_types::sol_data::Bool, ); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = setPreSignatureReturn; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "setPreSignature(bytes,bool)"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [236u8, 108u8, 177u8, 63u8]; + const SIGNATURE: &'static str = "setPreSignature(bytes,bool)"; + #[inline] fn new<'a>( tuple: as alloy_sol_types::SolType>::RustType, ) -> Self { tuple.into() } + #[inline] fn tokenize(&self) -> Self::Token<'_> { ( @@ -3394,52 +3354,52 @@ function setPreSignature(bytes memory orderUid, bool signed) external; ), ) } + #[inline] fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { setPreSignatureReturn::_tokenize(ret) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) + 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) + 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(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `settle(address[],uint256[],(uint256,uint256,address,uint256,uint256,uint32,bytes32,uint256,uint256,uint256,bytes)[],(address,uint256,bytes)[][3])` and selector `0x13d79a0b`. -```solidity -function settle(address[] memory tokens, uint256[] memory clearingPrices, GPv2Trade.Data[] memory trades, GPv2Interaction.Data[][3] memory interactions) external; -```*/ + ```solidity + function settle(address[] memory tokens, uint256[] memory clearingPrices, GPv2Trade.Data[] memory trades, GPv2Interaction.Data[][3] memory interactions) external; + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct settleCall { #[allow(missing_docs)] pub tokens: alloy_sol_types::private::Vec, #[allow(missing_docs)] - pub clearingPrices: alloy_sol_types::private::Vec< - alloy_sol_types::private::primitives::aliases::U256, - >, + pub clearingPrices: + alloy_sol_types::private::Vec, #[allow(missing_docs)] - pub trades: alloy_sol_types::private::Vec< - ::RustType, - >, + pub trades: + alloy_sol_types::private::Vec<::RustType>, #[allow(missing_docs)] pub interactions: [alloy_sol_types::private::Vec< ::RustType, >; 3usize], } - ///Container type for the return parameters of the [`settle(address[],uint256[],(uint256,uint256,address,uint256,uint256,uint32,bytes32,uint256,uint256,uint256,bytes)[],(address,uint256,bytes)[][3])`](settleCall) function. + ///Container type for the return parameters of the + /// [`settle(address[],uint256[],(uint256,uint256,address,uint256,uint256, + /// uint32,bytes32,uint256,uint256,uint256,bytes)[],(address,uint256, + /// bytes)[][3])`](settleCall) function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct settleReturn {} @@ -3450,7 +3410,7 @@ function settle(address[] memory tokens, uint256[] memory clearingPrices, GPv2Tr clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -3466,9 +3426,7 @@ function settle(address[] memory tokens, uint256[] memory clearingPrices, GPv2Tr #[doc(hidden)] type UnderlyingRustTuple<'a> = ( alloy_sol_types::private::Vec, - alloy_sol_types::private::Vec< - alloy_sol_types::private::primitives::aliases::U256, - >, + alloy_sol_types::private::Vec, alloy_sol_types::private::Vec< ::RustType, >, @@ -3478,9 +3436,7 @@ function settle(address[] memory tokens, uint256[] memory clearingPrices, GPv2Tr ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -3520,9 +3476,7 @@ function settle(address[] memory tokens, uint256[] memory clearingPrices, GPv2Tr type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -3545,9 +3499,7 @@ function settle(address[] memory tokens, uint256[] memory clearingPrices, GPv2Tr } } impl settleReturn { - fn _tokenize( - &self, - ) -> ::ReturnToken<'_> { + fn _tokenize(&self) -> ::ReturnToken<'_> { () } } @@ -3562,22 +3514,23 @@ function settle(address[] memory tokens, uint256[] memory clearingPrices, GPv2Tr 3usize, >, ); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = settleReturn; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "settle(address[],uint256[],(uint256,uint256,address,uint256,uint256,uint32,bytes32,uint256,uint256,uint256,bytes)[],(address,uint256,bytes)[][3])"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [19u8, 215u8, 154u8, 11u8]; + const SIGNATURE: &'static str = "settle(address[],uint256[],(uint256,uint256,address,\ + uint256,uint256,uint32,bytes32,uint256,uint256,\ + uint256,bytes)[],(address,uint256,bytes)[][3])"; + #[inline] fn new<'a>( tuple: as alloy_sol_types::SolType>::RustType, ) -> Self { tuple.into() } + #[inline] fn tokenize(&self) -> Self::Token<'_> { ( @@ -3596,33 +3549,32 @@ function settle(address[] memory tokens, uint256[] memory clearingPrices, GPv2Tr > as alloy_sol_types::SolType>::tokenize(&self.interactions), ) } + #[inline] fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { settleReturn::_tokenize(ret) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) + 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) + 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(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `simulateDelegatecall(address,bytes)` and selector `0xf84436bd`. -```solidity -function simulateDelegatecall(address targetContract, bytes memory calldataPayload) external returns (bytes memory response); -```*/ + ```solidity + function simulateDelegatecall(address targetContract, bytes memory calldataPayload) external returns (bytes memory response); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct simulateDelegatecallCall { @@ -3632,7 +3584,9 @@ function simulateDelegatecall(address targetContract, bytes memory calldataPaylo pub calldataPayload: alloy_sol_types::private::Bytes, } #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`simulateDelegatecall(address,bytes)`](simulateDelegatecallCall) function. + ///Container type for the return parameters of the + /// [`simulateDelegatecall(address,bytes)`](simulateDelegatecallCall) + /// function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct simulateDelegatecallReturn { @@ -3646,7 +3600,7 @@ function simulateDelegatecall(address targetContract, bytes memory calldataPaylo clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -3661,9 +3615,7 @@ function simulateDelegatecall(address targetContract, bytes memory calldataPaylo ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -3672,16 +3624,14 @@ function simulateDelegatecall(address targetContract, bytes memory calldataPaylo } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From - for UnderlyingRustTuple<'_> { + impl ::core::convert::From for UnderlyingRustTuple<'_> { fn from(value: simulateDelegatecallCall) -> Self { (value.targetContract, value.calldataPayload) } } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From> - for simulateDelegatecallCall { + impl ::core::convert::From> for simulateDelegatecallCall { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { Self { targetContract: tuple.0, @@ -3698,9 +3648,7 @@ function simulateDelegatecall(address targetContract, bytes memory calldataPaylo type UnderlyingRustTuple<'a> = (alloy_sol_types::private::Bytes,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -3709,16 +3657,14 @@ function simulateDelegatecall(address targetContract, bytes memory calldataPaylo } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From - for UnderlyingRustTuple<'_> { + impl ::core::convert::From for UnderlyingRustTuple<'_> { fn from(value: simulateDelegatecallReturn) -> Self { (value.response,) } } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From> - for simulateDelegatecallReturn { + impl ::core::convert::From> for simulateDelegatecallReturn { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { Self { response: tuple.0 } } @@ -3730,22 +3676,21 @@ function simulateDelegatecall(address targetContract, bytes memory calldataPaylo alloy_sol_types::sol_data::Address, alloy_sol_types::sol_data::Bytes, ); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = alloy_sol_types::private::Bytes; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (alloy_sol_types::sol_data::Bytes,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "simulateDelegatecall(address,bytes)"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [248u8, 68u8, 54u8, 189u8]; + const SIGNATURE: &'static str = "simulateDelegatecall(address,bytes)"; + #[inline] fn new<'a>( tuple: as alloy_sol_types::SolType>::RustType, ) -> Self { tuple.into() } + #[inline] fn tokenize(&self) -> Self::Token<'_> { ( @@ -3757,43 +3702,39 @@ function simulateDelegatecall(address targetContract, bytes memory calldataPaylo ), ) } + #[inline] fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { - ( - ::tokenize( - ret, - ), - ) + (::tokenize(ret),) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) - .map(|r| { + as alloy_sol_types::SolType>::abi_decode_sequence(data).map( + |r| { let r: simulateDelegatecallReturn = r.into(); r.response - }) + }, + ) } + #[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: simulateDelegatecallReturn = r.into(); - r.response - }) + 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: simulateDelegatecallReturn = r.into(); + r.response + }) } } }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `swap((bytes32,uint256,uint256,uint256,bytes)[],address[],(uint256,uint256,address,uint256,uint256,uint32,bytes32,uint256,uint256,uint256,bytes))` and selector `0x845a101f`. -```solidity -function swap(IVault.BatchSwapStep[] memory swaps, address[] memory tokens, GPv2Trade.Data memory trade) external; -```*/ + ```solidity + function swap(IVault.BatchSwapStep[] memory swaps, address[] memory tokens, GPv2Trade.Data memory trade) external; + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct swapCall { @@ -3806,7 +3747,10 @@ function swap(IVault.BatchSwapStep[] memory swaps, address[] memory tokens, GPv2 #[allow(missing_docs)] pub trade: ::RustType, } - ///Container type for the return parameters of the [`swap((bytes32,uint256,uint256,uint256,bytes)[],address[],(uint256,uint256,address,uint256,uint256,uint32,bytes32,uint256,uint256,uint256,bytes))`](swapCall) function. + ///Container type for the return parameters of the + /// [`swap((bytes32,uint256,uint256,uint256,bytes)[],address[],(uint256, + /// uint256,address,uint256,uint256,uint32,bytes32,uint256,uint256,uint256, + /// bytes))`](swapCall) function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct swapReturn {} @@ -3817,7 +3761,7 @@ function swap(IVault.BatchSwapStep[] memory swaps, address[] memory tokens, GPv2 clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -3836,9 +3780,7 @@ function swap(IVault.BatchSwapStep[] memory swaps, address[] memory tokens, GPv2 ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -3872,9 +3814,7 @@ function swap(IVault.BatchSwapStep[] memory swaps, address[] memory tokens, GPv2 type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -3897,9 +3837,7 @@ function swap(IVault.BatchSwapStep[] memory swaps, address[] memory tokens, GPv2 } } impl swapReturn { - fn _tokenize( - &self, - ) -> ::ReturnToken<'_> { + fn _tokenize(&self) -> ::ReturnToken<'_> { () } } @@ -3910,22 +3848,23 @@ function swap(IVault.BatchSwapStep[] memory swaps, address[] memory tokens, GPv2 alloy_sol_types::sol_data::Array, GPv2Trade::Data, ); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = swapReturn; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "swap((bytes32,uint256,uint256,uint256,bytes)[],address[],(uint256,uint256,address,uint256,uint256,uint32,bytes32,uint256,uint256,uint256,bytes))"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [132u8, 90u8, 16u8, 31u8]; + const SIGNATURE: &'static str = "swap((bytes32,uint256,uint256,uint256,bytes)[],\ + address[],(uint256,uint256,address,uint256,uint256,\ + uint32,bytes32,uint256,uint256,uint256,bytes))"; + #[inline] fn new<'a>( tuple: as alloy_sol_types::SolType>::RustType, ) -> Self { tuple.into() } + #[inline] fn tokenize(&self) -> Self::Token<'_> { ( @@ -3938,38 +3877,38 @@ function swap(IVault.BatchSwapStep[] memory swaps, address[] memory tokens, GPv2 ::tokenize(&self.trade), ) } + #[inline] fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { swapReturn::_tokenize(ret) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) + 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) + 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(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `vault()` and selector `0xfbfa77cf`. -```solidity -function vault() external view returns (address); -```*/ + ```solidity + function vault() external view returns (address); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct vaultCall; #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`vault()`](vaultCall) function. + ///Container type for the return parameters of the [`vault()`](vaultCall) + /// function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct vaultReturn { @@ -3983,7 +3922,7 @@ function vault() external view returns (address); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -3992,9 +3931,7 @@ function vault() external view returns (address); type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -4024,9 +3961,7 @@ function vault() external view returns (address); type UnderlyingRustTuple<'a> = (alloy_sol_types::private::Address,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -4051,68 +3986,64 @@ function vault() external view returns (address); #[automatically_derived] impl alloy_sol_types::SolCall for vaultCall { type Parameters<'a> = (); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = alloy_sol_types::private::Address; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (alloy_sol_types::sol_data::Address,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "vault()"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [251u8, 250u8, 119u8, 207u8]; + const SIGNATURE: &'static str = "vault()"; + #[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, - ), - ) + (::tokenize(ret),) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) - .map(|r| { + as alloy_sol_types::SolType>::abi_decode_sequence(data).map( + |r| { let r: vaultReturn = 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: vaultReturn = r.into(); - r._0 - }) + 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: vaultReturn = r.into(); + r._0 + }) } } }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `vaultRelayer()` and selector `0x9b552cc2`. -```solidity -function vaultRelayer() external view returns (address); -```*/ + ```solidity + function vaultRelayer() external view returns (address); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct vaultRelayerCall; #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`vaultRelayer()`](vaultRelayerCall) function. + ///Container type for the return parameters of the + /// [`vaultRelayer()`](vaultRelayerCall) function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct vaultRelayerReturn { @@ -4126,7 +4057,7 @@ function vaultRelayer() external view returns (address); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -4135,9 +4066,7 @@ function vaultRelayer() external view returns (address); type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -4167,9 +4096,7 @@ function vaultRelayer() external view returns (address); type UnderlyingRustTuple<'a> = (alloy_sol_types::private::Address,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -4194,61 +4121,55 @@ function vaultRelayer() external view returns (address); #[automatically_derived] impl alloy_sol_types::SolCall for vaultRelayerCall { type Parameters<'a> = (); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = alloy_sol_types::private::Address; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (alloy_sol_types::sol_data::Address,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "vaultRelayer()"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [155u8, 85u8, 44u8, 194u8]; + const SIGNATURE: &'static str = "vaultRelayer()"; + #[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, - ), - ) + (::tokenize(ret),) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) - .map(|r| { + as alloy_sol_types::SolType>::abi_decode_sequence(data).map( + |r| { let r: vaultRelayerReturn = 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: vaultRelayerReturn = r.into(); - r._0 - }) + 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: vaultRelayerReturn = r.into(); + r._0 + }) } } }; ///Container for all the [`GPv2Settlement`](self) function calls. #[derive(Clone)] - #[derive()] pub enum GPv2SettlementCalls { #[allow(missing_docs)] authenticator(authenticatorCall), @@ -4274,8 +4195,9 @@ function vaultRelayer() external view returns (address); impl GPv2SettlementCalls { /// 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. + /// 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]] = &[ @@ -4290,19 +4212,6 @@ function vaultRelayer() external view returns (address); [248u8, 68u8, 54u8, 189u8], [251u8, 250u8, 119u8, 207u8], ]; - /// The names of the variants in the same order as `SELECTORS`. - pub const VARIANT_NAMES: &'static [&'static str] = &[ - ::core::stringify!(settle), - ::core::stringify!(invalidateOrder), - ::core::stringify!(authenticator), - ::core::stringify!(filledAmount), - ::core::stringify!(swap), - ::core::stringify!(vaultRelayer), - ::core::stringify!(setPreSignature), - ::core::stringify!(domainSeparator), - ::core::stringify!(simulateDelegatecall), - ::core::stringify!(vault), - ]; /// The signatures in the same order as `SELECTORS`. pub const SIGNATURES: &'static [&'static str] = &[ ::SIGNATURE, @@ -4316,6 +4225,20 @@ function vaultRelayer() external view returns (address); ::SIGNATURE, ::SIGNATURE, ]; + /// The names of the variants in the same order as `SELECTORS`. + pub const VARIANT_NAMES: &'static [&'static str] = &[ + ::core::stringify!(settle), + ::core::stringify!(invalidateOrder), + ::core::stringify!(authenticator), + ::core::stringify!(filledAmount), + ::core::stringify!(swap), + ::core::stringify!(vaultRelayer), + ::core::stringify!(setPreSignature), + ::core::stringify!(domainSeparator), + ::core::stringify!(simulateDelegatecall), + ::core::stringify!(vault), + ]; + /// Returns the signature for the given selector, if known. #[inline] pub fn signature_by_selector( @@ -4328,32 +4251,28 @@ function vaultRelayer() external view returns (address); ::core::result::Result::Err(_) => ::core::option::Option::None, } } + /// Returns the enum variant name for the given selector, if known. #[inline] - pub fn name_by_selector( - selector: [u8; 4usize], - ) -> ::core::option::Option<&'static str> { + pub fn name_by_selector(selector: [u8; 4usize]) -> ::core::option::Option<&'static str> { let sig = Self::signature_by_selector(selector)?; sig.split_once('(').map(|(name, _)| name) } } #[automatically_derived] impl alloy_sol_types::SolInterface for GPv2SettlementCalls { - const NAME: &'static str = "GPv2SettlementCalls"; - const MIN_DATA_LENGTH: usize = 0usize; const COUNT: usize = 10usize; + const MIN_DATA_LENGTH: usize = 0usize; + const NAME: &'static str = "GPv2SettlementCalls"; + #[inline] fn selector(&self) -> [u8; 4] { match self { - Self::authenticator(_) => { - ::SELECTOR - } + Self::authenticator(_) => ::SELECTOR, Self::domainSeparator(_) => { ::SELECTOR } - Self::filledAmount(_) => { - ::SELECTOR - } + Self::filledAmount(_) => ::SELECTOR, Self::invalidateOrder(_) => { ::SELECTOR } @@ -4366,32 +4285,26 @@ function vaultRelayer() external view returns (address); } Self::swap(_) => ::SELECTOR, Self::vault(_) => ::SELECTOR, - Self::vaultRelayer(_) => { - ::SELECTOR - } + Self::vaultRelayer(_) => ::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 abi_decode_raw(selector: [u8; 4], data: &[u8]) -> alloy_sol_types::Result { + static DECODE_SHIMS: &[fn(&[u8]) -> alloy_sol_types::Result] = &[ { - fn settle( - data: &[u8], - ) -> alloy_sol_types::Result { + fn settle(data: &[u8]) -> alloy_sol_types::Result { ::abi_decode_raw(data) .map(GPv2SettlementCalls::settle) } @@ -4401,51 +4314,35 @@ function vaultRelayer() external view returns (address); fn invalidateOrder( data: &[u8], ) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, - ) + ::abi_decode_raw(data) .map(GPv2SettlementCalls::invalidateOrder) } invalidateOrder }, { - fn authenticator( - data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, - ) + fn authenticator(data: &[u8]) -> alloy_sol_types::Result { + ::abi_decode_raw(data) .map(GPv2SettlementCalls::authenticator) } authenticator }, { - fn filledAmount( - data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, - ) + fn filledAmount(data: &[u8]) -> alloy_sol_types::Result { + ::abi_decode_raw(data) .map(GPv2SettlementCalls::filledAmount) } filledAmount }, { - fn swap( - data: &[u8], - ) -> alloy_sol_types::Result { + fn swap(data: &[u8]) -> alloy_sol_types::Result { ::abi_decode_raw(data) .map(GPv2SettlementCalls::swap) } swap }, { - fn vaultRelayer( - data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, - ) + fn vaultRelayer(data: &[u8]) -> alloy_sol_types::Result { + ::abi_decode_raw(data) .map(GPv2SettlementCalls::vaultRelayer) } vaultRelayer @@ -4454,9 +4351,7 @@ function vaultRelayer() external view returns (address); fn setPreSignature( data: &[u8], ) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, - ) + ::abi_decode_raw(data) .map(GPv2SettlementCalls::setPreSignature) } setPreSignature @@ -4465,9 +4360,7 @@ function vaultRelayer() external view returns (address); fn domainSeparator( data: &[u8], ) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, - ) + ::abi_decode_raw(data) .map(GPv2SettlementCalls::domainSeparator) } domainSeparator @@ -4476,17 +4369,13 @@ function vaultRelayer() external view returns (address); fn simulateDelegatecall( data: &[u8], ) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, - ) + ::abi_decode_raw(data) .map(GPv2SettlementCalls::simulateDelegatecall) } simulateDelegatecall }, { - fn vault( - data: &[u8], - ) -> alloy_sol_types::Result { + fn vault(data: &[u8]) -> alloy_sol_types::Result { ::abi_decode_raw(data) .map(GPv2SettlementCalls::vault) } @@ -4494,15 +4383,14 @@ function vaultRelayer() external view returns (address); }, ]; let Ok(idx) = Self::SELECTORS.binary_search(&selector) else { - return Err( - alloy_sol_types::Error::unknown_selector( - ::NAME, - selector, - ), - ); + return Err(alloy_sol_types::Error::unknown_selector( + ::NAME, + selector, + )); }; DECODE_SHIMS[idx](data) } + #[inline] #[allow(non_snake_case)] fn abi_decode_raw_validate( @@ -4511,14 +4399,11 @@ function vaultRelayer() external view returns (address); ) -> alloy_sol_types::Result { static DECODE_VALIDATE_SHIMS: &[fn( &[u8], - ) -> alloy_sol_types::Result] = &[ + ) + -> alloy_sol_types::Result] = &[ { - fn settle( - data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) + fn settle(data: &[u8]) -> alloy_sol_types::Result { + ::abi_decode_raw_validate(data) .map(GPv2SettlementCalls::settle) } settle @@ -4528,53 +4413,43 @@ function vaultRelayer() external view returns (address); data: &[u8], ) -> alloy_sol_types::Result { ::abi_decode_raw_validate( - data, - ) - .map(GPv2SettlementCalls::invalidateOrder) + data, + ) + .map(GPv2SettlementCalls::invalidateOrder) } invalidateOrder }, { - fn authenticator( - data: &[u8], - ) -> alloy_sol_types::Result { + fn authenticator(data: &[u8]) -> alloy_sol_types::Result { ::abi_decode_raw_validate( - data, - ) - .map(GPv2SettlementCalls::authenticator) + data, + ) + .map(GPv2SettlementCalls::authenticator) } authenticator }, { - fn filledAmount( - data: &[u8], - ) -> alloy_sol_types::Result { + fn filledAmount(data: &[u8]) -> alloy_sol_types::Result { ::abi_decode_raw_validate( - data, - ) - .map(GPv2SettlementCalls::filledAmount) + data, + ) + .map(GPv2SettlementCalls::filledAmount) } filledAmount }, { - fn swap( - data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) + fn swap(data: &[u8]) -> alloy_sol_types::Result { + ::abi_decode_raw_validate(data) .map(GPv2SettlementCalls::swap) } swap }, { - fn vaultRelayer( - data: &[u8], - ) -> alloy_sol_types::Result { + fn vaultRelayer(data: &[u8]) -> alloy_sol_types::Result { ::abi_decode_raw_validate( - data, - ) - .map(GPv2SettlementCalls::vaultRelayer) + data, + ) + .map(GPv2SettlementCalls::vaultRelayer) } vaultRelayer }, @@ -4583,9 +4458,9 @@ function vaultRelayer() external view returns (address); data: &[u8], ) -> alloy_sol_types::Result { ::abi_decode_raw_validate( - data, - ) - .map(GPv2SettlementCalls::setPreSignature) + data, + ) + .map(GPv2SettlementCalls::setPreSignature) } setPreSignature }, @@ -4594,9 +4469,9 @@ function vaultRelayer() external view returns (address); data: &[u8], ) -> alloy_sol_types::Result { ::abi_decode_raw_validate( - data, - ) - .map(GPv2SettlementCalls::domainSeparator) + data, + ) + .map(GPv2SettlementCalls::domainSeparator) } domainSeparator }, @@ -4612,62 +4487,45 @@ function vaultRelayer() external view returns (address); simulateDelegatecall }, { - fn vault( - data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) + fn vault(data: &[u8]) -> alloy_sol_types::Result { + ::abi_decode_raw_validate(data) .map(GPv2SettlementCalls::vault) } vault }, ]; let Ok(idx) = Self::SELECTORS.binary_search(&selector) else { - return Err( - alloy_sol_types::Error::unknown_selector( - ::NAME, - selector, - ), - ); + 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::authenticator(inner) => { - ::abi_encoded_size( - inner, - ) + ::abi_encoded_size(inner) } Self::domainSeparator(inner) => { - ::abi_encoded_size( - inner, - ) + ::abi_encoded_size(inner) } Self::filledAmount(inner) => { - ::abi_encoded_size( - inner, - ) + ::abi_encoded_size(inner) } Self::invalidateOrder(inner) => { - ::abi_encoded_size( - inner, - ) + ::abi_encoded_size(inner) } Self::setPreSignature(inner) => { - ::abi_encoded_size( - inner, - ) + ::abi_encoded_size(inner) } Self::settle(inner) => { ::abi_encoded_size(inner) } Self::simulateDelegatecall(inner) => { - ::abi_encoded_size( - inner, - ) + ::abi_encoded_size(inner) } Self::swap(inner) => { ::abi_encoded_size(inner) @@ -4676,52 +4534,35 @@ function vaultRelayer() external view returns (address); ::abi_encoded_size(inner) } Self::vaultRelayer(inner) => { - ::abi_encoded_size( - inner, - ) + ::abi_encoded_size(inner) } } } + #[inline] fn abi_encode_raw(&self, out: &mut alloy_sol_types::private::Vec) { match self { Self::authenticator(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } Self::domainSeparator(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } Self::filledAmount(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } Self::invalidateOrder(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } Self::setPreSignature(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } Self::settle(inner) => { ::abi_encode_raw(inner, out) } Self::simulateDelegatecall(inner) => { ::abi_encode_raw( - inner, - out, + inner, out, ) } Self::swap(inner) => { @@ -4731,17 +4572,13 @@ function vaultRelayer() external view returns (address); ::abi_encode_raw(inner, out) } Self::vaultRelayer(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } } } } ///Container for all the [`GPv2Settlement`](self) events. - #[derive(Clone)] - #[derive(Debug, PartialEq, Eq, Hash)] + #[derive(Clone, Debug, PartialEq, Eq, Hash)] pub enum GPv2SettlementEvents { #[allow(missing_docs)] Interaction(Interaction), @@ -4757,45 +4594,38 @@ function vaultRelayer() external view returns (address); impl GPv2SettlementEvents { /// 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. + /// 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]] = &[ [ - 1u8, 191u8, 124u8, 139u8, 12u8, 165u8, 93u8, 238u8, 203u8, 234u8, 137u8, - 215u8, 229u8, 130u8, 149u8, 183u8, 255u8, 191u8, 104u8, 95u8, 208u8, - 217u8, 104u8, 1u8, 3u8, 75u8, 168u8, 198u8, 255u8, 225u8, 198u8, 141u8, + 1u8, 191u8, 124u8, 139u8, 12u8, 165u8, 93u8, 238u8, 203u8, 234u8, 137u8, 215u8, + 229u8, 130u8, 149u8, 183u8, 255u8, 191u8, 104u8, 95u8, 208u8, 217u8, 104u8, 1u8, + 3u8, 75u8, 168u8, 198u8, 255u8, 225u8, 198u8, 141u8, ], [ - 64u8, 51u8, 140u8, 225u8, 167u8, 196u8, 146u8, 4u8, 240u8, 9u8, 149u8, - 51u8, 177u8, 233u8, 167u8, 238u8, 10u8, 61u8, 38u8, 31u8, 132u8, 151u8, - 74u8, 183u8, 175u8, 54u8, 16u8, 91u8, 140u8, 78u8, 157u8, 180u8, + 64u8, 51u8, 140u8, 225u8, 167u8, 196u8, 146u8, 4u8, 240u8, 9u8, 149u8, 51u8, 177u8, + 233u8, 167u8, 238u8, 10u8, 61u8, 38u8, 31u8, 132u8, 151u8, 74u8, 183u8, 175u8, + 54u8, 16u8, 91u8, 140u8, 78u8, 157u8, 180u8, ], [ - 135u8, 91u8, 108u8, 176u8, 53u8, 187u8, 212u8, 172u8, 101u8, 0u8, 250u8, - 188u8, 109u8, 30u8, 76u8, 165u8, 189u8, 197u8, 138u8, 62u8, 43u8, 66u8, - 76u8, 203u8, 92u8, 36u8, 205u8, 190u8, 190u8, 176u8, 9u8, 169u8, + 135u8, 91u8, 108u8, 176u8, 53u8, 187u8, 212u8, 172u8, 101u8, 0u8, 250u8, 188u8, + 109u8, 30u8, 76u8, 165u8, 189u8, 197u8, 138u8, 62u8, 43u8, 66u8, 76u8, 203u8, 92u8, + 36u8, 205u8, 190u8, 190u8, 176u8, 9u8, 169u8, ], [ - 160u8, 122u8, 84u8, 58u8, 184u8, 160u8, 24u8, 25u8, 142u8, 153u8, 202u8, - 1u8, 132u8, 201u8, 63u8, 233u8, 5u8, 10u8, 121u8, 64u8, 10u8, 10u8, - 114u8, 52u8, 65u8, 248u8, 77u8, 225u8, 217u8, 114u8, 204u8, 23u8, + 160u8, 122u8, 84u8, 58u8, 184u8, 160u8, 24u8, 25u8, 142u8, 153u8, 202u8, 1u8, + 132u8, 201u8, 63u8, 233u8, 5u8, 10u8, 121u8, 64u8, 10u8, 10u8, 114u8, 52u8, 65u8, + 248u8, 77u8, 225u8, 217u8, 114u8, 204u8, 23u8, ], [ - 237u8, 153u8, 130u8, 126u8, 251u8, 55u8, 1u8, 111u8, 34u8, 117u8, 249u8, - 140u8, 75u8, 207u8, 113u8, 199u8, 85u8, 28u8, 117u8, 213u8, 158u8, 155u8, - 69u8, 15u8, 121u8, 250u8, 50u8, 230u8, 11u8, 230u8, 114u8, 194u8, + 237u8, 153u8, 130u8, 126u8, 251u8, 55u8, 1u8, 111u8, 34u8, 117u8, 249u8, 140u8, + 75u8, 207u8, 113u8, 199u8, 85u8, 28u8, 117u8, 213u8, 158u8, 155u8, 69u8, 15u8, + 121u8, 250u8, 50u8, 230u8, 11u8, 230u8, 114u8, 194u8, ], ]; - /// The names of the variants in the same order as `SELECTORS`. - pub const VARIANT_NAMES: &'static [&'static str] = &[ - ::core::stringify!(PreSignature), - ::core::stringify!(Settlement), - ::core::stringify!(OrderInvalidated), - ::core::stringify!(Trade), - ::core::stringify!(Interaction), - ]; /// The signatures in the same order as `SELECTORS`. pub const SIGNATURES: &'static [&'static str] = &[ ::SIGNATURE, @@ -4804,6 +4634,15 @@ function vaultRelayer() external view returns (address); ::SIGNATURE, ::SIGNATURE, ]; + /// The names of the variants in the same order as `SELECTORS`. + pub const VARIANT_NAMES: &'static [&'static str] = &[ + ::core::stringify!(PreSignature), + ::core::stringify!(Settlement), + ::core::stringify!(OrderInvalidated), + ::core::stringify!(Trade), + ::core::stringify!(Interaction), + ]; + /// Returns the signature for the given selector, if known. #[inline] pub fn signature_by_selector( @@ -4816,67 +4655,53 @@ function vaultRelayer() external view returns (address); ::core::result::Result::Err(_) => ::core::option::Option::None, } } + /// Returns the enum variant name for the given selector, if known. #[inline] - pub fn name_by_selector( - selector: [u8; 32usize], - ) -> ::core::option::Option<&'static str> { + pub fn name_by_selector(selector: [u8; 32usize]) -> ::core::option::Option<&'static str> { let sig = Self::signature_by_selector(selector)?; sig.split_once('(').map(|(name, _)| name) } } #[automatically_derived] impl alloy_sol_types::SolEventInterface for GPv2SettlementEvents { - const NAME: &'static str = "GPv2SettlementEvents"; const COUNT: usize = 5usize; + const NAME: &'static str = "GPv2SettlementEvents"; + 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, - ) + ::decode_raw_log(topics, data) .map(Self::Interaction) } Some(::SIGNATURE_HASH) => { - ::decode_raw_log( - topics, - data, - ) + ::decode_raw_log(topics, data) .map(Self::OrderInvalidated) } Some(::SIGNATURE_HASH) => { - ::decode_raw_log( - topics, - data, - ) + ::decode_raw_log(topics, data) .map(Self::PreSignature) } Some(::SIGNATURE_HASH) => { - ::decode_raw_log( - topics, - data, - ) + ::decode_raw_log(topics, data) .map(Self::Settlement) } Some(::SIGNATURE_HASH) => { ::decode_raw_log(topics, data) .map(Self::Trade) } - _ => { - 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(), - ), + _ => 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(), ), - }) - } + ), + }), } } } @@ -4896,11 +4721,10 @@ function vaultRelayer() external view returns (address); Self::Settlement(inner) => { alloy_sol_types::private::IntoLogData::to_log_data(inner) } - Self::Trade(inner) => { - alloy_sol_types::private::IntoLogData::to_log_data(inner) - } + Self::Trade(inner) => alloy_sol_types::private::IntoLogData::to_log_data(inner), } } + fn into_log_data(self) -> alloy_sol_types::private::LogData { match self { Self::Interaction(inner) => { @@ -4915,16 +4739,14 @@ function vaultRelayer() external view returns (address); Self::Settlement(inner) => { alloy_sol_types::private::IntoLogData::into_log_data(inner) } - Self::Trade(inner) => { - alloy_sol_types::private::IntoLogData::into_log_data(inner) - } + Self::Trade(inner) => alloy_sol_types::private::IntoLogData::into_log_data(inner), } } } - use alloy_contract as alloy_contract; + use alloy_contract; /**Creates a new wrapper around an on-chain [`GPv2Settlement`](self) contract instance. -See the [wrapper's documentation](`GPv2SettlementInstance`) for more details.*/ + See the [wrapper's documentation](`GPv2SettlementInstance`) for more details.*/ #[inline] pub const fn new< P: alloy_contract::private::Provider, @@ -4937,27 +4759,23 @@ See the [wrapper's documentation](`GPv2SettlementInstance`) for more details.*/ } /**Deploys this contract using the given `provider` and constructor arguments, if any. -Returns a new instance of the contract, if the deployment was successful. + 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.*/ + 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, - >( + pub fn deploy, N: alloy_contract::private::Network>( __provider: P, authenticator_: alloy_sol_types::private::Address, vault_: alloy_sol_types::private::Address, - ) -> impl ::core::future::Future< - Output = alloy_contract::Result>, - > { + ) -> impl ::core::future::Future>> + { GPv2SettlementInstance::::deploy(__provider, authenticator_, vault_) } /**Creates a `RawCallBuilder` for deploying this contract using the given `provider` -and constructor arguments, if any. + 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.*/ + 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, @@ -4967,22 +4785,19 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ authenticator_: alloy_sol_types::private::Address, vault_: alloy_sol_types::private::Address, ) -> alloy_contract::RawCallBuilder { - GPv2SettlementInstance::< - P, - N, - >::deploy_builder(__provider, authenticator_, vault_) + GPv2SettlementInstance::::deploy_builder(__provider, authenticator_, vault_) } /**A [`GPv2Settlement`](self) instance. -Contains type-safe methods for interacting with an on-chain instance of the -[`GPv2Settlement`](self) contract located at a given `address`, using a given -provider `P`. + Contains type-safe methods for interacting with an on-chain instance of the + [`GPv2Settlement`](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. + 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.*/ + See the [module-level documentation](self) for all the available methods.*/ #[derive(Clone)] pub struct GPv2SettlementInstance { address: alloy_sol_types::private::Address, @@ -4993,33 +4808,32 @@ See the [module-level documentation](self) for all the available methods.*/ impl ::core::fmt::Debug for GPv2SettlementInstance { #[inline] fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { - f.debug_tuple("GPv2SettlementInstance").field(&self.address).finish() + f.debug_tuple("GPv2SettlementInstance") + .field(&self.address) + .finish() } } /// Instantiation and getters/setters. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > GPv2SettlementInstance { + impl, N: alloy_contract::private::Network> + GPv2SettlementInstance + { /**Creates a new wrapper around an on-chain [`GPv2Settlement`](self) contract instance. -See the [wrapper's documentation](`GPv2SettlementInstance`) for more details.*/ + See the [wrapper's documentation](`GPv2SettlementInstance`) for more details.*/ #[inline] - pub const fn new( - address: alloy_sol_types::private::Address, - __provider: P, - ) -> Self { + pub const fn new(address: alloy_sol_types::private::Address, __provider: P) -> Self { Self { address, provider: __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. + 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.*/ + For more fine-grained control over the deployment process, use [`deploy_builder`] instead.*/ #[inline] pub async fn deploy( __provider: P, @@ -5030,11 +4844,12 @@ For more fine-grained control over the deployment process, use [`deploy_builder` 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. + 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.*/ + 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, @@ -5045,32 +4860,34 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ __provider, [ &BYTECODE[..], - &alloy_sol_types::SolConstructor::abi_encode( - &constructorCall { - authenticator_, - vault_, - }, - )[..], + &alloy_sol_types::SolConstructor::abi_encode(&constructorCall { + authenticator_, + vault_, + })[..], ] - .concat() - .into(), + .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 { @@ -5078,7 +4895,8 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ } } impl GPv2SettlementInstance<&P, N> { - /// Clones the provider and returns a new instance with the cloned provider. + /// Clones the provider and returns a new instance with the cloned + /// provider. #[inline] pub fn with_cloned_provider(self) -> GPv2SettlementInstance { GPv2SettlementInstance { @@ -5089,32 +4907,34 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ } } /// Function calls. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > GPv2SettlementInstance { - /// Creates a new call builder using this contract instance's provider and address. + impl, N: alloy_contract::private::Network> + GPv2SettlementInstance + { + /// 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. + /// 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 [`authenticator`] function. - pub fn authenticator( - &self, - ) -> alloy_contract::SolCallBuilder<&P, authenticatorCall, N> { + pub fn authenticator(&self) -> alloy_contract::SolCallBuilder<&P, authenticatorCall, N> { self.call_builder(&authenticatorCall) } + ///Creates a new call builder for the [`domainSeparator`] function. pub fn domainSeparator( &self, ) -> alloy_contract::SolCallBuilder<&P, domainSeparatorCall, N> { self.call_builder(&domainSeparatorCall) } + ///Creates a new call builder for the [`filledAmount`] function. pub fn filledAmount( &self, @@ -5122,6 +4942,7 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ ) -> alloy_contract::SolCallBuilder<&P, filledAmountCall, N> { self.call_builder(&filledAmountCall(_0)) } + ///Creates a new call builder for the [`invalidateOrder`] function. pub fn invalidateOrder( &self, @@ -5129,19 +4950,16 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ ) -> alloy_contract::SolCallBuilder<&P, invalidateOrderCall, N> { self.call_builder(&invalidateOrderCall { orderUid }) } + ///Creates a new call builder for the [`setPreSignature`] function. pub fn setPreSignature( &self, orderUid: alloy_sol_types::private::Bytes, signed: bool, ) -> alloy_contract::SolCallBuilder<&P, setPreSignatureCall, N> { - self.call_builder( - &setPreSignatureCall { - orderUid, - signed, - }, - ) + self.call_builder(&setPreSignatureCall { orderUid, signed }) } + ///Creates a new call builder for the [`settle`] function. pub fn settle( &self, @@ -5156,28 +4974,27 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ ::RustType, >; 3usize], ) -> alloy_contract::SolCallBuilder<&P, settleCall, N> { - self.call_builder( - &settleCall { - tokens, - clearingPrices, - trades, - interactions, - }, - ) + self.call_builder(&settleCall { + tokens, + clearingPrices, + trades, + interactions, + }) } - ///Creates a new call builder for the [`simulateDelegatecall`] function. + + ///Creates a new call builder for the [`simulateDelegatecall`] + /// function. pub fn simulateDelegatecall( &self, targetContract: alloy_sol_types::private::Address, calldataPayload: alloy_sol_types::private::Bytes, ) -> alloy_contract::SolCallBuilder<&P, simulateDelegatecallCall, N> { - self.call_builder( - &simulateDelegatecallCall { - targetContract, - calldataPayload, - }, - ) + self.call_builder(&simulateDelegatecallCall { + targetContract, + calldataPayload, + }) } + ///Creates a new call builder for the [`swap`] function. pub fn swap( &self, @@ -5187,164 +5004,122 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ tokens: alloy_sol_types::private::Vec, trade: ::RustType, ) -> alloy_contract::SolCallBuilder<&P, swapCall, N> { - self.call_builder(&swapCall { swaps, tokens, trade }) + self.call_builder(&swapCall { + swaps, + tokens, + trade, + }) } + ///Creates a new call builder for the [`vault`] function. pub fn vault(&self) -> alloy_contract::SolCallBuilder<&P, vaultCall, N> { self.call_builder(&vaultCall) } + ///Creates a new call builder for the [`vaultRelayer`] function. - pub fn vaultRelayer( - &self, - ) -> alloy_contract::SolCallBuilder<&P, vaultRelayerCall, N> { + pub fn vaultRelayer(&self) -> alloy_contract::SolCallBuilder<&P, vaultRelayerCall, N> { self.call_builder(&vaultRelayerCall) } } /// Event filters. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > GPv2SettlementInstance { - /// Creates a new event filter using this contract instance's provider and address. + impl, N: alloy_contract::private::Network> + GPv2SettlementInstance + { + /// 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. + /// 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 [`Interaction`] event. pub fn Interaction_filter(&self) -> alloy_contract::Event<&P, Interaction, N> { self.event_filter::() } + ///Creates a new event filter for the [`OrderInvalidated`] event. - pub fn OrderInvalidated_filter( - &self, - ) -> alloy_contract::Event<&P, OrderInvalidated, N> { + pub fn OrderInvalidated_filter(&self) -> alloy_contract::Event<&P, OrderInvalidated, N> { self.event_filter::() } + ///Creates a new event filter for the [`PreSignature`] event. pub fn PreSignature_filter(&self) -> alloy_contract::Event<&P, PreSignature, N> { self.event_filter::() } + ///Creates a new event filter for the [`Settlement`] event. pub fn Settlement_filter(&self) -> alloy_contract::Event<&P, Settlement, N> { self.event_filter::() } + ///Creates a new event filter for the [`Trade`] event. pub fn Trade_filter(&self) -> alloy_contract::Event<&P, Trade, N> { self.event_filter::() } } } -pub type Instance = GPv2Settlement::GPv2SettlementInstance< - ::alloy_provider::DynProvider, ->; +pub type Instance = GPv2Settlement::GPv2SettlementInstance<::alloy_provider::DynProvider>; use { - std::{sync::LazyLock, collections::HashMap}, - anyhow::{Result, Context}, - alloy_primitives::{address, Address}, - alloy_provider::{Provider, DynProvider}, + alloy_primitives::{Address, address}, + alloy_provider::{DynProvider, Provider}, + anyhow::{Context, Result}, + std::{collections::HashMap, sync::LazyLock}, }; pub const fn deployment_info(chain_id: u64) -> Option<(Address, Option)> { match chain_id { - 1u64 => { - Some(( - ::alloy_primitives::address!( - "0x9008D19f58AAbD9eD0D60971565AA8510560ab41" - ), - Some(12593265u64), - )) - } - 10u64 => { - Some(( - ::alloy_primitives::address!( - "0x9008D19f58AAbD9eD0D60971565AA8510560ab41" - ), - Some(134254624u64), - )) - } - 56u64 => { - Some(( - ::alloy_primitives::address!( - "0x9008D19f58AAbD9eD0D60971565AA8510560ab41" - ), - Some(48173641u64), - )) - } - 100u64 => { - Some(( - ::alloy_primitives::address!( - "0x9008D19f58AAbD9eD0D60971565AA8510560ab41" - ), - Some(16465100u64), - )) - } - 137u64 => { - Some(( - ::alloy_primitives::address!( - "0x9008D19f58AAbD9eD0D60971565AA8510560ab41" - ), - Some(45859743u64), - )) - } - 8453u64 => { - Some(( - ::alloy_primitives::address!( - "0x9008D19f58AAbD9eD0D60971565AA8510560ab41" - ), - Some(21407238u64), - )) - } - 9745u64 => { - Some(( - ::alloy_primitives::address!( - "0x9008D19f58AAbD9eD0D60971565AA8510560ab41" - ), - Some(3439711u64), - )) - } - 42161u64 => { - Some(( - ::alloy_primitives::address!( - "0x9008D19f58AAbD9eD0D60971565AA8510560ab41" - ), - Some(204704802u64), - )) - } - 43114u64 => { - Some(( - ::alloy_primitives::address!( - "0x9008D19f58AAbD9eD0D60971565AA8510560ab41" - ), - Some(59891356u64), - )) - } - 57073u64 => { - Some(( - ::alloy_primitives::address!( - "0x9008D19f58AAbD9eD0D60971565AA8510560ab41" - ), - Some(34436849u64), - )) - } - 59144u64 => { - Some(( - ::alloy_primitives::address!( - "0x9008D19f58AAbD9eD0D60971565AA8510560ab41" - ), - Some(24333100u64), - )) - } - 11155111u64 => { - Some(( - ::alloy_primitives::address!( - "0x9008D19f58AAbD9eD0D60971565AA8510560ab41" - ), - Some(4717488u64), - )) - } + 1u64 => Some(( + ::alloy_primitives::address!("0x9008D19f58AAbD9eD0D60971565AA8510560ab41"), + Some(12593265u64), + )), + 10u64 => Some(( + ::alloy_primitives::address!("0x9008D19f58AAbD9eD0D60971565AA8510560ab41"), + Some(134254624u64), + )), + 56u64 => Some(( + ::alloy_primitives::address!("0x9008D19f58AAbD9eD0D60971565AA8510560ab41"), + Some(48173641u64), + )), + 100u64 => Some(( + ::alloy_primitives::address!("0x9008D19f58AAbD9eD0D60971565AA8510560ab41"), + Some(16465100u64), + )), + 137u64 => Some(( + ::alloy_primitives::address!("0x9008D19f58AAbD9eD0D60971565AA8510560ab41"), + Some(45859743u64), + )), + 8453u64 => Some(( + ::alloy_primitives::address!("0x9008D19f58AAbD9eD0D60971565AA8510560ab41"), + Some(21407238u64), + )), + 9745u64 => Some(( + ::alloy_primitives::address!("0x9008D19f58AAbD9eD0D60971565AA8510560ab41"), + Some(3439711u64), + )), + 42161u64 => Some(( + ::alloy_primitives::address!("0x9008D19f58AAbD9eD0D60971565AA8510560ab41"), + Some(204704802u64), + )), + 43114u64 => Some(( + ::alloy_primitives::address!("0x9008D19f58AAbD9eD0D60971565AA8510560ab41"), + Some(59891356u64), + )), + 57073u64 => Some(( + ::alloy_primitives::address!("0x9008D19f58AAbD9eD0D60971565AA8510560ab41"), + Some(34436849u64), + )), + 59144u64 => Some(( + ::alloy_primitives::address!("0x9008D19f58AAbD9eD0D60971565AA8510560ab41"), + Some(24333100u64), + )), + 11155111u64 => Some(( + ::alloy_primitives::address!("0x9008D19f58AAbD9eD0D60971565AA8510560ab41"), + Some(4717488u64), + )), _ => None, } } @@ -5361,9 +5136,7 @@ pub const fn deployment_block(chain_id: &u64) -> Option { } } impl Instance { - pub fn deployed( - provider: &DynProvider, - ) -> impl Future> + Send { + pub fn deployed(provider: &DynProvider) -> impl Future> + Send { async move { let chain_id = provider .get_chain_id() diff --git a/contracts/generated/contracts-generated/honeyswaprouter/src/lib.rs b/contracts/generated/contracts-generated/honeyswaprouter/src/lib.rs index 2b5e366112..446d527c3f 100644 --- a/contracts/generated/contracts-generated/honeyswaprouter/src/lib.rs +++ b/contracts/generated/contracts-generated/honeyswaprouter/src/lib.rs @@ -1,4 +1,10 @@ -#![allow(unused_imports, unused_attributes, clippy::all, rustdoc::all, non_snake_case)] +#![allow( + unused_imports, + unused_attributes, + clippy::all, + rustdoc::all, + non_snake_case +)] //! Auto-generated contract bindings. Do not edit. /** @@ -184,18 +190,18 @@ interface HoneyswapRouter { clippy::empty_structs_with_brackets )] pub mod HoneyswapRouter { - use super::*; - use alloy_sol_types as alloy_sol_types; + use {super::*, alloy_sol_types}; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `WETH()` and selector `0xad5c4648`. -```solidity -function WETH() external pure returns (address); -```*/ + ```solidity + function WETH() external pure returns (address); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct WETHCall; #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`WETH()`](WETHCall) function. + ///Container type for the return parameters of the [`WETH()`](WETHCall) + /// function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct WETHReturn { @@ -209,7 +215,7 @@ function WETH() external pure returns (address); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -218,9 +224,7 @@ function WETH() external pure returns (address); type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -250,9 +254,7 @@ function WETH() external pure returns (address); type UnderlyingRustTuple<'a> = (alloy_sol_types::private::Address,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -277,63 +279,58 @@ function WETH() external pure returns (address); #[automatically_derived] impl alloy_sol_types::SolCall for WETHCall { type Parameters<'a> = (); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = alloy_sol_types::private::Address; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (alloy_sol_types::sol_data::Address,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "WETH()"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [173u8, 92u8, 70u8, 72u8]; + const SIGNATURE: &'static str = "WETH()"; + #[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, - ), - ) + (::tokenize(ret),) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) - .map(|r| { + as alloy_sol_types::SolType>::abi_decode_sequence(data).map( + |r| { let r: WETHReturn = 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: WETHReturn = r.into(); - r._0 - }) + 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: WETHReturn = r.into(); + r._0 + }) } } }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `addLiquidity(address,address,uint256,uint256,uint256,uint256,address,uint256)` and selector `0xe8e33700`. -```solidity -function addLiquidity(address tokenA, address tokenB, uint256 amountADesired, uint256 amountBDesired, uint256 amountAMin, uint256 amountBMin, address to, uint256 deadline) external returns (uint256 amountA, uint256 amountB, uint256 liquidity); -```*/ + ```solidity + function addLiquidity(address tokenA, address tokenB, uint256 amountADesired, uint256 amountBDesired, uint256 amountAMin, uint256 amountBMin, address to, uint256 deadline) external returns (uint256 amountA, uint256 amountB, uint256 liquidity); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct addLiquidityCall { @@ -355,7 +352,9 @@ function addLiquidity(address tokenA, address tokenB, uint256 amountADesired, ui pub deadline: alloy_sol_types::private::primitives::aliases::U256, } #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`addLiquidity(address,address,uint256,uint256,uint256,uint256,address,uint256)`](addLiquidityCall) function. + ///Container type for the return parameters of the + /// [`addLiquidity(address,address,uint256,uint256,uint256,uint256,address, + /// uint256)`](addLiquidityCall) function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct addLiquidityReturn { @@ -373,7 +372,7 @@ function addLiquidity(address tokenA, address tokenB, uint256 amountADesired, ui clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -400,9 +399,7 @@ function addLiquidity(address tokenA, address tokenB, uint256 amountADesired, ui ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -458,9 +455,7 @@ function addLiquidity(address tokenA, address tokenB, uint256 amountADesired, ui ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -487,19 +482,17 @@ function addLiquidity(address tokenA, address tokenB, uint256 amountADesired, ui } } impl addLiquidityReturn { - fn _tokenize( - &self, - ) -> ::ReturnToken<'_> { + fn _tokenize(&self) -> ::ReturnToken<'_> { ( - as alloy_sol_types::SolType>::tokenize(&self.amountA), - as alloy_sol_types::SolType>::tokenize(&self.amountB), - as alloy_sol_types::SolType>::tokenize(&self.liquidity), + as alloy_sol_types::SolType>::tokenize( + &self.amountA, + ), + as alloy_sol_types::SolType>::tokenize( + &self.amountB, + ), + as alloy_sol_types::SolType>::tokenize( + &self.liquidity, + ), ) } } @@ -515,26 +508,26 @@ function addLiquidity(address tokenA, address tokenB, uint256 amountADesired, ui 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 = addLiquidityReturn; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = ( alloy_sol_types::sol_data::Uint<256>, alloy_sol_types::sol_data::Uint<256>, alloy_sol_types::sol_data::Uint<256>, ); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "addLiquidity(address,address,uint256,uint256,uint256,uint256,address,uint256)"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [232u8, 227u8, 55u8, 0u8]; + const SIGNATURE: &'static str = + "addLiquidity(address,address,uint256,uint256,uint256,uint256,address,uint256)"; + #[inline] fn new<'a>( tuple: as alloy_sol_types::SolType>::RustType, ) -> Self { tuple.into() } + #[inline] fn tokenize(&self) -> Self::Token<'_> { ( @@ -544,58 +537,58 @@ function addLiquidity(address tokenA, address tokenB, uint256 amountADesired, ui ::tokenize( &self.tokenB, ), - as alloy_sol_types::SolType>::tokenize(&self.amountADesired), - as alloy_sol_types::SolType>::tokenize(&self.amountBDesired), - as alloy_sol_types::SolType>::tokenize(&self.amountAMin), - as alloy_sol_types::SolType>::tokenize(&self.amountBMin), + as alloy_sol_types::SolType>::tokenize( + &self.amountADesired, + ), + as alloy_sol_types::SolType>::tokenize( + &self.amountBDesired, + ), + as alloy_sol_types::SolType>::tokenize( + &self.amountAMin, + ), + as alloy_sol_types::SolType>::tokenize( + &self.amountBMin, + ), ::tokenize( &self.to, ), - as alloy_sol_types::SolType>::tokenize(&self.deadline), + as alloy_sol_types::SolType>::tokenize( + &self.deadline, + ), ) } + #[inline] fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { addLiquidityReturn::_tokenize(ret) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) + 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) + 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(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `factory()` and selector `0xc45a0155`. -```solidity -function factory() external pure returns (address); -```*/ + ```solidity + function factory() external pure returns (address); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct factoryCall; #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`factory()`](factoryCall) function. + ///Container type for the return parameters of the + /// [`factory()`](factoryCall) function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct factoryReturn { @@ -609,7 +602,7 @@ function factory() external pure returns (address); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -618,9 +611,7 @@ function factory() external pure returns (address); type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -650,9 +641,7 @@ function factory() external pure returns (address); type UnderlyingRustTuple<'a> = (alloy_sol_types::private::Address,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -677,63 +666,58 @@ function factory() external pure returns (address); #[automatically_derived] impl alloy_sol_types::SolCall for factoryCall { type Parameters<'a> = (); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = alloy_sol_types::private::Address; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (alloy_sol_types::sol_data::Address,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "factory()"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [196u8, 90u8, 1u8, 85u8]; + const SIGNATURE: &'static str = "factory()"; + #[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, - ), - ) + (::tokenize(ret),) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) - .map(|r| { + as alloy_sol_types::SolType>::abi_decode_sequence(data).map( + |r| { let r: factoryReturn = 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: factoryReturn = r.into(); - r._0 - }) + 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: factoryReturn = r.into(); + r._0 + }) } } }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `quote(uint256,uint256,uint256)` and selector `0xad615dec`. -```solidity -function quote(uint256 amountA, uint256 reserveA, uint256 reserveB) external pure returns (uint256 amountB); -```*/ + ```solidity + function quote(uint256 amountA, uint256 reserveA, uint256 reserveB) external pure returns (uint256 amountB); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct quoteCall { @@ -745,7 +729,8 @@ function quote(uint256 amountA, uint256 reserveA, uint256 reserveB) external pur pub reserveB: alloy_sol_types::private::primitives::aliases::U256, } #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`quote(uint256,uint256,uint256)`](quoteCall) function. + ///Container type for the return parameters of the + /// [`quote(uint256,uint256,uint256)`](quoteCall) function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct quoteReturn { @@ -759,7 +744,7 @@ function quote(uint256 amountA, uint256 reserveA, uint256 reserveB) external pur clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -776,9 +761,7 @@ function quote(uint256 amountA, uint256 reserveA, uint256 reserveB) external pur ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -809,14 +792,10 @@ function quote(uint256 amountA, uint256 reserveA, uint256 reserveB) external pur #[allow(dead_code)] type UnderlyingSolTuple<'a> = (alloy_sol_types::sol_data::Uint<256>,); #[doc(hidden)] - type UnderlyingRustTuple<'a> = ( - alloy_sol_types::private::primitives::aliases::U256, - ); + 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, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -845,73 +824,72 @@ function quote(uint256 amountA, uint256 reserveA, uint256 reserveB) external pur 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 = alloy_sol_types::private::primitives::aliases::U256; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (alloy_sol_types::sol_data::Uint<256>,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "quote(uint256,uint256,uint256)"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [173u8, 97u8, 93u8, 236u8]; + const SIGNATURE: &'static str = "quote(uint256,uint256,uint256)"; + #[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.amountA), - as alloy_sol_types::SolType>::tokenize(&self.reserveA), - as alloy_sol_types::SolType>::tokenize(&self.reserveB), + as alloy_sol_types::SolType>::tokenize( + &self.amountA, + ), + as alloy_sol_types::SolType>::tokenize( + &self.reserveA, + ), + as alloy_sol_types::SolType>::tokenize( + &self.reserveB, + ), ) } + #[inline] fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { ( - as alloy_sol_types::SolType>::tokenize(ret), + 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| { + as alloy_sol_types::SolType>::abi_decode_sequence(data).map( + |r| { let r: quoteReturn = r.into(); r.amountB - }) + }, + ) } + #[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: quoteReturn = r.into(); - r.amountB - }) + 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: quoteReturn = r.into(); + r.amountB + }) } } }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `swapTokensForExactTokens(uint256,uint256,address[],address,uint256)` and selector `0x8803dbee`. -```solidity -function swapTokensForExactTokens(uint256 amountOut, uint256 amountInMax, address[] memory path, address to, uint256 deadline) external returns (uint256[] memory amounts); -```*/ + ```solidity + function swapTokensForExactTokens(uint256 amountOut, uint256 amountInMax, address[] memory path, address to, uint256 deadline) external returns (uint256[] memory amounts); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct swapTokensForExactTokensCall { @@ -927,14 +905,15 @@ function swapTokensForExactTokens(uint256 amountOut, uint256 amountInMax, addres pub deadline: alloy_sol_types::private::primitives::aliases::U256, } #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`swapTokensForExactTokens(uint256,uint256,address[],address,uint256)`](swapTokensForExactTokensCall) function. + ///Container type for the return parameters of the + /// [`swapTokensForExactTokens(uint256,uint256,address[],address, + /// uint256)`](swapTokensForExactTokensCall) function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct swapTokensForExactTokensReturn { #[allow(missing_docs)] - pub amounts: alloy_sol_types::private::Vec< - alloy_sol_types::private::primitives::aliases::U256, - >, + pub amounts: + alloy_sol_types::private::Vec, } #[allow( non_camel_case_types, @@ -943,7 +922,7 @@ function swapTokensForExactTokens(uint256 amountOut, uint256 amountInMax, addres clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -964,9 +943,7 @@ function swapTokensForExactTokens(uint256 amountOut, uint256 amountInMax, addres ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -975,8 +952,7 @@ function swapTokensForExactTokens(uint256 amountOut, uint256 amountInMax, addres } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From - for UnderlyingRustTuple<'_> { + impl ::core::convert::From for UnderlyingRustTuple<'_> { fn from(value: swapTokensForExactTokensCall) -> Self { ( value.amountOut, @@ -989,8 +965,7 @@ function swapTokensForExactTokens(uint256 amountOut, uint256 amountInMax, addres } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From> - for swapTokensForExactTokensCall { + impl ::core::convert::From> for swapTokensForExactTokensCall { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { Self { amountOut: tuple.0, @@ -1005,20 +980,15 @@ function swapTokensForExactTokens(uint256 amountOut, uint256 amountInMax, addres { #[doc(hidden)] #[allow(dead_code)] - type UnderlyingSolTuple<'a> = ( - alloy_sol_types::sol_data::Array>, - ); + type UnderlyingSolTuple<'a> = + (alloy_sol_types::sol_data::Array>,); #[doc(hidden)] type UnderlyingRustTuple<'a> = ( - alloy_sol_types::private::Vec< - alloy_sol_types::private::primitives::aliases::U256, - >, + alloy_sol_types::private::Vec, ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1027,16 +997,14 @@ function swapTokensForExactTokens(uint256 amountOut, uint256 amountInMax, addres } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From - for UnderlyingRustTuple<'_> { + impl ::core::convert::From for UnderlyingRustTuple<'_> { fn from(value: swapTokensForExactTokensReturn) -> Self { (value.amounts,) } } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From> - for swapTokensForExactTokensReturn { + impl ::core::convert::From> for swapTokensForExactTokensReturn { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { Self { amounts: tuple.0 } } @@ -1051,26 +1019,24 @@ function swapTokensForExactTokens(uint256 amountOut, uint256 amountInMax, addres 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 = alloy_sol_types::private::Vec< - alloy_sol_types::private::primitives::aliases::U256, - >; - type ReturnTuple<'a> = ( - alloy_sol_types::sol_data::Array>, - ); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "swapTokensForExactTokens(uint256,uint256,address[],address,uint256)"; + type Return = + alloy_sol_types::private::Vec; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + type ReturnTuple<'a> = + (alloy_sol_types::sol_data::Array>,); + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [136u8, 3u8, 219u8, 238u8]; + const SIGNATURE: &'static str = + "swapTokensForExactTokens(uint256,uint256,address[],address,uint256)"; + #[inline] fn new<'a>( tuple: as alloy_sol_types::SolType>::RustType, ) -> Self { tuple.into() } + #[inline] fn tokenize(&self) -> Self::Token<'_> { ( @@ -1091,41 +1057,38 @@ function swapTokensForExactTokens(uint256 amountOut, uint256 amountInMax, addres > as alloy_sol_types::SolType>::tokenize(&self.deadline), ) } + #[inline] fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { - ( - , - > as alloy_sol_types::SolType>::tokenize(ret), - ) + (, + > 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| { + as alloy_sol_types::SolType>::abi_decode_sequence(data).map( + |r| { let r: swapTokensForExactTokensReturn = r.into(); r.amounts - }) + }, + ) } + #[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: swapTokensForExactTokensReturn = r.into(); - r.amounts - }) + 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: swapTokensForExactTokensReturn = r.into(); + r.amounts + }) } } }; ///Container for all the [`HoneyswapRouter`](self) function calls. #[derive(Clone)] - #[derive()] pub enum HoneyswapRouterCalls { #[allow(missing_docs)] WETH(WETHCall), @@ -1141,8 +1104,9 @@ function swapTokensForExactTokens(uint256 amountOut, uint256 amountInMax, addres impl HoneyswapRouterCalls { /// 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. + /// 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]] = &[ @@ -1152,14 +1116,6 @@ function swapTokensForExactTokens(uint256 amountOut, uint256 amountInMax, addres [196u8, 90u8, 1u8, 85u8], [232u8, 227u8, 55u8, 0u8], ]; - /// The names of the variants in the same order as `SELECTORS`. - pub const VARIANT_NAMES: &'static [&'static str] = &[ - ::core::stringify!(swapTokensForExactTokens), - ::core::stringify!(WETH), - ::core::stringify!(quote), - ::core::stringify!(factory), - ::core::stringify!(addLiquidity), - ]; /// The signatures in the same order as `SELECTORS`. pub const SIGNATURES: &'static [&'static str] = &[ ::SIGNATURE, @@ -1168,6 +1124,15 @@ function swapTokensForExactTokens(uint256 amountOut, uint256 amountInMax, addres ::SIGNATURE, ::SIGNATURE, ]; + /// The names of the variants in the same order as `SELECTORS`. + pub const VARIANT_NAMES: &'static [&'static str] = &[ + ::core::stringify!(swapTokensForExactTokens), + ::core::stringify!(WETH), + ::core::stringify!(quote), + ::core::stringify!(factory), + ::core::stringify!(addLiquidity), + ]; + /// Returns the signature for the given selector, if known. #[inline] pub fn signature_by_selector( @@ -1180,27 +1145,25 @@ function swapTokensForExactTokens(uint256 amountOut, uint256 amountInMax, addres ::core::result::Result::Err(_) => ::core::option::Option::None, } } + /// Returns the enum variant name for the given selector, if known. #[inline] - pub fn name_by_selector( - selector: [u8; 4usize], - ) -> ::core::option::Option<&'static str> { + pub fn name_by_selector(selector: [u8; 4usize]) -> ::core::option::Option<&'static str> { let sig = Self::signature_by_selector(selector)?; sig.split_once('(').map(|(name, _)| name) } } #[automatically_derived] impl alloy_sol_types::SolInterface for HoneyswapRouterCalls { - const NAME: &'static str = "HoneyswapRouterCalls"; - const MIN_DATA_LENGTH: usize = 0usize; const COUNT: usize = 5usize; + const MIN_DATA_LENGTH: usize = 0usize; + const NAME: &'static str = "HoneyswapRouterCalls"; + #[inline] fn selector(&self) -> [u8; 4] { match self { Self::WETH(_) => ::SELECTOR, - Self::addLiquidity(_) => { - ::SELECTOR - } + Self::addLiquidity(_) => ::SELECTOR, Self::factory(_) => ::SELECTOR, Self::quote(_) => ::SELECTOR, Self::swapTokensForExactTokens(_) => { @@ -1208,83 +1171,70 @@ function swapTokensForExactTokens(uint256 amountOut, uint256 amountInMax, addres } } } + #[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 abi_decode_raw(selector: [u8; 4], data: &[u8]) -> alloy_sol_types::Result { + static DECODE_SHIMS: &[fn(&[u8]) -> alloy_sol_types::Result] = &[ { fn swapTokensForExactTokens( data: &[u8], ) -> alloy_sol_types::Result { ::abi_decode_raw( - data, - ) - .map(HoneyswapRouterCalls::swapTokensForExactTokens) + data, + ) + .map(HoneyswapRouterCalls::swapTokensForExactTokens) } swapTokensForExactTokens }, { - fn WETH( - data: &[u8], - ) -> alloy_sol_types::Result { + fn WETH(data: &[u8]) -> alloy_sol_types::Result { ::abi_decode_raw(data) .map(HoneyswapRouterCalls::WETH) } WETH }, { - fn quote( - data: &[u8], - ) -> alloy_sol_types::Result { + fn quote(data: &[u8]) -> alloy_sol_types::Result { ::abi_decode_raw(data) .map(HoneyswapRouterCalls::quote) } quote }, { - fn factory( - data: &[u8], - ) -> alloy_sol_types::Result { + fn factory(data: &[u8]) -> alloy_sol_types::Result { ::abi_decode_raw(data) .map(HoneyswapRouterCalls::factory) } factory }, { - fn addLiquidity( - data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, - ) + fn addLiquidity(data: &[u8]) -> alloy_sol_types::Result { + ::abi_decode_raw(data) .map(HoneyswapRouterCalls::addLiquidity) } addLiquidity }, ]; let Ok(idx) = Self::SELECTORS.binary_search(&selector) else { - return Err( - alloy_sol_types::Error::unknown_selector( - ::NAME, - selector, - ), - ); + return Err(alloy_sol_types::Error::unknown_selector( + ::NAME, + selector, + )); }; DECODE_SHIMS[idx](data) } + #[inline] #[allow(non_snake_case)] fn abi_decode_raw_validate( @@ -1293,7 +1243,8 @@ function swapTokensForExactTokens(uint256 amountOut, uint256 amountInMax, addres ) -> alloy_sol_types::Result { static DECODE_VALIDATE_SHIMS: &[fn( &[u8], - ) -> alloy_sol_types::Result] = &[ + ) + -> alloy_sol_types::Result] = &[ { fn swapTokensForExactTokens( data: &[u8], @@ -1306,60 +1257,45 @@ function swapTokensForExactTokens(uint256 amountOut, uint256 amountInMax, addres swapTokensForExactTokens }, { - fn WETH( - data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) + fn WETH(data: &[u8]) -> alloy_sol_types::Result { + ::abi_decode_raw_validate(data) .map(HoneyswapRouterCalls::WETH) } WETH }, { - fn quote( - data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) + fn quote(data: &[u8]) -> alloy_sol_types::Result { + ::abi_decode_raw_validate(data) .map(HoneyswapRouterCalls::quote) } quote }, { - fn factory( - data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) + fn factory(data: &[u8]) -> alloy_sol_types::Result { + ::abi_decode_raw_validate(data) .map(HoneyswapRouterCalls::factory) } factory }, { - fn addLiquidity( - data: &[u8], - ) -> alloy_sol_types::Result { + fn addLiquidity(data: &[u8]) -> alloy_sol_types::Result { ::abi_decode_raw_validate( - data, - ) - .map(HoneyswapRouterCalls::addLiquidity) + data, + ) + .map(HoneyswapRouterCalls::addLiquidity) } addLiquidity }, ]; let Ok(idx) = Self::SELECTORS.binary_search(&selector) else { - return Err( - alloy_sol_types::Error::unknown_selector( - ::NAME, - selector, - ), - ); + return Err(alloy_sol_types::Error::unknown_selector( + ::NAME, + selector, + )); }; DECODE_VALIDATE_SHIMS[idx](data) } + #[inline] fn abi_encoded_size(&self) -> usize { match self { @@ -1367,9 +1303,7 @@ function swapTokensForExactTokens(uint256 amountOut, uint256 amountInMax, addres ::abi_encoded_size(inner) } Self::addLiquidity(inner) => { - ::abi_encoded_size( - inner, - ) + ::abi_encoded_size(inner) } Self::factory(inner) => { ::abi_encoded_size(inner) @@ -1384,6 +1318,7 @@ function swapTokensForExactTokens(uint256 amountOut, uint256 amountInMax, addres } } } + #[inline] fn abi_encode_raw(&self, out: &mut alloy_sol_types::private::Vec) { match self { @@ -1391,10 +1326,7 @@ function swapTokensForExactTokens(uint256 amountOut, uint256 amountInMax, addres ::abi_encode_raw(inner, out) } Self::addLiquidity(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } Self::factory(inner) => { ::abi_encode_raw(inner, out) @@ -1404,17 +1336,16 @@ function swapTokensForExactTokens(uint256 amountOut, uint256 amountInMax, addres } Self::swapTokensForExactTokens(inner) => { ::abi_encode_raw( - inner, - out, + inner, out, ) } } } } - use alloy_contract as alloy_contract; + use alloy_contract; /**Creates a new wrapper around an on-chain [`HoneyswapRouter`](self) contract instance. -See the [wrapper's documentation](`HoneyswapRouterInstance`) for more details.*/ + See the [wrapper's documentation](`HoneyswapRouterInstance`) for more details.*/ #[inline] pub const fn new< P: alloy_contract::private::Provider, @@ -1427,15 +1358,15 @@ See the [wrapper's documentation](`HoneyswapRouterInstance`) for more details.*/ } /**A [`HoneyswapRouter`](self) instance. -Contains type-safe methods for interacting with an on-chain instance of the -[`HoneyswapRouter`](self) contract located at a given `address`, using a given -provider `P`. + Contains type-safe methods for interacting with an on-chain instance of the + [`HoneyswapRouter`](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. + 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.*/ + See the [module-level documentation](self) for all the available methods.*/ #[derive(Clone)] pub struct HoneyswapRouterInstance { address: alloy_sol_types::private::Address, @@ -1446,43 +1377,45 @@ See the [module-level documentation](self) for all the available methods.*/ impl ::core::fmt::Debug for HoneyswapRouterInstance { #[inline] fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { - f.debug_tuple("HoneyswapRouterInstance").field(&self.address).finish() + f.debug_tuple("HoneyswapRouterInstance") + .field(&self.address) + .finish() } } /// Instantiation and getters/setters. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > HoneyswapRouterInstance { + impl, N: alloy_contract::private::Network> + HoneyswapRouterInstance + { /**Creates a new wrapper around an on-chain [`HoneyswapRouter`](self) contract instance. -See the [wrapper's documentation](`HoneyswapRouterInstance`) for more details.*/ + See the [wrapper's documentation](`HoneyswapRouterInstance`) for more details.*/ #[inline] - pub const fn new( - address: alloy_sol_types::private::Address, - __provider: P, - ) -> Self { + pub const fn new(address: alloy_sol_types::private::Address, __provider: P) -> Self { Self { address, provider: __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 { @@ -1490,7 +1423,8 @@ See the [wrapper's documentation](`HoneyswapRouterInstance`) for more details.*/ } } impl HoneyswapRouterInstance<&P, N> { - /// Clones the provider and returns a new instance with the cloned provider. + /// Clones the provider and returns a new instance with the cloned + /// provider. #[inline] pub fn with_cloned_provider(self) -> HoneyswapRouterInstance { HoneyswapRouterInstance { @@ -1501,24 +1435,27 @@ See the [wrapper's documentation](`HoneyswapRouterInstance`) for more details.*/ } } /// Function calls. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > HoneyswapRouterInstance { - /// Creates a new call builder using this contract instance's provider and address. + impl, N: alloy_contract::private::Network> + HoneyswapRouterInstance + { + /// 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. + /// 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 [`WETH`] function. pub fn WETH(&self) -> alloy_contract::SolCallBuilder<&P, WETHCall, N> { self.call_builder(&WETHCall) } + ///Creates a new call builder for the [`addLiquidity`] function. pub fn addLiquidity( &self, @@ -1531,23 +1468,23 @@ See the [wrapper's documentation](`HoneyswapRouterInstance`) for more details.*/ to: alloy_sol_types::private::Address, deadline: alloy_sol_types::private::primitives::aliases::U256, ) -> alloy_contract::SolCallBuilder<&P, addLiquidityCall, N> { - self.call_builder( - &addLiquidityCall { - tokenA, - tokenB, - amountADesired, - amountBDesired, - amountAMin, - amountBMin, - to, - deadline, - }, - ) + self.call_builder(&addLiquidityCall { + tokenA, + tokenB, + amountADesired, + amountBDesired, + amountAMin, + amountBMin, + to, + deadline, + }) } + ///Creates a new call builder for the [`factory`] function. pub fn factory(&self) -> alloy_contract::SolCallBuilder<&P, factoryCall, N> { self.call_builder(&factoryCall) } + ///Creates a new call builder for the [`quote`] function. pub fn quote( &self, @@ -1555,15 +1492,15 @@ See the [wrapper's documentation](`HoneyswapRouterInstance`) for more details.*/ reserveA: alloy_sol_types::private::primitives::aliases::U256, reserveB: alloy_sol_types::private::primitives::aliases::U256, ) -> alloy_contract::SolCallBuilder<&P, quoteCall, N> { - self.call_builder( - "eCall { - amountA, - reserveA, - reserveB, - }, - ) + self.call_builder("eCall { + amountA, + reserveA, + reserveB, + }) } - ///Creates a new call builder for the [`swapTokensForExactTokens`] function. + + ///Creates a new call builder for the [`swapTokensForExactTokens`] + /// function. pub fn swapTokensForExactTokens( &self, amountOut: alloy_sol_types::private::primitives::aliases::U256, @@ -1572,26 +1509,25 @@ See the [wrapper's documentation](`HoneyswapRouterInstance`) for more details.*/ to: alloy_sol_types::private::Address, deadline: alloy_sol_types::private::primitives::aliases::U256, ) -> alloy_contract::SolCallBuilder<&P, swapTokensForExactTokensCall, N> { - self.call_builder( - &swapTokensForExactTokensCall { - amountOut, - amountInMax, - path, - to, - deadline, - }, - ) + self.call_builder(&swapTokensForExactTokensCall { + amountOut, + amountInMax, + path, + to, + deadline, + }) } } /// Event filters. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > HoneyswapRouterInstance { - /// Creates a new event filter using this contract instance's provider and address. + impl, N: alloy_contract::private::Network> + HoneyswapRouterInstance + { + /// 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. + /// 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> { @@ -1599,25 +1535,19 @@ See the [wrapper's documentation](`HoneyswapRouterInstance`) for more details.*/ } } } -pub type Instance = HoneyswapRouter::HoneyswapRouterInstance< - ::alloy_provider::DynProvider, ->; +pub type Instance = HoneyswapRouter::HoneyswapRouterInstance<::alloy_provider::DynProvider>; use { - std::{sync::LazyLock, collections::HashMap}, - anyhow::{Result, Context}, - alloy_primitives::{address, Address}, - alloy_provider::{Provider, DynProvider}, + alloy_primitives::{Address, address}, + alloy_provider::{DynProvider, Provider}, + anyhow::{Context, Result}, + std::{collections::HashMap, sync::LazyLock}, }; pub const fn deployment_info(chain_id: u64) -> Option<(Address, Option)> { match chain_id { - 100u64 => { - Some(( - ::alloy_primitives::address!( - "0x1C232F01118CB8B424793ae03F870aa7D0ac7f77" - ), - None, - )) - } + 100u64 => Some(( + ::alloy_primitives::address!("0x1C232F01118CB8B424793ae03F870aa7D0ac7f77"), + None, + )), _ => None, } } @@ -1634,9 +1564,7 @@ pub const fn deployment_block(chain_id: &u64) -> Option { } } impl Instance { - pub fn deployed( - provider: &DynProvider, - ) -> impl Future> + Send { + pub fn deployed(provider: &DynProvider) -> impl Future> + Send { async move { let chain_id = provider .get_chain_id() diff --git a/contracts/generated/contracts-generated/hookstrampoline/src/lib.rs b/contracts/generated/contracts-generated/hookstrampoline/src/lib.rs index 284bb4c94a..b6002f94ac 100644 --- a/contracts/generated/contracts-generated/hookstrampoline/src/lib.rs +++ b/contracts/generated/contracts-generated/hookstrampoline/src/lib.rs @@ -1,4 +1,10 @@ -#![allow(unused_imports, unused_attributes, clippy::all, rustdoc::all, non_snake_case)] +#![allow( + unused_imports, + unused_attributes, + clippy::all, + rustdoc::all, + non_snake_case +)] //! Auto-generated contract bindings. Do not edit. /** @@ -92,8 +98,7 @@ interface HooksTrampoline { clippy::empty_structs_with_brackets )] pub mod HooksTrampoline { - use super::*; - use alloy_sol_types as alloy_sol_types; + use {super::*, alloy_sol_types}; /// The creation / init bytecode of the contract. /// /// ```text @@ -106,8 +111,8 @@ pub mod HooksTrampoline { ); #[derive(Default, Debug, PartialEq, Eq, Hash)] /**```solidity -struct Hook { address target; bytes callData; uint256 gasLimit; } -```*/ + struct Hook { address target; bytes callData; uint256 gasLimit; } + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct Hook { @@ -125,7 +130,7 @@ struct Hook { address target; bytes callData; uint256 gasLimit; } clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[doc(hidden)] #[allow(dead_code)] type UnderlyingSolTuple<'a> = ( @@ -141,9 +146,7 @@ struct Hook { address target; bytes callData; uint256 gasLimit; } ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -183,96 +186,93 @@ struct Hook { address target; bytes callData; uint256 gasLimit; } ::tokenize( &self.callData, ), - as alloy_sol_types::SolType>::tokenize(&self.gasLimit), + as alloy_sol_types::SolType>::tokenize( + &self.gasLimit, + ), ) } + #[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) + 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) + 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) + 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 Hook { type RustType = Self; - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + + const ENCODED_SIZE: Option = + as alloy_sol_types::SolType>::ENCODED_SIZE; + const PACKED_ENCODED_SIZE: Option = + as alloy_sol_types::SolType>::PACKED_ENCODED_SIZE; 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); + let tuple = as alloy_sol_types::SolType>::detokenize(token); >>::from(tuple) } } #[automatically_derived] impl alloy_sol_types::SolStruct for Hook { const NAME: &'static str = "Hook"; + #[inline] fn eip712_root_type() -> alloy_sol_types::private::Cow<'static, str> { alloy_sol_types::private::Cow::Borrowed( "Hook(address target,bytes callData,uint256 gasLimit)", ) } + #[inline] - fn eip712_components() -> alloy_sol_types::private::Vec< - alloy_sol_types::private::Cow<'static, str>, - > { + fn eip712_components() + -> alloy_sol_types::private::Vec> + { 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 { [ @@ -309,14 +309,13 @@ struct Hook { address target; bytes callData; uint256 gasLimit; } &rust.gasLimit, ) } + #[inline] fn encode_topic_preimage( rust: &Self::RustType, out: &mut alloy_sol_types::private::Vec, ) { - out.reserve( - ::topic_preimage_length(rust), - ); + out.reserve(::topic_preimage_length(rust)); ::encode_topic_preimage( &rust.target, out, @@ -332,26 +331,20 @@ struct Hook { address target; bytes callData; uint256 gasLimit; } out, ); } + #[inline] - fn encode_topic( - rust: &Self::RustType, - ) -> alloy_sol_types::abi::token::WordToken { + 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), - ) + ::encode_topic_preimage(rust, &mut out); + alloy_sol_types::abi::token::WordToken(alloy_sol_types::private::keccak256(out)) } } }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Custom error with signature `NotASettlement()` and selector `0x0cd41ec0`. -```solidity -error NotASettlement(); -```*/ + ```solidity + error NotASettlement(); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct NotASettlement; @@ -362,7 +355,7 @@ error NotASettlement(); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[doc(hidden)] #[allow(dead_code)] type UnderlyingSolTuple<'a> = (); @@ -370,9 +363,7 @@ error NotASettlement(); type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -396,34 +387,36 @@ error NotASettlement(); #[automatically_derived] impl alloy_sol_types::SolError for NotASettlement { type Parameters<'a> = UnderlyingSolTuple<'a>; - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "NotASettlement()"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [12u8, 212u8, 30u8, 192u8]; + const SIGNATURE: &'static str = "NotASettlement()"; + #[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) + as alloy_sol_types::SolType>::abi_decode_sequence_validate( + data, + ) + .map(Self::new) } } }; /**Constructor`. -```solidity -constructor(address settlement_); -```*/ + ```solidity + constructor(address settlement_); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct constructorCall { @@ -431,7 +424,7 @@ constructor(address settlement_); pub settlement_: alloy_sol_types::private::Address, } const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -440,9 +433,7 @@ constructor(address settlement_); type UnderlyingRustTuple<'a> = (alloy_sol_types::private::Address,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -460,22 +451,24 @@ constructor(address settlement_); #[doc(hidden)] impl ::core::convert::From> for constructorCall { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { - Self { settlement_: tuple.0 } + Self { + settlement_: tuple.0, + } } } } #[automatically_derived] impl alloy_sol_types::SolConstructor for constructorCall { type Parameters<'a> = (alloy_sol_types::sol_data::Address,); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + 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<'_> { ( @@ -488,18 +481,17 @@ constructor(address settlement_); }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `execute((address,bytes,uint256)[])` and selector `0x760f2a0b`. -```solidity -function execute(Hook[] memory hooks) external; -```*/ + ```solidity + function execute(Hook[] memory hooks) external; + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct executeCall { #[allow(missing_docs)] - pub hooks: alloy_sol_types::private::Vec< - ::RustType, - >, + pub hooks: alloy_sol_types::private::Vec<::RustType>, } - ///Container type for the return parameters of the [`execute((address,bytes,uint256)[])`](executeCall) function. + ///Container type for the return parameters of the + /// [`execute((address,bytes,uint256)[])`](executeCall) function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct executeReturn {} @@ -510,22 +502,17 @@ function execute(Hook[] memory hooks) external; clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] type UnderlyingSolTuple<'a> = (alloy_sol_types::sol_data::Array,); #[doc(hidden)] - type UnderlyingRustTuple<'a> = ( - alloy_sol_types::private::Vec< - ::RustType, - >, - ); + type UnderlyingRustTuple<'a> = + (alloy_sol_types::private::Vec<::RustType>,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -555,9 +542,7 @@ function execute(Hook[] memory hooks) external; type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -580,71 +565,68 @@ function execute(Hook[] memory hooks) external; } } impl executeReturn { - fn _tokenize( - &self, - ) -> ::ReturnToken<'_> { + fn _tokenize(&self) -> ::ReturnToken<'_> { () } } #[automatically_derived] impl alloy_sol_types::SolCall for executeCall { type Parameters<'a> = (alloy_sol_types::sol_data::Array,); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = executeReturn; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "execute((address,bytes,uint256)[])"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [118u8, 15u8, 42u8, 11u8]; + const SIGNATURE: &'static str = "execute((address,bytes,uint256)[])"; + #[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.hooks), + as alloy_sol_types::SolType>::tokenize( + &self.hooks, + ), ) } + #[inline] fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { executeReturn::_tokenize(ret) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) + 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) + 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(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `settlement()` and selector `0x51160630`. -```solidity -function settlement() external view returns (address); -```*/ + ```solidity + function settlement() external view returns (address); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct settlementCall; #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`settlement()`](settlementCall) function. + ///Container type for the return parameters of the + /// [`settlement()`](settlementCall) function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct settlementReturn { @@ -658,7 +640,7 @@ function settlement() external view returns (address); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -667,9 +649,7 @@ function settlement() external view returns (address); type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -699,9 +679,7 @@ function settlement() external view returns (address); type UnderlyingRustTuple<'a> = (alloy_sol_types::private::Address,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -726,61 +704,55 @@ function settlement() external view returns (address); #[automatically_derived] impl alloy_sol_types::SolCall for settlementCall { type Parameters<'a> = (); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = alloy_sol_types::private::Address; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (alloy_sol_types::sol_data::Address,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "settlement()"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [81u8, 22u8, 6u8, 48u8]; + const SIGNATURE: &'static str = "settlement()"; + #[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, - ), - ) + (::tokenize(ret),) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) - .map(|r| { + as alloy_sol_types::SolType>::abi_decode_sequence(data).map( + |r| { let r: settlementReturn = 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: settlementReturn = r.into(); - r._0 - }) + 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: settlementReturn = r.into(); + r._0 + }) } } }; ///Container for all the [`HooksTrampoline`](self) function calls. #[derive(Clone)] - #[derive()] pub enum HooksTrampolineCalls { #[allow(missing_docs)] execute(executeCall), @@ -790,24 +762,22 @@ function settlement() external view returns (address); impl HooksTrampolineCalls { /// 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. + /// 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]] = &[ - [81u8, 22u8, 6u8, 48u8], - [118u8, 15u8, 42u8, 11u8], - ]; - /// The names of the variants in the same order as `SELECTORS`. - pub const VARIANT_NAMES: &'static [&'static str] = &[ - ::core::stringify!(settlement), - ::core::stringify!(execute), - ]; + pub const SELECTORS: &'static [[u8; 4usize]] = + &[[81u8, 22u8, 6u8, 48u8], [118u8, 15u8, 42u8, 11u8]]; /// The signatures in the same order as `SELECTORS`. pub const SIGNATURES: &'static [&'static str] = &[ ::SIGNATURE, ::SIGNATURE, ]; + /// The names of the variants in the same order as `SELECTORS`. + pub const VARIANT_NAMES: &'static [&'static str] = + &[::core::stringify!(settlement), ::core::stringify!(execute)]; + /// Returns the signature for the given selector, if known. #[inline] pub fn signature_by_selector( @@ -820,61 +790,51 @@ function settlement() external view returns (address); ::core::result::Result::Err(_) => ::core::option::Option::None, } } + /// Returns the enum variant name for the given selector, if known. #[inline] - pub fn name_by_selector( - selector: [u8; 4usize], - ) -> ::core::option::Option<&'static str> { + pub fn name_by_selector(selector: [u8; 4usize]) -> ::core::option::Option<&'static str> { let sig = Self::signature_by_selector(selector)?; sig.split_once('(').map(|(name, _)| name) } } #[automatically_derived] impl alloy_sol_types::SolInterface for HooksTrampolineCalls { - const NAME: &'static str = "HooksTrampolineCalls"; - const MIN_DATA_LENGTH: usize = 0usize; const COUNT: usize = 2usize; + const MIN_DATA_LENGTH: usize = 0usize; + const NAME: &'static str = "HooksTrampolineCalls"; + #[inline] fn selector(&self) -> [u8; 4] { match self { Self::execute(_) => ::SELECTOR, - Self::settlement(_) => { - ::SELECTOR - } + Self::settlement(_) => ::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 abi_decode_raw(selector: [u8; 4], data: &[u8]) -> alloy_sol_types::Result { + static DECODE_SHIMS: &[fn(&[u8]) -> alloy_sol_types::Result] = &[ { - fn settlement( - data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, - ) + fn settlement(data: &[u8]) -> alloy_sol_types::Result { + ::abi_decode_raw(data) .map(HooksTrampolineCalls::settlement) } settlement }, { - fn execute( - data: &[u8], - ) -> alloy_sol_types::Result { + fn execute(data: &[u8]) -> alloy_sol_types::Result { ::abi_decode_raw(data) .map(HooksTrampolineCalls::execute) } @@ -882,15 +842,14 @@ function settlement() external view returns (address); }, ]; let Ok(idx) = Self::SELECTORS.binary_search(&selector) else { - return Err( - alloy_sol_types::Error::unknown_selector( - ::NAME, - selector, - ), - ); + return Err(alloy_sol_types::Error::unknown_selector( + ::NAME, + selector, + )); }; DECODE_SHIMS[idx](data) } + #[inline] #[allow(non_snake_case)] fn abi_decode_raw_validate( @@ -899,40 +858,32 @@ function settlement() external view returns (address); ) -> alloy_sol_types::Result { static DECODE_VALIDATE_SHIMS: &[fn( &[u8], - ) -> alloy_sol_types::Result] = &[ + ) + -> alloy_sol_types::Result] = &[ { - fn settlement( - data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) + fn settlement(data: &[u8]) -> alloy_sol_types::Result { + ::abi_decode_raw_validate(data) .map(HooksTrampolineCalls::settlement) } settlement }, { - fn execute( - data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) + fn execute(data: &[u8]) -> alloy_sol_types::Result { + ::abi_decode_raw_validate(data) .map(HooksTrampolineCalls::execute) } execute }, ]; let Ok(idx) = Self::SELECTORS.binary_search(&selector) else { - return Err( - alloy_sol_types::Error::unknown_selector( - ::NAME, - selector, - ), - ); + return Err(alloy_sol_types::Error::unknown_selector( + ::NAME, + selector, + )); }; DECODE_VALIDATE_SHIMS[idx](data) } + #[inline] fn abi_encoded_size(&self) -> usize { match self { @@ -944,6 +895,7 @@ function settlement() external view returns (address); } } } + #[inline] fn abi_encode_raw(&self, out: &mut alloy_sol_types::private::Vec) { match self { @@ -951,17 +903,13 @@ function settlement() external view returns (address); ::abi_encode_raw(inner, out) } Self::settlement(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } } } } ///Container for all the [`HooksTrampoline`](self) custom errors. - #[derive(Clone)] - #[derive(Debug, PartialEq, Eq, Hash)] + #[derive(Clone, Debug, PartialEq, Eq, Hash)] pub enum HooksTrampolineErrors { #[allow(missing_docs)] NotASettlement(NotASettlement), @@ -969,19 +917,18 @@ function settlement() external view returns (address); impl HooksTrampolineErrors { /// 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. + /// 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]] = &[[12u8, 212u8, 30u8, 192u8]]; - /// The names of the variants in the same order as `SELECTORS`. - pub const VARIANT_NAMES: &'static [&'static str] = &[ - ::core::stringify!(NotASettlement), - ]; /// The signatures in the same order as `SELECTORS`. - pub const SIGNATURES: &'static [&'static str] = &[ - ::SIGNATURE, - ]; + pub const SIGNATURES: &'static [&'static str] = + &[::SIGNATURE]; + /// The names of the variants in the same order as `SELECTORS`. + pub const VARIANT_NAMES: &'static [&'static str] = &[::core::stringify!(NotASettlement)]; + /// Returns the signature for the given selector, if known. #[inline] pub fn signature_by_selector( @@ -994,67 +941,59 @@ function settlement() external view returns (address); ::core::result::Result::Err(_) => ::core::option::Option::None, } } + /// Returns the enum variant name for the given selector, if known. #[inline] - pub fn name_by_selector( - selector: [u8; 4usize], - ) -> ::core::option::Option<&'static str> { + pub fn name_by_selector(selector: [u8; 4usize]) -> ::core::option::Option<&'static str> { let sig = Self::signature_by_selector(selector)?; sig.split_once('(').map(|(name, _)| name) } } #[automatically_derived] impl alloy_sol_types::SolInterface for HooksTrampolineErrors { - const NAME: &'static str = "HooksTrampolineErrors"; - const MIN_DATA_LENGTH: usize = 0usize; const COUNT: usize = 1usize; + const MIN_DATA_LENGTH: usize = 0usize; + const NAME: &'static str = "HooksTrampolineErrors"; + #[inline] fn selector(&self) -> [u8; 4] { match self { - Self::NotASettlement(_) => { - ::SELECTOR - } + Self::NotASettlement(_) => ::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 abi_decode_raw(selector: [u8; 4], data: &[u8]) -> alloy_sol_types::Result { + static DECODE_SHIMS: &[fn(&[u8]) -> alloy_sol_types::Result] = + &[{ fn NotASettlement( data: &[u8], ) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, - ) + ::abi_decode_raw(data) .map(HooksTrampolineErrors::NotASettlement) } NotASettlement - }, - ]; + }]; let Ok(idx) = Self::SELECTORS.binary_search(&selector) else { - return Err( - alloy_sol_types::Error::unknown_selector( - ::NAME, - selector, - ), - ); + return Err(alloy_sol_types::Error::unknown_selector( + ::NAME, + selector, + )); }; DECODE_SHIMS[idx](data) } + #[inline] #[allow(non_snake_case)] fn abi_decode_raw_validate( @@ -1063,55 +1002,46 @@ function settlement() external view returns (address); ) -> alloy_sol_types::Result { static DECODE_VALIDATE_SHIMS: &[fn( &[u8], - ) -> alloy_sol_types::Result] = &[ - { - fn NotASettlement( - data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) - .map(HooksTrampolineErrors::NotASettlement) - } - NotASettlement - }, - ]; + ) -> alloy_sol_types::Result< + HooksTrampolineErrors, + >] = &[{ + fn NotASettlement(data: &[u8]) -> alloy_sol_types::Result { + ::abi_decode_raw_validate(data) + .map(HooksTrampolineErrors::NotASettlement) + } + NotASettlement + }]; let Ok(idx) = Self::SELECTORS.binary_search(&selector) else { - return Err( - alloy_sol_types::Error::unknown_selector( - ::NAME, - selector, - ), - ); + 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::NotASettlement(inner) => { - ::abi_encoded_size( - inner, - ) + ::abi_encoded_size(inner) } } } + #[inline] fn abi_encode_raw(&self, out: &mut alloy_sol_types::private::Vec) { match self { Self::NotASettlement(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } } } } - use alloy_contract as alloy_contract; + use alloy_contract; /**Creates a new wrapper around an on-chain [`HooksTrampoline`](self) contract instance. -See the [wrapper's documentation](`HooksTrampolineInstance`) for more details.*/ + See the [wrapper's documentation](`HooksTrampolineInstance`) for more details.*/ #[inline] pub const fn new< P: alloy_contract::private::Provider, @@ -1124,26 +1054,22 @@ See the [wrapper's documentation](`HooksTrampolineInstance`) for more details.*/ } /**Deploys this contract using the given `provider` and constructor arguments, if any. -Returns a new instance of the contract, if the deployment was successful. + 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.*/ + 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, - >( + pub fn deploy, N: alloy_contract::private::Network>( __provider: P, settlement_: alloy_sol_types::private::Address, - ) -> impl ::core::future::Future< - Output = alloy_contract::Result>, - > { + ) -> impl ::core::future::Future>> + { HooksTrampolineInstance::::deploy(__provider, settlement_) } /**Creates a `RawCallBuilder` for deploying this contract using the given `provider` -and constructor arguments, if any. + 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.*/ + 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, @@ -1156,15 +1082,15 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ } /**A [`HooksTrampoline`](self) instance. -Contains type-safe methods for interacting with an on-chain instance of the -[`HooksTrampoline`](self) contract located at a given `address`, using a given -provider `P`. + Contains type-safe methods for interacting with an on-chain instance of the + [`HooksTrampoline`](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. + 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.*/ + See the [module-level documentation](self) for all the available methods.*/ #[derive(Clone)] pub struct HooksTrampolineInstance { address: alloy_sol_types::private::Address, @@ -1175,33 +1101,32 @@ See the [module-level documentation](self) for all the available methods.*/ impl ::core::fmt::Debug for HooksTrampolineInstance { #[inline] fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { - f.debug_tuple("HooksTrampolineInstance").field(&self.address).finish() + f.debug_tuple("HooksTrampolineInstance") + .field(&self.address) + .finish() } } /// Instantiation and getters/setters. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > HooksTrampolineInstance { + impl, N: alloy_contract::private::Network> + HooksTrampolineInstance + { /**Creates a new wrapper around an on-chain [`HooksTrampoline`](self) contract instance. -See the [wrapper's documentation](`HooksTrampolineInstance`) for more details.*/ + See the [wrapper's documentation](`HooksTrampolineInstance`) for more details.*/ #[inline] - pub const fn new( - address: alloy_sol_types::private::Address, - __provider: P, - ) -> Self { + pub const fn new(address: alloy_sol_types::private::Address, __provider: P) -> Self { Self { address, provider: __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. + 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.*/ + For more fine-grained control over the deployment process, use [`deploy_builder`] instead.*/ #[inline] pub async fn deploy( __provider: P, @@ -1211,11 +1136,12 @@ For more fine-grained control over the deployment process, use [`deploy_builder` 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. + 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.*/ + 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, @@ -1225,29 +1151,32 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ __provider, [ &BYTECODE[..], - &alloy_sol_types::SolConstructor::abi_encode( - &constructorCall { settlement_ }, - )[..], + &alloy_sol_types::SolConstructor::abi_encode(&constructorCall { settlement_ }) + [..], ] - .concat() - .into(), + .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 { @@ -1255,7 +1184,8 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ } } impl HooksTrampolineInstance<&P, N> { - /// Clones the provider and returns a new instance with the cloned provider. + /// Clones the provider and returns a new instance with the cloned + /// provider. #[inline] pub fn with_cloned_provider(self) -> HooksTrampolineInstance { HooksTrampolineInstance { @@ -1266,45 +1196,45 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ } } /// Function calls. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > HooksTrampolineInstance { - /// Creates a new call builder using this contract instance's provider and address. + impl, N: alloy_contract::private::Network> + HooksTrampolineInstance + { + /// 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. + /// 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 [`execute`] function. pub fn execute( &self, - hooks: alloy_sol_types::private::Vec< - ::RustType, - >, + hooks: alloy_sol_types::private::Vec<::RustType>, ) -> alloy_contract::SolCallBuilder<&P, executeCall, N> { self.call_builder(&executeCall { hooks }) } + ///Creates a new call builder for the [`settlement`] function. - pub fn settlement( - &self, - ) -> alloy_contract::SolCallBuilder<&P, settlementCall, N> { + pub fn settlement(&self) -> alloy_contract::SolCallBuilder<&P, settlementCall, N> { self.call_builder(&settlementCall) } } /// Event filters. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > HooksTrampolineInstance { - /// Creates a new event filter using this contract instance's provider and address. + impl, N: alloy_contract::private::Network> + HooksTrampolineInstance + { + /// 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. + /// 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> { @@ -1312,113 +1242,63 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ } } } -pub type Instance = HooksTrampoline::HooksTrampolineInstance< - ::alloy_provider::DynProvider, ->; +pub type Instance = HooksTrampoline::HooksTrampolineInstance<::alloy_provider::DynProvider>; use { - std::{sync::LazyLock, collections::HashMap}, - anyhow::{Result, Context}, - alloy_primitives::{address, Address}, - alloy_provider::{Provider, DynProvider}, + alloy_primitives::{Address, address}, + alloy_provider::{DynProvider, Provider}, + anyhow::{Context, Result}, + std::{collections::HashMap, sync::LazyLock}, }; pub const fn deployment_info(chain_id: u64) -> Option<(Address, Option)> { match chain_id { - 1u64 => { - Some(( - ::alloy_primitives::address!( - "0x60Bf78233f48eC42eE3F101b9a05eC7878728006" - ), - None, - )) - } - 10u64 => { - Some(( - ::alloy_primitives::address!( - "0x60Bf78233f48eC42eE3F101b9a05eC7878728006" - ), - None, - )) - } - 56u64 => { - Some(( - ::alloy_primitives::address!( - "0x60Bf78233f48eC42eE3F101b9a05eC7878728006" - ), - None, - )) - } - 100u64 => { - Some(( - ::alloy_primitives::address!( - "0x01DcB88678aedD0C4cC9552B20F4718550250574" - ), - None, - )) - } - 137u64 => { - Some(( - ::alloy_primitives::address!( - "0x60Bf78233f48eC42eE3F101b9a05eC7878728006" - ), - None, - )) - } - 8453u64 => { - Some(( - ::alloy_primitives::address!( - "0x60Bf78233f48eC42eE3F101b9a05eC7878728006" - ), - None, - )) - } - 9745u64 => { - Some(( - ::alloy_primitives::address!( - "0x60Bf78233f48eC42eE3F101b9a05eC7878728006" - ), - None, - )) - } - 42161u64 => { - Some(( - ::alloy_primitives::address!( - "0x60Bf78233f48eC42eE3F101b9a05eC7878728006" - ), - None, - )) - } - 43114u64 => { - Some(( - ::alloy_primitives::address!( - "0x60Bf78233f48eC42eE3F101b9a05eC7878728006" - ), - None, - )) - } - 57073u64 => { - Some(( - ::alloy_primitives::address!( - "0x60Bf78233f48eC42eE3F101b9a05eC7878728006" - ), - None, - )) - } - 59144u64 => { - Some(( - ::alloy_primitives::address!( - "0x60bf78233f48ec42ee3f101b9a05ec7878728006" - ), - None, - )) - } - 11155111u64 => { - Some(( - ::alloy_primitives::address!( - "0x60Bf78233f48eC42eE3F101b9a05eC7878728006" - ), - None, - )) - } + 1u64 => Some(( + ::alloy_primitives::address!("0x60Bf78233f48eC42eE3F101b9a05eC7878728006"), + None, + )), + 10u64 => Some(( + ::alloy_primitives::address!("0x60Bf78233f48eC42eE3F101b9a05eC7878728006"), + None, + )), + 56u64 => Some(( + ::alloy_primitives::address!("0x60Bf78233f48eC42eE3F101b9a05eC7878728006"), + None, + )), + 100u64 => Some(( + ::alloy_primitives::address!("0x01DcB88678aedD0C4cC9552B20F4718550250574"), + None, + )), + 137u64 => Some(( + ::alloy_primitives::address!("0x60Bf78233f48eC42eE3F101b9a05eC7878728006"), + None, + )), + 8453u64 => Some(( + ::alloy_primitives::address!("0x60Bf78233f48eC42eE3F101b9a05eC7878728006"), + None, + )), + 9745u64 => Some(( + ::alloy_primitives::address!("0x60Bf78233f48eC42eE3F101b9a05eC7878728006"), + None, + )), + 42161u64 => Some(( + ::alloy_primitives::address!("0x60Bf78233f48eC42eE3F101b9a05eC7878728006"), + None, + )), + 43114u64 => Some(( + ::alloy_primitives::address!("0x60Bf78233f48eC42eE3F101b9a05eC7878728006"), + None, + )), + 57073u64 => Some(( + ::alloy_primitives::address!("0x60Bf78233f48eC42eE3F101b9a05eC7878728006"), + None, + )), + 59144u64 => Some(( + ::alloy_primitives::address!("0x60bf78233f48ec42ee3f101b9a05ec7878728006"), + None, + )), + 11155111u64 => Some(( + ::alloy_primitives::address!("0x60Bf78233f48eC42eE3F101b9a05eC7878728006"), + None, + )), _ => None, } } @@ -1435,9 +1315,7 @@ pub const fn deployment_block(chain_id: &u64) -> Option { } } impl Instance { - pub fn deployed( - provider: &DynProvider, - ) -> impl Future> + Send { + pub fn deployed(provider: &DynProvider) -> impl Future> + Send { async move { let chain_id = provider .get_chain_id() diff --git a/contracts/generated/contracts-generated/icowwrapper/src/lib.rs b/contracts/generated/contracts-generated/icowwrapper/src/lib.rs index 29e458175b..500a73c78b 100644 --- a/contracts/generated/contracts-generated/icowwrapper/src/lib.rs +++ b/contracts/generated/contracts-generated/icowwrapper/src/lib.rs @@ -1,4 +1,10 @@ -#![allow(unused_imports, unused_attributes, clippy::all, rustdoc::all, non_snake_case)] +#![allow( + unused_imports, + unused_attributes, + clippy::all, + rustdoc::all, + non_snake_case +)] //! Auto-generated contract bindings. Do not edit. /** @@ -40,13 +46,12 @@ interface ICowWrapper { clippy::empty_structs_with_brackets )] pub mod ICowWrapper { - use super::*; - use alloy_sol_types as alloy_sol_types; + use {super::*, alloy_sol_types}; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `wrappedSettle(bytes,bytes)` and selector `0xd20e71e7`. -```solidity -function wrappedSettle(bytes memory settleData, bytes memory wrapperData) external; -```*/ + ```solidity + function wrappedSettle(bytes memory settleData, bytes memory wrapperData) external; + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct wrappedSettleCall { @@ -55,7 +60,8 @@ function wrappedSettle(bytes memory settleData, bytes memory wrapperData) extern #[allow(missing_docs)] pub wrapperData: alloy_sol_types::private::Bytes, } - ///Container type for the return parameters of the [`wrappedSettle(bytes,bytes)`](wrappedSettleCall) function. + ///Container type for the return parameters of the + /// [`wrappedSettle(bytes,bytes)`](wrappedSettleCall) function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct wrappedSettleReturn {} @@ -66,7 +72,7 @@ function wrappedSettle(bytes memory settleData, bytes memory wrapperData) extern clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -81,9 +87,7 @@ function wrappedSettle(bytes memory settleData, bytes memory wrapperData) extern ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -116,9 +120,7 @@ function wrappedSettle(bytes memory settleData, bytes memory wrapperData) extern type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -153,22 +155,21 @@ function wrappedSettle(bytes memory settleData, bytes memory wrapperData) extern alloy_sol_types::sol_data::Bytes, alloy_sol_types::sol_data::Bytes, ); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = wrappedSettleReturn; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "wrappedSettle(bytes,bytes)"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [210u8, 14u8, 113u8, 231u8]; + const SIGNATURE: &'static str = "wrappedSettle(bytes,bytes)"; + #[inline] fn new<'a>( tuple: as alloy_sol_types::SolType>::RustType, ) -> Self { tuple.into() } + #[inline] fn tokenize(&self) -> Self::Token<'_> { ( @@ -180,31 +181,29 @@ function wrappedSettle(bytes memory settleData, bytes memory wrapperData) extern ), ) } + #[inline] fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { wrappedSettleReturn::_tokenize(ret) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) + 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) + 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 [`ICowWrapper`](self) function calls. #[derive(Clone)] - #[derive()] pub enum ICowWrapperCalls { #[allow(missing_docs)] wrappedSettle(wrappedSettleCall), @@ -212,19 +211,18 @@ function wrappedSettle(bytes memory settleData, bytes memory wrapperData) extern impl ICowWrapperCalls { /// 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. + /// 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]] = &[[210u8, 14u8, 113u8, 231u8]]; - /// The names of the variants in the same order as `SELECTORS`. - pub const VARIANT_NAMES: &'static [&'static str] = &[ - ::core::stringify!(wrappedSettle), - ]; /// The signatures in the same order as `SELECTORS`. - pub const SIGNATURES: &'static [&'static str] = &[ - ::SIGNATURE, - ]; + pub const SIGNATURES: &'static [&'static str] = + &[::SIGNATURE]; + /// The names of the variants in the same order as `SELECTORS`. + pub const VARIANT_NAMES: &'static [&'static str] = &[::core::stringify!(wrappedSettle)]; + /// Returns the signature for the given selector, if known. #[inline] pub fn signature_by_selector( @@ -237,67 +235,56 @@ function wrappedSettle(bytes memory settleData, bytes memory wrapperData) extern ::core::result::Result::Err(_) => ::core::option::Option::None, } } + /// Returns the enum variant name for the given selector, if known. #[inline] - pub fn name_by_selector( - selector: [u8; 4usize], - ) -> ::core::option::Option<&'static str> { + pub fn name_by_selector(selector: [u8; 4usize]) -> ::core::option::Option<&'static str> { let sig = Self::signature_by_selector(selector)?; sig.split_once('(').map(|(name, _)| name) } } #[automatically_derived] impl alloy_sol_types::SolInterface for ICowWrapperCalls { - const NAME: &'static str = "ICowWrapperCalls"; - const MIN_DATA_LENGTH: usize = 128usize; const COUNT: usize = 1usize; + const MIN_DATA_LENGTH: usize = 128usize; + const NAME: &'static str = "ICowWrapperCalls"; + #[inline] fn selector(&self) -> [u8; 4] { match self { - Self::wrappedSettle(_) => { - ::SELECTOR - } + Self::wrappedSettle(_) => ::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 wrappedSettle( - data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, - ) - .map(ICowWrapperCalls::wrappedSettle) - } - wrappedSettle - }, - ]; + fn abi_decode_raw(selector: [u8; 4], data: &[u8]) -> alloy_sol_types::Result { + static DECODE_SHIMS: &[fn(&[u8]) -> alloy_sol_types::Result] = &[{ + fn wrappedSettle(data: &[u8]) -> alloy_sol_types::Result { + ::abi_decode_raw(data) + .map(ICowWrapperCalls::wrappedSettle) + } + wrappedSettle + }]; let Ok(idx) = Self::SELECTORS.binary_search(&selector) else { - return Err( - alloy_sol_types::Error::unknown_selector( - ::NAME, - selector, - ), - ); + return Err(alloy_sol_types::Error::unknown_selector( + ::NAME, + selector, + )); }; DECODE_SHIMS[idx](data) } + #[inline] #[allow(non_snake_case)] fn abi_decode_raw_validate( @@ -306,55 +293,45 @@ function wrappedSettle(bytes memory settleData, bytes memory wrapperData) extern ) -> alloy_sol_types::Result { static DECODE_VALIDATE_SHIMS: &[fn( &[u8], - ) -> alloy_sol_types::Result] = &[ - { - fn wrappedSettle( - data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) - .map(ICowWrapperCalls::wrappedSettle) - } - wrappedSettle - }, - ]; + ) + -> alloy_sol_types::Result] = &[{ + fn wrappedSettle(data: &[u8]) -> alloy_sol_types::Result { + ::abi_decode_raw_validate(data) + .map(ICowWrapperCalls::wrappedSettle) + } + wrappedSettle + }]; let Ok(idx) = Self::SELECTORS.binary_search(&selector) else { - return Err( - alloy_sol_types::Error::unknown_selector( - ::NAME, - selector, - ), - ); + 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::wrappedSettle(inner) => { - ::abi_encoded_size( - inner, - ) + ::abi_encoded_size(inner) } } } + #[inline] fn abi_encode_raw(&self, out: &mut alloy_sol_types::private::Vec) { match self { Self::wrappedSettle(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } } } } - use alloy_contract as alloy_contract; + use alloy_contract; /**Creates a new wrapper around an on-chain [`ICowWrapper`](self) contract instance. -See the [wrapper's documentation](`ICowWrapperInstance`) for more details.*/ + See the [wrapper's documentation](`ICowWrapperInstance`) for more details.*/ #[inline] pub const fn new< P: alloy_contract::private::Provider, @@ -367,15 +344,15 @@ See the [wrapper's documentation](`ICowWrapperInstance`) for more details.*/ } /**A [`ICowWrapper`](self) instance. -Contains type-safe methods for interacting with an on-chain instance of the -[`ICowWrapper`](self) contract located at a given `address`, using a given -provider `P`. + Contains type-safe methods for interacting with an on-chain instance of the + [`ICowWrapper`](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. + 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.*/ + See the [module-level documentation](self) for all the available methods.*/ #[derive(Clone)] pub struct ICowWrapperInstance { address: alloy_sol_types::private::Address, @@ -386,43 +363,45 @@ See the [module-level documentation](self) for all the available methods.*/ impl ::core::fmt::Debug for ICowWrapperInstance { #[inline] fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { - f.debug_tuple("ICowWrapperInstance").field(&self.address).finish() + f.debug_tuple("ICowWrapperInstance") + .field(&self.address) + .finish() } } /// Instantiation and getters/setters. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > ICowWrapperInstance { + impl, N: alloy_contract::private::Network> + ICowWrapperInstance + { /**Creates a new wrapper around an on-chain [`ICowWrapper`](self) contract instance. -See the [wrapper's documentation](`ICowWrapperInstance`) for more details.*/ + See the [wrapper's documentation](`ICowWrapperInstance`) for more details.*/ #[inline] - pub const fn new( - address: alloy_sol_types::private::Address, - __provider: P, - ) -> Self { + pub const fn new(address: alloy_sol_types::private::Address, __provider: P) -> Self { Self { address, provider: __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 { @@ -430,7 +409,8 @@ See the [wrapper's documentation](`ICowWrapperInstance`) for more details.*/ } } impl ICowWrapperInstance<&P, N> { - /// Clones the provider and returns a new instance with the cloned provider. + /// Clones the provider and returns a new instance with the cloned + /// provider. #[inline] pub fn with_cloned_provider(self) -> ICowWrapperInstance { ICowWrapperInstance { @@ -441,43 +421,44 @@ See the [wrapper's documentation](`ICowWrapperInstance`) for more details.*/ } } /// Function calls. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > ICowWrapperInstance { - /// Creates a new call builder using this contract instance's provider and address. + impl, N: alloy_contract::private::Network> + ICowWrapperInstance + { + /// 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. + /// 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 [`wrappedSettle`] function. pub fn wrappedSettle( &self, settleData: alloy_sol_types::private::Bytes, wrapperData: alloy_sol_types::private::Bytes, ) -> alloy_contract::SolCallBuilder<&P, wrappedSettleCall, N> { - self.call_builder( - &wrappedSettleCall { - settleData, - wrapperData, - }, - ) + self.call_builder(&wrappedSettleCall { + settleData, + wrapperData, + }) } } /// Event filters. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > ICowWrapperInstance { - /// Creates a new event filter using this contract instance's provider and address. + impl, N: alloy_contract::private::Network> + ICowWrapperInstance + { + /// 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. + /// 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> { diff --git a/contracts/generated/contracts-generated/ierc4626/src/lib.rs b/contracts/generated/contracts-generated/ierc4626/src/lib.rs index ab0a2b33f1..11f48918c2 100644 --- a/contracts/generated/contracts-generated/ierc4626/src/lib.rs +++ b/contracts/generated/contracts-generated/ierc4626/src/lib.rs @@ -1,4 +1,10 @@ -#![allow(unused_imports, unused_attributes, clippy::all, rustdoc::all, non_snake_case)] +#![allow( + unused_imports, + unused_attributes, + clippy::all, + rustdoc::all, + non_snake_case +)] //! Auto-generated contract bindings. Do not edit. /** @@ -55,18 +61,18 @@ interface IERC4626 { clippy::empty_structs_with_brackets )] pub mod IERC4626 { - use super::*; - use alloy_sol_types as alloy_sol_types; + use {super::*, alloy_sol_types}; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `asset()` and selector `0x38d52e0f`. -```solidity -function asset() external view returns (address assetTokenAddress); -```*/ + ```solidity + function asset() external view returns (address assetTokenAddress); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct assetCall; #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`asset()`](assetCall) function. + ///Container type for the return parameters of the [`asset()`](assetCall) + /// function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct assetReturn { @@ -80,7 +86,7 @@ function asset() external view returns (address assetTokenAddress); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -89,9 +95,7 @@ function asset() external view returns (address assetTokenAddress); type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -121,9 +125,7 @@ function asset() external view returns (address assetTokenAddress); type UnderlyingRustTuple<'a> = (alloy_sol_types::private::Address,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -141,70 +143,67 @@ function asset() external view returns (address assetTokenAddress); #[doc(hidden)] impl ::core::convert::From> for assetReturn { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { - Self { assetTokenAddress: tuple.0 } + Self { + assetTokenAddress: tuple.0, + } } } } #[automatically_derived] impl alloy_sol_types::SolCall for assetCall { type Parameters<'a> = (); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = alloy_sol_types::private::Address; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (alloy_sol_types::sol_data::Address,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "asset()"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [56u8, 213u8, 46u8, 15u8]; + const SIGNATURE: &'static str = "asset()"; + #[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, - ), - ) + (::tokenize(ret),) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) - .map(|r| { + as alloy_sol_types::SolType>::abi_decode_sequence(data).map( + |r| { let r: assetReturn = r.into(); r.assetTokenAddress - }) + }, + ) } + #[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: assetReturn = r.into(); - r.assetTokenAddress - }) + 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: assetReturn = r.into(); + r.assetTokenAddress + }) } } }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `convertToAssets(uint256)` and selector `0x07a2d13a`. -```solidity -function convertToAssets(uint256 shares) external view returns (uint256 assets); -```*/ + ```solidity + function convertToAssets(uint256 shares) external view returns (uint256 assets); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct convertToAssetsCall { @@ -212,7 +211,8 @@ function convertToAssets(uint256 shares) external view returns (uint256 assets); pub shares: alloy_sol_types::private::primitives::aliases::U256, } #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`convertToAssets(uint256)`](convertToAssetsCall) function. + ///Container type for the return parameters of the + /// [`convertToAssets(uint256)`](convertToAssetsCall) function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct convertToAssetsReturn { @@ -226,20 +226,16 @@ function convertToAssets(uint256 shares) external view returns (uint256 assets); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] type UnderlyingSolTuple<'a> = (alloy_sol_types::sol_data::Uint<256>,); #[doc(hidden)] - type UnderlyingRustTuple<'a> = ( - alloy_sol_types::private::primitives::aliases::U256, - ); + 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, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -266,14 +262,10 @@ function convertToAssets(uint256 shares) external view returns (uint256 assets); #[allow(dead_code)] type UnderlyingSolTuple<'a> = (alloy_sol_types::sol_data::Uint<256>,); #[doc(hidden)] - type UnderlyingRustTuple<'a> = ( - alloy_sol_types::private::primitives::aliases::U256, - ); + 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, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -282,16 +274,14 @@ function convertToAssets(uint256 shares) external view returns (uint256 assets); } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From - for UnderlyingRustTuple<'_> { + impl ::core::convert::From for UnderlyingRustTuple<'_> { fn from(value: convertToAssetsReturn) -> Self { (value.assets,) } } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From> - for convertToAssetsReturn { + impl ::core::convert::From> for convertToAssetsReturn { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { Self { assets: tuple.0 } } @@ -300,65 +290,63 @@ function convertToAssets(uint256 shares) external view returns (uint256 assets); #[automatically_derived] impl alloy_sol_types::SolCall for convertToAssetsCall { 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::primitives::aliases::U256; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (alloy_sol_types::sol_data::Uint<256>,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "convertToAssets(uint256)"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [7u8, 162u8, 209u8, 58u8]; + const SIGNATURE: &'static str = "convertToAssets(uint256)"; + #[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.shares), + as alloy_sol_types::SolType>::tokenize( + &self.shares, + ), ) } + #[inline] fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { ( - as alloy_sol_types::SolType>::tokenize(ret), + 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| { + as alloy_sol_types::SolType>::abi_decode_sequence(data).map( + |r| { let r: convertToAssetsReturn = r.into(); r.assets - }) + }, + ) } + #[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: convertToAssetsReturn = r.into(); - r.assets - }) + 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: convertToAssetsReturn = r.into(); + r.assets + }) } } }; ///Container for all the [`IERC4626`](self) function calls. #[derive(Clone)] - #[derive()] pub enum IERC4626Calls { #[allow(missing_docs)] asset(assetCall), @@ -368,24 +356,24 @@ function convertToAssets(uint256 shares) external view returns (uint256 assets); impl IERC4626Calls { /// 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. + /// 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, 162u8, 209u8, 58u8], - [56u8, 213u8, 46u8, 15u8], + pub const SELECTORS: &'static [[u8; 4usize]] = + &[[7u8, 162u8, 209u8, 58u8], [56u8, 213u8, 46u8, 15u8]]; + /// The signatures in the same order as `SELECTORS`. + pub const SIGNATURES: &'static [&'static str] = &[ + ::SIGNATURE, + ::SIGNATURE, ]; /// The names of the variants in the same order as `SELECTORS`. pub const VARIANT_NAMES: &'static [&'static str] = &[ ::core::stringify!(convertToAssets), ::core::stringify!(asset), ]; - /// The signatures in the same order as `SELECTORS`. - pub const SIGNATURES: &'static [&'static str] = &[ - ::SIGNATURE, - ::SIGNATURE, - ]; + /// Returns the signature for the given selector, if known. #[inline] pub fn signature_by_selector( @@ -398,20 +386,20 @@ function convertToAssets(uint256 shares) external view returns (uint256 assets); ::core::result::Result::Err(_) => ::core::option::Option::None, } } + /// Returns the enum variant name for the given selector, if known. #[inline] - pub fn name_by_selector( - selector: [u8; 4usize], - ) -> ::core::option::Option<&'static str> { + pub fn name_by_selector(selector: [u8; 4usize]) -> ::core::option::Option<&'static str> { let sig = Self::signature_by_selector(selector)?; sig.split_once('(').map(|(name, _)| name) } } #[automatically_derived] impl alloy_sol_types::SolInterface for IERC4626Calls { - const NAME: &'static str = "IERC4626Calls"; - const MIN_DATA_LENGTH: usize = 0usize; const COUNT: usize = 2usize; + const MIN_DATA_LENGTH: usize = 0usize; + const NAME: &'static str = "IERC4626Calls"; + #[inline] fn selector(&self) -> [u8; 4] { match self { @@ -421,30 +409,24 @@ function convertToAssets(uint256 shares) external view returns (uint256 assets); } } } + #[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 abi_decode_raw(selector: [u8; 4], data: &[u8]) -> alloy_sol_types::Result { + static DECODE_SHIMS: &[fn(&[u8]) -> alloy_sol_types::Result] = &[ { - fn convertToAssets( - data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, - ) + fn convertToAssets(data: &[u8]) -> alloy_sol_types::Result { + ::abi_decode_raw(data) .map(IERC4626Calls::convertToAssets) } convertToAssets @@ -458,55 +440,48 @@ function convertToAssets(uint256 shares) external view returns (uint256 assets); }, ]; let Ok(idx) = Self::SELECTORS.binary_search(&selector) else { - return Err( - alloy_sol_types::Error::unknown_selector( - ::NAME, - selector, - ), - ); + 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 convertToAssets( - data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( + static DECODE_VALIDATE_SHIMS: &[fn(&[u8]) -> alloy_sol_types::Result] = + &[ + { + fn convertToAssets(data: &[u8]) -> alloy_sol_types::Result { + ::abi_decode_raw_validate( data, ) .map(IERC4626Calls::convertToAssets) - } - convertToAssets - }, - { - fn asset(data: &[u8]) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) - .map(IERC4626Calls::asset) - } - asset - }, - ]; + } + convertToAssets + }, + { + fn asset(data: &[u8]) -> alloy_sol_types::Result { + ::abi_decode_raw_validate(data) + .map(IERC4626Calls::asset) + } + asset + }, + ]; let Ok(idx) = Self::SELECTORS.binary_search(&selector) else { - return Err( - alloy_sol_types::Error::unknown_selector( - ::NAME, - selector, - ), - ); + return Err(alloy_sol_types::Error::unknown_selector( + ::NAME, + selector, + )); }; DECODE_VALIDATE_SHIMS[idx](data) } + #[inline] fn abi_encoded_size(&self) -> usize { match self { @@ -514,12 +489,11 @@ function convertToAssets(uint256 shares) external view returns (uint256 assets); ::abi_encoded_size(inner) } Self::convertToAssets(inner) => { - ::abi_encoded_size( - inner, - ) + ::abi_encoded_size(inner) } } } + #[inline] fn abi_encode_raw(&self, out: &mut alloy_sol_types::private::Vec) { match self { @@ -527,18 +501,15 @@ function convertToAssets(uint256 shares) external view returns (uint256 assets); ::abi_encode_raw(inner, out) } Self::convertToAssets(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } } } } - use alloy_contract as alloy_contract; + use alloy_contract; /**Creates a new wrapper around an on-chain [`IERC4626`](self) contract instance. -See the [wrapper's documentation](`IERC4626Instance`) for more details.*/ + See the [wrapper's documentation](`IERC4626Instance`) for more details.*/ #[inline] pub const fn new< P: alloy_contract::private::Provider, @@ -551,15 +522,15 @@ See the [wrapper's documentation](`IERC4626Instance`) for more details.*/ } /**A [`IERC4626`](self) instance. -Contains type-safe methods for interacting with an on-chain instance of the -[`IERC4626`](self) contract located at a given `address`, using a given -provider `P`. + Contains type-safe methods for interacting with an on-chain instance of the + [`IERC4626`](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. + 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.*/ + See the [module-level documentation](self) for all the available methods.*/ #[derive(Clone)] pub struct IERC4626Instance { address: alloy_sol_types::private::Address, @@ -570,43 +541,45 @@ See the [module-level documentation](self) for all the available methods.*/ impl ::core::fmt::Debug for IERC4626Instance { #[inline] fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { - f.debug_tuple("IERC4626Instance").field(&self.address).finish() + f.debug_tuple("IERC4626Instance") + .field(&self.address) + .finish() } } /// Instantiation and getters/setters. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > IERC4626Instance { + impl, N: alloy_contract::private::Network> + IERC4626Instance + { /**Creates a new wrapper around an on-chain [`IERC4626`](self) contract instance. -See the [wrapper's documentation](`IERC4626Instance`) for more details.*/ + See the [wrapper's documentation](`IERC4626Instance`) for more details.*/ #[inline] - pub const fn new( - address: alloy_sol_types::private::Address, - __provider: P, - ) -> Self { + pub const fn new(address: alloy_sol_types::private::Address, __provider: P) -> Self { Self { address, provider: __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 { @@ -614,7 +587,8 @@ See the [wrapper's documentation](`IERC4626Instance`) for more details.*/ } } impl IERC4626Instance<&P, N> { - /// Clones the provider and returns a new instance with the cloned provider. + /// Clones the provider and returns a new instance with the cloned + /// provider. #[inline] pub fn with_cloned_provider(self) -> IERC4626Instance { IERC4626Instance { @@ -625,24 +599,27 @@ See the [wrapper's documentation](`IERC4626Instance`) for more details.*/ } } /// Function calls. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > IERC4626Instance { - /// Creates a new call builder using this contract instance's provider and address. + impl, N: alloy_contract::private::Network> + IERC4626Instance + { + /// 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. + /// 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 [`asset`] function. pub fn asset(&self) -> alloy_contract::SolCallBuilder<&P, assetCall, N> { self.call_builder(&assetCall) } + ///Creates a new call builder for the [`convertToAssets`] function. pub fn convertToAssets( &self, @@ -652,14 +629,15 @@ See the [wrapper's documentation](`IERC4626Instance`) for more details.*/ } } /// Event filters. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > IERC4626Instance { - /// Creates a new event filter using this contract instance's provider and address. + impl, N: alloy_contract::private::Network> + IERC4626Instance + { + /// 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. + /// 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> { diff --git a/contracts/generated/contracts-generated/iswaprpair/src/lib.rs b/contracts/generated/contracts-generated/iswaprpair/src/lib.rs index f09099bcf3..80abaf0f55 100644 --- a/contracts/generated/contracts-generated/iswaprpair/src/lib.rs +++ b/contracts/generated/contracts-generated/iswaprpair/src/lib.rs @@ -1,4 +1,10 @@ -#![allow(unused_imports, unused_attributes, clippy::all, rustdoc::all, non_snake_case)] +#![allow( + unused_imports, + unused_attributes, + clippy::all, + rustdoc::all, + non_snake_case +)] //! Auto-generated contract bindings. Do not edit. /** @@ -622,13 +628,12 @@ interface ISwaprPair { clippy::empty_structs_with_brackets )] pub mod ISwaprPair { - use super::*; - use alloy_sol_types as alloy_sol_types; + use {super::*, alloy_sol_types}; #[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); -```*/ + ```solidity + event Approval(address indexed owner, address indexed spender, uint256 value); + ```*/ #[allow( non_camel_case_types, non_snake_case, @@ -651,25 +656,26 @@ event Approval(address indexed owner, address indexed spender, uint256 value); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[automatically_derived] impl alloy_sol_types::SolEvent for Approval { + type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; 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; + 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, + ]); + #[allow(unused_variables)] #[inline] fn new( @@ -682,33 +688,39 @@ event Approval(address indexed owner, address indexed spender, uint256 value); 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, - ), - ); + 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), + as alloy_sol_types::SolType>::tokenize( + &self.value, + ), ) } + #[inline] fn topics(&self) -> ::RustType { - (Self::SIGNATURE_HASH.into(), self.owner.clone(), self.spender.clone()) + ( + Self::SIGNATURE_HASH.into(), + self.owner.clone(), + self.spender.clone(), + ) } + #[inline] fn encode_topics_raw( &self, @@ -717,9 +729,7 @@ event Approval(address indexed owner, address indexed spender, uint256 value); if out.len() < ::COUNT { return Err(alloy_sol_types::Error::Overrun); } - out[0usize] = alloy_sol_types::abi::token::WordToken( - Self::SIGNATURE_HASH, - ); + out[0usize] = alloy_sol_types::abi::token::WordToken(Self::SIGNATURE_HASH); out[1usize] = ::encode_topic( &self.owner, ); @@ -734,6 +744,7 @@ event Approval(address indexed owner, address indexed spender, uint256 value); 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) } @@ -748,9 +759,9 @@ event Approval(address indexed owner, address indexed spender, uint256 value); }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Event with signature `Burn(address,uint256,uint256,address)` and selector `0xdccd412f0b1252819cb1fd330b93224ca42612892bb3f4f789976e6d81936496`. -```solidity -event Burn(address indexed sender, uint256 amount0, uint256 amount1, address indexed to); -```*/ + ```solidity + event Burn(address indexed sender, uint256 amount0, uint256 amount1, address indexed to); + ```*/ #[allow( non_camel_case_types, non_snake_case, @@ -775,28 +786,29 @@ event Burn(address indexed sender, uint256 amount0, uint256 amount1, address ind clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[automatically_derived] impl alloy_sol_types::SolEvent for Burn { + type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type DataTuple<'a> = ( alloy_sol_types::sol_data::Uint<256>, 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 = "Burn(address,uint256,uint256,address)"; - const SIGNATURE_HASH: alloy_sol_types::private::B256 = alloy_sol_types::private::B256::new([ - 220u8, 205u8, 65u8, 47u8, 11u8, 18u8, 82u8, 129u8, 156u8, 177u8, 253u8, - 51u8, 11u8, 147u8, 34u8, 76u8, 164u8, 38u8, 18u8, 137u8, 43u8, 179u8, - 244u8, 247u8, 137u8, 151u8, 110u8, 109u8, 129u8, 147u8, 100u8, 150u8, - ]); + const ANONYMOUS: bool = false; + const SIGNATURE: &'static str = "Burn(address,uint256,uint256,address)"; + const SIGNATURE_HASH: alloy_sol_types::private::B256 = + alloy_sol_types::private::B256::new([ + 220u8, 205u8, 65u8, 47u8, 11u8, 18u8, 82u8, 129u8, 156u8, 177u8, 253u8, 51u8, + 11u8, 147u8, 34u8, 76u8, 164u8, 38u8, 18u8, 137u8, 43u8, 179u8, 244u8, 247u8, + 137u8, 151u8, 110u8, 109u8, 129u8, 147u8, 100u8, 150u8, + ]); + #[allow(unused_variables)] #[inline] fn new( @@ -810,36 +822,42 @@ event Burn(address indexed sender, uint256 amount0, uint256 amount1, address ind to: topics.2, } } + #[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, - ), - ); + 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.amount0), - as alloy_sol_types::SolType>::tokenize(&self.amount1), + as alloy_sol_types::SolType>::tokenize( + &self.amount0, + ), + as alloy_sol_types::SolType>::tokenize( + &self.amount1, + ), ) } + #[inline] fn topics(&self) -> ::RustType { - (Self::SIGNATURE_HASH.into(), self.sender.clone(), self.to.clone()) + ( + Self::SIGNATURE_HASH.into(), + self.sender.clone(), + self.to.clone(), + ) } + #[inline] fn encode_topics_raw( &self, @@ -848,9 +866,7 @@ event Burn(address indexed sender, uint256 amount0, uint256 amount1, address ind if out.len() < ::COUNT { return Err(alloy_sol_types::Error::Overrun); } - out[0usize] = alloy_sol_types::abi::token::WordToken( - Self::SIGNATURE_HASH, - ); + out[0usize] = alloy_sol_types::abi::token::WordToken(Self::SIGNATURE_HASH); out[1usize] = ::encode_topic( &self.sender, ); @@ -865,6 +881,7 @@ event Burn(address indexed sender, uint256 amount0, uint256 amount1, address ind 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) } @@ -879,9 +896,9 @@ event Burn(address indexed sender, uint256 amount0, uint256 amount1, address ind }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Event with signature `Mint(address,uint256,uint256)` and selector `0x4c209b5fc8ad50758f13e2e1088ba56a560dff690a1c6fef26394f4c03821c4f`. -```solidity -event Mint(address indexed sender, uint256 amount0, uint256 amount1); -```*/ + ```solidity + event Mint(address indexed sender, uint256 amount0, uint256 amount1); + ```*/ #[allow( non_camel_case_types, non_snake_case, @@ -904,27 +921,28 @@ event Mint(address indexed sender, uint256 amount0, uint256 amount1); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[automatically_derived] impl alloy_sol_types::SolEvent for Mint { + type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type DataTuple<'a> = ( alloy_sol_types::sol_data::Uint<256>, 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, ); - const SIGNATURE: &'static str = "Mint(address,uint256,uint256)"; - const SIGNATURE_HASH: alloy_sol_types::private::B256 = alloy_sol_types::private::B256::new([ - 76u8, 32u8, 155u8, 95u8, 200u8, 173u8, 80u8, 117u8, 143u8, 19u8, 226u8, - 225u8, 8u8, 139u8, 165u8, 106u8, 86u8, 13u8, 255u8, 105u8, 10u8, 28u8, - 111u8, 239u8, 38u8, 57u8, 79u8, 76u8, 3u8, 130u8, 28u8, 79u8, - ]); + const ANONYMOUS: bool = false; + const SIGNATURE: &'static str = "Mint(address,uint256,uint256)"; + const SIGNATURE_HASH: alloy_sol_types::private::B256 = + alloy_sol_types::private::B256::new([ + 76u8, 32u8, 155u8, 95u8, 200u8, 173u8, 80u8, 117u8, 143u8, 19u8, 226u8, 225u8, + 8u8, 139u8, 165u8, 106u8, 86u8, 13u8, 255u8, 105u8, 10u8, 28u8, 111u8, 239u8, + 38u8, 57u8, 79u8, 76u8, 3u8, 130u8, 28u8, 79u8, + ]); + #[allow(unused_variables)] #[inline] fn new( @@ -937,36 +955,38 @@ event Mint(address indexed sender, uint256 amount0, uint256 amount1); amount1: 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, - ), - ); + 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.amount0), - as alloy_sol_types::SolType>::tokenize(&self.amount1), + as alloy_sol_types::SolType>::tokenize( + &self.amount0, + ), + as alloy_sol_types::SolType>::tokenize( + &self.amount1, + ), ) } + #[inline] fn topics(&self) -> ::RustType { (Self::SIGNATURE_HASH.into(), self.sender.clone()) } + #[inline] fn encode_topics_raw( &self, @@ -975,9 +995,7 @@ event Mint(address indexed sender, uint256 amount0, uint256 amount1); if out.len() < ::COUNT { return Err(alloy_sol_types::Error::Overrun); } - out[0usize] = alloy_sol_types::abi::token::WordToken( - Self::SIGNATURE_HASH, - ); + out[0usize] = alloy_sol_types::abi::token::WordToken(Self::SIGNATURE_HASH); out[1usize] = ::encode_topic( &self.sender, ); @@ -989,6 +1007,7 @@ event Mint(address indexed sender, uint256 amount0, uint256 amount1); 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) } @@ -1003,9 +1022,9 @@ event Mint(address indexed sender, uint256 amount0, uint256 amount1); }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Event with signature `Swap(address,uint256,uint256,uint256,uint256,address)` and selector `0xd78ad95fa46c994b6551d0da85fc275fe613ce37657fb8d5e3d130840159d822`. -```solidity -event Swap(address indexed sender, uint256 amount0In, uint256 amount1In, uint256 amount0Out, uint256 amount1Out, address indexed to); -```*/ + ```solidity + event Swap(address indexed sender, uint256 amount0In, uint256 amount1In, uint256 amount0Out, uint256 amount1Out, address indexed to); + ```*/ #[allow( non_camel_case_types, non_snake_case, @@ -1034,30 +1053,31 @@ event Swap(address indexed sender, uint256 amount0In, uint256 amount1In, uint256 clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[automatically_derived] impl alloy_sol_types::SolEvent for Swap { + type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type DataTuple<'a> = ( alloy_sol_types::sol_data::Uint<256>, alloy_sol_types::sol_data::Uint<256>, alloy_sol_types::sol_data::Uint<256>, 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 = "Swap(address,uint256,uint256,uint256,uint256,address)"; - const SIGNATURE_HASH: alloy_sol_types::private::B256 = alloy_sol_types::private::B256::new([ - 215u8, 138u8, 217u8, 95u8, 164u8, 108u8, 153u8, 75u8, 101u8, 81u8, 208u8, - 218u8, 133u8, 252u8, 39u8, 95u8, 230u8, 19u8, 206u8, 55u8, 101u8, 127u8, - 184u8, 213u8, 227u8, 209u8, 48u8, 132u8, 1u8, 89u8, 216u8, 34u8, - ]); + const ANONYMOUS: bool = false; + const SIGNATURE: &'static str = "Swap(address,uint256,uint256,uint256,uint256,address)"; + const SIGNATURE_HASH: alloy_sol_types::private::B256 = + alloy_sol_types::private::B256::new([ + 215u8, 138u8, 217u8, 95u8, 164u8, 108u8, 153u8, 75u8, 101u8, 81u8, 208u8, + 218u8, 133u8, 252u8, 39u8, 95u8, 230u8, 19u8, 206u8, 55u8, 101u8, 127u8, 184u8, + 213u8, 227u8, 209u8, 48u8, 132u8, 1u8, 89u8, 216u8, 34u8, + ]); + #[allow(unused_variables)] #[inline] fn new( @@ -1073,42 +1093,48 @@ event Swap(address indexed sender, uint256 amount0In, uint256 amount1In, uint256 to: topics.2, } } + #[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, - ), - ); + 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.amount0In), - as alloy_sol_types::SolType>::tokenize(&self.amount1In), - as alloy_sol_types::SolType>::tokenize(&self.amount0Out), - as alloy_sol_types::SolType>::tokenize(&self.amount1Out), + as alloy_sol_types::SolType>::tokenize( + &self.amount0In, + ), + as alloy_sol_types::SolType>::tokenize( + &self.amount1In, + ), + as alloy_sol_types::SolType>::tokenize( + &self.amount0Out, + ), + as alloy_sol_types::SolType>::tokenize( + &self.amount1Out, + ), ) } + #[inline] fn topics(&self) -> ::RustType { - (Self::SIGNATURE_HASH.into(), self.sender.clone(), self.to.clone()) + ( + Self::SIGNATURE_HASH.into(), + self.sender.clone(), + self.to.clone(), + ) } + #[inline] fn encode_topics_raw( &self, @@ -1117,9 +1143,7 @@ event Swap(address indexed sender, uint256 amount0In, uint256 amount1In, uint256 if out.len() < ::COUNT { return Err(alloy_sol_types::Error::Overrun); } - out[0usize] = alloy_sol_types::abi::token::WordToken( - Self::SIGNATURE_HASH, - ); + out[0usize] = alloy_sol_types::abi::token::WordToken(Self::SIGNATURE_HASH); out[1usize] = ::encode_topic( &self.sender, ); @@ -1134,6 +1158,7 @@ event Swap(address indexed sender, uint256 amount0In, uint256 amount1In, uint256 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) } @@ -1148,9 +1173,9 @@ event Swap(address indexed sender, uint256 amount0In, uint256 amount1In, uint256 }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Event with signature `Sync(uint112,uint112)` and selector `0x1c411e9a96e071241c2f21f7726b17ae89e3cab4c78be50e062b03a9fffbbad1`. -```solidity -event Sync(uint112 reserve0, uint112 reserve1); -```*/ + ```solidity + event Sync(uint112 reserve0, uint112 reserve1); + ```*/ #[allow( non_camel_case_types, non_snake_case, @@ -1171,24 +1196,25 @@ event Sync(uint112 reserve0, uint112 reserve1); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[automatically_derived] impl alloy_sol_types::SolEvent for Sync { + type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type DataTuple<'a> = ( alloy_sol_types::sol_data::Uint<112>, alloy_sol_types::sol_data::Uint<112>, ); - type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type TopicList = (alloy_sol_types::sol_data::FixedBytes<32>,); - const SIGNATURE: &'static str = "Sync(uint112,uint112)"; - const SIGNATURE_HASH: alloy_sol_types::private::B256 = alloy_sol_types::private::B256::new([ - 28u8, 65u8, 30u8, 154u8, 150u8, 224u8, 113u8, 36u8, 28u8, 47u8, 33u8, - 247u8, 114u8, 107u8, 23u8, 174u8, 137u8, 227u8, 202u8, 180u8, 199u8, - 139u8, 229u8, 14u8, 6u8, 43u8, 3u8, 169u8, 255u8, 251u8, 186u8, 209u8, - ]); + const ANONYMOUS: bool = false; + const SIGNATURE: &'static str = "Sync(uint112,uint112)"; + const SIGNATURE_HASH: alloy_sol_types::private::B256 = + alloy_sol_types::private::B256::new([ + 28u8, 65u8, 30u8, 154u8, 150u8, 224u8, 113u8, 36u8, 28u8, 47u8, 33u8, 247u8, + 114u8, 107u8, 23u8, 174u8, 137u8, 227u8, 202u8, 180u8, 199u8, 139u8, 229u8, + 14u8, 6u8, 43u8, 3u8, 169u8, 255u8, 251u8, 186u8, 209u8, + ]); + #[allow(unused_variables)] #[inline] fn new( @@ -1200,36 +1226,38 @@ event Sync(uint112 reserve0, uint112 reserve1); reserve1: 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, - ), - ); + 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.reserve0), - as alloy_sol_types::SolType>::tokenize(&self.reserve1), + as alloy_sol_types::SolType>::tokenize( + &self.reserve0, + ), + as alloy_sol_types::SolType>::tokenize( + &self.reserve1, + ), ) } + #[inline] fn topics(&self) -> ::RustType { (Self::SIGNATURE_HASH.into(),) } + #[inline] fn encode_topics_raw( &self, @@ -1238,9 +1266,7 @@ event Sync(uint112 reserve0, uint112 reserve1); if out.len() < ::COUNT { return Err(alloy_sol_types::Error::Overrun); } - out[0usize] = alloy_sol_types::abi::token::WordToken( - Self::SIGNATURE_HASH, - ); + out[0usize] = alloy_sol_types::abi::token::WordToken(Self::SIGNATURE_HASH); Ok(()) } } @@ -1249,6 +1275,7 @@ event Sync(uint112 reserve0, uint112 reserve1); 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) } @@ -1263,9 +1290,9 @@ event Sync(uint112 reserve0, uint112 reserve1); }; #[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); -```*/ + ```solidity + event Transfer(address indexed from, address indexed to, uint256 value); + ```*/ #[allow( non_camel_case_types, non_snake_case, @@ -1288,25 +1315,26 @@ event Transfer(address indexed from, address indexed to, uint256 value); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[automatically_derived] impl alloy_sol_types::SolEvent for Transfer { + type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; 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; + 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, + ]); + #[allow(unused_variables)] #[inline] fn new( @@ -1319,33 +1347,39 @@ event Transfer(address indexed from, address indexed to, uint256 value); 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, - ), - ); + 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), + as alloy_sol_types::SolType>::tokenize( + &self.value, + ), ) } + #[inline] fn topics(&self) -> ::RustType { - (Self::SIGNATURE_HASH.into(), self.from.clone(), self.to.clone()) + ( + Self::SIGNATURE_HASH.into(), + self.from.clone(), + self.to.clone(), + ) } + #[inline] fn encode_topics_raw( &self, @@ -1354,9 +1388,7 @@ event Transfer(address indexed from, address indexed to, uint256 value); if out.len() < ::COUNT { return Err(alloy_sol_types::Error::Overrun); } - out[0usize] = alloy_sol_types::abi::token::WordToken( - Self::SIGNATURE_HASH, - ); + out[0usize] = alloy_sol_types::abi::token::WordToken(Self::SIGNATURE_HASH); out[1usize] = ::encode_topic( &self.from, ); @@ -1371,6 +1403,7 @@ event Transfer(address indexed from, address indexed to, uint256 value); 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) } @@ -1385,14 +1418,15 @@ event Transfer(address indexed from, address indexed to, uint256 value); }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `DOMAIN_SEPARATOR()` and selector `0x3644e515`. -```solidity -function DOMAIN_SEPARATOR() external view returns (bytes32); -```*/ + ```solidity + function DOMAIN_SEPARATOR() external view returns (bytes32); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct DOMAIN_SEPARATORCall; #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`DOMAIN_SEPARATOR()`](DOMAIN_SEPARATORCall) function. + ///Container type for the return parameters of the + /// [`DOMAIN_SEPARATOR()`](DOMAIN_SEPARATORCall) function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct DOMAIN_SEPARATORReturn { @@ -1406,7 +1440,7 @@ function DOMAIN_SEPARATOR() external view returns (bytes32); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -1415,9 +1449,7 @@ function DOMAIN_SEPARATOR() external view returns (bytes32); type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1426,16 +1458,14 @@ function DOMAIN_SEPARATOR() external view returns (bytes32); } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From - for UnderlyingRustTuple<'_> { + impl ::core::convert::From for UnderlyingRustTuple<'_> { fn from(value: DOMAIN_SEPARATORCall) -> Self { () } } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From> - for DOMAIN_SEPARATORCall { + impl ::core::convert::From> for DOMAIN_SEPARATORCall { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { Self } @@ -1449,9 +1479,7 @@ function DOMAIN_SEPARATOR() external view returns (bytes32); 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, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1460,16 +1488,14 @@ function DOMAIN_SEPARATOR() external view returns (bytes32); } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From - for UnderlyingRustTuple<'_> { + impl ::core::convert::From for UnderlyingRustTuple<'_> { fn from(value: DOMAIN_SEPARATORReturn) -> Self { (value._0,) } } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From> - for DOMAIN_SEPARATORReturn { + impl ::core::convert::From> for DOMAIN_SEPARATORReturn { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { Self { _0: tuple.0 } } @@ -1478,26 +1504,26 @@ function DOMAIN_SEPARATOR() external view returns (bytes32); #[automatically_derived] impl alloy_sol_types::SolCall for DOMAIN_SEPARATORCall { type Parameters<'a> = (); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = alloy_sol_types::private::FixedBytes<32>; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (alloy_sol_types::sol_data::FixedBytes<32>,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "DOMAIN_SEPARATOR()"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [54u8, 68u8, 229u8, 21u8]; + const SIGNATURE: &'static str = "DOMAIN_SEPARATOR()"; + #[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<'_> { ( @@ -1506,35 +1532,34 @@ function DOMAIN_SEPARATOR() external view returns (bytes32); > 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| { + as alloy_sol_types::SolType>::abi_decode_sequence(data).map( + |r| { let r: DOMAIN_SEPARATORReturn = 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: DOMAIN_SEPARATORReturn = r.into(); - r._0 - }) + 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: DOMAIN_SEPARATORReturn = r.into(); + r._0 + }) } } }; #[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); -```*/ + ```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 { @@ -1544,7 +1569,8 @@ function allowance(address owner, address spender) external view returns (uint25 pub spender: alloy_sol_types::private::Address, } #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`allowance(address,address)`](allowanceCall) function. + ///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 { @@ -1558,7 +1584,7 @@ function allowance(address owner, address spender) external view returns (uint25 clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -1573,9 +1599,7 @@ function allowance(address owner, address spender) external view returns (uint25 ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1605,14 +1629,10 @@ function allowance(address owner, address spender) external view returns (uint25 #[allow(dead_code)] type UnderlyingSolTuple<'a> = (alloy_sol_types::sol_data::Uint<256>,); #[doc(hidden)] - type UnderlyingRustTuple<'a> = ( - alloy_sol_types::private::primitives::aliases::U256, - ); + 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, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1640,22 +1660,21 @@ function allowance(address owner, address spender) external view returns (uint25 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 ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; 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)"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [221u8, 98u8, 237u8, 62u8]; + const SIGNATURE: &'static str = "allowance(address,address)"; + #[inline] fn new<'a>( tuple: as alloy_sol_types::SolType>::RustType, ) -> Self { tuple.into() } + #[inline] fn tokenize(&self) -> Self::Token<'_> { ( @@ -1667,43 +1686,43 @@ function allowance(address owner, address spender) external view returns (uint25 ), ) } + #[inline] fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { ( - as alloy_sol_types::SolType>::tokenize(ret), + 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| { + 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 - }) + 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(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `approve(address,uint256)` and selector `0x095ea7b3`. -```solidity -function approve(address spender, uint256 value) external returns (bool); -```*/ + ```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 { @@ -1713,7 +1732,8 @@ function approve(address spender, uint256 value) external returns (bool); pub value: alloy_sol_types::private::primitives::aliases::U256, } #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`approve(address,uint256)`](approveCall) function. + ///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 { @@ -1727,7 +1747,7 @@ function approve(address spender, uint256 value) external returns (bool); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -1742,9 +1762,7 @@ function approve(address spender, uint256 value) external returns (bool); ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1777,9 +1795,7 @@ function approve(address spender, uint256 value) external returns (bool); type UnderlyingRustTuple<'a> = (bool,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1807,70 +1823,65 @@ function approve(address spender, uint256 value) external returns (bool); 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 ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; 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)"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [9u8, 94u8, 167u8, 179u8]; + const SIGNATURE: &'static str = "approve(address,uint256)"; + #[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), + as alloy_sol_types::SolType>::tokenize( + &self.value, + ), ) } + #[inline] fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { - ( - ::tokenize( - ret, - ), - ) + (::tokenize(ret),) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) - .map(|r| { + 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 - }) + 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(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `balanceOf(address)` and selector `0x70a08231`. -```solidity -function balanceOf(address owner) external view returns (uint256); -```*/ + ```solidity + function balanceOf(address owner) external view returns (uint256); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct balanceOfCall { @@ -1878,7 +1889,8 @@ function balanceOf(address owner) external view returns (uint256); pub owner: alloy_sol_types::private::Address, } #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`balanceOf(address)`](balanceOfCall) function. + ///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 { @@ -1892,7 +1904,7 @@ function balanceOf(address owner) external view returns (uint256); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -1901,9 +1913,7 @@ function balanceOf(address owner) external view returns (uint256); type UnderlyingRustTuple<'a> = (alloy_sol_types::private::Address,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1930,14 +1940,10 @@ function balanceOf(address owner) external view returns (uint256); #[allow(dead_code)] type UnderlyingSolTuple<'a> = (alloy_sol_types::sol_data::Uint<256>,); #[doc(hidden)] - type UnderlyingRustTuple<'a> = ( - alloy_sol_types::private::primitives::aliases::U256, - ); + 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, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1962,22 +1968,21 @@ function balanceOf(address owner) external view returns (uint256); #[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 ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; 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)"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [112u8, 160u8, 130u8, 49u8]; + const SIGNATURE: &'static str = "balanceOf(address)"; + #[inline] fn new<'a>( tuple: as alloy_sol_types::SolType>::RustType, ) -> Self { tuple.into() } + #[inline] fn tokenize(&self) -> Self::Token<'_> { ( @@ -1986,43 +1991,43 @@ function balanceOf(address owner) external view returns (uint256); ), ) } + #[inline] fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { ( - as alloy_sol_types::SolType>::tokenize(ret), + 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| { + 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 - }) + 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(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `burn(address)` and selector `0x89afcb44`. -```solidity -function burn(address to) external returns (uint256 amount0, uint256 amount1); -```*/ + ```solidity + function burn(address to) external returns (uint256 amount0, uint256 amount1); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct burnCall { @@ -2030,7 +2035,8 @@ function burn(address to) external returns (uint256 amount0, uint256 amount1); pub to: alloy_sol_types::private::Address, } #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`burn(address)`](burnCall) function. + ///Container type for the return parameters of the + /// [`burn(address)`](burnCall) function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct burnReturn { @@ -2046,7 +2052,7 @@ function burn(address to) external returns (uint256 amount0, uint256 amount1); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -2055,9 +2061,7 @@ function burn(address to) external returns (uint256 amount0, uint256 amount1); type UnderlyingRustTuple<'a> = (alloy_sol_types::private::Address,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -2093,9 +2097,7 @@ function burn(address to) external returns (uint256 amount0, uint256 amount1); ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -2121,41 +2123,38 @@ function burn(address to) external returns (uint256 amount0, uint256 amount1); } } impl burnReturn { - fn _tokenize( - &self, - ) -> ::ReturnToken<'_> { + fn _tokenize(&self) -> ::ReturnToken<'_> { ( - as alloy_sol_types::SolType>::tokenize(&self.amount0), - as alloy_sol_types::SolType>::tokenize(&self.amount1), + as alloy_sol_types::SolType>::tokenize( + &self.amount0, + ), + as alloy_sol_types::SolType>::tokenize( + &self.amount1, + ), ) } } #[automatically_derived] impl alloy_sol_types::SolCall for burnCall { type Parameters<'a> = (alloy_sol_types::sol_data::Address,); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = burnReturn; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = ( alloy_sol_types::sol_data::Uint<256>, alloy_sol_types::sol_data::Uint<256>, ); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "burn(address)"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [137u8, 175u8, 203u8, 68u8]; + const SIGNATURE: &'static str = "burn(address)"; + #[inline] fn new<'a>( tuple: as alloy_sol_types::SolType>::RustType, ) -> Self { tuple.into() } + #[inline] fn tokenize(&self) -> Self::Token<'_> { ( @@ -2164,38 +2163,38 @@ function burn(address to) external returns (uint256 amount0, uint256 amount1); ), ) } + #[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) + 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) + 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(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `decimals()` and selector `0x313ce567`. -```solidity -function decimals() external pure returns (uint8); -```*/ + ```solidity + function decimals() external pure returns (uint8); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct decimalsCall; #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`decimals()`](decimalsCall) function. + ///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 { @@ -2209,7 +2208,7 @@ function decimals() external pure returns (uint8); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -2218,9 +2217,7 @@ function decimals() external pure returns (uint8); type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -2250,9 +2247,7 @@ function decimals() external pure returns (uint8); type UnderlyingRustTuple<'a> = (u8,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -2277,68 +2272,64 @@ function decimals() external pure returns (uint8); #[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 ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; 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()"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [49u8, 60u8, 229u8, 103u8]; + const SIGNATURE: &'static str = "decimals()"; + #[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), - ) + ( 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| { + 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 - }) + 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(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `factory()` and selector `0xc45a0155`. -```solidity -function factory() external view returns (address); -```*/ + ```solidity + function factory() external view returns (address); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct factoryCall; #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`factory()`](factoryCall) function. + ///Container type for the return parameters of the + /// [`factory()`](factoryCall) function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct factoryReturn { @@ -2352,7 +2343,7 @@ function factory() external view returns (address); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -2361,9 +2352,7 @@ function factory() external view returns (address); type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -2393,9 +2382,7 @@ function factory() external view returns (address); type UnderlyingRustTuple<'a> = (alloy_sol_types::private::Address,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -2420,68 +2407,64 @@ function factory() external view returns (address); #[automatically_derived] impl alloy_sol_types::SolCall for factoryCall { type Parameters<'a> = (); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = alloy_sol_types::private::Address; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (alloy_sol_types::sol_data::Address,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "factory()"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [196u8, 90u8, 1u8, 85u8]; + const SIGNATURE: &'static str = "factory()"; + #[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, - ), - ) + (::tokenize(ret),) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) - .map(|r| { + as alloy_sol_types::SolType>::abi_decode_sequence(data).map( + |r| { let r: factoryReturn = 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: factoryReturn = r.into(); - r._0 - }) + 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: factoryReturn = r.into(); + r._0 + }) } } }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `getReserves()` and selector `0x0902f1ac`. -```solidity -function getReserves() external view returns (uint112 reserve0, uint112 reserve1, uint32 blockTimestampLast); -```*/ + ```solidity + function getReserves() external view returns (uint112 reserve0, uint112 reserve1, uint32 blockTimestampLast); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct getReservesCall; #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`getReserves()`](getReservesCall) function. + ///Container type for the return parameters of the + /// [`getReserves()`](getReservesCall) function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct getReservesReturn { @@ -2499,7 +2482,7 @@ function getReserves() external view returns (uint112 reserve0, uint112 reserve1 clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -2508,9 +2491,7 @@ function getReserves() external view returns (uint112 reserve0, uint112 reserve1 type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -2548,9 +2529,7 @@ function getReserves() external view returns (uint112 reserve0, uint112 reserve1 ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -2577,76 +2556,72 @@ function getReserves() external view returns (uint112 reserve0, uint112 reserve1 } } impl getReservesReturn { - fn _tokenize( - &self, - ) -> ::ReturnToken<'_> { + fn _tokenize(&self) -> ::ReturnToken<'_> { ( - as alloy_sol_types::SolType>::tokenize(&self.reserve0), - as alloy_sol_types::SolType>::tokenize(&self.reserve1), - as alloy_sol_types::SolType>::tokenize(&self.blockTimestampLast), + as alloy_sol_types::SolType>::tokenize( + &self.reserve0, + ), + as alloy_sol_types::SolType>::tokenize( + &self.reserve1, + ), + as alloy_sol_types::SolType>::tokenize( + &self.blockTimestampLast, + ), ) } } #[automatically_derived] impl alloy_sol_types::SolCall for getReservesCall { type Parameters<'a> = (); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = getReservesReturn; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = ( alloy_sol_types::sol_data::Uint<112>, alloy_sol_types::sol_data::Uint<112>, alloy_sol_types::sol_data::Uint<32>, ); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "getReserves()"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [9u8, 2u8, 241u8, 172u8]; + const SIGNATURE: &'static str = "getReserves()"; + #[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<'_> { getReservesReturn::_tokenize(ret) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) + 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) + 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(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `initialize(address,address)` and selector `0x485cc955`. -```solidity -function initialize(address, address) external; -```*/ + ```solidity + function initialize(address, address) external; + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct initializeCall { @@ -2655,7 +2630,8 @@ function initialize(address, address) external; #[allow(missing_docs)] pub _1: alloy_sol_types::private::Address, } - ///Container type for the return parameters of the [`initialize(address,address)`](initializeCall) function. + ///Container type for the return parameters of the + /// [`initialize(address,address)`](initializeCall) function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct initializeReturn {} @@ -2666,7 +2642,7 @@ function initialize(address, address) external; clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -2681,9 +2657,7 @@ function initialize(address, address) external; ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -2701,7 +2675,10 @@ function initialize(address, address) external; #[doc(hidden)] impl ::core::convert::From> for initializeCall { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { - Self { _0: tuple.0, _1: tuple.1 } + Self { + _0: tuple.0, + _1: tuple.1, + } } } } @@ -2713,9 +2690,7 @@ function initialize(address, address) external; type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -2738,9 +2713,7 @@ function initialize(address, address) external; } } impl initializeReturn { - fn _tokenize( - &self, - ) -> ::ReturnToken<'_> { + fn _tokenize(&self) -> ::ReturnToken<'_> { () } } @@ -2750,22 +2723,21 @@ function initialize(address, address) external; alloy_sol_types::sol_data::Address, alloy_sol_types::sol_data::Address, ); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = initializeReturn; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "initialize(address,address)"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [72u8, 92u8, 201u8, 85u8]; + const SIGNATURE: &'static str = "initialize(address,address)"; + #[inline] fn new<'a>( tuple: as alloy_sol_types::SolType>::RustType, ) -> Self { tuple.into() } + #[inline] fn tokenize(&self) -> Self::Token<'_> { ( @@ -2777,33 +2749,32 @@ function initialize(address, address) external; ), ) } + #[inline] fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { initializeReturn::_tokenize(ret) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) + 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) + 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(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `mint(address)` and selector `0x6a627842`. -```solidity -function mint(address to) external returns (uint256 liquidity); -```*/ + ```solidity + function mint(address to) external returns (uint256 liquidity); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct mintCall { @@ -2811,7 +2782,8 @@ function mint(address to) external returns (uint256 liquidity); pub to: alloy_sol_types::private::Address, } #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`mint(address)`](mintCall) function. + ///Container type for the return parameters of the + /// [`mint(address)`](mintCall) function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct mintReturn { @@ -2825,7 +2797,7 @@ function mint(address to) external returns (uint256 liquidity); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -2834,9 +2806,7 @@ function mint(address to) external returns (uint256 liquidity); type UnderlyingRustTuple<'a> = (alloy_sol_types::private::Address,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -2863,14 +2833,10 @@ function mint(address to) external returns (uint256 liquidity); #[allow(dead_code)] type UnderlyingSolTuple<'a> = (alloy_sol_types::sol_data::Uint<256>,); #[doc(hidden)] - type UnderlyingRustTuple<'a> = ( - alloy_sol_types::private::primitives::aliases::U256, - ); + 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, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -2895,22 +2861,21 @@ function mint(address to) external returns (uint256 liquidity); #[automatically_derived] impl alloy_sol_types::SolCall for mintCall { 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 ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (alloy_sol_types::sol_data::Uint<256>,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "mint(address)"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [106u8, 98u8, 120u8, 66u8]; + const SIGNATURE: &'static str = "mint(address)"; + #[inline] fn new<'a>( tuple: as alloy_sol_types::SolType>::RustType, ) -> Self { tuple.into() } + #[inline] fn tokenize(&self) -> Self::Token<'_> { ( @@ -2919,48 +2884,49 @@ function mint(address to) external returns (uint256 liquidity); ), ) } + #[inline] fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { ( - as alloy_sol_types::SolType>::tokenize(ret), + 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| { + as alloy_sol_types::SolType>::abi_decode_sequence(data).map( + |r| { let r: mintReturn = r.into(); r.liquidity - }) + }, + ) } + #[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: mintReturn = r.into(); - r.liquidity - }) + 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: mintReturn = r.into(); + r.liquidity + }) } } }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `name()` and selector `0x06fdde03`. -```solidity -function name() external pure returns (string memory); -```*/ + ```solidity + function name() external pure returns (string memory); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct nameCall; #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`name()`](nameCall) function. + ///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 { @@ -2974,7 +2940,7 @@ function name() external pure returns (string memory); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -2983,9 +2949,7 @@ function name() external pure returns (string memory); type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -3015,9 +2979,7 @@ function name() external pure returns (string memory); type UnderlyingRustTuple<'a> = (alloy_sol_types::private::String,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -3042,63 +3004,58 @@ function name() external pure returns (string memory); #[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 ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (alloy_sol_types::sol_data::String,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "name()"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [6u8, 253u8, 222u8, 3u8]; + const SIGNATURE: &'static str = "name()"; + #[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, - ), - ) + (::tokenize(ret),) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) - .map(|r| { + 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 - }) + 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(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `nonces(address)` and selector `0x7ecebe00`. -```solidity -function nonces(address owner) external view returns (uint256); -```*/ + ```solidity + function nonces(address owner) external view returns (uint256); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct noncesCall { @@ -3106,7 +3063,8 @@ function nonces(address owner) external view returns (uint256); pub owner: alloy_sol_types::private::Address, } #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`nonces(address)`](noncesCall) function. + ///Container type for the return parameters of the + /// [`nonces(address)`](noncesCall) function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct noncesReturn { @@ -3120,7 +3078,7 @@ function nonces(address owner) external view returns (uint256); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -3129,9 +3087,7 @@ function nonces(address owner) external view returns (uint256); type UnderlyingRustTuple<'a> = (alloy_sol_types::private::Address,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -3158,14 +3114,10 @@ function nonces(address owner) external view returns (uint256); #[allow(dead_code)] type UnderlyingSolTuple<'a> = (alloy_sol_types::sol_data::Uint<256>,); #[doc(hidden)] - type UnderlyingRustTuple<'a> = ( - alloy_sol_types::private::primitives::aliases::U256, - ); + 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, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -3190,22 +3142,21 @@ function nonces(address owner) external view returns (uint256); #[automatically_derived] impl alloy_sol_types::SolCall for noncesCall { 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 ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (alloy_sol_types::sol_data::Uint<256>,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "nonces(address)"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [126u8, 206u8, 190u8, 0u8]; + const SIGNATURE: &'static str = "nonces(address)"; + #[inline] fn new<'a>( tuple: as alloy_sol_types::SolType>::RustType, ) -> Self { tuple.into() } + #[inline] fn tokenize(&self) -> Self::Token<'_> { ( @@ -3214,43 +3165,43 @@ function nonces(address owner) external view returns (uint256); ), ) } + #[inline] fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { ( - as alloy_sol_types::SolType>::tokenize(ret), + 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| { + as alloy_sol_types::SolType>::abi_decode_sequence(data).map( + |r| { let r: noncesReturn = 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: noncesReturn = r.into(); - r._0 - }) + 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: noncesReturn = r.into(); + r._0 + }) } } }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `permit(address,address,uint256,uint256,uint8,bytes32,bytes32)` and selector `0xd505accf`. -```solidity -function permit(address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) external; -```*/ + ```solidity + function permit(address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) external; + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct permitCall { @@ -3269,7 +3220,9 @@ function permit(address owner, address spender, uint256 value, uint256 deadline, #[allow(missing_docs)] pub s: alloy_sol_types::private::FixedBytes<32>, } - ///Container type for the return parameters of the [`permit(address,address,uint256,uint256,uint8,bytes32,bytes32)`](permitCall) function. + ///Container type for the return parameters of the + /// [`permit(address,address,uint256,uint256,uint8,bytes32, + /// bytes32)`](permitCall) function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct permitReturn {} @@ -3280,7 +3233,7 @@ function permit(address owner, address spender, uint256 value, uint256 deadline, clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -3305,9 +3258,7 @@ function permit(address owner, address spender, uint256 value, uint256 deadline, ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -3353,9 +3304,7 @@ function permit(address owner, address spender, uint256 value, uint256 deadline, type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -3378,9 +3327,7 @@ function permit(address owner, address spender, uint256 value, uint256 deadline, } } impl permitReturn { - fn _tokenize( - &self, - ) -> ::ReturnToken<'_> { + fn _tokenize(&self) -> ::ReturnToken<'_> { () } } @@ -3395,22 +3342,22 @@ function permit(address owner, address spender, uint256 value, uint256 deadline, alloy_sol_types::sol_data::FixedBytes<32>, alloy_sol_types::sol_data::FixedBytes<32>, ); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = permitReturn; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "permit(address,address,uint256,uint256,uint8,bytes32,bytes32)"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [213u8, 5u8, 172u8, 207u8]; + const SIGNATURE: &'static str = + "permit(address,address,uint256,uint256,uint8,bytes32,bytes32)"; + #[inline] fn new<'a>( tuple: as alloy_sol_types::SolType>::RustType, ) -> Self { tuple.into() } + #[inline] fn tokenize(&self) -> Self::Token<'_> { ( @@ -3437,33 +3384,32 @@ function permit(address owner, address spender, uint256 value, uint256 deadline, > as alloy_sol_types::SolType>::tokenize(&self.s), ) } + #[inline] fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { permitReturn::_tokenize(ret) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) + 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) + 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(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `swap(uint256,uint256,address,bytes)` and selector `0x022c0d9f`. -```solidity -function swap(uint256 amount0Out, uint256 amount1Out, address to, bytes memory data) external; -```*/ + ```solidity + function swap(uint256 amount0Out, uint256 amount1Out, address to, bytes memory data) external; + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct swapCall { @@ -3476,7 +3422,8 @@ function swap(uint256 amount0Out, uint256 amount1Out, address to, bytes memory d #[allow(missing_docs)] pub data: alloy_sol_types::private::Bytes, } - ///Container type for the return parameters of the [`swap(uint256,uint256,address,bytes)`](swapCall) function. + ///Container type for the return parameters of the + /// [`swap(uint256,uint256,address,bytes)`](swapCall) function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct swapReturn {} @@ -3487,7 +3434,7 @@ function swap(uint256 amount0Out, uint256 amount1Out, address to, bytes memory d clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -3506,9 +3453,7 @@ function swap(uint256 amount0Out, uint256 amount1Out, address to, bytes memory d ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -3543,9 +3488,7 @@ function swap(uint256 amount0Out, uint256 amount1Out, address to, bytes memory d type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -3568,9 +3511,7 @@ function swap(uint256 amount0Out, uint256 amount1Out, address to, bytes memory d } } impl swapReturn { - fn _tokenize( - &self, - ) -> ::ReturnToken<'_> { + fn _tokenize(&self) -> ::ReturnToken<'_> { () } } @@ -3582,31 +3523,30 @@ function swap(uint256 amount0Out, uint256 amount1Out, address to, bytes memory d alloy_sol_types::sol_data::Address, alloy_sol_types::sol_data::Bytes, ); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = swapReturn; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "swap(uint256,uint256,address,bytes)"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [2u8, 44u8, 13u8, 159u8]; + const SIGNATURE: &'static str = "swap(uint256,uint256,address,bytes)"; + #[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.amount0Out), - as alloy_sol_types::SolType>::tokenize(&self.amount1Out), + as alloy_sol_types::SolType>::tokenize( + &self.amount0Out, + ), + as alloy_sol_types::SolType>::tokenize( + &self.amount1Out, + ), ::tokenize( &self.to, ), @@ -3615,38 +3555,38 @@ function swap(uint256 amount0Out, uint256 amount1Out, address to, bytes memory d ), ) } + #[inline] fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { swapReturn::_tokenize(ret) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) + 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) + 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(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `swapFee()` and selector `0x54cf2aeb`. -```solidity -function swapFee() external view returns (uint32); -```*/ + ```solidity + function swapFee() external view returns (uint32); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct swapFeeCall; #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`swapFee()`](swapFeeCall) function. + ///Container type for the return parameters of the + /// [`swapFee()`](swapFeeCall) function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct swapFeeReturn { @@ -3660,7 +3600,7 @@ function swapFee() external view returns (uint32); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -3669,9 +3609,7 @@ function swapFee() external view returns (uint32); type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -3701,9 +3639,7 @@ function swapFee() external view returns (uint32); type UnderlyingRustTuple<'a> = (u32,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -3728,68 +3664,68 @@ function swapFee() external view returns (uint32); #[automatically_derived] impl alloy_sol_types::SolCall for swapFeeCall { type Parameters<'a> = (); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = u32; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (alloy_sol_types::sol_data::Uint<32>,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "swapFee()"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [84u8, 207u8, 42u8, 235u8]; + const SIGNATURE: &'static str = "swapFee()"; + #[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), + 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| { + as alloy_sol_types::SolType>::abi_decode_sequence(data).map( + |r| { let r: swapFeeReturn = 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: swapFeeReturn = r.into(); - r._0 - }) + 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: swapFeeReturn = r.into(); + r._0 + }) } } }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `symbol()` and selector `0x95d89b41`. -```solidity -function symbol() external pure returns (string memory); -```*/ + ```solidity + function symbol() external pure returns (string memory); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct symbolCall; #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`symbol()`](symbolCall) function. + ///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 { @@ -3803,7 +3739,7 @@ function symbol() external pure returns (string memory); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -3812,9 +3748,7 @@ function symbol() external pure returns (string memory); type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -3844,9 +3778,7 @@ function symbol() external pure returns (string memory); type UnderlyingRustTuple<'a> = (alloy_sol_types::private::String,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -3871,67 +3803,63 @@ function symbol() external pure returns (string memory); #[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 ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (alloy_sol_types::sol_data::String,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "symbol()"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [149u8, 216u8, 155u8, 65u8]; + const SIGNATURE: &'static str = "symbol()"; + #[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, - ), - ) + (::tokenize(ret),) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) - .map(|r| { + 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 - }) + 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(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `sync()` and selector `0xfff6cae9`. -```solidity -function sync() external; -```*/ + ```solidity + function sync() external; + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct syncCall; - ///Container type for the return parameters of the [`sync()`](syncCall) function. + ///Container type for the return parameters of the [`sync()`](syncCall) + /// function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct syncReturn {} @@ -3942,7 +3870,7 @@ function sync() external; clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -3951,9 +3879,7 @@ function sync() external; type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -3983,9 +3909,7 @@ function sync() external; type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -4008,67 +3932,64 @@ function sync() external; } } impl syncReturn { - fn _tokenize( - &self, - ) -> ::ReturnToken<'_> { + fn _tokenize(&self) -> ::ReturnToken<'_> { () } } #[automatically_derived] impl alloy_sol_types::SolCall for syncCall { type Parameters<'a> = (); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = syncReturn; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "sync()"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [255u8, 246u8, 202u8, 233u8]; + const SIGNATURE: &'static str = "sync()"; + #[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<'_> { syncReturn::_tokenize(ret) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) + 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) + 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(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `token0()` and selector `0x0dfe1681`. -```solidity -function token0() external view returns (address); -```*/ + ```solidity + function token0() external view returns (address); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct token0Call; #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`token0()`](token0Call) function. + ///Container type for the return parameters of the [`token0()`](token0Call) + /// function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct token0Return { @@ -4082,7 +4003,7 @@ function token0() external view returns (address); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -4091,9 +4012,7 @@ function token0() external view returns (address); type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -4123,9 +4042,7 @@ function token0() external view returns (address); type UnderlyingRustTuple<'a> = (alloy_sol_types::private::Address,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -4150,68 +4067,64 @@ function token0() external view returns (address); #[automatically_derived] impl alloy_sol_types::SolCall for token0Call { type Parameters<'a> = (); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = alloy_sol_types::private::Address; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (alloy_sol_types::sol_data::Address,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "token0()"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [13u8, 254u8, 22u8, 129u8]; + const SIGNATURE: &'static str = "token0()"; + #[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, - ), - ) + (::tokenize(ret),) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) - .map(|r| { + as alloy_sol_types::SolType>::abi_decode_sequence(data).map( + |r| { let r: token0Return = 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: token0Return = r.into(); - r._0 - }) + 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: token0Return = r.into(); + r._0 + }) } } }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `token1()` and selector `0xd21220a7`. -```solidity -function token1() external view returns (address); -```*/ + ```solidity + function token1() external view returns (address); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct token1Call; #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`token1()`](token1Call) function. + ///Container type for the return parameters of the [`token1()`](token1Call) + /// function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct token1Return { @@ -4225,7 +4138,7 @@ function token1() external view returns (address); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -4234,9 +4147,7 @@ function token1() external view returns (address); type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -4266,9 +4177,7 @@ function token1() external view returns (address); type UnderlyingRustTuple<'a> = (alloy_sol_types::private::Address,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -4293,63 +4202,58 @@ function token1() external view returns (address); #[automatically_derived] impl alloy_sol_types::SolCall for token1Call { type Parameters<'a> = (); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = alloy_sol_types::private::Address; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (alloy_sol_types::sol_data::Address,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "token1()"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [210u8, 18u8, 32u8, 167u8]; + const SIGNATURE: &'static str = "token1()"; + #[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, - ), - ) + (::tokenize(ret),) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) - .map(|r| { + as alloy_sol_types::SolType>::abi_decode_sequence(data).map( + |r| { let r: token1Return = 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: token1Return = r.into(); - r._0 - }) + 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: token1Return = r.into(); + r._0 + }) } } }; #[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); -```*/ + ```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 { @@ -4359,7 +4263,8 @@ function transfer(address to, uint256 value) external returns (bool); pub value: alloy_sol_types::private::primitives::aliases::U256, } #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`transfer(address,uint256)`](transferCall) function. + ///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 { @@ -4373,7 +4278,7 @@ function transfer(address to, uint256 value) external returns (bool); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -4388,9 +4293,7 @@ function transfer(address to, uint256 value) external returns (bool); ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -4423,9 +4326,7 @@ function transfer(address to, uint256 value) external returns (bool); type UnderlyingRustTuple<'a> = (bool,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -4453,70 +4354,65 @@ function transfer(address to, uint256 value) external returns (bool); 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 ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; 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)"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [169u8, 5u8, 156u8, 187u8]; + const SIGNATURE: &'static str = "transfer(address,uint256)"; + #[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), + as alloy_sol_types::SolType>::tokenize( + &self.value, + ), ) } + #[inline] fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { - ( - ::tokenize( - ret, - ), - ) + (::tokenize(ret),) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) - .map(|r| { + 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 - }) + 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(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); -```*/ + ```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 { @@ -4528,7 +4424,8 @@ function transferFrom(address from, address to, uint256 value) external returns pub value: alloy_sol_types::private::primitives::aliases::U256, } #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`transferFrom(address,address,uint256)`](transferFromCall) function. + ///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 { @@ -4542,7 +4439,7 @@ function transferFrom(address from, address to, uint256 value) external returns clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -4559,9 +4456,7 @@ function transferFrom(address from, address to, uint256 value) external returns ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -4595,9 +4490,7 @@ function transferFrom(address from, address to, uint256 value) external returns type UnderlyingRustTuple<'a> = (bool,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -4626,22 +4519,21 @@ function transferFrom(address from, address to, uint256 value) external returns 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 ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; 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)"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [35u8, 184u8, 114u8, 221u8]; + const SIGNATURE: &'static str = "transferFrom(address,address,uint256)"; + #[inline] fn new<'a>( tuple: as alloy_sol_types::SolType>::RustType, ) -> Self { tuple.into() } + #[inline] fn tokenize(&self) -> Self::Token<'_> { ( @@ -4651,46 +4543,41 @@ function transferFrom(address from, address to, uint256 value) external returns ::tokenize( &self.to, ), - as alloy_sol_types::SolType>::tokenize(&self.value), + as alloy_sol_types::SolType>::tokenize( + &self.value, + ), ) } + #[inline] fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { - ( - ::tokenize( - ret, - ), - ) + (::tokenize(ret),) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) - .map(|r| { + 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 - }) + 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 + }) } } }; ///Container for all the [`ISwaprPair`](self) function calls. #[derive(Clone)] - #[derive()] pub enum ISwaprPairCalls { #[allow(missing_docs)] DOMAIN_SEPARATOR(DOMAIN_SEPARATORCall), @@ -4738,8 +4625,9 @@ function transferFrom(address from, address to, uint256 value) external returns impl ISwaprPairCalls { /// 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. + /// 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]] = &[ @@ -4765,30 +4653,6 @@ function transferFrom(address from, address to, uint256 value) external returns [221u8, 98u8, 237u8, 62u8], [255u8, 246u8, 202u8, 233u8], ]; - /// The names of the variants in the same order as `SELECTORS`. - pub const VARIANT_NAMES: &'static [&'static str] = &[ - ::core::stringify!(swap), - ::core::stringify!(name), - ::core::stringify!(getReserves), - ::core::stringify!(approve), - ::core::stringify!(token0), - ::core::stringify!(transferFrom), - ::core::stringify!(decimals), - ::core::stringify!(DOMAIN_SEPARATOR), - ::core::stringify!(initialize), - ::core::stringify!(swapFee), - ::core::stringify!(mint), - ::core::stringify!(balanceOf), - ::core::stringify!(nonces), - ::core::stringify!(burn), - ::core::stringify!(symbol), - ::core::stringify!(transfer), - ::core::stringify!(factory), - ::core::stringify!(token1), - ::core::stringify!(permit), - ::core::stringify!(allowance), - ::core::stringify!(sync), - ]; /// The signatures in the same order as `SELECTORS`. pub const SIGNATURES: &'static [&'static str] = &[ ::SIGNATURE, @@ -4813,6 +4677,31 @@ function transferFrom(address from, address to, uint256 value) external returns ::SIGNATURE, ::SIGNATURE, ]; + /// The names of the variants in the same order as `SELECTORS`. + pub const VARIANT_NAMES: &'static [&'static str] = &[ + ::core::stringify!(swap), + ::core::stringify!(name), + ::core::stringify!(getReserves), + ::core::stringify!(approve), + ::core::stringify!(token0), + ::core::stringify!(transferFrom), + ::core::stringify!(decimals), + ::core::stringify!(DOMAIN_SEPARATOR), + ::core::stringify!(initialize), + ::core::stringify!(swapFee), + ::core::stringify!(mint), + ::core::stringify!(balanceOf), + ::core::stringify!(nonces), + ::core::stringify!(burn), + ::core::stringify!(symbol), + ::core::stringify!(transfer), + ::core::stringify!(factory), + ::core::stringify!(token1), + ::core::stringify!(permit), + ::core::stringify!(allowance), + ::core::stringify!(sync), + ]; + /// Returns the signature for the given selector, if known. #[inline] pub fn signature_by_selector( @@ -4825,42 +4714,34 @@ function transferFrom(address from, address to, uint256 value) external returns ::core::result::Result::Err(_) => ::core::option::Option::None, } } + /// Returns the enum variant name for the given selector, if known. #[inline] - pub fn name_by_selector( - selector: [u8; 4usize], - ) -> ::core::option::Option<&'static str> { + pub fn name_by_selector(selector: [u8; 4usize]) -> ::core::option::Option<&'static str> { let sig = Self::signature_by_selector(selector)?; sig.split_once('(').map(|(name, _)| name) } } #[automatically_derived] impl alloy_sol_types::SolInterface for ISwaprPairCalls { - const NAME: &'static str = "ISwaprPairCalls"; - const MIN_DATA_LENGTH: usize = 0usize; const COUNT: usize = 21usize; + const MIN_DATA_LENGTH: usize = 0usize; + const NAME: &'static str = "ISwaprPairCalls"; + #[inline] fn selector(&self) -> [u8; 4] { match self { Self::DOMAIN_SEPARATOR(_) => { ::SELECTOR } - Self::allowance(_) => { - ::SELECTOR - } + Self::allowance(_) => ::SELECTOR, Self::approve(_) => ::SELECTOR, - Self::balanceOf(_) => { - ::SELECTOR - } + Self::balanceOf(_) => ::SELECTOR, Self::burn(_) => ::SELECTOR, Self::decimals(_) => ::SELECTOR, Self::factory(_) => ::SELECTOR, - Self::getReserves(_) => { - ::SELECTOR - } - Self::initialize(_) => { - ::SELECTOR - } + Self::getReserves(_) => ::SELECTOR, + Self::initialize(_) => ::SELECTOR, Self::mint(_) => ::SELECTOR, Self::name(_) => ::SELECTOR, Self::nonces(_) => ::SELECTOR, @@ -4872,28 +4753,24 @@ function transferFrom(address from, address to, uint256 value) external returns Self::token0(_) => ::SELECTOR, Self::token1(_) => ::SELECTOR, Self::transfer(_) => ::SELECTOR, - Self::transferFrom(_) => { - ::SELECTOR - } + Self::transferFrom(_) => ::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 abi_decode_raw(selector: [u8; 4], data: &[u8]) -> alloy_sol_types::Result { + static DECODE_SHIMS: &[fn(&[u8]) -> alloy_sol_types::Result] = &[ { fn swap(data: &[u8]) -> alloy_sol_types::Result { ::abi_decode_raw(data) @@ -4909,12 +4786,8 @@ function transferFrom(address from, address to, uint256 value) external returns name }, { - fn getReserves( - data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, - ) + fn getReserves(data: &[u8]) -> alloy_sol_types::Result { + ::abi_decode_raw(data) .map(ISwaprPairCalls::getReserves) } getReserves @@ -4934,43 +4807,29 @@ function transferFrom(address from, address to, uint256 value) external returns token0 }, { - fn transferFrom( - data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, - ) + fn transferFrom(data: &[u8]) -> alloy_sol_types::Result { + ::abi_decode_raw(data) .map(ISwaprPairCalls::transferFrom) } transferFrom }, { - fn decimals( - data: &[u8], - ) -> alloy_sol_types::Result { + fn decimals(data: &[u8]) -> alloy_sol_types::Result { ::abi_decode_raw(data) .map(ISwaprPairCalls::decimals) } decimals }, { - fn DOMAIN_SEPARATOR( - data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, - ) + fn DOMAIN_SEPARATOR(data: &[u8]) -> alloy_sol_types::Result { + ::abi_decode_raw(data) .map(ISwaprPairCalls::DOMAIN_SEPARATOR) } DOMAIN_SEPARATOR }, { - fn initialize( - data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, - ) + fn initialize(data: &[u8]) -> alloy_sol_types::Result { + ::abi_decode_raw(data) .map(ISwaprPairCalls::initialize) } initialize @@ -4990,9 +4849,7 @@ function transferFrom(address from, address to, uint256 value) external returns mint }, { - fn balanceOf( - data: &[u8], - ) -> alloy_sol_types::Result { + fn balanceOf(data: &[u8]) -> alloy_sol_types::Result { ::abi_decode_raw(data) .map(ISwaprPairCalls::balanceOf) } @@ -5020,9 +4877,7 @@ function transferFrom(address from, address to, uint256 value) external returns symbol }, { - fn transfer( - data: &[u8], - ) -> alloy_sol_types::Result { + fn transfer(data: &[u8]) -> alloy_sol_types::Result { ::abi_decode_raw(data) .map(ISwaprPairCalls::transfer) } @@ -5050,9 +4905,7 @@ function transferFrom(address from, address to, uint256 value) external returns permit }, { - fn allowance( - data: &[u8], - ) -> alloy_sol_types::Result { + fn allowance(data: &[u8]) -> alloy_sol_types::Result { ::abi_decode_raw(data) .map(ISwaprPairCalls::allowance) } @@ -5067,15 +4920,14 @@ function transferFrom(address from, address to, uint256 value) external returns }, ]; let Ok(idx) = Self::SELECTORS.binary_search(&selector) else { - return Err( - alloy_sol_types::Error::unknown_selector( - ::NAME, - selector, - ), - ); + return Err(alloy_sol_types::Error::unknown_selector( + ::NAME, + selector, + )); }; DECODE_SHIMS[idx](data) } + #[inline] #[allow(non_snake_case)] fn abi_decode_raw_validate( @@ -5084,230 +4936,174 @@ function transferFrom(address from, address to, uint256 value) external returns ) -> alloy_sol_types::Result { static DECODE_VALIDATE_SHIMS: &[fn( &[u8], - ) -> alloy_sol_types::Result] = &[ + ) + -> alloy_sol_types::Result] = &[ { fn swap(data: &[u8]) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) + ::abi_decode_raw_validate(data) .map(ISwaprPairCalls::swap) } swap }, { fn name(data: &[u8]) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) + ::abi_decode_raw_validate(data) .map(ISwaprPairCalls::name) } name }, { - fn getReserves( - data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) + fn getReserves(data: &[u8]) -> alloy_sol_types::Result { + ::abi_decode_raw_validate(data) .map(ISwaprPairCalls::getReserves) } getReserves }, { fn approve(data: &[u8]) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) + ::abi_decode_raw_validate(data) .map(ISwaprPairCalls::approve) } approve }, { fn token0(data: &[u8]) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) + ::abi_decode_raw_validate(data) .map(ISwaprPairCalls::token0) } token0 }, { - fn transferFrom( - data: &[u8], - ) -> alloy_sol_types::Result { + fn transferFrom(data: &[u8]) -> alloy_sol_types::Result { ::abi_decode_raw_validate( - data, - ) - .map(ISwaprPairCalls::transferFrom) + data, + ) + .map(ISwaprPairCalls::transferFrom) } transferFrom }, { - fn decimals( - data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) + fn decimals(data: &[u8]) -> alloy_sol_types::Result { + ::abi_decode_raw_validate(data) .map(ISwaprPairCalls::decimals) } decimals }, { - fn DOMAIN_SEPARATOR( - data: &[u8], - ) -> alloy_sol_types::Result { + fn DOMAIN_SEPARATOR(data: &[u8]) -> alloy_sol_types::Result { ::abi_decode_raw_validate( - data, - ) - .map(ISwaprPairCalls::DOMAIN_SEPARATOR) + data, + ) + .map(ISwaprPairCalls::DOMAIN_SEPARATOR) } DOMAIN_SEPARATOR }, { - fn initialize( - data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) + fn initialize(data: &[u8]) -> alloy_sol_types::Result { + ::abi_decode_raw_validate(data) .map(ISwaprPairCalls::initialize) } initialize }, { fn swapFee(data: &[u8]) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) + ::abi_decode_raw_validate(data) .map(ISwaprPairCalls::swapFee) } swapFee }, { fn mint(data: &[u8]) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) + ::abi_decode_raw_validate(data) .map(ISwaprPairCalls::mint) } mint }, { - fn balanceOf( - data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) + fn balanceOf(data: &[u8]) -> alloy_sol_types::Result { + ::abi_decode_raw_validate(data) .map(ISwaprPairCalls::balanceOf) } balanceOf }, { fn nonces(data: &[u8]) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) + ::abi_decode_raw_validate(data) .map(ISwaprPairCalls::nonces) } nonces }, { fn burn(data: &[u8]) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) + ::abi_decode_raw_validate(data) .map(ISwaprPairCalls::burn) } burn }, { fn symbol(data: &[u8]) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) + ::abi_decode_raw_validate(data) .map(ISwaprPairCalls::symbol) } symbol }, { - fn transfer( - data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) + fn transfer(data: &[u8]) -> alloy_sol_types::Result { + ::abi_decode_raw_validate(data) .map(ISwaprPairCalls::transfer) } transfer }, { fn factory(data: &[u8]) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) + ::abi_decode_raw_validate(data) .map(ISwaprPairCalls::factory) } factory }, { fn token1(data: &[u8]) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) + ::abi_decode_raw_validate(data) .map(ISwaprPairCalls::token1) } token1 }, { fn permit(data: &[u8]) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) + ::abi_decode_raw_validate(data) .map(ISwaprPairCalls::permit) } permit }, { - fn allowance( - data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) + fn allowance(data: &[u8]) -> alloy_sol_types::Result { + ::abi_decode_raw_validate(data) .map(ISwaprPairCalls::allowance) } allowance }, { fn sync(data: &[u8]) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) + ::abi_decode_raw_validate(data) .map(ISwaprPairCalls::sync) } sync }, ]; let Ok(idx) = Self::SELECTORS.binary_search(&selector) else { - return Err( - alloy_sol_types::Error::unknown_selector( - ::NAME, - selector, - ), - ); + 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::DOMAIN_SEPARATOR(inner) => { - ::abi_encoded_size( - inner, - ) + ::abi_encoded_size(inner) } Self::allowance(inner) => { ::abi_encoded_size(inner) @@ -5328,9 +5124,7 @@ function transferFrom(address from, address to, uint256 value) external returns ::abi_encoded_size(inner) } Self::getReserves(inner) => { - ::abi_encoded_size( - inner, - ) + ::abi_encoded_size(inner) } Self::initialize(inner) => { ::abi_encoded_size(inner) @@ -5369,59 +5163,40 @@ function transferFrom(address from, address to, uint256 value) external returns ::abi_encoded_size(inner) } Self::transferFrom(inner) => { - ::abi_encoded_size( - inner, - ) + ::abi_encoded_size(inner) } } } + #[inline] fn abi_encode_raw(&self, out: &mut alloy_sol_types::private::Vec) { match self { Self::DOMAIN_SEPARATOR(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } Self::allowance(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } Self::approve(inner) => { ::abi_encode_raw(inner, out) } Self::balanceOf(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } Self::burn(inner) => { ::abi_encode_raw(inner, out) } Self::decimals(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } Self::factory(inner) => { ::abi_encode_raw(inner, out) } Self::getReserves(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } Self::initialize(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } Self::mint(inner) => { ::abi_encode_raw(inner, out) @@ -5454,23 +5229,16 @@ function transferFrom(address from, address to, uint256 value) external returns ::abi_encode_raw(inner, out) } Self::transfer(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } Self::transferFrom(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } } } } ///Container for all the [`ISwaprPair`](self) events. - #[derive(Clone)] - #[derive(Debug, PartialEq, Eq, Hash)] + #[derive(Clone, Debug, PartialEq, Eq, Hash)] pub enum ISwaprPairEvents { #[allow(missing_docs)] Approval(Approval), @@ -5488,51 +5256,43 @@ function transferFrom(address from, address to, uint256 value) external returns impl ISwaprPairEvents { /// 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. + /// 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]] = &[ [ - 28u8, 65u8, 30u8, 154u8, 150u8, 224u8, 113u8, 36u8, 28u8, 47u8, 33u8, - 247u8, 114u8, 107u8, 23u8, 174u8, 137u8, 227u8, 202u8, 180u8, 199u8, - 139u8, 229u8, 14u8, 6u8, 43u8, 3u8, 169u8, 255u8, 251u8, 186u8, 209u8, + 28u8, 65u8, 30u8, 154u8, 150u8, 224u8, 113u8, 36u8, 28u8, 47u8, 33u8, 247u8, 114u8, + 107u8, 23u8, 174u8, 137u8, 227u8, 202u8, 180u8, 199u8, 139u8, 229u8, 14u8, 6u8, + 43u8, 3u8, 169u8, 255u8, 251u8, 186u8, 209u8, ], [ - 76u8, 32u8, 155u8, 95u8, 200u8, 173u8, 80u8, 117u8, 143u8, 19u8, 226u8, - 225u8, 8u8, 139u8, 165u8, 106u8, 86u8, 13u8, 255u8, 105u8, 10u8, 28u8, - 111u8, 239u8, 38u8, 57u8, 79u8, 76u8, 3u8, 130u8, 28u8, 79u8, + 76u8, 32u8, 155u8, 95u8, 200u8, 173u8, 80u8, 117u8, 143u8, 19u8, 226u8, 225u8, 8u8, + 139u8, 165u8, 106u8, 86u8, 13u8, 255u8, 105u8, 10u8, 28u8, 111u8, 239u8, 38u8, + 57u8, 79u8, 76u8, 3u8, 130u8, 28u8, 79u8, ], [ - 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, + 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, ], [ - 215u8, 138u8, 217u8, 95u8, 164u8, 108u8, 153u8, 75u8, 101u8, 81u8, 208u8, - 218u8, 133u8, 252u8, 39u8, 95u8, 230u8, 19u8, 206u8, 55u8, 101u8, 127u8, - 184u8, 213u8, 227u8, 209u8, 48u8, 132u8, 1u8, 89u8, 216u8, 34u8, + 215u8, 138u8, 217u8, 95u8, 164u8, 108u8, 153u8, 75u8, 101u8, 81u8, 208u8, 218u8, + 133u8, 252u8, 39u8, 95u8, 230u8, 19u8, 206u8, 55u8, 101u8, 127u8, 184u8, 213u8, + 227u8, 209u8, 48u8, 132u8, 1u8, 89u8, 216u8, 34u8, ], [ - 220u8, 205u8, 65u8, 47u8, 11u8, 18u8, 82u8, 129u8, 156u8, 177u8, 253u8, - 51u8, 11u8, 147u8, 34u8, 76u8, 164u8, 38u8, 18u8, 137u8, 43u8, 179u8, - 244u8, 247u8, 137u8, 151u8, 110u8, 109u8, 129u8, 147u8, 100u8, 150u8, + 220u8, 205u8, 65u8, 47u8, 11u8, 18u8, 82u8, 129u8, 156u8, 177u8, 253u8, 51u8, 11u8, + 147u8, 34u8, 76u8, 164u8, 38u8, 18u8, 137u8, 43u8, 179u8, 244u8, 247u8, 137u8, + 151u8, 110u8, 109u8, 129u8, 147u8, 100u8, 150u8, ], [ - 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, + 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, ], ]; - /// The names of the variants in the same order as `SELECTORS`. - pub const VARIANT_NAMES: &'static [&'static str] = &[ - ::core::stringify!(Sync), - ::core::stringify!(Mint), - ::core::stringify!(Approval), - ::core::stringify!(Swap), - ::core::stringify!(Burn), - ::core::stringify!(Transfer), - ]; /// The signatures in the same order as `SELECTORS`. pub const SIGNATURES: &'static [&'static str] = &[ ::SIGNATURE, @@ -5542,6 +5302,16 @@ function transferFrom(address from, address to, uint256 value) external returns ::SIGNATURE, ::SIGNATURE, ]; + /// The names of the variants in the same order as `SELECTORS`. + pub const VARIANT_NAMES: &'static [&'static str] = &[ + ::core::stringify!(Sync), + ::core::stringify!(Mint), + ::core::stringify!(Approval), + ::core::stringify!(Swap), + ::core::stringify!(Burn), + ::core::stringify!(Transfer), + ]; + /// Returns the signature for the given selector, if known. #[inline] pub fn signature_by_selector( @@ -5554,19 +5324,19 @@ function transferFrom(address from, address to, uint256 value) external returns ::core::result::Result::Err(_) => ::core::option::Option::None, } } + /// Returns the enum variant name for the given selector, if known. #[inline] - pub fn name_by_selector( - selector: [u8; 32usize], - ) -> ::core::option::Option<&'static str> { + pub fn name_by_selector(selector: [u8; 32usize]) -> ::core::option::Option<&'static str> { let sig = Self::signature_by_selector(selector)?; sig.split_once('(').map(|(name, _)| name) } } #[automatically_derived] impl alloy_sol_types::SolEventInterface for ISwaprPairEvents { - const NAME: &'static str = "ISwaprPairEvents"; const COUNT: usize = 6usize; + const NAME: &'static str = "ISwaprPairEvents"; + fn decode_raw_log( topics: &[alloy_sol_types::Word], data: &[u8], @@ -5596,17 +5366,15 @@ function transferFrom(address from, address to, uint256 value) external returns ::decode_raw_log(topics, data) .map(Self::Transfer) } - _ => { - 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(), - ), + _ => 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(), ), - }) - } + ), + }), } } } @@ -5614,53 +5382,34 @@ function transferFrom(address from, address to, uint256 value) external returns impl alloy_sol_types::private::IntoLogData for ISwaprPairEvents { 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::Burn(inner) => { - alloy_sol_types::private::IntoLogData::to_log_data(inner) - } - Self::Mint(inner) => { - alloy_sol_types::private::IntoLogData::to_log_data(inner) - } - Self::Swap(inner) => { - alloy_sol_types::private::IntoLogData::to_log_data(inner) - } - Self::Sync(inner) => { - alloy_sol_types::private::IntoLogData::to_log_data(inner) - } - Self::Transfer(inner) => { - alloy_sol_types::private::IntoLogData::to_log_data(inner) - } + Self::Approval(inner) => alloy_sol_types::private::IntoLogData::to_log_data(inner), + Self::Burn(inner) => alloy_sol_types::private::IntoLogData::to_log_data(inner), + Self::Mint(inner) => alloy_sol_types::private::IntoLogData::to_log_data(inner), + Self::Swap(inner) => alloy_sol_types::private::IntoLogData::to_log_data(inner), + Self::Sync(inner) => alloy_sol_types::private::IntoLogData::to_log_data(inner), + Self::Transfer(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::Burn(inner) => { - alloy_sol_types::private::IntoLogData::into_log_data(inner) - } - Self::Mint(inner) => { - alloy_sol_types::private::IntoLogData::into_log_data(inner) - } - Self::Swap(inner) => { - alloy_sol_types::private::IntoLogData::into_log_data(inner) - } - Self::Sync(inner) => { - alloy_sol_types::private::IntoLogData::into_log_data(inner) - } + Self::Burn(inner) => alloy_sol_types::private::IntoLogData::into_log_data(inner), + Self::Mint(inner) => alloy_sol_types::private::IntoLogData::into_log_data(inner), + Self::Swap(inner) => alloy_sol_types::private::IntoLogData::into_log_data(inner), + Self::Sync(inner) => alloy_sol_types::private::IntoLogData::into_log_data(inner), Self::Transfer(inner) => { alloy_sol_types::private::IntoLogData::into_log_data(inner) } } } } - use alloy_contract as alloy_contract; + use alloy_contract; /**Creates a new wrapper around an on-chain [`ISwaprPair`](self) contract instance. -See the [wrapper's documentation](`ISwaprPairInstance`) for more details.*/ + See the [wrapper's documentation](`ISwaprPairInstance`) for more details.*/ #[inline] pub const fn new< P: alloy_contract::private::Provider, @@ -5673,15 +5422,15 @@ See the [wrapper's documentation](`ISwaprPairInstance`) for more details.*/ } /**A [`ISwaprPair`](self) instance. -Contains type-safe methods for interacting with an on-chain instance of the -[`ISwaprPair`](self) contract located at a given `address`, using a given -provider `P`. + Contains type-safe methods for interacting with an on-chain instance of the + [`ISwaprPair`](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. + 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.*/ + See the [module-level documentation](self) for all the available methods.*/ #[derive(Clone)] pub struct ISwaprPairInstance { address: alloy_sol_types::private::Address, @@ -5692,43 +5441,45 @@ See the [module-level documentation](self) for all the available methods.*/ impl ::core::fmt::Debug for ISwaprPairInstance { #[inline] fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { - f.debug_tuple("ISwaprPairInstance").field(&self.address).finish() + f.debug_tuple("ISwaprPairInstance") + .field(&self.address) + .finish() } } /// Instantiation and getters/setters. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > ISwaprPairInstance { + impl, N: alloy_contract::private::Network> + ISwaprPairInstance + { /**Creates a new wrapper around an on-chain [`ISwaprPair`](self) contract instance. -See the [wrapper's documentation](`ISwaprPairInstance`) for more details.*/ + See the [wrapper's documentation](`ISwaprPairInstance`) for more details.*/ #[inline] - pub const fn new( - address: alloy_sol_types::private::Address, - __provider: P, - ) -> Self { + pub const fn new(address: alloy_sol_types::private::Address, __provider: P) -> Self { Self { address, provider: __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 { @@ -5736,7 +5487,8 @@ See the [wrapper's documentation](`ISwaprPairInstance`) for more details.*/ } } impl ISwaprPairInstance<&P, N> { - /// Clones the provider and returns a new instance with the cloned provider. + /// Clones the provider and returns a new instance with the cloned + /// provider. #[inline] pub fn with_cloned_provider(self) -> ISwaprPairInstance { ISwaprPairInstance { @@ -5747,26 +5499,29 @@ See the [wrapper's documentation](`ISwaprPairInstance`) for more details.*/ } } /// Function calls. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > ISwaprPairInstance { - /// Creates a new call builder using this contract instance's provider and address. + impl, N: alloy_contract::private::Network> + ISwaprPairInstance + { + /// 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. + /// 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 [`DOMAIN_SEPARATOR`] function. pub fn DOMAIN_SEPARATOR( &self, ) -> alloy_contract::SolCallBuilder<&P, DOMAIN_SEPARATORCall, N> { self.call_builder(&DOMAIN_SEPARATORCall) } + ///Creates a new call builder for the [`allowance`] function. pub fn allowance( &self, @@ -5775,6 +5530,7 @@ See the [wrapper's documentation](`ISwaprPairInstance`) for more details.*/ ) -> 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, @@ -5783,6 +5539,7 @@ See the [wrapper's documentation](`ISwaprPairInstance`) for more details.*/ ) -> 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, @@ -5790,6 +5547,7 @@ See the [wrapper's documentation](`ISwaprPairInstance`) for more details.*/ ) -> alloy_contract::SolCallBuilder<&P, balanceOfCall, N> { self.call_builder(&balanceOfCall { owner }) } + ///Creates a new call builder for the [`burn`] function. pub fn burn( &self, @@ -5797,20 +5555,22 @@ See the [wrapper's documentation](`ISwaprPairInstance`) for more details.*/ ) -> alloy_contract::SolCallBuilder<&P, burnCall, N> { self.call_builder(&burnCall { to }) } + ///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 [`factory`] function. pub fn factory(&self) -> alloy_contract::SolCallBuilder<&P, factoryCall, N> { self.call_builder(&factoryCall) } + ///Creates a new call builder for the [`getReserves`] function. - pub fn getReserves( - &self, - ) -> alloy_contract::SolCallBuilder<&P, getReservesCall, N> { + pub fn getReserves(&self) -> alloy_contract::SolCallBuilder<&P, getReservesCall, N> { self.call_builder(&getReservesCall) } + ///Creates a new call builder for the [`initialize`] function. pub fn initialize( &self, @@ -5819,6 +5579,7 @@ See the [wrapper's documentation](`ISwaprPairInstance`) for more details.*/ ) -> alloy_contract::SolCallBuilder<&P, initializeCall, N> { self.call_builder(&initializeCall { _0, _1 }) } + ///Creates a new call builder for the [`mint`] function. pub fn mint( &self, @@ -5826,10 +5587,12 @@ See the [wrapper's documentation](`ISwaprPairInstance`) for more details.*/ ) -> alloy_contract::SolCallBuilder<&P, mintCall, N> { self.call_builder(&mintCall { to }) } + ///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 [`nonces`] function. pub fn nonces( &self, @@ -5837,6 +5600,7 @@ See the [wrapper's documentation](`ISwaprPairInstance`) for more details.*/ ) -> alloy_contract::SolCallBuilder<&P, noncesCall, N> { self.call_builder(&noncesCall { owner }) } + ///Creates a new call builder for the [`permit`] function. pub fn permit( &self, @@ -5848,18 +5612,17 @@ See the [wrapper's documentation](`ISwaprPairInstance`) for more details.*/ r: alloy_sol_types::private::FixedBytes<32>, s: alloy_sol_types::private::FixedBytes<32>, ) -> alloy_contract::SolCallBuilder<&P, permitCall, N> { - self.call_builder( - &permitCall { - owner, - spender, - value, - deadline, - v, - r, - s, - }, - ) + self.call_builder(&permitCall { + owner, + spender, + value, + deadline, + v, + r, + s, + }) } + ///Creates a new call builder for the [`swap`] function. pub fn swap( &self, @@ -5868,35 +5631,39 @@ See the [wrapper's documentation](`ISwaprPairInstance`) for more details.*/ to: alloy_sol_types::private::Address, data: alloy_sol_types::private::Bytes, ) -> alloy_contract::SolCallBuilder<&P, swapCall, N> { - self.call_builder( - &swapCall { - amount0Out, - amount1Out, - to, - data, - }, - ) + self.call_builder(&swapCall { + amount0Out, + amount1Out, + to, + data, + }) } + ///Creates a new call builder for the [`swapFee`] function. pub fn swapFee(&self) -> alloy_contract::SolCallBuilder<&P, swapFeeCall, N> { self.call_builder(&swapFeeCall) } + ///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 [`sync`] function. pub fn sync(&self) -> alloy_contract::SolCallBuilder<&P, syncCall, N> { self.call_builder(&syncCall) } + ///Creates a new call builder for the [`token0`] function. pub fn token0(&self) -> alloy_contract::SolCallBuilder<&P, token0Call, N> { self.call_builder(&token0Call) } + ///Creates a new call builder for the [`token1`] function. pub fn token1(&self) -> alloy_contract::SolCallBuilder<&P, token1Call, N> { self.call_builder(&token1Call) } + ///Creates a new call builder for the [`transfer`] function. pub fn transfer( &self, @@ -5905,6 +5672,7 @@ See the [wrapper's documentation](`ISwaprPairInstance`) for more details.*/ ) -> 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, @@ -5912,49 +5680,50 @@ See the [wrapper's documentation](`ISwaprPairInstance`) for more details.*/ 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, - }, - ) + self.call_builder(&transferFromCall { from, to, value }) } } /// Event filters. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > ISwaprPairInstance { - /// Creates a new event filter using this contract instance's provider and address. + impl, N: alloy_contract::private::Network> + ISwaprPairInstance + { + /// 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. + /// 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 [`Burn`] event. pub fn Burn_filter(&self) -> alloy_contract::Event<&P, Burn, N> { self.event_filter::() } + ///Creates a new event filter for the [`Mint`] event. pub fn Mint_filter(&self) -> alloy_contract::Event<&P, Mint, N> { self.event_filter::() } + ///Creates a new event filter for the [`Swap`] event. pub fn Swap_filter(&self) -> alloy_contract::Event<&P, Swap, N> { self.event_filter::() } + ///Creates a new event filter for the [`Sync`] event. pub fn Sync_filter(&self) -> alloy_contract::Event<&P, Sync, 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::() diff --git a/contracts/generated/contracts-generated/iuniswaplikepair/src/lib.rs b/contracts/generated/contracts-generated/iuniswaplikepair/src/lib.rs index 7a3b7b25de..c15f524821 100644 --- a/contracts/generated/contracts-generated/iuniswaplikepair/src/lib.rs +++ b/contracts/generated/contracts-generated/iuniswaplikepair/src/lib.rs @@ -1,4 +1,10 @@ -#![allow(unused_imports, unused_attributes, clippy::all, rustdoc::all, non_snake_case)] +#![allow( + unused_imports, + unused_attributes, + clippy::all, + rustdoc::all, + non_snake_case +)] //! Auto-generated contract bindings. Do not edit. /** @@ -608,13 +614,12 @@ interface IUniswapLikePair { clippy::empty_structs_with_brackets )] pub mod IUniswapLikePair { - use super::*; - use alloy_sol_types as alloy_sol_types; + use {super::*, alloy_sol_types}; #[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); -```*/ + ```solidity + event Approval(address indexed owner, address indexed spender, uint256 value); + ```*/ #[allow( non_camel_case_types, non_snake_case, @@ -637,25 +642,26 @@ event Approval(address indexed owner, address indexed spender, uint256 value); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[automatically_derived] impl alloy_sol_types::SolEvent for Approval { + type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; 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; + 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, + ]); + #[allow(unused_variables)] #[inline] fn new( @@ -668,33 +674,39 @@ event Approval(address indexed owner, address indexed spender, uint256 value); 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, - ), - ); + 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), + as alloy_sol_types::SolType>::tokenize( + &self.value, + ), ) } + #[inline] fn topics(&self) -> ::RustType { - (Self::SIGNATURE_HASH.into(), self.owner.clone(), self.spender.clone()) + ( + Self::SIGNATURE_HASH.into(), + self.owner.clone(), + self.spender.clone(), + ) } + #[inline] fn encode_topics_raw( &self, @@ -703,9 +715,7 @@ event Approval(address indexed owner, address indexed spender, uint256 value); if out.len() < ::COUNT { return Err(alloy_sol_types::Error::Overrun); } - out[0usize] = alloy_sol_types::abi::token::WordToken( - Self::SIGNATURE_HASH, - ); + out[0usize] = alloy_sol_types::abi::token::WordToken(Self::SIGNATURE_HASH); out[1usize] = ::encode_topic( &self.owner, ); @@ -720,6 +730,7 @@ event Approval(address indexed owner, address indexed spender, uint256 value); 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) } @@ -734,9 +745,9 @@ event Approval(address indexed owner, address indexed spender, uint256 value); }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Event with signature `Burn(address,uint256,uint256,address)` and selector `0xdccd412f0b1252819cb1fd330b93224ca42612892bb3f4f789976e6d81936496`. -```solidity -event Burn(address indexed sender, uint256 amount0, uint256 amount1, address indexed to); -```*/ + ```solidity + event Burn(address indexed sender, uint256 amount0, uint256 amount1, address indexed to); + ```*/ #[allow( non_camel_case_types, non_snake_case, @@ -761,28 +772,29 @@ event Burn(address indexed sender, uint256 amount0, uint256 amount1, address ind clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[automatically_derived] impl alloy_sol_types::SolEvent for Burn { + type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type DataTuple<'a> = ( alloy_sol_types::sol_data::Uint<256>, 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 = "Burn(address,uint256,uint256,address)"; - const SIGNATURE_HASH: alloy_sol_types::private::B256 = alloy_sol_types::private::B256::new([ - 220u8, 205u8, 65u8, 47u8, 11u8, 18u8, 82u8, 129u8, 156u8, 177u8, 253u8, - 51u8, 11u8, 147u8, 34u8, 76u8, 164u8, 38u8, 18u8, 137u8, 43u8, 179u8, - 244u8, 247u8, 137u8, 151u8, 110u8, 109u8, 129u8, 147u8, 100u8, 150u8, - ]); + const ANONYMOUS: bool = false; + const SIGNATURE: &'static str = "Burn(address,uint256,uint256,address)"; + const SIGNATURE_HASH: alloy_sol_types::private::B256 = + alloy_sol_types::private::B256::new([ + 220u8, 205u8, 65u8, 47u8, 11u8, 18u8, 82u8, 129u8, 156u8, 177u8, 253u8, 51u8, + 11u8, 147u8, 34u8, 76u8, 164u8, 38u8, 18u8, 137u8, 43u8, 179u8, 244u8, 247u8, + 137u8, 151u8, 110u8, 109u8, 129u8, 147u8, 100u8, 150u8, + ]); + #[allow(unused_variables)] #[inline] fn new( @@ -796,36 +808,42 @@ event Burn(address indexed sender, uint256 amount0, uint256 amount1, address ind to: topics.2, } } + #[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, - ), - ); + 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.amount0), - as alloy_sol_types::SolType>::tokenize(&self.amount1), + as alloy_sol_types::SolType>::tokenize( + &self.amount0, + ), + as alloy_sol_types::SolType>::tokenize( + &self.amount1, + ), ) } + #[inline] fn topics(&self) -> ::RustType { - (Self::SIGNATURE_HASH.into(), self.sender.clone(), self.to.clone()) + ( + Self::SIGNATURE_HASH.into(), + self.sender.clone(), + self.to.clone(), + ) } + #[inline] fn encode_topics_raw( &self, @@ -834,9 +852,7 @@ event Burn(address indexed sender, uint256 amount0, uint256 amount1, address ind if out.len() < ::COUNT { return Err(alloy_sol_types::Error::Overrun); } - out[0usize] = alloy_sol_types::abi::token::WordToken( - Self::SIGNATURE_HASH, - ); + out[0usize] = alloy_sol_types::abi::token::WordToken(Self::SIGNATURE_HASH); out[1usize] = ::encode_topic( &self.sender, ); @@ -851,6 +867,7 @@ event Burn(address indexed sender, uint256 amount0, uint256 amount1, address ind 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) } @@ -865,9 +882,9 @@ event Burn(address indexed sender, uint256 amount0, uint256 amount1, address ind }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Event with signature `Mint(address,uint256,uint256)` and selector `0x4c209b5fc8ad50758f13e2e1088ba56a560dff690a1c6fef26394f4c03821c4f`. -```solidity -event Mint(address indexed sender, uint256 amount0, uint256 amount1); -```*/ + ```solidity + event Mint(address indexed sender, uint256 amount0, uint256 amount1); + ```*/ #[allow( non_camel_case_types, non_snake_case, @@ -890,27 +907,28 @@ event Mint(address indexed sender, uint256 amount0, uint256 amount1); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[automatically_derived] impl alloy_sol_types::SolEvent for Mint { + type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type DataTuple<'a> = ( alloy_sol_types::sol_data::Uint<256>, 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, ); - const SIGNATURE: &'static str = "Mint(address,uint256,uint256)"; - const SIGNATURE_HASH: alloy_sol_types::private::B256 = alloy_sol_types::private::B256::new([ - 76u8, 32u8, 155u8, 95u8, 200u8, 173u8, 80u8, 117u8, 143u8, 19u8, 226u8, - 225u8, 8u8, 139u8, 165u8, 106u8, 86u8, 13u8, 255u8, 105u8, 10u8, 28u8, - 111u8, 239u8, 38u8, 57u8, 79u8, 76u8, 3u8, 130u8, 28u8, 79u8, - ]); + const ANONYMOUS: bool = false; + const SIGNATURE: &'static str = "Mint(address,uint256,uint256)"; + const SIGNATURE_HASH: alloy_sol_types::private::B256 = + alloy_sol_types::private::B256::new([ + 76u8, 32u8, 155u8, 95u8, 200u8, 173u8, 80u8, 117u8, 143u8, 19u8, 226u8, 225u8, + 8u8, 139u8, 165u8, 106u8, 86u8, 13u8, 255u8, 105u8, 10u8, 28u8, 111u8, 239u8, + 38u8, 57u8, 79u8, 76u8, 3u8, 130u8, 28u8, 79u8, + ]); + #[allow(unused_variables)] #[inline] fn new( @@ -923,36 +941,38 @@ event Mint(address indexed sender, uint256 amount0, uint256 amount1); amount1: 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, - ), - ); + 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.amount0), - as alloy_sol_types::SolType>::tokenize(&self.amount1), + as alloy_sol_types::SolType>::tokenize( + &self.amount0, + ), + as alloy_sol_types::SolType>::tokenize( + &self.amount1, + ), ) } + #[inline] fn topics(&self) -> ::RustType { (Self::SIGNATURE_HASH.into(), self.sender.clone()) } + #[inline] fn encode_topics_raw( &self, @@ -961,9 +981,7 @@ event Mint(address indexed sender, uint256 amount0, uint256 amount1); if out.len() < ::COUNT { return Err(alloy_sol_types::Error::Overrun); } - out[0usize] = alloy_sol_types::abi::token::WordToken( - Self::SIGNATURE_HASH, - ); + out[0usize] = alloy_sol_types::abi::token::WordToken(Self::SIGNATURE_HASH); out[1usize] = ::encode_topic( &self.sender, ); @@ -975,6 +993,7 @@ event Mint(address indexed sender, uint256 amount0, uint256 amount1); 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) } @@ -989,9 +1008,9 @@ event Mint(address indexed sender, uint256 amount0, uint256 amount1); }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Event with signature `Swap(address,uint256,uint256,uint256,uint256,address)` and selector `0xd78ad95fa46c994b6551d0da85fc275fe613ce37657fb8d5e3d130840159d822`. -```solidity -event Swap(address indexed sender, uint256 amount0In, uint256 amount1In, uint256 amount0Out, uint256 amount1Out, address indexed to); -```*/ + ```solidity + event Swap(address indexed sender, uint256 amount0In, uint256 amount1In, uint256 amount0Out, uint256 amount1Out, address indexed to); + ```*/ #[allow( non_camel_case_types, non_snake_case, @@ -1020,30 +1039,31 @@ event Swap(address indexed sender, uint256 amount0In, uint256 amount1In, uint256 clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[automatically_derived] impl alloy_sol_types::SolEvent for Swap { + type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type DataTuple<'a> = ( alloy_sol_types::sol_data::Uint<256>, alloy_sol_types::sol_data::Uint<256>, alloy_sol_types::sol_data::Uint<256>, 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 = "Swap(address,uint256,uint256,uint256,uint256,address)"; - const SIGNATURE_HASH: alloy_sol_types::private::B256 = alloy_sol_types::private::B256::new([ - 215u8, 138u8, 217u8, 95u8, 164u8, 108u8, 153u8, 75u8, 101u8, 81u8, 208u8, - 218u8, 133u8, 252u8, 39u8, 95u8, 230u8, 19u8, 206u8, 55u8, 101u8, 127u8, - 184u8, 213u8, 227u8, 209u8, 48u8, 132u8, 1u8, 89u8, 216u8, 34u8, - ]); + const ANONYMOUS: bool = false; + const SIGNATURE: &'static str = "Swap(address,uint256,uint256,uint256,uint256,address)"; + const SIGNATURE_HASH: alloy_sol_types::private::B256 = + alloy_sol_types::private::B256::new([ + 215u8, 138u8, 217u8, 95u8, 164u8, 108u8, 153u8, 75u8, 101u8, 81u8, 208u8, + 218u8, 133u8, 252u8, 39u8, 95u8, 230u8, 19u8, 206u8, 55u8, 101u8, 127u8, 184u8, + 213u8, 227u8, 209u8, 48u8, 132u8, 1u8, 89u8, 216u8, 34u8, + ]); + #[allow(unused_variables)] #[inline] fn new( @@ -1059,42 +1079,48 @@ event Swap(address indexed sender, uint256 amount0In, uint256 amount1In, uint256 to: topics.2, } } + #[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, - ), - ); + 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.amount0In), - as alloy_sol_types::SolType>::tokenize(&self.amount1In), - as alloy_sol_types::SolType>::tokenize(&self.amount0Out), - as alloy_sol_types::SolType>::tokenize(&self.amount1Out), + as alloy_sol_types::SolType>::tokenize( + &self.amount0In, + ), + as alloy_sol_types::SolType>::tokenize( + &self.amount1In, + ), + as alloy_sol_types::SolType>::tokenize( + &self.amount0Out, + ), + as alloy_sol_types::SolType>::tokenize( + &self.amount1Out, + ), ) } + #[inline] fn topics(&self) -> ::RustType { - (Self::SIGNATURE_HASH.into(), self.sender.clone(), self.to.clone()) + ( + Self::SIGNATURE_HASH.into(), + self.sender.clone(), + self.to.clone(), + ) } + #[inline] fn encode_topics_raw( &self, @@ -1103,9 +1129,7 @@ event Swap(address indexed sender, uint256 amount0In, uint256 amount1In, uint256 if out.len() < ::COUNT { return Err(alloy_sol_types::Error::Overrun); } - out[0usize] = alloy_sol_types::abi::token::WordToken( - Self::SIGNATURE_HASH, - ); + out[0usize] = alloy_sol_types::abi::token::WordToken(Self::SIGNATURE_HASH); out[1usize] = ::encode_topic( &self.sender, ); @@ -1120,6 +1144,7 @@ event Swap(address indexed sender, uint256 amount0In, uint256 amount1In, uint256 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) } @@ -1134,9 +1159,9 @@ event Swap(address indexed sender, uint256 amount0In, uint256 amount1In, uint256 }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Event with signature `Sync(uint112,uint112)` and selector `0x1c411e9a96e071241c2f21f7726b17ae89e3cab4c78be50e062b03a9fffbbad1`. -```solidity -event Sync(uint112 reserve0, uint112 reserve1); -```*/ + ```solidity + event Sync(uint112 reserve0, uint112 reserve1); + ```*/ #[allow( non_camel_case_types, non_snake_case, @@ -1157,24 +1182,25 @@ event Sync(uint112 reserve0, uint112 reserve1); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[automatically_derived] impl alloy_sol_types::SolEvent for Sync { + type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type DataTuple<'a> = ( alloy_sol_types::sol_data::Uint<112>, alloy_sol_types::sol_data::Uint<112>, ); - type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type TopicList = (alloy_sol_types::sol_data::FixedBytes<32>,); - const SIGNATURE: &'static str = "Sync(uint112,uint112)"; - const SIGNATURE_HASH: alloy_sol_types::private::B256 = alloy_sol_types::private::B256::new([ - 28u8, 65u8, 30u8, 154u8, 150u8, 224u8, 113u8, 36u8, 28u8, 47u8, 33u8, - 247u8, 114u8, 107u8, 23u8, 174u8, 137u8, 227u8, 202u8, 180u8, 199u8, - 139u8, 229u8, 14u8, 6u8, 43u8, 3u8, 169u8, 255u8, 251u8, 186u8, 209u8, - ]); + const ANONYMOUS: bool = false; + const SIGNATURE: &'static str = "Sync(uint112,uint112)"; + const SIGNATURE_HASH: alloy_sol_types::private::B256 = + alloy_sol_types::private::B256::new([ + 28u8, 65u8, 30u8, 154u8, 150u8, 224u8, 113u8, 36u8, 28u8, 47u8, 33u8, 247u8, + 114u8, 107u8, 23u8, 174u8, 137u8, 227u8, 202u8, 180u8, 199u8, 139u8, 229u8, + 14u8, 6u8, 43u8, 3u8, 169u8, 255u8, 251u8, 186u8, 209u8, + ]); + #[allow(unused_variables)] #[inline] fn new( @@ -1186,36 +1212,38 @@ event Sync(uint112 reserve0, uint112 reserve1); reserve1: 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, - ), - ); + 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.reserve0), - as alloy_sol_types::SolType>::tokenize(&self.reserve1), + as alloy_sol_types::SolType>::tokenize( + &self.reserve0, + ), + as alloy_sol_types::SolType>::tokenize( + &self.reserve1, + ), ) } + #[inline] fn topics(&self) -> ::RustType { (Self::SIGNATURE_HASH.into(),) } + #[inline] fn encode_topics_raw( &self, @@ -1224,9 +1252,7 @@ event Sync(uint112 reserve0, uint112 reserve1); if out.len() < ::COUNT { return Err(alloy_sol_types::Error::Overrun); } - out[0usize] = alloy_sol_types::abi::token::WordToken( - Self::SIGNATURE_HASH, - ); + out[0usize] = alloy_sol_types::abi::token::WordToken(Self::SIGNATURE_HASH); Ok(()) } } @@ -1235,6 +1261,7 @@ event Sync(uint112 reserve0, uint112 reserve1); 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) } @@ -1249,9 +1276,9 @@ event Sync(uint112 reserve0, uint112 reserve1); }; #[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); -```*/ + ```solidity + event Transfer(address indexed from, address indexed to, uint256 value); + ```*/ #[allow( non_camel_case_types, non_snake_case, @@ -1274,25 +1301,26 @@ event Transfer(address indexed from, address indexed to, uint256 value); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[automatically_derived] impl alloy_sol_types::SolEvent for Transfer { + type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; 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; + 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, + ]); + #[allow(unused_variables)] #[inline] fn new( @@ -1305,33 +1333,39 @@ event Transfer(address indexed from, address indexed to, uint256 value); 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, - ), - ); + 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), + as alloy_sol_types::SolType>::tokenize( + &self.value, + ), ) } + #[inline] fn topics(&self) -> ::RustType { - (Self::SIGNATURE_HASH.into(), self.from.clone(), self.to.clone()) + ( + Self::SIGNATURE_HASH.into(), + self.from.clone(), + self.to.clone(), + ) } + #[inline] fn encode_topics_raw( &self, @@ -1340,9 +1374,7 @@ event Transfer(address indexed from, address indexed to, uint256 value); if out.len() < ::COUNT { return Err(alloy_sol_types::Error::Overrun); } - out[0usize] = alloy_sol_types::abi::token::WordToken( - Self::SIGNATURE_HASH, - ); + out[0usize] = alloy_sol_types::abi::token::WordToken(Self::SIGNATURE_HASH); out[1usize] = ::encode_topic( &self.from, ); @@ -1357,6 +1389,7 @@ event Transfer(address indexed from, address indexed to, uint256 value); 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) } @@ -1371,14 +1404,15 @@ event Transfer(address indexed from, address indexed to, uint256 value); }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `DOMAIN_SEPARATOR()` and selector `0x3644e515`. -```solidity -function DOMAIN_SEPARATOR() external view returns (bytes32); -```*/ + ```solidity + function DOMAIN_SEPARATOR() external view returns (bytes32); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct DOMAIN_SEPARATORCall; #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`DOMAIN_SEPARATOR()`](DOMAIN_SEPARATORCall) function. + ///Container type for the return parameters of the + /// [`DOMAIN_SEPARATOR()`](DOMAIN_SEPARATORCall) function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct DOMAIN_SEPARATORReturn { @@ -1392,7 +1426,7 @@ function DOMAIN_SEPARATOR() external view returns (bytes32); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -1401,9 +1435,7 @@ function DOMAIN_SEPARATOR() external view returns (bytes32); type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1412,16 +1444,14 @@ function DOMAIN_SEPARATOR() external view returns (bytes32); } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From - for UnderlyingRustTuple<'_> { + impl ::core::convert::From for UnderlyingRustTuple<'_> { fn from(value: DOMAIN_SEPARATORCall) -> Self { () } } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From> - for DOMAIN_SEPARATORCall { + impl ::core::convert::From> for DOMAIN_SEPARATORCall { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { Self } @@ -1435,9 +1465,7 @@ function DOMAIN_SEPARATOR() external view returns (bytes32); 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, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1446,16 +1474,14 @@ function DOMAIN_SEPARATOR() external view returns (bytes32); } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From - for UnderlyingRustTuple<'_> { + impl ::core::convert::From for UnderlyingRustTuple<'_> { fn from(value: DOMAIN_SEPARATORReturn) -> Self { (value._0,) } } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From> - for DOMAIN_SEPARATORReturn { + impl ::core::convert::From> for DOMAIN_SEPARATORReturn { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { Self { _0: tuple.0 } } @@ -1464,26 +1490,26 @@ function DOMAIN_SEPARATOR() external view returns (bytes32); #[automatically_derived] impl alloy_sol_types::SolCall for DOMAIN_SEPARATORCall { type Parameters<'a> = (); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = alloy_sol_types::private::FixedBytes<32>; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (alloy_sol_types::sol_data::FixedBytes<32>,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "DOMAIN_SEPARATOR()"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [54u8, 68u8, 229u8, 21u8]; + const SIGNATURE: &'static str = "DOMAIN_SEPARATOR()"; + #[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<'_> { ( @@ -1492,35 +1518,34 @@ function DOMAIN_SEPARATOR() external view returns (bytes32); > 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| { + as alloy_sol_types::SolType>::abi_decode_sequence(data).map( + |r| { let r: DOMAIN_SEPARATORReturn = 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: DOMAIN_SEPARATORReturn = r.into(); - r._0 - }) + 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: DOMAIN_SEPARATORReturn = r.into(); + r._0 + }) } } }; #[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); -```*/ + ```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 { @@ -1530,7 +1555,8 @@ function allowance(address owner, address spender) external view returns (uint25 pub spender: alloy_sol_types::private::Address, } #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`allowance(address,address)`](allowanceCall) function. + ///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 { @@ -1544,7 +1570,7 @@ function allowance(address owner, address spender) external view returns (uint25 clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -1559,9 +1585,7 @@ function allowance(address owner, address spender) external view returns (uint25 ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1591,14 +1615,10 @@ function allowance(address owner, address spender) external view returns (uint25 #[allow(dead_code)] type UnderlyingSolTuple<'a> = (alloy_sol_types::sol_data::Uint<256>,); #[doc(hidden)] - type UnderlyingRustTuple<'a> = ( - alloy_sol_types::private::primitives::aliases::U256, - ); + 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, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1626,22 +1646,21 @@ function allowance(address owner, address spender) external view returns (uint25 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 ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; 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)"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [221u8, 98u8, 237u8, 62u8]; + const SIGNATURE: &'static str = "allowance(address,address)"; + #[inline] fn new<'a>( tuple: as alloy_sol_types::SolType>::RustType, ) -> Self { tuple.into() } + #[inline] fn tokenize(&self) -> Self::Token<'_> { ( @@ -1653,43 +1672,43 @@ function allowance(address owner, address spender) external view returns (uint25 ), ) } + #[inline] fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { ( - as alloy_sol_types::SolType>::tokenize(ret), + 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| { + 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 - }) + 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(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `approve(address,uint256)` and selector `0x095ea7b3`. -```solidity -function approve(address spender, uint256 value) external returns (bool); -```*/ + ```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 { @@ -1699,7 +1718,8 @@ function approve(address spender, uint256 value) external returns (bool); pub value: alloy_sol_types::private::primitives::aliases::U256, } #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`approve(address,uint256)`](approveCall) function. + ///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 { @@ -1713,7 +1733,7 @@ function approve(address spender, uint256 value) external returns (bool); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -1728,9 +1748,7 @@ function approve(address spender, uint256 value) external returns (bool); ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1763,9 +1781,7 @@ function approve(address spender, uint256 value) external returns (bool); type UnderlyingRustTuple<'a> = (bool,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1793,70 +1809,65 @@ function approve(address spender, uint256 value) external returns (bool); 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 ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; 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)"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [9u8, 94u8, 167u8, 179u8]; + const SIGNATURE: &'static str = "approve(address,uint256)"; + #[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), + as alloy_sol_types::SolType>::tokenize( + &self.value, + ), ) } + #[inline] fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { - ( - ::tokenize( - ret, - ), - ) + (::tokenize(ret),) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) - .map(|r| { + 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 - }) + 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(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `balanceOf(address)` and selector `0x70a08231`. -```solidity -function balanceOf(address owner) external view returns (uint256); -```*/ + ```solidity + function balanceOf(address owner) external view returns (uint256); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct balanceOfCall { @@ -1864,7 +1875,8 @@ function balanceOf(address owner) external view returns (uint256); pub owner: alloy_sol_types::private::Address, } #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`balanceOf(address)`](balanceOfCall) function. + ///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 { @@ -1878,7 +1890,7 @@ function balanceOf(address owner) external view returns (uint256); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -1887,9 +1899,7 @@ function balanceOf(address owner) external view returns (uint256); type UnderlyingRustTuple<'a> = (alloy_sol_types::private::Address,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1916,14 +1926,10 @@ function balanceOf(address owner) external view returns (uint256); #[allow(dead_code)] type UnderlyingSolTuple<'a> = (alloy_sol_types::sol_data::Uint<256>,); #[doc(hidden)] - type UnderlyingRustTuple<'a> = ( - alloy_sol_types::private::primitives::aliases::U256, - ); + 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, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1948,22 +1954,21 @@ function balanceOf(address owner) external view returns (uint256); #[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 ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; 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)"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [112u8, 160u8, 130u8, 49u8]; + const SIGNATURE: &'static str = "balanceOf(address)"; + #[inline] fn new<'a>( tuple: as alloy_sol_types::SolType>::RustType, ) -> Self { tuple.into() } + #[inline] fn tokenize(&self) -> Self::Token<'_> { ( @@ -1972,43 +1977,43 @@ function balanceOf(address owner) external view returns (uint256); ), ) } + #[inline] fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { ( - as alloy_sol_types::SolType>::tokenize(ret), + 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| { + 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 - }) + 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(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `burn(address)` and selector `0x89afcb44`. -```solidity -function burn(address to) external returns (uint256 amount0, uint256 amount1); -```*/ + ```solidity + function burn(address to) external returns (uint256 amount0, uint256 amount1); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct burnCall { @@ -2016,7 +2021,8 @@ function burn(address to) external returns (uint256 amount0, uint256 amount1); pub to: alloy_sol_types::private::Address, } #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`burn(address)`](burnCall) function. + ///Container type for the return parameters of the + /// [`burn(address)`](burnCall) function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct burnReturn { @@ -2032,7 +2038,7 @@ function burn(address to) external returns (uint256 amount0, uint256 amount1); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -2041,9 +2047,7 @@ function burn(address to) external returns (uint256 amount0, uint256 amount1); type UnderlyingRustTuple<'a> = (alloy_sol_types::private::Address,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -2079,9 +2083,7 @@ function burn(address to) external returns (uint256 amount0, uint256 amount1); ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -2107,41 +2109,38 @@ function burn(address to) external returns (uint256 amount0, uint256 amount1); } } impl burnReturn { - fn _tokenize( - &self, - ) -> ::ReturnToken<'_> { + fn _tokenize(&self) -> ::ReturnToken<'_> { ( - as alloy_sol_types::SolType>::tokenize(&self.amount0), - as alloy_sol_types::SolType>::tokenize(&self.amount1), + as alloy_sol_types::SolType>::tokenize( + &self.amount0, + ), + as alloy_sol_types::SolType>::tokenize( + &self.amount1, + ), ) } } #[automatically_derived] impl alloy_sol_types::SolCall for burnCall { type Parameters<'a> = (alloy_sol_types::sol_data::Address,); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = burnReturn; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = ( alloy_sol_types::sol_data::Uint<256>, alloy_sol_types::sol_data::Uint<256>, ); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "burn(address)"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [137u8, 175u8, 203u8, 68u8]; + const SIGNATURE: &'static str = "burn(address)"; + #[inline] fn new<'a>( tuple: as alloy_sol_types::SolType>::RustType, ) -> Self { tuple.into() } + #[inline] fn tokenize(&self) -> Self::Token<'_> { ( @@ -2150,38 +2149,38 @@ function burn(address to) external returns (uint256 amount0, uint256 amount1); ), ) } + #[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) + 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) + 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(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `decimals()` and selector `0x313ce567`. -```solidity -function decimals() external pure returns (uint8); -```*/ + ```solidity + function decimals() external pure returns (uint8); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct decimalsCall; #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`decimals()`](decimalsCall) function. + ///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 { @@ -2195,7 +2194,7 @@ function decimals() external pure returns (uint8); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -2204,9 +2203,7 @@ function decimals() external pure returns (uint8); type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -2236,9 +2233,7 @@ function decimals() external pure returns (uint8); type UnderlyingRustTuple<'a> = (u8,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -2263,68 +2258,64 @@ function decimals() external pure returns (uint8); #[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 ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; 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()"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [49u8, 60u8, 229u8, 103u8]; + const SIGNATURE: &'static str = "decimals()"; + #[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), - ) + ( 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| { + 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 - }) + 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(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `factory()` and selector `0xc45a0155`. -```solidity -function factory() external view returns (address); -```*/ + ```solidity + function factory() external view returns (address); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct factoryCall; #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`factory()`](factoryCall) function. + ///Container type for the return parameters of the + /// [`factory()`](factoryCall) function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct factoryReturn { @@ -2338,7 +2329,7 @@ function factory() external view returns (address); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -2347,9 +2338,7 @@ function factory() external view returns (address); type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -2379,9 +2368,7 @@ function factory() external view returns (address); type UnderlyingRustTuple<'a> = (alloy_sol_types::private::Address,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -2406,68 +2393,64 @@ function factory() external view returns (address); #[automatically_derived] impl alloy_sol_types::SolCall for factoryCall { type Parameters<'a> = (); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = alloy_sol_types::private::Address; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (alloy_sol_types::sol_data::Address,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "factory()"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [196u8, 90u8, 1u8, 85u8]; + const SIGNATURE: &'static str = "factory()"; + #[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, - ), - ) + (::tokenize(ret),) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) - .map(|r| { + as alloy_sol_types::SolType>::abi_decode_sequence(data).map( + |r| { let r: factoryReturn = 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: factoryReturn = r.into(); - r._0 - }) + 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: factoryReturn = r.into(); + r._0 + }) } } }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `getReserves()` and selector `0x0902f1ac`. -```solidity -function getReserves() external view returns (uint112 reserve0, uint112 reserve1, uint32 blockTimestampLast); -```*/ + ```solidity + function getReserves() external view returns (uint112 reserve0, uint112 reserve1, uint32 blockTimestampLast); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct getReservesCall; #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`getReserves()`](getReservesCall) function. + ///Container type for the return parameters of the + /// [`getReserves()`](getReservesCall) function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct getReservesReturn { @@ -2485,7 +2468,7 @@ function getReserves() external view returns (uint112 reserve0, uint112 reserve1 clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -2494,9 +2477,7 @@ function getReserves() external view returns (uint112 reserve0, uint112 reserve1 type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -2534,9 +2515,7 @@ function getReserves() external view returns (uint112 reserve0, uint112 reserve1 ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -2563,76 +2542,72 @@ function getReserves() external view returns (uint112 reserve0, uint112 reserve1 } } impl getReservesReturn { - fn _tokenize( - &self, - ) -> ::ReturnToken<'_> { + fn _tokenize(&self) -> ::ReturnToken<'_> { ( - as alloy_sol_types::SolType>::tokenize(&self.reserve0), - as alloy_sol_types::SolType>::tokenize(&self.reserve1), - as alloy_sol_types::SolType>::tokenize(&self.blockTimestampLast), + as alloy_sol_types::SolType>::tokenize( + &self.reserve0, + ), + as alloy_sol_types::SolType>::tokenize( + &self.reserve1, + ), + as alloy_sol_types::SolType>::tokenize( + &self.blockTimestampLast, + ), ) } } #[automatically_derived] impl alloy_sol_types::SolCall for getReservesCall { type Parameters<'a> = (); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = getReservesReturn; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = ( alloy_sol_types::sol_data::Uint<112>, alloy_sol_types::sol_data::Uint<112>, alloy_sol_types::sol_data::Uint<32>, ); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "getReserves()"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [9u8, 2u8, 241u8, 172u8]; + const SIGNATURE: &'static str = "getReserves()"; + #[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<'_> { getReservesReturn::_tokenize(ret) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) + 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) + 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(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `initialize(address,address)` and selector `0x485cc955`. -```solidity -function initialize(address, address) external; -```*/ + ```solidity + function initialize(address, address) external; + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct initializeCall { @@ -2641,7 +2616,8 @@ function initialize(address, address) external; #[allow(missing_docs)] pub _1: alloy_sol_types::private::Address, } - ///Container type for the return parameters of the [`initialize(address,address)`](initializeCall) function. + ///Container type for the return parameters of the + /// [`initialize(address,address)`](initializeCall) function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct initializeReturn {} @@ -2652,7 +2628,7 @@ function initialize(address, address) external; clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -2667,9 +2643,7 @@ function initialize(address, address) external; ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -2687,7 +2661,10 @@ function initialize(address, address) external; #[doc(hidden)] impl ::core::convert::From> for initializeCall { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { - Self { _0: tuple.0, _1: tuple.1 } + Self { + _0: tuple.0, + _1: tuple.1, + } } } } @@ -2699,9 +2676,7 @@ function initialize(address, address) external; type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -2724,9 +2699,7 @@ function initialize(address, address) external; } } impl initializeReturn { - fn _tokenize( - &self, - ) -> ::ReturnToken<'_> { + fn _tokenize(&self) -> ::ReturnToken<'_> { () } } @@ -2736,22 +2709,21 @@ function initialize(address, address) external; alloy_sol_types::sol_data::Address, alloy_sol_types::sol_data::Address, ); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = initializeReturn; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "initialize(address,address)"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [72u8, 92u8, 201u8, 85u8]; + const SIGNATURE: &'static str = "initialize(address,address)"; + #[inline] fn new<'a>( tuple: as alloy_sol_types::SolType>::RustType, ) -> Self { tuple.into() } + #[inline] fn tokenize(&self) -> Self::Token<'_> { ( @@ -2763,33 +2735,32 @@ function initialize(address, address) external; ), ) } + #[inline] fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { initializeReturn::_tokenize(ret) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) + 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) + 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(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `mint(address)` and selector `0x6a627842`. -```solidity -function mint(address to) external returns (uint256 liquidity); -```*/ + ```solidity + function mint(address to) external returns (uint256 liquidity); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct mintCall { @@ -2797,7 +2768,8 @@ function mint(address to) external returns (uint256 liquidity); pub to: alloy_sol_types::private::Address, } #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`mint(address)`](mintCall) function. + ///Container type for the return parameters of the + /// [`mint(address)`](mintCall) function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct mintReturn { @@ -2811,7 +2783,7 @@ function mint(address to) external returns (uint256 liquidity); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -2820,9 +2792,7 @@ function mint(address to) external returns (uint256 liquidity); type UnderlyingRustTuple<'a> = (alloy_sol_types::private::Address,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -2849,14 +2819,10 @@ function mint(address to) external returns (uint256 liquidity); #[allow(dead_code)] type UnderlyingSolTuple<'a> = (alloy_sol_types::sol_data::Uint<256>,); #[doc(hidden)] - type UnderlyingRustTuple<'a> = ( - alloy_sol_types::private::primitives::aliases::U256, - ); + 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, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -2881,22 +2847,21 @@ function mint(address to) external returns (uint256 liquidity); #[automatically_derived] impl alloy_sol_types::SolCall for mintCall { 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 ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (alloy_sol_types::sol_data::Uint<256>,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "mint(address)"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [106u8, 98u8, 120u8, 66u8]; + const SIGNATURE: &'static str = "mint(address)"; + #[inline] fn new<'a>( tuple: as alloy_sol_types::SolType>::RustType, ) -> Self { tuple.into() } + #[inline] fn tokenize(&self) -> Self::Token<'_> { ( @@ -2905,48 +2870,49 @@ function mint(address to) external returns (uint256 liquidity); ), ) } + #[inline] fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { ( - as alloy_sol_types::SolType>::tokenize(ret), + 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| { + as alloy_sol_types::SolType>::abi_decode_sequence(data).map( + |r| { let r: mintReturn = r.into(); r.liquidity - }) + }, + ) } + #[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: mintReturn = r.into(); - r.liquidity - }) + 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: mintReturn = r.into(); + r.liquidity + }) } } }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `name()` and selector `0x06fdde03`. -```solidity -function name() external pure returns (string memory); -```*/ + ```solidity + function name() external pure returns (string memory); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct nameCall; #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`name()`](nameCall) function. + ///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 { @@ -2960,7 +2926,7 @@ function name() external pure returns (string memory); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -2969,9 +2935,7 @@ function name() external pure returns (string memory); type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -3001,9 +2965,7 @@ function name() external pure returns (string memory); type UnderlyingRustTuple<'a> = (alloy_sol_types::private::String,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -3028,63 +2990,58 @@ function name() external pure returns (string memory); #[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 ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (alloy_sol_types::sol_data::String,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "name()"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [6u8, 253u8, 222u8, 3u8]; + const SIGNATURE: &'static str = "name()"; + #[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, - ), - ) + (::tokenize(ret),) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) - .map(|r| { + 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 - }) + 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(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `nonces(address)` and selector `0x7ecebe00`. -```solidity -function nonces(address owner) external view returns (uint256); -```*/ + ```solidity + function nonces(address owner) external view returns (uint256); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct noncesCall { @@ -3092,7 +3049,8 @@ function nonces(address owner) external view returns (uint256); pub owner: alloy_sol_types::private::Address, } #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`nonces(address)`](noncesCall) function. + ///Container type for the return parameters of the + /// [`nonces(address)`](noncesCall) function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct noncesReturn { @@ -3106,7 +3064,7 @@ function nonces(address owner) external view returns (uint256); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -3115,9 +3073,7 @@ function nonces(address owner) external view returns (uint256); type UnderlyingRustTuple<'a> = (alloy_sol_types::private::Address,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -3144,14 +3100,10 @@ function nonces(address owner) external view returns (uint256); #[allow(dead_code)] type UnderlyingSolTuple<'a> = (alloy_sol_types::sol_data::Uint<256>,); #[doc(hidden)] - type UnderlyingRustTuple<'a> = ( - alloy_sol_types::private::primitives::aliases::U256, - ); + 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, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -3176,22 +3128,21 @@ function nonces(address owner) external view returns (uint256); #[automatically_derived] impl alloy_sol_types::SolCall for noncesCall { 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 ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (alloy_sol_types::sol_data::Uint<256>,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "nonces(address)"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [126u8, 206u8, 190u8, 0u8]; + const SIGNATURE: &'static str = "nonces(address)"; + #[inline] fn new<'a>( tuple: as alloy_sol_types::SolType>::RustType, ) -> Self { tuple.into() } + #[inline] fn tokenize(&self) -> Self::Token<'_> { ( @@ -3200,43 +3151,43 @@ function nonces(address owner) external view returns (uint256); ), ) } + #[inline] fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { ( - as alloy_sol_types::SolType>::tokenize(ret), + 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| { + as alloy_sol_types::SolType>::abi_decode_sequence(data).map( + |r| { let r: noncesReturn = 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: noncesReturn = r.into(); - r._0 - }) + 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: noncesReturn = r.into(); + r._0 + }) } } }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `permit(address,address,uint256,uint256,uint8,bytes32,bytes32)` and selector `0xd505accf`. -```solidity -function permit(address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) external; -```*/ + ```solidity + function permit(address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) external; + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct permitCall { @@ -3255,7 +3206,9 @@ function permit(address owner, address spender, uint256 value, uint256 deadline, #[allow(missing_docs)] pub s: alloy_sol_types::private::FixedBytes<32>, } - ///Container type for the return parameters of the [`permit(address,address,uint256,uint256,uint8,bytes32,bytes32)`](permitCall) function. + ///Container type for the return parameters of the + /// [`permit(address,address,uint256,uint256,uint8,bytes32, + /// bytes32)`](permitCall) function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct permitReturn {} @@ -3266,7 +3219,7 @@ function permit(address owner, address spender, uint256 value, uint256 deadline, clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -3291,9 +3244,7 @@ function permit(address owner, address spender, uint256 value, uint256 deadline, ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -3339,9 +3290,7 @@ function permit(address owner, address spender, uint256 value, uint256 deadline, type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -3364,9 +3313,7 @@ function permit(address owner, address spender, uint256 value, uint256 deadline, } } impl permitReturn { - fn _tokenize( - &self, - ) -> ::ReturnToken<'_> { + fn _tokenize(&self) -> ::ReturnToken<'_> { () } } @@ -3381,22 +3328,22 @@ function permit(address owner, address spender, uint256 value, uint256 deadline, alloy_sol_types::sol_data::FixedBytes<32>, alloy_sol_types::sol_data::FixedBytes<32>, ); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = permitReturn; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "permit(address,address,uint256,uint256,uint8,bytes32,bytes32)"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [213u8, 5u8, 172u8, 207u8]; + const SIGNATURE: &'static str = + "permit(address,address,uint256,uint256,uint8,bytes32,bytes32)"; + #[inline] fn new<'a>( tuple: as alloy_sol_types::SolType>::RustType, ) -> Self { tuple.into() } + #[inline] fn tokenize(&self) -> Self::Token<'_> { ( @@ -3423,33 +3370,32 @@ function permit(address owner, address spender, uint256 value, uint256 deadline, > as alloy_sol_types::SolType>::tokenize(&self.s), ) } + #[inline] fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { permitReturn::_tokenize(ret) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) + 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) + 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(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `swap(uint256,uint256,address,bytes)` and selector `0x022c0d9f`. -```solidity -function swap(uint256 amount0Out, uint256 amount1Out, address to, bytes memory data) external; -```*/ + ```solidity + function swap(uint256 amount0Out, uint256 amount1Out, address to, bytes memory data) external; + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct swapCall { @@ -3462,7 +3408,8 @@ function swap(uint256 amount0Out, uint256 amount1Out, address to, bytes memory d #[allow(missing_docs)] pub data: alloy_sol_types::private::Bytes, } - ///Container type for the return parameters of the [`swap(uint256,uint256,address,bytes)`](swapCall) function. + ///Container type for the return parameters of the + /// [`swap(uint256,uint256,address,bytes)`](swapCall) function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct swapReturn {} @@ -3473,7 +3420,7 @@ function swap(uint256 amount0Out, uint256 amount1Out, address to, bytes memory d clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -3492,9 +3439,7 @@ function swap(uint256 amount0Out, uint256 amount1Out, address to, bytes memory d ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -3529,9 +3474,7 @@ function swap(uint256 amount0Out, uint256 amount1Out, address to, bytes memory d type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -3554,9 +3497,7 @@ function swap(uint256 amount0Out, uint256 amount1Out, address to, bytes memory d } } impl swapReturn { - fn _tokenize( - &self, - ) -> ::ReturnToken<'_> { + fn _tokenize(&self) -> ::ReturnToken<'_> { () } } @@ -3568,31 +3509,30 @@ function swap(uint256 amount0Out, uint256 amount1Out, address to, bytes memory d alloy_sol_types::sol_data::Address, alloy_sol_types::sol_data::Bytes, ); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = swapReturn; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "swap(uint256,uint256,address,bytes)"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [2u8, 44u8, 13u8, 159u8]; + const SIGNATURE: &'static str = "swap(uint256,uint256,address,bytes)"; + #[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.amount0Out), - as alloy_sol_types::SolType>::tokenize(&self.amount1Out), + as alloy_sol_types::SolType>::tokenize( + &self.amount0Out, + ), + as alloy_sol_types::SolType>::tokenize( + &self.amount1Out, + ), ::tokenize( &self.to, ), @@ -3601,38 +3541,38 @@ function swap(uint256 amount0Out, uint256 amount1Out, address to, bytes memory d ), ) } + #[inline] fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { swapReturn::_tokenize(ret) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) + 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) + 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(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `symbol()` and selector `0x95d89b41`. -```solidity -function symbol() external pure returns (string memory); -```*/ + ```solidity + function symbol() external pure returns (string memory); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct symbolCall; #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`symbol()`](symbolCall) function. + ///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 { @@ -3646,7 +3586,7 @@ function symbol() external pure returns (string memory); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -3655,9 +3595,7 @@ function symbol() external pure returns (string memory); type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -3687,9 +3625,7 @@ function symbol() external pure returns (string memory); type UnderlyingRustTuple<'a> = (alloy_sol_types::private::String,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -3714,67 +3650,63 @@ function symbol() external pure returns (string memory); #[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 ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (alloy_sol_types::sol_data::String,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "symbol()"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [149u8, 216u8, 155u8, 65u8]; + const SIGNATURE: &'static str = "symbol()"; + #[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, - ), - ) + (::tokenize(ret),) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) - .map(|r| { + 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 - }) + 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(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `sync()` and selector `0xfff6cae9`. -```solidity -function sync() external; -```*/ + ```solidity + function sync() external; + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct syncCall; - ///Container type for the return parameters of the [`sync()`](syncCall) function. + ///Container type for the return parameters of the [`sync()`](syncCall) + /// function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct syncReturn {} @@ -3785,7 +3717,7 @@ function sync() external; clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -3794,9 +3726,7 @@ function sync() external; type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -3826,9 +3756,7 @@ function sync() external; type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -3851,67 +3779,64 @@ function sync() external; } } impl syncReturn { - fn _tokenize( - &self, - ) -> ::ReturnToken<'_> { + fn _tokenize(&self) -> ::ReturnToken<'_> { () } } #[automatically_derived] impl alloy_sol_types::SolCall for syncCall { type Parameters<'a> = (); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = syncReturn; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "sync()"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [255u8, 246u8, 202u8, 233u8]; + const SIGNATURE: &'static str = "sync()"; + #[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<'_> { syncReturn::_tokenize(ret) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) + 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) + 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(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `token0()` and selector `0x0dfe1681`. -```solidity -function token0() external view returns (address); -```*/ + ```solidity + function token0() external view returns (address); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct token0Call; #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`token0()`](token0Call) function. + ///Container type for the return parameters of the [`token0()`](token0Call) + /// function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct token0Return { @@ -3925,7 +3850,7 @@ function token0() external view returns (address); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -3934,9 +3859,7 @@ function token0() external view returns (address); type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -3966,9 +3889,7 @@ function token0() external view returns (address); type UnderlyingRustTuple<'a> = (alloy_sol_types::private::Address,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -3993,68 +3914,64 @@ function token0() external view returns (address); #[automatically_derived] impl alloy_sol_types::SolCall for token0Call { type Parameters<'a> = (); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = alloy_sol_types::private::Address; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (alloy_sol_types::sol_data::Address,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "token0()"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [13u8, 254u8, 22u8, 129u8]; + const SIGNATURE: &'static str = "token0()"; + #[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, - ), - ) + (::tokenize(ret),) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) - .map(|r| { + as alloy_sol_types::SolType>::abi_decode_sequence(data).map( + |r| { let r: token0Return = 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: token0Return = r.into(); - r._0 - }) + 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: token0Return = r.into(); + r._0 + }) } } }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `token1()` and selector `0xd21220a7`. -```solidity -function token1() external view returns (address); -```*/ + ```solidity + function token1() external view returns (address); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct token1Call; #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`token1()`](token1Call) function. + ///Container type for the return parameters of the [`token1()`](token1Call) + /// function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct token1Return { @@ -4068,7 +3985,7 @@ function token1() external view returns (address); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -4077,9 +3994,7 @@ function token1() external view returns (address); type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -4109,9 +4024,7 @@ function token1() external view returns (address); type UnderlyingRustTuple<'a> = (alloy_sol_types::private::Address,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -4136,63 +4049,58 @@ function token1() external view returns (address); #[automatically_derived] impl alloy_sol_types::SolCall for token1Call { type Parameters<'a> = (); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = alloy_sol_types::private::Address; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (alloy_sol_types::sol_data::Address,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "token1()"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [210u8, 18u8, 32u8, 167u8]; + const SIGNATURE: &'static str = "token1()"; + #[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, - ), - ) + (::tokenize(ret),) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) - .map(|r| { + as alloy_sol_types::SolType>::abi_decode_sequence(data).map( + |r| { let r: token1Return = 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: token1Return = r.into(); - r._0 - }) + 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: token1Return = r.into(); + r._0 + }) } } }; #[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); -```*/ + ```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 { @@ -4202,7 +4110,8 @@ function transfer(address to, uint256 value) external returns (bool); pub value: alloy_sol_types::private::primitives::aliases::U256, } #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`transfer(address,uint256)`](transferCall) function. + ///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 { @@ -4216,7 +4125,7 @@ function transfer(address to, uint256 value) external returns (bool); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -4231,9 +4140,7 @@ function transfer(address to, uint256 value) external returns (bool); ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -4266,9 +4173,7 @@ function transfer(address to, uint256 value) external returns (bool); type UnderlyingRustTuple<'a> = (bool,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -4296,70 +4201,65 @@ function transfer(address to, uint256 value) external returns (bool); 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 ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; 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)"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [169u8, 5u8, 156u8, 187u8]; + const SIGNATURE: &'static str = "transfer(address,uint256)"; + #[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), + as alloy_sol_types::SolType>::tokenize( + &self.value, + ), ) } + #[inline] fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { - ( - ::tokenize( - ret, - ), - ) + (::tokenize(ret),) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) - .map(|r| { + 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 - }) + 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(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); -```*/ + ```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 { @@ -4371,7 +4271,8 @@ function transferFrom(address from, address to, uint256 value) external returns pub value: alloy_sol_types::private::primitives::aliases::U256, } #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`transferFrom(address,address,uint256)`](transferFromCall) function. + ///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 { @@ -4385,7 +4286,7 @@ function transferFrom(address from, address to, uint256 value) external returns clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -4402,9 +4303,7 @@ function transferFrom(address from, address to, uint256 value) external returns ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -4438,9 +4337,7 @@ function transferFrom(address from, address to, uint256 value) external returns type UnderlyingRustTuple<'a> = (bool,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -4469,22 +4366,21 @@ function transferFrom(address from, address to, uint256 value) external returns 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 ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; 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)"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [35u8, 184u8, 114u8, 221u8]; + const SIGNATURE: &'static str = "transferFrom(address,address,uint256)"; + #[inline] fn new<'a>( tuple: as alloy_sol_types::SolType>::RustType, ) -> Self { tuple.into() } + #[inline] fn tokenize(&self) -> Self::Token<'_> { ( @@ -4494,46 +4390,41 @@ function transferFrom(address from, address to, uint256 value) external returns ::tokenize( &self.to, ), - as alloy_sol_types::SolType>::tokenize(&self.value), + as alloy_sol_types::SolType>::tokenize( + &self.value, + ), ) } + #[inline] fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { - ( - ::tokenize( - ret, - ), - ) + (::tokenize(ret),) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) - .map(|r| { + 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 - }) + 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 + }) } } }; ///Container for all the [`IUniswapLikePair`](self) function calls. #[derive(Clone)] - #[derive()] pub enum IUniswapLikePairCalls { #[allow(missing_docs)] DOMAIN_SEPARATOR(DOMAIN_SEPARATORCall), @@ -4579,8 +4470,9 @@ function transferFrom(address from, address to, uint256 value) external returns impl IUniswapLikePairCalls { /// 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. + /// 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]] = &[ @@ -4605,29 +4497,6 @@ function transferFrom(address from, address to, uint256 value) external returns [221u8, 98u8, 237u8, 62u8], [255u8, 246u8, 202u8, 233u8], ]; - /// The names of the variants in the same order as `SELECTORS`. - pub const VARIANT_NAMES: &'static [&'static str] = &[ - ::core::stringify!(swap), - ::core::stringify!(name), - ::core::stringify!(getReserves), - ::core::stringify!(approve), - ::core::stringify!(token0), - ::core::stringify!(transferFrom), - ::core::stringify!(decimals), - ::core::stringify!(DOMAIN_SEPARATOR), - ::core::stringify!(initialize), - ::core::stringify!(mint), - ::core::stringify!(balanceOf), - ::core::stringify!(nonces), - ::core::stringify!(burn), - ::core::stringify!(symbol), - ::core::stringify!(transfer), - ::core::stringify!(factory), - ::core::stringify!(token1), - ::core::stringify!(permit), - ::core::stringify!(allowance), - ::core::stringify!(sync), - ]; /// The signatures in the same order as `SELECTORS`. pub const SIGNATURES: &'static [&'static str] = &[ ::SIGNATURE, @@ -4651,6 +4520,30 @@ function transferFrom(address from, address to, uint256 value) external returns ::SIGNATURE, ::SIGNATURE, ]; + /// The names of the variants in the same order as `SELECTORS`. + pub const VARIANT_NAMES: &'static [&'static str] = &[ + ::core::stringify!(swap), + ::core::stringify!(name), + ::core::stringify!(getReserves), + ::core::stringify!(approve), + ::core::stringify!(token0), + ::core::stringify!(transferFrom), + ::core::stringify!(decimals), + ::core::stringify!(DOMAIN_SEPARATOR), + ::core::stringify!(initialize), + ::core::stringify!(mint), + ::core::stringify!(balanceOf), + ::core::stringify!(nonces), + ::core::stringify!(burn), + ::core::stringify!(symbol), + ::core::stringify!(transfer), + ::core::stringify!(factory), + ::core::stringify!(token1), + ::core::stringify!(permit), + ::core::stringify!(allowance), + ::core::stringify!(sync), + ]; + /// Returns the signature for the given selector, if known. #[inline] pub fn signature_by_selector( @@ -4663,42 +4556,34 @@ function transferFrom(address from, address to, uint256 value) external returns ::core::result::Result::Err(_) => ::core::option::Option::None, } } + /// Returns the enum variant name for the given selector, if known. #[inline] - pub fn name_by_selector( - selector: [u8; 4usize], - ) -> ::core::option::Option<&'static str> { + pub fn name_by_selector(selector: [u8; 4usize]) -> ::core::option::Option<&'static str> { let sig = Self::signature_by_selector(selector)?; sig.split_once('(').map(|(name, _)| name) } } #[automatically_derived] impl alloy_sol_types::SolInterface for IUniswapLikePairCalls { - const NAME: &'static str = "IUniswapLikePairCalls"; - const MIN_DATA_LENGTH: usize = 0usize; const COUNT: usize = 20usize; + const MIN_DATA_LENGTH: usize = 0usize; + const NAME: &'static str = "IUniswapLikePairCalls"; + #[inline] fn selector(&self) -> [u8; 4] { match self { Self::DOMAIN_SEPARATOR(_) => { ::SELECTOR } - Self::allowance(_) => { - ::SELECTOR - } + Self::allowance(_) => ::SELECTOR, Self::approve(_) => ::SELECTOR, - Self::balanceOf(_) => { - ::SELECTOR - } + Self::balanceOf(_) => ::SELECTOR, Self::burn(_) => ::SELECTOR, Self::decimals(_) => ::SELECTOR, Self::factory(_) => ::SELECTOR, - Self::getReserves(_) => { - ::SELECTOR - } - Self::initialize(_) => { - ::SELECTOR - } + Self::getReserves(_) => ::SELECTOR, + Self::initialize(_) => ::SELECTOR, Self::mint(_) => ::SELECTOR, Self::name(_) => ::SELECTOR, Self::nonces(_) => ::SELECTOR, @@ -4709,90 +4594,68 @@ function transferFrom(address from, address to, uint256 value) external returns Self::token0(_) => ::SELECTOR, Self::token1(_) => ::SELECTOR, Self::transfer(_) => ::SELECTOR, - Self::transferFrom(_) => { - ::SELECTOR - } + Self::transferFrom(_) => ::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 abi_decode_raw(selector: [u8; 4], data: &[u8]) -> alloy_sol_types::Result { + static DECODE_SHIMS: &[fn(&[u8]) -> alloy_sol_types::Result] = &[ { - fn swap( - data: &[u8], - ) -> alloy_sol_types::Result { + fn swap(data: &[u8]) -> alloy_sol_types::Result { ::abi_decode_raw(data) .map(IUniswapLikePairCalls::swap) } swap }, { - fn name( - data: &[u8], - ) -> alloy_sol_types::Result { + fn name(data: &[u8]) -> alloy_sol_types::Result { ::abi_decode_raw(data) .map(IUniswapLikePairCalls::name) } name }, { - fn getReserves( - data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, - ) + fn getReserves(data: &[u8]) -> alloy_sol_types::Result { + ::abi_decode_raw(data) .map(IUniswapLikePairCalls::getReserves) } getReserves }, { - fn approve( - data: &[u8], - ) -> alloy_sol_types::Result { + fn approve(data: &[u8]) -> alloy_sol_types::Result { ::abi_decode_raw(data) .map(IUniswapLikePairCalls::approve) } approve }, { - fn token0( - data: &[u8], - ) -> alloy_sol_types::Result { + fn token0(data: &[u8]) -> alloy_sol_types::Result { ::abi_decode_raw(data) .map(IUniswapLikePairCalls::token0) } token0 }, { - fn transferFrom( - data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, - ) + fn transferFrom(data: &[u8]) -> alloy_sol_types::Result { + ::abi_decode_raw(data) .map(IUniswapLikePairCalls::transferFrom) } transferFrom }, { - fn decimals( - data: &[u8], - ) -> alloy_sol_types::Result { + fn decimals(data: &[u8]) -> alloy_sol_types::Result { ::abi_decode_raw(data) .map(IUniswapLikePairCalls::decimals) } @@ -4802,118 +4665,90 @@ function transferFrom(address from, address to, uint256 value) external returns fn DOMAIN_SEPARATOR( data: &[u8], ) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, - ) + ::abi_decode_raw(data) .map(IUniswapLikePairCalls::DOMAIN_SEPARATOR) } DOMAIN_SEPARATOR }, { - fn initialize( - data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, - ) + fn initialize(data: &[u8]) -> alloy_sol_types::Result { + ::abi_decode_raw(data) .map(IUniswapLikePairCalls::initialize) } initialize }, { - fn mint( - data: &[u8], - ) -> alloy_sol_types::Result { + fn mint(data: &[u8]) -> alloy_sol_types::Result { ::abi_decode_raw(data) .map(IUniswapLikePairCalls::mint) } mint }, { - fn balanceOf( - data: &[u8], - ) -> alloy_sol_types::Result { + fn balanceOf(data: &[u8]) -> alloy_sol_types::Result { ::abi_decode_raw(data) .map(IUniswapLikePairCalls::balanceOf) } balanceOf }, { - fn nonces( - data: &[u8], - ) -> alloy_sol_types::Result { + fn nonces(data: &[u8]) -> alloy_sol_types::Result { ::abi_decode_raw(data) .map(IUniswapLikePairCalls::nonces) } nonces }, { - fn burn( - data: &[u8], - ) -> alloy_sol_types::Result { + fn burn(data: &[u8]) -> alloy_sol_types::Result { ::abi_decode_raw(data) .map(IUniswapLikePairCalls::burn) } burn }, { - fn symbol( - data: &[u8], - ) -> alloy_sol_types::Result { + fn symbol(data: &[u8]) -> alloy_sol_types::Result { ::abi_decode_raw(data) .map(IUniswapLikePairCalls::symbol) } symbol }, { - fn transfer( - data: &[u8], - ) -> alloy_sol_types::Result { + fn transfer(data: &[u8]) -> alloy_sol_types::Result { ::abi_decode_raw(data) .map(IUniswapLikePairCalls::transfer) } transfer }, { - fn factory( - data: &[u8], - ) -> alloy_sol_types::Result { + fn factory(data: &[u8]) -> alloy_sol_types::Result { ::abi_decode_raw(data) .map(IUniswapLikePairCalls::factory) } factory }, { - fn token1( - data: &[u8], - ) -> alloy_sol_types::Result { + fn token1(data: &[u8]) -> alloy_sol_types::Result { ::abi_decode_raw(data) .map(IUniswapLikePairCalls::token1) } token1 }, { - fn permit( - data: &[u8], - ) -> alloy_sol_types::Result { + fn permit(data: &[u8]) -> alloy_sol_types::Result { ::abi_decode_raw(data) .map(IUniswapLikePairCalls::permit) } permit }, { - fn allowance( - data: &[u8], - ) -> alloy_sol_types::Result { + fn allowance(data: &[u8]) -> alloy_sol_types::Result { ::abi_decode_raw(data) .map(IUniswapLikePairCalls::allowance) } allowance }, { - fn sync( - data: &[u8], - ) -> alloy_sol_types::Result { + fn sync(data: &[u8]) -> alloy_sol_types::Result { ::abi_decode_raw(data) .map(IUniswapLikePairCalls::sync) } @@ -4921,15 +4756,14 @@ function transferFrom(address from, address to, uint256 value) external returns }, ]; let Ok(idx) = Self::SELECTORS.binary_search(&selector) else { - return Err( - alloy_sol_types::Error::unknown_selector( - ::NAME, - selector, - ), - ); + return Err(alloy_sol_types::Error::unknown_selector( + ::NAME, + selector, + )); }; DECODE_SHIMS[idx](data) } + #[inline] #[allow(non_snake_case)] fn abi_decode_raw_validate( @@ -4938,80 +4772,56 @@ function transferFrom(address from, address to, uint256 value) external returns ) -> alloy_sol_types::Result { static DECODE_VALIDATE_SHIMS: &[fn( &[u8], - ) -> alloy_sol_types::Result] = &[ + ) -> alloy_sol_types::Result< + IUniswapLikePairCalls, + >] = &[ { - fn swap( - data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) + fn swap(data: &[u8]) -> alloy_sol_types::Result { + ::abi_decode_raw_validate(data) .map(IUniswapLikePairCalls::swap) } swap }, { - fn name( - data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) + fn name(data: &[u8]) -> alloy_sol_types::Result { + ::abi_decode_raw_validate(data) .map(IUniswapLikePairCalls::name) } name }, { - fn getReserves( - data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) + fn getReserves(data: &[u8]) -> alloy_sol_types::Result { + ::abi_decode_raw_validate(data) .map(IUniswapLikePairCalls::getReserves) } getReserves }, { - fn approve( - data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) + fn approve(data: &[u8]) -> alloy_sol_types::Result { + ::abi_decode_raw_validate(data) .map(IUniswapLikePairCalls::approve) } approve }, { - fn token0( - data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) + fn token0(data: &[u8]) -> alloy_sol_types::Result { + ::abi_decode_raw_validate(data) .map(IUniswapLikePairCalls::token0) } token0 }, { - fn transferFrom( - data: &[u8], - ) -> alloy_sol_types::Result { + fn transferFrom(data: &[u8]) -> alloy_sol_types::Result { ::abi_decode_raw_validate( - data, - ) - .map(IUniswapLikePairCalls::transferFrom) + data, + ) + .map(IUniswapLikePairCalls::transferFrom) } transferFrom }, { - fn decimals( - data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) + fn decimals(data: &[u8]) -> alloy_sol_types::Result { + ::abi_decode_raw_validate(data) .map(IUniswapLikePairCalls::decimals) } decimals @@ -5021,162 +4831,111 @@ function transferFrom(address from, address to, uint256 value) external returns data: &[u8], ) -> alloy_sol_types::Result { ::abi_decode_raw_validate( - data, - ) - .map(IUniswapLikePairCalls::DOMAIN_SEPARATOR) + data, + ) + .map(IUniswapLikePairCalls::DOMAIN_SEPARATOR) } DOMAIN_SEPARATOR }, { - fn initialize( - data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) + fn initialize(data: &[u8]) -> alloy_sol_types::Result { + ::abi_decode_raw_validate(data) .map(IUniswapLikePairCalls::initialize) } initialize }, { - fn mint( - data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) + fn mint(data: &[u8]) -> alloy_sol_types::Result { + ::abi_decode_raw_validate(data) .map(IUniswapLikePairCalls::mint) } mint }, { - fn balanceOf( - data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) + fn balanceOf(data: &[u8]) -> alloy_sol_types::Result { + ::abi_decode_raw_validate(data) .map(IUniswapLikePairCalls::balanceOf) } balanceOf }, { - fn nonces( - data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) + fn nonces(data: &[u8]) -> alloy_sol_types::Result { + ::abi_decode_raw_validate(data) .map(IUniswapLikePairCalls::nonces) } nonces }, { - fn burn( - data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) + fn burn(data: &[u8]) -> alloy_sol_types::Result { + ::abi_decode_raw_validate(data) .map(IUniswapLikePairCalls::burn) } burn }, { - fn symbol( - data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) + fn symbol(data: &[u8]) -> alloy_sol_types::Result { + ::abi_decode_raw_validate(data) .map(IUniswapLikePairCalls::symbol) } symbol }, { - fn transfer( - data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) + fn transfer(data: &[u8]) -> alloy_sol_types::Result { + ::abi_decode_raw_validate(data) .map(IUniswapLikePairCalls::transfer) } transfer }, { - fn factory( - data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) + fn factory(data: &[u8]) -> alloy_sol_types::Result { + ::abi_decode_raw_validate(data) .map(IUniswapLikePairCalls::factory) } factory }, { - fn token1( - data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) + fn token1(data: &[u8]) -> alloy_sol_types::Result { + ::abi_decode_raw_validate(data) .map(IUniswapLikePairCalls::token1) } token1 }, { - fn permit( - data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) + fn permit(data: &[u8]) -> alloy_sol_types::Result { + ::abi_decode_raw_validate(data) .map(IUniswapLikePairCalls::permit) } permit }, { - fn allowance( - data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) + fn allowance(data: &[u8]) -> alloy_sol_types::Result { + ::abi_decode_raw_validate(data) .map(IUniswapLikePairCalls::allowance) } allowance }, { - fn sync( - data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) + fn sync(data: &[u8]) -> alloy_sol_types::Result { + ::abi_decode_raw_validate(data) .map(IUniswapLikePairCalls::sync) } sync }, ]; let Ok(idx) = Self::SELECTORS.binary_search(&selector) else { - return Err( - alloy_sol_types::Error::unknown_selector( - ::NAME, - selector, - ), - ); + 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::DOMAIN_SEPARATOR(inner) => { - ::abi_encoded_size( - inner, - ) + ::abi_encoded_size(inner) } Self::allowance(inner) => { ::abi_encoded_size(inner) @@ -5197,9 +4956,7 @@ function transferFrom(address from, address to, uint256 value) external returns ::abi_encoded_size(inner) } Self::getReserves(inner) => { - ::abi_encoded_size( - inner, - ) + ::abi_encoded_size(inner) } Self::initialize(inner) => { ::abi_encoded_size(inner) @@ -5235,59 +4992,40 @@ function transferFrom(address from, address to, uint256 value) external returns ::abi_encoded_size(inner) } Self::transferFrom(inner) => { - ::abi_encoded_size( - inner, - ) + ::abi_encoded_size(inner) } } } + #[inline] fn abi_encode_raw(&self, out: &mut alloy_sol_types::private::Vec) { match self { Self::DOMAIN_SEPARATOR(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } Self::allowance(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } Self::approve(inner) => { ::abi_encode_raw(inner, out) } Self::balanceOf(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } Self::burn(inner) => { ::abi_encode_raw(inner, out) } Self::decimals(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } Self::factory(inner) => { ::abi_encode_raw(inner, out) } Self::getReserves(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } Self::initialize(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } Self::mint(inner) => { ::abi_encode_raw(inner, out) @@ -5317,23 +5055,16 @@ function transferFrom(address from, address to, uint256 value) external returns ::abi_encode_raw(inner, out) } Self::transfer(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } Self::transferFrom(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } } } } ///Container for all the [`IUniswapLikePair`](self) events. - #[derive(Clone)] - #[derive(Debug, PartialEq, Eq, Hash)] + #[derive(Clone, Debug, PartialEq, Eq, Hash)] pub enum IUniswapLikePairEvents { #[allow(missing_docs)] Approval(Approval), @@ -5351,51 +5082,43 @@ function transferFrom(address from, address to, uint256 value) external returns impl IUniswapLikePairEvents { /// 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. + /// 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]] = &[ [ - 28u8, 65u8, 30u8, 154u8, 150u8, 224u8, 113u8, 36u8, 28u8, 47u8, 33u8, - 247u8, 114u8, 107u8, 23u8, 174u8, 137u8, 227u8, 202u8, 180u8, 199u8, - 139u8, 229u8, 14u8, 6u8, 43u8, 3u8, 169u8, 255u8, 251u8, 186u8, 209u8, + 28u8, 65u8, 30u8, 154u8, 150u8, 224u8, 113u8, 36u8, 28u8, 47u8, 33u8, 247u8, 114u8, + 107u8, 23u8, 174u8, 137u8, 227u8, 202u8, 180u8, 199u8, 139u8, 229u8, 14u8, 6u8, + 43u8, 3u8, 169u8, 255u8, 251u8, 186u8, 209u8, ], [ - 76u8, 32u8, 155u8, 95u8, 200u8, 173u8, 80u8, 117u8, 143u8, 19u8, 226u8, - 225u8, 8u8, 139u8, 165u8, 106u8, 86u8, 13u8, 255u8, 105u8, 10u8, 28u8, - 111u8, 239u8, 38u8, 57u8, 79u8, 76u8, 3u8, 130u8, 28u8, 79u8, + 76u8, 32u8, 155u8, 95u8, 200u8, 173u8, 80u8, 117u8, 143u8, 19u8, 226u8, 225u8, 8u8, + 139u8, 165u8, 106u8, 86u8, 13u8, 255u8, 105u8, 10u8, 28u8, 111u8, 239u8, 38u8, + 57u8, 79u8, 76u8, 3u8, 130u8, 28u8, 79u8, ], [ - 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, + 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, ], [ - 215u8, 138u8, 217u8, 95u8, 164u8, 108u8, 153u8, 75u8, 101u8, 81u8, 208u8, - 218u8, 133u8, 252u8, 39u8, 95u8, 230u8, 19u8, 206u8, 55u8, 101u8, 127u8, - 184u8, 213u8, 227u8, 209u8, 48u8, 132u8, 1u8, 89u8, 216u8, 34u8, + 215u8, 138u8, 217u8, 95u8, 164u8, 108u8, 153u8, 75u8, 101u8, 81u8, 208u8, 218u8, + 133u8, 252u8, 39u8, 95u8, 230u8, 19u8, 206u8, 55u8, 101u8, 127u8, 184u8, 213u8, + 227u8, 209u8, 48u8, 132u8, 1u8, 89u8, 216u8, 34u8, ], [ - 220u8, 205u8, 65u8, 47u8, 11u8, 18u8, 82u8, 129u8, 156u8, 177u8, 253u8, - 51u8, 11u8, 147u8, 34u8, 76u8, 164u8, 38u8, 18u8, 137u8, 43u8, 179u8, - 244u8, 247u8, 137u8, 151u8, 110u8, 109u8, 129u8, 147u8, 100u8, 150u8, + 220u8, 205u8, 65u8, 47u8, 11u8, 18u8, 82u8, 129u8, 156u8, 177u8, 253u8, 51u8, 11u8, + 147u8, 34u8, 76u8, 164u8, 38u8, 18u8, 137u8, 43u8, 179u8, 244u8, 247u8, 137u8, + 151u8, 110u8, 109u8, 129u8, 147u8, 100u8, 150u8, ], [ - 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, + 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, ], ]; - /// The names of the variants in the same order as `SELECTORS`. - pub const VARIANT_NAMES: &'static [&'static str] = &[ - ::core::stringify!(Sync), - ::core::stringify!(Mint), - ::core::stringify!(Approval), - ::core::stringify!(Swap), - ::core::stringify!(Burn), - ::core::stringify!(Transfer), - ]; /// The signatures in the same order as `SELECTORS`. pub const SIGNATURES: &'static [&'static str] = &[ ::SIGNATURE, @@ -5405,6 +5128,16 @@ function transferFrom(address from, address to, uint256 value) external returns ::SIGNATURE, ::SIGNATURE, ]; + /// The names of the variants in the same order as `SELECTORS`. + pub const VARIANT_NAMES: &'static [&'static str] = &[ + ::core::stringify!(Sync), + ::core::stringify!(Mint), + ::core::stringify!(Approval), + ::core::stringify!(Swap), + ::core::stringify!(Burn), + ::core::stringify!(Transfer), + ]; + /// Returns the signature for the given selector, if known. #[inline] pub fn signature_by_selector( @@ -5417,19 +5150,19 @@ function transferFrom(address from, address to, uint256 value) external returns ::core::result::Result::Err(_) => ::core::option::Option::None, } } + /// Returns the enum variant name for the given selector, if known. #[inline] - pub fn name_by_selector( - selector: [u8; 32usize], - ) -> ::core::option::Option<&'static str> { + pub fn name_by_selector(selector: [u8; 32usize]) -> ::core::option::Option<&'static str> { let sig = Self::signature_by_selector(selector)?; sig.split_once('(').map(|(name, _)| name) } } #[automatically_derived] impl alloy_sol_types::SolEventInterface for IUniswapLikePairEvents { - const NAME: &'static str = "IUniswapLikePairEvents"; const COUNT: usize = 6usize; + const NAME: &'static str = "IUniswapLikePairEvents"; + fn decode_raw_log( topics: &[alloy_sol_types::Word], data: &[u8], @@ -5459,17 +5192,15 @@ function transferFrom(address from, address to, uint256 value) external returns ::decode_raw_log(topics, data) .map(Self::Transfer) } - _ => { - 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(), - ), + _ => 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(), ), - }) - } + ), + }), } } } @@ -5477,53 +5208,34 @@ function transferFrom(address from, address to, uint256 value) external returns impl alloy_sol_types::private::IntoLogData for IUniswapLikePairEvents { 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::Burn(inner) => { - alloy_sol_types::private::IntoLogData::to_log_data(inner) - } - Self::Mint(inner) => { - alloy_sol_types::private::IntoLogData::to_log_data(inner) - } - Self::Swap(inner) => { - alloy_sol_types::private::IntoLogData::to_log_data(inner) - } - Self::Sync(inner) => { - alloy_sol_types::private::IntoLogData::to_log_data(inner) - } - Self::Transfer(inner) => { - alloy_sol_types::private::IntoLogData::to_log_data(inner) - } + Self::Approval(inner) => alloy_sol_types::private::IntoLogData::to_log_data(inner), + Self::Burn(inner) => alloy_sol_types::private::IntoLogData::to_log_data(inner), + Self::Mint(inner) => alloy_sol_types::private::IntoLogData::to_log_data(inner), + Self::Swap(inner) => alloy_sol_types::private::IntoLogData::to_log_data(inner), + Self::Sync(inner) => alloy_sol_types::private::IntoLogData::to_log_data(inner), + Self::Transfer(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::Burn(inner) => { - alloy_sol_types::private::IntoLogData::into_log_data(inner) - } - Self::Mint(inner) => { - alloy_sol_types::private::IntoLogData::into_log_data(inner) - } - Self::Swap(inner) => { - alloy_sol_types::private::IntoLogData::into_log_data(inner) - } - Self::Sync(inner) => { - alloy_sol_types::private::IntoLogData::into_log_data(inner) - } + Self::Burn(inner) => alloy_sol_types::private::IntoLogData::into_log_data(inner), + Self::Mint(inner) => alloy_sol_types::private::IntoLogData::into_log_data(inner), + Self::Swap(inner) => alloy_sol_types::private::IntoLogData::into_log_data(inner), + Self::Sync(inner) => alloy_sol_types::private::IntoLogData::into_log_data(inner), Self::Transfer(inner) => { alloy_sol_types::private::IntoLogData::into_log_data(inner) } } } } - use alloy_contract as alloy_contract; + use alloy_contract; /**Creates a new wrapper around an on-chain [`IUniswapLikePair`](self) contract instance. -See the [wrapper's documentation](`IUniswapLikePairInstance`) for more details.*/ + See the [wrapper's documentation](`IUniswapLikePairInstance`) for more details.*/ #[inline] pub const fn new< P: alloy_contract::private::Provider, @@ -5536,15 +5248,15 @@ See the [wrapper's documentation](`IUniswapLikePairInstance`) for more details.* } /**A [`IUniswapLikePair`](self) instance. -Contains type-safe methods for interacting with an on-chain instance of the -[`IUniswapLikePair`](self) contract located at a given `address`, using a given -provider `P`. + Contains type-safe methods for interacting with an on-chain instance of the + [`IUniswapLikePair`](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. + 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.*/ + See the [module-level documentation](self) for all the available methods.*/ #[derive(Clone)] pub struct IUniswapLikePairInstance { address: alloy_sol_types::private::Address, @@ -5555,43 +5267,45 @@ See the [module-level documentation](self) for all the available methods.*/ impl ::core::fmt::Debug for IUniswapLikePairInstance { #[inline] fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { - f.debug_tuple("IUniswapLikePairInstance").field(&self.address).finish() + f.debug_tuple("IUniswapLikePairInstance") + .field(&self.address) + .finish() } } /// Instantiation and getters/setters. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > IUniswapLikePairInstance { + impl, N: alloy_contract::private::Network> + IUniswapLikePairInstance + { /**Creates a new wrapper around an on-chain [`IUniswapLikePair`](self) contract instance. -See the [wrapper's documentation](`IUniswapLikePairInstance`) for more details.*/ + See the [wrapper's documentation](`IUniswapLikePairInstance`) for more details.*/ #[inline] - pub const fn new( - address: alloy_sol_types::private::Address, - __provider: P, - ) -> Self { + pub const fn new(address: alloy_sol_types::private::Address, __provider: P) -> Self { Self { address, provider: __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 { @@ -5599,7 +5313,8 @@ See the [wrapper's documentation](`IUniswapLikePairInstance`) for more details.* } } impl IUniswapLikePairInstance<&P, N> { - /// Clones the provider and returns a new instance with the cloned provider. + /// Clones the provider and returns a new instance with the cloned + /// provider. #[inline] pub fn with_cloned_provider(self) -> IUniswapLikePairInstance { IUniswapLikePairInstance { @@ -5610,26 +5325,29 @@ See the [wrapper's documentation](`IUniswapLikePairInstance`) for more details.* } } /// Function calls. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > IUniswapLikePairInstance { - /// Creates a new call builder using this contract instance's provider and address. + impl, N: alloy_contract::private::Network> + IUniswapLikePairInstance + { + /// 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. + /// 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 [`DOMAIN_SEPARATOR`] function. pub fn DOMAIN_SEPARATOR( &self, ) -> alloy_contract::SolCallBuilder<&P, DOMAIN_SEPARATORCall, N> { self.call_builder(&DOMAIN_SEPARATORCall) } + ///Creates a new call builder for the [`allowance`] function. pub fn allowance( &self, @@ -5638,6 +5356,7 @@ See the [wrapper's documentation](`IUniswapLikePairInstance`) for more details.* ) -> 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, @@ -5646,6 +5365,7 @@ See the [wrapper's documentation](`IUniswapLikePairInstance`) for more details.* ) -> 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, @@ -5653,6 +5373,7 @@ See the [wrapper's documentation](`IUniswapLikePairInstance`) for more details.* ) -> alloy_contract::SolCallBuilder<&P, balanceOfCall, N> { self.call_builder(&balanceOfCall { owner }) } + ///Creates a new call builder for the [`burn`] function. pub fn burn( &self, @@ -5660,20 +5381,22 @@ See the [wrapper's documentation](`IUniswapLikePairInstance`) for more details.* ) -> alloy_contract::SolCallBuilder<&P, burnCall, N> { self.call_builder(&burnCall { to }) } + ///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 [`factory`] function. pub fn factory(&self) -> alloy_contract::SolCallBuilder<&P, factoryCall, N> { self.call_builder(&factoryCall) } + ///Creates a new call builder for the [`getReserves`] function. - pub fn getReserves( - &self, - ) -> alloy_contract::SolCallBuilder<&P, getReservesCall, N> { + pub fn getReserves(&self) -> alloy_contract::SolCallBuilder<&P, getReservesCall, N> { self.call_builder(&getReservesCall) } + ///Creates a new call builder for the [`initialize`] function. pub fn initialize( &self, @@ -5682,6 +5405,7 @@ See the [wrapper's documentation](`IUniswapLikePairInstance`) for more details.* ) -> alloy_contract::SolCallBuilder<&P, initializeCall, N> { self.call_builder(&initializeCall { _0, _1 }) } + ///Creates a new call builder for the [`mint`] function. pub fn mint( &self, @@ -5689,10 +5413,12 @@ See the [wrapper's documentation](`IUniswapLikePairInstance`) for more details.* ) -> alloy_contract::SolCallBuilder<&P, mintCall, N> { self.call_builder(&mintCall { to }) } + ///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 [`nonces`] function. pub fn nonces( &self, @@ -5700,6 +5426,7 @@ See the [wrapper's documentation](`IUniswapLikePairInstance`) for more details.* ) -> alloy_contract::SolCallBuilder<&P, noncesCall, N> { self.call_builder(&noncesCall { owner }) } + ///Creates a new call builder for the [`permit`] function. pub fn permit( &self, @@ -5711,18 +5438,17 @@ See the [wrapper's documentation](`IUniswapLikePairInstance`) for more details.* r: alloy_sol_types::private::FixedBytes<32>, s: alloy_sol_types::private::FixedBytes<32>, ) -> alloy_contract::SolCallBuilder<&P, permitCall, N> { - self.call_builder( - &permitCall { - owner, - spender, - value, - deadline, - v, - r, - s, - }, - ) + self.call_builder(&permitCall { + owner, + spender, + value, + deadline, + v, + r, + s, + }) } + ///Creates a new call builder for the [`swap`] function. pub fn swap( &self, @@ -5731,31 +5457,34 @@ See the [wrapper's documentation](`IUniswapLikePairInstance`) for more details.* to: alloy_sol_types::private::Address, data: alloy_sol_types::private::Bytes, ) -> alloy_contract::SolCallBuilder<&P, swapCall, N> { - self.call_builder( - &swapCall { - amount0Out, - amount1Out, - to, - data, - }, - ) + self.call_builder(&swapCall { + amount0Out, + amount1Out, + to, + data, + }) } + ///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 [`sync`] function. pub fn sync(&self) -> alloy_contract::SolCallBuilder<&P, syncCall, N> { self.call_builder(&syncCall) } + ///Creates a new call builder for the [`token0`] function. pub fn token0(&self) -> alloy_contract::SolCallBuilder<&P, token0Call, N> { self.call_builder(&token0Call) } + ///Creates a new call builder for the [`token1`] function. pub fn token1(&self) -> alloy_contract::SolCallBuilder<&P, token1Call, N> { self.call_builder(&token1Call) } + ///Creates a new call builder for the [`transfer`] function. pub fn transfer( &self, @@ -5764,6 +5493,7 @@ See the [wrapper's documentation](`IUniswapLikePairInstance`) for more details.* ) -> 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, @@ -5771,55 +5501,54 @@ See the [wrapper's documentation](`IUniswapLikePairInstance`) for more details.* 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, - }, - ) + self.call_builder(&transferFromCall { from, to, value }) } } /// Event filters. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > IUniswapLikePairInstance { - /// Creates a new event filter using this contract instance's provider and address. + impl, N: alloy_contract::private::Network> + IUniswapLikePairInstance + { + /// 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. + /// 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 [`Burn`] event. pub fn Burn_filter(&self) -> alloy_contract::Event<&P, Burn, N> { self.event_filter::() } + ///Creates a new event filter for the [`Mint`] event. pub fn Mint_filter(&self) -> alloy_contract::Event<&P, Mint, N> { self.event_filter::() } + ///Creates a new event filter for the [`Swap`] event. pub fn Swap_filter(&self) -> alloy_contract::Event<&P, Swap, N> { self.event_filter::() } + ///Creates a new event filter for the [`Sync`] event. pub fn Sync_filter(&self) -> alloy_contract::Event<&P, Sync, 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::() } } } -pub type Instance = IUniswapLikePair::IUniswapLikePairInstance< - ::alloy_provider::DynProvider, ->; +pub type Instance = IUniswapLikePair::IUniswapLikePairInstance<::alloy_provider::DynProvider>; diff --git a/contracts/generated/contracts-generated/iuniswaplikerouter/src/lib.rs b/contracts/generated/contracts-generated/iuniswaplikerouter/src/lib.rs index 1009d02460..f9916afb59 100644 --- a/contracts/generated/contracts-generated/iuniswaplikerouter/src/lib.rs +++ b/contracts/generated/contracts-generated/iuniswaplikerouter/src/lib.rs @@ -1,4 +1,10 @@ -#![allow(unused_imports, unused_attributes, clippy::all, rustdoc::all, non_snake_case)] +#![allow( + unused_imports, + unused_attributes, + clippy::all, + rustdoc::all, + non_snake_case +)] //! Auto-generated contract bindings. Do not edit. /** @@ -184,18 +190,18 @@ interface IUniswapLikeRouter { clippy::empty_structs_with_brackets )] pub mod IUniswapLikeRouter { - use super::*; - use alloy_sol_types as alloy_sol_types; + use {super::*, alloy_sol_types}; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `WETH()` and selector `0xad5c4648`. -```solidity -function WETH() external pure returns (address); -```*/ + ```solidity + function WETH() external pure returns (address); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct WETHCall; #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`WETH()`](WETHCall) function. + ///Container type for the return parameters of the [`WETH()`](WETHCall) + /// function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct WETHReturn { @@ -209,7 +215,7 @@ function WETH() external pure returns (address); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -218,9 +224,7 @@ function WETH() external pure returns (address); type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -250,9 +254,7 @@ function WETH() external pure returns (address); type UnderlyingRustTuple<'a> = (alloy_sol_types::private::Address,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -277,63 +279,58 @@ function WETH() external pure returns (address); #[automatically_derived] impl alloy_sol_types::SolCall for WETHCall { type Parameters<'a> = (); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = alloy_sol_types::private::Address; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (alloy_sol_types::sol_data::Address,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "WETH()"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [173u8, 92u8, 70u8, 72u8]; + const SIGNATURE: &'static str = "WETH()"; + #[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, - ), - ) + (::tokenize(ret),) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) - .map(|r| { + as alloy_sol_types::SolType>::abi_decode_sequence(data).map( + |r| { let r: WETHReturn = 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: WETHReturn = r.into(); - r._0 - }) + 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: WETHReturn = r.into(); + r._0 + }) } } }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `addLiquidity(address,address,uint256,uint256,uint256,uint256,address,uint256)` and selector `0xe8e33700`. -```solidity -function addLiquidity(address tokenA, address tokenB, uint256 amountADesired, uint256 amountBDesired, uint256 amountAMin, uint256 amountBMin, address to, uint256 deadline) external returns (uint256 amountA, uint256 amountB, uint256 liquidity); -```*/ + ```solidity + function addLiquidity(address tokenA, address tokenB, uint256 amountADesired, uint256 amountBDesired, uint256 amountAMin, uint256 amountBMin, address to, uint256 deadline) external returns (uint256 amountA, uint256 amountB, uint256 liquidity); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct addLiquidityCall { @@ -355,7 +352,9 @@ function addLiquidity(address tokenA, address tokenB, uint256 amountADesired, ui pub deadline: alloy_sol_types::private::primitives::aliases::U256, } #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`addLiquidity(address,address,uint256,uint256,uint256,uint256,address,uint256)`](addLiquidityCall) function. + ///Container type for the return parameters of the + /// [`addLiquidity(address,address,uint256,uint256,uint256,uint256,address, + /// uint256)`](addLiquidityCall) function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct addLiquidityReturn { @@ -373,7 +372,7 @@ function addLiquidity(address tokenA, address tokenB, uint256 amountADesired, ui clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -400,9 +399,7 @@ function addLiquidity(address tokenA, address tokenB, uint256 amountADesired, ui ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -458,9 +455,7 @@ function addLiquidity(address tokenA, address tokenB, uint256 amountADesired, ui ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -487,19 +482,17 @@ function addLiquidity(address tokenA, address tokenB, uint256 amountADesired, ui } } impl addLiquidityReturn { - fn _tokenize( - &self, - ) -> ::ReturnToken<'_> { + fn _tokenize(&self) -> ::ReturnToken<'_> { ( - as alloy_sol_types::SolType>::tokenize(&self.amountA), - as alloy_sol_types::SolType>::tokenize(&self.amountB), - as alloy_sol_types::SolType>::tokenize(&self.liquidity), + as alloy_sol_types::SolType>::tokenize( + &self.amountA, + ), + as alloy_sol_types::SolType>::tokenize( + &self.amountB, + ), + as alloy_sol_types::SolType>::tokenize( + &self.liquidity, + ), ) } } @@ -515,26 +508,26 @@ function addLiquidity(address tokenA, address tokenB, uint256 amountADesired, ui 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 = addLiquidityReturn; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = ( alloy_sol_types::sol_data::Uint<256>, alloy_sol_types::sol_data::Uint<256>, alloy_sol_types::sol_data::Uint<256>, ); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "addLiquidity(address,address,uint256,uint256,uint256,uint256,address,uint256)"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [232u8, 227u8, 55u8, 0u8]; + const SIGNATURE: &'static str = + "addLiquidity(address,address,uint256,uint256,uint256,uint256,address,uint256)"; + #[inline] fn new<'a>( tuple: as alloy_sol_types::SolType>::RustType, ) -> Self { tuple.into() } + #[inline] fn tokenize(&self) -> Self::Token<'_> { ( @@ -544,58 +537,58 @@ function addLiquidity(address tokenA, address tokenB, uint256 amountADesired, ui ::tokenize( &self.tokenB, ), - as alloy_sol_types::SolType>::tokenize(&self.amountADesired), - as alloy_sol_types::SolType>::tokenize(&self.amountBDesired), - as alloy_sol_types::SolType>::tokenize(&self.amountAMin), - as alloy_sol_types::SolType>::tokenize(&self.amountBMin), + as alloy_sol_types::SolType>::tokenize( + &self.amountADesired, + ), + as alloy_sol_types::SolType>::tokenize( + &self.amountBDesired, + ), + as alloy_sol_types::SolType>::tokenize( + &self.amountAMin, + ), + as alloy_sol_types::SolType>::tokenize( + &self.amountBMin, + ), ::tokenize( &self.to, ), - as alloy_sol_types::SolType>::tokenize(&self.deadline), + as alloy_sol_types::SolType>::tokenize( + &self.deadline, + ), ) } + #[inline] fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { addLiquidityReturn::_tokenize(ret) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) + 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) + 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(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `factory()` and selector `0xc45a0155`. -```solidity -function factory() external pure returns (address); -```*/ + ```solidity + function factory() external pure returns (address); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct factoryCall; #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`factory()`](factoryCall) function. + ///Container type for the return parameters of the + /// [`factory()`](factoryCall) function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct factoryReturn { @@ -609,7 +602,7 @@ function factory() external pure returns (address); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -618,9 +611,7 @@ function factory() external pure returns (address); type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -650,9 +641,7 @@ function factory() external pure returns (address); type UnderlyingRustTuple<'a> = (alloy_sol_types::private::Address,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -677,63 +666,58 @@ function factory() external pure returns (address); #[automatically_derived] impl alloy_sol_types::SolCall for factoryCall { type Parameters<'a> = (); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = alloy_sol_types::private::Address; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (alloy_sol_types::sol_data::Address,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "factory()"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [196u8, 90u8, 1u8, 85u8]; + const SIGNATURE: &'static str = "factory()"; + #[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, - ), - ) + (::tokenize(ret),) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) - .map(|r| { + as alloy_sol_types::SolType>::abi_decode_sequence(data).map( + |r| { let r: factoryReturn = 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: factoryReturn = r.into(); - r._0 - }) + 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: factoryReturn = r.into(); + r._0 + }) } } }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `quote(uint256,uint256,uint256)` and selector `0xad615dec`. -```solidity -function quote(uint256 amountA, uint256 reserveA, uint256 reserveB) external pure returns (uint256 amountB); -```*/ + ```solidity + function quote(uint256 amountA, uint256 reserveA, uint256 reserveB) external pure returns (uint256 amountB); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct quoteCall { @@ -745,7 +729,8 @@ function quote(uint256 amountA, uint256 reserveA, uint256 reserveB) external pur pub reserveB: alloy_sol_types::private::primitives::aliases::U256, } #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`quote(uint256,uint256,uint256)`](quoteCall) function. + ///Container type for the return parameters of the + /// [`quote(uint256,uint256,uint256)`](quoteCall) function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct quoteReturn { @@ -759,7 +744,7 @@ function quote(uint256 amountA, uint256 reserveA, uint256 reserveB) external pur clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -776,9 +761,7 @@ function quote(uint256 amountA, uint256 reserveA, uint256 reserveB) external pur ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -809,14 +792,10 @@ function quote(uint256 amountA, uint256 reserveA, uint256 reserveB) external pur #[allow(dead_code)] type UnderlyingSolTuple<'a> = (alloy_sol_types::sol_data::Uint<256>,); #[doc(hidden)] - type UnderlyingRustTuple<'a> = ( - alloy_sol_types::private::primitives::aliases::U256, - ); + 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, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -845,73 +824,72 @@ function quote(uint256 amountA, uint256 reserveA, uint256 reserveB) external pur 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 = alloy_sol_types::private::primitives::aliases::U256; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (alloy_sol_types::sol_data::Uint<256>,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "quote(uint256,uint256,uint256)"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [173u8, 97u8, 93u8, 236u8]; + const SIGNATURE: &'static str = "quote(uint256,uint256,uint256)"; + #[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.amountA), - as alloy_sol_types::SolType>::tokenize(&self.reserveA), - as alloy_sol_types::SolType>::tokenize(&self.reserveB), + as alloy_sol_types::SolType>::tokenize( + &self.amountA, + ), + as alloy_sol_types::SolType>::tokenize( + &self.reserveA, + ), + as alloy_sol_types::SolType>::tokenize( + &self.reserveB, + ), ) } + #[inline] fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { ( - as alloy_sol_types::SolType>::tokenize(ret), + 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| { + as alloy_sol_types::SolType>::abi_decode_sequence(data).map( + |r| { let r: quoteReturn = r.into(); r.amountB - }) + }, + ) } + #[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: quoteReturn = r.into(); - r.amountB - }) + 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: quoteReturn = r.into(); + r.amountB + }) } } }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `swapTokensForExactTokens(uint256,uint256,address[],address,uint256)` and selector `0x8803dbee`. -```solidity -function swapTokensForExactTokens(uint256 amountOut, uint256 amountInMax, address[] memory path, address to, uint256 deadline) external returns (uint256[] memory amounts); -```*/ + ```solidity + function swapTokensForExactTokens(uint256 amountOut, uint256 amountInMax, address[] memory path, address to, uint256 deadline) external returns (uint256[] memory amounts); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct swapTokensForExactTokensCall { @@ -927,14 +905,15 @@ function swapTokensForExactTokens(uint256 amountOut, uint256 amountInMax, addres pub deadline: alloy_sol_types::private::primitives::aliases::U256, } #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`swapTokensForExactTokens(uint256,uint256,address[],address,uint256)`](swapTokensForExactTokensCall) function. + ///Container type for the return parameters of the + /// [`swapTokensForExactTokens(uint256,uint256,address[],address, + /// uint256)`](swapTokensForExactTokensCall) function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct swapTokensForExactTokensReturn { #[allow(missing_docs)] - pub amounts: alloy_sol_types::private::Vec< - alloy_sol_types::private::primitives::aliases::U256, - >, + pub amounts: + alloy_sol_types::private::Vec, } #[allow( non_camel_case_types, @@ -943,7 +922,7 @@ function swapTokensForExactTokens(uint256 amountOut, uint256 amountInMax, addres clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -964,9 +943,7 @@ function swapTokensForExactTokens(uint256 amountOut, uint256 amountInMax, addres ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -975,8 +952,7 @@ function swapTokensForExactTokens(uint256 amountOut, uint256 amountInMax, addres } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From - for UnderlyingRustTuple<'_> { + impl ::core::convert::From for UnderlyingRustTuple<'_> { fn from(value: swapTokensForExactTokensCall) -> Self { ( value.amountOut, @@ -989,8 +965,7 @@ function swapTokensForExactTokens(uint256 amountOut, uint256 amountInMax, addres } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From> - for swapTokensForExactTokensCall { + impl ::core::convert::From> for swapTokensForExactTokensCall { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { Self { amountOut: tuple.0, @@ -1005,20 +980,15 @@ function swapTokensForExactTokens(uint256 amountOut, uint256 amountInMax, addres { #[doc(hidden)] #[allow(dead_code)] - type UnderlyingSolTuple<'a> = ( - alloy_sol_types::sol_data::Array>, - ); + type UnderlyingSolTuple<'a> = + (alloy_sol_types::sol_data::Array>,); #[doc(hidden)] type UnderlyingRustTuple<'a> = ( - alloy_sol_types::private::Vec< - alloy_sol_types::private::primitives::aliases::U256, - >, + alloy_sol_types::private::Vec, ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1027,16 +997,14 @@ function swapTokensForExactTokens(uint256 amountOut, uint256 amountInMax, addres } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From - for UnderlyingRustTuple<'_> { + impl ::core::convert::From for UnderlyingRustTuple<'_> { fn from(value: swapTokensForExactTokensReturn) -> Self { (value.amounts,) } } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From> - for swapTokensForExactTokensReturn { + impl ::core::convert::From> for swapTokensForExactTokensReturn { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { Self { amounts: tuple.0 } } @@ -1051,26 +1019,24 @@ function swapTokensForExactTokens(uint256 amountOut, uint256 amountInMax, addres 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 = alloy_sol_types::private::Vec< - alloy_sol_types::private::primitives::aliases::U256, - >; - type ReturnTuple<'a> = ( - alloy_sol_types::sol_data::Array>, - ); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "swapTokensForExactTokens(uint256,uint256,address[],address,uint256)"; + type Return = + alloy_sol_types::private::Vec; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + type ReturnTuple<'a> = + (alloy_sol_types::sol_data::Array>,); + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [136u8, 3u8, 219u8, 238u8]; + const SIGNATURE: &'static str = + "swapTokensForExactTokens(uint256,uint256,address[],address,uint256)"; + #[inline] fn new<'a>( tuple: as alloy_sol_types::SolType>::RustType, ) -> Self { tuple.into() } + #[inline] fn tokenize(&self) -> Self::Token<'_> { ( @@ -1091,41 +1057,38 @@ function swapTokensForExactTokens(uint256 amountOut, uint256 amountInMax, addres > as alloy_sol_types::SolType>::tokenize(&self.deadline), ) } + #[inline] fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { - ( - , - > as alloy_sol_types::SolType>::tokenize(ret), - ) + (, + > 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| { + as alloy_sol_types::SolType>::abi_decode_sequence(data).map( + |r| { let r: swapTokensForExactTokensReturn = r.into(); r.amounts - }) + }, + ) } + #[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: swapTokensForExactTokensReturn = r.into(); - r.amounts - }) + 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: swapTokensForExactTokensReturn = r.into(); + r.amounts + }) } } }; ///Container for all the [`IUniswapLikeRouter`](self) function calls. #[derive(Clone)] - #[derive()] pub enum IUniswapLikeRouterCalls { #[allow(missing_docs)] WETH(WETHCall), @@ -1141,8 +1104,9 @@ function swapTokensForExactTokens(uint256 amountOut, uint256 amountInMax, addres impl IUniswapLikeRouterCalls { /// 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. + /// 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]] = &[ @@ -1152,14 +1116,6 @@ function swapTokensForExactTokens(uint256 amountOut, uint256 amountInMax, addres [196u8, 90u8, 1u8, 85u8], [232u8, 227u8, 55u8, 0u8], ]; - /// The names of the variants in the same order as `SELECTORS`. - pub const VARIANT_NAMES: &'static [&'static str] = &[ - ::core::stringify!(swapTokensForExactTokens), - ::core::stringify!(WETH), - ::core::stringify!(quote), - ::core::stringify!(factory), - ::core::stringify!(addLiquidity), - ]; /// The signatures in the same order as `SELECTORS`. pub const SIGNATURES: &'static [&'static str] = &[ ::SIGNATURE, @@ -1168,6 +1124,15 @@ function swapTokensForExactTokens(uint256 amountOut, uint256 amountInMax, addres ::SIGNATURE, ::SIGNATURE, ]; + /// The names of the variants in the same order as `SELECTORS`. + pub const VARIANT_NAMES: &'static [&'static str] = &[ + ::core::stringify!(swapTokensForExactTokens), + ::core::stringify!(WETH), + ::core::stringify!(quote), + ::core::stringify!(factory), + ::core::stringify!(addLiquidity), + ]; + /// Returns the signature for the given selector, if known. #[inline] pub fn signature_by_selector( @@ -1180,27 +1145,25 @@ function swapTokensForExactTokens(uint256 amountOut, uint256 amountInMax, addres ::core::result::Result::Err(_) => ::core::option::Option::None, } } + /// Returns the enum variant name for the given selector, if known. #[inline] - pub fn name_by_selector( - selector: [u8; 4usize], - ) -> ::core::option::Option<&'static str> { + pub fn name_by_selector(selector: [u8; 4usize]) -> ::core::option::Option<&'static str> { let sig = Self::signature_by_selector(selector)?; sig.split_once('(').map(|(name, _)| name) } } #[automatically_derived] impl alloy_sol_types::SolInterface for IUniswapLikeRouterCalls { - const NAME: &'static str = "IUniswapLikeRouterCalls"; - const MIN_DATA_LENGTH: usize = 0usize; const COUNT: usize = 5usize; + const MIN_DATA_LENGTH: usize = 0usize; + const NAME: &'static str = "IUniswapLikeRouterCalls"; + #[inline] fn selector(&self) -> [u8; 4] { match self { Self::WETH(_) => ::SELECTOR, - Self::addLiquidity(_) => { - ::SELECTOR - } + Self::addLiquidity(_) => ::SELECTOR, Self::factory(_) => ::SELECTOR, Self::quote(_) => ::SELECTOR, Self::swapTokensForExactTokens(_) => { @@ -1208,56 +1171,51 @@ function swapTokensForExactTokens(uint256 amountOut, uint256 amountInMax, addres } } } + #[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 { + fn abi_decode_raw(selector: [u8; 4], data: &[u8]) -> alloy_sol_types::Result { static DECODE_SHIMS: &[fn( &[u8], - ) -> alloy_sol_types::Result] = &[ + ) + -> alloy_sol_types::Result] = &[ { fn swapTokensForExactTokens( data: &[u8], ) -> alloy_sol_types::Result { ::abi_decode_raw( - data, - ) - .map(IUniswapLikeRouterCalls::swapTokensForExactTokens) + data, + ) + .map(IUniswapLikeRouterCalls::swapTokensForExactTokens) } swapTokensForExactTokens }, { - fn WETH( - data: &[u8], - ) -> alloy_sol_types::Result { + fn WETH(data: &[u8]) -> alloy_sol_types::Result { ::abi_decode_raw(data) .map(IUniswapLikeRouterCalls::WETH) } WETH }, { - fn quote( - data: &[u8], - ) -> alloy_sol_types::Result { + fn quote(data: &[u8]) -> alloy_sol_types::Result { ::abi_decode_raw(data) .map(IUniswapLikeRouterCalls::quote) } quote }, { - fn factory( - data: &[u8], - ) -> alloy_sol_types::Result { + fn factory(data: &[u8]) -> alloy_sol_types::Result { ::abi_decode_raw(data) .map(IUniswapLikeRouterCalls::factory) } @@ -1267,24 +1225,21 @@ function swapTokensForExactTokens(uint256 amountOut, uint256 amountInMax, addres fn addLiquidity( data: &[u8], ) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, - ) + ::abi_decode_raw(data) .map(IUniswapLikeRouterCalls::addLiquidity) } addLiquidity }, ]; let Ok(idx) = Self::SELECTORS.binary_search(&selector) else { - return Err( - alloy_sol_types::Error::unknown_selector( - ::NAME, - selector, - ), - ); + return Err(alloy_sol_types::Error::unknown_selector( + ::NAME, + selector, + )); }; DECODE_SHIMS[idx](data) } + #[inline] #[allow(non_snake_case)] fn abi_decode_raw_validate( @@ -1293,7 +1248,9 @@ function swapTokensForExactTokens(uint256 amountOut, uint256 amountInMax, addres ) -> alloy_sol_types::Result { static DECODE_VALIDATE_SHIMS: &[fn( &[u8], - ) -> alloy_sol_types::Result] = &[ + ) -> alloy_sol_types::Result< + IUniswapLikeRouterCalls, + >] = &[ { fn swapTokensForExactTokens( data: &[u8], @@ -1306,34 +1263,22 @@ function swapTokensForExactTokens(uint256 amountOut, uint256 amountInMax, addres swapTokensForExactTokens }, { - fn WETH( - data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) + fn WETH(data: &[u8]) -> alloy_sol_types::Result { + ::abi_decode_raw_validate(data) .map(IUniswapLikeRouterCalls::WETH) } WETH }, { - fn quote( - data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) + fn quote(data: &[u8]) -> alloy_sol_types::Result { + ::abi_decode_raw_validate(data) .map(IUniswapLikeRouterCalls::quote) } quote }, { - fn factory( - data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) + fn factory(data: &[u8]) -> alloy_sol_types::Result { + ::abi_decode_raw_validate(data) .map(IUniswapLikeRouterCalls::factory) } factory @@ -1343,23 +1288,22 @@ function swapTokensForExactTokens(uint256 amountOut, uint256 amountInMax, addres data: &[u8], ) -> alloy_sol_types::Result { ::abi_decode_raw_validate( - data, - ) - .map(IUniswapLikeRouterCalls::addLiquidity) + data, + ) + .map(IUniswapLikeRouterCalls::addLiquidity) } addLiquidity }, ]; let Ok(idx) = Self::SELECTORS.binary_search(&selector) else { - return Err( - alloy_sol_types::Error::unknown_selector( - ::NAME, - selector, - ), - ); + return Err(alloy_sol_types::Error::unknown_selector( + ::NAME, + selector, + )); }; DECODE_VALIDATE_SHIMS[idx](data) } + #[inline] fn abi_encoded_size(&self) -> usize { match self { @@ -1367,9 +1311,7 @@ function swapTokensForExactTokens(uint256 amountOut, uint256 amountInMax, addres ::abi_encoded_size(inner) } Self::addLiquidity(inner) => { - ::abi_encoded_size( - inner, - ) + ::abi_encoded_size(inner) } Self::factory(inner) => { ::abi_encoded_size(inner) @@ -1384,6 +1326,7 @@ function swapTokensForExactTokens(uint256 amountOut, uint256 amountInMax, addres } } } + #[inline] fn abi_encode_raw(&self, out: &mut alloy_sol_types::private::Vec) { match self { @@ -1391,10 +1334,7 @@ function swapTokensForExactTokens(uint256 amountOut, uint256 amountInMax, addres ::abi_encode_raw(inner, out) } Self::addLiquidity(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } Self::factory(inner) => { ::abi_encode_raw(inner, out) @@ -1404,17 +1344,16 @@ function swapTokensForExactTokens(uint256 amountOut, uint256 amountInMax, addres } Self::swapTokensForExactTokens(inner) => { ::abi_encode_raw( - inner, - out, + inner, out, ) } } } } - use alloy_contract as alloy_contract; + use alloy_contract; /**Creates a new wrapper around an on-chain [`IUniswapLikeRouter`](self) contract instance. -See the [wrapper's documentation](`IUniswapLikeRouterInstance`) for more details.*/ + See the [wrapper's documentation](`IUniswapLikeRouterInstance`) for more details.*/ #[inline] pub const fn new< P: alloy_contract::private::Provider, @@ -1427,15 +1366,15 @@ See the [wrapper's documentation](`IUniswapLikeRouterInstance`) for more details } /**A [`IUniswapLikeRouter`](self) instance. -Contains type-safe methods for interacting with an on-chain instance of the -[`IUniswapLikeRouter`](self) contract located at a given `address`, using a given -provider `P`. + Contains type-safe methods for interacting with an on-chain instance of the + [`IUniswapLikeRouter`](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. + 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.*/ + See the [module-level documentation](self) for all the available methods.*/ #[derive(Clone)] pub struct IUniswapLikeRouterInstance { address: alloy_sol_types::private::Address, @@ -1446,43 +1385,45 @@ See the [module-level documentation](self) for all the available methods.*/ impl ::core::fmt::Debug for IUniswapLikeRouterInstance { #[inline] fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { - f.debug_tuple("IUniswapLikeRouterInstance").field(&self.address).finish() + f.debug_tuple("IUniswapLikeRouterInstance") + .field(&self.address) + .finish() } } /// Instantiation and getters/setters. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > IUniswapLikeRouterInstance { + impl, N: alloy_contract::private::Network> + IUniswapLikeRouterInstance + { /**Creates a new wrapper around an on-chain [`IUniswapLikeRouter`](self) contract instance. -See the [wrapper's documentation](`IUniswapLikeRouterInstance`) for more details.*/ + See the [wrapper's documentation](`IUniswapLikeRouterInstance`) for more details.*/ #[inline] - pub const fn new( - address: alloy_sol_types::private::Address, - __provider: P, - ) -> Self { + pub const fn new(address: alloy_sol_types::private::Address, __provider: P) -> Self { Self { address, provider: __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 { @@ -1490,7 +1431,8 @@ See the [wrapper's documentation](`IUniswapLikeRouterInstance`) for more details } } impl IUniswapLikeRouterInstance<&P, N> { - /// Clones the provider and returns a new instance with the cloned provider. + /// Clones the provider and returns a new instance with the cloned + /// provider. #[inline] pub fn with_cloned_provider(self) -> IUniswapLikeRouterInstance { IUniswapLikeRouterInstance { @@ -1501,24 +1443,27 @@ See the [wrapper's documentation](`IUniswapLikeRouterInstance`) for more details } } /// Function calls. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > IUniswapLikeRouterInstance { - /// Creates a new call builder using this contract instance's provider and address. + impl, N: alloy_contract::private::Network> + IUniswapLikeRouterInstance + { + /// 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. + /// 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 [`WETH`] function. pub fn WETH(&self) -> alloy_contract::SolCallBuilder<&P, WETHCall, N> { self.call_builder(&WETHCall) } + ///Creates a new call builder for the [`addLiquidity`] function. pub fn addLiquidity( &self, @@ -1531,23 +1476,23 @@ See the [wrapper's documentation](`IUniswapLikeRouterInstance`) for more details to: alloy_sol_types::private::Address, deadline: alloy_sol_types::private::primitives::aliases::U256, ) -> alloy_contract::SolCallBuilder<&P, addLiquidityCall, N> { - self.call_builder( - &addLiquidityCall { - tokenA, - tokenB, - amountADesired, - amountBDesired, - amountAMin, - amountBMin, - to, - deadline, - }, - ) + self.call_builder(&addLiquidityCall { + tokenA, + tokenB, + amountADesired, + amountBDesired, + amountAMin, + amountBMin, + to, + deadline, + }) } + ///Creates a new call builder for the [`factory`] function. pub fn factory(&self) -> alloy_contract::SolCallBuilder<&P, factoryCall, N> { self.call_builder(&factoryCall) } + ///Creates a new call builder for the [`quote`] function. pub fn quote( &self, @@ -1555,15 +1500,15 @@ See the [wrapper's documentation](`IUniswapLikeRouterInstance`) for more details reserveA: alloy_sol_types::private::primitives::aliases::U256, reserveB: alloy_sol_types::private::primitives::aliases::U256, ) -> alloy_contract::SolCallBuilder<&P, quoteCall, N> { - self.call_builder( - "eCall { - amountA, - reserveA, - reserveB, - }, - ) + self.call_builder("eCall { + amountA, + reserveA, + reserveB, + }) } - ///Creates a new call builder for the [`swapTokensForExactTokens`] function. + + ///Creates a new call builder for the [`swapTokensForExactTokens`] + /// function. pub fn swapTokensForExactTokens( &self, amountOut: alloy_sol_types::private::primitives::aliases::U256, @@ -1572,26 +1517,25 @@ See the [wrapper's documentation](`IUniswapLikeRouterInstance`) for more details to: alloy_sol_types::private::Address, deadline: alloy_sol_types::private::primitives::aliases::U256, ) -> alloy_contract::SolCallBuilder<&P, swapTokensForExactTokensCall, N> { - self.call_builder( - &swapTokensForExactTokensCall { - amountOut, - amountInMax, - path, - to, - deadline, - }, - ) + self.call_builder(&swapTokensForExactTokensCall { + amountOut, + amountInMax, + path, + to, + deadline, + }) } } /// Event filters. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > IUniswapLikeRouterInstance { - /// Creates a new event filter using this contract instance's provider and address. + impl, N: alloy_contract::private::Network> + IUniswapLikeRouterInstance + { + /// 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. + /// 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> { @@ -1599,6 +1543,4 @@ See the [wrapper's documentation](`IUniswapLikeRouterInstance`) for more details } } } -pub type Instance = IUniswapLikeRouter::IUniswapLikeRouterInstance< - ::alloy_provider::DynProvider, ->; +pub type Instance = IUniswapLikeRouter::IUniswapLikeRouterInstance<::alloy_provider::DynProvider>; diff --git a/contracts/generated/contracts-generated/iuniswapv3factory/src/lib.rs b/contracts/generated/contracts-generated/iuniswapv3factory/src/lib.rs index 558f11644b..9bcf2a8c65 100644 --- a/contracts/generated/contracts-generated/iuniswapv3factory/src/lib.rs +++ b/contracts/generated/contracts-generated/iuniswapv3factory/src/lib.rs @@ -1,4 +1,10 @@ -#![allow(unused_imports, unused_attributes, clippy::all, rustdoc::all, non_snake_case)] +#![allow( + unused_imports, + unused_attributes, + clippy::all, + rustdoc::all, + non_snake_case +)] //! Auto-generated contract bindings. Do not edit. /** @@ -144,13 +150,12 @@ interface IUniswapV3Factory { clippy::empty_structs_with_brackets )] pub mod IUniswapV3Factory { - use super::*; - use alloy_sol_types as alloy_sol_types; + use {super::*, alloy_sol_types}; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Event with signature `FeeAmountEnabled(uint24,int24)` and selector `0xc66a3fdf07232cdd185febcc6579d408c241b47ae2f9907d84be655141eeaecc`. -```solidity -event FeeAmountEnabled(uint24 indexed fee, int24 indexed tickSpacing); -```*/ + ```solidity + event FeeAmountEnabled(uint24 indexed fee, int24 indexed tickSpacing); + ```*/ #[allow( non_camel_case_types, non_snake_case, @@ -171,25 +176,26 @@ event FeeAmountEnabled(uint24 indexed fee, int24 indexed tickSpacing); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[automatically_derived] impl alloy_sol_types::SolEvent for FeeAmountEnabled { + type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; 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::Uint<24>, alloy_sol_types::sol_data::Int<24>, ); - const SIGNATURE: &'static str = "FeeAmountEnabled(uint24,int24)"; - const SIGNATURE_HASH: alloy_sol_types::private::B256 = alloy_sol_types::private::B256::new([ - 198u8, 106u8, 63u8, 223u8, 7u8, 35u8, 44u8, 221u8, 24u8, 95u8, 235u8, - 204u8, 101u8, 121u8, 212u8, 8u8, 194u8, 65u8, 180u8, 122u8, 226u8, 249u8, - 144u8, 125u8, 132u8, 190u8, 101u8, 81u8, 65u8, 238u8, 174u8, 204u8, - ]); + const ANONYMOUS: bool = false; + const SIGNATURE: &'static str = "FeeAmountEnabled(uint24,int24)"; + const SIGNATURE_HASH: alloy_sol_types::private::B256 = + alloy_sol_types::private::B256::new([ + 198u8, 106u8, 63u8, 223u8, 7u8, 35u8, 44u8, 221u8, 24u8, 95u8, 235u8, 204u8, + 101u8, 121u8, 212u8, 8u8, 194u8, 65u8, 180u8, 122u8, 226u8, 249u8, 144u8, + 125u8, 132u8, 190u8, 101u8, 81u8, 65u8, 238u8, 174u8, 204u8, + ]); + #[allow(unused_variables)] #[inline] fn new( @@ -201,29 +207,35 @@ event FeeAmountEnabled(uint24 indexed fee, int24 indexed tickSpacing); tickSpacing: topics.2, } } + #[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, - ), - ); + 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.fee.clone(), self.tickSpacing.clone()) + ( + Self::SIGNATURE_HASH.into(), + self.fee.clone(), + self.tickSpacing.clone(), + ) } + #[inline] fn encode_topics_raw( &self, @@ -232,9 +244,7 @@ event FeeAmountEnabled(uint24 indexed fee, int24 indexed tickSpacing); if out.len() < ::COUNT { return Err(alloy_sol_types::Error::Overrun); } - out[0usize] = alloy_sol_types::abi::token::WordToken( - Self::SIGNATURE_HASH, - ); + out[0usize] = alloy_sol_types::abi::token::WordToken(Self::SIGNATURE_HASH); out[1usize] = as alloy_sol_types::EventTopic>::encode_topic(&self.fee); @@ -249,6 +259,7 @@ event FeeAmountEnabled(uint24 indexed fee, int24 indexed tickSpacing); 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) } @@ -263,9 +274,9 @@ event FeeAmountEnabled(uint24 indexed fee, int24 indexed tickSpacing); }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Event with signature `OwnerChanged(address,address)` and selector `0xb532073b38c83145e3e5135377a08bf9aab55bc0fd7c1179cd4fb995d2a5159c`. -```solidity -event OwnerChanged(address indexed oldOwner, address indexed newOwner); -```*/ + ```solidity + event OwnerChanged(address indexed oldOwner, address indexed newOwner); + ```*/ #[allow( non_camel_case_types, non_snake_case, @@ -286,25 +297,26 @@ event OwnerChanged(address indexed oldOwner, address indexed newOwner); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[automatically_derived] impl alloy_sol_types::SolEvent for OwnerChanged { + type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; 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::Address, alloy_sol_types::sol_data::Address, ); - const SIGNATURE: &'static str = "OwnerChanged(address,address)"; - const SIGNATURE_HASH: alloy_sol_types::private::B256 = alloy_sol_types::private::B256::new([ - 181u8, 50u8, 7u8, 59u8, 56u8, 200u8, 49u8, 69u8, 227u8, 229u8, 19u8, - 83u8, 119u8, 160u8, 139u8, 249u8, 170u8, 181u8, 91u8, 192u8, 253u8, - 124u8, 17u8, 121u8, 205u8, 79u8, 185u8, 149u8, 210u8, 165u8, 21u8, 156u8, - ]); + const ANONYMOUS: bool = false; + const SIGNATURE: &'static str = "OwnerChanged(address,address)"; + const SIGNATURE_HASH: alloy_sol_types::private::B256 = + alloy_sol_types::private::B256::new([ + 181u8, 50u8, 7u8, 59u8, 56u8, 200u8, 49u8, 69u8, 227u8, 229u8, 19u8, 83u8, + 119u8, 160u8, 139u8, 249u8, 170u8, 181u8, 91u8, 192u8, 253u8, 124u8, 17u8, + 121u8, 205u8, 79u8, 185u8, 149u8, 210u8, 165u8, 21u8, 156u8, + ]); + #[allow(unused_variables)] #[inline] fn new( @@ -316,25 +328,26 @@ event OwnerChanged(address indexed oldOwner, address indexed newOwner); newOwner: topics.2, } } + #[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, - ), - ); + 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 { ( @@ -343,6 +356,7 @@ event OwnerChanged(address indexed oldOwner, address indexed newOwner); self.newOwner.clone(), ) } + #[inline] fn encode_topics_raw( &self, @@ -351,9 +365,7 @@ event OwnerChanged(address indexed oldOwner, address indexed newOwner); if out.len() < ::COUNT { return Err(alloy_sol_types::Error::Overrun); } - out[0usize] = alloy_sol_types::abi::token::WordToken( - Self::SIGNATURE_HASH, - ); + out[0usize] = alloy_sol_types::abi::token::WordToken(Self::SIGNATURE_HASH); out[1usize] = ::encode_topic( &self.oldOwner, ); @@ -368,6 +380,7 @@ event OwnerChanged(address indexed oldOwner, address indexed newOwner); 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) } @@ -382,9 +395,9 @@ event OwnerChanged(address indexed oldOwner, address indexed newOwner); }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Event with signature `PoolCreated(address,address,uint24,int24,address)` and selector `0x783cca1c0412dd0d695e784568c96da2e9c22ff989357a2e8b1d9b2b4e6b7118`. -```solidity -event PoolCreated(address indexed token0, address indexed token1, uint24 indexed fee, int24 tickSpacing, address pool); -```*/ + ```solidity + event PoolCreated(address indexed token0, address indexed token1, uint24 indexed fee, int24 tickSpacing, address pool); + ```*/ #[allow( non_camel_case_types, non_snake_case, @@ -411,29 +424,30 @@ event PoolCreated(address indexed token0, address indexed token1, uint24 indexed clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[automatically_derived] impl alloy_sol_types::SolEvent for PoolCreated { + type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type DataTuple<'a> = ( alloy_sol_types::sol_data::Int<24>, 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::Address, alloy_sol_types::sol_data::Address, alloy_sol_types::sol_data::Uint<24>, ); - const SIGNATURE: &'static str = "PoolCreated(address,address,uint24,int24,address)"; - const SIGNATURE_HASH: alloy_sol_types::private::B256 = alloy_sol_types::private::B256::new([ - 120u8, 60u8, 202u8, 28u8, 4u8, 18u8, 221u8, 13u8, 105u8, 94u8, 120u8, - 69u8, 104u8, 201u8, 109u8, 162u8, 233u8, 194u8, 47u8, 249u8, 137u8, 53u8, - 122u8, 46u8, 139u8, 29u8, 155u8, 43u8, 78u8, 107u8, 113u8, 24u8, - ]); + const ANONYMOUS: bool = false; + const SIGNATURE: &'static str = "PoolCreated(address,address,uint24,int24,address)"; + const SIGNATURE_HASH: alloy_sol_types::private::B256 = + alloy_sol_types::private::B256::new([ + 120u8, 60u8, 202u8, 28u8, 4u8, 18u8, 221u8, 13u8, 105u8, 94u8, 120u8, 69u8, + 104u8, 201u8, 109u8, 162u8, 233u8, 194u8, 47u8, 249u8, 137u8, 53u8, 122u8, + 46u8, 139u8, 29u8, 155u8, 43u8, 78u8, 107u8, 113u8, 24u8, + ]); + #[allow(unused_variables)] #[inline] fn new( @@ -448,32 +462,33 @@ event PoolCreated(address indexed token0, address indexed token1, uint24 indexed pool: 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, - ), - ); + 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.tickSpacing), + as alloy_sol_types::SolType>::tokenize( + &self.tickSpacing, + ), ::tokenize( &self.pool, ), ) } + #[inline] fn topics(&self) -> ::RustType { ( @@ -483,6 +498,7 @@ event PoolCreated(address indexed token0, address indexed token1, uint24 indexed self.fee.clone(), ) } + #[inline] fn encode_topics_raw( &self, @@ -491,9 +507,7 @@ event PoolCreated(address indexed token0, address indexed token1, uint24 indexed if out.len() < ::COUNT { return Err(alloy_sol_types::Error::Overrun); } - out[0usize] = alloy_sol_types::abi::token::WordToken( - Self::SIGNATURE_HASH, - ); + out[0usize] = alloy_sol_types::abi::token::WordToken(Self::SIGNATURE_HASH); out[1usize] = ::encode_topic( &self.token0, ); @@ -511,6 +525,7 @@ event PoolCreated(address indexed token0, address indexed token1, uint24 indexed 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) } @@ -525,9 +540,9 @@ event PoolCreated(address indexed token0, address indexed token1, uint24 indexed }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `getPool(address,address,uint24)` and selector `0x1698ee82`. -```solidity -function getPool(address tokenA, address tokenB, uint24 fee) external view returns (address pool); -```*/ + ```solidity + function getPool(address tokenA, address tokenB, uint24 fee) external view returns (address pool); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct getPoolCall { @@ -539,7 +554,8 @@ function getPool(address tokenA, address tokenB, uint24 fee) external view retur pub fee: alloy_sol_types::private::primitives::aliases::U24, } #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`getPool(address,address,uint24)`](getPoolCall) function. + ///Container type for the return parameters of the + /// [`getPool(address,address,uint24)`](getPoolCall) function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct getPoolReturn { @@ -553,7 +569,7 @@ function getPool(address tokenA, address tokenB, uint24 fee) external view retur clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -570,9 +586,7 @@ function getPool(address tokenA, address tokenB, uint24 fee) external view retur ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -606,9 +620,7 @@ function getPool(address tokenA, address tokenB, uint24 fee) external view retur type UnderlyingRustTuple<'a> = (alloy_sol_types::private::Address,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -637,22 +649,21 @@ function getPool(address tokenA, address tokenB, uint24 fee) external view retur alloy_sol_types::sol_data::Address, alloy_sol_types::sol_data::Uint<24>, ); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = alloy_sol_types::private::Address; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (alloy_sol_types::sol_data::Address,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "getPool(address,address,uint24)"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [22u8, 152u8, 238u8, 130u8]; + const SIGNATURE: &'static str = "getPool(address,address,uint24)"; + #[inline] fn new<'a>( tuple: as alloy_sol_types::SolType>::RustType, ) -> Self { tuple.into() } + #[inline] fn tokenize(&self) -> Self::Token<'_> { ( @@ -662,53 +673,50 @@ function getPool(address tokenA, address tokenB, uint24 fee) external view retur ::tokenize( &self.tokenB, ), - as alloy_sol_types::SolType>::tokenize(&self.fee), + as alloy_sol_types::SolType>::tokenize( + &self.fee, + ), ) } + #[inline] fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { - ( - ::tokenize( - ret, - ), - ) + (::tokenize(ret),) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) - .map(|r| { + as alloy_sol_types::SolType>::abi_decode_sequence(data).map( + |r| { let r: getPoolReturn = r.into(); r.pool - }) + }, + ) } + #[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: getPoolReturn = r.into(); - r.pool - }) + 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: getPoolReturn = r.into(); + r.pool + }) } } }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `owner()` and selector `0x8da5cb5b`. -```solidity -function owner() external view returns (address); -```*/ + ```solidity + function owner() external view returns (address); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct ownerCall; #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`owner()`](ownerCall) function. + ///Container type for the return parameters of the [`owner()`](ownerCall) + /// function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct ownerReturn { @@ -722,7 +730,7 @@ function owner() external view returns (address); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -731,9 +739,7 @@ function owner() external view returns (address); type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -763,9 +769,7 @@ function owner() external view returns (address); type UnderlyingRustTuple<'a> = (alloy_sol_types::private::Address,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -790,61 +794,55 @@ function owner() external view returns (address); #[automatically_derived] impl alloy_sol_types::SolCall for ownerCall { type Parameters<'a> = (); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = alloy_sol_types::private::Address; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (alloy_sol_types::sol_data::Address,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "owner()"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [141u8, 165u8, 203u8, 91u8]; + const SIGNATURE: &'static str = "owner()"; + #[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, - ), - ) + (::tokenize(ret),) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) - .map(|r| { + as alloy_sol_types::SolType>::abi_decode_sequence(data).map( + |r| { let r: ownerReturn = 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: ownerReturn = r.into(); - r._0 - }) + 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: ownerReturn = r.into(); + r._0 + }) } } }; ///Container for all the [`IUniswapV3Factory`](self) function calls. #[derive(Clone)] - #[derive()] pub enum IUniswapV3FactoryCalls { #[allow(missing_docs)] getPool(getPoolCall), @@ -854,24 +852,22 @@ function owner() external view returns (address); impl IUniswapV3FactoryCalls { /// 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. + /// 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]] = &[ - [22u8, 152u8, 238u8, 130u8], - [141u8, 165u8, 203u8, 91u8], - ]; - /// The names of the variants in the same order as `SELECTORS`. - pub const VARIANT_NAMES: &'static [&'static str] = &[ - ::core::stringify!(getPool), - ::core::stringify!(owner), - ]; + pub const SELECTORS: &'static [[u8; 4usize]] = + &[[22u8, 152u8, 238u8, 130u8], [141u8, 165u8, 203u8, 91u8]]; /// The signatures in the same order as `SELECTORS`. pub const SIGNATURES: &'static [&'static str] = &[ ::SIGNATURE, ::SIGNATURE, ]; + /// The names of the variants in the same order as `SELECTORS`. + pub const VARIANT_NAMES: &'static [&'static str] = + &[::core::stringify!(getPool), ::core::stringify!(owner)]; + /// Returns the signature for the given selector, if known. #[inline] pub fn signature_by_selector( @@ -884,20 +880,20 @@ function owner() external view returns (address); ::core::result::Result::Err(_) => ::core::option::Option::None, } } + /// Returns the enum variant name for the given selector, if known. #[inline] - pub fn name_by_selector( - selector: [u8; 4usize], - ) -> ::core::option::Option<&'static str> { + pub fn name_by_selector(selector: [u8; 4usize]) -> ::core::option::Option<&'static str> { let sig = Self::signature_by_selector(selector)?; sig.split_once('(').map(|(name, _)| name) } } #[automatically_derived] impl alloy_sol_types::SolInterface for IUniswapV3FactoryCalls { - const NAME: &'static str = "IUniswapV3FactoryCalls"; - const MIN_DATA_LENGTH: usize = 0usize; const COUNT: usize = 2usize; + const MIN_DATA_LENGTH: usize = 0usize; + const NAME: &'static str = "IUniswapV3FactoryCalls"; + #[inline] fn selector(&self) -> [u8; 4] { match self { @@ -905,52 +901,46 @@ function owner() external view returns (address); Self::owner(_) => ::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 getPool( - data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw(data) - .map(IUniswapV3FactoryCalls::getPool) - } - getPool - }, - { - fn owner( - data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw(data) - .map(IUniswapV3FactoryCalls::owner) - } - owner - }, - ]; + fn abi_decode_raw(selector: [u8; 4], data: &[u8]) -> alloy_sol_types::Result { + static DECODE_SHIMS: &[fn(&[u8]) -> alloy_sol_types::Result] = + &[ + { + fn getPool(data: &[u8]) -> alloy_sol_types::Result { + ::abi_decode_raw(data) + .map(IUniswapV3FactoryCalls::getPool) + } + getPool + }, + { + fn owner(data: &[u8]) -> alloy_sol_types::Result { + ::abi_decode_raw(data) + .map(IUniswapV3FactoryCalls::owner) + } + owner + }, + ]; let Ok(idx) = Self::SELECTORS.binary_search(&selector) else { - return Err( - alloy_sol_types::Error::unknown_selector( - ::NAME, - selector, - ), - ); + return Err(alloy_sol_types::Error::unknown_selector( + ::NAME, + selector, + )); }; DECODE_SHIMS[idx](data) } + #[inline] #[allow(non_snake_case)] fn abi_decode_raw_validate( @@ -959,40 +949,33 @@ function owner() external view returns (address); ) -> alloy_sol_types::Result { static DECODE_VALIDATE_SHIMS: &[fn( &[u8], - ) -> alloy_sol_types::Result] = &[ + ) -> alloy_sol_types::Result< + IUniswapV3FactoryCalls, + >] = &[ { - fn getPool( - data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) + fn getPool(data: &[u8]) -> alloy_sol_types::Result { + ::abi_decode_raw_validate(data) .map(IUniswapV3FactoryCalls::getPool) } getPool }, { - fn owner( - data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) + fn owner(data: &[u8]) -> alloy_sol_types::Result { + ::abi_decode_raw_validate(data) .map(IUniswapV3FactoryCalls::owner) } owner }, ]; let Ok(idx) = Self::SELECTORS.binary_search(&selector) else { - return Err( - alloy_sol_types::Error::unknown_selector( - ::NAME, - selector, - ), - ); + return Err(alloy_sol_types::Error::unknown_selector( + ::NAME, + selector, + )); }; DECODE_VALIDATE_SHIMS[idx](data) } + #[inline] fn abi_encoded_size(&self) -> usize { match self { @@ -1004,6 +987,7 @@ function owner() external view returns (address); } } } + #[inline] fn abi_encode_raw(&self, out: &mut alloy_sol_types::private::Vec) { match self { @@ -1017,8 +1001,7 @@ function owner() external view returns (address); } } ///Container for all the [`IUniswapV3Factory`](self) events. - #[derive(Clone)] - #[derive(Debug, PartialEq, Eq, Hash)] + #[derive(Clone, Debug, PartialEq, Eq, Hash)] pub enum IUniswapV3FactoryEvents { #[allow(missing_docs)] FeeAmountEnabled(FeeAmountEnabled), @@ -1030,39 +1013,41 @@ function owner() external view returns (address); impl IUniswapV3FactoryEvents { /// 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. + /// 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]] = &[ [ - 120u8, 60u8, 202u8, 28u8, 4u8, 18u8, 221u8, 13u8, 105u8, 94u8, 120u8, - 69u8, 104u8, 201u8, 109u8, 162u8, 233u8, 194u8, 47u8, 249u8, 137u8, 53u8, - 122u8, 46u8, 139u8, 29u8, 155u8, 43u8, 78u8, 107u8, 113u8, 24u8, + 120u8, 60u8, 202u8, 28u8, 4u8, 18u8, 221u8, 13u8, 105u8, 94u8, 120u8, 69u8, 104u8, + 201u8, 109u8, 162u8, 233u8, 194u8, 47u8, 249u8, 137u8, 53u8, 122u8, 46u8, 139u8, + 29u8, 155u8, 43u8, 78u8, 107u8, 113u8, 24u8, ], [ - 181u8, 50u8, 7u8, 59u8, 56u8, 200u8, 49u8, 69u8, 227u8, 229u8, 19u8, - 83u8, 119u8, 160u8, 139u8, 249u8, 170u8, 181u8, 91u8, 192u8, 253u8, - 124u8, 17u8, 121u8, 205u8, 79u8, 185u8, 149u8, 210u8, 165u8, 21u8, 156u8, + 181u8, 50u8, 7u8, 59u8, 56u8, 200u8, 49u8, 69u8, 227u8, 229u8, 19u8, 83u8, 119u8, + 160u8, 139u8, 249u8, 170u8, 181u8, 91u8, 192u8, 253u8, 124u8, 17u8, 121u8, 205u8, + 79u8, 185u8, 149u8, 210u8, 165u8, 21u8, 156u8, ], [ - 198u8, 106u8, 63u8, 223u8, 7u8, 35u8, 44u8, 221u8, 24u8, 95u8, 235u8, - 204u8, 101u8, 121u8, 212u8, 8u8, 194u8, 65u8, 180u8, 122u8, 226u8, 249u8, - 144u8, 125u8, 132u8, 190u8, 101u8, 81u8, 65u8, 238u8, 174u8, 204u8, + 198u8, 106u8, 63u8, 223u8, 7u8, 35u8, 44u8, 221u8, 24u8, 95u8, 235u8, 204u8, 101u8, + 121u8, 212u8, 8u8, 194u8, 65u8, 180u8, 122u8, 226u8, 249u8, 144u8, 125u8, 132u8, + 190u8, 101u8, 81u8, 65u8, 238u8, 174u8, 204u8, ], ]; - /// The names of the variants in the same order as `SELECTORS`. - pub const VARIANT_NAMES: &'static [&'static str] = &[ - ::core::stringify!(PoolCreated), - ::core::stringify!(OwnerChanged), - ::core::stringify!(FeeAmountEnabled), - ]; /// The signatures in the same order as `SELECTORS`. pub const SIGNATURES: &'static [&'static str] = &[ ::SIGNATURE, ::SIGNATURE, ::SIGNATURE, ]; + /// The names of the variants in the same order as `SELECTORS`. + pub const VARIANT_NAMES: &'static [&'static str] = &[ + ::core::stringify!(PoolCreated), + ::core::stringify!(OwnerChanged), + ::core::stringify!(FeeAmountEnabled), + ]; + /// Returns the signature for the given selector, if known. #[inline] pub fn signature_by_selector( @@ -1075,56 +1060,45 @@ function owner() external view returns (address); ::core::result::Result::Err(_) => ::core::option::Option::None, } } + /// Returns the enum variant name for the given selector, if known. #[inline] - pub fn name_by_selector( - selector: [u8; 32usize], - ) -> ::core::option::Option<&'static str> { + pub fn name_by_selector(selector: [u8; 32usize]) -> ::core::option::Option<&'static str> { let sig = Self::signature_by_selector(selector)?; sig.split_once('(').map(|(name, _)| name) } } #[automatically_derived] impl alloy_sol_types::SolEventInterface for IUniswapV3FactoryEvents { - const NAME: &'static str = "IUniswapV3FactoryEvents"; const COUNT: usize = 3usize; + const NAME: &'static str = "IUniswapV3FactoryEvents"; + 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, - ) + ::decode_raw_log(topics, data) .map(Self::FeeAmountEnabled) } Some(::SIGNATURE_HASH) => { - ::decode_raw_log( - topics, - data, - ) + ::decode_raw_log(topics, data) .map(Self::OwnerChanged) } Some(::SIGNATURE_HASH) => { - ::decode_raw_log( - topics, - data, - ) + ::decode_raw_log(topics, data) .map(Self::PoolCreated) } - _ => { - 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(), - ), + _ => 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(), ), - }) - } + ), + }), } } } @@ -1143,6 +1117,7 @@ function owner() external view returns (address); } } } + fn into_log_data(self) -> alloy_sol_types::private::LogData { match self { Self::FeeAmountEnabled(inner) => { @@ -1157,10 +1132,10 @@ function owner() external view returns (address); } } } - use alloy_contract as alloy_contract; + use alloy_contract; /**Creates a new wrapper around an on-chain [`IUniswapV3Factory`](self) contract instance. -See the [wrapper's documentation](`IUniswapV3FactoryInstance`) for more details.*/ + See the [wrapper's documentation](`IUniswapV3FactoryInstance`) for more details.*/ #[inline] pub const fn new< P: alloy_contract::private::Provider, @@ -1173,15 +1148,15 @@ See the [wrapper's documentation](`IUniswapV3FactoryInstance`) for more details. } /**A [`IUniswapV3Factory`](self) instance. -Contains type-safe methods for interacting with an on-chain instance of the -[`IUniswapV3Factory`](self) contract located at a given `address`, using a given -provider `P`. + Contains type-safe methods for interacting with an on-chain instance of the + [`IUniswapV3Factory`](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. + 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.*/ + See the [module-level documentation](self) for all the available methods.*/ #[derive(Clone)] pub struct IUniswapV3FactoryInstance { address: alloy_sol_types::private::Address, @@ -1192,43 +1167,45 @@ See the [module-level documentation](self) for all the available methods.*/ impl ::core::fmt::Debug for IUniswapV3FactoryInstance { #[inline] fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { - f.debug_tuple("IUniswapV3FactoryInstance").field(&self.address).finish() + f.debug_tuple("IUniswapV3FactoryInstance") + .field(&self.address) + .finish() } } /// Instantiation and getters/setters. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > IUniswapV3FactoryInstance { + impl, N: alloy_contract::private::Network> + IUniswapV3FactoryInstance + { /**Creates a new wrapper around an on-chain [`IUniswapV3Factory`](self) contract instance. -See the [wrapper's documentation](`IUniswapV3FactoryInstance`) for more details.*/ + See the [wrapper's documentation](`IUniswapV3FactoryInstance`) for more details.*/ #[inline] - pub const fn new( - address: alloy_sol_types::private::Address, - __provider: P, - ) -> Self { + pub const fn new(address: alloy_sol_types::private::Address, __provider: P) -> Self { Self { address, provider: __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 { @@ -1236,7 +1213,8 @@ See the [wrapper's documentation](`IUniswapV3FactoryInstance`) for more details. } } impl IUniswapV3FactoryInstance<&P, N> { - /// Clones the provider and returns a new instance with the cloned provider. + /// Clones the provider and returns a new instance with the cloned + /// provider. #[inline] pub fn with_cloned_provider(self) -> IUniswapV3FactoryInstance { IUniswapV3FactoryInstance { @@ -1247,20 +1225,22 @@ See the [wrapper's documentation](`IUniswapV3FactoryInstance`) for more details. } } /// Function calls. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > IUniswapV3FactoryInstance { - /// Creates a new call builder using this contract instance's provider and address. + impl, N: alloy_contract::private::Network> + IUniswapV3FactoryInstance + { + /// 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. + /// 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 [`getPool`] function. pub fn getPool( &self, @@ -1268,142 +1248,103 @@ See the [wrapper's documentation](`IUniswapV3FactoryInstance`) for more details. tokenB: alloy_sol_types::private::Address, fee: alloy_sol_types::private::primitives::aliases::U24, ) -> alloy_contract::SolCallBuilder<&P, getPoolCall, N> { - self.call_builder(&getPoolCall { tokenA, tokenB, fee }) + self.call_builder(&getPoolCall { + tokenA, + tokenB, + fee, + }) } + ///Creates a new call builder for the [`owner`] function. pub fn owner(&self) -> alloy_contract::SolCallBuilder<&P, ownerCall, N> { self.call_builder(&ownerCall) } } /// Event filters. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > IUniswapV3FactoryInstance { - /// Creates a new event filter using this contract instance's provider and address. + impl, N: alloy_contract::private::Network> + IUniswapV3FactoryInstance + { + /// 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. + /// 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 [`FeeAmountEnabled`] event. - pub fn FeeAmountEnabled_filter( - &self, - ) -> alloy_contract::Event<&P, FeeAmountEnabled, N> { + pub fn FeeAmountEnabled_filter(&self) -> alloy_contract::Event<&P, FeeAmountEnabled, N> { self.event_filter::() } + ///Creates a new event filter for the [`OwnerChanged`] event. pub fn OwnerChanged_filter(&self) -> alloy_contract::Event<&P, OwnerChanged, N> { self.event_filter::() } + ///Creates a new event filter for the [`PoolCreated`] event. pub fn PoolCreated_filter(&self) -> alloy_contract::Event<&P, PoolCreated, N> { self.event_filter::() } } } -pub type Instance = IUniswapV3Factory::IUniswapV3FactoryInstance< - ::alloy_provider::DynProvider, ->; +pub type Instance = IUniswapV3Factory::IUniswapV3FactoryInstance<::alloy_provider::DynProvider>; use { - std::{sync::LazyLock, collections::HashMap}, - anyhow::{Result, Context}, - alloy_primitives::{address, Address}, - alloy_provider::{Provider, DynProvider}, + alloy_primitives::{Address, address}, + alloy_provider::{DynProvider, Provider}, + anyhow::{Context, Result}, + std::{collections::HashMap, sync::LazyLock}, }; pub const fn deployment_info(chain_id: u64) -> Option<(Address, Option)> { match chain_id { - 1u64 => { - Some(( - ::alloy_primitives::address!( - "0x1F98431c8aD98523631AE4a59f267346ea31F984" - ), - None, - )) - } - 10u64 => { - Some(( - ::alloy_primitives::address!( - "0x1F98431c8aD98523631AE4a59f267346ea31F984" - ), - None, - )) - } - 56u64 => { - Some(( - ::alloy_primitives::address!( - "0xdB1d10011AD0Ff90774D0C6Bb92e5C5c8b4461F7" - ), - None, - )) - } - 137u64 => { - Some(( - ::alloy_primitives::address!( - "0x1F98431c8aD98523631AE4a59f267346ea31F984" - ), - None, - )) - } - 8453u64 => { - Some(( - ::alloy_primitives::address!( - "0x33128a8fC17869897dcE68Ed026d694621f6FDfD" - ), - None, - )) - } - 9745u64 => { - Some(( - ::alloy_primitives::address!( - "0xcb2436774C3e191c85056d248EF4260ce5f27A9D" - ), - None, - )) - } - 42161u64 => { - Some(( - ::alloy_primitives::address!( - "0x1F98431c8aD98523631AE4a59f267346ea31F984" - ), - None, - )) - } - 43114u64 => { - Some(( - ::alloy_primitives::address!( - "0x740b1c1de25031C31FF4fC9A62f554A55cdC1baD" - ), - None, - )) - } - 57073u64 => { - Some(( - ::alloy_primitives::address!( - "0x640887A9ba3A9C53Ed27D0F7e8246A4F933f3424" - ), - None, - )) - } - 59144u64 => { - Some(( - ::alloy_primitives::address!( - "0x31FAfd4889FA1269F7a13A66eE0fB458f27D72A9" - ), - None, - )) - } - 11155111u64 => { - Some(( - ::alloy_primitives::address!( - "0x1F98431c8aD98523631AE4a59f267346ea31F984" - ), - None, - )) - } + 1u64 => Some(( + ::alloy_primitives::address!("0x1F98431c8aD98523631AE4a59f267346ea31F984"), + None, + )), + 10u64 => Some(( + ::alloy_primitives::address!("0x1F98431c8aD98523631AE4a59f267346ea31F984"), + None, + )), + 56u64 => Some(( + ::alloy_primitives::address!("0xdB1d10011AD0Ff90774D0C6Bb92e5C5c8b4461F7"), + None, + )), + 137u64 => Some(( + ::alloy_primitives::address!("0x1F98431c8aD98523631AE4a59f267346ea31F984"), + None, + )), + 8453u64 => Some(( + ::alloy_primitives::address!("0x33128a8fC17869897dcE68Ed026d694621f6FDfD"), + None, + )), + 9745u64 => Some(( + ::alloy_primitives::address!("0xcb2436774C3e191c85056d248EF4260ce5f27A9D"), + None, + )), + 42161u64 => Some(( + ::alloy_primitives::address!("0x1F98431c8aD98523631AE4a59f267346ea31F984"), + None, + )), + 43114u64 => Some(( + ::alloy_primitives::address!("0x740b1c1de25031C31FF4fC9A62f554A55cdC1baD"), + None, + )), + 57073u64 => Some(( + ::alloy_primitives::address!("0x640887A9ba3A9C53Ed27D0F7e8246A4F933f3424"), + None, + )), + 59144u64 => Some(( + ::alloy_primitives::address!("0x31FAfd4889FA1269F7a13A66eE0fB458f27D72A9"), + None, + )), + 11155111u64 => Some(( + ::alloy_primitives::address!("0x1F98431c8aD98523631AE4a59f267346ea31F984"), + None, + )), _ => None, } } @@ -1420,9 +1361,7 @@ pub const fn deployment_block(chain_id: &u64) -> Option { } } impl Instance { - pub fn deployed( - provider: &DynProvider, - ) -> impl Future> + Send { + pub fn deployed(provider: &DynProvider) -> impl Future> + Send { async move { let chain_id = provider .get_chain_id() diff --git a/contracts/generated/contracts-generated/izeroex/src/lib.rs b/contracts/generated/contracts-generated/izeroex/src/lib.rs index 469a9a6054..05d2728ef7 100644 --- a/contracts/generated/contracts-generated/izeroex/src/lib.rs +++ b/contracts/generated/contracts-generated/izeroex/src/lib.rs @@ -1,4 +1,10 @@ -#![allow(unused_imports, unused_attributes, clippy::all, rustdoc::all, non_snake_case)] +#![allow( + unused_imports, + unused_attributes, + clippy::all, + rustdoc::all, + non_snake_case +)] //! Auto-generated contract bindings. Do not edit. ///Module containing a contract's types and functions. /** @@ -18,68 +24,67 @@ library LibNFTOrder { clippy::empty_structs_with_brackets )] pub mod LibNFTOrder { - use super::*; - use alloy_sol_types as alloy_sol_types; + use {super::*, alloy_sol_types}; #[derive(Default, Debug, PartialEq, Eq, Hash)] #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct TradeDirection(u8); const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[automatically_derived] impl alloy_sol_types::private::SolTypeValue for u8 { #[inline] fn stv_to_tokens( &self, - ) -> as alloy_sol_types::SolType>::Token<'_> { + ) -> as alloy_sol_types::SolType>::Token<'_> + { alloy_sol_types::private::SolTypeValue::< alloy_sol_types::sol_data::Uint<8>, >::stv_to_tokens(self) } + #[inline] fn stv_eip712_data_word(&self) -> alloy_sol_types::Word { - as alloy_sol_types::SolType>::tokenize(self) - .0 + as alloy_sol_types::SolType>::tokenize(self).0 } + #[inline] - fn stv_abi_encode_packed_to( - &self, - out: &mut alloy_sol_types::private::Vec, - ) { + fn stv_abi_encode_packed_to(&self, out: &mut alloy_sol_types::private::Vec) { as alloy_sol_types::SolType>::abi_encode_packed_to(self, out) } + #[inline] fn stv_abi_packed_encoded_size(&self) -> usize { - as alloy_sol_types::SolType>::abi_encoded_size(self) + as alloy_sol_types::SolType>::abi_encoded_size( + self, + ) } } impl TradeDirection { /// The Solidity type name. pub const NAME: &'static str = stringify!(@ name); + /// Convert from the underlying value type. #[inline] pub const fn from_underlying(value: u8) -> Self { Self(value) } + /// Return the underlying value. #[inline] pub const fn into_underlying(self) -> u8 { self.0 } + /// Return the single encoding of this value, delegating to the /// underlying type. #[inline] pub fn abi_encode(&self) -> alloy_sol_types::private::Vec { ::abi_encode(&self.0) } + /// Return the packed encoding of this value, delegating to the /// underlying type. #[inline] @@ -102,31 +107,29 @@ pub mod LibNFTOrder { #[automatically_derived] impl alloy_sol_types::SolType for TradeDirection { type RustType = u8; - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SOL_NAME: &'static str = Self::NAME; - const ENCODED_SIZE: Option = as alloy_sol_types::SolType>::ENCODED_SIZE; + type Token<'a> = + as alloy_sol_types::SolType>::Token<'a>; + + const ENCODED_SIZE: Option = + as alloy_sol_types::SolType>::ENCODED_SIZE; const PACKED_ENCODED_SIZE: Option = as alloy_sol_types::SolType>::PACKED_ENCODED_SIZE; + const SOL_NAME: &'static str = Self::NAME; + #[inline] fn valid_token(token: &Self::Token<'_>) -> bool { Self::type_check(token).is_ok() } + #[inline] fn type_check(token: &Self::Token<'_>) -> alloy_sol_types::Result<()> { - as alloy_sol_types::SolType>::type_check(token) + as alloy_sol_types::SolType>::type_check(token) } + #[inline] fn detokenize(token: Self::Token<'_>) -> Self::RustType { - as alloy_sol_types::SolType>::detokenize(token) + as alloy_sol_types::SolType>::detokenize(token) } } #[automatically_derived] @@ -137,6 +140,7 @@ pub mod LibNFTOrder { 8, > as alloy_sol_types::EventTopic>::topic_preimage_length(rust) } + #[inline] fn encode_topic_preimage( rust: &Self::RustType, @@ -146,20 +150,19 @@ pub mod LibNFTOrder { 8, > as alloy_sol_types::EventTopic>::encode_topic_preimage(rust, out) } + #[inline] - fn encode_topic( - rust: &Self::RustType, - ) -> alloy_sol_types::abi::token::WordToken { - as alloy_sol_types::EventTopic>::encode_topic(rust) + fn encode_topic(rust: &Self::RustType) -> alloy_sol_types::abi::token::WordToken { + as alloy_sol_types::EventTopic>::encode_topic( + rust, + ) } } }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**```solidity -struct Fee { address recipient; uint256 amount; bytes feeData; } -```*/ + struct Fee { address recipient; uint256 amount; bytes feeData; } + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct Fee { @@ -177,7 +180,7 @@ struct Fee { address recipient; uint256 amount; bytes feeData; } clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[doc(hidden)] #[allow(dead_code)] type UnderlyingSolTuple<'a> = ( @@ -193,9 +196,7 @@ struct Fee { address recipient; uint256 amount; bytes feeData; } ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -232,99 +233,96 @@ struct Fee { address recipient; uint256 amount; bytes feeData; } ::tokenize( &self.recipient, ), - as alloy_sol_types::SolType>::tokenize(&self.amount), + as alloy_sol_types::SolType>::tokenize( + &self.amount, + ), ::tokenize( &self.feeData, ), ) } + #[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) + 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) + 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) + 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 Fee { type RustType = Self; - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + + const ENCODED_SIZE: Option = + as alloy_sol_types::SolType>::ENCODED_SIZE; + const PACKED_ENCODED_SIZE: Option = + as alloy_sol_types::SolType>::PACKED_ENCODED_SIZE; 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); + let tuple = as alloy_sol_types::SolType>::detokenize(token); >>::from(tuple) } } #[automatically_derived] impl alloy_sol_types::SolStruct for Fee { const NAME: &'static str = "Fee"; + #[inline] fn eip712_root_type() -> alloy_sol_types::private::Cow<'static, str> { alloy_sol_types::private::Cow::Borrowed( "Fee(address recipient,uint256 amount,bytes feeData)", ) } + #[inline] - fn eip712_components() -> alloy_sol_types::private::Vec< - alloy_sol_types::private::Cow<'static, str>, - > { + fn eip712_components() + -> alloy_sol_types::private::Vec> + { 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 { [ @@ -361,14 +359,13 @@ struct Fee { address recipient; uint256 amount; bytes feeData; } &rust.feeData, ) } + #[inline] fn encode_topic_preimage( rust: &Self::RustType, out: &mut alloy_sol_types::private::Vec, ) { - out.reserve( - ::topic_preimage_length(rust), - ); + out.reserve(::topic_preimage_length(rust)); ::encode_topic_preimage( &rust.recipient, out, @@ -384,25 +381,19 @@ struct Fee { address recipient; uint256 amount; bytes feeData; } out, ); } + #[inline] - fn encode_topic( - rust: &Self::RustType, - ) -> alloy_sol_types::abi::token::WordToken { + 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), - ) + ::encode_topic_preimage(rust, &mut out); + alloy_sol_types::abi::token::WordToken(alloy_sol_types::private::keccak256(out)) } } }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**```solidity -struct Property { address propertyValidator; bytes propertyData; } -```*/ + struct Property { address propertyValidator; bytes propertyData; } + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct Property { @@ -418,7 +409,7 @@ struct Property { address propertyValidator; bytes propertyData; } clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[doc(hidden)] #[allow(dead_code)] type UnderlyingSolTuple<'a> = ( @@ -432,9 +423,7 @@ struct Property { address propertyValidator; bytes propertyData; } ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -475,91 +464,88 @@ struct Property { address propertyValidator; bytes propertyData; } ), ) } + #[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) + 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) + 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) + 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 Property { type RustType = Self; - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + + const ENCODED_SIZE: Option = + as alloy_sol_types::SolType>::ENCODED_SIZE; + const PACKED_ENCODED_SIZE: Option = + as alloy_sol_types::SolType>::PACKED_ENCODED_SIZE; 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); + let tuple = as alloy_sol_types::SolType>::detokenize(token); >>::from(tuple) } } #[automatically_derived] impl alloy_sol_types::SolStruct for Property { const NAME: &'static str = "Property"; + #[inline] fn eip712_root_type() -> alloy_sol_types::private::Cow<'static, str> { alloy_sol_types::private::Cow::Borrowed( "Property(address propertyValidator,bytes propertyData)", ) } + #[inline] - fn eip712_components() -> alloy_sol_types::private::Vec< - alloy_sol_types::private::Cow<'static, str>, - > { + fn eip712_components() + -> alloy_sol_types::private::Vec> + { 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 { [ @@ -587,14 +573,13 @@ struct Property { address propertyValidator; bytes propertyData; } &rust.propertyData, ) } + #[inline] fn encode_topic_preimage( rust: &Self::RustType, out: &mut alloy_sol_types::private::Vec, ) { - out.reserve( - ::topic_preimage_length(rust), - ); + out.reserve(::topic_preimage_length(rust)); ::encode_topic_preimage( &rust.propertyValidator, out, @@ -604,25 +589,19 @@ struct Property { address propertyValidator; bytes propertyData; } out, ); } + #[inline] - fn encode_topic( - rust: &Self::RustType, - ) -> alloy_sol_types::abi::token::WordToken { + 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), - ) + ::encode_topic_preimage(rust, &mut out); + alloy_sol_types::abi::token::WordToken(alloy_sol_types::private::keccak256(out)) } } }; - use alloy_contract as alloy_contract; + use alloy_contract; /**Creates a new wrapper around an on-chain [`LibNFTOrder`](self) contract instance. -See the [wrapper's documentation](`LibNFTOrderInstance`) for more details.*/ + See the [wrapper's documentation](`LibNFTOrderInstance`) for more details.*/ #[inline] pub const fn new< P: alloy_contract::private::Provider, @@ -635,15 +614,15 @@ See the [wrapper's documentation](`LibNFTOrderInstance`) for more details.*/ } /**A [`LibNFTOrder`](self) instance. -Contains type-safe methods for interacting with an on-chain instance of the -[`LibNFTOrder`](self) contract located at a given `address`, using a given -provider `P`. + Contains type-safe methods for interacting with an on-chain instance of the + [`LibNFTOrder`](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. + 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.*/ + See the [module-level documentation](self) for all the available methods.*/ #[derive(Clone)] pub struct LibNFTOrderInstance { address: alloy_sol_types::private::Address, @@ -654,43 +633,45 @@ See the [module-level documentation](self) for all the available methods.*/ impl ::core::fmt::Debug for LibNFTOrderInstance { #[inline] fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { - f.debug_tuple("LibNFTOrderInstance").field(&self.address).finish() + f.debug_tuple("LibNFTOrderInstance") + .field(&self.address) + .finish() } } /// Instantiation and getters/setters. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > LibNFTOrderInstance { + impl, N: alloy_contract::private::Network> + LibNFTOrderInstance + { /**Creates a new wrapper around an on-chain [`LibNFTOrder`](self) contract instance. -See the [wrapper's documentation](`LibNFTOrderInstance`) for more details.*/ + See the [wrapper's documentation](`LibNFTOrderInstance`) for more details.*/ #[inline] - pub const fn new( - address: alloy_sol_types::private::Address, - __provider: P, - ) -> Self { + pub const fn new(address: alloy_sol_types::private::Address, __provider: P) -> Self { Self { address, provider: __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 { @@ -698,7 +679,8 @@ See the [wrapper's documentation](`LibNFTOrderInstance`) for more details.*/ } } impl LibNFTOrderInstance<&P, N> { - /// Clones the provider and returns a new instance with the cloned provider. + /// Clones the provider and returns a new instance with the cloned + /// provider. #[inline] pub fn with_cloned_provider(self) -> LibNFTOrderInstance { LibNFTOrderInstance { @@ -709,14 +691,15 @@ See the [wrapper's documentation](`LibNFTOrderInstance`) for more details.*/ } } /// Function calls. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > LibNFTOrderInstance { - /// Creates a new call builder using this contract instance's provider and address. + impl, N: alloy_contract::private::Network> + LibNFTOrderInstance + { + /// 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. + /// 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, @@ -725,14 +708,15 @@ See the [wrapper's documentation](`LibNFTOrderInstance`) for more details.*/ } } /// Event filters. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > LibNFTOrderInstance { - /// Creates a new event filter using this contract instance's provider and address. + impl, N: alloy_contract::private::Network> + LibNFTOrderInstance + { + /// 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. + /// 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> { @@ -758,68 +742,67 @@ library LibNativeOrder { clippy::empty_structs_with_brackets )] pub mod LibNativeOrder { - use super::*; - use alloy_sol_types as alloy_sol_types; + use {super::*, alloy_sol_types}; #[derive(Default, Debug, PartialEq, Eq, Hash)] #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct OrderStatus(u8); const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[automatically_derived] impl alloy_sol_types::private::SolTypeValue for u8 { #[inline] fn stv_to_tokens( &self, - ) -> as alloy_sol_types::SolType>::Token<'_> { + ) -> as alloy_sol_types::SolType>::Token<'_> + { alloy_sol_types::private::SolTypeValue::< alloy_sol_types::sol_data::Uint<8>, >::stv_to_tokens(self) } + #[inline] fn stv_eip712_data_word(&self) -> alloy_sol_types::Word { - as alloy_sol_types::SolType>::tokenize(self) - .0 + as alloy_sol_types::SolType>::tokenize(self).0 } + #[inline] - fn stv_abi_encode_packed_to( - &self, - out: &mut alloy_sol_types::private::Vec, - ) { + fn stv_abi_encode_packed_to(&self, out: &mut alloy_sol_types::private::Vec) { as alloy_sol_types::SolType>::abi_encode_packed_to(self, out) } + #[inline] fn stv_abi_packed_encoded_size(&self) -> usize { - as alloy_sol_types::SolType>::abi_encoded_size(self) + as alloy_sol_types::SolType>::abi_encoded_size( + self, + ) } } impl OrderStatus { /// The Solidity type name. pub const NAME: &'static str = stringify!(@ name); + /// Convert from the underlying value type. #[inline] pub const fn from_underlying(value: u8) -> Self { Self(value) } + /// Return the underlying value. #[inline] pub const fn into_underlying(self) -> u8 { self.0 } + /// Return the single encoding of this value, delegating to the /// underlying type. #[inline] pub fn abi_encode(&self) -> alloy_sol_types::private::Vec { ::abi_encode(&self.0) } + /// Return the packed encoding of this value, delegating to the /// underlying type. #[inline] @@ -842,31 +825,29 @@ pub mod LibNativeOrder { #[automatically_derived] impl alloy_sol_types::SolType for OrderStatus { type RustType = u8; - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SOL_NAME: &'static str = Self::NAME; - const ENCODED_SIZE: Option = as alloy_sol_types::SolType>::ENCODED_SIZE; + type Token<'a> = + as alloy_sol_types::SolType>::Token<'a>; + + const ENCODED_SIZE: Option = + as alloy_sol_types::SolType>::ENCODED_SIZE; const PACKED_ENCODED_SIZE: Option = as alloy_sol_types::SolType>::PACKED_ENCODED_SIZE; + const SOL_NAME: &'static str = Self::NAME; + #[inline] fn valid_token(token: &Self::Token<'_>) -> bool { Self::type_check(token).is_ok() } + #[inline] fn type_check(token: &Self::Token<'_>) -> alloy_sol_types::Result<()> { - as alloy_sol_types::SolType>::type_check(token) + as alloy_sol_types::SolType>::type_check(token) } + #[inline] fn detokenize(token: Self::Token<'_>) -> Self::RustType { - as alloy_sol_types::SolType>::detokenize(token) + as alloy_sol_types::SolType>::detokenize(token) } } #[automatically_derived] @@ -877,6 +858,7 @@ pub mod LibNativeOrder { 8, > as alloy_sol_types::EventTopic>::topic_preimage_length(rust) } + #[inline] fn encode_topic_preimage( rust: &Self::RustType, @@ -886,20 +868,19 @@ pub mod LibNativeOrder { 8, > as alloy_sol_types::EventTopic>::encode_topic_preimage(rust, out) } + #[inline] - fn encode_topic( - rust: &Self::RustType, - ) -> alloy_sol_types::abi::token::WordToken { - as alloy_sol_types::EventTopic>::encode_topic(rust) + fn encode_topic(rust: &Self::RustType) -> alloy_sol_types::abi::token::WordToken { + as alloy_sol_types::EventTopic>::encode_topic( + rust, + ) } } }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**```solidity -struct LimitOrder { address makerToken; address takerToken; uint128 makerAmount; uint128 takerAmount; uint128 takerTokenFeeAmount; address maker; address taker; address sender; address feeRecipient; bytes32 pool; uint64 expiry; uint256 salt; } -```*/ + struct LimitOrder { address makerToken; address takerToken; uint128 makerAmount; uint128 takerAmount; uint128 takerTokenFeeAmount; address maker; address taker; address sender; address feeRecipient; bytes32 pool; uint64 expiry; uint256 salt; } + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct LimitOrder { @@ -935,7 +916,7 @@ struct LimitOrder { address makerToken; address takerToken; uint128 makerAmount; clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[doc(hidden)] #[allow(dead_code)] type UnderlyingSolTuple<'a> = ( @@ -969,9 +950,7 @@ struct LimitOrder { address makerToken; address takerToken; uint128 makerAmount; ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1065,91 +1044,90 @@ struct LimitOrder { address makerToken; address takerToken; uint128 makerAmount; > as alloy_sol_types::SolType>::tokenize(&self.salt), ) } + #[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) + 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) + 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) + 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 LimitOrder { type RustType = Self; - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + + const ENCODED_SIZE: Option = + as alloy_sol_types::SolType>::ENCODED_SIZE; + const PACKED_ENCODED_SIZE: Option = + as alloy_sol_types::SolType>::PACKED_ENCODED_SIZE; 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); + let tuple = as alloy_sol_types::SolType>::detokenize(token); >>::from(tuple) } } #[automatically_derived] impl alloy_sol_types::SolStruct for LimitOrder { const NAME: &'static str = "LimitOrder"; + #[inline] fn eip712_root_type() -> alloy_sol_types::private::Cow<'static, str> { alloy_sol_types::private::Cow::Borrowed( - "LimitOrder(address makerToken,address takerToken,uint128 makerAmount,uint128 takerAmount,uint128 takerTokenFeeAmount,address maker,address taker,address sender,address feeRecipient,bytes32 pool,uint64 expiry,uint256 salt)", + "LimitOrder(address makerToken,address takerToken,uint128 makerAmount,uint128 \ + takerAmount,uint128 takerTokenFeeAmount,address maker,address taker,address \ + sender,address feeRecipient,bytes32 pool,uint64 expiry,uint256 salt)", ) } + #[inline] - fn eip712_components() -> alloy_sol_types::private::Vec< - alloy_sol_types::private::Cow<'static, str>, - > { + fn eip712_components() + -> alloy_sol_types::private::Vec> + { 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 { [ @@ -1257,14 +1235,13 @@ struct LimitOrder { address makerToken; address takerToken; uint128 makerAmount; 256, > as alloy_sol_types::EventTopic>::topic_preimage_length(&rust.salt) } + #[inline] fn encode_topic_preimage( rust: &Self::RustType, out: &mut alloy_sol_types::private::Vec, ) { - out.reserve( - ::topic_preimage_length(rust), - ); + out.reserve(::topic_preimage_length(rust)); ::encode_topic_preimage( &rust.makerToken, out, @@ -1326,25 +1303,19 @@ struct LimitOrder { address makerToken; address takerToken; uint128 makerAmount; out, ); } + #[inline] - fn encode_topic( - rust: &Self::RustType, - ) -> alloy_sol_types::abi::token::WordToken { + 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), - ) + ::encode_topic_preimage(rust, &mut out); + alloy_sol_types::abi::token::WordToken(alloy_sol_types::private::keccak256(out)) } } }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**```solidity -struct OrderInfo { bytes32 orderHash; OrderStatus status; uint128 takerTokenFilledAmount; } -```*/ + struct OrderInfo { bytes32 orderHash; OrderStatus status; uint128 takerTokenFilledAmount; } + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct OrderInfo { @@ -1362,7 +1333,7 @@ struct OrderInfo { bytes32 orderHash; OrderStatus status; uint128 takerTokenFill clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[doc(hidden)] #[allow(dead_code)] type UnderlyingSolTuple<'a> = ( @@ -1378,9 +1349,7 @@ struct OrderInfo { bytes32 orderHash; OrderStatus status; uint128 takerTokenFill ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1425,91 +1394,88 @@ struct OrderInfo { bytes32 orderHash; OrderStatus status; uint128 takerTokenFill ), ) } + #[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) + 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) + 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) + 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 OrderInfo { type RustType = Self; - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + + const ENCODED_SIZE: Option = + as alloy_sol_types::SolType>::ENCODED_SIZE; + const PACKED_ENCODED_SIZE: Option = + as alloy_sol_types::SolType>::PACKED_ENCODED_SIZE; 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); + let tuple = as alloy_sol_types::SolType>::detokenize(token); >>::from(tuple) } } #[automatically_derived] impl alloy_sol_types::SolStruct for OrderInfo { const NAME: &'static str = "OrderInfo"; + #[inline] fn eip712_root_type() -> alloy_sol_types::private::Cow<'static, str> { alloy_sol_types::private::Cow::Borrowed( "OrderInfo(bytes32 orderHash,uint8 status,uint128 takerTokenFilledAmount)", ) } + #[inline] - fn eip712_components() -> alloy_sol_types::private::Vec< - alloy_sol_types::private::Cow<'static, str>, - > { + fn eip712_components() + -> alloy_sol_types::private::Vec> + { 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 { [ @@ -1550,14 +1516,13 @@ struct OrderInfo { bytes32 orderHash; OrderStatus status; uint128 takerTokenFill &rust.takerTokenFilledAmount, ) } + #[inline] fn encode_topic_preimage( rust: &Self::RustType, out: &mut alloy_sol_types::private::Vec, ) { - out.reserve( - ::topic_preimage_length(rust), - ); + out.reserve(::topic_preimage_length(rust)); as alloy_sol_types::EventTopic>::encode_topic_preimage( @@ -1575,25 +1540,19 @@ struct OrderInfo { bytes32 orderHash; OrderStatus status; uint128 takerTokenFill out, ); } + #[inline] - fn encode_topic( - rust: &Self::RustType, - ) -> alloy_sol_types::abi::token::WordToken { + 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), - ) + ::encode_topic_preimage(rust, &mut out); + alloy_sol_types::abi::token::WordToken(alloy_sol_types::private::keccak256(out)) } } }; - use alloy_contract as alloy_contract; + use alloy_contract; /**Creates a new wrapper around an on-chain [`LibNativeOrder`](self) contract instance. -See the [wrapper's documentation](`LibNativeOrderInstance`) for more details.*/ + See the [wrapper's documentation](`LibNativeOrderInstance`) for more details.*/ #[inline] pub const fn new< P: alloy_contract::private::Provider, @@ -1606,15 +1565,15 @@ See the [wrapper's documentation](`LibNativeOrderInstance`) for more details.*/ } /**A [`LibNativeOrder`](self) instance. -Contains type-safe methods for interacting with an on-chain instance of the -[`LibNativeOrder`](self) contract located at a given `address`, using a given -provider `P`. + Contains type-safe methods for interacting with an on-chain instance of the + [`LibNativeOrder`](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. + 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.*/ + See the [module-level documentation](self) for all the available methods.*/ #[derive(Clone)] pub struct LibNativeOrderInstance { address: alloy_sol_types::private::Address, @@ -1625,43 +1584,45 @@ See the [module-level documentation](self) for all the available methods.*/ impl ::core::fmt::Debug for LibNativeOrderInstance { #[inline] fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { - f.debug_tuple("LibNativeOrderInstance").field(&self.address).finish() + f.debug_tuple("LibNativeOrderInstance") + .field(&self.address) + .finish() } } /// Instantiation and getters/setters. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > LibNativeOrderInstance { + impl, N: alloy_contract::private::Network> + LibNativeOrderInstance + { /**Creates a new wrapper around an on-chain [`LibNativeOrder`](self) contract instance. -See the [wrapper's documentation](`LibNativeOrderInstance`) for more details.*/ + See the [wrapper's documentation](`LibNativeOrderInstance`) for more details.*/ #[inline] - pub const fn new( - address: alloy_sol_types::private::Address, - __provider: P, - ) -> Self { + pub const fn new(address: alloy_sol_types::private::Address, __provider: P) -> Self { Self { address, provider: __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 { @@ -1669,7 +1630,8 @@ See the [wrapper's documentation](`LibNativeOrderInstance`) for more details.*/ } } impl LibNativeOrderInstance<&P, N> { - /// Clones the provider and returns a new instance with the cloned provider. + /// Clones the provider and returns a new instance with the cloned + /// provider. #[inline] pub fn with_cloned_provider(self) -> LibNativeOrderInstance { LibNativeOrderInstance { @@ -1680,14 +1642,15 @@ See the [wrapper's documentation](`LibNativeOrderInstance`) for more details.*/ } } /// Function calls. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > LibNativeOrderInstance { - /// Creates a new call builder using this contract instance's provider and address. + impl, N: alloy_contract::private::Network> + LibNativeOrderInstance + { + /// 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. + /// 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, @@ -1696,14 +1659,15 @@ See the [wrapper's documentation](`LibNativeOrderInstance`) for more details.*/ } } /// Event filters. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > LibNativeOrderInstance { - /// Creates a new event filter using this contract instance's provider and address. + impl, N: alloy_contract::private::Network> + LibNativeOrderInstance + { + /// 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. + /// 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> { @@ -1728,68 +1692,67 @@ library LibSignature { clippy::empty_structs_with_brackets )] pub mod LibSignature { - use super::*; - use alloy_sol_types as alloy_sol_types; + use {super::*, alloy_sol_types}; #[derive(Default, Debug, PartialEq, Eq, Hash)] #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct SignatureType(u8); const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[automatically_derived] impl alloy_sol_types::private::SolTypeValue for u8 { #[inline] fn stv_to_tokens( &self, - ) -> as alloy_sol_types::SolType>::Token<'_> { + ) -> as alloy_sol_types::SolType>::Token<'_> + { alloy_sol_types::private::SolTypeValue::< alloy_sol_types::sol_data::Uint<8>, >::stv_to_tokens(self) } + #[inline] fn stv_eip712_data_word(&self) -> alloy_sol_types::Word { - as alloy_sol_types::SolType>::tokenize(self) - .0 + as alloy_sol_types::SolType>::tokenize(self).0 } + #[inline] - fn stv_abi_encode_packed_to( - &self, - out: &mut alloy_sol_types::private::Vec, - ) { + fn stv_abi_encode_packed_to(&self, out: &mut alloy_sol_types::private::Vec) { as alloy_sol_types::SolType>::abi_encode_packed_to(self, out) } + #[inline] fn stv_abi_packed_encoded_size(&self) -> usize { - as alloy_sol_types::SolType>::abi_encoded_size(self) + as alloy_sol_types::SolType>::abi_encoded_size( + self, + ) } } impl SignatureType { /// The Solidity type name. pub const NAME: &'static str = stringify!(@ name); + /// Convert from the underlying value type. #[inline] pub const fn from_underlying(value: u8) -> Self { Self(value) } + /// Return the underlying value. #[inline] pub const fn into_underlying(self) -> u8 { self.0 } + /// Return the single encoding of this value, delegating to the /// underlying type. #[inline] pub fn abi_encode(&self) -> alloy_sol_types::private::Vec { ::abi_encode(&self.0) } + /// Return the packed encoding of this value, delegating to the /// underlying type. #[inline] @@ -1812,31 +1775,29 @@ pub mod LibSignature { #[automatically_derived] impl alloy_sol_types::SolType for SignatureType { type RustType = u8; - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SOL_NAME: &'static str = Self::NAME; - const ENCODED_SIZE: Option = as alloy_sol_types::SolType>::ENCODED_SIZE; + type Token<'a> = + as alloy_sol_types::SolType>::Token<'a>; + + const ENCODED_SIZE: Option = + as alloy_sol_types::SolType>::ENCODED_SIZE; const PACKED_ENCODED_SIZE: Option = as alloy_sol_types::SolType>::PACKED_ENCODED_SIZE; + const SOL_NAME: &'static str = Self::NAME; + #[inline] fn valid_token(token: &Self::Token<'_>) -> bool { Self::type_check(token).is_ok() } + #[inline] fn type_check(token: &Self::Token<'_>) -> alloy_sol_types::Result<()> { - as alloy_sol_types::SolType>::type_check(token) + as alloy_sol_types::SolType>::type_check(token) } + #[inline] fn detokenize(token: Self::Token<'_>) -> Self::RustType { - as alloy_sol_types::SolType>::detokenize(token) + as alloy_sol_types::SolType>::detokenize(token) } } #[automatically_derived] @@ -1847,6 +1808,7 @@ pub mod LibSignature { 8, > as alloy_sol_types::EventTopic>::topic_preimage_length(rust) } + #[inline] fn encode_topic_preimage( rust: &Self::RustType, @@ -1856,20 +1818,19 @@ pub mod LibSignature { 8, > as alloy_sol_types::EventTopic>::encode_topic_preimage(rust, out) } + #[inline] - fn encode_topic( - rust: &Self::RustType, - ) -> alloy_sol_types::abi::token::WordToken { - as alloy_sol_types::EventTopic>::encode_topic(rust) + fn encode_topic(rust: &Self::RustType) -> alloy_sol_types::abi::token::WordToken { + as alloy_sol_types::EventTopic>::encode_topic( + rust, + ) } } }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**```solidity -struct Signature { SignatureType signatureType; uint8 v; bytes32 r; bytes32 s; } -```*/ + struct Signature { SignatureType signatureType; uint8 v; bytes32 r; bytes32 s; } + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct Signature { @@ -1889,7 +1850,7 @@ struct Signature { SignatureType signatureType; uint8 v; bytes32 r; bytes32 s; } clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[doc(hidden)] #[allow(dead_code)] type UnderlyingSolTuple<'a> = ( @@ -1907,9 +1868,7 @@ struct Signature { SignatureType signatureType; uint8 v; bytes32 r; bytes32 s; } ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1958,91 +1917,88 @@ struct Signature { SignatureType signatureType; uint8 v; bytes32 r; bytes32 s; } > as alloy_sol_types::SolType>::tokenize(&self.s), ) } + #[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) + 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) + 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) + 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 Signature { type RustType = Self; - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + + const ENCODED_SIZE: Option = + as alloy_sol_types::SolType>::ENCODED_SIZE; + const PACKED_ENCODED_SIZE: Option = + as alloy_sol_types::SolType>::PACKED_ENCODED_SIZE; 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); + let tuple = as alloy_sol_types::SolType>::detokenize(token); >>::from(tuple) } } #[automatically_derived] impl alloy_sol_types::SolStruct for Signature { const NAME: &'static str = "Signature"; + #[inline] fn eip712_root_type() -> alloy_sol_types::private::Cow<'static, str> { alloy_sol_types::private::Cow::Borrowed( "Signature(uint8 signatureType,uint8 v,bytes32 r,bytes32 s)", ) } + #[inline] - fn eip712_components() -> alloy_sol_types::private::Vec< - alloy_sol_types::private::Cow<'static, str>, - > { + fn eip712_components() + -> alloy_sol_types::private::Vec> + { 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 { [ @@ -2084,14 +2040,13 @@ struct Signature { SignatureType signatureType; uint8 v; bytes32 r; bytes32 s; } 32, > as alloy_sol_types::EventTopic>::topic_preimage_length(&rust.s) } + #[inline] fn encode_topic_preimage( rust: &Self::RustType, out: &mut alloy_sol_types::private::Vec, ) { - out.reserve( - ::topic_preimage_length(rust), - ); + out.reserve(::topic_preimage_length(rust)); ::encode_topic_preimage( &rust.signatureType, out, @@ -2106,25 +2061,19 @@ struct Signature { SignatureType signatureType; uint8 v; bytes32 r; bytes32 s; } 32, > as alloy_sol_types::EventTopic>::encode_topic_preimage(&rust.s, out); } + #[inline] - fn encode_topic( - rust: &Self::RustType, - ) -> alloy_sol_types::abi::token::WordToken { + 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), - ) + ::encode_topic_preimage(rust, &mut out); + alloy_sol_types::abi::token::WordToken(alloy_sol_types::private::keccak256(out)) } } }; - use alloy_contract as alloy_contract; + use alloy_contract; /**Creates a new wrapper around an on-chain [`LibSignature`](self) contract instance. -See the [wrapper's documentation](`LibSignatureInstance`) for more details.*/ + See the [wrapper's documentation](`LibSignatureInstance`) for more details.*/ #[inline] pub const fn new< P: alloy_contract::private::Provider, @@ -2137,15 +2086,15 @@ See the [wrapper's documentation](`LibSignatureInstance`) for more details.*/ } /**A [`LibSignature`](self) instance. -Contains type-safe methods for interacting with an on-chain instance of the -[`LibSignature`](self) contract located at a given `address`, using a given -provider `P`. + Contains type-safe methods for interacting with an on-chain instance of the + [`LibSignature`](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. + 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.*/ + See the [module-level documentation](self) for all the available methods.*/ #[derive(Clone)] pub struct LibSignatureInstance { address: alloy_sol_types::private::Address, @@ -2156,43 +2105,45 @@ See the [module-level documentation](self) for all the available methods.*/ impl ::core::fmt::Debug for LibSignatureInstance { #[inline] fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { - f.debug_tuple("LibSignatureInstance").field(&self.address).finish() + f.debug_tuple("LibSignatureInstance") + .field(&self.address) + .finish() } } /// Instantiation and getters/setters. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > LibSignatureInstance { + impl, N: alloy_contract::private::Network> + LibSignatureInstance + { /**Creates a new wrapper around an on-chain [`LibSignature`](self) contract instance. -See the [wrapper's documentation](`LibSignatureInstance`) for more details.*/ + See the [wrapper's documentation](`LibSignatureInstance`) for more details.*/ #[inline] - pub const fn new( - address: alloy_sol_types::private::Address, - __provider: P, - ) -> Self { + pub const fn new(address: alloy_sol_types::private::Address, __provider: P) -> Self { Self { address, provider: __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 { @@ -2200,7 +2151,8 @@ See the [wrapper's documentation](`LibSignatureInstance`) for more details.*/ } } impl LibSignatureInstance<&P, N> { - /// Clones the provider and returns a new instance with the cloned provider. + /// Clones the provider and returns a new instance with the cloned + /// provider. #[inline] pub fn with_cloned_provider(self) -> LibSignatureInstance { LibSignatureInstance { @@ -2211,14 +2163,15 @@ See the [wrapper's documentation](`LibSignatureInstance`) for more details.*/ } } /// Function calls. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > LibSignatureInstance { - /// Creates a new call builder using this contract instance's provider and address. + impl, N: alloy_contract::private::Network> + LibSignatureInstance + { + /// 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. + /// 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, @@ -2227,14 +2180,15 @@ See the [wrapper's documentation](`LibSignatureInstance`) for more details.*/ } } /// Event filters. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > LibSignatureInstance { - /// Creates a new event filter using this contract instance's provider and address. + impl, N: alloy_contract::private::Network> + LibSignatureInstance + { + /// 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. + /// 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> { @@ -3505,13 +3459,12 @@ interface IZeroex { clippy::empty_structs_with_brackets )] pub mod IZeroex { - use super::*; - use alloy_sol_types as alloy_sol_types; + use {super::*, alloy_sol_types}; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Event with signature `ERC1155OrderCancelled(address,uint256)` and selector `0x4d5ea7da64f50a4a329921b8d2cab52dff4ebcc58b61d10ff839e28e91445684`. -```solidity -event ERC1155OrderCancelled(address maker, uint256 nonce); -```*/ + ```solidity + event ERC1155OrderCancelled(address maker, uint256 nonce); + ```*/ #[allow( non_camel_case_types, non_snake_case, @@ -3532,24 +3485,25 @@ event ERC1155OrderCancelled(address maker, uint256 nonce); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[automatically_derived] impl alloy_sol_types::SolEvent for ERC1155OrderCancelled { + type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type DataTuple<'a> = ( alloy_sol_types::sol_data::Address, 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>,); - const SIGNATURE: &'static str = "ERC1155OrderCancelled(address,uint256)"; - const SIGNATURE_HASH: alloy_sol_types::private::B256 = alloy_sol_types::private::B256::new([ - 77u8, 94u8, 167u8, 218u8, 100u8, 245u8, 10u8, 74u8, 50u8, 153u8, 33u8, - 184u8, 210u8, 202u8, 181u8, 45u8, 255u8, 78u8, 188u8, 197u8, 139u8, 97u8, - 209u8, 15u8, 248u8, 57u8, 226u8, 142u8, 145u8, 68u8, 86u8, 132u8, - ]); + const ANONYMOUS: bool = false; + const SIGNATURE: &'static str = "ERC1155OrderCancelled(address,uint256)"; + const SIGNATURE_HASH: alloy_sol_types::private::B256 = + alloy_sol_types::private::B256::new([ + 77u8, 94u8, 167u8, 218u8, 100u8, 245u8, 10u8, 74u8, 50u8, 153u8, 33u8, 184u8, + 210u8, 202u8, 181u8, 45u8, 255u8, 78u8, 188u8, 197u8, 139u8, 97u8, 209u8, 15u8, + 248u8, 57u8, 226u8, 142u8, 145u8, 68u8, 86u8, 132u8, + ]); + #[allow(unused_variables)] #[inline] fn new( @@ -3561,36 +3515,38 @@ event ERC1155OrderCancelled(address maker, uint256 nonce); nonce: 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, - ), - ); + 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.maker, ), - as alloy_sol_types::SolType>::tokenize(&self.nonce), + as alloy_sol_types::SolType>::tokenize( + &self.nonce, + ), ) } + #[inline] fn topics(&self) -> ::RustType { (Self::SIGNATURE_HASH.into(),) } + #[inline] fn encode_topics_raw( &self, @@ -3599,9 +3555,7 @@ event ERC1155OrderCancelled(address maker, uint256 nonce); if out.len() < ::COUNT { return Err(alloy_sol_types::Error::Overrun); } - out[0usize] = alloy_sol_types::abi::token::WordToken( - Self::SIGNATURE_HASH, - ); + out[0usize] = alloy_sol_types::abi::token::WordToken(Self::SIGNATURE_HASH); Ok(()) } } @@ -3610,6 +3564,7 @@ event ERC1155OrderCancelled(address maker, uint256 nonce); 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) } @@ -3624,9 +3579,9 @@ event ERC1155OrderCancelled(address maker, uint256 nonce); }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Event with signature `ERC1155OrderFilled(uint8,address,address,uint256,address,uint256,address,uint256,uint128,address)` and selector `0x20cca81b0e269b265b3229d6b537da91ef475ca0ef55caed7dd30731700ba98d`. -```solidity -event ERC1155OrderFilled(LibNFTOrder.TradeDirection direction, address maker, address taker, uint256 nonce, address erc20Token, uint256 erc20FillAmount, address erc1155Token, uint256 erc1155TokenId, uint128 erc1155FillAmount, address matcher); -```*/ + ```solidity + event ERC1155OrderFilled(LibNFTOrder.TradeDirection direction, address maker, address taker, uint256 nonce, address erc20Token, uint256 erc20FillAmount, address erc1155Token, uint256 erc1155TokenId, uint128 erc1155FillAmount, address matcher); + ```*/ #[allow( non_camel_case_types, non_snake_case, @@ -3663,9 +3618,10 @@ event ERC1155OrderFilled(LibNFTOrder.TradeDirection direction, address maker, ad clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[automatically_derived] impl alloy_sol_types::SolEvent for ERC1155OrderFilled { + type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type DataTuple<'a> = ( LibNFTOrder::TradeDirection, alloy_sol_types::sol_data::Address, @@ -3678,17 +3634,18 @@ event ERC1155OrderFilled(LibNFTOrder.TradeDirection direction, address maker, ad alloy_sol_types::sol_data::Uint<128>, 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 = "ERC1155OrderFilled(uint8,address,address,uint256,address,uint256,address,uint256,uint128,address)"; - const SIGNATURE_HASH: alloy_sol_types::private::B256 = alloy_sol_types::private::B256::new([ - 32u8, 204u8, 168u8, 27u8, 14u8, 38u8, 155u8, 38u8, 91u8, 50u8, 41u8, - 214u8, 181u8, 55u8, 218u8, 145u8, 239u8, 71u8, 92u8, 160u8, 239u8, 85u8, - 202u8, 237u8, 125u8, 211u8, 7u8, 49u8, 112u8, 11u8, 169u8, 141u8, - ]); + const ANONYMOUS: bool = false; + const SIGNATURE: &'static str = "ERC1155OrderFilled(uint8,address,address,uint256,\ + address,uint256,address,uint256,uint128,address)"; + const SIGNATURE_HASH: alloy_sol_types::private::B256 = + alloy_sol_types::private::B256::new([ + 32u8, 204u8, 168u8, 27u8, 14u8, 38u8, 155u8, 38u8, 91u8, 50u8, 41u8, 214u8, + 181u8, 55u8, 218u8, 145u8, 239u8, 71u8, 92u8, 160u8, 239u8, 85u8, 202u8, 237u8, + 125u8, 211u8, 7u8, 49u8, 112u8, 11u8, 169u8, 141u8, + ]); + #[allow(unused_variables)] #[inline] fn new( @@ -3708,21 +3665,21 @@ event ERC1155OrderFilled(LibNFTOrder.TradeDirection direction, address maker, ad matcher: data.9, } } + #[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, - ), - ); + 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<'_> { ( @@ -3735,33 +3692,35 @@ event ERC1155OrderFilled(LibNFTOrder.TradeDirection direction, address maker, ad ::tokenize( &self.taker, ), - as alloy_sol_types::SolType>::tokenize(&self.nonce), + as alloy_sol_types::SolType>::tokenize( + &self.nonce, + ), ::tokenize( &self.erc20Token, ), - as alloy_sol_types::SolType>::tokenize(&self.erc20FillAmount), + as alloy_sol_types::SolType>::tokenize( + &self.erc20FillAmount, + ), ::tokenize( &self.erc1155Token, ), - as alloy_sol_types::SolType>::tokenize(&self.erc1155TokenId), - as alloy_sol_types::SolType>::tokenize(&self.erc1155FillAmount), + as alloy_sol_types::SolType>::tokenize( + &self.erc1155TokenId, + ), + as alloy_sol_types::SolType>::tokenize( + &self.erc1155FillAmount, + ), ::tokenize( &self.matcher, ), ) } + #[inline] fn topics(&self) -> ::RustType { (Self::SIGNATURE_HASH.into(),) } + #[inline] fn encode_topics_raw( &self, @@ -3770,9 +3729,7 @@ event ERC1155OrderFilled(LibNFTOrder.TradeDirection direction, address maker, ad if out.len() < ::COUNT { return Err(alloy_sol_types::Error::Overrun); } - out[0usize] = alloy_sol_types::abi::token::WordToken( - Self::SIGNATURE_HASH, - ); + out[0usize] = alloy_sol_types::abi::token::WordToken(Self::SIGNATURE_HASH); Ok(()) } } @@ -3781,6 +3738,7 @@ event ERC1155OrderFilled(LibNFTOrder.TradeDirection direction, address maker, ad 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) } @@ -3795,9 +3753,9 @@ event ERC1155OrderFilled(LibNFTOrder.TradeDirection direction, address maker, ad }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Event with signature `ERC1155OrderPreSigned(uint8,address,address,uint256,uint256,address,uint256,(address,uint256,bytes)[],address,uint256,(address,bytes)[],uint128)` and selector `0x5e91ddfeb7bf2e12f7e8ab017d2b63a9217f004a15a53346ad90353ec63d14e4`. -```solidity -event ERC1155OrderPreSigned(LibNFTOrder.TradeDirection direction, address maker, address taker, uint256 expiry, uint256 nonce, address erc20Token, uint256 erc20TokenAmount, LibNFTOrder.Fee[] fees, address erc1155Token, uint256 erc1155TokenId, LibNFTOrder.Property[] erc1155TokenProperties, uint128 erc1155TokenAmount); -```*/ + ```solidity + event ERC1155OrderPreSigned(LibNFTOrder.TradeDirection direction, address maker, address taker, uint256 expiry, uint256 nonce, address erc20Token, uint256 erc20TokenAmount, LibNFTOrder.Fee[] fees, address erc1155Token, uint256 erc1155TokenId, LibNFTOrder.Property[] erc1155TokenProperties, uint128 erc1155TokenAmount); + ```*/ #[allow( non_camel_case_types, non_snake_case, @@ -3821,9 +3779,8 @@ event ERC1155OrderPreSigned(LibNFTOrder.TradeDirection direction, address maker, #[allow(missing_docs)] pub erc20TokenAmount: alloy_sol_types::private::primitives::aliases::U256, #[allow(missing_docs)] - pub fees: alloy_sol_types::private::Vec< - ::RustType, - >, + pub fees: + alloy_sol_types::private::Vec<::RustType>, #[allow(missing_docs)] pub erc1155Token: alloy_sol_types::private::Address, #[allow(missing_docs)] @@ -3842,9 +3799,10 @@ event ERC1155OrderPreSigned(LibNFTOrder.TradeDirection direction, address maker, clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[automatically_derived] impl alloy_sol_types::SolEvent for ERC1155OrderPreSigned { + type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type DataTuple<'a> = ( LibNFTOrder::TradeDirection, alloy_sol_types::sol_data::Address, @@ -3859,17 +3817,19 @@ event ERC1155OrderPreSigned(LibNFTOrder.TradeDirection direction, address maker, alloy_sol_types::sol_data::Array, alloy_sol_types::sol_data::Uint<128>, ); - type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type TopicList = (alloy_sol_types::sol_data::FixedBytes<32>,); - const SIGNATURE: &'static str = "ERC1155OrderPreSigned(uint8,address,address,uint256,uint256,address,uint256,(address,uint256,bytes)[],address,uint256,(address,bytes)[],uint128)"; - const SIGNATURE_HASH: alloy_sol_types::private::B256 = alloy_sol_types::private::B256::new([ - 94u8, 145u8, 221u8, 254u8, 183u8, 191u8, 46u8, 18u8, 247u8, 232u8, 171u8, - 1u8, 125u8, 43u8, 99u8, 169u8, 33u8, 127u8, 0u8, 74u8, 21u8, 165u8, 51u8, - 70u8, 173u8, 144u8, 53u8, 62u8, 198u8, 61u8, 20u8, 228u8, - ]); + const ANONYMOUS: bool = false; + const SIGNATURE: &'static str = "ERC1155OrderPreSigned(uint8,address,address,uint256,\ + uint256,address,uint256,(address,uint256,bytes)[],\ + address,uint256,(address,bytes)[],uint128)"; + const SIGNATURE_HASH: alloy_sol_types::private::B256 = + alloy_sol_types::private::B256::new([ + 94u8, 145u8, 221u8, 254u8, 183u8, 191u8, 46u8, 18u8, 247u8, 232u8, 171u8, 1u8, + 125u8, 43u8, 99u8, 169u8, 33u8, 127u8, 0u8, 74u8, 21u8, 165u8, 51u8, 70u8, + 173u8, 144u8, 53u8, 62u8, 198u8, 61u8, 20u8, 228u8, + ]); + #[allow(unused_variables)] #[inline] fn new( @@ -3891,21 +3851,21 @@ event ERC1155OrderPreSigned(LibNFTOrder.TradeDirection direction, address maker, erc1155TokenAmount: data.11, } } + #[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, - ), - ); + 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<'_> { ( @@ -3949,10 +3909,12 @@ event ERC1155OrderPreSigned(LibNFTOrder.TradeDirection direction, address maker, > as alloy_sol_types::SolType>::tokenize(&self.erc1155TokenAmount), ) } + #[inline] fn topics(&self) -> ::RustType { (Self::SIGNATURE_HASH.into(),) } + #[inline] fn encode_topics_raw( &self, @@ -3961,9 +3923,7 @@ event ERC1155OrderPreSigned(LibNFTOrder.TradeDirection direction, address maker, if out.len() < ::COUNT { return Err(alloy_sol_types::Error::Overrun); } - out[0usize] = alloy_sol_types::abi::token::WordToken( - Self::SIGNATURE_HASH, - ); + out[0usize] = alloy_sol_types::abi::token::WordToken(Self::SIGNATURE_HASH); Ok(()) } } @@ -3972,6 +3932,7 @@ event ERC1155OrderPreSigned(LibNFTOrder.TradeDirection direction, address maker, 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) } @@ -3986,9 +3947,9 @@ event ERC1155OrderPreSigned(LibNFTOrder.TradeDirection direction, address maker, }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Event with signature `ERC721OrderCancelled(address,uint256)` and selector `0xa015ad2dc32f266993958a0fd9884c746b971b254206f3478bc43e2f125c7b9e`. -```solidity -event ERC721OrderCancelled(address maker, uint256 nonce); -```*/ + ```solidity + event ERC721OrderCancelled(address maker, uint256 nonce); + ```*/ #[allow( non_camel_case_types, non_snake_case, @@ -4009,24 +3970,25 @@ event ERC721OrderCancelled(address maker, uint256 nonce); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[automatically_derived] impl alloy_sol_types::SolEvent for ERC721OrderCancelled { + type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type DataTuple<'a> = ( alloy_sol_types::sol_data::Address, 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>,); - const SIGNATURE: &'static str = "ERC721OrderCancelled(address,uint256)"; - const SIGNATURE_HASH: alloy_sol_types::private::B256 = alloy_sol_types::private::B256::new([ - 160u8, 21u8, 173u8, 45u8, 195u8, 47u8, 38u8, 105u8, 147u8, 149u8, 138u8, - 15u8, 217u8, 136u8, 76u8, 116u8, 107u8, 151u8, 27u8, 37u8, 66u8, 6u8, - 243u8, 71u8, 139u8, 196u8, 62u8, 47u8, 18u8, 92u8, 123u8, 158u8, - ]); + const ANONYMOUS: bool = false; + const SIGNATURE: &'static str = "ERC721OrderCancelled(address,uint256)"; + const SIGNATURE_HASH: alloy_sol_types::private::B256 = + alloy_sol_types::private::B256::new([ + 160u8, 21u8, 173u8, 45u8, 195u8, 47u8, 38u8, 105u8, 147u8, 149u8, 138u8, 15u8, + 217u8, 136u8, 76u8, 116u8, 107u8, 151u8, 27u8, 37u8, 66u8, 6u8, 243u8, 71u8, + 139u8, 196u8, 62u8, 47u8, 18u8, 92u8, 123u8, 158u8, + ]); + #[allow(unused_variables)] #[inline] fn new( @@ -4038,36 +4000,38 @@ event ERC721OrderCancelled(address maker, uint256 nonce); nonce: 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, - ), - ); + 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.maker, ), - as alloy_sol_types::SolType>::tokenize(&self.nonce), + as alloy_sol_types::SolType>::tokenize( + &self.nonce, + ), ) } + #[inline] fn topics(&self) -> ::RustType { (Self::SIGNATURE_HASH.into(),) } + #[inline] fn encode_topics_raw( &self, @@ -4076,9 +4040,7 @@ event ERC721OrderCancelled(address maker, uint256 nonce); if out.len() < ::COUNT { return Err(alloy_sol_types::Error::Overrun); } - out[0usize] = alloy_sol_types::abi::token::WordToken( - Self::SIGNATURE_HASH, - ); + out[0usize] = alloy_sol_types::abi::token::WordToken(Self::SIGNATURE_HASH); Ok(()) } } @@ -4087,6 +4049,7 @@ event ERC721OrderCancelled(address maker, uint256 nonce); 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) } @@ -4101,9 +4064,9 @@ event ERC721OrderCancelled(address maker, uint256 nonce); }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Event with signature `ERC721OrderFilled(uint8,address,address,uint256,address,uint256,address,uint256,address)` and selector `0x50273fa02273cceea9cf085b42de5c8af60624140168bd71357db833535877af`. -```solidity -event ERC721OrderFilled(LibNFTOrder.TradeDirection direction, address maker, address taker, uint256 nonce, address erc20Token, uint256 erc20TokenAmount, address erc721Token, uint256 erc721TokenId, address matcher); -```*/ + ```solidity + event ERC721OrderFilled(LibNFTOrder.TradeDirection direction, address maker, address taker, uint256 nonce, address erc20Token, uint256 erc20TokenAmount, address erc721Token, uint256 erc721TokenId, address matcher); + ```*/ #[allow( non_camel_case_types, non_snake_case, @@ -4138,9 +4101,10 @@ event ERC721OrderFilled(LibNFTOrder.TradeDirection direction, address maker, add clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[automatically_derived] impl alloy_sol_types::SolEvent for ERC721OrderFilled { + type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type DataTuple<'a> = ( LibNFTOrder::TradeDirection, alloy_sol_types::sol_data::Address, @@ -4152,17 +4116,18 @@ event ERC721OrderFilled(LibNFTOrder.TradeDirection direction, address maker, add 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>,); - const SIGNATURE: &'static str = "ERC721OrderFilled(uint8,address,address,uint256,address,uint256,address,uint256,address)"; - const SIGNATURE_HASH: alloy_sol_types::private::B256 = alloy_sol_types::private::B256::new([ - 80u8, 39u8, 63u8, 160u8, 34u8, 115u8, 204u8, 238u8, 169u8, 207u8, 8u8, - 91u8, 66u8, 222u8, 92u8, 138u8, 246u8, 6u8, 36u8, 20u8, 1u8, 104u8, - 189u8, 113u8, 53u8, 125u8, 184u8, 51u8, 83u8, 88u8, 119u8, 175u8, - ]); + const ANONYMOUS: bool = false; + const SIGNATURE: &'static str = "ERC721OrderFilled(uint8,address,address,uint256,\ + address,uint256,address,uint256,address)"; + const SIGNATURE_HASH: alloy_sol_types::private::B256 = + alloy_sol_types::private::B256::new([ + 80u8, 39u8, 63u8, 160u8, 34u8, 115u8, 204u8, 238u8, 169u8, 207u8, 8u8, 91u8, + 66u8, 222u8, 92u8, 138u8, 246u8, 6u8, 36u8, 20u8, 1u8, 104u8, 189u8, 113u8, + 53u8, 125u8, 184u8, 51u8, 83u8, 88u8, 119u8, 175u8, + ]); + #[allow(unused_variables)] #[inline] fn new( @@ -4181,21 +4146,21 @@ event ERC721OrderFilled(LibNFTOrder.TradeDirection direction, address maker, add matcher: data.8, } } + #[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, - ), - ); + 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<'_> { ( @@ -4208,30 +4173,32 @@ event ERC721OrderFilled(LibNFTOrder.TradeDirection direction, address maker, add ::tokenize( &self.taker, ), - as alloy_sol_types::SolType>::tokenize(&self.nonce), + as alloy_sol_types::SolType>::tokenize( + &self.nonce, + ), ::tokenize( &self.erc20Token, ), - as alloy_sol_types::SolType>::tokenize(&self.erc20TokenAmount), + as alloy_sol_types::SolType>::tokenize( + &self.erc20TokenAmount, + ), ::tokenize( &self.erc721Token, ), - as alloy_sol_types::SolType>::tokenize(&self.erc721TokenId), + as alloy_sol_types::SolType>::tokenize( + &self.erc721TokenId, + ), ::tokenize( &self.matcher, ), ) } + #[inline] fn topics(&self) -> ::RustType { (Self::SIGNATURE_HASH.into(),) } + #[inline] fn encode_topics_raw( &self, @@ -4240,9 +4207,7 @@ event ERC721OrderFilled(LibNFTOrder.TradeDirection direction, address maker, add if out.len() < ::COUNT { return Err(alloy_sol_types::Error::Overrun); } - out[0usize] = alloy_sol_types::abi::token::WordToken( - Self::SIGNATURE_HASH, - ); + out[0usize] = alloy_sol_types::abi::token::WordToken(Self::SIGNATURE_HASH); Ok(()) } } @@ -4251,6 +4216,7 @@ event ERC721OrderFilled(LibNFTOrder.TradeDirection direction, address maker, add 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) } @@ -4265,9 +4231,9 @@ event ERC721OrderFilled(LibNFTOrder.TradeDirection direction, address maker, add }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Event with signature `ERC721OrderPreSigned(uint8,address,address,uint256,uint256,address,uint256,(address,uint256,bytes)[],address,uint256,(address,bytes)[])` and selector `0x8c5d0c41fb16a7317a6c55ff7ba93d9d74f79e434fefa694e50d6028afbfa3f0`. -```solidity -event ERC721OrderPreSigned(LibNFTOrder.TradeDirection direction, address maker, address taker, uint256 expiry, uint256 nonce, address erc20Token, uint256 erc20TokenAmount, LibNFTOrder.Fee[] fees, address erc721Token, uint256 erc721TokenId, LibNFTOrder.Property[] erc721TokenProperties); -```*/ + ```solidity + event ERC721OrderPreSigned(LibNFTOrder.TradeDirection direction, address maker, address taker, uint256 expiry, uint256 nonce, address erc20Token, uint256 erc20TokenAmount, LibNFTOrder.Fee[] fees, address erc721Token, uint256 erc721TokenId, LibNFTOrder.Property[] erc721TokenProperties); + ```*/ #[allow( non_camel_case_types, non_snake_case, @@ -4291,9 +4257,8 @@ event ERC721OrderPreSigned(LibNFTOrder.TradeDirection direction, address maker, #[allow(missing_docs)] pub erc20TokenAmount: alloy_sol_types::private::primitives::aliases::U256, #[allow(missing_docs)] - pub fees: alloy_sol_types::private::Vec< - ::RustType, - >, + pub fees: + alloy_sol_types::private::Vec<::RustType>, #[allow(missing_docs)] pub erc721Token: alloy_sol_types::private::Address, #[allow(missing_docs)] @@ -4310,9 +4275,10 @@ event ERC721OrderPreSigned(LibNFTOrder.TradeDirection direction, address maker, clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[automatically_derived] impl alloy_sol_types::SolEvent for ERC721OrderPreSigned { + type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type DataTuple<'a> = ( LibNFTOrder::TradeDirection, alloy_sol_types::sol_data::Address, @@ -4326,17 +4292,19 @@ event ERC721OrderPreSigned(LibNFTOrder.TradeDirection direction, address maker, alloy_sol_types::sol_data::Uint<256>, alloy_sol_types::sol_data::Array, ); - type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type TopicList = (alloy_sol_types::sol_data::FixedBytes<32>,); - const SIGNATURE: &'static str = "ERC721OrderPreSigned(uint8,address,address,uint256,uint256,address,uint256,(address,uint256,bytes)[],address,uint256,(address,bytes)[])"; - const SIGNATURE_HASH: alloy_sol_types::private::B256 = alloy_sol_types::private::B256::new([ - 140u8, 93u8, 12u8, 65u8, 251u8, 22u8, 167u8, 49u8, 122u8, 108u8, 85u8, - 255u8, 123u8, 169u8, 61u8, 157u8, 116u8, 247u8, 158u8, 67u8, 79u8, 239u8, - 166u8, 148u8, 229u8, 13u8, 96u8, 40u8, 175u8, 191u8, 163u8, 240u8, - ]); + const ANONYMOUS: bool = false; + const SIGNATURE: &'static str = "ERC721OrderPreSigned(uint8,address,address,uint256,\ + uint256,address,uint256,(address,uint256,bytes)[],\ + address,uint256,(address,bytes)[])"; + const SIGNATURE_HASH: alloy_sol_types::private::B256 = + alloy_sol_types::private::B256::new([ + 140u8, 93u8, 12u8, 65u8, 251u8, 22u8, 167u8, 49u8, 122u8, 108u8, 85u8, 255u8, + 123u8, 169u8, 61u8, 157u8, 116u8, 247u8, 158u8, 67u8, 79u8, 239u8, 166u8, + 148u8, 229u8, 13u8, 96u8, 40u8, 175u8, 191u8, 163u8, 240u8, + ]); + #[allow(unused_variables)] #[inline] fn new( @@ -4357,21 +4325,21 @@ event ERC721OrderPreSigned(LibNFTOrder.TradeDirection direction, address maker, erc721TokenProperties: data.10, } } + #[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, - ), - ); + 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<'_> { ( @@ -4410,10 +4378,12 @@ event ERC721OrderPreSigned(LibNFTOrder.TradeDirection direction, address maker, > as alloy_sol_types::SolType>::tokenize(&self.erc721TokenProperties), ) } + #[inline] fn topics(&self) -> ::RustType { (Self::SIGNATURE_HASH.into(),) } + #[inline] fn encode_topics_raw( &self, @@ -4422,9 +4392,7 @@ event ERC721OrderPreSigned(LibNFTOrder.TradeDirection direction, address maker, if out.len() < ::COUNT { return Err(alloy_sol_types::Error::Overrun); } - out[0usize] = alloy_sol_types::abi::token::WordToken( - Self::SIGNATURE_HASH, - ); + out[0usize] = alloy_sol_types::abi::token::WordToken(Self::SIGNATURE_HASH); Ok(()) } } @@ -4433,6 +4401,7 @@ event ERC721OrderPreSigned(LibNFTOrder.TradeDirection direction, address maker, 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) } @@ -4447,9 +4416,9 @@ event ERC721OrderPreSigned(LibNFTOrder.TradeDirection direction, address maker, }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Event with signature `LimitOrderFilled(bytes32,address,address,address,address,address,uint128,uint128,uint128,uint256,bytes32)` and selector `0xab614d2b738543c0ea21f56347cf696a3a0c42a7cbec3212a5ca22a4dcff2124`. -```solidity -event LimitOrderFilled(bytes32 orderHash, address maker, address taker, address feeRecipient, address makerToken, address takerToken, uint128 takerTokenFilledAmount, uint128 makerTokenFilledAmount, uint128 takerTokenFeeFilledAmount, uint256 protocolFeePaid, bytes32 pool); -```*/ + ```solidity + event LimitOrderFilled(bytes32 orderHash, address maker, address taker, address feeRecipient, address makerToken, address takerToken, uint128 takerTokenFilledAmount, uint128 makerTokenFilledAmount, uint128 takerTokenFeeFilledAmount, uint256 protocolFeePaid, bytes32 pool); + ```*/ #[allow( non_camel_case_types, non_snake_case, @@ -4488,9 +4457,10 @@ event LimitOrderFilled(bytes32 orderHash, address maker, address taker, address clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[automatically_derived] impl alloy_sol_types::SolEvent for LimitOrderFilled { + type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type DataTuple<'a> = ( alloy_sol_types::sol_data::FixedBytes<32>, alloy_sol_types::sol_data::Address, @@ -4504,17 +4474,19 @@ event LimitOrderFilled(bytes32 orderHash, address maker, address taker, address alloy_sol_types::sol_data::Uint<256>, alloy_sol_types::sol_data::FixedBytes<32>, ); - type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type TopicList = (alloy_sol_types::sol_data::FixedBytes<32>,); - const SIGNATURE: &'static str = "LimitOrderFilled(bytes32,address,address,address,address,address,uint128,uint128,uint128,uint256,bytes32)"; - const SIGNATURE_HASH: alloy_sol_types::private::B256 = alloy_sol_types::private::B256::new([ - 171u8, 97u8, 77u8, 43u8, 115u8, 133u8, 67u8, 192u8, 234u8, 33u8, 245u8, - 99u8, 71u8, 207u8, 105u8, 106u8, 58u8, 12u8, 66u8, 167u8, 203u8, 236u8, - 50u8, 18u8, 165u8, 202u8, 34u8, 164u8, 220u8, 255u8, 33u8, 36u8, - ]); + const ANONYMOUS: bool = false; + const SIGNATURE: &'static str = "LimitOrderFilled(bytes32,address,address,address,\ + address,address,uint128,uint128,uint128,uint256,\ + bytes32)"; + const SIGNATURE_HASH: alloy_sol_types::private::B256 = + alloy_sol_types::private::B256::new([ + 171u8, 97u8, 77u8, 43u8, 115u8, 133u8, 67u8, 192u8, 234u8, 33u8, 245u8, 99u8, + 71u8, 207u8, 105u8, 106u8, 58u8, 12u8, 66u8, 167u8, 203u8, 236u8, 50u8, 18u8, + 165u8, 202u8, 34u8, 164u8, 220u8, 255u8, 33u8, 36u8, + ]); + #[allow(unused_variables)] #[inline] fn new( @@ -4535,21 +4507,21 @@ event LimitOrderFilled(bytes32 orderHash, address maker, address taker, address pool: data.10, } } + #[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, - ), - ); + 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<'_> { ( @@ -4594,10 +4566,12 @@ event LimitOrderFilled(bytes32 orderHash, address maker, address taker, address > as alloy_sol_types::SolType>::tokenize(&self.pool), ) } + #[inline] fn topics(&self) -> ::RustType { (Self::SIGNATURE_HASH.into(),) } + #[inline] fn encode_topics_raw( &self, @@ -4606,9 +4580,7 @@ event LimitOrderFilled(bytes32 orderHash, address maker, address taker, address if out.len() < ::COUNT { return Err(alloy_sol_types::Error::Overrun); } - out[0usize] = alloy_sol_types::abi::token::WordToken( - Self::SIGNATURE_HASH, - ); + out[0usize] = alloy_sol_types::abi::token::WordToken(Self::SIGNATURE_HASH); Ok(()) } } @@ -4617,6 +4589,7 @@ event LimitOrderFilled(bytes32 orderHash, address maker, address taker, address 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) } @@ -4631,9 +4604,9 @@ event LimitOrderFilled(bytes32 orderHash, address maker, address taker, address }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Event with signature `LiquidityProviderSwap(address,address,uint256,uint256,address,address)` and selector `0x40a6ba9513d09e3488135e0e0d10e2d4382b792720155b144cbea89ac9db6d34`. -```solidity -event LiquidityProviderSwap(address inputToken, address outputToken, uint256 inputTokenAmount, uint256 outputTokenAmount, address provider, address recipient); -```*/ + ```solidity + event LiquidityProviderSwap(address inputToken, address outputToken, uint256 inputTokenAmount, uint256 outputTokenAmount, address provider, address recipient); + ```*/ #[allow( non_camel_case_types, non_snake_case, @@ -4662,9 +4635,10 @@ event LiquidityProviderSwap(address inputToken, address outputToken, uint256 inp clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[automatically_derived] impl alloy_sol_types::SolEvent for LiquidityProviderSwap { + type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type DataTuple<'a> = ( alloy_sol_types::sol_data::Address, alloy_sol_types::sol_data::Address, @@ -4673,17 +4647,18 @@ event LiquidityProviderSwap(address inputToken, address outputToken, uint256 inp alloy_sol_types::sol_data::Address, 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 = "LiquidityProviderSwap(address,address,uint256,uint256,address,address)"; - const SIGNATURE_HASH: alloy_sol_types::private::B256 = alloy_sol_types::private::B256::new([ - 64u8, 166u8, 186u8, 149u8, 19u8, 208u8, 158u8, 52u8, 136u8, 19u8, 94u8, - 14u8, 13u8, 16u8, 226u8, 212u8, 56u8, 43u8, 121u8, 39u8, 32u8, 21u8, - 91u8, 20u8, 76u8, 190u8, 168u8, 154u8, 201u8, 219u8, 109u8, 52u8, - ]); + const ANONYMOUS: bool = false; + const SIGNATURE: &'static str = + "LiquidityProviderSwap(address,address,uint256,uint256,address,address)"; + const SIGNATURE_HASH: alloy_sol_types::private::B256 = + alloy_sol_types::private::B256::new([ + 64u8, 166u8, 186u8, 149u8, 19u8, 208u8, 158u8, 52u8, 136u8, 19u8, 94u8, 14u8, + 13u8, 16u8, 226u8, 212u8, 56u8, 43u8, 121u8, 39u8, 32u8, 21u8, 91u8, 20u8, + 76u8, 190u8, 168u8, 154u8, 201u8, 219u8, 109u8, 52u8, + ]); + #[allow(unused_variables)] #[inline] fn new( @@ -4699,21 +4674,21 @@ event LiquidityProviderSwap(address inputToken, address outputToken, uint256 inp recipient: data.5, } } + #[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, - ), - ); + 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<'_> { ( @@ -4723,12 +4698,12 @@ event LiquidityProviderSwap(address inputToken, address outputToken, uint256 inp ::tokenize( &self.outputToken, ), - as alloy_sol_types::SolType>::tokenize(&self.inputTokenAmount), - as alloy_sol_types::SolType>::tokenize(&self.outputTokenAmount), + as alloy_sol_types::SolType>::tokenize( + &self.inputTokenAmount, + ), + as alloy_sol_types::SolType>::tokenize( + &self.outputTokenAmount, + ), ::tokenize( &self.provider, ), @@ -4737,10 +4712,12 @@ event LiquidityProviderSwap(address inputToken, address outputToken, uint256 inp ), ) } + #[inline] fn topics(&self) -> ::RustType { (Self::SIGNATURE_HASH.into(),) } + #[inline] fn encode_topics_raw( &self, @@ -4749,9 +4726,7 @@ event LiquidityProviderSwap(address inputToken, address outputToken, uint256 inp if out.len() < ::COUNT { return Err(alloy_sol_types::Error::Overrun); } - out[0usize] = alloy_sol_types::abi::token::WordToken( - Self::SIGNATURE_HASH, - ); + out[0usize] = alloy_sol_types::abi::token::WordToken(Self::SIGNATURE_HASH); Ok(()) } } @@ -4760,6 +4735,7 @@ event LiquidityProviderSwap(address inputToken, address outputToken, uint256 inp 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) } @@ -4774,9 +4750,9 @@ event LiquidityProviderSwap(address inputToken, address outputToken, uint256 inp }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Event with signature `MetaTransactionExecuted(bytes32,bytes4,address,address)` and selector `0x7f4fe3ff8ae440e1570c558da08440b26f89fb1c1f2910cd91ca6452955f121a`. -```solidity -event MetaTransactionExecuted(bytes32 hash, bytes4 indexed selector, address signer, address sender); -```*/ + ```solidity + event MetaTransactionExecuted(bytes32 hash, bytes4 indexed selector, address signer, address sender); + ```*/ #[allow( non_camel_case_types, non_snake_case, @@ -4801,28 +4777,30 @@ event MetaTransactionExecuted(bytes32 hash, bytes4 indexed selector, address sig clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[automatically_derived] impl alloy_sol_types::SolEvent for MetaTransactionExecuted { + type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type DataTuple<'a> = ( alloy_sol_types::sol_data::FixedBytes<32>, alloy_sol_types::sol_data::Address, 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::FixedBytes<4>, ); - const SIGNATURE: &'static str = "MetaTransactionExecuted(bytes32,bytes4,address,address)"; - const SIGNATURE_HASH: alloy_sol_types::private::B256 = alloy_sol_types::private::B256::new([ - 127u8, 79u8, 227u8, 255u8, 138u8, 228u8, 64u8, 225u8, 87u8, 12u8, 85u8, - 141u8, 160u8, 132u8, 64u8, 178u8, 111u8, 137u8, 251u8, 28u8, 31u8, 41u8, - 16u8, 205u8, 145u8, 202u8, 100u8, 82u8, 149u8, 95u8, 18u8, 26u8, - ]); + const ANONYMOUS: bool = false; + const SIGNATURE: &'static str = + "MetaTransactionExecuted(bytes32,bytes4,address,address)"; + const SIGNATURE_HASH: alloy_sol_types::private::B256 = + alloy_sol_types::private::B256::new([ + 127u8, 79u8, 227u8, 255u8, 138u8, 228u8, 64u8, 225u8, 87u8, 12u8, 85u8, 141u8, + 160u8, 132u8, 64u8, 178u8, 111u8, 137u8, 251u8, 28u8, 31u8, 41u8, 16u8, 205u8, + 145u8, 202u8, 100u8, 82u8, 149u8, 95u8, 18u8, 26u8, + ]); + #[allow(unused_variables)] #[inline] fn new( @@ -4836,21 +4814,21 @@ event MetaTransactionExecuted(bytes32 hash, bytes4 indexed selector, address sig sender: data.2, } } + #[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, - ), - ); + 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<'_> { ( @@ -4865,10 +4843,12 @@ event MetaTransactionExecuted(bytes32 hash, bytes4 indexed selector, address sig ), ) } + #[inline] fn topics(&self) -> ::RustType { (Self::SIGNATURE_HASH.into(), self.selector.clone()) } + #[inline] fn encode_topics_raw( &self, @@ -4877,9 +4857,7 @@ event MetaTransactionExecuted(bytes32 hash, bytes4 indexed selector, address sig if out.len() < ::COUNT { return Err(alloy_sol_types::Error::Overrun); } - out[0usize] = alloy_sol_types::abi::token::WordToken( - Self::SIGNATURE_HASH, - ); + out[0usize] = alloy_sol_types::abi::token::WordToken(Self::SIGNATURE_HASH); out[1usize] = as alloy_sol_types::EventTopic>::encode_topic(&self.selector); @@ -4891,6 +4869,7 @@ event MetaTransactionExecuted(bytes32 hash, bytes4 indexed selector, address sig 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) } @@ -4898,18 +4877,16 @@ event MetaTransactionExecuted(bytes32 hash, bytes4 indexed selector, address sig #[automatically_derived] impl From<&MetaTransactionExecuted> for alloy_sol_types::private::LogData { #[inline] - fn from( - this: &MetaTransactionExecuted, - ) -> alloy_sol_types::private::LogData { + fn from(this: &MetaTransactionExecuted) -> alloy_sol_types::private::LogData { alloy_sol_types::SolEvent::encode_log_data(this) } } }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Event with signature `Migrated(address,address,address)` and selector `0xe1b831b0e6f3aa16b4b1a6bd526b5cdeab4940744ca6e0251f5fe5f8caf1c81a`. -```solidity -event Migrated(address caller, address migrator, address newOwner); -```*/ + ```solidity + event Migrated(address caller, address migrator, address newOwner); + ```*/ #[allow( non_camel_case_types, non_snake_case, @@ -4932,25 +4909,26 @@ event Migrated(address caller, address migrator, address newOwner); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[automatically_derived] impl alloy_sol_types::SolEvent for Migrated { + type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type DataTuple<'a> = ( alloy_sol_types::sol_data::Address, alloy_sol_types::sol_data::Address, 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 = "Migrated(address,address,address)"; - const SIGNATURE_HASH: alloy_sol_types::private::B256 = alloy_sol_types::private::B256::new([ - 225u8, 184u8, 49u8, 176u8, 230u8, 243u8, 170u8, 22u8, 180u8, 177u8, - 166u8, 189u8, 82u8, 107u8, 92u8, 222u8, 171u8, 73u8, 64u8, 116u8, 76u8, - 166u8, 224u8, 37u8, 31u8, 95u8, 229u8, 248u8, 202u8, 241u8, 200u8, 26u8, - ]); + const ANONYMOUS: bool = false; + const SIGNATURE: &'static str = "Migrated(address,address,address)"; + const SIGNATURE_HASH: alloy_sol_types::private::B256 = + alloy_sol_types::private::B256::new([ + 225u8, 184u8, 49u8, 176u8, 230u8, 243u8, 170u8, 22u8, 180u8, 177u8, 166u8, + 189u8, 82u8, 107u8, 92u8, 222u8, 171u8, 73u8, 64u8, 116u8, 76u8, 166u8, 224u8, + 37u8, 31u8, 95u8, 229u8, 248u8, 202u8, 241u8, 200u8, 26u8, + ]); + #[allow(unused_variables)] #[inline] fn new( @@ -4963,21 +4941,21 @@ event Migrated(address caller, address migrator, address newOwner); newOwner: data.2, } } + #[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, - ), - ); + 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<'_> { ( @@ -4992,10 +4970,12 @@ event Migrated(address caller, address migrator, address newOwner); ), ) } + #[inline] fn topics(&self) -> ::RustType { (Self::SIGNATURE_HASH.into(),) } + #[inline] fn encode_topics_raw( &self, @@ -5004,9 +4984,7 @@ event Migrated(address caller, address migrator, address newOwner); if out.len() < ::COUNT { return Err(alloy_sol_types::Error::Overrun); } - out[0usize] = alloy_sol_types::abi::token::WordToken( - Self::SIGNATURE_HASH, - ); + out[0usize] = alloy_sol_types::abi::token::WordToken(Self::SIGNATURE_HASH); Ok(()) } } @@ -5015,6 +4993,7 @@ event Migrated(address caller, address migrator, address newOwner); 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) } @@ -5029,9 +5008,9 @@ event Migrated(address caller, address migrator, address newOwner); }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Event with signature `OrderCancelled(bytes32,address)` and selector `0xa6eb7cdc219e1518ced964e9a34e61d68a94e4f1569db3e84256ba981ba52753`. -```solidity -event OrderCancelled(bytes32 orderHash, address maker); -```*/ + ```solidity + event OrderCancelled(bytes32 orderHash, address maker); + ```*/ #[allow( non_camel_case_types, non_snake_case, @@ -5052,24 +5031,25 @@ event OrderCancelled(bytes32 orderHash, address maker); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[automatically_derived] impl alloy_sol_types::SolEvent for OrderCancelled { + type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type DataTuple<'a> = ( alloy_sol_types::sol_data::FixedBytes<32>, 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 = "OrderCancelled(bytes32,address)"; - const SIGNATURE_HASH: alloy_sol_types::private::B256 = alloy_sol_types::private::B256::new([ - 166u8, 235u8, 124u8, 220u8, 33u8, 158u8, 21u8, 24u8, 206u8, 217u8, 100u8, - 233u8, 163u8, 78u8, 97u8, 214u8, 138u8, 148u8, 228u8, 241u8, 86u8, 157u8, - 179u8, 232u8, 66u8, 86u8, 186u8, 152u8, 27u8, 165u8, 39u8, 83u8, - ]); + const ANONYMOUS: bool = false; + const SIGNATURE: &'static str = "OrderCancelled(bytes32,address)"; + const SIGNATURE_HASH: alloy_sol_types::private::B256 = + alloy_sol_types::private::B256::new([ + 166u8, 235u8, 124u8, 220u8, 33u8, 158u8, 21u8, 24u8, 206u8, 217u8, 100u8, + 233u8, 163u8, 78u8, 97u8, 214u8, 138u8, 148u8, 228u8, 241u8, 86u8, 157u8, + 179u8, 232u8, 66u8, 86u8, 186u8, 152u8, 27u8, 165u8, 39u8, 83u8, + ]); + #[allow(unused_variables)] #[inline] fn new( @@ -5081,21 +5061,21 @@ event OrderCancelled(bytes32 orderHash, address maker); maker: 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, - ), - ); + 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<'_> { ( @@ -5107,10 +5087,12 @@ event OrderCancelled(bytes32 orderHash, address maker); ), ) } + #[inline] fn topics(&self) -> ::RustType { (Self::SIGNATURE_HASH.into(),) } + #[inline] fn encode_topics_raw( &self, @@ -5119,9 +5101,7 @@ event OrderCancelled(bytes32 orderHash, address maker); if out.len() < ::COUNT { return Err(alloy_sol_types::Error::Overrun); } - out[0usize] = alloy_sol_types::abi::token::WordToken( - Self::SIGNATURE_HASH, - ); + out[0usize] = alloy_sol_types::abi::token::WordToken(Self::SIGNATURE_HASH); Ok(()) } } @@ -5130,6 +5110,7 @@ event OrderCancelled(bytes32 orderHash, address maker); 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) } @@ -5144,9 +5125,9 @@ event OrderCancelled(bytes32 orderHash, address maker); }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Event with signature `OrderSignerRegistered(address,address,bool)` and selector `0x6ea9dbe8b2cc119348716a9220a0742ad62b7884ecb0ff4b32cd508121fd9379`. -```solidity -event OrderSignerRegistered(address maker, address signer, bool allowed); -```*/ + ```solidity + event OrderSignerRegistered(address maker, address signer, bool allowed); + ```*/ #[allow( non_camel_case_types, non_snake_case, @@ -5169,25 +5150,26 @@ event OrderSignerRegistered(address maker, address signer, bool allowed); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[automatically_derived] impl alloy_sol_types::SolEvent for OrderSignerRegistered { + type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type DataTuple<'a> = ( alloy_sol_types::sol_data::Address, alloy_sol_types::sol_data::Address, alloy_sol_types::sol_data::Bool, ); - type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type TopicList = (alloy_sol_types::sol_data::FixedBytes<32>,); - const SIGNATURE: &'static str = "OrderSignerRegistered(address,address,bool)"; - const SIGNATURE_HASH: alloy_sol_types::private::B256 = alloy_sol_types::private::B256::new([ - 110u8, 169u8, 219u8, 232u8, 178u8, 204u8, 17u8, 147u8, 72u8, 113u8, - 106u8, 146u8, 32u8, 160u8, 116u8, 42u8, 214u8, 43u8, 120u8, 132u8, 236u8, - 176u8, 255u8, 75u8, 50u8, 205u8, 80u8, 129u8, 33u8, 253u8, 147u8, 121u8, - ]); + const ANONYMOUS: bool = false; + const SIGNATURE: &'static str = "OrderSignerRegistered(address,address,bool)"; + const SIGNATURE_HASH: alloy_sol_types::private::B256 = + alloy_sol_types::private::B256::new([ + 110u8, 169u8, 219u8, 232u8, 178u8, 204u8, 17u8, 147u8, 72u8, 113u8, 106u8, + 146u8, 32u8, 160u8, 116u8, 42u8, 214u8, 43u8, 120u8, 132u8, 236u8, 176u8, + 255u8, 75u8, 50u8, 205u8, 80u8, 129u8, 33u8, 253u8, 147u8, 121u8, + ]); + #[allow(unused_variables)] #[inline] fn new( @@ -5200,21 +5182,21 @@ event OrderSignerRegistered(address maker, address signer, bool allowed); allowed: data.2, } } + #[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, - ), - ); + 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<'_> { ( @@ -5229,10 +5211,12 @@ event OrderSignerRegistered(address maker, address signer, bool allowed); ), ) } + #[inline] fn topics(&self) -> ::RustType { (Self::SIGNATURE_HASH.into(),) } + #[inline] fn encode_topics_raw( &self, @@ -5241,9 +5225,7 @@ event OrderSignerRegistered(address maker, address signer, bool allowed); if out.len() < ::COUNT { return Err(alloy_sol_types::Error::Overrun); } - out[0usize] = alloy_sol_types::abi::token::WordToken( - Self::SIGNATURE_HASH, - ); + out[0usize] = alloy_sol_types::abi::token::WordToken(Self::SIGNATURE_HASH); Ok(()) } } @@ -5252,6 +5234,7 @@ event OrderSignerRegistered(address maker, address signer, bool allowed); 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) } @@ -5266,9 +5249,9 @@ event OrderSignerRegistered(address maker, address signer, bool allowed); }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Event with signature `OtcOrderFilled(bytes32,address,address,address,address,uint128,uint128)` and selector `0xac75f773e3a92f1a02b12134d65e1f47f8a14eabe4eaf1e24624918e6a8b269f`. -```solidity -event OtcOrderFilled(bytes32 orderHash, address maker, address taker, address makerToken, address takerToken, uint128 makerTokenFilledAmount, uint128 takerTokenFilledAmount); -```*/ + ```solidity + event OtcOrderFilled(bytes32 orderHash, address maker, address taker, address makerToken, address takerToken, uint128 makerTokenFilledAmount, uint128 takerTokenFilledAmount); + ```*/ #[allow( non_camel_case_types, non_snake_case, @@ -5299,9 +5282,10 @@ event OtcOrderFilled(bytes32 orderHash, address maker, address taker, address ma clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[automatically_derived] impl alloy_sol_types::SolEvent for OtcOrderFilled { + type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type DataTuple<'a> = ( alloy_sol_types::sol_data::FixedBytes<32>, alloy_sol_types::sol_data::Address, @@ -5311,17 +5295,18 @@ event OtcOrderFilled(bytes32 orderHash, address maker, address taker, address ma alloy_sol_types::sol_data::Uint<128>, alloy_sol_types::sol_data::Uint<128>, ); - type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type TopicList = (alloy_sol_types::sol_data::FixedBytes<32>,); - const SIGNATURE: &'static str = "OtcOrderFilled(bytes32,address,address,address,address,uint128,uint128)"; - const SIGNATURE_HASH: alloy_sol_types::private::B256 = alloy_sol_types::private::B256::new([ - 172u8, 117u8, 247u8, 115u8, 227u8, 169u8, 47u8, 26u8, 2u8, 177u8, 33u8, - 52u8, 214u8, 94u8, 31u8, 71u8, 248u8, 161u8, 78u8, 171u8, 228u8, 234u8, - 241u8, 226u8, 70u8, 36u8, 145u8, 142u8, 106u8, 139u8, 38u8, 159u8, - ]); + const ANONYMOUS: bool = false; + const SIGNATURE: &'static str = + "OtcOrderFilled(bytes32,address,address,address,address,uint128,uint128)"; + const SIGNATURE_HASH: alloy_sol_types::private::B256 = + alloy_sol_types::private::B256::new([ + 172u8, 117u8, 247u8, 115u8, 227u8, 169u8, 47u8, 26u8, 2u8, 177u8, 33u8, 52u8, + 214u8, 94u8, 31u8, 71u8, 248u8, 161u8, 78u8, 171u8, 228u8, 234u8, 241u8, 226u8, + 70u8, 36u8, 145u8, 142u8, 106u8, 139u8, 38u8, 159u8, + ]); + #[allow(unused_variables)] #[inline] fn new( @@ -5338,21 +5323,21 @@ event OtcOrderFilled(bytes32 orderHash, address maker, address taker, address ma takerTokenFilledAmount: data.6, } } + #[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, - ), - ); + 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<'_> { ( @@ -5383,10 +5368,12 @@ event OtcOrderFilled(bytes32 orderHash, address maker, address taker, address ma ), ) } + #[inline] fn topics(&self) -> ::RustType { (Self::SIGNATURE_HASH.into(),) } + #[inline] fn encode_topics_raw( &self, @@ -5395,9 +5382,7 @@ event OtcOrderFilled(bytes32 orderHash, address maker, address taker, address ma if out.len() < ::COUNT { return Err(alloy_sol_types::Error::Overrun); } - out[0usize] = alloy_sol_types::abi::token::WordToken( - Self::SIGNATURE_HASH, - ); + out[0usize] = alloy_sol_types::abi::token::WordToken(Self::SIGNATURE_HASH); Ok(()) } } @@ -5406,6 +5391,7 @@ event OtcOrderFilled(bytes32 orderHash, address maker, address taker, address ma 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) } @@ -5420,9 +5406,9 @@ event OtcOrderFilled(bytes32 orderHash, address maker, address taker, address ma }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Event with signature `OwnershipTransferred(address,address)` and selector `0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0`. -```solidity -event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); -```*/ + ```solidity + event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); + ```*/ #[allow( non_camel_case_types, non_snake_case, @@ -5443,25 +5429,26 @@ event OwnershipTransferred(address indexed previousOwner, address indexed newOwn clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[automatically_derived] impl alloy_sol_types::SolEvent for OwnershipTransferred { + type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; 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::Address, alloy_sol_types::sol_data::Address, ); - const SIGNATURE: &'static str = "OwnershipTransferred(address,address)"; - const SIGNATURE_HASH: alloy_sol_types::private::B256 = alloy_sol_types::private::B256::new([ - 139u8, 224u8, 7u8, 156u8, 83u8, 22u8, 89u8, 20u8, 19u8, 68u8, 205u8, - 31u8, 208u8, 164u8, 242u8, 132u8, 25u8, 73u8, 127u8, 151u8, 34u8, 163u8, - 218u8, 175u8, 227u8, 180u8, 24u8, 111u8, 107u8, 100u8, 87u8, 224u8, - ]); + const ANONYMOUS: bool = false; + const SIGNATURE: &'static str = "OwnershipTransferred(address,address)"; + const SIGNATURE_HASH: alloy_sol_types::private::B256 = + alloy_sol_types::private::B256::new([ + 139u8, 224u8, 7u8, 156u8, 83u8, 22u8, 89u8, 20u8, 19u8, 68u8, 205u8, 31u8, + 208u8, 164u8, 242u8, 132u8, 25u8, 73u8, 127u8, 151u8, 34u8, 163u8, 218u8, + 175u8, 227u8, 180u8, 24u8, 111u8, 107u8, 100u8, 87u8, 224u8, + ]); + #[allow(unused_variables)] #[inline] fn new( @@ -5473,25 +5460,26 @@ event OwnershipTransferred(address indexed previousOwner, address indexed newOwn newOwner: topics.2, } } + #[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, - ), - ); + 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 { ( @@ -5500,6 +5488,7 @@ event OwnershipTransferred(address indexed previousOwner, address indexed newOwn self.newOwner.clone(), ) } + #[inline] fn encode_topics_raw( &self, @@ -5508,9 +5497,7 @@ event OwnershipTransferred(address indexed previousOwner, address indexed newOwn if out.len() < ::COUNT { return Err(alloy_sol_types::Error::Overrun); } - out[0usize] = alloy_sol_types::abi::token::WordToken( - Self::SIGNATURE_HASH, - ); + out[0usize] = alloy_sol_types::abi::token::WordToken(Self::SIGNATURE_HASH); out[1usize] = ::encode_topic( &self.previousOwner, ); @@ -5525,6 +5512,7 @@ event OwnershipTransferred(address indexed previousOwner, address indexed newOwn 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) } @@ -5539,9 +5527,9 @@ event OwnershipTransferred(address indexed previousOwner, address indexed newOwn }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Event with signature `PairCancelledLimitOrders(address,address,address,uint256)` and selector `0xa91fe7ae62fce669df2c7f880f8c14d178531aae72515558e5c948e37c32a572`. -```solidity -event PairCancelledLimitOrders(address maker, address makerToken, address takerToken, uint256 minValidSalt); -```*/ + ```solidity + event PairCancelledLimitOrders(address maker, address makerToken, address takerToken, uint256 minValidSalt); + ```*/ #[allow( non_camel_case_types, non_snake_case, @@ -5566,26 +5554,28 @@ event PairCancelledLimitOrders(address maker, address makerToken, address takerT clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[automatically_derived] impl alloy_sol_types::SolEvent for PairCancelledLimitOrders { + type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type DataTuple<'a> = ( alloy_sol_types::sol_data::Address, alloy_sol_types::sol_data::Address, alloy_sol_types::sol_data::Address, 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>,); - const SIGNATURE: &'static str = "PairCancelledLimitOrders(address,address,address,uint256)"; - const SIGNATURE_HASH: alloy_sol_types::private::B256 = alloy_sol_types::private::B256::new([ - 169u8, 31u8, 231u8, 174u8, 98u8, 252u8, 230u8, 105u8, 223u8, 44u8, 127u8, - 136u8, 15u8, 140u8, 20u8, 209u8, 120u8, 83u8, 26u8, 174u8, 114u8, 81u8, - 85u8, 88u8, 229u8, 201u8, 72u8, 227u8, 124u8, 50u8, 165u8, 114u8, - ]); + const ANONYMOUS: bool = false; + const SIGNATURE: &'static str = + "PairCancelledLimitOrders(address,address,address,uint256)"; + const SIGNATURE_HASH: alloy_sol_types::private::B256 = + alloy_sol_types::private::B256::new([ + 169u8, 31u8, 231u8, 174u8, 98u8, 252u8, 230u8, 105u8, 223u8, 44u8, 127u8, + 136u8, 15u8, 140u8, 20u8, 209u8, 120u8, 83u8, 26u8, 174u8, 114u8, 81u8, 85u8, + 88u8, 229u8, 201u8, 72u8, 227u8, 124u8, 50u8, 165u8, 114u8, + ]); + #[allow(unused_variables)] #[inline] fn new( @@ -5599,21 +5589,21 @@ event PairCancelledLimitOrders(address maker, address makerToken, address takerT minValidSalt: data.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, - ), - ); + 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<'_> { ( @@ -5626,15 +5616,17 @@ event PairCancelledLimitOrders(address maker, address makerToken, address takerT ::tokenize( &self.takerToken, ), - as alloy_sol_types::SolType>::tokenize(&self.minValidSalt), + as alloy_sol_types::SolType>::tokenize( + &self.minValidSalt, + ), ) } + #[inline] fn topics(&self) -> ::RustType { (Self::SIGNATURE_HASH.into(),) } + #[inline] fn encode_topics_raw( &self, @@ -5643,9 +5635,7 @@ event PairCancelledLimitOrders(address maker, address makerToken, address takerT if out.len() < ::COUNT { return Err(alloy_sol_types::Error::Overrun); } - out[0usize] = alloy_sol_types::abi::token::WordToken( - Self::SIGNATURE_HASH, - ); + out[0usize] = alloy_sol_types::abi::token::WordToken(Self::SIGNATURE_HASH); Ok(()) } } @@ -5654,6 +5644,7 @@ event PairCancelledLimitOrders(address maker, address makerToken, address takerT 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) } @@ -5661,18 +5652,16 @@ event PairCancelledLimitOrders(address maker, address makerToken, address takerT #[automatically_derived] impl From<&PairCancelledLimitOrders> for alloy_sol_types::private::LogData { #[inline] - fn from( - this: &PairCancelledLimitOrders, - ) -> alloy_sol_types::private::LogData { + fn from(this: &PairCancelledLimitOrders) -> alloy_sol_types::private::LogData { alloy_sol_types::SolEvent::encode_log_data(this) } } }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Event with signature `PairCancelledRfqOrders(address,address,address,uint256)` and selector `0xfe7ffb1edfe79f4df716cb2dcad21cf2f31b104d816a7976ba1e6e4653c1efb1`. -```solidity -event PairCancelledRfqOrders(address maker, address makerToken, address takerToken, uint256 minValidSalt); -```*/ + ```solidity + event PairCancelledRfqOrders(address maker, address makerToken, address takerToken, uint256 minValidSalt); + ```*/ #[allow( non_camel_case_types, non_snake_case, @@ -5697,26 +5686,28 @@ event PairCancelledRfqOrders(address maker, address makerToken, address takerTok clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[automatically_derived] impl alloy_sol_types::SolEvent for PairCancelledRfqOrders { + type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type DataTuple<'a> = ( alloy_sol_types::sol_data::Address, alloy_sol_types::sol_data::Address, alloy_sol_types::sol_data::Address, 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>,); - const SIGNATURE: &'static str = "PairCancelledRfqOrders(address,address,address,uint256)"; - const SIGNATURE_HASH: alloy_sol_types::private::B256 = alloy_sol_types::private::B256::new([ - 254u8, 127u8, 251u8, 30u8, 223u8, 231u8, 159u8, 77u8, 247u8, 22u8, 203u8, - 45u8, 202u8, 210u8, 28u8, 242u8, 243u8, 27u8, 16u8, 77u8, 129u8, 106u8, - 121u8, 118u8, 186u8, 30u8, 110u8, 70u8, 83u8, 193u8, 239u8, 177u8, - ]); + const ANONYMOUS: bool = false; + const SIGNATURE: &'static str = + "PairCancelledRfqOrders(address,address,address,uint256)"; + const SIGNATURE_HASH: alloy_sol_types::private::B256 = + alloy_sol_types::private::B256::new([ + 254u8, 127u8, 251u8, 30u8, 223u8, 231u8, 159u8, 77u8, 247u8, 22u8, 203u8, 45u8, + 202u8, 210u8, 28u8, 242u8, 243u8, 27u8, 16u8, 77u8, 129u8, 106u8, 121u8, 118u8, + 186u8, 30u8, 110u8, 70u8, 83u8, 193u8, 239u8, 177u8, + ]); + #[allow(unused_variables)] #[inline] fn new( @@ -5730,21 +5721,21 @@ event PairCancelledRfqOrders(address maker, address makerToken, address takerTok minValidSalt: data.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, - ), - ); + 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<'_> { ( @@ -5757,15 +5748,17 @@ event PairCancelledRfqOrders(address maker, address makerToken, address takerTok ::tokenize( &self.takerToken, ), - as alloy_sol_types::SolType>::tokenize(&self.minValidSalt), + as alloy_sol_types::SolType>::tokenize( + &self.minValidSalt, + ), ) } + #[inline] fn topics(&self) -> ::RustType { (Self::SIGNATURE_HASH.into(),) } + #[inline] fn encode_topics_raw( &self, @@ -5774,9 +5767,7 @@ event PairCancelledRfqOrders(address maker, address makerToken, address takerTok if out.len() < ::COUNT { return Err(alloy_sol_types::Error::Overrun); } - out[0usize] = alloy_sol_types::abi::token::WordToken( - Self::SIGNATURE_HASH, - ); + out[0usize] = alloy_sol_types::abi::token::WordToken(Self::SIGNATURE_HASH); Ok(()) } } @@ -5785,6 +5776,7 @@ event PairCancelledRfqOrders(address maker, address makerToken, address takerTok 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) } @@ -5799,9 +5791,9 @@ event PairCancelledRfqOrders(address maker, address makerToken, address takerTok }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Event with signature `ProxyFunctionUpdated(bytes4,address,address)` and selector `0x2ae221083467de52078b0096696ab88d8d53a7ecb44bb65b56a2bab687598367`. -```solidity -event ProxyFunctionUpdated(bytes4 indexed selector, address oldImpl, address newImpl); -```*/ + ```solidity + event ProxyFunctionUpdated(bytes4 indexed selector, address oldImpl, address newImpl); + ```*/ #[allow( non_camel_case_types, non_snake_case, @@ -5824,27 +5816,28 @@ event ProxyFunctionUpdated(bytes4 indexed selector, address oldImpl, address new clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[automatically_derived] impl alloy_sol_types::SolEvent for ProxyFunctionUpdated { + type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type DataTuple<'a> = ( alloy_sol_types::sol_data::Address, 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::FixedBytes<4>, ); - const SIGNATURE: &'static str = "ProxyFunctionUpdated(bytes4,address,address)"; - const SIGNATURE_HASH: alloy_sol_types::private::B256 = alloy_sol_types::private::B256::new([ - 42u8, 226u8, 33u8, 8u8, 52u8, 103u8, 222u8, 82u8, 7u8, 139u8, 0u8, 150u8, - 105u8, 106u8, 184u8, 141u8, 141u8, 83u8, 167u8, 236u8, 180u8, 75u8, - 182u8, 91u8, 86u8, 162u8, 186u8, 182u8, 135u8, 89u8, 131u8, 103u8, - ]); + const ANONYMOUS: bool = false; + const SIGNATURE: &'static str = "ProxyFunctionUpdated(bytes4,address,address)"; + const SIGNATURE_HASH: alloy_sol_types::private::B256 = + alloy_sol_types::private::B256::new([ + 42u8, 226u8, 33u8, 8u8, 52u8, 103u8, 222u8, 82u8, 7u8, 139u8, 0u8, 150u8, + 105u8, 106u8, 184u8, 141u8, 141u8, 83u8, 167u8, 236u8, 180u8, 75u8, 182u8, + 91u8, 86u8, 162u8, 186u8, 182u8, 135u8, 89u8, 131u8, 103u8, + ]); + #[allow(unused_variables)] #[inline] fn new( @@ -5857,21 +5850,21 @@ event ProxyFunctionUpdated(bytes4 indexed selector, address oldImpl, address new newImpl: 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, - ), - ); + 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<'_> { ( @@ -5883,10 +5876,12 @@ event ProxyFunctionUpdated(bytes4 indexed selector, address oldImpl, address new ), ) } + #[inline] fn topics(&self) -> ::RustType { (Self::SIGNATURE_HASH.into(), self.selector.clone()) } + #[inline] fn encode_topics_raw( &self, @@ -5895,9 +5890,7 @@ event ProxyFunctionUpdated(bytes4 indexed selector, address oldImpl, address new if out.len() < ::COUNT { return Err(alloy_sol_types::Error::Overrun); } - out[0usize] = alloy_sol_types::abi::token::WordToken( - Self::SIGNATURE_HASH, - ); + out[0usize] = alloy_sol_types::abi::token::WordToken(Self::SIGNATURE_HASH); out[1usize] = as alloy_sol_types::EventTopic>::encode_topic(&self.selector); @@ -5909,6 +5902,7 @@ event ProxyFunctionUpdated(bytes4 indexed selector, address oldImpl, address new 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) } @@ -5923,9 +5917,9 @@ event ProxyFunctionUpdated(bytes4 indexed selector, address oldImpl, address new }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Event with signature `QuoteSignerUpdated(address)` and selector `0xf5550c5eea19b48ac6eb5f03abdc4f59c0a60697abb3d973cd68669703b5c8b9`. -```solidity -event QuoteSignerUpdated(address quoteSigner); -```*/ + ```solidity + event QuoteSignerUpdated(address quoteSigner); + ```*/ #[allow( non_camel_case_types, non_snake_case, @@ -5944,44 +5938,47 @@ event QuoteSignerUpdated(address quoteSigner); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[automatically_derived] impl alloy_sol_types::SolEvent for QuoteSignerUpdated { + type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; 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 = "QuoteSignerUpdated(address)"; - const SIGNATURE_HASH: alloy_sol_types::private::B256 = alloy_sol_types::private::B256::new([ - 245u8, 85u8, 12u8, 94u8, 234u8, 25u8, 180u8, 138u8, 198u8, 235u8, 95u8, - 3u8, 171u8, 220u8, 79u8, 89u8, 192u8, 166u8, 6u8, 151u8, 171u8, 179u8, - 217u8, 115u8, 205u8, 104u8, 102u8, 151u8, 3u8, 181u8, 200u8, 185u8, - ]); + const ANONYMOUS: bool = false; + const SIGNATURE: &'static str = "QuoteSignerUpdated(address)"; + const SIGNATURE_HASH: alloy_sol_types::private::B256 = + alloy_sol_types::private::B256::new([ + 245u8, 85u8, 12u8, 94u8, 234u8, 25u8, 180u8, 138u8, 198u8, 235u8, 95u8, 3u8, + 171u8, 220u8, 79u8, 89u8, 192u8, 166u8, 6u8, 151u8, 171u8, 179u8, 217u8, 115u8, + 205u8, 104u8, 102u8, 151u8, 3u8, 181u8, 200u8, 185u8, + ]); + #[allow(unused_variables)] #[inline] fn new( topics: ::RustType, data: as alloy_sol_types::SolType>::RustType, ) -> Self { - Self { quoteSigner: data.0 } + Self { + quoteSigner: 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, - ), - ); + 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<'_> { ( @@ -5990,10 +5987,12 @@ event QuoteSignerUpdated(address quoteSigner); ), ) } + #[inline] fn topics(&self) -> ::RustType { (Self::SIGNATURE_HASH.into(),) } + #[inline] fn encode_topics_raw( &self, @@ -6002,9 +6001,7 @@ event QuoteSignerUpdated(address quoteSigner); if out.len() < ::COUNT { return Err(alloy_sol_types::Error::Overrun); } - out[0usize] = alloy_sol_types::abi::token::WordToken( - Self::SIGNATURE_HASH, - ); + out[0usize] = alloy_sol_types::abi::token::WordToken(Self::SIGNATURE_HASH); Ok(()) } } @@ -6013,6 +6010,7 @@ event QuoteSignerUpdated(address quoteSigner); 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) } @@ -6027,9 +6025,9 @@ event QuoteSignerUpdated(address quoteSigner); }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Event with signature `RfqOrderFilled(bytes32,address,address,address,address,uint128,uint128,bytes32)` and selector `0x829fa99d94dc4636925b38632e625736a614c154d55006b7ab6bea979c210c32`. -```solidity -event RfqOrderFilled(bytes32 orderHash, address maker, address taker, address makerToken, address takerToken, uint128 takerTokenFilledAmount, uint128 makerTokenFilledAmount, bytes32 pool); -```*/ + ```solidity + event RfqOrderFilled(bytes32 orderHash, address maker, address taker, address makerToken, address takerToken, uint128 takerTokenFilledAmount, uint128 makerTokenFilledAmount, bytes32 pool); + ```*/ #[allow( non_camel_case_types, non_snake_case, @@ -6062,9 +6060,10 @@ event RfqOrderFilled(bytes32 orderHash, address maker, address taker, address ma clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[automatically_derived] impl alloy_sol_types::SolEvent for RfqOrderFilled { + type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type DataTuple<'a> = ( alloy_sol_types::sol_data::FixedBytes<32>, alloy_sol_types::sol_data::Address, @@ -6075,17 +6074,18 @@ event RfqOrderFilled(bytes32 orderHash, address maker, address taker, address ma alloy_sol_types::sol_data::Uint<128>, alloy_sol_types::sol_data::FixedBytes<32>, ); - type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type TopicList = (alloy_sol_types::sol_data::FixedBytes<32>,); - const SIGNATURE: &'static str = "RfqOrderFilled(bytes32,address,address,address,address,uint128,uint128,bytes32)"; - const SIGNATURE_HASH: alloy_sol_types::private::B256 = alloy_sol_types::private::B256::new([ - 130u8, 159u8, 169u8, 157u8, 148u8, 220u8, 70u8, 54u8, 146u8, 91u8, 56u8, - 99u8, 46u8, 98u8, 87u8, 54u8, 166u8, 20u8, 193u8, 84u8, 213u8, 80u8, 6u8, - 183u8, 171u8, 107u8, 234u8, 151u8, 156u8, 33u8, 12u8, 50u8, - ]); + const ANONYMOUS: bool = false; + const SIGNATURE: &'static str = + "RfqOrderFilled(bytes32,address,address,address,address,uint128,uint128,bytes32)"; + const SIGNATURE_HASH: alloy_sol_types::private::B256 = + alloy_sol_types::private::B256::new([ + 130u8, 159u8, 169u8, 157u8, 148u8, 220u8, 70u8, 54u8, 146u8, 91u8, 56u8, 99u8, + 46u8, 98u8, 87u8, 54u8, 166u8, 20u8, 193u8, 84u8, 213u8, 80u8, 6u8, 183u8, + 171u8, 107u8, 234u8, 151u8, 156u8, 33u8, 12u8, 50u8, + ]); + #[allow(unused_variables)] #[inline] fn new( @@ -6103,21 +6103,21 @@ event RfqOrderFilled(bytes32 orderHash, address maker, address taker, address ma pool: data.7, } } + #[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, - ), - ); + 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<'_> { ( @@ -6151,10 +6151,12 @@ event RfqOrderFilled(bytes32 orderHash, address maker, address taker, address ma > as alloy_sol_types::SolType>::tokenize(&self.pool), ) } + #[inline] fn topics(&self) -> ::RustType { (Self::SIGNATURE_HASH.into(),) } + #[inline] fn encode_topics_raw( &self, @@ -6163,9 +6165,7 @@ event RfqOrderFilled(bytes32 orderHash, address maker, address taker, address ma if out.len() < ::COUNT { return Err(alloy_sol_types::Error::Overrun); } - out[0usize] = alloy_sol_types::abi::token::WordToken( - Self::SIGNATURE_HASH, - ); + out[0usize] = alloy_sol_types::abi::token::WordToken(Self::SIGNATURE_HASH); Ok(()) } } @@ -6174,6 +6174,7 @@ event RfqOrderFilled(bytes32 orderHash, address maker, address taker, address ma 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) } @@ -6188,9 +6189,9 @@ event RfqOrderFilled(bytes32 orderHash, address maker, address taker, address ma }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Event with signature `RfqOrderOriginsAllowed(address,address[],bool)` and selector `0x02dfead5eb769b298e82dd9650b31c40559a3d42701dbf53c931bc2682847c31`. -```solidity -event RfqOrderOriginsAllowed(address origin, address[] addrs, bool allowed); -```*/ + ```solidity + event RfqOrderOriginsAllowed(address origin, address[] addrs, bool allowed); + ```*/ #[allow( non_camel_case_types, non_snake_case, @@ -6213,25 +6214,26 @@ event RfqOrderOriginsAllowed(address origin, address[] addrs, bool allowed); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[automatically_derived] impl alloy_sol_types::SolEvent for RfqOrderOriginsAllowed { + type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type DataTuple<'a> = ( alloy_sol_types::sol_data::Address, alloy_sol_types::sol_data::Array, alloy_sol_types::sol_data::Bool, ); - type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type TopicList = (alloy_sol_types::sol_data::FixedBytes<32>,); - const SIGNATURE: &'static str = "RfqOrderOriginsAllowed(address,address[],bool)"; - const SIGNATURE_HASH: alloy_sol_types::private::B256 = alloy_sol_types::private::B256::new([ - 2u8, 223u8, 234u8, 213u8, 235u8, 118u8, 155u8, 41u8, 142u8, 130u8, 221u8, - 150u8, 80u8, 179u8, 28u8, 64u8, 85u8, 154u8, 61u8, 66u8, 112u8, 29u8, - 191u8, 83u8, 201u8, 49u8, 188u8, 38u8, 130u8, 132u8, 124u8, 49u8, - ]); + const ANONYMOUS: bool = false; + const SIGNATURE: &'static str = "RfqOrderOriginsAllowed(address,address[],bool)"; + const SIGNATURE_HASH: alloy_sol_types::private::B256 = + alloy_sol_types::private::B256::new([ + 2u8, 223u8, 234u8, 213u8, 235u8, 118u8, 155u8, 41u8, 142u8, 130u8, 221u8, + 150u8, 80u8, 179u8, 28u8, 64u8, 85u8, 154u8, 61u8, 66u8, 112u8, 29u8, 191u8, + 83u8, 201u8, 49u8, 188u8, 38u8, 130u8, 132u8, 124u8, 49u8, + ]); + #[allow(unused_variables)] #[inline] fn new( @@ -6244,21 +6246,21 @@ event RfqOrderOriginsAllowed(address origin, address[] addrs, bool allowed); allowed: data.2, } } + #[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, - ), - ); + 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<'_> { ( @@ -6273,10 +6275,12 @@ event RfqOrderOriginsAllowed(address origin, address[] addrs, bool allowed); ), ) } + #[inline] fn topics(&self) -> ::RustType { (Self::SIGNATURE_HASH.into(),) } + #[inline] fn encode_topics_raw( &self, @@ -6285,9 +6289,7 @@ event RfqOrderOriginsAllowed(address origin, address[] addrs, bool allowed); if out.len() < ::COUNT { return Err(alloy_sol_types::Error::Overrun); } - out[0usize] = alloy_sol_types::abi::token::WordToken( - Self::SIGNATURE_HASH, - ); + out[0usize] = alloy_sol_types::abi::token::WordToken(Self::SIGNATURE_HASH); Ok(()) } } @@ -6296,6 +6298,7 @@ event RfqOrderOriginsAllowed(address origin, address[] addrs, bool allowed); 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) } @@ -6310,9 +6313,9 @@ event RfqOrderOriginsAllowed(address origin, address[] addrs, bool allowed); }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Event with signature `TransformedERC20(address,address,address,uint256,uint256)` and selector `0x0f6672f78a59ba8e5e5b5d38df3ebc67f3c792e2c9259b8d97d7f00dd78ba1b3`. -```solidity -event TransformedERC20(address indexed taker, address inputToken, address outputToken, uint256 inputTokenAmount, uint256 outputTokenAmount); -```*/ + ```solidity + event TransformedERC20(address indexed taker, address inputToken, address outputToken, uint256 inputTokenAmount, uint256 outputTokenAmount); + ```*/ #[allow( non_camel_case_types, non_snake_case, @@ -6339,29 +6342,31 @@ event TransformedERC20(address indexed taker, address inputToken, address output clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[automatically_derived] impl alloy_sol_types::SolEvent for TransformedERC20 { + type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type DataTuple<'a> = ( alloy_sol_types::sol_data::Address, alloy_sol_types::sol_data::Address, alloy_sol_types::sol_data::Uint<256>, 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, ); - const SIGNATURE: &'static str = "TransformedERC20(address,address,address,uint256,uint256)"; - const SIGNATURE_HASH: alloy_sol_types::private::B256 = alloy_sol_types::private::B256::new([ - 15u8, 102u8, 114u8, 247u8, 138u8, 89u8, 186u8, 142u8, 94u8, 91u8, 93u8, - 56u8, 223u8, 62u8, 188u8, 103u8, 243u8, 199u8, 146u8, 226u8, 201u8, 37u8, - 155u8, 141u8, 151u8, 215u8, 240u8, 13u8, 215u8, 139u8, 161u8, 179u8, - ]); + const ANONYMOUS: bool = false; + const SIGNATURE: &'static str = + "TransformedERC20(address,address,address,uint256,uint256)"; + const SIGNATURE_HASH: alloy_sol_types::private::B256 = + alloy_sol_types::private::B256::new([ + 15u8, 102u8, 114u8, 247u8, 138u8, 89u8, 186u8, 142u8, 94u8, 91u8, 93u8, 56u8, + 223u8, 62u8, 188u8, 103u8, 243u8, 199u8, 146u8, 226u8, 201u8, 37u8, 155u8, + 141u8, 151u8, 215u8, 240u8, 13u8, 215u8, 139u8, 161u8, 179u8, + ]); + #[allow(unused_variables)] #[inline] fn new( @@ -6376,21 +6381,21 @@ event TransformedERC20(address indexed taker, address inputToken, address output outputTokenAmount: data.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, - ), - ); + 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<'_> { ( @@ -6400,18 +6405,20 @@ event TransformedERC20(address indexed taker, address inputToken, address output ::tokenize( &self.outputToken, ), - as alloy_sol_types::SolType>::tokenize(&self.inputTokenAmount), - as alloy_sol_types::SolType>::tokenize(&self.outputTokenAmount), + as alloy_sol_types::SolType>::tokenize( + &self.inputTokenAmount, + ), + as alloy_sol_types::SolType>::tokenize( + &self.outputTokenAmount, + ), ) } + #[inline] fn topics(&self) -> ::RustType { (Self::SIGNATURE_HASH.into(), self.taker.clone()) } + #[inline] fn encode_topics_raw( &self, @@ -6420,9 +6427,7 @@ event TransformedERC20(address indexed taker, address inputToken, address output if out.len() < ::COUNT { return Err(alloy_sol_types::Error::Overrun); } - out[0usize] = alloy_sol_types::abi::token::WordToken( - Self::SIGNATURE_HASH, - ); + out[0usize] = alloy_sol_types::abi::token::WordToken(Self::SIGNATURE_HASH); out[1usize] = ::encode_topic( &self.taker, ); @@ -6434,6 +6439,7 @@ event TransformedERC20(address indexed taker, address inputToken, address output 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) } @@ -6448,9 +6454,9 @@ event TransformedERC20(address indexed taker, address inputToken, address output }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Event with signature `TransformerDeployerUpdated(address)` and selector `0xfd45604abad79c16e23348a137ed8292661be1b8eba6e4806ebed6833b1c046a`. -```solidity -event TransformerDeployerUpdated(address transformerDeployer); -```*/ + ```solidity + event TransformerDeployerUpdated(address transformerDeployer); + ```*/ #[allow( non_camel_case_types, non_snake_case, @@ -6469,21 +6475,22 @@ event TransformerDeployerUpdated(address transformerDeployer); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[automatically_derived] impl alloy_sol_types::SolEvent for TransformerDeployerUpdated { + type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; 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 = "TransformerDeployerUpdated(address)"; - const SIGNATURE_HASH: alloy_sol_types::private::B256 = alloy_sol_types::private::B256::new([ - 253u8, 69u8, 96u8, 74u8, 186u8, 215u8, 156u8, 22u8, 226u8, 51u8, 72u8, - 161u8, 55u8, 237u8, 130u8, 146u8, 102u8, 27u8, 225u8, 184u8, 235u8, - 166u8, 228u8, 128u8, 110u8, 190u8, 214u8, 131u8, 59u8, 28u8, 4u8, 106u8, - ]); + const ANONYMOUS: bool = false; + const SIGNATURE: &'static str = "TransformerDeployerUpdated(address)"; + const SIGNATURE_HASH: alloy_sol_types::private::B256 = + alloy_sol_types::private::B256::new([ + 253u8, 69u8, 96u8, 74u8, 186u8, 215u8, 156u8, 22u8, 226u8, 51u8, 72u8, 161u8, + 55u8, 237u8, 130u8, 146u8, 102u8, 27u8, 225u8, 184u8, 235u8, 166u8, 228u8, + 128u8, 110u8, 190u8, 214u8, 131u8, 59u8, 28u8, 4u8, 106u8, + ]); + #[allow(unused_variables)] #[inline] fn new( @@ -6494,21 +6501,21 @@ event TransformerDeployerUpdated(address transformerDeployer); transformerDeployer: 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, - ), - ); + 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<'_> { ( @@ -6517,10 +6524,12 @@ event TransformerDeployerUpdated(address transformerDeployer); ), ) } + #[inline] fn topics(&self) -> ::RustType { (Self::SIGNATURE_HASH.into(),) } + #[inline] fn encode_topics_raw( &self, @@ -6529,9 +6538,7 @@ event TransformerDeployerUpdated(address transformerDeployer); if out.len() < ::COUNT { return Err(alloy_sol_types::Error::Overrun); } - out[0usize] = alloy_sol_types::abi::token::WordToken( - Self::SIGNATURE_HASH, - ); + out[0usize] = alloy_sol_types::abi::token::WordToken(Self::SIGNATURE_HASH); Ok(()) } } @@ -6540,6 +6547,7 @@ event TransformerDeployerUpdated(address transformerDeployer); 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) } @@ -6547,18 +6555,16 @@ event TransformerDeployerUpdated(address transformerDeployer); #[automatically_derived] impl From<&TransformerDeployerUpdated> for alloy_sol_types::private::LogData { #[inline] - fn from( - this: &TransformerDeployerUpdated, - ) -> alloy_sol_types::private::LogData { + fn from(this: &TransformerDeployerUpdated) -> alloy_sol_types::private::LogData { alloy_sol_types::SolEvent::encode_log_data(this) } } }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `extend(bytes4,address)` and selector `0x6eb224cb`. -```solidity -function extend(bytes4 selector, address r#impl) external; -```*/ + ```solidity + function extend(bytes4 selector, address r#impl) external; + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct extendCall { @@ -6567,7 +6573,8 @@ function extend(bytes4 selector, address r#impl) external; #[allow(missing_docs)] pub r#impl: alloy_sol_types::private::Address, } - ///Container type for the return parameters of the [`extend(bytes4,address)`](extendCall) function. + ///Container type for the return parameters of the + /// [`extend(bytes4,address)`](extendCall) function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct extendReturn {} @@ -6578,7 +6585,7 @@ function extend(bytes4 selector, address r#impl) external; clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -6593,9 +6600,7 @@ function extend(bytes4 selector, address r#impl) external; ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -6628,9 +6633,7 @@ function extend(bytes4 selector, address r#impl) external; type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -6653,9 +6656,7 @@ function extend(bytes4 selector, address r#impl) external; } } impl extendReturn { - fn _tokenize( - &self, - ) -> ::ReturnToken<'_> { + fn _tokenize(&self) -> ::ReturnToken<'_> { () } } @@ -6665,22 +6666,21 @@ function extend(bytes4 selector, address r#impl) external; alloy_sol_types::sol_data::FixedBytes<4>, alloy_sol_types::sol_data::Address, ); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = extendReturn; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "extend(bytes4,address)"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [110u8, 178u8, 36u8, 203u8]; + const SIGNATURE: &'static str = "extend(bytes4,address)"; + #[inline] fn new<'a>( tuple: as alloy_sol_types::SolType>::RustType, ) -> Self { tuple.into() } + #[inline] fn tokenize(&self) -> Self::Token<'_> { ( @@ -6692,33 +6692,32 @@ function extend(bytes4 selector, address r#impl) external; ), ) } + #[inline] fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { extendReturn::_tokenize(ret) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) + 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) + 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()] /**Function with signature `fillOrKillLimitOrder((address,address,uint128,uint128,uint128,address,address,address,address,bytes32,uint64,uint256),(uint8,uint8,bytes32,bytes32),uint128)` and selector `0x9240529c`. -```solidity -function fillOrKillLimitOrder(LibNativeOrder.LimitOrder memory order, LibSignature.Signature memory signature, uint128 takerTokenFillAmount) external payable returns (uint128 makerTokenFilledAmount); -```*/ + ```solidity + function fillOrKillLimitOrder(LibNativeOrder.LimitOrder memory order, LibSignature.Signature memory signature, uint128 takerTokenFillAmount) external payable returns (uint128 makerTokenFilledAmount); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct fillOrKillLimitOrderCall { @@ -6730,7 +6729,10 @@ function fillOrKillLimitOrder(LibNativeOrder.LimitOrder memory order, LibSignatu pub takerTokenFillAmount: u128, } #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`fillOrKillLimitOrder((address,address,uint128,uint128,uint128,address,address,address,address,bytes32,uint64,uint256),(uint8,uint8,bytes32,bytes32),uint128)`](fillOrKillLimitOrderCall) function. + ///Container type for the return parameters of the + /// [`fillOrKillLimitOrder((address,address,uint128,uint128,uint128,address, + /// address,address,address,bytes32,uint64,uint256),(uint8,uint8,bytes32, + /// bytes32),uint128)`](fillOrKillLimitOrderCall) function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct fillOrKillLimitOrderReturn { @@ -6744,7 +6746,7 @@ function fillOrKillLimitOrder(LibNativeOrder.LimitOrder memory order, LibSignatu clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -6761,9 +6763,7 @@ function fillOrKillLimitOrder(LibNativeOrder.LimitOrder memory order, LibSignatu ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -6772,16 +6772,14 @@ function fillOrKillLimitOrder(LibNativeOrder.LimitOrder memory order, LibSignatu } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From - for UnderlyingRustTuple<'_> { + impl ::core::convert::From for UnderlyingRustTuple<'_> { fn from(value: fillOrKillLimitOrderCall) -> Self { (value.order, value.signature, value.takerTokenFillAmount) } } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From> - for fillOrKillLimitOrderCall { + impl ::core::convert::From> for fillOrKillLimitOrderCall { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { Self { order: tuple.0, @@ -6799,9 +6797,7 @@ function fillOrKillLimitOrder(LibNativeOrder.LimitOrder memory order, LibSignatu type UnderlyingRustTuple<'a> = (u128,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -6810,16 +6806,14 @@ function fillOrKillLimitOrder(LibNativeOrder.LimitOrder memory order, LibSignatu } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From - for UnderlyingRustTuple<'_> { + impl ::core::convert::From for UnderlyingRustTuple<'_> { fn from(value: fillOrKillLimitOrderReturn) -> Self { (value.makerTokenFilledAmount,) } } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From> - for fillOrKillLimitOrderReturn { + impl ::core::convert::From> for fillOrKillLimitOrderReturn { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { Self { makerTokenFilledAmount: tuple.0, @@ -6834,73 +6828,72 @@ function fillOrKillLimitOrder(LibNativeOrder.LimitOrder memory order, LibSignatu LibSignature::Signature, alloy_sol_types::sol_data::Uint<128>, ); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = u128; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (alloy_sol_types::sol_data::Uint<128>,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "fillOrKillLimitOrder((address,address,uint128,uint128,uint128,address,address,address,address,bytes32,uint64,uint256),(uint8,uint8,bytes32,bytes32),uint128)"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [146u8, 64u8, 82u8, 156u8]; + const SIGNATURE: &'static str = + "fillOrKillLimitOrder((address,address,uint128,uint128,uint128,address,address,\ + address,address,bytes32,uint64,uint256),(uint8,uint8,bytes32,bytes32),uint128)"; + #[inline] fn new<'a>( tuple: as alloy_sol_types::SolType>::RustType, ) -> Self { tuple.into() } + #[inline] fn tokenize(&self) -> Self::Token<'_> { ( - ::tokenize( - &self.order, - ), + ::tokenize(&self.order), ::tokenize( &self.signature, ), - as alloy_sol_types::SolType>::tokenize(&self.takerTokenFillAmount), + as alloy_sol_types::SolType>::tokenize( + &self.takerTokenFillAmount, + ), ) } + #[inline] fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { ( - as alloy_sol_types::SolType>::tokenize(ret), + 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| { + as alloy_sol_types::SolType>::abi_decode_sequence(data).map( + |r| { let r: fillOrKillLimitOrderReturn = r.into(); r.makerTokenFilledAmount - }) + }, + ) } + #[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: fillOrKillLimitOrderReturn = r.into(); - r.makerTokenFilledAmount - }) + 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: fillOrKillLimitOrderReturn = r.into(); + r.makerTokenFilledAmount + }) } } }; #[derive()] /**Function with signature `getLimitOrderRelevantState((address,address,uint128,uint128,uint128,address,address,address,address,bytes32,uint64,uint256),(uint8,uint8,bytes32,bytes32))` and selector `0x1fb09795`. -```solidity -function getLimitOrderRelevantState(LibNativeOrder.LimitOrder memory order, LibSignature.Signature memory signature) external view returns (LibNativeOrder.OrderInfo memory orderInfo, uint128 actualFillableTakerTokenAmount, bool isSignatureValid); -```*/ + ```solidity + function getLimitOrderRelevantState(LibNativeOrder.LimitOrder memory order, LibSignature.Signature memory signature) external view returns (LibNativeOrder.OrderInfo memory orderInfo, uint128 actualFillableTakerTokenAmount, bool isSignatureValid); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct getLimitOrderRelevantStateCall { @@ -6910,7 +6903,10 @@ function getLimitOrderRelevantState(LibNativeOrder.LimitOrder memory order, LibS pub signature: ::RustType, } #[derive()] - ///Container type for the return parameters of the [`getLimitOrderRelevantState((address,address,uint128,uint128,uint128,address,address,address,address,bytes32,uint64,uint256),(uint8,uint8,bytes32,bytes32))`](getLimitOrderRelevantStateCall) function. + ///Container type for the return parameters of the + /// [`getLimitOrderRelevantState((address,address,uint128,uint128,uint128, + /// address,address,address,address,bytes32,uint64,uint256),(uint8,uint8, + /// bytes32,bytes32))`](getLimitOrderRelevantStateCall) function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct getLimitOrderRelevantStateReturn { @@ -6928,14 +6924,11 @@ function getLimitOrderRelevantState(LibNativeOrder.LimitOrder memory order, LibS clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] - type UnderlyingSolTuple<'a> = ( - LibNativeOrder::LimitOrder, - LibSignature::Signature, - ); + type UnderlyingSolTuple<'a> = (LibNativeOrder::LimitOrder, LibSignature::Signature); #[doc(hidden)] type UnderlyingRustTuple<'a> = ( ::RustType, @@ -6943,9 +6936,7 @@ function getLimitOrderRelevantState(LibNativeOrder.LimitOrder memory order, LibS ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -6954,16 +6945,14 @@ function getLimitOrderRelevantState(LibNativeOrder.LimitOrder memory order, LibS } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From - for UnderlyingRustTuple<'_> { + impl ::core::convert::From for UnderlyingRustTuple<'_> { fn from(value: getLimitOrderRelevantStateCall) -> Self { (value.order, value.signature) } } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From> - for getLimitOrderRelevantStateCall { + impl ::core::convert::From> for getLimitOrderRelevantStateCall { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { Self { order: tuple.0, @@ -6988,9 +6977,7 @@ function getLimitOrderRelevantState(LibNativeOrder.LimitOrder memory order, LibS ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -6999,8 +6986,7 @@ function getLimitOrderRelevantState(LibNativeOrder.LimitOrder memory order, LibS } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From - for UnderlyingRustTuple<'_> { + impl ::core::convert::From for UnderlyingRustTuple<'_> { fn from(value: getLimitOrderRelevantStateReturn) -> Self { ( value.orderInfo, @@ -7011,8 +6997,7 @@ function getLimitOrderRelevantState(LibNativeOrder.LimitOrder memory order, LibS } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From> - for getLimitOrderRelevantStateReturn { + impl ::core::convert::From> for getLimitOrderRelevantStateReturn { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { Self { orderInfo: tuple.0, @@ -7025,16 +7010,13 @@ function getLimitOrderRelevantState(LibNativeOrder.LimitOrder memory order, LibS impl getLimitOrderRelevantStateReturn { fn _tokenize( &self, - ) -> ::ReturnToken< - '_, - > { + ) -> ::ReturnToken<'_> + { ( ::tokenize( &self.orderInfo, ), - as alloy_sol_types::SolType>::tokenize( + as alloy_sol_types::SolType>::tokenize( &self.actualFillableTakerTokenAmount, ), ::tokenize( @@ -7046,69 +7028,68 @@ function getLimitOrderRelevantState(LibNativeOrder.LimitOrder memory order, LibS #[automatically_derived] impl alloy_sol_types::SolCall for getLimitOrderRelevantStateCall { type Parameters<'a> = (LibNativeOrder::LimitOrder, LibSignature::Signature); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = getLimitOrderRelevantStateReturn; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = ( LibNativeOrder::OrderInfo, alloy_sol_types::sol_data::Uint<128>, alloy_sol_types::sol_data::Bool, ); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "getLimitOrderRelevantState((address,address,uint128,uint128,uint128,address,address,address,address,bytes32,uint64,uint256),(uint8,uint8,bytes32,bytes32))"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [31u8, 176u8, 151u8, 149u8]; + const SIGNATURE: &'static str = + "getLimitOrderRelevantState((address,address,uint128,uint128,uint128,address,\ + address,address,address,bytes32,uint64,uint256),(uint8,uint8,bytes32,bytes32))"; + #[inline] fn new<'a>( tuple: as alloy_sol_types::SolType>::RustType, ) -> Self { tuple.into() } + #[inline] fn tokenize(&self) -> Self::Token<'_> { ( - ::tokenize( - &self.order, - ), + ::tokenize(&self.order), ::tokenize( &self.signature, ), ) } + #[inline] fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { getLimitOrderRelevantStateReturn::_tokenize(ret) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) + 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) + 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(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `owner()` and selector `0x8da5cb5b`. -```solidity -function owner() external view returns (address ownerAddress); -```*/ + ```solidity + function owner() external view returns (address ownerAddress); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct ownerCall; #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`owner()`](ownerCall) function. + ///Container type for the return parameters of the [`owner()`](ownerCall) + /// function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct ownerReturn { @@ -7122,7 +7103,7 @@ function owner() external view returns (address ownerAddress); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -7131,9 +7112,7 @@ function owner() external view returns (address ownerAddress); type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -7163,9 +7142,7 @@ function owner() external view returns (address ownerAddress); type UnderlyingRustTuple<'a> = (alloy_sol_types::private::Address,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -7183,68 +7160,64 @@ function owner() external view returns (address ownerAddress); #[doc(hidden)] impl ::core::convert::From> for ownerReturn { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { - Self { ownerAddress: tuple.0 } + Self { + ownerAddress: tuple.0, + } } } } #[automatically_derived] impl alloy_sol_types::SolCall for ownerCall { type Parameters<'a> = (); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = alloy_sol_types::private::Address; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (alloy_sol_types::sol_data::Address,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "owner()"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [141u8, 165u8, 203u8, 91u8]; + const SIGNATURE: &'static str = "owner()"; + #[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, - ), - ) + (::tokenize(ret),) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) - .map(|r| { + as alloy_sol_types::SolType>::abi_decode_sequence(data).map( + |r| { let r: ownerReturn = r.into(); r.ownerAddress - }) + }, + ) } + #[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: ownerReturn = r.into(); - r.ownerAddress - }) + 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: ownerReturn = r.into(); + r.ownerAddress + }) } } }; ///Container for all the [`IZeroex`](self) function calls. #[derive(Clone)] - #[derive()] pub enum IZeroexCalls { #[allow(missing_docs)] extend(extendCall), @@ -7258,8 +7231,9 @@ function owner() external view returns (address ownerAddress); impl IZeroexCalls { /// 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. + /// 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]] = &[ @@ -7268,13 +7242,6 @@ function owner() external view returns (address ownerAddress); [141u8, 165u8, 203u8, 91u8], [146u8, 64u8, 82u8, 156u8], ]; - /// The names of the variants in the same order as `SELECTORS`. - pub const VARIANT_NAMES: &'static [&'static str] = &[ - ::core::stringify!(getLimitOrderRelevantState), - ::core::stringify!(extend), - ::core::stringify!(owner), - ::core::stringify!(fillOrKillLimitOrder), - ]; /// The signatures in the same order as `SELECTORS`. pub const SIGNATURES: &'static [&'static str] = &[ ::SIGNATURE, @@ -7282,6 +7249,14 @@ function owner() external view returns (address ownerAddress); ::SIGNATURE, ::SIGNATURE, ]; + /// The names of the variants in the same order as `SELECTORS`. + pub const VARIANT_NAMES: &'static [&'static str] = &[ + ::core::stringify!(getLimitOrderRelevantState), + ::core::stringify!(extend), + ::core::stringify!(owner), + ::core::stringify!(fillOrKillLimitOrder), + ]; + /// Returns the signature for the given selector, if known. #[inline] pub fn signature_by_selector( @@ -7294,20 +7269,20 @@ function owner() external view returns (address ownerAddress); ::core::result::Result::Err(_) => ::core::option::Option::None, } } + /// Returns the enum variant name for the given selector, if known. #[inline] - pub fn name_by_selector( - selector: [u8; 4usize], - ) -> ::core::option::Option<&'static str> { + pub fn name_by_selector(selector: [u8; 4usize]) -> ::core::option::Option<&'static str> { let sig = Self::signature_by_selector(selector)?; sig.split_once('(').map(|(name, _)| name) } } #[automatically_derived] impl alloy_sol_types::SolInterface for IZeroexCalls { - const NAME: &'static str = "IZeroexCalls"; - const MIN_DATA_LENGTH: usize = 0usize; const COUNT: usize = 4usize; + const MIN_DATA_LENGTH: usize = 0usize; + const NAME: &'static str = "IZeroexCalls"; + #[inline] fn selector(&self) -> [u8; 4] { match self { @@ -7321,20 +7296,20 @@ function owner() external view returns (address ownerAddress); Self::owner(_) => ::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 { + fn abi_decode_raw(selector: [u8; 4], data: &[u8]) -> alloy_sol_types::Result { static DECODE_SHIMS: &[fn(&[u8]) -> alloy_sol_types::Result] = &[ { fn getLimitOrderRelevantState( @@ -7362,36 +7337,29 @@ function owner() external view returns (address ownerAddress); owner }, { - fn fillOrKillLimitOrder( - data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, - ) + fn fillOrKillLimitOrder(data: &[u8]) -> alloy_sol_types::Result { + ::abi_decode_raw(data) .map(IZeroexCalls::fillOrKillLimitOrder) } fillOrKillLimitOrder }, ]; let Ok(idx) = Self::SELECTORS.binary_search(&selector) else { - return Err( - alloy_sol_types::Error::unknown_selector( - ::NAME, - selector, - ), - ); + 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] = &[ + static DECODE_VALIDATE_SHIMS: &[fn(&[u8]) -> alloy_sol_types::Result] = &[ { fn getLimitOrderRelevantState( data: &[u8], @@ -7405,26 +7373,20 @@ function owner() external view returns (address ownerAddress); }, { fn extend(data: &[u8]) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) + ::abi_decode_raw_validate(data) .map(IZeroexCalls::extend) } extend }, { fn owner(data: &[u8]) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) + ::abi_decode_raw_validate(data) .map(IZeroexCalls::owner) } owner }, { - fn fillOrKillLimitOrder( - data: &[u8], - ) -> alloy_sol_types::Result { + fn fillOrKillLimitOrder(data: &[u8]) -> alloy_sol_types::Result { ::abi_decode_raw_validate( data, ) @@ -7434,15 +7396,14 @@ function owner() external view returns (address ownerAddress); }, ]; let Ok(idx) = Self::SELECTORS.binary_search(&selector) else { - return Err( - alloy_sol_types::Error::unknown_selector( - ::NAME, - selector, - ), - ); + return Err(alloy_sol_types::Error::unknown_selector( + ::NAME, + selector, + )); }; DECODE_VALIDATE_SHIMS[idx](data) } + #[inline] fn abi_encoded_size(&self) -> usize { match self { @@ -7450,9 +7411,7 @@ function owner() external view returns (address ownerAddress); ::abi_encoded_size(inner) } Self::fillOrKillLimitOrder(inner) => { - ::abi_encoded_size( - inner, - ) + ::abi_encoded_size(inner) } Self::getLimitOrderRelevantState(inner) => { ::abi_encoded_size( @@ -7464,6 +7423,7 @@ function owner() external view returns (address ownerAddress); } } } + #[inline] fn abi_encode_raw(&self, out: &mut alloy_sol_types::private::Vec) { match self { @@ -7472,14 +7432,12 @@ function owner() external view returns (address ownerAddress); } Self::fillOrKillLimitOrder(inner) => { ::abi_encode_raw( - inner, - out, + inner, out, ) } Self::getLimitOrderRelevantState(inner) => { ::abi_encode_raw( - inner, - out, + inner, out, ) } Self::owner(inner) => { @@ -7489,8 +7447,7 @@ function owner() external view returns (address ownerAddress); } } ///Container for all the [`IZeroex`](self) events. - #[derive(Clone)] - #[derive(Debug, PartialEq, Eq, Hash)] + #[derive(Clone, Debug, PartialEq, Eq, Hash)] pub enum IZeroexEvents { #[allow(missing_docs)] ERC1155OrderCancelled(ERC1155OrderCancelled), @@ -7540,147 +7497,123 @@ function owner() external view returns (address ownerAddress); impl IZeroexEvents { /// 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. + /// 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]] = &[ [ - 2u8, 223u8, 234u8, 213u8, 235u8, 118u8, 155u8, 41u8, 142u8, 130u8, 221u8, - 150u8, 80u8, 179u8, 28u8, 64u8, 85u8, 154u8, 61u8, 66u8, 112u8, 29u8, - 191u8, 83u8, 201u8, 49u8, 188u8, 38u8, 130u8, 132u8, 124u8, 49u8, + 2u8, 223u8, 234u8, 213u8, 235u8, 118u8, 155u8, 41u8, 142u8, 130u8, 221u8, 150u8, + 80u8, 179u8, 28u8, 64u8, 85u8, 154u8, 61u8, 66u8, 112u8, 29u8, 191u8, 83u8, 201u8, + 49u8, 188u8, 38u8, 130u8, 132u8, 124u8, 49u8, ], [ - 15u8, 102u8, 114u8, 247u8, 138u8, 89u8, 186u8, 142u8, 94u8, 91u8, 93u8, - 56u8, 223u8, 62u8, 188u8, 103u8, 243u8, 199u8, 146u8, 226u8, 201u8, 37u8, - 155u8, 141u8, 151u8, 215u8, 240u8, 13u8, 215u8, 139u8, 161u8, 179u8, + 15u8, 102u8, 114u8, 247u8, 138u8, 89u8, 186u8, 142u8, 94u8, 91u8, 93u8, 56u8, + 223u8, 62u8, 188u8, 103u8, 243u8, 199u8, 146u8, 226u8, 201u8, 37u8, 155u8, 141u8, + 151u8, 215u8, 240u8, 13u8, 215u8, 139u8, 161u8, 179u8, ], [ - 32u8, 204u8, 168u8, 27u8, 14u8, 38u8, 155u8, 38u8, 91u8, 50u8, 41u8, - 214u8, 181u8, 55u8, 218u8, 145u8, 239u8, 71u8, 92u8, 160u8, 239u8, 85u8, - 202u8, 237u8, 125u8, 211u8, 7u8, 49u8, 112u8, 11u8, 169u8, 141u8, + 32u8, 204u8, 168u8, 27u8, 14u8, 38u8, 155u8, 38u8, 91u8, 50u8, 41u8, 214u8, 181u8, + 55u8, 218u8, 145u8, 239u8, 71u8, 92u8, 160u8, 239u8, 85u8, 202u8, 237u8, 125u8, + 211u8, 7u8, 49u8, 112u8, 11u8, 169u8, 141u8, ], [ - 42u8, 226u8, 33u8, 8u8, 52u8, 103u8, 222u8, 82u8, 7u8, 139u8, 0u8, 150u8, - 105u8, 106u8, 184u8, 141u8, 141u8, 83u8, 167u8, 236u8, 180u8, 75u8, - 182u8, 91u8, 86u8, 162u8, 186u8, 182u8, 135u8, 89u8, 131u8, 103u8, + 42u8, 226u8, 33u8, 8u8, 52u8, 103u8, 222u8, 82u8, 7u8, 139u8, 0u8, 150u8, 105u8, + 106u8, 184u8, 141u8, 141u8, 83u8, 167u8, 236u8, 180u8, 75u8, 182u8, 91u8, 86u8, + 162u8, 186u8, 182u8, 135u8, 89u8, 131u8, 103u8, ], [ - 64u8, 166u8, 186u8, 149u8, 19u8, 208u8, 158u8, 52u8, 136u8, 19u8, 94u8, - 14u8, 13u8, 16u8, 226u8, 212u8, 56u8, 43u8, 121u8, 39u8, 32u8, 21u8, - 91u8, 20u8, 76u8, 190u8, 168u8, 154u8, 201u8, 219u8, 109u8, 52u8, + 64u8, 166u8, 186u8, 149u8, 19u8, 208u8, 158u8, 52u8, 136u8, 19u8, 94u8, 14u8, 13u8, + 16u8, 226u8, 212u8, 56u8, 43u8, 121u8, 39u8, 32u8, 21u8, 91u8, 20u8, 76u8, 190u8, + 168u8, 154u8, 201u8, 219u8, 109u8, 52u8, ], [ - 77u8, 94u8, 167u8, 218u8, 100u8, 245u8, 10u8, 74u8, 50u8, 153u8, 33u8, - 184u8, 210u8, 202u8, 181u8, 45u8, 255u8, 78u8, 188u8, 197u8, 139u8, 97u8, - 209u8, 15u8, 248u8, 57u8, 226u8, 142u8, 145u8, 68u8, 86u8, 132u8, + 77u8, 94u8, 167u8, 218u8, 100u8, 245u8, 10u8, 74u8, 50u8, 153u8, 33u8, 184u8, + 210u8, 202u8, 181u8, 45u8, 255u8, 78u8, 188u8, 197u8, 139u8, 97u8, 209u8, 15u8, + 248u8, 57u8, 226u8, 142u8, 145u8, 68u8, 86u8, 132u8, ], [ - 80u8, 39u8, 63u8, 160u8, 34u8, 115u8, 204u8, 238u8, 169u8, 207u8, 8u8, - 91u8, 66u8, 222u8, 92u8, 138u8, 246u8, 6u8, 36u8, 20u8, 1u8, 104u8, - 189u8, 113u8, 53u8, 125u8, 184u8, 51u8, 83u8, 88u8, 119u8, 175u8, + 80u8, 39u8, 63u8, 160u8, 34u8, 115u8, 204u8, 238u8, 169u8, 207u8, 8u8, 91u8, 66u8, + 222u8, 92u8, 138u8, 246u8, 6u8, 36u8, 20u8, 1u8, 104u8, 189u8, 113u8, 53u8, 125u8, + 184u8, 51u8, 83u8, 88u8, 119u8, 175u8, ], [ - 94u8, 145u8, 221u8, 254u8, 183u8, 191u8, 46u8, 18u8, 247u8, 232u8, 171u8, - 1u8, 125u8, 43u8, 99u8, 169u8, 33u8, 127u8, 0u8, 74u8, 21u8, 165u8, 51u8, - 70u8, 173u8, 144u8, 53u8, 62u8, 198u8, 61u8, 20u8, 228u8, + 94u8, 145u8, 221u8, 254u8, 183u8, 191u8, 46u8, 18u8, 247u8, 232u8, 171u8, 1u8, + 125u8, 43u8, 99u8, 169u8, 33u8, 127u8, 0u8, 74u8, 21u8, 165u8, 51u8, 70u8, 173u8, + 144u8, 53u8, 62u8, 198u8, 61u8, 20u8, 228u8, ], [ - 110u8, 169u8, 219u8, 232u8, 178u8, 204u8, 17u8, 147u8, 72u8, 113u8, - 106u8, 146u8, 32u8, 160u8, 116u8, 42u8, 214u8, 43u8, 120u8, 132u8, 236u8, - 176u8, 255u8, 75u8, 50u8, 205u8, 80u8, 129u8, 33u8, 253u8, 147u8, 121u8, + 110u8, 169u8, 219u8, 232u8, 178u8, 204u8, 17u8, 147u8, 72u8, 113u8, 106u8, 146u8, + 32u8, 160u8, 116u8, 42u8, 214u8, 43u8, 120u8, 132u8, 236u8, 176u8, 255u8, 75u8, + 50u8, 205u8, 80u8, 129u8, 33u8, 253u8, 147u8, 121u8, ], [ - 127u8, 79u8, 227u8, 255u8, 138u8, 228u8, 64u8, 225u8, 87u8, 12u8, 85u8, - 141u8, 160u8, 132u8, 64u8, 178u8, 111u8, 137u8, 251u8, 28u8, 31u8, 41u8, - 16u8, 205u8, 145u8, 202u8, 100u8, 82u8, 149u8, 95u8, 18u8, 26u8, + 127u8, 79u8, 227u8, 255u8, 138u8, 228u8, 64u8, 225u8, 87u8, 12u8, 85u8, 141u8, + 160u8, 132u8, 64u8, 178u8, 111u8, 137u8, 251u8, 28u8, 31u8, 41u8, 16u8, 205u8, + 145u8, 202u8, 100u8, 82u8, 149u8, 95u8, 18u8, 26u8, ], [ - 130u8, 159u8, 169u8, 157u8, 148u8, 220u8, 70u8, 54u8, 146u8, 91u8, 56u8, - 99u8, 46u8, 98u8, 87u8, 54u8, 166u8, 20u8, 193u8, 84u8, 213u8, 80u8, 6u8, - 183u8, 171u8, 107u8, 234u8, 151u8, 156u8, 33u8, 12u8, 50u8, + 130u8, 159u8, 169u8, 157u8, 148u8, 220u8, 70u8, 54u8, 146u8, 91u8, 56u8, 99u8, + 46u8, 98u8, 87u8, 54u8, 166u8, 20u8, 193u8, 84u8, 213u8, 80u8, 6u8, 183u8, 171u8, + 107u8, 234u8, 151u8, 156u8, 33u8, 12u8, 50u8, ], [ - 139u8, 224u8, 7u8, 156u8, 83u8, 22u8, 89u8, 20u8, 19u8, 68u8, 205u8, - 31u8, 208u8, 164u8, 242u8, 132u8, 25u8, 73u8, 127u8, 151u8, 34u8, 163u8, - 218u8, 175u8, 227u8, 180u8, 24u8, 111u8, 107u8, 100u8, 87u8, 224u8, + 139u8, 224u8, 7u8, 156u8, 83u8, 22u8, 89u8, 20u8, 19u8, 68u8, 205u8, 31u8, 208u8, + 164u8, 242u8, 132u8, 25u8, 73u8, 127u8, 151u8, 34u8, 163u8, 218u8, 175u8, 227u8, + 180u8, 24u8, 111u8, 107u8, 100u8, 87u8, 224u8, ], [ - 140u8, 93u8, 12u8, 65u8, 251u8, 22u8, 167u8, 49u8, 122u8, 108u8, 85u8, - 255u8, 123u8, 169u8, 61u8, 157u8, 116u8, 247u8, 158u8, 67u8, 79u8, 239u8, - 166u8, 148u8, 229u8, 13u8, 96u8, 40u8, 175u8, 191u8, 163u8, 240u8, + 140u8, 93u8, 12u8, 65u8, 251u8, 22u8, 167u8, 49u8, 122u8, 108u8, 85u8, 255u8, + 123u8, 169u8, 61u8, 157u8, 116u8, 247u8, 158u8, 67u8, 79u8, 239u8, 166u8, 148u8, + 229u8, 13u8, 96u8, 40u8, 175u8, 191u8, 163u8, 240u8, ], [ - 160u8, 21u8, 173u8, 45u8, 195u8, 47u8, 38u8, 105u8, 147u8, 149u8, 138u8, - 15u8, 217u8, 136u8, 76u8, 116u8, 107u8, 151u8, 27u8, 37u8, 66u8, 6u8, - 243u8, 71u8, 139u8, 196u8, 62u8, 47u8, 18u8, 92u8, 123u8, 158u8, + 160u8, 21u8, 173u8, 45u8, 195u8, 47u8, 38u8, 105u8, 147u8, 149u8, 138u8, 15u8, + 217u8, 136u8, 76u8, 116u8, 107u8, 151u8, 27u8, 37u8, 66u8, 6u8, 243u8, 71u8, 139u8, + 196u8, 62u8, 47u8, 18u8, 92u8, 123u8, 158u8, ], [ - 166u8, 235u8, 124u8, 220u8, 33u8, 158u8, 21u8, 24u8, 206u8, 217u8, 100u8, - 233u8, 163u8, 78u8, 97u8, 214u8, 138u8, 148u8, 228u8, 241u8, 86u8, 157u8, - 179u8, 232u8, 66u8, 86u8, 186u8, 152u8, 27u8, 165u8, 39u8, 83u8, + 166u8, 235u8, 124u8, 220u8, 33u8, 158u8, 21u8, 24u8, 206u8, 217u8, 100u8, 233u8, + 163u8, 78u8, 97u8, 214u8, 138u8, 148u8, 228u8, 241u8, 86u8, 157u8, 179u8, 232u8, + 66u8, 86u8, 186u8, 152u8, 27u8, 165u8, 39u8, 83u8, ], [ - 169u8, 31u8, 231u8, 174u8, 98u8, 252u8, 230u8, 105u8, 223u8, 44u8, 127u8, - 136u8, 15u8, 140u8, 20u8, 209u8, 120u8, 83u8, 26u8, 174u8, 114u8, 81u8, - 85u8, 88u8, 229u8, 201u8, 72u8, 227u8, 124u8, 50u8, 165u8, 114u8, + 169u8, 31u8, 231u8, 174u8, 98u8, 252u8, 230u8, 105u8, 223u8, 44u8, 127u8, 136u8, + 15u8, 140u8, 20u8, 209u8, 120u8, 83u8, 26u8, 174u8, 114u8, 81u8, 85u8, 88u8, 229u8, + 201u8, 72u8, 227u8, 124u8, 50u8, 165u8, 114u8, ], [ - 171u8, 97u8, 77u8, 43u8, 115u8, 133u8, 67u8, 192u8, 234u8, 33u8, 245u8, - 99u8, 71u8, 207u8, 105u8, 106u8, 58u8, 12u8, 66u8, 167u8, 203u8, 236u8, - 50u8, 18u8, 165u8, 202u8, 34u8, 164u8, 220u8, 255u8, 33u8, 36u8, + 171u8, 97u8, 77u8, 43u8, 115u8, 133u8, 67u8, 192u8, 234u8, 33u8, 245u8, 99u8, 71u8, + 207u8, 105u8, 106u8, 58u8, 12u8, 66u8, 167u8, 203u8, 236u8, 50u8, 18u8, 165u8, + 202u8, 34u8, 164u8, 220u8, 255u8, 33u8, 36u8, ], [ - 172u8, 117u8, 247u8, 115u8, 227u8, 169u8, 47u8, 26u8, 2u8, 177u8, 33u8, - 52u8, 214u8, 94u8, 31u8, 71u8, 248u8, 161u8, 78u8, 171u8, 228u8, 234u8, - 241u8, 226u8, 70u8, 36u8, 145u8, 142u8, 106u8, 139u8, 38u8, 159u8, + 172u8, 117u8, 247u8, 115u8, 227u8, 169u8, 47u8, 26u8, 2u8, 177u8, 33u8, 52u8, + 214u8, 94u8, 31u8, 71u8, 248u8, 161u8, 78u8, 171u8, 228u8, 234u8, 241u8, 226u8, + 70u8, 36u8, 145u8, 142u8, 106u8, 139u8, 38u8, 159u8, ], [ - 225u8, 184u8, 49u8, 176u8, 230u8, 243u8, 170u8, 22u8, 180u8, 177u8, - 166u8, 189u8, 82u8, 107u8, 92u8, 222u8, 171u8, 73u8, 64u8, 116u8, 76u8, - 166u8, 224u8, 37u8, 31u8, 95u8, 229u8, 248u8, 202u8, 241u8, 200u8, 26u8, + 225u8, 184u8, 49u8, 176u8, 230u8, 243u8, 170u8, 22u8, 180u8, 177u8, 166u8, 189u8, + 82u8, 107u8, 92u8, 222u8, 171u8, 73u8, 64u8, 116u8, 76u8, 166u8, 224u8, 37u8, 31u8, + 95u8, 229u8, 248u8, 202u8, 241u8, 200u8, 26u8, ], [ - 245u8, 85u8, 12u8, 94u8, 234u8, 25u8, 180u8, 138u8, 198u8, 235u8, 95u8, - 3u8, 171u8, 220u8, 79u8, 89u8, 192u8, 166u8, 6u8, 151u8, 171u8, 179u8, - 217u8, 115u8, 205u8, 104u8, 102u8, 151u8, 3u8, 181u8, 200u8, 185u8, + 245u8, 85u8, 12u8, 94u8, 234u8, 25u8, 180u8, 138u8, 198u8, 235u8, 95u8, 3u8, 171u8, + 220u8, 79u8, 89u8, 192u8, 166u8, 6u8, 151u8, 171u8, 179u8, 217u8, 115u8, 205u8, + 104u8, 102u8, 151u8, 3u8, 181u8, 200u8, 185u8, ], [ - 253u8, 69u8, 96u8, 74u8, 186u8, 215u8, 156u8, 22u8, 226u8, 51u8, 72u8, - 161u8, 55u8, 237u8, 130u8, 146u8, 102u8, 27u8, 225u8, 184u8, 235u8, - 166u8, 228u8, 128u8, 110u8, 190u8, 214u8, 131u8, 59u8, 28u8, 4u8, 106u8, + 253u8, 69u8, 96u8, 74u8, 186u8, 215u8, 156u8, 22u8, 226u8, 51u8, 72u8, 161u8, 55u8, + 237u8, 130u8, 146u8, 102u8, 27u8, 225u8, 184u8, 235u8, 166u8, 228u8, 128u8, 110u8, + 190u8, 214u8, 131u8, 59u8, 28u8, 4u8, 106u8, ], [ - 254u8, 127u8, 251u8, 30u8, 223u8, 231u8, 159u8, 77u8, 247u8, 22u8, 203u8, - 45u8, 202u8, 210u8, 28u8, 242u8, 243u8, 27u8, 16u8, 77u8, 129u8, 106u8, - 121u8, 118u8, 186u8, 30u8, 110u8, 70u8, 83u8, 193u8, 239u8, 177u8, + 254u8, 127u8, 251u8, 30u8, 223u8, 231u8, 159u8, 77u8, 247u8, 22u8, 203u8, 45u8, + 202u8, 210u8, 28u8, 242u8, 243u8, 27u8, 16u8, 77u8, 129u8, 106u8, 121u8, 118u8, + 186u8, 30u8, 110u8, 70u8, 83u8, 193u8, 239u8, 177u8, ], ]; - /// The names of the variants in the same order as `SELECTORS`. - pub const VARIANT_NAMES: &'static [&'static str] = &[ - ::core::stringify!(RfqOrderOriginsAllowed), - ::core::stringify!(TransformedERC20), - ::core::stringify!(ERC1155OrderFilled), - ::core::stringify!(ProxyFunctionUpdated), - ::core::stringify!(LiquidityProviderSwap), - ::core::stringify!(ERC1155OrderCancelled), - ::core::stringify!(ERC721OrderFilled), - ::core::stringify!(ERC1155OrderPreSigned), - ::core::stringify!(OrderSignerRegistered), - ::core::stringify!(MetaTransactionExecuted), - ::core::stringify!(RfqOrderFilled), - ::core::stringify!(OwnershipTransferred), - ::core::stringify!(ERC721OrderPreSigned), - ::core::stringify!(ERC721OrderCancelled), - ::core::stringify!(OrderCancelled), - ::core::stringify!(PairCancelledLimitOrders), - ::core::stringify!(LimitOrderFilled), - ::core::stringify!(OtcOrderFilled), - ::core::stringify!(Migrated), - ::core::stringify!(QuoteSignerUpdated), - ::core::stringify!(TransformerDeployerUpdated), - ::core::stringify!(PairCancelledRfqOrders), - ]; /// The signatures in the same order as `SELECTORS`. pub const SIGNATURES: &'static [&'static str] = &[ ::SIGNATURE, @@ -7706,6 +7639,32 @@ function owner() external view returns (address ownerAddress); ::SIGNATURE, ::SIGNATURE, ]; + /// The names of the variants in the same order as `SELECTORS`. + pub const VARIANT_NAMES: &'static [&'static str] = &[ + ::core::stringify!(RfqOrderOriginsAllowed), + ::core::stringify!(TransformedERC20), + ::core::stringify!(ERC1155OrderFilled), + ::core::stringify!(ProxyFunctionUpdated), + ::core::stringify!(LiquidityProviderSwap), + ::core::stringify!(ERC1155OrderCancelled), + ::core::stringify!(ERC721OrderFilled), + ::core::stringify!(ERC1155OrderPreSigned), + ::core::stringify!(OrderSignerRegistered), + ::core::stringify!(MetaTransactionExecuted), + ::core::stringify!(RfqOrderFilled), + ::core::stringify!(OwnershipTransferred), + ::core::stringify!(ERC721OrderPreSigned), + ::core::stringify!(ERC721OrderCancelled), + ::core::stringify!(OrderCancelled), + ::core::stringify!(PairCancelledLimitOrders), + ::core::stringify!(LimitOrderFilled), + ::core::stringify!(OtcOrderFilled), + ::core::stringify!(Migrated), + ::core::stringify!(QuoteSignerUpdated), + ::core::stringify!(TransformerDeployerUpdated), + ::core::stringify!(PairCancelledRfqOrders), + ]; + /// Returns the signature for the given selector, if known. #[inline] pub fn signature_by_selector( @@ -7718,218 +7677,147 @@ function owner() external view returns (address ownerAddress); ::core::result::Result::Err(_) => ::core::option::Option::None, } } + /// Returns the enum variant name for the given selector, if known. #[inline] - pub fn name_by_selector( - selector: [u8; 32usize], - ) -> ::core::option::Option<&'static str> { + pub fn name_by_selector(selector: [u8; 32usize]) -> ::core::option::Option<&'static str> { let sig = Self::signature_by_selector(selector)?; sig.split_once('(').map(|(name, _)| name) } } #[automatically_derived] impl alloy_sol_types::SolEventInterface for IZeroexEvents { - const NAME: &'static str = "IZeroexEvents"; const COUNT: usize = 22usize; + const NAME: &'static str = "IZeroexEvents"; + fn decode_raw_log( topics: &[alloy_sol_types::Word], data: &[u8], ) -> alloy_sol_types::Result { match topics.first().copied() { - Some( - ::SIGNATURE_HASH, - ) => { + Some(::SIGNATURE_HASH) => { ::decode_raw_log( - topics, - data, - ) - .map(Self::ERC1155OrderCancelled) - } - Some( - ::SIGNATURE_HASH, - ) => { - ::decode_raw_log( - topics, - data, - ) + topics, data, + ) + .map(Self::ERC1155OrderCancelled) + } + Some(::SIGNATURE_HASH) => { + ::decode_raw_log(topics, data) .map(Self::ERC1155OrderFilled) } - Some( - ::SIGNATURE_HASH, - ) => { + Some(::SIGNATURE_HASH) => { ::decode_raw_log( - topics, - data, - ) - .map(Self::ERC1155OrderPreSigned) + topics, data, + ) + .map(Self::ERC1155OrderPreSigned) } - Some( - ::SIGNATURE_HASH, - ) => { + Some(::SIGNATURE_HASH) => { ::decode_raw_log( - topics, - data, - ) - .map(Self::ERC721OrderCancelled) - } - Some( - ::SIGNATURE_HASH, - ) => { - ::decode_raw_log( - topics, - data, - ) + topics, data, + ) + .map(Self::ERC721OrderCancelled) + } + Some(::SIGNATURE_HASH) => { + ::decode_raw_log(topics, data) .map(Self::ERC721OrderFilled) } - Some( - ::SIGNATURE_HASH, - ) => { + Some(::SIGNATURE_HASH) => { ::decode_raw_log( - topics, - data, - ) - .map(Self::ERC721OrderPreSigned) + topics, data, + ) + .map(Self::ERC721OrderPreSigned) } Some(::SIGNATURE_HASH) => { - ::decode_raw_log( - topics, - data, - ) + ::decode_raw_log(topics, data) .map(Self::LimitOrderFilled) } - Some( - ::SIGNATURE_HASH, - ) => { + Some(::SIGNATURE_HASH) => { ::decode_raw_log( - topics, - data, - ) - .map(Self::LiquidityProviderSwap) + topics, data, + ) + .map(Self::LiquidityProviderSwap) } - Some( - ::SIGNATURE_HASH, - ) => { + Some(::SIGNATURE_HASH) => { ::decode_raw_log( - topics, - data, - ) - .map(Self::MetaTransactionExecuted) + topics, data, + ) + .map(Self::MetaTransactionExecuted) } Some(::SIGNATURE_HASH) => { ::decode_raw_log(topics, data) .map(Self::Migrated) } Some(::SIGNATURE_HASH) => { - ::decode_raw_log( - topics, - data, - ) + ::decode_raw_log(topics, data) .map(Self::OrderCancelled) } - Some( - ::SIGNATURE_HASH, - ) => { + Some(::SIGNATURE_HASH) => { ::decode_raw_log( - topics, - data, - ) - .map(Self::OrderSignerRegistered) + topics, data, + ) + .map(Self::OrderSignerRegistered) } Some(::SIGNATURE_HASH) => { - ::decode_raw_log( - topics, - data, - ) + ::decode_raw_log(topics, data) .map(Self::OtcOrderFilled) } - Some( - ::SIGNATURE_HASH, - ) => { + Some(::SIGNATURE_HASH) => { ::decode_raw_log( - topics, - data, - ) - .map(Self::OwnershipTransferred) + topics, data, + ) + .map(Self::OwnershipTransferred) } - Some( - ::SIGNATURE_HASH, - ) => { + Some(::SIGNATURE_HASH) => { ::decode_raw_log( - topics, - data, - ) - .map(Self::PairCancelledLimitOrders) + topics, data, + ) + .map(Self::PairCancelledLimitOrders) } - Some( - ::SIGNATURE_HASH, - ) => { + Some(::SIGNATURE_HASH) => { ::decode_raw_log( - topics, - data, - ) - .map(Self::PairCancelledRfqOrders) + topics, data, + ) + .map(Self::PairCancelledRfqOrders) } - Some( - ::SIGNATURE_HASH, - ) => { + Some(::SIGNATURE_HASH) => { ::decode_raw_log( - topics, - data, - ) - .map(Self::ProxyFunctionUpdated) - } - Some( - ::SIGNATURE_HASH, - ) => { - ::decode_raw_log( - topics, - data, - ) + topics, data, + ) + .map(Self::ProxyFunctionUpdated) + } + Some(::SIGNATURE_HASH) => { + ::decode_raw_log(topics, data) .map(Self::QuoteSignerUpdated) } Some(::SIGNATURE_HASH) => { - ::decode_raw_log( - topics, - data, - ) + ::decode_raw_log(topics, data) .map(Self::RfqOrderFilled) } - Some( - ::SIGNATURE_HASH, - ) => { + Some(::SIGNATURE_HASH) => { ::decode_raw_log( - topics, - data, - ) - .map(Self::RfqOrderOriginsAllowed) + topics, data, + ) + .map(Self::RfqOrderOriginsAllowed) } Some(::SIGNATURE_HASH) => { - ::decode_raw_log( - topics, - data, - ) + ::decode_raw_log(topics, data) .map(Self::TransformedERC20) } - Some( - ::SIGNATURE_HASH, - ) => { + Some(::SIGNATURE_HASH) => { ::decode_raw_log( - topics, - data, - ) - .map(Self::TransformerDeployerUpdated) - } - _ => { - 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(), - ), + topics, data, + ) + .map(Self::TransformerDeployerUpdated) + } + _ => 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(), ), - }) - } + ), + }), } } } @@ -7964,9 +7852,7 @@ function owner() external view returns (address ownerAddress); Self::MetaTransactionExecuted(inner) => { alloy_sol_types::private::IntoLogData::to_log_data(inner) } - Self::Migrated(inner) => { - alloy_sol_types::private::IntoLogData::to_log_data(inner) - } + Self::Migrated(inner) => alloy_sol_types::private::IntoLogData::to_log_data(inner), Self::OrderCancelled(inner) => { alloy_sol_types::private::IntoLogData::to_log_data(inner) } @@ -8005,6 +7891,7 @@ function owner() external view returns (address ownerAddress); } } } + fn into_log_data(self) -> alloy_sol_types::private::LogData { match self { Self::ERC1155OrderCancelled(inner) => { @@ -8076,10 +7963,10 @@ function owner() external view returns (address ownerAddress); } } } - use alloy_contract as alloy_contract; + use alloy_contract; /**Creates a new wrapper around an on-chain [`IZeroex`](self) contract instance. -See the [wrapper's documentation](`IZeroexInstance`) for more details.*/ + See the [wrapper's documentation](`IZeroexInstance`) for more details.*/ #[inline] pub const fn new< P: alloy_contract::private::Provider, @@ -8092,15 +7979,15 @@ See the [wrapper's documentation](`IZeroexInstance`) for more details.*/ } /**A [`IZeroex`](self) instance. -Contains type-safe methods for interacting with an on-chain instance of the -[`IZeroex`](self) contract located at a given `address`, using a given -provider `P`. + Contains type-safe methods for interacting with an on-chain instance of the + [`IZeroex`](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. + 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.*/ + See the [module-level documentation](self) for all the available methods.*/ #[derive(Clone)] pub struct IZeroexInstance { address: alloy_sol_types::private::Address, @@ -8111,43 +7998,45 @@ See the [module-level documentation](self) for all the available methods.*/ impl ::core::fmt::Debug for IZeroexInstance { #[inline] fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { - f.debug_tuple("IZeroexInstance").field(&self.address).finish() + f.debug_tuple("IZeroexInstance") + .field(&self.address) + .finish() } } /// Instantiation and getters/setters. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > IZeroexInstance { + impl, N: alloy_contract::private::Network> + IZeroexInstance + { /**Creates a new wrapper around an on-chain [`IZeroex`](self) contract instance. -See the [wrapper's documentation](`IZeroexInstance`) for more details.*/ + See the [wrapper's documentation](`IZeroexInstance`) for more details.*/ #[inline] - pub const fn new( - address: alloy_sol_types::private::Address, - __provider: P, - ) -> Self { + pub const fn new(address: alloy_sol_types::private::Address, __provider: P) -> Self { Self { address, provider: __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 { @@ -8155,7 +8044,8 @@ See the [wrapper's documentation](`IZeroexInstance`) for more details.*/ } } impl IZeroexInstance<&P, N> { - /// Clones the provider and returns a new instance with the cloned provider. + /// Clones the provider and returns a new instance with the cloned + /// provider. #[inline] pub fn with_cloned_provider(self) -> IZeroexInstance { IZeroexInstance { @@ -8166,20 +8056,22 @@ See the [wrapper's documentation](`IZeroexInstance`) for more details.*/ } } /// Function calls. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > IZeroexInstance { - /// Creates a new call builder using this contract instance's provider and address. + impl, N: alloy_contract::private::Network> + IZeroexInstance + { + /// 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. + /// 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 [`extend`] function. pub fn extend( &self, @@ -8188,178 +8080,190 @@ See the [wrapper's documentation](`IZeroexInstance`) for more details.*/ ) -> alloy_contract::SolCallBuilder<&P, extendCall, N> { self.call_builder(&extendCall { selector, r#impl }) } - ///Creates a new call builder for the [`fillOrKillLimitOrder`] function. + + ///Creates a new call builder for the [`fillOrKillLimitOrder`] + /// function. pub fn fillOrKillLimitOrder( &self, order: ::RustType, signature: ::RustType, takerTokenFillAmount: u128, ) -> alloy_contract::SolCallBuilder<&P, fillOrKillLimitOrderCall, N> { - self.call_builder( - &fillOrKillLimitOrderCall { - order, - signature, - takerTokenFillAmount, - }, - ) + self.call_builder(&fillOrKillLimitOrderCall { + order, + signature, + takerTokenFillAmount, + }) } - ///Creates a new call builder for the [`getLimitOrderRelevantState`] function. + + ///Creates a new call builder for the [`getLimitOrderRelevantState`] + /// function. pub fn getLimitOrderRelevantState( &self, order: ::RustType, signature: ::RustType, ) -> alloy_contract::SolCallBuilder<&P, getLimitOrderRelevantStateCall, N> { - self.call_builder( - &getLimitOrderRelevantStateCall { - order, - signature, - }, - ) + self.call_builder(&getLimitOrderRelevantStateCall { order, signature }) } + ///Creates a new call builder for the [`owner`] function. pub fn owner(&self) -> alloy_contract::SolCallBuilder<&P, ownerCall, N> { self.call_builder(&ownerCall) } } /// Event filters. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > IZeroexInstance { - /// Creates a new event filter using this contract instance's provider and address. + impl, N: alloy_contract::private::Network> + IZeroexInstance + { + /// 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. + /// 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 [`ERC1155OrderCancelled`] event. pub fn ERC1155OrderCancelled_filter( &self, ) -> alloy_contract::Event<&P, ERC1155OrderCancelled, N> { self.event_filter::() } + ///Creates a new event filter for the [`ERC1155OrderFilled`] event. pub fn ERC1155OrderFilled_filter( &self, ) -> alloy_contract::Event<&P, ERC1155OrderFilled, N> { self.event_filter::() } + ///Creates a new event filter for the [`ERC1155OrderPreSigned`] event. pub fn ERC1155OrderPreSigned_filter( &self, ) -> alloy_contract::Event<&P, ERC1155OrderPreSigned, N> { self.event_filter::() } + ///Creates a new event filter for the [`ERC721OrderCancelled`] event. pub fn ERC721OrderCancelled_filter( &self, ) -> alloy_contract::Event<&P, ERC721OrderCancelled, N> { self.event_filter::() } + ///Creates a new event filter for the [`ERC721OrderFilled`] event. - pub fn ERC721OrderFilled_filter( - &self, - ) -> alloy_contract::Event<&P, ERC721OrderFilled, N> { + pub fn ERC721OrderFilled_filter(&self) -> alloy_contract::Event<&P, ERC721OrderFilled, N> { self.event_filter::() } + ///Creates a new event filter for the [`ERC721OrderPreSigned`] event. pub fn ERC721OrderPreSigned_filter( &self, ) -> alloy_contract::Event<&P, ERC721OrderPreSigned, N> { self.event_filter::() } + ///Creates a new event filter for the [`LimitOrderFilled`] event. - pub fn LimitOrderFilled_filter( - &self, - ) -> alloy_contract::Event<&P, LimitOrderFilled, N> { + pub fn LimitOrderFilled_filter(&self) -> alloy_contract::Event<&P, LimitOrderFilled, N> { self.event_filter::() } + ///Creates a new event filter for the [`LiquidityProviderSwap`] event. pub fn LiquidityProviderSwap_filter( &self, ) -> alloy_contract::Event<&P, LiquidityProviderSwap, N> { self.event_filter::() } - ///Creates a new event filter for the [`MetaTransactionExecuted`] event. + + ///Creates a new event filter for the [`MetaTransactionExecuted`] + /// event. pub fn MetaTransactionExecuted_filter( &self, ) -> alloy_contract::Event<&P, MetaTransactionExecuted, N> { self.event_filter::() } + ///Creates a new event filter for the [`Migrated`] event. pub fn Migrated_filter(&self) -> alloy_contract::Event<&P, Migrated, N> { self.event_filter::() } + ///Creates a new event filter for the [`OrderCancelled`] event. - pub fn OrderCancelled_filter( - &self, - ) -> alloy_contract::Event<&P, OrderCancelled, N> { + pub fn OrderCancelled_filter(&self) -> alloy_contract::Event<&P, OrderCancelled, N> { self.event_filter::() } + ///Creates a new event filter for the [`OrderSignerRegistered`] event. pub fn OrderSignerRegistered_filter( &self, ) -> alloy_contract::Event<&P, OrderSignerRegistered, N> { self.event_filter::() } + ///Creates a new event filter for the [`OtcOrderFilled`] event. - pub fn OtcOrderFilled_filter( - &self, - ) -> alloy_contract::Event<&P, OtcOrderFilled, N> { + pub fn OtcOrderFilled_filter(&self) -> alloy_contract::Event<&P, OtcOrderFilled, N> { self.event_filter::() } + ///Creates a new event filter for the [`OwnershipTransferred`] event. pub fn OwnershipTransferred_filter( &self, ) -> alloy_contract::Event<&P, OwnershipTransferred, N> { self.event_filter::() } - ///Creates a new event filter for the [`PairCancelledLimitOrders`] event. + + ///Creates a new event filter for the [`PairCancelledLimitOrders`] + /// event. pub fn PairCancelledLimitOrders_filter( &self, ) -> alloy_contract::Event<&P, PairCancelledLimitOrders, N> { self.event_filter::() } + ///Creates a new event filter for the [`PairCancelledRfqOrders`] event. pub fn PairCancelledRfqOrders_filter( &self, ) -> alloy_contract::Event<&P, PairCancelledRfqOrders, N> { self.event_filter::() } + ///Creates a new event filter for the [`ProxyFunctionUpdated`] event. pub fn ProxyFunctionUpdated_filter( &self, ) -> alloy_contract::Event<&P, ProxyFunctionUpdated, N> { self.event_filter::() } + ///Creates a new event filter for the [`QuoteSignerUpdated`] event. pub fn QuoteSignerUpdated_filter( &self, ) -> alloy_contract::Event<&P, QuoteSignerUpdated, N> { self.event_filter::() } + ///Creates a new event filter for the [`RfqOrderFilled`] event. - pub fn RfqOrderFilled_filter( - &self, - ) -> alloy_contract::Event<&P, RfqOrderFilled, N> { + pub fn RfqOrderFilled_filter(&self) -> alloy_contract::Event<&P, RfqOrderFilled, N> { self.event_filter::() } + ///Creates a new event filter for the [`RfqOrderOriginsAllowed`] event. pub fn RfqOrderOriginsAllowed_filter( &self, ) -> alloy_contract::Event<&P, RfqOrderOriginsAllowed, N> { self.event_filter::() } + ///Creates a new event filter for the [`TransformedERC20`] event. - pub fn TransformedERC20_filter( - &self, - ) -> alloy_contract::Event<&P, TransformedERC20, N> { + pub fn TransformedERC20_filter(&self) -> alloy_contract::Event<&P, TransformedERC20, N> { self.event_filter::() } - ///Creates a new event filter for the [`TransformerDeployerUpdated`] event. + + ///Creates a new event filter for the [`TransformerDeployerUpdated`] + /// event. pub fn TransformerDeployerUpdated_filter( &self, ) -> alloy_contract::Event<&P, TransformerDeployerUpdated, N> { @@ -8369,77 +8273,45 @@ See the [wrapper's documentation](`IZeroexInstance`) for more details.*/ } pub type Instance = IZeroex::IZeroexInstance<::alloy_provider::DynProvider>; use { - std::{sync::LazyLock, collections::HashMap}, - anyhow::{Result, Context}, - alloy_primitives::{address, Address}, - alloy_provider::{Provider, DynProvider}, + alloy_primitives::{Address, address}, + alloy_provider::{DynProvider, Provider}, + anyhow::{Context, Result}, + std::{collections::HashMap, sync::LazyLock}, }; pub const fn deployment_info(chain_id: u64) -> Option<(Address, Option)> { match chain_id { - 1u64 => { - Some(( - ::alloy_primitives::address!( - "0xdef1c0ded9bec7f1a1670819833240f027b25eff" - ), - None, - )) - } - 10u64 => { - Some(( - ::alloy_primitives::address!( - "0xdef1abe32c034e558cdd535791643c58a13acc10" - ), - None, - )) - } - 56u64 => { - Some(( - ::alloy_primitives::address!( - "0xdef1c0ded9bec7f1a1670819833240f027b25eff" - ), - None, - )) - } - 137u64 => { - Some(( - ::alloy_primitives::address!( - "0xdef1c0ded9bec7f1a1670819833240f027b25eff" - ), - None, - )) - } - 8453u64 => { - Some(( - ::alloy_primitives::address!( - "0xdef1c0ded9bec7f1a1670819833240f027b25eff" - ), - None, - )) - } - 42161u64 => { - Some(( - ::alloy_primitives::address!( - "0xdef1c0ded9bec7f1a1670819833240f027b25eff" - ), - None, - )) - } - 43114u64 => { - Some(( - ::alloy_primitives::address!( - "0xdef1c0ded9bec7f1a1670819833240f027b25eff" - ), - None, - )) - } - 11155111u64 => { - Some(( - ::alloy_primitives::address!( - "0xdef1c0ded9bec7f1a1670819833240f027b25eff" - ), - None, - )) - } + 1u64 => Some(( + ::alloy_primitives::address!("0xdef1c0ded9bec7f1a1670819833240f027b25eff"), + None, + )), + 10u64 => Some(( + ::alloy_primitives::address!("0xdef1abe32c034e558cdd535791643c58a13acc10"), + None, + )), + 56u64 => Some(( + ::alloy_primitives::address!("0xdef1c0ded9bec7f1a1670819833240f027b25eff"), + None, + )), + 137u64 => Some(( + ::alloy_primitives::address!("0xdef1c0ded9bec7f1a1670819833240f027b25eff"), + None, + )), + 8453u64 => Some(( + ::alloy_primitives::address!("0xdef1c0ded9bec7f1a1670819833240f027b25eff"), + None, + )), + 42161u64 => Some(( + ::alloy_primitives::address!("0xdef1c0ded9bec7f1a1670819833240f027b25eff"), + None, + )), + 43114u64 => Some(( + ::alloy_primitives::address!("0xdef1c0ded9bec7f1a1670819833240f027b25eff"), + None, + )), + 11155111u64 => Some(( + ::alloy_primitives::address!("0xdef1c0ded9bec7f1a1670819833240f027b25eff"), + None, + )), _ => None, } } @@ -8456,9 +8328,7 @@ pub const fn deployment_block(chain_id: &u64) -> Option { } } impl Instance { - pub fn deployed( - provider: &DynProvider, - ) -> impl Future> + Send { + pub fn deployed(provider: &DynProvider) -> impl Future> + Send { async move { let chain_id = provider .get_chain_id() diff --git a/contracts/generated/contracts-generated/liquoricesettlement/src/lib.rs b/contracts/generated/contracts-generated/liquoricesettlement/src/lib.rs index 90cb73f8af..1e034b5f65 100644 --- a/contracts/generated/contracts-generated/liquoricesettlement/src/lib.rs +++ b/contracts/generated/contracts-generated/liquoricesettlement/src/lib.rs @@ -1,4 +1,10 @@ -#![allow(unused_imports, unused_attributes, clippy::all, rustdoc::all, non_snake_case)] +#![allow( + unused_imports, + unused_attributes, + clippy::all, + rustdoc::all, + non_snake_case +)] //! Auto-generated contract bindings. Do not edit. ///Module containing a contract's types and functions. /** @@ -17,12 +23,11 @@ library GPv2Interaction { clippy::empty_structs_with_brackets )] pub mod GPv2Interaction { - use super::*; - use alloy_sol_types as alloy_sol_types; + use {super::*, alloy_sol_types}; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**```solidity -struct Data { address target; uint256 value; bytes callData; } -```*/ + struct Data { address target; uint256 value; bytes callData; } + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct Data { @@ -40,7 +45,7 @@ struct Data { address target; uint256 value; bytes callData; } clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[doc(hidden)] #[allow(dead_code)] type UnderlyingSolTuple<'a> = ( @@ -56,9 +61,7 @@ struct Data { address target; uint256 value; bytes callData; } ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -95,99 +98,96 @@ struct Data { address target; uint256 value; bytes callData; } ::tokenize( &self.target, ), - as alloy_sol_types::SolType>::tokenize(&self.value), + as alloy_sol_types::SolType>::tokenize( + &self.value, + ), ::tokenize( &self.callData, ), ) } + #[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) + 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) + 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) + 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 Data { type RustType = Self; - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + + const ENCODED_SIZE: Option = + as alloy_sol_types::SolType>::ENCODED_SIZE; + const PACKED_ENCODED_SIZE: Option = + as alloy_sol_types::SolType>::PACKED_ENCODED_SIZE; 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); + let tuple = as alloy_sol_types::SolType>::detokenize(token); >>::from(tuple) } } #[automatically_derived] impl alloy_sol_types::SolStruct for Data { const NAME: &'static str = "Data"; + #[inline] fn eip712_root_type() -> alloy_sol_types::private::Cow<'static, str> { alloy_sol_types::private::Cow::Borrowed( "Data(address target,uint256 value,bytes callData)", ) } + #[inline] - fn eip712_components() -> alloy_sol_types::private::Vec< - alloy_sol_types::private::Cow<'static, str>, - > { + fn eip712_components() + -> alloy_sol_types::private::Vec> + { 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 { [ @@ -222,14 +222,13 @@ struct Data { address target; uint256 value; bytes callData; } &rust.callData, ) } + #[inline] fn encode_topic_preimage( rust: &Self::RustType, out: &mut alloy_sol_types::private::Vec, ) { - out.reserve( - ::topic_preimage_length(rust), - ); + out.reserve(::topic_preimage_length(rust)); ::encode_topic_preimage( &rust.target, out, @@ -245,36 +244,28 @@ struct Data { address target; uint256 value; bytes callData; } out, ); } + #[inline] - fn encode_topic( - rust: &Self::RustType, - ) -> alloy_sol_types::abi::token::WordToken { + 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), - ) + ::encode_topic_preimage(rust, &mut out); + alloy_sol_types::abi::token::WordToken(alloy_sol_types::private::keccak256(out)) } } }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**```solidity -struct Hooks { Data[] beforeSettle; Data[] afterSettle; } -```*/ + struct Hooks { Data[] beforeSettle; Data[] afterSettle; } + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct Hooks { #[allow(missing_docs)] - pub beforeSettle: alloy_sol_types::private::Vec< - ::RustType, - >, + pub beforeSettle: + alloy_sol_types::private::Vec<::RustType>, #[allow(missing_docs)] - pub afterSettle: alloy_sol_types::private::Vec< - ::RustType, - >, + pub afterSettle: + alloy_sol_types::private::Vec<::RustType>, } #[allow( non_camel_case_types, @@ -283,7 +274,7 @@ struct Hooks { Data[] beforeSettle; Data[] afterSettle; } clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[doc(hidden)] #[allow(dead_code)] type UnderlyingSolTuple<'a> = ( @@ -297,9 +288,7 @@ struct Hooks { Data[] beforeSettle; Data[] afterSettle; } ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -332,104 +321,96 @@ struct Hooks { Data[] beforeSettle; Data[] afterSettle; } #[inline] fn stv_to_tokens(&self) -> ::Token<'_> { ( - as alloy_sol_types::SolType>::tokenize(&self.beforeSettle), - as alloy_sol_types::SolType>::tokenize(&self.afterSettle), + as alloy_sol_types::SolType>::tokenize( + &self.beforeSettle, + ), + as alloy_sol_types::SolType>::tokenize( + &self.afterSettle, + ), ) } + #[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) + 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) + 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) + 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 Hooks { type RustType = Self; - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + + const ENCODED_SIZE: Option = + as alloy_sol_types::SolType>::ENCODED_SIZE; + const PACKED_ENCODED_SIZE: Option = + as alloy_sol_types::SolType>::PACKED_ENCODED_SIZE; 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); + let tuple = as alloy_sol_types::SolType>::detokenize(token); >>::from(tuple) } } #[automatically_derived] impl alloy_sol_types::SolStruct for Hooks { const NAME: &'static str = "Hooks"; + #[inline] fn eip712_root_type() -> alloy_sol_types::private::Cow<'static, str> { alloy_sol_types::private::Cow::Borrowed( "Hooks(Data[] beforeSettle,Data[] afterSettle)", ) } + #[inline] - fn eip712_components() -> alloy_sol_types::private::Vec< - alloy_sol_types::private::Cow<'static, str>, - > { + fn eip712_components() + -> alloy_sol_types::private::Vec> + { 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.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 { [ @@ -461,14 +442,13 @@ struct Hooks { Data[] beforeSettle; Data[] afterSettle; } &rust.afterSettle, ) } + #[inline] fn encode_topic_preimage( rust: &Self::RustType, out: &mut alloy_sol_types::private::Vec, ) { - out.reserve( - ::topic_preimage_length(rust), - ); + out.reserve(::topic_preimage_length(rust)); as alloy_sol_types::EventTopic>::encode_topic_preimage( @@ -482,25 +462,19 @@ struct Hooks { Data[] beforeSettle; Data[] afterSettle; } out, ); } + #[inline] - fn encode_topic( - rust: &Self::RustType, - ) -> alloy_sol_types::abi::token::WordToken { + 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), - ) + ::encode_topic_preimage(rust, &mut out); + alloy_sol_types::abi::token::WordToken(alloy_sol_types::private::keccak256(out)) } } }; - use alloy_contract as alloy_contract; + use alloy_contract; /**Creates a new wrapper around an on-chain [`GPv2Interaction`](self) contract instance. -See the [wrapper's documentation](`GPv2InteractionInstance`) for more details.*/ + See the [wrapper's documentation](`GPv2InteractionInstance`) for more details.*/ #[inline] pub const fn new< P: alloy_contract::private::Provider, @@ -513,15 +487,15 @@ See the [wrapper's documentation](`GPv2InteractionInstance`) for more details.*/ } /**A [`GPv2Interaction`](self) instance. -Contains type-safe methods for interacting with an on-chain instance of the -[`GPv2Interaction`](self) contract located at a given `address`, using a given -provider `P`. + Contains type-safe methods for interacting with an on-chain instance of the + [`GPv2Interaction`](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. + 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.*/ + See the [module-level documentation](self) for all the available methods.*/ #[derive(Clone)] pub struct GPv2InteractionInstance { address: alloy_sol_types::private::Address, @@ -532,43 +506,45 @@ See the [module-level documentation](self) for all the available methods.*/ impl ::core::fmt::Debug for GPv2InteractionInstance { #[inline] fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { - f.debug_tuple("GPv2InteractionInstance").field(&self.address).finish() + f.debug_tuple("GPv2InteractionInstance") + .field(&self.address) + .finish() } } /// Instantiation and getters/setters. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > GPv2InteractionInstance { + impl, N: alloy_contract::private::Network> + GPv2InteractionInstance + { /**Creates a new wrapper around an on-chain [`GPv2Interaction`](self) contract instance. -See the [wrapper's documentation](`GPv2InteractionInstance`) for more details.*/ + See the [wrapper's documentation](`GPv2InteractionInstance`) for more details.*/ #[inline] - pub const fn new( - address: alloy_sol_types::private::Address, - __provider: P, - ) -> Self { + pub const fn new(address: alloy_sol_types::private::Address, __provider: P) -> Self { Self { address, provider: __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 { @@ -576,7 +552,8 @@ See the [wrapper's documentation](`GPv2InteractionInstance`) for more details.*/ } } impl GPv2InteractionInstance<&P, N> { - /// Clones the provider and returns a new instance with the cloned provider. + /// Clones the provider and returns a new instance with the cloned + /// provider. #[inline] pub fn with_cloned_provider(self) -> GPv2InteractionInstance { GPv2InteractionInstance { @@ -587,14 +564,15 @@ See the [wrapper's documentation](`GPv2InteractionInstance`) for more details.*/ } } /// Function calls. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > GPv2InteractionInstance { - /// Creates a new call builder using this contract instance's provider and address. + impl, N: alloy_contract::private::Network> + GPv2InteractionInstance + { + /// 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. + /// 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, @@ -603,14 +581,15 @@ See the [wrapper's documentation](`GPv2InteractionInstance`) for more details.*/ } } /// Event filters. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > GPv2InteractionInstance { - /// Creates a new event filter using this contract instance's provider and address. + impl, N: alloy_contract::private::Network> + GPv2InteractionInstance + { + /// 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. + /// 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> { @@ -637,12 +616,11 @@ library ILiquoriceSettlement { clippy::empty_structs_with_brackets )] pub mod ILiquoriceSettlement { - use super::*; - use alloy_sol_types as alloy_sol_types; + use {super::*, alloy_sol_types}; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**```solidity -struct BaseTokenData { address addr; uint256 amount; uint256 toRecipient; uint256 toRepay; uint256 toSupply; } -```*/ + struct BaseTokenData { address addr; uint256 amount; uint256 toRecipient; uint256 toRepay; uint256 toSupply; } + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct BaseTokenData { @@ -664,7 +642,7 @@ struct BaseTokenData { address addr; uint256 amount; uint256 toRecipient; uint25 clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[doc(hidden)] #[allow(dead_code)] type UnderlyingSolTuple<'a> = ( @@ -684,9 +662,7 @@ struct BaseTokenData { address addr; uint256 amount; uint256 toRecipient; uint25 ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -731,105 +707,103 @@ struct BaseTokenData { address addr; uint256 amount; uint256 toRecipient; uint25 ::tokenize( &self.addr, ), - as alloy_sol_types::SolType>::tokenize(&self.amount), - as alloy_sol_types::SolType>::tokenize(&self.toRecipient), - as alloy_sol_types::SolType>::tokenize(&self.toRepay), - as alloy_sol_types::SolType>::tokenize(&self.toSupply), + as alloy_sol_types::SolType>::tokenize( + &self.amount, + ), + as alloy_sol_types::SolType>::tokenize( + &self.toRecipient, + ), + as alloy_sol_types::SolType>::tokenize( + &self.toRepay, + ), + as alloy_sol_types::SolType>::tokenize( + &self.toSupply, + ), ) } + #[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) + 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) + 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) + 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 BaseTokenData { type RustType = Self; - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + + const ENCODED_SIZE: Option = + as alloy_sol_types::SolType>::ENCODED_SIZE; + const PACKED_ENCODED_SIZE: Option = + as alloy_sol_types::SolType>::PACKED_ENCODED_SIZE; 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); + let tuple = as alloy_sol_types::SolType>::detokenize(token); >>::from(tuple) } } #[automatically_derived] impl alloy_sol_types::SolStruct for BaseTokenData { const NAME: &'static str = "BaseTokenData"; + #[inline] fn eip712_root_type() -> alloy_sol_types::private::Cow<'static, str> { alloy_sol_types::private::Cow::Borrowed( - "BaseTokenData(address addr,uint256 amount,uint256 toRecipient,uint256 toRepay,uint256 toSupply)", + "BaseTokenData(address addr,uint256 amount,uint256 toRecipient,uint256 \ + toRepay,uint256 toSupply)", ) } + #[inline] - fn eip712_components() -> alloy_sol_types::private::Vec< - alloy_sol_types::private::Cow<'static, str>, - > { + fn eip712_components() + -> alloy_sol_types::private::Vec> + { 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 { [ @@ -886,14 +860,13 @@ struct BaseTokenData { address addr; uint256 amount; uint256 toRecipient; uint25 &rust.toSupply, ) } + #[inline] fn encode_topic_preimage( rust: &Self::RustType, out: &mut alloy_sol_types::private::Vec, ) { - out.reserve( - ::topic_preimage_length(rust), - ); + out.reserve(::topic_preimage_length(rust)); ::encode_topic_preimage( &rust.addr, out, @@ -923,25 +896,19 @@ struct BaseTokenData { address addr; uint256 amount; uint256 toRecipient; uint25 out, ); } + #[inline] - fn encode_topic( - rust: &Self::RustType, - ) -> alloy_sol_types::abi::token::WordToken { + 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), - ) + ::encode_topic_preimage(rust, &mut out); + alloy_sol_types::abi::token::WordToken(alloy_sol_types::private::keccak256(out)) } } }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**```solidity -struct Order { address market; uint256 chainId; string rfqId; uint256 nonce; address trader; address effectiveTrader; uint256 quoteExpiry; address recipient; uint256 minFillAmount; BaseTokenData baseTokenData; QuoteTokenData quoteTokenData; } -```*/ + struct Order { address market; uint256 chainId; string rfqId; uint256 nonce; address trader; address effectiveTrader; uint256 quoteExpiry; address recipient; uint256 minFillAmount; BaseTokenData baseTokenData; QuoteTokenData quoteTokenData; } + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct Order { @@ -975,7 +942,7 @@ struct Order { address market; uint256 chainId; string rfqId; uint256 nonce; add clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[doc(hidden)] #[allow(dead_code)] type UnderlyingSolTuple<'a> = ( @@ -1007,9 +974,7 @@ struct Order { address market; uint256 chainId; string rfqId; uint256 nonce; add ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1066,136 +1031,120 @@ struct Order { address market; uint256 chainId; string rfqId; uint256 nonce; add ::tokenize( &self.market, ), - as alloy_sol_types::SolType>::tokenize(&self.chainId), + as alloy_sol_types::SolType>::tokenize( + &self.chainId, + ), ::tokenize( &self.rfqId, ), - as alloy_sol_types::SolType>::tokenize(&self.nonce), + as alloy_sol_types::SolType>::tokenize( + &self.nonce, + ), ::tokenize( &self.trader, ), ::tokenize( &self.effectiveTrader, ), - as alloy_sol_types::SolType>::tokenize(&self.quoteExpiry), + as alloy_sol_types::SolType>::tokenize( + &self.quoteExpiry, + ), ::tokenize( &self.recipient, ), - as alloy_sol_types::SolType>::tokenize(&self.minFillAmount), - ::tokenize( - &self.baseTokenData, - ), - ::tokenize( - &self.quoteTokenData, + as alloy_sol_types::SolType>::tokenize( + &self.minFillAmount, ), + ::tokenize(&self.baseTokenData), + ::tokenize(&self.quoteTokenData), ) } + #[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) + 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) + 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) + 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 Order { type RustType = Self; - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + + const ENCODED_SIZE: Option = + as alloy_sol_types::SolType>::ENCODED_SIZE; + const PACKED_ENCODED_SIZE: Option = + as alloy_sol_types::SolType>::PACKED_ENCODED_SIZE; 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); + let tuple = as alloy_sol_types::SolType>::detokenize(token); >>::from(tuple) } } #[automatically_derived] impl alloy_sol_types::SolStruct for Order { const NAME: &'static str = "Order"; + #[inline] fn eip712_root_type() -> alloy_sol_types::private::Cow<'static, str> { alloy_sol_types::private::Cow::Borrowed( - "Order(address market,uint256 chainId,string rfqId,uint256 nonce,address trader,address effectiveTrader,uint256 quoteExpiry,address recipient,uint256 minFillAmount,BaseTokenData baseTokenData,QuoteTokenData quoteTokenData)", + "Order(address market,uint256 chainId,string rfqId,uint256 nonce,address \ + trader,address effectiveTrader,uint256 quoteExpiry,address recipient,uint256 \ + minFillAmount,BaseTokenData baseTokenData,QuoteTokenData quoteTokenData)", ) } + #[inline] - fn eip712_components() -> alloy_sol_types::private::Vec< - alloy_sol_types::private::Cow<'static, str>, - > { + fn eip712_components() + -> alloy_sol_types::private::Vec> + { let mut components = alloy_sol_types::private::Vec::with_capacity(2); + components.push(::eip712_root_type()); components - .push( - ::eip712_root_type(), - ); + .extend(::eip712_components()); + components.push(::eip712_root_type()); components - .extend( - ::eip712_components(), - ); - components - .push( - ::eip712_root_type(), - ); - components - .extend( - ::eip712_components(), - ); + .extend(::eip712_components()); components } + #[inline] fn eip712_encode_data(&self) -> alloy_sol_types::private::Vec { [ @@ -1292,14 +1241,13 @@ struct Order { address market; uint256 chainId; string rfqId; uint256 nonce; add &rust.quoteTokenData, ) } + #[inline] fn encode_topic_preimage( rust: &Self::RustType, out: &mut alloy_sol_types::private::Vec, ) { - out.reserve( - ::topic_preimage_length(rust), - ); + out.reserve(::topic_preimage_length(rust)); ::encode_topic_preimage( &rust.market, out, @@ -1353,25 +1301,19 @@ struct Order { address market; uint256 chainId; string rfqId; uint256 nonce; add out, ); } + #[inline] - fn encode_topic( - rust: &Self::RustType, - ) -> alloy_sol_types::abi::token::WordToken { + 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), - ) + ::encode_topic_preimage(rust, &mut out); + alloy_sol_types::abi::token::WordToken(alloy_sol_types::private::keccak256(out)) } } }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**```solidity -struct QuoteTokenData { address addr; uint256 amount; uint256 toTrader; uint256 toWithdraw; uint256 toBorrow; } -```*/ + struct QuoteTokenData { address addr; uint256 amount; uint256 toTrader; uint256 toWithdraw; uint256 toBorrow; } + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct QuoteTokenData { @@ -1393,7 +1335,7 @@ struct QuoteTokenData { address addr; uint256 amount; uint256 toTrader; uint256 clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[doc(hidden)] #[allow(dead_code)] type UnderlyingSolTuple<'a> = ( @@ -1413,9 +1355,7 @@ struct QuoteTokenData { address addr; uint256 amount; uint256 toTrader; uint256 ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1460,105 +1400,103 @@ struct QuoteTokenData { address addr; uint256 amount; uint256 toTrader; uint256 ::tokenize( &self.addr, ), - as alloy_sol_types::SolType>::tokenize(&self.amount), - as alloy_sol_types::SolType>::tokenize(&self.toTrader), - as alloy_sol_types::SolType>::tokenize(&self.toWithdraw), - as alloy_sol_types::SolType>::tokenize(&self.toBorrow), + as alloy_sol_types::SolType>::tokenize( + &self.amount, + ), + as alloy_sol_types::SolType>::tokenize( + &self.toTrader, + ), + as alloy_sol_types::SolType>::tokenize( + &self.toWithdraw, + ), + as alloy_sol_types::SolType>::tokenize( + &self.toBorrow, + ), ) } + #[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) + 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) + 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) + 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 QuoteTokenData { type RustType = Self; - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + + const ENCODED_SIZE: Option = + as alloy_sol_types::SolType>::ENCODED_SIZE; + const PACKED_ENCODED_SIZE: Option = + as alloy_sol_types::SolType>::PACKED_ENCODED_SIZE; 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); + let tuple = as alloy_sol_types::SolType>::detokenize(token); >>::from(tuple) } } #[automatically_derived] impl alloy_sol_types::SolStruct for QuoteTokenData { const NAME: &'static str = "QuoteTokenData"; + #[inline] fn eip712_root_type() -> alloy_sol_types::private::Cow<'static, str> { alloy_sol_types::private::Cow::Borrowed( - "QuoteTokenData(address addr,uint256 amount,uint256 toTrader,uint256 toWithdraw,uint256 toBorrow)", + "QuoteTokenData(address addr,uint256 amount,uint256 toTrader,uint256 \ + toWithdraw,uint256 toBorrow)", ) } + #[inline] - fn eip712_components() -> alloy_sol_types::private::Vec< - alloy_sol_types::private::Cow<'static, str>, - > { + fn eip712_components() + -> alloy_sol_types::private::Vec> + { 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 { [ @@ -1615,14 +1553,13 @@ struct QuoteTokenData { address addr; uint256 amount; uint256 toTrader; uint256 &rust.toBorrow, ) } + #[inline] fn encode_topic_preimage( rust: &Self::RustType, out: &mut alloy_sol_types::private::Vec, ) { - out.reserve( - ::topic_preimage_length(rust), - ); + out.reserve(::topic_preimage_length(rust)); ::encode_topic_preimage( &rust.addr, out, @@ -1652,25 +1589,19 @@ struct QuoteTokenData { address addr; uint256 amount; uint256 toTrader; uint256 out, ); } + #[inline] - fn encode_topic( - rust: &Self::RustType, - ) -> alloy_sol_types::abi::token::WordToken { + 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), - ) + ::encode_topic_preimage(rust, &mut out); + alloy_sol_types::abi::token::WordToken(alloy_sol_types::private::keccak256(out)) } } }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**```solidity -struct Single { string rfqId; uint256 nonce; address trader; address effectiveTrader; address baseToken; address quoteToken; uint256 baseTokenAmount; uint256 quoteTokenAmount; uint256 minFillAmount; uint256 quoteExpiry; address recipient; } -```*/ + struct Single { string rfqId; uint256 nonce; address trader; address effectiveTrader; address baseToken; address quoteToken; uint256 baseTokenAmount; uint256 quoteTokenAmount; uint256 minFillAmount; uint256 quoteExpiry; address recipient; } + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct Single { @@ -1704,7 +1635,7 @@ struct Single { string rfqId; uint256 nonce; address trader; address effectiveTr clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[doc(hidden)] #[allow(dead_code)] type UnderlyingSolTuple<'a> = ( @@ -1736,9 +1667,7 @@ struct Single { string rfqId; uint256 nonce; address trader; address effectiveTr ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1795,9 +1724,9 @@ struct Single { string rfqId; uint256 nonce; address trader; address effectiveTr ::tokenize( &self.rfqId, ), - as alloy_sol_types::SolType>::tokenize(&self.nonce), + as alloy_sol_types::SolType>::tokenize( + &self.nonce, + ), ::tokenize( &self.trader, ), @@ -1810,108 +1739,108 @@ struct Single { string rfqId; uint256 nonce; address trader; address effectiveTr ::tokenize( &self.quoteToken, ), - as alloy_sol_types::SolType>::tokenize(&self.baseTokenAmount), - as alloy_sol_types::SolType>::tokenize(&self.quoteTokenAmount), - as alloy_sol_types::SolType>::tokenize(&self.minFillAmount), - as alloy_sol_types::SolType>::tokenize(&self.quoteExpiry), + as alloy_sol_types::SolType>::tokenize( + &self.baseTokenAmount, + ), + as alloy_sol_types::SolType>::tokenize( + &self.quoteTokenAmount, + ), + as alloy_sol_types::SolType>::tokenize( + &self.minFillAmount, + ), + as alloy_sol_types::SolType>::tokenize( + &self.quoteExpiry, + ), ::tokenize( &self.recipient, ), ) } + #[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) + 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) + 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) + 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 Single { type RustType = Self; - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + + const ENCODED_SIZE: Option = + as alloy_sol_types::SolType>::ENCODED_SIZE; + const PACKED_ENCODED_SIZE: Option = + as alloy_sol_types::SolType>::PACKED_ENCODED_SIZE; 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); + let tuple = as alloy_sol_types::SolType>::detokenize(token); >>::from(tuple) } } #[automatically_derived] impl alloy_sol_types::SolStruct for Single { const NAME: &'static str = "Single"; + #[inline] fn eip712_root_type() -> alloy_sol_types::private::Cow<'static, str> { alloy_sol_types::private::Cow::Borrowed( - "Single(string rfqId,uint256 nonce,address trader,address effectiveTrader,address baseToken,address quoteToken,uint256 baseTokenAmount,uint256 quoteTokenAmount,uint256 minFillAmount,uint256 quoteExpiry,address recipient)", + "Single(string rfqId,uint256 nonce,address trader,address \ + effectiveTrader,address baseToken,address quoteToken,uint256 \ + baseTokenAmount,uint256 quoteTokenAmount,uint256 minFillAmount,uint256 \ + quoteExpiry,address recipient)", ) } + #[inline] - fn eip712_components() -> alloy_sol_types::private::Vec< - alloy_sol_types::private::Cow<'static, str>, - > { + fn eip712_components() + -> alloy_sol_types::private::Vec> + { 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 { [ @@ -2014,14 +1943,13 @@ struct Single { string rfqId; uint256 nonce; address trader; address effectiveTr &rust.recipient, ) } + #[inline] fn encode_topic_preimage( rust: &Self::RustType, out: &mut alloy_sol_types::private::Vec, ) { - out.reserve( - ::topic_preimage_length(rust), - ); + out.reserve(::topic_preimage_length(rust)); ::encode_topic_preimage( &rust.rfqId, out, @@ -2077,25 +2005,19 @@ struct Single { string rfqId; uint256 nonce; address trader; address effectiveTr out, ); } + #[inline] - fn encode_topic( - rust: &Self::RustType, - ) -> alloy_sol_types::abi::token::WordToken { + 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), - ) + ::encode_topic_preimage(rust, &mut out); + alloy_sol_types::abi::token::WordToken(alloy_sol_types::private::keccak256(out)) } } }; - use alloy_contract as alloy_contract; + use alloy_contract; /**Creates a new wrapper around an on-chain [`ILiquoriceSettlement`](self) contract instance. -See the [wrapper's documentation](`ILiquoriceSettlementInstance`) for more details.*/ + See the [wrapper's documentation](`ILiquoriceSettlementInstance`) for more details.*/ #[inline] pub const fn new< P: alloy_contract::private::Provider, @@ -2108,15 +2030,15 @@ See the [wrapper's documentation](`ILiquoriceSettlementInstance`) for more detai } /**A [`ILiquoriceSettlement`](self) instance. -Contains type-safe methods for interacting with an on-chain instance of the -[`ILiquoriceSettlement`](self) contract located at a given `address`, using a given -provider `P`. + Contains type-safe methods for interacting with an on-chain instance of the + [`ILiquoriceSettlement`](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. + 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.*/ + See the [module-level documentation](self) for all the available methods.*/ #[derive(Clone)] pub struct ILiquoriceSettlementInstance { address: alloy_sol_types::private::Address, @@ -2127,43 +2049,45 @@ See the [module-level documentation](self) for all the available methods.*/ impl ::core::fmt::Debug for ILiquoriceSettlementInstance { #[inline] fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { - f.debug_tuple("ILiquoriceSettlementInstance").field(&self.address).finish() + f.debug_tuple("ILiquoriceSettlementInstance") + .field(&self.address) + .finish() } } /// Instantiation and getters/setters. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > ILiquoriceSettlementInstance { + impl, N: alloy_contract::private::Network> + ILiquoriceSettlementInstance + { /**Creates a new wrapper around an on-chain [`ILiquoriceSettlement`](self) contract instance. -See the [wrapper's documentation](`ILiquoriceSettlementInstance`) for more details.*/ + See the [wrapper's documentation](`ILiquoriceSettlementInstance`) for more details.*/ #[inline] - pub const fn new( - address: alloy_sol_types::private::Address, - __provider: P, - ) -> Self { + pub const fn new(address: alloy_sol_types::private::Address, __provider: P) -> Self { Self { address, provider: __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 { @@ -2171,7 +2095,8 @@ See the [wrapper's documentation](`ILiquoriceSettlementInstance`) for more detai } } impl ILiquoriceSettlementInstance<&P, N> { - /// Clones the provider and returns a new instance with the cloned provider. + /// Clones the provider and returns a new instance with the cloned + /// provider. #[inline] pub fn with_cloned_provider(self) -> ILiquoriceSettlementInstance { ILiquoriceSettlementInstance { @@ -2182,14 +2107,15 @@ See the [wrapper's documentation](`ILiquoriceSettlementInstance`) for more detai } } /// Function calls. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > ILiquoriceSettlementInstance { - /// Creates a new call builder using this contract instance's provider and address. + impl, N: alloy_contract::private::Network> + ILiquoriceSettlementInstance + { + /// 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. + /// 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, @@ -2198,14 +2124,15 @@ See the [wrapper's documentation](`ILiquoriceSettlementInstance`) for more detai } } /// Event filters. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > ILiquoriceSettlementInstance { - /// Creates a new event filter using this contract instance's provider and address. + impl, N: alloy_contract::private::Network> + ILiquoriceSettlementInstance + { + /// 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. + /// 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> { @@ -2231,68 +2158,67 @@ library Signature { clippy::empty_structs_with_brackets )] pub mod Signature { - use super::*; - use alloy_sol_types as alloy_sol_types; + use {super::*, alloy_sol_types}; #[derive(Default, Debug, PartialEq, Eq, Hash)] #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct TransferCommand(u8); const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[automatically_derived] impl alloy_sol_types::private::SolTypeValue for u8 { #[inline] fn stv_to_tokens( &self, - ) -> as alloy_sol_types::SolType>::Token<'_> { + ) -> as alloy_sol_types::SolType>::Token<'_> + { alloy_sol_types::private::SolTypeValue::< alloy_sol_types::sol_data::Uint<8>, >::stv_to_tokens(self) } + #[inline] fn stv_eip712_data_word(&self) -> alloy_sol_types::Word { - as alloy_sol_types::SolType>::tokenize(self) - .0 + as alloy_sol_types::SolType>::tokenize(self).0 } + #[inline] - fn stv_abi_encode_packed_to( - &self, - out: &mut alloy_sol_types::private::Vec, - ) { + fn stv_abi_encode_packed_to(&self, out: &mut alloy_sol_types::private::Vec) { as alloy_sol_types::SolType>::abi_encode_packed_to(self, out) } + #[inline] fn stv_abi_packed_encoded_size(&self) -> usize { - as alloy_sol_types::SolType>::abi_encoded_size(self) + as alloy_sol_types::SolType>::abi_encoded_size( + self, + ) } } impl TransferCommand { /// The Solidity type name. pub const NAME: &'static str = stringify!(@ name); + /// Convert from the underlying value type. #[inline] pub const fn from_underlying(value: u8) -> Self { Self(value) } + /// Return the underlying value. #[inline] pub const fn into_underlying(self) -> u8 { self.0 } + /// Return the single encoding of this value, delegating to the /// underlying type. #[inline] pub fn abi_encode(&self) -> alloy_sol_types::private::Vec { ::abi_encode(&self.0) } + /// Return the packed encoding of this value, delegating to the /// underlying type. #[inline] @@ -2315,31 +2241,29 @@ pub mod Signature { #[automatically_derived] impl alloy_sol_types::SolType for TransferCommand { type RustType = u8; - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SOL_NAME: &'static str = Self::NAME; - const ENCODED_SIZE: Option = as alloy_sol_types::SolType>::ENCODED_SIZE; + type Token<'a> = + as alloy_sol_types::SolType>::Token<'a>; + + const ENCODED_SIZE: Option = + as alloy_sol_types::SolType>::ENCODED_SIZE; const PACKED_ENCODED_SIZE: Option = as alloy_sol_types::SolType>::PACKED_ENCODED_SIZE; + const SOL_NAME: &'static str = Self::NAME; + #[inline] fn valid_token(token: &Self::Token<'_>) -> bool { Self::type_check(token).is_ok() } + #[inline] fn type_check(token: &Self::Token<'_>) -> alloy_sol_types::Result<()> { - as alloy_sol_types::SolType>::type_check(token) + as alloy_sol_types::SolType>::type_check(token) } + #[inline] fn detokenize(token: Self::Token<'_>) -> Self::RustType { - as alloy_sol_types::SolType>::detokenize(token) + as alloy_sol_types::SolType>::detokenize(token) } } #[automatically_derived] @@ -2350,6 +2274,7 @@ pub mod Signature { 8, > as alloy_sol_types::EventTopic>::topic_preimage_length(rust) } + #[inline] fn encode_topic_preimage( rust: &Self::RustType, @@ -2359,13 +2284,12 @@ pub mod Signature { 8, > as alloy_sol_types::EventTopic>::encode_topic_preimage(rust, out) } + #[inline] - fn encode_topic( - rust: &Self::RustType, - ) -> alloy_sol_types::abi::token::WordToken { - as alloy_sol_types::EventTopic>::encode_topic(rust) + fn encode_topic(rust: &Self::RustType) -> alloy_sol_types::abi::token::WordToken { + as alloy_sol_types::EventTopic>::encode_topic( + rust, + ) } } }; @@ -2374,61 +2298,61 @@ pub mod Signature { #[derive(Clone)] pub struct Type(u8); const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[automatically_derived] impl alloy_sol_types::private::SolTypeValue for u8 { #[inline] fn stv_to_tokens( &self, - ) -> as alloy_sol_types::SolType>::Token<'_> { + ) -> as alloy_sol_types::SolType>::Token<'_> + { alloy_sol_types::private::SolTypeValue::< alloy_sol_types::sol_data::Uint<8>, >::stv_to_tokens(self) } + #[inline] fn stv_eip712_data_word(&self) -> alloy_sol_types::Word { - as alloy_sol_types::SolType>::tokenize(self) - .0 + as alloy_sol_types::SolType>::tokenize(self).0 } + #[inline] - fn stv_abi_encode_packed_to( - &self, - out: &mut alloy_sol_types::private::Vec, - ) { + fn stv_abi_encode_packed_to(&self, out: &mut alloy_sol_types::private::Vec) { as alloy_sol_types::SolType>::abi_encode_packed_to(self, out) } + #[inline] fn stv_abi_packed_encoded_size(&self) -> usize { - as alloy_sol_types::SolType>::abi_encoded_size(self) + as alloy_sol_types::SolType>::abi_encoded_size( + self, + ) } } impl Type { /// The Solidity type name. pub const NAME: &'static str = stringify!(@ name); + /// Convert from the underlying value type. #[inline] pub const fn from_underlying(value: u8) -> Self { Self(value) } + /// Return the underlying value. #[inline] pub const fn into_underlying(self) -> u8 { self.0 } + /// Return the single encoding of this value, delegating to the /// underlying type. #[inline] pub fn abi_encode(&self) -> alloy_sol_types::private::Vec { ::abi_encode(&self.0) } + /// Return the packed encoding of this value, delegating to the /// underlying type. #[inline] @@ -2451,31 +2375,29 @@ pub mod Signature { #[automatically_derived] impl alloy_sol_types::SolType for Type { type RustType = u8; - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SOL_NAME: &'static str = Self::NAME; - const ENCODED_SIZE: Option = as alloy_sol_types::SolType>::ENCODED_SIZE; + type Token<'a> = + as alloy_sol_types::SolType>::Token<'a>; + + const ENCODED_SIZE: Option = + as alloy_sol_types::SolType>::ENCODED_SIZE; const PACKED_ENCODED_SIZE: Option = as alloy_sol_types::SolType>::PACKED_ENCODED_SIZE; + const SOL_NAME: &'static str = Self::NAME; + #[inline] fn valid_token(token: &Self::Token<'_>) -> bool { Self::type_check(token).is_ok() } + #[inline] fn type_check(token: &Self::Token<'_>) -> alloy_sol_types::Result<()> { - as alloy_sol_types::SolType>::type_check(token) + as alloy_sol_types::SolType>::type_check(token) } + #[inline] fn detokenize(token: Self::Token<'_>) -> Self::RustType { - as alloy_sol_types::SolType>::detokenize(token) + as alloy_sol_types::SolType>::detokenize(token) } } #[automatically_derived] @@ -2486,6 +2408,7 @@ pub mod Signature { 8, > as alloy_sol_types::EventTopic>::topic_preimage_length(rust) } + #[inline] fn encode_topic_preimage( rust: &Self::RustType, @@ -2495,20 +2418,19 @@ pub mod Signature { 8, > as alloy_sol_types::EventTopic>::encode_topic_preimage(rust, out) } + #[inline] - fn encode_topic( - rust: &Self::RustType, - ) -> alloy_sol_types::abi::token::WordToken { - as alloy_sol_types::EventTopic>::encode_topic(rust) + fn encode_topic(rust: &Self::RustType) -> alloy_sol_types::abi::token::WordToken { + as alloy_sol_types::EventTopic>::encode_topic( + rust, + ) } } }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**```solidity -struct TypedSignature { Type signatureType; TransferCommand transferCommand; bytes signatureBytes; } -```*/ + struct TypedSignature { Type signatureType; TransferCommand transferCommand; bytes signatureBytes; } + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct TypedSignature { @@ -2526,14 +2448,10 @@ struct TypedSignature { Type signatureType; TransferCommand transferCommand; byt clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[doc(hidden)] #[allow(dead_code)] - type UnderlyingSolTuple<'a> = ( - Type, - TransferCommand, - alloy_sol_types::sol_data::Bytes, - ); + type UnderlyingSolTuple<'a> = (Type, TransferCommand, alloy_sol_types::sol_data::Bytes); #[doc(hidden)] type UnderlyingRustTuple<'a> = ( ::RustType, @@ -2542,9 +2460,7 @@ struct TypedSignature { Type signatureType; TransferCommand transferCommand; byt ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -2555,7 +2471,11 @@ struct TypedSignature { Type signatureType; TransferCommand transferCommand; byt #[doc(hidden)] impl ::core::convert::From for UnderlyingRustTuple<'_> { fn from(value: TypedSignature) -> Self { - (value.signatureType, value.transferCommand, value.signatureBytes) + ( + value.signatureType, + value.transferCommand, + value.signatureBytes, + ) } } #[automatically_derived] @@ -2579,99 +2499,95 @@ struct TypedSignature { Type signatureType; TransferCommand transferCommand; byt fn stv_to_tokens(&self) -> ::Token<'_> { ( ::tokenize(&self.signatureType), - ::tokenize( - &self.transferCommand, - ), + ::tokenize(&self.transferCommand), ::tokenize( &self.signatureBytes, ), ) } + #[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) + 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) + 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) + 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 TypedSignature { type RustType = Self; - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + + const ENCODED_SIZE: Option = + as alloy_sol_types::SolType>::ENCODED_SIZE; + const PACKED_ENCODED_SIZE: Option = + as alloy_sol_types::SolType>::PACKED_ENCODED_SIZE; 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); + let tuple = as alloy_sol_types::SolType>::detokenize(token); >>::from(tuple) } } #[automatically_derived] impl alloy_sol_types::SolStruct for TypedSignature { const NAME: &'static str = "TypedSignature"; + #[inline] fn eip712_root_type() -> alloy_sol_types::private::Cow<'static, str> { alloy_sol_types::private::Cow::Borrowed( - "TypedSignature(uint8 signatureType,uint8 transferCommand,bytes signatureBytes)", + "TypedSignature(uint8 signatureType,uint8 transferCommand,bytes \ + signatureBytes)", ) } + #[inline] - fn eip712_components() -> alloy_sol_types::private::Vec< - alloy_sol_types::private::Cow<'static, str>, - > { + fn eip712_components() + -> alloy_sol_types::private::Vec> + { 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 { [ @@ -2706,14 +2622,13 @@ struct TypedSignature { Type signatureType; TransferCommand transferCommand; byt &rust.signatureBytes, ) } + #[inline] fn encode_topic_preimage( rust: &Self::RustType, out: &mut alloy_sol_types::private::Vec, ) { - out.reserve( - ::topic_preimage_length(rust), - ); + out.reserve(::topic_preimage_length(rust)); ::encode_topic_preimage( &rust.signatureType, out, @@ -2727,25 +2642,19 @@ struct TypedSignature { Type signatureType; TransferCommand transferCommand; byt out, ); } + #[inline] - fn encode_topic( - rust: &Self::RustType, - ) -> alloy_sol_types::abi::token::WordToken { + 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), - ) + ::encode_topic_preimage(rust, &mut out); + alloy_sol_types::abi::token::WordToken(alloy_sol_types::private::keccak256(out)) } } }; - use alloy_contract as alloy_contract; + use alloy_contract; /**Creates a new wrapper around an on-chain [`Signature`](self) contract instance. -See the [wrapper's documentation](`SignatureInstance`) for more details.*/ + See the [wrapper's documentation](`SignatureInstance`) for more details.*/ #[inline] pub const fn new< P: alloy_contract::private::Provider, @@ -2758,15 +2667,15 @@ See the [wrapper's documentation](`SignatureInstance`) for more details.*/ } /**A [`Signature`](self) instance. -Contains type-safe methods for interacting with an on-chain instance of the -[`Signature`](self) contract located at a given `address`, using a given -provider `P`. + Contains type-safe methods for interacting with an on-chain instance of the + [`Signature`](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. + 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.*/ + See the [module-level documentation](self) for all the available methods.*/ #[derive(Clone)] pub struct SignatureInstance { address: alloy_sol_types::private::Address, @@ -2777,43 +2686,45 @@ See the [module-level documentation](self) for all the available methods.*/ impl ::core::fmt::Debug for SignatureInstance { #[inline] fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { - f.debug_tuple("SignatureInstance").field(&self.address).finish() + f.debug_tuple("SignatureInstance") + .field(&self.address) + .finish() } } /// Instantiation and getters/setters. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > SignatureInstance { + impl, N: alloy_contract::private::Network> + SignatureInstance + { /**Creates a new wrapper around an on-chain [`Signature`](self) contract instance. -See the [wrapper's documentation](`SignatureInstance`) for more details.*/ + See the [wrapper's documentation](`SignatureInstance`) for more details.*/ #[inline] - pub const fn new( - address: alloy_sol_types::private::Address, - __provider: P, - ) -> Self { + pub const fn new(address: alloy_sol_types::private::Address, __provider: P) -> Self { Self { address, provider: __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 { @@ -2821,7 +2732,8 @@ See the [wrapper's documentation](`SignatureInstance`) for more details.*/ } } impl SignatureInstance<&P, N> { - /// Clones the provider and returns a new instance with the cloned provider. + /// Clones the provider and returns a new instance with the cloned + /// provider. #[inline] pub fn with_cloned_provider(self) -> SignatureInstance { SignatureInstance { @@ -2832,14 +2744,15 @@ See the [wrapper's documentation](`SignatureInstance`) for more details.*/ } } /// Function calls. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > SignatureInstance { - /// Creates a new call builder using this contract instance's provider and address. + impl, N: alloy_contract::private::Network> + SignatureInstance + { + /// 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. + /// 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, @@ -2848,14 +2761,15 @@ See the [wrapper's documentation](`SignatureInstance`) for more details.*/ } } /// Event filters. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > SignatureInstance { - /// Creates a new event filter using this contract instance's provider and address. + impl, N: alloy_contract::private::Network> + SignatureInstance + { + /// 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. + /// 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> { @@ -3787,8 +3701,7 @@ interface LiquoriceSettlement { clippy::empty_structs_with_brackets )] pub mod LiquoriceSettlement { - use super::*; - use alloy_sol_types as alloy_sol_types; + use {super::*, alloy_sol_types}; /// The creation / init bytecode of the contract. /// /// ```text @@ -3811,9 +3724,9 @@ pub mod LiquoriceSettlement { ); #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Custom error with signature `ECDSAInvalidSignature()` and selector `0xf645eedf`. -```solidity -error ECDSAInvalidSignature(); -```*/ + ```solidity + error ECDSAInvalidSignature(); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct ECDSAInvalidSignature; @@ -3824,7 +3737,7 @@ error ECDSAInvalidSignature(); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[doc(hidden)] #[allow(dead_code)] type UnderlyingSolTuple<'a> = (); @@ -3832,9 +3745,7 @@ error ECDSAInvalidSignature(); type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -3858,35 +3769,37 @@ error ECDSAInvalidSignature(); #[automatically_derived] impl alloy_sol_types::SolError for ECDSAInvalidSignature { type Parameters<'a> = UnderlyingSolTuple<'a>; - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "ECDSAInvalidSignature()"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [246u8, 69u8, 238u8, 223u8]; + const SIGNATURE: &'static str = "ECDSAInvalidSignature()"; + #[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) + as alloy_sol_types::SolType>::abi_decode_sequence_validate( + data, + ) + .map(Self::new) } } }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Custom error with signature `ECDSAInvalidSignatureLength(uint256)` and selector `0xfce698f7`. -```solidity -error ECDSAInvalidSignatureLength(uint256 length); -```*/ + ```solidity + error ECDSAInvalidSignatureLength(uint256 length); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct ECDSAInvalidSignatureLength { @@ -3900,19 +3813,15 @@ error ECDSAInvalidSignatureLength(uint256 length); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[doc(hidden)] #[allow(dead_code)] type UnderlyingSolTuple<'a> = (alloy_sol_types::sol_data::Uint<256>,); #[doc(hidden)] - type UnderlyingRustTuple<'a> = ( - alloy_sol_types::private::primitives::aliases::U256, - ); + 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, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -3921,16 +3830,14 @@ error ECDSAInvalidSignatureLength(uint256 length); } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From - for UnderlyingRustTuple<'_> { + impl ::core::convert::From for UnderlyingRustTuple<'_> { fn from(value: ECDSAInvalidSignatureLength) -> Self { (value.length,) } } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From> - for ECDSAInvalidSignatureLength { + impl ::core::convert::From> for ECDSAInvalidSignatureLength { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { Self { length: tuple.0 } } @@ -3938,39 +3845,41 @@ error ECDSAInvalidSignatureLength(uint256 length); #[automatically_derived] impl alloy_sol_types::SolError for ECDSAInvalidSignatureLength { type Parameters<'a> = UnderlyingSolTuple<'a>; - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "ECDSAInvalidSignatureLength(uint256)"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [252u8, 230u8, 152u8, 247u8]; + const SIGNATURE: &'static str = "ECDSAInvalidSignatureLength(uint256)"; + #[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.length), + as alloy_sol_types::SolType>::tokenize( + &self.length, + ), ) } + #[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) + as alloy_sol_types::SolType>::abi_decode_sequence_validate( + data, + ) + .map(Self::new) } } }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Custom error with signature `ECDSAInvalidSignatureS(bytes32)` and selector `0xd78bce0c`. -```solidity -error ECDSAInvalidSignatureS(bytes32 s); -```*/ + ```solidity + error ECDSAInvalidSignatureS(bytes32 s); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct ECDSAInvalidSignatureS { @@ -3984,7 +3893,7 @@ error ECDSAInvalidSignatureS(bytes32 s); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[doc(hidden)] #[allow(dead_code)] type UnderlyingSolTuple<'a> = (alloy_sol_types::sol_data::FixedBytes<32>,); @@ -3992,9 +3901,7 @@ error ECDSAInvalidSignatureS(bytes32 s); 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, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -4018,17 +3925,18 @@ error ECDSAInvalidSignatureS(bytes32 s); #[automatically_derived] impl alloy_sol_types::SolError for ECDSAInvalidSignatureS { type Parameters<'a> = UnderlyingSolTuple<'a>; - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "ECDSAInvalidSignatureS(bytes32)"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [215u8, 139u8, 206u8, 12u8]; + const SIGNATURE: &'static str = "ECDSAInvalidSignatureS(bytes32)"; + #[inline] fn new<'a>( tuple: as alloy_sol_types::SolType>::RustType, ) -> Self { tuple.into() } + #[inline] fn tokenize(&self) -> Self::Token<'_> { ( @@ -4037,20 +3945,21 @@ error ECDSAInvalidSignatureS(bytes32 s); > as alloy_sol_types::SolType>::tokenize(&self.s), ) } + #[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) + as alloy_sol_types::SolType>::abi_decode_sequence_validate( + data, + ) + .map(Self::new) } } }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Custom error with signature `InvalidAmount()` and selector `0x2c5211c6`. -```solidity -error InvalidAmount(); -```*/ + ```solidity + error InvalidAmount(); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct InvalidAmount; @@ -4061,7 +3970,7 @@ error InvalidAmount(); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[doc(hidden)] #[allow(dead_code)] type UnderlyingSolTuple<'a> = (); @@ -4069,9 +3978,7 @@ error InvalidAmount(); type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -4095,35 +4002,37 @@ error InvalidAmount(); #[automatically_derived] impl alloy_sol_types::SolError for InvalidAmount { type Parameters<'a> = UnderlyingSolTuple<'a>; - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "InvalidAmount()"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [44u8, 82u8, 17u8, 198u8]; + const SIGNATURE: &'static str = "InvalidAmount()"; + #[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) + as alloy_sol_types::SolType>::abi_decode_sequence_validate( + data, + ) + .map(Self::new) } } }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Custom error with signature `InvalidAsset()` and selector `0xc891add2`. -```solidity -error InvalidAsset(); -```*/ + ```solidity + error InvalidAsset(); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct InvalidAsset; @@ -4134,7 +4043,7 @@ error InvalidAsset(); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[doc(hidden)] #[allow(dead_code)] type UnderlyingSolTuple<'a> = (); @@ -4142,9 +4051,7 @@ error InvalidAsset(); type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -4168,35 +4075,37 @@ error InvalidAsset(); #[automatically_derived] impl alloy_sol_types::SolError for InvalidAsset { type Parameters<'a> = UnderlyingSolTuple<'a>; - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "InvalidAsset()"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [200u8, 145u8, 173u8, 210u8]; + const SIGNATURE: &'static str = "InvalidAsset()"; + #[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) + as alloy_sol_types::SolType>::abi_decode_sequence_validate( + data, + ) + .map(Self::new) } } }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Custom error with signature `InvalidBaseTokenAmounts()` and selector `0xc04377d3`. -```solidity -error InvalidBaseTokenAmounts(); -```*/ + ```solidity + error InvalidBaseTokenAmounts(); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct InvalidBaseTokenAmounts; @@ -4207,7 +4116,7 @@ error InvalidBaseTokenAmounts(); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[doc(hidden)] #[allow(dead_code)] type UnderlyingSolTuple<'a> = (); @@ -4215,9 +4124,7 @@ error InvalidBaseTokenAmounts(); type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -4241,35 +4148,37 @@ error InvalidBaseTokenAmounts(); #[automatically_derived] impl alloy_sol_types::SolError for InvalidBaseTokenAmounts { type Parameters<'a> = UnderlyingSolTuple<'a>; - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "InvalidBaseTokenAmounts()"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [192u8, 67u8, 119u8, 211u8]; + const SIGNATURE: &'static str = "InvalidBaseTokenAmounts()"; + #[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) + as alloy_sol_types::SolType>::abi_decode_sequence_validate( + data, + ) + .map(Self::new) } } }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Custom error with signature `InvalidDestination()` and selector `0xac6b05f5`. -```solidity -error InvalidDestination(); -```*/ + ```solidity + error InvalidDestination(); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct InvalidDestination; @@ -4280,7 +4189,7 @@ error InvalidDestination(); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[doc(hidden)] #[allow(dead_code)] type UnderlyingSolTuple<'a> = (); @@ -4288,9 +4197,7 @@ error InvalidDestination(); type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -4314,35 +4221,37 @@ error InvalidDestination(); #[automatically_derived] impl alloy_sol_types::SolError for InvalidDestination { type Parameters<'a> = UnderlyingSolTuple<'a>; - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "InvalidDestination()"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [172u8, 107u8, 5u8, 245u8]; + const SIGNATURE: &'static str = "InvalidDestination()"; + #[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) + as alloy_sol_types::SolType>::abi_decode_sequence_validate( + data, + ) + .map(Self::new) } } }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Custom error with signature `InvalidEIP1271Signature()` and selector `0x5d52cbe3`. -```solidity -error InvalidEIP1271Signature(); -```*/ + ```solidity + error InvalidEIP1271Signature(); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct InvalidEIP1271Signature; @@ -4353,7 +4262,7 @@ error InvalidEIP1271Signature(); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[doc(hidden)] #[allow(dead_code)] type UnderlyingSolTuple<'a> = (); @@ -4361,9 +4270,7 @@ error InvalidEIP1271Signature(); type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -4387,35 +4294,37 @@ error InvalidEIP1271Signature(); #[automatically_derived] impl alloy_sol_types::SolError for InvalidEIP1271Signature { type Parameters<'a> = UnderlyingSolTuple<'a>; - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "InvalidEIP1271Signature()"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [93u8, 82u8, 203u8, 227u8]; + const SIGNATURE: &'static str = "InvalidEIP1271Signature()"; + #[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) + as alloy_sol_types::SolType>::abi_decode_sequence_validate( + data, + ) + .map(Self::new) } } }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Custom error with signature `InvalidEIP712Signature()` and selector `0xb81d58e7`. -```solidity -error InvalidEIP712Signature(); -```*/ + ```solidity + error InvalidEIP712Signature(); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct InvalidEIP712Signature; @@ -4426,7 +4335,7 @@ error InvalidEIP712Signature(); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[doc(hidden)] #[allow(dead_code)] type UnderlyingSolTuple<'a> = (); @@ -4434,9 +4343,7 @@ error InvalidEIP712Signature(); type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -4460,35 +4367,37 @@ error InvalidEIP712Signature(); #[automatically_derived] impl alloy_sol_types::SolError for InvalidEIP712Signature { type Parameters<'a> = UnderlyingSolTuple<'a>; - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "InvalidEIP712Signature()"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [184u8, 29u8, 88u8, 231u8]; + const SIGNATURE: &'static str = "InvalidEIP712Signature()"; + #[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) + as alloy_sol_types::SolType>::abi_decode_sequence_validate( + data, + ) + .map(Self::new) } } }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Custom error with signature `InvalidETHSignSignature()` and selector `0x644ae6c3`. -```solidity -error InvalidETHSignSignature(); -```*/ + ```solidity + error InvalidETHSignSignature(); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct InvalidETHSignSignature; @@ -4499,7 +4408,7 @@ error InvalidETHSignSignature(); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[doc(hidden)] #[allow(dead_code)] type UnderlyingSolTuple<'a> = (); @@ -4507,9 +4416,7 @@ error InvalidETHSignSignature(); type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -4533,35 +4440,37 @@ error InvalidETHSignSignature(); #[automatically_derived] impl alloy_sol_types::SolError for InvalidETHSignSignature { type Parameters<'a> = UnderlyingSolTuple<'a>; - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "InvalidETHSignSignature()"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [100u8, 74u8, 230u8, 195u8]; + const SIGNATURE: &'static str = "InvalidETHSignSignature()"; + #[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) + as alloy_sol_types::SolType>::abi_decode_sequence_validate( + data, + ) + .map(Self::new) } } }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Custom error with signature `InvalidFillAmount()` and selector `0x94697444`. -```solidity -error InvalidFillAmount(); -```*/ + ```solidity + error InvalidFillAmount(); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct InvalidFillAmount; @@ -4572,7 +4481,7 @@ error InvalidFillAmount(); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[doc(hidden)] #[allow(dead_code)] type UnderlyingSolTuple<'a> = (); @@ -4580,9 +4489,7 @@ error InvalidFillAmount(); type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -4606,35 +4513,37 @@ error InvalidFillAmount(); #[automatically_derived] impl alloy_sol_types::SolError for InvalidFillAmount { type Parameters<'a> = UnderlyingSolTuple<'a>; - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "InvalidFillAmount()"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [148u8, 105u8, 116u8, 68u8]; + const SIGNATURE: &'static str = "InvalidFillAmount()"; + #[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) + as alloy_sol_types::SolType>::abi_decode_sequence_validate( + data, + ) + .map(Self::new) } } }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Custom error with signature `InvalidHooksTarget()` and selector `0xc99e8872`. -```solidity -error InvalidHooksTarget(); -```*/ + ```solidity + error InvalidHooksTarget(); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct InvalidHooksTarget; @@ -4645,7 +4554,7 @@ error InvalidHooksTarget(); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[doc(hidden)] #[allow(dead_code)] type UnderlyingSolTuple<'a> = (); @@ -4653,9 +4562,7 @@ error InvalidHooksTarget(); type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -4679,35 +4586,37 @@ error InvalidHooksTarget(); #[automatically_derived] impl alloy_sol_types::SolError for InvalidHooksTarget { type Parameters<'a> = UnderlyingSolTuple<'a>; - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "InvalidHooksTarget()"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [201u8, 158u8, 136u8, 114u8]; + const SIGNATURE: &'static str = "InvalidHooksTarget()"; + #[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) + as alloy_sol_types::SolType>::abi_decode_sequence_validate( + data, + ) + .map(Self::new) } } }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Custom error with signature `InvalidInteractionsBaseTokenAmounts()` and selector `0x4a55da20`. -```solidity -error InvalidInteractionsBaseTokenAmounts(); -```*/ + ```solidity + error InvalidInteractionsBaseTokenAmounts(); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct InvalidInteractionsBaseTokenAmounts; @@ -4718,7 +4627,7 @@ error InvalidInteractionsBaseTokenAmounts(); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[doc(hidden)] #[allow(dead_code)] type UnderlyingSolTuple<'a> = (); @@ -4726,9 +4635,7 @@ error InvalidInteractionsBaseTokenAmounts(); type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -4737,16 +4644,14 @@ error InvalidInteractionsBaseTokenAmounts(); } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From - for UnderlyingRustTuple<'_> { + impl ::core::convert::From for UnderlyingRustTuple<'_> { fn from(value: InvalidInteractionsBaseTokenAmounts) -> Self { () } } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From> - for InvalidInteractionsBaseTokenAmounts { + impl ::core::convert::From> for InvalidInteractionsBaseTokenAmounts { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { Self } @@ -4754,35 +4659,37 @@ error InvalidInteractionsBaseTokenAmounts(); #[automatically_derived] impl alloy_sol_types::SolError for InvalidInteractionsBaseTokenAmounts { type Parameters<'a> = UnderlyingSolTuple<'a>; - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "InvalidInteractionsBaseTokenAmounts()"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [74u8, 85u8, 218u8, 32u8]; + const SIGNATURE: &'static str = "InvalidInteractionsBaseTokenAmounts()"; + #[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) + as alloy_sol_types::SolType>::abi_decode_sequence_validate( + data, + ) + .map(Self::new) } } }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Custom error with signature `InvalidInteractionsQuoteTokenAmounts()` and selector `0x77a59203`. -```solidity -error InvalidInteractionsQuoteTokenAmounts(); -```*/ + ```solidity + error InvalidInteractionsQuoteTokenAmounts(); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct InvalidInteractionsQuoteTokenAmounts; @@ -4793,7 +4700,7 @@ error InvalidInteractionsQuoteTokenAmounts(); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[doc(hidden)] #[allow(dead_code)] type UnderlyingSolTuple<'a> = (); @@ -4801,9 +4708,7 @@ error InvalidInteractionsQuoteTokenAmounts(); type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -4812,16 +4717,14 @@ error InvalidInteractionsQuoteTokenAmounts(); } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From - for UnderlyingRustTuple<'_> { + impl ::core::convert::From for UnderlyingRustTuple<'_> { fn from(value: InvalidInteractionsQuoteTokenAmounts) -> Self { () } } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From> - for InvalidInteractionsQuoteTokenAmounts { + impl ::core::convert::From> for InvalidInteractionsQuoteTokenAmounts { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { Self } @@ -4829,35 +4732,37 @@ error InvalidInteractionsQuoteTokenAmounts(); #[automatically_derived] impl alloy_sol_types::SolError for InvalidInteractionsQuoteTokenAmounts { type Parameters<'a> = UnderlyingSolTuple<'a>; - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "InvalidInteractionsQuoteTokenAmounts()"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [119u8, 165u8, 146u8, 3u8]; + const SIGNATURE: &'static str = "InvalidInteractionsQuoteTokenAmounts()"; + #[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) + as alloy_sol_types::SolType>::abi_decode_sequence_validate( + data, + ) + .map(Self::new) } } }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Custom error with signature `InvalidLendingPoolInteraction()` and selector `0x0561d8b3`. -```solidity -error InvalidLendingPoolInteraction(); -```*/ + ```solidity + error InvalidLendingPoolInteraction(); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct InvalidLendingPoolInteraction; @@ -4868,7 +4773,7 @@ error InvalidLendingPoolInteraction(); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[doc(hidden)] #[allow(dead_code)] type UnderlyingSolTuple<'a> = (); @@ -4876,9 +4781,7 @@ error InvalidLendingPoolInteraction(); type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -4887,16 +4790,14 @@ error InvalidLendingPoolInteraction(); } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From - for UnderlyingRustTuple<'_> { + impl ::core::convert::From for UnderlyingRustTuple<'_> { fn from(value: InvalidLendingPoolInteraction) -> Self { () } } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From> - for InvalidLendingPoolInteraction { + impl ::core::convert::From> for InvalidLendingPoolInteraction { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { Self } @@ -4904,35 +4805,37 @@ error InvalidLendingPoolInteraction(); #[automatically_derived] impl alloy_sol_types::SolError for InvalidLendingPoolInteraction { type Parameters<'a> = UnderlyingSolTuple<'a>; - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "InvalidLendingPoolInteraction()"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [5u8, 97u8, 216u8, 179u8]; + const SIGNATURE: &'static str = "InvalidLendingPoolInteraction()"; + #[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) + as alloy_sol_types::SolType>::abi_decode_sequence_validate( + data, + ) + .map(Self::new) } } }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Custom error with signature `InvalidQuoteTokenAmounts()` and selector `0x877630be`. -```solidity -error InvalidQuoteTokenAmounts(); -```*/ + ```solidity + error InvalidQuoteTokenAmounts(); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct InvalidQuoteTokenAmounts; @@ -4943,7 +4846,7 @@ error InvalidQuoteTokenAmounts(); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[doc(hidden)] #[allow(dead_code)] type UnderlyingSolTuple<'a> = (); @@ -4951,9 +4854,7 @@ error InvalidQuoteTokenAmounts(); type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -4962,16 +4863,14 @@ error InvalidQuoteTokenAmounts(); } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From - for UnderlyingRustTuple<'_> { + impl ::core::convert::From for UnderlyingRustTuple<'_> { fn from(value: InvalidQuoteTokenAmounts) -> Self { () } } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From> - for InvalidQuoteTokenAmounts { + impl ::core::convert::From> for InvalidQuoteTokenAmounts { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { Self } @@ -4979,35 +4878,37 @@ error InvalidQuoteTokenAmounts(); #[automatically_derived] impl alloy_sol_types::SolError for InvalidQuoteTokenAmounts { type Parameters<'a> = UnderlyingSolTuple<'a>; - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "InvalidQuoteTokenAmounts()"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [135u8, 118u8, 48u8, 190u8]; + const SIGNATURE: &'static str = "InvalidQuoteTokenAmounts()"; + #[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) + as alloy_sol_types::SolType>::abi_decode_sequence_validate( + data, + ) + .map(Self::new) } } }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Custom error with signature `InvalidSignatureType()` and selector `0x60cd402d`. -```solidity -error InvalidSignatureType(); -```*/ + ```solidity + error InvalidSignatureType(); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct InvalidSignatureType; @@ -5018,7 +4919,7 @@ error InvalidSignatureType(); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[doc(hidden)] #[allow(dead_code)] type UnderlyingSolTuple<'a> = (); @@ -5026,9 +4927,7 @@ error InvalidSignatureType(); type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -5052,35 +4951,37 @@ error InvalidSignatureType(); #[automatically_derived] impl alloy_sol_types::SolError for InvalidSignatureType { type Parameters<'a> = UnderlyingSolTuple<'a>; - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "InvalidSignatureType()"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [96u8, 205u8, 64u8, 45u8]; + const SIGNATURE: &'static str = "InvalidSignatureType()"; + #[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) + as alloy_sol_types::SolType>::abi_decode_sequence_validate( + data, + ) + .map(Self::new) } } }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Custom error with signature `InvalidSigner()` and selector `0x815e1d64`. -```solidity -error InvalidSigner(); -```*/ + ```solidity + error InvalidSigner(); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct InvalidSigner; @@ -5091,7 +4992,7 @@ error InvalidSigner(); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[doc(hidden)] #[allow(dead_code)] type UnderlyingSolTuple<'a> = (); @@ -5099,9 +5000,7 @@ error InvalidSigner(); type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -5125,35 +5024,37 @@ error InvalidSigner(); #[automatically_derived] impl alloy_sol_types::SolError for InvalidSigner { type Parameters<'a> = UnderlyingSolTuple<'a>; - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "InvalidSigner()"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [129u8, 94u8, 29u8, 100u8]; + const SIGNATURE: &'static str = "InvalidSigner()"; + #[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) + as alloy_sol_types::SolType>::abi_decode_sequence_validate( + data, + ) + .map(Self::new) } } }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Custom error with signature `InvalidSource()` and selector `0x8154374b`. -```solidity -error InvalidSource(); -```*/ + ```solidity + error InvalidSource(); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct InvalidSource; @@ -5164,7 +5065,7 @@ error InvalidSource(); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[doc(hidden)] #[allow(dead_code)] type UnderlyingSolTuple<'a> = (); @@ -5172,9 +5073,7 @@ error InvalidSource(); type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -5198,35 +5097,37 @@ error InvalidSource(); #[automatically_derived] impl alloy_sol_types::SolError for InvalidSource { type Parameters<'a> = UnderlyingSolTuple<'a>; - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "InvalidSource()"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [129u8, 84u8, 55u8, 75u8]; + const SIGNATURE: &'static str = "InvalidSource()"; + #[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) + as alloy_sol_types::SolType>::abi_decode_sequence_validate( + data, + ) + .map(Self::new) } } }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Custom error with signature `NonceInvalid()` and selector `0xbc0da7d6`. -```solidity -error NonceInvalid(); -```*/ + ```solidity + error NonceInvalid(); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct NonceInvalid; @@ -5237,7 +5138,7 @@ error NonceInvalid(); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[doc(hidden)] #[allow(dead_code)] type UnderlyingSolTuple<'a> = (); @@ -5245,9 +5146,7 @@ error NonceInvalid(); type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -5271,35 +5170,37 @@ error NonceInvalid(); #[automatically_derived] impl alloy_sol_types::SolError for NonceInvalid { type Parameters<'a> = UnderlyingSolTuple<'a>; - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "NonceInvalid()"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [188u8, 13u8, 167u8, 214u8]; + const SIGNATURE: &'static str = "NonceInvalid()"; + #[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) + as alloy_sol_types::SolType>::abi_decode_sequence_validate( + data, + ) + .map(Self::new) } } }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Custom error with signature `NotMaker()` and selector `0xb331e421`. -```solidity -error NotMaker(); -```*/ + ```solidity + error NotMaker(); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct NotMaker; @@ -5310,7 +5211,7 @@ error NotMaker(); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[doc(hidden)] #[allow(dead_code)] type UnderlyingSolTuple<'a> = (); @@ -5318,9 +5219,7 @@ error NotMaker(); type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -5344,35 +5243,37 @@ error NotMaker(); #[automatically_derived] impl alloy_sol_types::SolError for NotMaker { type Parameters<'a> = UnderlyingSolTuple<'a>; - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "NotMaker()"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [179u8, 49u8, 228u8, 33u8]; + const SIGNATURE: &'static str = "NotMaker()"; + #[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) + as alloy_sol_types::SolType>::abi_decode_sequence_validate( + data, + ) + .map(Self::new) } } }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Custom error with signature `NotSolver()` and selector `0xc139eabd`. -```solidity -error NotSolver(); -```*/ + ```solidity + error NotSolver(); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct NotSolver; @@ -5383,7 +5284,7 @@ error NotSolver(); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[doc(hidden)] #[allow(dead_code)] type UnderlyingSolTuple<'a> = (); @@ -5391,9 +5292,7 @@ error NotSolver(); type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -5417,35 +5316,37 @@ error NotSolver(); #[automatically_derived] impl alloy_sol_types::SolError for NotSolver { type Parameters<'a> = UnderlyingSolTuple<'a>; - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "NotSolver()"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [193u8, 57u8, 234u8, 189u8]; + const SIGNATURE: &'static str = "NotSolver()"; + #[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) + as alloy_sol_types::SolType>::abi_decode_sequence_validate( + data, + ) + .map(Self::new) } } }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Custom error with signature `OrderExpired()` and selector `0xc56873ba`. -```solidity -error OrderExpired(); -```*/ + ```solidity + error OrderExpired(); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct OrderExpired; @@ -5456,7 +5357,7 @@ error OrderExpired(); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[doc(hidden)] #[allow(dead_code)] type UnderlyingSolTuple<'a> = (); @@ -5464,9 +5365,7 @@ error OrderExpired(); type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -5490,35 +5389,37 @@ error OrderExpired(); #[automatically_derived] impl alloy_sol_types::SolError for OrderExpired { type Parameters<'a> = UnderlyingSolTuple<'a>; - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "OrderExpired()"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [197u8, 104u8, 115u8, 186u8]; + const SIGNATURE: &'static str = "OrderExpired()"; + #[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) + as alloy_sol_types::SolType>::abi_decode_sequence_validate( + data, + ) + .map(Self::new) } } }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Custom error with signature `PartialFillNotSupported()` and selector `0x7d617bb3`. -```solidity -error PartialFillNotSupported(); -```*/ + ```solidity + error PartialFillNotSupported(); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct PartialFillNotSupported; @@ -5529,7 +5430,7 @@ error PartialFillNotSupported(); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[doc(hidden)] #[allow(dead_code)] type UnderlyingSolTuple<'a> = (); @@ -5537,9 +5438,7 @@ error PartialFillNotSupported(); type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -5563,35 +5462,37 @@ error PartialFillNotSupported(); #[automatically_derived] impl alloy_sol_types::SolError for PartialFillNotSupported { type Parameters<'a> = UnderlyingSolTuple<'a>; - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "PartialFillNotSupported()"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [125u8, 97u8, 123u8, 179u8]; + const SIGNATURE: &'static str = "PartialFillNotSupported()"; + #[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) + as alloy_sol_types::SolType>::abi_decode_sequence_validate( + data, + ) + .map(Self::new) } } }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Custom error with signature `ReceiverNotManager()` and selector `0x79a1bff0`. -```solidity -error ReceiverNotManager(); -```*/ + ```solidity + error ReceiverNotManager(); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct ReceiverNotManager; @@ -5602,7 +5503,7 @@ error ReceiverNotManager(); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[doc(hidden)] #[allow(dead_code)] type UnderlyingSolTuple<'a> = (); @@ -5610,9 +5511,7 @@ error ReceiverNotManager(); type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -5636,35 +5535,37 @@ error ReceiverNotManager(); #[automatically_derived] impl alloy_sol_types::SolError for ReceiverNotManager { type Parameters<'a> = UnderlyingSolTuple<'a>; - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "ReceiverNotManager()"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [121u8, 161u8, 191u8, 240u8]; + const SIGNATURE: &'static str = "ReceiverNotManager()"; + #[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) + as alloy_sol_types::SolType>::abi_decode_sequence_validate( + data, + ) + .map(Self::new) } } }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Custom error with signature `ReentrancyGuardReentrantCall()` and selector `0x3ee5aeb5`. -```solidity -error ReentrancyGuardReentrantCall(); -```*/ + ```solidity + error ReentrancyGuardReentrantCall(); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct ReentrancyGuardReentrantCall; @@ -5675,7 +5576,7 @@ error ReentrancyGuardReentrantCall(); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[doc(hidden)] #[allow(dead_code)] type UnderlyingSolTuple<'a> = (); @@ -5683,9 +5584,7 @@ error ReentrancyGuardReentrantCall(); type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -5694,16 +5593,14 @@ error ReentrancyGuardReentrantCall(); } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From - for UnderlyingRustTuple<'_> { + impl ::core::convert::From for UnderlyingRustTuple<'_> { fn from(value: ReentrancyGuardReentrantCall) -> Self { () } } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From> - for ReentrancyGuardReentrantCall { + impl ::core::convert::From> for ReentrancyGuardReentrantCall { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { Self } @@ -5711,35 +5608,37 @@ error ReentrancyGuardReentrantCall(); #[automatically_derived] impl alloy_sol_types::SolError for ReentrancyGuardReentrantCall { type Parameters<'a> = UnderlyingSolTuple<'a>; - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "ReentrancyGuardReentrantCall()"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [62u8, 229u8, 174u8, 181u8]; + const SIGNATURE: &'static str = "ReentrancyGuardReentrantCall()"; + #[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) + as alloy_sol_types::SolType>::abi_decode_sequence_validate( + data, + ) + .map(Self::new) } } }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Custom error with signature `SafeERC20FailedOperation(address)` and selector `0x5274afe7`. -```solidity -error SafeERC20FailedOperation(address token); -```*/ + ```solidity + error SafeERC20FailedOperation(address token); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct SafeERC20FailedOperation { @@ -5753,7 +5652,7 @@ error SafeERC20FailedOperation(address token); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[doc(hidden)] #[allow(dead_code)] type UnderlyingSolTuple<'a> = (alloy_sol_types::sol_data::Address,); @@ -5761,9 +5660,7 @@ error SafeERC20FailedOperation(address token); type UnderlyingRustTuple<'a> = (alloy_sol_types::private::Address,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -5772,16 +5669,14 @@ error SafeERC20FailedOperation(address token); } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From - for UnderlyingRustTuple<'_> { + impl ::core::convert::From for UnderlyingRustTuple<'_> { fn from(value: SafeERC20FailedOperation) -> Self { (value.token,) } } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From> - for SafeERC20FailedOperation { + impl ::core::convert::From> for SafeERC20FailedOperation { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { Self { token: tuple.0 } } @@ -5789,17 +5684,18 @@ error SafeERC20FailedOperation(address token); #[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)"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [82u8, 116u8, 175u8, 231u8]; + const SIGNATURE: &'static str = "SafeERC20FailedOperation(address)"; + #[inline] fn new<'a>( tuple: as alloy_sol_types::SolType>::RustType, ) -> Self { tuple.into() } + #[inline] fn tokenize(&self) -> Self::Token<'_> { ( @@ -5808,20 +5704,21 @@ error SafeERC20FailedOperation(address 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) + as alloy_sol_types::SolType>::abi_decode_sequence_validate( + data, + ) + .map(Self::new) } } }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Custom error with signature `SignatureIsExpired()` and selector `0x133df029`. -```solidity -error SignatureIsExpired(); -```*/ + ```solidity + error SignatureIsExpired(); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct SignatureIsExpired; @@ -5832,7 +5729,7 @@ error SignatureIsExpired(); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[doc(hidden)] #[allow(dead_code)] type UnderlyingSolTuple<'a> = (); @@ -5840,9 +5737,7 @@ error SignatureIsExpired(); type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -5866,35 +5761,37 @@ error SignatureIsExpired(); #[automatically_derived] impl alloy_sol_types::SolError for SignatureIsExpired { type Parameters<'a> = UnderlyingSolTuple<'a>; - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "SignatureIsExpired()"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [19u8, 61u8, 240u8, 41u8]; + const SIGNATURE: &'static str = "SignatureIsExpired()"; + #[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) + as alloy_sol_types::SolType>::abi_decode_sequence_validate( + data, + ) + .map(Self::new) } } }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Custom error with signature `SignatureIsNotEmpty()` and selector `0x0e364efc`. -```solidity -error SignatureIsNotEmpty(); -```*/ + ```solidity + error SignatureIsNotEmpty(); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct SignatureIsNotEmpty; @@ -5905,7 +5802,7 @@ error SignatureIsNotEmpty(); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[doc(hidden)] #[allow(dead_code)] type UnderlyingSolTuple<'a> = (); @@ -5913,9 +5810,7 @@ error SignatureIsNotEmpty(); type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -5939,35 +5834,37 @@ error SignatureIsNotEmpty(); #[automatically_derived] impl alloy_sol_types::SolError for SignatureIsNotEmpty { type Parameters<'a> = UnderlyingSolTuple<'a>; - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "SignatureIsNotEmpty()"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [14u8, 54u8, 78u8, 252u8]; + const SIGNATURE: &'static str = "SignatureIsNotEmpty()"; + #[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) + as alloy_sol_types::SolType>::abi_decode_sequence_validate( + data, + ) + .map(Self::new) } } }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Custom error with signature `UpdatedMakerAmountsTooLow()` and selector `0x711dbe4a`. -```solidity -error UpdatedMakerAmountsTooLow(); -```*/ + ```solidity + error UpdatedMakerAmountsTooLow(); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct UpdatedMakerAmountsTooLow; @@ -5978,7 +5875,7 @@ error UpdatedMakerAmountsTooLow(); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[doc(hidden)] #[allow(dead_code)] type UnderlyingSolTuple<'a> = (); @@ -5986,9 +5883,7 @@ error UpdatedMakerAmountsTooLow(); type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -5997,16 +5892,14 @@ error UpdatedMakerAmountsTooLow(); } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From - for UnderlyingRustTuple<'_> { + impl ::core::convert::From for UnderlyingRustTuple<'_> { fn from(value: UpdatedMakerAmountsTooLow) -> Self { () } } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From> - for UpdatedMakerAmountsTooLow { + impl ::core::convert::From> for UpdatedMakerAmountsTooLow { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { Self } @@ -6014,35 +5907,37 @@ error UpdatedMakerAmountsTooLow(); #[automatically_derived] impl alloy_sol_types::SolError for UpdatedMakerAmountsTooLow { type Parameters<'a> = UnderlyingSolTuple<'a>; - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "UpdatedMakerAmountsTooLow()"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [113u8, 29u8, 190u8, 74u8]; + const SIGNATURE: &'static str = "UpdatedMakerAmountsTooLow()"; + #[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) + as alloy_sol_types::SolType>::abi_decode_sequence_validate( + data, + ) + .map(Self::new) } } }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Custom error with signature `ZeroMakerAmount()` and selector `0xb2f300d0`. -```solidity -error ZeroMakerAmount(); -```*/ + ```solidity + error ZeroMakerAmount(); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct ZeroMakerAmount; @@ -6053,7 +5948,7 @@ error ZeroMakerAmount(); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[doc(hidden)] #[allow(dead_code)] type UnderlyingSolTuple<'a> = (); @@ -6061,9 +5956,7 @@ error ZeroMakerAmount(); type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -6087,35 +5980,37 @@ error ZeroMakerAmount(); #[automatically_derived] impl alloy_sol_types::SolError for ZeroMakerAmount { type Parameters<'a> = UnderlyingSolTuple<'a>; - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "ZeroMakerAmount()"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [178u8, 243u8, 0u8, 208u8]; + const SIGNATURE: &'static str = "ZeroMakerAmount()"; + #[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) + as alloy_sol_types::SolType>::abi_decode_sequence_validate( + data, + ) + .map(Self::new) } } }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Event with signature `Interaction(address,uint256,bytes4)` and selector `0xed99827efb37016f2275f98c4bcf71c7551c75d59e9b450f79fa32e60be672c2`. -```solidity -event Interaction(address indexed target, uint256 value, bytes4 selector); -```*/ + ```solidity + event Interaction(address indexed target, uint256 value, bytes4 selector); + ```*/ #[allow( non_camel_case_types, non_snake_case, @@ -6138,27 +6033,28 @@ event Interaction(address indexed target, uint256 value, bytes4 selector); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[automatically_derived] impl alloy_sol_types::SolEvent for Interaction { + type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type DataTuple<'a> = ( alloy_sol_types::sol_data::Uint<256>, alloy_sol_types::sol_data::FixedBytes<4>, ); - 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, ); - const SIGNATURE: &'static str = "Interaction(address,uint256,bytes4)"; - const SIGNATURE_HASH: alloy_sol_types::private::B256 = alloy_sol_types::private::B256::new([ - 237u8, 153u8, 130u8, 126u8, 251u8, 55u8, 1u8, 111u8, 34u8, 117u8, 249u8, - 140u8, 75u8, 207u8, 113u8, 199u8, 85u8, 28u8, 117u8, 213u8, 158u8, 155u8, - 69u8, 15u8, 121u8, 250u8, 50u8, 230u8, 11u8, 230u8, 114u8, 194u8, - ]); + const ANONYMOUS: bool = false; + const SIGNATURE: &'static str = "Interaction(address,uint256,bytes4)"; + const SIGNATURE_HASH: alloy_sol_types::private::B256 = + alloy_sol_types::private::B256::new([ + 237u8, 153u8, 130u8, 126u8, 251u8, 55u8, 1u8, 111u8, 34u8, 117u8, 249u8, 140u8, + 75u8, 207u8, 113u8, 199u8, 85u8, 28u8, 117u8, 213u8, 158u8, 155u8, 69u8, 15u8, + 121u8, 250u8, 50u8, 230u8, 11u8, 230u8, 114u8, 194u8, + ]); + #[allow(unused_variables)] #[inline] fn new( @@ -6171,21 +6067,21 @@ event Interaction(address indexed target, uint256 value, bytes4 selector); selector: 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, - ), - ); + 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<'_> { ( @@ -6197,10 +6093,12 @@ event Interaction(address indexed target, uint256 value, bytes4 selector); > as alloy_sol_types::SolType>::tokenize(&self.selector), ) } + #[inline] fn topics(&self) -> ::RustType { (Self::SIGNATURE_HASH.into(), self.target.clone()) } + #[inline] fn encode_topics_raw( &self, @@ -6209,9 +6107,7 @@ event Interaction(address indexed target, uint256 value, bytes4 selector); if out.len() < ::COUNT { return Err(alloy_sol_types::Error::Overrun); } - out[0usize] = alloy_sol_types::abi::token::WordToken( - Self::SIGNATURE_HASH, - ); + out[0usize] = alloy_sol_types::abi::token::WordToken(Self::SIGNATURE_HASH); out[1usize] = ::encode_topic( &self.target, ); @@ -6223,6 +6119,7 @@ event Interaction(address indexed target, uint256 value, bytes4 selector); 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) } @@ -6237,9 +6134,9 @@ event Interaction(address indexed target, uint256 value, bytes4 selector); }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Event with signature `TradeOrder(string,address,address,address,address,uint256,uint256,address)` and selector `0x0fce007c38c6c8ed9e545b3a148095762738618f8c21b673222613e4d45734b6`. -```solidity -event TradeOrder(string indexed rfqId, address trader, address effectiveTrader, address baseToken, address quoteToken, uint256 baseTokenAmount, uint256 quoteTokenAmount, address recipient); -```*/ + ```solidity + event TradeOrder(string indexed rfqId, address trader, address effectiveTrader, address baseToken, address quoteToken, uint256 baseTokenAmount, uint256 quoteTokenAmount, address recipient); + ```*/ #[allow( non_camel_case_types, non_snake_case, @@ -6272,9 +6169,10 @@ event TradeOrder(string indexed rfqId, address trader, address effectiveTrader, clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[automatically_derived] impl alloy_sol_types::SolEvent for TradeOrder { + type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type DataTuple<'a> = ( alloy_sol_types::sol_data::Address, alloy_sol_types::sol_data::Address, @@ -6284,20 +6182,21 @@ event TradeOrder(string indexed rfqId, address trader, address effectiveTrader, 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::FixedBytes<32>, ); - const SIGNATURE: &'static str = "TradeOrder(string,address,address,address,address,uint256,uint256,address)"; - const SIGNATURE_HASH: alloy_sol_types::private::B256 = alloy_sol_types::private::B256::new([ - 15u8, 206u8, 0u8, 124u8, 56u8, 198u8, 200u8, 237u8, 158u8, 84u8, 91u8, - 58u8, 20u8, 128u8, 149u8, 118u8, 39u8, 56u8, 97u8, 143u8, 140u8, 33u8, - 182u8, 115u8, 34u8, 38u8, 19u8, 228u8, 212u8, 87u8, 52u8, 182u8, - ]); + const ANONYMOUS: bool = false; + const SIGNATURE: &'static str = + "TradeOrder(string,address,address,address,address,uint256,uint256,address)"; + const SIGNATURE_HASH: alloy_sol_types::private::B256 = + alloy_sol_types::private::B256::new([ + 15u8, 206u8, 0u8, 124u8, 56u8, 198u8, 200u8, 237u8, 158u8, 84u8, 91u8, 58u8, + 20u8, 128u8, 149u8, 118u8, 39u8, 56u8, 97u8, 143u8, 140u8, 33u8, 182u8, 115u8, + 34u8, 38u8, 19u8, 228u8, 212u8, 87u8, 52u8, 182u8, + ]); + #[allow(unused_variables)] #[inline] fn new( @@ -6315,21 +6214,21 @@ event TradeOrder(string indexed rfqId, address trader, address effectiveTrader, recipient: data.6, } } + #[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, - ), - ); + 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<'_> { ( @@ -6345,21 +6244,23 @@ event TradeOrder(string indexed rfqId, address trader, address effectiveTrader, ::tokenize( &self.quoteToken, ), - as alloy_sol_types::SolType>::tokenize(&self.baseTokenAmount), - as alloy_sol_types::SolType>::tokenize(&self.quoteTokenAmount), + as alloy_sol_types::SolType>::tokenize( + &self.baseTokenAmount, + ), + as alloy_sol_types::SolType>::tokenize( + &self.quoteTokenAmount, + ), ::tokenize( &self.recipient, ), ) } + #[inline] fn topics(&self) -> ::RustType { (Self::SIGNATURE_HASH.into(), self.rfqId.clone()) } + #[inline] fn encode_topics_raw( &self, @@ -6368,9 +6269,7 @@ event TradeOrder(string indexed rfqId, address trader, address effectiveTrader, if out.len() < ::COUNT { return Err(alloy_sol_types::Error::Overrun); } - out[0usize] = alloy_sol_types::abi::token::WordToken( - Self::SIGNATURE_HASH, - ); + out[0usize] = alloy_sol_types::abi::token::WordToken(Self::SIGNATURE_HASH); out[1usize] = as alloy_sol_types::EventTopic>::encode_topic(&self.rfqId); @@ -6382,6 +6281,7 @@ event TradeOrder(string indexed rfqId, address trader, address effectiveTrader, 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) } @@ -6395,9 +6295,9 @@ event TradeOrder(string indexed rfqId, address trader, address effectiveTrader, } }; /**Constructor`. -```solidity -constructor(address authenticator_, address repository_, address permit2_); -```*/ + ```solidity + constructor(address authenticator_, address repository_, address permit2_); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct constructorCall { @@ -6409,7 +6309,7 @@ constructor(address authenticator_, address repository_, address permit2_); pub permit2_: alloy_sol_types::private::Address, } const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -6426,9 +6326,7 @@ constructor(address authenticator_, address repository_, address permit2_); ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -6461,15 +6359,15 @@ constructor(address authenticator_, address repository_, address permit2_); alloy_sol_types::sol_data::Address, alloy_sol_types::sol_data::Address, ); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + 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<'_> { ( @@ -6488,14 +6386,15 @@ constructor(address authenticator_, address repository_, address permit2_); }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `AUTHENTICATOR()` and selector `0xc6186181`. -```solidity -function AUTHENTICATOR() external view returns (address); -```*/ + ```solidity + function AUTHENTICATOR() external view returns (address); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct AUTHENTICATORCall; #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`AUTHENTICATOR()`](AUTHENTICATORCall) function. + ///Container type for the return parameters of the + /// [`AUTHENTICATOR()`](AUTHENTICATORCall) function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct AUTHENTICATORReturn { @@ -6509,7 +6408,7 @@ function AUTHENTICATOR() external view returns (address); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -6518,9 +6417,7 @@ function AUTHENTICATOR() external view returns (address); type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -6550,9 +6447,7 @@ function AUTHENTICATOR() external view returns (address); type UnderlyingRustTuple<'a> = (alloy_sol_types::private::Address,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -6577,68 +6472,64 @@ function AUTHENTICATOR() external view returns (address); #[automatically_derived] impl alloy_sol_types::SolCall for AUTHENTICATORCall { type Parameters<'a> = (); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = alloy_sol_types::private::Address; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (alloy_sol_types::sol_data::Address,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "AUTHENTICATOR()"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [198u8, 24u8, 97u8, 129u8]; + const SIGNATURE: &'static str = "AUTHENTICATOR()"; + #[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, - ), - ) + (::tokenize(ret),) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) - .map(|r| { + as alloy_sol_types::SolType>::abi_decode_sequence(data).map( + |r| { let r: AUTHENTICATORReturn = 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: AUTHENTICATORReturn = r.into(); - r._0 - }) + 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: AUTHENTICATORReturn = r.into(); + r._0 + }) } } }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `BALANCE_MANAGER()` and selector `0x29bcdc95`. -```solidity -function BALANCE_MANAGER() external view returns (address); -```*/ + ```solidity + function BALANCE_MANAGER() external view returns (address); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct BALANCE_MANAGERCall; #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`BALANCE_MANAGER()`](BALANCE_MANAGERCall) function. + ///Container type for the return parameters of the + /// [`BALANCE_MANAGER()`](BALANCE_MANAGERCall) function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct BALANCE_MANAGERReturn { @@ -6652,7 +6543,7 @@ function BALANCE_MANAGER() external view returns (address); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -6661,9 +6552,7 @@ function BALANCE_MANAGER() external view returns (address); type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -6693,9 +6582,7 @@ function BALANCE_MANAGER() external view returns (address); type UnderlyingRustTuple<'a> = (alloy_sol_types::private::Address,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -6704,16 +6591,14 @@ function BALANCE_MANAGER() external view returns (address); } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From - for UnderlyingRustTuple<'_> { + impl ::core::convert::From for UnderlyingRustTuple<'_> { fn from(value: BALANCE_MANAGERReturn) -> Self { (value._0,) } } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From> - for BALANCE_MANAGERReturn { + impl ::core::convert::From> for BALANCE_MANAGERReturn { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { Self { _0: tuple.0 } } @@ -6722,68 +6607,64 @@ function BALANCE_MANAGER() external view returns (address); #[automatically_derived] impl alloy_sol_types::SolCall for BALANCE_MANAGERCall { type Parameters<'a> = (); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = alloy_sol_types::private::Address; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (alloy_sol_types::sol_data::Address,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "BALANCE_MANAGER()"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [41u8, 188u8, 220u8, 149u8]; + const SIGNATURE: &'static str = "BALANCE_MANAGER()"; + #[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, - ), - ) + (::tokenize(ret),) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) - .map(|r| { + as alloy_sol_types::SolType>::abi_decode_sequence(data).map( + |r| { let r: BALANCE_MANAGERReturn = 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: BALANCE_MANAGERReturn = r.into(); - r._0 - }) + 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: BALANCE_MANAGERReturn = r.into(); + r._0 + }) } } }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `DOMAIN_SEPARATOR()` and selector `0x3644e515`. -```solidity -function DOMAIN_SEPARATOR() external view returns (bytes32); -```*/ + ```solidity + function DOMAIN_SEPARATOR() external view returns (bytes32); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct DOMAIN_SEPARATORCall; #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`DOMAIN_SEPARATOR()`](DOMAIN_SEPARATORCall) function. + ///Container type for the return parameters of the + /// [`DOMAIN_SEPARATOR()`](DOMAIN_SEPARATORCall) function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct DOMAIN_SEPARATORReturn { @@ -6797,7 +6678,7 @@ function DOMAIN_SEPARATOR() external view returns (bytes32); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -6806,9 +6687,7 @@ function DOMAIN_SEPARATOR() external view returns (bytes32); type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -6817,16 +6696,14 @@ function DOMAIN_SEPARATOR() external view returns (bytes32); } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From - for UnderlyingRustTuple<'_> { + impl ::core::convert::From for UnderlyingRustTuple<'_> { fn from(value: DOMAIN_SEPARATORCall) -> Self { () } } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From> - for DOMAIN_SEPARATORCall { + impl ::core::convert::From> for DOMAIN_SEPARATORCall { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { Self } @@ -6840,9 +6717,7 @@ function DOMAIN_SEPARATOR() external view returns (bytes32); 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, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -6851,16 +6726,14 @@ function DOMAIN_SEPARATOR() external view returns (bytes32); } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From - for UnderlyingRustTuple<'_> { + impl ::core::convert::From for UnderlyingRustTuple<'_> { fn from(value: DOMAIN_SEPARATORReturn) -> Self { (value._0,) } } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From> - for DOMAIN_SEPARATORReturn { + impl ::core::convert::From> for DOMAIN_SEPARATORReturn { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { Self { _0: tuple.0 } } @@ -6869,26 +6742,26 @@ function DOMAIN_SEPARATOR() external view returns (bytes32); #[automatically_derived] impl alloy_sol_types::SolCall for DOMAIN_SEPARATORCall { type Parameters<'a> = (); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = alloy_sol_types::private::FixedBytes<32>; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (alloy_sol_types::sol_data::FixedBytes<32>,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "DOMAIN_SEPARATOR()"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [54u8, 68u8, 229u8, 21u8]; + const SIGNATURE: &'static str = "DOMAIN_SEPARATOR()"; + #[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<'_> { ( @@ -6897,35 +6770,34 @@ function DOMAIN_SEPARATOR() external view returns (bytes32); > 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| { + as alloy_sol_types::SolType>::abi_decode_sequence(data).map( + |r| { let r: DOMAIN_SEPARATORReturn = 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: DOMAIN_SEPARATORReturn = r.into(); - r._0 - }) + 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: DOMAIN_SEPARATORReturn = r.into(); + r._0 + }) } } }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `hashSingleOrder((string,uint256,address,address,address,address,uint256,uint256,uint256,uint256,address))` and selector `0xb11f1262`. -```solidity -function hashSingleOrder(ILiquoriceSettlement.Single memory _order) external view returns (bytes32); -```*/ + ```solidity + function hashSingleOrder(ILiquoriceSettlement.Single memory _order) external view returns (bytes32); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct hashSingleOrderCall { @@ -6933,7 +6805,10 @@ function hashSingleOrder(ILiquoriceSettlement.Single memory _order) external vie pub _order: ::RustType, } #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`hashSingleOrder((string,uint256,address,address,address,address,uint256,uint256,uint256,uint256,address))`](hashSingleOrderCall) function. + ///Container type for the return parameters of the + /// [`hashSingleOrder((string,uint256,address,address,address,address, + /// uint256,uint256,uint256,uint256,address))`](hashSingleOrderCall) + /// function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct hashSingleOrderReturn { @@ -6947,20 +6822,17 @@ function hashSingleOrder(ILiquoriceSettlement.Single memory _order) external vie clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] type UnderlyingSolTuple<'a> = (ILiquoriceSettlement::Single,); #[doc(hidden)] - type UnderlyingRustTuple<'a> = ( - ::RustType, - ); + type UnderlyingRustTuple<'a> = + (::RustType,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -6990,9 +6862,7 @@ function hashSingleOrder(ILiquoriceSettlement.Single memory _order) external vie 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, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -7001,16 +6871,14 @@ function hashSingleOrder(ILiquoriceSettlement.Single memory _order) external vie } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From - for UnderlyingRustTuple<'_> { + impl ::core::convert::From for UnderlyingRustTuple<'_> { fn from(value: hashSingleOrderReturn) -> Self { (value._0,) } } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From> - for hashSingleOrderReturn { + impl ::core::convert::From> for hashSingleOrderReturn { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { Self { _0: tuple.0 } } @@ -7019,22 +6887,23 @@ function hashSingleOrder(ILiquoriceSettlement.Single memory _order) external vie #[automatically_derived] impl alloy_sol_types::SolCall for hashSingleOrderCall { type Parameters<'a> = (ILiquoriceSettlement::Single,); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = alloy_sol_types::private::FixedBytes<32>; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (alloy_sol_types::sol_data::FixedBytes<32>,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "hashSingleOrder((string,uint256,address,address,address,address,uint256,uint256,uint256,uint256,address))"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [177u8, 31u8, 18u8, 98u8]; + const SIGNATURE: &'static str = "hashSingleOrder((string,uint256,address,address,\ + address,address,uint256,uint256,uint256,uint256,\ + address))"; + #[inline] fn new<'a>( tuple: as alloy_sol_types::SolType>::RustType, ) -> Self { tuple.into() } + #[inline] fn tokenize(&self) -> Self::Token<'_> { ( @@ -7043,6 +6912,7 @@ function hashSingleOrder(ILiquoriceSettlement.Single memory _order) external vie ), ) } + #[inline] fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { ( @@ -7051,35 +6921,34 @@ function hashSingleOrder(ILiquoriceSettlement.Single memory _order) external vie > 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| { + as alloy_sol_types::SolType>::abi_decode_sequence(data).map( + |r| { let r: hashSingleOrderReturn = 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: hashSingleOrderReturn = r.into(); - r._0 - }) + 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: hashSingleOrderReturn = r.into(); + r._0 + }) } } }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `isValidSignature(bytes32,bytes)` and selector `0x1626ba7e`. -```solidity -function isValidSignature(bytes32 _hash, bytes memory _signature) external view returns (bytes4); -```*/ + ```solidity + function isValidSignature(bytes32 _hash, bytes memory _signature) external view returns (bytes4); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct isValidSignatureCall { @@ -7089,7 +6958,8 @@ function isValidSignature(bytes32 _hash, bytes memory _signature) external view pub _signature: alloy_sol_types::private::Bytes, } #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`isValidSignature(bytes32,bytes)`](isValidSignatureCall) function. + ///Container type for the return parameters of the + /// [`isValidSignature(bytes32,bytes)`](isValidSignatureCall) function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct isValidSignatureReturn { @@ -7103,7 +6973,7 @@ function isValidSignature(bytes32 _hash, bytes memory _signature) external view clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -7118,9 +6988,7 @@ function isValidSignature(bytes32 _hash, bytes memory _signature) external view ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -7129,16 +6997,14 @@ function isValidSignature(bytes32 _hash, bytes memory _signature) external view } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From - for UnderlyingRustTuple<'_> { + impl ::core::convert::From for UnderlyingRustTuple<'_> { fn from(value: isValidSignatureCall) -> Self { (value._hash, value._signature) } } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From> - for isValidSignatureCall { + impl ::core::convert::From> for isValidSignatureCall { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { Self { _hash: tuple.0, @@ -7155,9 +7021,7 @@ function isValidSignature(bytes32 _hash, bytes memory _signature) external view 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, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -7166,16 +7030,14 @@ function isValidSignature(bytes32 _hash, bytes memory _signature) external view } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From - for UnderlyingRustTuple<'_> { + impl ::core::convert::From for UnderlyingRustTuple<'_> { fn from(value: isValidSignatureReturn) -> Self { (value._0,) } } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From> - for isValidSignatureReturn { + impl ::core::convert::From> for isValidSignatureReturn { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { Self { _0: tuple.0 } } @@ -7187,22 +7049,21 @@ function isValidSignature(bytes32 _hash, bytes memory _signature) external view alloy_sol_types::sol_data::FixedBytes<32>, alloy_sol_types::sol_data::Bytes, ); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = alloy_sol_types::private::FixedBytes<4>; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (alloy_sol_types::sol_data::FixedBytes<4>,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "isValidSignature(bytes32,bytes)"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [22u8, 38u8, 186u8, 126u8]; + const SIGNATURE: &'static str = "isValidSignature(bytes32,bytes)"; + #[inline] fn new<'a>( tuple: as alloy_sol_types::SolType>::RustType, ) -> Self { tuple.into() } + #[inline] fn tokenize(&self) -> Self::Token<'_> { ( @@ -7214,6 +7075,7 @@ function isValidSignature(bytes32 _hash, bytes memory _signature) external view ), ) } + #[inline] fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { ( @@ -7222,35 +7084,34 @@ function isValidSignature(bytes32 _hash, bytes memory _signature) external view > 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| { + as alloy_sol_types::SolType>::abi_decode_sequence(data).map( + |r| { let r: isValidSignatureReturn = 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: isValidSignatureReturn = r.into(); - r._0 - }) + 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: isValidSignatureReturn = r.into(); + r._0 + }) } } }; #[derive()] /**Function with signature `settle(address,uint256,(address,uint256,string,uint256,address,address,uint256,address,uint256,(address,uint256,uint256,uint256,uint256),(address,uint256,uint256,uint256,uint256)),(address,uint256,bytes)[],((address,uint256,bytes)[],(address,uint256,bytes)[]),(uint8,uint8,bytes),(uint8,uint8,bytes))` and selector `0xcba673a7`. -```solidity -function settle(address _signer, uint256 _filledTakerAmount, ILiquoriceSettlement.Order memory _order, GPv2Interaction.Data[] memory _interactions, GPv2Interaction.Hooks memory _hooks, Signature.TypedSignature memory _makerSignature, Signature.TypedSignature memory _takerSignature) external; -```*/ + ```solidity + function settle(address _signer, uint256 _filledTakerAmount, ILiquoriceSettlement.Order memory _order, GPv2Interaction.Data[] memory _interactions, GPv2Interaction.Hooks memory _hooks, Signature.TypedSignature memory _makerSignature, Signature.TypedSignature memory _takerSignature) external; + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct settleCall { @@ -7271,7 +7132,12 @@ function settle(address _signer, uint256 _filledTakerAmount, ILiquoriceSettlemen #[allow(missing_docs)] pub _takerSignature: ::RustType, } - ///Container type for the return parameters of the [`settle(address,uint256,(address,uint256,string,uint256,address,address,uint256,address,uint256,(address,uint256,uint256,uint256,uint256),(address,uint256,uint256,uint256,uint256)),(address,uint256,bytes)[],((address,uint256,bytes)[],(address,uint256,bytes)[]),(uint8,uint8,bytes),(uint8,uint8,bytes))`](settleCall) function. + ///Container type for the return parameters of the + /// [`settle(address,uint256,(address,uint256,string,uint256,address, + /// address,uint256,address,uint256,(address,uint256,uint256,uint256, + /// uint256),(address,uint256,uint256,uint256,uint256)),(address,uint256, + /// bytes)[],((address,uint256,bytes)[],(address,uint256,bytes)[]),(uint8, + /// uint8,bytes),(uint8,uint8,bytes))`](settleCall) function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct settleReturn {} @@ -7282,7 +7148,7 @@ function settle(address _signer, uint256 _filledTakerAmount, ILiquoriceSettlemen clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -7309,9 +7175,7 @@ function settle(address _signer, uint256 _filledTakerAmount, ILiquoriceSettlemen ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -7357,9 +7221,7 @@ function settle(address _signer, uint256 _filledTakerAmount, ILiquoriceSettlemen type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -7382,9 +7244,7 @@ function settle(address _signer, uint256 _filledTakerAmount, ILiquoriceSettlemen } } impl settleReturn { - fn _tokenize( - &self, - ) -> ::ReturnToken<'_> { + fn _tokenize(&self) -> ::ReturnToken<'_> { () } } @@ -7399,22 +7259,25 @@ function settle(address _signer, uint256 _filledTakerAmount, ILiquoriceSettlemen Signature::TypedSignature, Signature::TypedSignature, ); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = settleReturn; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "settle(address,uint256,(address,uint256,string,uint256,address,address,uint256,address,uint256,(address,uint256,uint256,uint256,uint256),(address,uint256,uint256,uint256,uint256)),(address,uint256,bytes)[],((address,uint256,bytes)[],(address,uint256,bytes)[]),(uint8,uint8,bytes),(uint8,uint8,bytes))"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [203u8, 166u8, 115u8, 167u8]; + const SIGNATURE: &'static str = + "settle(address,uint256,(address,uint256,string,uint256,address,address,uint256,\ + address,uint256,(address,uint256,uint256,uint256,uint256),(address,uint256,\ + uint256,uint256,uint256)),(address,uint256,bytes)[],((address,uint256,bytes)[],\ + (address,uint256,bytes)[]),(uint8,uint8,bytes),(uint8,uint8,bytes))"; + #[inline] fn new<'a>( tuple: as alloy_sol_types::SolType>::RustType, ) -> Self { tuple.into() } + #[inline] fn tokenize(&self) -> Self::Token<'_> { ( @@ -7441,33 +7304,32 @@ function settle(address _signer, uint256 _filledTakerAmount, ILiquoriceSettlemen ), ) } + #[inline] fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { settleReturn::_tokenize(ret) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) + 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) + 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()] /**Function with signature `settleSingle(address,(string,uint256,address,address,address,address,uint256,uint256,uint256,uint256,address),(uint8,uint8,bytes),uint256,(uint8,uint8,bytes))` and selector `0x9935c868`. -```solidity -function settleSingle(address _signer, ILiquoriceSettlement.Single memory _order, Signature.TypedSignature memory _makerSignature, uint256 _filledTakerAmount, Signature.TypedSignature memory _takerSignature) external payable; -```*/ + ```solidity + function settleSingle(address _signer, ILiquoriceSettlement.Single memory _order, Signature.TypedSignature memory _makerSignature, uint256 _filledTakerAmount, Signature.TypedSignature memory _takerSignature) external payable; + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct settleSingleCall { @@ -7482,7 +7344,10 @@ function settleSingle(address _signer, ILiquoriceSettlement.Single memory _order #[allow(missing_docs)] pub _takerSignature: ::RustType, } - ///Container type for the return parameters of the [`settleSingle(address,(string,uint256,address,address,address,address,uint256,uint256,uint256,uint256,address),(uint8,uint8,bytes),uint256,(uint8,uint8,bytes))`](settleSingleCall) function. + ///Container type for the return parameters of the + /// [`settleSingle(address,(string,uint256,address,address,address,address, + /// uint256,uint256,uint256,uint256,address),(uint8,uint8,bytes),uint256, + /// (uint8,uint8,bytes))`](settleSingleCall) function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct settleSingleReturn {} @@ -7493,7 +7358,7 @@ function settleSingle(address _signer, ILiquoriceSettlement.Single memory _order clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -7514,9 +7379,7 @@ function settleSingle(address _signer, ILiquoriceSettlement.Single memory _order ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -7558,9 +7421,7 @@ function settleSingle(address _signer, ILiquoriceSettlement.Single memory _order type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -7583,9 +7444,7 @@ function settleSingle(address _signer, ILiquoriceSettlement.Single memory _order } } impl settleSingleReturn { - fn _tokenize( - &self, - ) -> ::ReturnToken<'_> { + fn _tokenize(&self) -> ::ReturnToken<'_> { () } } @@ -7598,22 +7457,23 @@ function settleSingle(address _signer, ILiquoriceSettlement.Single memory _order alloy_sol_types::sol_data::Uint<256>, Signature::TypedSignature, ); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = settleSingleReturn; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "settleSingle(address,(string,uint256,address,address,address,address,uint256,uint256,uint256,uint256,address),(uint8,uint8,bytes),uint256,(uint8,uint8,bytes))"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [153u8, 53u8, 200u8, 104u8]; + const SIGNATURE: &'static str = + "settleSingle(address,(string,uint256,address,address,address,address,uint256,\ + uint256,uint256,uint256,address),(uint8,uint8,bytes),uint256,(uint8,uint8,bytes))"; + #[inline] fn new<'a>( tuple: as alloy_sol_types::SolType>::RustType, ) -> Self { tuple.into() } + #[inline] fn tokenize(&self) -> Self::Token<'_> { ( @@ -7626,39 +7486,37 @@ function settleSingle(address _signer, ILiquoriceSettlement.Single memory _order ::tokenize( &self._makerSignature, ), - as alloy_sol_types::SolType>::tokenize(&self._filledTakerAmount), + as alloy_sol_types::SolType>::tokenize( + &self._filledTakerAmount, + ), ::tokenize( &self._takerSignature, ), ) } + #[inline] fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { settleSingleReturn::_tokenize(ret) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) + 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) + 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 [`LiquoriceSettlement`](self) function calls. #[derive(Clone)] - #[derive()] pub enum LiquoriceSettlementCalls { #[allow(missing_docs)] AUTHENTICATOR(AUTHENTICATORCall), @@ -7678,8 +7536,9 @@ function settleSingle(address _signer, ILiquoriceSettlement.Single memory _order impl LiquoriceSettlementCalls { /// 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. + /// 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]] = &[ @@ -7691,16 +7550,6 @@ function settleSingle(address _signer, ILiquoriceSettlement.Single memory _order [198u8, 24u8, 97u8, 129u8], [203u8, 166u8, 115u8, 167u8], ]; - /// The names of the variants in the same order as `SELECTORS`. - pub const VARIANT_NAMES: &'static [&'static str] = &[ - ::core::stringify!(isValidSignature), - ::core::stringify!(BALANCE_MANAGER), - ::core::stringify!(DOMAIN_SEPARATOR), - ::core::stringify!(settleSingle), - ::core::stringify!(hashSingleOrder), - ::core::stringify!(AUTHENTICATOR), - ::core::stringify!(settle), - ]; /// The signatures in the same order as `SELECTORS`. pub const SIGNATURES: &'static [&'static str] = &[ ::SIGNATURE, @@ -7711,6 +7560,17 @@ function settleSingle(address _signer, ILiquoriceSettlement.Single memory _order ::SIGNATURE, ::SIGNATURE, ]; + /// The names of the variants in the same order as `SELECTORS`. + pub const VARIANT_NAMES: &'static [&'static str] = &[ + ::core::stringify!(isValidSignature), + ::core::stringify!(BALANCE_MANAGER), + ::core::stringify!(DOMAIN_SEPARATOR), + ::core::stringify!(settleSingle), + ::core::stringify!(hashSingleOrder), + ::core::stringify!(AUTHENTICATOR), + ::core::stringify!(settle), + ]; + /// Returns the signature for the given selector, if known. #[inline] pub fn signature_by_selector( @@ -7723,26 +7583,24 @@ function settleSingle(address _signer, ILiquoriceSettlement.Single memory _order ::core::result::Result::Err(_) => ::core::option::Option::None, } } + /// Returns the enum variant name for the given selector, if known. #[inline] - pub fn name_by_selector( - selector: [u8; 4usize], - ) -> ::core::option::Option<&'static str> { + pub fn name_by_selector(selector: [u8; 4usize]) -> ::core::option::Option<&'static str> { let sig = Self::signature_by_selector(selector)?; sig.split_once('(').map(|(name, _)| name) } } #[automatically_derived] impl alloy_sol_types::SolInterface for LiquoriceSettlementCalls { - const NAME: &'static str = "LiquoriceSettlementCalls"; - const MIN_DATA_LENGTH: usize = 0usize; const COUNT: usize = 7usize; + const MIN_DATA_LENGTH: usize = 0usize; + const NAME: &'static str = "LiquoriceSettlementCalls"; + #[inline] fn selector(&self) -> [u8; 4] { match self { - Self::AUTHENTICATOR(_) => { - ::SELECTOR - } + Self::AUTHENTICATOR(_) => ::SELECTOR, Self::BALANCE_MANAGER(_) => { ::SELECTOR } @@ -7756,35 +7614,32 @@ function settleSingle(address _signer, ILiquoriceSettlement.Single memory _order ::SELECTOR } Self::settle(_) => ::SELECTOR, - Self::settleSingle(_) => { - ::SELECTOR - } + Self::settleSingle(_) => ::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 { + fn abi_decode_raw(selector: [u8; 4], data: &[u8]) -> alloy_sol_types::Result { static DECODE_SHIMS: &[fn( &[u8], - ) -> alloy_sol_types::Result] = &[ + ) + -> alloy_sol_types::Result] = &[ { fn isValidSignature( data: &[u8], ) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, - ) + ::abi_decode_raw(data) .map(LiquoriceSettlementCalls::isValidSignature) } isValidSignature @@ -7793,9 +7648,7 @@ function settleSingle(address _signer, ILiquoriceSettlement.Single memory _order fn BALANCE_MANAGER( data: &[u8], ) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, - ) + ::abi_decode_raw(data) .map(LiquoriceSettlementCalls::BALANCE_MANAGER) } BALANCE_MANAGER @@ -7804,9 +7657,7 @@ function settleSingle(address _signer, ILiquoriceSettlement.Single memory _order fn DOMAIN_SEPARATOR( data: &[u8], ) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, - ) + ::abi_decode_raw(data) .map(LiquoriceSettlementCalls::DOMAIN_SEPARATOR) } DOMAIN_SEPARATOR @@ -7815,9 +7666,7 @@ function settleSingle(address _signer, ILiquoriceSettlement.Single memory _order fn settleSingle( data: &[u8], ) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, - ) + ::abi_decode_raw(data) .map(LiquoriceSettlementCalls::settleSingle) } settleSingle @@ -7826,9 +7675,7 @@ function settleSingle(address _signer, ILiquoriceSettlement.Single memory _order fn hashSingleOrder( data: &[u8], ) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, - ) + ::abi_decode_raw(data) .map(LiquoriceSettlementCalls::hashSingleOrder) } hashSingleOrder @@ -7837,17 +7684,13 @@ function settleSingle(address _signer, ILiquoriceSettlement.Single memory _order fn AUTHENTICATOR( data: &[u8], ) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, - ) + ::abi_decode_raw(data) .map(LiquoriceSettlementCalls::AUTHENTICATOR) } AUTHENTICATOR }, { - fn settle( - data: &[u8], - ) -> alloy_sol_types::Result { + fn settle(data: &[u8]) -> alloy_sol_types::Result { ::abi_decode_raw(data) .map(LiquoriceSettlementCalls::settle) } @@ -7855,15 +7698,14 @@ function settleSingle(address _signer, ILiquoriceSettlement.Single memory _order }, ]; let Ok(idx) = Self::SELECTORS.binary_search(&selector) else { - return Err( - alloy_sol_types::Error::unknown_selector( - ::NAME, - selector, - ), - ); + return Err(alloy_sol_types::Error::unknown_selector( + ::NAME, + selector, + )); }; DECODE_SHIMS[idx](data) } + #[inline] #[allow(non_snake_case)] fn abi_decode_raw_validate( @@ -7872,15 +7714,17 @@ function settleSingle(address _signer, ILiquoriceSettlement.Single memory _order ) -> alloy_sol_types::Result { static DECODE_VALIDATE_SHIMS: &[fn( &[u8], - ) -> alloy_sol_types::Result] = &[ + ) -> alloy_sol_types::Result< + LiquoriceSettlementCalls, + >] = &[ { fn isValidSignature( data: &[u8], ) -> alloy_sol_types::Result { ::abi_decode_raw_validate( - data, - ) - .map(LiquoriceSettlementCalls::isValidSignature) + data, + ) + .map(LiquoriceSettlementCalls::isValidSignature) } isValidSignature }, @@ -7889,9 +7733,9 @@ function settleSingle(address _signer, ILiquoriceSettlement.Single memory _order data: &[u8], ) -> alloy_sol_types::Result { ::abi_decode_raw_validate( - data, - ) - .map(LiquoriceSettlementCalls::BALANCE_MANAGER) + data, + ) + .map(LiquoriceSettlementCalls::BALANCE_MANAGER) } BALANCE_MANAGER }, @@ -7900,9 +7744,9 @@ function settleSingle(address _signer, ILiquoriceSettlement.Single memory _order data: &[u8], ) -> alloy_sol_types::Result { ::abi_decode_raw_validate( - data, - ) - .map(LiquoriceSettlementCalls::DOMAIN_SEPARATOR) + data, + ) + .map(LiquoriceSettlementCalls::DOMAIN_SEPARATOR) } DOMAIN_SEPARATOR }, @@ -7911,9 +7755,9 @@ function settleSingle(address _signer, ILiquoriceSettlement.Single memory _order data: &[u8], ) -> alloy_sol_types::Result { ::abi_decode_raw_validate( - data, - ) - .map(LiquoriceSettlementCalls::settleSingle) + data, + ) + .map(LiquoriceSettlementCalls::settleSingle) } settleSingle }, @@ -7922,9 +7766,9 @@ function settleSingle(address _signer, ILiquoriceSettlement.Single memory _order data: &[u8], ) -> alloy_sol_types::Result { ::abi_decode_raw_validate( - data, - ) - .map(LiquoriceSettlementCalls::hashSingleOrder) + data, + ) + .map(LiquoriceSettlementCalls::hashSingleOrder) } hashSingleOrder }, @@ -7933,120 +7777,85 @@ function settleSingle(address _signer, ILiquoriceSettlement.Single memory _order data: &[u8], ) -> alloy_sol_types::Result { ::abi_decode_raw_validate( - data, - ) - .map(LiquoriceSettlementCalls::AUTHENTICATOR) + data, + ) + .map(LiquoriceSettlementCalls::AUTHENTICATOR) } AUTHENTICATOR }, { - fn settle( - data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) + fn settle(data: &[u8]) -> alloy_sol_types::Result { + ::abi_decode_raw_validate(data) .map(LiquoriceSettlementCalls::settle) } settle }, ]; let Ok(idx) = Self::SELECTORS.binary_search(&selector) else { - return Err( - alloy_sol_types::Error::unknown_selector( - ::NAME, - selector, - ), - ); + 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::AUTHENTICATOR(inner) => { - ::abi_encoded_size( - inner, - ) + ::abi_encoded_size(inner) } Self::BALANCE_MANAGER(inner) => { - ::abi_encoded_size( - inner, - ) + ::abi_encoded_size(inner) } Self::DOMAIN_SEPARATOR(inner) => { - ::abi_encoded_size( - inner, - ) + ::abi_encoded_size(inner) } Self::hashSingleOrder(inner) => { - ::abi_encoded_size( - inner, - ) + ::abi_encoded_size(inner) } Self::isValidSignature(inner) => { - ::abi_encoded_size( - inner, - ) + ::abi_encoded_size(inner) } Self::settle(inner) => { ::abi_encoded_size(inner) } Self::settleSingle(inner) => { - ::abi_encoded_size( - inner, - ) + ::abi_encoded_size(inner) } } } + #[inline] fn abi_encode_raw(&self, out: &mut alloy_sol_types::private::Vec) { match self { Self::AUTHENTICATOR(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } Self::BALANCE_MANAGER(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } Self::DOMAIN_SEPARATOR(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } Self::hashSingleOrder(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } Self::isValidSignature(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } Self::settle(inner) => { ::abi_encode_raw(inner, out) } Self::settleSingle(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } } } } ///Container for all the [`LiquoriceSettlement`](self) custom errors. - #[derive(Clone)] - #[derive(Debug, PartialEq, Eq, Hash)] + #[derive(Clone, Debug, PartialEq, Eq, Hash)] pub enum LiquoriceSettlementErrors { #[allow(missing_docs)] ECDSAInvalidSignature(ECDSAInvalidSignature), @@ -8114,8 +7923,9 @@ function settleSingle(address _signer, ILiquoriceSettlement.Single memory _order impl LiquoriceSettlementErrors { /// 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. + /// 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]] = &[ @@ -8151,40 +7961,6 @@ function settleSingle(address _signer, ILiquoriceSettlement.Single memory _order [246u8, 69u8, 238u8, 223u8], [252u8, 230u8, 152u8, 247u8], ]; - /// The names of the variants in the same order as `SELECTORS`. - pub const VARIANT_NAMES: &'static [&'static str] = &[ - ::core::stringify!(InvalidLendingPoolInteraction), - ::core::stringify!(SignatureIsNotEmpty), - ::core::stringify!(SignatureIsExpired), - ::core::stringify!(InvalidAmount), - ::core::stringify!(ReentrancyGuardReentrantCall), - ::core::stringify!(InvalidInteractionsBaseTokenAmounts), - ::core::stringify!(SafeERC20FailedOperation), - ::core::stringify!(InvalidEIP1271Signature), - ::core::stringify!(InvalidSignatureType), - ::core::stringify!(InvalidETHSignSignature), - ::core::stringify!(UpdatedMakerAmountsTooLow), - ::core::stringify!(InvalidInteractionsQuoteTokenAmounts), - ::core::stringify!(ReceiverNotManager), - ::core::stringify!(PartialFillNotSupported), - ::core::stringify!(InvalidSource), - ::core::stringify!(InvalidSigner), - ::core::stringify!(InvalidQuoteTokenAmounts), - ::core::stringify!(InvalidFillAmount), - ::core::stringify!(InvalidDestination), - ::core::stringify!(ZeroMakerAmount), - ::core::stringify!(NotMaker), - ::core::stringify!(InvalidEIP712Signature), - ::core::stringify!(NonceInvalid), - ::core::stringify!(InvalidBaseTokenAmounts), - ::core::stringify!(NotSolver), - ::core::stringify!(OrderExpired), - ::core::stringify!(InvalidAsset), - ::core::stringify!(InvalidHooksTarget), - ::core::stringify!(ECDSAInvalidSignatureS), - ::core::stringify!(ECDSAInvalidSignature), - ::core::stringify!(ECDSAInvalidSignatureLength), - ]; /// The signatures in the same order as `SELECTORS`. pub const SIGNATURES: &'static [&'static str] = &[ ::SIGNATURE, @@ -8219,6 +7995,41 @@ function settleSingle(address _signer, ILiquoriceSettlement.Single memory _order ::SIGNATURE, ::SIGNATURE, ]; + /// The names of the variants in the same order as `SELECTORS`. + pub const VARIANT_NAMES: &'static [&'static str] = &[ + ::core::stringify!(InvalidLendingPoolInteraction), + ::core::stringify!(SignatureIsNotEmpty), + ::core::stringify!(SignatureIsExpired), + ::core::stringify!(InvalidAmount), + ::core::stringify!(ReentrancyGuardReentrantCall), + ::core::stringify!(InvalidInteractionsBaseTokenAmounts), + ::core::stringify!(SafeERC20FailedOperation), + ::core::stringify!(InvalidEIP1271Signature), + ::core::stringify!(InvalidSignatureType), + ::core::stringify!(InvalidETHSignSignature), + ::core::stringify!(UpdatedMakerAmountsTooLow), + ::core::stringify!(InvalidInteractionsQuoteTokenAmounts), + ::core::stringify!(ReceiverNotManager), + ::core::stringify!(PartialFillNotSupported), + ::core::stringify!(InvalidSource), + ::core::stringify!(InvalidSigner), + ::core::stringify!(InvalidQuoteTokenAmounts), + ::core::stringify!(InvalidFillAmount), + ::core::stringify!(InvalidDestination), + ::core::stringify!(ZeroMakerAmount), + ::core::stringify!(NotMaker), + ::core::stringify!(InvalidEIP712Signature), + ::core::stringify!(NonceInvalid), + ::core::stringify!(InvalidBaseTokenAmounts), + ::core::stringify!(NotSolver), + ::core::stringify!(OrderExpired), + ::core::stringify!(InvalidAsset), + ::core::stringify!(InvalidHooksTarget), + ::core::stringify!(ECDSAInvalidSignatureS), + ::core::stringify!(ECDSAInvalidSignature), + ::core::stringify!(ECDSAInvalidSignatureLength), + ]; + /// Returns the signature for the given selector, if known. #[inline] pub fn signature_by_selector( @@ -8231,20 +8042,20 @@ function settleSingle(address _signer, ILiquoriceSettlement.Single memory _order ::core::result::Result::Err(_) => ::core::option::Option::None, } } + /// Returns the enum variant name for the given selector, if known. #[inline] - pub fn name_by_selector( - selector: [u8; 4usize], - ) -> ::core::option::Option<&'static str> { + pub fn name_by_selector(selector: [u8; 4usize]) -> ::core::option::Option<&'static str> { let sig = Self::signature_by_selector(selector)?; sig.split_once('(').map(|(name, _)| name) } } #[automatically_derived] impl alloy_sol_types::SolInterface for LiquoriceSettlementErrors { - const NAME: &'static str = "LiquoriceSettlementErrors"; - const MIN_DATA_LENGTH: usize = 0usize; const COUNT: usize = 31usize; + const MIN_DATA_LENGTH: usize = 0usize; + const NAME: &'static str = "LiquoriceSettlementErrors"; + #[inline] fn selector(&self) -> [u8; 4] { match self { @@ -8257,12 +8068,8 @@ function settleSingle(address _signer, ILiquoriceSettlement.Single memory _order Self::ECDSAInvalidSignatureS(_) => { ::SELECTOR } - Self::InvalidAmount(_) => { - ::SELECTOR - } - Self::InvalidAsset(_) => { - ::SELECTOR - } + Self::InvalidAmount(_) => ::SELECTOR, + Self::InvalidAsset(_) => ::SELECTOR, Self::InvalidBaseTokenAmounts(_) => { ::SELECTOR } @@ -8299,20 +8106,12 @@ function settleSingle(address _signer, ILiquoriceSettlement.Single memory _order Self::InvalidSignatureType(_) => { ::SELECTOR } - Self::InvalidSigner(_) => { - ::SELECTOR - } - Self::InvalidSource(_) => { - ::SELECTOR - } - Self::NonceInvalid(_) => { - ::SELECTOR - } + Self::InvalidSigner(_) => ::SELECTOR, + Self::InvalidSource(_) => ::SELECTOR, + Self::NonceInvalid(_) => ::SELECTOR, Self::NotMaker(_) => ::SELECTOR, Self::NotSolver(_) => ::SELECTOR, - Self::OrderExpired(_) => { - ::SELECTOR - } + Self::OrderExpired(_) => ::SELECTOR, Self::PartialFillNotSupported(_) => { ::SELECTOR } @@ -8339,23 +8138,24 @@ function settleSingle(address _signer, ILiquoriceSettlement.Single memory _order } } } + #[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 { + fn abi_decode_raw(selector: [u8; 4], data: &[u8]) -> alloy_sol_types::Result { static DECODE_SHIMS: &[fn( &[u8], - ) -> alloy_sol_types::Result] = &[ + ) + -> alloy_sol_types::Result] = &[ { fn InvalidLendingPoolInteraction( data: &[u8], @@ -8373,9 +8173,7 @@ function settleSingle(address _signer, ILiquoriceSettlement.Single memory _order fn SignatureIsNotEmpty( data: &[u8], ) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, - ) + ::abi_decode_raw(data) .map(LiquoriceSettlementErrors::SignatureIsNotEmpty) } SignatureIsNotEmpty @@ -8384,9 +8182,7 @@ function settleSingle(address _signer, ILiquoriceSettlement.Single memory _order fn SignatureIsExpired( data: &[u8], ) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, - ) + ::abi_decode_raw(data) .map(LiquoriceSettlementErrors::SignatureIsExpired) } SignatureIsExpired @@ -8395,9 +8191,7 @@ function settleSingle(address _signer, ILiquoriceSettlement.Single memory _order fn InvalidAmount( data: &[u8], ) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, - ) + ::abi_decode_raw(data) .map(LiquoriceSettlementErrors::InvalidAmount) } InvalidAmount @@ -8407,9 +8201,9 @@ function settleSingle(address _signer, ILiquoriceSettlement.Single memory _order data: &[u8], ) -> alloy_sol_types::Result { ::abi_decode_raw( - data, - ) - .map(LiquoriceSettlementErrors::ReentrancyGuardReentrantCall) + data, + ) + .map(LiquoriceSettlementErrors::ReentrancyGuardReentrantCall) } ReentrancyGuardReentrantCall }, @@ -8431,9 +8225,9 @@ function settleSingle(address _signer, ILiquoriceSettlement.Single memory _order data: &[u8], ) -> alloy_sol_types::Result { ::abi_decode_raw( - data, - ) - .map(LiquoriceSettlementErrors::SafeERC20FailedOperation) + data, + ) + .map(LiquoriceSettlementErrors::SafeERC20FailedOperation) } SafeERC20FailedOperation }, @@ -8441,9 +8235,7 @@ function settleSingle(address _signer, ILiquoriceSettlement.Single memory _order fn InvalidEIP1271Signature( data: &[u8], ) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, - ) + ::abi_decode_raw(data) .map(LiquoriceSettlementErrors::InvalidEIP1271Signature) } InvalidEIP1271Signature @@ -8452,9 +8244,7 @@ function settleSingle(address _signer, ILiquoriceSettlement.Single memory _order fn InvalidSignatureType( data: &[u8], ) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, - ) + ::abi_decode_raw(data) .map(LiquoriceSettlementErrors::InvalidSignatureType) } InvalidSignatureType @@ -8463,9 +8253,7 @@ function settleSingle(address _signer, ILiquoriceSettlement.Single memory _order fn InvalidETHSignSignature( data: &[u8], ) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, - ) + ::abi_decode_raw(data) .map(LiquoriceSettlementErrors::InvalidETHSignSignature) } InvalidETHSignSignature @@ -8475,9 +8263,9 @@ function settleSingle(address _signer, ILiquoriceSettlement.Single memory _order data: &[u8], ) -> alloy_sol_types::Result { ::abi_decode_raw( - data, - ) - .map(LiquoriceSettlementErrors::UpdatedMakerAmountsTooLow) + data, + ) + .map(LiquoriceSettlementErrors::UpdatedMakerAmountsTooLow) } UpdatedMakerAmountsTooLow }, @@ -8498,9 +8286,7 @@ function settleSingle(address _signer, ILiquoriceSettlement.Single memory _order fn ReceiverNotManager( data: &[u8], ) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, - ) + ::abi_decode_raw(data) .map(LiquoriceSettlementErrors::ReceiverNotManager) } ReceiverNotManager @@ -8509,9 +8295,7 @@ function settleSingle(address _signer, ILiquoriceSettlement.Single memory _order fn PartialFillNotSupported( data: &[u8], ) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, - ) + ::abi_decode_raw(data) .map(LiquoriceSettlementErrors::PartialFillNotSupported) } PartialFillNotSupported @@ -8520,9 +8304,7 @@ function settleSingle(address _signer, ILiquoriceSettlement.Single memory _order fn InvalidSource( data: &[u8], ) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, - ) + ::abi_decode_raw(data) .map(LiquoriceSettlementErrors::InvalidSource) } InvalidSource @@ -8531,9 +8313,7 @@ function settleSingle(address _signer, ILiquoriceSettlement.Single memory _order fn InvalidSigner( data: &[u8], ) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, - ) + ::abi_decode_raw(data) .map(LiquoriceSettlementErrors::InvalidSigner) } InvalidSigner @@ -8543,9 +8323,9 @@ function settleSingle(address _signer, ILiquoriceSettlement.Single memory _order data: &[u8], ) -> alloy_sol_types::Result { ::abi_decode_raw( - data, - ) - .map(LiquoriceSettlementErrors::InvalidQuoteTokenAmounts) + data, + ) + .map(LiquoriceSettlementErrors::InvalidQuoteTokenAmounts) } InvalidQuoteTokenAmounts }, @@ -8553,9 +8333,7 @@ function settleSingle(address _signer, ILiquoriceSettlement.Single memory _order fn InvalidFillAmount( data: &[u8], ) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, - ) + ::abi_decode_raw(data) .map(LiquoriceSettlementErrors::InvalidFillAmount) } InvalidFillAmount @@ -8564,9 +8342,7 @@ function settleSingle(address _signer, ILiquoriceSettlement.Single memory _order fn InvalidDestination( data: &[u8], ) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, - ) + ::abi_decode_raw(data) .map(LiquoriceSettlementErrors::InvalidDestination) } InvalidDestination @@ -8575,17 +8351,13 @@ function settleSingle(address _signer, ILiquoriceSettlement.Single memory _order fn ZeroMakerAmount( data: &[u8], ) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, - ) + ::abi_decode_raw(data) .map(LiquoriceSettlementErrors::ZeroMakerAmount) } ZeroMakerAmount }, { - fn NotMaker( - data: &[u8], - ) -> alloy_sol_types::Result { + fn NotMaker(data: &[u8]) -> alloy_sol_types::Result { ::abi_decode_raw(data) .map(LiquoriceSettlementErrors::NotMaker) } @@ -8595,9 +8367,7 @@ function settleSingle(address _signer, ILiquoriceSettlement.Single memory _order fn InvalidEIP712Signature( data: &[u8], ) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, - ) + ::abi_decode_raw(data) .map(LiquoriceSettlementErrors::InvalidEIP712Signature) } InvalidEIP712Signature @@ -8615,9 +8385,7 @@ function settleSingle(address _signer, ILiquoriceSettlement.Single memory _order fn InvalidBaseTokenAmounts( data: &[u8], ) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, - ) + ::abi_decode_raw(data) .map(LiquoriceSettlementErrors::InvalidBaseTokenAmounts) } InvalidBaseTokenAmounts @@ -8653,9 +8421,7 @@ function settleSingle(address _signer, ILiquoriceSettlement.Single memory _order fn InvalidHooksTarget( data: &[u8], ) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, - ) + ::abi_decode_raw(data) .map(LiquoriceSettlementErrors::InvalidHooksTarget) } InvalidHooksTarget @@ -8664,9 +8430,7 @@ function settleSingle(address _signer, ILiquoriceSettlement.Single memory _order fn ECDSAInvalidSignatureS( data: &[u8], ) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, - ) + ::abi_decode_raw(data) .map(LiquoriceSettlementErrors::ECDSAInvalidSignatureS) } ECDSAInvalidSignatureS @@ -8675,9 +8439,7 @@ function settleSingle(address _signer, ILiquoriceSettlement.Single memory _order fn ECDSAInvalidSignature( data: &[u8], ) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, - ) + ::abi_decode_raw(data) .map(LiquoriceSettlementErrors::ECDSAInvalidSignature) } ECDSAInvalidSignature @@ -8687,23 +8449,22 @@ function settleSingle(address _signer, ILiquoriceSettlement.Single memory _order data: &[u8], ) -> alloy_sol_types::Result { ::abi_decode_raw( - data, - ) - .map(LiquoriceSettlementErrors::ECDSAInvalidSignatureLength) + data, + ) + .map(LiquoriceSettlementErrors::ECDSAInvalidSignatureLength) } ECDSAInvalidSignatureLength }, ]; let Ok(idx) = Self::SELECTORS.binary_search(&selector) else { - return Err( - alloy_sol_types::Error::unknown_selector( - ::NAME, - selector, - ), - ); + return Err(alloy_sol_types::Error::unknown_selector( + ::NAME, + selector, + )); }; DECODE_SHIMS[idx](data) } + #[inline] #[allow(non_snake_case)] fn abi_decode_raw_validate( @@ -8712,7 +8473,9 @@ function settleSingle(address _signer, ILiquoriceSettlement.Single memory _order ) -> alloy_sol_types::Result { static DECODE_VALIDATE_SHIMS: &[fn( &[u8], - ) -> alloy_sol_types::Result] = &[ + ) -> alloy_sol_types::Result< + LiquoriceSettlementErrors, + >] = &[ { fn InvalidLendingPoolInteraction( data: &[u8], @@ -8731,9 +8494,9 @@ function settleSingle(address _signer, ILiquoriceSettlement.Single memory _order data: &[u8], ) -> alloy_sol_types::Result { ::abi_decode_raw_validate( - data, - ) - .map(LiquoriceSettlementErrors::SignatureIsNotEmpty) + data, + ) + .map(LiquoriceSettlementErrors::SignatureIsNotEmpty) } SignatureIsNotEmpty }, @@ -8742,9 +8505,9 @@ function settleSingle(address _signer, ILiquoriceSettlement.Single memory _order data: &[u8], ) -> alloy_sol_types::Result { ::abi_decode_raw_validate( - data, - ) - .map(LiquoriceSettlementErrors::SignatureIsExpired) + data, + ) + .map(LiquoriceSettlementErrors::SignatureIsExpired) } SignatureIsExpired }, @@ -8752,9 +8515,7 @@ function settleSingle(address _signer, ILiquoriceSettlement.Single memory _order fn InvalidAmount( data: &[u8], ) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) + ::abi_decode_raw_validate(data) .map(LiquoriceSettlementErrors::InvalidAmount) } InvalidAmount @@ -8856,9 +8617,9 @@ function settleSingle(address _signer, ILiquoriceSettlement.Single memory _order data: &[u8], ) -> alloy_sol_types::Result { ::abi_decode_raw_validate( - data, - ) - .map(LiquoriceSettlementErrors::ReceiverNotManager) + data, + ) + .map(LiquoriceSettlementErrors::ReceiverNotManager) } ReceiverNotManager }, @@ -8877,9 +8638,7 @@ function settleSingle(address _signer, ILiquoriceSettlement.Single memory _order fn InvalidSource( data: &[u8], ) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) + ::abi_decode_raw_validate(data) .map(LiquoriceSettlementErrors::InvalidSource) } InvalidSource @@ -8888,9 +8647,7 @@ function settleSingle(address _signer, ILiquoriceSettlement.Single memory _order fn InvalidSigner( data: &[u8], ) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) + ::abi_decode_raw_validate(data) .map(LiquoriceSettlementErrors::InvalidSigner) } InvalidSigner @@ -8911,9 +8668,9 @@ function settleSingle(address _signer, ILiquoriceSettlement.Single memory _order data: &[u8], ) -> alloy_sol_types::Result { ::abi_decode_raw_validate( - data, - ) - .map(LiquoriceSettlementErrors::InvalidFillAmount) + data, + ) + .map(LiquoriceSettlementErrors::InvalidFillAmount) } InvalidFillAmount }, @@ -8922,9 +8679,9 @@ function settleSingle(address _signer, ILiquoriceSettlement.Single memory _order data: &[u8], ) -> alloy_sol_types::Result { ::abi_decode_raw_validate( - data, - ) - .map(LiquoriceSettlementErrors::InvalidDestination) + data, + ) + .map(LiquoriceSettlementErrors::InvalidDestination) } InvalidDestination }, @@ -8933,19 +8690,15 @@ function settleSingle(address _signer, ILiquoriceSettlement.Single memory _order data: &[u8], ) -> alloy_sol_types::Result { ::abi_decode_raw_validate( - data, - ) - .map(LiquoriceSettlementErrors::ZeroMakerAmount) + data, + ) + .map(LiquoriceSettlementErrors::ZeroMakerAmount) } ZeroMakerAmount }, { - fn NotMaker( - data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) + fn NotMaker(data: &[u8]) -> alloy_sol_types::Result { + ::abi_decode_raw_validate(data) .map(LiquoriceSettlementErrors::NotMaker) } NotMaker @@ -8965,9 +8718,7 @@ function settleSingle(address _signer, ILiquoriceSettlement.Single memory _order fn NonceInvalid( data: &[u8], ) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) + ::abi_decode_raw_validate(data) .map(LiquoriceSettlementErrors::NonceInvalid) } NonceInvalid @@ -8987,9 +8738,7 @@ function settleSingle(address _signer, ILiquoriceSettlement.Single memory _order fn NotSolver( data: &[u8], ) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) + ::abi_decode_raw_validate(data) .map(LiquoriceSettlementErrors::NotSolver) } NotSolver @@ -8998,9 +8747,7 @@ function settleSingle(address _signer, ILiquoriceSettlement.Single memory _order fn OrderExpired( data: &[u8], ) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) + ::abi_decode_raw_validate(data) .map(LiquoriceSettlementErrors::OrderExpired) } OrderExpired @@ -9009,9 +8756,7 @@ function settleSingle(address _signer, ILiquoriceSettlement.Single memory _order fn InvalidAsset( data: &[u8], ) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) + ::abi_decode_raw_validate(data) .map(LiquoriceSettlementErrors::InvalidAsset) } InvalidAsset @@ -9021,9 +8766,9 @@ function settleSingle(address _signer, ILiquoriceSettlement.Single memory _order data: &[u8], ) -> alloy_sol_types::Result { ::abi_decode_raw_validate( - data, - ) - .map(LiquoriceSettlementErrors::InvalidHooksTarget) + data, + ) + .map(LiquoriceSettlementErrors::InvalidHooksTarget) } InvalidHooksTarget }, @@ -9062,15 +8807,14 @@ function settleSingle(address _signer, ILiquoriceSettlement.Single memory _order }, ]; let Ok(idx) = Self::SELECTORS.binary_search(&selector) else { - return Err( - alloy_sol_types::Error::unknown_selector( - ::NAME, - selector, - ), - ); + return Err(alloy_sol_types::Error::unknown_selector( + ::NAME, + selector, + )); }; DECODE_VALIDATE_SHIMS[idx](data) } + #[inline] fn abi_encoded_size(&self) -> usize { match self { @@ -9215,6 +8959,7 @@ function settleSingle(address _signer, ILiquoriceSettlement.Single memory _order } } } + #[inline] fn abi_encode_raw(&self, out: &mut alloy_sol_types::private::Vec) { match self { @@ -9402,8 +9147,7 @@ function settleSingle(address _signer, ILiquoriceSettlement.Single memory _order } } ///Container for all the [`LiquoriceSettlement`](self) events. - #[derive(Clone)] - #[derive(Debug, PartialEq, Eq, Hash)] + #[derive(Clone, Debug, PartialEq, Eq, Hash)] pub enum LiquoriceSettlementEvents { #[allow(missing_docs)] Interaction(Interaction), @@ -9413,32 +9157,34 @@ function settleSingle(address _signer, ILiquoriceSettlement.Single memory _order impl LiquoriceSettlementEvents { /// 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. + /// 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]] = &[ [ - 15u8, 206u8, 0u8, 124u8, 56u8, 198u8, 200u8, 237u8, 158u8, 84u8, 91u8, - 58u8, 20u8, 128u8, 149u8, 118u8, 39u8, 56u8, 97u8, 143u8, 140u8, 33u8, - 182u8, 115u8, 34u8, 38u8, 19u8, 228u8, 212u8, 87u8, 52u8, 182u8, + 15u8, 206u8, 0u8, 124u8, 56u8, 198u8, 200u8, 237u8, 158u8, 84u8, 91u8, 58u8, 20u8, + 128u8, 149u8, 118u8, 39u8, 56u8, 97u8, 143u8, 140u8, 33u8, 182u8, 115u8, 34u8, + 38u8, 19u8, 228u8, 212u8, 87u8, 52u8, 182u8, ], [ - 237u8, 153u8, 130u8, 126u8, 251u8, 55u8, 1u8, 111u8, 34u8, 117u8, 249u8, - 140u8, 75u8, 207u8, 113u8, 199u8, 85u8, 28u8, 117u8, 213u8, 158u8, 155u8, - 69u8, 15u8, 121u8, 250u8, 50u8, 230u8, 11u8, 230u8, 114u8, 194u8, + 237u8, 153u8, 130u8, 126u8, 251u8, 55u8, 1u8, 111u8, 34u8, 117u8, 249u8, 140u8, + 75u8, 207u8, 113u8, 199u8, 85u8, 28u8, 117u8, 213u8, 158u8, 155u8, 69u8, 15u8, + 121u8, 250u8, 50u8, 230u8, 11u8, 230u8, 114u8, 194u8, ], ]; - /// The names of the variants in the same order as `SELECTORS`. - pub const VARIANT_NAMES: &'static [&'static str] = &[ - ::core::stringify!(TradeOrder), - ::core::stringify!(Interaction), - ]; /// The signatures in the same order as `SELECTORS`. pub const SIGNATURES: &'static [&'static str] = &[ ::SIGNATURE, ::SIGNATURE, ]; + /// The names of the variants in the same order as `SELECTORS`. + pub const VARIANT_NAMES: &'static [&'static str] = &[ + ::core::stringify!(TradeOrder), + ::core::stringify!(Interaction), + ]; + /// Returns the signature for the given selector, if known. #[inline] pub fn signature_by_selector( @@ -9451,49 +9197,41 @@ function settleSingle(address _signer, ILiquoriceSettlement.Single memory _order ::core::result::Result::Err(_) => ::core::option::Option::None, } } + /// Returns the enum variant name for the given selector, if known. #[inline] - pub fn name_by_selector( - selector: [u8; 32usize], - ) -> ::core::option::Option<&'static str> { + pub fn name_by_selector(selector: [u8; 32usize]) -> ::core::option::Option<&'static str> { let sig = Self::signature_by_selector(selector)?; sig.split_once('(').map(|(name, _)| name) } } #[automatically_derived] impl alloy_sol_types::SolEventInterface for LiquoriceSettlementEvents { - const NAME: &'static str = "LiquoriceSettlementEvents"; const COUNT: usize = 2usize; + const NAME: &'static str = "LiquoriceSettlementEvents"; + 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, - ) + ::decode_raw_log(topics, data) .map(Self::Interaction) } Some(::SIGNATURE_HASH) => { - ::decode_raw_log( - topics, - data, - ) + ::decode_raw_log(topics, data) .map(Self::TradeOrder) } - _ => { - 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(), - ), + _ => 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(), ), - }) - } + ), + }), } } } @@ -9509,6 +9247,7 @@ function settleSingle(address _signer, ILiquoriceSettlement.Single memory _order } } } + fn into_log_data(self) -> alloy_sol_types::private::LogData { match self { Self::Interaction(inner) => { @@ -9520,10 +9259,10 @@ function settleSingle(address _signer, ILiquoriceSettlement.Single memory _order } } } - use alloy_contract as alloy_contract; + use alloy_contract; /**Creates a new wrapper around an on-chain [`LiquoriceSettlement`](self) contract instance. -See the [wrapper's documentation](`LiquoriceSettlementInstance`) for more details.*/ + See the [wrapper's documentation](`LiquoriceSettlementInstance`) for more details.*/ #[inline] pub const fn new< P: alloy_contract::private::Provider, @@ -9536,31 +9275,29 @@ See the [wrapper's documentation](`LiquoriceSettlementInstance`) for more detail } /**Deploys this contract using the given `provider` and constructor arguments, if any. -Returns a new instance of the contract, if the deployment was successful. + 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.*/ + 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, - >( + pub fn deploy, N: alloy_contract::private::Network>( __provider: P, authenticator_: alloy_sol_types::private::Address, repository_: alloy_sol_types::private::Address, permit2_: alloy_sol_types::private::Address, - ) -> impl ::core::future::Future< - Output = alloy_contract::Result>, - > { - LiquoriceSettlementInstance::< - P, - N, - >::deploy(__provider, authenticator_, repository_, permit2_) + ) -> impl ::core::future::Future>> + { + LiquoriceSettlementInstance::::deploy( + __provider, + authenticator_, + repository_, + permit2_, + ) } /**Creates a `RawCallBuilder` for deploying this contract using the given `provider` -and constructor arguments, if any. + 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.*/ + 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, @@ -9571,22 +9308,24 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ repository_: alloy_sol_types::private::Address, permit2_: alloy_sol_types::private::Address, ) -> alloy_contract::RawCallBuilder { - LiquoriceSettlementInstance::< - P, - N, - >::deploy_builder(__provider, authenticator_, repository_, permit2_) + LiquoriceSettlementInstance::::deploy_builder( + __provider, + authenticator_, + repository_, + permit2_, + ) } /**A [`LiquoriceSettlement`](self) instance. -Contains type-safe methods for interacting with an on-chain instance of the -[`LiquoriceSettlement`](self) contract located at a given `address`, using a given -provider `P`. + Contains type-safe methods for interacting with an on-chain instance of the + [`LiquoriceSettlement`](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. + 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.*/ + See the [module-level documentation](self) for all the available methods.*/ #[derive(Clone)] pub struct LiquoriceSettlementInstance { address: alloy_sol_types::private::Address, @@ -9597,33 +9336,32 @@ See the [module-level documentation](self) for all the available methods.*/ impl ::core::fmt::Debug for LiquoriceSettlementInstance { #[inline] fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { - f.debug_tuple("LiquoriceSettlementInstance").field(&self.address).finish() + f.debug_tuple("LiquoriceSettlementInstance") + .field(&self.address) + .finish() } } /// Instantiation and getters/setters. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > LiquoriceSettlementInstance { + impl, N: alloy_contract::private::Network> + LiquoriceSettlementInstance + { /**Creates a new wrapper around an on-chain [`LiquoriceSettlement`](self) contract instance. -See the [wrapper's documentation](`LiquoriceSettlementInstance`) for more details.*/ + See the [wrapper's documentation](`LiquoriceSettlementInstance`) for more details.*/ #[inline] - pub const fn new( - address: alloy_sol_types::private::Address, - __provider: P, - ) -> Self { + pub const fn new(address: alloy_sol_types::private::Address, __provider: P) -> Self { Self { address, provider: __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. + 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.*/ + For more fine-grained control over the deployment process, use [`deploy_builder`] instead.*/ #[inline] pub async fn deploy( __provider: P, @@ -9631,20 +9369,17 @@ For more fine-grained control over the deployment process, use [`deploy_builder` repository_: alloy_sol_types::private::Address, permit2_: alloy_sol_types::private::Address, ) -> alloy_contract::Result> { - let call_builder = Self::deploy_builder( - __provider, - authenticator_, - repository_, - permit2_, - ); + let call_builder = + Self::deploy_builder(__provider, authenticator_, repository_, permit2_); 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. + 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.*/ + 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, @@ -9656,33 +9391,35 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ __provider, [ &BYTECODE[..], - &alloy_sol_types::SolConstructor::abi_encode( - &constructorCall { - authenticator_, - repository_, - permit2_, - }, - )[..], + &alloy_sol_types::SolConstructor::abi_encode(&constructorCall { + authenticator_, + repository_, + permit2_, + })[..], ] - .concat() - .into(), + .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 { @@ -9690,7 +9427,8 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ } } impl LiquoriceSettlementInstance<&P, N> { - /// Clones the provider and returns a new instance with the cloned provider. + /// Clones the provider and returns a new instance with the cloned + /// provider. #[inline] pub fn with_cloned_provider(self) -> LiquoriceSettlementInstance { LiquoriceSettlementInstance { @@ -9701,38 +9439,41 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ } } /// Function calls. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > LiquoriceSettlementInstance { - /// Creates a new call builder using this contract instance's provider and address. + impl, N: alloy_contract::private::Network> + LiquoriceSettlementInstance + { + /// 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. + /// 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 [`AUTHENTICATOR`] function. - pub fn AUTHENTICATOR( - &self, - ) -> alloy_contract::SolCallBuilder<&P, AUTHENTICATORCall, N> { + pub fn AUTHENTICATOR(&self) -> alloy_contract::SolCallBuilder<&P, AUTHENTICATORCall, N> { self.call_builder(&AUTHENTICATORCall) } + ///Creates a new call builder for the [`BALANCE_MANAGER`] function. pub fn BALANCE_MANAGER( &self, ) -> alloy_contract::SolCallBuilder<&P, BALANCE_MANAGERCall, N> { self.call_builder(&BALANCE_MANAGERCall) } + ///Creates a new call builder for the [`DOMAIN_SEPARATOR`] function. pub fn DOMAIN_SEPARATOR( &self, ) -> alloy_contract::SolCallBuilder<&P, DOMAIN_SEPARATORCall, N> { self.call_builder(&DOMAIN_SEPARATORCall) } + ///Creates a new call builder for the [`hashSingleOrder`] function. pub fn hashSingleOrder( &self, @@ -9740,19 +9481,16 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ ) -> alloy_contract::SolCallBuilder<&P, hashSingleOrderCall, N> { self.call_builder(&hashSingleOrderCall { _order }) } + ///Creates a new call builder for the [`isValidSignature`] function. pub fn isValidSignature( &self, _hash: alloy_sol_types::private::FixedBytes<32>, _signature: alloy_sol_types::private::Bytes, ) -> alloy_contract::SolCallBuilder<&P, isValidSignatureCall, N> { - self.call_builder( - &isValidSignatureCall { - _hash, - _signature, - }, - ) + self.call_builder(&isValidSignatureCall { _hash, _signature }) } + ///Creates a new call builder for the [`settle`] function. pub fn settle( &self, @@ -9766,18 +9504,17 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ _makerSignature: ::RustType, _takerSignature: ::RustType, ) -> alloy_contract::SolCallBuilder<&P, settleCall, N> { - self.call_builder( - &settleCall { - _signer, - _filledTakerAmount, - _order, - _interactions, - _hooks, - _makerSignature, - _takerSignature, - }, - ) + self.call_builder(&settleCall { + _signer, + _filledTakerAmount, + _order, + _interactions, + _hooks, + _makerSignature, + _takerSignature, + }) } + ///Creates a new call builder for the [`settleSingle`] function. pub fn settleSingle( &self, @@ -9787,68 +9524,59 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ _filledTakerAmount: alloy_sol_types::private::primitives::aliases::U256, _takerSignature: ::RustType, ) -> alloy_contract::SolCallBuilder<&P, settleSingleCall, N> { - self.call_builder( - &settleSingleCall { - _signer, - _order, - _makerSignature, - _filledTakerAmount, - _takerSignature, - }, - ) + self.call_builder(&settleSingleCall { + _signer, + _order, + _makerSignature, + _filledTakerAmount, + _takerSignature, + }) } } /// Event filters. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > LiquoriceSettlementInstance { - /// Creates a new event filter using this contract instance's provider and address. + impl, N: alloy_contract::private::Network> + LiquoriceSettlementInstance + { + /// 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. + /// 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 [`Interaction`] event. pub fn Interaction_filter(&self) -> alloy_contract::Event<&P, Interaction, N> { self.event_filter::() } + ///Creates a new event filter for the [`TradeOrder`] event. pub fn TradeOrder_filter(&self) -> alloy_contract::Event<&P, TradeOrder, N> { self.event_filter::() } } } -pub type Instance = LiquoriceSettlement::LiquoriceSettlementInstance< - ::alloy_provider::DynProvider, ->; +pub type Instance = LiquoriceSettlement::LiquoriceSettlementInstance<::alloy_provider::DynProvider>; use { - std::{sync::LazyLock, collections::HashMap}, - anyhow::{Result, Context}, - alloy_primitives::{address, Address}, - alloy_provider::{Provider, DynProvider}, + alloy_primitives::{Address, address}, + alloy_provider::{DynProvider, Provider}, + anyhow::{Context, Result}, + std::{collections::HashMap, sync::LazyLock}, }; pub const fn deployment_info(chain_id: u64) -> Option<(Address, Option)> { match chain_id { - 1u64 => { - Some(( - ::alloy_primitives::address!( - "0x0448633eb8B0A42EfED924C42069E0DcF08fb552" - ), - None, - )) - } - 42161u64 => { - Some(( - ::alloy_primitives::address!( - "0x0448633eb8B0A42EfED924C42069E0DcF08fb552" - ), - None, - )) - } + 1u64 => Some(( + ::alloy_primitives::address!("0x0448633eb8B0A42EfED924C42069E0DcF08fb552"), + None, + )), + 42161u64 => Some(( + ::alloy_primitives::address!("0x0448633eb8B0A42EfED924C42069E0DcF08fb552"), + None, + )), _ => None, } } @@ -9865,9 +9593,7 @@ pub const fn deployment_block(chain_id: &u64) -> Option { } } impl Instance { - pub fn deployed( - provider: &DynProvider, - ) -> impl Future> + Send { + pub fn deployed(provider: &DynProvider) -> impl Future> + Send { async move { let chain_id = provider .get_chain_id() diff --git a/contracts/generated/contracts-generated/mockerc4626wrapper/src/lib.rs b/contracts/generated/contracts-generated/mockerc4626wrapper/src/lib.rs index 5141f3afc3..33f38b216f 100644 --- a/contracts/generated/contracts-generated/mockerc4626wrapper/src/lib.rs +++ b/contracts/generated/contracts-generated/mockerc4626wrapper/src/lib.rs @@ -1,4 +1,10 @@ -#![allow(unused_imports, unused_attributes, clippy::all, rustdoc::all, non_snake_case)] +#![allow( + unused_imports, + unused_attributes, + clippy::all, + rustdoc::all, + non_snake_case +)] //! Auto-generated contract bindings. Do not edit. /** @@ -269,8 +275,7 @@ interface MockERC4626Wrapper { clippy::empty_structs_with_brackets )] pub mod MockERC4626Wrapper { - use super::*; - use alloy_sol_types as alloy_sol_types; + use {super::*, alloy_sol_types}; /// The creation / init bytecode of the contract. /// /// ```text @@ -282,9 +287,9 @@ pub mod MockERC4626Wrapper { b"a\x01\0`@R4\x80\x15a\0\x10W__\xFD[P`@Qa\x0C\x178\x03\x80a\x0C\x17\x839\x81\x81\x01`@R\x81\x01\x90a\x002\x91\x90a\x01TV[\x83s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16`\x80\x81s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x81RPP\x82`\xFF\x16`\xA0\x81`\xFF\x16\x81RPP\x81`\xC0\x81\x81RPP\x80`\xE0\x81\x81RPPPPPPa\x01\xB8V[__\xFD[_s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x82\x16\x90P\x91\x90PV[_a\0\xBA\x82a\0\x91V[\x90P\x91\x90PV[a\0\xCA\x81a\0\xB0V[\x81\x14a\0\xD4W__\xFD[PV[_\x81Q\x90Pa\0\xE5\x81a\0\xC1V[\x92\x91PPV[_`\xFF\x82\x16\x90P\x91\x90PV[a\x01\0\x81a\0\xEBV[\x81\x14a\x01\nW__\xFD[PV[_\x81Q\x90Pa\x01\x1B\x81a\0\xF7V[\x92\x91PPV[_\x81\x90P\x91\x90PV[a\x013\x81a\x01!V[\x81\x14a\x01=W__\xFD[PV[_\x81Q\x90Pa\x01N\x81a\x01*V[\x92\x91PPV[____`\x80\x85\x87\x03\x12\x15a\x01lWa\x01ka\0\x8DV[[_a\x01y\x87\x82\x88\x01a\0\xD7V[\x94PP` a\x01\x8A\x87\x82\x88\x01a\x01\rV[\x93PP`@a\x01\x9B\x87\x82\x88\x01a\x01@V[\x92PP``a\x01\xAC\x87\x82\x88\x01a\x01@V[\x91PP\x92\x95\x91\x94P\x92PV[`\x80Q`\xA0Q`\xC0Q`\xE0Qa\n\x1Ea\x01\xF9_9_\x81\x81a\x02b\x01Ra\x05\\\x01R_\x81\x81a\x02\x83\x01Ra\x03H\x01R_a\x04\xAA\x01R_a\x04\xCE\x01Ra\n\x1E_\xF3\xFE`\x80`@R4\x80\x15a\0\x0FW__\xFD[P`\x046\x10a\0\xA7W_5`\xE0\x1C\x80c8\xD5.\x0F\x11a\0oW\x80c8\xD5.\x0F\x14a\x01wW\x80c@\xC1\x0F\x19\x14a\x01\x95W\x80cp\xA0\x821\x14a\x01\xB1W\x80c\x86Q\x92\xF7\x14a\x01\xE1W\x80c\xA9\x05\x9C\xBB\x14a\x01\xFFW\x80c\xDDb\xED>\x14a\x02/Wa\0\xA7V[\x80c\x07\xA2\xD1:\x14a\0\xABW\x80c\t^\xA7\xB3\x14a\0\xDBW\x80c\x0B6\xB8\xDB\x14a\x01\x0BW\x80c#\xB8r\xDD\x14a\x01)W\x80c1<\xE5g\x14a\x01YW[__\xFD[a\0\xC5`\x04\x806\x03\x81\x01\x90a\0\xC0\x91\x90a\x06\x84V[a\x02_V[`@Qa\0\xD2\x91\x90a\x06\xBEV[`@Q\x80\x91\x03\x90\xF3[a\0\xF5`\x04\x806\x03\x81\x01\x90a\0\xF0\x91\x90a\x071V[a\x02\xBEV[`@Qa\x01\x02\x91\x90a\x07\x89V[`@Q\x80\x91\x03\x90\xF3[a\x01\x13a\x03FV[`@Qa\x01 \x91\x90a\x06\xBEV[`@Q\x80\x91\x03\x90\xF3[a\x01C`\x04\x806\x03\x81\x01\x90a\x01>\x91\x90a\x07\xA2V[a\x03jV[`@Qa\x01P\x91\x90a\x07\x89V[`@Q\x80\x91\x03\x90\xF3[a\x01aa\x04\xA8V[`@Qa\x01n\x91\x90a\x08\rV[`@Q\x80\x91\x03\x90\xF3[a\x01\x7Fa\x04\xCCV[`@Qa\x01\x8C\x91\x90a\x085V[`@Q\x80\x91\x03\x90\xF3[a\x01\xAF`\x04\x806\x03\x81\x01\x90a\x01\xAA\x91\x90a\x071V[a\x04\xF0V[\0[a\x01\xCB`\x04\x806\x03\x81\x01\x90a\x01\xC6\x91\x90a\x08NV[a\x05FV[`@Qa\x01\xD8\x91\x90a\x06\xBEV[`@Q\x80\x91\x03\x90\xF3[a\x01\xE9a\x05ZV[`@Qa\x01\xF6\x91\x90a\x06\xBEV[`@Q\x80\x91\x03\x90\xF3[a\x02\x19`\x04\x806\x03\x81\x01\x90a\x02\x14\x91\x90a\x071V[a\x05~V[`@Qa\x02&\x91\x90a\x07\x89V[`@Q\x80\x91\x03\x90\xF3[a\x02I`\x04\x806\x03\x81\x01\x90a\x02D\x91\x90a\x08yV[a\x06-V[`@Qa\x02V\x91\x90a\x06\xBEV[`@Q\x80\x91\x03\x90\xF3[_\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\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\x83a\x02\xAD\x91\x90a\x08\xE4V[a\x02\xB7\x91\x90a\tRV[\x90P\x91\x90PV[_\x81`\x01_3s\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`\x01\x90P\x92\x91PPV[\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\x81V[_\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_ _3s\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_ _\x82\x82Ta\x03\xF2\x91\x90a\t\x82V[\x92PP\x81\x90UP\x81__\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_ _\x82\x82Ta\x04D\x91\x90a\t\x82V[\x92PP\x81\x90UP\x81__\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_ _\x82\x82Ta\x04\x96\x91\x90a\t\xB5V[\x92PP\x81\x90UP`\x01\x90P\x93\x92PPPV[\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\x81V[\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\x81V[\x80__\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_ _\x82\x82Ta\x05;\x91\x90a\t\xB5V[\x92PP\x81\x90UPPPV[_` R\x80_R`@_ _\x91P\x90PT\x81V[\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\x81V[_\x81__3s\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_ _\x82\x82Ta\x05\xCA\x91\x90a\t\x82V[\x92PP\x81\x90UP\x81__\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_ _\x82\x82Ta\x06\x1C\x91\x90a\t\xB5V[\x92PP\x81\x90UP`\x01\x90P\x92\x91PPV[`\x01` R\x81_R`@_ ` R\x80_R`@_ _\x91P\x91PPT\x81V[__\xFD[_\x81\x90P\x91\x90PV[a\x06c\x81a\x06QV[\x81\x14a\x06mW__\xFD[PV[_\x815\x90Pa\x06~\x81a\x06ZV[\x92\x91PPV[_` \x82\x84\x03\x12\x15a\x06\x99Wa\x06\x98a\x06MV[[_a\x06\xA6\x84\x82\x85\x01a\x06pV[\x91PP\x92\x91PPV[a\x06\xB8\x81a\x06QV[\x82RPPV[_` \x82\x01\x90Pa\x06\xD1_\x83\x01\x84a\x06\xAFV[\x92\x91PPV[_s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x82\x16\x90P\x91\x90PV[_a\x07\0\x82a\x06\xD7V[\x90P\x91\x90PV[a\x07\x10\x81a\x06\xF6V[\x81\x14a\x07\x1AW__\xFD[PV[_\x815\x90Pa\x07+\x81a\x07\x07V[\x92\x91PPV[__`@\x83\x85\x03\x12\x15a\x07GWa\x07Fa\x06MV[[_a\x07T\x85\x82\x86\x01a\x07\x1DV[\x92PP` a\x07e\x85\x82\x86\x01a\x06pV[\x91PP\x92P\x92\x90PV[_\x81\x15\x15\x90P\x91\x90PV[a\x07\x83\x81a\x07oV[\x82RPPV[_` \x82\x01\x90Pa\x07\x9C_\x83\x01\x84a\x07zV[\x92\x91PPV[___``\x84\x86\x03\x12\x15a\x07\xB9Wa\x07\xB8a\x06MV[[_a\x07\xC6\x86\x82\x87\x01a\x07\x1DV[\x93PP` a\x07\xD7\x86\x82\x87\x01a\x07\x1DV[\x92PP`@a\x07\xE8\x86\x82\x87\x01a\x06pV[\x91PP\x92P\x92P\x92V[_`\xFF\x82\x16\x90P\x91\x90PV[a\x08\x07\x81a\x07\xF2V[\x82RPPV[_` \x82\x01\x90Pa\x08 _\x83\x01\x84a\x07\xFEV[\x92\x91PPV[a\x08/\x81a\x06\xF6V[\x82RPPV[_` \x82\x01\x90Pa\x08H_\x83\x01\x84a\x08&V[\x92\x91PPV[_` \x82\x84\x03\x12\x15a\x08cWa\x08ba\x06MV[[_a\x08p\x84\x82\x85\x01a\x07\x1DV[\x91PP\x92\x91PPV[__`@\x83\x85\x03\x12\x15a\x08\x8FWa\x08\x8Ea\x06MV[[_a\x08\x9C\x85\x82\x86\x01a\x07\x1DV[\x92PP` a\x08\xAD\x85\x82\x86\x01a\x07\x1DV[\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`\x11`\x04R`$_\xFD[_a\x08\xEE\x82a\x06QV[\x91Pa\x08\xF9\x83a\x06QV[\x92P\x82\x82\x02a\t\x07\x81a\x06QV[\x91P\x82\x82\x04\x84\x14\x83\x15\x17a\t\x1EWa\t\x1Da\x08\xB7V[[P\x92\x91PPV[\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`\x12`\x04R`$_\xFD[_a\t\\\x82a\x06QV[\x91Pa\tg\x83a\x06QV[\x92P\x82a\twWa\tva\t%V[[\x82\x82\x04\x90P\x92\x91PPV[_a\t\x8C\x82a\x06QV[\x91Pa\t\x97\x83a\x06QV[\x92P\x82\x82\x03\x90P\x81\x81\x11\x15a\t\xAFWa\t\xAEa\x08\xB7V[[\x92\x91PPV[_a\t\xBF\x82a\x06QV[\x91Pa\t\xCA\x83a\x06QV[\x92P\x82\x82\x01\x90P\x80\x82\x11\x15a\t\xE2Wa\t\xE1a\x08\xB7V[[\x92\x91PPV\xFE\xA2dipfsX\"\x12 \xB5\xEB\xAF\xAB\"p\xA2\xC4\x1E\xB9\xCDG>\xB8\xAC\xA9XQ\x1F\xE1+s\x02U\x9D\x19~*\x87\x04\xC9KdsolcC\0\x08\x1E\x003", ); /**Constructor`. -```solidity -constructor(address _asset, uint8 _decimals, uint256 _rateNumerator, uint256 _rateDenominator); -```*/ + ```solidity + constructor(address _asset, uint8 _decimals, uint256 _rateNumerator, uint256 _rateDenominator); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct constructorCall { @@ -298,7 +303,7 @@ constructor(address _asset, uint8 _decimals, uint256 _rateNumerator, uint256 _ra pub _rateDenominator: alloy_sol_types::private::primitives::aliases::U256, } const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -317,9 +322,7 @@ constructor(address _asset, uint8 _decimals, uint256 _rateNumerator, uint256 _ra ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -359,39 +362,39 @@ constructor(address _asset, uint8 _decimals, uint256 _rateNumerator, uint256 _ra 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 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._asset, ), - as alloy_sol_types::SolType>::tokenize(&self._decimals), - as alloy_sol_types::SolType>::tokenize(&self._rateNumerator), - as alloy_sol_types::SolType>::tokenize(&self._rateDenominator), + as alloy_sol_types::SolType>::tokenize( + &self._decimals, + ), + as alloy_sol_types::SolType>::tokenize( + &self._rateNumerator, + ), + as alloy_sol_types::SolType>::tokenize( + &self._rateDenominator, + ), ) } } }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `allowance(address,address)` and selector `0xdd62ed3e`. -```solidity -function allowance(address, address) external view returns (uint256); -```*/ + ```solidity + function allowance(address, address) external view returns (uint256); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct allowanceCall { @@ -401,7 +404,8 @@ function allowance(address, address) external view returns (uint256); pub _1: alloy_sol_types::private::Address, } #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`allowance(address,address)`](allowanceCall) function. + ///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 { @@ -415,7 +419,7 @@ function allowance(address, address) external view returns (uint256); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -430,9 +434,7 @@ function allowance(address, address) external view returns (uint256); ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -450,7 +452,10 @@ function allowance(address, address) external view returns (uint256); #[doc(hidden)] impl ::core::convert::From> for allowanceCall { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { - Self { _0: tuple.0, _1: tuple.1 } + Self { + _0: tuple.0, + _1: tuple.1, + } } } } @@ -459,14 +464,10 @@ function allowance(address, address) external view returns (uint256); #[allow(dead_code)] type UnderlyingSolTuple<'a> = (alloy_sol_types::sol_data::Uint<256>,); #[doc(hidden)] - type UnderlyingRustTuple<'a> = ( - alloy_sol_types::private::primitives::aliases::U256, - ); + 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, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -494,22 +495,21 @@ function allowance(address, address) external view returns (uint256); 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 ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; 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)"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [221u8, 98u8, 237u8, 62u8]; + const SIGNATURE: &'static str = "allowance(address,address)"; + #[inline] fn new<'a>( tuple: as alloy_sol_types::SolType>::RustType, ) -> Self { tuple.into() } + #[inline] fn tokenize(&self) -> Self::Token<'_> { ( @@ -521,43 +521,43 @@ function allowance(address, address) external view returns (uint256); ), ) } + #[inline] fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { ( - as alloy_sol_types::SolType>::tokenize(ret), + 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| { + 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 - }) + 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(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `approve(address,uint256)` and selector `0x095ea7b3`. -```solidity -function approve(address spender, uint256 amount) external returns (bool); -```*/ + ```solidity + function approve(address spender, uint256 amount) external returns (bool); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct approveCall { @@ -567,7 +567,8 @@ function approve(address spender, uint256 amount) external returns (bool); pub amount: alloy_sol_types::private::primitives::aliases::U256, } #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`approve(address,uint256)`](approveCall) function. + ///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 { @@ -581,7 +582,7 @@ function approve(address spender, uint256 amount) external returns (bool); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -596,9 +597,7 @@ function approve(address spender, uint256 amount) external returns (bool); ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -631,9 +630,7 @@ function approve(address spender, uint256 amount) external returns (bool); type UnderlyingRustTuple<'a> = (bool,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -661,75 +658,71 @@ function approve(address spender, uint256 amount) external returns (bool); 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 ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; 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)"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [9u8, 94u8, 167u8, 179u8]; + const SIGNATURE: &'static str = "approve(address,uint256)"; + #[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.amount), + as alloy_sol_types::SolType>::tokenize( + &self.amount, + ), ) } + #[inline] fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { - ( - ::tokenize( - ret, - ), - ) + (::tokenize(ret),) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) - .map(|r| { + 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 - }) + 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(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `asset()` and selector `0x38d52e0f`. -```solidity -function asset() external view returns (address); -```*/ + ```solidity + function asset() external view returns (address); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct assetCall; #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`asset()`](assetCall) function. + ///Container type for the return parameters of the [`asset()`](assetCall) + /// function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct assetReturn { @@ -743,7 +736,7 @@ function asset() external view returns (address); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -752,9 +745,7 @@ function asset() external view returns (address); type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -784,9 +775,7 @@ function asset() external view returns (address); type UnderlyingRustTuple<'a> = (alloy_sol_types::private::Address,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -811,68 +800,64 @@ function asset() external view returns (address); #[automatically_derived] impl alloy_sol_types::SolCall for assetCall { type Parameters<'a> = (); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = alloy_sol_types::private::Address; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (alloy_sol_types::sol_data::Address,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "asset()"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [56u8, 213u8, 46u8, 15u8]; + const SIGNATURE: &'static str = "asset()"; + #[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, - ), - ) + (::tokenize(ret),) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) - .map(|r| { + as alloy_sol_types::SolType>::abi_decode_sequence(data).map( + |r| { let r: assetReturn = 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: assetReturn = r.into(); - r._0 - }) + 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: assetReturn = r.into(); + r._0 + }) } } }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `balanceOf(address)` and selector `0x70a08231`. -```solidity -function balanceOf(address) external view returns (uint256); -```*/ + ```solidity + function balanceOf(address) external view returns (uint256); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct balanceOfCall(pub alloy_sol_types::private::Address); #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`balanceOf(address)`](balanceOfCall) function. + ///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 { @@ -886,7 +871,7 @@ function balanceOf(address) external view returns (uint256); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -895,9 +880,7 @@ function balanceOf(address) external view returns (uint256); type UnderlyingRustTuple<'a> = (alloy_sol_types::private::Address,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -924,14 +907,10 @@ function balanceOf(address) external view returns (uint256); #[allow(dead_code)] type UnderlyingSolTuple<'a> = (alloy_sol_types::sol_data::Uint<256>,); #[doc(hidden)] - type UnderlyingRustTuple<'a> = ( - alloy_sol_types::private::primitives::aliases::U256, - ); + 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, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -956,22 +935,21 @@ function balanceOf(address) external view returns (uint256); #[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 ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; 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)"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [112u8, 160u8, 130u8, 49u8]; + const SIGNATURE: &'static str = "balanceOf(address)"; + #[inline] fn new<'a>( tuple: as alloy_sol_types::SolType>::RustType, ) -> Self { tuple.into() } + #[inline] fn tokenize(&self) -> Self::Token<'_> { ( @@ -980,43 +958,43 @@ function balanceOf(address) external view returns (uint256); ), ) } + #[inline] fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { ( - as alloy_sol_types::SolType>::tokenize(ret), + 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| { + 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 - }) + 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(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `convertToAssets(uint256)` and selector `0x07a2d13a`. -```solidity -function convertToAssets(uint256 shares) external view returns (uint256); -```*/ + ```solidity + function convertToAssets(uint256 shares) external view returns (uint256); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct convertToAssetsCall { @@ -1024,7 +1002,8 @@ function convertToAssets(uint256 shares) external view returns (uint256); pub shares: alloy_sol_types::private::primitives::aliases::U256, } #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`convertToAssets(uint256)`](convertToAssetsCall) function. + ///Container type for the return parameters of the + /// [`convertToAssets(uint256)`](convertToAssetsCall) function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct convertToAssetsReturn { @@ -1038,20 +1017,16 @@ function convertToAssets(uint256 shares) external view returns (uint256); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] type UnderlyingSolTuple<'a> = (alloy_sol_types::sol_data::Uint<256>,); #[doc(hidden)] - type UnderlyingRustTuple<'a> = ( - alloy_sol_types::private::primitives::aliases::U256, - ); + 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, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1078,14 +1053,10 @@ function convertToAssets(uint256 shares) external view returns (uint256); #[allow(dead_code)] type UnderlyingSolTuple<'a> = (alloy_sol_types::sol_data::Uint<256>,); #[doc(hidden)] - type UnderlyingRustTuple<'a> = ( - alloy_sol_types::private::primitives::aliases::U256, - ); + 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, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1094,16 +1065,14 @@ function convertToAssets(uint256 shares) external view returns (uint256); } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From - for UnderlyingRustTuple<'_> { + impl ::core::convert::From for UnderlyingRustTuple<'_> { fn from(value: convertToAssetsReturn) -> Self { (value._0,) } } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From> - for convertToAssetsReturn { + impl ::core::convert::From> for convertToAssetsReturn { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { Self { _0: tuple.0 } } @@ -1112,72 +1081,72 @@ function convertToAssets(uint256 shares) external view returns (uint256); #[automatically_derived] impl alloy_sol_types::SolCall for convertToAssetsCall { 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::primitives::aliases::U256; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (alloy_sol_types::sol_data::Uint<256>,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "convertToAssets(uint256)"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [7u8, 162u8, 209u8, 58u8]; + const SIGNATURE: &'static str = "convertToAssets(uint256)"; + #[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.shares), + as alloy_sol_types::SolType>::tokenize( + &self.shares, + ), ) } + #[inline] fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { ( - as alloy_sol_types::SolType>::tokenize(ret), + 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| { + as alloy_sol_types::SolType>::abi_decode_sequence(data).map( + |r| { let r: convertToAssetsReturn = 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: convertToAssetsReturn = r.into(); - r._0 - }) + 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: convertToAssetsReturn = r.into(); + r._0 + }) } } }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `decimals()` and selector `0x313ce567`. -```solidity -function decimals() external view returns (uint8); -```*/ + ```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(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`decimals()`](decimalsCall) function. + ///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 { @@ -1191,7 +1160,7 @@ function decimals() external view returns (uint8); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -1200,9 +1169,7 @@ function decimals() external view returns (uint8); type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1232,9 +1199,7 @@ function decimals() external view returns (uint8); type UnderlyingRustTuple<'a> = (u8,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1259,63 +1224,58 @@ function decimals() external view returns (uint8); #[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 ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; 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()"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [49u8, 60u8, 229u8, 103u8]; + const SIGNATURE: &'static str = "decimals()"; + #[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), - ) + ( 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| { + 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 - }) + 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(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `mint(address,uint256)` and selector `0x40c10f19`. -```solidity -function mint(address to, uint256 amount) external; -```*/ + ```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 { @@ -1324,7 +1284,8 @@ function mint(address to, uint256 amount) external; #[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. + ///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 {} @@ -1335,7 +1296,7 @@ function mint(address to, uint256 amount) external; clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -1350,9 +1311,7 @@ function mint(address to, uint256 amount) external; ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1385,9 +1344,7 @@ function mint(address to, uint256 amount) external; type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1410,9 +1367,7 @@ function mint(address to, uint256 amount) external; } } impl mintReturn { - fn _tokenize( - &self, - ) -> ::ReturnToken<'_> { + fn _tokenize(&self) -> ::ReturnToken<'_> { () } } @@ -1422,65 +1377,64 @@ function mint(address to, uint256 amount) external; 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 ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "mint(address,uint256)"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [64u8, 193u8, 15u8, 25u8]; + const SIGNATURE: &'static str = "mint(address,uint256)"; + #[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), + 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) + 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) + 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(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `rateDenominator()` and selector `0x865192f7`. -```solidity -function rateDenominator() external view returns (uint256); -```*/ + ```solidity + function rateDenominator() external view returns (uint256); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct rateDenominatorCall; #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`rateDenominator()`](rateDenominatorCall) function. + ///Container type for the return parameters of the + /// [`rateDenominator()`](rateDenominatorCall) function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct rateDenominatorReturn { @@ -1494,7 +1448,7 @@ function rateDenominator() external view returns (uint256); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -1503,9 +1457,7 @@ function rateDenominator() external view returns (uint256); type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1532,14 +1484,10 @@ function rateDenominator() external view returns (uint256); #[allow(dead_code)] type UnderlyingSolTuple<'a> = (alloy_sol_types::sol_data::Uint<256>,); #[doc(hidden)] - type UnderlyingRustTuple<'a> = ( - alloy_sol_types::private::primitives::aliases::U256, - ); + 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, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1548,16 +1496,14 @@ function rateDenominator() external view returns (uint256); } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From - for UnderlyingRustTuple<'_> { + impl ::core::convert::From for UnderlyingRustTuple<'_> { fn from(value: rateDenominatorReturn) -> Self { (value._0,) } } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From> - for rateDenominatorReturn { + impl ::core::convert::From> for rateDenominatorReturn { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { Self { _0: tuple.0 } } @@ -1566,68 +1512,68 @@ function rateDenominator() external view returns (uint256); #[automatically_derived] impl alloy_sol_types::SolCall for rateDenominatorCall { type Parameters<'a> = (); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = alloy_sol_types::private::primitives::aliases::U256; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (alloy_sol_types::sol_data::Uint<256>,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "rateDenominator()"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [134u8, 81u8, 146u8, 247u8]; + const SIGNATURE: &'static str = "rateDenominator()"; + #[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), + 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| { + as alloy_sol_types::SolType>::abi_decode_sequence(data).map( + |r| { let r: rateDenominatorReturn = 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: rateDenominatorReturn = r.into(); - r._0 - }) + 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: rateDenominatorReturn = r.into(); + r._0 + }) } } }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `rateNumerator()` and selector `0x0b36b8db`. -```solidity -function rateNumerator() external view returns (uint256); -```*/ + ```solidity + function rateNumerator() external view returns (uint256); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct rateNumeratorCall; #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`rateNumerator()`](rateNumeratorCall) function. + ///Container type for the return parameters of the + /// [`rateNumerator()`](rateNumeratorCall) function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct rateNumeratorReturn { @@ -1641,7 +1587,7 @@ function rateNumerator() external view returns (uint256); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -1650,9 +1596,7 @@ function rateNumerator() external view returns (uint256); type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1679,14 +1623,10 @@ function rateNumerator() external view returns (uint256); #[allow(dead_code)] type UnderlyingSolTuple<'a> = (alloy_sol_types::sol_data::Uint<256>,); #[doc(hidden)] - type UnderlyingRustTuple<'a> = ( - alloy_sol_types::private::primitives::aliases::U256, - ); + 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, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1711,63 +1651,62 @@ function rateNumerator() external view returns (uint256); #[automatically_derived] impl alloy_sol_types::SolCall for rateNumeratorCall { type Parameters<'a> = (); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = alloy_sol_types::private::primitives::aliases::U256; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (alloy_sol_types::sol_data::Uint<256>,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "rateNumerator()"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [11u8, 54u8, 184u8, 219u8]; + const SIGNATURE: &'static str = "rateNumerator()"; + #[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), + 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| { + as alloy_sol_types::SolType>::abi_decode_sequence(data).map( + |r| { let r: rateNumeratorReturn = 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: rateNumeratorReturn = r.into(); - r._0 - }) + 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: rateNumeratorReturn = r.into(); + r._0 + }) } } }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `transfer(address,uint256)` and selector `0xa9059cbb`. -```solidity -function transfer(address to, uint256 amount) external returns (bool); -```*/ + ```solidity + function transfer(address to, uint256 amount) external returns (bool); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct transferCall { @@ -1777,7 +1716,8 @@ function transfer(address to, uint256 amount) external returns (bool); pub amount: alloy_sol_types::private::primitives::aliases::U256, } #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`transfer(address,uint256)`](transferCall) function. + ///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 { @@ -1791,7 +1731,7 @@ function transfer(address to, uint256 amount) external returns (bool); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -1806,9 +1746,7 @@ function transfer(address to, uint256 amount) external returns (bool); ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1841,9 +1779,7 @@ function transfer(address to, uint256 amount) external returns (bool); type UnderlyingRustTuple<'a> = (bool,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1871,70 +1807,65 @@ function transfer(address to, uint256 amount) external returns (bool); 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 ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; 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)"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [169u8, 5u8, 156u8, 187u8]; + const SIGNATURE: &'static str = "transfer(address,uint256)"; + #[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), + as alloy_sol_types::SolType>::tokenize( + &self.amount, + ), ) } + #[inline] fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { - ( - ::tokenize( - ret, - ), - ) + (::tokenize(ret),) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) - .map(|r| { + 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 - }) + 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(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `transferFrom(address,address,uint256)` and selector `0x23b872dd`. -```solidity -function transferFrom(address from, address to, uint256 amount) external returns (bool); -```*/ + ```solidity + function transferFrom(address from, address to, uint256 amount) external returns (bool); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct transferFromCall { @@ -1946,7 +1877,8 @@ function transferFrom(address from, address to, uint256 amount) external returns pub amount: alloy_sol_types::private::primitives::aliases::U256, } #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`transferFrom(address,address,uint256)`](transferFromCall) function. + ///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 { @@ -1960,7 +1892,7 @@ function transferFrom(address from, address to, uint256 amount) external returns clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -1977,9 +1909,7 @@ function transferFrom(address from, address to, uint256 amount) external returns ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -2013,9 +1943,7 @@ function transferFrom(address from, address to, uint256 amount) external returns type UnderlyingRustTuple<'a> = (bool,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -2044,22 +1972,21 @@ function transferFrom(address from, address to, uint256 amount) external returns 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 ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; 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)"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [35u8, 184u8, 114u8, 221u8]; + const SIGNATURE: &'static str = "transferFrom(address,address,uint256)"; + #[inline] fn new<'a>( tuple: as alloy_sol_types::SolType>::RustType, ) -> Self { tuple.into() } + #[inline] fn tokenize(&self) -> Self::Token<'_> { ( @@ -2069,46 +1996,41 @@ function transferFrom(address from, address to, uint256 amount) external returns ::tokenize( &self.to, ), - as alloy_sol_types::SolType>::tokenize(&self.amount), + as alloy_sol_types::SolType>::tokenize( + &self.amount, + ), ) } + #[inline] fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { - ( - ::tokenize( - ret, - ), - ) + (::tokenize(ret),) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) - .map(|r| { + 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 - }) + 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 + }) } } }; ///Container for all the [`MockERC4626Wrapper`](self) function calls. #[derive(Clone)] - #[derive()] pub enum MockERC4626WrapperCalls { #[allow(missing_docs)] allowance(allowanceCall), @@ -2136,8 +2058,9 @@ function transferFrom(address from, address to, uint256 amount) external returns impl MockERC4626WrapperCalls { /// 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. + /// 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]] = &[ @@ -2153,20 +2076,6 @@ function transferFrom(address from, address to, uint256 amount) external returns [169u8, 5u8, 156u8, 187u8], [221u8, 98u8, 237u8, 62u8], ]; - /// The names of the variants in the same order as `SELECTORS`. - pub const VARIANT_NAMES: &'static [&'static str] = &[ - ::core::stringify!(convertToAssets), - ::core::stringify!(approve), - ::core::stringify!(rateNumerator), - ::core::stringify!(transferFrom), - ::core::stringify!(decimals), - ::core::stringify!(asset), - ::core::stringify!(mint), - ::core::stringify!(balanceOf), - ::core::stringify!(rateDenominator), - ::core::stringify!(transfer), - ::core::stringify!(allowance), - ]; /// The signatures in the same order as `SELECTORS`. pub const SIGNATURES: &'static [&'static str] = &[ ::SIGNATURE, @@ -2181,6 +2090,21 @@ function transferFrom(address from, address to, uint256 amount) external returns ::SIGNATURE, ::SIGNATURE, ]; + /// The names of the variants in the same order as `SELECTORS`. + pub const VARIANT_NAMES: &'static [&'static str] = &[ + ::core::stringify!(convertToAssets), + ::core::stringify!(approve), + ::core::stringify!(rateNumerator), + ::core::stringify!(transferFrom), + ::core::stringify!(decimals), + ::core::stringify!(asset), + ::core::stringify!(mint), + ::core::stringify!(balanceOf), + ::core::stringify!(rateDenominator), + ::core::stringify!(transfer), + ::core::stringify!(allowance), + ]; + /// Returns the signature for the given selector, if known. #[inline] pub fn signature_by_selector( @@ -2193,31 +2117,27 @@ function transferFrom(address from, address to, uint256 amount) external returns ::core::result::Result::Err(_) => ::core::option::Option::None, } } + /// Returns the enum variant name for the given selector, if known. #[inline] - pub fn name_by_selector( - selector: [u8; 4usize], - ) -> ::core::option::Option<&'static str> { + pub fn name_by_selector(selector: [u8; 4usize]) -> ::core::option::Option<&'static str> { let sig = Self::signature_by_selector(selector)?; sig.split_once('(').map(|(name, _)| name) } } #[automatically_derived] impl alloy_sol_types::SolInterface for MockERC4626WrapperCalls { - const NAME: &'static str = "MockERC4626WrapperCalls"; - const MIN_DATA_LENGTH: usize = 0usize; const COUNT: usize = 11usize; + const MIN_DATA_LENGTH: usize = 0usize; + const NAME: &'static str = "MockERC4626WrapperCalls"; + #[inline] fn selector(&self) -> [u8; 4] { match self { - Self::allowance(_) => { - ::SELECTOR - } + Self::allowance(_) => ::SELECTOR, Self::approve(_) => ::SELECTOR, Self::asset(_) => ::SELECTOR, - Self::balanceOf(_) => { - ::SELECTOR - } + Self::balanceOf(_) => ::SELECTOR, Self::convertToAssets(_) => { ::SELECTOR } @@ -2226,47 +2146,40 @@ function transferFrom(address from, address to, uint256 amount) external returns Self::rateDenominator(_) => { ::SELECTOR } - Self::rateNumerator(_) => { - ::SELECTOR - } + Self::rateNumerator(_) => ::SELECTOR, Self::transfer(_) => ::SELECTOR, - Self::transferFrom(_) => { - ::SELECTOR - } + Self::transferFrom(_) => ::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 { + fn abi_decode_raw(selector: [u8; 4], data: &[u8]) -> alloy_sol_types::Result { static DECODE_SHIMS: &[fn( &[u8], - ) -> alloy_sol_types::Result] = &[ + ) + -> alloy_sol_types::Result] = &[ { fn convertToAssets( data: &[u8], ) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, - ) + ::abi_decode_raw(data) .map(MockERC4626WrapperCalls::convertToAssets) } convertToAssets }, { - fn approve( - data: &[u8], - ) -> alloy_sol_types::Result { + fn approve(data: &[u8]) -> alloy_sol_types::Result { ::abi_decode_raw(data) .map(MockERC4626WrapperCalls::approve) } @@ -2276,9 +2189,7 @@ function transferFrom(address from, address to, uint256 amount) external returns fn rateNumerator( data: &[u8], ) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, - ) + ::abi_decode_raw(data) .map(MockERC4626WrapperCalls::rateNumerator) } rateNumerator @@ -2287,44 +2198,34 @@ function transferFrom(address from, address to, uint256 amount) external returns fn transferFrom( data: &[u8], ) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, - ) + ::abi_decode_raw(data) .map(MockERC4626WrapperCalls::transferFrom) } transferFrom }, { - fn decimals( - data: &[u8], - ) -> alloy_sol_types::Result { + fn decimals(data: &[u8]) -> alloy_sol_types::Result { ::abi_decode_raw(data) .map(MockERC4626WrapperCalls::decimals) } decimals }, { - fn asset( - data: &[u8], - ) -> alloy_sol_types::Result { + fn asset(data: &[u8]) -> alloy_sol_types::Result { ::abi_decode_raw(data) .map(MockERC4626WrapperCalls::asset) } asset }, { - fn mint( - data: &[u8], - ) -> alloy_sol_types::Result { + fn mint(data: &[u8]) -> alloy_sol_types::Result { ::abi_decode_raw(data) .map(MockERC4626WrapperCalls::mint) } mint }, { - fn balanceOf( - data: &[u8], - ) -> alloy_sol_types::Result { + fn balanceOf(data: &[u8]) -> alloy_sol_types::Result { ::abi_decode_raw(data) .map(MockERC4626WrapperCalls::balanceOf) } @@ -2334,26 +2235,20 @@ function transferFrom(address from, address to, uint256 amount) external returns fn rateDenominator( data: &[u8], ) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, - ) + ::abi_decode_raw(data) .map(MockERC4626WrapperCalls::rateDenominator) } rateDenominator }, { - fn transfer( - data: &[u8], - ) -> alloy_sol_types::Result { + fn transfer(data: &[u8]) -> alloy_sol_types::Result { ::abi_decode_raw(data) .map(MockERC4626WrapperCalls::transfer) } transfer }, { - fn allowance( - data: &[u8], - ) -> alloy_sol_types::Result { + fn allowance(data: &[u8]) -> alloy_sol_types::Result { ::abi_decode_raw(data) .map(MockERC4626WrapperCalls::allowance) } @@ -2361,15 +2256,14 @@ function transferFrom(address from, address to, uint256 amount) external returns }, ]; let Ok(idx) = Self::SELECTORS.binary_search(&selector) else { - return Err( - alloy_sol_types::Error::unknown_selector( - ::NAME, - selector, - ), - ); + return Err(alloy_sol_types::Error::unknown_selector( + ::NAME, + selector, + )); }; DECODE_SHIMS[idx](data) } + #[inline] #[allow(non_snake_case)] fn abi_decode_raw_validate( @@ -2378,25 +2272,23 @@ function transferFrom(address from, address to, uint256 amount) external returns ) -> alloy_sol_types::Result { static DECODE_VALIDATE_SHIMS: &[fn( &[u8], - ) -> alloy_sol_types::Result] = &[ + ) -> alloy_sol_types::Result< + MockERC4626WrapperCalls, + >] = &[ { fn convertToAssets( data: &[u8], ) -> alloy_sol_types::Result { ::abi_decode_raw_validate( - data, - ) - .map(MockERC4626WrapperCalls::convertToAssets) + data, + ) + .map(MockERC4626WrapperCalls::convertToAssets) } convertToAssets }, { - fn approve( - data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) + fn approve(data: &[u8]) -> alloy_sol_types::Result { + ::abi_decode_raw_validate(data) .map(MockERC4626WrapperCalls::approve) } approve @@ -2406,9 +2298,9 @@ function transferFrom(address from, address to, uint256 amount) external returns data: &[u8], ) -> alloy_sol_types::Result { ::abi_decode_raw_validate( - data, - ) - .map(MockERC4626WrapperCalls::rateNumerator) + data, + ) + .map(MockERC4626WrapperCalls::rateNumerator) } rateNumerator }, @@ -2417,52 +2309,36 @@ function transferFrom(address from, address to, uint256 amount) external returns data: &[u8], ) -> alloy_sol_types::Result { ::abi_decode_raw_validate( - data, - ) - .map(MockERC4626WrapperCalls::transferFrom) + data, + ) + .map(MockERC4626WrapperCalls::transferFrom) } transferFrom }, { - fn decimals( - data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) + fn decimals(data: &[u8]) -> alloy_sol_types::Result { + ::abi_decode_raw_validate(data) .map(MockERC4626WrapperCalls::decimals) } decimals }, { - fn asset( - data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) + fn asset(data: &[u8]) -> alloy_sol_types::Result { + ::abi_decode_raw_validate(data) .map(MockERC4626WrapperCalls::asset) } asset }, { - fn mint( - data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) + fn mint(data: &[u8]) -> alloy_sol_types::Result { + ::abi_decode_raw_validate(data) .map(MockERC4626WrapperCalls::mint) } mint }, { - fn balanceOf( - data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) + fn balanceOf(data: &[u8]) -> alloy_sol_types::Result { + ::abi_decode_raw_validate(data) .map(MockERC4626WrapperCalls::balanceOf) } balanceOf @@ -2472,45 +2348,36 @@ function transferFrom(address from, address to, uint256 amount) external returns data: &[u8], ) -> alloy_sol_types::Result { ::abi_decode_raw_validate( - data, - ) - .map(MockERC4626WrapperCalls::rateDenominator) + data, + ) + .map(MockERC4626WrapperCalls::rateDenominator) } rateDenominator }, { - fn transfer( - data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) + fn transfer(data: &[u8]) -> alloy_sol_types::Result { + ::abi_decode_raw_validate(data) .map(MockERC4626WrapperCalls::transfer) } transfer }, { - fn allowance( - data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) + fn allowance(data: &[u8]) -> alloy_sol_types::Result { + ::abi_decode_raw_validate(data) .map(MockERC4626WrapperCalls::allowance) } allowance }, ]; let Ok(idx) = Self::SELECTORS.binary_search(&selector) else { - return Err( - alloy_sol_types::Error::unknown_selector( - ::NAME, - selector, - ), - ); + return Err(alloy_sol_types::Error::unknown_selector( + ::NAME, + selector, + )); }; DECODE_VALIDATE_SHIMS[idx](data) } + #[inline] fn abi_encoded_size(&self) -> usize { match self { @@ -2527,9 +2394,7 @@ function transferFrom(address from, address to, uint256 amount) external returns ::abi_encoded_size(inner) } Self::convertToAssets(inner) => { - ::abi_encoded_size( - inner, - ) + ::abi_encoded_size(inner) } Self::decimals(inner) => { ::abi_encoded_size(inner) @@ -2538,33 +2403,25 @@ function transferFrom(address from, address to, uint256 amount) external returns ::abi_encoded_size(inner) } Self::rateDenominator(inner) => { - ::abi_encoded_size( - inner, - ) + ::abi_encoded_size(inner) } Self::rateNumerator(inner) => { - ::abi_encoded_size( - inner, - ) + ::abi_encoded_size(inner) } Self::transfer(inner) => { ::abi_encoded_size(inner) } Self::transferFrom(inner) => { - ::abi_encoded_size( - inner, - ) + ::abi_encoded_size(inner) } } } + #[inline] fn abi_encode_raw(&self, out: &mut alloy_sol_types::private::Vec) { match self { Self::allowance(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } Self::approve(inner) => { ::abi_encode_raw(inner, out) @@ -2573,57 +2430,36 @@ function transferFrom(address from, address to, uint256 amount) external returns ::abi_encode_raw(inner, out) } Self::balanceOf(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } Self::convertToAssets(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } Self::decimals(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } Self::mint(inner) => { ::abi_encode_raw(inner, out) } Self::rateDenominator(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } Self::rateNumerator(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } Self::transfer(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } Self::transferFrom(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } } } } - use alloy_contract as alloy_contract; + use alloy_contract; /**Creates a new wrapper around an on-chain [`MockERC4626Wrapper`](self) contract instance. -See the [wrapper's documentation](`MockERC4626WrapperInstance`) for more details.*/ + See the [wrapper's documentation](`MockERC4626WrapperInstance`) for more details.*/ #[inline] pub const fn new< P: alloy_contract::private::Provider, @@ -2636,32 +2472,31 @@ See the [wrapper's documentation](`MockERC4626WrapperInstance`) for more details } /**Deploys this contract using the given `provider` and constructor arguments, if any. -Returns a new instance of the contract, if the deployment was successful. + 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.*/ + 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, - >( + pub fn deploy, N: alloy_contract::private::Network>( __provider: P, _asset: alloy_sol_types::private::Address, _decimals: u8, _rateNumerator: alloy_sol_types::private::primitives::aliases::U256, _rateDenominator: alloy_sol_types::private::primitives::aliases::U256, - ) -> impl ::core::future::Future< - Output = alloy_contract::Result>, - > { - MockERC4626WrapperInstance::< - P, - N, - >::deploy(__provider, _asset, _decimals, _rateNumerator, _rateDenominator) + ) -> impl ::core::future::Future>> + { + MockERC4626WrapperInstance::::deploy( + __provider, + _asset, + _decimals, + _rateNumerator, + _rateDenominator, + ) } /**Creates a `RawCallBuilder` for deploying this contract using the given `provider` -and constructor arguments, if any. + 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.*/ + 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, @@ -2673,10 +2508,7 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ _rateNumerator: alloy_sol_types::private::primitives::aliases::U256, _rateDenominator: alloy_sol_types::private::primitives::aliases::U256, ) -> alloy_contract::RawCallBuilder { - MockERC4626WrapperInstance::< - P, - N, - >::deploy_builder( + MockERC4626WrapperInstance::::deploy_builder( __provider, _asset, _decimals, @@ -2686,15 +2518,15 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ } /**A [`MockERC4626Wrapper`](self) instance. -Contains type-safe methods for interacting with an on-chain instance of the -[`MockERC4626Wrapper`](self) contract located at a given `address`, using a given -provider `P`. + Contains type-safe methods for interacting with an on-chain instance of the + [`MockERC4626Wrapper`](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. + 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.*/ + See the [module-level documentation](self) for all the available methods.*/ #[derive(Clone)] pub struct MockERC4626WrapperInstance { address: alloy_sol_types::private::Address, @@ -2705,33 +2537,32 @@ See the [module-level documentation](self) for all the available methods.*/ impl ::core::fmt::Debug for MockERC4626WrapperInstance { #[inline] fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { - f.debug_tuple("MockERC4626WrapperInstance").field(&self.address).finish() + f.debug_tuple("MockERC4626WrapperInstance") + .field(&self.address) + .finish() } } /// Instantiation and getters/setters. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > MockERC4626WrapperInstance { + impl, N: alloy_contract::private::Network> + MockERC4626WrapperInstance + { /**Creates a new wrapper around an on-chain [`MockERC4626Wrapper`](self) contract instance. -See the [wrapper's documentation](`MockERC4626WrapperInstance`) for more details.*/ + See the [wrapper's documentation](`MockERC4626WrapperInstance`) for more details.*/ #[inline] - pub const fn new( - address: alloy_sol_types::private::Address, - __provider: P, - ) -> Self { + pub const fn new(address: alloy_sol_types::private::Address, __provider: P) -> Self { Self { address, provider: __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. + 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.*/ + For more fine-grained control over the deployment process, use [`deploy_builder`] instead.*/ #[inline] pub async fn deploy( __provider: P, @@ -2750,11 +2581,12 @@ For more fine-grained control over the deployment process, use [`deploy_builder` 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. + 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.*/ + 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, @@ -2767,34 +2599,36 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ __provider, [ &BYTECODE[..], - &alloy_sol_types::SolConstructor::abi_encode( - &constructorCall { - _asset, - _decimals, - _rateNumerator, - _rateDenominator, - }, - )[..], + &alloy_sol_types::SolConstructor::abi_encode(&constructorCall { + _asset, + _decimals, + _rateNumerator, + _rateDenominator, + })[..], ] - .concat() - .into(), + .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 { @@ -2802,7 +2636,8 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ } } impl MockERC4626WrapperInstance<&P, N> { - /// Clones the provider and returns a new instance with the cloned provider. + /// Clones the provider and returns a new instance with the cloned + /// provider. #[inline] pub fn with_cloned_provider(self) -> MockERC4626WrapperInstance { MockERC4626WrapperInstance { @@ -2813,20 +2648,22 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ } } /// Function calls. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > MockERC4626WrapperInstance { - /// Creates a new call builder using this contract instance's provider and address. + impl, N: alloy_contract::private::Network> + MockERC4626WrapperInstance + { + /// 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. + /// 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 [`allowance`] function. pub fn allowance( &self, @@ -2835,6 +2672,7 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ ) -> alloy_contract::SolCallBuilder<&P, allowanceCall, N> { self.call_builder(&allowanceCall { _0, _1 }) } + ///Creates a new call builder for the [`approve`] function. pub fn approve( &self, @@ -2843,10 +2681,12 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ ) -> alloy_contract::SolCallBuilder<&P, approveCall, N> { self.call_builder(&approveCall { spender, amount }) } + ///Creates a new call builder for the [`asset`] function. pub fn asset(&self) -> alloy_contract::SolCallBuilder<&P, assetCall, N> { self.call_builder(&assetCall) } + ///Creates a new call builder for the [`balanceOf`] function. pub fn balanceOf( &self, @@ -2854,6 +2694,7 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ ) -> alloy_contract::SolCallBuilder<&P, balanceOfCall, N> { self.call_builder(&balanceOfCall(_0)) } + ///Creates a new call builder for the [`convertToAssets`] function. pub fn convertToAssets( &self, @@ -2861,10 +2702,12 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ ) -> alloy_contract::SolCallBuilder<&P, convertToAssetsCall, N> { self.call_builder(&convertToAssetsCall { shares }) } + ///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 [`mint`] function. pub fn mint( &self, @@ -2873,18 +2716,19 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ ) -> alloy_contract::SolCallBuilder<&P, mintCall, N> { self.call_builder(&mintCall { to, amount }) } + ///Creates a new call builder for the [`rateDenominator`] function. pub fn rateDenominator( &self, ) -> alloy_contract::SolCallBuilder<&P, rateDenominatorCall, N> { self.call_builder(&rateDenominatorCall) } + ///Creates a new call builder for the [`rateNumerator`] function. - pub fn rateNumerator( - &self, - ) -> alloy_contract::SolCallBuilder<&P, rateNumeratorCall, N> { + pub fn rateNumerator(&self) -> alloy_contract::SolCallBuilder<&P, rateNumeratorCall, N> { self.call_builder(&rateNumeratorCall) } + ///Creates a new call builder for the [`transfer`] function. pub fn transfer( &self, @@ -2893,6 +2737,7 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ ) -> alloy_contract::SolCallBuilder<&P, transferCall, N> { self.call_builder(&transferCall { to, amount }) } + ///Creates a new call builder for the [`transferFrom`] function. pub fn transferFrom( &self, @@ -2900,24 +2745,19 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ to: alloy_sol_types::private::Address, amount: alloy_sol_types::private::primitives::aliases::U256, ) -> alloy_contract::SolCallBuilder<&P, transferFromCall, N> { - self.call_builder( - &transferFromCall { - from, - to, - amount, - }, - ) + self.call_builder(&transferFromCall { from, to, amount }) } } /// Event filters. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > MockERC4626WrapperInstance { - /// Creates a new event filter using this contract instance's provider and address. + impl, N: alloy_contract::private::Network> + MockERC4626WrapperInstance + { + /// 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. + /// 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> { @@ -2925,6 +2765,4 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ } } } -pub type Instance = MockERC4626Wrapper::MockERC4626WrapperInstance< - ::alloy_provider::DynProvider, ->; +pub type Instance = MockERC4626Wrapper::MockERC4626WrapperInstance<::alloy_provider::DynProvider>; diff --git a/contracts/generated/contracts-generated/mockuniswapv3factory/src/lib.rs b/contracts/generated/contracts-generated/mockuniswapv3factory/src/lib.rs index a582baf150..0630a3d004 100644 --- a/contracts/generated/contracts-generated/mockuniswapv3factory/src/lib.rs +++ b/contracts/generated/contracts-generated/mockuniswapv3factory/src/lib.rs @@ -1,4 +1,10 @@ -#![allow(unused_imports, unused_attributes, clippy::all, rustdoc::all, non_snake_case)] +#![allow( + unused_imports, + unused_attributes, + clippy::all, + rustdoc::all, + non_snake_case +)] //! Auto-generated contract bindings. Do not edit. /** @@ -90,8 +96,7 @@ interface MockUniswapV3Factory { clippy::empty_structs_with_brackets )] pub mod MockUniswapV3Factory { - use super::*; - use alloy_sol_types as alloy_sol_types; + use {super::*, alloy_sol_types}; /// The creation / init bytecode of the contract. /// /// ```text @@ -114,9 +119,9 @@ pub mod MockUniswapV3Factory { ); #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Event with signature `PoolCreated(address,address,uint24,int24,address)` and selector `0x783cca1c0412dd0d695e784568c96da2e9c22ff989357a2e8b1d9b2b4e6b7118`. -```solidity -event PoolCreated(address indexed token0, address indexed token1, uint24 indexed fee, int24 tickSpacing, address pool); -```*/ + ```solidity + event PoolCreated(address indexed token0, address indexed token1, uint24 indexed fee, int24 tickSpacing, address pool); + ```*/ #[allow( non_camel_case_types, non_snake_case, @@ -143,29 +148,30 @@ event PoolCreated(address indexed token0, address indexed token1, uint24 indexed clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[automatically_derived] impl alloy_sol_types::SolEvent for PoolCreated { + type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type DataTuple<'a> = ( alloy_sol_types::sol_data::Int<24>, 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::Address, alloy_sol_types::sol_data::Address, alloy_sol_types::sol_data::Uint<24>, ); - const SIGNATURE: &'static str = "PoolCreated(address,address,uint24,int24,address)"; - const SIGNATURE_HASH: alloy_sol_types::private::B256 = alloy_sol_types::private::B256::new([ - 120u8, 60u8, 202u8, 28u8, 4u8, 18u8, 221u8, 13u8, 105u8, 94u8, 120u8, - 69u8, 104u8, 201u8, 109u8, 162u8, 233u8, 194u8, 47u8, 249u8, 137u8, 53u8, - 122u8, 46u8, 139u8, 29u8, 155u8, 43u8, 78u8, 107u8, 113u8, 24u8, - ]); + const ANONYMOUS: bool = false; + const SIGNATURE: &'static str = "PoolCreated(address,address,uint24,int24,address)"; + const SIGNATURE_HASH: alloy_sol_types::private::B256 = + alloy_sol_types::private::B256::new([ + 120u8, 60u8, 202u8, 28u8, 4u8, 18u8, 221u8, 13u8, 105u8, 94u8, 120u8, 69u8, + 104u8, 201u8, 109u8, 162u8, 233u8, 194u8, 47u8, 249u8, 137u8, 53u8, 122u8, + 46u8, 139u8, 29u8, 155u8, 43u8, 78u8, 107u8, 113u8, 24u8, + ]); + #[allow(unused_variables)] #[inline] fn new( @@ -180,32 +186,33 @@ event PoolCreated(address indexed token0, address indexed token1, uint24 indexed pool: 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, - ), - ); + 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.tickSpacing), + as alloy_sol_types::SolType>::tokenize( + &self.tickSpacing, + ), ::tokenize( &self.pool, ), ) } + #[inline] fn topics(&self) -> ::RustType { ( @@ -215,6 +222,7 @@ event PoolCreated(address indexed token0, address indexed token1, uint24 indexed self.fee.clone(), ) } + #[inline] fn encode_topics_raw( &self, @@ -223,9 +231,7 @@ event PoolCreated(address indexed token0, address indexed token1, uint24 indexed if out.len() < ::COUNT { return Err(alloy_sol_types::Error::Overrun); } - out[0usize] = alloy_sol_types::abi::token::WordToken( - Self::SIGNATURE_HASH, - ); + out[0usize] = alloy_sol_types::abi::token::WordToken(Self::SIGNATURE_HASH); out[1usize] = ::encode_topic( &self.token0, ); @@ -243,6 +249,7 @@ event PoolCreated(address indexed token0, address indexed token1, uint24 indexed 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) } @@ -257,9 +264,9 @@ event PoolCreated(address indexed token0, address indexed token1, uint24 indexed }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `createPool(address,address,uint24)` and selector `0xa1671295`. -```solidity -function createPool(address tokenA, address tokenB, uint24 _fee) external returns (address pool); -```*/ + ```solidity + function createPool(address tokenA, address tokenB, uint24 _fee) external returns (address pool); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct createPoolCall { @@ -271,7 +278,8 @@ function createPool(address tokenA, address tokenB, uint24 _fee) external return pub _fee: alloy_sol_types::private::primitives::aliases::U24, } #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`createPool(address,address,uint24)`](createPoolCall) function. + ///Container type for the return parameters of the + /// [`createPool(address,address,uint24)`](createPoolCall) function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct createPoolReturn { @@ -285,7 +293,7 @@ function createPool(address tokenA, address tokenB, uint24 _fee) external return clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -302,9 +310,7 @@ function createPool(address tokenA, address tokenB, uint24 _fee) external return ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -338,9 +344,7 @@ function createPool(address tokenA, address tokenB, uint24 _fee) external return type UnderlyingRustTuple<'a> = (alloy_sol_types::private::Address,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -369,22 +373,21 @@ function createPool(address tokenA, address tokenB, uint24 _fee) external return alloy_sol_types::sol_data::Address, alloy_sol_types::sol_data::Uint<24>, ); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = alloy_sol_types::private::Address; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (alloy_sol_types::sol_data::Address,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "createPool(address,address,uint24)"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [161u8, 103u8, 18u8, 149u8]; + const SIGNATURE: &'static str = "createPool(address,address,uint24)"; + #[inline] fn new<'a>( tuple: as alloy_sol_types::SolType>::RustType, ) -> Self { tuple.into() } + #[inline] fn tokenize(&self) -> Self::Token<'_> { ( @@ -394,46 +397,41 @@ function createPool(address tokenA, address tokenB, uint24 _fee) external return ::tokenize( &self.tokenB, ), - as alloy_sol_types::SolType>::tokenize(&self._fee), + as alloy_sol_types::SolType>::tokenize( + &self._fee, + ), ) } + #[inline] fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { - ( - ::tokenize( - ret, - ), - ) + (::tokenize(ret),) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) - .map(|r| { + as alloy_sol_types::SolType>::abi_decode_sequence(data).map( + |r| { let r: createPoolReturn = r.into(); r.pool - }) + }, + ) } + #[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: createPoolReturn = r.into(); - r.pool - }) + 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: createPoolReturn = r.into(); + r.pool + }) } } }; ///Container for all the [`MockUniswapV3Factory`](self) function calls. #[derive(Clone)] - #[derive()] pub enum MockUniswapV3FactoryCalls { #[allow(missing_docs)] createPool(createPoolCall), @@ -441,19 +439,18 @@ function createPool(address tokenA, address tokenB, uint24 _fee) external return impl MockUniswapV3FactoryCalls { /// 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. + /// 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]] = &[[161u8, 103u8, 18u8, 149u8]]; - /// The names of the variants in the same order as `SELECTORS`. - pub const VARIANT_NAMES: &'static [&'static str] = &[ - ::core::stringify!(createPool), - ]; /// The signatures in the same order as `SELECTORS`. - pub const SIGNATURES: &'static [&'static str] = &[ - ::SIGNATURE, - ]; + pub const SIGNATURES: &'static [&'static str] = + &[::SIGNATURE]; + /// The names of the variants in the same order as `SELECTORS`. + pub const VARIANT_NAMES: &'static [&'static str] = &[::core::stringify!(createPool)]; + /// Returns the signature for the given selector, if known. #[inline] pub fn signature_by_selector( @@ -466,67 +463,59 @@ function createPool(address tokenA, address tokenB, uint24 _fee) external return ::core::result::Result::Err(_) => ::core::option::Option::None, } } + /// Returns the enum variant name for the given selector, if known. #[inline] - pub fn name_by_selector( - selector: [u8; 4usize], - ) -> ::core::option::Option<&'static str> { + pub fn name_by_selector(selector: [u8; 4usize]) -> ::core::option::Option<&'static str> { let sig = Self::signature_by_selector(selector)?; sig.split_once('(').map(|(name, _)| name) } } #[automatically_derived] impl alloy_sol_types::SolInterface for MockUniswapV3FactoryCalls { - const NAME: &'static str = "MockUniswapV3FactoryCalls"; - const MIN_DATA_LENGTH: usize = 96usize; const COUNT: usize = 1usize; + const MIN_DATA_LENGTH: usize = 96usize; + const NAME: &'static str = "MockUniswapV3FactoryCalls"; + #[inline] fn selector(&self) -> [u8; 4] { match self { - Self::createPool(_) => { - ::SELECTOR - } + Self::createPool(_) => ::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 { + fn abi_decode_raw(selector: [u8; 4], data: &[u8]) -> alloy_sol_types::Result { static DECODE_SHIMS: &[fn( &[u8], - ) -> alloy_sol_types::Result] = &[ - { - fn createPool( - data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, - ) - .map(MockUniswapV3FactoryCalls::createPool) - } - createPool - }, - ]; + ) + -> alloy_sol_types::Result] = &[{ + fn createPool(data: &[u8]) -> alloy_sol_types::Result { + ::abi_decode_raw(data) + .map(MockUniswapV3FactoryCalls::createPool) + } + createPool + }]; let Ok(idx) = Self::SELECTORS.binary_search(&selector) else { - return Err( - alloy_sol_types::Error::unknown_selector( - ::NAME, - selector, - ), - ); + return Err(alloy_sol_types::Error::unknown_selector( + ::NAME, + selector, + )); }; DECODE_SHIMS[idx](data) } + #[inline] #[allow(non_snake_case)] fn abi_decode_raw_validate( @@ -535,29 +524,24 @@ function createPool(address tokenA, address tokenB, uint24 _fee) external return ) -> alloy_sol_types::Result { static DECODE_VALIDATE_SHIMS: &[fn( &[u8], - ) -> alloy_sol_types::Result] = &[ - { - fn createPool( - data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) - .map(MockUniswapV3FactoryCalls::createPool) - } - createPool - }, - ]; + ) -> alloy_sol_types::Result< + MockUniswapV3FactoryCalls, + >] = &[{ + fn createPool(data: &[u8]) -> alloy_sol_types::Result { + ::abi_decode_raw_validate(data) + .map(MockUniswapV3FactoryCalls::createPool) + } + createPool + }]; let Ok(idx) = Self::SELECTORS.binary_search(&selector) else { - return Err( - alloy_sol_types::Error::unknown_selector( - ::NAME, - selector, - ), - ); + return Err(alloy_sol_types::Error::unknown_selector( + ::NAME, + selector, + )); }; DECODE_VALIDATE_SHIMS[idx](data) } + #[inline] fn abi_encoded_size(&self) -> usize { match self { @@ -566,21 +550,18 @@ function createPool(address tokenA, address tokenB, uint24 _fee) external return } } } + #[inline] fn abi_encode_raw(&self, out: &mut alloy_sol_types::private::Vec) { match self { Self::createPool(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } } } } ///Container for all the [`MockUniswapV3Factory`](self) events. - #[derive(Clone)] - #[derive(Debug, PartialEq, Eq, Hash)] + #[derive(Clone, Debug, PartialEq, Eq, Hash)] pub enum MockUniswapV3FactoryEvents { #[allow(missing_docs)] PoolCreated(PoolCreated), @@ -588,25 +569,22 @@ function createPool(address tokenA, address tokenB, uint24 _fee) external return impl MockUniswapV3FactoryEvents { /// 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. + /// 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]] = &[ - [ - 120u8, 60u8, 202u8, 28u8, 4u8, 18u8, 221u8, 13u8, 105u8, 94u8, 120u8, - 69u8, 104u8, 201u8, 109u8, 162u8, 233u8, 194u8, 47u8, 249u8, 137u8, 53u8, - 122u8, 46u8, 139u8, 29u8, 155u8, 43u8, 78u8, 107u8, 113u8, 24u8, - ], - ]; - /// The names of the variants in the same order as `SELECTORS`. - pub const VARIANT_NAMES: &'static [&'static str] = &[ - ::core::stringify!(PoolCreated), - ]; + pub const SELECTORS: &'static [[u8; 32usize]] = &[[ + 120u8, 60u8, 202u8, 28u8, 4u8, 18u8, 221u8, 13u8, 105u8, 94u8, 120u8, 69u8, 104u8, + 201u8, 109u8, 162u8, 233u8, 194u8, 47u8, 249u8, 137u8, 53u8, 122u8, 46u8, 139u8, 29u8, + 155u8, 43u8, 78u8, 107u8, 113u8, 24u8, + ]]; /// The signatures in the same order as `SELECTORS`. - pub const SIGNATURES: &'static [&'static str] = &[ - ::SIGNATURE, - ]; + pub const SIGNATURES: &'static [&'static str] = + &[::SIGNATURE]; + /// The names of the variants in the same order as `SELECTORS`. + pub const VARIANT_NAMES: &'static [&'static str] = &[::core::stringify!(PoolCreated)]; + /// Returns the signature for the given selector, if known. #[inline] pub fn signature_by_selector( @@ -619,42 +597,37 @@ function createPool(address tokenA, address tokenB, uint24 _fee) external return ::core::result::Result::Err(_) => ::core::option::Option::None, } } + /// Returns the enum variant name for the given selector, if known. #[inline] - pub fn name_by_selector( - selector: [u8; 32usize], - ) -> ::core::option::Option<&'static str> { + pub fn name_by_selector(selector: [u8; 32usize]) -> ::core::option::Option<&'static str> { let sig = Self::signature_by_selector(selector)?; sig.split_once('(').map(|(name, _)| name) } } #[automatically_derived] impl alloy_sol_types::SolEventInterface for MockUniswapV3FactoryEvents { - const NAME: &'static str = "MockUniswapV3FactoryEvents"; const COUNT: usize = 1usize; + const NAME: &'static str = "MockUniswapV3FactoryEvents"; + 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, - ) + ::decode_raw_log(topics, data) .map(Self::PoolCreated) } - _ => { - 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(), - ), + _ => 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(), ), - }) - } + ), + }), } } } @@ -667,6 +640,7 @@ function createPool(address tokenA, address tokenB, uint24 _fee) external return } } } + fn into_log_data(self) -> alloy_sol_types::private::LogData { match self { Self::PoolCreated(inner) => { @@ -675,10 +649,10 @@ function createPool(address tokenA, address tokenB, uint24 _fee) external return } } } - use alloy_contract as alloy_contract; + use alloy_contract; /**Creates a new wrapper around an on-chain [`MockUniswapV3Factory`](self) contract instance. -See the [wrapper's documentation](`MockUniswapV3FactoryInstance`) for more details.*/ + See the [wrapper's documentation](`MockUniswapV3FactoryInstance`) for more details.*/ #[inline] pub const fn new< P: alloy_contract::private::Provider, @@ -691,43 +665,41 @@ See the [wrapper's documentation](`MockUniswapV3FactoryInstance`) for more detai } /**Deploys this contract using the given `provider` and constructor arguments, if any. -Returns a new instance of the contract, if the deployment was successful. + 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.*/ + 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, - >( + pub fn deploy, N: alloy_contract::private::Network>( __provider: P, - ) -> impl ::core::future::Future< - Output = alloy_contract::Result>, - > { + ) -> impl ::core::future::Future>> + { MockUniswapV3FactoryInstance::::deploy(__provider) } /**Creates a `RawCallBuilder` for deploying this contract using the given `provider` -and constructor arguments, if any. + 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.*/ + 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) -> alloy_contract::RawCallBuilder { + >( + __provider: P, + ) -> alloy_contract::RawCallBuilder { MockUniswapV3FactoryInstance::::deploy_builder(__provider) } /**A [`MockUniswapV3Factory`](self) instance. -Contains type-safe methods for interacting with an on-chain instance of the -[`MockUniswapV3Factory`](self) contract located at a given `address`, using a given -provider `P`. + Contains type-safe methods for interacting with an on-chain instance of the + [`MockUniswapV3Factory`](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. + 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.*/ + See the [module-level documentation](self) for all the available methods.*/ #[derive(Clone)] pub struct MockUniswapV3FactoryInstance { address: alloy_sol_types::private::Address, @@ -738,33 +710,32 @@ See the [module-level documentation](self) for all the available methods.*/ impl ::core::fmt::Debug for MockUniswapV3FactoryInstance { #[inline] fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { - f.debug_tuple("MockUniswapV3FactoryInstance").field(&self.address).finish() + f.debug_tuple("MockUniswapV3FactoryInstance") + .field(&self.address) + .finish() } } /// Instantiation and getters/setters. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > MockUniswapV3FactoryInstance { + impl, N: alloy_contract::private::Network> + MockUniswapV3FactoryInstance + { /**Creates a new wrapper around an on-chain [`MockUniswapV3Factory`](self) contract instance. -See the [wrapper's documentation](`MockUniswapV3FactoryInstance`) for more details.*/ + See the [wrapper's documentation](`MockUniswapV3FactoryInstance`) for more details.*/ #[inline] - pub const fn new( - address: alloy_sol_types::private::Address, - __provider: P, - ) -> Self { + pub const fn new(address: alloy_sol_types::private::Address, __provider: P) -> Self { Self { address, provider: __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. + 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.*/ + For more fine-grained control over the deployment process, use [`deploy_builder`] instead.*/ #[inline] pub async fn deploy( __provider: P, @@ -773,11 +744,12 @@ For more fine-grained control over the deployment process, use [`deploy_builder` 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. + 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.*/ + 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( @@ -785,21 +757,25 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ ::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 { @@ -807,7 +783,8 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ } } impl MockUniswapV3FactoryInstance<&P, N> { - /// Clones the provider and returns a new instance with the cloned provider. + /// Clones the provider and returns a new instance with the cloned + /// provider. #[inline] pub fn with_cloned_provider(self) -> MockUniswapV3FactoryInstance { MockUniswapV3FactoryInstance { @@ -818,20 +795,22 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ } } /// Function calls. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > MockUniswapV3FactoryInstance { - /// Creates a new call builder using this contract instance's provider and address. + impl, N: alloy_contract::private::Network> + MockUniswapV3FactoryInstance + { + /// 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. + /// 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 [`createPool`] function. pub fn createPool( &self, @@ -839,35 +818,34 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ tokenB: alloy_sol_types::private::Address, _fee: alloy_sol_types::private::primitives::aliases::U24, ) -> alloy_contract::SolCallBuilder<&P, createPoolCall, N> { - self.call_builder( - &createPoolCall { - tokenA, - tokenB, - _fee, - }, - ) + self.call_builder(&createPoolCall { + tokenA, + tokenB, + _fee, + }) } } /// Event filters. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > MockUniswapV3FactoryInstance { - /// Creates a new event filter using this contract instance's provider and address. + impl, N: alloy_contract::private::Network> + MockUniswapV3FactoryInstance + { + /// 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. + /// 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 [`PoolCreated`] event. pub fn PoolCreated_filter(&self) -> alloy_contract::Event<&P, PoolCreated, N> { self.event_filter::() } } } -pub type Instance = MockUniswapV3Factory::MockUniswapV3FactoryInstance< - ::alloy_provider::DynProvider, ->; +pub type Instance = + MockUniswapV3Factory::MockUniswapV3FactoryInstance<::alloy_provider::DynProvider>; diff --git a/contracts/generated/contracts-generated/mockuniswapv3pool/src/lib.rs b/contracts/generated/contracts-generated/mockuniswapv3pool/src/lib.rs index 89eaa46d2d..eb3f2808c8 100644 --- a/contracts/generated/contracts-generated/mockuniswapv3pool/src/lib.rs +++ b/contracts/generated/contracts-generated/mockuniswapv3pool/src/lib.rs @@ -1,4 +1,10 @@ -#![allow(unused_imports, unused_attributes, clippy::all, rustdoc::all, non_snake_case)] +#![allow( + unused_imports, + unused_attributes, + clippy::all, + rustdoc::all, + non_snake_case +)] //! Auto-generated contract bindings. Do not edit. /** @@ -214,8 +220,7 @@ interface MockUniswapV3Pool { clippy::empty_structs_with_brackets )] pub mod MockUniswapV3Pool { - use super::*; - use alloy_sol_types as alloy_sol_types; + use {super::*, alloy_sol_types}; /// The creation / init bytecode of the contract. /// /// ```text @@ -238,9 +243,9 @@ pub mod MockUniswapV3Pool { ); #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Event with signature `Initialize(uint160,int24)` and selector `0x98636036cb66a9c19a37435efc1e90142190214e8abeb821bdba3f2990dd4c95`. -```solidity -event Initialize(uint160 sqrtPriceX96, int24 tick); -```*/ + ```solidity + event Initialize(uint160 sqrtPriceX96, int24 tick); + ```*/ #[allow( non_camel_case_types, non_snake_case, @@ -261,24 +266,25 @@ event Initialize(uint160 sqrtPriceX96, int24 tick); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[automatically_derived] impl alloy_sol_types::SolEvent for Initialize { + type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type DataTuple<'a> = ( alloy_sol_types::sol_data::Uint<160>, alloy_sol_types::sol_data::Int<24>, ); - type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type TopicList = (alloy_sol_types::sol_data::FixedBytes<32>,); - const SIGNATURE: &'static str = "Initialize(uint160,int24)"; - const SIGNATURE_HASH: alloy_sol_types::private::B256 = alloy_sol_types::private::B256::new([ - 152u8, 99u8, 96u8, 54u8, 203u8, 102u8, 169u8, 193u8, 154u8, 55u8, 67u8, - 94u8, 252u8, 30u8, 144u8, 20u8, 33u8, 144u8, 33u8, 78u8, 138u8, 190u8, - 184u8, 33u8, 189u8, 186u8, 63u8, 41u8, 144u8, 221u8, 76u8, 149u8, - ]); + const ANONYMOUS: bool = false; + const SIGNATURE: &'static str = "Initialize(uint160,int24)"; + const SIGNATURE_HASH: alloy_sol_types::private::B256 = + alloy_sol_types::private::B256::new([ + 152u8, 99u8, 96u8, 54u8, 203u8, 102u8, 169u8, 193u8, 154u8, 55u8, 67u8, 94u8, + 252u8, 30u8, 144u8, 20u8, 33u8, 144u8, 33u8, 78u8, 138u8, 190u8, 184u8, 33u8, + 189u8, 186u8, 63u8, 41u8, 144u8, 221u8, 76u8, 149u8, + ]); + #[allow(unused_variables)] #[inline] fn new( @@ -290,36 +296,38 @@ event Initialize(uint160 sqrtPriceX96, int24 tick); tick: 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, - ), - ); + 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.sqrtPriceX96), - as alloy_sol_types::SolType>::tokenize(&self.tick), + as alloy_sol_types::SolType>::tokenize( + &self.sqrtPriceX96, + ), + as alloy_sol_types::SolType>::tokenize( + &self.tick, + ), ) } + #[inline] fn topics(&self) -> ::RustType { (Self::SIGNATURE_HASH.into(),) } + #[inline] fn encode_topics_raw( &self, @@ -328,9 +336,7 @@ event Initialize(uint160 sqrtPriceX96, int24 tick); if out.len() < ::COUNT { return Err(alloy_sol_types::Error::Overrun); } - out[0usize] = alloy_sol_types::abi::token::WordToken( - Self::SIGNATURE_HASH, - ); + out[0usize] = alloy_sol_types::abi::token::WordToken(Self::SIGNATURE_HASH); Ok(()) } } @@ -339,6 +345,7 @@ event Initialize(uint160 sqrtPriceX96, int24 tick); 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) } @@ -353,9 +360,9 @@ event Initialize(uint160 sqrtPriceX96, int24 tick); }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Event with signature `Mint(address,address,int24,int24,uint128,uint256,uint256)` and selector `0x7a53080ba414158be7ec69b987b5fb7d07dee101fe85488f0853ae16239d0bde`. -```solidity -event Mint(address sender, address indexed owner, int24 indexed tickLower, int24 indexed tickUpper, uint128 amount, uint256 amount0, uint256 amount1); -```*/ + ```solidity + event Mint(address sender, address indexed owner, int24 indexed tickLower, int24 indexed tickUpper, uint128 amount, uint256 amount0, uint256 amount1); + ```*/ #[allow( non_camel_case_types, non_snake_case, @@ -386,31 +393,33 @@ event Mint(address sender, address indexed owner, int24 indexed tickLower, int24 clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[automatically_derived] impl alloy_sol_types::SolEvent for Mint { + type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type DataTuple<'a> = ( alloy_sol_types::sol_data::Address, alloy_sol_types::sol_data::Uint<128>, alloy_sol_types::sol_data::Uint<256>, 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::Int<24>, alloy_sol_types::sol_data::Int<24>, ); - const SIGNATURE: &'static str = "Mint(address,address,int24,int24,uint128,uint256,uint256)"; - const SIGNATURE_HASH: alloy_sol_types::private::B256 = alloy_sol_types::private::B256::new([ - 122u8, 83u8, 8u8, 11u8, 164u8, 20u8, 21u8, 139u8, 231u8, 236u8, 105u8, - 185u8, 135u8, 181u8, 251u8, 125u8, 7u8, 222u8, 225u8, 1u8, 254u8, 133u8, - 72u8, 143u8, 8u8, 83u8, 174u8, 22u8, 35u8, 157u8, 11u8, 222u8, - ]); + const ANONYMOUS: bool = false; + const SIGNATURE: &'static str = + "Mint(address,address,int24,int24,uint128,uint256,uint256)"; + const SIGNATURE_HASH: alloy_sol_types::private::B256 = + alloy_sol_types::private::B256::new([ + 122u8, 83u8, 8u8, 11u8, 164u8, 20u8, 21u8, 139u8, 231u8, 236u8, 105u8, 185u8, + 135u8, 181u8, 251u8, 125u8, 7u8, 222u8, 225u8, 1u8, 254u8, 133u8, 72u8, 143u8, + 8u8, 83u8, 174u8, 22u8, 35u8, 157u8, 11u8, 222u8, + ]); + #[allow(unused_variables)] #[inline] fn new( @@ -427,38 +436,39 @@ event Mint(address sender, address indexed owner, int24 indexed tickLower, int24 amount1: data.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, - ), - ); + 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.sender, ), - as alloy_sol_types::SolType>::tokenize(&self.amount), - as alloy_sol_types::SolType>::tokenize(&self.amount0), - as alloy_sol_types::SolType>::tokenize(&self.amount1), + as alloy_sol_types::SolType>::tokenize( + &self.amount, + ), + as alloy_sol_types::SolType>::tokenize( + &self.amount0, + ), + as alloy_sol_types::SolType>::tokenize( + &self.amount1, + ), ) } + #[inline] fn topics(&self) -> ::RustType { ( @@ -468,6 +478,7 @@ event Mint(address sender, address indexed owner, int24 indexed tickLower, int24 self.tickUpper.clone(), ) } + #[inline] fn encode_topics_raw( &self, @@ -476,9 +487,7 @@ event Mint(address sender, address indexed owner, int24 indexed tickLower, int24 if out.len() < ::COUNT { return Err(alloy_sol_types::Error::Overrun); } - out[0usize] = alloy_sol_types::abi::token::WordToken( - Self::SIGNATURE_HASH, - ); + out[0usize] = alloy_sol_types::abi::token::WordToken(Self::SIGNATURE_HASH); out[1usize] = ::encode_topic( &self.owner, ); @@ -496,6 +505,7 @@ event Mint(address sender, address indexed owner, int24 indexed tickLower, int24 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) } @@ -509,9 +519,9 @@ event Mint(address sender, address indexed owner, int24 indexed tickLower, int24 } }; /**Constructor`. -```solidity -constructor(address _token0, address _token1, uint24 _fee); -```*/ + ```solidity + constructor(address _token0, address _token1, uint24 _fee); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct constructorCall { @@ -523,7 +533,7 @@ constructor(address _token0, address _token1, uint24 _fee); pub _fee: alloy_sol_types::private::primitives::aliases::U24, } const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -540,9 +550,7 @@ constructor(address _token0, address _token1, uint24 _fee); ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -575,15 +583,15 @@ constructor(address _token0, address _token1, uint24 _fee); alloy_sol_types::sol_data::Address, alloy_sol_types::sol_data::Uint<24>, ); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + 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<'_> { ( @@ -593,23 +601,24 @@ constructor(address _token0, address _token1, uint24 _fee); ::tokenize( &self._token1, ), - as alloy_sol_types::SolType>::tokenize(&self._fee), + as alloy_sol_types::SolType>::tokenize( + &self._fee, + ), ) } } }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `fee()` and selector `0xddca3f43`. -```solidity -function fee() external view returns (uint24); -```*/ + ```solidity + function fee() external view returns (uint24); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct feeCall; #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`fee()`](feeCall) function. + ///Container type for the return parameters of the [`fee()`](feeCall) + /// function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct feeReturn { @@ -623,7 +632,7 @@ function fee() external view returns (uint24); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -632,9 +641,7 @@ function fee() external view returns (uint24); type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -661,14 +668,10 @@ function fee() external view returns (uint24); #[allow(dead_code)] type UnderlyingSolTuple<'a> = (alloy_sol_types::sol_data::Uint<24>,); #[doc(hidden)] - type UnderlyingRustTuple<'a> = ( - alloy_sol_types::private::primitives::aliases::U24, - ); + type UnderlyingRustTuple<'a> = (alloy_sol_types::private::primitives::aliases::U24,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -693,70 +696,70 @@ function fee() external view returns (uint24); #[automatically_derived] impl alloy_sol_types::SolCall for feeCall { type Parameters<'a> = (); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = alloy_sol_types::private::primitives::aliases::U24; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (alloy_sol_types::sol_data::Uint<24>,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "fee()"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [221u8, 202u8, 63u8, 67u8]; + const SIGNATURE: &'static str = "fee()"; + #[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), + 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| { + as alloy_sol_types::SolType>::abi_decode_sequence(data).map( + |r| { let r: feeReturn = 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: feeReturn = r.into(); - r._0 - }) + 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: feeReturn = r.into(); + r._0 + }) } } }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `initialize(uint160)` and selector `0xf637731d`. -```solidity -function initialize(uint160 sqrtPriceX96) external; -```*/ + ```solidity + function initialize(uint160 sqrtPriceX96) external; + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct initializeCall { #[allow(missing_docs)] pub sqrtPriceX96: alloy_sol_types::private::primitives::aliases::U160, } - ///Container type for the return parameters of the [`initialize(uint160)`](initializeCall) function. + ///Container type for the return parameters of the + /// [`initialize(uint160)`](initializeCall) function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct initializeReturn {} @@ -767,20 +770,16 @@ function initialize(uint160 sqrtPriceX96) external; clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] type UnderlyingSolTuple<'a> = (alloy_sol_types::sol_data::Uint<160>,); #[doc(hidden)] - type UnderlyingRustTuple<'a> = ( - alloy_sol_types::private::primitives::aliases::U160, - ); + type UnderlyingRustTuple<'a> = (alloy_sol_types::private::primitives::aliases::U160,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -798,7 +797,9 @@ function initialize(uint160 sqrtPriceX96) external; #[doc(hidden)] impl ::core::convert::From> for initializeCall { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { - Self { sqrtPriceX96: tuple.0 } + Self { + sqrtPriceX96: tuple.0, + } } } } @@ -810,9 +811,7 @@ function initialize(uint160 sqrtPriceX96) external; type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -835,71 +834,68 @@ function initialize(uint160 sqrtPriceX96) external; } } impl initializeReturn { - fn _tokenize( - &self, - ) -> ::ReturnToken<'_> { + fn _tokenize(&self) -> ::ReturnToken<'_> { () } } #[automatically_derived] impl alloy_sol_types::SolCall for initializeCall { type Parameters<'a> = (alloy_sol_types::sol_data::Uint<160>,); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = initializeReturn; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "initialize(uint160)"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [246u8, 55u8, 115u8, 29u8]; + const SIGNATURE: &'static str = "initialize(uint160)"; + #[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.sqrtPriceX96), + as alloy_sol_types::SolType>::tokenize( + &self.sqrtPriceX96, + ), ) } + #[inline] fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { initializeReturn::_tokenize(ret) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) + 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) + 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(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `liquidity()` and selector `0x1a686502`. -```solidity -function liquidity() external view returns (uint128); -```*/ + ```solidity + function liquidity() external view returns (uint128); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct liquidityCall; #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`liquidity()`](liquidityCall) function. + ///Container type for the return parameters of the + /// [`liquidity()`](liquidityCall) function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct liquidityReturn { @@ -913,7 +909,7 @@ function liquidity() external view returns (uint128); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -922,9 +918,7 @@ function liquidity() external view returns (uint128); type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -954,9 +948,7 @@ function liquidity() external view returns (uint128); type UnderlyingRustTuple<'a> = (u128,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -981,63 +973,62 @@ function liquidity() external view returns (uint128); #[automatically_derived] impl alloy_sol_types::SolCall for liquidityCall { type Parameters<'a> = (); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = u128; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (alloy_sol_types::sol_data::Uint<128>,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "liquidity()"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [26u8, 104u8, 101u8, 2u8]; + const SIGNATURE: &'static str = "liquidity()"; + #[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), + 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| { + as alloy_sol_types::SolType>::abi_decode_sequence(data).map( + |r| { let r: liquidityReturn = 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: liquidityReturn = r.into(); - r._0 - }) + 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: liquidityReturn = r.into(); + r._0 + }) } } }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `mockMint(address,int24,int24,uint128)` and selector `0xefe27fa3`. -```solidity -function mockMint(address owner, int24 tickLower, int24 tickUpper, uint128 amount) external; -```*/ + ```solidity + function mockMint(address owner, int24 tickLower, int24 tickUpper, uint128 amount) external; + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct mockMintCall { @@ -1050,7 +1041,8 @@ function mockMint(address owner, int24 tickLower, int24 tickUpper, uint128 amoun #[allow(missing_docs)] pub amount: u128, } - ///Container type for the return parameters of the [`mockMint(address,int24,int24,uint128)`](mockMintCall) function. + ///Container type for the return parameters of the + /// [`mockMint(address,int24,int24,uint128)`](mockMintCall) function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct mockMintReturn {} @@ -1061,7 +1053,7 @@ function mockMint(address owner, int24 tickLower, int24 tickUpper, uint128 amoun clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -1080,9 +1072,7 @@ function mockMint(address owner, int24 tickLower, int24 tickUpper, uint128 amoun ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1117,9 +1107,7 @@ function mockMint(address owner, int24 tickLower, int24 tickUpper, uint128 amoun type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1142,9 +1130,7 @@ function mockMint(address owner, int24 tickLower, int24 tickUpper, uint128 amoun } } impl mockMintReturn { - fn _tokenize( - &self, - ) -> ::ReturnToken<'_> { + fn _tokenize(&self) -> ::ReturnToken<'_> { () } } @@ -1156,71 +1142,70 @@ function mockMint(address owner, int24 tickLower, int24 tickUpper, uint128 amoun alloy_sol_types::sol_data::Int<24>, alloy_sol_types::sol_data::Uint<128>, ); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = mockMintReturn; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "mockMint(address,int24,int24,uint128)"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [239u8, 226u8, 127u8, 163u8]; + const SIGNATURE: &'static str = "mockMint(address,int24,int24,uint128)"; + #[inline] fn new<'a>( tuple: as alloy_sol_types::SolType>::RustType, ) -> Self { tuple.into() } + #[inline] fn tokenize(&self) -> Self::Token<'_> { ( ::tokenize( &self.owner, ), - as alloy_sol_types::SolType>::tokenize(&self.tickLower), - as alloy_sol_types::SolType>::tokenize(&self.tickUpper), - as alloy_sol_types::SolType>::tokenize(&self.amount), + as alloy_sol_types::SolType>::tokenize( + &self.tickLower, + ), + as alloy_sol_types::SolType>::tokenize( + &self.tickUpper, + ), + as alloy_sol_types::SolType>::tokenize( + &self.amount, + ), ) } + #[inline] fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { mockMintReturn::_tokenize(ret) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) + 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) + 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(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `token0()` and selector `0x0dfe1681`. -```solidity -function token0() external view returns (address); -```*/ + ```solidity + function token0() external view returns (address); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct token0Call; #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`token0()`](token0Call) function. + ///Container type for the return parameters of the [`token0()`](token0Call) + /// function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct token0Return { @@ -1234,7 +1219,7 @@ function token0() external view returns (address); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -1243,9 +1228,7 @@ function token0() external view returns (address); type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1275,9 +1258,7 @@ function token0() external view returns (address); type UnderlyingRustTuple<'a> = (alloy_sol_types::private::Address,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1302,68 +1283,64 @@ function token0() external view returns (address); #[automatically_derived] impl alloy_sol_types::SolCall for token0Call { type Parameters<'a> = (); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = alloy_sol_types::private::Address; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (alloy_sol_types::sol_data::Address,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "token0()"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [13u8, 254u8, 22u8, 129u8]; + const SIGNATURE: &'static str = "token0()"; + #[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, - ), - ) + (::tokenize(ret),) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) - .map(|r| { + as alloy_sol_types::SolType>::abi_decode_sequence(data).map( + |r| { let r: token0Return = 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: token0Return = r.into(); - r._0 - }) + 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: token0Return = r.into(); + r._0 + }) } } }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `token1()` and selector `0xd21220a7`. -```solidity -function token1() external view returns (address); -```*/ + ```solidity + function token1() external view returns (address); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct token1Call; #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`token1()`](token1Call) function. + ///Container type for the return parameters of the [`token1()`](token1Call) + /// function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct token1Return { @@ -1377,7 +1354,7 @@ function token1() external view returns (address); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -1386,9 +1363,7 @@ function token1() external view returns (address); type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1418,9 +1393,7 @@ function token1() external view returns (address); type UnderlyingRustTuple<'a> = (alloy_sol_types::private::Address,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1445,61 +1418,55 @@ function token1() external view returns (address); #[automatically_derived] impl alloy_sol_types::SolCall for token1Call { type Parameters<'a> = (); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = alloy_sol_types::private::Address; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (alloy_sol_types::sol_data::Address,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "token1()"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [210u8, 18u8, 32u8, 167u8]; + const SIGNATURE: &'static str = "token1()"; + #[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, - ), - ) + (::tokenize(ret),) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) - .map(|r| { + as alloy_sol_types::SolType>::abi_decode_sequence(data).map( + |r| { let r: token1Return = 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: token1Return = r.into(); - r._0 - }) + 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: token1Return = r.into(); + r._0 + }) } } }; ///Container for all the [`MockUniswapV3Pool`](self) function calls. #[derive(Clone)] - #[derive()] pub enum MockUniswapV3PoolCalls { #[allow(missing_docs)] fee(feeCall), @@ -1517,8 +1484,9 @@ function token1() external view returns (address); impl MockUniswapV3PoolCalls { /// 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. + /// 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]] = &[ @@ -1529,15 +1497,6 @@ function token1() external view returns (address); [239u8, 226u8, 127u8, 163u8], [246u8, 55u8, 115u8, 29u8], ]; - /// The names of the variants in the same order as `SELECTORS`. - pub const VARIANT_NAMES: &'static [&'static str] = &[ - ::core::stringify!(token0), - ::core::stringify!(liquidity), - ::core::stringify!(token1), - ::core::stringify!(fee), - ::core::stringify!(mockMint), - ::core::stringify!(initialize), - ]; /// The signatures in the same order as `SELECTORS`. pub const SIGNATURES: &'static [&'static str] = &[ ::SIGNATURE, @@ -1547,6 +1506,16 @@ function token1() external view returns (address); ::SIGNATURE, ::SIGNATURE, ]; + /// The names of the variants in the same order as `SELECTORS`. + pub const VARIANT_NAMES: &'static [&'static str] = &[ + ::core::stringify!(token0), + ::core::stringify!(liquidity), + ::core::stringify!(token1), + ::core::stringify!(fee), + ::core::stringify!(mockMint), + ::core::stringify!(initialize), + ]; + /// Returns the signature for the given selector, if known. #[inline] pub fn signature_by_selector( @@ -1559,119 +1528,108 @@ function token1() external view returns (address); ::core::result::Result::Err(_) => ::core::option::Option::None, } } + /// Returns the enum variant name for the given selector, if known. #[inline] - pub fn name_by_selector( - selector: [u8; 4usize], - ) -> ::core::option::Option<&'static str> { + pub fn name_by_selector(selector: [u8; 4usize]) -> ::core::option::Option<&'static str> { let sig = Self::signature_by_selector(selector)?; sig.split_once('(').map(|(name, _)| name) } } #[automatically_derived] impl alloy_sol_types::SolInterface for MockUniswapV3PoolCalls { - const NAME: &'static str = "MockUniswapV3PoolCalls"; - const MIN_DATA_LENGTH: usize = 0usize; const COUNT: usize = 6usize; + const MIN_DATA_LENGTH: usize = 0usize; + const NAME: &'static str = "MockUniswapV3PoolCalls"; + #[inline] fn selector(&self) -> [u8; 4] { match self { Self::fee(_) => ::SELECTOR, - Self::initialize(_) => { - ::SELECTOR - } - Self::liquidity(_) => { - ::SELECTOR - } + Self::initialize(_) => ::SELECTOR, + Self::liquidity(_) => ::SELECTOR, Self::mockMint(_) => ::SELECTOR, Self::token0(_) => ::SELECTOR, Self::token1(_) => ::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 token0( - data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw(data) - .map(MockUniswapV3PoolCalls::token0) - } - token0 - }, - { - fn liquidity( - data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw(data) - .map(MockUniswapV3PoolCalls::liquidity) - } - liquidity - }, - { - fn token1( - data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw(data) - .map(MockUniswapV3PoolCalls::token1) - } - token1 - }, - { - fn fee( - data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw(data) - .map(MockUniswapV3PoolCalls::fee) - } - fee - }, - { - fn mockMint( - data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw(data) - .map(MockUniswapV3PoolCalls::mockMint) - } - mockMint - }, - { - fn initialize( - data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, - ) - .map(MockUniswapV3PoolCalls::initialize) - } - initialize - }, - ]; + fn abi_decode_raw(selector: [u8; 4], data: &[u8]) -> alloy_sol_types::Result { + static DECODE_SHIMS: &[fn(&[u8]) -> alloy_sol_types::Result] = + &[ + { + fn token0(data: &[u8]) -> alloy_sol_types::Result { + ::abi_decode_raw(data) + .map(MockUniswapV3PoolCalls::token0) + } + token0 + }, + { + fn liquidity( + data: &[u8], + ) -> alloy_sol_types::Result + { + ::abi_decode_raw(data) + .map(MockUniswapV3PoolCalls::liquidity) + } + liquidity + }, + { + fn token1(data: &[u8]) -> alloy_sol_types::Result { + ::abi_decode_raw(data) + .map(MockUniswapV3PoolCalls::token1) + } + token1 + }, + { + fn fee(data: &[u8]) -> alloy_sol_types::Result { + ::abi_decode_raw(data) + .map(MockUniswapV3PoolCalls::fee) + } + fee + }, + { + fn mockMint( + data: &[u8], + ) -> alloy_sol_types::Result + { + ::abi_decode_raw(data) + .map(MockUniswapV3PoolCalls::mockMint) + } + mockMint + }, + { + fn initialize( + data: &[u8], + ) -> alloy_sol_types::Result + { + ::abi_decode_raw(data) + .map(MockUniswapV3PoolCalls::initialize) + } + initialize + }, + ]; let Ok(idx) = Self::SELECTORS.binary_search(&selector) else { - return Err( - alloy_sol_types::Error::unknown_selector( - ::NAME, - selector, - ), - ); + return Err(alloy_sol_types::Error::unknown_selector( + ::NAME, + selector, + )); }; DECODE_SHIMS[idx](data) } + #[inline] #[allow(non_snake_case)] fn abi_decode_raw_validate( @@ -1680,90 +1638,65 @@ function token1() external view returns (address); ) -> alloy_sol_types::Result { static DECODE_VALIDATE_SHIMS: &[fn( &[u8], - ) -> alloy_sol_types::Result] = &[ + ) -> alloy_sol_types::Result< + MockUniswapV3PoolCalls, + >] = &[ { - fn token0( - data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) + fn token0(data: &[u8]) -> alloy_sol_types::Result { + ::abi_decode_raw_validate(data) .map(MockUniswapV3PoolCalls::token0) } token0 }, { - fn liquidity( - data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) + fn liquidity(data: &[u8]) -> alloy_sol_types::Result { + ::abi_decode_raw_validate(data) .map(MockUniswapV3PoolCalls::liquidity) } liquidity }, { - fn token1( - data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) + fn token1(data: &[u8]) -> alloy_sol_types::Result { + ::abi_decode_raw_validate(data) .map(MockUniswapV3PoolCalls::token1) } token1 }, { - fn fee( - data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) + fn fee(data: &[u8]) -> alloy_sol_types::Result { + ::abi_decode_raw_validate(data) .map(MockUniswapV3PoolCalls::fee) } fee }, { - fn mockMint( - data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) + fn mockMint(data: &[u8]) -> alloy_sol_types::Result { + ::abi_decode_raw_validate(data) .map(MockUniswapV3PoolCalls::mockMint) } mockMint }, { - fn initialize( - data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) + fn initialize(data: &[u8]) -> alloy_sol_types::Result { + ::abi_decode_raw_validate(data) .map(MockUniswapV3PoolCalls::initialize) } initialize }, ]; let Ok(idx) = Self::SELECTORS.binary_search(&selector) else { - return Err( - alloy_sol_types::Error::unknown_selector( - ::NAME, - selector, - ), - ); + 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::fee(inner) => { - ::abi_encoded_size(inner) - } + Self::fee(inner) => ::abi_encoded_size(inner), Self::initialize(inner) => { ::abi_encoded_size(inner) } @@ -1781,6 +1714,7 @@ function token1() external view returns (address); } } } + #[inline] fn abi_encode_raw(&self, out: &mut alloy_sol_types::private::Vec) { match self { @@ -1788,22 +1722,13 @@ function token1() external view returns (address); ::abi_encode_raw(inner, out) } Self::initialize(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } Self::liquidity(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } Self::mockMint(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } Self::token0(inner) => { ::abi_encode_raw(inner, out) @@ -1815,8 +1740,7 @@ function token1() external view returns (address); } } ///Container for all the [`MockUniswapV3Pool`](self) events. - #[derive(Clone)] - #[derive(Debug, PartialEq, Eq, Hash)] + #[derive(Clone, Debug, PartialEq, Eq, Hash)] pub enum MockUniswapV3PoolEvents { #[allow(missing_docs)] Initialize(Initialize), @@ -1826,32 +1750,32 @@ function token1() external view returns (address); impl MockUniswapV3PoolEvents { /// 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. + /// 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]] = &[ [ - 122u8, 83u8, 8u8, 11u8, 164u8, 20u8, 21u8, 139u8, 231u8, 236u8, 105u8, - 185u8, 135u8, 181u8, 251u8, 125u8, 7u8, 222u8, 225u8, 1u8, 254u8, 133u8, - 72u8, 143u8, 8u8, 83u8, 174u8, 22u8, 35u8, 157u8, 11u8, 222u8, + 122u8, 83u8, 8u8, 11u8, 164u8, 20u8, 21u8, 139u8, 231u8, 236u8, 105u8, 185u8, + 135u8, 181u8, 251u8, 125u8, 7u8, 222u8, 225u8, 1u8, 254u8, 133u8, 72u8, 143u8, 8u8, + 83u8, 174u8, 22u8, 35u8, 157u8, 11u8, 222u8, ], [ - 152u8, 99u8, 96u8, 54u8, 203u8, 102u8, 169u8, 193u8, 154u8, 55u8, 67u8, - 94u8, 252u8, 30u8, 144u8, 20u8, 33u8, 144u8, 33u8, 78u8, 138u8, 190u8, - 184u8, 33u8, 189u8, 186u8, 63u8, 41u8, 144u8, 221u8, 76u8, 149u8, + 152u8, 99u8, 96u8, 54u8, 203u8, 102u8, 169u8, 193u8, 154u8, 55u8, 67u8, 94u8, + 252u8, 30u8, 144u8, 20u8, 33u8, 144u8, 33u8, 78u8, 138u8, 190u8, 184u8, 33u8, + 189u8, 186u8, 63u8, 41u8, 144u8, 221u8, 76u8, 149u8, ], ]; - /// The names of the variants in the same order as `SELECTORS`. - pub const VARIANT_NAMES: &'static [&'static str] = &[ - ::core::stringify!(Mint), - ::core::stringify!(Initialize), - ]; /// The signatures in the same order as `SELECTORS`. pub const SIGNATURES: &'static [&'static str] = &[ ::SIGNATURE, ::SIGNATURE, ]; + /// The names of the variants in the same order as `SELECTORS`. + pub const VARIANT_NAMES: &'static [&'static str] = + &[::core::stringify!(Mint), ::core::stringify!(Initialize)]; + /// Returns the signature for the given selector, if known. #[inline] pub fn signature_by_selector( @@ -1864,46 +1788,41 @@ function token1() external view returns (address); ::core::result::Result::Err(_) => ::core::option::Option::None, } } + /// Returns the enum variant name for the given selector, if known. #[inline] - pub fn name_by_selector( - selector: [u8; 32usize], - ) -> ::core::option::Option<&'static str> { + pub fn name_by_selector(selector: [u8; 32usize]) -> ::core::option::Option<&'static str> { let sig = Self::signature_by_selector(selector)?; sig.split_once('(').map(|(name, _)| name) } } #[automatically_derived] impl alloy_sol_types::SolEventInterface for MockUniswapV3PoolEvents { - const NAME: &'static str = "MockUniswapV3PoolEvents"; const COUNT: usize = 2usize; + const NAME: &'static str = "MockUniswapV3PoolEvents"; + 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, - ) + ::decode_raw_log(topics, data) .map(Self::Initialize) } Some(::SIGNATURE_HASH) => { ::decode_raw_log(topics, data) .map(Self::Mint) } - _ => { - 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(), - ), + _ => 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(), ), - }) - } + ), + }), } } } @@ -1914,26 +1833,23 @@ function token1() external view returns (address); Self::Initialize(inner) => { alloy_sol_types::private::IntoLogData::to_log_data(inner) } - Self::Mint(inner) => { - alloy_sol_types::private::IntoLogData::to_log_data(inner) - } + Self::Mint(inner) => alloy_sol_types::private::IntoLogData::to_log_data(inner), } } + fn into_log_data(self) -> alloy_sol_types::private::LogData { match self { Self::Initialize(inner) => { alloy_sol_types::private::IntoLogData::into_log_data(inner) } - Self::Mint(inner) => { - alloy_sol_types::private::IntoLogData::into_log_data(inner) - } + Self::Mint(inner) => alloy_sol_types::private::IntoLogData::into_log_data(inner), } } } - use alloy_contract as alloy_contract; + use alloy_contract; /**Creates a new wrapper around an on-chain [`MockUniswapV3Pool`](self) contract instance. -See the [wrapper's documentation](`MockUniswapV3PoolInstance`) for more details.*/ + See the [wrapper's documentation](`MockUniswapV3PoolInstance`) for more details.*/ #[inline] pub const fn new< P: alloy_contract::private::Provider, @@ -1946,28 +1862,24 @@ See the [wrapper's documentation](`MockUniswapV3PoolInstance`) for more details. } /**Deploys this contract using the given `provider` and constructor arguments, if any. -Returns a new instance of the contract, if the deployment was successful. + 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.*/ + 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, - >( + pub fn deploy, N: alloy_contract::private::Network>( __provider: P, _token0: alloy_sol_types::private::Address, _token1: alloy_sol_types::private::Address, _fee: alloy_sol_types::private::primitives::aliases::U24, - ) -> impl ::core::future::Future< - Output = alloy_contract::Result>, - > { + ) -> impl ::core::future::Future>> + { MockUniswapV3PoolInstance::::deploy(__provider, _token0, _token1, _fee) } /**Creates a `RawCallBuilder` for deploying this contract using the given `provider` -and constructor arguments, if any. + 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.*/ + 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, @@ -1978,22 +1890,19 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ _token1: alloy_sol_types::private::Address, _fee: alloy_sol_types::private::primitives::aliases::U24, ) -> alloy_contract::RawCallBuilder { - MockUniswapV3PoolInstance::< - P, - N, - >::deploy_builder(__provider, _token0, _token1, _fee) + MockUniswapV3PoolInstance::::deploy_builder(__provider, _token0, _token1, _fee) } /**A [`MockUniswapV3Pool`](self) instance. -Contains type-safe methods for interacting with an on-chain instance of the -[`MockUniswapV3Pool`](self) contract located at a given `address`, using a given -provider `P`. + Contains type-safe methods for interacting with an on-chain instance of the + [`MockUniswapV3Pool`](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. + 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.*/ + See the [module-level documentation](self) for all the available methods.*/ #[derive(Clone)] pub struct MockUniswapV3PoolInstance { address: alloy_sol_types::private::Address, @@ -2004,33 +1913,32 @@ See the [module-level documentation](self) for all the available methods.*/ impl ::core::fmt::Debug for MockUniswapV3PoolInstance { #[inline] fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { - f.debug_tuple("MockUniswapV3PoolInstance").field(&self.address).finish() + f.debug_tuple("MockUniswapV3PoolInstance") + .field(&self.address) + .finish() } } /// Instantiation and getters/setters. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > MockUniswapV3PoolInstance { + impl, N: alloy_contract::private::Network> + MockUniswapV3PoolInstance + { /**Creates a new wrapper around an on-chain [`MockUniswapV3Pool`](self) contract instance. -See the [wrapper's documentation](`MockUniswapV3PoolInstance`) for more details.*/ + See the [wrapper's documentation](`MockUniswapV3PoolInstance`) for more details.*/ #[inline] - pub const fn new( - address: alloy_sol_types::private::Address, - __provider: P, - ) -> Self { + pub const fn new(address: alloy_sol_types::private::Address, __provider: P) -> Self { Self { address, provider: __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. + 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.*/ + For more fine-grained control over the deployment process, use [`deploy_builder`] instead.*/ #[inline] pub async fn deploy( __provider: P, @@ -2042,11 +1950,12 @@ For more fine-grained control over the deployment process, use [`deploy_builder` 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. + 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.*/ + 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, @@ -2058,33 +1967,35 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ __provider, [ &BYTECODE[..], - &alloy_sol_types::SolConstructor::abi_encode( - &constructorCall { - _token0, - _token1, - _fee, - }, - )[..], + &alloy_sol_types::SolConstructor::abi_encode(&constructorCall { + _token0, + _token1, + _fee, + })[..], ] - .concat() - .into(), + .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 { @@ -2092,7 +2003,8 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ } } impl MockUniswapV3PoolInstance<&P, N> { - /// Clones the provider and returns a new instance with the cloned provider. + /// Clones the provider and returns a new instance with the cloned + /// provider. #[inline] pub fn with_cloned_provider(self) -> MockUniswapV3PoolInstance { MockUniswapV3PoolInstance { @@ -2103,24 +2015,27 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ } } /// Function calls. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > MockUniswapV3PoolInstance { - /// Creates a new call builder using this contract instance's provider and address. + impl, N: alloy_contract::private::Network> + MockUniswapV3PoolInstance + { + /// 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. + /// 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 [`fee`] function. pub fn fee(&self) -> alloy_contract::SolCallBuilder<&P, feeCall, N> { self.call_builder(&feeCall) } + ///Creates a new call builder for the [`initialize`] function. pub fn initialize( &self, @@ -2128,10 +2043,12 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ ) -> alloy_contract::SolCallBuilder<&P, initializeCall, N> { self.call_builder(&initializeCall { sqrtPriceX96 }) } + ///Creates a new call builder for the [`liquidity`] function. pub fn liquidity(&self) -> alloy_contract::SolCallBuilder<&P, liquidityCall, N> { self.call_builder(&liquidityCall) } + ///Creates a new call builder for the [`mockMint`] function. pub fn mockMint( &self, @@ -2140,48 +2057,49 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ tickUpper: alloy_sol_types::private::primitives::aliases::I24, amount: u128, ) -> alloy_contract::SolCallBuilder<&P, mockMintCall, N> { - self.call_builder( - &mockMintCall { - owner, - tickLower, - tickUpper, - amount, - }, - ) + self.call_builder(&mockMintCall { + owner, + tickLower, + tickUpper, + amount, + }) } + ///Creates a new call builder for the [`token0`] function. pub fn token0(&self) -> alloy_contract::SolCallBuilder<&P, token0Call, N> { self.call_builder(&token0Call) } + ///Creates a new call builder for the [`token1`] function. pub fn token1(&self) -> alloy_contract::SolCallBuilder<&P, token1Call, N> { self.call_builder(&token1Call) } } /// Event filters. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > MockUniswapV3PoolInstance { - /// Creates a new event filter using this contract instance's provider and address. + impl, N: alloy_contract::private::Network> + MockUniswapV3PoolInstance + { + /// 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. + /// 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 [`Initialize`] event. pub fn Initialize_filter(&self) -> alloy_contract::Event<&P, Initialize, N> { self.event_filter::() } + ///Creates a new event filter for the [`Mint`] event. pub fn Mint_filter(&self) -> alloy_contract::Event<&P, Mint, N> { self.event_filter::() } } } -pub type Instance = MockUniswapV3Pool::MockUniswapV3PoolInstance< - ::alloy_provider::DynProvider, ->; +pub type Instance = MockUniswapV3Pool::MockUniswapV3PoolInstance<::alloy_provider::DynProvider>; diff --git a/contracts/generated/contracts-generated/nonstandarderc20balances/src/lib.rs b/contracts/generated/contracts-generated/nonstandarderc20balances/src/lib.rs index 03d3eebce0..f0f586feff 100644 --- a/contracts/generated/contracts-generated/nonstandarderc20balances/src/lib.rs +++ b/contracts/generated/contracts-generated/nonstandarderc20balances/src/lib.rs @@ -1,4 +1,10 @@ -#![allow(unused_imports, unused_attributes, clippy::all, rustdoc::all, non_snake_case)] +#![allow( + unused_imports, + unused_attributes, + clippy::all, + rustdoc::all, + non_snake_case +)] //! Auto-generated contract bindings. Do not edit. /** @@ -147,8 +153,7 @@ interface NonStandardERC20Balances { clippy::empty_structs_with_brackets )] pub mod NonStandardERC20Balances { - use super::*; - use alloy_sol_types as alloy_sol_types; + use {super::*, alloy_sol_types}; /// The creation / init bytecode of the contract. /// /// ```text @@ -171,9 +176,9 @@ pub mod NonStandardERC20Balances { ); #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `allowance(address,address)` and selector `0xdd62ed3e`. -```solidity -function allowance(address user, address spender) external view returns (uint256); -```*/ + ```solidity + function allowance(address user, address spender) external view returns (uint256); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct allowanceCall { @@ -183,7 +188,8 @@ function allowance(address user, address spender) external view returns (uint256 pub spender: alloy_sol_types::private::Address, } #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`allowance(address,address)`](allowanceCall) function. + ///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 { @@ -197,7 +203,7 @@ function allowance(address user, address spender) external view returns (uint256 clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -212,9 +218,7 @@ function allowance(address user, address spender) external view returns (uint256 ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -244,14 +248,10 @@ function allowance(address user, address spender) external view returns (uint256 #[allow(dead_code)] type UnderlyingSolTuple<'a> = (alloy_sol_types::sol_data::Uint<256>,); #[doc(hidden)] - type UnderlyingRustTuple<'a> = ( - alloy_sol_types::private::primitives::aliases::U256, - ); + 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, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -279,22 +279,21 @@ function allowance(address user, address spender) external view returns (uint256 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 ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; 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)"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [221u8, 98u8, 237u8, 62u8]; + const SIGNATURE: &'static str = "allowance(address,address)"; + #[inline] fn new<'a>( tuple: as alloy_sol_types::SolType>::RustType, ) -> Self { tuple.into() } + #[inline] fn tokenize(&self) -> Self::Token<'_> { ( @@ -306,43 +305,43 @@ function allowance(address user, address spender) external view returns (uint256 ), ) } + #[inline] fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { ( - as alloy_sol_types::SolType>::tokenize(ret), + 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| { + 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 - }) + 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(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `approve(address,uint256)` and selector `0x095ea7b3`. -```solidity -function approve(address spender, uint256 amount) external; -```*/ + ```solidity + function approve(address spender, uint256 amount) external; + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct approveCall { @@ -351,7 +350,8 @@ function approve(address spender, uint256 amount) external; #[allow(missing_docs)] pub amount: alloy_sol_types::private::primitives::aliases::U256, } - ///Container type for the return parameters of the [`approve(address,uint256)`](approveCall) function. + ///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 {} @@ -362,7 +362,7 @@ function approve(address spender, uint256 amount) external; clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -377,9 +377,7 @@ function approve(address spender, uint256 amount) external; ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -412,9 +410,7 @@ function approve(address spender, uint256 amount) external; type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -437,9 +433,7 @@ function approve(address spender, uint256 amount) external; } } impl approveReturn { - fn _tokenize( - &self, - ) -> ::ReturnToken<'_> { + fn _tokenize(&self) -> ::ReturnToken<'_> { () } } @@ -449,60 +443,58 @@ function approve(address spender, uint256 amount) external; 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 = approveReturn; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "approve(address,uint256)"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [9u8, 94u8, 167u8, 179u8]; + const SIGNATURE: &'static str = "approve(address,uint256)"; + #[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.amount), + as alloy_sol_types::SolType>::tokenize( + &self.amount, + ), ) } + #[inline] fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { approveReturn::_tokenize(ret) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) + 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) + 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(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `balanceOf(address)` and selector `0x70a08231`. -```solidity -function balanceOf(address user) external view returns (uint256); -```*/ + ```solidity + function balanceOf(address user) external view returns (uint256); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct balanceOfCall { @@ -510,7 +502,8 @@ function balanceOf(address user) external view returns (uint256); pub user: alloy_sol_types::private::Address, } #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`balanceOf(address)`](balanceOfCall) function. + ///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 { @@ -524,7 +517,7 @@ function balanceOf(address user) external view returns (uint256); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -533,9 +526,7 @@ function balanceOf(address user) external view returns (uint256); type UnderlyingRustTuple<'a> = (alloy_sol_types::private::Address,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -562,14 +553,10 @@ function balanceOf(address user) external view returns (uint256); #[allow(dead_code)] type UnderlyingSolTuple<'a> = (alloy_sol_types::sol_data::Uint<256>,); #[doc(hidden)] - type UnderlyingRustTuple<'a> = ( - alloy_sol_types::private::primitives::aliases::U256, - ); + 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, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -594,22 +581,21 @@ function balanceOf(address user) external view returns (uint256); #[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 ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; 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)"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [112u8, 160u8, 130u8, 49u8]; + const SIGNATURE: &'static str = "balanceOf(address)"; + #[inline] fn new<'a>( tuple: as alloy_sol_types::SolType>::RustType, ) -> Self { tuple.into() } + #[inline] fn tokenize(&self) -> Self::Token<'_> { ( @@ -618,43 +604,43 @@ function balanceOf(address user) external view returns (uint256); ), ) } + #[inline] fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { ( - as alloy_sol_types::SolType>::tokenize(ret), + 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| { + 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 - }) + 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(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `mint(address,uint256)` and selector `0x40c10f19`. -```solidity -function mint(address user, uint256 amount) external; -```*/ + ```solidity + function mint(address user, uint256 amount) external; + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct mintCall { @@ -663,7 +649,8 @@ function mint(address user, uint256 amount) external; #[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. + ///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 {} @@ -674,7 +661,7 @@ function mint(address user, uint256 amount) external; clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -689,9 +676,7 @@ function mint(address user, uint256 amount) external; ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -724,9 +709,7 @@ function mint(address user, uint256 amount) external; type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -749,9 +732,7 @@ function mint(address user, uint256 amount) external; } } impl mintReturn { - fn _tokenize( - &self, - ) -> ::ReturnToken<'_> { + fn _tokenize(&self) -> ::ReturnToken<'_> { () } } @@ -761,60 +742,58 @@ function mint(address user, uint256 amount) external; 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 ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "mint(address,uint256)"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [64u8, 193u8, 15u8, 25u8]; + const SIGNATURE: &'static str = "mint(address,uint256)"; + #[inline] fn new<'a>( tuple: as alloy_sol_types::SolType>::RustType, ) -> Self { tuple.into() } + #[inline] fn tokenize(&self) -> Self::Token<'_> { ( ::tokenize( &self.user, ), - as alloy_sol_types::SolType>::tokenize(&self.amount), + 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) + 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) + 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(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `transfer(address,uint256)` and selector `0xa9059cbb`. -```solidity -function transfer(address to, uint256 amount) external; -```*/ + ```solidity + function transfer(address to, uint256 amount) external; + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct transferCall { @@ -823,7 +802,8 @@ function transfer(address to, uint256 amount) external; #[allow(missing_docs)] pub amount: alloy_sol_types::private::primitives::aliases::U256, } - ///Container type for the return parameters of the [`transfer(address,uint256)`](transferCall) function. + ///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 {} @@ -834,7 +814,7 @@ function transfer(address to, uint256 amount) external; clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -849,9 +829,7 @@ function transfer(address to, uint256 amount) external; ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -884,9 +862,7 @@ function transfer(address to, uint256 amount) external; type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -909,9 +885,7 @@ function transfer(address to, uint256 amount) external; } } impl transferReturn { - fn _tokenize( - &self, - ) -> ::ReturnToken<'_> { + fn _tokenize(&self) -> ::ReturnToken<'_> { () } } @@ -921,60 +895,58 @@ function transfer(address to, uint256 amount) external; 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 = transferReturn; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "transfer(address,uint256)"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [169u8, 5u8, 156u8, 187u8]; + const SIGNATURE: &'static str = "transfer(address,uint256)"; + #[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), + as alloy_sol_types::SolType>::tokenize( + &self.amount, + ), ) } + #[inline] fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { transferReturn::_tokenize(ret) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) + 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) + 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(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `transferFrom(address,address,uint256)` and selector `0x23b872dd`. -```solidity -function transferFrom(address from, address to, uint256 amount) external; -```*/ + ```solidity + function transferFrom(address from, address to, uint256 amount) external; + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct transferFromCall { @@ -985,7 +957,8 @@ function transferFrom(address from, address to, uint256 amount) external; #[allow(missing_docs)] pub amount: alloy_sol_types::private::primitives::aliases::U256, } - ///Container type for the return parameters of the [`transferFrom(address,address,uint256)`](transferFromCall) function. + ///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 {} @@ -996,7 +969,7 @@ function transferFrom(address from, address to, uint256 amount) external; clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -1013,9 +986,7 @@ function transferFrom(address from, address to, uint256 amount) external; ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1049,9 +1020,7 @@ function transferFrom(address from, address to, uint256 amount) external; type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1074,9 +1043,7 @@ function transferFrom(address from, address to, uint256 amount) external; } } impl transferFromReturn { - fn _tokenize( - &self, - ) -> ::ReturnToken<'_> { + fn _tokenize(&self) -> ::ReturnToken<'_> { () } } @@ -1087,22 +1054,21 @@ function transferFrom(address from, address to, uint256 amount) external; 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 = transferFromReturn; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "transferFrom(address,address,uint256)"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [35u8, 184u8, 114u8, 221u8]; + const SIGNATURE: &'static str = "transferFrom(address,address,uint256)"; + #[inline] fn new<'a>( tuple: as alloy_sol_types::SolType>::RustType, ) -> Self { tuple.into() } + #[inline] fn tokenize(&self) -> Self::Token<'_> { ( @@ -1112,36 +1078,34 @@ function transferFrom(address from, address to, uint256 amount) external; ::tokenize( &self.to, ), - as alloy_sol_types::SolType>::tokenize(&self.amount), + as alloy_sol_types::SolType>::tokenize( + &self.amount, + ), ) } + #[inline] fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { transferFromReturn::_tokenize(ret) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) + 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) + 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 [`NonStandardERC20Balances`](self) function calls. #[derive(Clone)] - #[derive()] pub enum NonStandardERC20BalancesCalls { #[allow(missing_docs)] allowance(allowanceCall), @@ -1159,8 +1123,9 @@ function transferFrom(address from, address to, uint256 amount) external; impl NonStandardERC20BalancesCalls { /// 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. + /// 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]] = &[ @@ -1171,15 +1136,6 @@ function transferFrom(address from, address to, uint256 amount) external; [169u8, 5u8, 156u8, 187u8], [221u8, 98u8, 237u8, 62u8], ]; - /// The names of the variants in the same order as `SELECTORS`. - pub const VARIANT_NAMES: &'static [&'static str] = &[ - ::core::stringify!(approve), - ::core::stringify!(transferFrom), - ::core::stringify!(mint), - ::core::stringify!(balanceOf), - ::core::stringify!(transfer), - ::core::stringify!(allowance), - ]; /// The signatures in the same order as `SELECTORS`. pub const SIGNATURES: &'static [&'static str] = &[ ::SIGNATURE, @@ -1189,6 +1145,16 @@ function transferFrom(address from, address to, uint256 amount) external; ::SIGNATURE, ::SIGNATURE, ]; + /// The names of the variants in the same order as `SELECTORS`. + pub const VARIANT_NAMES: &'static [&'static str] = &[ + ::core::stringify!(approve), + ::core::stringify!(transferFrom), + ::core::stringify!(mint), + ::core::stringify!(balanceOf), + ::core::stringify!(transfer), + ::core::stringify!(allowance), + ]; + /// Returns the signature for the given selector, if known. #[inline] pub fn signature_by_selector( @@ -1201,58 +1167,54 @@ function transferFrom(address from, address to, uint256 amount) external; ::core::result::Result::Err(_) => ::core::option::Option::None, } } + /// Returns the enum variant name for the given selector, if known. #[inline] - pub fn name_by_selector( - selector: [u8; 4usize], - ) -> ::core::option::Option<&'static str> { + pub fn name_by_selector(selector: [u8; 4usize]) -> ::core::option::Option<&'static str> { let sig = Self::signature_by_selector(selector)?; sig.split_once('(').map(|(name, _)| name) } } #[automatically_derived] impl alloy_sol_types::SolInterface for NonStandardERC20BalancesCalls { - const NAME: &'static str = "NonStandardERC20BalancesCalls"; - const MIN_DATA_LENGTH: usize = 32usize; const COUNT: usize = 6usize; + const MIN_DATA_LENGTH: usize = 32usize; + const NAME: &'static str = "NonStandardERC20BalancesCalls"; + #[inline] fn selector(&self) -> [u8; 4] { match self { - Self::allowance(_) => { - ::SELECTOR - } + Self::allowance(_) => ::SELECTOR, Self::approve(_) => ::SELECTOR, - Self::balanceOf(_) => { - ::SELECTOR - } + Self::balanceOf(_) => ::SELECTOR, Self::mint(_) => ::SELECTOR, Self::transfer(_) => ::SELECTOR, - Self::transferFrom(_) => { - ::SELECTOR - } + Self::transferFrom(_) => ::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 { + fn abi_decode_raw(selector: [u8; 4], data: &[u8]) -> alloy_sol_types::Result { static DECODE_SHIMS: &[fn( &[u8], - ) -> alloy_sol_types::Result] = &[ + ) + -> alloy_sol_types::Result] = &[ { fn approve( data: &[u8], - ) -> alloy_sol_types::Result { + ) -> alloy_sol_types::Result + { ::abi_decode_raw(data) .map(NonStandardERC20BalancesCalls::approve) } @@ -1261,18 +1223,15 @@ function transferFrom(address from, address to, uint256 amount) external; { fn transferFrom( data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, - ) + ) -> alloy_sol_types::Result + { + ::abi_decode_raw(data) .map(NonStandardERC20BalancesCalls::transferFrom) } transferFrom }, { - fn mint( - data: &[u8], - ) -> alloy_sol_types::Result { + fn mint(data: &[u8]) -> alloy_sol_types::Result { ::abi_decode_raw(data) .map(NonStandardERC20BalancesCalls::mint) } @@ -1281,7 +1240,8 @@ function transferFrom(address from, address to, uint256 amount) external; { fn balanceOf( data: &[u8], - ) -> alloy_sol_types::Result { + ) -> alloy_sol_types::Result + { ::abi_decode_raw(data) .map(NonStandardERC20BalancesCalls::balanceOf) } @@ -1290,7 +1250,8 @@ function transferFrom(address from, address to, uint256 amount) external; { fn transfer( data: &[u8], - ) -> alloy_sol_types::Result { + ) -> alloy_sol_types::Result + { ::abi_decode_raw(data) .map(NonStandardERC20BalancesCalls::transfer) } @@ -1299,7 +1260,8 @@ function transferFrom(address from, address to, uint256 amount) external; { fn allowance( data: &[u8], - ) -> alloy_sol_types::Result { + ) -> alloy_sol_types::Result + { ::abi_decode_raw(data) .map(NonStandardERC20BalancesCalls::allowance) } @@ -1307,15 +1269,14 @@ function transferFrom(address from, address to, uint256 amount) external; }, ]; let Ok(idx) = Self::SELECTORS.binary_search(&selector) else { - return Err( - alloy_sol_types::Error::unknown_selector( - ::NAME, - selector, - ), - ); + return Err(alloy_sol_types::Error::unknown_selector( + ::NAME, + selector, + )); }; DECODE_SHIMS[idx](data) } + #[inline] #[allow(non_snake_case)] fn abi_decode_raw_validate( @@ -1324,14 +1285,15 @@ function transferFrom(address from, address to, uint256 amount) external; ) -> alloy_sol_types::Result { static DECODE_VALIDATE_SHIMS: &[fn( &[u8], - ) -> alloy_sol_types::Result] = &[ + ) -> alloy_sol_types::Result< + NonStandardERC20BalancesCalls, + >] = &[ { fn approve( data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) + ) -> alloy_sol_types::Result + { + ::abi_decode_raw_validate(data) .map(NonStandardERC20BalancesCalls::approve) } approve @@ -1339,21 +1301,18 @@ function transferFrom(address from, address to, uint256 amount) external; { fn transferFrom( data: &[u8], - ) -> alloy_sol_types::Result { + ) -> alloy_sol_types::Result + { ::abi_decode_raw_validate( - data, - ) - .map(NonStandardERC20BalancesCalls::transferFrom) + data, + ) + .map(NonStandardERC20BalancesCalls::transferFrom) } transferFrom }, { - fn mint( - data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) + fn mint(data: &[u8]) -> alloy_sol_types::Result { + ::abi_decode_raw_validate(data) .map(NonStandardERC20BalancesCalls::mint) } mint @@ -1361,10 +1320,9 @@ function transferFrom(address from, address to, uint256 amount) external; { fn balanceOf( data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) + ) -> alloy_sol_types::Result + { + ::abi_decode_raw_validate(data) .map(NonStandardERC20BalancesCalls::balanceOf) } balanceOf @@ -1372,10 +1330,9 @@ function transferFrom(address from, address to, uint256 amount) external; { fn transfer( data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) + ) -> alloy_sol_types::Result + { + ::abi_decode_raw_validate(data) .map(NonStandardERC20BalancesCalls::transfer) } transfer @@ -1383,25 +1340,23 @@ function transferFrom(address from, address to, uint256 amount) external; { fn allowance( data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) + ) -> alloy_sol_types::Result + { + ::abi_decode_raw_validate(data) .map(NonStandardERC20BalancesCalls::allowance) } allowance }, ]; let Ok(idx) = Self::SELECTORS.binary_search(&selector) else { - return Err( - alloy_sol_types::Error::unknown_selector( - ::NAME, - selector, - ), - ); + return Err(alloy_sol_types::Error::unknown_selector( + ::NAME, + selector, + )); }; DECODE_VALIDATE_SHIMS[idx](data) } + #[inline] fn abi_encoded_size(&self) -> usize { match self { @@ -1421,52 +1376,39 @@ function transferFrom(address from, address to, uint256 amount) external; ::abi_encoded_size(inner) } Self::transferFrom(inner) => { - ::abi_encoded_size( - inner, - ) + ::abi_encoded_size(inner) } } } + #[inline] fn abi_encode_raw(&self, out: &mut alloy_sol_types::private::Vec) { match self { Self::allowance(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } Self::approve(inner) => { ::abi_encode_raw(inner, out) } Self::balanceOf(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } Self::mint(inner) => { ::abi_encode_raw(inner, out) } Self::transfer(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } Self::transferFrom(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } } } } - use alloy_contract as alloy_contract; + use alloy_contract; /**Creates a new wrapper around an on-chain [`NonStandardERC20Balances`](self) contract instance. -See the [wrapper's documentation](`NonStandardERC20BalancesInstance`) for more details.*/ + See the [wrapper's documentation](`NonStandardERC20BalancesInstance`) for more details.*/ #[inline] pub const fn new< P: alloy_contract::private::Provider, @@ -1479,14 +1421,11 @@ See the [wrapper's documentation](`NonStandardERC20BalancesInstance`) for more d } /**Deploys this contract using the given `provider` and constructor arguments, if any. -Returns a new instance of the contract, if the deployment was successful. + 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.*/ + 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, - >( + pub fn deploy, N: alloy_contract::private::Network>( __provider: P, ) -> impl ::core::future::Future< Output = alloy_contract::Result>, @@ -1494,33 +1433,32 @@ For more fine-grained control over the deployment process, use [`deploy_builder` NonStandardERC20BalancesInstance::::deploy(__provider) } /**Creates a `RawCallBuilder` for deploying this contract using the given `provider` -and constructor arguments, if any. + 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.*/ + 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) -> alloy_contract::RawCallBuilder { + >( + __provider: P, + ) -> alloy_contract::RawCallBuilder { NonStandardERC20BalancesInstance::::deploy_builder(__provider) } /**A [`NonStandardERC20Balances`](self) instance. -Contains type-safe methods for interacting with an on-chain instance of the -[`NonStandardERC20Balances`](self) contract located at a given `address`, using a given -provider `P`. + Contains type-safe methods for interacting with an on-chain instance of the + [`NonStandardERC20Balances`](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. + 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.*/ + See the [module-level documentation](self) for all the available methods.*/ #[derive(Clone)] - pub struct NonStandardERC20BalancesInstance< - P, - N = alloy_contract::private::Ethereum, - > { + pub struct NonStandardERC20BalancesInstance { address: alloy_sol_types::private::Address, provider: P, _network: ::core::marker::PhantomData, @@ -1535,29 +1473,26 @@ See the [module-level documentation](self) for all the available methods.*/ } } /// Instantiation and getters/setters. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > NonStandardERC20BalancesInstance { + impl, N: alloy_contract::private::Network> + NonStandardERC20BalancesInstance + { /**Creates a new wrapper around an on-chain [`NonStandardERC20Balances`](self) contract instance. -See the [wrapper's documentation](`NonStandardERC20BalancesInstance`) for more details.*/ + See the [wrapper's documentation](`NonStandardERC20BalancesInstance`) for more details.*/ #[inline] - pub const fn new( - address: alloy_sol_types::private::Address, - __provider: P, - ) -> Self { + pub const fn new(address: alloy_sol_types::private::Address, __provider: P) -> Self { Self { address, provider: __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. + 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.*/ + For more fine-grained control over the deployment process, use [`deploy_builder`] instead.*/ #[inline] pub async fn deploy( __provider: P, @@ -1566,11 +1501,12 @@ For more fine-grained control over the deployment process, use [`deploy_builder` 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. + 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.*/ + 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( @@ -1578,21 +1514,25 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ ::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 { @@ -1600,7 +1540,8 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ } } impl NonStandardERC20BalancesInstance<&P, N> { - /// Clones the provider and returns a new instance with the cloned provider. + /// Clones the provider and returns a new instance with the cloned + /// provider. #[inline] pub fn with_cloned_provider(self) -> NonStandardERC20BalancesInstance { NonStandardERC20BalancesInstance { @@ -1611,20 +1552,22 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ } } /// Function calls. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > NonStandardERC20BalancesInstance { - /// Creates a new call builder using this contract instance's provider and address. + impl, N: alloy_contract::private::Network> + NonStandardERC20BalancesInstance + { + /// 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. + /// 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 [`allowance`] function. pub fn allowance( &self, @@ -1633,6 +1576,7 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ ) -> alloy_contract::SolCallBuilder<&P, allowanceCall, N> { self.call_builder(&allowanceCall { user, spender }) } + ///Creates a new call builder for the [`approve`] function. pub fn approve( &self, @@ -1641,6 +1585,7 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ ) -> alloy_contract::SolCallBuilder<&P, approveCall, N> { self.call_builder(&approveCall { spender, amount }) } + ///Creates a new call builder for the [`balanceOf`] function. pub fn balanceOf( &self, @@ -1648,6 +1593,7 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ ) -> alloy_contract::SolCallBuilder<&P, balanceOfCall, N> { self.call_builder(&balanceOfCall { user }) } + ///Creates a new call builder for the [`mint`] function. pub fn mint( &self, @@ -1656,6 +1602,7 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ ) -> alloy_contract::SolCallBuilder<&P, mintCall, N> { self.call_builder(&mintCall { user, amount }) } + ///Creates a new call builder for the [`transfer`] function. pub fn transfer( &self, @@ -1664,6 +1611,7 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ ) -> alloy_contract::SolCallBuilder<&P, transferCall, N> { self.call_builder(&transferCall { to, amount }) } + ///Creates a new call builder for the [`transferFrom`] function. pub fn transferFrom( &self, @@ -1671,24 +1619,19 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ to: alloy_sol_types::private::Address, amount: alloy_sol_types::private::primitives::aliases::U256, ) -> alloy_contract::SolCallBuilder<&P, transferFromCall, N> { - self.call_builder( - &transferFromCall { - from, - to, - amount, - }, - ) + self.call_builder(&transferFromCall { from, to, amount }) } } /// Event filters. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > NonStandardERC20BalancesInstance { - /// Creates a new event filter using this contract instance's provider and address. + impl, N: alloy_contract::private::Network> + NonStandardERC20BalancesInstance + { + /// 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. + /// 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> { @@ -1696,6 +1639,5 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ } } } -pub type Instance = NonStandardERC20Balances::NonStandardERC20BalancesInstance< - ::alloy_provider::DynProvider, ->; +pub type Instance = + NonStandardERC20Balances::NonStandardERC20BalancesInstance<::alloy_provider::DynProvider>; diff --git a/contracts/generated/contracts-generated/pancakerouter/src/lib.rs b/contracts/generated/contracts-generated/pancakerouter/src/lib.rs index 86f4b6d7e0..7427fc054d 100644 --- a/contracts/generated/contracts-generated/pancakerouter/src/lib.rs +++ b/contracts/generated/contracts-generated/pancakerouter/src/lib.rs @@ -1,4 +1,10 @@ -#![allow(unused_imports, unused_attributes, clippy::all, rustdoc::all, non_snake_case)] +#![allow( + unused_imports, + unused_attributes, + clippy::all, + rustdoc::all, + non_snake_case +)] //! Auto-generated contract bindings. Do not edit. /** @@ -184,18 +190,18 @@ interface PancakeRouter { clippy::empty_structs_with_brackets )] pub mod PancakeRouter { - use super::*; - use alloy_sol_types as alloy_sol_types; + use {super::*, alloy_sol_types}; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `WETH()` and selector `0xad5c4648`. -```solidity -function WETH() external pure returns (address); -```*/ + ```solidity + function WETH() external pure returns (address); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct WETHCall; #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`WETH()`](WETHCall) function. + ///Container type for the return parameters of the [`WETH()`](WETHCall) + /// function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct WETHReturn { @@ -209,7 +215,7 @@ function WETH() external pure returns (address); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -218,9 +224,7 @@ function WETH() external pure returns (address); type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -250,9 +254,7 @@ function WETH() external pure returns (address); type UnderlyingRustTuple<'a> = (alloy_sol_types::private::Address,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -277,63 +279,58 @@ function WETH() external pure returns (address); #[automatically_derived] impl alloy_sol_types::SolCall for WETHCall { type Parameters<'a> = (); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = alloy_sol_types::private::Address; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (alloy_sol_types::sol_data::Address,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "WETH()"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [173u8, 92u8, 70u8, 72u8]; + const SIGNATURE: &'static str = "WETH()"; + #[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, - ), - ) + (::tokenize(ret),) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) - .map(|r| { + as alloy_sol_types::SolType>::abi_decode_sequence(data).map( + |r| { let r: WETHReturn = 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: WETHReturn = r.into(); - r._0 - }) + 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: WETHReturn = r.into(); + r._0 + }) } } }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `addLiquidity(address,address,uint256,uint256,uint256,uint256,address,uint256)` and selector `0xe8e33700`. -```solidity -function addLiquidity(address tokenA, address tokenB, uint256 amountADesired, uint256 amountBDesired, uint256 amountAMin, uint256 amountBMin, address to, uint256 deadline) external returns (uint256 amountA, uint256 amountB, uint256 liquidity); -```*/ + ```solidity + function addLiquidity(address tokenA, address tokenB, uint256 amountADesired, uint256 amountBDesired, uint256 amountAMin, uint256 amountBMin, address to, uint256 deadline) external returns (uint256 amountA, uint256 amountB, uint256 liquidity); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct addLiquidityCall { @@ -355,7 +352,9 @@ function addLiquidity(address tokenA, address tokenB, uint256 amountADesired, ui pub deadline: alloy_sol_types::private::primitives::aliases::U256, } #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`addLiquidity(address,address,uint256,uint256,uint256,uint256,address,uint256)`](addLiquidityCall) function. + ///Container type for the return parameters of the + /// [`addLiquidity(address,address,uint256,uint256,uint256,uint256,address, + /// uint256)`](addLiquidityCall) function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct addLiquidityReturn { @@ -373,7 +372,7 @@ function addLiquidity(address tokenA, address tokenB, uint256 amountADesired, ui clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -400,9 +399,7 @@ function addLiquidity(address tokenA, address tokenB, uint256 amountADesired, ui ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -458,9 +455,7 @@ function addLiquidity(address tokenA, address tokenB, uint256 amountADesired, ui ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -487,19 +482,17 @@ function addLiquidity(address tokenA, address tokenB, uint256 amountADesired, ui } } impl addLiquidityReturn { - fn _tokenize( - &self, - ) -> ::ReturnToken<'_> { + fn _tokenize(&self) -> ::ReturnToken<'_> { ( - as alloy_sol_types::SolType>::tokenize(&self.amountA), - as alloy_sol_types::SolType>::tokenize(&self.amountB), - as alloy_sol_types::SolType>::tokenize(&self.liquidity), + as alloy_sol_types::SolType>::tokenize( + &self.amountA, + ), + as alloy_sol_types::SolType>::tokenize( + &self.amountB, + ), + as alloy_sol_types::SolType>::tokenize( + &self.liquidity, + ), ) } } @@ -515,26 +508,26 @@ function addLiquidity(address tokenA, address tokenB, uint256 amountADesired, ui 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 = addLiquidityReturn; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = ( alloy_sol_types::sol_data::Uint<256>, alloy_sol_types::sol_data::Uint<256>, alloy_sol_types::sol_data::Uint<256>, ); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "addLiquidity(address,address,uint256,uint256,uint256,uint256,address,uint256)"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [232u8, 227u8, 55u8, 0u8]; + const SIGNATURE: &'static str = + "addLiquidity(address,address,uint256,uint256,uint256,uint256,address,uint256)"; + #[inline] fn new<'a>( tuple: as alloy_sol_types::SolType>::RustType, ) -> Self { tuple.into() } + #[inline] fn tokenize(&self) -> Self::Token<'_> { ( @@ -544,58 +537,58 @@ function addLiquidity(address tokenA, address tokenB, uint256 amountADesired, ui ::tokenize( &self.tokenB, ), - as alloy_sol_types::SolType>::tokenize(&self.amountADesired), - as alloy_sol_types::SolType>::tokenize(&self.amountBDesired), - as alloy_sol_types::SolType>::tokenize(&self.amountAMin), - as alloy_sol_types::SolType>::tokenize(&self.amountBMin), + as alloy_sol_types::SolType>::tokenize( + &self.amountADesired, + ), + as alloy_sol_types::SolType>::tokenize( + &self.amountBDesired, + ), + as alloy_sol_types::SolType>::tokenize( + &self.amountAMin, + ), + as alloy_sol_types::SolType>::tokenize( + &self.amountBMin, + ), ::tokenize( &self.to, ), - as alloy_sol_types::SolType>::tokenize(&self.deadline), + as alloy_sol_types::SolType>::tokenize( + &self.deadline, + ), ) } + #[inline] fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { addLiquidityReturn::_tokenize(ret) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) + 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) + 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(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `factory()` and selector `0xc45a0155`. -```solidity -function factory() external pure returns (address); -```*/ + ```solidity + function factory() external pure returns (address); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct factoryCall; #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`factory()`](factoryCall) function. + ///Container type for the return parameters of the + /// [`factory()`](factoryCall) function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct factoryReturn { @@ -609,7 +602,7 @@ function factory() external pure returns (address); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -618,9 +611,7 @@ function factory() external pure returns (address); type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -650,9 +641,7 @@ function factory() external pure returns (address); type UnderlyingRustTuple<'a> = (alloy_sol_types::private::Address,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -677,63 +666,58 @@ function factory() external pure returns (address); #[automatically_derived] impl alloy_sol_types::SolCall for factoryCall { type Parameters<'a> = (); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = alloy_sol_types::private::Address; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (alloy_sol_types::sol_data::Address,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "factory()"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [196u8, 90u8, 1u8, 85u8]; + const SIGNATURE: &'static str = "factory()"; + #[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, - ), - ) + (::tokenize(ret),) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) - .map(|r| { + as alloy_sol_types::SolType>::abi_decode_sequence(data).map( + |r| { let r: factoryReturn = 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: factoryReturn = r.into(); - r._0 - }) + 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: factoryReturn = r.into(); + r._0 + }) } } }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `quote(uint256,uint256,uint256)` and selector `0xad615dec`. -```solidity -function quote(uint256 amountA, uint256 reserveA, uint256 reserveB) external pure returns (uint256 amountB); -```*/ + ```solidity + function quote(uint256 amountA, uint256 reserveA, uint256 reserveB) external pure returns (uint256 amountB); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct quoteCall { @@ -745,7 +729,8 @@ function quote(uint256 amountA, uint256 reserveA, uint256 reserveB) external pur pub reserveB: alloy_sol_types::private::primitives::aliases::U256, } #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`quote(uint256,uint256,uint256)`](quoteCall) function. + ///Container type for the return parameters of the + /// [`quote(uint256,uint256,uint256)`](quoteCall) function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct quoteReturn { @@ -759,7 +744,7 @@ function quote(uint256 amountA, uint256 reserveA, uint256 reserveB) external pur clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -776,9 +761,7 @@ function quote(uint256 amountA, uint256 reserveA, uint256 reserveB) external pur ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -809,14 +792,10 @@ function quote(uint256 amountA, uint256 reserveA, uint256 reserveB) external pur #[allow(dead_code)] type UnderlyingSolTuple<'a> = (alloy_sol_types::sol_data::Uint<256>,); #[doc(hidden)] - type UnderlyingRustTuple<'a> = ( - alloy_sol_types::private::primitives::aliases::U256, - ); + 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, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -845,73 +824,72 @@ function quote(uint256 amountA, uint256 reserveA, uint256 reserveB) external pur 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 = alloy_sol_types::private::primitives::aliases::U256; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (alloy_sol_types::sol_data::Uint<256>,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "quote(uint256,uint256,uint256)"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [173u8, 97u8, 93u8, 236u8]; + const SIGNATURE: &'static str = "quote(uint256,uint256,uint256)"; + #[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.amountA), - as alloy_sol_types::SolType>::tokenize(&self.reserveA), - as alloy_sol_types::SolType>::tokenize(&self.reserveB), + as alloy_sol_types::SolType>::tokenize( + &self.amountA, + ), + as alloy_sol_types::SolType>::tokenize( + &self.reserveA, + ), + as alloy_sol_types::SolType>::tokenize( + &self.reserveB, + ), ) } + #[inline] fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { ( - as alloy_sol_types::SolType>::tokenize(ret), + 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| { + as alloy_sol_types::SolType>::abi_decode_sequence(data).map( + |r| { let r: quoteReturn = r.into(); r.amountB - }) + }, + ) } + #[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: quoteReturn = r.into(); - r.amountB - }) + 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: quoteReturn = r.into(); + r.amountB + }) } } }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `swapTokensForExactTokens(uint256,uint256,address[],address,uint256)` and selector `0x8803dbee`. -```solidity -function swapTokensForExactTokens(uint256 amountOut, uint256 amountInMax, address[] memory path, address to, uint256 deadline) external returns (uint256[] memory amounts); -```*/ + ```solidity + function swapTokensForExactTokens(uint256 amountOut, uint256 amountInMax, address[] memory path, address to, uint256 deadline) external returns (uint256[] memory amounts); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct swapTokensForExactTokensCall { @@ -927,14 +905,15 @@ function swapTokensForExactTokens(uint256 amountOut, uint256 amountInMax, addres pub deadline: alloy_sol_types::private::primitives::aliases::U256, } #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`swapTokensForExactTokens(uint256,uint256,address[],address,uint256)`](swapTokensForExactTokensCall) function. + ///Container type for the return parameters of the + /// [`swapTokensForExactTokens(uint256,uint256,address[],address, + /// uint256)`](swapTokensForExactTokensCall) function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct swapTokensForExactTokensReturn { #[allow(missing_docs)] - pub amounts: alloy_sol_types::private::Vec< - alloy_sol_types::private::primitives::aliases::U256, - >, + pub amounts: + alloy_sol_types::private::Vec, } #[allow( non_camel_case_types, @@ -943,7 +922,7 @@ function swapTokensForExactTokens(uint256 amountOut, uint256 amountInMax, addres clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -964,9 +943,7 @@ function swapTokensForExactTokens(uint256 amountOut, uint256 amountInMax, addres ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -975,8 +952,7 @@ function swapTokensForExactTokens(uint256 amountOut, uint256 amountInMax, addres } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From - for UnderlyingRustTuple<'_> { + impl ::core::convert::From for UnderlyingRustTuple<'_> { fn from(value: swapTokensForExactTokensCall) -> Self { ( value.amountOut, @@ -989,8 +965,7 @@ function swapTokensForExactTokens(uint256 amountOut, uint256 amountInMax, addres } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From> - for swapTokensForExactTokensCall { + impl ::core::convert::From> for swapTokensForExactTokensCall { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { Self { amountOut: tuple.0, @@ -1005,20 +980,15 @@ function swapTokensForExactTokens(uint256 amountOut, uint256 amountInMax, addres { #[doc(hidden)] #[allow(dead_code)] - type UnderlyingSolTuple<'a> = ( - alloy_sol_types::sol_data::Array>, - ); + type UnderlyingSolTuple<'a> = + (alloy_sol_types::sol_data::Array>,); #[doc(hidden)] type UnderlyingRustTuple<'a> = ( - alloy_sol_types::private::Vec< - alloy_sol_types::private::primitives::aliases::U256, - >, + alloy_sol_types::private::Vec, ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1027,16 +997,14 @@ function swapTokensForExactTokens(uint256 amountOut, uint256 amountInMax, addres } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From - for UnderlyingRustTuple<'_> { + impl ::core::convert::From for UnderlyingRustTuple<'_> { fn from(value: swapTokensForExactTokensReturn) -> Self { (value.amounts,) } } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From> - for swapTokensForExactTokensReturn { + impl ::core::convert::From> for swapTokensForExactTokensReturn { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { Self { amounts: tuple.0 } } @@ -1051,26 +1019,24 @@ function swapTokensForExactTokens(uint256 amountOut, uint256 amountInMax, addres 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 = alloy_sol_types::private::Vec< - alloy_sol_types::private::primitives::aliases::U256, - >; - type ReturnTuple<'a> = ( - alloy_sol_types::sol_data::Array>, - ); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "swapTokensForExactTokens(uint256,uint256,address[],address,uint256)"; + type Return = + alloy_sol_types::private::Vec; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + type ReturnTuple<'a> = + (alloy_sol_types::sol_data::Array>,); + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [136u8, 3u8, 219u8, 238u8]; + const SIGNATURE: &'static str = + "swapTokensForExactTokens(uint256,uint256,address[],address,uint256)"; + #[inline] fn new<'a>( tuple: as alloy_sol_types::SolType>::RustType, ) -> Self { tuple.into() } + #[inline] fn tokenize(&self) -> Self::Token<'_> { ( @@ -1091,41 +1057,38 @@ function swapTokensForExactTokens(uint256 amountOut, uint256 amountInMax, addres > as alloy_sol_types::SolType>::tokenize(&self.deadline), ) } + #[inline] fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { - ( - , - > as alloy_sol_types::SolType>::tokenize(ret), - ) + (, + > 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| { + as alloy_sol_types::SolType>::abi_decode_sequence(data).map( + |r| { let r: swapTokensForExactTokensReturn = r.into(); r.amounts - }) + }, + ) } + #[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: swapTokensForExactTokensReturn = r.into(); - r.amounts - }) + 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: swapTokensForExactTokensReturn = r.into(); + r.amounts + }) } } }; ///Container for all the [`PancakeRouter`](self) function calls. #[derive(Clone)] - #[derive()] pub enum PancakeRouterCalls { #[allow(missing_docs)] WETH(WETHCall), @@ -1141,8 +1104,9 @@ function swapTokensForExactTokens(uint256 amountOut, uint256 amountInMax, addres impl PancakeRouterCalls { /// 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. + /// 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]] = &[ @@ -1152,14 +1116,6 @@ function swapTokensForExactTokens(uint256 amountOut, uint256 amountInMax, addres [196u8, 90u8, 1u8, 85u8], [232u8, 227u8, 55u8, 0u8], ]; - /// The names of the variants in the same order as `SELECTORS`. - pub const VARIANT_NAMES: &'static [&'static str] = &[ - ::core::stringify!(swapTokensForExactTokens), - ::core::stringify!(WETH), - ::core::stringify!(quote), - ::core::stringify!(factory), - ::core::stringify!(addLiquidity), - ]; /// The signatures in the same order as `SELECTORS`. pub const SIGNATURES: &'static [&'static str] = &[ ::SIGNATURE, @@ -1168,6 +1124,15 @@ function swapTokensForExactTokens(uint256 amountOut, uint256 amountInMax, addres ::SIGNATURE, ::SIGNATURE, ]; + /// The names of the variants in the same order as `SELECTORS`. + pub const VARIANT_NAMES: &'static [&'static str] = &[ + ::core::stringify!(swapTokensForExactTokens), + ::core::stringify!(WETH), + ::core::stringify!(quote), + ::core::stringify!(factory), + ::core::stringify!(addLiquidity), + ]; + /// Returns the signature for the given selector, if known. #[inline] pub fn signature_by_selector( @@ -1180,27 +1145,25 @@ function swapTokensForExactTokens(uint256 amountOut, uint256 amountInMax, addres ::core::result::Result::Err(_) => ::core::option::Option::None, } } + /// Returns the enum variant name for the given selector, if known. #[inline] - pub fn name_by_selector( - selector: [u8; 4usize], - ) -> ::core::option::Option<&'static str> { + pub fn name_by_selector(selector: [u8; 4usize]) -> ::core::option::Option<&'static str> { let sig = Self::signature_by_selector(selector)?; sig.split_once('(').map(|(name, _)| name) } } #[automatically_derived] impl alloy_sol_types::SolInterface for PancakeRouterCalls { - const NAME: &'static str = "PancakeRouterCalls"; - const MIN_DATA_LENGTH: usize = 0usize; const COUNT: usize = 5usize; + const MIN_DATA_LENGTH: usize = 0usize; + const NAME: &'static str = "PancakeRouterCalls"; + #[inline] fn selector(&self) -> [u8; 4] { match self { Self::WETH(_) => ::SELECTOR, - Self::addLiquidity(_) => { - ::SELECTOR - } + Self::addLiquidity(_) => ::SELECTOR, Self::factory(_) => ::SELECTOR, Self::quote(_) => ::SELECTOR, Self::swapTokensForExactTokens(_) => { @@ -1208,31 +1171,29 @@ function swapTokensForExactTokens(uint256 amountOut, uint256 amountInMax, addres } } } + #[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 abi_decode_raw(selector: [u8; 4], data: &[u8]) -> alloy_sol_types::Result { + static DECODE_SHIMS: &[fn(&[u8]) -> alloy_sol_types::Result] = &[ { fn swapTokensForExactTokens( data: &[u8], ) -> alloy_sol_types::Result { ::abi_decode_raw( - data, - ) - .map(PancakeRouterCalls::swapTokensForExactTokens) + data, + ) + .map(PancakeRouterCalls::swapTokensForExactTokens) } swapTokensForExactTokens }, @@ -1244,45 +1205,36 @@ function swapTokensForExactTokens(uint256 amountOut, uint256 amountInMax, addres WETH }, { - fn quote( - data: &[u8], - ) -> alloy_sol_types::Result { + fn quote(data: &[u8]) -> alloy_sol_types::Result { ::abi_decode_raw(data) .map(PancakeRouterCalls::quote) } quote }, { - fn factory( - data: &[u8], - ) -> alloy_sol_types::Result { + fn factory(data: &[u8]) -> alloy_sol_types::Result { ::abi_decode_raw(data) .map(PancakeRouterCalls::factory) } factory }, { - fn addLiquidity( - data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, - ) + fn addLiquidity(data: &[u8]) -> alloy_sol_types::Result { + ::abi_decode_raw(data) .map(PancakeRouterCalls::addLiquidity) } addLiquidity }, ]; let Ok(idx) = Self::SELECTORS.binary_search(&selector) else { - return Err( - alloy_sol_types::Error::unknown_selector( - ::NAME, - selector, - ), - ); + return Err(alloy_sol_types::Error::unknown_selector( + ::NAME, + selector, + )); }; DECODE_SHIMS[idx](data) } + #[inline] #[allow(non_snake_case)] fn abi_decode_raw_validate( @@ -1291,7 +1243,8 @@ function swapTokensForExactTokens(uint256 amountOut, uint256 amountInMax, addres ) -> alloy_sol_types::Result { static DECODE_VALIDATE_SHIMS: &[fn( &[u8], - ) -> alloy_sol_types::Result] = &[ + ) + -> alloy_sol_types::Result] = &[ { fn swapTokensForExactTokens( data: &[u8], @@ -1305,57 +1258,44 @@ function swapTokensForExactTokens(uint256 amountOut, uint256 amountInMax, addres }, { fn WETH(data: &[u8]) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) + ::abi_decode_raw_validate(data) .map(PancakeRouterCalls::WETH) } WETH }, { - fn quote( - data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) + fn quote(data: &[u8]) -> alloy_sol_types::Result { + ::abi_decode_raw_validate(data) .map(PancakeRouterCalls::quote) } quote }, { - fn factory( - data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) + fn factory(data: &[u8]) -> alloy_sol_types::Result { + ::abi_decode_raw_validate(data) .map(PancakeRouterCalls::factory) } factory }, { - fn addLiquidity( - data: &[u8], - ) -> alloy_sol_types::Result { + fn addLiquidity(data: &[u8]) -> alloy_sol_types::Result { ::abi_decode_raw_validate( - data, - ) - .map(PancakeRouterCalls::addLiquidity) + data, + ) + .map(PancakeRouterCalls::addLiquidity) } addLiquidity }, ]; let Ok(idx) = Self::SELECTORS.binary_search(&selector) else { - return Err( - alloy_sol_types::Error::unknown_selector( - ::NAME, - selector, - ), - ); + return Err(alloy_sol_types::Error::unknown_selector( + ::NAME, + selector, + )); }; DECODE_VALIDATE_SHIMS[idx](data) } + #[inline] fn abi_encoded_size(&self) -> usize { match self { @@ -1363,9 +1303,7 @@ function swapTokensForExactTokens(uint256 amountOut, uint256 amountInMax, addres ::abi_encoded_size(inner) } Self::addLiquidity(inner) => { - ::abi_encoded_size( - inner, - ) + ::abi_encoded_size(inner) } Self::factory(inner) => { ::abi_encoded_size(inner) @@ -1380,6 +1318,7 @@ function swapTokensForExactTokens(uint256 amountOut, uint256 amountInMax, addres } } } + #[inline] fn abi_encode_raw(&self, out: &mut alloy_sol_types::private::Vec) { match self { @@ -1387,10 +1326,7 @@ function swapTokensForExactTokens(uint256 amountOut, uint256 amountInMax, addres ::abi_encode_raw(inner, out) } Self::addLiquidity(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } Self::factory(inner) => { ::abi_encode_raw(inner, out) @@ -1400,17 +1336,16 @@ function swapTokensForExactTokens(uint256 amountOut, uint256 amountInMax, addres } Self::swapTokensForExactTokens(inner) => { ::abi_encode_raw( - inner, - out, + inner, out, ) } } } } - use alloy_contract as alloy_contract; + use alloy_contract; /**Creates a new wrapper around an on-chain [`PancakeRouter`](self) contract instance. -See the [wrapper's documentation](`PancakeRouterInstance`) for more details.*/ + See the [wrapper's documentation](`PancakeRouterInstance`) for more details.*/ #[inline] pub const fn new< P: alloy_contract::private::Provider, @@ -1423,15 +1358,15 @@ See the [wrapper's documentation](`PancakeRouterInstance`) for more details.*/ } /**A [`PancakeRouter`](self) instance. -Contains type-safe methods for interacting with an on-chain instance of the -[`PancakeRouter`](self) contract located at a given `address`, using a given -provider `P`. + Contains type-safe methods for interacting with an on-chain instance of the + [`PancakeRouter`](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. + 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.*/ + See the [module-level documentation](self) for all the available methods.*/ #[derive(Clone)] pub struct PancakeRouterInstance { address: alloy_sol_types::private::Address, @@ -1442,43 +1377,45 @@ See the [module-level documentation](self) for all the available methods.*/ impl ::core::fmt::Debug for PancakeRouterInstance { #[inline] fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { - f.debug_tuple("PancakeRouterInstance").field(&self.address).finish() + f.debug_tuple("PancakeRouterInstance") + .field(&self.address) + .finish() } } /// Instantiation and getters/setters. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > PancakeRouterInstance { + impl, N: alloy_contract::private::Network> + PancakeRouterInstance + { /**Creates a new wrapper around an on-chain [`PancakeRouter`](self) contract instance. -See the [wrapper's documentation](`PancakeRouterInstance`) for more details.*/ + See the [wrapper's documentation](`PancakeRouterInstance`) for more details.*/ #[inline] - pub const fn new( - address: alloy_sol_types::private::Address, - __provider: P, - ) -> Self { + pub const fn new(address: alloy_sol_types::private::Address, __provider: P) -> Self { Self { address, provider: __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 { @@ -1486,7 +1423,8 @@ See the [wrapper's documentation](`PancakeRouterInstance`) for more details.*/ } } impl PancakeRouterInstance<&P, N> { - /// Clones the provider and returns a new instance with the cloned provider. + /// Clones the provider and returns a new instance with the cloned + /// provider. #[inline] pub fn with_cloned_provider(self) -> PancakeRouterInstance { PancakeRouterInstance { @@ -1497,24 +1435,27 @@ See the [wrapper's documentation](`PancakeRouterInstance`) for more details.*/ } } /// Function calls. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > PancakeRouterInstance { - /// Creates a new call builder using this contract instance's provider and address. + impl, N: alloy_contract::private::Network> + PancakeRouterInstance + { + /// 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. + /// 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 [`WETH`] function. pub fn WETH(&self) -> alloy_contract::SolCallBuilder<&P, WETHCall, N> { self.call_builder(&WETHCall) } + ///Creates a new call builder for the [`addLiquidity`] function. pub fn addLiquidity( &self, @@ -1527,23 +1468,23 @@ See the [wrapper's documentation](`PancakeRouterInstance`) for more details.*/ to: alloy_sol_types::private::Address, deadline: alloy_sol_types::private::primitives::aliases::U256, ) -> alloy_contract::SolCallBuilder<&P, addLiquidityCall, N> { - self.call_builder( - &addLiquidityCall { - tokenA, - tokenB, - amountADesired, - amountBDesired, - amountAMin, - amountBMin, - to, - deadline, - }, - ) + self.call_builder(&addLiquidityCall { + tokenA, + tokenB, + amountADesired, + amountBDesired, + amountAMin, + amountBMin, + to, + deadline, + }) } + ///Creates a new call builder for the [`factory`] function. pub fn factory(&self) -> alloy_contract::SolCallBuilder<&P, factoryCall, N> { self.call_builder(&factoryCall) } + ///Creates a new call builder for the [`quote`] function. pub fn quote( &self, @@ -1551,15 +1492,15 @@ See the [wrapper's documentation](`PancakeRouterInstance`) for more details.*/ reserveA: alloy_sol_types::private::primitives::aliases::U256, reserveB: alloy_sol_types::private::primitives::aliases::U256, ) -> alloy_contract::SolCallBuilder<&P, quoteCall, N> { - self.call_builder( - "eCall { - amountA, - reserveA, - reserveB, - }, - ) + self.call_builder("eCall { + amountA, + reserveA, + reserveB, + }) } - ///Creates a new call builder for the [`swapTokensForExactTokens`] function. + + ///Creates a new call builder for the [`swapTokensForExactTokens`] + /// function. pub fn swapTokensForExactTokens( &self, amountOut: alloy_sol_types::private::primitives::aliases::U256, @@ -1568,26 +1509,25 @@ See the [wrapper's documentation](`PancakeRouterInstance`) for more details.*/ to: alloy_sol_types::private::Address, deadline: alloy_sol_types::private::primitives::aliases::U256, ) -> alloy_contract::SolCallBuilder<&P, swapTokensForExactTokensCall, N> { - self.call_builder( - &swapTokensForExactTokensCall { - amountOut, - amountInMax, - path, - to, - deadline, - }, - ) + self.call_builder(&swapTokensForExactTokensCall { + amountOut, + amountInMax, + path, + to, + deadline, + }) } } /// Event filters. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > PancakeRouterInstance { - /// Creates a new event filter using this contract instance's provider and address. + impl, N: alloy_contract::private::Network> + PancakeRouterInstance + { + /// 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. + /// 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> { @@ -1597,45 +1537,29 @@ See the [wrapper's documentation](`PancakeRouterInstance`) for more details.*/ } pub type Instance = PancakeRouter::PancakeRouterInstance<::alloy_provider::DynProvider>; use { - std::{sync::LazyLock, collections::HashMap}, - anyhow::{Result, Context}, - alloy_primitives::{address, Address}, - alloy_provider::{Provider, DynProvider}, + alloy_primitives::{Address, address}, + alloy_provider::{DynProvider, Provider}, + anyhow::{Context, Result}, + std::{collections::HashMap, sync::LazyLock}, }; pub const fn deployment_info(chain_id: u64) -> Option<(Address, Option)> { match chain_id { - 1u64 => { - Some(( - ::alloy_primitives::address!( - "0xEfF92A263d31888d860bD50809A8D171709b7b1c" - ), - None, - )) - } - 56u64 => { - Some(( - ::alloy_primitives::address!( - "0x10ED43C718714eb63d5aA57B78B54704E256024E" - ), - None, - )) - } - 8453u64 => { - Some(( - ::alloy_primitives::address!( - "0x8cFe327CEc66d1C090Dd72bd0FF11d690C33a2Eb" - ), - None, - )) - } - 42161u64 => { - Some(( - ::alloy_primitives::address!( - "0x8cFe327CEc66d1C090Dd72bd0FF11d690C33a2Eb" - ), - None, - )) - } + 1u64 => Some(( + ::alloy_primitives::address!("0xEfF92A263d31888d860bD50809A8D171709b7b1c"), + None, + )), + 56u64 => Some(( + ::alloy_primitives::address!("0x10ED43C718714eb63d5aA57B78B54704E256024E"), + None, + )), + 8453u64 => Some(( + ::alloy_primitives::address!("0x8cFe327CEc66d1C090Dd72bd0FF11d690C33a2Eb"), + None, + )), + 42161u64 => Some(( + ::alloy_primitives::address!("0x8cFe327CEc66d1C090Dd72bd0FF11d690C33a2Eb"), + None, + )), _ => None, } } @@ -1652,9 +1576,7 @@ pub const fn deployment_block(chain_id: &u64) -> Option { } } impl Instance { - pub fn deployed( - provider: &DynProvider, - ) -> impl Future> + Send { + pub fn deployed(provider: &DynProvider) -> impl Future> + Send { async move { let chain_id = provider .get_chain_id() diff --git a/contracts/generated/contracts-generated/permit2/src/lib.rs b/contracts/generated/contracts-generated/permit2/src/lib.rs index 8b4a212e97..a3af444fbc 100644 --- a/contracts/generated/contracts-generated/permit2/src/lib.rs +++ b/contracts/generated/contracts-generated/permit2/src/lib.rs @@ -1,4 +1,10 @@ -#![allow(unused_imports, unused_attributes, clippy::all, rustdoc::all, non_snake_case)] +#![allow( + unused_imports, + unused_attributes, + clippy::all, + rustdoc::all, + non_snake_case +)] //! Auto-generated contract bindings. Do not edit. ///Module containing a contract's types and functions. /** @@ -17,12 +23,11 @@ library IAllowanceTransfer { clippy::empty_structs_with_brackets )] pub mod IAllowanceTransfer { - use super::*; - use alloy_sol_types as alloy_sol_types; + use {super::*, alloy_sol_types}; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**```solidity -struct PermitDetails { address token; uint160 amount; uint48 expiration; uint48 nonce; } -```*/ + struct PermitDetails { address token; uint160 amount; uint48 expiration; uint48 nonce; } + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct PermitDetails { @@ -42,7 +47,7 @@ struct PermitDetails { address token; uint160 amount; uint48 expiration; uint48 clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[doc(hidden)] #[allow(dead_code)] type UnderlyingSolTuple<'a> = ( @@ -60,9 +65,7 @@ struct PermitDetails { address token; uint160 amount; uint48 expiration; uint48 ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -100,102 +103,99 @@ struct PermitDetails { address token; uint160 amount; uint48 expiration; uint48 ::tokenize( &self.token, ), - as alloy_sol_types::SolType>::tokenize(&self.amount), - as alloy_sol_types::SolType>::tokenize(&self.expiration), - as alloy_sol_types::SolType>::tokenize(&self.nonce), + as alloy_sol_types::SolType>::tokenize( + &self.amount, + ), + as alloy_sol_types::SolType>::tokenize( + &self.expiration, + ), + as alloy_sol_types::SolType>::tokenize( + &self.nonce, + ), ) } + #[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) + 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) + 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) + 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 PermitDetails { type RustType = Self; - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + + const ENCODED_SIZE: Option = + as alloy_sol_types::SolType>::ENCODED_SIZE; + const PACKED_ENCODED_SIZE: Option = + as alloy_sol_types::SolType>::PACKED_ENCODED_SIZE; 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); + let tuple = as alloy_sol_types::SolType>::detokenize(token); >>::from(tuple) } } #[automatically_derived] impl alloy_sol_types::SolStruct for PermitDetails { const NAME: &'static str = "PermitDetails"; + #[inline] fn eip712_root_type() -> alloy_sol_types::private::Cow<'static, str> { alloy_sol_types::private::Cow::Borrowed( "PermitDetails(address token,uint160 amount,uint48 expiration,uint48 nonce)", ) } + #[inline] - fn eip712_components() -> alloy_sol_types::private::Vec< - alloy_sol_types::private::Cow<'static, str>, - > { + fn eip712_components() + -> alloy_sol_types::private::Vec> + { 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 { [ @@ -241,14 +241,13 @@ struct PermitDetails { address token; uint160 amount; uint48 expiration; uint48 48, > as alloy_sol_types::EventTopic>::topic_preimage_length(&rust.nonce) } + #[inline] fn encode_topic_preimage( rust: &Self::RustType, out: &mut alloy_sol_types::private::Vec, ) { - out.reserve( - ::topic_preimage_length(rust), - ); + out.reserve(::topic_preimage_length(rust)); ::encode_topic_preimage( &rust.token, out, @@ -272,25 +271,19 @@ struct PermitDetails { address token; uint160 amount; uint48 expiration; uint48 out, ); } + #[inline] - fn encode_topic( - rust: &Self::RustType, - ) -> alloy_sol_types::abi::token::WordToken { + 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), - ) + ::encode_topic_preimage(rust, &mut out); + alloy_sol_types::abi::token::WordToken(alloy_sol_types::private::keccak256(out)) } } }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**```solidity -struct PermitSingle { PermitDetails details; address spender; uint256 sigDeadline; } -```*/ + struct PermitSingle { PermitDetails details; address spender; uint256 sigDeadline; } + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct PermitSingle { @@ -308,7 +301,7 @@ struct PermitSingle { PermitDetails details; address spender; uint256 sigDeadlin clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[doc(hidden)] #[allow(dead_code)] type UnderlyingSolTuple<'a> = ( @@ -324,9 +317,7 @@ struct PermitSingle { PermitDetails details; address spender; uint256 sigDeadlin ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -364,101 +355,92 @@ struct PermitSingle { PermitDetails details; address spender; uint256 sigDeadlin ::tokenize( &self.spender, ), - as alloy_sol_types::SolType>::tokenize(&self.sigDeadline), + as alloy_sol_types::SolType>::tokenize( + &self.sigDeadline, + ), ) } + #[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) + 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) + 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) + 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 PermitSingle { type RustType = Self; - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + + const ENCODED_SIZE: Option = + as alloy_sol_types::SolType>::ENCODED_SIZE; + const PACKED_ENCODED_SIZE: Option = + as alloy_sol_types::SolType>::PACKED_ENCODED_SIZE; 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); + let tuple = as alloy_sol_types::SolType>::detokenize(token); >>::from(tuple) } } #[automatically_derived] impl alloy_sol_types::SolStruct for PermitSingle { const NAME: &'static str = "PermitSingle"; + #[inline] fn eip712_root_type() -> alloy_sol_types::private::Cow<'static, str> { alloy_sol_types::private::Cow::Borrowed( "PermitSingle(PermitDetails details,address spender,uint256 sigDeadline)", ) } + #[inline] - fn eip712_components() -> alloy_sol_types::private::Vec< - alloy_sol_types::private::Cow<'static, str>, - > { + fn eip712_components() + -> alloy_sol_types::private::Vec> + { let mut components = alloy_sol_types::private::Vec::with_capacity(1); + components.push(::eip712_root_type()); components - .push( - ::eip712_root_type(), - ); - components - .extend( - ::eip712_components(), - ); + .extend(::eip712_components()); components } + #[inline] fn eip712_encode_data(&self) -> alloy_sol_types::private::Vec { [ @@ -495,14 +477,13 @@ struct PermitSingle { PermitDetails details; address spender; uint256 sigDeadlin &rust.sigDeadline, ) } + #[inline] fn encode_topic_preimage( rust: &Self::RustType, out: &mut alloy_sol_types::private::Vec, ) { - out.reserve( - ::topic_preimage_length(rust), - ); + out.reserve(::topic_preimage_length(rust)); ::encode_topic_preimage( &rust.details, out, @@ -518,25 +499,19 @@ struct PermitSingle { PermitDetails details; address spender; uint256 sigDeadlin out, ); } + #[inline] - fn encode_topic( - rust: &Self::RustType, - ) -> alloy_sol_types::abi::token::WordToken { + 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), - ) + ::encode_topic_preimage(rust, &mut out); + alloy_sol_types::abi::token::WordToken(alloy_sol_types::private::keccak256(out)) } } }; - use alloy_contract as alloy_contract; + use alloy_contract; /**Creates a new wrapper around an on-chain [`IAllowanceTransfer`](self) contract instance. -See the [wrapper's documentation](`IAllowanceTransferInstance`) for more details.*/ + See the [wrapper's documentation](`IAllowanceTransferInstance`) for more details.*/ #[inline] pub const fn new< P: alloy_contract::private::Provider, @@ -549,15 +524,15 @@ See the [wrapper's documentation](`IAllowanceTransferInstance`) for more details } /**A [`IAllowanceTransfer`](self) instance. -Contains type-safe methods for interacting with an on-chain instance of the -[`IAllowanceTransfer`](self) contract located at a given `address`, using a given -provider `P`. + Contains type-safe methods for interacting with an on-chain instance of the + [`IAllowanceTransfer`](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. + 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.*/ + See the [module-level documentation](self) for all the available methods.*/ #[derive(Clone)] pub struct IAllowanceTransferInstance { address: alloy_sol_types::private::Address, @@ -568,43 +543,45 @@ See the [module-level documentation](self) for all the available methods.*/ impl ::core::fmt::Debug for IAllowanceTransferInstance { #[inline] fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { - f.debug_tuple("IAllowanceTransferInstance").field(&self.address).finish() + f.debug_tuple("IAllowanceTransferInstance") + .field(&self.address) + .finish() } } /// Instantiation and getters/setters. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > IAllowanceTransferInstance { + impl, N: alloy_contract::private::Network> + IAllowanceTransferInstance + { /**Creates a new wrapper around an on-chain [`IAllowanceTransfer`](self) contract instance. -See the [wrapper's documentation](`IAllowanceTransferInstance`) for more details.*/ + See the [wrapper's documentation](`IAllowanceTransferInstance`) for more details.*/ #[inline] - pub const fn new( - address: alloy_sol_types::private::Address, - __provider: P, - ) -> Self { + pub const fn new(address: alloy_sol_types::private::Address, __provider: P) -> Self { Self { address, provider: __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 { @@ -612,7 +589,8 @@ See the [wrapper's documentation](`IAllowanceTransferInstance`) for more details } } impl IAllowanceTransferInstance<&P, N> { - /// Clones the provider and returns a new instance with the cloned provider. + /// Clones the provider and returns a new instance with the cloned + /// provider. #[inline] pub fn with_cloned_provider(self) -> IAllowanceTransferInstance { IAllowanceTransferInstance { @@ -623,14 +601,15 @@ See the [wrapper's documentation](`IAllowanceTransferInstance`) for more details } } /// Function calls. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > IAllowanceTransferInstance { - /// Creates a new call builder using this contract instance's provider and address. + impl, N: alloy_contract::private::Network> + IAllowanceTransferInstance + { + /// 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. + /// 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, @@ -639,14 +618,15 @@ See the [wrapper's documentation](`IAllowanceTransferInstance`) for more details } } /// Event filters. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > IAllowanceTransferInstance { - /// Creates a new event filter using this contract instance's provider and address. + impl, N: alloy_contract::private::Network> + IAllowanceTransferInstance + { + /// 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. + /// 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> { @@ -1128,8 +1108,7 @@ interface Permit2 { clippy::empty_structs_with_brackets )] pub mod Permit2 { - use super::*; - use alloy_sol_types as alloy_sol_types; + use {super::*, alloy_sol_types}; /// The creation / init bytecode of the contract. /// /// ```text @@ -1152,9 +1131,9 @@ pub mod Permit2 { ); #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Custom error with signature `AllowanceExpired(uint256)` and selector `0xd81b2f2e`. -```solidity -error AllowanceExpired(uint256 deadline); -```*/ + ```solidity + error AllowanceExpired(uint256 deadline); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct AllowanceExpired { @@ -1168,19 +1147,15 @@ error AllowanceExpired(uint256 deadline); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[doc(hidden)] #[allow(dead_code)] type UnderlyingSolTuple<'a> = (alloy_sol_types::sol_data::Uint<256>,); #[doc(hidden)] - type UnderlyingRustTuple<'a> = ( - alloy_sol_types::private::primitives::aliases::U256, - ); + 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, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1204,39 +1179,41 @@ error AllowanceExpired(uint256 deadline); #[automatically_derived] impl alloy_sol_types::SolError for AllowanceExpired { type Parameters<'a> = UnderlyingSolTuple<'a>; - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "AllowanceExpired(uint256)"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [216u8, 27u8, 47u8, 46u8]; + const SIGNATURE: &'static str = "AllowanceExpired(uint256)"; + #[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.deadline), + as alloy_sol_types::SolType>::tokenize( + &self.deadline, + ), ) } + #[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) + as alloy_sol_types::SolType>::abi_decode_sequence_validate( + data, + ) + .map(Self::new) } } }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Custom error with signature `ExcessiveInvalidation()` and selector `0x24d35a26`. -```solidity -error ExcessiveInvalidation(); -```*/ + ```solidity + error ExcessiveInvalidation(); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct ExcessiveInvalidation; @@ -1247,7 +1224,7 @@ error ExcessiveInvalidation(); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[doc(hidden)] #[allow(dead_code)] type UnderlyingSolTuple<'a> = (); @@ -1255,9 +1232,7 @@ error ExcessiveInvalidation(); type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1281,35 +1256,37 @@ error ExcessiveInvalidation(); #[automatically_derived] impl alloy_sol_types::SolError for ExcessiveInvalidation { type Parameters<'a> = UnderlyingSolTuple<'a>; - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "ExcessiveInvalidation()"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [36u8, 211u8, 90u8, 38u8]; + const SIGNATURE: &'static str = "ExcessiveInvalidation()"; + #[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) + as alloy_sol_types::SolType>::abi_decode_sequence_validate( + data, + ) + .map(Self::new) } } }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Custom error with signature `InsufficientAllowance(uint256)` and selector `0xf96fb071`. -```solidity -error InsufficientAllowance(uint256 amount); -```*/ + ```solidity + error InsufficientAllowance(uint256 amount); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct InsufficientAllowance { @@ -1323,19 +1300,15 @@ error InsufficientAllowance(uint256 amount); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[doc(hidden)] #[allow(dead_code)] type UnderlyingSolTuple<'a> = (alloy_sol_types::sol_data::Uint<256>,); #[doc(hidden)] - type UnderlyingRustTuple<'a> = ( - alloy_sol_types::private::primitives::aliases::U256, - ); + 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, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1359,39 +1332,41 @@ error InsufficientAllowance(uint256 amount); #[automatically_derived] impl alloy_sol_types::SolError for InsufficientAllowance { type Parameters<'a> = UnderlyingSolTuple<'a>; - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "InsufficientAllowance(uint256)"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [249u8, 111u8, 176u8, 113u8]; + const SIGNATURE: &'static str = "InsufficientAllowance(uint256)"; + #[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.amount), + as alloy_sol_types::SolType>::tokenize( + &self.amount, + ), ) } + #[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) + as alloy_sol_types::SolType>::abi_decode_sequence_validate( + data, + ) + .map(Self::new) } } }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Custom error with signature `InvalidAmount(uint256)` and selector `0x3728b83d`. -```solidity -error InvalidAmount(uint256 maxAmount); -```*/ + ```solidity + error InvalidAmount(uint256 maxAmount); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct InvalidAmount { @@ -1405,19 +1380,15 @@ error InvalidAmount(uint256 maxAmount); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[doc(hidden)] #[allow(dead_code)] type UnderlyingSolTuple<'a> = (alloy_sol_types::sol_data::Uint<256>,); #[doc(hidden)] - type UnderlyingRustTuple<'a> = ( - alloy_sol_types::private::primitives::aliases::U256, - ); + 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, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1441,39 +1412,41 @@ error InvalidAmount(uint256 maxAmount); #[automatically_derived] impl alloy_sol_types::SolError for InvalidAmount { type Parameters<'a> = UnderlyingSolTuple<'a>; - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "InvalidAmount(uint256)"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [55u8, 40u8, 184u8, 61u8]; + const SIGNATURE: &'static str = "InvalidAmount(uint256)"; + #[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.maxAmount), + as alloy_sol_types::SolType>::tokenize( + &self.maxAmount, + ), ) } + #[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) + as alloy_sol_types::SolType>::abi_decode_sequence_validate( + data, + ) + .map(Self::new) } } }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Custom error with signature `InvalidContractSignature()` and selector `0xb0669cbc`. -```solidity -error InvalidContractSignature(); -```*/ + ```solidity + error InvalidContractSignature(); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct InvalidContractSignature; @@ -1484,7 +1457,7 @@ error InvalidContractSignature(); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[doc(hidden)] #[allow(dead_code)] type UnderlyingSolTuple<'a> = (); @@ -1492,9 +1465,7 @@ error InvalidContractSignature(); type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1503,16 +1474,14 @@ error InvalidContractSignature(); } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From - for UnderlyingRustTuple<'_> { + impl ::core::convert::From for UnderlyingRustTuple<'_> { fn from(value: InvalidContractSignature) -> Self { () } } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From> - for InvalidContractSignature { + impl ::core::convert::From> for InvalidContractSignature { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { Self } @@ -1520,35 +1489,37 @@ error InvalidContractSignature(); #[automatically_derived] impl alloy_sol_types::SolError for InvalidContractSignature { type Parameters<'a> = UnderlyingSolTuple<'a>; - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "InvalidContractSignature()"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [176u8, 102u8, 156u8, 188u8]; + const SIGNATURE: &'static str = "InvalidContractSignature()"; + #[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) + as alloy_sol_types::SolType>::abi_decode_sequence_validate( + data, + ) + .map(Self::new) } } }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Custom error with signature `InvalidNonce()` and selector `0x756688fe`. -```solidity -error InvalidNonce(); -```*/ + ```solidity + error InvalidNonce(); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct InvalidNonce; @@ -1559,7 +1530,7 @@ error InvalidNonce(); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[doc(hidden)] #[allow(dead_code)] type UnderlyingSolTuple<'a> = (); @@ -1567,9 +1538,7 @@ error InvalidNonce(); type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1593,35 +1562,37 @@ error InvalidNonce(); #[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()"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [117u8, 102u8, 136u8, 254u8]; + const SIGNATURE: &'static str = "InvalidNonce()"; + #[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) + as alloy_sol_types::SolType>::abi_decode_sequence_validate( + data, + ) + .map(Self::new) } } }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Custom error with signature `InvalidSignature()` and selector `0x8baa579f`. -```solidity -error InvalidSignature(); -```*/ + ```solidity + error InvalidSignature(); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct InvalidSignature; @@ -1632,7 +1603,7 @@ error InvalidSignature(); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[doc(hidden)] #[allow(dead_code)] type UnderlyingSolTuple<'a> = (); @@ -1640,9 +1611,7 @@ error InvalidSignature(); type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1666,35 +1635,37 @@ error InvalidSignature(); #[automatically_derived] impl alloy_sol_types::SolError for InvalidSignature { type Parameters<'a> = UnderlyingSolTuple<'a>; - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "InvalidSignature()"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [139u8, 170u8, 87u8, 159u8]; + const SIGNATURE: &'static str = "InvalidSignature()"; + #[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) + as alloy_sol_types::SolType>::abi_decode_sequence_validate( + data, + ) + .map(Self::new) } } }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Custom error with signature `InvalidSignatureLength()` and selector `0x4be6321b`. -```solidity -error InvalidSignatureLength(); -```*/ + ```solidity + error InvalidSignatureLength(); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct InvalidSignatureLength; @@ -1705,7 +1676,7 @@ error InvalidSignatureLength(); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[doc(hidden)] #[allow(dead_code)] type UnderlyingSolTuple<'a> = (); @@ -1713,9 +1684,7 @@ error InvalidSignatureLength(); type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1739,35 +1708,37 @@ error InvalidSignatureLength(); #[automatically_derived] impl alloy_sol_types::SolError for InvalidSignatureLength { type Parameters<'a> = UnderlyingSolTuple<'a>; - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "InvalidSignatureLength()"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [75u8, 230u8, 50u8, 27u8]; + const SIGNATURE: &'static str = "InvalidSignatureLength()"; + #[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) + as alloy_sol_types::SolType>::abi_decode_sequence_validate( + data, + ) + .map(Self::new) } } }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Custom error with signature `InvalidSigner()` and selector `0x815e1d64`. -```solidity -error InvalidSigner(); -```*/ + ```solidity + error InvalidSigner(); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct InvalidSigner; @@ -1778,7 +1749,7 @@ error InvalidSigner(); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[doc(hidden)] #[allow(dead_code)] type UnderlyingSolTuple<'a> = (); @@ -1786,9 +1757,7 @@ error InvalidSigner(); type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1812,35 +1781,37 @@ error InvalidSigner(); #[automatically_derived] impl alloy_sol_types::SolError for InvalidSigner { type Parameters<'a> = UnderlyingSolTuple<'a>; - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "InvalidSigner()"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [129u8, 94u8, 29u8, 100u8]; + const SIGNATURE: &'static str = "InvalidSigner()"; + #[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) + as alloy_sol_types::SolType>::abi_decode_sequence_validate( + data, + ) + .map(Self::new) } } }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Custom error with signature `LengthMismatch()` and selector `0xff633a38`. -```solidity -error LengthMismatch(); -```*/ + ```solidity + error LengthMismatch(); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct LengthMismatch; @@ -1851,7 +1822,7 @@ error LengthMismatch(); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[doc(hidden)] #[allow(dead_code)] type UnderlyingSolTuple<'a> = (); @@ -1859,9 +1830,7 @@ error LengthMismatch(); type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1885,35 +1854,37 @@ error LengthMismatch(); #[automatically_derived] impl alloy_sol_types::SolError for LengthMismatch { type Parameters<'a> = UnderlyingSolTuple<'a>; - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "LengthMismatch()"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [255u8, 99u8, 58u8, 56u8]; + const SIGNATURE: &'static str = "LengthMismatch()"; + #[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) + as alloy_sol_types::SolType>::abi_decode_sequence_validate( + data, + ) + .map(Self::new) } } }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Custom error with signature `SignatureExpired(uint256)` and selector `0xcd21db4f`. -```solidity -error SignatureExpired(uint256 signatureDeadline); -```*/ + ```solidity + error SignatureExpired(uint256 signatureDeadline); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct SignatureExpired { @@ -1927,19 +1898,15 @@ error SignatureExpired(uint256 signatureDeadline); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[doc(hidden)] #[allow(dead_code)] type UnderlyingSolTuple<'a> = (alloy_sol_types::sol_data::Uint<256>,); #[doc(hidden)] - type UnderlyingRustTuple<'a> = ( - alloy_sol_types::private::primitives::aliases::U256, - ); + 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, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1957,45 +1924,49 @@ error SignatureExpired(uint256 signatureDeadline); #[doc(hidden)] impl ::core::convert::From> for SignatureExpired { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { - Self { signatureDeadline: tuple.0 } + Self { + signatureDeadline: tuple.0, + } } } #[automatically_derived] impl alloy_sol_types::SolError for SignatureExpired { type Parameters<'a> = UnderlyingSolTuple<'a>; - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "SignatureExpired(uint256)"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [205u8, 33u8, 219u8, 79u8]; + const SIGNATURE: &'static str = "SignatureExpired(uint256)"; + #[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.signatureDeadline), + as alloy_sol_types::SolType>::tokenize( + &self.signatureDeadline, + ), ) } + #[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) + as alloy_sol_types::SolType>::abi_decode_sequence_validate( + data, + ) + .map(Self::new) } } }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Event with signature `Approval(address,address,address,uint160,uint48)` and selector `0xda9fa7c1b00402c17d0161b249b1ab8bbec047c5a52207b9c112deffd817036b`. -```solidity -event Approval(address indexed owner, address indexed token, address indexed spender, uint160 amount, uint48 expiration); -```*/ + ```solidity + event Approval(address indexed owner, address indexed token, address indexed spender, uint160 amount, uint48 expiration); + ```*/ #[allow( non_camel_case_types, non_snake_case, @@ -2022,29 +1993,30 @@ event Approval(address indexed owner, address indexed token, address indexed spe clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[automatically_derived] impl alloy_sol_types::SolEvent for Approval { + type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type DataTuple<'a> = ( alloy_sol_types::sol_data::Uint<160>, alloy_sol_types::sol_data::Uint<48>, ); - 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, alloy_sol_types::sol_data::Address, ); - const SIGNATURE: &'static str = "Approval(address,address,address,uint160,uint48)"; - const SIGNATURE_HASH: alloy_sol_types::private::B256 = alloy_sol_types::private::B256::new([ - 218u8, 159u8, 167u8, 193u8, 176u8, 4u8, 2u8, 193u8, 125u8, 1u8, 97u8, - 178u8, 73u8, 177u8, 171u8, 139u8, 190u8, 192u8, 71u8, 197u8, 165u8, 34u8, - 7u8, 185u8, 193u8, 18u8, 222u8, 255u8, 216u8, 23u8, 3u8, 107u8, - ]); + const ANONYMOUS: bool = false; + const SIGNATURE: &'static str = "Approval(address,address,address,uint160,uint48)"; + const SIGNATURE_HASH: alloy_sol_types::private::B256 = + alloy_sol_types::private::B256::new([ + 218u8, 159u8, 167u8, 193u8, 176u8, 4u8, 2u8, 193u8, 125u8, 1u8, 97u8, 178u8, + 73u8, 177u8, 171u8, 139u8, 190u8, 192u8, 71u8, 197u8, 165u8, 34u8, 7u8, 185u8, + 193u8, 18u8, 222u8, 255u8, 216u8, 23u8, 3u8, 107u8, + ]); + #[allow(unused_variables)] #[inline] fn new( @@ -2059,32 +2031,33 @@ event Approval(address indexed owner, address indexed token, address indexed spe expiration: 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, - ), - ); + 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), - as alloy_sol_types::SolType>::tokenize(&self.expiration), + as alloy_sol_types::SolType>::tokenize( + &self.amount, + ), + as alloy_sol_types::SolType>::tokenize( + &self.expiration, + ), ) } + #[inline] fn topics(&self) -> ::RustType { ( @@ -2094,6 +2067,7 @@ event Approval(address indexed owner, address indexed token, address indexed spe self.spender.clone(), ) } + #[inline] fn encode_topics_raw( &self, @@ -2102,9 +2076,7 @@ event Approval(address indexed owner, address indexed token, address indexed spe if out.len() < ::COUNT { return Err(alloy_sol_types::Error::Overrun); } - out[0usize] = alloy_sol_types::abi::token::WordToken( - Self::SIGNATURE_HASH, - ); + out[0usize] = alloy_sol_types::abi::token::WordToken(Self::SIGNATURE_HASH); out[1usize] = ::encode_topic( &self.owner, ); @@ -2122,6 +2094,7 @@ event Approval(address indexed owner, address indexed token, address indexed spe 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) } @@ -2136,9 +2109,9 @@ event Approval(address indexed owner, address indexed token, address indexed spe }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Event with signature `Lockdown(address,address,address)` and selector `0x89b1add15eff56b3dfe299ad94e01f2b52fbcb80ae1a3baea6ae8c04cb2b98a4`. -```solidity -event Lockdown(address indexed owner, address token, address spender); -```*/ + ```solidity + event Lockdown(address indexed owner, address token, address spender); + ```*/ #[allow( non_camel_case_types, non_snake_case, @@ -2161,27 +2134,28 @@ event Lockdown(address indexed owner, address token, address spender); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[automatically_derived] impl alloy_sol_types::SolEvent for Lockdown { + type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type DataTuple<'a> = ( alloy_sol_types::sol_data::Address, 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::Address, ); - const SIGNATURE: &'static str = "Lockdown(address,address,address)"; - const SIGNATURE_HASH: alloy_sol_types::private::B256 = alloy_sol_types::private::B256::new([ - 137u8, 177u8, 173u8, 209u8, 94u8, 255u8, 86u8, 179u8, 223u8, 226u8, - 153u8, 173u8, 148u8, 224u8, 31u8, 43u8, 82u8, 251u8, 203u8, 128u8, 174u8, - 26u8, 59u8, 174u8, 166u8, 174u8, 140u8, 4u8, 203u8, 43u8, 152u8, 164u8, - ]); + const ANONYMOUS: bool = false; + const SIGNATURE: &'static str = "Lockdown(address,address,address)"; + const SIGNATURE_HASH: alloy_sol_types::private::B256 = + alloy_sol_types::private::B256::new([ + 137u8, 177u8, 173u8, 209u8, 94u8, 255u8, 86u8, 179u8, 223u8, 226u8, 153u8, + 173u8, 148u8, 224u8, 31u8, 43u8, 82u8, 251u8, 203u8, 128u8, 174u8, 26u8, 59u8, + 174u8, 166u8, 174u8, 140u8, 4u8, 203u8, 43u8, 152u8, 164u8, + ]); + #[allow(unused_variables)] #[inline] fn new( @@ -2194,21 +2168,21 @@ event Lockdown(address indexed owner, address token, address spender); spender: 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, - ), - ); + 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<'_> { ( @@ -2220,10 +2194,12 @@ event Lockdown(address indexed owner, address token, address spender); ), ) } + #[inline] fn topics(&self) -> ::RustType { (Self::SIGNATURE_HASH.into(), self.owner.clone()) } + #[inline] fn encode_topics_raw( &self, @@ -2232,9 +2208,7 @@ event Lockdown(address indexed owner, address token, address spender); if out.len() < ::COUNT { return Err(alloy_sol_types::Error::Overrun); } - out[0usize] = alloy_sol_types::abi::token::WordToken( - Self::SIGNATURE_HASH, - ); + out[0usize] = alloy_sol_types::abi::token::WordToken(Self::SIGNATURE_HASH); out[1usize] = ::encode_topic( &self.owner, ); @@ -2246,6 +2220,7 @@ event Lockdown(address indexed owner, address token, address spender); 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) } @@ -2260,9 +2235,9 @@ event Lockdown(address indexed owner, address token, address spender); }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Event with signature `NonceInvalidation(address,address,address,uint48,uint48)` and selector `0x55eb90d810e1700b35a8e7e25395ff7f2b2259abd7415ca2284dfb1c246418f3`. -```solidity -event NonceInvalidation(address indexed owner, address indexed token, address indexed spender, uint48 newNonce, uint48 oldNonce); -```*/ + ```solidity + event NonceInvalidation(address indexed owner, address indexed token, address indexed spender, uint48 newNonce, uint48 oldNonce); + ```*/ #[allow( non_camel_case_types, non_snake_case, @@ -2289,29 +2264,31 @@ event NonceInvalidation(address indexed owner, address indexed token, address in clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[automatically_derived] impl alloy_sol_types::SolEvent for NonceInvalidation { + type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type DataTuple<'a> = ( alloy_sol_types::sol_data::Uint<48>, alloy_sol_types::sol_data::Uint<48>, ); - 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, alloy_sol_types::sol_data::Address, ); - const SIGNATURE: &'static str = "NonceInvalidation(address,address,address,uint48,uint48)"; - const SIGNATURE_HASH: alloy_sol_types::private::B256 = alloy_sol_types::private::B256::new([ - 85u8, 235u8, 144u8, 216u8, 16u8, 225u8, 112u8, 11u8, 53u8, 168u8, 231u8, - 226u8, 83u8, 149u8, 255u8, 127u8, 43u8, 34u8, 89u8, 171u8, 215u8, 65u8, - 92u8, 162u8, 40u8, 77u8, 251u8, 28u8, 36u8, 100u8, 24u8, 243u8, - ]); + const ANONYMOUS: bool = false; + const SIGNATURE: &'static str = + "NonceInvalidation(address,address,address,uint48,uint48)"; + const SIGNATURE_HASH: alloy_sol_types::private::B256 = + alloy_sol_types::private::B256::new([ + 85u8, 235u8, 144u8, 216u8, 16u8, 225u8, 112u8, 11u8, 53u8, 168u8, 231u8, 226u8, + 83u8, 149u8, 255u8, 127u8, 43u8, 34u8, 89u8, 171u8, 215u8, 65u8, 92u8, 162u8, + 40u8, 77u8, 251u8, 28u8, 36u8, 100u8, 24u8, 243u8, + ]); + #[allow(unused_variables)] #[inline] fn new( @@ -2326,32 +2303,33 @@ event NonceInvalidation(address indexed owner, address indexed token, address in oldNonce: 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, - ), - ); + 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.newNonce), - as alloy_sol_types::SolType>::tokenize(&self.oldNonce), + as alloy_sol_types::SolType>::tokenize( + &self.newNonce, + ), + as alloy_sol_types::SolType>::tokenize( + &self.oldNonce, + ), ) } + #[inline] fn topics(&self) -> ::RustType { ( @@ -2361,6 +2339,7 @@ event NonceInvalidation(address indexed owner, address indexed token, address in self.spender.clone(), ) } + #[inline] fn encode_topics_raw( &self, @@ -2369,9 +2348,7 @@ event NonceInvalidation(address indexed owner, address indexed token, address in if out.len() < ::COUNT { return Err(alloy_sol_types::Error::Overrun); } - out[0usize] = alloy_sol_types::abi::token::WordToken( - Self::SIGNATURE_HASH, - ); + out[0usize] = alloy_sol_types::abi::token::WordToken(Self::SIGNATURE_HASH); out[1usize] = ::encode_topic( &self.owner, ); @@ -2389,6 +2366,7 @@ event NonceInvalidation(address indexed owner, address indexed token, address in 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) } @@ -2403,9 +2381,9 @@ event NonceInvalidation(address indexed owner, address indexed token, address in }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Event with signature `Permit(address,address,address,uint160,uint48,uint48)` and selector `0xc6a377bfc4eb120024a8ac08eef205be16b817020812c73223e81d1bdb9708ec`. -```solidity -event Permit(address indexed owner, address indexed token, address indexed spender, uint160 amount, uint48 expiration, uint48 nonce); -```*/ + ```solidity + event Permit(address indexed owner, address indexed token, address indexed spender, uint160 amount, uint48 expiration, uint48 nonce); + ```*/ #[allow( non_camel_case_types, non_snake_case, @@ -2434,30 +2412,31 @@ event Permit(address indexed owner, address indexed token, address indexed spend clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[automatically_derived] impl alloy_sol_types::SolEvent for Permit { + type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type DataTuple<'a> = ( alloy_sol_types::sol_data::Uint<160>, alloy_sol_types::sol_data::Uint<48>, alloy_sol_types::sol_data::Uint<48>, ); - 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, alloy_sol_types::sol_data::Address, ); - const SIGNATURE: &'static str = "Permit(address,address,address,uint160,uint48,uint48)"; - const SIGNATURE_HASH: alloy_sol_types::private::B256 = alloy_sol_types::private::B256::new([ - 198u8, 163u8, 119u8, 191u8, 196u8, 235u8, 18u8, 0u8, 36u8, 168u8, 172u8, - 8u8, 238u8, 242u8, 5u8, 190u8, 22u8, 184u8, 23u8, 2u8, 8u8, 18u8, 199u8, - 50u8, 35u8, 232u8, 29u8, 27u8, 219u8, 151u8, 8u8, 236u8, - ]); + const ANONYMOUS: bool = false; + const SIGNATURE: &'static str = "Permit(address,address,address,uint160,uint48,uint48)"; + const SIGNATURE_HASH: alloy_sol_types::private::B256 = + alloy_sol_types::private::B256::new([ + 198u8, 163u8, 119u8, 191u8, 196u8, 235u8, 18u8, 0u8, 36u8, 168u8, 172u8, 8u8, + 238u8, 242u8, 5u8, 190u8, 22u8, 184u8, 23u8, 2u8, 8u8, 18u8, 199u8, 50u8, 35u8, + 232u8, 29u8, 27u8, 219u8, 151u8, 8u8, 236u8, + ]); + #[allow(unused_variables)] #[inline] fn new( @@ -2473,35 +2452,36 @@ event Permit(address indexed owner, address indexed token, address indexed spend nonce: data.2, } } + #[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, - ), - ); + 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), - as alloy_sol_types::SolType>::tokenize(&self.expiration), - as alloy_sol_types::SolType>::tokenize(&self.nonce), + as alloy_sol_types::SolType>::tokenize( + &self.amount, + ), + as alloy_sol_types::SolType>::tokenize( + &self.expiration, + ), + as alloy_sol_types::SolType>::tokenize( + &self.nonce, + ), ) } + #[inline] fn topics(&self) -> ::RustType { ( @@ -2511,6 +2491,7 @@ event Permit(address indexed owner, address indexed token, address indexed spend self.spender.clone(), ) } + #[inline] fn encode_topics_raw( &self, @@ -2519,9 +2500,7 @@ event Permit(address indexed owner, address indexed token, address indexed spend if out.len() < ::COUNT { return Err(alloy_sol_types::Error::Overrun); } - out[0usize] = alloy_sol_types::abi::token::WordToken( - Self::SIGNATURE_HASH, - ); + out[0usize] = alloy_sol_types::abi::token::WordToken(Self::SIGNATURE_HASH); out[1usize] = ::encode_topic( &self.owner, ); @@ -2539,6 +2518,7 @@ event Permit(address indexed owner, address indexed token, address indexed spend 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) } @@ -2553,9 +2533,9 @@ event Permit(address indexed owner, address indexed token, address indexed spend }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Event with signature `UnorderedNonceInvalidation(address,uint256,uint256)` and selector `0x3704902f963766a4e561bbaab6e6cdc1b1dd12f6e9e99648da8843b3f46b918d`. -```solidity -event UnorderedNonceInvalidation(address indexed owner, uint256 word, uint256 mask); -```*/ + ```solidity + event UnorderedNonceInvalidation(address indexed owner, uint256 word, uint256 mask); + ```*/ #[allow( non_camel_case_types, non_snake_case, @@ -2578,27 +2558,28 @@ event UnorderedNonceInvalidation(address indexed owner, uint256 word, uint256 ma clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[automatically_derived] impl alloy_sol_types::SolEvent for UnorderedNonceInvalidation { + type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type DataTuple<'a> = ( alloy_sol_types::sol_data::Uint<256>, 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, ); - const SIGNATURE: &'static str = "UnorderedNonceInvalidation(address,uint256,uint256)"; - const SIGNATURE_HASH: alloy_sol_types::private::B256 = alloy_sol_types::private::B256::new([ - 55u8, 4u8, 144u8, 47u8, 150u8, 55u8, 102u8, 164u8, 229u8, 97u8, 187u8, - 170u8, 182u8, 230u8, 205u8, 193u8, 177u8, 221u8, 18u8, 246u8, 233u8, - 233u8, 150u8, 72u8, 218u8, 136u8, 67u8, 179u8, 244u8, 107u8, 145u8, 141u8, - ]); + const ANONYMOUS: bool = false; + const SIGNATURE: &'static str = "UnorderedNonceInvalidation(address,uint256,uint256)"; + const SIGNATURE_HASH: alloy_sol_types::private::B256 = + alloy_sol_types::private::B256::new([ + 55u8, 4u8, 144u8, 47u8, 150u8, 55u8, 102u8, 164u8, 229u8, 97u8, 187u8, 170u8, + 182u8, 230u8, 205u8, 193u8, 177u8, 221u8, 18u8, 246u8, 233u8, 233u8, 150u8, + 72u8, 218u8, 136u8, 67u8, 179u8, 244u8, 107u8, 145u8, 141u8, + ]); + #[allow(unused_variables)] #[inline] fn new( @@ -2611,36 +2592,38 @@ event UnorderedNonceInvalidation(address indexed owner, uint256 word, uint256 ma mask: 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, - ), - ); + 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.word), - as alloy_sol_types::SolType>::tokenize(&self.mask), + as alloy_sol_types::SolType>::tokenize( + &self.word, + ), + as alloy_sol_types::SolType>::tokenize( + &self.mask, + ), ) } + #[inline] fn topics(&self) -> ::RustType { (Self::SIGNATURE_HASH.into(), self.owner.clone()) } + #[inline] fn encode_topics_raw( &self, @@ -2649,9 +2632,7 @@ event UnorderedNonceInvalidation(address indexed owner, uint256 word, uint256 ma if out.len() < ::COUNT { return Err(alloy_sol_types::Error::Overrun); } - out[0usize] = alloy_sol_types::abi::token::WordToken( - Self::SIGNATURE_HASH, - ); + out[0usize] = alloy_sol_types::abi::token::WordToken(Self::SIGNATURE_HASH); out[1usize] = ::encode_topic( &self.owner, ); @@ -2663,6 +2644,7 @@ event UnorderedNonceInvalidation(address indexed owner, uint256 word, uint256 ma 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) } @@ -2670,23 +2652,22 @@ event UnorderedNonceInvalidation(address indexed owner, uint256 word, uint256 ma #[automatically_derived] impl From<&UnorderedNonceInvalidation> for alloy_sol_types::private::LogData { #[inline] - fn from( - this: &UnorderedNonceInvalidation, - ) -> alloy_sol_types::private::LogData { + fn from(this: &UnorderedNonceInvalidation) -> alloy_sol_types::private::LogData { alloy_sol_types::SolEvent::encode_log_data(this) } } }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `DOMAIN_SEPARATOR()` and selector `0x3644e515`. -```solidity -function DOMAIN_SEPARATOR() external view returns (bytes32); -```*/ + ```solidity + function DOMAIN_SEPARATOR() external view returns (bytes32); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct DOMAIN_SEPARATORCall; #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`DOMAIN_SEPARATOR()`](DOMAIN_SEPARATORCall) function. + ///Container type for the return parameters of the + /// [`DOMAIN_SEPARATOR()`](DOMAIN_SEPARATORCall) function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct DOMAIN_SEPARATORReturn { @@ -2700,7 +2681,7 @@ function DOMAIN_SEPARATOR() external view returns (bytes32); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -2709,9 +2690,7 @@ function DOMAIN_SEPARATOR() external view returns (bytes32); type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -2720,16 +2699,14 @@ function DOMAIN_SEPARATOR() external view returns (bytes32); } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From - for UnderlyingRustTuple<'_> { + impl ::core::convert::From for UnderlyingRustTuple<'_> { fn from(value: DOMAIN_SEPARATORCall) -> Self { () } } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From> - for DOMAIN_SEPARATORCall { + impl ::core::convert::From> for DOMAIN_SEPARATORCall { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { Self } @@ -2743,9 +2720,7 @@ function DOMAIN_SEPARATOR() external view returns (bytes32); 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, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -2754,16 +2729,14 @@ function DOMAIN_SEPARATOR() external view returns (bytes32); } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From - for UnderlyingRustTuple<'_> { + impl ::core::convert::From for UnderlyingRustTuple<'_> { fn from(value: DOMAIN_SEPARATORReturn) -> Self { (value._0,) } } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From> - for DOMAIN_SEPARATORReturn { + impl ::core::convert::From> for DOMAIN_SEPARATORReturn { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { Self { _0: tuple.0 } } @@ -2772,26 +2745,26 @@ function DOMAIN_SEPARATOR() external view returns (bytes32); #[automatically_derived] impl alloy_sol_types::SolCall for DOMAIN_SEPARATORCall { type Parameters<'a> = (); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = alloy_sol_types::private::FixedBytes<32>; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (alloy_sol_types::sol_data::FixedBytes<32>,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "DOMAIN_SEPARATOR()"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [54u8, 68u8, 229u8, 21u8]; + const SIGNATURE: &'static str = "DOMAIN_SEPARATOR()"; + #[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<'_> { ( @@ -2800,35 +2773,34 @@ function DOMAIN_SEPARATOR() external view returns (bytes32); > 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| { + as alloy_sol_types::SolType>::abi_decode_sequence(data).map( + |r| { let r: DOMAIN_SEPARATORReturn = 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: DOMAIN_SEPARATORReturn = r.into(); - r._0 - }) + 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: DOMAIN_SEPARATORReturn = r.into(); + r._0 + }) } } }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `allowance(address,address,address)` and selector `0x927da105`. -```solidity -function allowance(address, address, address) external view returns (uint160 amount, uint48 expiration, uint48 nonce); -```*/ + ```solidity + function allowance(address, address, address) external view returns (uint160 amount, uint48 expiration, uint48 nonce); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct allowanceCall { @@ -2840,7 +2812,8 @@ function allowance(address, address, address) external view returns (uint160 amo pub _2: alloy_sol_types::private::Address, } #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`allowance(address,address,address)`](allowanceCall) function. + ///Container type for the return parameters of the + /// [`allowance(address,address,address)`](allowanceCall) function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct allowanceReturn { @@ -2858,7 +2831,7 @@ function allowance(address, address, address) external view returns (uint160 amo clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -2875,9 +2848,7 @@ function allowance(address, address, address) external view returns (uint160 amo ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -2919,9 +2890,7 @@ function allowance(address, address, address) external view returns (uint160 amo ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -2948,19 +2917,17 @@ function allowance(address, address, address) external view returns (uint160 amo } } impl allowanceReturn { - fn _tokenize( - &self, - ) -> ::ReturnToken<'_> { + fn _tokenize(&self) -> ::ReturnToken<'_> { ( - as alloy_sol_types::SolType>::tokenize(&self.amount), - as alloy_sol_types::SolType>::tokenize(&self.expiration), - as alloy_sol_types::SolType>::tokenize(&self.nonce), + as alloy_sol_types::SolType>::tokenize( + &self.amount, + ), + as alloy_sol_types::SolType>::tokenize( + &self.expiration, + ), + as alloy_sol_types::SolType>::tokenize( + &self.nonce, + ), ) } } @@ -2971,26 +2938,25 @@ function allowance(address, address, address) external view returns (uint160 amo alloy_sol_types::sol_data::Address, alloy_sol_types::sol_data::Address, ); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = allowanceReturn; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = ( alloy_sol_types::sol_data::Uint<160>, alloy_sol_types::sol_data::Uint<48>, alloy_sol_types::sol_data::Uint<48>, ); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "allowance(address,address,address)"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [146u8, 125u8, 161u8, 5u8]; + const SIGNATURE: &'static str = "allowance(address,address,address)"; + #[inline] fn new<'a>( tuple: as alloy_sol_types::SolType>::RustType, ) -> Self { tuple.into() } + #[inline] fn tokenize(&self) -> Self::Token<'_> { ( @@ -3005,33 +2971,32 @@ function allowance(address, address, address) external view returns (uint160 amo ), ) } + #[inline] fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { allowanceReturn::_tokenize(ret) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) + 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) + 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(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `approve(address,address,uint160,uint48)` and selector `0x87517c45`. -```solidity -function approve(address token, address spender, uint160 amount, uint48 expiration) external; -```*/ + ```solidity + function approve(address token, address spender, uint160 amount, uint48 expiration) external; + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct approveCall { @@ -3044,7 +3009,8 @@ function approve(address token, address spender, uint160 amount, uint48 expirati #[allow(missing_docs)] pub expiration: alloy_sol_types::private::primitives::aliases::U48, } - ///Container type for the return parameters of the [`approve(address,address,uint160,uint48)`](approveCall) function. + ///Container type for the return parameters of the + /// [`approve(address,address,uint160,uint48)`](approveCall) function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct approveReturn {} @@ -3055,7 +3021,7 @@ function approve(address token, address spender, uint160 amount, uint48 expirati clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -3074,9 +3040,7 @@ function approve(address token, address spender, uint160 amount, uint48 expirati ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -3111,9 +3075,7 @@ function approve(address token, address spender, uint160 amount, uint48 expirati type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -3136,9 +3098,7 @@ function approve(address token, address spender, uint160 amount, uint48 expirati } } impl approveReturn { - fn _tokenize( - &self, - ) -> ::ReturnToken<'_> { + fn _tokenize(&self) -> ::ReturnToken<'_> { () } } @@ -3150,22 +3110,21 @@ function approve(address token, address spender, uint160 amount, uint48 expirati alloy_sol_types::sol_data::Uint<160>, alloy_sol_types::sol_data::Uint<48>, ); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = approveReturn; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "approve(address,address,uint160,uint48)"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [135u8, 81u8, 124u8, 69u8]; + const SIGNATURE: &'static str = "approve(address,address,uint160,uint48)"; + #[inline] fn new<'a>( tuple: as alloy_sol_types::SolType>::RustType, ) -> Self { tuple.into() } + #[inline] fn tokenize(&self) -> Self::Token<'_> { ( @@ -3175,41 +3134,40 @@ function approve(address token, address spender, uint160 amount, uint48 expirati ::tokenize( &self.spender, ), - as alloy_sol_types::SolType>::tokenize(&self.amount), - as alloy_sol_types::SolType>::tokenize(&self.expiration), + as alloy_sol_types::SolType>::tokenize( + &self.amount, + ), + as alloy_sol_types::SolType>::tokenize( + &self.expiration, + ), ) } + #[inline] fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { approveReturn::_tokenize(ret) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) + 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) + 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()] /**Function with signature `permit(address,((address,uint160,uint48,uint48),address,uint256),bytes)` and selector `0x2b67b570`. -```solidity -function permit(address owner, IAllowanceTransfer.PermitSingle memory permitSingle, bytes memory signature) external; -```*/ + ```solidity + function permit(address owner, IAllowanceTransfer.PermitSingle memory permitSingle, bytes memory signature) external; + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct permitCall { @@ -3220,7 +3178,9 @@ function permit(address owner, IAllowanceTransfer.PermitSingle memory permitSing #[allow(missing_docs)] pub signature: alloy_sol_types::private::Bytes, } - ///Container type for the return parameters of the [`permit(address,((address,uint160,uint48,uint48),address,uint256),bytes)`](permitCall) function. + ///Container type for the return parameters of the + /// [`permit(address,((address,uint160,uint48,uint48),address,uint256), + /// bytes)`](permitCall) function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct permitReturn {} @@ -3231,7 +3191,7 @@ function permit(address owner, IAllowanceTransfer.PermitSingle memory permitSing clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -3248,9 +3208,7 @@ function permit(address owner, IAllowanceTransfer.PermitSingle memory permitSing ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -3284,9 +3242,7 @@ function permit(address owner, IAllowanceTransfer.PermitSingle memory permitSing type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -3309,9 +3265,7 @@ function permit(address owner, IAllowanceTransfer.PermitSingle memory permitSing } } impl permitReturn { - fn _tokenize( - &self, - ) -> ::ReturnToken<'_> { + fn _tokenize(&self) -> ::ReturnToken<'_> { () } } @@ -3322,22 +3276,22 @@ function permit(address owner, IAllowanceTransfer.PermitSingle memory permitSing IAllowanceTransfer::PermitSingle, alloy_sol_types::sol_data::Bytes, ); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = permitReturn; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "permit(address,((address,uint160,uint48,uint48),address,uint256),bytes)"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [43u8, 103u8, 181u8, 112u8]; + const SIGNATURE: &'static str = + "permit(address,((address,uint160,uint48,uint48),address,uint256),bytes)"; + #[inline] fn new<'a>( tuple: as alloy_sol_types::SolType>::RustType, ) -> Self { tuple.into() } + #[inline] fn tokenize(&self) -> Self::Token<'_> { ( @@ -3352,33 +3306,32 @@ function permit(address owner, IAllowanceTransfer.PermitSingle memory permitSing ), ) } + #[inline] fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { permitReturn::_tokenize(ret) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) + 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) + 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(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `transferFrom(address,address,uint160,address)` and selector `0x36c78516`. -```solidity -function transferFrom(address from, address to, uint160 amount, address token) external; -```*/ + ```solidity + function transferFrom(address from, address to, uint160 amount, address token) external; + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct transferFromCall { @@ -3391,7 +3344,9 @@ function transferFrom(address from, address to, uint160 amount, address token) e #[allow(missing_docs)] pub token: alloy_sol_types::private::Address, } - ///Container type for the return parameters of the [`transferFrom(address,address,uint160,address)`](transferFromCall) function. + ///Container type for the return parameters of the + /// [`transferFrom(address,address,uint160,address)`](transferFromCall) + /// function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct transferFromReturn {} @@ -3402,7 +3357,7 @@ function transferFrom(address from, address to, uint160 amount, address token) e clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -3421,9 +3376,7 @@ function transferFrom(address from, address to, uint160 amount, address token) e ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -3458,9 +3411,7 @@ function transferFrom(address from, address to, uint160 amount, address token) e type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -3483,9 +3434,7 @@ function transferFrom(address from, address to, uint160 amount, address token) e } } impl transferFromReturn { - fn _tokenize( - &self, - ) -> ::ReturnToken<'_> { + fn _tokenize(&self) -> ::ReturnToken<'_> { () } } @@ -3497,22 +3446,21 @@ function transferFrom(address from, address to, uint160 amount, address token) e alloy_sol_types::sol_data::Uint<160>, alloy_sol_types::sol_data::Address, ); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = transferFromReturn; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "transferFrom(address,address,uint160,address)"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [54u8, 199u8, 133u8, 22u8]; + const SIGNATURE: &'static str = "transferFrom(address,address,uint160,address)"; + #[inline] fn new<'a>( tuple: as alloy_sol_types::SolType>::RustType, ) -> Self { tuple.into() } + #[inline] fn tokenize(&self) -> Self::Token<'_> { ( @@ -3522,39 +3470,37 @@ function transferFrom(address from, address to, uint160 amount, address token) e ::tokenize( &self.to, ), - as alloy_sol_types::SolType>::tokenize(&self.amount), + as alloy_sol_types::SolType>::tokenize( + &self.amount, + ), ::tokenize( &self.token, ), ) } + #[inline] fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { transferFromReturn::_tokenize(ret) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) + 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) + 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 [`Permit2`](self) function calls. #[derive(Clone)] - #[derive()] pub enum Permit2Calls { #[allow(missing_docs)] DOMAIN_SEPARATOR(DOMAIN_SEPARATORCall), @@ -3570,8 +3516,9 @@ function transferFrom(address from, address to, uint160 amount, address token) e impl Permit2Calls { /// 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. + /// 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]] = &[ @@ -3581,14 +3528,6 @@ function transferFrom(address from, address to, uint160 amount, address token) e [135u8, 81u8, 124u8, 69u8], [146u8, 125u8, 161u8, 5u8], ]; - /// The names of the variants in the same order as `SELECTORS`. - pub const VARIANT_NAMES: &'static [&'static str] = &[ - ::core::stringify!(permit), - ::core::stringify!(DOMAIN_SEPARATOR), - ::core::stringify!(transferFrom), - ::core::stringify!(approve), - ::core::stringify!(allowance), - ]; /// The signatures in the same order as `SELECTORS`. pub const SIGNATURES: &'static [&'static str] = &[ ::SIGNATURE, @@ -3597,6 +3536,15 @@ function transferFrom(address from, address to, uint160 amount, address token) e ::SIGNATURE, ::SIGNATURE, ]; + /// The names of the variants in the same order as `SELECTORS`. + pub const VARIANT_NAMES: &'static [&'static str] = &[ + ::core::stringify!(permit), + ::core::stringify!(DOMAIN_SEPARATOR), + ::core::stringify!(transferFrom), + ::core::stringify!(approve), + ::core::stringify!(allowance), + ]; + /// Returns the signature for the given selector, if known. #[inline] pub fn signature_by_selector( @@ -3609,50 +3557,46 @@ function transferFrom(address from, address to, uint160 amount, address token) e ::core::result::Result::Err(_) => ::core::option::Option::None, } } + /// Returns the enum variant name for the given selector, if known. #[inline] - pub fn name_by_selector( - selector: [u8; 4usize], - ) -> ::core::option::Option<&'static str> { + pub fn name_by_selector(selector: [u8; 4usize]) -> ::core::option::Option<&'static str> { let sig = Self::signature_by_selector(selector)?; sig.split_once('(').map(|(name, _)| name) } } #[automatically_derived] impl alloy_sol_types::SolInterface for Permit2Calls { - const NAME: &'static str = "Permit2Calls"; - const MIN_DATA_LENGTH: usize = 0usize; const COUNT: usize = 5usize; + const MIN_DATA_LENGTH: usize = 0usize; + const NAME: &'static str = "Permit2Calls"; + #[inline] fn selector(&self) -> [u8; 4] { match self { Self::DOMAIN_SEPARATOR(_) => { ::SELECTOR } - Self::allowance(_) => { - ::SELECTOR - } + Self::allowance(_) => ::SELECTOR, Self::approve(_) => ::SELECTOR, Self::permit(_) => ::SELECTOR, - Self::transferFrom(_) => { - ::SELECTOR - } + Self::transferFrom(_) => ::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 { + fn abi_decode_raw(selector: [u8; 4], data: &[u8]) -> alloy_sol_types::Result { static DECODE_SHIMS: &[fn(&[u8]) -> alloy_sol_types::Result] = &[ { fn permit(data: &[u8]) -> alloy_sol_types::Result { @@ -3662,23 +3606,15 @@ function transferFrom(address from, address to, uint160 amount, address token) e permit }, { - fn DOMAIN_SEPARATOR( - data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, - ) + fn DOMAIN_SEPARATOR(data: &[u8]) -> alloy_sol_types::Result { + ::abi_decode_raw(data) .map(Permit2Calls::DOMAIN_SEPARATOR) } DOMAIN_SEPARATOR }, { - fn transferFrom( - data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, - ) + fn transferFrom(data: &[u8]) -> alloy_sol_types::Result { + ::abi_decode_raw(data) .map(Permit2Calls::transferFrom) } transferFrom @@ -3699,91 +3635,75 @@ function transferFrom(address from, address to, uint160 amount, address token) e }, ]; let Ok(idx) = Self::SELECTORS.binary_search(&selector) else { - return Err( - alloy_sol_types::Error::unknown_selector( - ::NAME, - selector, - ), - ); + 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] = &[ + static DECODE_VALIDATE_SHIMS: &[fn(&[u8]) -> alloy_sol_types::Result] = &[ { fn permit(data: &[u8]) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) + ::abi_decode_raw_validate(data) .map(Permit2Calls::permit) } permit }, { - fn DOMAIN_SEPARATOR( - data: &[u8], - ) -> alloy_sol_types::Result { + fn DOMAIN_SEPARATOR(data: &[u8]) -> alloy_sol_types::Result { ::abi_decode_raw_validate( - data, - ) - .map(Permit2Calls::DOMAIN_SEPARATOR) + data, + ) + .map(Permit2Calls::DOMAIN_SEPARATOR) } DOMAIN_SEPARATOR }, { - fn transferFrom( - data: &[u8], - ) -> alloy_sol_types::Result { + fn transferFrom(data: &[u8]) -> alloy_sol_types::Result { ::abi_decode_raw_validate( - data, - ) - .map(Permit2Calls::transferFrom) + data, + ) + .map(Permit2Calls::transferFrom) } transferFrom }, { fn approve(data: &[u8]) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) + ::abi_decode_raw_validate(data) .map(Permit2Calls::approve) } approve }, { fn allowance(data: &[u8]) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) + ::abi_decode_raw_validate(data) .map(Permit2Calls::allowance) } allowance }, ]; let Ok(idx) = Self::SELECTORS.binary_search(&selector) else { - return Err( - alloy_sol_types::Error::unknown_selector( - ::NAME, - selector, - ), - ); + 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::DOMAIN_SEPARATOR(inner) => { - ::abi_encoded_size( - inner, - ) + ::abi_encoded_size(inner) } Self::allowance(inner) => { ::abi_encoded_size(inner) @@ -3795,26 +3715,19 @@ function transferFrom(address from, address to, uint160 amount, address token) e ::abi_encoded_size(inner) } Self::transferFrom(inner) => { - ::abi_encoded_size( - inner, - ) + ::abi_encoded_size(inner) } } } + #[inline] fn abi_encode_raw(&self, out: &mut alloy_sol_types::private::Vec) { match self { Self::DOMAIN_SEPARATOR(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } Self::allowance(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } Self::approve(inner) => { ::abi_encode_raw(inner, out) @@ -3823,17 +3736,13 @@ function transferFrom(address from, address to, uint160 amount, address token) e ::abi_encode_raw(inner, out) } Self::transferFrom(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } } } } ///Container for all the [`Permit2`](self) custom errors. - #[derive(Clone)] - #[derive(Debug, PartialEq, Eq, Hash)] + #[derive(Clone, Debug, PartialEq, Eq, Hash)] pub enum Permit2Errors { #[allow(missing_docs)] AllowanceExpired(AllowanceExpired), @@ -3861,8 +3770,9 @@ function transferFrom(address from, address to, uint160 amount, address token) e impl Permit2Errors { /// 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. + /// 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]] = &[ @@ -3878,20 +3788,6 @@ function transferFrom(address from, address to, uint160 amount, address token) e [249u8, 111u8, 176u8, 113u8], [255u8, 99u8, 58u8, 56u8], ]; - /// The names of the variants in the same order as `SELECTORS`. - pub const VARIANT_NAMES: &'static [&'static str] = &[ - ::core::stringify!(ExcessiveInvalidation), - ::core::stringify!(InvalidAmount), - ::core::stringify!(InvalidSignatureLength), - ::core::stringify!(InvalidNonce), - ::core::stringify!(InvalidSigner), - ::core::stringify!(InvalidSignature), - ::core::stringify!(InvalidContractSignature), - ::core::stringify!(SignatureExpired), - ::core::stringify!(AllowanceExpired), - ::core::stringify!(InsufficientAllowance), - ::core::stringify!(LengthMismatch), - ]; /// The signatures in the same order as `SELECTORS`. pub const SIGNATURES: &'static [&'static str] = &[ ::SIGNATURE, @@ -3906,6 +3802,21 @@ function transferFrom(address from, address to, uint160 amount, address token) e ::SIGNATURE, ::SIGNATURE, ]; + /// The names of the variants in the same order as `SELECTORS`. + pub const VARIANT_NAMES: &'static [&'static str] = &[ + ::core::stringify!(ExcessiveInvalidation), + ::core::stringify!(InvalidAmount), + ::core::stringify!(InvalidSignatureLength), + ::core::stringify!(InvalidNonce), + ::core::stringify!(InvalidSigner), + ::core::stringify!(InvalidSignature), + ::core::stringify!(InvalidContractSignature), + ::core::stringify!(SignatureExpired), + ::core::stringify!(AllowanceExpired), + ::core::stringify!(InsufficientAllowance), + ::core::stringify!(LengthMismatch), + ]; + /// Returns the signature for the given selector, if known. #[inline] pub fn signature_by_selector( @@ -3918,20 +3829,20 @@ function transferFrom(address from, address to, uint160 amount, address token) e ::core::result::Result::Err(_) => ::core::option::Option::None, } } + /// Returns the enum variant name for the given selector, if known. #[inline] - pub fn name_by_selector( - selector: [u8; 4usize], - ) -> ::core::option::Option<&'static str> { + pub fn name_by_selector(selector: [u8; 4usize]) -> ::core::option::Option<&'static str> { let sig = Self::signature_by_selector(selector)?; sig.split_once('(').map(|(name, _)| name) } } #[automatically_derived] impl alloy_sol_types::SolInterface for Permit2Errors { - const NAME: &'static str = "Permit2Errors"; - const MIN_DATA_LENGTH: usize = 0usize; const COUNT: usize = 11usize; + const MIN_DATA_LENGTH: usize = 0usize; + const NAME: &'static str = "Permit2Errors"; + #[inline] fn selector(&self) -> [u8; 4] { match self { @@ -3944,67 +3855,51 @@ function transferFrom(address from, address to, uint160 amount, address token) e Self::InsufficientAllowance(_) => { ::SELECTOR } - Self::InvalidAmount(_) => { - ::SELECTOR - } + Self::InvalidAmount(_) => ::SELECTOR, Self::InvalidContractSignature(_) => { ::SELECTOR } - Self::InvalidNonce(_) => { - ::SELECTOR - } + Self::InvalidNonce(_) => ::SELECTOR, Self::InvalidSignature(_) => { ::SELECTOR } Self::InvalidSignatureLength(_) => { ::SELECTOR } - Self::InvalidSigner(_) => { - ::SELECTOR - } - Self::LengthMismatch(_) => { - ::SELECTOR - } + Self::InvalidSigner(_) => ::SELECTOR, + Self::LengthMismatch(_) => ::SELECTOR, Self::SignatureExpired(_) => { ::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 abi_decode_raw(selector: [u8; 4], data: &[u8]) -> alloy_sol_types::Result { + static DECODE_SHIMS: &[fn(&[u8]) -> alloy_sol_types::Result] = &[ { fn ExcessiveInvalidation( data: &[u8], ) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, - ) + ::abi_decode_raw(data) .map(Permit2Errors::ExcessiveInvalidation) } ExcessiveInvalidation }, { - fn InvalidAmount( - data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, - ) + fn InvalidAmount(data: &[u8]) -> alloy_sol_types::Result { + ::abi_decode_raw(data) .map(Permit2Errors::InvalidAmount) } InvalidAmount @@ -4013,40 +3908,28 @@ function transferFrom(address from, address to, uint160 amount, address token) e fn InvalidSignatureLength( data: &[u8], ) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, - ) + ::abi_decode_raw(data) .map(Permit2Errors::InvalidSignatureLength) } InvalidSignatureLength }, { - fn InvalidNonce( - data: &[u8], - ) -> alloy_sol_types::Result { + fn InvalidNonce(data: &[u8]) -> alloy_sol_types::Result { ::abi_decode_raw(data) .map(Permit2Errors::InvalidNonce) } InvalidNonce }, { - fn InvalidSigner( - data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, - ) + fn InvalidSigner(data: &[u8]) -> alloy_sol_types::Result { + ::abi_decode_raw(data) .map(Permit2Errors::InvalidSigner) } InvalidSigner }, { - fn InvalidSignature( - data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, - ) + fn InvalidSignature(data: &[u8]) -> alloy_sol_types::Result { + ::abi_decode_raw(data) .map(Permit2Errors::InvalidSignature) } InvalidSignature @@ -4056,30 +3939,22 @@ function transferFrom(address from, address to, uint160 amount, address token) e data: &[u8], ) -> alloy_sol_types::Result { ::abi_decode_raw( - data, - ) - .map(Permit2Errors::InvalidContractSignature) + data, + ) + .map(Permit2Errors::InvalidContractSignature) } InvalidContractSignature }, { - fn SignatureExpired( - data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, - ) + fn SignatureExpired(data: &[u8]) -> alloy_sol_types::Result { + ::abi_decode_raw(data) .map(Permit2Errors::SignatureExpired) } SignatureExpired }, { - fn AllowanceExpired( - data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, - ) + fn AllowanceExpired(data: &[u8]) -> alloy_sol_types::Result { + ::abi_decode_raw(data) .map(Permit2Errors::AllowanceExpired) } AllowanceExpired @@ -4088,305 +3963,237 @@ function transferFrom(address from, address to, uint160 amount, address token) e fn InsufficientAllowance( data: &[u8], ) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, - ) + ::abi_decode_raw(data) .map(Permit2Errors::InsufficientAllowance) } InsufficientAllowance }, { - fn LengthMismatch( - data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, - ) + fn LengthMismatch(data: &[u8]) -> alloy_sol_types::Result { + ::abi_decode_raw(data) .map(Permit2Errors::LengthMismatch) } LengthMismatch }, ]; let Ok(idx) = Self::SELECTORS.binary_search(&selector) else { - return Err( - alloy_sol_types::Error::unknown_selector( - ::NAME, - selector, - ), - ); + 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 ExcessiveInvalidation( - data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( + static DECODE_VALIDATE_SHIMS: &[fn(&[u8]) -> alloy_sol_types::Result] = + &[ + { + fn ExcessiveInvalidation( + data: &[u8], + ) -> alloy_sol_types::Result { + ::abi_decode_raw_validate( data, ) .map(Permit2Errors::ExcessiveInvalidation) - } - ExcessiveInvalidation - }, - { - fn InvalidAmount( - data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( + } + ExcessiveInvalidation + }, + { + fn InvalidAmount(data: &[u8]) -> alloy_sol_types::Result { + ::abi_decode_raw_validate( data, ) .map(Permit2Errors::InvalidAmount) - } - InvalidAmount - }, - { - fn InvalidSignatureLength( - data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( + } + InvalidAmount + }, + { + fn InvalidSignatureLength( + data: &[u8], + ) -> alloy_sol_types::Result { + ::abi_decode_raw_validate( data, ) .map(Permit2Errors::InvalidSignatureLength) - } - InvalidSignatureLength - }, - { - fn InvalidNonce( - data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( + } + InvalidSignatureLength + }, + { + fn InvalidNonce(data: &[u8]) -> alloy_sol_types::Result { + ::abi_decode_raw_validate( data, ) .map(Permit2Errors::InvalidNonce) - } - InvalidNonce - }, - { - fn InvalidSigner( - data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( + } + InvalidNonce + }, + { + fn InvalidSigner(data: &[u8]) -> alloy_sol_types::Result { + ::abi_decode_raw_validate( data, ) .map(Permit2Errors::InvalidSigner) - } - InvalidSigner - }, - { - fn InvalidSignature( - data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( + } + InvalidSigner + }, + { + fn InvalidSignature(data: &[u8]) -> alloy_sol_types::Result { + ::abi_decode_raw_validate( data, ) .map(Permit2Errors::InvalidSignature) - } - InvalidSignature - }, - { - fn InvalidContractSignature( - data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( + } + InvalidSignature + }, + { + fn InvalidContractSignature( + data: &[u8], + ) -> alloy_sol_types::Result { + ::abi_decode_raw_validate( data, ) .map(Permit2Errors::InvalidContractSignature) - } - InvalidContractSignature - }, - { - fn SignatureExpired( - data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( + } + InvalidContractSignature + }, + { + fn SignatureExpired(data: &[u8]) -> alloy_sol_types::Result { + ::abi_decode_raw_validate( data, ) .map(Permit2Errors::SignatureExpired) - } - SignatureExpired - }, - { - fn AllowanceExpired( - data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( + } + SignatureExpired + }, + { + fn AllowanceExpired(data: &[u8]) -> alloy_sol_types::Result { + ::abi_decode_raw_validate( data, ) .map(Permit2Errors::AllowanceExpired) - } - AllowanceExpired - }, - { - fn InsufficientAllowance( - data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( + } + AllowanceExpired + }, + { + fn InsufficientAllowance( + data: &[u8], + ) -> alloy_sol_types::Result { + ::abi_decode_raw_validate( data, ) .map(Permit2Errors::InsufficientAllowance) - } - InsufficientAllowance - }, - { - fn LengthMismatch( - data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( + } + InsufficientAllowance + }, + { + fn LengthMismatch(data: &[u8]) -> alloy_sol_types::Result { + ::abi_decode_raw_validate( data, ) .map(Permit2Errors::LengthMismatch) - } - LengthMismatch - }, - ]; + } + LengthMismatch + }, + ]; let Ok(idx) = Self::SELECTORS.binary_search(&selector) else { - return Err( - alloy_sol_types::Error::unknown_selector( - ::NAME, - selector, - ), - ); + 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::AllowanceExpired(inner) => { - ::abi_encoded_size( - inner, - ) + ::abi_encoded_size(inner) } Self::ExcessiveInvalidation(inner) => { - ::abi_encoded_size( - inner, - ) + ::abi_encoded_size(inner) } Self::InsufficientAllowance(inner) => { - ::abi_encoded_size( - inner, - ) + ::abi_encoded_size(inner) } Self::InvalidAmount(inner) => { ::abi_encoded_size(inner) } Self::InvalidContractSignature(inner) => { - ::abi_encoded_size( - inner, - ) + ::abi_encoded_size(inner) } Self::InvalidNonce(inner) => { ::abi_encoded_size(inner) } Self::InvalidSignature(inner) => { - ::abi_encoded_size( - inner, - ) + ::abi_encoded_size(inner) } Self::InvalidSignatureLength(inner) => { - ::abi_encoded_size( - inner, - ) + ::abi_encoded_size(inner) } Self::InvalidSigner(inner) => { ::abi_encoded_size(inner) } Self::LengthMismatch(inner) => { - ::abi_encoded_size( - inner, - ) + ::abi_encoded_size(inner) } Self::SignatureExpired(inner) => { - ::abi_encoded_size( - inner, - ) + ::abi_encoded_size(inner) } } } + #[inline] fn abi_encode_raw(&self, out: &mut alloy_sol_types::private::Vec) { match self { Self::AllowanceExpired(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } Self::ExcessiveInvalidation(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } Self::InsufficientAllowance(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } Self::InvalidAmount(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } Self::InvalidContractSignature(inner) => { ::abi_encode_raw( - inner, - out, + inner, out, ) } Self::InvalidNonce(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } Self::InvalidSignature(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } Self::InvalidSignatureLength(inner) => { ::abi_encode_raw( - inner, - out, + inner, out, ) } Self::InvalidSigner(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } Self::LengthMismatch(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } Self::SignatureExpired(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } } } } ///Container for all the [`Permit2`](self) events. - #[derive(Clone)] - #[derive(Debug, PartialEq, Eq, Hash)] + #[derive(Clone, Debug, PartialEq, Eq, Hash)] pub enum Permit2Events { #[allow(missing_docs)] Approval(Approval), @@ -4402,45 +4209,38 @@ function transferFrom(address from, address to, uint160 amount, address token) e impl Permit2Events { /// 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. + /// 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]] = &[ [ - 55u8, 4u8, 144u8, 47u8, 150u8, 55u8, 102u8, 164u8, 229u8, 97u8, 187u8, - 170u8, 182u8, 230u8, 205u8, 193u8, 177u8, 221u8, 18u8, 246u8, 233u8, - 233u8, 150u8, 72u8, 218u8, 136u8, 67u8, 179u8, 244u8, 107u8, 145u8, 141u8, + 55u8, 4u8, 144u8, 47u8, 150u8, 55u8, 102u8, 164u8, 229u8, 97u8, 187u8, 170u8, + 182u8, 230u8, 205u8, 193u8, 177u8, 221u8, 18u8, 246u8, 233u8, 233u8, 150u8, 72u8, + 218u8, 136u8, 67u8, 179u8, 244u8, 107u8, 145u8, 141u8, ], [ - 85u8, 235u8, 144u8, 216u8, 16u8, 225u8, 112u8, 11u8, 53u8, 168u8, 231u8, - 226u8, 83u8, 149u8, 255u8, 127u8, 43u8, 34u8, 89u8, 171u8, 215u8, 65u8, - 92u8, 162u8, 40u8, 77u8, 251u8, 28u8, 36u8, 100u8, 24u8, 243u8, + 85u8, 235u8, 144u8, 216u8, 16u8, 225u8, 112u8, 11u8, 53u8, 168u8, 231u8, 226u8, + 83u8, 149u8, 255u8, 127u8, 43u8, 34u8, 89u8, 171u8, 215u8, 65u8, 92u8, 162u8, 40u8, + 77u8, 251u8, 28u8, 36u8, 100u8, 24u8, 243u8, ], [ - 137u8, 177u8, 173u8, 209u8, 94u8, 255u8, 86u8, 179u8, 223u8, 226u8, - 153u8, 173u8, 148u8, 224u8, 31u8, 43u8, 82u8, 251u8, 203u8, 128u8, 174u8, - 26u8, 59u8, 174u8, 166u8, 174u8, 140u8, 4u8, 203u8, 43u8, 152u8, 164u8, + 137u8, 177u8, 173u8, 209u8, 94u8, 255u8, 86u8, 179u8, 223u8, 226u8, 153u8, 173u8, + 148u8, 224u8, 31u8, 43u8, 82u8, 251u8, 203u8, 128u8, 174u8, 26u8, 59u8, 174u8, + 166u8, 174u8, 140u8, 4u8, 203u8, 43u8, 152u8, 164u8, ], [ - 198u8, 163u8, 119u8, 191u8, 196u8, 235u8, 18u8, 0u8, 36u8, 168u8, 172u8, - 8u8, 238u8, 242u8, 5u8, 190u8, 22u8, 184u8, 23u8, 2u8, 8u8, 18u8, 199u8, - 50u8, 35u8, 232u8, 29u8, 27u8, 219u8, 151u8, 8u8, 236u8, + 198u8, 163u8, 119u8, 191u8, 196u8, 235u8, 18u8, 0u8, 36u8, 168u8, 172u8, 8u8, + 238u8, 242u8, 5u8, 190u8, 22u8, 184u8, 23u8, 2u8, 8u8, 18u8, 199u8, 50u8, 35u8, + 232u8, 29u8, 27u8, 219u8, 151u8, 8u8, 236u8, ], [ - 218u8, 159u8, 167u8, 193u8, 176u8, 4u8, 2u8, 193u8, 125u8, 1u8, 97u8, - 178u8, 73u8, 177u8, 171u8, 139u8, 190u8, 192u8, 71u8, 197u8, 165u8, 34u8, - 7u8, 185u8, 193u8, 18u8, 222u8, 255u8, 216u8, 23u8, 3u8, 107u8, + 218u8, 159u8, 167u8, 193u8, 176u8, 4u8, 2u8, 193u8, 125u8, 1u8, 97u8, 178u8, 73u8, + 177u8, 171u8, 139u8, 190u8, 192u8, 71u8, 197u8, 165u8, 34u8, 7u8, 185u8, 193u8, + 18u8, 222u8, 255u8, 216u8, 23u8, 3u8, 107u8, ], ]; - /// The names of the variants in the same order as `SELECTORS`. - pub const VARIANT_NAMES: &'static [&'static str] = &[ - ::core::stringify!(UnorderedNonceInvalidation), - ::core::stringify!(NonceInvalidation), - ::core::stringify!(Lockdown), - ::core::stringify!(Permit), - ::core::stringify!(Approval), - ]; /// The signatures in the same order as `SELECTORS`. pub const SIGNATURES: &'static [&'static str] = &[ ::SIGNATURE, @@ -4449,6 +4249,15 @@ function transferFrom(address from, address to, uint160 amount, address token) e ::SIGNATURE, ::SIGNATURE, ]; + /// The names of the variants in the same order as `SELECTORS`. + pub const VARIANT_NAMES: &'static [&'static str] = &[ + ::core::stringify!(UnorderedNonceInvalidation), + ::core::stringify!(NonceInvalidation), + ::core::stringify!(Lockdown), + ::core::stringify!(Permit), + ::core::stringify!(Approval), + ]; + /// Returns the signature for the given selector, if known. #[inline] pub fn signature_by_selector( @@ -4461,19 +4270,19 @@ function transferFrom(address from, address to, uint160 amount, address token) e ::core::result::Result::Err(_) => ::core::option::Option::None, } } + /// Returns the enum variant name for the given selector, if known. #[inline] - pub fn name_by_selector( - selector: [u8; 32usize], - ) -> ::core::option::Option<&'static str> { + pub fn name_by_selector(selector: [u8; 32usize]) -> ::core::option::Option<&'static str> { let sig = Self::signature_by_selector(selector)?; sig.split_once('(').map(|(name, _)| name) } } #[automatically_derived] impl alloy_sol_types::SolEventInterface for Permit2Events { - const NAME: &'static str = "Permit2Events"; const COUNT: usize = 5usize; + const NAME: &'static str = "Permit2Events"; + fn decode_raw_log( topics: &[alloy_sol_types::Word], data: &[u8], @@ -4487,39 +4296,29 @@ function transferFrom(address from, address to, uint160 amount, address token) e ::decode_raw_log(topics, data) .map(Self::Lockdown) } - Some( - ::SIGNATURE_HASH, - ) => { - ::decode_raw_log( - topics, - data, - ) + Some(::SIGNATURE_HASH) => { + ::decode_raw_log(topics, data) .map(Self::NonceInvalidation) } Some(::SIGNATURE_HASH) => { ::decode_raw_log(topics, data) .map(Self::Permit) } - Some( - ::SIGNATURE_HASH, - ) => { + Some(::SIGNATURE_HASH) => { ::decode_raw_log( - topics, - data, - ) - .map(Self::UnorderedNonceInvalidation) + topics, data, + ) + .map(Self::UnorderedNonceInvalidation) } - _ => { - 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(), - ), + _ => 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(), ), - }) - } + ), + }), } } } @@ -4527,23 +4326,18 @@ function transferFrom(address from, address to, uint160 amount, address token) e impl alloy_sol_types::private::IntoLogData for Permit2Events { 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::Lockdown(inner) => { - alloy_sol_types::private::IntoLogData::to_log_data(inner) - } + Self::Approval(inner) => alloy_sol_types::private::IntoLogData::to_log_data(inner), + Self::Lockdown(inner) => alloy_sol_types::private::IntoLogData::to_log_data(inner), Self::NonceInvalidation(inner) => { alloy_sol_types::private::IntoLogData::to_log_data(inner) } - Self::Permit(inner) => { - alloy_sol_types::private::IntoLogData::to_log_data(inner) - } + Self::Permit(inner) => alloy_sol_types::private::IntoLogData::to_log_data(inner), Self::UnorderedNonceInvalidation(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) => { @@ -4555,19 +4349,17 @@ function transferFrom(address from, address to, uint160 amount, address token) e Self::NonceInvalidation(inner) => { alloy_sol_types::private::IntoLogData::into_log_data(inner) } - Self::Permit(inner) => { - alloy_sol_types::private::IntoLogData::into_log_data(inner) - } + Self::Permit(inner) => alloy_sol_types::private::IntoLogData::into_log_data(inner), Self::UnorderedNonceInvalidation(inner) => { alloy_sol_types::private::IntoLogData::into_log_data(inner) } } } } - use alloy_contract as alloy_contract; + use alloy_contract; /**Creates a new wrapper around an on-chain [`Permit2`](self) contract instance. -See the [wrapper's documentation](`Permit2Instance`) for more details.*/ + See the [wrapper's documentation](`Permit2Instance`) for more details.*/ #[inline] pub const fn new< P: alloy_contract::private::Provider, @@ -4580,43 +4372,40 @@ See the [wrapper's documentation](`Permit2Instance`) for more details.*/ } /**Deploys this contract using the given `provider` and constructor arguments, if any. -Returns a new instance of the contract, if the deployment was successful. + 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.*/ + 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, - >( + pub fn deploy, N: alloy_contract::private::Network>( __provider: P, - ) -> impl ::core::future::Future< - Output = alloy_contract::Result>, - > { + ) -> impl ::core::future::Future>> { Permit2Instance::::deploy(__provider) } /**Creates a `RawCallBuilder` for deploying this contract using the given `provider` -and constructor arguments, if any. + 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.*/ + 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) -> alloy_contract::RawCallBuilder { + >( + __provider: P, + ) -> alloy_contract::RawCallBuilder { Permit2Instance::::deploy_builder(__provider) } /**A [`Permit2`](self) instance. -Contains type-safe methods for interacting with an on-chain instance of the -[`Permit2`](self) contract located at a given `address`, using a given -provider `P`. + Contains type-safe methods for interacting with an on-chain instance of the + [`Permit2`](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. + 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.*/ + See the [module-level documentation](self) for all the available methods.*/ #[derive(Clone)] pub struct Permit2Instance { address: alloy_sol_types::private::Address, @@ -4627,46 +4416,44 @@ See the [module-level documentation](self) for all the available methods.*/ impl ::core::fmt::Debug for Permit2Instance { #[inline] fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { - f.debug_tuple("Permit2Instance").field(&self.address).finish() + f.debug_tuple("Permit2Instance") + .field(&self.address) + .finish() } } /// Instantiation and getters/setters. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > Permit2Instance { + impl, N: alloy_contract::private::Network> + Permit2Instance + { /**Creates a new wrapper around an on-chain [`Permit2`](self) contract instance. -See the [wrapper's documentation](`Permit2Instance`) for more details.*/ + See the [wrapper's documentation](`Permit2Instance`) for more details.*/ #[inline] - pub const fn new( - address: alloy_sol_types::private::Address, - __provider: P, - ) -> Self { + pub const fn new(address: alloy_sol_types::private::Address, __provider: P) -> Self { Self { address, provider: __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. + 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.*/ + For more fine-grained control over the deployment process, use [`deploy_builder`] instead.*/ #[inline] - pub async fn deploy( - __provider: P, - ) -> alloy_contract::Result> { + 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. + 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.*/ + 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( @@ -4674,21 +4461,25 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ ::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 { @@ -4696,7 +4487,8 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ } } impl Permit2Instance<&P, N> { - /// Clones the provider and returns a new instance with the cloned provider. + /// Clones the provider and returns a new instance with the cloned + /// provider. #[inline] pub fn with_cloned_provider(self) -> Permit2Instance { Permit2Instance { @@ -4707,26 +4499,29 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ } } /// Function calls. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > Permit2Instance { - /// Creates a new call builder using this contract instance's provider and address. + impl, N: alloy_contract::private::Network> + Permit2Instance + { + /// 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. + /// 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 [`DOMAIN_SEPARATOR`] function. pub fn DOMAIN_SEPARATOR( &self, ) -> alloy_contract::SolCallBuilder<&P, DOMAIN_SEPARATORCall, N> { self.call_builder(&DOMAIN_SEPARATORCall) } + ///Creates a new call builder for the [`allowance`] function. pub fn allowance( &self, @@ -4736,6 +4531,7 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ ) -> alloy_contract::SolCallBuilder<&P, allowanceCall, N> { self.call_builder(&allowanceCall { _0, _1, _2 }) } + ///Creates a new call builder for the [`approve`] function. pub fn approve( &self, @@ -4744,15 +4540,14 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ amount: alloy_sol_types::private::primitives::aliases::U160, expiration: alloy_sol_types::private::primitives::aliases::U48, ) -> alloy_contract::SolCallBuilder<&P, approveCall, N> { - self.call_builder( - &approveCall { - token, - spender, - amount, - expiration, - }, - ) + self.call_builder(&approveCall { + token, + spender, + amount, + expiration, + }) } + ///Creates a new call builder for the [`permit`] function. pub fn permit( &self, @@ -4760,14 +4555,13 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ permitSingle: ::RustType, signature: alloy_sol_types::private::Bytes, ) -> alloy_contract::SolCallBuilder<&P, permitCall, N> { - self.call_builder( - &permitCall { - owner, - permitSingle, - signature, - }, - ) + self.call_builder(&permitCall { + owner, + permitSingle, + signature, + }) } + ///Creates a new call builder for the [`transferFrom`] function. pub fn transferFrom( &self, @@ -4776,49 +4570,52 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ amount: alloy_sol_types::private::primitives::aliases::U160, token: alloy_sol_types::private::Address, ) -> alloy_contract::SolCallBuilder<&P, transferFromCall, N> { - self.call_builder( - &transferFromCall { - from, - to, - amount, - token, - }, - ) + self.call_builder(&transferFromCall { + from, + to, + amount, + token, + }) } } /// Event filters. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > Permit2Instance { - /// Creates a new event filter using this contract instance's provider and address. + impl, N: alloy_contract::private::Network> + Permit2Instance + { + /// 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. + /// 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 [`Lockdown`] event. pub fn Lockdown_filter(&self) -> alloy_contract::Event<&P, Lockdown, N> { self.event_filter::() } + ///Creates a new event filter for the [`NonceInvalidation`] event. - pub fn NonceInvalidation_filter( - &self, - ) -> alloy_contract::Event<&P, NonceInvalidation, N> { + pub fn NonceInvalidation_filter(&self) -> alloy_contract::Event<&P, NonceInvalidation, N> { self.event_filter::() } + ///Creates a new event filter for the [`Permit`] event. pub fn Permit_filter(&self) -> alloy_contract::Event<&P, Permit, N> { self.event_filter::() } - ///Creates a new event filter for the [`UnorderedNonceInvalidation`] event. + + ///Creates a new event filter for the [`UnorderedNonceInvalidation`] + /// event. pub fn UnorderedNonceInvalidation_filter( &self, ) -> alloy_contract::Event<&P, UnorderedNonceInvalidation, N> { @@ -4828,101 +4625,57 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ } pub type Instance = Permit2::Permit2Instance<::alloy_provider::DynProvider>; use { - std::{sync::LazyLock, collections::HashMap}, - anyhow::{Result, Context}, - alloy_primitives::{address, Address}, - alloy_provider::{Provider, DynProvider}, + alloy_primitives::{Address, address}, + alloy_provider::{DynProvider, Provider}, + anyhow::{Context, Result}, + std::{collections::HashMap, sync::LazyLock}, }; pub const fn deployment_info(chain_id: u64) -> Option<(Address, Option)> { match chain_id { - 1u64 => { - Some(( - ::alloy_primitives::address!( - "0x000000000022D473030F116dDEE9F6B43aC78BA3" - ), - Some(15986406u64), - )) - } - 10u64 => { - Some(( - ::alloy_primitives::address!( - "0x000000000022D473030F116dDEE9F6B43aC78BA3" - ), - Some(38854427u64), - )) - } - 56u64 => { - Some(( - ::alloy_primitives::address!( - "0x000000000022D473030F116dDEE9F6B43aC78BA3" - ), - Some(25343783u64), - )) - } - 100u64 => { - Some(( - ::alloy_primitives::address!( - "0x000000000022D473030F116dDEE9F6B43aC78BA3" - ), - Some(27338672u64), - )) - } - 137u64 => { - Some(( - ::alloy_primitives::address!( - "0x000000000022D473030F116dDEE9F6B43aC78BA3" - ), - Some(35701901u64), - )) - } - 8453u64 => { - Some(( - ::alloy_primitives::address!( - "0x000000000022D473030F116dDEE9F6B43aC78BA3" - ), - Some(1425180u64), - )) - } - 9745u64 => { - Some(( - ::alloy_primitives::address!( - "0x000000000022D473030F116dDEE9F6B43aC78BA3" - ), - Some(7808u64), - )) - } - 42161u64 => { - Some(( - ::alloy_primitives::address!( - "0x000000000022D473030F116dDEE9F6B43aC78BA3" - ), - Some(38692735u64), - )) - } - 43114u64 => { - Some(( - ::alloy_primitives::address!( - "0x000000000022D473030F116dDEE9F6B43aC78BA3" - ), - Some(28844415u64), - )) - } - 57073u64 => { - Some(( - ::alloy_primitives::address!( - "0x000000000022D473030F116dDEE9F6B43aC78BA3" - ), - Some(0u64), - )) - } - 11155111u64 => { - Some(( - ::alloy_primitives::address!( - "0x000000000022D473030F116dDEE9F6B43aC78BA3" - ), - Some(2356287u64), - )) - } + 1u64 => Some(( + ::alloy_primitives::address!("0x000000000022D473030F116dDEE9F6B43aC78BA3"), + Some(15986406u64), + )), + 10u64 => Some(( + ::alloy_primitives::address!("0x000000000022D473030F116dDEE9F6B43aC78BA3"), + Some(38854427u64), + )), + 56u64 => Some(( + ::alloy_primitives::address!("0x000000000022D473030F116dDEE9F6B43aC78BA3"), + Some(25343783u64), + )), + 100u64 => Some(( + ::alloy_primitives::address!("0x000000000022D473030F116dDEE9F6B43aC78BA3"), + Some(27338672u64), + )), + 137u64 => Some(( + ::alloy_primitives::address!("0x000000000022D473030F116dDEE9F6B43aC78BA3"), + Some(35701901u64), + )), + 8453u64 => Some(( + ::alloy_primitives::address!("0x000000000022D473030F116dDEE9F6B43aC78BA3"), + Some(1425180u64), + )), + 9745u64 => Some(( + ::alloy_primitives::address!("0x000000000022D473030F116dDEE9F6B43aC78BA3"), + Some(7808u64), + )), + 42161u64 => Some(( + ::alloy_primitives::address!("0x000000000022D473030F116dDEE9F6B43aC78BA3"), + Some(38692735u64), + )), + 43114u64 => Some(( + ::alloy_primitives::address!("0x000000000022D473030F116dDEE9F6B43aC78BA3"), + Some(28844415u64), + )), + 57073u64 => Some(( + ::alloy_primitives::address!("0x000000000022D473030F116dDEE9F6B43aC78BA3"), + Some(0u64), + )), + 11155111u64 => Some(( + ::alloy_primitives::address!("0x000000000022D473030F116dDEE9F6B43aC78BA3"), + Some(2356287u64), + )), _ => None, } } @@ -4939,9 +4692,7 @@ pub const fn deployment_block(chain_id: &u64) -> Option { } } impl Instance { - pub fn deployed( - provider: &DynProvider, - ) -> impl Future> + Send { + pub fn deployed(provider: &DynProvider) -> impl Future> + Send { async move { let chain_id = provider .get_chain_id() diff --git a/contracts/generated/contracts-generated/remoteerc20balances/src/lib.rs b/contracts/generated/contracts-generated/remoteerc20balances/src/lib.rs index 804a510ee2..8178b3dc19 100644 --- a/contracts/generated/contracts-generated/remoteerc20balances/src/lib.rs +++ b/contracts/generated/contracts-generated/remoteerc20balances/src/lib.rs @@ -1,4 +1,10 @@ -#![allow(unused_imports, unused_attributes, clippy::all, rustdoc::all, non_snake_case)] +#![allow( + unused_imports, + unused_attributes, + clippy::all, + rustdoc::all, + non_snake_case +)] //! Auto-generated contract bindings. Do not edit. /** @@ -179,8 +185,7 @@ interface RemoteERC20Balances { clippy::empty_structs_with_brackets )] pub mod RemoteERC20Balances { - use super::*; - use alloy_sol_types as alloy_sol_types; + use {super::*, alloy_sol_types}; /// The creation / init bytecode of the contract. /// /// ```text @@ -202,9 +207,9 @@ pub mod RemoteERC20Balances { b"`\x80`@R4\x80\x15a\0\x0FW__\xFD[P`\x046\x10a\0zW_5`\xE0\x1C\x80cp\xA0\x821\x11a\0XW\x80cp\xA0\x821\x14a\x01\x16W\x80c\xA9\x05\x9C\xBB\x14a\x01\x14a\x01\x9BW__\xFD[\x80c\t^\xA7\xB3\x14a\0~W\x80c#\xB8r\xDD\x14a\0\xC6W\x80c@\xC1\x0F\x19\x14a\0\xD9W[__\xFD[a\0\xC4a\0\x8C6`\x04a\x05\x06V[3_\x90\x81R` \x81\x81R`@\x80\x83 s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x95\x90\x95\x16\x83R`\x01\x90\x94\x01\x90R\x91\x90\x91 UV[\0[a\0\xC4a\0\xD46`\x04a\x05.V[a\x01\xAEV[a\0\xC4a\0\xE76`\x04a\x05\x06V[s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x90\x91\x16_\x90\x81R` \x81\x90R`@\x90 `\x01\x81U`\x02\x01UV[a\x01)a\x01$6`\x04a\x05hV[a\x02\xDAV[`@Q\x90\x81R` \x01[`@Q\x80\x91\x03\x90\xF3[a\0\xC4a\x01J6`\x04a\x05\x06V[a\x03\xE9V[a\x01v\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\x81V[`@Qs\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x90\x91\x16\x81R` \x01a\x013V[a\x01)a\x01\xA96`\x04a\x05\x81V[a\x04\xA3V[s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x83\x16_\x90\x81R` \x81\x81R`@\x80\x83 3\x84R`\x01\x01\x90\x91R\x81 \x80T\x83\x92\x90a\x01\xEE\x90\x84\x90a\x05\xDFV[\x90\x91UPPs\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x83\x16_\x90\x81R` \x81\x90R`@\x81 `\x02\x01\x80T\x83\x92\x90a\x02*\x90\x84\x90a\x05\xDFV[\x90\x91UPPs\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x83\x16_\x90\x81R` \x81\x90R`@\x81 \x80T\x91a\x02_\x83a\x05\xF2V[\x90\x91UPPs\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x82\x16_\x90\x81R` \x81\x90R`@\x81 `\x02\x01\x80T\x83\x92\x90a\x02\x9B\x90\x84\x90a\x06)V[\x90\x91UPPs\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x82\x16_\x90\x81R` \x81\x90R`@\x81 \x80T\x91a\x02\xD0\x83a\x05\xF2V[\x91\x90PUPPPPV[`@Q\x7Fp\xA0\x821\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\x81Rs\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x82\x81\x16`\x04\x83\x01R_\x91\x82\x91\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\x16\x90cp\xA0\x821\x90`$\x01` `@Q\x80\x83\x03\x81\x86Z\xFA\x15\x80\x15a\x03hW=__>=_\xFD[PPPP`@Q=`\x1F\x19`\x1F\x82\x01\x16\x82\x01\x80`@RP\x81\x01\x90a\x03\x8C\x91\x90a\x06 = (alloy_sol_types::private::Address, bool); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -259,15 +262,15 @@ constructor(address _target, bool _balanceFromHere); alloy_sol_types::sol_data::Address, alloy_sol_types::sol_data::Bool, ); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + 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<'_> { ( @@ -283,9 +286,9 @@ constructor(address _target, bool _balanceFromHere); }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `allowance(address,address)` and selector `0xdd62ed3e`. -```solidity -function allowance(address user, address spender) external view returns (uint256); -```*/ + ```solidity + function allowance(address user, address spender) external view returns (uint256); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct allowanceCall { @@ -295,7 +298,8 @@ function allowance(address user, address spender) external view returns (uint256 pub spender: alloy_sol_types::private::Address, } #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`allowance(address,address)`](allowanceCall) function. + ///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 { @@ -309,7 +313,7 @@ function allowance(address user, address spender) external view returns (uint256 clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -324,9 +328,7 @@ function allowance(address user, address spender) external view returns (uint256 ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -356,14 +358,10 @@ function allowance(address user, address spender) external view returns (uint256 #[allow(dead_code)] type UnderlyingSolTuple<'a> = (alloy_sol_types::sol_data::Uint<256>,); #[doc(hidden)] - type UnderlyingRustTuple<'a> = ( - alloy_sol_types::private::primitives::aliases::U256, - ); + 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, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -391,22 +389,21 @@ function allowance(address user, address spender) external view returns (uint256 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 ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; 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)"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [221u8, 98u8, 237u8, 62u8]; + const SIGNATURE: &'static str = "allowance(address,address)"; + #[inline] fn new<'a>( tuple: as alloy_sol_types::SolType>::RustType, ) -> Self { tuple.into() } + #[inline] fn tokenize(&self) -> Self::Token<'_> { ( @@ -418,43 +415,43 @@ function allowance(address user, address spender) external view returns (uint256 ), ) } + #[inline] fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { ( - as alloy_sol_types::SolType>::tokenize(ret), + 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| { + 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 - }) + 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(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `approve(address,uint256)` and selector `0x095ea7b3`. -```solidity -function approve(address spender, uint256 amount) external; -```*/ + ```solidity + function approve(address spender, uint256 amount) external; + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct approveCall { @@ -463,7 +460,8 @@ function approve(address spender, uint256 amount) external; #[allow(missing_docs)] pub amount: alloy_sol_types::private::primitives::aliases::U256, } - ///Container type for the return parameters of the [`approve(address,uint256)`](approveCall) function. + ///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 {} @@ -474,7 +472,7 @@ function approve(address spender, uint256 amount) external; clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -489,9 +487,7 @@ function approve(address spender, uint256 amount) external; ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -524,9 +520,7 @@ function approve(address spender, uint256 amount) external; type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -549,9 +543,7 @@ function approve(address spender, uint256 amount) external; } } impl approveReturn { - fn _tokenize( - &self, - ) -> ::ReturnToken<'_> { + fn _tokenize(&self) -> ::ReturnToken<'_> { () } } @@ -561,60 +553,58 @@ function approve(address spender, uint256 amount) external; 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 = approveReturn; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "approve(address,uint256)"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [9u8, 94u8, 167u8, 179u8]; + const SIGNATURE: &'static str = "approve(address,uint256)"; + #[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.amount), + as alloy_sol_types::SolType>::tokenize( + &self.amount, + ), ) } + #[inline] fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { approveReturn::_tokenize(ret) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) + 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) + 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(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `balanceOf(address)` and selector `0x70a08231`. -```solidity -function balanceOf(address user) external view returns (uint256); -```*/ + ```solidity + function balanceOf(address user) external view returns (uint256); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct balanceOfCall { @@ -622,7 +612,8 @@ function balanceOf(address user) external view returns (uint256); pub user: alloy_sol_types::private::Address, } #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`balanceOf(address)`](balanceOfCall) function. + ///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 { @@ -636,7 +627,7 @@ function balanceOf(address user) external view returns (uint256); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -645,9 +636,7 @@ function balanceOf(address user) external view returns (uint256); type UnderlyingRustTuple<'a> = (alloy_sol_types::private::Address,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -674,14 +663,10 @@ function balanceOf(address user) external view returns (uint256); #[allow(dead_code)] type UnderlyingSolTuple<'a> = (alloy_sol_types::sol_data::Uint<256>,); #[doc(hidden)] - type UnderlyingRustTuple<'a> = ( - alloy_sol_types::private::primitives::aliases::U256, - ); + 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, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -706,22 +691,21 @@ function balanceOf(address user) external view returns (uint256); #[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 ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; 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)"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [112u8, 160u8, 130u8, 49u8]; + const SIGNATURE: &'static str = "balanceOf(address)"; + #[inline] fn new<'a>( tuple: as alloy_sol_types::SolType>::RustType, ) -> Self { tuple.into() } + #[inline] fn tokenize(&self) -> Self::Token<'_> { ( @@ -730,43 +714,43 @@ function balanceOf(address user) external view returns (uint256); ), ) } + #[inline] fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { ( - as alloy_sol_types::SolType>::tokenize(ret), + 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| { + 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 - }) + 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(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `mint(address,uint256)` and selector `0x40c10f19`. -```solidity -function mint(address user, uint256 amount) external; -```*/ + ```solidity + function mint(address user, uint256 amount) external; + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct mintCall { @@ -775,7 +759,8 @@ function mint(address user, uint256 amount) external; #[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. + ///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 {} @@ -786,7 +771,7 @@ function mint(address user, uint256 amount) external; clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -801,9 +786,7 @@ function mint(address user, uint256 amount) external; ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -836,9 +819,7 @@ function mint(address user, uint256 amount) external; type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -861,9 +842,7 @@ function mint(address user, uint256 amount) external; } } impl mintReturn { - fn _tokenize( - &self, - ) -> ::ReturnToken<'_> { + fn _tokenize(&self) -> ::ReturnToken<'_> { () } } @@ -873,65 +852,64 @@ function mint(address user, uint256 amount) external; 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 ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "mint(address,uint256)"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [64u8, 193u8, 15u8, 25u8]; + const SIGNATURE: &'static str = "mint(address,uint256)"; + #[inline] fn new<'a>( tuple: as alloy_sol_types::SolType>::RustType, ) -> Self { tuple.into() } + #[inline] fn tokenize(&self) -> Self::Token<'_> { ( ::tokenize( &self.user, ), - as alloy_sol_types::SolType>::tokenize(&self.amount), + 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) + 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) + 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(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `target()` and selector `0xd4b83992`. -```solidity -function target() external view returns (address); -```*/ + ```solidity + function target() external view returns (address); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct targetCall; #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`target()`](targetCall) function. + ///Container type for the return parameters of the [`target()`](targetCall) + /// function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct targetReturn { @@ -945,7 +923,7 @@ function target() external view returns (address); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -954,9 +932,7 @@ function target() external view returns (address); type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -986,9 +962,7 @@ function target() external view returns (address); type UnderlyingRustTuple<'a> = (alloy_sol_types::private::Address,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1013,63 +987,58 @@ function target() external view returns (address); #[automatically_derived] impl alloy_sol_types::SolCall for targetCall { type Parameters<'a> = (); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = alloy_sol_types::private::Address; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (alloy_sol_types::sol_data::Address,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "target()"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [212u8, 184u8, 57u8, 146u8]; + const SIGNATURE: &'static str = "target()"; + #[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, - ), - ) + (::tokenize(ret),) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) - .map(|r| { + as alloy_sol_types::SolType>::abi_decode_sequence(data).map( + |r| { let r: targetReturn = 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: targetReturn = r.into(); - r._0 - }) + 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: targetReturn = r.into(); + r._0 + }) } } }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `transfer(address,uint256)` and selector `0xa9059cbb`. -```solidity -function transfer(address to, uint256 amount) external; -```*/ + ```solidity + function transfer(address to, uint256 amount) external; + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct transferCall { @@ -1078,7 +1047,8 @@ function transfer(address to, uint256 amount) external; #[allow(missing_docs)] pub amount: alloy_sol_types::private::primitives::aliases::U256, } - ///Container type for the return parameters of the [`transfer(address,uint256)`](transferCall) function. + ///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 {} @@ -1089,7 +1059,7 @@ function transfer(address to, uint256 amount) external; clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -1104,9 +1074,7 @@ function transfer(address to, uint256 amount) external; ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1139,9 +1107,7 @@ function transfer(address to, uint256 amount) external; type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1164,9 +1130,7 @@ function transfer(address to, uint256 amount) external; } } impl transferReturn { - fn _tokenize( - &self, - ) -> ::ReturnToken<'_> { + fn _tokenize(&self) -> ::ReturnToken<'_> { () } } @@ -1176,60 +1140,58 @@ function transfer(address to, uint256 amount) external; 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 = transferReturn; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "transfer(address,uint256)"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [169u8, 5u8, 156u8, 187u8]; + const SIGNATURE: &'static str = "transfer(address,uint256)"; + #[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), + as alloy_sol_types::SolType>::tokenize( + &self.amount, + ), ) } + #[inline] fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { transferReturn::_tokenize(ret) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) + 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) + 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(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `transferFrom(address,address,uint256)` and selector `0x23b872dd`. -```solidity -function transferFrom(address from, address to, uint256 amount) external; -```*/ + ```solidity + function transferFrom(address from, address to, uint256 amount) external; + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct transferFromCall { @@ -1240,7 +1202,8 @@ function transferFrom(address from, address to, uint256 amount) external; #[allow(missing_docs)] pub amount: alloy_sol_types::private::primitives::aliases::U256, } - ///Container type for the return parameters of the [`transferFrom(address,address,uint256)`](transferFromCall) function. + ///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 {} @@ -1251,7 +1214,7 @@ function transferFrom(address from, address to, uint256 amount) external; clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -1268,9 +1231,7 @@ function transferFrom(address from, address to, uint256 amount) external; ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1304,9 +1265,7 @@ function transferFrom(address from, address to, uint256 amount) external; type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1329,9 +1288,7 @@ function transferFrom(address from, address to, uint256 amount) external; } } impl transferFromReturn { - fn _tokenize( - &self, - ) -> ::ReturnToken<'_> { + fn _tokenize(&self) -> ::ReturnToken<'_> { () } } @@ -1342,22 +1299,21 @@ function transferFrom(address from, address to, uint256 amount) external; 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 = transferFromReturn; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "transferFrom(address,address,uint256)"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [35u8, 184u8, 114u8, 221u8]; + const SIGNATURE: &'static str = "transferFrom(address,address,uint256)"; + #[inline] fn new<'a>( tuple: as alloy_sol_types::SolType>::RustType, ) -> Self { tuple.into() } + #[inline] fn tokenize(&self) -> Self::Token<'_> { ( @@ -1367,36 +1323,34 @@ function transferFrom(address from, address to, uint256 amount) external; ::tokenize( &self.to, ), - as alloy_sol_types::SolType>::tokenize(&self.amount), + as alloy_sol_types::SolType>::tokenize( + &self.amount, + ), ) } + #[inline] fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { transferFromReturn::_tokenize(ret) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) + 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) + 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 [`RemoteERC20Balances`](self) function calls. #[derive(Clone)] - #[derive()] pub enum RemoteERC20BalancesCalls { #[allow(missing_docs)] allowance(allowanceCall), @@ -1416,8 +1370,9 @@ function transferFrom(address from, address to, uint256 amount) external; impl RemoteERC20BalancesCalls { /// 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. + /// 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]] = &[ @@ -1429,16 +1384,6 @@ function transferFrom(address from, address to, uint256 amount) external; [212u8, 184u8, 57u8, 146u8], [221u8, 98u8, 237u8, 62u8], ]; - /// The names of the variants in the same order as `SELECTORS`. - pub const VARIANT_NAMES: &'static [&'static str] = &[ - ::core::stringify!(approve), - ::core::stringify!(transferFrom), - ::core::stringify!(mint), - ::core::stringify!(balanceOf), - ::core::stringify!(transfer), - ::core::stringify!(target), - ::core::stringify!(allowance), - ]; /// The signatures in the same order as `SELECTORS`. pub const SIGNATURES: &'static [&'static str] = &[ ::SIGNATURE, @@ -1449,6 +1394,17 @@ function transferFrom(address from, address to, uint256 amount) external; ::SIGNATURE, ::SIGNATURE, ]; + /// The names of the variants in the same order as `SELECTORS`. + pub const VARIANT_NAMES: &'static [&'static str] = &[ + ::core::stringify!(approve), + ::core::stringify!(transferFrom), + ::core::stringify!(mint), + ::core::stringify!(balanceOf), + ::core::stringify!(transfer), + ::core::stringify!(target), + ::core::stringify!(allowance), + ]; + /// Returns the signature for the given selector, if known. #[inline] pub fn signature_by_selector( @@ -1461,59 +1417,52 @@ function transferFrom(address from, address to, uint256 amount) external; ::core::result::Result::Err(_) => ::core::option::Option::None, } } + /// Returns the enum variant name for the given selector, if known. #[inline] - pub fn name_by_selector( - selector: [u8; 4usize], - ) -> ::core::option::Option<&'static str> { + pub fn name_by_selector(selector: [u8; 4usize]) -> ::core::option::Option<&'static str> { let sig = Self::signature_by_selector(selector)?; sig.split_once('(').map(|(name, _)| name) } } #[automatically_derived] impl alloy_sol_types::SolInterface for RemoteERC20BalancesCalls { - const NAME: &'static str = "RemoteERC20BalancesCalls"; - const MIN_DATA_LENGTH: usize = 0usize; const COUNT: usize = 7usize; + const MIN_DATA_LENGTH: usize = 0usize; + const NAME: &'static str = "RemoteERC20BalancesCalls"; + #[inline] fn selector(&self) -> [u8; 4] { match self { - Self::allowance(_) => { - ::SELECTOR - } + Self::allowance(_) => ::SELECTOR, Self::approve(_) => ::SELECTOR, - Self::balanceOf(_) => { - ::SELECTOR - } + Self::balanceOf(_) => ::SELECTOR, Self::mint(_) => ::SELECTOR, Self::target(_) => ::SELECTOR, Self::transfer(_) => ::SELECTOR, - Self::transferFrom(_) => { - ::SELECTOR - } + Self::transferFrom(_) => ::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 { + fn abi_decode_raw(selector: [u8; 4], data: &[u8]) -> alloy_sol_types::Result { static DECODE_SHIMS: &[fn( &[u8], - ) -> alloy_sol_types::Result] = &[ + ) + -> alloy_sol_types::Result] = &[ { - fn approve( - data: &[u8], - ) -> alloy_sol_types::Result { + fn approve(data: &[u8]) -> alloy_sol_types::Result { ::abi_decode_raw(data) .map(RemoteERC20BalancesCalls::approve) } @@ -1523,53 +1472,41 @@ function transferFrom(address from, address to, uint256 amount) external; fn transferFrom( data: &[u8], ) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, - ) + ::abi_decode_raw(data) .map(RemoteERC20BalancesCalls::transferFrom) } transferFrom }, { - fn mint( - data: &[u8], - ) -> alloy_sol_types::Result { + fn mint(data: &[u8]) -> alloy_sol_types::Result { ::abi_decode_raw(data) .map(RemoteERC20BalancesCalls::mint) } mint }, { - fn balanceOf( - data: &[u8], - ) -> alloy_sol_types::Result { + fn balanceOf(data: &[u8]) -> alloy_sol_types::Result { ::abi_decode_raw(data) .map(RemoteERC20BalancesCalls::balanceOf) } balanceOf }, { - fn transfer( - data: &[u8], - ) -> alloy_sol_types::Result { + fn transfer(data: &[u8]) -> alloy_sol_types::Result { ::abi_decode_raw(data) .map(RemoteERC20BalancesCalls::transfer) } transfer }, { - fn target( - data: &[u8], - ) -> alloy_sol_types::Result { + fn target(data: &[u8]) -> alloy_sol_types::Result { ::abi_decode_raw(data) .map(RemoteERC20BalancesCalls::target) } target }, { - fn allowance( - data: &[u8], - ) -> alloy_sol_types::Result { + fn allowance(data: &[u8]) -> alloy_sol_types::Result { ::abi_decode_raw(data) .map(RemoteERC20BalancesCalls::allowance) } @@ -1577,15 +1514,14 @@ function transferFrom(address from, address to, uint256 amount) external; }, ]; let Ok(idx) = Self::SELECTORS.binary_search(&selector) else { - return Err( - alloy_sol_types::Error::unknown_selector( - ::NAME, - selector, - ), - ); + return Err(alloy_sol_types::Error::unknown_selector( + ::NAME, + selector, + )); }; DECODE_SHIMS[idx](data) } + #[inline] #[allow(non_snake_case)] fn abi_decode_raw_validate( @@ -1594,14 +1530,12 @@ function transferFrom(address from, address to, uint256 amount) external; ) -> alloy_sol_types::Result { static DECODE_VALIDATE_SHIMS: &[fn( &[u8], - ) -> alloy_sol_types::Result] = &[ + ) -> alloy_sol_types::Result< + RemoteERC20BalancesCalls, + >] = &[ { - fn approve( - data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) + fn approve(data: &[u8]) -> alloy_sol_types::Result { + ::abi_decode_raw_validate(data) .map(RemoteERC20BalancesCalls::approve) } approve @@ -1611,78 +1545,57 @@ function transferFrom(address from, address to, uint256 amount) external; data: &[u8], ) -> alloy_sol_types::Result { ::abi_decode_raw_validate( - data, - ) - .map(RemoteERC20BalancesCalls::transferFrom) + data, + ) + .map(RemoteERC20BalancesCalls::transferFrom) } transferFrom }, { - fn mint( - data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) + fn mint(data: &[u8]) -> alloy_sol_types::Result { + ::abi_decode_raw_validate(data) .map(RemoteERC20BalancesCalls::mint) } mint }, { - fn balanceOf( - data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) + fn balanceOf(data: &[u8]) -> alloy_sol_types::Result { + ::abi_decode_raw_validate(data) .map(RemoteERC20BalancesCalls::balanceOf) } balanceOf }, { - fn transfer( - data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) + fn transfer(data: &[u8]) -> alloy_sol_types::Result { + ::abi_decode_raw_validate(data) .map(RemoteERC20BalancesCalls::transfer) } transfer }, { - fn target( - data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) + fn target(data: &[u8]) -> alloy_sol_types::Result { + ::abi_decode_raw_validate(data) .map(RemoteERC20BalancesCalls::target) } target }, { - fn allowance( - data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) + fn allowance(data: &[u8]) -> alloy_sol_types::Result { + ::abi_decode_raw_validate(data) .map(RemoteERC20BalancesCalls::allowance) } allowance }, ]; let Ok(idx) = Self::SELECTORS.binary_search(&selector) else { - return Err( - alloy_sol_types::Error::unknown_selector( - ::NAME, - selector, - ), - ); + return Err(alloy_sol_types::Error::unknown_selector( + ::NAME, + selector, + )); }; DECODE_VALIDATE_SHIMS[idx](data) } + #[inline] fn abi_encoded_size(&self) -> usize { match self { @@ -1705,29 +1618,22 @@ function transferFrom(address from, address to, uint256 amount) external; ::abi_encoded_size(inner) } Self::transferFrom(inner) => { - ::abi_encoded_size( - inner, - ) + ::abi_encoded_size(inner) } } } + #[inline] fn abi_encode_raw(&self, out: &mut alloy_sol_types::private::Vec) { match self { Self::allowance(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } Self::approve(inner) => { ::abi_encode_raw(inner, out) } Self::balanceOf(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } Self::mint(inner) => { ::abi_encode_raw(inner, out) @@ -1736,24 +1642,18 @@ function transferFrom(address from, address to, uint256 amount) external; ::abi_encode_raw(inner, out) } Self::transfer(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } Self::transferFrom(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } } } } - use alloy_contract as alloy_contract; + use alloy_contract; /**Creates a new wrapper around an on-chain [`RemoteERC20Balances`](self) contract instance. -See the [wrapper's documentation](`RemoteERC20BalancesInstance`) for more details.*/ + See the [wrapper's documentation](`RemoteERC20BalancesInstance`) for more details.*/ #[inline] pub const fn new< P: alloy_contract::private::Provider, @@ -1766,30 +1666,23 @@ See the [wrapper's documentation](`RemoteERC20BalancesInstance`) for more detail } /**Deploys this contract using the given `provider` and constructor arguments, if any. -Returns a new instance of the contract, if the deployment was successful. + 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.*/ + 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, - >( + pub fn deploy, N: alloy_contract::private::Network>( __provider: P, _target: alloy_sol_types::private::Address, _balanceFromHere: bool, - ) -> impl ::core::future::Future< - Output = alloy_contract::Result>, - > { - RemoteERC20BalancesInstance::< - P, - N, - >::deploy(__provider, _target, _balanceFromHere) + ) -> impl ::core::future::Future>> + { + RemoteERC20BalancesInstance::::deploy(__provider, _target, _balanceFromHere) } /**Creates a `RawCallBuilder` for deploying this contract using the given `provider` -and constructor arguments, if any. + 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.*/ + 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, @@ -1799,22 +1692,19 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ _target: alloy_sol_types::private::Address, _balanceFromHere: bool, ) -> alloy_contract::RawCallBuilder { - RemoteERC20BalancesInstance::< - P, - N, - >::deploy_builder(__provider, _target, _balanceFromHere) + RemoteERC20BalancesInstance::::deploy_builder(__provider, _target, _balanceFromHere) } /**A [`RemoteERC20Balances`](self) instance. -Contains type-safe methods for interacting with an on-chain instance of the -[`RemoteERC20Balances`](self) contract located at a given `address`, using a given -provider `P`. + Contains type-safe methods for interacting with an on-chain instance of the + [`RemoteERC20Balances`](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. + 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.*/ + See the [module-level documentation](self) for all the available methods.*/ #[derive(Clone)] pub struct RemoteERC20BalancesInstance { address: alloy_sol_types::private::Address, @@ -1825,52 +1715,48 @@ See the [module-level documentation](self) for all the available methods.*/ impl ::core::fmt::Debug for RemoteERC20BalancesInstance { #[inline] fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { - f.debug_tuple("RemoteERC20BalancesInstance").field(&self.address).finish() + f.debug_tuple("RemoteERC20BalancesInstance") + .field(&self.address) + .finish() } } /// Instantiation and getters/setters. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > RemoteERC20BalancesInstance { + impl, N: alloy_contract::private::Network> + RemoteERC20BalancesInstance + { /**Creates a new wrapper around an on-chain [`RemoteERC20Balances`](self) contract instance. -See the [wrapper's documentation](`RemoteERC20BalancesInstance`) for more details.*/ + See the [wrapper's documentation](`RemoteERC20BalancesInstance`) for more details.*/ #[inline] - pub const fn new( - address: alloy_sol_types::private::Address, - __provider: P, - ) -> Self { + pub const fn new(address: alloy_sol_types::private::Address, __provider: P) -> Self { Self { address, provider: __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. + 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.*/ + For more fine-grained control over the deployment process, use [`deploy_builder`] instead.*/ #[inline] pub async fn deploy( __provider: P, _target: alloy_sol_types::private::Address, _balanceFromHere: bool, ) -> alloy_contract::Result> { - let call_builder = Self::deploy_builder( - __provider, - _target, - _balanceFromHere, - ); + let call_builder = Self::deploy_builder(__provider, _target, _balanceFromHere); 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. + 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.*/ + 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, @@ -1881,32 +1767,34 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ __provider, [ &BYTECODE[..], - &alloy_sol_types::SolConstructor::abi_encode( - &constructorCall { - _target, - _balanceFromHere, - }, - )[..], + &alloy_sol_types::SolConstructor::abi_encode(&constructorCall { + _target, + _balanceFromHere, + })[..], ] - .concat() - .into(), + .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 { @@ -1914,7 +1802,8 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ } } impl RemoteERC20BalancesInstance<&P, N> { - /// Clones the provider and returns a new instance with the cloned provider. + /// Clones the provider and returns a new instance with the cloned + /// provider. #[inline] pub fn with_cloned_provider(self) -> RemoteERC20BalancesInstance { RemoteERC20BalancesInstance { @@ -1925,20 +1814,22 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ } } /// Function calls. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > RemoteERC20BalancesInstance { - /// Creates a new call builder using this contract instance's provider and address. + impl, N: alloy_contract::private::Network> + RemoteERC20BalancesInstance + { + /// 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. + /// 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 [`allowance`] function. pub fn allowance( &self, @@ -1947,6 +1838,7 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ ) -> alloy_contract::SolCallBuilder<&P, allowanceCall, N> { self.call_builder(&allowanceCall { user, spender }) } + ///Creates a new call builder for the [`approve`] function. pub fn approve( &self, @@ -1955,6 +1847,7 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ ) -> alloy_contract::SolCallBuilder<&P, approveCall, N> { self.call_builder(&approveCall { spender, amount }) } + ///Creates a new call builder for the [`balanceOf`] function. pub fn balanceOf( &self, @@ -1962,6 +1855,7 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ ) -> alloy_contract::SolCallBuilder<&P, balanceOfCall, N> { self.call_builder(&balanceOfCall { user }) } + ///Creates a new call builder for the [`mint`] function. pub fn mint( &self, @@ -1970,10 +1864,12 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ ) -> alloy_contract::SolCallBuilder<&P, mintCall, N> { self.call_builder(&mintCall { user, amount }) } + ///Creates a new call builder for the [`target`] function. pub fn target(&self) -> alloy_contract::SolCallBuilder<&P, targetCall, N> { self.call_builder(&targetCall) } + ///Creates a new call builder for the [`transfer`] function. pub fn transfer( &self, @@ -1982,6 +1878,7 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ ) -> alloy_contract::SolCallBuilder<&P, transferCall, N> { self.call_builder(&transferCall { to, amount }) } + ///Creates a new call builder for the [`transferFrom`] function. pub fn transferFrom( &self, @@ -1989,24 +1886,19 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ to: alloy_sol_types::private::Address, amount: alloy_sol_types::private::primitives::aliases::U256, ) -> alloy_contract::SolCallBuilder<&P, transferFromCall, N> { - self.call_builder( - &transferFromCall { - from, - to, - amount, - }, - ) + self.call_builder(&transferFromCall { from, to, amount }) } } /// Event filters. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > RemoteERC20BalancesInstance { - /// Creates a new event filter using this contract instance's provider and address. + impl, N: alloy_contract::private::Network> + RemoteERC20BalancesInstance + { + /// 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. + /// 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> { @@ -2014,6 +1906,4 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ } } } -pub type Instance = RemoteERC20Balances::RemoteERC20BalancesInstance< - ::alloy_provider::DynProvider, ->; +pub type Instance = RemoteERC20Balances::RemoteERC20BalancesInstance<::alloy_provider::DynProvider>; diff --git a/contracts/generated/contracts-generated/signatures/src/lib.rs b/contracts/generated/contracts-generated/signatures/src/lib.rs index 37b55aa22b..c787ca99df 100644 --- a/contracts/generated/contracts-generated/signatures/src/lib.rs +++ b/contracts/generated/contracts-generated/signatures/src/lib.rs @@ -1,4 +1,10 @@ -#![allow(unused_imports, unused_attributes, clippy::all, rustdoc::all, non_snake_case)] +#![allow( + unused_imports, + unused_attributes, + clippy::all, + rustdoc::all, + non_snake_case +)] //! Auto-generated contract bindings. Do not edit. /** @@ -100,8 +106,7 @@ interface Signatures { clippy::empty_structs_with_brackets )] pub mod Signatures { - use super::*; - use alloy_sol_types as alloy_sol_types; + use {super::*, alloy_sol_types}; /// The creation / init bytecode of the contract. /// /// ```text @@ -124,8 +129,8 @@ pub mod Signatures { ); #[derive(Default, Debug, PartialEq, Eq, Hash)] /**```solidity -struct Contracts { address settlement; address vaultRelayer; } -```*/ + struct Contracts { address settlement; address vaultRelayer; } + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct Contracts { @@ -141,7 +146,7 @@ struct Contracts { address settlement; address vaultRelayer; } clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[doc(hidden)] #[allow(dead_code)] type UnderlyingSolTuple<'a> = ( @@ -155,9 +160,7 @@ struct Contracts { address settlement; address vaultRelayer; } ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -198,91 +201,88 @@ struct Contracts { address settlement; address vaultRelayer; } ), ) } + #[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) + 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) + 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) + 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 Contracts { type RustType = Self; - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + + const ENCODED_SIZE: Option = + as alloy_sol_types::SolType>::ENCODED_SIZE; + const PACKED_ENCODED_SIZE: Option = + as alloy_sol_types::SolType>::PACKED_ENCODED_SIZE; 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); + let tuple = as alloy_sol_types::SolType>::detokenize(token); >>::from(tuple) } } #[automatically_derived] impl alloy_sol_types::SolStruct for Contracts { const NAME: &'static str = "Contracts"; + #[inline] fn eip712_root_type() -> alloy_sol_types::private::Cow<'static, str> { alloy_sol_types::private::Cow::Borrowed( "Contracts(address settlement,address vaultRelayer)", ) } + #[inline] - fn eip712_components() -> alloy_sol_types::private::Vec< - alloy_sol_types::private::Cow<'static, str>, - > { + fn eip712_components() + -> alloy_sol_types::private::Vec> + { 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 { [ @@ -310,14 +310,13 @@ struct Contracts { address settlement; address vaultRelayer; } &rust.vaultRelayer, ) } + #[inline] fn encode_topic_preimage( rust: &Self::RustType, out: &mut alloy_sol_types::private::Vec, ) { - out.reserve( - ::topic_preimage_length(rust), - ); + out.reserve(::topic_preimage_length(rust)); ::encode_topic_preimage( &rust.settlement, out, @@ -327,25 +326,19 @@ struct Contracts { address settlement; address vaultRelayer; } out, ); } + #[inline] - fn encode_topic( - rust: &Self::RustType, - ) -> alloy_sol_types::abi::token::WordToken { + 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), - ) + ::encode_topic_preimage(rust, &mut out); + alloy_sol_types::abi::token::WordToken(alloy_sol_types::private::keccak256(out)) } } }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**```solidity -struct Interaction { address target; uint256 value; bytes callData; } -```*/ + struct Interaction { address target; uint256 value; bytes callData; } + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct Interaction { @@ -363,7 +356,7 @@ struct Interaction { address target; uint256 value; bytes callData; } clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[doc(hidden)] #[allow(dead_code)] type UnderlyingSolTuple<'a> = ( @@ -379,9 +372,7 @@ struct Interaction { address target; uint256 value; bytes callData; } ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -418,99 +409,96 @@ struct Interaction { address target; uint256 value; bytes callData; } ::tokenize( &self.target, ), - as alloy_sol_types::SolType>::tokenize(&self.value), + as alloy_sol_types::SolType>::tokenize( + &self.value, + ), ::tokenize( &self.callData, ), ) } + #[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) + 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) + 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) + 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 Interaction { type RustType = Self; - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + + const ENCODED_SIZE: Option = + as alloy_sol_types::SolType>::ENCODED_SIZE; + const PACKED_ENCODED_SIZE: Option = + as alloy_sol_types::SolType>::PACKED_ENCODED_SIZE; 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); + let tuple = as alloy_sol_types::SolType>::detokenize(token); >>::from(tuple) } } #[automatically_derived] impl alloy_sol_types::SolStruct for Interaction { const NAME: &'static str = "Interaction"; + #[inline] fn eip712_root_type() -> alloy_sol_types::private::Cow<'static, str> { alloy_sol_types::private::Cow::Borrowed( "Interaction(address target,uint256 value,bytes callData)", ) } + #[inline] - fn eip712_components() -> alloy_sol_types::private::Vec< - alloy_sol_types::private::Cow<'static, str>, - > { + fn eip712_components() + -> alloy_sol_types::private::Vec> + { 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 { [ @@ -545,14 +533,13 @@ struct Interaction { address target; uint256 value; bytes callData; } &rust.callData, ) } + #[inline] fn encode_topic_preimage( rust: &Self::RustType, out: &mut alloy_sol_types::private::Vec, ) { - out.reserve( - ::topic_preimage_length(rust), - ); + out.reserve(::topic_preimage_length(rust)); ::encode_topic_preimage( &rust.target, out, @@ -568,26 +555,20 @@ struct Interaction { address target; uint256 value; bytes callData; } out, ); } + #[inline] - fn encode_topic( - rust: &Self::RustType, - ) -> alloy_sol_types::abi::token::WordToken { + 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), - ) + ::encode_topic_preimage(rust, &mut out); + alloy_sol_types::abi::token::WordToken(alloy_sol_types::private::keccak256(out)) } } }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `validate((address,address),address,bytes32,bytes,(address,uint256,bytes)[])` and selector `0xb4605415`. -```solidity -function validate(Contracts memory contracts, address signer, bytes32 order, bytes memory signature, Interaction[] memory interactions) external returns (uint256 gasUsed); -```*/ + ```solidity + function validate(Contracts memory contracts, address signer, bytes32 order, bytes memory signature, Interaction[] memory interactions) external returns (uint256 gasUsed); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct validateCall { @@ -600,12 +581,13 @@ function validate(Contracts memory contracts, address signer, bytes32 order, byt #[allow(missing_docs)] pub signature: alloy_sol_types::private::Bytes, #[allow(missing_docs)] - pub interactions: alloy_sol_types::private::Vec< - ::RustType, - >, + pub interactions: + alloy_sol_types::private::Vec<::RustType>, } #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`validate((address,address),address,bytes32,bytes,(address,uint256,bytes)[])`](validateCall) function. + ///Container type for the return parameters of the + /// [`validate((address,address),address,bytes32,bytes,(address,uint256, + /// bytes)[])`](validateCall) function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct validateReturn { @@ -619,7 +601,7 @@ function validate(Contracts memory contracts, address signer, bytes32 order, byt clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -636,15 +618,11 @@ function validate(Contracts memory contracts, address signer, bytes32 order, byt alloy_sol_types::private::Address, alloy_sol_types::private::FixedBytes<32>, alloy_sol_types::private::Bytes, - alloy_sol_types::private::Vec< - ::RustType, - >, + alloy_sol_types::private::Vec<::RustType>, ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -683,14 +661,10 @@ function validate(Contracts memory contracts, address signer, bytes32 order, byt #[allow(dead_code)] type UnderlyingSolTuple<'a> = (alloy_sol_types::sol_data::Uint<256>,); #[doc(hidden)] - type UnderlyingRustTuple<'a> = ( - alloy_sol_types::private::primitives::aliases::U256, - ); + 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, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -721,22 +695,22 @@ function validate(Contracts memory contracts, address signer, bytes32 order, byt alloy_sol_types::sol_data::Bytes, alloy_sol_types::sol_data::Array, ); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = alloy_sol_types::private::primitives::aliases::U256; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (alloy_sol_types::sol_data::Uint<256>,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "validate((address,address),address,bytes32,bytes,(address,uint256,bytes)[])"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [180u8, 96u8, 84u8, 21u8]; + const SIGNATURE: &'static str = + "validate((address,address),address,bytes32,bytes,(address,uint256,bytes)[])"; + #[inline] fn new<'a>( tuple: as alloy_sol_types::SolType>::RustType, ) -> Self { tuple.into() } + #[inline] fn tokenize(&self) -> Self::Token<'_> { ( @@ -755,41 +729,40 @@ function validate(Contracts memory contracts, address signer, bytes32 order, byt > as alloy_sol_types::SolType>::tokenize(&self.interactions), ) } + #[inline] fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { ( - as alloy_sol_types::SolType>::tokenize(ret), + 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| { + as alloy_sol_types::SolType>::abi_decode_sequence(data).map( + |r| { let r: validateReturn = r.into(); r.gasUsed - }) + }, + ) } + #[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: validateReturn = r.into(); - r.gasUsed - }) + 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: validateReturn = r.into(); + r.gasUsed + }) } } }; ///Container for all the [`Signatures`](self) function calls. #[derive(Clone)] - #[derive()] pub enum SignaturesCalls { #[allow(missing_docs)] validate(validateCall), @@ -797,19 +770,18 @@ function validate(Contracts memory contracts, address signer, bytes32 order, byt impl SignaturesCalls { /// 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. + /// 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]] = &[[180u8, 96u8, 84u8, 21u8]]; - /// The names of the variants in the same order as `SELECTORS`. - pub const VARIANT_NAMES: &'static [&'static str] = &[ - ::core::stringify!(validate), - ]; /// The signatures in the same order as `SELECTORS`. - pub const SIGNATURES: &'static [&'static str] = &[ - ::SIGNATURE, - ]; + pub const SIGNATURES: &'static [&'static str] = + &[::SIGNATURE]; + /// The names of the variants in the same order as `SELECTORS`. + pub const VARIANT_NAMES: &'static [&'static str] = &[::core::stringify!(validate)]; + /// Returns the signature for the given selector, if known. #[inline] pub fn signature_by_selector( @@ -822,63 +794,56 @@ function validate(Contracts memory contracts, address signer, bytes32 order, byt ::core::result::Result::Err(_) => ::core::option::Option::None, } } + /// Returns the enum variant name for the given selector, if known. #[inline] - pub fn name_by_selector( - selector: [u8; 4usize], - ) -> ::core::option::Option<&'static str> { + pub fn name_by_selector(selector: [u8; 4usize]) -> ::core::option::Option<&'static str> { let sig = Self::signature_by_selector(selector)?; sig.split_once('(').map(|(name, _)| name) } } #[automatically_derived] impl alloy_sol_types::SolInterface for SignaturesCalls { - const NAME: &'static str = "SignaturesCalls"; - const MIN_DATA_LENGTH: usize = 256usize; const COUNT: usize = 1usize; + const MIN_DATA_LENGTH: usize = 256usize; + const NAME: &'static str = "SignaturesCalls"; + #[inline] fn selector(&self) -> [u8; 4] { match self { Self::validate(_) => ::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 validate( - data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw(data) - .map(SignaturesCalls::validate) - } - validate - }, - ]; + fn abi_decode_raw(selector: [u8; 4], data: &[u8]) -> alloy_sol_types::Result { + static DECODE_SHIMS: &[fn(&[u8]) -> alloy_sol_types::Result] = &[{ + fn validate(data: &[u8]) -> alloy_sol_types::Result { + ::abi_decode_raw(data) + .map(SignaturesCalls::validate) + } + validate + }]; let Ok(idx) = Self::SELECTORS.binary_search(&selector) else { - return Err( - alloy_sol_types::Error::unknown_selector( - ::NAME, - selector, - ), - ); + return Err(alloy_sol_types::Error::unknown_selector( + ::NAME, + selector, + )); }; DECODE_SHIMS[idx](data) } + #[inline] #[allow(non_snake_case)] fn abi_decode_raw_validate( @@ -887,29 +852,23 @@ function validate(Contracts memory contracts, address signer, bytes32 order, byt ) -> alloy_sol_types::Result { static DECODE_VALIDATE_SHIMS: &[fn( &[u8], - ) -> alloy_sol_types::Result] = &[ - { - fn validate( - data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) - .map(SignaturesCalls::validate) - } - validate - }, - ]; + ) + -> alloy_sol_types::Result] = &[{ + fn validate(data: &[u8]) -> alloy_sol_types::Result { + ::abi_decode_raw_validate(data) + .map(SignaturesCalls::validate) + } + validate + }]; let Ok(idx) = Self::SELECTORS.binary_search(&selector) else { - return Err( - alloy_sol_types::Error::unknown_selector( - ::NAME, - selector, - ), - ); + return Err(alloy_sol_types::Error::unknown_selector( + ::NAME, + selector, + )); }; DECODE_VALIDATE_SHIMS[idx](data) } + #[inline] fn abi_encoded_size(&self) -> usize { match self { @@ -918,22 +877,20 @@ function validate(Contracts memory contracts, address signer, bytes32 order, byt } } } + #[inline] fn abi_encode_raw(&self, out: &mut alloy_sol_types::private::Vec) { match self { Self::validate(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } } } } - use alloy_contract as alloy_contract; + use alloy_contract; /**Creates a new wrapper around an on-chain [`Signatures`](self) contract instance. -See the [wrapper's documentation](`SignaturesInstance`) for more details.*/ + See the [wrapper's documentation](`SignaturesInstance`) for more details.*/ #[inline] pub const fn new< P: alloy_contract::private::Provider, @@ -946,43 +903,41 @@ See the [wrapper's documentation](`SignaturesInstance`) for more details.*/ } /**Deploys this contract using the given `provider` and constructor arguments, if any. -Returns a new instance of the contract, if the deployment was successful. + 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.*/ + 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, - >( + pub fn deploy, N: alloy_contract::private::Network>( __provider: P, - ) -> impl ::core::future::Future< - Output = alloy_contract::Result>, - > { + ) -> impl ::core::future::Future>> + { SignaturesInstance::::deploy(__provider) } /**Creates a `RawCallBuilder` for deploying this contract using the given `provider` -and constructor arguments, if any. + 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.*/ + 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) -> alloy_contract::RawCallBuilder { + >( + __provider: P, + ) -> alloy_contract::RawCallBuilder { SignaturesInstance::::deploy_builder(__provider) } /**A [`Signatures`](self) instance. -Contains type-safe methods for interacting with an on-chain instance of the -[`Signatures`](self) contract located at a given `address`, using a given -provider `P`. + Contains type-safe methods for interacting with an on-chain instance of the + [`Signatures`](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. + 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.*/ + See the [module-level documentation](self) for all the available methods.*/ #[derive(Clone)] pub struct SignaturesInstance { address: alloy_sol_types::private::Address, @@ -993,46 +948,44 @@ See the [module-level documentation](self) for all the available methods.*/ impl ::core::fmt::Debug for SignaturesInstance { #[inline] fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { - f.debug_tuple("SignaturesInstance").field(&self.address).finish() + f.debug_tuple("SignaturesInstance") + .field(&self.address) + .finish() } } /// Instantiation and getters/setters. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > SignaturesInstance { + impl, N: alloy_contract::private::Network> + SignaturesInstance + { /**Creates a new wrapper around an on-chain [`Signatures`](self) contract instance. -See the [wrapper's documentation](`SignaturesInstance`) for more details.*/ + See the [wrapper's documentation](`SignaturesInstance`) for more details.*/ #[inline] - pub const fn new( - address: alloy_sol_types::private::Address, - __provider: P, - ) -> Self { + pub const fn new(address: alloy_sol_types::private::Address, __provider: P) -> Self { Self { address, provider: __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. + 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.*/ + For more fine-grained control over the deployment process, use [`deploy_builder`] instead.*/ #[inline] - pub async fn deploy( - __provider: P, - ) -> alloy_contract::Result> { + 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. + 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.*/ + 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( @@ -1040,21 +993,25 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ ::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 { @@ -1062,7 +1019,8 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ } } impl SignaturesInstance<&P, N> { - /// Clones the provider and returns a new instance with the cloned provider. + /// Clones the provider and returns a new instance with the cloned + /// provider. #[inline] pub fn with_cloned_provider(self) -> SignaturesInstance { SignaturesInstance { @@ -1073,20 +1031,22 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ } } /// Function calls. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > SignaturesInstance { - /// Creates a new call builder using this contract instance's provider and address. + impl, N: alloy_contract::private::Network> + SignaturesInstance + { + /// 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. + /// 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 [`validate`] function. pub fn validate( &self, @@ -1098,26 +1058,25 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ ::RustType, >, ) -> alloy_contract::SolCallBuilder<&P, validateCall, N> { - self.call_builder( - &validateCall { - contracts, - signer, - order, - signature, - interactions, - }, - ) + self.call_builder(&validateCall { + contracts, + signer, + order, + signature, + interactions, + }) } } /// Event filters. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > SignaturesInstance { - /// Creates a new event filter using this contract instance's provider and address. + impl, N: alloy_contract::private::Network> + SignaturesInstance + { + /// 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. + /// 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> { @@ -1127,109 +1086,61 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ } pub type Instance = Signatures::SignaturesInstance<::alloy_provider::DynProvider>; use { - std::{sync::LazyLock, collections::HashMap}, - anyhow::{Result, Context}, - alloy_primitives::{address, Address}, - alloy_provider::{Provider, DynProvider}, + alloy_primitives::{Address, address}, + alloy_provider::{DynProvider, Provider}, + anyhow::{Context, Result}, + std::{collections::HashMap, sync::LazyLock}, }; pub const fn deployment_info(chain_id: u64) -> Option<(Address, Option)> { match chain_id { - 1u64 => { - Some(( - ::alloy_primitives::address!( - "0x8262d639c38470F38d2eff15926F7071c28057Af" - ), - None, - )) - } - 10u64 => { - Some(( - ::alloy_primitives::address!( - "0x8262d639c38470F38d2eff15926F7071c28057Af" - ), - None, - )) - } - 56u64 => { - Some(( - ::alloy_primitives::address!( - "0x8262d639c38470F38d2eff15926F7071c28057Af" - ), - None, - )) - } - 100u64 => { - Some(( - ::alloy_primitives::address!( - "0x8262d639c38470F38d2eff15926F7071c28057Af" - ), - None, - )) - } - 137u64 => { - Some(( - ::alloy_primitives::address!( - "0x8262d639c38470F38d2eff15926F7071c28057Af" - ), - None, - )) - } - 8453u64 => { - Some(( - ::alloy_primitives::address!( - "0x8262d639c38470F38d2eff15926F7071c28057Af" - ), - None, - )) - } - 9745u64 => { - Some(( - ::alloy_primitives::address!( - "0x8262d639c38470F38d2eff15926F7071c28057Af" - ), - None, - )) - } - 42161u64 => { - Some(( - ::alloy_primitives::address!( - "0x8262d639c38470F38d2eff15926F7071c28057Af" - ), - None, - )) - } - 43114u64 => { - Some(( - ::alloy_primitives::address!( - "0x8262d639c38470F38d2eff15926F7071c28057Af" - ), - None, - )) - } - 57073u64 => { - Some(( - ::alloy_primitives::address!( - "0x8262d639c38470F38d2eff15926F7071c28057Af" - ), - None, - )) - } - 59144u64 => { - Some(( - ::alloy_primitives::address!( - "0xf6E57e72F7dB3D9A51a8B4c149C00475b94A37e4" - ), - None, - )) - } - 11155111u64 => { - Some(( - ::alloy_primitives::address!( - "0x8262d639c38470F38d2eff15926F7071c28057Af" - ), - None, - )) - } + 1u64 => Some(( + ::alloy_primitives::address!("0x8262d639c38470F38d2eff15926F7071c28057Af"), + None, + )), + 10u64 => Some(( + ::alloy_primitives::address!("0x8262d639c38470F38d2eff15926F7071c28057Af"), + None, + )), + 56u64 => Some(( + ::alloy_primitives::address!("0x8262d639c38470F38d2eff15926F7071c28057Af"), + None, + )), + 100u64 => Some(( + ::alloy_primitives::address!("0x8262d639c38470F38d2eff15926F7071c28057Af"), + None, + )), + 137u64 => Some(( + ::alloy_primitives::address!("0x8262d639c38470F38d2eff15926F7071c28057Af"), + None, + )), + 8453u64 => Some(( + ::alloy_primitives::address!("0x8262d639c38470F38d2eff15926F7071c28057Af"), + None, + )), + 9745u64 => Some(( + ::alloy_primitives::address!("0x8262d639c38470F38d2eff15926F7071c28057Af"), + None, + )), + 42161u64 => Some(( + ::alloy_primitives::address!("0x8262d639c38470F38d2eff15926F7071c28057Af"), + None, + )), + 43114u64 => Some(( + ::alloy_primitives::address!("0x8262d639c38470F38d2eff15926F7071c28057Af"), + None, + )), + 57073u64 => Some(( + ::alloy_primitives::address!("0x8262d639c38470F38d2eff15926F7071c28057Af"), + None, + )), + 59144u64 => Some(( + ::alloy_primitives::address!("0xf6E57e72F7dB3D9A51a8B4c149C00475b94A37e4"), + None, + )), + 11155111u64 => Some(( + ::alloy_primitives::address!("0x8262d639c38470F38d2eff15926F7071c28057Af"), + None, + )), _ => None, } } @@ -1246,9 +1157,7 @@ pub const fn deployment_block(chain_id: &u64) -> Option { } } impl Instance { - pub fn deployed( - provider: &DynProvider, - ) -> impl Future> + Send { + pub fn deployed(provider: &DynProvider) -> impl Future> + Send { async move { let chain_id = provider .get_chain_id() diff --git a/contracts/generated/contracts-generated/solver/src/lib.rs b/contracts/generated/contracts-generated/solver/src/lib.rs index 28312d7e2b..cd27b738be 100644 --- a/contracts/generated/contracts-generated/solver/src/lib.rs +++ b/contracts/generated/contracts-generated/solver/src/lib.rs @@ -1,4 +1,10 @@ -#![allow(unused_imports, unused_attributes, clippy::all, rustdoc::all, non_snake_case)] +#![allow( + unused_imports, + unused_attributes, + clippy::all, + rustdoc::all, + non_snake_case +)] //! Auto-generated contract bindings. Do not edit. /** @@ -124,8 +130,7 @@ interface Solver { clippy::empty_structs_with_brackets )] pub mod Solver { - use super::*; - use alloy_sol_types as alloy_sol_types; + use {super::*, alloy_sol_types}; /// The creation / init bytecode of the contract. /// /// ```text @@ -148,9 +153,9 @@ pub mod Solver { ); #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `ensureTradePreconditions(address,address,address,uint256,address,address)` and selector `0x2582edb4`. -```solidity -function ensureTradePreconditions(address trader, address settlementContract, address sellToken, uint256 sellAmount, address nativeToken, address spardose) external; -```*/ + ```solidity + function ensureTradePreconditions(address trader, address settlementContract, address sellToken, uint256 sellAmount, address nativeToken, address spardose) external; + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct ensureTradePreconditionsCall { @@ -167,7 +172,9 @@ function ensureTradePreconditions(address trader, address settlementContract, ad #[allow(missing_docs)] pub spardose: alloy_sol_types::private::Address, } - ///Container type for the return parameters of the [`ensureTradePreconditions(address,address,address,uint256,address,address)`](ensureTradePreconditionsCall) function. + ///Container type for the return parameters of the + /// [`ensureTradePreconditions(address,address,address,uint256,address, + /// address)`](ensureTradePreconditionsCall) function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct ensureTradePreconditionsReturn {} @@ -178,7 +185,7 @@ function ensureTradePreconditions(address trader, address settlementContract, ad clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -201,9 +208,7 @@ function ensureTradePreconditions(address trader, address settlementContract, ad ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -212,8 +217,7 @@ function ensureTradePreconditions(address trader, address settlementContract, ad } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From - for UnderlyingRustTuple<'_> { + impl ::core::convert::From for UnderlyingRustTuple<'_> { fn from(value: ensureTradePreconditionsCall) -> Self { ( value.trader, @@ -227,8 +231,7 @@ function ensureTradePreconditions(address trader, address settlementContract, ad } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From> - for ensureTradePreconditionsCall { + impl ::core::convert::From> for ensureTradePreconditionsCall { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { Self { trader: tuple.0, @@ -249,9 +252,7 @@ function ensureTradePreconditions(address trader, address settlementContract, ad type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -260,16 +261,14 @@ function ensureTradePreconditions(address trader, address settlementContract, ad } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From - for UnderlyingRustTuple<'_> { + impl ::core::convert::From for UnderlyingRustTuple<'_> { fn from(value: ensureTradePreconditionsReturn) -> Self { () } } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From> - for ensureTradePreconditionsReturn { + impl ::core::convert::From> for ensureTradePreconditionsReturn { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { Self {} } @@ -278,9 +277,8 @@ function ensureTradePreconditions(address trader, address settlementContract, ad impl ensureTradePreconditionsReturn { fn _tokenize( &self, - ) -> ::ReturnToken< - '_, - > { + ) -> ::ReturnToken<'_> + { () } } @@ -294,22 +292,22 @@ function ensureTradePreconditions(address trader, address settlementContract, ad alloy_sol_types::sol_data::Address, alloy_sol_types::sol_data::Address, ); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = ensureTradePreconditionsReturn; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "ensureTradePreconditions(address,address,address,uint256,address,address)"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [37u8, 130u8, 237u8, 180u8]; + const SIGNATURE: &'static str = + "ensureTradePreconditions(address,address,address,uint256,address,address)"; + #[inline] fn new<'a>( tuple: as alloy_sol_types::SolType>::RustType, ) -> Self { tuple.into() } + #[inline] fn tokenize(&self) -> Self::Token<'_> { ( @@ -322,9 +320,9 @@ function ensureTradePreconditions(address trader, address settlementContract, ad ::tokenize( &self.sellToken, ), - as alloy_sol_types::SolType>::tokenize(&self.sellAmount), + as alloy_sol_types::SolType>::tokenize( + &self.sellAmount, + ), ::tokenize( &self.nativeToken, ), @@ -333,33 +331,32 @@ function ensureTradePreconditions(address trader, address settlementContract, ad ), ) } + #[inline] fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { ensureTradePreconditionsReturn::_tokenize(ret) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) + 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) + 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(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `storeBalance(address,address,bool)` and selector `0x3bbb2e1d`. -```solidity -function storeBalance(address token, address owner, bool countGas) external; -```*/ + ```solidity + function storeBalance(address token, address owner, bool countGas) external; + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct storeBalanceCall { @@ -370,7 +367,8 @@ function storeBalance(address token, address owner, bool countGas) external; #[allow(missing_docs)] pub countGas: bool, } - ///Container type for the return parameters of the [`storeBalance(address,address,bool)`](storeBalanceCall) function. + ///Container type for the return parameters of the + /// [`storeBalance(address,address,bool)`](storeBalanceCall) function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct storeBalanceReturn {} @@ -381,7 +379,7 @@ function storeBalance(address token, address owner, bool countGas) external; clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -398,9 +396,7 @@ function storeBalance(address token, address owner, bool countGas) external; ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -434,9 +430,7 @@ function storeBalance(address token, address owner, bool countGas) external; type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -459,9 +453,7 @@ function storeBalance(address token, address owner, bool countGas) external; } } impl storeBalanceReturn { - fn _tokenize( - &self, - ) -> ::ReturnToken<'_> { + fn _tokenize(&self) -> ::ReturnToken<'_> { () } } @@ -472,22 +464,21 @@ function storeBalance(address token, address owner, bool countGas) external; alloy_sol_types::sol_data::Address, alloy_sol_types::sol_data::Bool, ); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = storeBalanceReturn; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "storeBalance(address,address,bool)"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [59u8, 187u8, 46u8, 29u8]; + const SIGNATURE: &'static str = "storeBalance(address,address,bool)"; + #[inline] fn new<'a>( tuple: as alloy_sol_types::SolType>::RustType, ) -> Self { tuple.into() } + #[inline] fn tokenize(&self) -> Self::Token<'_> { ( @@ -502,33 +493,32 @@ function storeBalance(address token, address owner, bool countGas) external; ), ) } + #[inline] fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { storeBalanceReturn::_tokenize(ret) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) + 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) + 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(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `swap(address,address[],address,bytes)` and selector `0x1d47e7f4`. -```solidity -function swap(address settlementContract, address[] memory tokens, address receiver, bytes memory settlementCall) external returns (uint256 gasUsed, uint256[] memory queriedBalances); -```*/ + ```solidity + function swap(address settlementContract, address[] memory tokens, address receiver, bytes memory settlementCall) external returns (uint256 gasUsed, uint256[] memory queriedBalances); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct swapCall { @@ -542,16 +532,16 @@ function swap(address settlementContract, address[] memory tokens, address recei pub settlementCall: alloy_sol_types::private::Bytes, } #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`swap(address,address[],address,bytes)`](swapCall) function. + ///Container type for the return parameters of the + /// [`swap(address,address[],address,bytes)`](swapCall) function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct swapReturn { #[allow(missing_docs)] pub gasUsed: alloy_sol_types::private::primitives::aliases::U256, #[allow(missing_docs)] - pub queriedBalances: alloy_sol_types::private::Vec< - alloy_sol_types::private::primitives::aliases::U256, - >, + pub queriedBalances: + alloy_sol_types::private::Vec, } #[allow( non_camel_case_types, @@ -560,7 +550,7 @@ function swap(address settlementContract, address[] memory tokens, address recei clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -579,9 +569,7 @@ function swap(address settlementContract, address[] memory tokens, address recei ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -623,15 +611,11 @@ function swap(address settlementContract, address[] memory tokens, address recei #[doc(hidden)] type UnderlyingRustTuple<'a> = ( alloy_sol_types::private::primitives::aliases::U256, - alloy_sol_types::private::Vec< - alloy_sol_types::private::primitives::aliases::U256, - >, + alloy_sol_types::private::Vec, ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -657,9 +641,7 @@ function swap(address settlementContract, address[] memory tokens, address recei } } impl swapReturn { - fn _tokenize( - &self, - ) -> ::ReturnToken<'_> { + fn _tokenize(&self) -> ::ReturnToken<'_> { ( = as alloy_sol_types::SolType>::Token<'a>; type Return = swapReturn; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = ( alloy_sol_types::sol_data::Uint<256>, alloy_sol_types::sol_data::Array>, ); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "swap(address,address[],address,bytes)"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [29u8, 71u8, 231u8, 244u8]; + const SIGNATURE: &'static str = "swap(address,address[],address,bytes)"; + #[inline] fn new<'a>( tuple: as alloy_sol_types::SolType>::RustType, ) -> Self { tuple.into() } + #[inline] fn tokenize(&self) -> Self::Token<'_> { ( @@ -714,31 +695,29 @@ function swap(address settlementContract, address[] memory tokens, address recei ), ) } + #[inline] fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { swapReturn::_tokenize(ret) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) + 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) + 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 [`Solver`](self) function calls. #[derive(Clone)] - #[derive()] pub enum SolverCalls { #[allow(missing_docs)] ensureTradePreconditions(ensureTradePreconditionsCall), @@ -750,8 +729,9 @@ function swap(address settlementContract, address[] memory tokens, address recei impl SolverCalls { /// 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. + /// 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]] = &[ @@ -759,18 +739,19 @@ function swap(address settlementContract, address[] memory tokens, address recei [37u8, 130u8, 237u8, 180u8], [59u8, 187u8, 46u8, 29u8], ]; - /// The names of the variants in the same order as `SELECTORS`. - pub const VARIANT_NAMES: &'static [&'static str] = &[ - ::core::stringify!(swap), - ::core::stringify!(ensureTradePreconditions), - ::core::stringify!(storeBalance), - ]; /// The signatures in the same order as `SELECTORS`. pub const SIGNATURES: &'static [&'static str] = &[ ::SIGNATURE, ::SIGNATURE, ::SIGNATURE, ]; + /// The names of the variants in the same order as `SELECTORS`. + pub const VARIANT_NAMES: &'static [&'static str] = &[ + ::core::stringify!(swap), + ::core::stringify!(ensureTradePreconditions), + ::core::stringify!(storeBalance), + ]; + /// Returns the signature for the given selector, if known. #[inline] pub fn signature_by_selector( @@ -783,46 +764,44 @@ function swap(address settlementContract, address[] memory tokens, address recei ::core::result::Result::Err(_) => ::core::option::Option::None, } } + /// Returns the enum variant name for the given selector, if known. #[inline] - pub fn name_by_selector( - selector: [u8; 4usize], - ) -> ::core::option::Option<&'static str> { + pub fn name_by_selector(selector: [u8; 4usize]) -> ::core::option::Option<&'static str> { let sig = Self::signature_by_selector(selector)?; sig.split_once('(').map(|(name, _)| name) } } #[automatically_derived] impl alloy_sol_types::SolInterface for SolverCalls { - const NAME: &'static str = "SolverCalls"; - const MIN_DATA_LENGTH: usize = 96usize; const COUNT: usize = 3usize; + const MIN_DATA_LENGTH: usize = 96usize; + const NAME: &'static str = "SolverCalls"; + #[inline] fn selector(&self) -> [u8; 4] { match self { Self::ensureTradePreconditions(_) => { ::SELECTOR } - Self::storeBalance(_) => { - ::SELECTOR - } + Self::storeBalance(_) => ::SELECTOR, Self::swap(_) => ::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 { + fn abi_decode_raw(selector: [u8; 4], data: &[u8]) -> alloy_sol_types::Result { static DECODE_SHIMS: &[fn(&[u8]) -> alloy_sol_types::Result] = &[ { fn swap(data: &[u8]) -> alloy_sol_types::Result { @@ -836,48 +815,39 @@ function swap(address settlementContract, address[] memory tokens, address recei data: &[u8], ) -> alloy_sol_types::Result { ::abi_decode_raw( - data, - ) - .map(SolverCalls::ensureTradePreconditions) + data, + ) + .map(SolverCalls::ensureTradePreconditions) } ensureTradePreconditions }, { - fn storeBalance( - data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, - ) + fn storeBalance(data: &[u8]) -> alloy_sol_types::Result { + ::abi_decode_raw(data) .map(SolverCalls::storeBalance) } storeBalance }, ]; let Ok(idx) = Self::SELECTORS.binary_search(&selector) else { - return Err( - alloy_sol_types::Error::unknown_selector( - ::NAME, - selector, - ), - ); + 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] = &[ + static DECODE_VALIDATE_SHIMS: &[fn(&[u8]) -> alloy_sol_types::Result] = &[ { fn swap(data: &[u8]) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) + ::abi_decode_raw_validate(data) .map(SolverCalls::swap) } swap @@ -894,27 +864,24 @@ function swap(address settlementContract, address[] memory tokens, address recei ensureTradePreconditions }, { - fn storeBalance( - data: &[u8], - ) -> alloy_sol_types::Result { + fn storeBalance(data: &[u8]) -> alloy_sol_types::Result { ::abi_decode_raw_validate( - data, - ) - .map(SolverCalls::storeBalance) + data, + ) + .map(SolverCalls::storeBalance) } storeBalance }, ]; let Ok(idx) = Self::SELECTORS.binary_search(&selector) else { - return Err( - alloy_sol_types::Error::unknown_selector( - ::NAME, - selector, - ), - ); + return Err(alloy_sol_types::Error::unknown_selector( + ::NAME, + selector, + )); }; DECODE_VALIDATE_SHIMS[idx](data) } + #[inline] fn abi_encoded_size(&self) -> usize { match self { @@ -924,29 +891,24 @@ function swap(address settlementContract, address[] memory tokens, address recei ) } Self::storeBalance(inner) => { - ::abi_encoded_size( - inner, - ) + ::abi_encoded_size(inner) } Self::swap(inner) => { ::abi_encoded_size(inner) } } } + #[inline] fn abi_encode_raw(&self, out: &mut alloy_sol_types::private::Vec) { match self { Self::ensureTradePreconditions(inner) => { ::abi_encode_raw( - inner, - out, + inner, out, ) } Self::storeBalance(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } Self::swap(inner) => { ::abi_encode_raw(inner, out) @@ -954,10 +916,10 @@ function swap(address settlementContract, address[] memory tokens, address recei } } } - use alloy_contract as alloy_contract; + use alloy_contract; /**Creates a new wrapper around an on-chain [`Solver`](self) contract instance. -See the [wrapper's documentation](`SolverInstance`) for more details.*/ + See the [wrapper's documentation](`SolverInstance`) for more details.*/ #[inline] pub const fn new< P: alloy_contract::private::Provider, @@ -970,43 +932,40 @@ See the [wrapper's documentation](`SolverInstance`) for more details.*/ } /**Deploys this contract using the given `provider` and constructor arguments, if any. -Returns a new instance of the contract, if the deployment was successful. + 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.*/ + 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, - >( + pub fn deploy, N: alloy_contract::private::Network>( __provider: P, - ) -> impl ::core::future::Future< - Output = alloy_contract::Result>, - > { + ) -> impl ::core::future::Future>> { SolverInstance::::deploy(__provider) } /**Creates a `RawCallBuilder` for deploying this contract using the given `provider` -and constructor arguments, if any. + 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.*/ + 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) -> alloy_contract::RawCallBuilder { + >( + __provider: P, + ) -> alloy_contract::RawCallBuilder { SolverInstance::::deploy_builder(__provider) } /**A [`Solver`](self) instance. -Contains type-safe methods for interacting with an on-chain instance of the -[`Solver`](self) contract located at a given `address`, using a given -provider `P`. + Contains type-safe methods for interacting with an on-chain instance of the + [`Solver`](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. + 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.*/ + See the [module-level documentation](self) for all the available methods.*/ #[derive(Clone)] pub struct SolverInstance { address: alloy_sol_types::private::Address, @@ -1017,46 +976,44 @@ See the [module-level documentation](self) for all the available methods.*/ impl ::core::fmt::Debug for SolverInstance { #[inline] fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { - f.debug_tuple("SolverInstance").field(&self.address).finish() + f.debug_tuple("SolverInstance") + .field(&self.address) + .finish() } } /// Instantiation and getters/setters. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > SolverInstance { + impl, N: alloy_contract::private::Network> + SolverInstance + { /**Creates a new wrapper around an on-chain [`Solver`](self) contract instance. -See the [wrapper's documentation](`SolverInstance`) for more details.*/ + See the [wrapper's documentation](`SolverInstance`) for more details.*/ #[inline] - pub const fn new( - address: alloy_sol_types::private::Address, - __provider: P, - ) -> Self { + pub const fn new(address: alloy_sol_types::private::Address, __provider: P) -> Self { Self { address, provider: __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. + 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.*/ + For more fine-grained control over the deployment process, use [`deploy_builder`] instead.*/ #[inline] - pub async fn deploy( - __provider: P, - ) -> alloy_contract::Result> { + 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. + 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.*/ + 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( @@ -1064,21 +1021,25 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ ::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 { @@ -1086,7 +1047,8 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ } } impl SolverInstance<&P, N> { - /// Clones the provider and returns a new instance with the cloned provider. + /// Clones the provider and returns a new instance with the cloned + /// provider. #[inline] pub fn with_cloned_provider(self) -> SolverInstance { SolverInstance { @@ -1097,21 +1059,24 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ } } /// Function calls. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > SolverInstance { - /// Creates a new call builder using this contract instance's provider and address. + impl, N: alloy_contract::private::Network> + SolverInstance + { + /// 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. + /// 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 [`ensureTradePreconditions`] function. + + ///Creates a new call builder for the [`ensureTradePreconditions`] + /// function. pub fn ensureTradePreconditions( &self, trader: alloy_sol_types::private::Address, @@ -1121,17 +1086,16 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ nativeToken: alloy_sol_types::private::Address, spardose: alloy_sol_types::private::Address, ) -> alloy_contract::SolCallBuilder<&P, ensureTradePreconditionsCall, N> { - self.call_builder( - &ensureTradePreconditionsCall { - trader, - settlementContract, - sellToken, - sellAmount, - nativeToken, - spardose, - }, - ) + self.call_builder(&ensureTradePreconditionsCall { + trader, + settlementContract, + sellToken, + sellAmount, + nativeToken, + spardose, + }) } + ///Creates a new call builder for the [`storeBalance`] function. pub fn storeBalance( &self, @@ -1139,14 +1103,13 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ owner: alloy_sol_types::private::Address, countGas: bool, ) -> alloy_contract::SolCallBuilder<&P, storeBalanceCall, N> { - self.call_builder( - &storeBalanceCall { - token, - owner, - countGas, - }, - ) + self.call_builder(&storeBalanceCall { + token, + owner, + countGas, + }) } + ///Creates a new call builder for the [`swap`] function. pub fn swap( &self, @@ -1155,25 +1118,24 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ receiver: alloy_sol_types::private::Address, settlementCall: alloy_sol_types::private::Bytes, ) -> alloy_contract::SolCallBuilder<&P, swapCall, N> { - self.call_builder( - &swapCall { - settlementContract, - tokens, - receiver, - settlementCall, - }, - ) + self.call_builder(&swapCall { + settlementContract, + tokens, + receiver, + settlementCall, + }) } } /// Event filters. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > SolverInstance { - /// Creates a new event filter using this contract instance's provider and address. + impl, N: alloy_contract::private::Network> + SolverInstance + { + /// 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. + /// 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> { diff --git a/contracts/generated/contracts-generated/spardose/src/lib.rs b/contracts/generated/contracts-generated/spardose/src/lib.rs index f6fdf82b5e..70b893969a 100644 --- a/contracts/generated/contracts-generated/spardose/src/lib.rs +++ b/contracts/generated/contracts-generated/spardose/src/lib.rs @@ -1,4 +1,10 @@ -#![allow(unused_imports, unused_attributes, clippy::all, rustdoc::all, non_snake_case)] +#![allow( + unused_imports, + unused_attributes, + clippy::all, + rustdoc::all, + non_snake_case +)] //! Auto-generated contract bindings. Do not edit. /** @@ -40,8 +46,7 @@ interface Spardose { clippy::empty_structs_with_brackets )] pub mod Spardose { - use super::*; - use alloy_sol_types as alloy_sol_types; + use {super::*, alloy_sol_types}; /// The creation / init bytecode of the contract. /// /// ```text @@ -64,9 +69,9 @@ pub mod Spardose { ); #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `requestFunds(address,uint256)` and selector `0x494666b6`. -```solidity -function requestFunds(address token, uint256 amount) external; -```*/ + ```solidity + function requestFunds(address token, uint256 amount) external; + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct requestFundsCall { @@ -75,7 +80,8 @@ function requestFunds(address token, uint256 amount) external; #[allow(missing_docs)] pub amount: alloy_sol_types::private::primitives::aliases::U256, } - ///Container type for the return parameters of the [`requestFunds(address,uint256)`](requestFundsCall) function. + ///Container type for the return parameters of the + /// [`requestFunds(address,uint256)`](requestFundsCall) function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct requestFundsReturn {} @@ -86,7 +92,7 @@ function requestFunds(address token, uint256 amount) external; clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -101,9 +107,7 @@ function requestFunds(address token, uint256 amount) external; ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -136,9 +140,7 @@ function requestFunds(address token, uint256 amount) external; type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -161,9 +163,7 @@ function requestFunds(address token, uint256 amount) external; } } impl requestFundsReturn { - fn _tokenize( - &self, - ) -> ::ReturnToken<'_> { + fn _tokenize(&self) -> ::ReturnToken<'_> { () } } @@ -173,58 +173,55 @@ function requestFunds(address token, uint256 amount) external; 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 = requestFundsReturn; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "requestFunds(address,uint256)"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [73u8, 70u8, 102u8, 182u8]; + const SIGNATURE: &'static str = "requestFunds(address,uint256)"; + #[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), + as alloy_sol_types::SolType>::tokenize( + &self.amount, + ), ) } + #[inline] fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { requestFundsReturn::_tokenize(ret) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) + 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) + 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 [`Spardose`](self) function calls. #[derive(Clone)] - #[derive()] pub enum SpardoseCalls { #[allow(missing_docs)] requestFunds(requestFundsCall), @@ -232,19 +229,18 @@ function requestFunds(address token, uint256 amount) external; impl SpardoseCalls { /// 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. + /// 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]] = &[[73u8, 70u8, 102u8, 182u8]]; - /// The names of the variants in the same order as `SELECTORS`. - pub const VARIANT_NAMES: &'static [&'static str] = &[ - ::core::stringify!(requestFunds), - ]; /// The signatures in the same order as `SELECTORS`. - pub const SIGNATURES: &'static [&'static str] = &[ - ::SIGNATURE, - ]; + pub const SIGNATURES: &'static [&'static str] = + &[::SIGNATURE]; + /// The names of the variants in the same order as `SELECTORS`. + pub const VARIANT_NAMES: &'static [&'static str] = &[::core::stringify!(requestFunds)]; + /// Returns the signature for the given selector, if known. #[inline] pub fn signature_by_selector( @@ -257,124 +253,103 @@ function requestFunds(address token, uint256 amount) external; ::core::result::Result::Err(_) => ::core::option::Option::None, } } + /// Returns the enum variant name for the given selector, if known. #[inline] - pub fn name_by_selector( - selector: [u8; 4usize], - ) -> ::core::option::Option<&'static str> { + pub fn name_by_selector(selector: [u8; 4usize]) -> ::core::option::Option<&'static str> { let sig = Self::signature_by_selector(selector)?; sig.split_once('(').map(|(name, _)| name) } } #[automatically_derived] impl alloy_sol_types::SolInterface for SpardoseCalls { - const NAME: &'static str = "SpardoseCalls"; - const MIN_DATA_LENGTH: usize = 64usize; const COUNT: usize = 1usize; + const MIN_DATA_LENGTH: usize = 64usize; + const NAME: &'static str = "SpardoseCalls"; + #[inline] fn selector(&self) -> [u8; 4] { match self { - Self::requestFunds(_) => { - ::SELECTOR - } + Self::requestFunds(_) => ::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 requestFunds( - data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, - ) - .map(SpardoseCalls::requestFunds) - } - requestFunds - }, - ]; + fn abi_decode_raw(selector: [u8; 4], data: &[u8]) -> alloy_sol_types::Result { + static DECODE_SHIMS: &[fn(&[u8]) -> alloy_sol_types::Result] = &[{ + fn requestFunds(data: &[u8]) -> alloy_sol_types::Result { + ::abi_decode_raw(data) + .map(SpardoseCalls::requestFunds) + } + requestFunds + }]; let Ok(idx) = Self::SELECTORS.binary_search(&selector) else { - return Err( - alloy_sol_types::Error::unknown_selector( - ::NAME, - selector, - ), - ); + 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 requestFunds( - data: &[u8], - ) -> alloy_sol_types::Result { + static DECODE_VALIDATE_SHIMS: &[fn(&[u8]) -> alloy_sol_types::Result] = + &[{ + fn requestFunds(data: &[u8]) -> alloy_sol_types::Result { ::abi_decode_raw_validate( - data, - ) - .map(SpardoseCalls::requestFunds) + data, + ) + .map(SpardoseCalls::requestFunds) } requestFunds - }, - ]; + }]; let Ok(idx) = Self::SELECTORS.binary_search(&selector) else { - return Err( - alloy_sol_types::Error::unknown_selector( - ::NAME, - selector, - ), - ); + 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::requestFunds(inner) => { - ::abi_encoded_size( - inner, - ) + ::abi_encoded_size(inner) } } } + #[inline] fn abi_encode_raw(&self, out: &mut alloy_sol_types::private::Vec) { match self { Self::requestFunds(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } } } } - use alloy_contract as alloy_contract; + use alloy_contract; /**Creates a new wrapper around an on-chain [`Spardose`](self) contract instance. -See the [wrapper's documentation](`SpardoseInstance`) for more details.*/ + See the [wrapper's documentation](`SpardoseInstance`) for more details.*/ #[inline] pub const fn new< P: alloy_contract::private::Provider, @@ -387,43 +362,40 @@ See the [wrapper's documentation](`SpardoseInstance`) for more details.*/ } /**Deploys this contract using the given `provider` and constructor arguments, if any. -Returns a new instance of the contract, if the deployment was successful. + 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.*/ + 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, - >( + pub fn deploy, N: alloy_contract::private::Network>( __provider: P, - ) -> impl ::core::future::Future< - Output = alloy_contract::Result>, - > { + ) -> impl ::core::future::Future>> { SpardoseInstance::::deploy(__provider) } /**Creates a `RawCallBuilder` for deploying this contract using the given `provider` -and constructor arguments, if any. + 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.*/ + 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) -> alloy_contract::RawCallBuilder { + >( + __provider: P, + ) -> alloy_contract::RawCallBuilder { SpardoseInstance::::deploy_builder(__provider) } /**A [`Spardose`](self) instance. -Contains type-safe methods for interacting with an on-chain instance of the -[`Spardose`](self) contract located at a given `address`, using a given -provider `P`. + Contains type-safe methods for interacting with an on-chain instance of the + [`Spardose`](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. + 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.*/ + See the [module-level documentation](self) for all the available methods.*/ #[derive(Clone)] pub struct SpardoseInstance { address: alloy_sol_types::private::Address, @@ -434,46 +406,44 @@ See the [module-level documentation](self) for all the available methods.*/ impl ::core::fmt::Debug for SpardoseInstance { #[inline] fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { - f.debug_tuple("SpardoseInstance").field(&self.address).finish() + f.debug_tuple("SpardoseInstance") + .field(&self.address) + .finish() } } /// Instantiation and getters/setters. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > SpardoseInstance { + impl, N: alloy_contract::private::Network> + SpardoseInstance + { /**Creates a new wrapper around an on-chain [`Spardose`](self) contract instance. -See the [wrapper's documentation](`SpardoseInstance`) for more details.*/ + See the [wrapper's documentation](`SpardoseInstance`) for more details.*/ #[inline] - pub const fn new( - address: alloy_sol_types::private::Address, - __provider: P, - ) -> Self { + pub const fn new(address: alloy_sol_types::private::Address, __provider: P) -> Self { Self { address, provider: __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. + 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.*/ + For more fine-grained control over the deployment process, use [`deploy_builder`] instead.*/ #[inline] - pub async fn deploy( - __provider: P, - ) -> alloy_contract::Result> { + 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. + 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.*/ + 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( @@ -481,21 +451,25 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ ::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 { @@ -503,7 +477,8 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ } } impl SpardoseInstance<&P, N> { - /// Clones the provider and returns a new instance with the cloned provider. + /// Clones the provider and returns a new instance with the cloned + /// provider. #[inline] pub fn with_cloned_provider(self) -> SpardoseInstance { SpardoseInstance { @@ -514,20 +489,22 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ } } /// Function calls. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > SpardoseInstance { - /// Creates a new call builder using this contract instance's provider and address. + impl, N: alloy_contract::private::Network> + SpardoseInstance + { + /// 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. + /// 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 [`requestFunds`] function. pub fn requestFunds( &self, @@ -538,14 +515,15 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ } } /// Event filters. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > SpardoseInstance { - /// Creates a new event filter using this contract instance's provider and address. + impl, N: alloy_contract::private::Network> + SpardoseInstance + { + /// 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. + /// 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> { diff --git a/contracts/generated/contracts-generated/sushiswaprouter/src/lib.rs b/contracts/generated/contracts-generated/sushiswaprouter/src/lib.rs index 6d08e4442e..2bc72c6cbe 100644 --- a/contracts/generated/contracts-generated/sushiswaprouter/src/lib.rs +++ b/contracts/generated/contracts-generated/sushiswaprouter/src/lib.rs @@ -1,4 +1,10 @@ -#![allow(unused_imports, unused_attributes, clippy::all, rustdoc::all, non_snake_case)] +#![allow( + unused_imports, + unused_attributes, + clippy::all, + rustdoc::all, + non_snake_case +)] //! Auto-generated contract bindings. Do not edit. /** @@ -184,18 +190,18 @@ interface SushiSwapRouter { clippy::empty_structs_with_brackets )] pub mod SushiSwapRouter { - use super::*; - use alloy_sol_types as alloy_sol_types; + use {super::*, alloy_sol_types}; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `WETH()` and selector `0xad5c4648`. -```solidity -function WETH() external pure returns (address); -```*/ + ```solidity + function WETH() external pure returns (address); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct WETHCall; #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`WETH()`](WETHCall) function. + ///Container type for the return parameters of the [`WETH()`](WETHCall) + /// function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct WETHReturn { @@ -209,7 +215,7 @@ function WETH() external pure returns (address); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -218,9 +224,7 @@ function WETH() external pure returns (address); type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -250,9 +254,7 @@ function WETH() external pure returns (address); type UnderlyingRustTuple<'a> = (alloy_sol_types::private::Address,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -277,63 +279,58 @@ function WETH() external pure returns (address); #[automatically_derived] impl alloy_sol_types::SolCall for WETHCall { type Parameters<'a> = (); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = alloy_sol_types::private::Address; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (alloy_sol_types::sol_data::Address,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "WETH()"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [173u8, 92u8, 70u8, 72u8]; + const SIGNATURE: &'static str = "WETH()"; + #[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, - ), - ) + (::tokenize(ret),) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) - .map(|r| { + as alloy_sol_types::SolType>::abi_decode_sequence(data).map( + |r| { let r: WETHReturn = 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: WETHReturn = r.into(); - r._0 - }) + 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: WETHReturn = r.into(); + r._0 + }) } } }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `addLiquidity(address,address,uint256,uint256,uint256,uint256,address,uint256)` and selector `0xe8e33700`. -```solidity -function addLiquidity(address tokenA, address tokenB, uint256 amountADesired, uint256 amountBDesired, uint256 amountAMin, uint256 amountBMin, address to, uint256 deadline) external returns (uint256 amountA, uint256 amountB, uint256 liquidity); -```*/ + ```solidity + function addLiquidity(address tokenA, address tokenB, uint256 amountADesired, uint256 amountBDesired, uint256 amountAMin, uint256 amountBMin, address to, uint256 deadline) external returns (uint256 amountA, uint256 amountB, uint256 liquidity); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct addLiquidityCall { @@ -355,7 +352,9 @@ function addLiquidity(address tokenA, address tokenB, uint256 amountADesired, ui pub deadline: alloy_sol_types::private::primitives::aliases::U256, } #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`addLiquidity(address,address,uint256,uint256,uint256,uint256,address,uint256)`](addLiquidityCall) function. + ///Container type for the return parameters of the + /// [`addLiquidity(address,address,uint256,uint256,uint256,uint256,address, + /// uint256)`](addLiquidityCall) function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct addLiquidityReturn { @@ -373,7 +372,7 @@ function addLiquidity(address tokenA, address tokenB, uint256 amountADesired, ui clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -400,9 +399,7 @@ function addLiquidity(address tokenA, address tokenB, uint256 amountADesired, ui ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -458,9 +455,7 @@ function addLiquidity(address tokenA, address tokenB, uint256 amountADesired, ui ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -487,19 +482,17 @@ function addLiquidity(address tokenA, address tokenB, uint256 amountADesired, ui } } impl addLiquidityReturn { - fn _tokenize( - &self, - ) -> ::ReturnToken<'_> { + fn _tokenize(&self) -> ::ReturnToken<'_> { ( - as alloy_sol_types::SolType>::tokenize(&self.amountA), - as alloy_sol_types::SolType>::tokenize(&self.amountB), - as alloy_sol_types::SolType>::tokenize(&self.liquidity), + as alloy_sol_types::SolType>::tokenize( + &self.amountA, + ), + as alloy_sol_types::SolType>::tokenize( + &self.amountB, + ), + as alloy_sol_types::SolType>::tokenize( + &self.liquidity, + ), ) } } @@ -515,26 +508,26 @@ function addLiquidity(address tokenA, address tokenB, uint256 amountADesired, ui 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 = addLiquidityReturn; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = ( alloy_sol_types::sol_data::Uint<256>, alloy_sol_types::sol_data::Uint<256>, alloy_sol_types::sol_data::Uint<256>, ); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "addLiquidity(address,address,uint256,uint256,uint256,uint256,address,uint256)"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [232u8, 227u8, 55u8, 0u8]; + const SIGNATURE: &'static str = + "addLiquidity(address,address,uint256,uint256,uint256,uint256,address,uint256)"; + #[inline] fn new<'a>( tuple: as alloy_sol_types::SolType>::RustType, ) -> Self { tuple.into() } + #[inline] fn tokenize(&self) -> Self::Token<'_> { ( @@ -544,58 +537,58 @@ function addLiquidity(address tokenA, address tokenB, uint256 amountADesired, ui ::tokenize( &self.tokenB, ), - as alloy_sol_types::SolType>::tokenize(&self.amountADesired), - as alloy_sol_types::SolType>::tokenize(&self.amountBDesired), - as alloy_sol_types::SolType>::tokenize(&self.amountAMin), - as alloy_sol_types::SolType>::tokenize(&self.amountBMin), + as alloy_sol_types::SolType>::tokenize( + &self.amountADesired, + ), + as alloy_sol_types::SolType>::tokenize( + &self.amountBDesired, + ), + as alloy_sol_types::SolType>::tokenize( + &self.amountAMin, + ), + as alloy_sol_types::SolType>::tokenize( + &self.amountBMin, + ), ::tokenize( &self.to, ), - as alloy_sol_types::SolType>::tokenize(&self.deadline), + as alloy_sol_types::SolType>::tokenize( + &self.deadline, + ), ) } + #[inline] fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { addLiquidityReturn::_tokenize(ret) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) + 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) + 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(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `factory()` and selector `0xc45a0155`. -```solidity -function factory() external pure returns (address); -```*/ + ```solidity + function factory() external pure returns (address); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct factoryCall; #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`factory()`](factoryCall) function. + ///Container type for the return parameters of the + /// [`factory()`](factoryCall) function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct factoryReturn { @@ -609,7 +602,7 @@ function factory() external pure returns (address); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -618,9 +611,7 @@ function factory() external pure returns (address); type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -650,9 +641,7 @@ function factory() external pure returns (address); type UnderlyingRustTuple<'a> = (alloy_sol_types::private::Address,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -677,63 +666,58 @@ function factory() external pure returns (address); #[automatically_derived] impl alloy_sol_types::SolCall for factoryCall { type Parameters<'a> = (); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = alloy_sol_types::private::Address; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (alloy_sol_types::sol_data::Address,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "factory()"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [196u8, 90u8, 1u8, 85u8]; + const SIGNATURE: &'static str = "factory()"; + #[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, - ), - ) + (::tokenize(ret),) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) - .map(|r| { + as alloy_sol_types::SolType>::abi_decode_sequence(data).map( + |r| { let r: factoryReturn = 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: factoryReturn = r.into(); - r._0 - }) + 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: factoryReturn = r.into(); + r._0 + }) } } }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `quote(uint256,uint256,uint256)` and selector `0xad615dec`. -```solidity -function quote(uint256 amountA, uint256 reserveA, uint256 reserveB) external pure returns (uint256 amountB); -```*/ + ```solidity + function quote(uint256 amountA, uint256 reserveA, uint256 reserveB) external pure returns (uint256 amountB); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct quoteCall { @@ -745,7 +729,8 @@ function quote(uint256 amountA, uint256 reserveA, uint256 reserveB) external pur pub reserveB: alloy_sol_types::private::primitives::aliases::U256, } #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`quote(uint256,uint256,uint256)`](quoteCall) function. + ///Container type for the return parameters of the + /// [`quote(uint256,uint256,uint256)`](quoteCall) function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct quoteReturn { @@ -759,7 +744,7 @@ function quote(uint256 amountA, uint256 reserveA, uint256 reserveB) external pur clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -776,9 +761,7 @@ function quote(uint256 amountA, uint256 reserveA, uint256 reserveB) external pur ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -809,14 +792,10 @@ function quote(uint256 amountA, uint256 reserveA, uint256 reserveB) external pur #[allow(dead_code)] type UnderlyingSolTuple<'a> = (alloy_sol_types::sol_data::Uint<256>,); #[doc(hidden)] - type UnderlyingRustTuple<'a> = ( - alloy_sol_types::private::primitives::aliases::U256, - ); + 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, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -845,73 +824,72 @@ function quote(uint256 amountA, uint256 reserveA, uint256 reserveB) external pur 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 = alloy_sol_types::private::primitives::aliases::U256; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (alloy_sol_types::sol_data::Uint<256>,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "quote(uint256,uint256,uint256)"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [173u8, 97u8, 93u8, 236u8]; + const SIGNATURE: &'static str = "quote(uint256,uint256,uint256)"; + #[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.amountA), - as alloy_sol_types::SolType>::tokenize(&self.reserveA), - as alloy_sol_types::SolType>::tokenize(&self.reserveB), + as alloy_sol_types::SolType>::tokenize( + &self.amountA, + ), + as alloy_sol_types::SolType>::tokenize( + &self.reserveA, + ), + as alloy_sol_types::SolType>::tokenize( + &self.reserveB, + ), ) } + #[inline] fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { ( - as alloy_sol_types::SolType>::tokenize(ret), + 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| { + as alloy_sol_types::SolType>::abi_decode_sequence(data).map( + |r| { let r: quoteReturn = r.into(); r.amountB - }) + }, + ) } + #[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: quoteReturn = r.into(); - r.amountB - }) + 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: quoteReturn = r.into(); + r.amountB + }) } } }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `swapTokensForExactTokens(uint256,uint256,address[],address,uint256)` and selector `0x8803dbee`. -```solidity -function swapTokensForExactTokens(uint256 amountOut, uint256 amountInMax, address[] memory path, address to, uint256 deadline) external returns (uint256[] memory amounts); -```*/ + ```solidity + function swapTokensForExactTokens(uint256 amountOut, uint256 amountInMax, address[] memory path, address to, uint256 deadline) external returns (uint256[] memory amounts); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct swapTokensForExactTokensCall { @@ -927,14 +905,15 @@ function swapTokensForExactTokens(uint256 amountOut, uint256 amountInMax, addres pub deadline: alloy_sol_types::private::primitives::aliases::U256, } #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`swapTokensForExactTokens(uint256,uint256,address[],address,uint256)`](swapTokensForExactTokensCall) function. + ///Container type for the return parameters of the + /// [`swapTokensForExactTokens(uint256,uint256,address[],address, + /// uint256)`](swapTokensForExactTokensCall) function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct swapTokensForExactTokensReturn { #[allow(missing_docs)] - pub amounts: alloy_sol_types::private::Vec< - alloy_sol_types::private::primitives::aliases::U256, - >, + pub amounts: + alloy_sol_types::private::Vec, } #[allow( non_camel_case_types, @@ -943,7 +922,7 @@ function swapTokensForExactTokens(uint256 amountOut, uint256 amountInMax, addres clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -964,9 +943,7 @@ function swapTokensForExactTokens(uint256 amountOut, uint256 amountInMax, addres ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -975,8 +952,7 @@ function swapTokensForExactTokens(uint256 amountOut, uint256 amountInMax, addres } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From - for UnderlyingRustTuple<'_> { + impl ::core::convert::From for UnderlyingRustTuple<'_> { fn from(value: swapTokensForExactTokensCall) -> Self { ( value.amountOut, @@ -989,8 +965,7 @@ function swapTokensForExactTokens(uint256 amountOut, uint256 amountInMax, addres } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From> - for swapTokensForExactTokensCall { + impl ::core::convert::From> for swapTokensForExactTokensCall { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { Self { amountOut: tuple.0, @@ -1005,20 +980,15 @@ function swapTokensForExactTokens(uint256 amountOut, uint256 amountInMax, addres { #[doc(hidden)] #[allow(dead_code)] - type UnderlyingSolTuple<'a> = ( - alloy_sol_types::sol_data::Array>, - ); + type UnderlyingSolTuple<'a> = + (alloy_sol_types::sol_data::Array>,); #[doc(hidden)] type UnderlyingRustTuple<'a> = ( - alloy_sol_types::private::Vec< - alloy_sol_types::private::primitives::aliases::U256, - >, + alloy_sol_types::private::Vec, ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1027,16 +997,14 @@ function swapTokensForExactTokens(uint256 amountOut, uint256 amountInMax, addres } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From - for UnderlyingRustTuple<'_> { + impl ::core::convert::From for UnderlyingRustTuple<'_> { fn from(value: swapTokensForExactTokensReturn) -> Self { (value.amounts,) } } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From> - for swapTokensForExactTokensReturn { + impl ::core::convert::From> for swapTokensForExactTokensReturn { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { Self { amounts: tuple.0 } } @@ -1051,26 +1019,24 @@ function swapTokensForExactTokens(uint256 amountOut, uint256 amountInMax, addres 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 = alloy_sol_types::private::Vec< - alloy_sol_types::private::primitives::aliases::U256, - >; - type ReturnTuple<'a> = ( - alloy_sol_types::sol_data::Array>, - ); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "swapTokensForExactTokens(uint256,uint256,address[],address,uint256)"; + type Return = + alloy_sol_types::private::Vec; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + type ReturnTuple<'a> = + (alloy_sol_types::sol_data::Array>,); + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [136u8, 3u8, 219u8, 238u8]; + const SIGNATURE: &'static str = + "swapTokensForExactTokens(uint256,uint256,address[],address,uint256)"; + #[inline] fn new<'a>( tuple: as alloy_sol_types::SolType>::RustType, ) -> Self { tuple.into() } + #[inline] fn tokenize(&self) -> Self::Token<'_> { ( @@ -1091,41 +1057,38 @@ function swapTokensForExactTokens(uint256 amountOut, uint256 amountInMax, addres > as alloy_sol_types::SolType>::tokenize(&self.deadline), ) } + #[inline] fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { - ( - , - > as alloy_sol_types::SolType>::tokenize(ret), - ) + (, + > 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| { + as alloy_sol_types::SolType>::abi_decode_sequence(data).map( + |r| { let r: swapTokensForExactTokensReturn = r.into(); r.amounts - }) + }, + ) } + #[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: swapTokensForExactTokensReturn = r.into(); - r.amounts - }) + 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: swapTokensForExactTokensReturn = r.into(); + r.amounts + }) } } }; ///Container for all the [`SushiSwapRouter`](self) function calls. #[derive(Clone)] - #[derive()] pub enum SushiSwapRouterCalls { #[allow(missing_docs)] WETH(WETHCall), @@ -1141,8 +1104,9 @@ function swapTokensForExactTokens(uint256 amountOut, uint256 amountInMax, addres impl SushiSwapRouterCalls { /// 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. + /// 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]] = &[ @@ -1152,14 +1116,6 @@ function swapTokensForExactTokens(uint256 amountOut, uint256 amountInMax, addres [196u8, 90u8, 1u8, 85u8], [232u8, 227u8, 55u8, 0u8], ]; - /// The names of the variants in the same order as `SELECTORS`. - pub const VARIANT_NAMES: &'static [&'static str] = &[ - ::core::stringify!(swapTokensForExactTokens), - ::core::stringify!(WETH), - ::core::stringify!(quote), - ::core::stringify!(factory), - ::core::stringify!(addLiquidity), - ]; /// The signatures in the same order as `SELECTORS`. pub const SIGNATURES: &'static [&'static str] = &[ ::SIGNATURE, @@ -1168,6 +1124,15 @@ function swapTokensForExactTokens(uint256 amountOut, uint256 amountInMax, addres ::SIGNATURE, ::SIGNATURE, ]; + /// The names of the variants in the same order as `SELECTORS`. + pub const VARIANT_NAMES: &'static [&'static str] = &[ + ::core::stringify!(swapTokensForExactTokens), + ::core::stringify!(WETH), + ::core::stringify!(quote), + ::core::stringify!(factory), + ::core::stringify!(addLiquidity), + ]; + /// Returns the signature for the given selector, if known. #[inline] pub fn signature_by_selector( @@ -1180,27 +1145,25 @@ function swapTokensForExactTokens(uint256 amountOut, uint256 amountInMax, addres ::core::result::Result::Err(_) => ::core::option::Option::None, } } + /// Returns the enum variant name for the given selector, if known. #[inline] - pub fn name_by_selector( - selector: [u8; 4usize], - ) -> ::core::option::Option<&'static str> { + pub fn name_by_selector(selector: [u8; 4usize]) -> ::core::option::Option<&'static str> { let sig = Self::signature_by_selector(selector)?; sig.split_once('(').map(|(name, _)| name) } } #[automatically_derived] impl alloy_sol_types::SolInterface for SushiSwapRouterCalls { - const NAME: &'static str = "SushiSwapRouterCalls"; - const MIN_DATA_LENGTH: usize = 0usize; const COUNT: usize = 5usize; + const MIN_DATA_LENGTH: usize = 0usize; + const NAME: &'static str = "SushiSwapRouterCalls"; + #[inline] fn selector(&self) -> [u8; 4] { match self { Self::WETH(_) => ::SELECTOR, - Self::addLiquidity(_) => { - ::SELECTOR - } + Self::addLiquidity(_) => ::SELECTOR, Self::factory(_) => ::SELECTOR, Self::quote(_) => ::SELECTOR, Self::swapTokensForExactTokens(_) => { @@ -1208,83 +1171,70 @@ function swapTokensForExactTokens(uint256 amountOut, uint256 amountInMax, addres } } } + #[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 abi_decode_raw(selector: [u8; 4], data: &[u8]) -> alloy_sol_types::Result { + static DECODE_SHIMS: &[fn(&[u8]) -> alloy_sol_types::Result] = &[ { fn swapTokensForExactTokens( data: &[u8], ) -> alloy_sol_types::Result { ::abi_decode_raw( - data, - ) - .map(SushiSwapRouterCalls::swapTokensForExactTokens) + data, + ) + .map(SushiSwapRouterCalls::swapTokensForExactTokens) } swapTokensForExactTokens }, { - fn WETH( - data: &[u8], - ) -> alloy_sol_types::Result { + fn WETH(data: &[u8]) -> alloy_sol_types::Result { ::abi_decode_raw(data) .map(SushiSwapRouterCalls::WETH) } WETH }, { - fn quote( - data: &[u8], - ) -> alloy_sol_types::Result { + fn quote(data: &[u8]) -> alloy_sol_types::Result { ::abi_decode_raw(data) .map(SushiSwapRouterCalls::quote) } quote }, { - fn factory( - data: &[u8], - ) -> alloy_sol_types::Result { + fn factory(data: &[u8]) -> alloy_sol_types::Result { ::abi_decode_raw(data) .map(SushiSwapRouterCalls::factory) } factory }, { - fn addLiquidity( - data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, - ) + fn addLiquidity(data: &[u8]) -> alloy_sol_types::Result { + ::abi_decode_raw(data) .map(SushiSwapRouterCalls::addLiquidity) } addLiquidity }, ]; let Ok(idx) = Self::SELECTORS.binary_search(&selector) else { - return Err( - alloy_sol_types::Error::unknown_selector( - ::NAME, - selector, - ), - ); + return Err(alloy_sol_types::Error::unknown_selector( + ::NAME, + selector, + )); }; DECODE_SHIMS[idx](data) } + #[inline] #[allow(non_snake_case)] fn abi_decode_raw_validate( @@ -1293,7 +1243,8 @@ function swapTokensForExactTokens(uint256 amountOut, uint256 amountInMax, addres ) -> alloy_sol_types::Result { static DECODE_VALIDATE_SHIMS: &[fn( &[u8], - ) -> alloy_sol_types::Result] = &[ + ) + -> alloy_sol_types::Result] = &[ { fn swapTokensForExactTokens( data: &[u8], @@ -1306,60 +1257,45 @@ function swapTokensForExactTokens(uint256 amountOut, uint256 amountInMax, addres swapTokensForExactTokens }, { - fn WETH( - data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) + fn WETH(data: &[u8]) -> alloy_sol_types::Result { + ::abi_decode_raw_validate(data) .map(SushiSwapRouterCalls::WETH) } WETH }, { - fn quote( - data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) + fn quote(data: &[u8]) -> alloy_sol_types::Result { + ::abi_decode_raw_validate(data) .map(SushiSwapRouterCalls::quote) } quote }, { - fn factory( - data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) + fn factory(data: &[u8]) -> alloy_sol_types::Result { + ::abi_decode_raw_validate(data) .map(SushiSwapRouterCalls::factory) } factory }, { - fn addLiquidity( - data: &[u8], - ) -> alloy_sol_types::Result { + fn addLiquidity(data: &[u8]) -> alloy_sol_types::Result { ::abi_decode_raw_validate( - data, - ) - .map(SushiSwapRouterCalls::addLiquidity) + data, + ) + .map(SushiSwapRouterCalls::addLiquidity) } addLiquidity }, ]; let Ok(idx) = Self::SELECTORS.binary_search(&selector) else { - return Err( - alloy_sol_types::Error::unknown_selector( - ::NAME, - selector, - ), - ); + return Err(alloy_sol_types::Error::unknown_selector( + ::NAME, + selector, + )); }; DECODE_VALIDATE_SHIMS[idx](data) } + #[inline] fn abi_encoded_size(&self) -> usize { match self { @@ -1367,9 +1303,7 @@ function swapTokensForExactTokens(uint256 amountOut, uint256 amountInMax, addres ::abi_encoded_size(inner) } Self::addLiquidity(inner) => { - ::abi_encoded_size( - inner, - ) + ::abi_encoded_size(inner) } Self::factory(inner) => { ::abi_encoded_size(inner) @@ -1384,6 +1318,7 @@ function swapTokensForExactTokens(uint256 amountOut, uint256 amountInMax, addres } } } + #[inline] fn abi_encode_raw(&self, out: &mut alloy_sol_types::private::Vec) { match self { @@ -1391,10 +1326,7 @@ function swapTokensForExactTokens(uint256 amountOut, uint256 amountInMax, addres ::abi_encode_raw(inner, out) } Self::addLiquidity(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } Self::factory(inner) => { ::abi_encode_raw(inner, out) @@ -1404,17 +1336,16 @@ function swapTokensForExactTokens(uint256 amountOut, uint256 amountInMax, addres } Self::swapTokensForExactTokens(inner) => { ::abi_encode_raw( - inner, - out, + inner, out, ) } } } } - use alloy_contract as alloy_contract; + use alloy_contract; /**Creates a new wrapper around an on-chain [`SushiSwapRouter`](self) contract instance. -See the [wrapper's documentation](`SushiSwapRouterInstance`) for more details.*/ + See the [wrapper's documentation](`SushiSwapRouterInstance`) for more details.*/ #[inline] pub const fn new< P: alloy_contract::private::Provider, @@ -1427,15 +1358,15 @@ See the [wrapper's documentation](`SushiSwapRouterInstance`) for more details.*/ } /**A [`SushiSwapRouter`](self) instance. -Contains type-safe methods for interacting with an on-chain instance of the -[`SushiSwapRouter`](self) contract located at a given `address`, using a given -provider `P`. + Contains type-safe methods for interacting with an on-chain instance of the + [`SushiSwapRouter`](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. + 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.*/ + See the [module-level documentation](self) for all the available methods.*/ #[derive(Clone)] pub struct SushiSwapRouterInstance { address: alloy_sol_types::private::Address, @@ -1446,43 +1377,45 @@ See the [module-level documentation](self) for all the available methods.*/ impl ::core::fmt::Debug for SushiSwapRouterInstance { #[inline] fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { - f.debug_tuple("SushiSwapRouterInstance").field(&self.address).finish() + f.debug_tuple("SushiSwapRouterInstance") + .field(&self.address) + .finish() } } /// Instantiation and getters/setters. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > SushiSwapRouterInstance { + impl, N: alloy_contract::private::Network> + SushiSwapRouterInstance + { /**Creates a new wrapper around an on-chain [`SushiSwapRouter`](self) contract instance. -See the [wrapper's documentation](`SushiSwapRouterInstance`) for more details.*/ + See the [wrapper's documentation](`SushiSwapRouterInstance`) for more details.*/ #[inline] - pub const fn new( - address: alloy_sol_types::private::Address, - __provider: P, - ) -> Self { + pub const fn new(address: alloy_sol_types::private::Address, __provider: P) -> Self { Self { address, provider: __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 { @@ -1490,7 +1423,8 @@ See the [wrapper's documentation](`SushiSwapRouterInstance`) for more details.*/ } } impl SushiSwapRouterInstance<&P, N> { - /// Clones the provider and returns a new instance with the cloned provider. + /// Clones the provider and returns a new instance with the cloned + /// provider. #[inline] pub fn with_cloned_provider(self) -> SushiSwapRouterInstance { SushiSwapRouterInstance { @@ -1501,24 +1435,27 @@ See the [wrapper's documentation](`SushiSwapRouterInstance`) for more details.*/ } } /// Function calls. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > SushiSwapRouterInstance { - /// Creates a new call builder using this contract instance's provider and address. + impl, N: alloy_contract::private::Network> + SushiSwapRouterInstance + { + /// 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. + /// 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 [`WETH`] function. pub fn WETH(&self) -> alloy_contract::SolCallBuilder<&P, WETHCall, N> { self.call_builder(&WETHCall) } + ///Creates a new call builder for the [`addLiquidity`] function. pub fn addLiquidity( &self, @@ -1531,23 +1468,23 @@ See the [wrapper's documentation](`SushiSwapRouterInstance`) for more details.*/ to: alloy_sol_types::private::Address, deadline: alloy_sol_types::private::primitives::aliases::U256, ) -> alloy_contract::SolCallBuilder<&P, addLiquidityCall, N> { - self.call_builder( - &addLiquidityCall { - tokenA, - tokenB, - amountADesired, - amountBDesired, - amountAMin, - amountBMin, - to, - deadline, - }, - ) + self.call_builder(&addLiquidityCall { + tokenA, + tokenB, + amountADesired, + amountBDesired, + amountAMin, + amountBMin, + to, + deadline, + }) } + ///Creates a new call builder for the [`factory`] function. pub fn factory(&self) -> alloy_contract::SolCallBuilder<&P, factoryCall, N> { self.call_builder(&factoryCall) } + ///Creates a new call builder for the [`quote`] function. pub fn quote( &self, @@ -1555,15 +1492,15 @@ See the [wrapper's documentation](`SushiSwapRouterInstance`) for more details.*/ reserveA: alloy_sol_types::private::primitives::aliases::U256, reserveB: alloy_sol_types::private::primitives::aliases::U256, ) -> alloy_contract::SolCallBuilder<&P, quoteCall, N> { - self.call_builder( - "eCall { - amountA, - reserveA, - reserveB, - }, - ) + self.call_builder("eCall { + amountA, + reserveA, + reserveB, + }) } - ///Creates a new call builder for the [`swapTokensForExactTokens`] function. + + ///Creates a new call builder for the [`swapTokensForExactTokens`] + /// function. pub fn swapTokensForExactTokens( &self, amountOut: alloy_sol_types::private::primitives::aliases::U256, @@ -1572,26 +1509,25 @@ See the [wrapper's documentation](`SushiSwapRouterInstance`) for more details.*/ to: alloy_sol_types::private::Address, deadline: alloy_sol_types::private::primitives::aliases::U256, ) -> alloy_contract::SolCallBuilder<&P, swapTokensForExactTokensCall, N> { - self.call_builder( - &swapTokensForExactTokensCall { - amountOut, - amountInMax, - path, - to, - deadline, - }, - ) + self.call_builder(&swapTokensForExactTokensCall { + amountOut, + amountInMax, + path, + to, + deadline, + }) } } /// Event filters. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > SushiSwapRouterInstance { - /// Creates a new event filter using this contract instance's provider and address. + impl, N: alloy_contract::private::Network> + SushiSwapRouterInstance + { + /// 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. + /// 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> { @@ -1599,81 +1535,47 @@ See the [wrapper's documentation](`SushiSwapRouterInstance`) for more details.*/ } } } -pub type Instance = SushiSwapRouter::SushiSwapRouterInstance< - ::alloy_provider::DynProvider, ->; +pub type Instance = SushiSwapRouter::SushiSwapRouterInstance<::alloy_provider::DynProvider>; use { - std::{sync::LazyLock, collections::HashMap}, - anyhow::{Result, Context}, - alloy_primitives::{address, Address}, - alloy_provider::{Provider, DynProvider}, + alloy_primitives::{Address, address}, + alloy_provider::{DynProvider, Provider}, + anyhow::{Context, Result}, + std::{collections::HashMap, sync::LazyLock}, }; pub const fn deployment_info(chain_id: u64) -> Option<(Address, Option)> { match chain_id { - 1u64 => { - Some(( - ::alloy_primitives::address!( - "0xd9e1ce17f2641f24ae83637ab66a2cca9c378b9f" - ), - None, - )) - } - 10u64 => { - Some(( - ::alloy_primitives::address!( - "0x2abf469074dc0b54d793850807e6eb5faf2625b1" - ), - None, - )) - } - 56u64 => { - Some(( - ::alloy_primitives::address!( - "0x1b02da8cb0d097eb8d57a175b88c7d8b47997506" - ), - None, - )) - } - 100u64 => { - Some(( - ::alloy_primitives::address!( - "0x1b02da8cb0d097eb8d57a175b88c7d8b47997506" - ), - None, - )) - } - 137u64 => { - Some(( - ::alloy_primitives::address!( - "0x1b02da8cb0d097eb8d57a175b88c7d8b47997506" - ), - None, - )) - } - 8453u64 => { - Some(( - ::alloy_primitives::address!( - "0x6bded42c6da8fbf0d2ba55b2fa120c5e0c8d7891" - ), - None, - )) - } - 42161u64 => { - Some(( - ::alloy_primitives::address!( - "0x1b02da8cb0d097eb8d57a175b88c7d8b47997506" - ), - None, - )) - } - 43114u64 => { - Some(( - ::alloy_primitives::address!( - "0x1b02da8cb0d097eb8d57a175b88c7d8b47997506" - ), - None, - )) - } + 1u64 => Some(( + ::alloy_primitives::address!("0xd9e1ce17f2641f24ae83637ab66a2cca9c378b9f"), + None, + )), + 10u64 => Some(( + ::alloy_primitives::address!("0x2abf469074dc0b54d793850807e6eb5faf2625b1"), + None, + )), + 56u64 => Some(( + ::alloy_primitives::address!("0x1b02da8cb0d097eb8d57a175b88c7d8b47997506"), + None, + )), + 100u64 => Some(( + ::alloy_primitives::address!("0x1b02da8cb0d097eb8d57a175b88c7d8b47997506"), + None, + )), + 137u64 => Some(( + ::alloy_primitives::address!("0x1b02da8cb0d097eb8d57a175b88c7d8b47997506"), + None, + )), + 8453u64 => Some(( + ::alloy_primitives::address!("0x6bded42c6da8fbf0d2ba55b2fa120c5e0c8d7891"), + None, + )), + 42161u64 => Some(( + ::alloy_primitives::address!("0x1b02da8cb0d097eb8d57a175b88c7d8b47997506"), + None, + )), + 43114u64 => Some(( + ::alloy_primitives::address!("0x1b02da8cb0d097eb8d57a175b88c7d8b47997506"), + None, + )), _ => None, } } @@ -1690,9 +1592,7 @@ pub const fn deployment_block(chain_id: &u64) -> Option { } } impl Instance { - pub fn deployed( - provider: &DynProvider, - ) -> impl Future> + Send { + pub fn deployed(provider: &DynProvider) -> impl Future> + Send { async move { let chain_id = provider .get_chain_id() diff --git a/contracts/generated/contracts-generated/swapper/src/lib.rs b/contracts/generated/contracts-generated/swapper/src/lib.rs index dc67898494..570e7ff6e7 100644 --- a/contracts/generated/contracts-generated/swapper/src/lib.rs +++ b/contracts/generated/contracts-generated/swapper/src/lib.rs @@ -1,4 +1,10 @@ -#![allow(unused_imports, unused_attributes, clippy::all, rustdoc::all, non_snake_case)] +#![allow( + unused_imports, + unused_attributes, + clippy::all, + rustdoc::all, + non_snake_case +)] //! Auto-generated contract bindings. Do not edit. /** @@ -153,8 +159,7 @@ interface Swapper { clippy::empty_structs_with_brackets )] pub mod Swapper { - use super::*; - use alloy_sol_types as alloy_sol_types; + use {super::*, alloy_sol_types}; /// The creation / init bytecode of the contract. /// /// ```text @@ -177,8 +182,8 @@ pub mod Swapper { ); #[derive(Default, Debug, PartialEq, Eq, Hash)] /**```solidity -struct Allowance { address spender; uint256 amount; } -```*/ + struct Allowance { address spender; uint256 amount; } + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct Allowance { @@ -194,7 +199,7 @@ struct Allowance { address spender; uint256 amount; } clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[doc(hidden)] #[allow(dead_code)] type UnderlyingSolTuple<'a> = ( @@ -208,9 +213,7 @@ struct Allowance { address spender; uint256 amount; } ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -246,96 +249,91 @@ struct Allowance { address spender; uint256 amount; } ::tokenize( &self.spender, ), - as alloy_sol_types::SolType>::tokenize(&self.amount), + as alloy_sol_types::SolType>::tokenize( + &self.amount, + ), ) } + #[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) + 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) + 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) + 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 Allowance { type RustType = Self; - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + + const ENCODED_SIZE: Option = + as alloy_sol_types::SolType>::ENCODED_SIZE; + const PACKED_ENCODED_SIZE: Option = + as alloy_sol_types::SolType>::PACKED_ENCODED_SIZE; 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); + let tuple = as alloy_sol_types::SolType>::detokenize(token); >>::from(tuple) } } #[automatically_derived] impl alloy_sol_types::SolStruct for Allowance { const NAME: &'static str = "Allowance"; + #[inline] fn eip712_root_type() -> alloy_sol_types::private::Cow<'static, str> { - alloy_sol_types::private::Cow::Borrowed( - "Allowance(address spender,uint256 amount)", - ) + alloy_sol_types::private::Cow::Borrowed("Allowance(address spender,uint256 amount)") } + #[inline] - fn eip712_components() -> alloy_sol_types::private::Vec< - alloy_sol_types::private::Cow<'static, str>, - > { + fn eip712_components() + -> alloy_sol_types::private::Vec> + { 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 { [ @@ -365,14 +363,13 @@ struct Allowance { address spender; uint256 amount; } &rust.amount, ) } + #[inline] fn encode_topic_preimage( rust: &Self::RustType, out: &mut alloy_sol_types::private::Vec, ) { - out.reserve( - ::topic_preimage_length(rust), - ); + out.reserve(::topic_preimage_length(rust)); ::encode_topic_preimage( &rust.spender, out, @@ -384,25 +381,19 @@ struct Allowance { address spender; uint256 amount; } out, ); } + #[inline] - fn encode_topic( - rust: &Self::RustType, - ) -> alloy_sol_types::abi::token::WordToken { + 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), - ) + ::encode_topic_preimage(rust, &mut out); + alloy_sol_types::abi::token::WordToken(alloy_sol_types::private::keccak256(out)) } } }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**```solidity -struct Asset { address token; uint256 amount; } -```*/ + struct Asset { address token; uint256 amount; } + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct Asset { @@ -418,7 +409,7 @@ struct Asset { address token; uint256 amount; } clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[doc(hidden)] #[allow(dead_code)] type UnderlyingSolTuple<'a> = ( @@ -432,9 +423,7 @@ struct Asset { address token; uint256 amount; } ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -470,96 +459,91 @@ struct Asset { address token; uint256 amount; } ::tokenize( &self.token, ), - as alloy_sol_types::SolType>::tokenize(&self.amount), + as alloy_sol_types::SolType>::tokenize( + &self.amount, + ), ) } + #[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) + 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) + 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) + 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 Asset { type RustType = Self; - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + + const ENCODED_SIZE: Option = + as alloy_sol_types::SolType>::ENCODED_SIZE; + const PACKED_ENCODED_SIZE: Option = + as alloy_sol_types::SolType>::PACKED_ENCODED_SIZE; 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); + let tuple = as alloy_sol_types::SolType>::detokenize(token); >>::from(tuple) } } #[automatically_derived] impl alloy_sol_types::SolStruct for Asset { const NAME: &'static str = "Asset"; + #[inline] fn eip712_root_type() -> alloy_sol_types::private::Cow<'static, str> { - alloy_sol_types::private::Cow::Borrowed( - "Asset(address token,uint256 amount)", - ) + alloy_sol_types::private::Cow::Borrowed("Asset(address token,uint256 amount)") } + #[inline] - fn eip712_components() -> alloy_sol_types::private::Vec< - alloy_sol_types::private::Cow<'static, str>, - > { + fn eip712_components() + -> alloy_sol_types::private::Vec> + { 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 { [ @@ -589,14 +573,13 @@ struct Asset { address token; uint256 amount; } &rust.amount, ) } + #[inline] fn encode_topic_preimage( rust: &Self::RustType, out: &mut alloy_sol_types::private::Vec, ) { - out.reserve( - ::topic_preimage_length(rust), - ); + out.reserve(::topic_preimage_length(rust)); ::encode_topic_preimage( &rust.token, out, @@ -608,25 +591,19 @@ struct Asset { address token; uint256 amount; } out, ); } + #[inline] - fn encode_topic( - rust: &Self::RustType, - ) -> alloy_sol_types::abi::token::WordToken { + 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), - ) + ::encode_topic_preimage(rust, &mut out); + alloy_sol_types::abi::token::WordToken(alloy_sol_types::private::keccak256(out)) } } }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**```solidity -struct Interaction { address target; uint256 value; bytes callData; } -```*/ + struct Interaction { address target; uint256 value; bytes callData; } + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct Interaction { @@ -644,7 +621,7 @@ struct Interaction { address target; uint256 value; bytes callData; } clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[doc(hidden)] #[allow(dead_code)] type UnderlyingSolTuple<'a> = ( @@ -660,9 +637,7 @@ struct Interaction { address target; uint256 value; bytes callData; } ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -699,99 +674,96 @@ struct Interaction { address target; uint256 value; bytes callData; } ::tokenize( &self.target, ), - as alloy_sol_types::SolType>::tokenize(&self.value), + as alloy_sol_types::SolType>::tokenize( + &self.value, + ), ::tokenize( &self.callData, ), ) } + #[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) + 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) + 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) + 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 Interaction { type RustType = Self; - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + + const ENCODED_SIZE: Option = + as alloy_sol_types::SolType>::ENCODED_SIZE; + const PACKED_ENCODED_SIZE: Option = + as alloy_sol_types::SolType>::PACKED_ENCODED_SIZE; 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); + let tuple = as alloy_sol_types::SolType>::detokenize(token); >>::from(tuple) } } #[automatically_derived] impl alloy_sol_types::SolStruct for Interaction { const NAME: &'static str = "Interaction"; + #[inline] fn eip712_root_type() -> alloy_sol_types::private::Cow<'static, str> { alloy_sol_types::private::Cow::Borrowed( "Interaction(address target,uint256 value,bytes callData)", ) } + #[inline] - fn eip712_components() -> alloy_sol_types::private::Vec< - alloy_sol_types::private::Cow<'static, str>, - > { + fn eip712_components() + -> alloy_sol_types::private::Vec> + { 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 { [ @@ -826,14 +798,13 @@ struct Interaction { address target; uint256 value; bytes callData; } &rust.callData, ) } + #[inline] fn encode_topic_preimage( rust: &Self::RustType, out: &mut alloy_sol_types::private::Vec, ) { - out.reserve( - ::topic_preimage_length(rust), - ); + out.reserve(::topic_preimage_length(rust)); ::encode_topic_preimage( &rust.target, out, @@ -849,26 +820,20 @@ struct Interaction { address target; uint256 value; bytes callData; } out, ); } + #[inline] - fn encode_topic( - rust: &Self::RustType, - ) -> alloy_sol_types::abi::token::WordToken { + 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), - ) + ::encode_topic_preimage(rust, &mut out); + alloy_sol_types::abi::token::WordToken(alloy_sol_types::private::keccak256(out)) } } }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `isValidSignature(bytes32,bytes)` and selector `0x1626ba7e`. -```solidity -function isValidSignature(bytes32, bytes memory) external pure returns (bytes4); -```*/ + ```solidity + function isValidSignature(bytes32, bytes memory) external pure returns (bytes4); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct isValidSignatureCall { @@ -878,7 +843,8 @@ function isValidSignature(bytes32, bytes memory) external pure returns (bytes4); pub _1: alloy_sol_types::private::Bytes, } #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`isValidSignature(bytes32,bytes)`](isValidSignatureCall) function. + ///Container type for the return parameters of the + /// [`isValidSignature(bytes32,bytes)`](isValidSignatureCall) function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct isValidSignatureReturn { @@ -892,7 +858,7 @@ function isValidSignature(bytes32, bytes memory) external pure returns (bytes4); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -907,9 +873,7 @@ function isValidSignature(bytes32, bytes memory) external pure returns (bytes4); ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -918,18 +882,19 @@ function isValidSignature(bytes32, bytes memory) external pure returns (bytes4); } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From - for UnderlyingRustTuple<'_> { + impl ::core::convert::From for UnderlyingRustTuple<'_> { fn from(value: isValidSignatureCall) -> Self { (value._0, value._1) } } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From> - for isValidSignatureCall { + impl ::core::convert::From> for isValidSignatureCall { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { - Self { _0: tuple.0, _1: tuple.1 } + Self { + _0: tuple.0, + _1: tuple.1, + } } } } @@ -941,9 +906,7 @@ function isValidSignature(bytes32, bytes memory) external pure returns (bytes4); 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, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -952,16 +915,14 @@ function isValidSignature(bytes32, bytes memory) external pure returns (bytes4); } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From - for UnderlyingRustTuple<'_> { + impl ::core::convert::From for UnderlyingRustTuple<'_> { fn from(value: isValidSignatureReturn) -> Self { (value._0,) } } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From> - for isValidSignatureReturn { + impl ::core::convert::From> for isValidSignatureReturn { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { Self { _0: tuple.0 } } @@ -973,22 +934,21 @@ function isValidSignature(bytes32, bytes memory) external pure returns (bytes4); alloy_sol_types::sol_data::FixedBytes<32>, alloy_sol_types::sol_data::Bytes, ); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = alloy_sol_types::private::FixedBytes<4>; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (alloy_sol_types::sol_data::FixedBytes<4>,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "isValidSignature(bytes32,bytes)"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [22u8, 38u8, 186u8, 126u8]; + const SIGNATURE: &'static str = "isValidSignature(bytes32,bytes)"; + #[inline] fn new<'a>( tuple: as alloy_sol_types::SolType>::RustType, ) -> Self { tuple.into() } + #[inline] fn tokenize(&self) -> Self::Token<'_> { ( @@ -1000,6 +960,7 @@ function isValidSignature(bytes32, bytes memory) external pure returns (bytes4); ), ) } + #[inline] fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { ( @@ -1008,35 +969,34 @@ function isValidSignature(bytes32, bytes memory) external pure returns (bytes4); > 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| { + as alloy_sol_types::SolType>::abi_decode_sequence(data).map( + |r| { let r: isValidSignatureReturn = 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: isValidSignatureReturn = r.into(); - r._0 - }) + 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: isValidSignatureReturn = r.into(); + r._0 + }) } } }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `swap(address,(address,uint256),(address,uint256),(address,uint256),(address,uint256,bytes)[])` and selector `0xe8333e0d`. -```solidity -function swap(address settlement, Asset memory sell, Asset memory buy, Allowance memory allowance, Interaction[] memory calls) external returns (uint256 gasUsed); -```*/ + ```solidity + function swap(address settlement, Asset memory sell, Asset memory buy, Allowance memory allowance, Interaction[] memory calls) external returns (uint256 gasUsed); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct swapCall { @@ -1049,12 +1009,13 @@ function swap(address settlement, Asset memory sell, Asset memory buy, Allowance #[allow(missing_docs)] pub allowance: ::RustType, #[allow(missing_docs)] - pub calls: alloy_sol_types::private::Vec< - ::RustType, - >, + pub calls: + alloy_sol_types::private::Vec<::RustType>, } #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`swap(address,(address,uint256),(address,uint256),(address,uint256),(address,uint256,bytes)[])`](swapCall) function. + ///Container type for the return parameters of the + /// [`swap(address,(address,uint256),(address,uint256),(address,uint256), + /// (address,uint256,bytes)[])`](swapCall) function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct swapReturn { @@ -1068,7 +1029,7 @@ function swap(address settlement, Asset memory sell, Asset memory buy, Allowance clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -1085,15 +1046,11 @@ function swap(address settlement, Asset memory sell, Asset memory buy, Allowance ::RustType, ::RustType, ::RustType, - alloy_sol_types::private::Vec< - ::RustType, - >, + alloy_sol_types::private::Vec<::RustType>, ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1132,14 +1089,10 @@ function swap(address settlement, Asset memory sell, Asset memory buy, Allowance #[allow(dead_code)] type UnderlyingSolTuple<'a> = (alloy_sol_types::sol_data::Uint<256>,); #[doc(hidden)] - type UnderlyingRustTuple<'a> = ( - alloy_sol_types::private::primitives::aliases::U256, - ); + 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, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1170,22 +1123,22 @@ function swap(address settlement, Asset memory sell, Asset memory buy, Allowance Allowance, alloy_sol_types::sol_data::Array, ); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = alloy_sol_types::private::primitives::aliases::U256; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (alloy_sol_types::sol_data::Uint<256>,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "swap(address,(address,uint256),(address,uint256),(address,uint256),(address,uint256,bytes)[])"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [232u8, 51u8, 62u8, 13u8]; + const SIGNATURE: &'static str = "swap(address,(address,uint256),(address,uint256),\ + (address,uint256),(address,uint256,bytes)[])"; + #[inline] fn new<'a>( tuple: as alloy_sol_types::SolType>::RustType, ) -> Self { tuple.into() } + #[inline] fn tokenize(&self) -> Self::Token<'_> { ( @@ -1200,41 +1153,40 @@ function swap(address settlement, Asset memory sell, Asset memory buy, Allowance > as alloy_sol_types::SolType>::tokenize(&self.calls), ) } + #[inline] fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { ( - as alloy_sol_types::SolType>::tokenize(ret), + 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| { + as alloy_sol_types::SolType>::abi_decode_sequence(data).map( + |r| { let r: swapReturn = r.into(); r.gasUsed - }) + }, + ) } + #[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: swapReturn = r.into(); - r.gasUsed - }) + 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: swapReturn = r.into(); + r.gasUsed + }) } } }; ///Container for all the [`Swapper`](self) function calls. #[derive(Clone)] - #[derive()] pub enum SwapperCalls { #[allow(missing_docs)] isValidSignature(isValidSignatureCall), @@ -1244,24 +1196,24 @@ function swap(address settlement, Asset memory sell, Asset memory buy, Allowance impl SwapperCalls { /// 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. + /// 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]] = &[ - [22u8, 38u8, 186u8, 126u8], - [232u8, 51u8, 62u8, 13u8], + pub const SELECTORS: &'static [[u8; 4usize]] = + &[[22u8, 38u8, 186u8, 126u8], [232u8, 51u8, 62u8, 13u8]]; + /// The signatures in the same order as `SELECTORS`. + pub const SIGNATURES: &'static [&'static str] = &[ + ::SIGNATURE, + ::SIGNATURE, ]; /// The names of the variants in the same order as `SELECTORS`. pub const VARIANT_NAMES: &'static [&'static str] = &[ ::core::stringify!(isValidSignature), ::core::stringify!(swap), ]; - /// The signatures in the same order as `SELECTORS`. - pub const SIGNATURES: &'static [&'static str] = &[ - ::SIGNATURE, - ::SIGNATURE, - ]; + /// Returns the signature for the given selector, if known. #[inline] pub fn signature_by_selector( @@ -1274,20 +1226,20 @@ function swap(address settlement, Asset memory sell, Asset memory buy, Allowance ::core::result::Result::Err(_) => ::core::option::Option::None, } } + /// Returns the enum variant name for the given selector, if known. #[inline] - pub fn name_by_selector( - selector: [u8; 4usize], - ) -> ::core::option::Option<&'static str> { + pub fn name_by_selector(selector: [u8; 4usize]) -> ::core::option::Option<&'static str> { let sig = Self::signature_by_selector(selector)?; sig.split_once('(').map(|(name, _)| name) } } #[automatically_derived] impl alloy_sol_types::SolInterface for SwapperCalls { - const NAME: &'static str = "SwapperCalls"; - const MIN_DATA_LENGTH: usize = 96usize; const COUNT: usize = 2usize; + const MIN_DATA_LENGTH: usize = 96usize; + const NAME: &'static str = "SwapperCalls"; + #[inline] fn selector(&self) -> [u8; 4] { match self { @@ -1297,28 +1249,24 @@ function swap(address settlement, Asset memory sell, Asset memory buy, Allowance Self::swap(_) => ::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 { + fn abi_decode_raw(selector: [u8; 4], data: &[u8]) -> alloy_sol_types::Result { static DECODE_SHIMS: &[fn(&[u8]) -> alloy_sol_types::Result] = &[ { - fn isValidSignature( - data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, - ) + fn isValidSignature(data: &[u8]) -> alloy_sol_types::Result { + ::abi_decode_raw(data) .map(SwapperCalls::isValidSignature) } isValidSignature @@ -1332,76 +1280,64 @@ function swap(address settlement, Asset memory sell, Asset memory buy, Allowance }, ]; let Ok(idx) = Self::SELECTORS.binary_search(&selector) else { - return Err( - alloy_sol_types::Error::unknown_selector( - ::NAME, - selector, - ), - ); + 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] = &[ + static DECODE_VALIDATE_SHIMS: &[fn(&[u8]) -> alloy_sol_types::Result] = &[ { - fn isValidSignature( - data: &[u8], - ) -> alloy_sol_types::Result { + fn isValidSignature(data: &[u8]) -> alloy_sol_types::Result { ::abi_decode_raw_validate( - data, - ) - .map(SwapperCalls::isValidSignature) + data, + ) + .map(SwapperCalls::isValidSignature) } isValidSignature }, { fn swap(data: &[u8]) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) + ::abi_decode_raw_validate(data) .map(SwapperCalls::swap) } swap }, ]; let Ok(idx) = Self::SELECTORS.binary_search(&selector) else { - return Err( - alloy_sol_types::Error::unknown_selector( - ::NAME, - selector, - ), - ); + 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::isValidSignature(inner) => { - ::abi_encoded_size( - inner, - ) + ::abi_encoded_size(inner) } Self::swap(inner) => { ::abi_encoded_size(inner) } } } + #[inline] fn abi_encode_raw(&self, out: &mut alloy_sol_types::private::Vec) { match self { Self::isValidSignature(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } Self::swap(inner) => { ::abi_encode_raw(inner, out) @@ -1409,10 +1345,10 @@ function swap(address settlement, Asset memory sell, Asset memory buy, Allowance } } } - use alloy_contract as alloy_contract; + use alloy_contract; /**Creates a new wrapper around an on-chain [`Swapper`](self) contract instance. -See the [wrapper's documentation](`SwapperInstance`) for more details.*/ + See the [wrapper's documentation](`SwapperInstance`) for more details.*/ #[inline] pub const fn new< P: alloy_contract::private::Provider, @@ -1425,43 +1361,40 @@ See the [wrapper's documentation](`SwapperInstance`) for more details.*/ } /**Deploys this contract using the given `provider` and constructor arguments, if any. -Returns a new instance of the contract, if the deployment was successful. + 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.*/ + 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, - >( + pub fn deploy, N: alloy_contract::private::Network>( __provider: P, - ) -> impl ::core::future::Future< - Output = alloy_contract::Result>, - > { + ) -> impl ::core::future::Future>> { SwapperInstance::::deploy(__provider) } /**Creates a `RawCallBuilder` for deploying this contract using the given `provider` -and constructor arguments, if any. + 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.*/ + 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) -> alloy_contract::RawCallBuilder { + >( + __provider: P, + ) -> alloy_contract::RawCallBuilder { SwapperInstance::::deploy_builder(__provider) } /**A [`Swapper`](self) instance. -Contains type-safe methods for interacting with an on-chain instance of the -[`Swapper`](self) contract located at a given `address`, using a given -provider `P`. + Contains type-safe methods for interacting with an on-chain instance of the + [`Swapper`](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. + 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.*/ + See the [module-level documentation](self) for all the available methods.*/ #[derive(Clone)] pub struct SwapperInstance { address: alloy_sol_types::private::Address, @@ -1472,46 +1405,44 @@ See the [module-level documentation](self) for all the available methods.*/ impl ::core::fmt::Debug for SwapperInstance { #[inline] fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { - f.debug_tuple("SwapperInstance").field(&self.address).finish() + f.debug_tuple("SwapperInstance") + .field(&self.address) + .finish() } } /// Instantiation and getters/setters. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > SwapperInstance { + impl, N: alloy_contract::private::Network> + SwapperInstance + { /**Creates a new wrapper around an on-chain [`Swapper`](self) contract instance. -See the [wrapper's documentation](`SwapperInstance`) for more details.*/ + See the [wrapper's documentation](`SwapperInstance`) for more details.*/ #[inline] - pub const fn new( - address: alloy_sol_types::private::Address, - __provider: P, - ) -> Self { + pub const fn new(address: alloy_sol_types::private::Address, __provider: P) -> Self { Self { address, provider: __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. + 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.*/ + For more fine-grained control over the deployment process, use [`deploy_builder`] instead.*/ #[inline] - pub async fn deploy( - __provider: P, - ) -> alloy_contract::Result> { + 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. + 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.*/ + 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( @@ -1519,21 +1450,25 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ ::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 { @@ -1541,7 +1476,8 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ } } impl SwapperInstance<&P, N> { - /// Clones the provider and returns a new instance with the cloned provider. + /// Clones the provider and returns a new instance with the cloned + /// provider. #[inline] pub fn with_cloned_provider(self) -> SwapperInstance { SwapperInstance { @@ -1552,20 +1488,22 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ } } /// Function calls. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > SwapperInstance { - /// Creates a new call builder using this contract instance's provider and address. + impl, N: alloy_contract::private::Network> + SwapperInstance + { + /// 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. + /// 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 [`isValidSignature`] function. pub fn isValidSignature( &self, @@ -1574,6 +1512,7 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ ) -> alloy_contract::SolCallBuilder<&P, isValidSignatureCall, N> { self.call_builder(&isValidSignatureCall { _0, _1 }) } + ///Creates a new call builder for the [`swap`] function. pub fn swap( &self, @@ -1585,26 +1524,25 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ ::RustType, >, ) -> alloy_contract::SolCallBuilder<&P, swapCall, N> { - self.call_builder( - &swapCall { - settlement, - sell, - buy, - allowance, - calls, - }, - ) + self.call_builder(&swapCall { + settlement, + sell, + buy, + allowance, + calls, + }) } } /// Event filters. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > SwapperInstance { - /// Creates a new event filter using this contract instance's provider and address. + impl, N: alloy_contract::private::Network> + SwapperInstance + { + /// 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. + /// 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> { diff --git a/contracts/generated/contracts-generated/swaprrouter/src/lib.rs b/contracts/generated/contracts-generated/swaprrouter/src/lib.rs index 56b59a84cd..08100f9c89 100644 --- a/contracts/generated/contracts-generated/swaprrouter/src/lib.rs +++ b/contracts/generated/contracts-generated/swaprrouter/src/lib.rs @@ -1,4 +1,10 @@ -#![allow(unused_imports, unused_attributes, clippy::all, rustdoc::all, non_snake_case)] +#![allow( + unused_imports, + unused_attributes, + clippy::all, + rustdoc::all, + non_snake_case +)] //! Auto-generated contract bindings. Do not edit. /** @@ -184,18 +190,18 @@ interface SwaprRouter { clippy::empty_structs_with_brackets )] pub mod SwaprRouter { - use super::*; - use alloy_sol_types as alloy_sol_types; + use {super::*, alloy_sol_types}; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `WETH()` and selector `0xad5c4648`. -```solidity -function WETH() external pure returns (address); -```*/ + ```solidity + function WETH() external pure returns (address); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct WETHCall; #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`WETH()`](WETHCall) function. + ///Container type for the return parameters of the [`WETH()`](WETHCall) + /// function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct WETHReturn { @@ -209,7 +215,7 @@ function WETH() external pure returns (address); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -218,9 +224,7 @@ function WETH() external pure returns (address); type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -250,9 +254,7 @@ function WETH() external pure returns (address); type UnderlyingRustTuple<'a> = (alloy_sol_types::private::Address,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -277,63 +279,58 @@ function WETH() external pure returns (address); #[automatically_derived] impl alloy_sol_types::SolCall for WETHCall { type Parameters<'a> = (); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = alloy_sol_types::private::Address; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (alloy_sol_types::sol_data::Address,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "WETH()"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [173u8, 92u8, 70u8, 72u8]; + const SIGNATURE: &'static str = "WETH()"; + #[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, - ), - ) + (::tokenize(ret),) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) - .map(|r| { + as alloy_sol_types::SolType>::abi_decode_sequence(data).map( + |r| { let r: WETHReturn = 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: WETHReturn = r.into(); - r._0 - }) + 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: WETHReturn = r.into(); + r._0 + }) } } }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `addLiquidity(address,address,uint256,uint256,uint256,uint256,address,uint256)` and selector `0xe8e33700`. -```solidity -function addLiquidity(address tokenA, address tokenB, uint256 amountADesired, uint256 amountBDesired, uint256 amountAMin, uint256 amountBMin, address to, uint256 deadline) external returns (uint256 amountA, uint256 amountB, uint256 liquidity); -```*/ + ```solidity + function addLiquidity(address tokenA, address tokenB, uint256 amountADesired, uint256 amountBDesired, uint256 amountAMin, uint256 amountBMin, address to, uint256 deadline) external returns (uint256 amountA, uint256 amountB, uint256 liquidity); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct addLiquidityCall { @@ -355,7 +352,9 @@ function addLiquidity(address tokenA, address tokenB, uint256 amountADesired, ui pub deadline: alloy_sol_types::private::primitives::aliases::U256, } #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`addLiquidity(address,address,uint256,uint256,uint256,uint256,address,uint256)`](addLiquidityCall) function. + ///Container type for the return parameters of the + /// [`addLiquidity(address,address,uint256,uint256,uint256,uint256,address, + /// uint256)`](addLiquidityCall) function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct addLiquidityReturn { @@ -373,7 +372,7 @@ function addLiquidity(address tokenA, address tokenB, uint256 amountADesired, ui clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -400,9 +399,7 @@ function addLiquidity(address tokenA, address tokenB, uint256 amountADesired, ui ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -458,9 +455,7 @@ function addLiquidity(address tokenA, address tokenB, uint256 amountADesired, ui ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -487,19 +482,17 @@ function addLiquidity(address tokenA, address tokenB, uint256 amountADesired, ui } } impl addLiquidityReturn { - fn _tokenize( - &self, - ) -> ::ReturnToken<'_> { + fn _tokenize(&self) -> ::ReturnToken<'_> { ( - as alloy_sol_types::SolType>::tokenize(&self.amountA), - as alloy_sol_types::SolType>::tokenize(&self.amountB), - as alloy_sol_types::SolType>::tokenize(&self.liquidity), + as alloy_sol_types::SolType>::tokenize( + &self.amountA, + ), + as alloy_sol_types::SolType>::tokenize( + &self.amountB, + ), + as alloy_sol_types::SolType>::tokenize( + &self.liquidity, + ), ) } } @@ -515,26 +508,26 @@ function addLiquidity(address tokenA, address tokenB, uint256 amountADesired, ui 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 = addLiquidityReturn; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = ( alloy_sol_types::sol_data::Uint<256>, alloy_sol_types::sol_data::Uint<256>, alloy_sol_types::sol_data::Uint<256>, ); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "addLiquidity(address,address,uint256,uint256,uint256,uint256,address,uint256)"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [232u8, 227u8, 55u8, 0u8]; + const SIGNATURE: &'static str = + "addLiquidity(address,address,uint256,uint256,uint256,uint256,address,uint256)"; + #[inline] fn new<'a>( tuple: as alloy_sol_types::SolType>::RustType, ) -> Self { tuple.into() } + #[inline] fn tokenize(&self) -> Self::Token<'_> { ( @@ -544,58 +537,58 @@ function addLiquidity(address tokenA, address tokenB, uint256 amountADesired, ui ::tokenize( &self.tokenB, ), - as alloy_sol_types::SolType>::tokenize(&self.amountADesired), - as alloy_sol_types::SolType>::tokenize(&self.amountBDesired), - as alloy_sol_types::SolType>::tokenize(&self.amountAMin), - as alloy_sol_types::SolType>::tokenize(&self.amountBMin), + as alloy_sol_types::SolType>::tokenize( + &self.amountADesired, + ), + as alloy_sol_types::SolType>::tokenize( + &self.amountBDesired, + ), + as alloy_sol_types::SolType>::tokenize( + &self.amountAMin, + ), + as alloy_sol_types::SolType>::tokenize( + &self.amountBMin, + ), ::tokenize( &self.to, ), - as alloy_sol_types::SolType>::tokenize(&self.deadline), + as alloy_sol_types::SolType>::tokenize( + &self.deadline, + ), ) } + #[inline] fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { addLiquidityReturn::_tokenize(ret) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) + 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) + 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(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `factory()` and selector `0xc45a0155`. -```solidity -function factory() external pure returns (address); -```*/ + ```solidity + function factory() external pure returns (address); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct factoryCall; #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`factory()`](factoryCall) function. + ///Container type for the return parameters of the + /// [`factory()`](factoryCall) function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct factoryReturn { @@ -609,7 +602,7 @@ function factory() external pure returns (address); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -618,9 +611,7 @@ function factory() external pure returns (address); type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -650,9 +641,7 @@ function factory() external pure returns (address); type UnderlyingRustTuple<'a> = (alloy_sol_types::private::Address,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -677,63 +666,58 @@ function factory() external pure returns (address); #[automatically_derived] impl alloy_sol_types::SolCall for factoryCall { type Parameters<'a> = (); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = alloy_sol_types::private::Address; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (alloy_sol_types::sol_data::Address,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "factory()"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [196u8, 90u8, 1u8, 85u8]; + const SIGNATURE: &'static str = "factory()"; + #[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, - ), - ) + (::tokenize(ret),) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) - .map(|r| { + as alloy_sol_types::SolType>::abi_decode_sequence(data).map( + |r| { let r: factoryReturn = 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: factoryReturn = r.into(); - r._0 - }) + 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: factoryReturn = r.into(); + r._0 + }) } } }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `quote(uint256,uint256,uint256)` and selector `0xad615dec`. -```solidity -function quote(uint256 amountA, uint256 reserveA, uint256 reserveB) external pure returns (uint256 amountB); -```*/ + ```solidity + function quote(uint256 amountA, uint256 reserveA, uint256 reserveB) external pure returns (uint256 amountB); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct quoteCall { @@ -745,7 +729,8 @@ function quote(uint256 amountA, uint256 reserveA, uint256 reserveB) external pur pub reserveB: alloy_sol_types::private::primitives::aliases::U256, } #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`quote(uint256,uint256,uint256)`](quoteCall) function. + ///Container type for the return parameters of the + /// [`quote(uint256,uint256,uint256)`](quoteCall) function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct quoteReturn { @@ -759,7 +744,7 @@ function quote(uint256 amountA, uint256 reserveA, uint256 reserveB) external pur clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -776,9 +761,7 @@ function quote(uint256 amountA, uint256 reserveA, uint256 reserveB) external pur ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -809,14 +792,10 @@ function quote(uint256 amountA, uint256 reserveA, uint256 reserveB) external pur #[allow(dead_code)] type UnderlyingSolTuple<'a> = (alloy_sol_types::sol_data::Uint<256>,); #[doc(hidden)] - type UnderlyingRustTuple<'a> = ( - alloy_sol_types::private::primitives::aliases::U256, - ); + 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, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -845,73 +824,72 @@ function quote(uint256 amountA, uint256 reserveA, uint256 reserveB) external pur 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 = alloy_sol_types::private::primitives::aliases::U256; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (alloy_sol_types::sol_data::Uint<256>,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "quote(uint256,uint256,uint256)"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [173u8, 97u8, 93u8, 236u8]; + const SIGNATURE: &'static str = "quote(uint256,uint256,uint256)"; + #[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.amountA), - as alloy_sol_types::SolType>::tokenize(&self.reserveA), - as alloy_sol_types::SolType>::tokenize(&self.reserveB), + as alloy_sol_types::SolType>::tokenize( + &self.amountA, + ), + as alloy_sol_types::SolType>::tokenize( + &self.reserveA, + ), + as alloy_sol_types::SolType>::tokenize( + &self.reserveB, + ), ) } + #[inline] fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { ( - as alloy_sol_types::SolType>::tokenize(ret), + 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| { + as alloy_sol_types::SolType>::abi_decode_sequence(data).map( + |r| { let r: quoteReturn = r.into(); r.amountB - }) + }, + ) } + #[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: quoteReturn = r.into(); - r.amountB - }) + 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: quoteReturn = r.into(); + r.amountB + }) } } }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `swapTokensForExactTokens(uint256,uint256,address[],address,uint256)` and selector `0x8803dbee`. -```solidity -function swapTokensForExactTokens(uint256 amountOut, uint256 amountInMax, address[] memory path, address to, uint256 deadline) external returns (uint256[] memory amounts); -```*/ + ```solidity + function swapTokensForExactTokens(uint256 amountOut, uint256 amountInMax, address[] memory path, address to, uint256 deadline) external returns (uint256[] memory amounts); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct swapTokensForExactTokensCall { @@ -927,14 +905,15 @@ function swapTokensForExactTokens(uint256 amountOut, uint256 amountInMax, addres pub deadline: alloy_sol_types::private::primitives::aliases::U256, } #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`swapTokensForExactTokens(uint256,uint256,address[],address,uint256)`](swapTokensForExactTokensCall) function. + ///Container type for the return parameters of the + /// [`swapTokensForExactTokens(uint256,uint256,address[],address, + /// uint256)`](swapTokensForExactTokensCall) function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct swapTokensForExactTokensReturn { #[allow(missing_docs)] - pub amounts: alloy_sol_types::private::Vec< - alloy_sol_types::private::primitives::aliases::U256, - >, + pub amounts: + alloy_sol_types::private::Vec, } #[allow( non_camel_case_types, @@ -943,7 +922,7 @@ function swapTokensForExactTokens(uint256 amountOut, uint256 amountInMax, addres clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -964,9 +943,7 @@ function swapTokensForExactTokens(uint256 amountOut, uint256 amountInMax, addres ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -975,8 +952,7 @@ function swapTokensForExactTokens(uint256 amountOut, uint256 amountInMax, addres } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From - for UnderlyingRustTuple<'_> { + impl ::core::convert::From for UnderlyingRustTuple<'_> { fn from(value: swapTokensForExactTokensCall) -> Self { ( value.amountOut, @@ -989,8 +965,7 @@ function swapTokensForExactTokens(uint256 amountOut, uint256 amountInMax, addres } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From> - for swapTokensForExactTokensCall { + impl ::core::convert::From> for swapTokensForExactTokensCall { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { Self { amountOut: tuple.0, @@ -1005,20 +980,15 @@ function swapTokensForExactTokens(uint256 amountOut, uint256 amountInMax, addres { #[doc(hidden)] #[allow(dead_code)] - type UnderlyingSolTuple<'a> = ( - alloy_sol_types::sol_data::Array>, - ); + type UnderlyingSolTuple<'a> = + (alloy_sol_types::sol_data::Array>,); #[doc(hidden)] type UnderlyingRustTuple<'a> = ( - alloy_sol_types::private::Vec< - alloy_sol_types::private::primitives::aliases::U256, - >, + alloy_sol_types::private::Vec, ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1027,16 +997,14 @@ function swapTokensForExactTokens(uint256 amountOut, uint256 amountInMax, addres } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From - for UnderlyingRustTuple<'_> { + impl ::core::convert::From for UnderlyingRustTuple<'_> { fn from(value: swapTokensForExactTokensReturn) -> Self { (value.amounts,) } } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From> - for swapTokensForExactTokensReturn { + impl ::core::convert::From> for swapTokensForExactTokensReturn { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { Self { amounts: tuple.0 } } @@ -1051,26 +1019,24 @@ function swapTokensForExactTokens(uint256 amountOut, uint256 amountInMax, addres 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 = alloy_sol_types::private::Vec< - alloy_sol_types::private::primitives::aliases::U256, - >; - type ReturnTuple<'a> = ( - alloy_sol_types::sol_data::Array>, - ); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "swapTokensForExactTokens(uint256,uint256,address[],address,uint256)"; + type Return = + alloy_sol_types::private::Vec; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + type ReturnTuple<'a> = + (alloy_sol_types::sol_data::Array>,); + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [136u8, 3u8, 219u8, 238u8]; + const SIGNATURE: &'static str = + "swapTokensForExactTokens(uint256,uint256,address[],address,uint256)"; + #[inline] fn new<'a>( tuple: as alloy_sol_types::SolType>::RustType, ) -> Self { tuple.into() } + #[inline] fn tokenize(&self) -> Self::Token<'_> { ( @@ -1091,41 +1057,38 @@ function swapTokensForExactTokens(uint256 amountOut, uint256 amountInMax, addres > as alloy_sol_types::SolType>::tokenize(&self.deadline), ) } + #[inline] fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { - ( - , - > as alloy_sol_types::SolType>::tokenize(ret), - ) + (, + > 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| { + as alloy_sol_types::SolType>::abi_decode_sequence(data).map( + |r| { let r: swapTokensForExactTokensReturn = r.into(); r.amounts - }) + }, + ) } + #[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: swapTokensForExactTokensReturn = r.into(); - r.amounts - }) + 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: swapTokensForExactTokensReturn = r.into(); + r.amounts + }) } } }; ///Container for all the [`SwaprRouter`](self) function calls. #[derive(Clone)] - #[derive()] pub enum SwaprRouterCalls { #[allow(missing_docs)] WETH(WETHCall), @@ -1141,8 +1104,9 @@ function swapTokensForExactTokens(uint256 amountOut, uint256 amountInMax, addres impl SwaprRouterCalls { /// 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. + /// 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]] = &[ @@ -1152,14 +1116,6 @@ function swapTokensForExactTokens(uint256 amountOut, uint256 amountInMax, addres [196u8, 90u8, 1u8, 85u8], [232u8, 227u8, 55u8, 0u8], ]; - /// The names of the variants in the same order as `SELECTORS`. - pub const VARIANT_NAMES: &'static [&'static str] = &[ - ::core::stringify!(swapTokensForExactTokens), - ::core::stringify!(WETH), - ::core::stringify!(quote), - ::core::stringify!(factory), - ::core::stringify!(addLiquidity), - ]; /// The signatures in the same order as `SELECTORS`. pub const SIGNATURES: &'static [&'static str] = &[ ::SIGNATURE, @@ -1168,6 +1124,15 @@ function swapTokensForExactTokens(uint256 amountOut, uint256 amountInMax, addres ::SIGNATURE, ::SIGNATURE, ]; + /// The names of the variants in the same order as `SELECTORS`. + pub const VARIANT_NAMES: &'static [&'static str] = &[ + ::core::stringify!(swapTokensForExactTokens), + ::core::stringify!(WETH), + ::core::stringify!(quote), + ::core::stringify!(factory), + ::core::stringify!(addLiquidity), + ]; + /// Returns the signature for the given selector, if known. #[inline] pub fn signature_by_selector( @@ -1180,27 +1145,25 @@ function swapTokensForExactTokens(uint256 amountOut, uint256 amountInMax, addres ::core::result::Result::Err(_) => ::core::option::Option::None, } } + /// Returns the enum variant name for the given selector, if known. #[inline] - pub fn name_by_selector( - selector: [u8; 4usize], - ) -> ::core::option::Option<&'static str> { + pub fn name_by_selector(selector: [u8; 4usize]) -> ::core::option::Option<&'static str> { let sig = Self::signature_by_selector(selector)?; sig.split_once('(').map(|(name, _)| name) } } #[automatically_derived] impl alloy_sol_types::SolInterface for SwaprRouterCalls { - const NAME: &'static str = "SwaprRouterCalls"; - const MIN_DATA_LENGTH: usize = 0usize; const COUNT: usize = 5usize; + const MIN_DATA_LENGTH: usize = 0usize; + const NAME: &'static str = "SwaprRouterCalls"; + #[inline] fn selector(&self) -> [u8; 4] { match self { Self::WETH(_) => ::SELECTOR, - Self::addLiquidity(_) => { - ::SELECTOR - } + Self::addLiquidity(_) => ::SELECTOR, Self::factory(_) => ::SELECTOR, Self::quote(_) => ::SELECTOR, Self::swapTokensForExactTokens(_) => { @@ -1208,31 +1171,29 @@ function swapTokensForExactTokens(uint256 amountOut, uint256 amountInMax, addres } } } + #[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 abi_decode_raw(selector: [u8; 4], data: &[u8]) -> alloy_sol_types::Result { + static DECODE_SHIMS: &[fn(&[u8]) -> alloy_sol_types::Result] = &[ { fn swapTokensForExactTokens( data: &[u8], ) -> alloy_sol_types::Result { ::abi_decode_raw( - data, - ) - .map(SwaprRouterCalls::swapTokensForExactTokens) + data, + ) + .map(SwaprRouterCalls::swapTokensForExactTokens) } swapTokensForExactTokens }, @@ -1251,36 +1212,29 @@ function swapTokensForExactTokens(uint256 amountOut, uint256 amountInMax, addres quote }, { - fn factory( - data: &[u8], - ) -> alloy_sol_types::Result { + fn factory(data: &[u8]) -> alloy_sol_types::Result { ::abi_decode_raw(data) .map(SwaprRouterCalls::factory) } factory }, { - fn addLiquidity( - data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, - ) + fn addLiquidity(data: &[u8]) -> alloy_sol_types::Result { + ::abi_decode_raw(data) .map(SwaprRouterCalls::addLiquidity) } addLiquidity }, ]; let Ok(idx) = Self::SELECTORS.binary_search(&selector) else { - return Err( - alloy_sol_types::Error::unknown_selector( - ::NAME, - selector, - ), - ); + return Err(alloy_sol_types::Error::unknown_selector( + ::NAME, + selector, + )); }; DECODE_SHIMS[idx](data) } + #[inline] #[allow(non_snake_case)] fn abi_decode_raw_validate( @@ -1289,7 +1243,8 @@ function swapTokensForExactTokens(uint256 amountOut, uint256 amountInMax, addres ) -> alloy_sol_types::Result { static DECODE_VALIDATE_SHIMS: &[fn( &[u8], - ) -> alloy_sol_types::Result] = &[ + ) + -> alloy_sol_types::Result] = &[ { fn swapTokensForExactTokens( data: &[u8], @@ -1303,55 +1258,44 @@ function swapTokensForExactTokens(uint256 amountOut, uint256 amountInMax, addres }, { fn WETH(data: &[u8]) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) + ::abi_decode_raw_validate(data) .map(SwaprRouterCalls::WETH) } WETH }, { fn quote(data: &[u8]) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) + ::abi_decode_raw_validate(data) .map(SwaprRouterCalls::quote) } quote }, { - fn factory( - data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) + fn factory(data: &[u8]) -> alloy_sol_types::Result { + ::abi_decode_raw_validate(data) .map(SwaprRouterCalls::factory) } factory }, { - fn addLiquidity( - data: &[u8], - ) -> alloy_sol_types::Result { + fn addLiquidity(data: &[u8]) -> alloy_sol_types::Result { ::abi_decode_raw_validate( - data, - ) - .map(SwaprRouterCalls::addLiquidity) + data, + ) + .map(SwaprRouterCalls::addLiquidity) } addLiquidity }, ]; let Ok(idx) = Self::SELECTORS.binary_search(&selector) else { - return Err( - alloy_sol_types::Error::unknown_selector( - ::NAME, - selector, - ), - ); + return Err(alloy_sol_types::Error::unknown_selector( + ::NAME, + selector, + )); }; DECODE_VALIDATE_SHIMS[idx](data) } + #[inline] fn abi_encoded_size(&self) -> usize { match self { @@ -1359,9 +1303,7 @@ function swapTokensForExactTokens(uint256 amountOut, uint256 amountInMax, addres ::abi_encoded_size(inner) } Self::addLiquidity(inner) => { - ::abi_encoded_size( - inner, - ) + ::abi_encoded_size(inner) } Self::factory(inner) => { ::abi_encoded_size(inner) @@ -1376,6 +1318,7 @@ function swapTokensForExactTokens(uint256 amountOut, uint256 amountInMax, addres } } } + #[inline] fn abi_encode_raw(&self, out: &mut alloy_sol_types::private::Vec) { match self { @@ -1383,10 +1326,7 @@ function swapTokensForExactTokens(uint256 amountOut, uint256 amountInMax, addres ::abi_encode_raw(inner, out) } Self::addLiquidity(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } Self::factory(inner) => { ::abi_encode_raw(inner, out) @@ -1396,17 +1336,16 @@ function swapTokensForExactTokens(uint256 amountOut, uint256 amountInMax, addres } Self::swapTokensForExactTokens(inner) => { ::abi_encode_raw( - inner, - out, + inner, out, ) } } } } - use alloy_contract as alloy_contract; + use alloy_contract; /**Creates a new wrapper around an on-chain [`SwaprRouter`](self) contract instance. -See the [wrapper's documentation](`SwaprRouterInstance`) for more details.*/ + See the [wrapper's documentation](`SwaprRouterInstance`) for more details.*/ #[inline] pub const fn new< P: alloy_contract::private::Provider, @@ -1419,15 +1358,15 @@ See the [wrapper's documentation](`SwaprRouterInstance`) for more details.*/ } /**A [`SwaprRouter`](self) instance. -Contains type-safe methods for interacting with an on-chain instance of the -[`SwaprRouter`](self) contract located at a given `address`, using a given -provider `P`. + Contains type-safe methods for interacting with an on-chain instance of the + [`SwaprRouter`](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. + 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.*/ + See the [module-level documentation](self) for all the available methods.*/ #[derive(Clone)] pub struct SwaprRouterInstance { address: alloy_sol_types::private::Address, @@ -1438,43 +1377,45 @@ See the [module-level documentation](self) for all the available methods.*/ impl ::core::fmt::Debug for SwaprRouterInstance { #[inline] fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { - f.debug_tuple("SwaprRouterInstance").field(&self.address).finish() + f.debug_tuple("SwaprRouterInstance") + .field(&self.address) + .finish() } } /// Instantiation and getters/setters. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > SwaprRouterInstance { + impl, N: alloy_contract::private::Network> + SwaprRouterInstance + { /**Creates a new wrapper around an on-chain [`SwaprRouter`](self) contract instance. -See the [wrapper's documentation](`SwaprRouterInstance`) for more details.*/ + See the [wrapper's documentation](`SwaprRouterInstance`) for more details.*/ #[inline] - pub const fn new( - address: alloy_sol_types::private::Address, - __provider: P, - ) -> Self { + pub const fn new(address: alloy_sol_types::private::Address, __provider: P) -> Self { Self { address, provider: __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 { @@ -1482,7 +1423,8 @@ See the [wrapper's documentation](`SwaprRouterInstance`) for more details.*/ } } impl SwaprRouterInstance<&P, N> { - /// Clones the provider and returns a new instance with the cloned provider. + /// Clones the provider and returns a new instance with the cloned + /// provider. #[inline] pub fn with_cloned_provider(self) -> SwaprRouterInstance { SwaprRouterInstance { @@ -1493,24 +1435,27 @@ See the [wrapper's documentation](`SwaprRouterInstance`) for more details.*/ } } /// Function calls. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > SwaprRouterInstance { - /// Creates a new call builder using this contract instance's provider and address. + impl, N: alloy_contract::private::Network> + SwaprRouterInstance + { + /// 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. + /// 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 [`WETH`] function. pub fn WETH(&self) -> alloy_contract::SolCallBuilder<&P, WETHCall, N> { self.call_builder(&WETHCall) } + ///Creates a new call builder for the [`addLiquidity`] function. pub fn addLiquidity( &self, @@ -1523,23 +1468,23 @@ See the [wrapper's documentation](`SwaprRouterInstance`) for more details.*/ to: alloy_sol_types::private::Address, deadline: alloy_sol_types::private::primitives::aliases::U256, ) -> alloy_contract::SolCallBuilder<&P, addLiquidityCall, N> { - self.call_builder( - &addLiquidityCall { - tokenA, - tokenB, - amountADesired, - amountBDesired, - amountAMin, - amountBMin, - to, - deadline, - }, - ) + self.call_builder(&addLiquidityCall { + tokenA, + tokenB, + amountADesired, + amountBDesired, + amountAMin, + amountBMin, + to, + deadline, + }) } + ///Creates a new call builder for the [`factory`] function. pub fn factory(&self) -> alloy_contract::SolCallBuilder<&P, factoryCall, N> { self.call_builder(&factoryCall) } + ///Creates a new call builder for the [`quote`] function. pub fn quote( &self, @@ -1547,15 +1492,15 @@ See the [wrapper's documentation](`SwaprRouterInstance`) for more details.*/ reserveA: alloy_sol_types::private::primitives::aliases::U256, reserveB: alloy_sol_types::private::primitives::aliases::U256, ) -> alloy_contract::SolCallBuilder<&P, quoteCall, N> { - self.call_builder( - "eCall { - amountA, - reserveA, - reserveB, - }, - ) + self.call_builder("eCall { + amountA, + reserveA, + reserveB, + }) } - ///Creates a new call builder for the [`swapTokensForExactTokens`] function. + + ///Creates a new call builder for the [`swapTokensForExactTokens`] + /// function. pub fn swapTokensForExactTokens( &self, amountOut: alloy_sol_types::private::primitives::aliases::U256, @@ -1564,26 +1509,25 @@ See the [wrapper's documentation](`SwaprRouterInstance`) for more details.*/ to: alloy_sol_types::private::Address, deadline: alloy_sol_types::private::primitives::aliases::U256, ) -> alloy_contract::SolCallBuilder<&P, swapTokensForExactTokensCall, N> { - self.call_builder( - &swapTokensForExactTokensCall { - amountOut, - amountInMax, - path, - to, - deadline, - }, - ) + self.call_builder(&swapTokensForExactTokensCall { + amountOut, + amountInMax, + path, + to, + deadline, + }) } } /// Event filters. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > SwaprRouterInstance { - /// Creates a new event filter using this contract instance's provider and address. + impl, N: alloy_contract::private::Network> + SwaprRouterInstance + { + /// 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. + /// 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> { @@ -1593,37 +1537,25 @@ See the [wrapper's documentation](`SwaprRouterInstance`) for more details.*/ } pub type Instance = SwaprRouter::SwaprRouterInstance<::alloy_provider::DynProvider>; use { - std::{sync::LazyLock, collections::HashMap}, - anyhow::{Result, Context}, - alloy_primitives::{address, Address}, - alloy_provider::{Provider, DynProvider}, + alloy_primitives::{Address, address}, + alloy_provider::{DynProvider, Provider}, + anyhow::{Context, Result}, + std::{collections::HashMap, sync::LazyLock}, }; pub const fn deployment_info(chain_id: u64) -> Option<(Address, Option)> { match chain_id { - 1u64 => { - Some(( - ::alloy_primitives::address!( - "0xb9960d9bca016e9748be75dd52f02188b9d0829f" - ), - None, - )) - } - 100u64 => { - Some(( - ::alloy_primitives::address!( - "0xE43e60736b1cb4a75ad25240E2f9a62Bff65c0C0" - ), - None, - )) - } - 42161u64 => { - Some(( - ::alloy_primitives::address!( - "0x530476d5583724A89c8841eB6Da76E7Af4C0F17E" - ), - None, - )) - } + 1u64 => Some(( + ::alloy_primitives::address!("0xb9960d9bca016e9748be75dd52f02188b9d0829f"), + None, + )), + 100u64 => Some(( + ::alloy_primitives::address!("0xE43e60736b1cb4a75ad25240E2f9a62Bff65c0C0"), + None, + )), + 42161u64 => Some(( + ::alloy_primitives::address!("0x530476d5583724A89c8841eB6Da76E7Af4C0F17E"), + None, + )), _ => None, } } @@ -1640,9 +1572,7 @@ pub const fn deployment_block(chain_id: &u64) -> Option { } } impl Instance { - pub fn deployed( - provider: &DynProvider, - ) -> impl Future> + Send { + pub fn deployed(provider: &DynProvider) -> impl Future> + Send { async move { let chain_id = provider .get_chain_id() diff --git a/contracts/generated/contracts-generated/testnetuniswapv2router02/src/lib.rs b/contracts/generated/contracts-generated/testnetuniswapv2router02/src/lib.rs index c19f7eabda..82fea0f265 100644 --- a/contracts/generated/contracts-generated/testnetuniswapv2router02/src/lib.rs +++ b/contracts/generated/contracts-generated/testnetuniswapv2router02/src/lib.rs @@ -1,4 +1,10 @@ -#![allow(unused_imports, unused_attributes, clippy::all, rustdoc::all, non_snake_case)] +#![allow( + unused_imports, + unused_attributes, + clippy::all, + rustdoc::all, + non_snake_case +)] //! Auto-generated contract bindings. Do not edit. /** @@ -184,18 +190,18 @@ interface TestnetUniswapV2Router02 { clippy::empty_structs_with_brackets )] pub mod TestnetUniswapV2Router02 { - use super::*; - use alloy_sol_types as alloy_sol_types; + use {super::*, alloy_sol_types}; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `WETH()` and selector `0xad5c4648`. -```solidity -function WETH() external pure returns (address); -```*/ + ```solidity + function WETH() external pure returns (address); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct WETHCall; #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`WETH()`](WETHCall) function. + ///Container type for the return parameters of the [`WETH()`](WETHCall) + /// function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct WETHReturn { @@ -209,7 +215,7 @@ function WETH() external pure returns (address); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -218,9 +224,7 @@ function WETH() external pure returns (address); type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -250,9 +254,7 @@ function WETH() external pure returns (address); type UnderlyingRustTuple<'a> = (alloy_sol_types::private::Address,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -277,63 +279,58 @@ function WETH() external pure returns (address); #[automatically_derived] impl alloy_sol_types::SolCall for WETHCall { type Parameters<'a> = (); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = alloy_sol_types::private::Address; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (alloy_sol_types::sol_data::Address,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "WETH()"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [173u8, 92u8, 70u8, 72u8]; + const SIGNATURE: &'static str = "WETH()"; + #[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, - ), - ) + (::tokenize(ret),) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) - .map(|r| { + as alloy_sol_types::SolType>::abi_decode_sequence(data).map( + |r| { let r: WETHReturn = 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: WETHReturn = r.into(); - r._0 - }) + 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: WETHReturn = r.into(); + r._0 + }) } } }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `addLiquidity(address,address,uint256,uint256,uint256,uint256,address,uint256)` and selector `0xe8e33700`. -```solidity -function addLiquidity(address tokenA, address tokenB, uint256 amountADesired, uint256 amountBDesired, uint256 amountAMin, uint256 amountBMin, address to, uint256 deadline) external returns (uint256 amountA, uint256 amountB, uint256 liquidity); -```*/ + ```solidity + function addLiquidity(address tokenA, address tokenB, uint256 amountADesired, uint256 amountBDesired, uint256 amountAMin, uint256 amountBMin, address to, uint256 deadline) external returns (uint256 amountA, uint256 amountB, uint256 liquidity); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct addLiquidityCall { @@ -355,7 +352,9 @@ function addLiquidity(address tokenA, address tokenB, uint256 amountADesired, ui pub deadline: alloy_sol_types::private::primitives::aliases::U256, } #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`addLiquidity(address,address,uint256,uint256,uint256,uint256,address,uint256)`](addLiquidityCall) function. + ///Container type for the return parameters of the + /// [`addLiquidity(address,address,uint256,uint256,uint256,uint256,address, + /// uint256)`](addLiquidityCall) function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct addLiquidityReturn { @@ -373,7 +372,7 @@ function addLiquidity(address tokenA, address tokenB, uint256 amountADesired, ui clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -400,9 +399,7 @@ function addLiquidity(address tokenA, address tokenB, uint256 amountADesired, ui ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -458,9 +455,7 @@ function addLiquidity(address tokenA, address tokenB, uint256 amountADesired, ui ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -487,19 +482,17 @@ function addLiquidity(address tokenA, address tokenB, uint256 amountADesired, ui } } impl addLiquidityReturn { - fn _tokenize( - &self, - ) -> ::ReturnToken<'_> { + fn _tokenize(&self) -> ::ReturnToken<'_> { ( - as alloy_sol_types::SolType>::tokenize(&self.amountA), - as alloy_sol_types::SolType>::tokenize(&self.amountB), - as alloy_sol_types::SolType>::tokenize(&self.liquidity), + as alloy_sol_types::SolType>::tokenize( + &self.amountA, + ), + as alloy_sol_types::SolType>::tokenize( + &self.amountB, + ), + as alloy_sol_types::SolType>::tokenize( + &self.liquidity, + ), ) } } @@ -515,26 +508,26 @@ function addLiquidity(address tokenA, address tokenB, uint256 amountADesired, ui 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 = addLiquidityReturn; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = ( alloy_sol_types::sol_data::Uint<256>, alloy_sol_types::sol_data::Uint<256>, alloy_sol_types::sol_data::Uint<256>, ); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "addLiquidity(address,address,uint256,uint256,uint256,uint256,address,uint256)"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [232u8, 227u8, 55u8, 0u8]; + const SIGNATURE: &'static str = + "addLiquidity(address,address,uint256,uint256,uint256,uint256,address,uint256)"; + #[inline] fn new<'a>( tuple: as alloy_sol_types::SolType>::RustType, ) -> Self { tuple.into() } + #[inline] fn tokenize(&self) -> Self::Token<'_> { ( @@ -544,58 +537,58 @@ function addLiquidity(address tokenA, address tokenB, uint256 amountADesired, ui ::tokenize( &self.tokenB, ), - as alloy_sol_types::SolType>::tokenize(&self.amountADesired), - as alloy_sol_types::SolType>::tokenize(&self.amountBDesired), - as alloy_sol_types::SolType>::tokenize(&self.amountAMin), - as alloy_sol_types::SolType>::tokenize(&self.amountBMin), + as alloy_sol_types::SolType>::tokenize( + &self.amountADesired, + ), + as alloy_sol_types::SolType>::tokenize( + &self.amountBDesired, + ), + as alloy_sol_types::SolType>::tokenize( + &self.amountAMin, + ), + as alloy_sol_types::SolType>::tokenize( + &self.amountBMin, + ), ::tokenize( &self.to, ), - as alloy_sol_types::SolType>::tokenize(&self.deadline), + as alloy_sol_types::SolType>::tokenize( + &self.deadline, + ), ) } + #[inline] fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { addLiquidityReturn::_tokenize(ret) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) + 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) + 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(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `factory()` and selector `0xc45a0155`. -```solidity -function factory() external pure returns (address); -```*/ + ```solidity + function factory() external pure returns (address); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct factoryCall; #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`factory()`](factoryCall) function. + ///Container type for the return parameters of the + /// [`factory()`](factoryCall) function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct factoryReturn { @@ -609,7 +602,7 @@ function factory() external pure returns (address); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -618,9 +611,7 @@ function factory() external pure returns (address); type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -650,9 +641,7 @@ function factory() external pure returns (address); type UnderlyingRustTuple<'a> = (alloy_sol_types::private::Address,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -677,63 +666,58 @@ function factory() external pure returns (address); #[automatically_derived] impl alloy_sol_types::SolCall for factoryCall { type Parameters<'a> = (); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = alloy_sol_types::private::Address; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (alloy_sol_types::sol_data::Address,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "factory()"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [196u8, 90u8, 1u8, 85u8]; + const SIGNATURE: &'static str = "factory()"; + #[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, - ), - ) + (::tokenize(ret),) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) - .map(|r| { + as alloy_sol_types::SolType>::abi_decode_sequence(data).map( + |r| { let r: factoryReturn = 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: factoryReturn = r.into(); - r._0 - }) + 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: factoryReturn = r.into(); + r._0 + }) } } }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `quote(uint256,uint256,uint256)` and selector `0xad615dec`. -```solidity -function quote(uint256 amountA, uint256 reserveA, uint256 reserveB) external pure returns (uint256 amountB); -```*/ + ```solidity + function quote(uint256 amountA, uint256 reserveA, uint256 reserveB) external pure returns (uint256 amountB); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct quoteCall { @@ -745,7 +729,8 @@ function quote(uint256 amountA, uint256 reserveA, uint256 reserveB) external pur pub reserveB: alloy_sol_types::private::primitives::aliases::U256, } #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`quote(uint256,uint256,uint256)`](quoteCall) function. + ///Container type for the return parameters of the + /// [`quote(uint256,uint256,uint256)`](quoteCall) function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct quoteReturn { @@ -759,7 +744,7 @@ function quote(uint256 amountA, uint256 reserveA, uint256 reserveB) external pur clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -776,9 +761,7 @@ function quote(uint256 amountA, uint256 reserveA, uint256 reserveB) external pur ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -809,14 +792,10 @@ function quote(uint256 amountA, uint256 reserveA, uint256 reserveB) external pur #[allow(dead_code)] type UnderlyingSolTuple<'a> = (alloy_sol_types::sol_data::Uint<256>,); #[doc(hidden)] - type UnderlyingRustTuple<'a> = ( - alloy_sol_types::private::primitives::aliases::U256, - ); + 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, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -845,73 +824,72 @@ function quote(uint256 amountA, uint256 reserveA, uint256 reserveB) external pur 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 = alloy_sol_types::private::primitives::aliases::U256; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (alloy_sol_types::sol_data::Uint<256>,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "quote(uint256,uint256,uint256)"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [173u8, 97u8, 93u8, 236u8]; + const SIGNATURE: &'static str = "quote(uint256,uint256,uint256)"; + #[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.amountA), - as alloy_sol_types::SolType>::tokenize(&self.reserveA), - as alloy_sol_types::SolType>::tokenize(&self.reserveB), + as alloy_sol_types::SolType>::tokenize( + &self.amountA, + ), + as alloy_sol_types::SolType>::tokenize( + &self.reserveA, + ), + as alloy_sol_types::SolType>::tokenize( + &self.reserveB, + ), ) } + #[inline] fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { ( - as alloy_sol_types::SolType>::tokenize(ret), + 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| { + as alloy_sol_types::SolType>::abi_decode_sequence(data).map( + |r| { let r: quoteReturn = r.into(); r.amountB - }) + }, + ) } + #[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: quoteReturn = r.into(); - r.amountB - }) + 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: quoteReturn = r.into(); + r.amountB + }) } } }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `swapTokensForExactTokens(uint256,uint256,address[],address,uint256)` and selector `0x8803dbee`. -```solidity -function swapTokensForExactTokens(uint256 amountOut, uint256 amountInMax, address[] memory path, address to, uint256 deadline) external returns (uint256[] memory amounts); -```*/ + ```solidity + function swapTokensForExactTokens(uint256 amountOut, uint256 amountInMax, address[] memory path, address to, uint256 deadline) external returns (uint256[] memory amounts); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct swapTokensForExactTokensCall { @@ -927,14 +905,15 @@ function swapTokensForExactTokens(uint256 amountOut, uint256 amountInMax, addres pub deadline: alloy_sol_types::private::primitives::aliases::U256, } #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`swapTokensForExactTokens(uint256,uint256,address[],address,uint256)`](swapTokensForExactTokensCall) function. + ///Container type for the return parameters of the + /// [`swapTokensForExactTokens(uint256,uint256,address[],address, + /// uint256)`](swapTokensForExactTokensCall) function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct swapTokensForExactTokensReturn { #[allow(missing_docs)] - pub amounts: alloy_sol_types::private::Vec< - alloy_sol_types::private::primitives::aliases::U256, - >, + pub amounts: + alloy_sol_types::private::Vec, } #[allow( non_camel_case_types, @@ -943,7 +922,7 @@ function swapTokensForExactTokens(uint256 amountOut, uint256 amountInMax, addres clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -964,9 +943,7 @@ function swapTokensForExactTokens(uint256 amountOut, uint256 amountInMax, addres ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -975,8 +952,7 @@ function swapTokensForExactTokens(uint256 amountOut, uint256 amountInMax, addres } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From - for UnderlyingRustTuple<'_> { + impl ::core::convert::From for UnderlyingRustTuple<'_> { fn from(value: swapTokensForExactTokensCall) -> Self { ( value.amountOut, @@ -989,8 +965,7 @@ function swapTokensForExactTokens(uint256 amountOut, uint256 amountInMax, addres } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From> - for swapTokensForExactTokensCall { + impl ::core::convert::From> for swapTokensForExactTokensCall { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { Self { amountOut: tuple.0, @@ -1005,20 +980,15 @@ function swapTokensForExactTokens(uint256 amountOut, uint256 amountInMax, addres { #[doc(hidden)] #[allow(dead_code)] - type UnderlyingSolTuple<'a> = ( - alloy_sol_types::sol_data::Array>, - ); + type UnderlyingSolTuple<'a> = + (alloy_sol_types::sol_data::Array>,); #[doc(hidden)] type UnderlyingRustTuple<'a> = ( - alloy_sol_types::private::Vec< - alloy_sol_types::private::primitives::aliases::U256, - >, + alloy_sol_types::private::Vec, ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1027,16 +997,14 @@ function swapTokensForExactTokens(uint256 amountOut, uint256 amountInMax, addres } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From - for UnderlyingRustTuple<'_> { + impl ::core::convert::From for UnderlyingRustTuple<'_> { fn from(value: swapTokensForExactTokensReturn) -> Self { (value.amounts,) } } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From> - for swapTokensForExactTokensReturn { + impl ::core::convert::From> for swapTokensForExactTokensReturn { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { Self { amounts: tuple.0 } } @@ -1051,26 +1019,24 @@ function swapTokensForExactTokens(uint256 amountOut, uint256 amountInMax, addres 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 = alloy_sol_types::private::Vec< - alloy_sol_types::private::primitives::aliases::U256, - >; - type ReturnTuple<'a> = ( - alloy_sol_types::sol_data::Array>, - ); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "swapTokensForExactTokens(uint256,uint256,address[],address,uint256)"; + type Return = + alloy_sol_types::private::Vec; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + type ReturnTuple<'a> = + (alloy_sol_types::sol_data::Array>,); + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [136u8, 3u8, 219u8, 238u8]; + const SIGNATURE: &'static str = + "swapTokensForExactTokens(uint256,uint256,address[],address,uint256)"; + #[inline] fn new<'a>( tuple: as alloy_sol_types::SolType>::RustType, ) -> Self { tuple.into() } + #[inline] fn tokenize(&self) -> Self::Token<'_> { ( @@ -1091,41 +1057,38 @@ function swapTokensForExactTokens(uint256 amountOut, uint256 amountInMax, addres > as alloy_sol_types::SolType>::tokenize(&self.deadline), ) } + #[inline] fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { - ( - , - > as alloy_sol_types::SolType>::tokenize(ret), - ) + (, + > 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| { + as alloy_sol_types::SolType>::abi_decode_sequence(data).map( + |r| { let r: swapTokensForExactTokensReturn = r.into(); r.amounts - }) + }, + ) } + #[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: swapTokensForExactTokensReturn = r.into(); - r.amounts - }) + 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: swapTokensForExactTokensReturn = r.into(); + r.amounts + }) } } }; ///Container for all the [`TestnetUniswapV2Router02`](self) function calls. #[derive(Clone)] - #[derive()] pub enum TestnetUniswapV2Router02Calls { #[allow(missing_docs)] WETH(WETHCall), @@ -1141,8 +1104,9 @@ function swapTokensForExactTokens(uint256 amountOut, uint256 amountInMax, addres impl TestnetUniswapV2Router02Calls { /// 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. + /// 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]] = &[ @@ -1152,14 +1116,6 @@ function swapTokensForExactTokens(uint256 amountOut, uint256 amountInMax, addres [196u8, 90u8, 1u8, 85u8], [232u8, 227u8, 55u8, 0u8], ]; - /// The names of the variants in the same order as `SELECTORS`. - pub const VARIANT_NAMES: &'static [&'static str] = &[ - ::core::stringify!(swapTokensForExactTokens), - ::core::stringify!(WETH), - ::core::stringify!(quote), - ::core::stringify!(factory), - ::core::stringify!(addLiquidity), - ]; /// The signatures in the same order as `SELECTORS`. pub const SIGNATURES: &'static [&'static str] = &[ ::SIGNATURE, @@ -1168,6 +1124,15 @@ function swapTokensForExactTokens(uint256 amountOut, uint256 amountInMax, addres ::SIGNATURE, ::SIGNATURE, ]; + /// The names of the variants in the same order as `SELECTORS`. + pub const VARIANT_NAMES: &'static [&'static str] = &[ + ::core::stringify!(swapTokensForExactTokens), + ::core::stringify!(WETH), + ::core::stringify!(quote), + ::core::stringify!(factory), + ::core::stringify!(addLiquidity), + ]; + /// Returns the signature for the given selector, if known. #[inline] pub fn signature_by_selector( @@ -1180,27 +1145,25 @@ function swapTokensForExactTokens(uint256 amountOut, uint256 amountInMax, addres ::core::result::Result::Err(_) => ::core::option::Option::None, } } + /// Returns the enum variant name for the given selector, if known. #[inline] - pub fn name_by_selector( - selector: [u8; 4usize], - ) -> ::core::option::Option<&'static str> { + pub fn name_by_selector(selector: [u8; 4usize]) -> ::core::option::Option<&'static str> { let sig = Self::signature_by_selector(selector)?; sig.split_once('(').map(|(name, _)| name) } } #[automatically_derived] impl alloy_sol_types::SolInterface for TestnetUniswapV2Router02Calls { - const NAME: &'static str = "TestnetUniswapV2Router02Calls"; - const MIN_DATA_LENGTH: usize = 0usize; const COUNT: usize = 5usize; + const MIN_DATA_LENGTH: usize = 0usize; + const NAME: &'static str = "TestnetUniswapV2Router02Calls"; + #[inline] fn selector(&self) -> [u8; 4] { match self { Self::WETH(_) => ::SELECTOR, - Self::addLiquidity(_) => { - ::SELECTOR - } + Self::addLiquidity(_) => ::SELECTOR, Self::factory(_) => ::SELECTOR, Self::quote(_) => ::SELECTOR, Self::swapTokensForExactTokens(_) => { @@ -1208,38 +1171,38 @@ function swapTokensForExactTokens(uint256 amountOut, uint256 amountInMax, addres } } } + #[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 { + fn abi_decode_raw(selector: [u8; 4], data: &[u8]) -> alloy_sol_types::Result { static DECODE_SHIMS: &[fn( &[u8], - ) -> alloy_sol_types::Result] = &[ + ) + -> alloy_sol_types::Result] = &[ { fn swapTokensForExactTokens( data: &[u8], - ) -> alloy_sol_types::Result { + ) -> alloy_sol_types::Result + { ::abi_decode_raw( - data, - ) - .map(TestnetUniswapV2Router02Calls::swapTokensForExactTokens) + data, + ) + .map(TestnetUniswapV2Router02Calls::swapTokensForExactTokens) } swapTokensForExactTokens }, { - fn WETH( - data: &[u8], - ) -> alloy_sol_types::Result { + fn WETH(data: &[u8]) -> alloy_sol_types::Result { ::abi_decode_raw(data) .map(TestnetUniswapV2Router02Calls::WETH) } @@ -1248,7 +1211,8 @@ function swapTokensForExactTokens(uint256 amountOut, uint256 amountInMax, addres { fn quote( data: &[u8], - ) -> alloy_sol_types::Result { + ) -> alloy_sol_types::Result + { ::abi_decode_raw(data) .map(TestnetUniswapV2Router02Calls::quote) } @@ -1257,7 +1221,8 @@ function swapTokensForExactTokens(uint256 amountOut, uint256 amountInMax, addres { fn factory( data: &[u8], - ) -> alloy_sol_types::Result { + ) -> alloy_sol_types::Result + { ::abi_decode_raw(data) .map(TestnetUniswapV2Router02Calls::factory) } @@ -1266,25 +1231,23 @@ function swapTokensForExactTokens(uint256 amountOut, uint256 amountInMax, addres { fn addLiquidity( data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, - ) + ) -> alloy_sol_types::Result + { + ::abi_decode_raw(data) .map(TestnetUniswapV2Router02Calls::addLiquidity) } addLiquidity }, ]; let Ok(idx) = Self::SELECTORS.binary_search(&selector) else { - return Err( - alloy_sol_types::Error::unknown_selector( - ::NAME, - selector, - ), - ); + return Err(alloy_sol_types::Error::unknown_selector( + ::NAME, + selector, + )); }; DECODE_SHIMS[idx](data) } + #[inline] #[allow(non_snake_case)] fn abi_decode_raw_validate( @@ -1293,11 +1256,14 @@ function swapTokensForExactTokens(uint256 amountOut, uint256 amountInMax, addres ) -> alloy_sol_types::Result { static DECODE_VALIDATE_SHIMS: &[fn( &[u8], - ) -> alloy_sol_types::Result] = &[ + ) -> alloy_sol_types::Result< + TestnetUniswapV2Router02Calls, + >] = &[ { fn swapTokensForExactTokens( data: &[u8], - ) -> alloy_sol_types::Result { + ) -> alloy_sol_types::Result + { ::abi_decode_raw_validate( data, ) @@ -1306,12 +1272,8 @@ function swapTokensForExactTokens(uint256 amountOut, uint256 amountInMax, addres swapTokensForExactTokens }, { - fn WETH( - data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) + fn WETH(data: &[u8]) -> alloy_sol_types::Result { + ::abi_decode_raw_validate(data) .map(TestnetUniswapV2Router02Calls::WETH) } WETH @@ -1319,10 +1281,9 @@ function swapTokensForExactTokens(uint256 amountOut, uint256 amountInMax, addres { fn quote( data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) + ) -> alloy_sol_types::Result + { + ::abi_decode_raw_validate(data) .map(TestnetUniswapV2Router02Calls::quote) } quote @@ -1330,10 +1291,9 @@ function swapTokensForExactTokens(uint256 amountOut, uint256 amountInMax, addres { fn factory( data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) + ) -> alloy_sol_types::Result + { + ::abi_decode_raw_validate(data) .map(TestnetUniswapV2Router02Calls::factory) } factory @@ -1341,25 +1301,25 @@ function swapTokensForExactTokens(uint256 amountOut, uint256 amountInMax, addres { fn addLiquidity( data: &[u8], - ) -> alloy_sol_types::Result { + ) -> alloy_sol_types::Result + { ::abi_decode_raw_validate( - data, - ) - .map(TestnetUniswapV2Router02Calls::addLiquidity) + data, + ) + .map(TestnetUniswapV2Router02Calls::addLiquidity) } addLiquidity }, ]; let Ok(idx) = Self::SELECTORS.binary_search(&selector) else { - return Err( - alloy_sol_types::Error::unknown_selector( - ::NAME, - selector, - ), - ); + return Err(alloy_sol_types::Error::unknown_selector( + ::NAME, + selector, + )); }; DECODE_VALIDATE_SHIMS[idx](data) } + #[inline] fn abi_encoded_size(&self) -> usize { match self { @@ -1367,9 +1327,7 @@ function swapTokensForExactTokens(uint256 amountOut, uint256 amountInMax, addres ::abi_encoded_size(inner) } Self::addLiquidity(inner) => { - ::abi_encoded_size( - inner, - ) + ::abi_encoded_size(inner) } Self::factory(inner) => { ::abi_encoded_size(inner) @@ -1384,6 +1342,7 @@ function swapTokensForExactTokens(uint256 amountOut, uint256 amountInMax, addres } } } + #[inline] fn abi_encode_raw(&self, out: &mut alloy_sol_types::private::Vec) { match self { @@ -1391,10 +1350,7 @@ function swapTokensForExactTokens(uint256 amountOut, uint256 amountInMax, addres ::abi_encode_raw(inner, out) } Self::addLiquidity(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } Self::factory(inner) => { ::abi_encode_raw(inner, out) @@ -1404,17 +1360,16 @@ function swapTokensForExactTokens(uint256 amountOut, uint256 amountInMax, addres } Self::swapTokensForExactTokens(inner) => { ::abi_encode_raw( - inner, - out, + inner, out, ) } } } } - use alloy_contract as alloy_contract; + use alloy_contract; /**Creates a new wrapper around an on-chain [`TestnetUniswapV2Router02`](self) contract instance. -See the [wrapper's documentation](`TestnetUniswapV2Router02Instance`) for more details.*/ + See the [wrapper's documentation](`TestnetUniswapV2Router02Instance`) for more details.*/ #[inline] pub const fn new< P: alloy_contract::private::Provider, @@ -1427,20 +1382,17 @@ See the [wrapper's documentation](`TestnetUniswapV2Router02Instance`) for more d } /**A [`TestnetUniswapV2Router02`](self) instance. -Contains type-safe methods for interacting with an on-chain instance of the -[`TestnetUniswapV2Router02`](self) contract located at a given `address`, using a given -provider `P`. + Contains type-safe methods for interacting with an on-chain instance of the + [`TestnetUniswapV2Router02`](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. + 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.*/ + See the [module-level documentation](self) for all the available methods.*/ #[derive(Clone)] - pub struct TestnetUniswapV2Router02Instance< - P, - N = alloy_contract::private::Ethereum, - > { + pub struct TestnetUniswapV2Router02Instance { address: alloy_sol_types::private::Address, provider: P, _network: ::core::marker::PhantomData, @@ -1455,39 +1407,39 @@ See the [module-level documentation](self) for all the available methods.*/ } } /// Instantiation and getters/setters. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > TestnetUniswapV2Router02Instance { + impl, N: alloy_contract::private::Network> + TestnetUniswapV2Router02Instance + { /**Creates a new wrapper around an on-chain [`TestnetUniswapV2Router02`](self) contract instance. -See the [wrapper's documentation](`TestnetUniswapV2Router02Instance`) for more details.*/ + See the [wrapper's documentation](`TestnetUniswapV2Router02Instance`) for more details.*/ #[inline] - pub const fn new( - address: alloy_sol_types::private::Address, - __provider: P, - ) -> Self { + pub const fn new(address: alloy_sol_types::private::Address, __provider: P) -> Self { Self { address, provider: __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 { @@ -1495,7 +1447,8 @@ See the [wrapper's documentation](`TestnetUniswapV2Router02Instance`) for more d } } impl TestnetUniswapV2Router02Instance<&P, N> { - /// Clones the provider and returns a new instance with the cloned provider. + /// Clones the provider and returns a new instance with the cloned + /// provider. #[inline] pub fn with_cloned_provider(self) -> TestnetUniswapV2Router02Instance { TestnetUniswapV2Router02Instance { @@ -1506,24 +1459,27 @@ See the [wrapper's documentation](`TestnetUniswapV2Router02Instance`) for more d } } /// Function calls. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > TestnetUniswapV2Router02Instance { - /// Creates a new call builder using this contract instance's provider and address. + impl, N: alloy_contract::private::Network> + TestnetUniswapV2Router02Instance + { + /// 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. + /// 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 [`WETH`] function. pub fn WETH(&self) -> alloy_contract::SolCallBuilder<&P, WETHCall, N> { self.call_builder(&WETHCall) } + ///Creates a new call builder for the [`addLiquidity`] function. pub fn addLiquidity( &self, @@ -1536,23 +1492,23 @@ See the [wrapper's documentation](`TestnetUniswapV2Router02Instance`) for more d to: alloy_sol_types::private::Address, deadline: alloy_sol_types::private::primitives::aliases::U256, ) -> alloy_contract::SolCallBuilder<&P, addLiquidityCall, N> { - self.call_builder( - &addLiquidityCall { - tokenA, - tokenB, - amountADesired, - amountBDesired, - amountAMin, - amountBMin, - to, - deadline, - }, - ) + self.call_builder(&addLiquidityCall { + tokenA, + tokenB, + amountADesired, + amountBDesired, + amountAMin, + amountBMin, + to, + deadline, + }) } + ///Creates a new call builder for the [`factory`] function. pub fn factory(&self) -> alloy_contract::SolCallBuilder<&P, factoryCall, N> { self.call_builder(&factoryCall) } + ///Creates a new call builder for the [`quote`] function. pub fn quote( &self, @@ -1560,15 +1516,15 @@ See the [wrapper's documentation](`TestnetUniswapV2Router02Instance`) for more d reserveA: alloy_sol_types::private::primitives::aliases::U256, reserveB: alloy_sol_types::private::primitives::aliases::U256, ) -> alloy_contract::SolCallBuilder<&P, quoteCall, N> { - self.call_builder( - "eCall { - amountA, - reserveA, - reserveB, - }, - ) + self.call_builder("eCall { + amountA, + reserveA, + reserveB, + }) } - ///Creates a new call builder for the [`swapTokensForExactTokens`] function. + + ///Creates a new call builder for the [`swapTokensForExactTokens`] + /// function. pub fn swapTokensForExactTokens( &self, amountOut: alloy_sol_types::private::primitives::aliases::U256, @@ -1577,26 +1533,25 @@ See the [wrapper's documentation](`TestnetUniswapV2Router02Instance`) for more d to: alloy_sol_types::private::Address, deadline: alloy_sol_types::private::primitives::aliases::U256, ) -> alloy_contract::SolCallBuilder<&P, swapTokensForExactTokensCall, N> { - self.call_builder( - &swapTokensForExactTokensCall { - amountOut, - amountInMax, - path, - to, - deadline, - }, - ) + self.call_builder(&swapTokensForExactTokensCall { + amountOut, + amountInMax, + path, + to, + deadline, + }) } } /// Event filters. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > TestnetUniswapV2Router02Instance { - /// Creates a new event filter using this contract instance's provider and address. + impl, N: alloy_contract::private::Network> + TestnetUniswapV2Router02Instance + { + /// 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. + /// 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> { @@ -1604,25 +1559,20 @@ See the [wrapper's documentation](`TestnetUniswapV2Router02Instance`) for more d } } } -pub type Instance = TestnetUniswapV2Router02::TestnetUniswapV2Router02Instance< - ::alloy_provider::DynProvider, ->; +pub type Instance = + TestnetUniswapV2Router02::TestnetUniswapV2Router02Instance<::alloy_provider::DynProvider>; use { - std::{sync::LazyLock, collections::HashMap}, - anyhow::{Result, Context}, - alloy_primitives::{address, Address}, - alloy_provider::{Provider, DynProvider}, + alloy_primitives::{Address, address}, + alloy_provider::{DynProvider, Provider}, + anyhow::{Context, Result}, + std::{collections::HashMap, sync::LazyLock}, }; pub const fn deployment_info(chain_id: u64) -> Option<(Address, Option)> { match chain_id { - 11155111u64 => { - Some(( - ::alloy_primitives::address!( - "0x86dcd3293C53Cf8EFd7303B57beb2a3F671dDE98" - ), - None, - )) - } + 11155111u64 => Some(( + ::alloy_primitives::address!("0x86dcd3293C53Cf8EFd7303B57beb2a3F671dDE98"), + None, + )), _ => None, } } @@ -1639,9 +1589,7 @@ pub const fn deployment_block(chain_id: &u64) -> Option { } } impl Instance { - pub fn deployed( - provider: &DynProvider, - ) -> impl Future> + Send { + pub fn deployed(provider: &DynProvider) -> impl Future> + Send { async move { let chain_id = provider .get_chain_id() diff --git a/contracts/generated/contracts-generated/trader/src/lib.rs b/contracts/generated/contracts-generated/trader/src/lib.rs index b8f6056168..9583bc614e 100644 --- a/contracts/generated/contracts-generated/trader/src/lib.rs +++ b/contracts/generated/contracts-generated/trader/src/lib.rs @@ -1,4 +1,10 @@ -#![allow(unused_imports, unused_attributes, clippy::all, rustdoc::all, non_snake_case)] +#![allow( + unused_imports, + unused_attributes, + clippy::all, + rustdoc::all, + non_snake_case +)] //! Auto-generated contract bindings. Do not edit. /** @@ -116,8 +122,7 @@ interface Trader { clippy::empty_structs_with_brackets )] pub mod Trader { - use super::*; - use alloy_sol_types as alloy_sol_types; + use {super::*, alloy_sol_types}; /// The creation / init bytecode of the contract. /// /// ```text @@ -140,9 +145,9 @@ pub mod Trader { ); #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `ensureTradePreconditions(address,address,uint256,address,address)` and selector `0x542eb77d`. -```solidity -function ensureTradePreconditions(address settlementContract, address sellToken, uint256 sellAmount, address nativeToken, address spardose) external; -```*/ + ```solidity + function ensureTradePreconditions(address settlementContract, address sellToken, uint256 sellAmount, address nativeToken, address spardose) external; + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct ensureTradePreconditionsCall { @@ -157,7 +162,9 @@ function ensureTradePreconditions(address settlementContract, address sellToken, #[allow(missing_docs)] pub spardose: alloy_sol_types::private::Address, } - ///Container type for the return parameters of the [`ensureTradePreconditions(address,address,uint256,address,address)`](ensureTradePreconditionsCall) function. + ///Container type for the return parameters of the + /// [`ensureTradePreconditions(address,address,uint256,address, + /// address)`](ensureTradePreconditionsCall) function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct ensureTradePreconditionsReturn {} @@ -168,7 +175,7 @@ function ensureTradePreconditions(address settlementContract, address sellToken, clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -189,9 +196,7 @@ function ensureTradePreconditions(address settlementContract, address sellToken, ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -200,8 +205,7 @@ function ensureTradePreconditions(address settlementContract, address sellToken, } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From - for UnderlyingRustTuple<'_> { + impl ::core::convert::From for UnderlyingRustTuple<'_> { fn from(value: ensureTradePreconditionsCall) -> Self { ( value.settlementContract, @@ -214,8 +218,7 @@ function ensureTradePreconditions(address settlementContract, address sellToken, } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From> - for ensureTradePreconditionsCall { + impl ::core::convert::From> for ensureTradePreconditionsCall { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { Self { settlementContract: tuple.0, @@ -235,9 +238,7 @@ function ensureTradePreconditions(address settlementContract, address sellToken, type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -246,16 +247,14 @@ function ensureTradePreconditions(address settlementContract, address sellToken, } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From - for UnderlyingRustTuple<'_> { + impl ::core::convert::From for UnderlyingRustTuple<'_> { fn from(value: ensureTradePreconditionsReturn) -> Self { () } } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From> - for ensureTradePreconditionsReturn { + impl ::core::convert::From> for ensureTradePreconditionsReturn { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { Self {} } @@ -264,9 +263,8 @@ function ensureTradePreconditions(address settlementContract, address sellToken, impl ensureTradePreconditionsReturn { fn _tokenize( &self, - ) -> ::ReturnToken< - '_, - > { + ) -> ::ReturnToken<'_> + { () } } @@ -279,22 +277,22 @@ function ensureTradePreconditions(address settlementContract, address sellToken, alloy_sol_types::sol_data::Address, alloy_sol_types::sol_data::Address, ); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = ensureTradePreconditionsReturn; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "ensureTradePreconditions(address,address,uint256,address,address)"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [84u8, 46u8, 183u8, 125u8]; + const SIGNATURE: &'static str = + "ensureTradePreconditions(address,address,uint256,address,address)"; + #[inline] fn new<'a>( tuple: as alloy_sol_types::SolType>::RustType, ) -> Self { tuple.into() } + #[inline] fn tokenize(&self) -> Self::Token<'_> { ( @@ -304,9 +302,9 @@ function ensureTradePreconditions(address settlementContract, address sellToken, ::tokenize( &self.sellToken, ), - as alloy_sol_types::SolType>::tokenize(&self.sellAmount), + as alloy_sol_types::SolType>::tokenize( + &self.sellAmount, + ), ::tokenize( &self.nativeToken, ), @@ -315,33 +313,32 @@ function ensureTradePreconditions(address settlementContract, address sellToken, ), ) } + #[inline] fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { ensureTradePreconditionsReturn::_tokenize(ret) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) + 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) + 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(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `isValidSignature(bytes32,bytes)` and selector `0x1626ba7e`. -```solidity -function isValidSignature(bytes32, bytes memory) external pure returns (bytes4); -```*/ + ```solidity + function isValidSignature(bytes32, bytes memory) external pure returns (bytes4); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct isValidSignatureCall { @@ -351,7 +348,8 @@ function isValidSignature(bytes32, bytes memory) external pure returns (bytes4); pub _1: alloy_sol_types::private::Bytes, } #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`isValidSignature(bytes32,bytes)`](isValidSignatureCall) function. + ///Container type for the return parameters of the + /// [`isValidSignature(bytes32,bytes)`](isValidSignatureCall) function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct isValidSignatureReturn { @@ -365,7 +363,7 @@ function isValidSignature(bytes32, bytes memory) external pure returns (bytes4); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -380,9 +378,7 @@ function isValidSignature(bytes32, bytes memory) external pure returns (bytes4); ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -391,18 +387,19 @@ function isValidSignature(bytes32, bytes memory) external pure returns (bytes4); } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From - for UnderlyingRustTuple<'_> { + impl ::core::convert::From for UnderlyingRustTuple<'_> { fn from(value: isValidSignatureCall) -> Self { (value._0, value._1) } } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From> - for isValidSignatureCall { + impl ::core::convert::From> for isValidSignatureCall { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { - Self { _0: tuple.0, _1: tuple.1 } + Self { + _0: tuple.0, + _1: tuple.1, + } } } } @@ -414,9 +411,7 @@ function isValidSignature(bytes32, bytes memory) external pure returns (bytes4); 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, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -425,16 +420,14 @@ function isValidSignature(bytes32, bytes memory) external pure returns (bytes4); } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From - for UnderlyingRustTuple<'_> { + impl ::core::convert::From for UnderlyingRustTuple<'_> { fn from(value: isValidSignatureReturn) -> Self { (value._0,) } } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From> - for isValidSignatureReturn { + impl ::core::convert::From> for isValidSignatureReturn { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { Self { _0: tuple.0 } } @@ -446,22 +439,21 @@ function isValidSignature(bytes32, bytes memory) external pure returns (bytes4); alloy_sol_types::sol_data::FixedBytes<32>, alloy_sol_types::sol_data::Bytes, ); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = alloy_sol_types::private::FixedBytes<4>; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (alloy_sol_types::sol_data::FixedBytes<4>,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "isValidSignature(bytes32,bytes)"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [22u8, 38u8, 186u8, 126u8]; + const SIGNATURE: &'static str = "isValidSignature(bytes32,bytes)"; + #[inline] fn new<'a>( tuple: as alloy_sol_types::SolType>::RustType, ) -> Self { tuple.into() } + #[inline] fn tokenize(&self) -> Self::Token<'_> { ( @@ -473,6 +465,7 @@ function isValidSignature(bytes32, bytes memory) external pure returns (bytes4); ), ) } + #[inline] fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { ( @@ -481,35 +474,34 @@ function isValidSignature(bytes32, bytes memory) external pure returns (bytes4); > 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| { + as alloy_sol_types::SolType>::abi_decode_sequence(data).map( + |r| { let r: isValidSignatureReturn = 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: isValidSignatureReturn = r.into(); - r._0 - }) + 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: isValidSignatureReturn = r.into(); + r._0 + }) } } }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `safeApprove(address,address,uint256)` and selector `0xeb5625d9`. -```solidity -function safeApprove(address token, address vaultRelayer, uint256 amount) external; -```*/ + ```solidity + function safeApprove(address token, address vaultRelayer, uint256 amount) external; + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct safeApproveCall { @@ -520,7 +512,8 @@ function safeApprove(address token, address vaultRelayer, uint256 amount) extern #[allow(missing_docs)] pub amount: alloy_sol_types::private::primitives::aliases::U256, } - ///Container type for the return parameters of the [`safeApprove(address,address,uint256)`](safeApproveCall) function. + ///Container type for the return parameters of the + /// [`safeApprove(address,address,uint256)`](safeApproveCall) function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct safeApproveReturn {} @@ -531,7 +524,7 @@ function safeApprove(address token, address vaultRelayer, uint256 amount) extern clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -548,9 +541,7 @@ function safeApprove(address token, address vaultRelayer, uint256 amount) extern ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -584,9 +575,7 @@ function safeApprove(address token, address vaultRelayer, uint256 amount) extern type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -609,9 +598,7 @@ function safeApprove(address token, address vaultRelayer, uint256 amount) extern } } impl safeApproveReturn { - fn _tokenize( - &self, - ) -> ::ReturnToken<'_> { + fn _tokenize(&self) -> ::ReturnToken<'_> { () } } @@ -622,22 +609,21 @@ function safeApprove(address token, address vaultRelayer, uint256 amount) extern 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 = safeApproveReturn; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "safeApprove(address,address,uint256)"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [235u8, 86u8, 37u8, 217u8]; + const SIGNATURE: &'static str = "safeApprove(address,address,uint256)"; + #[inline] fn new<'a>( tuple: as alloy_sol_types::SolType>::RustType, ) -> Self { tuple.into() } + #[inline] fn tokenize(&self) -> Self::Token<'_> { ( @@ -647,36 +633,34 @@ function safeApprove(address token, address vaultRelayer, uint256 amount) extern ::tokenize( &self.vaultRelayer, ), - as alloy_sol_types::SolType>::tokenize(&self.amount), + as alloy_sol_types::SolType>::tokenize( + &self.amount, + ), ) } + #[inline] fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { safeApproveReturn::_tokenize(ret) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) + 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) + 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 [`Trader`](self) function calls. #[derive(Clone)] - #[derive()] pub enum TraderCalls { #[allow(missing_docs)] ensureTradePreconditions(ensureTradePreconditionsCall), @@ -688,8 +672,9 @@ function safeApprove(address token, address vaultRelayer, uint256 amount) extern impl TraderCalls { /// 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. + /// 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]] = &[ @@ -697,18 +682,19 @@ function safeApprove(address token, address vaultRelayer, uint256 amount) extern [84u8, 46u8, 183u8, 125u8], [235u8, 86u8, 37u8, 217u8], ]; - /// The names of the variants in the same order as `SELECTORS`. - pub const VARIANT_NAMES: &'static [&'static str] = &[ - ::core::stringify!(isValidSignature), - ::core::stringify!(ensureTradePreconditions), - ::core::stringify!(safeApprove), - ]; /// The signatures in the same order as `SELECTORS`. pub const SIGNATURES: &'static [&'static str] = &[ ::SIGNATURE, ::SIGNATURE, ::SIGNATURE, ]; + /// The names of the variants in the same order as `SELECTORS`. + pub const VARIANT_NAMES: &'static [&'static str] = &[ + ::core::stringify!(isValidSignature), + ::core::stringify!(ensureTradePreconditions), + ::core::stringify!(safeApprove), + ]; + /// Returns the signature for the given selector, if known. #[inline] pub fn signature_by_selector( @@ -721,20 +707,20 @@ function safeApprove(address token, address vaultRelayer, uint256 amount) extern ::core::result::Result::Err(_) => ::core::option::Option::None, } } + /// Returns the enum variant name for the given selector, if known. #[inline] - pub fn name_by_selector( - selector: [u8; 4usize], - ) -> ::core::option::Option<&'static str> { + pub fn name_by_selector(selector: [u8; 4usize]) -> ::core::option::Option<&'static str> { let sig = Self::signature_by_selector(selector)?; sig.split_once('(').map(|(name, _)| name) } } #[automatically_derived] impl alloy_sol_types::SolInterface for TraderCalls { - const NAME: &'static str = "TraderCalls"; - const MIN_DATA_LENGTH: usize = 96usize; const COUNT: usize = 3usize; + const MIN_DATA_LENGTH: usize = 96usize; + const NAME: &'static str = "TraderCalls"; + #[inline] fn selector(&self) -> [u8; 4] { match self { @@ -744,33 +730,27 @@ function safeApprove(address token, address vaultRelayer, uint256 amount) extern Self::isValidSignature(_) => { ::SELECTOR } - Self::safeApprove(_) => { - ::SELECTOR - } + Self::safeApprove(_) => ::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 { + fn abi_decode_raw(selector: [u8; 4], data: &[u8]) -> alloy_sol_types::Result { static DECODE_SHIMS: &[fn(&[u8]) -> alloy_sol_types::Result] = &[ { - fn isValidSignature( - data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, - ) + fn isValidSignature(data: &[u8]) -> alloy_sol_types::Result { + ::abi_decode_raw(data) .map(TraderCalls::isValidSignature) } isValidSignature @@ -780,49 +760,42 @@ function safeApprove(address token, address vaultRelayer, uint256 amount) extern data: &[u8], ) -> alloy_sol_types::Result { ::abi_decode_raw( - data, - ) - .map(TraderCalls::ensureTradePreconditions) + data, + ) + .map(TraderCalls::ensureTradePreconditions) } ensureTradePreconditions }, { fn safeApprove(data: &[u8]) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, - ) + ::abi_decode_raw(data) .map(TraderCalls::safeApprove) } safeApprove }, ]; let Ok(idx) = Self::SELECTORS.binary_search(&selector) else { - return Err( - alloy_sol_types::Error::unknown_selector( - ::NAME, - selector, - ), - ); + 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] = &[ + static DECODE_VALIDATE_SHIMS: &[fn(&[u8]) -> alloy_sol_types::Result] = &[ { - fn isValidSignature( - data: &[u8], - ) -> alloy_sol_types::Result { + fn isValidSignature(data: &[u8]) -> alloy_sol_types::Result { ::abi_decode_raw_validate( - data, - ) - .map(TraderCalls::isValidSignature) + data, + ) + .map(TraderCalls::isValidSignature) } isValidSignature }, @@ -839,24 +812,21 @@ function safeApprove(address token, address vaultRelayer, uint256 amount) extern }, { fn safeApprove(data: &[u8]) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) + ::abi_decode_raw_validate(data) .map(TraderCalls::safeApprove) } safeApprove }, ]; let Ok(idx) = Self::SELECTORS.binary_search(&selector) else { - return Err( - alloy_sol_types::Error::unknown_selector( - ::NAME, - selector, - ), - ); + return Err(alloy_sol_types::Error::unknown_selector( + ::NAME, + selector, + )); }; DECODE_VALIDATE_SHIMS[idx](data) } + #[inline] fn abi_encoded_size(&self) -> usize { match self { @@ -866,45 +836,35 @@ function safeApprove(address token, address vaultRelayer, uint256 amount) extern ) } Self::isValidSignature(inner) => { - ::abi_encoded_size( - inner, - ) + ::abi_encoded_size(inner) } Self::safeApprove(inner) => { - ::abi_encoded_size( - inner, - ) + ::abi_encoded_size(inner) } } } + #[inline] fn abi_encode_raw(&self, out: &mut alloy_sol_types::private::Vec) { match self { Self::ensureTradePreconditions(inner) => { ::abi_encode_raw( - inner, - out, + inner, out, ) } Self::isValidSignature(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } Self::safeApprove(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } } } } - use alloy_contract as alloy_contract; + use alloy_contract; /**Creates a new wrapper around an on-chain [`Trader`](self) contract instance. -See the [wrapper's documentation](`TraderInstance`) for more details.*/ + See the [wrapper's documentation](`TraderInstance`) for more details.*/ #[inline] pub const fn new< P: alloy_contract::private::Provider, @@ -917,43 +877,40 @@ See the [wrapper's documentation](`TraderInstance`) for more details.*/ } /**Deploys this contract using the given `provider` and constructor arguments, if any. -Returns a new instance of the contract, if the deployment was successful. + 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.*/ + 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, - >( + pub fn deploy, N: alloy_contract::private::Network>( __provider: P, - ) -> impl ::core::future::Future< - Output = alloy_contract::Result>, - > { + ) -> impl ::core::future::Future>> { TraderInstance::::deploy(__provider) } /**Creates a `RawCallBuilder` for deploying this contract using the given `provider` -and constructor arguments, if any. + 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.*/ + 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) -> alloy_contract::RawCallBuilder { + >( + __provider: P, + ) -> alloy_contract::RawCallBuilder { TraderInstance::::deploy_builder(__provider) } /**A [`Trader`](self) instance. -Contains type-safe methods for interacting with an on-chain instance of the -[`Trader`](self) contract located at a given `address`, using a given -provider `P`. + Contains type-safe methods for interacting with an on-chain instance of the + [`Trader`](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. + 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.*/ + See the [module-level documentation](self) for all the available methods.*/ #[derive(Clone)] pub struct TraderInstance { address: alloy_sol_types::private::Address, @@ -964,46 +921,44 @@ See the [module-level documentation](self) for all the available methods.*/ impl ::core::fmt::Debug for TraderInstance { #[inline] fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { - f.debug_tuple("TraderInstance").field(&self.address).finish() + f.debug_tuple("TraderInstance") + .field(&self.address) + .finish() } } /// Instantiation and getters/setters. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > TraderInstance { + impl, N: alloy_contract::private::Network> + TraderInstance + { /**Creates a new wrapper around an on-chain [`Trader`](self) contract instance. -See the [wrapper's documentation](`TraderInstance`) for more details.*/ + See the [wrapper's documentation](`TraderInstance`) for more details.*/ #[inline] - pub const fn new( - address: alloy_sol_types::private::Address, - __provider: P, - ) -> Self { + pub const fn new(address: alloy_sol_types::private::Address, __provider: P) -> Self { Self { address, provider: __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. + 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.*/ + For more fine-grained control over the deployment process, use [`deploy_builder`] instead.*/ #[inline] - pub async fn deploy( - __provider: P, - ) -> alloy_contract::Result> { + 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. + 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.*/ + 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( @@ -1011,21 +966,25 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ ::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 { @@ -1033,7 +992,8 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ } } impl TraderInstance<&P, N> { - /// Clones the provider and returns a new instance with the cloned provider. + /// Clones the provider and returns a new instance with the cloned + /// provider. #[inline] pub fn with_cloned_provider(self) -> TraderInstance { TraderInstance { @@ -1044,21 +1004,24 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ } } /// Function calls. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > TraderInstance { - /// Creates a new call builder using this contract instance's provider and address. + impl, N: alloy_contract::private::Network> + TraderInstance + { + /// 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. + /// 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 [`ensureTradePreconditions`] function. + + ///Creates a new call builder for the [`ensureTradePreconditions`] + /// function. pub fn ensureTradePreconditions( &self, settlementContract: alloy_sol_types::private::Address, @@ -1067,16 +1030,15 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ nativeToken: alloy_sol_types::private::Address, spardose: alloy_sol_types::private::Address, ) -> alloy_contract::SolCallBuilder<&P, ensureTradePreconditionsCall, N> { - self.call_builder( - &ensureTradePreconditionsCall { - settlementContract, - sellToken, - sellAmount, - nativeToken, - spardose, - }, - ) + self.call_builder(&ensureTradePreconditionsCall { + settlementContract, + sellToken, + sellAmount, + nativeToken, + spardose, + }) } + ///Creates a new call builder for the [`isValidSignature`] function. pub fn isValidSignature( &self, @@ -1085,6 +1047,7 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ ) -> alloy_contract::SolCallBuilder<&P, isValidSignatureCall, N> { self.call_builder(&isValidSignatureCall { _0, _1 }) } + ///Creates a new call builder for the [`safeApprove`] function. pub fn safeApprove( &self, @@ -1092,24 +1055,23 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ vaultRelayer: alloy_sol_types::private::Address, amount: alloy_sol_types::private::primitives::aliases::U256, ) -> alloy_contract::SolCallBuilder<&P, safeApproveCall, N> { - self.call_builder( - &safeApproveCall { - token, - vaultRelayer, - amount, - }, - ) + self.call_builder(&safeApproveCall { + token, + vaultRelayer, + amount, + }) } } /// Event filters. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > TraderInstance { - /// Creates a new event filter using this contract instance's provider and address. + impl, N: alloy_contract::private::Network> + TraderInstance + { + /// 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. + /// 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> { diff --git a/contracts/generated/contracts-generated/uniswapv2factory/src/lib.rs b/contracts/generated/contracts-generated/uniswapv2factory/src/lib.rs index 43f0232c11..910bde2c93 100644 --- a/contracts/generated/contracts-generated/uniswapv2factory/src/lib.rs +++ b/contracts/generated/contracts-generated/uniswapv2factory/src/lib.rs @@ -1,4 +1,10 @@ -#![allow(unused_imports, unused_attributes, clippy::all, rustdoc::all, non_snake_case)] +#![allow( + unused_imports, + unused_attributes, + clippy::all, + rustdoc::all, + non_snake_case +)] //! Auto-generated contract bindings. Do not edit. /** @@ -117,8 +123,7 @@ interface UniswapV2Factory { clippy::empty_structs_with_brackets )] pub mod UniswapV2Factory { - use super::*; - use alloy_sol_types as alloy_sol_types; + use {super::*, alloy_sol_types}; /// The creation / init bytecode of the contract. /// /// ```text @@ -131,9 +136,9 @@ pub mod UniswapV2Factory { ); #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Event with signature `PairCreated(address,address,address,uint256)` and selector `0x0d3648bd0f6ba80134a33ba9275ac585d9d315f0ad8355cddefde31afa28d0e9`. -```solidity -event PairCreated(address indexed token0, address indexed token1, address pair, uint256); -```*/ + ```solidity + event PairCreated(address indexed token0, address indexed token1, address pair, uint256); + ```*/ #[allow( non_camel_case_types, non_snake_case, @@ -158,28 +163,29 @@ event PairCreated(address indexed token0, address indexed token1, address pair, clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[automatically_derived] impl alloy_sol_types::SolEvent for PairCreated { + type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type DataTuple<'a> = ( alloy_sol_types::sol_data::Address, 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 = "PairCreated(address,address,address,uint256)"; - const SIGNATURE_HASH: alloy_sol_types::private::B256 = alloy_sol_types::private::B256::new([ - 13u8, 54u8, 72u8, 189u8, 15u8, 107u8, 168u8, 1u8, 52u8, 163u8, 59u8, - 169u8, 39u8, 90u8, 197u8, 133u8, 217u8, 211u8, 21u8, 240u8, 173u8, 131u8, - 85u8, 205u8, 222u8, 253u8, 227u8, 26u8, 250u8, 40u8, 208u8, 233u8, - ]); + const ANONYMOUS: bool = false; + const SIGNATURE: &'static str = "PairCreated(address,address,address,uint256)"; + const SIGNATURE_HASH: alloy_sol_types::private::B256 = + alloy_sol_types::private::B256::new([ + 13u8, 54u8, 72u8, 189u8, 15u8, 107u8, 168u8, 1u8, 52u8, 163u8, 59u8, 169u8, + 39u8, 90u8, 197u8, 133u8, 217u8, 211u8, 21u8, 240u8, 173u8, 131u8, 85u8, 205u8, + 222u8, 253u8, 227u8, 26u8, 250u8, 40u8, 208u8, 233u8, + ]); + #[allow(unused_variables)] #[inline] fn new( @@ -193,36 +199,42 @@ event PairCreated(address indexed token0, address indexed token1, address pair, _3: 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, - ), - ); + 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.pair, ), - as alloy_sol_types::SolType>::tokenize(&self._3), + as alloy_sol_types::SolType>::tokenize( + &self._3, + ), ) } + #[inline] fn topics(&self) -> ::RustType { - (Self::SIGNATURE_HASH.into(), self.token0.clone(), self.token1.clone()) + ( + Self::SIGNATURE_HASH.into(), + self.token0.clone(), + self.token1.clone(), + ) } + #[inline] fn encode_topics_raw( &self, @@ -231,9 +243,7 @@ event PairCreated(address indexed token0, address indexed token1, address pair, if out.len() < ::COUNT { return Err(alloy_sol_types::Error::Overrun); } - out[0usize] = alloy_sol_types::abi::token::WordToken( - Self::SIGNATURE_HASH, - ); + out[0usize] = alloy_sol_types::abi::token::WordToken(Self::SIGNATURE_HASH); out[1usize] = ::encode_topic( &self.token0, ); @@ -248,6 +258,7 @@ event PairCreated(address indexed token0, address indexed token1, address pair, 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) } @@ -261,9 +272,9 @@ event PairCreated(address indexed token0, address indexed token1, address pair, } }; /**Constructor`. -```solidity -constructor(address _feeToSetter); -```*/ + ```solidity + constructor(address _feeToSetter); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct constructorCall { @@ -271,7 +282,7 @@ constructor(address _feeToSetter); pub _feeToSetter: alloy_sol_types::private::Address, } const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -280,9 +291,7 @@ constructor(address _feeToSetter); type UnderlyingRustTuple<'a> = (alloy_sol_types::private::Address,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -300,22 +309,24 @@ constructor(address _feeToSetter); #[doc(hidden)] impl ::core::convert::From> for constructorCall { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { - Self { _feeToSetter: tuple.0 } + Self { + _feeToSetter: tuple.0, + } } } } #[automatically_derived] impl alloy_sol_types::SolConstructor for constructorCall { type Parameters<'a> = (alloy_sol_types::sol_data::Address,); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + 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<'_> { ( @@ -328,9 +339,9 @@ constructor(address _feeToSetter); }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `createPair(address,address)` and selector `0xc9c65396`. -```solidity -function createPair(address tokenA, address tokenB) external returns (address pair); -```*/ + ```solidity + function createPair(address tokenA, address tokenB) external returns (address pair); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct createPairCall { @@ -340,7 +351,8 @@ function createPair(address tokenA, address tokenB) external returns (address pa pub tokenB: alloy_sol_types::private::Address, } #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`createPair(address,address)`](createPairCall) function. + ///Container type for the return parameters of the + /// [`createPair(address,address)`](createPairCall) function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct createPairReturn { @@ -354,7 +366,7 @@ function createPair(address tokenA, address tokenB) external returns (address pa clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -369,9 +381,7 @@ function createPair(address tokenA, address tokenB) external returns (address pa ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -404,9 +414,7 @@ function createPair(address tokenA, address tokenB) external returns (address pa type UnderlyingRustTuple<'a> = (alloy_sol_types::private::Address,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -434,22 +442,21 @@ function createPair(address tokenA, address tokenB) external returns (address pa 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::Address; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (alloy_sol_types::sol_data::Address,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "createPair(address,address)"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [201u8, 198u8, 83u8, 150u8]; + const SIGNATURE: &'static str = "createPair(address,address)"; + #[inline] fn new<'a>( tuple: as alloy_sol_types::SolType>::RustType, ) -> Self { tuple.into() } + #[inline] fn tokenize(&self) -> Self::Token<'_> { ( @@ -461,43 +468,39 @@ function createPair(address tokenA, address tokenB) external returns (address pa ), ) } + #[inline] fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { - ( - ::tokenize( - ret, - ), - ) + (::tokenize(ret),) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) - .map(|r| { + as alloy_sol_types::SolType>::abi_decode_sequence(data).map( + |r| { let r: createPairReturn = r.into(); r.pair - }) + }, + ) } + #[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: createPairReturn = r.into(); - r.pair - }) + 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: createPairReturn = r.into(); + r.pair + }) } } }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `getPair(address,address)` and selector `0xe6a43905`. -```solidity -function getPair(address, address) external view returns (address); -```*/ + ```solidity + function getPair(address, address) external view returns (address); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct getPairCall { @@ -507,7 +510,8 @@ function getPair(address, address) external view returns (address); pub _1: alloy_sol_types::private::Address, } #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`getPair(address,address)`](getPairCall) function. + ///Container type for the return parameters of the + /// [`getPair(address,address)`](getPairCall) function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct getPairReturn { @@ -521,7 +525,7 @@ function getPair(address, address) external view returns (address); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -536,9 +540,7 @@ function getPair(address, address) external view returns (address); ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -556,7 +558,10 @@ function getPair(address, address) external view returns (address); #[doc(hidden)] impl ::core::convert::From> for getPairCall { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { - Self { _0: tuple.0, _1: tuple.1 } + Self { + _0: tuple.0, + _1: tuple.1, + } } } } @@ -568,9 +573,7 @@ function getPair(address, address) external view returns (address); type UnderlyingRustTuple<'a> = (alloy_sol_types::private::Address,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -598,22 +601,21 @@ function getPair(address, address) external view returns (address); 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::Address; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (alloy_sol_types::sol_data::Address,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "getPair(address,address)"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [230u8, 164u8, 57u8, 5u8]; + const SIGNATURE: &'static str = "getPair(address,address)"; + #[inline] fn new<'a>( tuple: as alloy_sol_types::SolType>::RustType, ) -> Self { tuple.into() } + #[inline] fn tokenize(&self) -> Self::Token<'_> { ( @@ -625,41 +627,36 @@ function getPair(address, address) external view returns (address); ), ) } + #[inline] fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { - ( - ::tokenize( - ret, - ), - ) + (::tokenize(ret),) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) - .map(|r| { + as alloy_sol_types::SolType>::abi_decode_sequence(data).map( + |r| { let r: getPairReturn = 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: getPairReturn = r.into(); - r._0 - }) + 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: getPairReturn = r.into(); + r._0 + }) } } }; ///Container for all the [`UniswapV2Factory`](self) function calls. #[derive(Clone)] - #[derive()] pub enum UniswapV2FactoryCalls { #[allow(missing_docs)] createPair(createPairCall), @@ -669,24 +666,22 @@ function getPair(address, address) external view returns (address); impl UniswapV2FactoryCalls { /// 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. + /// 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]] = &[ - [201u8, 198u8, 83u8, 150u8], - [230u8, 164u8, 57u8, 5u8], - ]; - /// The names of the variants in the same order as `SELECTORS`. - pub const VARIANT_NAMES: &'static [&'static str] = &[ - ::core::stringify!(createPair), - ::core::stringify!(getPair), - ]; + pub const SELECTORS: &'static [[u8; 4usize]] = + &[[201u8, 198u8, 83u8, 150u8], [230u8, 164u8, 57u8, 5u8]]; /// The signatures in the same order as `SELECTORS`. pub const SIGNATURES: &'static [&'static str] = &[ ::SIGNATURE, ::SIGNATURE, ]; + /// The names of the variants in the same order as `SELECTORS`. + pub const VARIANT_NAMES: &'static [&'static str] = + &[::core::stringify!(createPair), ::core::stringify!(getPair)]; + /// Returns the signature for the given selector, if known. #[inline] pub fn signature_by_selector( @@ -699,61 +694,51 @@ function getPair(address, address) external view returns (address); ::core::result::Result::Err(_) => ::core::option::Option::None, } } + /// Returns the enum variant name for the given selector, if known. #[inline] - pub fn name_by_selector( - selector: [u8; 4usize], - ) -> ::core::option::Option<&'static str> { + pub fn name_by_selector(selector: [u8; 4usize]) -> ::core::option::Option<&'static str> { let sig = Self::signature_by_selector(selector)?; sig.split_once('(').map(|(name, _)| name) } } #[automatically_derived] impl alloy_sol_types::SolInterface for UniswapV2FactoryCalls { - const NAME: &'static str = "UniswapV2FactoryCalls"; - const MIN_DATA_LENGTH: usize = 64usize; const COUNT: usize = 2usize; + const MIN_DATA_LENGTH: usize = 64usize; + const NAME: &'static str = "UniswapV2FactoryCalls"; + #[inline] fn selector(&self) -> [u8; 4] { match self { - Self::createPair(_) => { - ::SELECTOR - } + Self::createPair(_) => ::SELECTOR, Self::getPair(_) => ::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 abi_decode_raw(selector: [u8; 4], data: &[u8]) -> alloy_sol_types::Result { + static DECODE_SHIMS: &[fn(&[u8]) -> alloy_sol_types::Result] = &[ { - fn createPair( - data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, - ) + fn createPair(data: &[u8]) -> alloy_sol_types::Result { + ::abi_decode_raw(data) .map(UniswapV2FactoryCalls::createPair) } createPair }, { - fn getPair( - data: &[u8], - ) -> alloy_sol_types::Result { + fn getPair(data: &[u8]) -> alloy_sol_types::Result { ::abi_decode_raw(data) .map(UniswapV2FactoryCalls::getPair) } @@ -761,15 +746,14 @@ function getPair(address, address) external view returns (address); }, ]; let Ok(idx) = Self::SELECTORS.binary_search(&selector) else { - return Err( - alloy_sol_types::Error::unknown_selector( - ::NAME, - selector, - ), - ); + return Err(alloy_sol_types::Error::unknown_selector( + ::NAME, + selector, + )); }; DECODE_SHIMS[idx](data) } + #[inline] #[allow(non_snake_case)] fn abi_decode_raw_validate( @@ -778,40 +762,33 @@ function getPair(address, address) external view returns (address); ) -> alloy_sol_types::Result { static DECODE_VALIDATE_SHIMS: &[fn( &[u8], - ) -> alloy_sol_types::Result] = &[ + ) -> alloy_sol_types::Result< + UniswapV2FactoryCalls, + >] = &[ { - fn createPair( - data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) + fn createPair(data: &[u8]) -> alloy_sol_types::Result { + ::abi_decode_raw_validate(data) .map(UniswapV2FactoryCalls::createPair) } createPair }, { - fn getPair( - data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) + fn getPair(data: &[u8]) -> alloy_sol_types::Result { + ::abi_decode_raw_validate(data) .map(UniswapV2FactoryCalls::getPair) } getPair }, ]; let Ok(idx) = Self::SELECTORS.binary_search(&selector) else { - return Err( - alloy_sol_types::Error::unknown_selector( - ::NAME, - selector, - ), - ); + return Err(alloy_sol_types::Error::unknown_selector( + ::NAME, + selector, + )); }; DECODE_VALIDATE_SHIMS[idx](data) } + #[inline] fn abi_encoded_size(&self) -> usize { match self { @@ -823,14 +800,12 @@ function getPair(address, address) external view returns (address); } } } + #[inline] fn abi_encode_raw(&self, out: &mut alloy_sol_types::private::Vec) { match self { Self::createPair(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } Self::getPair(inner) => { ::abi_encode_raw(inner, out) @@ -839,8 +814,7 @@ function getPair(address, address) external view returns (address); } } ///Container for all the [`UniswapV2Factory`](self) events. - #[derive(Clone)] - #[derive(Debug, PartialEq, Eq, Hash)] + #[derive(Clone, Debug, PartialEq, Eq, Hash)] pub enum UniswapV2FactoryEvents { #[allow(missing_docs)] PairCreated(PairCreated), @@ -848,25 +822,22 @@ function getPair(address, address) external view returns (address); impl UniswapV2FactoryEvents { /// 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. + /// 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]] = &[ - [ - 13u8, 54u8, 72u8, 189u8, 15u8, 107u8, 168u8, 1u8, 52u8, 163u8, 59u8, - 169u8, 39u8, 90u8, 197u8, 133u8, 217u8, 211u8, 21u8, 240u8, 173u8, 131u8, - 85u8, 205u8, 222u8, 253u8, 227u8, 26u8, 250u8, 40u8, 208u8, 233u8, - ], - ]; - /// The names of the variants in the same order as `SELECTORS`. - pub const VARIANT_NAMES: &'static [&'static str] = &[ - ::core::stringify!(PairCreated), - ]; + pub const SELECTORS: &'static [[u8; 32usize]] = &[[ + 13u8, 54u8, 72u8, 189u8, 15u8, 107u8, 168u8, 1u8, 52u8, 163u8, 59u8, 169u8, 39u8, 90u8, + 197u8, 133u8, 217u8, 211u8, 21u8, 240u8, 173u8, 131u8, 85u8, 205u8, 222u8, 253u8, + 227u8, 26u8, 250u8, 40u8, 208u8, 233u8, + ]]; /// The signatures in the same order as `SELECTORS`. - pub const SIGNATURES: &'static [&'static str] = &[ - ::SIGNATURE, - ]; + pub const SIGNATURES: &'static [&'static str] = + &[::SIGNATURE]; + /// The names of the variants in the same order as `SELECTORS`. + pub const VARIANT_NAMES: &'static [&'static str] = &[::core::stringify!(PairCreated)]; + /// Returns the signature for the given selector, if known. #[inline] pub fn signature_by_selector( @@ -879,42 +850,37 @@ function getPair(address, address) external view returns (address); ::core::result::Result::Err(_) => ::core::option::Option::None, } } + /// Returns the enum variant name for the given selector, if known. #[inline] - pub fn name_by_selector( - selector: [u8; 32usize], - ) -> ::core::option::Option<&'static str> { + pub fn name_by_selector(selector: [u8; 32usize]) -> ::core::option::Option<&'static str> { let sig = Self::signature_by_selector(selector)?; sig.split_once('(').map(|(name, _)| name) } } #[automatically_derived] impl alloy_sol_types::SolEventInterface for UniswapV2FactoryEvents { - const NAME: &'static str = "UniswapV2FactoryEvents"; const COUNT: usize = 1usize; + const NAME: &'static str = "UniswapV2FactoryEvents"; + 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, - ) + ::decode_raw_log(topics, data) .map(Self::PairCreated) } - _ => { - 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(), - ), + _ => 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(), ), - }) - } + ), + }), } } } @@ -927,6 +893,7 @@ function getPair(address, address) external view returns (address); } } } + fn into_log_data(self) -> alloy_sol_types::private::LogData { match self { Self::PairCreated(inner) => { @@ -935,10 +902,10 @@ function getPair(address, address) external view returns (address); } } } - use alloy_contract as alloy_contract; + use alloy_contract; /**Creates a new wrapper around an on-chain [`UniswapV2Factory`](self) contract instance. -See the [wrapper's documentation](`UniswapV2FactoryInstance`) for more details.*/ + See the [wrapper's documentation](`UniswapV2FactoryInstance`) for more details.*/ #[inline] pub const fn new< P: alloy_contract::private::Provider, @@ -951,26 +918,22 @@ See the [wrapper's documentation](`UniswapV2FactoryInstance`) for more details.* } /**Deploys this contract using the given `provider` and constructor arguments, if any. -Returns a new instance of the contract, if the deployment was successful. + 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.*/ + 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, - >( + pub fn deploy, N: alloy_contract::private::Network>( __provider: P, _feeToSetter: alloy_sol_types::private::Address, - ) -> impl ::core::future::Future< - Output = alloy_contract::Result>, - > { + ) -> impl ::core::future::Future>> + { UniswapV2FactoryInstance::::deploy(__provider, _feeToSetter) } /**Creates a `RawCallBuilder` for deploying this contract using the given `provider` -and constructor arguments, if any. + 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.*/ + 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, @@ -983,15 +946,15 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ } /**A [`UniswapV2Factory`](self) instance. -Contains type-safe methods for interacting with an on-chain instance of the -[`UniswapV2Factory`](self) contract located at a given `address`, using a given -provider `P`. + Contains type-safe methods for interacting with an on-chain instance of the + [`UniswapV2Factory`](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. + 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.*/ + See the [module-level documentation](self) for all the available methods.*/ #[derive(Clone)] pub struct UniswapV2FactoryInstance { address: alloy_sol_types::private::Address, @@ -1002,33 +965,32 @@ See the [module-level documentation](self) for all the available methods.*/ impl ::core::fmt::Debug for UniswapV2FactoryInstance { #[inline] fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { - f.debug_tuple("UniswapV2FactoryInstance").field(&self.address).finish() + f.debug_tuple("UniswapV2FactoryInstance") + .field(&self.address) + .finish() } } /// Instantiation and getters/setters. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > UniswapV2FactoryInstance { + impl, N: alloy_contract::private::Network> + UniswapV2FactoryInstance + { /**Creates a new wrapper around an on-chain [`UniswapV2Factory`](self) contract instance. -See the [wrapper's documentation](`UniswapV2FactoryInstance`) for more details.*/ + See the [wrapper's documentation](`UniswapV2FactoryInstance`) for more details.*/ #[inline] - pub const fn new( - address: alloy_sol_types::private::Address, - __provider: P, - ) -> Self { + pub const fn new(address: alloy_sol_types::private::Address, __provider: P) -> Self { Self { address, provider: __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. + 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.*/ + For more fine-grained control over the deployment process, use [`deploy_builder`] instead.*/ #[inline] pub async fn deploy( __provider: P, @@ -1038,11 +1000,12 @@ For more fine-grained control over the deployment process, use [`deploy_builder` 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. + 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.*/ + 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, @@ -1052,29 +1015,32 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ __provider, [ &BYTECODE[..], - &alloy_sol_types::SolConstructor::abi_encode( - &constructorCall { _feeToSetter }, - )[..], + &alloy_sol_types::SolConstructor::abi_encode(&constructorCall { _feeToSetter }) + [..], ] - .concat() - .into(), + .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 { @@ -1082,7 +1048,8 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ } } impl UniswapV2FactoryInstance<&P, N> { - /// Clones the provider and returns a new instance with the cloned provider. + /// Clones the provider and returns a new instance with the cloned + /// provider. #[inline] pub fn with_cloned_provider(self) -> UniswapV2FactoryInstance { UniswapV2FactoryInstance { @@ -1093,20 +1060,22 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ } } /// Function calls. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > UniswapV2FactoryInstance { - /// Creates a new call builder using this contract instance's provider and address. + impl, N: alloy_contract::private::Network> + UniswapV2FactoryInstance + { + /// 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. + /// 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 [`createPair`] function. pub fn createPair( &self, @@ -1115,6 +1084,7 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ ) -> alloy_contract::SolCallBuilder<&P, createPairCall, N> { self.call_builder(&createPairCall { tokenA, tokenB }) } + ///Creates a new call builder for the [`getPair`] function. pub fn getPair( &self, @@ -1125,108 +1095,72 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ } } /// Event filters. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > UniswapV2FactoryInstance { - /// Creates a new event filter using this contract instance's provider and address. + impl, N: alloy_contract::private::Network> + UniswapV2FactoryInstance + { + /// 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. + /// 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 [`PairCreated`] event. pub fn PairCreated_filter(&self) -> alloy_contract::Event<&P, PairCreated, N> { self.event_filter::() } } } -pub type Instance = UniswapV2Factory::UniswapV2FactoryInstance< - ::alloy_provider::DynProvider, ->; +pub type Instance = UniswapV2Factory::UniswapV2FactoryInstance<::alloy_provider::DynProvider>; use { - std::{sync::LazyLock, collections::HashMap}, - anyhow::{Result, Context}, - alloy_primitives::{address, Address}, - alloy_provider::{Provider, DynProvider}, + alloy_primitives::{Address, address}, + alloy_provider::{DynProvider, Provider}, + anyhow::{Context, Result}, + std::{collections::HashMap, sync::LazyLock}, }; pub const fn deployment_info(chain_id: u64) -> Option<(Address, Option)> { match chain_id { - 1u64 => { - Some(( - ::alloy_primitives::address!( - "0x5C69bEe701ef814a2B6a3EDD4B1652CB9cc5aA6f" - ), - None, - )) - } - 10u64 => { - Some(( - ::alloy_primitives::address!( - "0x0c3c1c532F1e39EdF36BE9Fe0bE1410313E074Bf" - ), - None, - )) - } - 56u64 => { - Some(( - ::alloy_primitives::address!( - "0x8909Dc15e40173Ff4699343b6eB8132c65e18eC6" - ), - None, - )) - } - 100u64 => { - Some(( - ::alloy_primitives::address!( - "0xA818b4F111Ccac7AA31D0BCc0806d64F2E0737D7" - ), - None, - )) - } - 137u64 => { - Some(( - ::alloy_primitives::address!( - "0x9e5A52f57b3038F1B8EeE45F28b3C1967e22799C" - ), - None, - )) - } - 8453u64 => { - Some(( - ::alloy_primitives::address!( - "0x8909Dc15e40173Ff4699343b6eB8132c65e18eC6" - ), - None, - )) - } - 42161u64 => { - Some(( - ::alloy_primitives::address!( - "0xf1D7CC64Fb4452F05c498126312eBE29f30Fbcf9" - ), - None, - )) - } - 43114u64 => { - Some(( - ::alloy_primitives::address!( - "0x9e5A52f57b3038F1B8EeE45F28b3C1967e22799C" - ), - None, - )) - } - 11155111u64 => { - Some(( - ::alloy_primitives::address!( - "0xF62c03E08ada871A0bEb309762E260a7a6a880E6" - ), - None, - )) - } + 1u64 => Some(( + ::alloy_primitives::address!("0x5C69bEe701ef814a2B6a3EDD4B1652CB9cc5aA6f"), + None, + )), + 10u64 => Some(( + ::alloy_primitives::address!("0x0c3c1c532F1e39EdF36BE9Fe0bE1410313E074Bf"), + None, + )), + 56u64 => Some(( + ::alloy_primitives::address!("0x8909Dc15e40173Ff4699343b6eB8132c65e18eC6"), + None, + )), + 100u64 => Some(( + ::alloy_primitives::address!("0xA818b4F111Ccac7AA31D0BCc0806d64F2E0737D7"), + None, + )), + 137u64 => Some(( + ::alloy_primitives::address!("0x9e5A52f57b3038F1B8EeE45F28b3C1967e22799C"), + None, + )), + 8453u64 => Some(( + ::alloy_primitives::address!("0x8909Dc15e40173Ff4699343b6eB8132c65e18eC6"), + None, + )), + 42161u64 => Some(( + ::alloy_primitives::address!("0xf1D7CC64Fb4452F05c498126312eBE29f30Fbcf9"), + None, + )), + 43114u64 => Some(( + ::alloy_primitives::address!("0x9e5A52f57b3038F1B8EeE45F28b3C1967e22799C"), + None, + )), + 11155111u64 => Some(( + ::alloy_primitives::address!("0xF62c03E08ada871A0bEb309762E260a7a6a880E6"), + None, + )), _ => None, } } @@ -1243,9 +1177,7 @@ pub const fn deployment_block(chain_id: &u64) -> Option { } } impl Instance { - pub fn deployed( - provider: &DynProvider, - ) -> impl Future> + Send { + pub fn deployed(provider: &DynProvider) -> impl Future> + Send { async move { let chain_id = provider .get_chain_id() diff --git a/contracts/generated/contracts-generated/uniswapv2router02/src/lib.rs b/contracts/generated/contracts-generated/uniswapv2router02/src/lib.rs index fac13e123b..e7ca2dc6fc 100644 --- a/contracts/generated/contracts-generated/uniswapv2router02/src/lib.rs +++ b/contracts/generated/contracts-generated/uniswapv2router02/src/lib.rs @@ -1,4 +1,10 @@ -#![allow(unused_imports, unused_attributes, clippy::all, rustdoc::all, non_snake_case)] +#![allow( + unused_imports, + unused_attributes, + clippy::all, + rustdoc::all, + non_snake_case +)] //! Auto-generated contract bindings. Do not edit. /** @@ -208,8 +214,7 @@ interface UniswapV2Router02 { clippy::empty_structs_with_brackets )] pub mod UniswapV2Router02 { - use super::*; - use alloy_sol_types as alloy_sol_types; + use {super::*, alloy_sol_types}; /// The creation / init bytecode of the contract. /// /// ```text @@ -221,9 +226,9 @@ pub mod UniswapV2Router02 { b"`\xC0`@R4\x80\x15b\0\0\x11W`\0\x80\xFD[P`@Qb\0W>8\x03\x80b\0W>\x839\x81\x81\x01`@R`@\x81\x10\x15b\0\x007W`\0\x80\xFD[P\x80Q` \x90\x91\x01Q`\x01`\x01``\x1B\x03\x19``\x92\x83\x1B\x81\x16`\x80R\x91\x1B\x16`\xA0R`\x80Q``\x1C`\xA0Q``\x1CaU\xB7b\0\x01\x87`\09\x80a\x01\xACR\x80a\x0E]R\x80a\x0E\x98R\x80a\x0F\xD5R\x80a\x12\x98R\x80a\x16\xF2R\x80a\x18\xD6R\x80a\x1E\x1ER\x80a\x1F\xA2R\x80a rR\x80a!yR\x80a#,R\x80a#\xC1R\x80a&sR\x80a'\x1AR\x80a'\xEFR\x80a(\xF4R\x80a)\xDCR\x80a*]R\x80a0\xECR\x80a4\"R\x80a4xR\x80a4\xACR\x80a5-R\x80a7GR\x80a8\xF7R\x80a9\x8CRP\x80a\x10\xC7R\x80a\x11\xC5R\x80a\x13kR\x80a\x13\xA4R\x80a\x15OR\x80a\x17\xE4R\x80a\x18\xB4R\x80a\x1A\xA1R\x80a\"_R\x80a$\0R\x80a%\xA9R\x80a*\x9CR\x80a-\xDFR\x80a0qR\x80a0\x9AR\x80a0\xCAR\x80a2\xA7R\x80a4VR\x80a8-R\x80a9\xCBR\x80aDJR\x80aD\x8DR\x80aG\xEDR\x80aI\xCER\x80aOIR\x80aP*R\x80aP\xAARPaU\xB7`\0\xF3\xFE`\x80`@R`\x046\x10a\x01\x8FW`\x005`\xE0\x1C\x80c\x88\x03\xDB\xEE\x11a\0\xD6W\x80c\xC4Z\x01U\x11a\0\x7FW\x80c\xE8\xE37\0\x11a\0YW\x80c\xE8\xE37\0\x14a\x0CqW\x80c\xF3\x05\xD7\x19\x14a\x0C\xFEW\x80c\xFB;\xDBA\x14a\rQWa\x01\xD5V[\x80c\xC4Z\x01U\x14a\x0B%W\x80c\xD0l\xA6\x1F\x14a\x0B:W\x80c\xDE\xD98*\x14a\x0B\xF1Wa\x01\xD5V[\x80c\xAF)y\xEB\x11a\0\xB0W\x80c\xAF)y\xEB\x14a\t\xC8W\x80c\xB6\xF9\xDE\x95\x14a\n(W\x80c\xBA\xA2\xAB\xDE\x14a\n\xBBWa\x01\xD5V[\x80c\x88\x03\xDB\xEE\x14a\x08\xAFW\x80c\xAD\\FH\x14a\tTW\x80c\xADa]\xEC\x14a\t\x92Wa\x01\xD5V[\x80cJ%\xD9J\x11a\x018W\x80cy\x1A\xC9G\x11a\x01\x12W\x80cy\x1A\xC9G\x14a\x07AW\x80c\x7F\xF3j\xB5\x14a\x07\xE6W\x80c\x85\xF8\xC2Y\x14a\x08yWa\x01\xD5V[\x80cJ%\xD9J\x14a\x05wW\x80c[\rY\x84\x14a\x06\x1CW\x80c\\\x11\xD7\x95\x14a\x06\x9CWa\x01\xD5V[\x80c\x1F\0\xCAt\x11a\x01iW\x80c\x1F\0\xCAt\x14a\x03\x90W\x80c!\x95\x99\\\x14a\x04GW\x80c8\xED\x179\x14a\x04\xD2Wa\x01\xD5V[\x80c\x02u\x1C\xEC\x14a\x01\xDAW\x80c\x05MP\xD4\x14a\x02SW\x80c\x18\xCB\xAF\xE5\x14a\x02\x9BWa\x01\xD5V[6a\x01\xD5W3s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\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\x16\x14a\x01\xD3W\xFE[\0[`\0\x80\xFD[4\x80\x15a\x01\xE6W`\0\x80\xFD[Pa\x02:`\x04\x806\x03`\xC0\x81\x10\x15a\x01\xFDW`\0\x80\xFD[Ps\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x815\x81\x16\x91` \x81\x015\x91`@\x82\x015\x91``\x81\x015\x91`\x80\x82\x015\x16\x90`\xA0\x015a\r\xE4V[`@\x80Q\x92\x83R` \x83\x01\x91\x90\x91R\x80Q\x91\x82\x90\x03\x01\x90\xF3[4\x80\x15a\x02_W`\0\x80\xFD[Pa\x02\x89`\x04\x806\x03``\x81\x10\x15a\x02vW`\0\x80\xFD[P\x805\x90` \x81\x015\x90`@\x015a\x0F7V[`@\x80Q\x91\x82RQ\x90\x81\x90\x03` \x01\x90\xF3[4\x80\x15a\x02\xA7W`\0\x80\xFD[Pa\x03@`\x04\x806\x03`\xA0\x81\x10\x15a\x02\xBEW`\0\x80\xFD[\x815\x91` \x81\x015\x91\x81\x01\x90``\x81\x01`@\x82\x015d\x01\0\0\0\0\x81\x11\x15a\x02\xE5W`\0\x80\xFD[\x82\x01\x83` \x82\x01\x11\x15a\x02\xF7W`\0\x80\xFD[\x805\x90` \x01\x91\x84` \x83\x02\x84\x01\x11d\x01\0\0\0\0\x83\x11\x17\x15a\x03\x19W`\0\x80\xFD[\x91\x93P\x91Ps\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x815\x16\x90` \x015a\x0FLV[`@\x80Q` \x80\x82R\x83Q\x81\x83\x01R\x83Q\x91\x92\x83\x92\x90\x83\x01\x91\x85\x81\x01\x91\x02\x80\x83\x83`\0[\x83\x81\x10\x15a\x03|W\x81\x81\x01Q\x83\x82\x01R` \x01a\x03dV[PPPP\x90P\x01\x92PPP`@Q\x80\x91\x03\x90\xF3[4\x80\x15a\x03\x9CW`\0\x80\xFD[Pa\x03@`\x04\x806\x03`@\x81\x10\x15a\x03\xB3W`\0\x80\xFD[\x815\x91\x90\x81\x01\x90`@\x81\x01` \x82\x015d\x01\0\0\0\0\x81\x11\x15a\x03\xD5W`\0\x80\xFD[\x82\x01\x83` \x82\x01\x11\x15a\x03\xE7W`\0\x80\xFD[\x805\x90` \x01\x91\x84` \x83\x02\x84\x01\x11d\x01\0\0\0\0\x83\x11\x17\x15a\x04\tW`\0\x80\xFD[\x91\x90\x80\x80` \x02` \x01`@Q\x90\x81\x01`@R\x80\x93\x92\x91\x90\x81\x81R` \x01\x83\x83` \x02\x80\x82\x847`\0\x92\x01\x91\x90\x91RP\x92\x95Pa\x13d\x94PPPPPV[4\x80\x15a\x04SW`\0\x80\xFD[Pa\x02:`\x04\x806\x03a\x01`\x81\x10\x15a\x04kW`\0\x80\xFD[Ps\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x815\x81\x16\x91` \x81\x015\x82\x16\x91`@\x82\x015\x91``\x81\x015\x91`\x80\x82\x015\x91`\xA0\x81\x015\x90\x91\x16\x90`\xC0\x81\x015\x90`\xE0\x81\x015\x15\x15\x90`\xFFa\x01\0\x82\x015\x16\x90a\x01 \x81\x015\x90a\x01@\x015a\x13\x9AV[4\x80\x15a\x04\xDEW`\0\x80\xFD[Pa\x03@`\x04\x806\x03`\xA0\x81\x10\x15a\x04\xF5W`\0\x80\xFD[\x815\x91` \x81\x015\x91\x81\x01\x90``\x81\x01`@\x82\x015d\x01\0\0\0\0\x81\x11\x15a\x05\x1CW`\0\x80\xFD[\x82\x01\x83` \x82\x01\x11\x15a\x05.W`\0\x80\xFD[\x805\x90` \x01\x91\x84` \x83\x02\x84\x01\x11d\x01\0\0\0\0\x83\x11\x17\x15a\x05PW`\0\x80\xFD[\x91\x93P\x91Ps\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x815\x16\x90` \x015a\x14\xD8V[4\x80\x15a\x05\x83W`\0\x80\xFD[Pa\x03@`\x04\x806\x03`\xA0\x81\x10\x15a\x05\x9AW`\0\x80\xFD[\x815\x91` \x81\x015\x91\x81\x01\x90``\x81\x01`@\x82\x015d\x01\0\0\0\0\x81\x11\x15a\x05\xC1W`\0\x80\xFD[\x82\x01\x83` \x82\x01\x11\x15a\x05\xD3W`\0\x80\xFD[\x805\x90` \x01\x91\x84` \x83\x02\x84\x01\x11d\x01\0\0\0\0\x83\x11\x17\x15a\x05\xF5W`\0\x80\xFD[\x91\x93P\x91Ps\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x815\x16\x90` \x015a\x16iV[4\x80\x15a\x06(W`\0\x80\xFD[Pa\x02\x89`\x04\x806\x03a\x01@\x81\x10\x15a\x06@W`\0\x80\xFD[Ps\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x815\x81\x16\x91` \x81\x015\x91`@\x82\x015\x91``\x81\x015\x91`\x80\x82\x015\x16\x90`\xA0\x81\x015\x90`\xC0\x81\x015\x15\x15\x90`\xFF`\xE0\x82\x015\x16\x90a\x01\0\x81\x015\x90a\x01 \x015a\x18\xACV[4\x80\x15a\x06\xA8W`\0\x80\xFD[Pa\x01\xD3`\x04\x806\x03`\xA0\x81\x10\x15a\x06\xBFW`\0\x80\xFD[\x815\x91` \x81\x015\x91\x81\x01\x90``\x81\x01`@\x82\x015d\x01\0\0\0\0\x81\x11\x15a\x06\xE6W`\0\x80\xFD[\x82\x01\x83` \x82\x01\x11\x15a\x06\xF8W`\0\x80\xFD[\x805\x90` \x01\x91\x84` \x83\x02\x84\x01\x11d\x01\0\0\0\0\x83\x11\x17\x15a\x07\x1AW`\0\x80\xFD[\x91\x93P\x91Ps\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x815\x16\x90` \x015a\x19\xFEV[4\x80\x15a\x07MW`\0\x80\xFD[Pa\x01\xD3`\x04\x806\x03`\xA0\x81\x10\x15a\x07dW`\0\x80\xFD[\x815\x91` \x81\x015\x91\x81\x01\x90``\x81\x01`@\x82\x015d\x01\0\0\0\0\x81\x11\x15a\x07\x8BW`\0\x80\xFD[\x82\x01\x83` \x82\x01\x11\x15a\x07\x9DW`\0\x80\xFD[\x805\x90` \x01\x91\x84` \x83\x02\x84\x01\x11d\x01\0\0\0\0\x83\x11\x17\x15a\x07\xBFW`\0\x80\xFD[\x91\x93P\x91Ps\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x815\x16\x90` \x015a\x1D\x97V[a\x03@`\x04\x806\x03`\x80\x81\x10\x15a\x07\xFCW`\0\x80\xFD[\x815\x91\x90\x81\x01\x90`@\x81\x01` \x82\x015d\x01\0\0\0\0\x81\x11\x15a\x08\x1EW`\0\x80\xFD[\x82\x01\x83` \x82\x01\x11\x15a\x080W`\0\x80\xFD[\x805\x90` \x01\x91\x84` \x83\x02\x84\x01\x11d\x01\0\0\0\0\x83\x11\x17\x15a\x08RW`\0\x80\xFD[\x91\x93P\x91Ps\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x815\x16\x90` \x015a!\x05V[4\x80\x15a\x08\x85W`\0\x80\xFD[Pa\x02\x89`\x04\x806\x03``\x81\x10\x15a\x08\x9CW`\0\x80\xFD[P\x805\x90` \x81\x015\x90`@\x015a%%V[4\x80\x15a\x08\xBBW`\0\x80\xFD[Pa\x03@`\x04\x806\x03`\xA0\x81\x10\x15a\x08\xD2W`\0\x80\xFD[\x815\x91` \x81\x015\x91\x81\x01\x90``\x81\x01`@\x82\x015d\x01\0\0\0\0\x81\x11\x15a\x08\xF9W`\0\x80\xFD[\x82\x01\x83` \x82\x01\x11\x15a\t\x0BW`\0\x80\xFD[\x805\x90` \x01\x91\x84` \x83\x02\x84\x01\x11d\x01\0\0\0\0\x83\x11\x17\x15a\t-W`\0\x80\xFD[\x91\x93P\x91Ps\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x815\x16\x90` \x015a%2V[4\x80\x15a\t`W`\0\x80\xFD[Pa\tia&qV[`@\x80Qs\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x90\x92\x16\x82RQ\x90\x81\x90\x03` \x01\x90\xF3[4\x80\x15a\t\x9EW`\0\x80\xFD[Pa\x02\x89`\x04\x806\x03``\x81\x10\x15a\t\xB5W`\0\x80\xFD[P\x805\x90` \x81\x015\x90`@\x015a&\x95V[4\x80\x15a\t\xD4W`\0\x80\xFD[Pa\x02\x89`\x04\x806\x03`\xC0\x81\x10\x15a\t\xEBW`\0\x80\xFD[Ps\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x815\x81\x16\x91` \x81\x015\x91`@\x82\x015\x91``\x81\x015\x91`\x80\x82\x015\x16\x90`\xA0\x015a&\xA2V[a\x01\xD3`\x04\x806\x03`\x80\x81\x10\x15a\n>W`\0\x80\xFD[\x815\x91\x90\x81\x01\x90`@\x81\x01` \x82\x015d\x01\0\0\0\0\x81\x11\x15a\n`W`\0\x80\xFD[\x82\x01\x83` \x82\x01\x11\x15a\nrW`\0\x80\xFD[\x805\x90` \x01\x91\x84` \x83\x02\x84\x01\x11d\x01\0\0\0\0\x83\x11\x17\x15a\n\x94W`\0\x80\xFD[\x91\x93P\x91Ps\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x815\x16\x90` \x015a(\x82V[4\x80\x15a\n\xC7W`\0\x80\xFD[Pa\x02:`\x04\x806\x03`\xE0\x81\x10\x15a\n\xDEW`\0\x80\xFD[Ps\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x815\x81\x16\x91` \x81\x015\x82\x16\x91`@\x82\x015\x91``\x81\x015\x91`\x80\x82\x015\x91`\xA0\x81\x015\x90\x91\x16\x90`\xC0\x015a-eV[4\x80\x15a\x0B1W`\0\x80\xFD[Pa\tia0oV[4\x80\x15a\x0BFW`\0\x80\xFD[Pa\x03@`\x04\x806\x03`@\x81\x10\x15a\x0B]W`\0\x80\xFD[\x815\x91\x90\x81\x01\x90`@\x81\x01` \x82\x015d\x01\0\0\0\0\x81\x11\x15a\x0B\x7FW`\0\x80\xFD[\x82\x01\x83` \x82\x01\x11\x15a\x0B\x91W`\0\x80\xFD[\x805\x90` \x01\x91\x84` \x83\x02\x84\x01\x11d\x01\0\0\0\0\x83\x11\x17\x15a\x0B\xB3W`\0\x80\xFD[\x91\x90\x80\x80` \x02` \x01`@Q\x90\x81\x01`@R\x80\x93\x92\x91\x90\x81\x81R` \x01\x83\x83` \x02\x80\x82\x847`\0\x92\x01\x91\x90\x91RP\x92\x95Pa0\x93\x94PPPPPV[4\x80\x15a\x0B\xFDW`\0\x80\xFD[Pa\x02:`\x04\x806\x03a\x01@\x81\x10\x15a\x0C\x15W`\0\x80\xFD[Ps\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x815\x81\x16\x91` \x81\x015\x91`@\x82\x015\x91``\x81\x015\x91`\x80\x82\x015\x16\x90`\xA0\x81\x015\x90`\xC0\x81\x015\x15\x15\x90`\xFF`\xE0\x82\x015\x16\x90a\x01\0\x81\x015\x90a\x01 \x015a0\xC0V[4\x80\x15a\x0C}W`\0\x80\xFD[Pa\x0C\xE0`\x04\x806\x03a\x01\0\x81\x10\x15a\x0C\x95W`\0\x80\xFD[Ps\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x815\x81\x16\x91` \x81\x015\x82\x16\x91`@\x82\x015\x91``\x81\x015\x91`\x80\x82\x015\x91`\xA0\x81\x015\x91`\xC0\x82\x015\x16\x90`\xE0\x015a2\x18V[`@\x80Q\x93\x84R` \x84\x01\x92\x90\x92R\x82\x82\x01RQ\x90\x81\x90\x03``\x01\x90\xF3[a\x0C\xE0`\x04\x806\x03`\xC0\x81\x10\x15a\r\x14W`\0\x80\xFD[Ps\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x815\x81\x16\x91` \x81\x015\x91`@\x82\x015\x91``\x81\x015\x91`\x80\x82\x015\x16\x90`\xA0\x015a3\xA7V[a\x03@`\x04\x806\x03`\x80\x81\x10\x15a\rgW`\0\x80\xFD[\x815\x91\x90\x81\x01\x90`@\x81\x01` \x82\x015d\x01\0\0\0\0\x81\x11\x15a\r\x89W`\0\x80\xFD[\x82\x01\x83` \x82\x01\x11\x15a\r\x9BW`\0\x80\xFD[\x805\x90` \x01\x91\x84` \x83\x02\x84\x01\x11d\x01\0\0\0\0\x83\x11\x17\x15a\r\xBDW`\0\x80\xFD[\x91\x93P\x91Ps\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x815\x16\x90` \x015a6\xD3V[`\0\x80\x82B\x81\x10\x15a\x0EWW`@\x80Q\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\x82\x01R`\x18`$\x82\x01R\x7FUniswapV2Router: EXPIRED\0\0\0\0\0\0\0\0`D\x82\x01R\x90Q\x90\x81\x90\x03`d\x01\x90\xFD[a\x0E\x86\x89\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\x8A\x8A\x8A0\x8Aa-eV[\x90\x93P\x91Pa\x0E\x96\x89\x86\x85a;\"V[\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\0s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16c.\x1A}M\x83`@Q\x82c\xFF\xFF\xFF\xFF\x16`\xE0\x1B\x81R`\x04\x01\x80\x82\x81R` \x01\x91PP`\0`@Q\x80\x83\x03\x81`\0\x87\x80;\x15\x80\x15a\x0F\tW`\0\x80\xFD[PZ\xF1\x15\x80\x15a\x0F\x1DW=`\0\x80>=`\0\xFD[PPPPa\x0F+\x85\x83a<\xFFV[P\x96P\x96\x94PPPPPV[`\0a\x0FD\x84\x84\x84a>=`\0\xFD[PPPPa\x13Y\x84\x83`\x01\x85Q\x03\x81Q\x81\x10a\x13LW\xFE[` \x02` \x01\x01Qa<\xFFV[P\x96\x95PPPPPPV[``a\x13\x91\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\x84\x84aF\x08V[\x90P[\x92\x91PPV[`\0\x80`\0a\x13\xCA\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\x8F\x8Fa@\xC6V[\x90P`\0\x87a\x13\xD9W\x8Ca\x13\xFBV[\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[`@\x80Q\x7F\xD5\x05\xAC\xCF\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\x81R3`\x04\x82\x01R0`$\x82\x01R`D\x81\x01\x83\x90R`d\x81\x01\x8C\x90R`\xFF\x8A\x16`\x84\x82\x01R`\xA4\x81\x01\x89\x90R`\xC4\x81\x01\x88\x90R\x90Q\x91\x92Ps\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x84\x16\x91c\xD5\x05\xAC\xCF\x91`\xE4\x80\x82\x01\x92`\0\x92\x90\x91\x90\x82\x90\x03\x01\x81\x83\x87\x80;\x15\x80\x15a\x14\x97W`\0\x80\xFD[PZ\xF1\x15\x80\x15a\x14\xABW=`\0\x80>=`\0\xFD[PPPPa\x14\xBE\x8F\x8F\x8F\x8F\x8F\x8F\x8Fa-eV[\x80\x94P\x81\x95PPPPP\x9BP\x9B\x99PPPPPPPPPPV[``\x81B\x81\x10\x15a\x15JW`@\x80Q\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\x82\x01R`\x18`$\x82\x01R\x7FUniswapV2Router: EXPIRED\0\0\0\0\0\0\0\0`D\x82\x01R\x90Q\x90\x81\x90\x03`d\x01\x90\xFD[a\x15\xA8\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\x89\x88\x88\x80\x80` \x02` \x01`@Q\x90\x81\x01`@R\x80\x93\x92\x91\x90\x81\x81R` \x01\x83\x83` \x02\x80\x82\x847`\0\x92\x01\x91\x90\x91RPa?`\x92PPPV[\x91P\x86\x82`\x01\x84Q\x03\x81Q\x81\x10a\x15\xBBW\xFE[` \x02` \x01\x01Q\x10\x15a\x16\x1AW`@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\x01\x80\x80` \x01\x82\x81\x03\x82R`+\x81R` \x01\x80aU\x08`+\x919`@\x01\x91PP`@Q\x80\x91\x03\x90\xFD[a\x16*\x86\x86`\0\x81\x81\x10a\x11\xA2W\xFE[a\x13Y\x82\x87\x87\x80\x80` \x02` \x01`@Q\x90\x81\x01`@R\x80\x93\x92\x91\x90\x81\x81R` \x01\x83\x83` \x02\x80\x82\x847`\0\x92\x01\x91\x90\x91RP\x89\x92PaC\x81\x91PPV[``\x81B\x81\x10\x15a\x16\xDBW`@\x80Q\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\x82\x01R`\x18`$\x82\x01R\x7FUniswapV2Router: EXPIRED\0\0\0\0\0\0\0\0`D\x82\x01R\x90Q\x90\x81\x90\x03`d\x01\x90\xFD[s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\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\x16\x86\x86\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\x01\x81\x81\x10a\x17@W\xFE[\x90P` \x02\x015s\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\x14a\x17\xDFW`@\x80Q\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\x82\x01R`\x1D`$\x82\x01R\x7FUniswapV2Router: INVALID_PATH\0\0\0`D\x82\x01R\x90Q\x90\x81\x90\x03`d\x01\x90\xFD[a\x18=\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\x89\x88\x88\x80\x80` \x02` \x01`@Q\x90\x81\x01`@R\x80\x93\x92\x91\x90\x81\x81R` \x01\x83\x83` \x02\x80\x82\x847`\0\x92\x01\x91\x90\x91RPaF\x08\x92PPPV[\x91P\x86\x82`\0\x81Q\x81\x10a\x18MW\xFE[` \x02` \x01\x01Q\x11\x15a\x11\x92W`@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\x01\x80\x80` \x01\x82\x81\x03\x82R`'\x81R` \x01\x80aT\x98`'\x919`@\x01\x91PP`@Q\x80\x91\x03\x90\xFD[`\0\x80a\x18\xFA\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\x8D\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\0a@\xC6V[\x90P`\0\x86a\x19\tW\x8Ba\x19+V[\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[`@\x80Q\x7F\xD5\x05\xAC\xCF\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\x81R3`\x04\x82\x01R0`$\x82\x01R`D\x81\x01\x83\x90R`d\x81\x01\x8B\x90R`\xFF\x89\x16`\x84\x82\x01R`\xA4\x81\x01\x88\x90R`\xC4\x81\x01\x87\x90R\x90Q\x91\x92Ps\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x84\x16\x91c\xD5\x05\xAC\xCF\x91`\xE4\x80\x82\x01\x92`\0\x92\x90\x91\x90\x82\x90\x03\x01\x81\x83\x87\x80;\x15\x80\x15a\x19\xC7W`\0\x80\xFD[PZ\xF1\x15\x80\x15a\x19\xDBW=`\0\x80>=`\0\xFD[PPPPa\x19\xED\x8D\x8D\x8D\x8D\x8D\x8Da&\xA2V[\x9D\x9CPPPPPPPPPPPPPV[\x80B\x81\x10\x15a\x1AnW`@\x80Q\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\x82\x01R`\x18`$\x82\x01R\x7FUniswapV2Router: EXPIRED\0\0\0\0\0\0\0\0`D\x82\x01R\x90Q\x90\x81\x90\x03`d\x01\x90\xFD[a\x1A\xFD\x85\x85`\0\x81\x81\x10a\x1A~W\xFE[\x90P` \x02\x015s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x163a\x1A\xF7\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\x89\x89`\0\x81\x81\x10a\x1A\xCDW\xFE[\x90P` \x02\x015s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x8A\x8A`\x01\x81\x81\x10a\x12\x1BW\xFE[\x8AaA\xB1V[`\0\x85\x85\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\x01\x81\x81\x10a\x1B-W\xFE[\x90P` \x02\x015s\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\x16cp\xA0\x821\x85`@Q\x82c\xFF\xFF\xFF\xFF\x16`\xE0\x1B\x81R`\x04\x01\x80\x82s\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\x91PP` `@Q\x80\x83\x03\x81\x86\x80;\x15\x80\x15a\x1B\xC6W`\0\x80\xFD[PZ\xFA\x15\x80\x15a\x1B\xDAW=`\0\x80>=`\0\xFD[PPPP`@Q=` \x81\x10\x15a\x1B\xF0W`\0\x80\xFD[PQ`@\x80Q` \x88\x81\x02\x82\x81\x01\x82\x01\x90\x93R\x88\x82R\x92\x93Pa\x1C2\x92\x90\x91\x89\x91\x89\x91\x82\x91\x85\x01\x90\x84\x90\x80\x82\x847`\0\x92\x01\x91\x90\x91RP\x88\x92PaG\x96\x91PPV[\x86a\x1D6\x82\x88\x88\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\x01\x81\x81\x10a\x1CeW\xFE[\x90P` \x02\x015s\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\x16cp\xA0\x821\x88`@Q\x82c\xFF\xFF\xFF\xFF\x16`\xE0\x1B\x81R`\x04\x01\x80\x82s\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\x91PP` `@Q\x80\x83\x03\x81\x86\x80;\x15\x80\x15a\x1C\xFEW`\0\x80\xFD[PZ\xFA\x15\x80\x15a\x1D\x12W=`\0\x80>=`\0\xFD[PPPP`@Q=` \x81\x10\x15a\x1D(W`\0\x80\xFD[PQ\x90c\xFF\xFF\xFF\xFFaK)\x16V[\x10\x15a\x1D\x8DW`@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\x01\x80\x80` \x01\x82\x81\x03\x82R`+\x81R` \x01\x80aU\x08`+\x919`@\x01\x91PP`@Q\x80\x91\x03\x90\xFD[PPPPPPPPV[\x80B\x81\x10\x15a\x1E\x07W`@\x80Q\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\x82\x01R`\x18`$\x82\x01R\x7FUniswapV2Router: EXPIRED\0\0\0\0\0\0\0\0`D\x82\x01R\x90Q\x90\x81\x90\x03`d\x01\x90\xFD[s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\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\x16\x85\x85\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\x01\x81\x81\x10a\x1ElW\xFE[\x90P` \x02\x015s\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\x14a\x1F\x0BW`@\x80Q\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\x82\x01R`\x1D`$\x82\x01R\x7FUniswapV2Router: INVALID_PATH\0\0\0`D\x82\x01R\x90Q\x90\x81\x90\x03`d\x01\x90\xFD[a\x1F\x1B\x85\x85`\0\x81\x81\x10a\x1A~W\xFE[a\x1FY\x85\x85\x80\x80` \x02` \x01`@Q\x90\x81\x01`@R\x80\x93\x92\x91\x90\x81\x81R` \x01\x83\x83` \x02\x80\x82\x847`\0\x92\x01\x91\x90\x91RP0\x92PaG\x96\x91PPV[`@\x80Q\x7Fp\xA0\x821\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\x81R0`\x04\x82\x01R\x90Q`\0\x91s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\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\x16\x91cp\xA0\x821\x91`$\x80\x82\x01\x92` \x92\x90\x91\x90\x82\x90\x03\x01\x81\x86\x80;\x15\x80\x15a\x1F\xE9W`\0\x80\xFD[PZ\xFA\x15\x80\x15a\x1F\xFDW=`\0\x80>=`\0\xFD[PPPP`@Q=` \x81\x10\x15a \x13W`\0\x80\xFD[PQ\x90P\x86\x81\x10\x15a pW`@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\x01\x80\x80` \x01\x82\x81\x03\x82R`+\x81R` \x01\x80aU\x08`+\x919`@\x01\x91PP`@Q\x80\x91\x03\x90\xFD[\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\0s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16c.\x1A}M\x82`@Q\x82c\xFF\xFF\xFF\xFF\x16`\xE0\x1B\x81R`\x04\x01\x80\x82\x81R` \x01\x91PP`\0`@Q\x80\x83\x03\x81`\0\x87\x80;\x15\x80\x15a \xE3W`\0\x80\xFD[PZ\xF1\x15\x80\x15a \xF7W=`\0\x80>=`\0\xFD[PPPPa\x1D\x8D\x84\x82a<\xFFV[``\x81B\x81\x10\x15a!wW`@\x80Q\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\x82\x01R`\x18`$\x82\x01R\x7FUniswapV2Router: EXPIRED\0\0\0\0\0\0\0\0`D\x82\x01R\x90Q\x90\x81\x90\x03`d\x01\x90\xFD[\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\0s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x86\x86`\0\x81\x81\x10a!\xBBW\xFE[\x90P` \x02\x015s\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\x14a\"ZW`@\x80Q\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\x82\x01R`\x1D`$\x82\x01R\x7FUniswapV2Router: INVALID_PATH\0\0\0`D\x82\x01R\x90Q\x90\x81\x90\x03`d\x01\x90\xFD[a\"\xB8\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\x004\x88\x88\x80\x80` \x02` \x01`@Q\x90\x81\x01`@R\x80\x93\x92\x91\x90\x81\x81R` \x01\x83\x83` \x02\x80\x82\x847`\0\x92\x01\x91\x90\x91RPa?`\x92PPPV[\x91P\x86\x82`\x01\x84Q\x03\x81Q\x81\x10a\"\xCBW\xFE[` \x02` \x01\x01Q\x10\x15a#*W`@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\x01\x80\x80` \x01\x82\x81\x03\x82R`+\x81R` \x01\x80aU\x08`+\x919`@\x01\x91PP`@Q\x80\x91\x03\x90\xFD[\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\0s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16c\xD0\xE3\r\xB0\x83`\0\x81Q\x81\x10a#sW\xFE[` \x02` \x01\x01Q`@Q\x82c\xFF\xFF\xFF\xFF\x16`\xE0\x1B\x81R`\x04\x01`\0`@Q\x80\x83\x03\x81\x85\x88\x80;\x15\x80\x15a#\xA6W`\0\x80\xFD[PZ\xF1\x15\x80\x15a#\xBAW=`\0\x80>=`\0\xFD[PPPPP\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\0s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16c\xA9\x05\x9C\xBBa$,\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\x89\x89`\0\x81\x81\x10a\x1A\xCDW\xFE[\x84`\0\x81Q\x81\x10a$9W\xFE[` \x02` \x01\x01Q`@Q\x83c\xFF\xFF\xFF\xFF\x16`\xE0\x1B\x81R`\x04\x01\x80\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\x82\x81R` \x01\x92PPP` `@Q\x80\x83\x03\x81`\0\x87\x80;\x15\x80\x15a$\xAAW`\0\x80\xFD[PZ\xF1\x15\x80\x15a$\xBEW=`\0\x80>=`\0\xFD[PPPP`@Q=` \x81\x10\x15a$\xD4W`\0\x80\xFD[PQa$\xDCW\xFE[a%\x1B\x82\x87\x87\x80\x80` \x02` \x01`@Q\x90\x81\x01`@R\x80\x93\x92\x91\x90\x81\x81R` \x01\x83\x83` \x02\x80\x82\x847`\0\x92\x01\x91\x90\x91RP\x89\x92PaC\x81\x91PPV[P\x95\x94PPPPPV[`\0a\x0FD\x84\x84\x84aK\x9BV[``\x81B\x81\x10\x15a%\xA4W`@\x80Q\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\x82\x01R`\x18`$\x82\x01R\x7FUniswapV2Router: EXPIRED\0\0\0\0\0\0\0\0`D\x82\x01R\x90Q\x90\x81\x90\x03`d\x01\x90\xFD[a&\x02\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\x89\x88\x88\x80\x80` \x02` \x01`@Q\x90\x81\x01`@R\x80\x93\x92\x91\x90\x81\x81R` \x01\x83\x83` \x02\x80\x82\x847`\0\x92\x01\x91\x90\x91RPaF\x08\x92PPPV[\x91P\x86\x82`\0\x81Q\x81\x10a&\x12W\xFE[` \x02` \x01\x01Q\x11\x15a\x16\x1AW`@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\x01\x80\x80` \x01\x82\x81\x03\x82R`'\x81R` \x01\x80aT\x98`'\x919`@\x01\x91PP`@Q\x80\x91\x03\x90\xFD[\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\x81V[`\0a\x0FD\x84\x84\x84aL\xBFV[`\0\x81B\x81\x10\x15a'\x14W`@\x80Q\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\x82\x01R`\x18`$\x82\x01R\x7FUniswapV2Router: EXPIRED\0\0\0\0\0\0\0\0`D\x82\x01R\x90Q\x90\x81\x90\x03`d\x01\x90\xFD[a'C\x88\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\x89\x89\x890\x89a-eV[`@\x80Q\x7Fp\xA0\x821\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\x81R0`\x04\x82\x01R\x90Q\x91\x94Pa'\xED\x92P\x8A\x91\x87\x91s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x84\x16\x91cp\xA0\x821\x91`$\x80\x82\x01\x92` \x92\x90\x91\x90\x82\x90\x03\x01\x81\x86\x80;\x15\x80\x15a'\xBCW`\0\x80\xFD[PZ\xFA\x15\x80\x15a'\xD0W=`\0\x80>=`\0\xFD[PPPP`@Q=` \x81\x10\x15a'\xE6W`\0\x80\xFD[PQa;\"V[\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\0s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16c.\x1A}M\x83`@Q\x82c\xFF\xFF\xFF\xFF\x16`\xE0\x1B\x81R`\x04\x01\x80\x82\x81R` \x01\x91PP`\0`@Q\x80\x83\x03\x81`\0\x87\x80;\x15\x80\x15a(`W`\0\x80\xFD[PZ\xF1\x15\x80\x15a(tW=`\0\x80>=`\0\xFD[PPPPa\x13Y\x84\x83a<\xFFV[\x80B\x81\x10\x15a(\xF2W`@\x80Q\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\x82\x01R`\x18`$\x82\x01R\x7FUniswapV2Router: EXPIRED\0\0\0\0\0\0\0\0`D\x82\x01R\x90Q\x90\x81\x90\x03`d\x01\x90\xFD[\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\0s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x85\x85`\0\x81\x81\x10a)6W\xFE[\x90P` \x02\x015s\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\x14a)\xD5W`@\x80Q\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\x82\x01R`\x1D`$\x82\x01R\x7FUniswapV2Router: INVALID_PATH\0\0\0`D\x82\x01R\x90Q\x90\x81\x90\x03`d\x01\x90\xFD[`\x004\x90P\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\0s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16c\xD0\xE3\r\xB0\x82`@Q\x82c\xFF\xFF\xFF\xFF\x16`\xE0\x1B\x81R`\x04\x01`\0`@Q\x80\x83\x03\x81\x85\x88\x80;\x15\x80\x15a*BW`\0\x80\xFD[PZ\xF1\x15\x80\x15a*VW=`\0\x80>=`\0\xFD[PPPPP\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\0s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16c\xA9\x05\x9C\xBBa*\xC8\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\x89\x89`\0\x81\x81\x10a\x1A\xCDW\xFE[\x83`@Q\x83c\xFF\xFF\xFF\xFF\x16`\xE0\x1B\x81R`\x04\x01\x80\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\x82\x81R` \x01\x92PPP` `@Q\x80\x83\x03\x81`\0\x87\x80;\x15\x80\x15a+2W`\0\x80\xFD[PZ\xF1\x15\x80\x15a+FW=`\0\x80>=`\0\xFD[PPPP`@Q=` \x81\x10\x15a+\\W`\0\x80\xFD[PQa+dW\xFE[`\0\x86\x86\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\x01\x81\x81\x10a+\x94W\xFE[\x90P` \x02\x015s\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\x16cp\xA0\x821\x86`@Q\x82c\xFF\xFF\xFF\xFF\x16`\xE0\x1B\x81R`\x04\x01\x80\x82s\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\x91PP` `@Q\x80\x83\x03\x81\x86\x80;\x15\x80\x15a,-W`\0\x80\xFD[PZ\xFA\x15\x80\x15a,AW=`\0\x80>=`\0\xFD[PPPP`@Q=` \x81\x10\x15a,WW`\0\x80\xFD[PQ`@\x80Q` \x89\x81\x02\x82\x81\x01\x82\x01\x90\x93R\x89\x82R\x92\x93Pa,\x99\x92\x90\x91\x8A\x91\x8A\x91\x82\x91\x85\x01\x90\x84\x90\x80\x82\x847`\0\x92\x01\x91\x90\x91RP\x89\x92PaG\x96\x91PPV[\x87a\x1D6\x82\x89\x89\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\x01\x81\x81\x10a,\xCCW\xFE[\x90P` \x02\x015s\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\x16cp\xA0\x821\x89`@Q\x82c\xFF\xFF\xFF\xFF\x16`\xE0\x1B\x81R`\x04\x01\x80\x82s\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\x91PP` `@Q\x80\x83\x03\x81\x86\x80;\x15\x80\x15a\x1C\xFEW`\0\x80\xFD[`\0\x80\x82B\x81\x10\x15a-\xD8W`@\x80Q\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\x82\x01R`\x18`$\x82\x01R\x7FUniswapV2Router: EXPIRED\0\0\0\0\0\0\0\0`D\x82\x01R\x90Q\x90\x81\x90\x03`d\x01\x90\xFD[`\0a.\x05\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\x8C\x8Ca@\xC6V[`@\x80Q\x7F#\xB8r\xDD\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\x81R3`\x04\x82\x01Rs\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x83\x16`$\x82\x01\x81\x90R`D\x82\x01\x8D\x90R\x91Q\x92\x93P\x90\x91c#\xB8r\xDD\x91`d\x80\x82\x01\x92` \x92\x90\x91\x90\x82\x90\x03\x01\x81`\0\x87\x80;\x15\x80\x15a.\x86W`\0\x80\xFD[PZ\xF1\x15\x80\x15a.\x9AW=`\0\x80>=`\0\xFD[PPPP`@Q=` \x81\x10\x15a.\xB0W`\0\x80\xFD[PP`@\x80Q\x7F\x89\xAF\xCBD\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\x81Rs\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x88\x81\x16`\x04\x83\x01R\x82Q`\0\x93\x84\x93\x92\x86\x16\x92c\x89\xAF\xCBD\x92`$\x80\x83\x01\x93\x92\x82\x90\x03\x01\x81\x87\x87\x80;\x15\x80\x15a/#W`\0\x80\xFD[PZ\xF1\x15\x80\x15a/7W=`\0\x80>=`\0\xFD[PPPP`@Q=`@\x81\x10\x15a/MW`\0\x80\xFD[P\x80Q` \x90\x91\x01Q\x90\x92P\x90P`\0a/g\x8E\x8EaM\x9FV[P\x90P\x80s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x8Es\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x14a/\xA4W\x81\x83a/\xA7V[\x82\x82[\x90\x97P\x95P\x8A\x87\x10\x15a0\x05W`@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\x01\x80\x80` \x01\x82\x81\x03\x82R`&\x81R` \x01\x80aT\xBF`&\x919`@\x01\x91PP`@Q\x80\x91\x03\x90\xFD[\x89\x86\x10\x15a0^W`@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\x01\x80\x80` \x01\x82\x81\x03\x82R`&\x81R` \x01\x80aT%`&\x919`@\x01\x91PP`@Q\x80\x91\x03\x90\xFD[PPPPP\x97P\x97\x95PPPPPPV[\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\x81V[``a\x13\x91\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\x84\x84a?`V[`\0\x80`\0a1\x10\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\x8E\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\0a@\xC6V[\x90P`\0\x87a1\x1FW\x8Ca1AV[\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[`@\x80Q\x7F\xD5\x05\xAC\xCF\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\x81R3`\x04\x82\x01R0`$\x82\x01R`D\x81\x01\x83\x90R`d\x81\x01\x8C\x90R`\xFF\x8A\x16`\x84\x82\x01R`\xA4\x81\x01\x89\x90R`\xC4\x81\x01\x88\x90R\x90Q\x91\x92Ps\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x84\x16\x91c\xD5\x05\xAC\xCF\x91`\xE4\x80\x82\x01\x92`\0\x92\x90\x91\x90\x82\x90\x03\x01\x81\x83\x87\x80;\x15\x80\x15a1\xDDW`\0\x80\xFD[PZ\xF1\x15\x80\x15a1\xF1W=`\0\x80>=`\0\xFD[PPPPa2\x03\x8E\x8E\x8E\x8E\x8E\x8Ea\r\xE4V[\x90\x9F\x90\x9EP\x9CPPPPPPPPPPPPPV[`\0\x80`\0\x83B\x81\x10\x15a2\x8DW`@\x80Q\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\x82\x01R`\x18`$\x82\x01R\x7FUniswapV2Router: EXPIRED\0\0\0\0\0\0\0\0`D\x82\x01R\x90Q\x90\x81\x90\x03`d\x01\x90\xFD[a2\x9B\x8C\x8C\x8C\x8C\x8C\x8CaN\xF2V[\x90\x94P\x92P`\0a2\xCD\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\x8E\x8Ea@\xC6V[\x90Pa2\xDB\x8D3\x83\x88aA\xB1V[a2\xE7\x8C3\x83\x87aA\xB1V[\x80s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16cjbxB\x88`@Q\x82c\xFF\xFF\xFF\xFF\x16`\xE0\x1B\x81R`\x04\x01\x80\x82s\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\x91PP` `@Q\x80\x83\x03\x81`\0\x87\x80;\x15\x80\x15a3fW`\0\x80\xFD[PZ\xF1\x15\x80\x15a3zW=`\0\x80>=`\0\xFD[PPPP`@Q=` \x81\x10\x15a3\x90W`\0\x80\xFD[PQ\x94\x9D\x93\x9CP\x93\x9AP\x91\x98PPPPPPPPPV[`\0\x80`\0\x83B\x81\x10\x15a4\x1CW`@\x80Q\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\x82\x01R`\x18`$\x82\x01R\x7FUniswapV2Router: EXPIRED\0\0\0\0\0\0\0\0`D\x82\x01R\x90Q\x90\x81\x90\x03`d\x01\x90\xFD[a4J\x8A\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\x8B4\x8C\x8CaN\xF2V[\x90\x94P\x92P`\0a4\x9C\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\x8C\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\0a@\xC6V[\x90Pa4\xAA\x8B3\x83\x88aA\xB1V[\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\0s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16c\xD0\xE3\r\xB0\x85`@Q\x82c\xFF\xFF\xFF\xFF\x16`\xE0\x1B\x81R`\x04\x01`\0`@Q\x80\x83\x03\x81\x85\x88\x80;\x15\x80\x15a5\x12W`\0\x80\xFD[PZ\xF1\x15\x80\x15a5&W=`\0\x80>=`\0\xFD[PPPPP\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\0s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16c\xA9\x05\x9C\xBB\x82\x86`@Q\x83c\xFF\xFF\xFF\xFF\x16`\xE0\x1B\x81R`\x04\x01\x80\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\x82\x81R` \x01\x92PPP` `@Q\x80\x83\x03\x81`\0\x87\x80;\x15\x80\x15a5\xD2W`\0\x80\xFD[PZ\xF1\x15\x80\x15a5\xE6W=`\0\x80>=`\0\xFD[PPPP`@Q=` \x81\x10\x15a5\xFCW`\0\x80\xFD[PQa6\x04W\xFE[\x80s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16cjbxB\x88`@Q\x82c\xFF\xFF\xFF\xFF\x16`\xE0\x1B\x81R`\x04\x01\x80\x82s\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\x91PP` `@Q\x80\x83\x03\x81`\0\x87\x80;\x15\x80\x15a6\x83W`\0\x80\xFD[PZ\xF1\x15\x80\x15a6\x97W=`\0\x80>=`\0\xFD[PPPP`@Q=` \x81\x10\x15a6\xADW`\0\x80\xFD[PQ\x92P4\x84\x10\x15a6\xC5Wa6\xC53\x854\x03a<\xFFV[PP\x96P\x96P\x96\x93PPPPV[``\x81B\x81\x10\x15a7EW`@\x80Q\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\x82\x01R`\x18`$\x82\x01R\x7FUniswapV2Router: EXPIRED\0\0\0\0\0\0\0\0`D\x82\x01R\x90Q\x90\x81\x90\x03`d\x01\x90\xFD[\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\0s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x86\x86`\0\x81\x81\x10a7\x89W\xFE[\x90P` \x02\x015s\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\x14a8(W`@\x80Q\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\x82\x01R`\x1D`$\x82\x01R\x7FUniswapV2Router: INVALID_PATH\0\0\0`D\x82\x01R\x90Q\x90\x81\x90\x03`d\x01\x90\xFD[a8\x86\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\x88\x88\x88\x80\x80` \x02` \x01`@Q\x90\x81\x01`@R\x80\x93\x92\x91\x90\x81\x81R` \x01\x83\x83` \x02\x80\x82\x847`\0\x92\x01\x91\x90\x91RPaF\x08\x92PPPV[\x91P4\x82`\0\x81Q\x81\x10a8\x96W\xFE[` \x02` \x01\x01Q\x11\x15a8\xF5W`@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\x01\x80\x80` \x01\x82\x81\x03\x82R`'\x81R` \x01\x80aT\x98`'\x919`@\x01\x91PP`@Q\x80\x91\x03\x90\xFD[\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\0s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16c\xD0\xE3\r\xB0\x83`\0\x81Q\x81\x10a9>W\xFE[` \x02` \x01\x01Q`@Q\x82c\xFF\xFF\xFF\xFF\x16`\xE0\x1B\x81R`\x04\x01`\0`@Q\x80\x83\x03\x81\x85\x88\x80;\x15\x80\x15a9qW`\0\x80\xFD[PZ\xF1\x15\x80\x15a9\x85W=`\0\x80>=`\0\xFD[PPPPP\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\0s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16c\xA9\x05\x9C\xBBa9\xF7\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\x89\x89`\0\x81\x81\x10a\x1A\xCDW\xFE[\x84`\0\x81Q\x81\x10a:\x04W\xFE[` \x02` \x01\x01Q`@Q\x83c\xFF\xFF\xFF\xFF\x16`\xE0\x1B\x81R`\x04\x01\x80\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\x82\x81R` \x01\x92PPP` `@Q\x80\x83\x03\x81`\0\x87\x80;\x15\x80\x15a:uW`\0\x80\xFD[PZ\xF1\x15\x80\x15a:\x89W=`\0\x80>=`\0\xFD[PPPP`@Q=` \x81\x10\x15a:\x9FW`\0\x80\xFD[PQa:\xA7W\xFE[a:\xE6\x82\x87\x87\x80\x80` \x02` \x01`@Q\x90\x81\x01`@R\x80\x93\x92\x91\x90\x81\x81R` \x01\x83\x83` \x02\x80\x82\x847`\0\x92\x01\x91\x90\x91RP\x89\x92PaC\x81\x91PPV[\x81`\0\x81Q\x81\x10a:\xF3W\xFE[` \x02` \x01\x01Q4\x11\x15a%\x1BWa%\x1B3\x83`\0\x81Q\x81\x10a;\x13W\xFE[` \x02` \x01\x01Q4\x03a<\xFFV[`@\x80Qs\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x84\x81\x16`$\x83\x01R`D\x80\x83\x01\x85\x90R\x83Q\x80\x84\x03\x90\x91\x01\x81R`d\x90\x92\x01\x83R` \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\x16\x7F\xA9\x05\x9C\xBB\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\x17\x81R\x92Q\x82Q`\0\x94``\x94\x93\x89\x16\x93\x92\x91\x82\x91\x90\x80\x83\x83[` \x83\x10a;\xF8W\x80Q\x82R\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\xE0\x90\x92\x01\x91` \x91\x82\x01\x91\x01a;\xBBV[`\x01\x83` \x03a\x01\0\n\x03\x80\x19\x82Q\x16\x81\x84Q\x16\x80\x82\x17\x85RPPPPPP\x90P\x01\x91PP`\0`@Q\x80\x83\x03\x81`\0\x86Z\xF1\x91PP=\x80`\0\x81\x14aa<_V[``\x91P[P\x91P\x91P\x81\x80\x15a<\x8DWP\x80Q\x15\x80a<\x8DWP\x80\x80` \x01\x90Q` \x81\x10\x15a<\x8AW`\0\x80\xFD[PQ[a<\xF8W`@\x80Q\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\x82\x01R`\x1F`$\x82\x01R\x7FTransferHelper: TRANSFER_FAILED\0`D\x82\x01R\x90Q\x90\x81\x90\x03`d\x01\x90\xFD[PPPPPV[`@\x80Q`\0\x80\x82R` \x82\x01\x90\x92Rs\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x84\x16\x90\x83\x90`@Q\x80\x82\x80Q\x90` \x01\x90\x80\x83\x83[` \x83\x10a=vW\x80Q\x82R\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\xE0\x90\x92\x01\x91` \x91\x82\x01\x91\x01a=9V[`\x01\x83` \x03a\x01\0\n\x03\x80\x19\x82Q\x16\x81\x84Q\x16\x80\x82\x17\x85RPPPPPP\x90P\x01\x91PP`\0`@Q\x80\x83\x03\x81\x85\x87Z\xF1\x92PPP=\x80`\0\x81\x14a=\xD8W`@Q\x91P`\x1F\x19`?=\x01\x16\x82\x01`@R=\x82R=`\0` \x84\x01>a=\xDDV[``\x91P[PP\x90P\x80a>7W`@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\x01\x80\x80` \x01\x82\x81\x03\x82R`#\x81R` \x01\x80aT\xE5`#\x919`@\x01\x91PP`@Q\x80\x91\x03\x90\xFD[PPPV[`\0\x80\x84\x11a>\x96W`@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\x01\x80\x80` \x01\x82\x81\x03\x82R`+\x81R` \x01\x80aUW`+\x919`@\x01\x91PP`@Q\x80\x91\x03\x90\xFD[`\0\x83\x11\x80\x15a>\xA6WP`\0\x82\x11[a>\xFBW`@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\x01\x80\x80` \x01\x82\x81\x03\x82R`(\x81R` \x01\x80aTK`(\x919`@\x01\x91PP`@Q\x80\x91\x03\x90\xFD[`\0a?\x0F\x85a\x03\xE5c\xFF\xFF\xFF\xFFaQ\xF3\x16V[\x90P`\0a?#\x82\x85c\xFF\xFF\xFF\xFFaQ\xF3\x16V[\x90P`\0a?I\x83a?=\x88a\x03\xE8c\xFF\xFF\xFF\xFFaQ\xF3\x16V[\x90c\xFF\xFF\xFF\xFFaRy\x16V[\x90P\x80\x82\x81a?TW\xFE[\x04\x97\x96PPPPPPPV[```\x02\x82Q\x10\x15a?\xD3W`@\x80Q\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\x82\x01R`\x1E`$\x82\x01R\x7FUniswapV2Library: INVALID_PATH\0\0`D\x82\x01R\x90Q\x90\x81\x90\x03`d\x01\x90\xFD[\x81Qg\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x11\x80\x15a?\xEBW`\0\x80\xFD[P`@Q\x90\x80\x82R\x80` \x02` \x01\x82\x01`@R\x80\x15a@\x15W\x81` \x01` \x82\x02\x806\x837\x01\x90P[P\x90P\x82\x81`\0\x81Q\x81\x10a@&W\xFE[` \x02` \x01\x01\x81\x81RPP`\0[`\x01\x83Q\x03\x81\x10\x15a@\xBEW`\0\x80a@x\x87\x86\x85\x81Q\x81\x10a@TW\xFE[` \x02` \x01\x01Q\x87\x86`\x01\x01\x81Q\x81\x10a@kW\xFE[` \x02` \x01\x01QaR\xEBV[\x91P\x91Pa@\x9A\x84\x84\x81Q\x81\x10a@\x8BW\xFE[` \x02` \x01\x01Q\x83\x83a>}\xA3H\x84_`\x9D\x80\x84\x01\x91\x90\x91R\x88Q\x80\x84\x03\x90\x91\x01\x81R`\xBD\x90\x92\x01\x90\x97R\x80Q\x96\x01\x95\x90\x95 \x95\x94PPPPPV[`@\x80Qs\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x85\x81\x16`$\x83\x01R\x84\x81\x16`D\x83\x01R`d\x80\x83\x01\x85\x90R\x83Q\x80\x84\x03\x90\x91\x01\x81R`\x84\x90\x92\x01\x83R` \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\x16\x7F#\xB8r\xDD\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\x17\x81R\x92Q\x82Q`\0\x94``\x94\x93\x8A\x16\x93\x92\x91\x82\x91\x90\x80\x83\x83[` \x83\x10aB\x8FW\x80Q\x82R\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\xE0\x90\x92\x01\x91` \x91\x82\x01\x91\x01aBRV[`\x01\x83` \x03a\x01\0\n\x03\x80\x19\x82Q\x16\x81\x84Q\x16\x80\x82\x17\x85RPPPPPP\x90P\x01\x91PP`\0`@Q\x80\x83\x03\x81`\0\x86Z\xF1\x91PP=\x80`\0\x81\x14aB\xF1W`@Q\x91P`\x1F\x19`?=\x01\x16\x82\x01`@R=\x82R=`\0` \x84\x01>aB\xF6V[``\x91P[P\x91P\x91P\x81\x80\x15aC$WP\x80Q\x15\x80aC$WP\x80\x80` \x01\x90Q` \x81\x10\x15aC!W`\0\x80\xFD[PQ[aCyW`@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\x01\x80\x80` \x01\x82\x81\x03\x82R`$\x81R` \x01\x80aU3`$\x919`@\x01\x91PP`@Q\x80\x91\x03\x90\xFD[PPPPPPV[`\0[`\x01\x83Q\x03\x81\x10\x15aF\x02W`\0\x80\x84\x83\x81Q\x81\x10aC\x9FW\xFE[` \x02` \x01\x01Q\x85\x84`\x01\x01\x81Q\x81\x10aC\xB6W\xFE[` \x02` \x01\x01Q\x91P\x91P`\0aC\xCE\x83\x83aM\x9FV[P\x90P`\0\x87\x85`\x01\x01\x81Q\x81\x10aC\xE2W\xFE[` \x02` \x01\x01Q\x90P`\0\x80\x83s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x86s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x14aD*W\x82`\0aD.V[`\0\x83[\x91P\x91P`\0`\x02\x8AQ\x03\x88\x10aDEW\x88aD\x86V[aD\x86\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\x87\x8C\x8B`\x02\x01\x81Q\x81\x10aDyW\xFE[` \x02` \x01\x01Qa@\xC6V[\x90PaD\xB3\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\x88\x88a@\xC6V[s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16c\x02,\r\x9F\x84\x84\x84`\0`@Q\x90\x80\x82R\x80`\x1F\x01`\x1F\x19\x16` \x01\x82\x01`@R\x80\x15aD\xFDW` \x82\x01\x81\x806\x837\x01\x90P[P`@Q\x85c\xFF\xFF\xFF\xFF\x16`\xE0\x1B\x81R`\x04\x01\x80\x85\x81R` \x01\x84\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\x80` \x01\x82\x81\x03\x82R\x83\x81\x81Q\x81R` \x01\x91P\x80Q\x90` \x01\x90\x80\x83\x83`\0[\x83\x81\x10\x15aE\x88W\x81\x81\x01Q\x83\x82\x01R` \x01aEpV[PPPP\x90P\x90\x81\x01\x90`\x1F\x16\x80\x15aE\xB5W\x80\x82\x03\x80Q`\x01\x83` \x03a\x01\0\n\x03\x19\x16\x81R` \x01\x91P[P\x95PPPPPP`\0`@Q\x80\x83\x03\x81`\0\x87\x80;\x15\x80\x15aE\xD7W`\0\x80\xFD[PZ\xF1\x15\x80\x15aE\xEBW=`\0\x80>=`\0\xFD[PP`\x01\x90\x99\x01\x98PaC\x84\x97PPPPPPPPV[PPPPV[```\x02\x82Q\x10\x15aF{W`@\x80Q\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\x82\x01R`\x1E`$\x82\x01R\x7FUniswapV2Library: INVALID_PATH\0\0`D\x82\x01R\x90Q\x90\x81\x90\x03`d\x01\x90\xFD[\x81Qg\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x11\x80\x15aF\x93W`\0\x80\xFD[P`@Q\x90\x80\x82R\x80` \x02` \x01\x82\x01`@R\x80\x15aF\xBDW\x81` \x01` \x82\x02\x806\x837\x01\x90P[P\x90P\x82\x81`\x01\x83Q\x03\x81Q\x81\x10aF\xD1W\xFE[` \x90\x81\x02\x91\x90\x91\x01\x01R\x81Q\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\x01[\x80\x15a@\xBEW`\0\x80aG1\x87\x86`\x01\x86\x03\x81Q\x81\x10aG\x1DW\xFE[` \x02` \x01\x01Q\x87\x86\x81Q\x81\x10a@kW\xFE[\x91P\x91PaGS\x84\x84\x81Q\x81\x10aGDW\xFE[` \x02` \x01\x01Q\x83\x83aK\x9BV[\x84`\x01\x85\x03\x81Q\x81\x10aGbW\xFE[` \x90\x81\x02\x91\x90\x91\x01\x01RPP\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\x01aG\x01V[`\0[`\x01\x83Q\x03\x81\x10\x15a>7W`\0\x80\x84\x83\x81Q\x81\x10aG\xB4W\xFE[` \x02` \x01\x01Q\x85\x84`\x01\x01\x81Q\x81\x10aG\xCBW\xFE[` \x02` \x01\x01Q\x91P\x91P`\0aG\xE3\x83\x83aM\x9FV[P\x90P`\0aH\x13\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\x85\x85a@\xC6V[\x90P`\0\x80`\0\x80\x84s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16c\t\x02\xF1\xAC`@Q\x81c\xFF\xFF\xFF\xFF\x16`\xE0\x1B\x81R`\x04\x01```@Q\x80\x83\x03\x81\x86\x80;\x15\x80\x15aHaW`\0\x80\xFD[PZ\xFA\x15\x80\x15aHuW=`\0\x80>=`\0\xFD[PPPP`@Q=``\x81\x10\x15aH\x8BW`\0\x80\xFD[P\x80Q` \x90\x91\x01Qm\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x91\x82\x16\x93P\x16\x90P`\0\x80s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x8A\x81\x16\x90\x89\x16\x14aH\xD5W\x82\x84aH\xD8V[\x83\x83[\x91P\x91PaI]\x82\x8Bs\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16cp\xA0\x821\x8A`@Q\x82c\xFF\xFF\xFF\xFF\x16`\xE0\x1B\x81R`\x04\x01\x80\x82s\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\x91PP` `@Q\x80\x83\x03\x81\x86\x80;\x15\x80\x15a\x1C\xFEW`\0\x80\xFD[\x95PaIj\x86\x83\x83a>=`\0\xFD[PP`\x01\x90\x9B\x01\x9APaG\x99\x99PPPPPPPPPPV[\x80\x82\x03\x82\x81\x11\x15a\x13\x94W`@\x80Q\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\x82\x01R`\x15`$\x82\x01R\x7Fds-math-sub-underflow\0\0\0\0\0\0\0\0\0\0\0`D\x82\x01R\x90Q\x90\x81\x90\x03`d\x01\x90\xFD[`\0\x80\x84\x11aK\xF5W`@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\x01\x80\x80` \x01\x82\x81\x03\x82R`,\x81R` \x01\x80aS\xD4`,\x919`@\x01\x91PP`@Q\x80\x91\x03\x90\xFD[`\0\x83\x11\x80\x15aL\x05WP`\0\x82\x11[aLZW`@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\x01\x80\x80` \x01\x82\x81\x03\x82R`(\x81R` \x01\x80aTK`(\x919`@\x01\x91PP`@Q\x80\x91\x03\x90\xFD[`\0aL~a\x03\xE8aLr\x86\x88c\xFF\xFF\xFF\xFFaQ\xF3\x16V[\x90c\xFF\xFF\xFF\xFFaQ\xF3\x16V[\x90P`\0aL\x98a\x03\xE5aLr\x86\x89c\xFF\xFF\xFF\xFFaK)\x16V[\x90PaL\xB5`\x01\x82\x84\x81aL\xA8W\xFE[\x04\x90c\xFF\xFF\xFF\xFFaRy\x16V[\x96\x95PPPPPPV[`\0\x80\x84\x11aM\x19W`@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\x01\x80\x80` \x01\x82\x81\x03\x82R`%\x81R` \x01\x80aTs`%\x919`@\x01\x91PP`@Q\x80\x91\x03\x90\xFD[`\0\x83\x11\x80\x15aM)WP`\0\x82\x11[aM~W`@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\x01\x80\x80` \x01\x82\x81\x03\x82R`(\x81R` \x01\x80aTK`(\x919`@\x01\x91PP`@Q\x80\x91\x03\x90\xFD[\x82aM\x8F\x85\x84c\xFF\xFF\xFF\xFFaQ\xF3\x16V[\x81aM\x96W\xFE[\x04\x94\x93PPPPV[`\0\x80\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\x14\x15aN'W`@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\x01\x80\x80` \x01\x82\x81\x03\x82R`%\x81R` \x01\x80aT\0`%\x919`@\x01\x91PP`@Q\x80\x91\x03\x90\xFD[\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\x10aNaW\x82\x84aNdV[\x83\x83[\x90\x92P\x90Ps\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x82\x16aN\xEBW`@\x80Q\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\x82\x01R`\x1E`$\x82\x01R\x7FUniswapV2Library: ZERO_ADDRESS\0\0`D\x82\x01R\x90Q\x90\x81\x90\x03`d\x01\x90\xFD[\x92P\x92\x90PV[`@\x80Q\x7F\xE6\xA49\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\x81Rs\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x88\x81\x16`\x04\x83\x01R\x87\x81\x16`$\x83\x01R\x91Q`\0\x92\x83\x92\x83\x92\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\x90\x92\x16\x91c\xE6\xA49\x05\x91`D\x80\x82\x01\x92` \x92\x90\x91\x90\x82\x90\x03\x01\x81\x86\x80;\x15\x80\x15aO\x92W`\0\x80\xFD[PZ\xFA\x15\x80\x15aO\xA6W=`\0\x80>=`\0\xFD[PPPP`@Q=` \x81\x10\x15aO\xBCW`\0\x80\xFD[PQs\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x14\x15aP\xA2W`@\x80Q\x7F\xC9\xC6S\x96\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\x81Rs\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x8A\x81\x16`\x04\x83\x01R\x89\x81\x16`$\x83\x01R\x91Q\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\x90\x92\x16\x91c\xC9\xC6S\x96\x91`D\x80\x82\x01\x92` \x92\x90\x91\x90\x82\x90\x03\x01\x81`\0\x87\x80;\x15\x80\x15aPuW`\0\x80\xFD[PZ\xF1\x15\x80\x15aP\x89W=`\0\x80>=`\0\xFD[PPPP`@Q=` \x81\x10\x15aP\x9FW`\0\x80\xFD[PP[`\0\x80aP\xD0\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\x8B\x8BaR\xEBV[\x91P\x91P\x81`\0\x14\x80\x15aP\xE2WP\x80\x15[\x15aP\xF2W\x87\x93P\x86\x92PaQ\xE6V[`\0aP\xFF\x89\x84\x84aL\xBFV[\x90P\x87\x81\x11aQlW\x85\x81\x10\x15aQaW`@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\x01\x80\x80` \x01\x82\x81\x03\x82R`&\x81R` \x01\x80aT%`&\x919`@\x01\x91PP`@Q\x80\x91\x03\x90\xFD[\x88\x94P\x92P\x82aQ\xE4V[`\0aQy\x89\x84\x86aL\xBFV[\x90P\x89\x81\x11\x15aQ\x85W\xFE[\x87\x81\x10\x15aQ\xDEW`@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\x01\x80\x80` \x01\x82\x81\x03\x82R`&\x81R` \x01\x80aT\xBF`&\x919`@\x01\x91PP`@Q\x80\x91\x03\x90\xFD[\x94P\x87\x93P[P[PP\x96P\x96\x94PPPPPV[`\0\x81\x15\x80aR\x0EWPP\x80\x82\x02\x82\x82\x82\x81aR\x0BW\xFE[\x04\x14[a\x13\x94W`@\x80Q\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\x82\x01R`\x14`$\x82\x01R\x7Fds-math-mul-overflow\0\0\0\0\0\0\0\0\0\0\0\0`D\x82\x01R\x90Q\x90\x81\x90\x03`d\x01\x90\xFD[\x80\x82\x01\x82\x81\x10\x15a\x13\x94W`@\x80Q\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\x82\x01R`\x14`$\x82\x01R\x7Fds-math-add-overflow\0\0\0\0\0\0\0\0\0\0\0\0`D\x82\x01R\x90Q\x90\x81\x90\x03`d\x01\x90\xFD[`\0\x80`\0aR\xFA\x85\x85aM\x9FV[P\x90P`\0\x80aS\x0B\x88\x88\x88a@\xC6V[s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16c\t\x02\xF1\xAC`@Q\x81c\xFF\xFF\xFF\xFF\x16`\xE0\x1B\x81R`\x04\x01```@Q\x80\x83\x03\x81\x86\x80;\x15\x80\x15aSPW`\0\x80\xFD[PZ\xFA\x15\x80\x15aSdW=`\0\x80>=`\0\xFD[PPPP`@Q=``\x81\x10\x15aSzW`\0\x80\xFD[P\x80Q` \x90\x91\x01Qm\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x91\x82\x16\x93P\x16\x90Ps\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x87\x81\x16\x90\x84\x16\x14aS\xC1W\x80\x82aS\xC4V[\x81\x81[\x90\x99\x90\x98P\x96PPPPPPPV\xFEUniswapV2Library: INSUFFICIENT_OUTPUT_AMOUNTUniswapV2Library: IDENTICAL_ADDRESSESUniswapV2Router: INSUFFICIENT_B_AMOUNTUniswapV2Library: INSUFFICIENT_LIQUIDITYUniswapV2Library: INSUFFICIENT_AMOUNTUniswapV2Router: EXCESSIVE_INPUT_AMOUNTUniswapV2Router: INSUFFICIENT_A_AMOUNTTransferHelper: ETH_TRANSFER_FAILEDUniswapV2Router: INSUFFICIENT_OUTPUT_AMOUNTTransferHelper: TRANSFER_FROM_FAILEDUniswapV2Library: INSUFFICIENT_INPUT_AMOUNT\xA2dipfsX\"\x12 m\xD6\xE0, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -281,15 +284,15 @@ constructor(address _factory, address _WETH); alloy_sol_types::sol_data::Address, alloy_sol_types::sol_data::Address, ); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + 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<'_> { ( @@ -305,14 +308,15 @@ constructor(address _factory, address _WETH); }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `WETH()` and selector `0xad5c4648`. -```solidity -function WETH() external view returns (address); -```*/ + ```solidity + function WETH() external view returns (address); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct WETHCall; #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`WETH()`](WETHCall) function. + ///Container type for the return parameters of the [`WETH()`](WETHCall) + /// function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct WETHReturn { @@ -326,7 +330,7 @@ function WETH() external view returns (address); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -335,9 +339,7 @@ function WETH() external view returns (address); type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -367,9 +369,7 @@ function WETH() external view returns (address); type UnderlyingRustTuple<'a> = (alloy_sol_types::private::Address,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -394,63 +394,58 @@ function WETH() external view returns (address); #[automatically_derived] impl alloy_sol_types::SolCall for WETHCall { type Parameters<'a> = (); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = alloy_sol_types::private::Address; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (alloy_sol_types::sol_data::Address,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "WETH()"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [173u8, 92u8, 70u8, 72u8]; + const SIGNATURE: &'static str = "WETH()"; + #[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, - ), - ) + (::tokenize(ret),) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) - .map(|r| { + as alloy_sol_types::SolType>::abi_decode_sequence(data).map( + |r| { let r: WETHReturn = 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: WETHReturn = r.into(); - r._0 - }) + 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: WETHReturn = r.into(); + r._0 + }) } } }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `addLiquidity(address,address,uint256,uint256,uint256,uint256,address,uint256)` and selector `0xe8e33700`. -```solidity -function addLiquidity(address tokenA, address tokenB, uint256 amountADesired, uint256 amountBDesired, uint256 amountAMin, uint256 amountBMin, address to, uint256 deadline) external returns (uint256 amountA, uint256 amountB, uint256 liquidity); -```*/ + ```solidity + function addLiquidity(address tokenA, address tokenB, uint256 amountADesired, uint256 amountBDesired, uint256 amountAMin, uint256 amountBMin, address to, uint256 deadline) external returns (uint256 amountA, uint256 amountB, uint256 liquidity); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct addLiquidityCall { @@ -472,7 +467,9 @@ function addLiquidity(address tokenA, address tokenB, uint256 amountADesired, ui pub deadline: alloy_sol_types::private::primitives::aliases::U256, } #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`addLiquidity(address,address,uint256,uint256,uint256,uint256,address,uint256)`](addLiquidityCall) function. + ///Container type for the return parameters of the + /// [`addLiquidity(address,address,uint256,uint256,uint256,uint256,address, + /// uint256)`](addLiquidityCall) function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct addLiquidityReturn { @@ -490,7 +487,7 @@ function addLiquidity(address tokenA, address tokenB, uint256 amountADesired, ui clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -517,9 +514,7 @@ function addLiquidity(address tokenA, address tokenB, uint256 amountADesired, ui ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -575,9 +570,7 @@ function addLiquidity(address tokenA, address tokenB, uint256 amountADesired, ui ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -604,19 +597,17 @@ function addLiquidity(address tokenA, address tokenB, uint256 amountADesired, ui } } impl addLiquidityReturn { - fn _tokenize( - &self, - ) -> ::ReturnToken<'_> { + fn _tokenize(&self) -> ::ReturnToken<'_> { ( - as alloy_sol_types::SolType>::tokenize(&self.amountA), - as alloy_sol_types::SolType>::tokenize(&self.amountB), - as alloy_sol_types::SolType>::tokenize(&self.liquidity), + as alloy_sol_types::SolType>::tokenize( + &self.amountA, + ), + as alloy_sol_types::SolType>::tokenize( + &self.amountB, + ), + as alloy_sol_types::SolType>::tokenize( + &self.liquidity, + ), ) } } @@ -632,26 +623,26 @@ function addLiquidity(address tokenA, address tokenB, uint256 amountADesired, ui 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 = addLiquidityReturn; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = ( alloy_sol_types::sol_data::Uint<256>, alloy_sol_types::sol_data::Uint<256>, alloy_sol_types::sol_data::Uint<256>, ); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "addLiquidity(address,address,uint256,uint256,uint256,uint256,address,uint256)"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [232u8, 227u8, 55u8, 0u8]; + const SIGNATURE: &'static str = + "addLiquidity(address,address,uint256,uint256,uint256,uint256,address,uint256)"; + #[inline] fn new<'a>( tuple: as alloy_sol_types::SolType>::RustType, ) -> Self { tuple.into() } + #[inline] fn tokenize(&self) -> Self::Token<'_> { ( @@ -661,58 +652,58 @@ function addLiquidity(address tokenA, address tokenB, uint256 amountADesired, ui ::tokenize( &self.tokenB, ), - as alloy_sol_types::SolType>::tokenize(&self.amountADesired), - as alloy_sol_types::SolType>::tokenize(&self.amountBDesired), - as alloy_sol_types::SolType>::tokenize(&self.amountAMin), - as alloy_sol_types::SolType>::tokenize(&self.amountBMin), + as alloy_sol_types::SolType>::tokenize( + &self.amountADesired, + ), + as alloy_sol_types::SolType>::tokenize( + &self.amountBDesired, + ), + as alloy_sol_types::SolType>::tokenize( + &self.amountAMin, + ), + as alloy_sol_types::SolType>::tokenize( + &self.amountBMin, + ), ::tokenize( &self.to, ), - as alloy_sol_types::SolType>::tokenize(&self.deadline), + as alloy_sol_types::SolType>::tokenize( + &self.deadline, + ), ) } + #[inline] fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { addLiquidityReturn::_tokenize(ret) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) + 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) + 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(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `factory()` and selector `0xc45a0155`. -```solidity -function factory() external view returns (address); -```*/ + ```solidity + function factory() external view returns (address); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct factoryCall; #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`factory()`](factoryCall) function. + ///Container type for the return parameters of the + /// [`factory()`](factoryCall) function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct factoryReturn { @@ -726,7 +717,7 @@ function factory() external view returns (address); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -735,9 +726,7 @@ function factory() external view returns (address); type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -767,9 +756,7 @@ function factory() external view returns (address); type UnderlyingRustTuple<'a> = (alloy_sol_types::private::Address,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -794,63 +781,58 @@ function factory() external view returns (address); #[automatically_derived] impl alloy_sol_types::SolCall for factoryCall { type Parameters<'a> = (); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = alloy_sol_types::private::Address; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (alloy_sol_types::sol_data::Address,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "factory()"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [196u8, 90u8, 1u8, 85u8]; + const SIGNATURE: &'static str = "factory()"; + #[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, - ), - ) + (::tokenize(ret),) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) - .map(|r| { + as alloy_sol_types::SolType>::abi_decode_sequence(data).map( + |r| { let r: factoryReturn = 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: factoryReturn = r.into(); - r._0 - }) + 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: factoryReturn = r.into(); + r._0 + }) } } }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `quote(uint256,uint256,uint256)` and selector `0xad615dec`. -```solidity -function quote(uint256 amountA, uint256 reserveA, uint256 reserveB) external pure returns (uint256 amountB); -```*/ + ```solidity + function quote(uint256 amountA, uint256 reserveA, uint256 reserveB) external pure returns (uint256 amountB); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct quoteCall { @@ -862,7 +844,8 @@ function quote(uint256 amountA, uint256 reserveA, uint256 reserveB) external pur pub reserveB: alloy_sol_types::private::primitives::aliases::U256, } #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`quote(uint256,uint256,uint256)`](quoteCall) function. + ///Container type for the return parameters of the + /// [`quote(uint256,uint256,uint256)`](quoteCall) function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct quoteReturn { @@ -876,7 +859,7 @@ function quote(uint256 amountA, uint256 reserveA, uint256 reserveB) external pur clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -893,9 +876,7 @@ function quote(uint256 amountA, uint256 reserveA, uint256 reserveB) external pur ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -926,14 +907,10 @@ function quote(uint256 amountA, uint256 reserveA, uint256 reserveB) external pur #[allow(dead_code)] type UnderlyingSolTuple<'a> = (alloy_sol_types::sol_data::Uint<256>,); #[doc(hidden)] - type UnderlyingRustTuple<'a> = ( - alloy_sol_types::private::primitives::aliases::U256, - ); + 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, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -962,73 +939,72 @@ function quote(uint256 amountA, uint256 reserveA, uint256 reserveB) external pur 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 = alloy_sol_types::private::primitives::aliases::U256; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (alloy_sol_types::sol_data::Uint<256>,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "quote(uint256,uint256,uint256)"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [173u8, 97u8, 93u8, 236u8]; + const SIGNATURE: &'static str = "quote(uint256,uint256,uint256)"; + #[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.amountA), - as alloy_sol_types::SolType>::tokenize(&self.reserveA), - as alloy_sol_types::SolType>::tokenize(&self.reserveB), + as alloy_sol_types::SolType>::tokenize( + &self.amountA, + ), + as alloy_sol_types::SolType>::tokenize( + &self.reserveA, + ), + as alloy_sol_types::SolType>::tokenize( + &self.reserveB, + ), ) } + #[inline] fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { ( - as alloy_sol_types::SolType>::tokenize(ret), + 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| { + as alloy_sol_types::SolType>::abi_decode_sequence(data).map( + |r| { let r: quoteReturn = r.into(); r.amountB - }) + }, + ) } + #[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: quoteReturn = r.into(); - r.amountB - }) + 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: quoteReturn = r.into(); + r.amountB + }) } } }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `swapTokensForExactTokens(uint256,uint256,address[],address,uint256)` and selector `0x8803dbee`. -```solidity -function swapTokensForExactTokens(uint256 amountOut, uint256 amountInMax, address[] memory path, address to, uint256 deadline) external returns (uint256[] memory amounts); -```*/ + ```solidity + function swapTokensForExactTokens(uint256 amountOut, uint256 amountInMax, address[] memory path, address to, uint256 deadline) external returns (uint256[] memory amounts); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct swapTokensForExactTokensCall { @@ -1044,14 +1020,15 @@ function swapTokensForExactTokens(uint256 amountOut, uint256 amountInMax, addres pub deadline: alloy_sol_types::private::primitives::aliases::U256, } #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`swapTokensForExactTokens(uint256,uint256,address[],address,uint256)`](swapTokensForExactTokensCall) function. + ///Container type for the return parameters of the + /// [`swapTokensForExactTokens(uint256,uint256,address[],address, + /// uint256)`](swapTokensForExactTokensCall) function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct swapTokensForExactTokensReturn { #[allow(missing_docs)] - pub amounts: alloy_sol_types::private::Vec< - alloy_sol_types::private::primitives::aliases::U256, - >, + pub amounts: + alloy_sol_types::private::Vec, } #[allow( non_camel_case_types, @@ -1060,7 +1037,7 @@ function swapTokensForExactTokens(uint256 amountOut, uint256 amountInMax, addres clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -1081,9 +1058,7 @@ function swapTokensForExactTokens(uint256 amountOut, uint256 amountInMax, addres ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1092,8 +1067,7 @@ function swapTokensForExactTokens(uint256 amountOut, uint256 amountInMax, addres } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From - for UnderlyingRustTuple<'_> { + impl ::core::convert::From for UnderlyingRustTuple<'_> { fn from(value: swapTokensForExactTokensCall) -> Self { ( value.amountOut, @@ -1106,8 +1080,7 @@ function swapTokensForExactTokens(uint256 amountOut, uint256 amountInMax, addres } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From> - for swapTokensForExactTokensCall { + impl ::core::convert::From> for swapTokensForExactTokensCall { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { Self { amountOut: tuple.0, @@ -1122,20 +1095,15 @@ function swapTokensForExactTokens(uint256 amountOut, uint256 amountInMax, addres { #[doc(hidden)] #[allow(dead_code)] - type UnderlyingSolTuple<'a> = ( - alloy_sol_types::sol_data::Array>, - ); + type UnderlyingSolTuple<'a> = + (alloy_sol_types::sol_data::Array>,); #[doc(hidden)] type UnderlyingRustTuple<'a> = ( - alloy_sol_types::private::Vec< - alloy_sol_types::private::primitives::aliases::U256, - >, + alloy_sol_types::private::Vec, ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1144,16 +1112,14 @@ function swapTokensForExactTokens(uint256 amountOut, uint256 amountInMax, addres } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From - for UnderlyingRustTuple<'_> { + impl ::core::convert::From for UnderlyingRustTuple<'_> { fn from(value: swapTokensForExactTokensReturn) -> Self { (value.amounts,) } } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From> - for swapTokensForExactTokensReturn { + impl ::core::convert::From> for swapTokensForExactTokensReturn { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { Self { amounts: tuple.0 } } @@ -1168,26 +1134,24 @@ function swapTokensForExactTokens(uint256 amountOut, uint256 amountInMax, addres 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 = alloy_sol_types::private::Vec< - alloy_sol_types::private::primitives::aliases::U256, - >; - type ReturnTuple<'a> = ( - alloy_sol_types::sol_data::Array>, - ); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "swapTokensForExactTokens(uint256,uint256,address[],address,uint256)"; + type Return = + alloy_sol_types::private::Vec; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; + type ReturnTuple<'a> = + (alloy_sol_types::sol_data::Array>,); + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [136u8, 3u8, 219u8, 238u8]; + const SIGNATURE: &'static str = + "swapTokensForExactTokens(uint256,uint256,address[],address,uint256)"; + #[inline] fn new<'a>( tuple: as alloy_sol_types::SolType>::RustType, ) -> Self { tuple.into() } + #[inline] fn tokenize(&self) -> Self::Token<'_> { ( @@ -1208,41 +1172,38 @@ function swapTokensForExactTokens(uint256 amountOut, uint256 amountInMax, addres > as alloy_sol_types::SolType>::tokenize(&self.deadline), ) } + #[inline] fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { - ( - , - > as alloy_sol_types::SolType>::tokenize(ret), - ) + (, + > 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| { + as alloy_sol_types::SolType>::abi_decode_sequence(data).map( + |r| { let r: swapTokensForExactTokensReturn = r.into(); r.amounts - }) + }, + ) } + #[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: swapTokensForExactTokensReturn = r.into(); - r.amounts - }) + 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: swapTokensForExactTokensReturn = r.into(); + r.amounts + }) } } }; ///Container for all the [`UniswapV2Router02`](self) function calls. #[derive(Clone)] - #[derive()] pub enum UniswapV2Router02Calls { #[allow(missing_docs)] WETH(WETHCall), @@ -1258,8 +1219,9 @@ function swapTokensForExactTokens(uint256 amountOut, uint256 amountInMax, addres impl UniswapV2Router02Calls { /// 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. + /// 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]] = &[ @@ -1269,14 +1231,6 @@ function swapTokensForExactTokens(uint256 amountOut, uint256 amountInMax, addres [196u8, 90u8, 1u8, 85u8], [232u8, 227u8, 55u8, 0u8], ]; - /// The names of the variants in the same order as `SELECTORS`. - pub const VARIANT_NAMES: &'static [&'static str] = &[ - ::core::stringify!(swapTokensForExactTokens), - ::core::stringify!(WETH), - ::core::stringify!(quote), - ::core::stringify!(factory), - ::core::stringify!(addLiquidity), - ]; /// The signatures in the same order as `SELECTORS`. pub const SIGNATURES: &'static [&'static str] = &[ ::SIGNATURE, @@ -1285,6 +1239,15 @@ function swapTokensForExactTokens(uint256 amountOut, uint256 amountInMax, addres ::SIGNATURE, ::SIGNATURE, ]; + /// The names of the variants in the same order as `SELECTORS`. + pub const VARIANT_NAMES: &'static [&'static str] = &[ + ::core::stringify!(swapTokensForExactTokens), + ::core::stringify!(WETH), + ::core::stringify!(quote), + ::core::stringify!(factory), + ::core::stringify!(addLiquidity), + ]; + /// Returns the signature for the given selector, if known. #[inline] pub fn signature_by_selector( @@ -1297,27 +1260,25 @@ function swapTokensForExactTokens(uint256 amountOut, uint256 amountInMax, addres ::core::result::Result::Err(_) => ::core::option::Option::None, } } + /// Returns the enum variant name for the given selector, if known. #[inline] - pub fn name_by_selector( - selector: [u8; 4usize], - ) -> ::core::option::Option<&'static str> { + pub fn name_by_selector(selector: [u8; 4usize]) -> ::core::option::Option<&'static str> { let sig = Self::signature_by_selector(selector)?; sig.split_once('(').map(|(name, _)| name) } } #[automatically_derived] impl alloy_sol_types::SolInterface for UniswapV2Router02Calls { - const NAME: &'static str = "UniswapV2Router02Calls"; - const MIN_DATA_LENGTH: usize = 0usize; const COUNT: usize = 5usize; + const MIN_DATA_LENGTH: usize = 0usize; + const NAME: &'static str = "UniswapV2Router02Calls"; + #[inline] fn selector(&self) -> [u8; 4] { match self { Self::WETH(_) => ::SELECTOR, - Self::addLiquidity(_) => { - ::SELECTOR - } + Self::addLiquidity(_) => ::SELECTOR, Self::factory(_) => ::SELECTOR, Self::quote(_) => ::SELECTOR, Self::swapTokensForExactTokens(_) => { @@ -1325,83 +1286,75 @@ function swapTokensForExactTokens(uint256 amountOut, uint256 amountInMax, addres } } } + #[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 swapTokensForExactTokens( - data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw( + fn abi_decode_raw(selector: [u8; 4], data: &[u8]) -> alloy_sol_types::Result { + static DECODE_SHIMS: &[fn(&[u8]) -> alloy_sol_types::Result] = + &[ + { + fn swapTokensForExactTokens( + data: &[u8], + ) -> alloy_sol_types::Result + { + ::abi_decode_raw( data, ) .map(UniswapV2Router02Calls::swapTokensForExactTokens) - } - swapTokensForExactTokens - }, - { - fn WETH( - data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw(data) - .map(UniswapV2Router02Calls::WETH) - } - WETH - }, - { - fn quote( - data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw(data) - .map(UniswapV2Router02Calls::quote) - } - quote - }, - { - fn factory( - data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw(data) - .map(UniswapV2Router02Calls::factory) - } - factory - }, - { - fn addLiquidity( - data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, - ) - .map(UniswapV2Router02Calls::addLiquidity) - } - addLiquidity - }, - ]; + } + swapTokensForExactTokens + }, + { + fn WETH(data: &[u8]) -> alloy_sol_types::Result { + ::abi_decode_raw(data) + .map(UniswapV2Router02Calls::WETH) + } + WETH + }, + { + fn quote(data: &[u8]) -> alloy_sol_types::Result { + ::abi_decode_raw(data) + .map(UniswapV2Router02Calls::quote) + } + quote + }, + { + fn factory(data: &[u8]) -> alloy_sol_types::Result { + ::abi_decode_raw(data) + .map(UniswapV2Router02Calls::factory) + } + factory + }, + { + fn addLiquidity( + data: &[u8], + ) -> alloy_sol_types::Result + { + ::abi_decode_raw(data) + .map(UniswapV2Router02Calls::addLiquidity) + } + addLiquidity + }, + ]; let Ok(idx) = Self::SELECTORS.binary_search(&selector) else { - return Err( - alloy_sol_types::Error::unknown_selector( - ::NAME, - selector, - ), - ); + return Err(alloy_sol_types::Error::unknown_selector( + ::NAME, + selector, + )); }; DECODE_SHIMS[idx](data) } + #[inline] #[allow(non_snake_case)] fn abi_decode_raw_validate( @@ -1410,7 +1363,9 @@ function swapTokensForExactTokens(uint256 amountOut, uint256 amountInMax, addres ) -> alloy_sol_types::Result { static DECODE_VALIDATE_SHIMS: &[fn( &[u8], - ) -> alloy_sol_types::Result] = &[ + ) -> alloy_sol_types::Result< + UniswapV2Router02Calls, + >] = &[ { fn swapTokensForExactTokens( data: &[u8], @@ -1423,34 +1378,22 @@ function swapTokensForExactTokens(uint256 amountOut, uint256 amountInMax, addres swapTokensForExactTokens }, { - fn WETH( - data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) + fn WETH(data: &[u8]) -> alloy_sol_types::Result { + ::abi_decode_raw_validate(data) .map(UniswapV2Router02Calls::WETH) } WETH }, { - fn quote( - data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) + fn quote(data: &[u8]) -> alloy_sol_types::Result { + ::abi_decode_raw_validate(data) .map(UniswapV2Router02Calls::quote) } quote }, { - fn factory( - data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) + fn factory(data: &[u8]) -> alloy_sol_types::Result { + ::abi_decode_raw_validate(data) .map(UniswapV2Router02Calls::factory) } factory @@ -1460,23 +1403,22 @@ function swapTokensForExactTokens(uint256 amountOut, uint256 amountInMax, addres data: &[u8], ) -> alloy_sol_types::Result { ::abi_decode_raw_validate( - data, - ) - .map(UniswapV2Router02Calls::addLiquidity) + data, + ) + .map(UniswapV2Router02Calls::addLiquidity) } addLiquidity }, ]; let Ok(idx) = Self::SELECTORS.binary_search(&selector) else { - return Err( - alloy_sol_types::Error::unknown_selector( - ::NAME, - selector, - ), - ); + return Err(alloy_sol_types::Error::unknown_selector( + ::NAME, + selector, + )); }; DECODE_VALIDATE_SHIMS[idx](data) } + #[inline] fn abi_encoded_size(&self) -> usize { match self { @@ -1484,9 +1426,7 @@ function swapTokensForExactTokens(uint256 amountOut, uint256 amountInMax, addres ::abi_encoded_size(inner) } Self::addLiquidity(inner) => { - ::abi_encoded_size( - inner, - ) + ::abi_encoded_size(inner) } Self::factory(inner) => { ::abi_encoded_size(inner) @@ -1501,6 +1441,7 @@ function swapTokensForExactTokens(uint256 amountOut, uint256 amountInMax, addres } } } + #[inline] fn abi_encode_raw(&self, out: &mut alloy_sol_types::private::Vec) { match self { @@ -1508,10 +1449,7 @@ function swapTokensForExactTokens(uint256 amountOut, uint256 amountInMax, addres ::abi_encode_raw(inner, out) } Self::addLiquidity(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } Self::factory(inner) => { ::abi_encode_raw(inner, out) @@ -1521,17 +1459,16 @@ function swapTokensForExactTokens(uint256 amountOut, uint256 amountInMax, addres } Self::swapTokensForExactTokens(inner) => { ::abi_encode_raw( - inner, - out, + inner, out, ) } } } } - use alloy_contract as alloy_contract; + use alloy_contract; /**Creates a new wrapper around an on-chain [`UniswapV2Router02`](self) contract instance. -See the [wrapper's documentation](`UniswapV2Router02Instance`) for more details.*/ + See the [wrapper's documentation](`UniswapV2Router02Instance`) for more details.*/ #[inline] pub const fn new< P: alloy_contract::private::Provider, @@ -1544,27 +1481,23 @@ See the [wrapper's documentation](`UniswapV2Router02Instance`) for more details. } /**Deploys this contract using the given `provider` and constructor arguments, if any. -Returns a new instance of the contract, if the deployment was successful. + 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.*/ + 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, - >( + pub fn deploy, N: alloy_contract::private::Network>( __provider: P, _factory: alloy_sol_types::private::Address, _WETH: alloy_sol_types::private::Address, - ) -> impl ::core::future::Future< - Output = alloy_contract::Result>, - > { + ) -> impl ::core::future::Future>> + { UniswapV2Router02Instance::::deploy(__provider, _factory, _WETH) } /**Creates a `RawCallBuilder` for deploying this contract using the given `provider` -and constructor arguments, if any. + 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.*/ + 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, @@ -1578,15 +1511,15 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ } /**A [`UniswapV2Router02`](self) instance. -Contains type-safe methods for interacting with an on-chain instance of the -[`UniswapV2Router02`](self) contract located at a given `address`, using a given -provider `P`. + Contains type-safe methods for interacting with an on-chain instance of the + [`UniswapV2Router02`](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. + 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.*/ + See the [module-level documentation](self) for all the available methods.*/ #[derive(Clone)] pub struct UniswapV2Router02Instance { address: alloy_sol_types::private::Address, @@ -1597,33 +1530,32 @@ See the [module-level documentation](self) for all the available methods.*/ impl ::core::fmt::Debug for UniswapV2Router02Instance { #[inline] fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { - f.debug_tuple("UniswapV2Router02Instance").field(&self.address).finish() + f.debug_tuple("UniswapV2Router02Instance") + .field(&self.address) + .finish() } } /// Instantiation and getters/setters. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > UniswapV2Router02Instance { + impl, N: alloy_contract::private::Network> + UniswapV2Router02Instance + { /**Creates a new wrapper around an on-chain [`UniswapV2Router02`](self) contract instance. -See the [wrapper's documentation](`UniswapV2Router02Instance`) for more details.*/ + See the [wrapper's documentation](`UniswapV2Router02Instance`) for more details.*/ #[inline] - pub const fn new( - address: alloy_sol_types::private::Address, - __provider: P, - ) -> Self { + pub const fn new(address: alloy_sol_types::private::Address, __provider: P) -> Self { Self { address, provider: __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. + 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.*/ + For more fine-grained control over the deployment process, use [`deploy_builder`] instead.*/ #[inline] pub async fn deploy( __provider: P, @@ -1634,11 +1566,12 @@ For more fine-grained control over the deployment process, use [`deploy_builder` 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. + 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.*/ + 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, @@ -1649,29 +1582,34 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ __provider, [ &BYTECODE[..], - &alloy_sol_types::SolConstructor::abi_encode( - &constructorCall { _factory, _WETH }, - )[..], + &alloy_sol_types::SolConstructor::abi_encode(&constructorCall { + _factory, + _WETH, + })[..], ] - .concat() - .into(), + .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 { @@ -1679,7 +1617,8 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ } } impl UniswapV2Router02Instance<&P, N> { - /// Clones the provider and returns a new instance with the cloned provider. + /// Clones the provider and returns a new instance with the cloned + /// provider. #[inline] pub fn with_cloned_provider(self) -> UniswapV2Router02Instance { UniswapV2Router02Instance { @@ -1690,24 +1629,27 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ } } /// Function calls. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > UniswapV2Router02Instance { - /// Creates a new call builder using this contract instance's provider and address. + impl, N: alloy_contract::private::Network> + UniswapV2Router02Instance + { + /// 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. + /// 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 [`WETH`] function. pub fn WETH(&self) -> alloy_contract::SolCallBuilder<&P, WETHCall, N> { self.call_builder(&WETHCall) } + ///Creates a new call builder for the [`addLiquidity`] function. pub fn addLiquidity( &self, @@ -1720,23 +1662,23 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ to: alloy_sol_types::private::Address, deadline: alloy_sol_types::private::primitives::aliases::U256, ) -> alloy_contract::SolCallBuilder<&P, addLiquidityCall, N> { - self.call_builder( - &addLiquidityCall { - tokenA, - tokenB, - amountADesired, - amountBDesired, - amountAMin, - amountBMin, - to, - deadline, - }, - ) + self.call_builder(&addLiquidityCall { + tokenA, + tokenB, + amountADesired, + amountBDesired, + amountAMin, + amountBMin, + to, + deadline, + }) } + ///Creates a new call builder for the [`factory`] function. pub fn factory(&self) -> alloy_contract::SolCallBuilder<&P, factoryCall, N> { self.call_builder(&factoryCall) } + ///Creates a new call builder for the [`quote`] function. pub fn quote( &self, @@ -1744,15 +1686,15 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ reserveA: alloy_sol_types::private::primitives::aliases::U256, reserveB: alloy_sol_types::private::primitives::aliases::U256, ) -> alloy_contract::SolCallBuilder<&P, quoteCall, N> { - self.call_builder( - "eCall { - amountA, - reserveA, - reserveB, - }, - ) + self.call_builder("eCall { + amountA, + reserveA, + reserveB, + }) } - ///Creates a new call builder for the [`swapTokensForExactTokens`] function. + + ///Creates a new call builder for the [`swapTokensForExactTokens`] + /// function. pub fn swapTokensForExactTokens( &self, amountOut: alloy_sol_types::private::primitives::aliases::U256, @@ -1761,26 +1703,25 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ to: alloy_sol_types::private::Address, deadline: alloy_sol_types::private::primitives::aliases::U256, ) -> alloy_contract::SolCallBuilder<&P, swapTokensForExactTokensCall, N> { - self.call_builder( - &swapTokensForExactTokensCall { - amountOut, - amountInMax, - path, - to, - deadline, - }, - ) + self.call_builder(&swapTokensForExactTokensCall { + amountOut, + amountInMax, + path, + to, + deadline, + }) } } /// Event filters. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > UniswapV2Router02Instance { - /// Creates a new event filter using this contract instance's provider and address. + impl, N: alloy_contract::private::Network> + UniswapV2Router02Instance + { + /// 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. + /// 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> { @@ -1788,89 +1729,51 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ } } } -pub type Instance = UniswapV2Router02::UniswapV2Router02Instance< - ::alloy_provider::DynProvider, ->; +pub type Instance = UniswapV2Router02::UniswapV2Router02Instance<::alloy_provider::DynProvider>; use { - std::{sync::LazyLock, collections::HashMap}, - anyhow::{Result, Context}, - alloy_primitives::{address, Address}, - alloy_provider::{Provider, DynProvider}, + alloy_primitives::{Address, address}, + alloy_provider::{DynProvider, Provider}, + anyhow::{Context, Result}, + std::{collections::HashMap, sync::LazyLock}, }; pub const fn deployment_info(chain_id: u64) -> Option<(Address, Option)> { match chain_id { - 1u64 => { - Some(( - ::alloy_primitives::address!( - "0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D" - ), - None, - )) - } - 10u64 => { - Some(( - ::alloy_primitives::address!( - "0x4A7b5Da61326A6379179b40d00F57E5bbDC962c2" - ), - None, - )) - } - 56u64 => { - Some(( - ::alloy_primitives::address!( - "0x4752ba5dbc23f44d87826276bf6fd6b1c372ad24" - ), - None, - )) - } - 100u64 => { - Some(( - ::alloy_primitives::address!( - "0x1C232F01118CB8B424793ae03F870aa7D0ac7f77" - ), - None, - )) - } - 137u64 => { - Some(( - ::alloy_primitives::address!( - "0xedf6066a2b290C185783862C7F4776A2C8077AD1" - ), - None, - )) - } - 8453u64 => { - Some(( - ::alloy_primitives::address!( - "0x4752ba5dbc23f44d87826276bf6fd6b1c372ad24" - ), - None, - )) - } - 42161u64 => { - Some(( - ::alloy_primitives::address!( - "0x4752ba5dbc23f44d87826276bf6fd6b1c372ad24" - ), - None, - )) - } - 43114u64 => { - Some(( - ::alloy_primitives::address!( - "0x4752ba5dbc23f44d87826276bf6fd6b1c372ad24" - ), - None, - )) - } - 11155111u64 => { - Some(( - ::alloy_primitives::address!( - "0xeE567Fe1712Faf6149d80dA1E6934E354124CfE3" - ), - None, - )) - } + 1u64 => Some(( + ::alloy_primitives::address!("0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D"), + None, + )), + 10u64 => Some(( + ::alloy_primitives::address!("0x4A7b5Da61326A6379179b40d00F57E5bbDC962c2"), + None, + )), + 56u64 => Some(( + ::alloy_primitives::address!("0x4752ba5dbc23f44d87826276bf6fd6b1c372ad24"), + None, + )), + 100u64 => Some(( + ::alloy_primitives::address!("0x1C232F01118CB8B424793ae03F870aa7D0ac7f77"), + None, + )), + 137u64 => Some(( + ::alloy_primitives::address!("0xedf6066a2b290C185783862C7F4776A2C8077AD1"), + None, + )), + 8453u64 => Some(( + ::alloy_primitives::address!("0x4752ba5dbc23f44d87826276bf6fd6b1c372ad24"), + None, + )), + 42161u64 => Some(( + ::alloy_primitives::address!("0x4752ba5dbc23f44d87826276bf6fd6b1c372ad24"), + None, + )), + 43114u64 => Some(( + ::alloy_primitives::address!("0x4752ba5dbc23f44d87826276bf6fd6b1c372ad24"), + None, + )), + 11155111u64 => Some(( + ::alloy_primitives::address!("0xeE567Fe1712Faf6149d80dA1E6934E354124CfE3"), + None, + )), _ => None, } } @@ -1887,9 +1790,7 @@ pub const fn deployment_block(chain_id: &u64) -> Option { } } impl Instance { - pub fn deployed( - provider: &DynProvider, - ) -> impl Future> + Send { + pub fn deployed(provider: &DynProvider) -> impl Future> + Send { async move { let chain_id = provider .get_chain_id() diff --git a/contracts/generated/contracts-generated/uniswapv3pool/src/lib.rs b/contracts/generated/contracts-generated/uniswapv3pool/src/lib.rs index 74668c3a25..9699241ec4 100644 --- a/contracts/generated/contracts-generated/uniswapv3pool/src/lib.rs +++ b/contracts/generated/contracts-generated/uniswapv3pool/src/lib.rs @@ -1,4 +1,10 @@ -#![allow(unused_imports, unused_attributes, clippy::all, rustdoc::all, non_snake_case)] +#![allow( + unused_imports, + unused_attributes, + clippy::all, + rustdoc::all, + non_snake_case +)] //! Auto-generated contract bindings. Do not edit. /** @@ -866,13 +872,12 @@ interface UniswapV3Pool { clippy::empty_structs_with_brackets )] pub mod UniswapV3Pool { - use super::*; - use alloy_sol_types as alloy_sol_types; + use {super::*, alloy_sol_types}; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Event with signature `Burn(address,int24,int24,uint128,uint256,uint256)` and selector `0x0c396cd989a39f4459b5fa1aed6a9a8dcdbc45908acfd67e028cd568da98982c`. -```solidity -event Burn(address indexed owner, int24 indexed tickLower, int24 indexed tickUpper, uint128 amount, uint256 amount0, uint256 amount1); -```*/ + ```solidity + event Burn(address indexed owner, int24 indexed tickLower, int24 indexed tickUpper, uint128 amount, uint256 amount0, uint256 amount1); + ```*/ #[allow( non_camel_case_types, non_snake_case, @@ -901,30 +906,31 @@ event Burn(address indexed owner, int24 indexed tickLower, int24 indexed tickUpp clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[automatically_derived] impl alloy_sol_types::SolEvent for Burn { + type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type DataTuple<'a> = ( alloy_sol_types::sol_data::Uint<128>, alloy_sol_types::sol_data::Uint<256>, 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::Int<24>, alloy_sol_types::sol_data::Int<24>, ); - const SIGNATURE: &'static str = "Burn(address,int24,int24,uint128,uint256,uint256)"; - const SIGNATURE_HASH: alloy_sol_types::private::B256 = alloy_sol_types::private::B256::new([ - 12u8, 57u8, 108u8, 217u8, 137u8, 163u8, 159u8, 68u8, 89u8, 181u8, 250u8, - 26u8, 237u8, 106u8, 154u8, 141u8, 205u8, 188u8, 69u8, 144u8, 138u8, - 207u8, 214u8, 126u8, 2u8, 140u8, 213u8, 104u8, 218u8, 152u8, 152u8, 44u8, - ]); + const ANONYMOUS: bool = false; + const SIGNATURE: &'static str = "Burn(address,int24,int24,uint128,uint256,uint256)"; + const SIGNATURE_HASH: alloy_sol_types::private::B256 = + alloy_sol_types::private::B256::new([ + 12u8, 57u8, 108u8, 217u8, 137u8, 163u8, 159u8, 68u8, 89u8, 181u8, 250u8, 26u8, + 237u8, 106u8, 154u8, 141u8, 205u8, 188u8, 69u8, 144u8, 138u8, 207u8, 214u8, + 126u8, 2u8, 140u8, 213u8, 104u8, 218u8, 152u8, 152u8, 44u8, + ]); + #[allow(unused_variables)] #[inline] fn new( @@ -940,35 +946,36 @@ event Burn(address indexed owner, int24 indexed tickLower, int24 indexed tickUpp amount1: data.2, } } + #[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, - ), - ); + 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), - as alloy_sol_types::SolType>::tokenize(&self.amount0), - as alloy_sol_types::SolType>::tokenize(&self.amount1), + as alloy_sol_types::SolType>::tokenize( + &self.amount, + ), + as alloy_sol_types::SolType>::tokenize( + &self.amount0, + ), + as alloy_sol_types::SolType>::tokenize( + &self.amount1, + ), ) } + #[inline] fn topics(&self) -> ::RustType { ( @@ -978,6 +985,7 @@ event Burn(address indexed owner, int24 indexed tickLower, int24 indexed tickUpp self.tickUpper.clone(), ) } + #[inline] fn encode_topics_raw( &self, @@ -986,9 +994,7 @@ event Burn(address indexed owner, int24 indexed tickLower, int24 indexed tickUpp if out.len() < ::COUNT { return Err(alloy_sol_types::Error::Overrun); } - out[0usize] = alloy_sol_types::abi::token::WordToken( - Self::SIGNATURE_HASH, - ); + out[0usize] = alloy_sol_types::abi::token::WordToken(Self::SIGNATURE_HASH); out[1usize] = ::encode_topic( &self.owner, ); @@ -1006,6 +1012,7 @@ event Burn(address indexed owner, int24 indexed tickLower, int24 indexed tickUpp 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) } @@ -1020,9 +1027,9 @@ event Burn(address indexed owner, int24 indexed tickLower, int24 indexed tickUpp }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Event with signature `Collect(address,address,int24,int24,uint128,uint128)` and selector `0x70935338e69775456a85ddef226c395fb668b63fa0115f5f20610b388e6ca9c0`. -```solidity -event Collect(address indexed owner, address recipient, int24 indexed tickLower, int24 indexed tickUpper, uint128 amount0, uint128 amount1); -```*/ + ```solidity + event Collect(address indexed owner, address recipient, int24 indexed tickLower, int24 indexed tickUpper, uint128 amount0, uint128 amount1); + ```*/ #[allow( non_camel_case_types, non_snake_case, @@ -1051,30 +1058,31 @@ event Collect(address indexed owner, address recipient, int24 indexed tickLower, clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[automatically_derived] impl alloy_sol_types::SolEvent for Collect { + type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type DataTuple<'a> = ( alloy_sol_types::sol_data::Address, alloy_sol_types::sol_data::Uint<128>, alloy_sol_types::sol_data::Uint<128>, ); - 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::Int<24>, alloy_sol_types::sol_data::Int<24>, ); - const SIGNATURE: &'static str = "Collect(address,address,int24,int24,uint128,uint128)"; - const SIGNATURE_HASH: alloy_sol_types::private::B256 = alloy_sol_types::private::B256::new([ - 112u8, 147u8, 83u8, 56u8, 230u8, 151u8, 117u8, 69u8, 106u8, 133u8, 221u8, - 239u8, 34u8, 108u8, 57u8, 95u8, 182u8, 104u8, 182u8, 63u8, 160u8, 17u8, - 95u8, 95u8, 32u8, 97u8, 11u8, 56u8, 142u8, 108u8, 169u8, 192u8, - ]); + const ANONYMOUS: bool = false; + const SIGNATURE: &'static str = "Collect(address,address,int24,int24,uint128,uint128)"; + const SIGNATURE_HASH: alloy_sol_types::private::B256 = + alloy_sol_types::private::B256::new([ + 112u8, 147u8, 83u8, 56u8, 230u8, 151u8, 117u8, 69u8, 106u8, 133u8, 221u8, + 239u8, 34u8, 108u8, 57u8, 95u8, 182u8, 104u8, 182u8, 63u8, 160u8, 17u8, 95u8, + 95u8, 32u8, 97u8, 11u8, 56u8, 142u8, 108u8, 169u8, 192u8, + ]); + #[allow(unused_variables)] #[inline] fn new( @@ -1090,35 +1098,36 @@ event Collect(address indexed owner, address recipient, int24 indexed tickLower, amount1: data.2, } } + #[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, - ), - ); + 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.recipient, ), - as alloy_sol_types::SolType>::tokenize(&self.amount0), - as alloy_sol_types::SolType>::tokenize(&self.amount1), + as alloy_sol_types::SolType>::tokenize( + &self.amount0, + ), + as alloy_sol_types::SolType>::tokenize( + &self.amount1, + ), ) } + #[inline] fn topics(&self) -> ::RustType { ( @@ -1128,6 +1137,7 @@ event Collect(address indexed owner, address recipient, int24 indexed tickLower, self.tickUpper.clone(), ) } + #[inline] fn encode_topics_raw( &self, @@ -1136,9 +1146,7 @@ event Collect(address indexed owner, address recipient, int24 indexed tickLower, if out.len() < ::COUNT { return Err(alloy_sol_types::Error::Overrun); } - out[0usize] = alloy_sol_types::abi::token::WordToken( - Self::SIGNATURE_HASH, - ); + out[0usize] = alloy_sol_types::abi::token::WordToken(Self::SIGNATURE_HASH); out[1usize] = ::encode_topic( &self.owner, ); @@ -1156,6 +1164,7 @@ event Collect(address indexed owner, address recipient, int24 indexed tickLower, 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) } @@ -1170,9 +1179,9 @@ event Collect(address indexed owner, address recipient, int24 indexed tickLower, }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Event with signature `CollectProtocol(address,address,uint128,uint128)` and selector `0x596b573906218d3411850b26a6b437d6c4522fdb43d2d2386263f86d50b8b151`. -```solidity -event CollectProtocol(address indexed sender, address indexed recipient, uint128 amount0, uint128 amount1); -```*/ + ```solidity + event CollectProtocol(address indexed sender, address indexed recipient, uint128 amount0, uint128 amount1); + ```*/ #[allow( non_camel_case_types, non_snake_case, @@ -1197,28 +1206,29 @@ event CollectProtocol(address indexed sender, address indexed recipient, uint128 clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[automatically_derived] impl alloy_sol_types::SolEvent for CollectProtocol { + type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type DataTuple<'a> = ( alloy_sol_types::sol_data::Uint<128>, alloy_sol_types::sol_data::Uint<128>, ); - 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 = "CollectProtocol(address,address,uint128,uint128)"; - const SIGNATURE_HASH: alloy_sol_types::private::B256 = alloy_sol_types::private::B256::new([ - 89u8, 107u8, 87u8, 57u8, 6u8, 33u8, 141u8, 52u8, 17u8, 133u8, 11u8, 38u8, - 166u8, 180u8, 55u8, 214u8, 196u8, 82u8, 47u8, 219u8, 67u8, 210u8, 210u8, - 56u8, 98u8, 99u8, 248u8, 109u8, 80u8, 184u8, 177u8, 81u8, - ]); + const ANONYMOUS: bool = false; + const SIGNATURE: &'static str = "CollectProtocol(address,address,uint128,uint128)"; + const SIGNATURE_HASH: alloy_sol_types::private::B256 = + alloy_sol_types::private::B256::new([ + 89u8, 107u8, 87u8, 57u8, 6u8, 33u8, 141u8, 52u8, 17u8, 133u8, 11u8, 38u8, + 166u8, 180u8, 55u8, 214u8, 196u8, 82u8, 47u8, 219u8, 67u8, 210u8, 210u8, 56u8, + 98u8, 99u8, 248u8, 109u8, 80u8, 184u8, 177u8, 81u8, + ]); + #[allow(unused_variables)] #[inline] fn new( @@ -1232,32 +1242,33 @@ event CollectProtocol(address indexed sender, address indexed recipient, uint128 amount1: 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, - ), - ); + 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.amount0), - as alloy_sol_types::SolType>::tokenize(&self.amount1), + as alloy_sol_types::SolType>::tokenize( + &self.amount0, + ), + as alloy_sol_types::SolType>::tokenize( + &self.amount1, + ), ) } + #[inline] fn topics(&self) -> ::RustType { ( @@ -1266,6 +1277,7 @@ event CollectProtocol(address indexed sender, address indexed recipient, uint128 self.recipient.clone(), ) } + #[inline] fn encode_topics_raw( &self, @@ -1274,9 +1286,7 @@ event CollectProtocol(address indexed sender, address indexed recipient, uint128 if out.len() < ::COUNT { return Err(alloy_sol_types::Error::Overrun); } - out[0usize] = alloy_sol_types::abi::token::WordToken( - Self::SIGNATURE_HASH, - ); + out[0usize] = alloy_sol_types::abi::token::WordToken(Self::SIGNATURE_HASH); out[1usize] = ::encode_topic( &self.sender, ); @@ -1291,6 +1301,7 @@ event CollectProtocol(address indexed sender, address indexed recipient, uint128 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) } @@ -1305,9 +1316,9 @@ event CollectProtocol(address indexed sender, address indexed recipient, uint128 }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Event with signature `Flash(address,address,uint256,uint256,uint256,uint256)` and selector `0xbdbdb71d7860376ba52b25a5028beea23581364a40522f6bcfb86bb1f2dca633`. -```solidity -event Flash(address indexed sender, address indexed recipient, uint256 amount0, uint256 amount1, uint256 paid0, uint256 paid1); -```*/ + ```solidity + event Flash(address indexed sender, address indexed recipient, uint256 amount0, uint256 amount1, uint256 paid0, uint256 paid1); + ```*/ #[allow( non_camel_case_types, non_snake_case, @@ -1336,30 +1347,32 @@ event Flash(address indexed sender, address indexed recipient, uint256 amount0, clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[automatically_derived] impl alloy_sol_types::SolEvent for Flash { + type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type DataTuple<'a> = ( alloy_sol_types::sol_data::Uint<256>, alloy_sol_types::sol_data::Uint<256>, alloy_sol_types::sol_data::Uint<256>, 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 = "Flash(address,address,uint256,uint256,uint256,uint256)"; - const SIGNATURE_HASH: alloy_sol_types::private::B256 = alloy_sol_types::private::B256::new([ - 189u8, 189u8, 183u8, 29u8, 120u8, 96u8, 55u8, 107u8, 165u8, 43u8, 37u8, - 165u8, 2u8, 139u8, 238u8, 162u8, 53u8, 129u8, 54u8, 74u8, 64u8, 82u8, - 47u8, 107u8, 207u8, 184u8, 107u8, 177u8, 242u8, 220u8, 166u8, 51u8, - ]); + const ANONYMOUS: bool = false; + const SIGNATURE: &'static str = + "Flash(address,address,uint256,uint256,uint256,uint256)"; + const SIGNATURE_HASH: alloy_sol_types::private::B256 = + alloy_sol_types::private::B256::new([ + 189u8, 189u8, 183u8, 29u8, 120u8, 96u8, 55u8, 107u8, 165u8, 43u8, 37u8, 165u8, + 2u8, 139u8, 238u8, 162u8, 53u8, 129u8, 54u8, 74u8, 64u8, 82u8, 47u8, 107u8, + 207u8, 184u8, 107u8, 177u8, 242u8, 220u8, 166u8, 51u8, + ]); + #[allow(unused_variables)] #[inline] fn new( @@ -1375,38 +1388,39 @@ event Flash(address indexed sender, address indexed recipient, uint256 amount0, paid1: data.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, - ), - ); + 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.amount0), - as alloy_sol_types::SolType>::tokenize(&self.amount1), - as alloy_sol_types::SolType>::tokenize(&self.paid0), - as alloy_sol_types::SolType>::tokenize(&self.paid1), + as alloy_sol_types::SolType>::tokenize( + &self.amount0, + ), + as alloy_sol_types::SolType>::tokenize( + &self.amount1, + ), + as alloy_sol_types::SolType>::tokenize( + &self.paid0, + ), + as alloy_sol_types::SolType>::tokenize( + &self.paid1, + ), ) } + #[inline] fn topics(&self) -> ::RustType { ( @@ -1415,6 +1429,7 @@ event Flash(address indexed sender, address indexed recipient, uint256 amount0, self.recipient.clone(), ) } + #[inline] fn encode_topics_raw( &self, @@ -1423,9 +1438,7 @@ event Flash(address indexed sender, address indexed recipient, uint256 amount0, if out.len() < ::COUNT { return Err(alloy_sol_types::Error::Overrun); } - out[0usize] = alloy_sol_types::abi::token::WordToken( - Self::SIGNATURE_HASH, - ); + out[0usize] = alloy_sol_types::abi::token::WordToken(Self::SIGNATURE_HASH); out[1usize] = ::encode_topic( &self.sender, ); @@ -1440,6 +1453,7 @@ event Flash(address indexed sender, address indexed recipient, uint256 amount0, 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) } @@ -1454,9 +1468,9 @@ event Flash(address indexed sender, address indexed recipient, uint256 amount0, }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Event with signature `IncreaseObservationCardinalityNext(uint16,uint16)` and selector `0xac49e518f90a358f652e4400164f05a5d8f7e35e7747279bc3a93dbf584e125a`. -```solidity -event IncreaseObservationCardinalityNext(uint16 observationCardinalityNextOld, uint16 observationCardinalityNextNew); -```*/ + ```solidity + event IncreaseObservationCardinalityNext(uint16 observationCardinalityNextOld, uint16 observationCardinalityNextNew); + ```*/ #[allow( non_camel_case_types, non_snake_case, @@ -1477,24 +1491,25 @@ event IncreaseObservationCardinalityNext(uint16 observationCardinalityNextOld, u clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[automatically_derived] impl alloy_sol_types::SolEvent for IncreaseObservationCardinalityNext { + type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type DataTuple<'a> = ( alloy_sol_types::sol_data::Uint<16>, alloy_sol_types::sol_data::Uint<16>, ); - type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type TopicList = (alloy_sol_types::sol_data::FixedBytes<32>,); - const SIGNATURE: &'static str = "IncreaseObservationCardinalityNext(uint16,uint16)"; - const SIGNATURE_HASH: alloy_sol_types::private::B256 = alloy_sol_types::private::B256::new([ - 172u8, 73u8, 229u8, 24u8, 249u8, 10u8, 53u8, 143u8, 101u8, 46u8, 68u8, - 0u8, 22u8, 79u8, 5u8, 165u8, 216u8, 247u8, 227u8, 94u8, 119u8, 71u8, - 39u8, 155u8, 195u8, 169u8, 61u8, 191u8, 88u8, 78u8, 18u8, 90u8, - ]); + const ANONYMOUS: bool = false; + const SIGNATURE: &'static str = "IncreaseObservationCardinalityNext(uint16,uint16)"; + const SIGNATURE_HASH: alloy_sol_types::private::B256 = + alloy_sol_types::private::B256::new([ + 172u8, 73u8, 229u8, 24u8, 249u8, 10u8, 53u8, 143u8, 101u8, 46u8, 68u8, 0u8, + 22u8, 79u8, 5u8, 165u8, 216u8, 247u8, 227u8, 94u8, 119u8, 71u8, 39u8, 155u8, + 195u8, 169u8, 61u8, 191u8, 88u8, 78u8, 18u8, 90u8, + ]); + #[allow(unused_variables)] #[inline] fn new( @@ -1506,40 +1521,38 @@ event IncreaseObservationCardinalityNext(uint16 observationCardinalityNextOld, u observationCardinalityNextNew: 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, - ), - ); + 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( + as alloy_sol_types::SolType>::tokenize( &self.observationCardinalityNextOld, ), - as alloy_sol_types::SolType>::tokenize( + as alloy_sol_types::SolType>::tokenize( &self.observationCardinalityNextNew, ), ) } + #[inline] fn topics(&self) -> ::RustType { (Self::SIGNATURE_HASH.into(),) } + #[inline] fn encode_topics_raw( &self, @@ -1548,25 +1561,22 @@ event IncreaseObservationCardinalityNext(uint16 observationCardinalityNextOld, u if out.len() < ::COUNT { return Err(alloy_sol_types::Error::Overrun); } - out[0usize] = alloy_sol_types::abi::token::WordToken( - Self::SIGNATURE_HASH, - ); + out[0usize] = alloy_sol_types::abi::token::WordToken(Self::SIGNATURE_HASH); Ok(()) } } #[automatically_derived] - impl alloy_sol_types::private::IntoLogData - for IncreaseObservationCardinalityNext { + impl alloy_sol_types::private::IntoLogData for IncreaseObservationCardinalityNext { 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<&IncreaseObservationCardinalityNext> - for alloy_sol_types::private::LogData { + impl From<&IncreaseObservationCardinalityNext> for alloy_sol_types::private::LogData { #[inline] fn from( this: &IncreaseObservationCardinalityNext, @@ -1577,9 +1587,9 @@ event IncreaseObservationCardinalityNext(uint16 observationCardinalityNextOld, u }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Event with signature `Initialize(uint160,int24)` and selector `0x98636036cb66a9c19a37435efc1e90142190214e8abeb821bdba3f2990dd4c95`. -```solidity -event Initialize(uint160 sqrtPriceX96, int24 tick); -```*/ + ```solidity + event Initialize(uint160 sqrtPriceX96, int24 tick); + ```*/ #[allow( non_camel_case_types, non_snake_case, @@ -1600,24 +1610,25 @@ event Initialize(uint160 sqrtPriceX96, int24 tick); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[automatically_derived] impl alloy_sol_types::SolEvent for Initialize { + type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type DataTuple<'a> = ( alloy_sol_types::sol_data::Uint<160>, alloy_sol_types::sol_data::Int<24>, ); - type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type TopicList = (alloy_sol_types::sol_data::FixedBytes<32>,); - const SIGNATURE: &'static str = "Initialize(uint160,int24)"; - const SIGNATURE_HASH: alloy_sol_types::private::B256 = alloy_sol_types::private::B256::new([ - 152u8, 99u8, 96u8, 54u8, 203u8, 102u8, 169u8, 193u8, 154u8, 55u8, 67u8, - 94u8, 252u8, 30u8, 144u8, 20u8, 33u8, 144u8, 33u8, 78u8, 138u8, 190u8, - 184u8, 33u8, 189u8, 186u8, 63u8, 41u8, 144u8, 221u8, 76u8, 149u8, - ]); + const ANONYMOUS: bool = false; + const SIGNATURE: &'static str = "Initialize(uint160,int24)"; + const SIGNATURE_HASH: alloy_sol_types::private::B256 = + alloy_sol_types::private::B256::new([ + 152u8, 99u8, 96u8, 54u8, 203u8, 102u8, 169u8, 193u8, 154u8, 55u8, 67u8, 94u8, + 252u8, 30u8, 144u8, 20u8, 33u8, 144u8, 33u8, 78u8, 138u8, 190u8, 184u8, 33u8, + 189u8, 186u8, 63u8, 41u8, 144u8, 221u8, 76u8, 149u8, + ]); + #[allow(unused_variables)] #[inline] fn new( @@ -1629,36 +1640,38 @@ event Initialize(uint160 sqrtPriceX96, int24 tick); tick: 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, - ), - ); + 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.sqrtPriceX96), - as alloy_sol_types::SolType>::tokenize(&self.tick), + as alloy_sol_types::SolType>::tokenize( + &self.sqrtPriceX96, + ), + as alloy_sol_types::SolType>::tokenize( + &self.tick, + ), ) } + #[inline] fn topics(&self) -> ::RustType { (Self::SIGNATURE_HASH.into(),) } + #[inline] fn encode_topics_raw( &self, @@ -1667,9 +1680,7 @@ event Initialize(uint160 sqrtPriceX96, int24 tick); if out.len() < ::COUNT { return Err(alloy_sol_types::Error::Overrun); } - out[0usize] = alloy_sol_types::abi::token::WordToken( - Self::SIGNATURE_HASH, - ); + out[0usize] = alloy_sol_types::abi::token::WordToken(Self::SIGNATURE_HASH); Ok(()) } } @@ -1678,6 +1689,7 @@ event Initialize(uint160 sqrtPriceX96, int24 tick); 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) } @@ -1692,9 +1704,9 @@ event Initialize(uint160 sqrtPriceX96, int24 tick); }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Event with signature `Mint(address,address,int24,int24,uint128,uint256,uint256)` and selector `0x7a53080ba414158be7ec69b987b5fb7d07dee101fe85488f0853ae16239d0bde`. -```solidity -event Mint(address sender, address indexed owner, int24 indexed tickLower, int24 indexed tickUpper, uint128 amount, uint256 amount0, uint256 amount1); -```*/ + ```solidity + event Mint(address sender, address indexed owner, int24 indexed tickLower, int24 indexed tickUpper, uint128 amount, uint256 amount0, uint256 amount1); + ```*/ #[allow( non_camel_case_types, non_snake_case, @@ -1725,31 +1737,33 @@ event Mint(address sender, address indexed owner, int24 indexed tickLower, int24 clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[automatically_derived] impl alloy_sol_types::SolEvent for Mint { + type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type DataTuple<'a> = ( alloy_sol_types::sol_data::Address, alloy_sol_types::sol_data::Uint<128>, alloy_sol_types::sol_data::Uint<256>, 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::Int<24>, alloy_sol_types::sol_data::Int<24>, ); - const SIGNATURE: &'static str = "Mint(address,address,int24,int24,uint128,uint256,uint256)"; - const SIGNATURE_HASH: alloy_sol_types::private::B256 = alloy_sol_types::private::B256::new([ - 122u8, 83u8, 8u8, 11u8, 164u8, 20u8, 21u8, 139u8, 231u8, 236u8, 105u8, - 185u8, 135u8, 181u8, 251u8, 125u8, 7u8, 222u8, 225u8, 1u8, 254u8, 133u8, - 72u8, 143u8, 8u8, 83u8, 174u8, 22u8, 35u8, 157u8, 11u8, 222u8, - ]); + const ANONYMOUS: bool = false; + const SIGNATURE: &'static str = + "Mint(address,address,int24,int24,uint128,uint256,uint256)"; + const SIGNATURE_HASH: alloy_sol_types::private::B256 = + alloy_sol_types::private::B256::new([ + 122u8, 83u8, 8u8, 11u8, 164u8, 20u8, 21u8, 139u8, 231u8, 236u8, 105u8, 185u8, + 135u8, 181u8, 251u8, 125u8, 7u8, 222u8, 225u8, 1u8, 254u8, 133u8, 72u8, 143u8, + 8u8, 83u8, 174u8, 22u8, 35u8, 157u8, 11u8, 222u8, + ]); + #[allow(unused_variables)] #[inline] fn new( @@ -1766,38 +1780,39 @@ event Mint(address sender, address indexed owner, int24 indexed tickLower, int24 amount1: data.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, - ), - ); + 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.sender, ), - as alloy_sol_types::SolType>::tokenize(&self.amount), - as alloy_sol_types::SolType>::tokenize(&self.amount0), - as alloy_sol_types::SolType>::tokenize(&self.amount1), + as alloy_sol_types::SolType>::tokenize( + &self.amount, + ), + as alloy_sol_types::SolType>::tokenize( + &self.amount0, + ), + as alloy_sol_types::SolType>::tokenize( + &self.amount1, + ), ) } + #[inline] fn topics(&self) -> ::RustType { ( @@ -1807,6 +1822,7 @@ event Mint(address sender, address indexed owner, int24 indexed tickLower, int24 self.tickUpper.clone(), ) } + #[inline] fn encode_topics_raw( &self, @@ -1815,9 +1831,7 @@ event Mint(address sender, address indexed owner, int24 indexed tickLower, int24 if out.len() < ::COUNT { return Err(alloy_sol_types::Error::Overrun); } - out[0usize] = alloy_sol_types::abi::token::WordToken( - Self::SIGNATURE_HASH, - ); + out[0usize] = alloy_sol_types::abi::token::WordToken(Self::SIGNATURE_HASH); out[1usize] = ::encode_topic( &self.owner, ); @@ -1835,6 +1849,7 @@ event Mint(address sender, address indexed owner, int24 indexed tickLower, int24 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) } @@ -1849,9 +1864,9 @@ event Mint(address sender, address indexed owner, int24 indexed tickLower, int24 }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Event with signature `SetFeeProtocol(uint8,uint8,uint8,uint8)` and selector `0x973d8d92bb299f4af6ce49b52a8adb85ae46b9f214c4c4fc06ac77401237b133`. -```solidity -event SetFeeProtocol(uint8 feeProtocol0Old, uint8 feeProtocol1Old, uint8 feeProtocol0New, uint8 feeProtocol1New); -```*/ + ```solidity + event SetFeeProtocol(uint8 feeProtocol0Old, uint8 feeProtocol1Old, uint8 feeProtocol0New, uint8 feeProtocol1New); + ```*/ #[allow( non_camel_case_types, non_snake_case, @@ -1876,26 +1891,27 @@ event SetFeeProtocol(uint8 feeProtocol0Old, uint8 feeProtocol1Old, uint8 feeProt clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[automatically_derived] impl alloy_sol_types::SolEvent for SetFeeProtocol { + type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type DataTuple<'a> = ( alloy_sol_types::sol_data::Uint<8>, alloy_sol_types::sol_data::Uint<8>, alloy_sol_types::sol_data::Uint<8>, alloy_sol_types::sol_data::Uint<8>, ); - type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type TopicList = (alloy_sol_types::sol_data::FixedBytes<32>,); - const SIGNATURE: &'static str = "SetFeeProtocol(uint8,uint8,uint8,uint8)"; - const SIGNATURE_HASH: alloy_sol_types::private::B256 = alloy_sol_types::private::B256::new([ - 151u8, 61u8, 141u8, 146u8, 187u8, 41u8, 159u8, 74u8, 246u8, 206u8, 73u8, - 181u8, 42u8, 138u8, 219u8, 133u8, 174u8, 70u8, 185u8, 242u8, 20u8, 196u8, - 196u8, 252u8, 6u8, 172u8, 119u8, 64u8, 18u8, 55u8, 177u8, 51u8, - ]); + const ANONYMOUS: bool = false; + const SIGNATURE: &'static str = "SetFeeProtocol(uint8,uint8,uint8,uint8)"; + const SIGNATURE_HASH: alloy_sol_types::private::B256 = + alloy_sol_types::private::B256::new([ + 151u8, 61u8, 141u8, 146u8, 187u8, 41u8, 159u8, 74u8, 246u8, 206u8, 73u8, 181u8, + 42u8, 138u8, 219u8, 133u8, 174u8, 70u8, 185u8, 242u8, 20u8, 196u8, 196u8, + 252u8, 6u8, 172u8, 119u8, 64u8, 18u8, 55u8, 177u8, 51u8, + ]); + #[allow(unused_variables)] #[inline] fn new( @@ -1909,42 +1925,44 @@ event SetFeeProtocol(uint8 feeProtocol0Old, uint8 feeProtocol1Old, uint8 feeProt feeProtocol1New: data.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, - ), - ); + 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.feeProtocol0Old), - as alloy_sol_types::SolType>::tokenize(&self.feeProtocol1Old), - as alloy_sol_types::SolType>::tokenize(&self.feeProtocol0New), - as alloy_sol_types::SolType>::tokenize(&self.feeProtocol1New), + as alloy_sol_types::SolType>::tokenize( + &self.feeProtocol0Old, + ), + as alloy_sol_types::SolType>::tokenize( + &self.feeProtocol1Old, + ), + as alloy_sol_types::SolType>::tokenize( + &self.feeProtocol0New, + ), + as alloy_sol_types::SolType>::tokenize( + &self.feeProtocol1New, + ), ) } + #[inline] fn topics(&self) -> ::RustType { (Self::SIGNATURE_HASH.into(),) } + #[inline] fn encode_topics_raw( &self, @@ -1953,9 +1971,7 @@ event SetFeeProtocol(uint8 feeProtocol0Old, uint8 feeProtocol1Old, uint8 feeProt if out.len() < ::COUNT { return Err(alloy_sol_types::Error::Overrun); } - out[0usize] = alloy_sol_types::abi::token::WordToken( - Self::SIGNATURE_HASH, - ); + out[0usize] = alloy_sol_types::abi::token::WordToken(Self::SIGNATURE_HASH); Ok(()) } } @@ -1964,6 +1980,7 @@ event SetFeeProtocol(uint8 feeProtocol0Old, uint8 feeProtocol1Old, uint8 feeProt 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) } @@ -1978,9 +1995,9 @@ event SetFeeProtocol(uint8 feeProtocol0Old, uint8 feeProtocol1Old, uint8 feeProt }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Event with signature `Swap(address,address,int256,int256,uint160,uint128,int24)` and selector `0xc42079f94a6350d7e6235f29174924f928cc2ac818eb64fed8004e115fbcca67`. -```solidity -event Swap(address indexed sender, address indexed recipient, int256 amount0, int256 amount1, uint160 sqrtPriceX96, uint128 liquidity, int24 tick); -```*/ + ```solidity + event Swap(address indexed sender, address indexed recipient, int256 amount0, int256 amount1, uint160 sqrtPriceX96, uint128 liquidity, int24 tick); + ```*/ #[allow( non_camel_case_types, non_snake_case, @@ -2011,9 +2028,10 @@ event Swap(address indexed sender, address indexed recipient, int256 amount0, in clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[automatically_derived] impl alloy_sol_types::SolEvent for Swap { + type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type DataTuple<'a> = ( alloy_sol_types::sol_data::Int<256>, alloy_sol_types::sol_data::Int<256>, @@ -2021,21 +2039,22 @@ event Swap(address indexed sender, address indexed recipient, int256 amount0, in alloy_sol_types::sol_data::Uint<128>, alloy_sol_types::sol_data::Int<24>, ); - 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 = "Swap(address,address,int256,int256,uint160,uint128,int24)"; - const SIGNATURE_HASH: alloy_sol_types::private::B256 = alloy_sol_types::private::B256::new([ - 196u8, 32u8, 121u8, 249u8, 74u8, 99u8, 80u8, 215u8, 230u8, 35u8, 95u8, - 41u8, 23u8, 73u8, 36u8, 249u8, 40u8, 204u8, 42u8, 200u8, 24u8, 235u8, - 100u8, 254u8, 216u8, 0u8, 78u8, 17u8, 95u8, 188u8, 202u8, 103u8, - ]); + const ANONYMOUS: bool = false; + const SIGNATURE: &'static str = + "Swap(address,address,int256,int256,uint160,uint128,int24)"; + const SIGNATURE_HASH: alloy_sol_types::private::B256 = + alloy_sol_types::private::B256::new([ + 196u8, 32u8, 121u8, 249u8, 74u8, 99u8, 80u8, 215u8, 230u8, 35u8, 95u8, 41u8, + 23u8, 73u8, 36u8, 249u8, 40u8, 204u8, 42u8, 200u8, 24u8, 235u8, 100u8, 254u8, + 216u8, 0u8, 78u8, 17u8, 95u8, 188u8, 202u8, 103u8, + ]); + #[allow(unused_variables)] #[inline] fn new( @@ -2052,41 +2071,42 @@ event Swap(address indexed sender, address indexed recipient, int256 amount0, in tick: data.4, } } + #[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, - ), - ); + 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.amount0), - as alloy_sol_types::SolType>::tokenize(&self.amount1), - as alloy_sol_types::SolType>::tokenize(&self.sqrtPriceX96), - as alloy_sol_types::SolType>::tokenize(&self.liquidity), - as alloy_sol_types::SolType>::tokenize(&self.tick), + as alloy_sol_types::SolType>::tokenize( + &self.amount0, + ), + as alloy_sol_types::SolType>::tokenize( + &self.amount1, + ), + as alloy_sol_types::SolType>::tokenize( + &self.sqrtPriceX96, + ), + as alloy_sol_types::SolType>::tokenize( + &self.liquidity, + ), + as alloy_sol_types::SolType>::tokenize( + &self.tick, + ), ) } + #[inline] fn topics(&self) -> ::RustType { ( @@ -2095,6 +2115,7 @@ event Swap(address indexed sender, address indexed recipient, int256 amount0, in self.recipient.clone(), ) } + #[inline] fn encode_topics_raw( &self, @@ -2103,9 +2124,7 @@ event Swap(address indexed sender, address indexed recipient, int256 amount0, in if out.len() < ::COUNT { return Err(alloy_sol_types::Error::Overrun); } - out[0usize] = alloy_sol_types::abi::token::WordToken( - Self::SIGNATURE_HASH, - ); + out[0usize] = alloy_sol_types::abi::token::WordToken(Self::SIGNATURE_HASH); out[1usize] = ::encode_topic( &self.sender, ); @@ -2120,6 +2139,7 @@ event Swap(address indexed sender, address indexed recipient, int256 amount0, in 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) } @@ -2133,14 +2153,14 @@ event Swap(address indexed sender, address indexed recipient, int256 amount0, in } }; /**Constructor`. -```solidity -constructor(); -```*/ + ```solidity + constructor(); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct constructorCall {} const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -2149,9 +2169,7 @@ constructor(); type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -2176,15 +2194,15 @@ constructor(); #[automatically_derived] impl alloy_sol_types::SolConstructor for constructorCall { type Parameters<'a> = (); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + 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<'_> { () @@ -2193,9 +2211,9 @@ constructor(); }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `burn(int24,int24,uint128)` and selector `0xa34123a7`. -```solidity -function burn(int24 tickLower, int24 tickUpper, uint128 amount) external returns (uint256 amount0, uint256 amount1); -```*/ + ```solidity + function burn(int24 tickLower, int24 tickUpper, uint128 amount) external returns (uint256 amount0, uint256 amount1); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct burnCall { @@ -2207,7 +2225,8 @@ function burn(int24 tickLower, int24 tickUpper, uint128 amount) external returns pub amount: u128, } #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`burn(int24,int24,uint128)`](burnCall) function. + ///Container type for the return parameters of the + /// [`burn(int24,int24,uint128)`](burnCall) function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct burnReturn { @@ -2223,7 +2242,7 @@ function burn(int24 tickLower, int24 tickUpper, uint128 amount) external returns clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -2240,9 +2259,7 @@ function burn(int24 tickLower, int24 tickUpper, uint128 amount) external returns ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -2282,9 +2299,7 @@ function burn(int24 tickLower, int24 tickUpper, uint128 amount) external returns ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -2310,16 +2325,14 @@ function burn(int24 tickLower, int24 tickUpper, uint128 amount) external returns } } impl burnReturn { - fn _tokenize( - &self, - ) -> ::ReturnToken<'_> { + fn _tokenize(&self) -> ::ReturnToken<'_> { ( - as alloy_sol_types::SolType>::tokenize(&self.amount0), - as alloy_sol_types::SolType>::tokenize(&self.amount1), + as alloy_sol_types::SolType>::tokenize( + &self.amount0, + ), + as alloy_sol_types::SolType>::tokenize( + &self.amount1, + ), ) } } @@ -2330,66 +2343,64 @@ function burn(int24 tickLower, int24 tickUpper, uint128 amount) external returns alloy_sol_types::sol_data::Int<24>, alloy_sol_types::sol_data::Uint<128>, ); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = burnReturn; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = ( alloy_sol_types::sol_data::Uint<256>, alloy_sol_types::sol_data::Uint<256>, ); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "burn(int24,int24,uint128)"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [163u8, 65u8, 35u8, 167u8]; + const SIGNATURE: &'static str = "burn(int24,int24,uint128)"; + #[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.tickLower), - as alloy_sol_types::SolType>::tokenize(&self.tickUpper), - as alloy_sol_types::SolType>::tokenize(&self.amount), + as alloy_sol_types::SolType>::tokenize( + &self.tickLower, + ), + as alloy_sol_types::SolType>::tokenize( + &self.tickUpper, + ), + as alloy_sol_types::SolType>::tokenize( + &self.amount, + ), ) } + #[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) + 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) + 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(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `collect(address,int24,int24,uint128,uint128)` and selector `0x4f1eb3d8`. -```solidity -function collect(address recipient, int24 tickLower, int24 tickUpper, uint128 amount0Requested, uint128 amount1Requested) external returns (uint128 amount0, uint128 amount1); -```*/ + ```solidity + function collect(address recipient, int24 tickLower, int24 tickUpper, uint128 amount0Requested, uint128 amount1Requested) external returns (uint128 amount0, uint128 amount1); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct collectCall { @@ -2405,7 +2416,8 @@ function collect(address recipient, int24 tickLower, int24 tickUpper, uint128 am pub amount1Requested: u128, } #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`collect(address,int24,int24,uint128,uint128)`](collectCall) function. + ///Container type for the return parameters of the + /// [`collect(address,int24,int24,uint128,uint128)`](collectCall) function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct collectReturn { @@ -2421,7 +2433,7 @@ function collect(address recipient, int24 tickLower, int24 tickUpper, uint128 am clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -2442,9 +2454,7 @@ function collect(address recipient, int24 tickLower, int24 tickUpper, uint128 am ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -2489,9 +2499,7 @@ function collect(address recipient, int24 tickLower, int24 tickUpper, uint128 am type UnderlyingRustTuple<'a> = (u128, u128); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -2517,16 +2525,14 @@ function collect(address recipient, int24 tickLower, int24 tickUpper, uint128 am } } impl collectReturn { - fn _tokenize( - &self, - ) -> ::ReturnToken<'_> { + fn _tokenize(&self) -> ::ReturnToken<'_> { ( - as alloy_sol_types::SolType>::tokenize(&self.amount0), - as alloy_sol_types::SolType>::tokenize(&self.amount1), + as alloy_sol_types::SolType>::tokenize( + &self.amount0, + ), + as alloy_sol_types::SolType>::tokenize( + &self.amount1, + ), ) } } @@ -2539,77 +2545,76 @@ function collect(address recipient, int24 tickLower, int24 tickUpper, uint128 am alloy_sol_types::sol_data::Uint<128>, alloy_sol_types::sol_data::Uint<128>, ); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = collectReturn; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = ( alloy_sol_types::sol_data::Uint<128>, alloy_sol_types::sol_data::Uint<128>, ); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "collect(address,int24,int24,uint128,uint128)"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [79u8, 30u8, 179u8, 216u8]; + const SIGNATURE: &'static str = "collect(address,int24,int24,uint128,uint128)"; + #[inline] fn new<'a>( tuple: as alloy_sol_types::SolType>::RustType, ) -> Self { tuple.into() } + #[inline] fn tokenize(&self) -> Self::Token<'_> { ( ::tokenize( &self.recipient, ), - as alloy_sol_types::SolType>::tokenize(&self.tickLower), - as alloy_sol_types::SolType>::tokenize(&self.tickUpper), - as alloy_sol_types::SolType>::tokenize(&self.amount0Requested), - as alloy_sol_types::SolType>::tokenize(&self.amount1Requested), + as alloy_sol_types::SolType>::tokenize( + &self.tickLower, + ), + as alloy_sol_types::SolType>::tokenize( + &self.tickUpper, + ), + as alloy_sol_types::SolType>::tokenize( + &self.amount0Requested, + ), + as alloy_sol_types::SolType>::tokenize( + &self.amount1Requested, + ), ) } + #[inline] fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { collectReturn::_tokenize(ret) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) + 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) + 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(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `factory()` and selector `0xc45a0155`. -```solidity -function factory() external view returns (address); -```*/ + ```solidity + function factory() external view returns (address); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct factoryCall; #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`factory()`](factoryCall) function. + ///Container type for the return parameters of the + /// [`factory()`](factoryCall) function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct factoryReturn { @@ -2623,7 +2628,7 @@ function factory() external view returns (address); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -2632,9 +2637,7 @@ function factory() external view returns (address); type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -2664,9 +2667,7 @@ function factory() external view returns (address); type UnderlyingRustTuple<'a> = (alloy_sol_types::private::Address,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -2691,68 +2692,64 @@ function factory() external view returns (address); #[automatically_derived] impl alloy_sol_types::SolCall for factoryCall { type Parameters<'a> = (); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = alloy_sol_types::private::Address; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (alloy_sol_types::sol_data::Address,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "factory()"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [196u8, 90u8, 1u8, 85u8]; + const SIGNATURE: &'static str = "factory()"; + #[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, - ), - ) + (::tokenize(ret),) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) - .map(|r| { + as alloy_sol_types::SolType>::abi_decode_sequence(data).map( + |r| { let r: factoryReturn = 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: factoryReturn = r.into(); - r._0 - }) + 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: factoryReturn = r.into(); + r._0 + }) } } }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `fee()` and selector `0xddca3f43`. -```solidity -function fee() external view returns (uint24); -```*/ + ```solidity + function fee() external view returns (uint24); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct feeCall; #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`fee()`](feeCall) function. + ///Container type for the return parameters of the [`fee()`](feeCall) + /// function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct feeReturn { @@ -2766,7 +2763,7 @@ function fee() external view returns (uint24); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -2775,9 +2772,7 @@ function fee() external view returns (uint24); type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -2804,14 +2799,10 @@ function fee() external view returns (uint24); #[allow(dead_code)] type UnderlyingSolTuple<'a> = (alloy_sol_types::sol_data::Uint<24>,); #[doc(hidden)] - type UnderlyingRustTuple<'a> = ( - alloy_sol_types::private::primitives::aliases::U24, - ); + type UnderlyingRustTuple<'a> = (alloy_sol_types::private::primitives::aliases::U24,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -2836,63 +2827,62 @@ function fee() external view returns (uint24); #[automatically_derived] impl alloy_sol_types::SolCall for feeCall { type Parameters<'a> = (); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = alloy_sol_types::private::primitives::aliases::U24; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (alloy_sol_types::sol_data::Uint<24>,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "fee()"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [221u8, 202u8, 63u8, 67u8]; + const SIGNATURE: &'static str = "fee()"; + #[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), + 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| { + as alloy_sol_types::SolType>::abi_decode_sequence(data).map( + |r| { let r: feeReturn = 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: feeReturn = r.into(); - r._0 - }) + 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: feeReturn = r.into(); + r._0 + }) } } }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `flash(address,uint256,uint256,bytes)` and selector `0x490e6cbc`. -```solidity -function flash(address recipient, uint256 amount0, uint256 amount1, bytes memory data) external; -```*/ + ```solidity + function flash(address recipient, uint256 amount0, uint256 amount1, bytes memory data) external; + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct flashCall { @@ -2905,7 +2895,8 @@ function flash(address recipient, uint256 amount0, uint256 amount1, bytes memory #[allow(missing_docs)] pub data: alloy_sol_types::private::Bytes, } - ///Container type for the return parameters of the [`flash(address,uint256,uint256,bytes)`](flashCall) function. + ///Container type for the return parameters of the + /// [`flash(address,uint256,uint256,bytes)`](flashCall) function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct flashReturn {} @@ -2916,7 +2907,7 @@ function flash(address recipient, uint256 amount0, uint256 amount1, bytes memory clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -2935,9 +2926,7 @@ function flash(address recipient, uint256 amount0, uint256 amount1, bytes memory ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -2972,9 +2961,7 @@ function flash(address recipient, uint256 amount0, uint256 amount1, bytes memory type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -2997,9 +2984,7 @@ function flash(address recipient, uint256 amount0, uint256 amount1, bytes memory } } impl flashReturn { - fn _tokenize( - &self, - ) -> ::ReturnToken<'_> { + fn _tokenize(&self) -> ::ReturnToken<'_> { () } } @@ -3011,73 +2996,72 @@ function flash(address recipient, uint256 amount0, uint256 amount1, bytes memory alloy_sol_types::sol_data::Uint<256>, alloy_sol_types::sol_data::Bytes, ); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = flashReturn; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "flash(address,uint256,uint256,bytes)"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [73u8, 14u8, 108u8, 188u8]; + const SIGNATURE: &'static str = "flash(address,uint256,uint256,bytes)"; + #[inline] fn new<'a>( tuple: as alloy_sol_types::SolType>::RustType, ) -> Self { tuple.into() } + #[inline] fn tokenize(&self) -> Self::Token<'_> { ( ::tokenize( &self.recipient, ), - as alloy_sol_types::SolType>::tokenize(&self.amount0), - as alloy_sol_types::SolType>::tokenize(&self.amount1), + as alloy_sol_types::SolType>::tokenize( + &self.amount0, + ), + as alloy_sol_types::SolType>::tokenize( + &self.amount1, + ), ::tokenize( &self.data, ), ) } + #[inline] fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { flashReturn::_tokenize(ret) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) + 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) + 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(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `initialize(uint160)` and selector `0xf637731d`. -```solidity -function initialize(uint160 sqrtPriceX96) external; -```*/ + ```solidity + function initialize(uint160 sqrtPriceX96) external; + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct initializeCall { #[allow(missing_docs)] pub sqrtPriceX96: alloy_sol_types::private::primitives::aliases::U160, } - ///Container type for the return parameters of the [`initialize(uint160)`](initializeCall) function. + ///Container type for the return parameters of the + /// [`initialize(uint160)`](initializeCall) function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct initializeReturn {} @@ -3088,20 +3072,16 @@ function initialize(uint160 sqrtPriceX96) external; clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] type UnderlyingSolTuple<'a> = (alloy_sol_types::sol_data::Uint<160>,); #[doc(hidden)] - type UnderlyingRustTuple<'a> = ( - alloy_sol_types::private::primitives::aliases::U160, - ); + type UnderlyingRustTuple<'a> = (alloy_sol_types::private::primitives::aliases::U160,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -3119,7 +3099,9 @@ function initialize(uint160 sqrtPriceX96) external; #[doc(hidden)] impl ::core::convert::From> for initializeCall { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { - Self { sqrtPriceX96: tuple.0 } + Self { + sqrtPriceX96: tuple.0, + } } } } @@ -3131,9 +3113,7 @@ function initialize(uint160 sqrtPriceX96) external; type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -3156,71 +3136,68 @@ function initialize(uint160 sqrtPriceX96) external; } } impl initializeReturn { - fn _tokenize( - &self, - ) -> ::ReturnToken<'_> { + fn _tokenize(&self) -> ::ReturnToken<'_> { () } } #[automatically_derived] impl alloy_sol_types::SolCall for initializeCall { type Parameters<'a> = (alloy_sol_types::sol_data::Uint<160>,); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = initializeReturn; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "initialize(uint160)"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [246u8, 55u8, 115u8, 29u8]; + const SIGNATURE: &'static str = "initialize(uint160)"; + #[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.sqrtPriceX96), + as alloy_sol_types::SolType>::tokenize( + &self.sqrtPriceX96, + ), ) } + #[inline] fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { initializeReturn::_tokenize(ret) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) + 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) + 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(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `liquidity()` and selector `0x1a686502`. -```solidity -function liquidity() external view returns (uint128); -```*/ + ```solidity + function liquidity() external view returns (uint128); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct liquidityCall; #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`liquidity()`](liquidityCall) function. + ///Container type for the return parameters of the + /// [`liquidity()`](liquidityCall) function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct liquidityReturn { @@ -3234,7 +3211,7 @@ function liquidity() external view returns (uint128); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -3243,9 +3220,7 @@ function liquidity() external view returns (uint128); type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -3275,9 +3250,7 @@ function liquidity() external view returns (uint128); type UnderlyingRustTuple<'a> = (u128,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -3302,63 +3275,62 @@ function liquidity() external view returns (uint128); #[automatically_derived] impl alloy_sol_types::SolCall for liquidityCall { type Parameters<'a> = (); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = u128; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (alloy_sol_types::sol_data::Uint<128>,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "liquidity()"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [26u8, 104u8, 101u8, 2u8]; + const SIGNATURE: &'static str = "liquidity()"; + #[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), + 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| { + as alloy_sol_types::SolType>::abi_decode_sequence(data).map( + |r| { let r: liquidityReturn = 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: liquidityReturn = r.into(); - r._0 - }) + 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: liquidityReturn = r.into(); + r._0 + }) } } }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `mint(address,int24,int24,uint128,bytes)` and selector `0x3c8a7d8d`. -```solidity -function mint(address recipient, int24 tickLower, int24 tickUpper, uint128 amount, bytes memory data) external returns (uint256 amount0, uint256 amount1); -```*/ + ```solidity + function mint(address recipient, int24 tickLower, int24 tickUpper, uint128 amount, bytes memory data) external returns (uint256 amount0, uint256 amount1); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct mintCall { @@ -3374,7 +3346,8 @@ function mint(address recipient, int24 tickLower, int24 tickUpper, uint128 amoun pub data: alloy_sol_types::private::Bytes, } #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`mint(address,int24,int24,uint128,bytes)`](mintCall) function. + ///Container type for the return parameters of the + /// [`mint(address,int24,int24,uint128,bytes)`](mintCall) function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct mintReturn { @@ -3390,7 +3363,7 @@ function mint(address recipient, int24 tickLower, int24 tickUpper, uint128 amoun clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -3411,9 +3384,7 @@ function mint(address recipient, int24 tickLower, int24 tickUpper, uint128 amoun ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -3461,9 +3432,7 @@ function mint(address recipient, int24 tickLower, int24 tickUpper, uint128 amoun ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -3489,16 +3458,14 @@ function mint(address recipient, int24 tickLower, int24 tickUpper, uint128 amoun } } impl mintReturn { - fn _tokenize( - &self, - ) -> ::ReturnToken<'_> { + fn _tokenize(&self) -> ::ReturnToken<'_> { ( - as alloy_sol_types::SolType>::tokenize(&self.amount0), - as alloy_sol_types::SolType>::tokenize(&self.amount1), + as alloy_sol_types::SolType>::tokenize( + &self.amount0, + ), + as alloy_sol_types::SolType>::tokenize( + &self.amount1, + ), ) } } @@ -3511,77 +3478,76 @@ function mint(address recipient, int24 tickLower, int24 tickUpper, uint128 amoun alloy_sol_types::sol_data::Uint<128>, alloy_sol_types::sol_data::Bytes, ); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = mintReturn; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = ( alloy_sol_types::sol_data::Uint<256>, alloy_sol_types::sol_data::Uint<256>, ); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "mint(address,int24,int24,uint128,bytes)"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [60u8, 138u8, 125u8, 141u8]; + const SIGNATURE: &'static str = "mint(address,int24,int24,uint128,bytes)"; + #[inline] fn new<'a>( tuple: as alloy_sol_types::SolType>::RustType, ) -> Self { tuple.into() } + #[inline] fn tokenize(&self) -> Self::Token<'_> { ( ::tokenize( &self.recipient, ), - as alloy_sol_types::SolType>::tokenize(&self.tickLower), - as alloy_sol_types::SolType>::tokenize(&self.tickUpper), - as alloy_sol_types::SolType>::tokenize(&self.amount), + as alloy_sol_types::SolType>::tokenize( + &self.tickLower, + ), + as alloy_sol_types::SolType>::tokenize( + &self.tickUpper, + ), + as alloy_sol_types::SolType>::tokenize( + &self.amount, + ), ::tokenize( &self.data, ), ) } + #[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) + 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) + 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(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `observations(uint256)` and selector `0x252c09d7`. -```solidity -function observations(uint256) external view returns (uint32 blockTimestamp, int56 tickCumulative, uint160 secondsPerLiquidityCumulativeX128, bool initialized); -```*/ + ```solidity + function observations(uint256) external view returns (uint32 blockTimestamp, int56 tickCumulative, uint160 secondsPerLiquidityCumulativeX128, bool initialized); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct observationsCall(pub alloy_sol_types::private::primitives::aliases::U256); #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`observations(uint256)`](observationsCall) function. + ///Container type for the return parameters of the + /// [`observations(uint256)`](observationsCall) function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct observationsReturn { @@ -3601,20 +3567,16 @@ function observations(uint256) external view returns (uint32 blockTimestamp, int clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] type UnderlyingSolTuple<'a> = (alloy_sol_types::sol_data::Uint<256>,); #[doc(hidden)] - type UnderlyingRustTuple<'a> = ( - alloy_sol_types::private::primitives::aliases::U256, - ); + 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, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -3654,9 +3616,7 @@ function observations(uint256) external view returns (uint32 blockTimestamp, int ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -3689,19 +3649,15 @@ function observations(uint256) external view returns (uint32 blockTimestamp, int } } impl observationsReturn { - fn _tokenize( - &self, - ) -> ::ReturnToken<'_> { + fn _tokenize(&self) -> ::ReturnToken<'_> { ( - as alloy_sol_types::SolType>::tokenize(&self.blockTimestamp), - as alloy_sol_types::SolType>::tokenize(&self.tickCumulative), - as alloy_sol_types::SolType>::tokenize( + as alloy_sol_types::SolType>::tokenize( + &self.blockTimestamp, + ), + as alloy_sol_types::SolType>::tokenize( + &self.tickCumulative, + ), + as alloy_sol_types::SolType>::tokenize( &self.secondsPerLiquidityCumulativeX128, ), ::tokenize( @@ -3713,62 +3669,60 @@ function observations(uint256) external view returns (uint32 blockTimestamp, int #[automatically_derived] impl alloy_sol_types::SolCall for observationsCall { type Parameters<'a> = (alloy_sol_types::sol_data::Uint<256>,); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = observationsReturn; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = ( alloy_sol_types::sol_data::Uint<32>, alloy_sol_types::sol_data::Int<56>, alloy_sol_types::sol_data::Uint<160>, alloy_sol_types::sol_data::Bool, ); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "observations(uint256)"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [37u8, 44u8, 9u8, 215u8]; + const SIGNATURE: &'static str = "observations(uint256)"; + #[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), + as alloy_sol_types::SolType>::tokenize( + &self.0, + ), ) } + #[inline] fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { observationsReturn::_tokenize(ret) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) + 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) + 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(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `observe(uint32[])` and selector `0x883bdbfd`. -```solidity -function observe(uint32[] memory secondsAgos) external view returns (int56[] memory tickCumulatives, uint160[] memory secondsPerLiquidityCumulativeX128s); -```*/ + ```solidity + function observe(uint32[] memory secondsAgos) external view returns (int56[] memory tickCumulatives, uint160[] memory secondsPerLiquidityCumulativeX128s); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct observeCall { @@ -3776,18 +3730,17 @@ function observe(uint32[] memory secondsAgos) external view returns (int56[] mem pub secondsAgos: alloy_sol_types::private::Vec, } #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`observe(uint32[])`](observeCall) function. + ///Container type for the return parameters of the + /// [`observe(uint32[])`](observeCall) function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct observeReturn { #[allow(missing_docs)] - pub tickCumulatives: alloy_sol_types::private::Vec< - alloy_sol_types::private::primitives::aliases::I56, - >, + pub tickCumulatives: + alloy_sol_types::private::Vec, #[allow(missing_docs)] - pub secondsPerLiquidityCumulativeX128s: alloy_sol_types::private::Vec< - alloy_sol_types::private::primitives::aliases::U160, - >, + pub secondsPerLiquidityCumulativeX128s: + alloy_sol_types::private::Vec, } #[allow( non_camel_case_types, @@ -3796,20 +3749,17 @@ function observe(uint32[] memory secondsAgos) external view returns (int56[] mem clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] - type UnderlyingSolTuple<'a> = ( - alloy_sol_types::sol_data::Array>, - ); + type UnderlyingSolTuple<'a> = + (alloy_sol_types::sol_data::Array>,); #[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, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -3827,7 +3777,9 @@ function observe(uint32[] memory secondsAgos) external view returns (int56[] mem #[doc(hidden)] impl ::core::convert::From> for observeCall { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { - Self { secondsAgos: tuple.0 } + Self { + secondsAgos: tuple.0, + } } } } @@ -3840,18 +3792,12 @@ function observe(uint32[] memory secondsAgos) external view returns (int56[] mem ); #[doc(hidden)] type UnderlyingRustTuple<'a> = ( - alloy_sol_types::private::Vec< - alloy_sol_types::private::primitives::aliases::I56, - >, - alloy_sol_types::private::Vec< - alloy_sol_types::private::primitives::aliases::U160, - >, + alloy_sol_types::private::Vec, + alloy_sol_types::private::Vec, ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -3862,7 +3808,10 @@ function observe(uint32[] memory secondsAgos) external view returns (int56[] mem #[doc(hidden)] impl ::core::convert::From for UnderlyingRustTuple<'_> { fn from(value: observeReturn) -> Self { - (value.tickCumulatives, value.secondsPerLiquidityCumulativeX128s) + ( + value.tickCumulatives, + value.secondsPerLiquidityCumulativeX128s, + ) } } #[automatically_derived] @@ -3877,9 +3826,7 @@ function observe(uint32[] memory secondsAgos) external view returns (int56[] mem } } impl observeReturn { - fn _tokenize( - &self, - ) -> ::ReturnToken<'_> { + fn _tokenize(&self) -> ::ReturnToken<'_> { ( , @@ -3894,68 +3841,66 @@ function observe(uint32[] memory secondsAgos) external view returns (int56[] mem } #[automatically_derived] impl alloy_sol_types::SolCall for observeCall { - type Parameters<'a> = ( - alloy_sol_types::sol_data::Array>, - ); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Parameters<'a> = + (alloy_sol_types::sol_data::Array>,); type Return = observeReturn; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = ( alloy_sol_types::sol_data::Array>, alloy_sol_types::sol_data::Array>, ); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "observe(uint32[])"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [136u8, 59u8, 219u8, 253u8]; + const SIGNATURE: &'static str = "observe(uint32[])"; + #[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.secondsAgos), - ) + (, + > as alloy_sol_types::SolType>::tokenize( + &self.secondsAgos + ),) } + #[inline] fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { observeReturn::_tokenize(ret) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) + 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) + 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(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `positions(bytes32)` and selector `0x514ea4bf`. -```solidity -function positions(bytes32) external view returns (uint128 liquidity, uint256 feeGrowthInside0LastX128, uint256 feeGrowthInside1LastX128, uint128 tokensOwed0, uint128 tokensOwed1); -```*/ + ```solidity + function positions(bytes32) external view returns (uint128 liquidity, uint256 feeGrowthInside0LastX128, uint256 feeGrowthInside1LastX128, uint128 tokensOwed0, uint128 tokensOwed1); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct positionsCall(pub alloy_sol_types::private::FixedBytes<32>); #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`positions(bytes32)`](positionsCall) function. + ///Container type for the return parameters of the + /// [`positions(bytes32)`](positionsCall) function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct positionsReturn { @@ -3977,7 +3922,7 @@ function positions(bytes32) external view returns (uint128 liquidity, uint256 fe clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -3986,9 +3931,7 @@ function positions(bytes32) external view returns (uint128 liquidity, uint256 fe 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, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -4030,9 +3973,7 @@ function positions(bytes32) external view returns (uint128 liquidity, uint256 fe ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -4067,39 +4008,31 @@ function positions(bytes32) external view returns (uint128 liquidity, uint256 fe } } impl positionsReturn { - fn _tokenize( - &self, - ) -> ::ReturnToken<'_> { + fn _tokenize(&self) -> ::ReturnToken<'_> { ( - as alloy_sol_types::SolType>::tokenize(&self.liquidity), - as alloy_sol_types::SolType>::tokenize( + as alloy_sol_types::SolType>::tokenize( + &self.liquidity, + ), + as alloy_sol_types::SolType>::tokenize( &self.feeGrowthInside0LastX128, ), - as alloy_sol_types::SolType>::tokenize( + as alloy_sol_types::SolType>::tokenize( &self.feeGrowthInside1LastX128, ), - as alloy_sol_types::SolType>::tokenize(&self.tokensOwed0), - as alloy_sol_types::SolType>::tokenize(&self.tokensOwed1), + as alloy_sol_types::SolType>::tokenize( + &self.tokensOwed0, + ), + as alloy_sol_types::SolType>::tokenize( + &self.tokensOwed1, + ), ) } } #[automatically_derived] impl alloy_sol_types::SolCall for positionsCall { type Parameters<'a> = (alloy_sol_types::sol_data::FixedBytes<32>,); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = positionsReturn; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = ( alloy_sol_types::sol_data::Uint<128>, alloy_sol_types::sol_data::Uint<256>, @@ -4107,17 +4040,18 @@ function positions(bytes32) external view returns (uint128 liquidity, uint256 fe alloy_sol_types::sol_data::Uint<128>, alloy_sol_types::sol_data::Uint<128>, ); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "positions(bytes32)"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [81u8, 78u8, 164u8, 191u8]; + const SIGNATURE: &'static str = "positions(bytes32)"; + #[inline] fn new<'a>( tuple: as alloy_sol_types::SolType>::RustType, ) -> Self { tuple.into() } + #[inline] fn tokenize(&self) -> Self::Token<'_> { ( @@ -4126,38 +4060,38 @@ function positions(bytes32) external view returns (uint128 liquidity, uint256 fe > as alloy_sol_types::SolType>::tokenize(&self.0), ) } + #[inline] fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { positionsReturn::_tokenize(ret) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) + 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) + 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(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `protocolFees()` and selector `0x1ad8b03b`. -```solidity -function protocolFees() external view returns (uint128 token0, uint128 token1); -```*/ + ```solidity + function protocolFees() external view returns (uint128 token0, uint128 token1); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct protocolFeesCall; #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`protocolFees()`](protocolFeesCall) function. + ///Container type for the return parameters of the + /// [`protocolFees()`](protocolFeesCall) function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct protocolFeesReturn { @@ -4173,7 +4107,7 @@ function protocolFees() external view returns (uint128 token0, uint128 token1); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -4182,9 +4116,7 @@ function protocolFees() external view returns (uint128 token0, uint128 token1); type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -4217,9 +4149,7 @@ function protocolFees() external view returns (uint128 token0, uint128 token1); type UnderlyingRustTuple<'a> = (u128, u128); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -4245,77 +4175,74 @@ function protocolFees() external view returns (uint128 token0, uint128 token1); } } impl protocolFeesReturn { - fn _tokenize( - &self, - ) -> ::ReturnToken<'_> { + fn _tokenize(&self) -> ::ReturnToken<'_> { ( - as alloy_sol_types::SolType>::tokenize(&self.token0), - as alloy_sol_types::SolType>::tokenize(&self.token1), + as alloy_sol_types::SolType>::tokenize( + &self.token0, + ), + as alloy_sol_types::SolType>::tokenize( + &self.token1, + ), ) } } #[automatically_derived] impl alloy_sol_types::SolCall for protocolFeesCall { type Parameters<'a> = (); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = protocolFeesReturn; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = ( alloy_sol_types::sol_data::Uint<128>, alloy_sol_types::sol_data::Uint<128>, ); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "protocolFees()"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [26u8, 216u8, 176u8, 59u8]; + const SIGNATURE: &'static str = "protocolFees()"; + #[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<'_> { protocolFeesReturn::_tokenize(ret) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) + 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) + 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(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `slot0()` and selector `0x3850c7bd`. -```solidity -function slot0() external view returns (uint160 sqrtPriceX96, int24 tick, uint16 observationIndex, uint16 observationCardinality, uint16 observationCardinalityNext, uint8 feeProtocol, bool unlocked); -```*/ + ```solidity + function slot0() external view returns (uint160 sqrtPriceX96, int24 tick, uint16 observationIndex, uint16 observationCardinality, uint16 observationCardinalityNext, uint8 feeProtocol, bool unlocked); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct slot0Call; #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`slot0()`](slot0Call) function. + ///Container type for the return parameters of the [`slot0()`](slot0Call) + /// function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct slot0Return { @@ -4341,7 +4268,7 @@ function slot0() external view returns (uint160 sqrtPriceX96, int24 tick, uint16 clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -4350,9 +4277,7 @@ function slot0() external view returns (uint160 sqrtPriceX96, int24 tick, uint16 type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -4398,9 +4323,7 @@ function slot0() external view returns (uint160 sqrtPriceX96, int24 tick, uint16 ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -4439,32 +4362,26 @@ function slot0() external view returns (uint160 sqrtPriceX96, int24 tick, uint16 } } impl slot0Return { - fn _tokenize( - &self, - ) -> ::ReturnToken<'_> { + fn _tokenize(&self) -> ::ReturnToken<'_> { ( - as alloy_sol_types::SolType>::tokenize(&self.sqrtPriceX96), - as alloy_sol_types::SolType>::tokenize(&self.tick), - as alloy_sol_types::SolType>::tokenize(&self.observationIndex), - as alloy_sol_types::SolType>::tokenize( + as alloy_sol_types::SolType>::tokenize( + &self.sqrtPriceX96, + ), + as alloy_sol_types::SolType>::tokenize( + &self.tick, + ), + as alloy_sol_types::SolType>::tokenize( + &self.observationIndex, + ), + as alloy_sol_types::SolType>::tokenize( &self.observationCardinality, ), - as alloy_sol_types::SolType>::tokenize( + as alloy_sol_types::SolType>::tokenize( &self.observationCardinalityNext, ), - as alloy_sol_types::SolType>::tokenize(&self.feeProtocol), + as alloy_sol_types::SolType>::tokenize( + &self.feeProtocol, + ), ::tokenize( &self.unlocked, ), @@ -4474,10 +4391,8 @@ function slot0() external view returns (uint160 sqrtPriceX96, int24 tick, uint16 #[automatically_derived] impl alloy_sol_types::SolCall for slot0Call { type Parameters<'a> = (); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = slot0Return; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = ( alloy_sol_types::sol_data::Uint<160>, alloy_sol_types::sol_data::Int<24>, @@ -4487,48 +4402,48 @@ function slot0() external view returns (uint160 sqrtPriceX96, int24 tick, uint16 alloy_sol_types::sol_data::Uint<8>, alloy_sol_types::sol_data::Bool, ); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "slot0()"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [56u8, 80u8, 199u8, 189u8]; + const SIGNATURE: &'static str = "slot0()"; + #[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<'_> { slot0Return::_tokenize(ret) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) + 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) + 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(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `swap(address,bool,int256,uint160,bytes)` and selector `0x128acb08`. -```solidity -function swap(address recipient, bool zeroForOne, int256 amountSpecified, uint160 sqrtPriceLimitX96, bytes memory data) external returns (int256 amount0, int256 amount1); -```*/ + ```solidity + function swap(address recipient, bool zeroForOne, int256 amountSpecified, uint160 sqrtPriceLimitX96, bytes memory data) external returns (int256 amount0, int256 amount1); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct swapCall { @@ -4544,7 +4459,8 @@ function swap(address recipient, bool zeroForOne, int256 amountSpecified, uint16 pub data: alloy_sol_types::private::Bytes, } #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`swap(address,bool,int256,uint160,bytes)`](swapCall) function. + ///Container type for the return parameters of the + /// [`swap(address,bool,int256,uint160,bytes)`](swapCall) function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct swapReturn { @@ -4560,7 +4476,7 @@ function swap(address recipient, bool zeroForOne, int256 amountSpecified, uint16 clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -4581,9 +4497,7 @@ function swap(address recipient, bool zeroForOne, int256 amountSpecified, uint16 ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -4631,9 +4545,7 @@ function swap(address recipient, bool zeroForOne, int256 amountSpecified, uint16 ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -4659,16 +4571,14 @@ function swap(address recipient, bool zeroForOne, int256 amountSpecified, uint16 } } impl swapReturn { - fn _tokenize( - &self, - ) -> ::ReturnToken<'_> { + fn _tokenize(&self) -> ::ReturnToken<'_> { ( - as alloy_sol_types::SolType>::tokenize(&self.amount0), - as alloy_sol_types::SolType>::tokenize(&self.amount1), + as alloy_sol_types::SolType>::tokenize( + &self.amount0, + ), + as alloy_sol_types::SolType>::tokenize( + &self.amount1, + ), ) } } @@ -4681,25 +4591,24 @@ function swap(address recipient, bool zeroForOne, int256 amountSpecified, uint16 alloy_sol_types::sol_data::Uint<160>, alloy_sol_types::sol_data::Bytes, ); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = swapReturn; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = ( alloy_sol_types::sol_data::Int<256>, alloy_sol_types::sol_data::Int<256>, ); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "swap(address,bool,int256,uint160,bytes)"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [18u8, 138u8, 203u8, 8u8]; + const SIGNATURE: &'static str = "swap(address,bool,int256,uint160,bytes)"; + #[inline] fn new<'a>( tuple: as alloy_sol_types::SolType>::RustType, ) -> Self { tuple.into() } + #[inline] fn tokenize(&self) -> Self::Token<'_> { ( @@ -4709,49 +4618,49 @@ function swap(address recipient, bool zeroForOne, int256 amountSpecified, uint16 ::tokenize( &self.zeroForOne, ), - as alloy_sol_types::SolType>::tokenize(&self.amountSpecified), - as alloy_sol_types::SolType>::tokenize(&self.sqrtPriceLimitX96), + as alloy_sol_types::SolType>::tokenize( + &self.amountSpecified, + ), + as alloy_sol_types::SolType>::tokenize( + &self.sqrtPriceLimitX96, + ), ::tokenize( &self.data, ), ) } + #[inline] fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { swapReturn::_tokenize(ret) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) + 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) + 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(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `ticks(int24)` and selector `0xf30dba93`. -```solidity -function ticks(int24) external view returns (uint128 liquidityGross, int128 liquidityNet, uint256 feeGrowthOutside0X128, uint256 feeGrowthOutside1X128, int56 tickCumulativeOutside, uint160 secondsPerLiquidityOutsideX128, uint32 secondsOutside, bool initialized); -```*/ + ```solidity + function ticks(int24) external view returns (uint128 liquidityGross, int128 liquidityNet, uint256 feeGrowthOutside0X128, uint256 feeGrowthOutside1X128, int56 tickCumulativeOutside, uint160 secondsPerLiquidityOutsideX128, uint32 secondsOutside, bool initialized); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct ticksCall(pub alloy_sol_types::private::primitives::aliases::I24); #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`ticks(int24)`](ticksCall) function. + ///Container type for the return parameters of the + /// [`ticks(int24)`](ticksCall) function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct ticksReturn { @@ -4779,20 +4688,16 @@ function ticks(int24) external view returns (uint128 liquidityGross, int128 liqu clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] type UnderlyingSolTuple<'a> = (alloy_sol_types::sol_data::Int<24>,); #[doc(hidden)] - type UnderlyingRustTuple<'a> = ( - alloy_sol_types::private::primitives::aliases::I24, - ); + type UnderlyingRustTuple<'a> = (alloy_sol_types::private::primitives::aliases::I24,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -4840,9 +4745,7 @@ function ticks(int24) external view returns (uint128 liquidityGross, int128 liqu ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -4883,39 +4786,29 @@ function ticks(int24) external view returns (uint128 liquidityGross, int128 liqu } } impl ticksReturn { - fn _tokenize( - &self, - ) -> ::ReturnToken<'_> { + fn _tokenize(&self) -> ::ReturnToken<'_> { ( - as alloy_sol_types::SolType>::tokenize(&self.liquidityGross), - as alloy_sol_types::SolType>::tokenize(&self.liquidityNet), - as alloy_sol_types::SolType>::tokenize( + as alloy_sol_types::SolType>::tokenize( + &self.liquidityGross, + ), + as alloy_sol_types::SolType>::tokenize( + &self.liquidityNet, + ), + as alloy_sol_types::SolType>::tokenize( &self.feeGrowthOutside0X128, ), - as alloy_sol_types::SolType>::tokenize( + as alloy_sol_types::SolType>::tokenize( &self.feeGrowthOutside1X128, ), - as alloy_sol_types::SolType>::tokenize( + as alloy_sol_types::SolType>::tokenize( &self.tickCumulativeOutside, ), - as alloy_sol_types::SolType>::tokenize( + as alloy_sol_types::SolType>::tokenize( &self.secondsPerLiquidityOutsideX128, ), - as alloy_sol_types::SolType>::tokenize(&self.secondsOutside), + as alloy_sol_types::SolType>::tokenize( + &self.secondsOutside, + ), ::tokenize( &self.initialized, ), @@ -4925,10 +4818,8 @@ function ticks(int24) external view returns (uint128 liquidityGross, int128 liqu #[automatically_derived] impl alloy_sol_types::SolCall for ticksCall { type Parameters<'a> = (alloy_sol_types::sol_data::Int<24>,); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = ticksReturn; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = ( alloy_sol_types::sol_data::Uint<128>, alloy_sol_types::sol_data::Int<128>, @@ -4939,57 +4830,58 @@ function ticks(int24) external view returns (uint128 liquidityGross, int128 liqu alloy_sol_types::sol_data::Uint<32>, alloy_sol_types::sol_data::Bool, ); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "ticks(int24)"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [243u8, 13u8, 186u8, 147u8]; + const SIGNATURE: &'static str = "ticks(int24)"; + #[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), + as alloy_sol_types::SolType>::tokenize( + &self.0, + ), ) } + #[inline] fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { ticksReturn::_tokenize(ret) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) + 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) + 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(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `token0()` and selector `0x0dfe1681`. -```solidity -function token0() external view returns (address); -```*/ + ```solidity + function token0() external view returns (address); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct token0Call; #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`token0()`](token0Call) function. + ///Container type for the return parameters of the [`token0()`](token0Call) + /// function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct token0Return { @@ -5003,7 +4895,7 @@ function token0() external view returns (address); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -5012,9 +4904,7 @@ function token0() external view returns (address); type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -5044,9 +4934,7 @@ function token0() external view returns (address); type UnderlyingRustTuple<'a> = (alloy_sol_types::private::Address,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -5071,68 +4959,64 @@ function token0() external view returns (address); #[automatically_derived] impl alloy_sol_types::SolCall for token0Call { type Parameters<'a> = (); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = alloy_sol_types::private::Address; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (alloy_sol_types::sol_data::Address,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "token0()"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [13u8, 254u8, 22u8, 129u8]; + const SIGNATURE: &'static str = "token0()"; + #[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, - ), - ) + (::tokenize(ret),) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) - .map(|r| { + as alloy_sol_types::SolType>::abi_decode_sequence(data).map( + |r| { let r: token0Return = 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: token0Return = r.into(); - r._0 - }) + 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: token0Return = r.into(); + r._0 + }) } } }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `token1()` and selector `0xd21220a7`. -```solidity -function token1() external view returns (address); -```*/ + ```solidity + function token1() external view returns (address); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct token1Call; #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`token1()`](token1Call) function. + ///Container type for the return parameters of the [`token1()`](token1Call) + /// function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct token1Return { @@ -5146,7 +5030,7 @@ function token1() external view returns (address); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -5155,9 +5039,7 @@ function token1() external view returns (address); type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -5187,9 +5069,7 @@ function token1() external view returns (address); type UnderlyingRustTuple<'a> = (alloy_sol_types::private::Address,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -5214,61 +5094,55 @@ function token1() external view returns (address); #[automatically_derived] impl alloy_sol_types::SolCall for token1Call { type Parameters<'a> = (); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = alloy_sol_types::private::Address; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (alloy_sol_types::sol_data::Address,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "token1()"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [210u8, 18u8, 32u8, 167u8]; + const SIGNATURE: &'static str = "token1()"; + #[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, - ), - ) + (::tokenize(ret),) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) - .map(|r| { + as alloy_sol_types::SolType>::abi_decode_sequence(data).map( + |r| { let r: token1Return = 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: token1Return = r.into(); - r._0 - }) + 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: token1Return = r.into(); + r._0 + }) } } }; ///Container for all the [`UniswapV3Pool`](self) function calls. #[derive(Clone)] - #[derive()] pub enum UniswapV3PoolCalls { #[allow(missing_docs)] burn(burnCall), @@ -5308,8 +5182,9 @@ function token1() external view returns (address); impl UniswapV3PoolCalls { /// 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. + /// 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]] = &[ @@ -5331,26 +5206,6 @@ function token1() external view returns (address); [243u8, 13u8, 186u8, 147u8], [246u8, 55u8, 115u8, 29u8], ]; - /// The names of the variants in the same order as `SELECTORS`. - pub const VARIANT_NAMES: &'static [&'static str] = &[ - ::core::stringify!(token0), - ::core::stringify!(swap), - ::core::stringify!(liquidity), - ::core::stringify!(protocolFees), - ::core::stringify!(observations), - ::core::stringify!(slot0), - ::core::stringify!(mint), - ::core::stringify!(flash), - ::core::stringify!(collect), - ::core::stringify!(positions), - ::core::stringify!(observe), - ::core::stringify!(burn), - ::core::stringify!(factory), - ::core::stringify!(token1), - ::core::stringify!(fee), - ::core::stringify!(ticks), - ::core::stringify!(initialize), - ]; /// The signatures in the same order as `SELECTORS`. pub const SIGNATURES: &'static [&'static str] = &[ ::SIGNATURE, @@ -5371,6 +5226,27 @@ function token1() external view returns (address); ::SIGNATURE, ::SIGNATURE, ]; + /// The names of the variants in the same order as `SELECTORS`. + pub const VARIANT_NAMES: &'static [&'static str] = &[ + ::core::stringify!(token0), + ::core::stringify!(swap), + ::core::stringify!(liquidity), + ::core::stringify!(protocolFees), + ::core::stringify!(observations), + ::core::stringify!(slot0), + ::core::stringify!(mint), + ::core::stringify!(flash), + ::core::stringify!(collect), + ::core::stringify!(positions), + ::core::stringify!(observe), + ::core::stringify!(burn), + ::core::stringify!(factory), + ::core::stringify!(token1), + ::core::stringify!(fee), + ::core::stringify!(ticks), + ::core::stringify!(initialize), + ]; + /// Returns the signature for the given selector, if known. #[inline] pub fn signature_by_selector( @@ -5383,20 +5259,20 @@ function token1() external view returns (address); ::core::result::Result::Err(_) => ::core::option::Option::None, } } + /// Returns the enum variant name for the given selector, if known. #[inline] - pub fn name_by_selector( - selector: [u8; 4usize], - ) -> ::core::option::Option<&'static str> { + pub fn name_by_selector(selector: [u8; 4usize]) -> ::core::option::Option<&'static str> { let sig = Self::signature_by_selector(selector)?; sig.split_once('(').map(|(name, _)| name) } } #[automatically_derived] impl alloy_sol_types::SolInterface for UniswapV3PoolCalls { - const NAME: &'static str = "UniswapV3PoolCalls"; - const MIN_DATA_LENGTH: usize = 0usize; const COUNT: usize = 17usize; + const MIN_DATA_LENGTH: usize = 0usize; + const NAME: &'static str = "UniswapV3PoolCalls"; + #[inline] fn selector(&self) -> [u8; 4] { match self { @@ -5405,23 +5281,13 @@ function token1() external view returns (address); Self::factory(_) => ::SELECTOR, Self::fee(_) => ::SELECTOR, Self::flash(_) => ::SELECTOR, - Self::initialize(_) => { - ::SELECTOR - } - Self::liquidity(_) => { - ::SELECTOR - } + Self::initialize(_) => ::SELECTOR, + Self::liquidity(_) => ::SELECTOR, Self::mint(_) => ::SELECTOR, - Self::observations(_) => { - ::SELECTOR - } + Self::observations(_) => ::SELECTOR, Self::observe(_) => ::SELECTOR, - Self::positions(_) => { - ::SELECTOR - } - Self::protocolFees(_) => { - ::SELECTOR - } + Self::positions(_) => ::SELECTOR, + Self::protocolFees(_) => ::SELECTOR, Self::slot0(_) => ::SELECTOR, Self::swap(_) => ::SELECTOR, Self::ticks(_) => ::SELECTOR, @@ -5429,27 +5295,23 @@ function token1() external view returns (address); Self::token1(_) => ::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 abi_decode_raw(selector: [u8; 4], data: &[u8]) -> alloy_sol_types::Result { + static DECODE_SHIMS: &[fn(&[u8]) -> alloy_sol_types::Result] = &[ { - fn token0( - data: &[u8], - ) -> alloy_sol_types::Result { + fn token0(data: &[u8]) -> alloy_sol_types::Result { ::abi_decode_raw(data) .map(UniswapV3PoolCalls::token0) } @@ -5463,40 +5325,28 @@ function token1() external view returns (address); swap }, { - fn liquidity( - data: &[u8], - ) -> alloy_sol_types::Result { + fn liquidity(data: &[u8]) -> alloy_sol_types::Result { ::abi_decode_raw(data) .map(UniswapV3PoolCalls::liquidity) } liquidity }, { - fn protocolFees( - data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, - ) + fn protocolFees(data: &[u8]) -> alloy_sol_types::Result { + ::abi_decode_raw(data) .map(UniswapV3PoolCalls::protocolFees) } protocolFees }, { - fn observations( - data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, - ) + fn observations(data: &[u8]) -> alloy_sol_types::Result { + ::abi_decode_raw(data) .map(UniswapV3PoolCalls::observations) } observations }, { - fn slot0( - data: &[u8], - ) -> alloy_sol_types::Result { + fn slot0(data: &[u8]) -> alloy_sol_types::Result { ::abi_decode_raw(data) .map(UniswapV3PoolCalls::slot0) } @@ -5510,36 +5360,28 @@ function token1() external view returns (address); mint }, { - fn flash( - data: &[u8], - ) -> alloy_sol_types::Result { + fn flash(data: &[u8]) -> alloy_sol_types::Result { ::abi_decode_raw(data) .map(UniswapV3PoolCalls::flash) } flash }, { - fn collect( - data: &[u8], - ) -> alloy_sol_types::Result { + fn collect(data: &[u8]) -> alloy_sol_types::Result { ::abi_decode_raw(data) .map(UniswapV3PoolCalls::collect) } collect }, { - fn positions( - data: &[u8], - ) -> alloy_sol_types::Result { + fn positions(data: &[u8]) -> alloy_sol_types::Result { ::abi_decode_raw(data) .map(UniswapV3PoolCalls::positions) } positions }, { - fn observe( - data: &[u8], - ) -> alloy_sol_types::Result { + fn observe(data: &[u8]) -> alloy_sol_types::Result { ::abi_decode_raw(data) .map(UniswapV3PoolCalls::observe) } @@ -5553,18 +5395,14 @@ function token1() external view returns (address); burn }, { - fn factory( - data: &[u8], - ) -> alloy_sol_types::Result { + fn factory(data: &[u8]) -> alloy_sol_types::Result { ::abi_decode_raw(data) .map(UniswapV3PoolCalls::factory) } factory }, { - fn token1( - data: &[u8], - ) -> alloy_sol_types::Result { + fn token1(data: &[u8]) -> alloy_sol_types::Result { ::abi_decode_raw(data) .map(UniswapV3PoolCalls::token1) } @@ -5578,36 +5416,29 @@ function token1() external view returns (address); fee }, { - fn ticks( - data: &[u8], - ) -> alloy_sol_types::Result { + fn ticks(data: &[u8]) -> alloy_sol_types::Result { ::abi_decode_raw(data) .map(UniswapV3PoolCalls::ticks) } ticks }, { - fn initialize( - data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, - ) + fn initialize(data: &[u8]) -> alloy_sol_types::Result { + ::abi_decode_raw(data) .map(UniswapV3PoolCalls::initialize) } initialize }, ]; let Ok(idx) = Self::SELECTORS.binary_search(&selector) else { - return Err( - alloy_sol_types::Error::unknown_selector( - ::NAME, - selector, - ), - ); + return Err(alloy_sol_types::Error::unknown_selector( + ::NAME, + selector, + )); }; DECODE_SHIMS[idx](data) } + #[inline] #[allow(non_snake_case)] fn abi_decode_raw_validate( @@ -5616,197 +5447,141 @@ function token1() external view returns (address); ) -> alloy_sol_types::Result { static DECODE_VALIDATE_SHIMS: &[fn( &[u8], - ) -> alloy_sol_types::Result] = &[ + ) + -> alloy_sol_types::Result] = &[ { - fn token0( - data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) + fn token0(data: &[u8]) -> alloy_sol_types::Result { + ::abi_decode_raw_validate(data) .map(UniswapV3PoolCalls::token0) } token0 }, { fn swap(data: &[u8]) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) + ::abi_decode_raw_validate(data) .map(UniswapV3PoolCalls::swap) } swap }, { - fn liquidity( - data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) + fn liquidity(data: &[u8]) -> alloy_sol_types::Result { + ::abi_decode_raw_validate(data) .map(UniswapV3PoolCalls::liquidity) } liquidity }, { - fn protocolFees( - data: &[u8], - ) -> alloy_sol_types::Result { + fn protocolFees(data: &[u8]) -> alloy_sol_types::Result { ::abi_decode_raw_validate( - data, - ) - .map(UniswapV3PoolCalls::protocolFees) + data, + ) + .map(UniswapV3PoolCalls::protocolFees) } protocolFees }, { - fn observations( - data: &[u8], - ) -> alloy_sol_types::Result { + fn observations(data: &[u8]) -> alloy_sol_types::Result { ::abi_decode_raw_validate( - data, - ) - .map(UniswapV3PoolCalls::observations) + data, + ) + .map(UniswapV3PoolCalls::observations) } observations }, { - fn slot0( - data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) + fn slot0(data: &[u8]) -> alloy_sol_types::Result { + ::abi_decode_raw_validate(data) .map(UniswapV3PoolCalls::slot0) } slot0 }, { fn mint(data: &[u8]) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) + ::abi_decode_raw_validate(data) .map(UniswapV3PoolCalls::mint) } mint }, { - fn flash( - data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) + fn flash(data: &[u8]) -> alloy_sol_types::Result { + ::abi_decode_raw_validate(data) .map(UniswapV3PoolCalls::flash) } flash }, { - fn collect( - data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) + fn collect(data: &[u8]) -> alloy_sol_types::Result { + ::abi_decode_raw_validate(data) .map(UniswapV3PoolCalls::collect) } collect }, { - fn positions( - data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) + fn positions(data: &[u8]) -> alloy_sol_types::Result { + ::abi_decode_raw_validate(data) .map(UniswapV3PoolCalls::positions) } positions }, { - fn observe( - data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) + fn observe(data: &[u8]) -> alloy_sol_types::Result { + ::abi_decode_raw_validate(data) .map(UniswapV3PoolCalls::observe) } observe }, { fn burn(data: &[u8]) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) + ::abi_decode_raw_validate(data) .map(UniswapV3PoolCalls::burn) } burn }, { - fn factory( - data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) + fn factory(data: &[u8]) -> alloy_sol_types::Result { + ::abi_decode_raw_validate(data) .map(UniswapV3PoolCalls::factory) } factory }, { - fn token1( - data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) + fn token1(data: &[u8]) -> alloy_sol_types::Result { + ::abi_decode_raw_validate(data) .map(UniswapV3PoolCalls::token1) } token1 }, { fn fee(data: &[u8]) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) + ::abi_decode_raw_validate(data) .map(UniswapV3PoolCalls::fee) } fee }, { - fn ticks( - data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) + fn ticks(data: &[u8]) -> alloy_sol_types::Result { + ::abi_decode_raw_validate(data) .map(UniswapV3PoolCalls::ticks) } ticks }, { - fn initialize( - data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) + fn initialize(data: &[u8]) -> alloy_sol_types::Result { + ::abi_decode_raw_validate(data) .map(UniswapV3PoolCalls::initialize) } initialize }, ]; let Ok(idx) = Self::SELECTORS.binary_search(&selector) else { - return Err( - alloy_sol_types::Error::unknown_selector( - ::NAME, - selector, - ), - ); + return Err(alloy_sol_types::Error::unknown_selector( + ::NAME, + selector, + )); }; DECODE_VALIDATE_SHIMS[idx](data) } + #[inline] fn abi_encoded_size(&self) -> usize { match self { @@ -5819,9 +5594,7 @@ function token1() external view returns (address); Self::factory(inner) => { ::abi_encoded_size(inner) } - Self::fee(inner) => { - ::abi_encoded_size(inner) - } + Self::fee(inner) => ::abi_encoded_size(inner), Self::flash(inner) => { ::abi_encoded_size(inner) } @@ -5835,9 +5608,7 @@ function token1() external view returns (address); ::abi_encoded_size(inner) } Self::observations(inner) => { - ::abi_encoded_size( - inner, - ) + ::abi_encoded_size(inner) } Self::observe(inner) => { ::abi_encoded_size(inner) @@ -5846,9 +5617,7 @@ function token1() external view returns (address); ::abi_encoded_size(inner) } Self::protocolFees(inner) => { - ::abi_encoded_size( - inner, - ) + ::abi_encoded_size(inner) } Self::slot0(inner) => { ::abi_encoded_size(inner) @@ -5867,6 +5636,7 @@ function token1() external view returns (address); } } } + #[inline] fn abi_encode_raw(&self, out: &mut alloy_sol_types::private::Vec) { match self { @@ -5886,40 +5656,25 @@ function token1() external view returns (address); ::abi_encode_raw(inner, out) } Self::initialize(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } Self::liquidity(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } Self::mint(inner) => { ::abi_encode_raw(inner, out) } Self::observations(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } Self::observe(inner) => { ::abi_encode_raw(inner, out) } Self::positions(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } Self::protocolFees(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } Self::slot0(inner) => { ::abi_encode_raw(inner, out) @@ -5940,8 +5695,7 @@ function token1() external view returns (address); } } ///Container for all the [`UniswapV3Pool`](self) events. - #[derive(Clone)] - #[derive(Debug, PartialEq, Eq, Hash)] + #[derive(Clone, Debug, PartialEq, Eq, Hash)] pub enum UniswapV3PoolEvents { #[allow(missing_docs)] Burn(Burn), @@ -5965,69 +5719,58 @@ function token1() external view returns (address); impl UniswapV3PoolEvents { /// 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. + /// 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]] = &[ [ - 12u8, 57u8, 108u8, 217u8, 137u8, 163u8, 159u8, 68u8, 89u8, 181u8, 250u8, - 26u8, 237u8, 106u8, 154u8, 141u8, 205u8, 188u8, 69u8, 144u8, 138u8, - 207u8, 214u8, 126u8, 2u8, 140u8, 213u8, 104u8, 218u8, 152u8, 152u8, 44u8, + 12u8, 57u8, 108u8, 217u8, 137u8, 163u8, 159u8, 68u8, 89u8, 181u8, 250u8, 26u8, + 237u8, 106u8, 154u8, 141u8, 205u8, 188u8, 69u8, 144u8, 138u8, 207u8, 214u8, 126u8, + 2u8, 140u8, 213u8, 104u8, 218u8, 152u8, 152u8, 44u8, ], [ - 89u8, 107u8, 87u8, 57u8, 6u8, 33u8, 141u8, 52u8, 17u8, 133u8, 11u8, 38u8, - 166u8, 180u8, 55u8, 214u8, 196u8, 82u8, 47u8, 219u8, 67u8, 210u8, 210u8, - 56u8, 98u8, 99u8, 248u8, 109u8, 80u8, 184u8, 177u8, 81u8, + 89u8, 107u8, 87u8, 57u8, 6u8, 33u8, 141u8, 52u8, 17u8, 133u8, 11u8, 38u8, 166u8, + 180u8, 55u8, 214u8, 196u8, 82u8, 47u8, 219u8, 67u8, 210u8, 210u8, 56u8, 98u8, 99u8, + 248u8, 109u8, 80u8, 184u8, 177u8, 81u8, ], [ - 112u8, 147u8, 83u8, 56u8, 230u8, 151u8, 117u8, 69u8, 106u8, 133u8, 221u8, - 239u8, 34u8, 108u8, 57u8, 95u8, 182u8, 104u8, 182u8, 63u8, 160u8, 17u8, - 95u8, 95u8, 32u8, 97u8, 11u8, 56u8, 142u8, 108u8, 169u8, 192u8, + 112u8, 147u8, 83u8, 56u8, 230u8, 151u8, 117u8, 69u8, 106u8, 133u8, 221u8, 239u8, + 34u8, 108u8, 57u8, 95u8, 182u8, 104u8, 182u8, 63u8, 160u8, 17u8, 95u8, 95u8, 32u8, + 97u8, 11u8, 56u8, 142u8, 108u8, 169u8, 192u8, ], [ - 122u8, 83u8, 8u8, 11u8, 164u8, 20u8, 21u8, 139u8, 231u8, 236u8, 105u8, - 185u8, 135u8, 181u8, 251u8, 125u8, 7u8, 222u8, 225u8, 1u8, 254u8, 133u8, - 72u8, 143u8, 8u8, 83u8, 174u8, 22u8, 35u8, 157u8, 11u8, 222u8, + 122u8, 83u8, 8u8, 11u8, 164u8, 20u8, 21u8, 139u8, 231u8, 236u8, 105u8, 185u8, + 135u8, 181u8, 251u8, 125u8, 7u8, 222u8, 225u8, 1u8, 254u8, 133u8, 72u8, 143u8, 8u8, + 83u8, 174u8, 22u8, 35u8, 157u8, 11u8, 222u8, ], [ - 151u8, 61u8, 141u8, 146u8, 187u8, 41u8, 159u8, 74u8, 246u8, 206u8, 73u8, - 181u8, 42u8, 138u8, 219u8, 133u8, 174u8, 70u8, 185u8, 242u8, 20u8, 196u8, - 196u8, 252u8, 6u8, 172u8, 119u8, 64u8, 18u8, 55u8, 177u8, 51u8, + 151u8, 61u8, 141u8, 146u8, 187u8, 41u8, 159u8, 74u8, 246u8, 206u8, 73u8, 181u8, + 42u8, 138u8, 219u8, 133u8, 174u8, 70u8, 185u8, 242u8, 20u8, 196u8, 196u8, 252u8, + 6u8, 172u8, 119u8, 64u8, 18u8, 55u8, 177u8, 51u8, ], [ - 152u8, 99u8, 96u8, 54u8, 203u8, 102u8, 169u8, 193u8, 154u8, 55u8, 67u8, - 94u8, 252u8, 30u8, 144u8, 20u8, 33u8, 144u8, 33u8, 78u8, 138u8, 190u8, - 184u8, 33u8, 189u8, 186u8, 63u8, 41u8, 144u8, 221u8, 76u8, 149u8, + 152u8, 99u8, 96u8, 54u8, 203u8, 102u8, 169u8, 193u8, 154u8, 55u8, 67u8, 94u8, + 252u8, 30u8, 144u8, 20u8, 33u8, 144u8, 33u8, 78u8, 138u8, 190u8, 184u8, 33u8, + 189u8, 186u8, 63u8, 41u8, 144u8, 221u8, 76u8, 149u8, ], [ - 172u8, 73u8, 229u8, 24u8, 249u8, 10u8, 53u8, 143u8, 101u8, 46u8, 68u8, - 0u8, 22u8, 79u8, 5u8, 165u8, 216u8, 247u8, 227u8, 94u8, 119u8, 71u8, - 39u8, 155u8, 195u8, 169u8, 61u8, 191u8, 88u8, 78u8, 18u8, 90u8, + 172u8, 73u8, 229u8, 24u8, 249u8, 10u8, 53u8, 143u8, 101u8, 46u8, 68u8, 0u8, 22u8, + 79u8, 5u8, 165u8, 216u8, 247u8, 227u8, 94u8, 119u8, 71u8, 39u8, 155u8, 195u8, + 169u8, 61u8, 191u8, 88u8, 78u8, 18u8, 90u8, ], [ - 189u8, 189u8, 183u8, 29u8, 120u8, 96u8, 55u8, 107u8, 165u8, 43u8, 37u8, - 165u8, 2u8, 139u8, 238u8, 162u8, 53u8, 129u8, 54u8, 74u8, 64u8, 82u8, - 47u8, 107u8, 207u8, 184u8, 107u8, 177u8, 242u8, 220u8, 166u8, 51u8, + 189u8, 189u8, 183u8, 29u8, 120u8, 96u8, 55u8, 107u8, 165u8, 43u8, 37u8, 165u8, 2u8, + 139u8, 238u8, 162u8, 53u8, 129u8, 54u8, 74u8, 64u8, 82u8, 47u8, 107u8, 207u8, + 184u8, 107u8, 177u8, 242u8, 220u8, 166u8, 51u8, ], [ - 196u8, 32u8, 121u8, 249u8, 74u8, 99u8, 80u8, 215u8, 230u8, 35u8, 95u8, - 41u8, 23u8, 73u8, 36u8, 249u8, 40u8, 204u8, 42u8, 200u8, 24u8, 235u8, - 100u8, 254u8, 216u8, 0u8, 78u8, 17u8, 95u8, 188u8, 202u8, 103u8, + 196u8, 32u8, 121u8, 249u8, 74u8, 99u8, 80u8, 215u8, 230u8, 35u8, 95u8, 41u8, 23u8, + 73u8, 36u8, 249u8, 40u8, 204u8, 42u8, 200u8, 24u8, 235u8, 100u8, 254u8, 216u8, 0u8, + 78u8, 17u8, 95u8, 188u8, 202u8, 103u8, ], ]; - /// The names of the variants in the same order as `SELECTORS`. - pub const VARIANT_NAMES: &'static [&'static str] = &[ - ::core::stringify!(Burn), - ::core::stringify!(CollectProtocol), - ::core::stringify!(Collect), - ::core::stringify!(Mint), - ::core::stringify!(SetFeeProtocol), - ::core::stringify!(Initialize), - ::core::stringify!(IncreaseObservationCardinalityNext), - ::core::stringify!(Flash), - ::core::stringify!(Swap), - ]; /// The signatures in the same order as `SELECTORS`. pub const SIGNATURES: &'static [&'static str] = &[ ::SIGNATURE, @@ -6040,6 +5783,19 @@ function token1() external view returns (address); ::SIGNATURE, ::SIGNATURE, ]; + /// The names of the variants in the same order as `SELECTORS`. + pub const VARIANT_NAMES: &'static [&'static str] = &[ + ::core::stringify!(Burn), + ::core::stringify!(CollectProtocol), + ::core::stringify!(Collect), + ::core::stringify!(Mint), + ::core::stringify!(SetFeeProtocol), + ::core::stringify!(Initialize), + ::core::stringify!(IncreaseObservationCardinalityNext), + ::core::stringify!(Flash), + ::core::stringify!(Swap), + ]; + /// Returns the signature for the given selector, if known. #[inline] pub fn signature_by_selector( @@ -6052,19 +5808,19 @@ function token1() external view returns (address); ::core::result::Result::Err(_) => ::core::option::Option::None, } } + /// Returns the enum variant name for the given selector, if known. #[inline] - pub fn name_by_selector( - selector: [u8; 32usize], - ) -> ::core::option::Option<&'static str> { + pub fn name_by_selector(selector: [u8; 32usize]) -> ::core::option::Option<&'static str> { let sig = Self::signature_by_selector(selector)?; sig.split_once('(').map(|(name, _)| name) } } #[automatically_derived] impl alloy_sol_types::SolEventInterface for UniswapV3PoolEvents { - const NAME: &'static str = "UniswapV3PoolEvents"; const COUNT: usize = 9usize; + const NAME: &'static str = "UniswapV3PoolEvents"; + fn decode_raw_log( topics: &[alloy_sol_types::Word], data: &[u8], @@ -6138,71 +5894,52 @@ function token1() external view returns (address); impl alloy_sol_types::private::IntoLogData for UniswapV3PoolEvents { fn to_log_data(&self) -> alloy_sol_types::private::LogData { match self { - Self::Burn(inner) => { - alloy_sol_types::private::IntoLogData::to_log_data(inner) - } - Self::Collect(inner) => { - alloy_sol_types::private::IntoLogData::to_log_data(inner) - } + Self::Burn(inner) => alloy_sol_types::private::IntoLogData::to_log_data(inner), + Self::Collect(inner) => alloy_sol_types::private::IntoLogData::to_log_data(inner), Self::CollectProtocol(inner) => { alloy_sol_types::private::IntoLogData::to_log_data(inner) } - Self::Flash(inner) => { - alloy_sol_types::private::IntoLogData::to_log_data(inner) - } + Self::Flash(inner) => alloy_sol_types::private::IntoLogData::to_log_data(inner), Self::IncreaseObservationCardinalityNext(inner) => { alloy_sol_types::private::IntoLogData::to_log_data(inner) } Self::Initialize(inner) => { alloy_sol_types::private::IntoLogData::to_log_data(inner) } - Self::Mint(inner) => { - alloy_sol_types::private::IntoLogData::to_log_data(inner) - } + Self::Mint(inner) => alloy_sol_types::private::IntoLogData::to_log_data(inner), Self::SetFeeProtocol(inner) => { alloy_sol_types::private::IntoLogData::to_log_data(inner) } - Self::Swap(inner) => { - alloy_sol_types::private::IntoLogData::to_log_data(inner) - } + Self::Swap(inner) => alloy_sol_types::private::IntoLogData::to_log_data(inner), } } + fn into_log_data(self) -> alloy_sol_types::private::LogData { match self { - Self::Burn(inner) => { - alloy_sol_types::private::IntoLogData::into_log_data(inner) - } - Self::Collect(inner) => { - alloy_sol_types::private::IntoLogData::into_log_data(inner) - } + Self::Burn(inner) => alloy_sol_types::private::IntoLogData::into_log_data(inner), + Self::Collect(inner) => alloy_sol_types::private::IntoLogData::into_log_data(inner), Self::CollectProtocol(inner) => { alloy_sol_types::private::IntoLogData::into_log_data(inner) } - Self::Flash(inner) => { - alloy_sol_types::private::IntoLogData::into_log_data(inner) - } + Self::Flash(inner) => alloy_sol_types::private::IntoLogData::into_log_data(inner), Self::IncreaseObservationCardinalityNext(inner) => { alloy_sol_types::private::IntoLogData::into_log_data(inner) } Self::Initialize(inner) => { alloy_sol_types::private::IntoLogData::into_log_data(inner) } - Self::Mint(inner) => { - alloy_sol_types::private::IntoLogData::into_log_data(inner) - } + Self::Mint(inner) => alloy_sol_types::private::IntoLogData::into_log_data(inner), Self::SetFeeProtocol(inner) => { alloy_sol_types::private::IntoLogData::into_log_data(inner) } - Self::Swap(inner) => { - alloy_sol_types::private::IntoLogData::into_log_data(inner) - } + Self::Swap(inner) => alloy_sol_types::private::IntoLogData::into_log_data(inner), } } } - use alloy_contract as alloy_contract; + use alloy_contract; /**Creates a new wrapper around an on-chain [`UniswapV3Pool`](self) contract instance. -See the [wrapper's documentation](`UniswapV3PoolInstance`) for more details.*/ + See the [wrapper's documentation](`UniswapV3PoolInstance`) for more details.*/ #[inline] pub const fn new< P: alloy_contract::private::Provider, @@ -6215,15 +5952,15 @@ See the [wrapper's documentation](`UniswapV3PoolInstance`) for more details.*/ } /**A [`UniswapV3Pool`](self) instance. -Contains type-safe methods for interacting with an on-chain instance of the -[`UniswapV3Pool`](self) contract located at a given `address`, using a given -provider `P`. + Contains type-safe methods for interacting with an on-chain instance of the + [`UniswapV3Pool`](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. + 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.*/ + See the [module-level documentation](self) for all the available methods.*/ #[derive(Clone)] pub struct UniswapV3PoolInstance { address: alloy_sol_types::private::Address, @@ -6234,43 +5971,45 @@ See the [module-level documentation](self) for all the available methods.*/ impl ::core::fmt::Debug for UniswapV3PoolInstance { #[inline] fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { - f.debug_tuple("UniswapV3PoolInstance").field(&self.address).finish() + f.debug_tuple("UniswapV3PoolInstance") + .field(&self.address) + .finish() } } /// Instantiation and getters/setters. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > UniswapV3PoolInstance { + impl, N: alloy_contract::private::Network> + UniswapV3PoolInstance + { /**Creates a new wrapper around an on-chain [`UniswapV3Pool`](self) contract instance. -See the [wrapper's documentation](`UniswapV3PoolInstance`) for more details.*/ + See the [wrapper's documentation](`UniswapV3PoolInstance`) for more details.*/ #[inline] - pub const fn new( - address: alloy_sol_types::private::Address, - __provider: P, - ) -> Self { + pub const fn new(address: alloy_sol_types::private::Address, __provider: P) -> Self { Self { address, provider: __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 { @@ -6278,7 +6017,8 @@ See the [wrapper's documentation](`UniswapV3PoolInstance`) for more details.*/ } } impl UniswapV3PoolInstance<&P, N> { - /// Clones the provider and returns a new instance with the cloned provider. + /// Clones the provider and returns a new instance with the cloned + /// provider. #[inline] pub fn with_cloned_provider(self) -> UniswapV3PoolInstance { UniswapV3PoolInstance { @@ -6289,20 +6029,22 @@ See the [wrapper's documentation](`UniswapV3PoolInstance`) for more details.*/ } } /// Function calls. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > UniswapV3PoolInstance { - /// Creates a new call builder using this contract instance's provider and address. + impl, N: alloy_contract::private::Network> + UniswapV3PoolInstance + { + /// 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. + /// 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 [`burn`] function. pub fn burn( &self, @@ -6310,14 +6052,13 @@ See the [wrapper's documentation](`UniswapV3PoolInstance`) for more details.*/ tickUpper: alloy_sol_types::private::primitives::aliases::I24, amount: u128, ) -> alloy_contract::SolCallBuilder<&P, burnCall, N> { - self.call_builder( - &burnCall { - tickLower, - tickUpper, - amount, - }, - ) + self.call_builder(&burnCall { + tickLower, + tickUpper, + amount, + }) } + ///Creates a new call builder for the [`collect`] function. pub fn collect( &self, @@ -6327,24 +6068,25 @@ See the [wrapper's documentation](`UniswapV3PoolInstance`) for more details.*/ amount0Requested: u128, amount1Requested: u128, ) -> alloy_contract::SolCallBuilder<&P, collectCall, N> { - self.call_builder( - &collectCall { - recipient, - tickLower, - tickUpper, - amount0Requested, - amount1Requested, - }, - ) + self.call_builder(&collectCall { + recipient, + tickLower, + tickUpper, + amount0Requested, + amount1Requested, + }) } + ///Creates a new call builder for the [`factory`] function. pub fn factory(&self) -> alloy_contract::SolCallBuilder<&P, factoryCall, N> { self.call_builder(&factoryCall) } + ///Creates a new call builder for the [`fee`] function. pub fn fee(&self) -> alloy_contract::SolCallBuilder<&P, feeCall, N> { self.call_builder(&feeCall) } + ///Creates a new call builder for the [`flash`] function. pub fn flash( &self, @@ -6353,15 +6095,14 @@ See the [wrapper's documentation](`UniswapV3PoolInstance`) for more details.*/ amount1: alloy_sol_types::private::primitives::aliases::U256, data: alloy_sol_types::private::Bytes, ) -> alloy_contract::SolCallBuilder<&P, flashCall, N> { - self.call_builder( - &flashCall { - recipient, - amount0, - amount1, - data, - }, - ) + self.call_builder(&flashCall { + recipient, + amount0, + amount1, + data, + }) } + ///Creates a new call builder for the [`initialize`] function. pub fn initialize( &self, @@ -6369,10 +6110,12 @@ See the [wrapper's documentation](`UniswapV3PoolInstance`) for more details.*/ ) -> alloy_contract::SolCallBuilder<&P, initializeCall, N> { self.call_builder(&initializeCall { sqrtPriceX96 }) } + ///Creates a new call builder for the [`liquidity`] function. pub fn liquidity(&self) -> alloy_contract::SolCallBuilder<&P, liquidityCall, N> { self.call_builder(&liquidityCall) } + ///Creates a new call builder for the [`mint`] function. pub fn mint( &self, @@ -6382,16 +6125,15 @@ See the [wrapper's documentation](`UniswapV3PoolInstance`) for more details.*/ amount: u128, data: alloy_sol_types::private::Bytes, ) -> alloy_contract::SolCallBuilder<&P, mintCall, N> { - self.call_builder( - &mintCall { - recipient, - tickLower, - tickUpper, - amount, - data, - }, - ) + self.call_builder(&mintCall { + recipient, + tickLower, + tickUpper, + amount, + data, + }) } + ///Creates a new call builder for the [`observations`] function. pub fn observations( &self, @@ -6399,6 +6141,7 @@ See the [wrapper's documentation](`UniswapV3PoolInstance`) for more details.*/ ) -> alloy_contract::SolCallBuilder<&P, observationsCall, N> { self.call_builder(&observationsCall(_0)) } + ///Creates a new call builder for the [`observe`] function. pub fn observe( &self, @@ -6406,6 +6149,7 @@ See the [wrapper's documentation](`UniswapV3PoolInstance`) for more details.*/ ) -> alloy_contract::SolCallBuilder<&P, observeCall, N> { self.call_builder(&observeCall { secondsAgos }) } + ///Creates a new call builder for the [`positions`] function. pub fn positions( &self, @@ -6413,16 +6157,17 @@ See the [wrapper's documentation](`UniswapV3PoolInstance`) for more details.*/ ) -> alloy_contract::SolCallBuilder<&P, positionsCall, N> { self.call_builder(&positionsCall(_0)) } + ///Creates a new call builder for the [`protocolFees`] function. - pub fn protocolFees( - &self, - ) -> alloy_contract::SolCallBuilder<&P, protocolFeesCall, N> { + pub fn protocolFees(&self) -> alloy_contract::SolCallBuilder<&P, protocolFeesCall, N> { self.call_builder(&protocolFeesCall) } + ///Creates a new call builder for the [`slot0`] function. pub fn slot0(&self) -> alloy_contract::SolCallBuilder<&P, slot0Call, N> { self.call_builder(&slot0Call) } + ///Creates a new call builder for the [`swap`] function. pub fn swap( &self, @@ -6432,16 +6177,15 @@ See the [wrapper's documentation](`UniswapV3PoolInstance`) for more details.*/ sqrtPriceLimitX96: alloy_sol_types::private::primitives::aliases::U160, data: alloy_sol_types::private::Bytes, ) -> alloy_contract::SolCallBuilder<&P, swapCall, N> { - self.call_builder( - &swapCall { - recipient, - zeroForOne, - amountSpecified, - sqrtPriceLimitX96, - data, - }, - ) + self.call_builder(&swapCall { + recipient, + zeroForOne, + amountSpecified, + sqrtPriceLimitX96, + data, + }) } + ///Creates a new call builder for the [`ticks`] function. pub fn ticks( &self, @@ -6449,67 +6193,76 @@ See the [wrapper's documentation](`UniswapV3PoolInstance`) for more details.*/ ) -> alloy_contract::SolCallBuilder<&P, ticksCall, N> { self.call_builder(&ticksCall(_0)) } + ///Creates a new call builder for the [`token0`] function. pub fn token0(&self) -> alloy_contract::SolCallBuilder<&P, token0Call, N> { self.call_builder(&token0Call) } + ///Creates a new call builder for the [`token1`] function. pub fn token1(&self) -> alloy_contract::SolCallBuilder<&P, token1Call, N> { self.call_builder(&token1Call) } } /// Event filters. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > UniswapV3PoolInstance { - /// Creates a new event filter using this contract instance's provider and address. + impl, N: alloy_contract::private::Network> + UniswapV3PoolInstance + { + /// 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. + /// 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 [`Burn`] event. pub fn Burn_filter(&self) -> alloy_contract::Event<&P, Burn, N> { self.event_filter::() } + ///Creates a new event filter for the [`Collect`] event. pub fn Collect_filter(&self) -> alloy_contract::Event<&P, Collect, N> { self.event_filter::() } + ///Creates a new event filter for the [`CollectProtocol`] event. - pub fn CollectProtocol_filter( - &self, - ) -> alloy_contract::Event<&P, CollectProtocol, N> { + pub fn CollectProtocol_filter(&self) -> alloy_contract::Event<&P, CollectProtocol, N> { self.event_filter::() } + ///Creates a new event filter for the [`Flash`] event. pub fn Flash_filter(&self) -> alloy_contract::Event<&P, Flash, N> { self.event_filter::() } - ///Creates a new event filter for the [`IncreaseObservationCardinalityNext`] event. + + ///Creates a new event filter for the + /// [`IncreaseObservationCardinalityNext`] event. pub fn IncreaseObservationCardinalityNext_filter( &self, ) -> alloy_contract::Event<&P, IncreaseObservationCardinalityNext, N> { self.event_filter::() } + ///Creates a new event filter for the [`Initialize`] event. pub fn Initialize_filter(&self) -> alloy_contract::Event<&P, Initialize, N> { self.event_filter::() } + ///Creates a new event filter for the [`Mint`] event. pub fn Mint_filter(&self) -> alloy_contract::Event<&P, Mint, N> { self.event_filter::() } + ///Creates a new event filter for the [`SetFeeProtocol`] event. - pub fn SetFeeProtocol_filter( - &self, - ) -> alloy_contract::Event<&P, SetFeeProtocol, N> { + pub fn SetFeeProtocol_filter(&self) -> alloy_contract::Event<&P, SetFeeProtocol, N> { self.event_filter::() } + ///Creates a new event filter for the [`Swap`] event. pub fn Swap_filter(&self) -> alloy_contract::Event<&P, Swap, N> { self.event_filter::() diff --git a/contracts/generated/contracts-generated/uniswapv3quoterv2/src/lib.rs b/contracts/generated/contracts-generated/uniswapv3quoterv2/src/lib.rs index 3294ea6ae1..79d6ecd088 100644 --- a/contracts/generated/contracts-generated/uniswapv3quoterv2/src/lib.rs +++ b/contracts/generated/contracts-generated/uniswapv3quoterv2/src/lib.rs @@ -1,4 +1,10 @@ -#![allow(unused_imports, unused_attributes, clippy::all, rustdoc::all, non_snake_case)] +#![allow( + unused_imports, + unused_attributes, + clippy::all, + rustdoc::all, + non_snake_case +)] //! Auto-generated contract bindings. Do not edit. ///Module containing a contract's types and functions. /** @@ -17,12 +23,11 @@ library IQuoterV2 { clippy::empty_structs_with_brackets )] pub mod IQuoterV2 { - use super::*; - use alloy_sol_types as alloy_sol_types; + use {super::*, alloy_sol_types}; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**```solidity -struct QuoteExactInputSingleParams { address tokenIn; address tokenOut; uint256 amountIn; uint24 fee; uint160 sqrtPriceLimitX96; } -```*/ + struct QuoteExactInputSingleParams { address tokenIn; address tokenOut; uint256 amountIn; uint24 fee; uint160 sqrtPriceLimitX96; } + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct QuoteExactInputSingleParams { @@ -44,7 +49,7 @@ struct QuoteExactInputSingleParams { address tokenIn; address tokenOut; uint256 clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[doc(hidden)] #[allow(dead_code)] type UnderlyingSolTuple<'a> = ( @@ -64,9 +69,7 @@ struct QuoteExactInputSingleParams { address tokenIn; address tokenOut; uint256 ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -75,8 +78,7 @@ struct QuoteExactInputSingleParams { address tokenIn; address tokenOut; uint256 } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From - for UnderlyingRustTuple<'_> { + impl ::core::convert::From for UnderlyingRustTuple<'_> { fn from(value: QuoteExactInputSingleParams) -> Self { ( value.tokenIn, @@ -89,8 +91,7 @@ struct QuoteExactInputSingleParams { address tokenIn; address tokenOut; uint256 } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From> - for QuoteExactInputSingleParams { + impl ::core::convert::From> for QuoteExactInputSingleParams { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { Self { tokenIn: tuple.0, @@ -106,8 +107,7 @@ struct QuoteExactInputSingleParams { address tokenIn; address tokenOut; uint256 type SolType = Self; } #[automatically_derived] - impl alloy_sol_types::private::SolTypeValue - for QuoteExactInputSingleParams { + impl alloy_sol_types::private::SolTypeValue for QuoteExactInputSingleParams { #[inline] fn stv_to_tokens(&self) -> ::Token<'_> { ( @@ -117,102 +117,100 @@ struct QuoteExactInputSingleParams { address tokenIn; address tokenOut; uint256 ::tokenize( &self.tokenOut, ), - as alloy_sol_types::SolType>::tokenize(&self.amountIn), - as alloy_sol_types::SolType>::tokenize(&self.fee), - as alloy_sol_types::SolType>::tokenize(&self.sqrtPriceLimitX96), + as alloy_sol_types::SolType>::tokenize( + &self.amountIn, + ), + as alloy_sol_types::SolType>::tokenize( + &self.fee, + ), + as alloy_sol_types::SolType>::tokenize( + &self.sqrtPriceLimitX96, + ), ) } + #[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) + 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) + 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) + 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 QuoteExactInputSingleParams { type RustType = Self; - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + + const ENCODED_SIZE: Option = + as alloy_sol_types::SolType>::ENCODED_SIZE; + const PACKED_ENCODED_SIZE: Option = + as alloy_sol_types::SolType>::PACKED_ENCODED_SIZE; 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); + let tuple = as alloy_sol_types::SolType>::detokenize(token); >>::from(tuple) } } #[automatically_derived] impl alloy_sol_types::SolStruct for QuoteExactInputSingleParams { const NAME: &'static str = "QuoteExactInputSingleParams"; + #[inline] fn eip712_root_type() -> alloy_sol_types::private::Cow<'static, str> { alloy_sol_types::private::Cow::Borrowed( - "QuoteExactInputSingleParams(address tokenIn,address tokenOut,uint256 amountIn,uint24 fee,uint160 sqrtPriceLimitX96)", + "QuoteExactInputSingleParams(address tokenIn,address tokenOut,uint256 \ + amountIn,uint24 fee,uint160 sqrtPriceLimitX96)", ) } + #[inline] - fn eip712_components() -> alloy_sol_types::private::Vec< - alloy_sol_types::private::Cow<'static, str>, - > { + fn eip712_components() + -> alloy_sol_types::private::Vec> + { 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 { [ @@ -267,14 +265,13 @@ struct QuoteExactInputSingleParams { address tokenIn; address tokenOut; uint256 &rust.sqrtPriceLimitX96, ) } + #[inline] fn encode_topic_preimage( rust: &Self::RustType, out: &mut alloy_sol_types::private::Vec, ) { - out.reserve( - ::topic_preimage_length(rust), - ); + out.reserve(::topic_preimage_length(rust)); ::encode_topic_preimage( &rust.tokenIn, out, @@ -299,25 +296,19 @@ struct QuoteExactInputSingleParams { address tokenIn; address tokenOut; uint256 out, ); } + #[inline] - fn encode_topic( - rust: &Self::RustType, - ) -> alloy_sol_types::abi::token::WordToken { + 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), - ) + ::encode_topic_preimage(rust, &mut out); + alloy_sol_types::abi::token::WordToken(alloy_sol_types::private::keccak256(out)) } } }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**```solidity -struct QuoteExactOutputSingleParams { address tokenIn; address tokenOut; uint256 amount; uint24 fee; uint160 sqrtPriceLimitX96; } -```*/ + struct QuoteExactOutputSingleParams { address tokenIn; address tokenOut; uint256 amount; uint24 fee; uint160 sqrtPriceLimitX96; } + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct QuoteExactOutputSingleParams { @@ -339,7 +330,7 @@ struct QuoteExactOutputSingleParams { address tokenIn; address tokenOut; uint256 clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[doc(hidden)] #[allow(dead_code)] type UnderlyingSolTuple<'a> = ( @@ -359,9 +350,7 @@ struct QuoteExactOutputSingleParams { address tokenIn; address tokenOut; uint256 ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -370,8 +359,7 @@ struct QuoteExactOutputSingleParams { address tokenIn; address tokenOut; uint256 } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From - for UnderlyingRustTuple<'_> { + impl ::core::convert::From for UnderlyingRustTuple<'_> { fn from(value: QuoteExactOutputSingleParams) -> Self { ( value.tokenIn, @@ -384,8 +372,7 @@ struct QuoteExactOutputSingleParams { address tokenIn; address tokenOut; uint256 } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From> - for QuoteExactOutputSingleParams { + impl ::core::convert::From> for QuoteExactOutputSingleParams { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { Self { tokenIn: tuple.0, @@ -401,8 +388,7 @@ struct QuoteExactOutputSingleParams { address tokenIn; address tokenOut; uint256 type SolType = Self; } #[automatically_derived] - impl alloy_sol_types::private::SolTypeValue - for QuoteExactOutputSingleParams { + impl alloy_sol_types::private::SolTypeValue for QuoteExactOutputSingleParams { #[inline] fn stv_to_tokens(&self) -> ::Token<'_> { ( @@ -412,102 +398,100 @@ struct QuoteExactOutputSingleParams { address tokenIn; address tokenOut; uint256 ::tokenize( &self.tokenOut, ), - as alloy_sol_types::SolType>::tokenize(&self.amount), - as alloy_sol_types::SolType>::tokenize(&self.fee), - as alloy_sol_types::SolType>::tokenize(&self.sqrtPriceLimitX96), + as alloy_sol_types::SolType>::tokenize( + &self.amount, + ), + as alloy_sol_types::SolType>::tokenize( + &self.fee, + ), + as alloy_sol_types::SolType>::tokenize( + &self.sqrtPriceLimitX96, + ), ) } + #[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) + 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) + 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) + 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 QuoteExactOutputSingleParams { type RustType = Self; - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + + const ENCODED_SIZE: Option = + as alloy_sol_types::SolType>::ENCODED_SIZE; + const PACKED_ENCODED_SIZE: Option = + as alloy_sol_types::SolType>::PACKED_ENCODED_SIZE; 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); + let tuple = as alloy_sol_types::SolType>::detokenize(token); >>::from(tuple) } } #[automatically_derived] impl alloy_sol_types::SolStruct for QuoteExactOutputSingleParams { const NAME: &'static str = "QuoteExactOutputSingleParams"; + #[inline] fn eip712_root_type() -> alloy_sol_types::private::Cow<'static, str> { alloy_sol_types::private::Cow::Borrowed( - "QuoteExactOutputSingleParams(address tokenIn,address tokenOut,uint256 amount,uint24 fee,uint160 sqrtPriceLimitX96)", + "QuoteExactOutputSingleParams(address tokenIn,address tokenOut,uint256 \ + amount,uint24 fee,uint160 sqrtPriceLimitX96)", ) } + #[inline] - fn eip712_components() -> alloy_sol_types::private::Vec< - alloy_sol_types::private::Cow<'static, str>, - > { + fn eip712_components() + -> alloy_sol_types::private::Vec> + { 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 { [ @@ -562,14 +546,13 @@ struct QuoteExactOutputSingleParams { address tokenIn; address tokenOut; uint256 &rust.sqrtPriceLimitX96, ) } + #[inline] fn encode_topic_preimage( rust: &Self::RustType, out: &mut alloy_sol_types::private::Vec, ) { - out.reserve( - ::topic_preimage_length(rust), - ); + out.reserve(::topic_preimage_length(rust)); ::encode_topic_preimage( &rust.tokenIn, out, @@ -594,25 +577,19 @@ struct QuoteExactOutputSingleParams { address tokenIn; address tokenOut; uint256 out, ); } + #[inline] - fn encode_topic( - rust: &Self::RustType, - ) -> alloy_sol_types::abi::token::WordToken { + 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), - ) + ::encode_topic_preimage(rust, &mut out); + alloy_sol_types::abi::token::WordToken(alloy_sol_types::private::keccak256(out)) } } }; - use alloy_contract as alloy_contract; + use alloy_contract; /**Creates a new wrapper around an on-chain [`IQuoterV2`](self) contract instance. -See the [wrapper's documentation](`IQuoterV2Instance`) for more details.*/ + See the [wrapper's documentation](`IQuoterV2Instance`) for more details.*/ #[inline] pub const fn new< P: alloy_contract::private::Provider, @@ -625,15 +602,15 @@ See the [wrapper's documentation](`IQuoterV2Instance`) for more details.*/ } /**A [`IQuoterV2`](self) instance. -Contains type-safe methods for interacting with an on-chain instance of the -[`IQuoterV2`](self) contract located at a given `address`, using a given -provider `P`. + Contains type-safe methods for interacting with an on-chain instance of the + [`IQuoterV2`](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. + 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.*/ + See the [module-level documentation](self) for all the available methods.*/ #[derive(Clone)] pub struct IQuoterV2Instance { address: alloy_sol_types::private::Address, @@ -644,43 +621,45 @@ See the [module-level documentation](self) for all the available methods.*/ impl ::core::fmt::Debug for IQuoterV2Instance { #[inline] fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { - f.debug_tuple("IQuoterV2Instance").field(&self.address).finish() + f.debug_tuple("IQuoterV2Instance") + .field(&self.address) + .finish() } } /// Instantiation and getters/setters. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > IQuoterV2Instance { + impl, N: alloy_contract::private::Network> + IQuoterV2Instance + { /**Creates a new wrapper around an on-chain [`IQuoterV2`](self) contract instance. -See the [wrapper's documentation](`IQuoterV2Instance`) for more details.*/ + See the [wrapper's documentation](`IQuoterV2Instance`) for more details.*/ #[inline] - pub const fn new( - address: alloy_sol_types::private::Address, - __provider: P, - ) -> Self { + pub const fn new(address: alloy_sol_types::private::Address, __provider: P) -> Self { Self { address, provider: __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 { @@ -688,7 +667,8 @@ See the [wrapper's documentation](`IQuoterV2Instance`) for more details.*/ } } impl IQuoterV2Instance<&P, N> { - /// Clones the provider and returns a new instance with the cloned provider. + /// Clones the provider and returns a new instance with the cloned + /// provider. #[inline] pub fn with_cloned_provider(self) -> IQuoterV2Instance { IQuoterV2Instance { @@ -699,14 +679,15 @@ See the [wrapper's documentation](`IQuoterV2Instance`) for more details.*/ } } /// Function calls. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > IQuoterV2Instance { - /// Creates a new call builder using this contract instance's provider and address. + impl, N: alloy_contract::private::Network> + IQuoterV2Instance + { + /// 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. + /// 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, @@ -715,14 +696,15 @@ See the [wrapper's documentation](`IQuoterV2Instance`) for more details.*/ } } /// Event filters. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > IQuoterV2Instance { - /// Creates a new event filter using this contract instance's provider and address. + impl, N: alloy_contract::private::Network> + IQuoterV2Instance + { + /// 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. + /// 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> { @@ -1018,12 +1000,11 @@ interface UniswapV3QuoterV2 { clippy::empty_structs_with_brackets )] pub mod UniswapV3QuoterV2 { - use super::*; - use alloy_sol_types as alloy_sol_types; + use {super::*, alloy_sol_types}; /**Constructor`. -```solidity -constructor(address _factory, address _WETH9); -```*/ + ```solidity + constructor(address _factory, address _WETH9); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct constructorCall { @@ -1033,7 +1014,7 @@ constructor(address _factory, address _WETH9); pub _WETH9: alloy_sol_types::private::Address, } const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -1048,9 +1029,7 @@ constructor(address _factory, address _WETH9); ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1081,15 +1060,15 @@ constructor(address _factory, address _WETH9); alloy_sol_types::sol_data::Address, alloy_sol_types::sol_data::Address, ); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + 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<'_> { ( @@ -1105,14 +1084,15 @@ constructor(address _factory, address _WETH9); }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `WETH9()` and selector `0x4aa4a4fc`. -```solidity -function WETH9() external view returns (address); -```*/ + ```solidity + function WETH9() external view returns (address); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct WETH9Call; #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`WETH9()`](WETH9Call) function. + ///Container type for the return parameters of the [`WETH9()`](WETH9Call) + /// function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct WETH9Return { @@ -1126,7 +1106,7 @@ function WETH9() external view returns (address); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -1135,9 +1115,7 @@ function WETH9() external view returns (address); type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1167,9 +1145,7 @@ function WETH9() external view returns (address); type UnderlyingRustTuple<'a> = (alloy_sol_types::private::Address,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1194,68 +1170,64 @@ function WETH9() external view returns (address); #[automatically_derived] impl alloy_sol_types::SolCall for WETH9Call { type Parameters<'a> = (); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = alloy_sol_types::private::Address; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (alloy_sol_types::sol_data::Address,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "WETH9()"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [74u8, 164u8, 164u8, 252u8]; + const SIGNATURE: &'static str = "WETH9()"; + #[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, - ), - ) + (::tokenize(ret),) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) - .map(|r| { + as alloy_sol_types::SolType>::abi_decode_sequence(data).map( + |r| { let r: WETH9Return = 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: WETH9Return = r.into(); - r._0 - }) + 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: WETH9Return = r.into(); + r._0 + }) } } }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `factory()` and selector `0xc45a0155`. -```solidity -function factory() external view returns (address); -```*/ + ```solidity + function factory() external view returns (address); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct factoryCall; #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`factory()`](factoryCall) function. + ///Container type for the return parameters of the + /// [`factory()`](factoryCall) function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct factoryReturn { @@ -1269,7 +1241,7 @@ function factory() external view returns (address); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -1278,9 +1250,7 @@ function factory() external view returns (address); type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1310,9 +1280,7 @@ function factory() external view returns (address); type UnderlyingRustTuple<'a> = (alloy_sol_types::private::Address,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1337,63 +1305,58 @@ function factory() external view returns (address); #[automatically_derived] impl alloy_sol_types::SolCall for factoryCall { type Parameters<'a> = (); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = alloy_sol_types::private::Address; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (alloy_sol_types::sol_data::Address,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "factory()"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [196u8, 90u8, 1u8, 85u8]; + const SIGNATURE: &'static str = "factory()"; + #[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, - ), - ) + (::tokenize(ret),) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) - .map(|r| { + as alloy_sol_types::SolType>::abi_decode_sequence(data).map( + |r| { let r: factoryReturn = 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: factoryReturn = r.into(); - r._0 - }) + 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: factoryReturn = r.into(); + r._0 + }) } } }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `quoteExactInput(bytes,uint256)` and selector `0xcdca1753`. -```solidity -function quoteExactInput(bytes memory path, uint256 amountIn) external returns (uint256 amountOut, uint160[] memory sqrtPriceX96AfterList, uint32[] memory initializedTicksCrossedList, uint256 gasEstimate); -```*/ + ```solidity + function quoteExactInput(bytes memory path, uint256 amountIn) external returns (uint256 amountOut, uint160[] memory sqrtPriceX96AfterList, uint32[] memory initializedTicksCrossedList, uint256 gasEstimate); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct quoteExactInputCall { @@ -1403,16 +1366,16 @@ function quoteExactInput(bytes memory path, uint256 amountIn) external returns ( pub amountIn: alloy_sol_types::private::primitives::aliases::U256, } #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`quoteExactInput(bytes,uint256)`](quoteExactInputCall) function. + ///Container type for the return parameters of the + /// [`quoteExactInput(bytes,uint256)`](quoteExactInputCall) function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct quoteExactInputReturn { #[allow(missing_docs)] pub amountOut: alloy_sol_types::private::primitives::aliases::U256, #[allow(missing_docs)] - pub sqrtPriceX96AfterList: alloy_sol_types::private::Vec< - alloy_sol_types::private::primitives::aliases::U160, - >, + pub sqrtPriceX96AfterList: + alloy_sol_types::private::Vec, #[allow(missing_docs)] pub initializedTicksCrossedList: alloy_sol_types::private::Vec, #[allow(missing_docs)] @@ -1425,7 +1388,7 @@ function quoteExactInput(bytes memory path, uint256 amountIn) external returns ( clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -1440,9 +1403,7 @@ function quoteExactInput(bytes memory path, uint256 amountIn) external returns ( ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1479,17 +1440,13 @@ function quoteExactInput(bytes memory path, uint256 amountIn) external returns ( #[doc(hidden)] type UnderlyingRustTuple<'a> = ( alloy_sol_types::private::primitives::aliases::U256, - alloy_sol_types::private::Vec< - alloy_sol_types::private::primitives::aliases::U160, - >, + alloy_sol_types::private::Vec, 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, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1498,8 +1455,7 @@ function quoteExactInput(bytes memory path, uint256 amountIn) external returns ( } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From - for UnderlyingRustTuple<'_> { + impl ::core::convert::From for UnderlyingRustTuple<'_> { fn from(value: quoteExactInputReturn) -> Self { ( value.amountOut, @@ -1511,8 +1467,7 @@ function quoteExactInput(bytes memory path, uint256 amountIn) external returns ( } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From> - for quoteExactInputReturn { + impl ::core::convert::From> for quoteExactInputReturn { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { Self { amountOut: tuple.0, @@ -1553,65 +1508,63 @@ function quoteExactInput(bytes memory path, uint256 amountIn) external returns ( alloy_sol_types::sol_data::Bytes, alloy_sol_types::sol_data::Uint<256>, ); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = quoteExactInputReturn; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = ( alloy_sol_types::sol_data::Uint<256>, alloy_sol_types::sol_data::Array>, alloy_sol_types::sol_data::Array>, alloy_sol_types::sol_data::Uint<256>, ); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "quoteExactInput(bytes,uint256)"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [205u8, 202u8, 23u8, 83u8]; + const SIGNATURE: &'static str = "quoteExactInput(bytes,uint256)"; + #[inline] fn new<'a>( tuple: as alloy_sol_types::SolType>::RustType, ) -> Self { tuple.into() } + #[inline] fn tokenize(&self) -> Self::Token<'_> { ( ::tokenize( &self.path, ), - as alloy_sol_types::SolType>::tokenize(&self.amountIn), + as alloy_sol_types::SolType>::tokenize( + &self.amountIn, + ), ) } + #[inline] fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { quoteExactInputReturn::_tokenize(ret) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) + 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) + 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(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `quoteExactInputSingle((address,address,uint256,uint24,uint160))` and selector `0xc6a5026a`. -```solidity -function quoteExactInputSingle(IQuoterV2.QuoteExactInputSingleParams memory params) external returns (uint256 amountOut, uint160 sqrtPriceX96After, uint32 initializedTicksCrossed, uint256 gasEstimate); -```*/ + ```solidity + function quoteExactInputSingle(IQuoterV2.QuoteExactInputSingleParams memory params) external returns (uint256 amountOut, uint160 sqrtPriceX96After, uint32 initializedTicksCrossed, uint256 gasEstimate); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct quoteExactInputSingleCall { @@ -1619,7 +1572,9 @@ function quoteExactInputSingle(IQuoterV2.QuoteExactInputSingleParams memory para pub params: ::RustType, } #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`quoteExactInputSingle((address,address,uint256,uint24,uint160))`](quoteExactInputSingleCall) function. + ///Container type for the return parameters of the + /// [`quoteExactInputSingle((address,address,uint256,uint24, + /// uint160))`](quoteExactInputSingleCall) function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct quoteExactInputSingleReturn { @@ -1639,20 +1594,17 @@ function quoteExactInputSingle(IQuoterV2.QuoteExactInputSingleParams memory para clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] type UnderlyingSolTuple<'a> = (IQuoterV2::QuoteExactInputSingleParams,); #[doc(hidden)] - type UnderlyingRustTuple<'a> = ( - ::RustType, - ); + type UnderlyingRustTuple<'a> = + (::RustType,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1661,16 +1613,14 @@ function quoteExactInputSingle(IQuoterV2.QuoteExactInputSingleParams memory para } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From - for UnderlyingRustTuple<'_> { + impl ::core::convert::From for UnderlyingRustTuple<'_> { fn from(value: quoteExactInputSingleCall) -> Self { (value.params,) } } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From> - for quoteExactInputSingleCall { + impl ::core::convert::From> for quoteExactInputSingleCall { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { Self { params: tuple.0 } } @@ -1694,9 +1644,7 @@ function quoteExactInputSingle(IQuoterV2.QuoteExactInputSingleParams memory para ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1705,8 +1653,7 @@ function quoteExactInputSingle(IQuoterV2.QuoteExactInputSingleParams memory para } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From - for UnderlyingRustTuple<'_> { + impl ::core::convert::From for UnderlyingRustTuple<'_> { fn from(value: quoteExactInputSingleReturn) -> Self { ( value.amountOut, @@ -1718,8 +1665,7 @@ function quoteExactInputSingle(IQuoterV2.QuoteExactInputSingleParams memory para } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From> - for quoteExactInputSingleReturn { + impl ::core::convert::From> for quoteExactInputSingleReturn { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { Self { amountOut: tuple.0, @@ -1733,51 +1679,48 @@ function quoteExactInputSingle(IQuoterV2.QuoteExactInputSingleParams memory para impl quoteExactInputSingleReturn { fn _tokenize( &self, - ) -> ::ReturnToken< - '_, - > { + ) -> ::ReturnToken<'_> + { ( - as alloy_sol_types::SolType>::tokenize(&self.amountOut), - as alloy_sol_types::SolType>::tokenize(&self.sqrtPriceX96After), - as alloy_sol_types::SolType>::tokenize( + as alloy_sol_types::SolType>::tokenize( + &self.amountOut, + ), + as alloy_sol_types::SolType>::tokenize( + &self.sqrtPriceX96After, + ), + as alloy_sol_types::SolType>::tokenize( &self.initializedTicksCrossed, ), - as alloy_sol_types::SolType>::tokenize(&self.gasEstimate), + as alloy_sol_types::SolType>::tokenize( + &self.gasEstimate, + ), ) } } #[automatically_derived] impl alloy_sol_types::SolCall for quoteExactInputSingleCall { type Parameters<'a> = (IQuoterV2::QuoteExactInputSingleParams,); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = quoteExactInputSingleReturn; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = ( alloy_sol_types::sol_data::Uint<256>, alloy_sol_types::sol_data::Uint<160>, alloy_sol_types::sol_data::Uint<32>, alloy_sol_types::sol_data::Uint<256>, ); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "quoteExactInputSingle((address,address,uint256,uint24,uint160))"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [198u8, 165u8, 2u8, 106u8]; + const SIGNATURE: &'static str = + "quoteExactInputSingle((address,address,uint256,uint24,uint160))"; + #[inline] fn new<'a>( tuple: as alloy_sol_types::SolType>::RustType, ) -> Self { tuple.into() } + #[inline] fn tokenize(&self) -> Self::Token<'_> { ( @@ -1786,33 +1729,32 @@ function quoteExactInputSingle(IQuoterV2.QuoteExactInputSingleParams memory para ), ) } + #[inline] fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { quoteExactInputSingleReturn::_tokenize(ret) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) + 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) + 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(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `quoteExactOutput(bytes,uint256)` and selector `0x2f80bb1d`. -```solidity -function quoteExactOutput(bytes memory path, uint256 amountOut) external returns (uint256 amountIn, uint160[] memory sqrtPriceX96AfterList, uint32[] memory initializedTicksCrossedList, uint256 gasEstimate); -```*/ + ```solidity + function quoteExactOutput(bytes memory path, uint256 amountOut) external returns (uint256 amountIn, uint160[] memory sqrtPriceX96AfterList, uint32[] memory initializedTicksCrossedList, uint256 gasEstimate); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct quoteExactOutputCall { @@ -1822,16 +1764,16 @@ function quoteExactOutput(bytes memory path, uint256 amountOut) external returns pub amountOut: alloy_sol_types::private::primitives::aliases::U256, } #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`quoteExactOutput(bytes,uint256)`](quoteExactOutputCall) function. + ///Container type for the return parameters of the + /// [`quoteExactOutput(bytes,uint256)`](quoteExactOutputCall) function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct quoteExactOutputReturn { #[allow(missing_docs)] pub amountIn: alloy_sol_types::private::primitives::aliases::U256, #[allow(missing_docs)] - pub sqrtPriceX96AfterList: alloy_sol_types::private::Vec< - alloy_sol_types::private::primitives::aliases::U160, - >, + pub sqrtPriceX96AfterList: + alloy_sol_types::private::Vec, #[allow(missing_docs)] pub initializedTicksCrossedList: alloy_sol_types::private::Vec, #[allow(missing_docs)] @@ -1844,7 +1786,7 @@ function quoteExactOutput(bytes memory path, uint256 amountOut) external returns clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -1859,9 +1801,7 @@ function quoteExactOutput(bytes memory path, uint256 amountOut) external returns ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1870,16 +1810,14 @@ function quoteExactOutput(bytes memory path, uint256 amountOut) external returns } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From - for UnderlyingRustTuple<'_> { + impl ::core::convert::From for UnderlyingRustTuple<'_> { fn from(value: quoteExactOutputCall) -> Self { (value.path, value.amountOut) } } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From> - for quoteExactOutputCall { + impl ::core::convert::From> for quoteExactOutputCall { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { Self { path: tuple.0, @@ -1900,17 +1838,13 @@ function quoteExactOutput(bytes memory path, uint256 amountOut) external returns #[doc(hidden)] type UnderlyingRustTuple<'a> = ( alloy_sol_types::private::primitives::aliases::U256, - alloy_sol_types::private::Vec< - alloy_sol_types::private::primitives::aliases::U160, - >, + alloy_sol_types::private::Vec, 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, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1919,8 +1853,7 @@ function quoteExactOutput(bytes memory path, uint256 amountOut) external returns } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From - for UnderlyingRustTuple<'_> { + impl ::core::convert::From for UnderlyingRustTuple<'_> { fn from(value: quoteExactOutputReturn) -> Self { ( value.amountIn, @@ -1932,8 +1865,7 @@ function quoteExactOutput(bytes memory path, uint256 amountOut) external returns } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From> - for quoteExactOutputReturn { + impl ::core::convert::From> for quoteExactOutputReturn { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { Self { amountIn: tuple.0, @@ -1974,65 +1906,63 @@ function quoteExactOutput(bytes memory path, uint256 amountOut) external returns alloy_sol_types::sol_data::Bytes, alloy_sol_types::sol_data::Uint<256>, ); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = quoteExactOutputReturn; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = ( alloy_sol_types::sol_data::Uint<256>, alloy_sol_types::sol_data::Array>, alloy_sol_types::sol_data::Array>, alloy_sol_types::sol_data::Uint<256>, ); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "quoteExactOutput(bytes,uint256)"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [47u8, 128u8, 187u8, 29u8]; + const SIGNATURE: &'static str = "quoteExactOutput(bytes,uint256)"; + #[inline] fn new<'a>( tuple: as alloy_sol_types::SolType>::RustType, ) -> Self { tuple.into() } + #[inline] fn tokenize(&self) -> Self::Token<'_> { ( ::tokenize( &self.path, ), - as alloy_sol_types::SolType>::tokenize(&self.amountOut), + as alloy_sol_types::SolType>::tokenize( + &self.amountOut, + ), ) } + #[inline] fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { quoteExactOutputReturn::_tokenize(ret) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) + 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) + 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(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `quoteExactOutputSingle((address,address,uint256,uint24,uint160))` and selector `0xbd21704a`. -```solidity -function quoteExactOutputSingle(IQuoterV2.QuoteExactOutputSingleParams memory params) external returns (uint256 amountIn, uint160 sqrtPriceX96After, uint32 initializedTicksCrossed, uint256 gasEstimate); -```*/ + ```solidity + function quoteExactOutputSingle(IQuoterV2.QuoteExactOutputSingleParams memory params) external returns (uint256 amountIn, uint160 sqrtPriceX96After, uint32 initializedTicksCrossed, uint256 gasEstimate); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct quoteExactOutputSingleCall { @@ -2040,7 +1970,9 @@ function quoteExactOutputSingle(IQuoterV2.QuoteExactOutputSingleParams memory pa pub params: ::RustType, } #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`quoteExactOutputSingle((address,address,uint256,uint24,uint160))`](quoteExactOutputSingleCall) function. + ///Container type for the return parameters of the + /// [`quoteExactOutputSingle((address,address,uint256,uint24, + /// uint160))`](quoteExactOutputSingleCall) function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct quoteExactOutputSingleReturn { @@ -2060,20 +1992,17 @@ function quoteExactOutputSingle(IQuoterV2.QuoteExactOutputSingleParams memory pa clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] type UnderlyingSolTuple<'a> = (IQuoterV2::QuoteExactOutputSingleParams,); #[doc(hidden)] - type UnderlyingRustTuple<'a> = ( - ::RustType, - ); + type UnderlyingRustTuple<'a> = + (::RustType,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -2082,16 +2011,14 @@ function quoteExactOutputSingle(IQuoterV2.QuoteExactOutputSingleParams memory pa } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From - for UnderlyingRustTuple<'_> { + impl ::core::convert::From for UnderlyingRustTuple<'_> { fn from(value: quoteExactOutputSingleCall) -> Self { (value.params,) } } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From> - for quoteExactOutputSingleCall { + impl ::core::convert::From> for quoteExactOutputSingleCall { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { Self { params: tuple.0 } } @@ -2115,9 +2042,7 @@ function quoteExactOutputSingle(IQuoterV2.QuoteExactOutputSingleParams memory pa ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -2126,8 +2051,7 @@ function quoteExactOutputSingle(IQuoterV2.QuoteExactOutputSingleParams memory pa } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From - for UnderlyingRustTuple<'_> { + impl ::core::convert::From for UnderlyingRustTuple<'_> { fn from(value: quoteExactOutputSingleReturn) -> Self { ( value.amountIn, @@ -2139,8 +2063,7 @@ function quoteExactOutputSingle(IQuoterV2.QuoteExactOutputSingleParams memory pa } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From> - for quoteExactOutputSingleReturn { + impl ::core::convert::From> for quoteExactOutputSingleReturn { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { Self { amountIn: tuple.0, @@ -2154,51 +2077,48 @@ function quoteExactOutputSingle(IQuoterV2.QuoteExactOutputSingleParams memory pa impl quoteExactOutputSingleReturn { fn _tokenize( &self, - ) -> ::ReturnToken< - '_, - > { + ) -> ::ReturnToken<'_> + { ( - as alloy_sol_types::SolType>::tokenize(&self.amountIn), - as alloy_sol_types::SolType>::tokenize(&self.sqrtPriceX96After), - as alloy_sol_types::SolType>::tokenize( + as alloy_sol_types::SolType>::tokenize( + &self.amountIn, + ), + as alloy_sol_types::SolType>::tokenize( + &self.sqrtPriceX96After, + ), + as alloy_sol_types::SolType>::tokenize( &self.initializedTicksCrossed, ), - as alloy_sol_types::SolType>::tokenize(&self.gasEstimate), + as alloy_sol_types::SolType>::tokenize( + &self.gasEstimate, + ), ) } } #[automatically_derived] impl alloy_sol_types::SolCall for quoteExactOutputSingleCall { type Parameters<'a> = (IQuoterV2::QuoteExactOutputSingleParams,); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = quoteExactOutputSingleReturn; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = ( alloy_sol_types::sol_data::Uint<256>, alloy_sol_types::sol_data::Uint<160>, alloy_sol_types::sol_data::Uint<32>, alloy_sol_types::sol_data::Uint<256>, ); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "quoteExactOutputSingle((address,address,uint256,uint24,uint160))"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [189u8, 33u8, 112u8, 74u8]; + const SIGNATURE: &'static str = + "quoteExactOutputSingle((address,address,uint256,uint24,uint160))"; + #[inline] fn new<'a>( tuple: as alloy_sol_types::SolType>::RustType, ) -> Self { tuple.into() } + #[inline] fn tokenize(&self) -> Self::Token<'_> { ( @@ -2207,31 +2127,29 @@ function quoteExactOutputSingle(IQuoterV2.QuoteExactOutputSingleParams memory pa ), ) } + #[inline] fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { quoteExactOutputSingleReturn::_tokenize(ret) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) + 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) + 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 [`UniswapV3QuoterV2`](self) function calls. #[derive(Clone)] - #[derive()] pub enum UniswapV3QuoterV2Calls { #[allow(missing_docs)] WETH9(WETH9Call), @@ -2249,8 +2167,9 @@ function quoteExactOutputSingle(IQuoterV2.QuoteExactOutputSingleParams memory pa impl UniswapV3QuoterV2Calls { /// 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. + /// 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]] = &[ @@ -2261,15 +2180,6 @@ function quoteExactOutputSingle(IQuoterV2.QuoteExactOutputSingleParams memory pa [198u8, 165u8, 2u8, 106u8], [205u8, 202u8, 23u8, 83u8], ]; - /// The names of the variants in the same order as `SELECTORS`. - pub const VARIANT_NAMES: &'static [&'static str] = &[ - ::core::stringify!(quoteExactOutput), - ::core::stringify!(WETH9), - ::core::stringify!(quoteExactOutputSingle), - ::core::stringify!(factory), - ::core::stringify!(quoteExactInputSingle), - ::core::stringify!(quoteExactInput), - ]; /// The signatures in the same order as `SELECTORS`. pub const SIGNATURES: &'static [&'static str] = &[ ::SIGNATURE, @@ -2279,6 +2189,16 @@ function quoteExactOutputSingle(IQuoterV2.QuoteExactOutputSingleParams memory pa ::SIGNATURE, ::SIGNATURE, ]; + /// The names of the variants in the same order as `SELECTORS`. + pub const VARIANT_NAMES: &'static [&'static str] = &[ + ::core::stringify!(quoteExactOutput), + ::core::stringify!(WETH9), + ::core::stringify!(quoteExactOutputSingle), + ::core::stringify!(factory), + ::core::stringify!(quoteExactInputSingle), + ::core::stringify!(quoteExactInput), + ]; + /// Returns the signature for the given selector, if known. #[inline] pub fn signature_by_selector( @@ -2291,20 +2211,20 @@ function quoteExactOutputSingle(IQuoterV2.QuoteExactOutputSingleParams memory pa ::core::result::Result::Err(_) => ::core::option::Option::None, } } + /// Returns the enum variant name for the given selector, if known. #[inline] - pub fn name_by_selector( - selector: [u8; 4usize], - ) -> ::core::option::Option<&'static str> { + pub fn name_by_selector(selector: [u8; 4usize]) -> ::core::option::Option<&'static str> { let sig = Self::signature_by_selector(selector)?; sig.split_once('(').map(|(name, _)| name) } } #[automatically_derived] impl alloy_sol_types::SolInterface for UniswapV3QuoterV2Calls { - const NAME: &'static str = "UniswapV3QuoterV2Calls"; - const MIN_DATA_LENGTH: usize = 0usize; const COUNT: usize = 6usize; + const MIN_DATA_LENGTH: usize = 0usize; + const NAME: &'static str = "UniswapV3QuoterV2Calls"; + #[inline] fn selector(&self) -> [u8; 4] { match self { @@ -2324,96 +2244,90 @@ function quoteExactOutputSingle(IQuoterV2.QuoteExactOutputSingleParams memory pa } } } + #[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 quoteExactOutput( - data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, - ) - .map(UniswapV3QuoterV2Calls::quoteExactOutput) - } - quoteExactOutput - }, - { - fn WETH9( - data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw(data) - .map(UniswapV3QuoterV2Calls::WETH9) - } - WETH9 - }, - { - fn quoteExactOutputSingle( - data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw( + fn abi_decode_raw(selector: [u8; 4], data: &[u8]) -> alloy_sol_types::Result { + static DECODE_SHIMS: &[fn(&[u8]) -> alloy_sol_types::Result] = + &[ + { + fn quoteExactOutput( + data: &[u8], + ) -> alloy_sol_types::Result + { + ::abi_decode_raw(data) + .map(UniswapV3QuoterV2Calls::quoteExactOutput) + } + quoteExactOutput + }, + { + fn WETH9(data: &[u8]) -> alloy_sol_types::Result { + ::abi_decode_raw(data) + .map(UniswapV3QuoterV2Calls::WETH9) + } + WETH9 + }, + { + fn quoteExactOutputSingle( + data: &[u8], + ) -> alloy_sol_types::Result + { + ::abi_decode_raw( data, ) .map(UniswapV3QuoterV2Calls::quoteExactOutputSingle) - } - quoteExactOutputSingle - }, - { - fn factory( - data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw(data) - .map(UniswapV3QuoterV2Calls::factory) - } - factory - }, - { - fn quoteExactInputSingle( - data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw( + } + quoteExactOutputSingle + }, + { + fn factory(data: &[u8]) -> alloy_sol_types::Result { + ::abi_decode_raw(data) + .map(UniswapV3QuoterV2Calls::factory) + } + factory + }, + { + fn quoteExactInputSingle( + data: &[u8], + ) -> alloy_sol_types::Result + { + ::abi_decode_raw( data, ) .map(UniswapV3QuoterV2Calls::quoteExactInputSingle) - } - quoteExactInputSingle - }, - { - fn quoteExactInput( - data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, - ) - .map(UniswapV3QuoterV2Calls::quoteExactInput) - } - quoteExactInput - }, - ]; + } + quoteExactInputSingle + }, + { + fn quoteExactInput( + data: &[u8], + ) -> alloy_sol_types::Result + { + ::abi_decode_raw(data) + .map(UniswapV3QuoterV2Calls::quoteExactInput) + } + quoteExactInput + }, + ]; let Ok(idx) = Self::SELECTORS.binary_search(&selector) else { - return Err( - alloy_sol_types::Error::unknown_selector( - ::NAME, - selector, - ), - ); + return Err(alloy_sol_types::Error::unknown_selector( + ::NAME, + selector, + )); }; DECODE_SHIMS[idx](data) } + #[inline] #[allow(non_snake_case)] fn abi_decode_raw_validate( @@ -2422,25 +2336,23 @@ function quoteExactOutputSingle(IQuoterV2.QuoteExactOutputSingleParams memory pa ) -> alloy_sol_types::Result { static DECODE_VALIDATE_SHIMS: &[fn( &[u8], - ) -> alloy_sol_types::Result] = &[ + ) -> alloy_sol_types::Result< + UniswapV3QuoterV2Calls, + >] = &[ { fn quoteExactOutput( data: &[u8], ) -> alloy_sol_types::Result { ::abi_decode_raw_validate( - data, - ) - .map(UniswapV3QuoterV2Calls::quoteExactOutput) + data, + ) + .map(UniswapV3QuoterV2Calls::quoteExactOutput) } quoteExactOutput }, { - fn WETH9( - data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) + fn WETH9(data: &[u8]) -> alloy_sol_types::Result { + ::abi_decode_raw_validate(data) .map(UniswapV3QuoterV2Calls::WETH9) } WETH9 @@ -2457,12 +2369,8 @@ function quoteExactOutputSingle(IQuoterV2.QuoteExactOutputSingleParams memory pa quoteExactOutputSingle }, { - fn factory( - data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) + fn factory(data: &[u8]) -> alloy_sol_types::Result { + ::abi_decode_raw_validate(data) .map(UniswapV3QuoterV2Calls::factory) } factory @@ -2483,23 +2391,22 @@ function quoteExactOutputSingle(IQuoterV2.QuoteExactOutputSingleParams memory pa data: &[u8], ) -> alloy_sol_types::Result { ::abi_decode_raw_validate( - data, - ) - .map(UniswapV3QuoterV2Calls::quoteExactInput) + data, + ) + .map(UniswapV3QuoterV2Calls::quoteExactInput) } quoteExactInput }, ]; let Ok(idx) = Self::SELECTORS.binary_search(&selector) else { - return Err( - alloy_sol_types::Error::unknown_selector( - ::NAME, - selector, - ), - ); + return Err(alloy_sol_types::Error::unknown_selector( + ::NAME, + selector, + )); }; DECODE_VALIDATE_SHIMS[idx](data) } + #[inline] fn abi_encoded_size(&self) -> usize { match self { @@ -2510,19 +2417,13 @@ function quoteExactOutputSingle(IQuoterV2.QuoteExactOutputSingleParams memory pa ::abi_encoded_size(inner) } Self::quoteExactInput(inner) => { - ::abi_encoded_size( - inner, - ) + ::abi_encoded_size(inner) } Self::quoteExactInputSingle(inner) => { - ::abi_encoded_size( - inner, - ) + ::abi_encoded_size(inner) } Self::quoteExactOutput(inner) => { - ::abi_encoded_size( - inner, - ) + ::abi_encoded_size(inner) } Self::quoteExactOutputSingle(inner) => { ::abi_encoded_size( @@ -2531,6 +2432,7 @@ function quoteExactOutputSingle(IQuoterV2.QuoteExactOutputSingleParams memory pa } } } + #[inline] fn abi_encode_raw(&self, out: &mut alloy_sol_types::private::Vec) { match self { @@ -2541,36 +2443,28 @@ function quoteExactOutputSingle(IQuoterV2.QuoteExactOutputSingleParams memory pa ::abi_encode_raw(inner, out) } Self::quoteExactInput(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } Self::quoteExactInputSingle(inner) => { ::abi_encode_raw( - inner, - out, + inner, out, ) } Self::quoteExactOutput(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } Self::quoteExactOutputSingle(inner) => { ::abi_encode_raw( - inner, - out, + inner, out, ) } } } } - use alloy_contract as alloy_contract; + use alloy_contract; /**Creates a new wrapper around an on-chain [`UniswapV3QuoterV2`](self) contract instance. -See the [wrapper's documentation](`UniswapV3QuoterV2Instance`) for more details.*/ + See the [wrapper's documentation](`UniswapV3QuoterV2Instance`) for more details.*/ #[inline] pub const fn new< P: alloy_contract::private::Provider, @@ -2583,15 +2477,15 @@ See the [wrapper's documentation](`UniswapV3QuoterV2Instance`) for more details. } /**A [`UniswapV3QuoterV2`](self) instance. -Contains type-safe methods for interacting with an on-chain instance of the -[`UniswapV3QuoterV2`](self) contract located at a given `address`, using a given -provider `P`. + Contains type-safe methods for interacting with an on-chain instance of the + [`UniswapV3QuoterV2`](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. + 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.*/ + See the [module-level documentation](self) for all the available methods.*/ #[derive(Clone)] pub struct UniswapV3QuoterV2Instance { address: alloy_sol_types::private::Address, @@ -2602,43 +2496,45 @@ See the [module-level documentation](self) for all the available methods.*/ impl ::core::fmt::Debug for UniswapV3QuoterV2Instance { #[inline] fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { - f.debug_tuple("UniswapV3QuoterV2Instance").field(&self.address).finish() + f.debug_tuple("UniswapV3QuoterV2Instance") + .field(&self.address) + .finish() } } /// Instantiation and getters/setters. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > UniswapV3QuoterV2Instance { + impl, N: alloy_contract::private::Network> + UniswapV3QuoterV2Instance + { /**Creates a new wrapper around an on-chain [`UniswapV3QuoterV2`](self) contract instance. -See the [wrapper's documentation](`UniswapV3QuoterV2Instance`) for more details.*/ + See the [wrapper's documentation](`UniswapV3QuoterV2Instance`) for more details.*/ #[inline] - pub const fn new( - address: alloy_sol_types::private::Address, - __provider: P, - ) -> Self { + pub const fn new(address: alloy_sol_types::private::Address, __provider: P) -> Self { Self { address, provider: __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 { @@ -2646,7 +2542,8 @@ See the [wrapper's documentation](`UniswapV3QuoterV2Instance`) for more details. } } impl UniswapV3QuoterV2Instance<&P, N> { - /// Clones the provider and returns a new instance with the cloned provider. + /// Clones the provider and returns a new instance with the cloned + /// provider. #[inline] pub fn with_cloned_provider(self) -> UniswapV3QuoterV2Instance { UniswapV3QuoterV2Instance { @@ -2657,86 +2554,78 @@ See the [wrapper's documentation](`UniswapV3QuoterV2Instance`) for more details. } } /// Function calls. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > UniswapV3QuoterV2Instance { - /// Creates a new call builder using this contract instance's provider and address. + impl, N: alloy_contract::private::Network> + UniswapV3QuoterV2Instance + { + /// 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. + /// 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 [`WETH9`] function. pub fn WETH9(&self) -> alloy_contract::SolCallBuilder<&P, WETH9Call, N> { self.call_builder(&WETH9Call) } + ///Creates a new call builder for the [`factory`] function. pub fn factory(&self) -> alloy_contract::SolCallBuilder<&P, factoryCall, N> { self.call_builder(&factoryCall) } + ///Creates a new call builder for the [`quoteExactInput`] function. pub fn quoteExactInput( &self, path: alloy_sol_types::private::Bytes, amountIn: alloy_sol_types::private::primitives::aliases::U256, ) -> alloy_contract::SolCallBuilder<&P, quoteExactInputCall, N> { - self.call_builder( - "eExactInputCall { - path, - amountIn, - }, - ) + self.call_builder("eExactInputCall { path, amountIn }) } - ///Creates a new call builder for the [`quoteExactInputSingle`] function. + + ///Creates a new call builder for the [`quoteExactInputSingle`] + /// function. pub fn quoteExactInputSingle( &self, params: ::RustType, ) -> alloy_contract::SolCallBuilder<&P, quoteExactInputSingleCall, N> { - self.call_builder( - "eExactInputSingleCall { - params, - }, - ) + self.call_builder("eExactInputSingleCall { params }) } + ///Creates a new call builder for the [`quoteExactOutput`] function. pub fn quoteExactOutput( &self, path: alloy_sol_types::private::Bytes, amountOut: alloy_sol_types::private::primitives::aliases::U256, ) -> alloy_contract::SolCallBuilder<&P, quoteExactOutputCall, N> { - self.call_builder( - "eExactOutputCall { - path, - amountOut, - }, - ) + self.call_builder("eExactOutputCall { path, amountOut }) } - ///Creates a new call builder for the [`quoteExactOutputSingle`] function. + + ///Creates a new call builder for the [`quoteExactOutputSingle`] + /// function. pub fn quoteExactOutputSingle( &self, params: ::RustType, ) -> alloy_contract::SolCallBuilder<&P, quoteExactOutputSingleCall, N> { - self.call_builder( - "eExactOutputSingleCall { - params, - }, - ) + self.call_builder("eExactOutputSingleCall { params }) } } /// Event filters. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > UniswapV3QuoterV2Instance { - /// Creates a new event filter using this contract instance's provider and address. + impl, N: alloy_contract::private::Network> + UniswapV3QuoterV2Instance + { + /// 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. + /// 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> { @@ -2744,97 +2633,55 @@ See the [wrapper's documentation](`UniswapV3QuoterV2Instance`) for more details. } } } -pub type Instance = UniswapV3QuoterV2::UniswapV3QuoterV2Instance< - ::alloy_provider::DynProvider, ->; +pub type Instance = UniswapV3QuoterV2::UniswapV3QuoterV2Instance<::alloy_provider::DynProvider>; use { - std::{sync::LazyLock, collections::HashMap}, - anyhow::{Result, Context}, - alloy_primitives::{address, Address}, - alloy_provider::{Provider, DynProvider}, + alloy_primitives::{Address, address}, + alloy_provider::{DynProvider, Provider}, + anyhow::{Context, Result}, + std::{collections::HashMap, sync::LazyLock}, }; pub const fn deployment_info(chain_id: u64) -> Option<(Address, Option)> { match chain_id { - 1u64 => { - Some(( - ::alloy_primitives::address!( - "0x61fFE014bA17989E743c5F6cB21bF9697530B21e" - ), - None, - )) - } - 10u64 => { - Some(( - ::alloy_primitives::address!( - "0x61fFE014bA17989E743c5F6cB21bF9697530B21e" - ), - None, - )) - } - 56u64 => { - Some(( - ::alloy_primitives::address!( - "0x78D78E420Da98ad378D7799bE8f4AF69033EB077" - ), - None, - )) - } - 137u64 => { - Some(( - ::alloy_primitives::address!( - "0x61fFE014bA17989E743c5F6cB21bF9697530B21e" - ), - None, - )) - } - 8453u64 => { - Some(( - ::alloy_primitives::address!( - "0x3d4e44Eb1374240CE5F1B871ab261CD16335B76a" - ), - None, - )) - } - 9745u64 => { - Some(( - ::alloy_primitives::address!( - "0xaa52bB8110fE38D0d2d2AF0B85C3A3eE622CA455" - ), - None, - )) - } - 42161u64 => { - Some(( - ::alloy_primitives::address!( - "0x61fFE014bA17989E743c5F6cB21bF9697530B21e" - ), - None, - )) - } - 43114u64 => { - Some(( - ::alloy_primitives::address!( - "0xbe0F5544EC67e9B3b2D979aaA43f18Fd87E6257F" - ), - None, - )) - } - 57073u64 => { - Some(( - ::alloy_primitives::address!( - "0x96b572D2d880cf2Fa2563651BD23ADE6f5516652" - ), - None, - )) - } - 59144u64 => { - Some(( - ::alloy_primitives::address!( - "0x42bE4D6527829FeFA1493e1fb9F3676d2425C3C1" - ), - None, - )) - } + 1u64 => Some(( + ::alloy_primitives::address!("0x61fFE014bA17989E743c5F6cB21bF9697530B21e"), + None, + )), + 10u64 => Some(( + ::alloy_primitives::address!("0x61fFE014bA17989E743c5F6cB21bF9697530B21e"), + None, + )), + 56u64 => Some(( + ::alloy_primitives::address!("0x78D78E420Da98ad378D7799bE8f4AF69033EB077"), + None, + )), + 137u64 => Some(( + ::alloy_primitives::address!("0x61fFE014bA17989E743c5F6cB21bF9697530B21e"), + None, + )), + 8453u64 => Some(( + ::alloy_primitives::address!("0x3d4e44Eb1374240CE5F1B871ab261CD16335B76a"), + None, + )), + 9745u64 => Some(( + ::alloy_primitives::address!("0xaa52bB8110fE38D0d2d2AF0B85C3A3eE622CA455"), + None, + )), + 42161u64 => Some(( + ::alloy_primitives::address!("0x61fFE014bA17989E743c5F6cB21bF9697530B21e"), + None, + )), + 43114u64 => Some(( + ::alloy_primitives::address!("0xbe0F5544EC67e9B3b2D979aaA43f18Fd87E6257F"), + None, + )), + 57073u64 => Some(( + ::alloy_primitives::address!("0x96b572D2d880cf2Fa2563651BD23ADE6f5516652"), + None, + )), + 59144u64 => Some(( + ::alloy_primitives::address!("0x42bE4D6527829FeFA1493e1fb9F3676d2425C3C1"), + None, + )), _ => None, } } @@ -2851,9 +2698,7 @@ pub const fn deployment_block(chain_id: &u64) -> Option { } } impl Instance { - pub fn deployed( - provider: &DynProvider, - ) -> impl Future> + Send { + pub fn deployed(provider: &DynProvider) -> impl Future> + Send { async move { let chain_id = provider .get_chain_id() diff --git a/contracts/generated/contracts-generated/uniswapv3swaprouterv2/src/lib.rs b/contracts/generated/contracts-generated/uniswapv3swaprouterv2/src/lib.rs index 6e8cc73a3f..0bb24e41c1 100644 --- a/contracts/generated/contracts-generated/uniswapv3swaprouterv2/src/lib.rs +++ b/contracts/generated/contracts-generated/uniswapv3swaprouterv2/src/lib.rs @@ -1,4 +1,10 @@ -#![allow(unused_imports, unused_attributes, clippy::all, rustdoc::all, non_snake_case)] +#![allow( + unused_imports, + unused_attributes, + clippy::all, + rustdoc::all, + non_snake_case +)] //! Auto-generated contract bindings. Do not edit. ///Module containing a contract's types and functions. /** @@ -16,12 +22,11 @@ library IV3SwapRouter { clippy::empty_structs_with_brackets )] pub mod IV3SwapRouter { - use super::*; - use alloy_sol_types as alloy_sol_types; + use {super::*, alloy_sol_types}; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**```solidity -struct ExactOutputSingleParams { address tokenIn; address tokenOut; uint24 fee; address recipient; uint256 amountOut; uint256 amountInMaximum; uint160 sqrtPriceLimitX96; } -```*/ + struct ExactOutputSingleParams { address tokenIn; address tokenOut; uint24 fee; address recipient; uint256 amountOut; uint256 amountInMaximum; uint160 sqrtPriceLimitX96; } + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct ExactOutputSingleParams { @@ -47,7 +52,7 @@ struct ExactOutputSingleParams { address tokenIn; address tokenOut; uint24 fee; clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[doc(hidden)] #[allow(dead_code)] type UnderlyingSolTuple<'a> = ( @@ -71,9 +76,7 @@ struct ExactOutputSingleParams { address tokenIn; address tokenOut; uint24 fee; ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -125,108 +128,107 @@ struct ExactOutputSingleParams { address tokenIn; address tokenOut; uint24 fee; ::tokenize( &self.tokenOut, ), - as alloy_sol_types::SolType>::tokenize(&self.fee), + as alloy_sol_types::SolType>::tokenize( + &self.fee, + ), ::tokenize( &self.recipient, ), - as alloy_sol_types::SolType>::tokenize(&self.amountOut), - as alloy_sol_types::SolType>::tokenize(&self.amountInMaximum), - as alloy_sol_types::SolType>::tokenize(&self.sqrtPriceLimitX96), + as alloy_sol_types::SolType>::tokenize( + &self.amountOut, + ), + as alloy_sol_types::SolType>::tokenize( + &self.amountInMaximum, + ), + as alloy_sol_types::SolType>::tokenize( + &self.sqrtPriceLimitX96, + ), ) } + #[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) + 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) + 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) + 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 ExactOutputSingleParams { type RustType = Self; - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + + const ENCODED_SIZE: Option = + as alloy_sol_types::SolType>::ENCODED_SIZE; + const PACKED_ENCODED_SIZE: Option = + as alloy_sol_types::SolType>::PACKED_ENCODED_SIZE; 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); + let tuple = as alloy_sol_types::SolType>::detokenize(token); >>::from(tuple) } } #[automatically_derived] impl alloy_sol_types::SolStruct for ExactOutputSingleParams { const NAME: &'static str = "ExactOutputSingleParams"; + #[inline] fn eip712_root_type() -> alloy_sol_types::private::Cow<'static, str> { alloy_sol_types::private::Cow::Borrowed( - "ExactOutputSingleParams(address tokenIn,address tokenOut,uint24 fee,address recipient,uint256 amountOut,uint256 amountInMaximum,uint160 sqrtPriceLimitX96)", + "ExactOutputSingleParams(address tokenIn,address tokenOut,uint24 fee,address \ + recipient,uint256 amountOut,uint256 amountInMaximum,uint160 \ + sqrtPriceLimitX96)", ) } + #[inline] - fn eip712_components() -> alloy_sol_types::private::Vec< - alloy_sol_types::private::Cow<'static, str>, - > { + fn eip712_components() + -> alloy_sol_types::private::Vec> + { 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 { [ @@ -299,14 +301,13 @@ struct ExactOutputSingleParams { address tokenIn; address tokenOut; uint24 fee; &rust.sqrtPriceLimitX96, ) } + #[inline] fn encode_topic_preimage( rust: &Self::RustType, out: &mut alloy_sol_types::private::Vec, ) { - out.reserve( - ::topic_preimage_length(rust), - ); + out.reserve(::topic_preimage_length(rust)); ::encode_topic_preimage( &rust.tokenIn, out, @@ -341,25 +342,19 @@ struct ExactOutputSingleParams { address tokenIn; address tokenOut; uint24 fee; out, ); } + #[inline] - fn encode_topic( - rust: &Self::RustType, - ) -> alloy_sol_types::abi::token::WordToken { + 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), - ) + ::encode_topic_preimage(rust, &mut out); + alloy_sol_types::abi::token::WordToken(alloy_sol_types::private::keccak256(out)) } } }; - use alloy_contract as alloy_contract; + use alloy_contract; /**Creates a new wrapper around an on-chain [`IV3SwapRouter`](self) contract instance. -See the [wrapper's documentation](`IV3SwapRouterInstance`) for more details.*/ + See the [wrapper's documentation](`IV3SwapRouterInstance`) for more details.*/ #[inline] pub const fn new< P: alloy_contract::private::Provider, @@ -372,15 +367,15 @@ See the [wrapper's documentation](`IV3SwapRouterInstance`) for more details.*/ } /**A [`IV3SwapRouter`](self) instance. -Contains type-safe methods for interacting with an on-chain instance of the -[`IV3SwapRouter`](self) contract located at a given `address`, using a given -provider `P`. + Contains type-safe methods for interacting with an on-chain instance of the + [`IV3SwapRouter`](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. + 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.*/ + See the [module-level documentation](self) for all the available methods.*/ #[derive(Clone)] pub struct IV3SwapRouterInstance { address: alloy_sol_types::private::Address, @@ -391,43 +386,45 @@ See the [module-level documentation](self) for all the available methods.*/ impl ::core::fmt::Debug for IV3SwapRouterInstance { #[inline] fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { - f.debug_tuple("IV3SwapRouterInstance").field(&self.address).finish() + f.debug_tuple("IV3SwapRouterInstance") + .field(&self.address) + .finish() } } /// Instantiation and getters/setters. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > IV3SwapRouterInstance { + impl, N: alloy_contract::private::Network> + IV3SwapRouterInstance + { /**Creates a new wrapper around an on-chain [`IV3SwapRouter`](self) contract instance. -See the [wrapper's documentation](`IV3SwapRouterInstance`) for more details.*/ + See the [wrapper's documentation](`IV3SwapRouterInstance`) for more details.*/ #[inline] - pub const fn new( - address: alloy_sol_types::private::Address, - __provider: P, - ) -> Self { + pub const fn new(address: alloy_sol_types::private::Address, __provider: P) -> Self { Self { address, provider: __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 { @@ -435,7 +432,8 @@ See the [wrapper's documentation](`IV3SwapRouterInstance`) for more details.*/ } } impl IV3SwapRouterInstance<&P, N> { - /// Clones the provider and returns a new instance with the cloned provider. + /// Clones the provider and returns a new instance with the cloned + /// provider. #[inline] pub fn with_cloned_provider(self) -> IV3SwapRouterInstance { IV3SwapRouterInstance { @@ -446,14 +444,15 @@ See the [wrapper's documentation](`IV3SwapRouterInstance`) for more details.*/ } } /// Function calls. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > IV3SwapRouterInstance { - /// Creates a new call builder using this contract instance's provider and address. + impl, N: alloy_contract::private::Network> + IV3SwapRouterInstance + { + /// 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. + /// 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, @@ -462,14 +461,15 @@ See the [wrapper's documentation](`IV3SwapRouterInstance`) for more details.*/ } } /// Event filters. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > IV3SwapRouterInstance { - /// Creates a new event filter using this contract instance's provider and address. + impl, N: alloy_contract::private::Network> + IV3SwapRouterInstance + { + /// 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. + /// 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> { @@ -567,13 +567,12 @@ interface UniswapV3SwapRouterV2 { clippy::empty_structs_with_brackets )] pub mod UniswapV3SwapRouterV2 { - use super::*; - use alloy_sol_types as alloy_sol_types; + use {super::*, alloy_sol_types}; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `exactOutputSingle((address,address,uint24,address,uint256,uint256,uint160))` and selector `0x5023b4df`. -```solidity -function exactOutputSingle(IV3SwapRouter.ExactOutputSingleParams memory params) external payable returns (uint256 amountIn); -```*/ + ```solidity + function exactOutputSingle(IV3SwapRouter.ExactOutputSingleParams memory params) external payable returns (uint256 amountIn); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct exactOutputSingleCall { @@ -581,7 +580,9 @@ function exactOutputSingle(IV3SwapRouter.ExactOutputSingleParams memory params) pub params: ::RustType, } #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`exactOutputSingle((address,address,uint24,address,uint256,uint256,uint160))`](exactOutputSingleCall) function. + ///Container type for the return parameters of the + /// [`exactOutputSingle((address,address,uint24,address,uint256,uint256, + /// uint160))`](exactOutputSingleCall) function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct exactOutputSingleReturn { @@ -595,20 +596,17 @@ function exactOutputSingle(IV3SwapRouter.ExactOutputSingleParams memory params) clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] type UnderlyingSolTuple<'a> = (IV3SwapRouter::ExactOutputSingleParams,); #[doc(hidden)] - type UnderlyingRustTuple<'a> = ( - ::RustType, - ); + type UnderlyingRustTuple<'a> = + (::RustType,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -617,16 +615,14 @@ function exactOutputSingle(IV3SwapRouter.ExactOutputSingleParams memory params) } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From - for UnderlyingRustTuple<'_> { + impl ::core::convert::From for UnderlyingRustTuple<'_> { fn from(value: exactOutputSingleCall) -> Self { (value.params,) } } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From> - for exactOutputSingleCall { + impl ::core::convert::From> for exactOutputSingleCall { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { Self { params: tuple.0 } } @@ -637,14 +633,10 @@ function exactOutputSingle(IV3SwapRouter.ExactOutputSingleParams memory params) #[allow(dead_code)] type UnderlyingSolTuple<'a> = (alloy_sol_types::sol_data::Uint<256>,); #[doc(hidden)] - type UnderlyingRustTuple<'a> = ( - alloy_sol_types::private::primitives::aliases::U256, - ); + 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, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -653,16 +645,14 @@ function exactOutputSingle(IV3SwapRouter.ExactOutputSingleParams memory params) } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From - for UnderlyingRustTuple<'_> { + impl ::core::convert::From for UnderlyingRustTuple<'_> { fn from(value: exactOutputSingleReturn) -> Self { (value.amountIn,) } } #[automatically_derived] #[doc(hidden)] - impl ::core::convert::From> - for exactOutputSingleReturn { + impl ::core::convert::From> for exactOutputSingleReturn { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { Self { amountIn: tuple.0 } } @@ -671,22 +661,22 @@ function exactOutputSingle(IV3SwapRouter.ExactOutputSingleParams memory params) #[automatically_derived] impl alloy_sol_types::SolCall for exactOutputSingleCall { type Parameters<'a> = (IV3SwapRouter::ExactOutputSingleParams,); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = alloy_sol_types::private::primitives::aliases::U256; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (alloy_sol_types::sol_data::Uint<256>,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "exactOutputSingle((address,address,uint24,address,uint256,uint256,uint160))"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [80u8, 35u8, 180u8, 223u8]; + const SIGNATURE: &'static str = + "exactOutputSingle((address,address,uint24,address,uint256,uint256,uint160))"; + #[inline] fn new<'a>( tuple: as alloy_sol_types::SolType>::RustType, ) -> Self { tuple.into() } + #[inline] fn tokenize(&self) -> Self::Token<'_> { ( @@ -695,41 +685,40 @@ function exactOutputSingle(IV3SwapRouter.ExactOutputSingleParams memory params) ), ) } + #[inline] fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { ( - as alloy_sol_types::SolType>::tokenize(ret), + 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| { + as alloy_sol_types::SolType>::abi_decode_sequence(data).map( + |r| { let r: exactOutputSingleReturn = r.into(); r.amountIn - }) + }, + ) } + #[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: exactOutputSingleReturn = r.into(); - r.amountIn - }) + 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: exactOutputSingleReturn = r.into(); + r.amountIn + }) } } }; ///Container for all the [`UniswapV3SwapRouterV2`](self) function calls. #[derive(Clone)] - #[derive()] pub enum UniswapV3SwapRouterV2Calls { #[allow(missing_docs)] exactOutputSingle(exactOutputSingleCall), @@ -737,19 +726,18 @@ function exactOutputSingle(IV3SwapRouter.ExactOutputSingleParams memory params) impl UniswapV3SwapRouterV2Calls { /// 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. + /// 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]] = &[[80u8, 35u8, 180u8, 223u8]]; - /// The names of the variants in the same order as `SELECTORS`. - pub const VARIANT_NAMES: &'static [&'static str] = &[ - ::core::stringify!(exactOutputSingle), - ]; /// The signatures in the same order as `SELECTORS`. - pub const SIGNATURES: &'static [&'static str] = &[ - ::SIGNATURE, - ]; + pub const SIGNATURES: &'static [&'static str] = + &[::SIGNATURE]; + /// The names of the variants in the same order as `SELECTORS`. + pub const VARIANT_NAMES: &'static [&'static str] = &[::core::stringify!(exactOutputSingle)]; + /// Returns the signature for the given selector, if known. #[inline] pub fn signature_by_selector( @@ -762,20 +750,20 @@ function exactOutputSingle(IV3SwapRouter.ExactOutputSingleParams memory params) ::core::result::Result::Err(_) => ::core::option::Option::None, } } + /// Returns the enum variant name for the given selector, if known. #[inline] - pub fn name_by_selector( - selector: [u8; 4usize], - ) -> ::core::option::Option<&'static str> { + pub fn name_by_selector(selector: [u8; 4usize]) -> ::core::option::Option<&'static str> { let sig = Self::signature_by_selector(selector)?; sig.split_once('(').map(|(name, _)| name) } } #[automatically_derived] impl alloy_sol_types::SolInterface for UniswapV3SwapRouterV2Calls { - const NAME: &'static str = "UniswapV3SwapRouterV2Calls"; - const MIN_DATA_LENGTH: usize = 224usize; const COUNT: usize = 1usize; + const MIN_DATA_LENGTH: usize = 224usize; + const NAME: &'static str = "UniswapV3SwapRouterV2Calls"; + #[inline] fn selector(&self) -> [u8; 4] { match self { @@ -784,45 +772,41 @@ function exactOutputSingle(IV3SwapRouter.ExactOutputSingleParams memory params) } } } + #[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 { + fn abi_decode_raw(selector: [u8; 4], data: &[u8]) -> alloy_sol_types::Result { static DECODE_SHIMS: &[fn( &[u8], - ) -> alloy_sol_types::Result] = &[ - { - fn exactOutputSingle( - data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, - ) - .map(UniswapV3SwapRouterV2Calls::exactOutputSingle) - } - exactOutputSingle - }, - ]; + ) + -> alloy_sol_types::Result] = &[{ + fn exactOutputSingle( + data: &[u8], + ) -> alloy_sol_types::Result { + ::abi_decode_raw(data) + .map(UniswapV3SwapRouterV2Calls::exactOutputSingle) + } + exactOutputSingle + }]; let Ok(idx) = Self::SELECTORS.binary_search(&selector) else { - return Err( - alloy_sol_types::Error::unknown_selector( - ::NAME, - selector, - ), - ); + return Err(alloy_sol_types::Error::unknown_selector( + ::NAME, + selector, + )); }; DECODE_SHIMS[idx](data) } + #[inline] #[allow(non_snake_case)] fn abi_decode_raw_validate( @@ -831,55 +815,50 @@ function exactOutputSingle(IV3SwapRouter.ExactOutputSingleParams memory params) ) -> alloy_sol_types::Result { static DECODE_VALIDATE_SHIMS: &[fn( &[u8], - ) -> alloy_sol_types::Result] = &[ - { - fn exactOutputSingle( - data: &[u8], - ) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) - .map(UniswapV3SwapRouterV2Calls::exactOutputSingle) - } - exactOutputSingle - }, - ]; + ) -> alloy_sol_types::Result< + UniswapV3SwapRouterV2Calls, + >] = &[{ + fn exactOutputSingle( + data: &[u8], + ) -> alloy_sol_types::Result { + ::abi_decode_raw_validate( + data, + ) + .map(UniswapV3SwapRouterV2Calls::exactOutputSingle) + } + exactOutputSingle + }]; let Ok(idx) = Self::SELECTORS.binary_search(&selector) else { - return Err( - alloy_sol_types::Error::unknown_selector( - ::NAME, - selector, - ), - ); + 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::exactOutputSingle(inner) => { - ::abi_encoded_size( - inner, - ) + ::abi_encoded_size(inner) } } } + #[inline] fn abi_encode_raw(&self, out: &mut alloy_sol_types::private::Vec) { match self { Self::exactOutputSingle(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } } } } - use alloy_contract as alloy_contract; + use alloy_contract; /**Creates a new wrapper around an on-chain [`UniswapV3SwapRouterV2`](self) contract instance. -See the [wrapper's documentation](`UniswapV3SwapRouterV2Instance`) for more details.*/ + See the [wrapper's documentation](`UniswapV3SwapRouterV2Instance`) for more details.*/ #[inline] pub const fn new< P: alloy_contract::private::Provider, @@ -892,15 +871,15 @@ See the [wrapper's documentation](`UniswapV3SwapRouterV2Instance`) for more deta } /**A [`UniswapV3SwapRouterV2`](self) instance. -Contains type-safe methods for interacting with an on-chain instance of the -[`UniswapV3SwapRouterV2`](self) contract located at a given `address`, using a given -provider `P`. + Contains type-safe methods for interacting with an on-chain instance of the + [`UniswapV3SwapRouterV2`](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. + 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.*/ + See the [module-level documentation](self) for all the available methods.*/ #[derive(Clone)] pub struct UniswapV3SwapRouterV2Instance { address: alloy_sol_types::private::Address, @@ -911,43 +890,45 @@ See the [module-level documentation](self) for all the available methods.*/ impl ::core::fmt::Debug for UniswapV3SwapRouterV2Instance { #[inline] fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { - f.debug_tuple("UniswapV3SwapRouterV2Instance").field(&self.address).finish() + f.debug_tuple("UniswapV3SwapRouterV2Instance") + .field(&self.address) + .finish() } } /// Instantiation and getters/setters. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > UniswapV3SwapRouterV2Instance { + impl, N: alloy_contract::private::Network> + UniswapV3SwapRouterV2Instance + { /**Creates a new wrapper around an on-chain [`UniswapV3SwapRouterV2`](self) contract instance. -See the [wrapper's documentation](`UniswapV3SwapRouterV2Instance`) for more details.*/ + See the [wrapper's documentation](`UniswapV3SwapRouterV2Instance`) for more details.*/ #[inline] - pub const fn new( - address: alloy_sol_types::private::Address, - __provider: P, - ) -> Self { + pub const fn new(address: alloy_sol_types::private::Address, __provider: P) -> Self { Self { address, provider: __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 { @@ -955,7 +936,8 @@ See the [wrapper's documentation](`UniswapV3SwapRouterV2Instance`) for more deta } } impl UniswapV3SwapRouterV2Instance<&P, N> { - /// Clones the provider and returns a new instance with the cloned provider. + /// Clones the provider and returns a new instance with the cloned + /// provider. #[inline] pub fn with_cloned_provider(self) -> UniswapV3SwapRouterV2Instance { UniswapV3SwapRouterV2Instance { @@ -966,20 +948,22 @@ See the [wrapper's documentation](`UniswapV3SwapRouterV2Instance`) for more deta } } /// Function calls. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > UniswapV3SwapRouterV2Instance { - /// Creates a new call builder using this contract instance's provider and address. + impl, N: alloy_contract::private::Network> + UniswapV3SwapRouterV2Instance + { + /// 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. + /// 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 [`exactOutputSingle`] function. pub fn exactOutputSingle( &self, @@ -989,14 +973,15 @@ See the [wrapper's documentation](`UniswapV3SwapRouterV2Instance`) for more deta } } /// Event filters. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > UniswapV3SwapRouterV2Instance { - /// Creates a new event filter using this contract instance's provider and address. + impl, N: alloy_contract::private::Network> + UniswapV3SwapRouterV2Instance + { + /// 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. + /// 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> { @@ -1004,97 +989,56 @@ See the [wrapper's documentation](`UniswapV3SwapRouterV2Instance`) for more deta } } } -pub type Instance = UniswapV3SwapRouterV2::UniswapV3SwapRouterV2Instance< - ::alloy_provider::DynProvider, ->; +pub type Instance = + UniswapV3SwapRouterV2::UniswapV3SwapRouterV2Instance<::alloy_provider::DynProvider>; use { - std::{sync::LazyLock, collections::HashMap}, - anyhow::{Result, Context}, - alloy_primitives::{address, Address}, - alloy_provider::{Provider, DynProvider}, + alloy_primitives::{Address, address}, + alloy_provider::{DynProvider, Provider}, + anyhow::{Context, Result}, + std::{collections::HashMap, sync::LazyLock}, }; pub const fn deployment_info(chain_id: u64) -> Option<(Address, Option)> { match chain_id { - 1u64 => { - Some(( - ::alloy_primitives::address!( - "0x68b3465833fb72A70ecDF485E0e4C7bD8665Fc45" - ), - None, - )) - } - 10u64 => { - Some(( - ::alloy_primitives::address!( - "0x68b3465833fb72A70ecDF485E0e4C7bD8665Fc45" - ), - None, - )) - } - 56u64 => { - Some(( - ::alloy_primitives::address!( - "0xB971eF87ede563556b2ED4b1C0b0019111Dd85d2" - ), - None, - )) - } - 137u64 => { - Some(( - ::alloy_primitives::address!( - "0x68b3465833fb72A70ecDF485E0e4C7bD8665Fc45" - ), - None, - )) - } - 8453u64 => { - Some(( - ::alloy_primitives::address!( - "0x2626664c2603336E57B271c5C0b26F421741e481" - ), - None, - )) - } - 9745u64 => { - Some(( - ::alloy_primitives::address!( - "0x807F4E281B7A3B324825C64ca53c69F0b418dE40" - ), - None, - )) - } - 42161u64 => { - Some(( - ::alloy_primitives::address!( - "0x68b3465833fb72A70ecDF485E0e4C7bD8665Fc45" - ), - None, - )) - } - 43114u64 => { - Some(( - ::alloy_primitives::address!( - "0xbb00FF08d01D300023C629E8fFfFcb65A5a578cE" - ), - None, - )) - } - 57073u64 => { - Some(( - ::alloy_primitives::address!( - "0x177778F19E89dD1012BdBe603F144088A95C4B53" - ), - None, - )) - } - 59144u64 => { - Some(( - ::alloy_primitives::address!( - "0x3d4e44Eb1374240CE5F1B871ab261CD16335B76a" - ), - None, - )) - } + 1u64 => Some(( + ::alloy_primitives::address!("0x68b3465833fb72A70ecDF485E0e4C7bD8665Fc45"), + None, + )), + 10u64 => Some(( + ::alloy_primitives::address!("0x68b3465833fb72A70ecDF485E0e4C7bD8665Fc45"), + None, + )), + 56u64 => Some(( + ::alloy_primitives::address!("0xB971eF87ede563556b2ED4b1C0b0019111Dd85d2"), + None, + )), + 137u64 => Some(( + ::alloy_primitives::address!("0x68b3465833fb72A70ecDF485E0e4C7bD8665Fc45"), + None, + )), + 8453u64 => Some(( + ::alloy_primitives::address!("0x2626664c2603336E57B271c5C0b26F421741e481"), + None, + )), + 9745u64 => Some(( + ::alloy_primitives::address!("0x807F4E281B7A3B324825C64ca53c69F0b418dE40"), + None, + )), + 42161u64 => Some(( + ::alloy_primitives::address!("0x68b3465833fb72A70ecDF485E0e4C7bD8665Fc45"), + None, + )), + 43114u64 => Some(( + ::alloy_primitives::address!("0xbb00FF08d01D300023C629E8fFfFcb65A5a578cE"), + None, + )), + 57073u64 => Some(( + ::alloy_primitives::address!("0x177778F19E89dD1012BdBe603F144088A95C4B53"), + None, + )), + 59144u64 => Some(( + ::alloy_primitives::address!("0x3d4e44Eb1374240CE5F1B871ab261CD16335B76a"), + None, + )), _ => None, } } @@ -1111,9 +1055,7 @@ pub const fn deployment_block(chain_id: &u64) -> Option { } } impl Instance { - pub fn deployed( - provider: &DynProvider, - ) -> impl Future> + Send { + pub fn deployed(provider: &DynProvider) -> impl Future> + Send { async move { let chain_id = provider .get_chain_id() diff --git a/contracts/generated/contracts-generated/weth9/src/lib.rs b/contracts/generated/contracts-generated/weth9/src/lib.rs index 8fb08cf46c..dc0b098bb5 100644 --- a/contracts/generated/contracts-generated/weth9/src/lib.rs +++ b/contracts/generated/contracts-generated/weth9/src/lib.rs @@ -1,4 +1,10 @@ -#![allow(unused_imports, unused_attributes, clippy::all, rustdoc::all, non_snake_case)] +#![allow( + unused_imports, + unused_attributes, + clippy::all, + rustdoc::all, + non_snake_case +)] //! Auto-generated contract bindings. Do not edit. /** @@ -280,8 +286,7 @@ interface WETH9 { clippy::empty_structs_with_brackets )] pub mod WETH9 { - use super::*; - use alloy_sol_types as alloy_sol_types; + use {super::*, alloy_sol_types}; /// The creation / init bytecode of the contract. /// /// ```text @@ -294,9 +299,9 @@ pub mod WETH9 { ); #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Event with signature `Approval(address,address,uint256)` and selector `0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925`. -```solidity -event Approval(address indexed src, address indexed guy, uint256 wad); -```*/ + ```solidity + event Approval(address indexed src, address indexed guy, uint256 wad); + ```*/ #[allow( non_camel_case_types, non_snake_case, @@ -319,25 +324,26 @@ event Approval(address indexed src, address indexed guy, uint256 wad); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[automatically_derived] impl alloy_sol_types::SolEvent for Approval { + type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; 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; + 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, + ]); + #[allow(unused_variables)] #[inline] fn new( @@ -350,33 +356,39 @@ event Approval(address indexed src, address indexed guy, uint256 wad); wad: 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, - ), - ); + 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.wad), + as alloy_sol_types::SolType>::tokenize( + &self.wad, + ), ) } + #[inline] fn topics(&self) -> ::RustType { - (Self::SIGNATURE_HASH.into(), self.src.clone(), self.guy.clone()) + ( + Self::SIGNATURE_HASH.into(), + self.src.clone(), + self.guy.clone(), + ) } + #[inline] fn encode_topics_raw( &self, @@ -385,9 +397,7 @@ event Approval(address indexed src, address indexed guy, uint256 wad); if out.len() < ::COUNT { return Err(alloy_sol_types::Error::Overrun); } - out[0usize] = alloy_sol_types::abi::token::WordToken( - Self::SIGNATURE_HASH, - ); + out[0usize] = alloy_sol_types::abi::token::WordToken(Self::SIGNATURE_HASH); out[1usize] = ::encode_topic( &self.src, ); @@ -402,6 +412,7 @@ event Approval(address indexed src, address indexed guy, uint256 wad); 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) } @@ -416,9 +427,9 @@ event Approval(address indexed src, address indexed guy, uint256 wad); }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Event with signature `Deposit(address,uint256)` and selector `0xe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c`. -```solidity -event Deposit(address indexed dst, uint256 wad); -```*/ + ```solidity + event Deposit(address indexed dst, uint256 wad); + ```*/ #[allow( non_camel_case_types, non_snake_case, @@ -439,59 +450,65 @@ event Deposit(address indexed dst, uint256 wad); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[automatically_derived] impl alloy_sol_types::SolEvent for Deposit { + type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; 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, ); - const SIGNATURE: &'static str = "Deposit(address,uint256)"; - const SIGNATURE_HASH: alloy_sol_types::private::B256 = alloy_sol_types::private::B256::new([ - 225u8, 255u8, 252u8, 196u8, 146u8, 61u8, 4u8, 181u8, 89u8, 244u8, 210u8, - 154u8, 139u8, 252u8, 108u8, 218u8, 4u8, 235u8, 91u8, 13u8, 60u8, 70u8, - 7u8, 81u8, 194u8, 64u8, 44u8, 92u8, 92u8, 201u8, 16u8, 156u8, - ]); + const ANONYMOUS: bool = false; + const SIGNATURE: &'static str = "Deposit(address,uint256)"; + const SIGNATURE_HASH: alloy_sol_types::private::B256 = + alloy_sol_types::private::B256::new([ + 225u8, 255u8, 252u8, 196u8, 146u8, 61u8, 4u8, 181u8, 89u8, 244u8, 210u8, 154u8, + 139u8, 252u8, 108u8, 218u8, 4u8, 235u8, 91u8, 13u8, 60u8, 70u8, 7u8, 81u8, + 194u8, 64u8, 44u8, 92u8, 92u8, 201u8, 16u8, 156u8, + ]); + #[allow(unused_variables)] #[inline] fn new( topics: ::RustType, data: as alloy_sol_types::SolType>::RustType, ) -> Self { - Self { dst: topics.1, wad: data.0 } + Self { + dst: topics.1, + wad: 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, - ), - ); + 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.wad), + as alloy_sol_types::SolType>::tokenize( + &self.wad, + ), ) } + #[inline] fn topics(&self) -> ::RustType { (Self::SIGNATURE_HASH.into(), self.dst.clone()) } + #[inline] fn encode_topics_raw( &self, @@ -500,9 +517,7 @@ event Deposit(address indexed dst, uint256 wad); if out.len() < ::COUNT { return Err(alloy_sol_types::Error::Overrun); } - out[0usize] = alloy_sol_types::abi::token::WordToken( - Self::SIGNATURE_HASH, - ); + out[0usize] = alloy_sol_types::abi::token::WordToken(Self::SIGNATURE_HASH); out[1usize] = ::encode_topic( &self.dst, ); @@ -514,6 +529,7 @@ event Deposit(address indexed dst, uint256 wad); 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) } @@ -528,9 +544,9 @@ event Deposit(address indexed dst, uint256 wad); }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Event with signature `Transfer(address,address,uint256)` and selector `0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef`. -```solidity -event Transfer(address indexed src, address indexed dst, uint256 wad); -```*/ + ```solidity + event Transfer(address indexed src, address indexed dst, uint256 wad); + ```*/ #[allow( non_camel_case_types, non_snake_case, @@ -553,25 +569,26 @@ event Transfer(address indexed src, address indexed dst, uint256 wad); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[automatically_derived] impl alloy_sol_types::SolEvent for Transfer { + type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; 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; + 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, + ]); + #[allow(unused_variables)] #[inline] fn new( @@ -584,33 +601,39 @@ event Transfer(address indexed src, address indexed dst, uint256 wad); wad: 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, - ), - ); + 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.wad), + as alloy_sol_types::SolType>::tokenize( + &self.wad, + ), ) } + #[inline] fn topics(&self) -> ::RustType { - (Self::SIGNATURE_HASH.into(), self.src.clone(), self.dst.clone()) + ( + Self::SIGNATURE_HASH.into(), + self.src.clone(), + self.dst.clone(), + ) } + #[inline] fn encode_topics_raw( &self, @@ -619,9 +642,7 @@ event Transfer(address indexed src, address indexed dst, uint256 wad); if out.len() < ::COUNT { return Err(alloy_sol_types::Error::Overrun); } - out[0usize] = alloy_sol_types::abi::token::WordToken( - Self::SIGNATURE_HASH, - ); + out[0usize] = alloy_sol_types::abi::token::WordToken(Self::SIGNATURE_HASH); out[1usize] = ::encode_topic( &self.src, ); @@ -636,6 +657,7 @@ event Transfer(address indexed src, address indexed dst, uint256 wad); 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) } @@ -650,9 +672,9 @@ event Transfer(address indexed src, address indexed dst, uint256 wad); }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Event with signature `Withdrawal(address,uint256)` and selector `0x7fcf532c15f0a6db0bd6d0e038bea71d30d808c7d98cb3bf7268a95bf5081b65`. -```solidity -event Withdrawal(address indexed src, uint256 wad); -```*/ + ```solidity + event Withdrawal(address indexed src, uint256 wad); + ```*/ #[allow( non_camel_case_types, non_snake_case, @@ -673,59 +695,65 @@ event Withdrawal(address indexed src, uint256 wad); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; #[automatically_derived] impl alloy_sol_types::SolEvent for Withdrawal { + type DataToken<'a> = as alloy_sol_types::SolType>::Token<'a>; 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, ); - const SIGNATURE: &'static str = "Withdrawal(address,uint256)"; - const SIGNATURE_HASH: alloy_sol_types::private::B256 = alloy_sol_types::private::B256::new([ - 127u8, 207u8, 83u8, 44u8, 21u8, 240u8, 166u8, 219u8, 11u8, 214u8, 208u8, - 224u8, 56u8, 190u8, 167u8, 29u8, 48u8, 216u8, 8u8, 199u8, 217u8, 140u8, - 179u8, 191u8, 114u8, 104u8, 169u8, 91u8, 245u8, 8u8, 27u8, 101u8, - ]); + const ANONYMOUS: bool = false; + const SIGNATURE: &'static str = "Withdrawal(address,uint256)"; + const SIGNATURE_HASH: alloy_sol_types::private::B256 = + alloy_sol_types::private::B256::new([ + 127u8, 207u8, 83u8, 44u8, 21u8, 240u8, 166u8, 219u8, 11u8, 214u8, 208u8, 224u8, + 56u8, 190u8, 167u8, 29u8, 48u8, 216u8, 8u8, 199u8, 217u8, 140u8, 179u8, 191u8, + 114u8, 104u8, 169u8, 91u8, 245u8, 8u8, 27u8, 101u8, + ]); + #[allow(unused_variables)] #[inline] fn new( topics: ::RustType, data: as alloy_sol_types::SolType>::RustType, ) -> Self { - Self { src: topics.1, wad: data.0 } + Self { + src: topics.1, + wad: 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, - ), - ); + 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.wad), + as alloy_sol_types::SolType>::tokenize( + &self.wad, + ), ) } + #[inline] fn topics(&self) -> ::RustType { (Self::SIGNATURE_HASH.into(), self.src.clone()) } + #[inline] fn encode_topics_raw( &self, @@ -734,9 +762,7 @@ event Withdrawal(address indexed src, uint256 wad); if out.len() < ::COUNT { return Err(alloy_sol_types::Error::Overrun); } - out[0usize] = alloy_sol_types::abi::token::WordToken( - Self::SIGNATURE_HASH, - ); + out[0usize] = alloy_sol_types::abi::token::WordToken(Self::SIGNATURE_HASH); out[1usize] = ::encode_topic( &self.src, ); @@ -748,6 +774,7 @@ event Withdrawal(address indexed src, uint256 wad); 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) } @@ -762,9 +789,9 @@ event Withdrawal(address indexed src, uint256 wad); }; #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `allowance(address,address)` and selector `0xdd62ed3e`. -```solidity -function allowance(address, address) external view returns (uint256); -```*/ + ```solidity + function allowance(address, address) external view returns (uint256); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct allowanceCall { @@ -774,7 +801,8 @@ function allowance(address, address) external view returns (uint256); pub _1: alloy_sol_types::private::Address, } #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`allowance(address,address)`](allowanceCall) function. + ///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 { @@ -788,7 +816,7 @@ function allowance(address, address) external view returns (uint256); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -803,9 +831,7 @@ function allowance(address, address) external view returns (uint256); ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -823,7 +849,10 @@ function allowance(address, address) external view returns (uint256); #[doc(hidden)] impl ::core::convert::From> for allowanceCall { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { - Self { _0: tuple.0, _1: tuple.1 } + Self { + _0: tuple.0, + _1: tuple.1, + } } } } @@ -832,14 +861,10 @@ function allowance(address, address) external view returns (uint256); #[allow(dead_code)] type UnderlyingSolTuple<'a> = (alloy_sol_types::sol_data::Uint<256>,); #[doc(hidden)] - type UnderlyingRustTuple<'a> = ( - alloy_sol_types::private::primitives::aliases::U256, - ); + 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, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -867,22 +892,21 @@ function allowance(address, address) external view returns (uint256); 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 ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; 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)"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [221u8, 98u8, 237u8, 62u8]; + const SIGNATURE: &'static str = "allowance(address,address)"; + #[inline] fn new<'a>( tuple: as alloy_sol_types::SolType>::RustType, ) -> Self { tuple.into() } + #[inline] fn tokenize(&self) -> Self::Token<'_> { ( @@ -894,43 +918,43 @@ function allowance(address, address) external view returns (uint256); ), ) } + #[inline] fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { ( - as alloy_sol_types::SolType>::tokenize(ret), + 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| { + 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 - }) + 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(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `approve(address,uint256)` and selector `0x095ea7b3`. -```solidity -function approve(address guy, uint256 wad) external returns (bool); -```*/ + ```solidity + function approve(address guy, uint256 wad) external returns (bool); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct approveCall { @@ -940,7 +964,8 @@ function approve(address guy, uint256 wad) external returns (bool); pub wad: alloy_sol_types::private::primitives::aliases::U256, } #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`approve(address,uint256)`](approveCall) function. + ///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 { @@ -954,7 +979,7 @@ function approve(address guy, uint256 wad) external returns (bool); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -969,9 +994,7 @@ function approve(address guy, uint256 wad) external returns (bool); ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -989,7 +1012,10 @@ function approve(address guy, uint256 wad) external returns (bool); #[doc(hidden)] impl ::core::convert::From> for approveCall { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { - Self { guy: tuple.0, wad: tuple.1 } + Self { + guy: tuple.0, + wad: tuple.1, + } } } } @@ -1001,9 +1027,7 @@ function approve(address guy, uint256 wad) external returns (bool); type UnderlyingRustTuple<'a> = (bool,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1031,75 +1055,71 @@ function approve(address guy, uint256 wad) external returns (bool); 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 ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; 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)"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [9u8, 94u8, 167u8, 179u8]; + const SIGNATURE: &'static str = "approve(address,uint256)"; + #[inline] fn new<'a>( tuple: as alloy_sol_types::SolType>::RustType, ) -> Self { tuple.into() } + #[inline] fn tokenize(&self) -> Self::Token<'_> { ( ::tokenize( &self.guy, ), - as alloy_sol_types::SolType>::tokenize(&self.wad), + as alloy_sol_types::SolType>::tokenize( + &self.wad, + ), ) } + #[inline] fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { - ( - ::tokenize( - ret, - ), - ) + (::tokenize(ret),) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) - .map(|r| { + 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 - }) + 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(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `balanceOf(address)` and selector `0x70a08231`. -```solidity -function balanceOf(address) external view returns (uint256); -```*/ + ```solidity + function balanceOf(address) external view returns (uint256); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct balanceOfCall(pub alloy_sol_types::private::Address); #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`balanceOf(address)`](balanceOfCall) function. + ///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 { @@ -1113,7 +1133,7 @@ function balanceOf(address) external view returns (uint256); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -1122,9 +1142,7 @@ function balanceOf(address) external view returns (uint256); type UnderlyingRustTuple<'a> = (alloy_sol_types::private::Address,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1151,14 +1169,10 @@ function balanceOf(address) external view returns (uint256); #[allow(dead_code)] type UnderlyingSolTuple<'a> = (alloy_sol_types::sol_data::Uint<256>,); #[doc(hidden)] - type UnderlyingRustTuple<'a> = ( - alloy_sol_types::private::primitives::aliases::U256, - ); + 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, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1183,22 +1197,21 @@ function balanceOf(address) external view returns (uint256); #[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 ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; 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)"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [112u8, 160u8, 130u8, 49u8]; + const SIGNATURE: &'static str = "balanceOf(address)"; + #[inline] fn new<'a>( tuple: as alloy_sol_types::SolType>::RustType, ) -> Self { tuple.into() } + #[inline] fn tokenize(&self) -> Self::Token<'_> { ( @@ -1207,48 +1220,49 @@ function balanceOf(address) external view returns (uint256); ), ) } + #[inline] fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { ( - as alloy_sol_types::SolType>::tokenize(ret), + 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| { + 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 - }) + 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(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `decimals()` and selector `0x313ce567`. -```solidity -function decimals() external view returns (uint8); -```*/ + ```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(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`decimals()`](decimalsCall) function. + ///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 { @@ -1262,7 +1276,7 @@ function decimals() external view returns (uint8); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -1271,9 +1285,7 @@ function decimals() external view returns (uint8); type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1303,9 +1315,7 @@ function decimals() external view returns (uint8); type UnderlyingRustTuple<'a> = (u8,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1330,67 +1340,63 @@ function decimals() external view returns (uint8); #[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 ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; 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()"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [49u8, 60u8, 229u8, 103u8]; + const SIGNATURE: &'static str = "decimals()"; + #[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), - ) + ( 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| { + 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 - }) + 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(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `deposit()` and selector `0xd0e30db0`. -```solidity -function deposit() external payable; -```*/ + ```solidity + function deposit() external payable; + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct depositCall; - ///Container type for the return parameters of the [`deposit()`](depositCall) function. + ///Container type for the return parameters of the + /// [`deposit()`](depositCall) function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct depositReturn {} @@ -1401,7 +1407,7 @@ function deposit() external payable; clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -1410,9 +1416,7 @@ function deposit() external payable; type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1442,9 +1446,7 @@ function deposit() external payable; type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1467,67 +1469,64 @@ function deposit() external payable; } } impl depositReturn { - fn _tokenize( - &self, - ) -> ::ReturnToken<'_> { + fn _tokenize(&self) -> ::ReturnToken<'_> { () } } #[automatically_derived] impl alloy_sol_types::SolCall for depositCall { type Parameters<'a> = (); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = depositReturn; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "deposit()"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [208u8, 227u8, 13u8, 176u8]; + const SIGNATURE: &'static str = "deposit()"; + #[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<'_> { depositReturn::_tokenize(ret) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) + 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) + 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(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `name()` and selector `0x06fdde03`. -```solidity -function name() external view returns (string memory); -```*/ + ```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(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`name()`](nameCall) function. + ///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 { @@ -1541,7 +1540,7 @@ function name() external view returns (string memory); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -1550,9 +1549,7 @@ function name() external view returns (string memory); type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1582,9 +1579,7 @@ function name() external view returns (string memory); type UnderlyingRustTuple<'a> = (alloy_sol_types::private::String,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1609,68 +1604,64 @@ function name() external view returns (string memory); #[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 ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (alloy_sol_types::sol_data::String,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "name()"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [6u8, 253u8, 222u8, 3u8]; + const SIGNATURE: &'static str = "name()"; + #[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, - ), - ) + (::tokenize(ret),) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) - .map(|r| { + 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 - }) + 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(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `symbol()` and selector `0x95d89b41`. -```solidity -function symbol() external view returns (string memory); -```*/ + ```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(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`symbol()`](symbolCall) function. + ///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 { @@ -1684,7 +1675,7 @@ function symbol() external view returns (string memory); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -1693,9 +1684,7 @@ function symbol() external view returns (string memory); type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1725,9 +1714,7 @@ function symbol() external view returns (string memory); type UnderlyingRustTuple<'a> = (alloy_sol_types::private::String,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1752,63 +1739,58 @@ function symbol() external view returns (string memory); #[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 ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (alloy_sol_types::sol_data::String,); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "symbol()"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [149u8, 216u8, 155u8, 65u8]; + const SIGNATURE: &'static str = "symbol()"; + #[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, - ), - ) + (::tokenize(ret),) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) - .map(|r| { + 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 - }) + 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(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `transfer(address,uint256)` and selector `0xa9059cbb`. -```solidity -function transfer(address dst, uint256 wad) external returns (bool); -```*/ + ```solidity + function transfer(address dst, uint256 wad) external returns (bool); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct transferCall { @@ -1818,7 +1800,8 @@ function transfer(address dst, uint256 wad) external returns (bool); pub wad: alloy_sol_types::private::primitives::aliases::U256, } #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`transfer(address,uint256)`](transferCall) function. + ///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 { @@ -1832,7 +1815,7 @@ function transfer(address dst, uint256 wad) external returns (bool); clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -1847,9 +1830,7 @@ function transfer(address dst, uint256 wad) external returns (bool); ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1867,7 +1848,10 @@ function transfer(address dst, uint256 wad) external returns (bool); #[doc(hidden)] impl ::core::convert::From> for transferCall { fn from(tuple: UnderlyingRustTuple<'_>) -> Self { - Self { dst: tuple.0, wad: tuple.1 } + Self { + dst: tuple.0, + wad: tuple.1, + } } } } @@ -1879,9 +1863,7 @@ function transfer(address dst, uint256 wad) external returns (bool); type UnderlyingRustTuple<'a> = (bool,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -1909,70 +1891,65 @@ function transfer(address dst, uint256 wad) external returns (bool); 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 ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; 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)"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [169u8, 5u8, 156u8, 187u8]; + const SIGNATURE: &'static str = "transfer(address,uint256)"; + #[inline] fn new<'a>( tuple: as alloy_sol_types::SolType>::RustType, ) -> Self { tuple.into() } + #[inline] fn tokenize(&self) -> Self::Token<'_> { ( ::tokenize( &self.dst, ), - as alloy_sol_types::SolType>::tokenize(&self.wad), + as alloy_sol_types::SolType>::tokenize( + &self.wad, + ), ) } + #[inline] fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { - ( - ::tokenize( - ret, - ), - ) + (::tokenize(ret),) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) - .map(|r| { + 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 - }) + 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(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `transferFrom(address,address,uint256)` and selector `0x23b872dd`. -```solidity -function transferFrom(address src, address dst, uint256 wad) external returns (bool); -```*/ + ```solidity + function transferFrom(address src, address dst, uint256 wad) external returns (bool); + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct transferFromCall { @@ -1984,7 +1961,8 @@ function transferFrom(address src, address dst, uint256 wad) external returns (b pub wad: alloy_sol_types::private::primitives::aliases::U256, } #[derive(Default, Debug, PartialEq, Eq, Hash)] - ///Container type for the return parameters of the [`transferFrom(address,address,uint256)`](transferFromCall) function. + ///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 { @@ -1998,7 +1976,7 @@ function transferFrom(address src, address dst, uint256 wad) external returns (b clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] @@ -2015,9 +1993,7 @@ function transferFrom(address src, address dst, uint256 wad) external returns (b ); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -2051,9 +2027,7 @@ function transferFrom(address src, address dst, uint256 wad) external returns (b type UnderlyingRustTuple<'a> = (bool,); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -2082,22 +2056,21 @@ function transferFrom(address src, address dst, uint256 wad) external returns (b 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 ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; 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)"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [35u8, 184u8, 114u8, 221u8]; + const SIGNATURE: &'static str = "transferFrom(address,address,uint256)"; + #[inline] fn new<'a>( tuple: as alloy_sol_types::SolType>::RustType, ) -> Self { tuple.into() } + #[inline] fn tokenize(&self) -> Self::Token<'_> { ( @@ -2107,55 +2080,52 @@ function transferFrom(address src, address dst, uint256 wad) external returns (b ::tokenize( &self.dst, ), - as alloy_sol_types::SolType>::tokenize(&self.wad), + as alloy_sol_types::SolType>::tokenize( + &self.wad, + ), ) } + #[inline] fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { - ( - ::tokenize( - ret, - ), - ) + (::tokenize(ret),) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) - .map(|r| { + 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 - }) + 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(Default, Debug, PartialEq, Eq, Hash)] /**Function with signature `withdraw(uint256)` and selector `0x2e1a7d4d`. -```solidity -function withdraw(uint256 wad) external; -```*/ + ```solidity + function withdraw(uint256 wad) external; + ```*/ #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct withdrawCall { #[allow(missing_docs)] pub wad: alloy_sol_types::private::primitives::aliases::U256, } - ///Container type for the return parameters of the [`withdraw(uint256)`](withdrawCall) function. + ///Container type for the return parameters of the + /// [`withdraw(uint256)`](withdrawCall) function. #[allow(non_camel_case_types, non_snake_case, clippy::pub_underscore_fields)] #[derive(Clone)] pub struct withdrawReturn {} @@ -2166,20 +2136,16 @@ function withdraw(uint256 wad) external; clippy::style )] const _: () = { - use alloy_sol_types as alloy_sol_types; + use alloy_sol_types; { #[doc(hidden)] #[allow(dead_code)] type UnderlyingSolTuple<'a> = (alloy_sol_types::sol_data::Uint<256>,); #[doc(hidden)] - type UnderlyingRustTuple<'a> = ( - alloy_sol_types::private::primitives::aliases::U256, - ); + 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, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -2209,9 +2175,7 @@ function withdraw(uint256 wad) external; type UnderlyingRustTuple<'a> = (); #[cfg(test)] #[allow(dead_code, unreachable_patterns)] - fn _type_assertion( - _t: alloy_sol_types::private::AssertTypeEq, - ) { + fn _type_assertion(_t: alloy_sol_types::private::AssertTypeEq) { match _t { alloy_sol_types::private::AssertTypeEq::< ::RustType, @@ -2234,64 +2198,59 @@ function withdraw(uint256 wad) external; } } impl withdrawReturn { - fn _tokenize( - &self, - ) -> ::ReturnToken<'_> { + fn _tokenize(&self) -> ::ReturnToken<'_> { () } } #[automatically_derived] impl alloy_sol_types::SolCall for withdrawCall { type Parameters<'a> = (alloy_sol_types::sol_data::Uint<256>,); - type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; type Return = withdrawReturn; + type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; type ReturnTuple<'a> = (); - type ReturnToken<'a> = as alloy_sol_types::SolType>::Token<'a>; - const SIGNATURE: &'static str = "withdraw(uint256)"; + type Token<'a> = as alloy_sol_types::SolType>::Token<'a>; + const SELECTOR: [u8; 4] = [46u8, 26u8, 125u8, 77u8]; + const SIGNATURE: &'static str = "withdraw(uint256)"; + #[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.wad), + as alloy_sol_types::SolType>::tokenize( + &self.wad, + ), ) } + #[inline] fn tokenize_returns(ret: &Self::Return) -> Self::ReturnToken<'_> { withdrawReturn::_tokenize(ret) } + #[inline] fn abi_decode_returns(data: &[u8]) -> alloy_sol_types::Result { - as alloy_sol_types::SolType>::abi_decode_sequence(data) + 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) + 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 [`WETH9`](self) function calls. #[derive(Clone)] - #[derive()] pub enum WETH9Calls { #[allow(missing_docs)] allowance(allowanceCall), @@ -2317,8 +2276,9 @@ function withdraw(uint256 wad) external; impl WETH9Calls { /// 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. + /// 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]] = &[ @@ -2333,19 +2293,6 @@ function withdraw(uint256 wad) external; [208u8, 227u8, 13u8, 176u8], [221u8, 98u8, 237u8, 62u8], ]; - /// The names of the variants in the same order as `SELECTORS`. - pub const VARIANT_NAMES: &'static [&'static str] = &[ - ::core::stringify!(name), - ::core::stringify!(approve), - ::core::stringify!(transferFrom), - ::core::stringify!(withdraw), - ::core::stringify!(decimals), - ::core::stringify!(balanceOf), - ::core::stringify!(symbol), - ::core::stringify!(transfer), - ::core::stringify!(deposit), - ::core::stringify!(allowance), - ]; /// The signatures in the same order as `SELECTORS`. pub const SIGNATURES: &'static [&'static str] = &[ ::SIGNATURE, @@ -2359,6 +2306,20 @@ function withdraw(uint256 wad) external; ::SIGNATURE, ::SIGNATURE, ]; + /// The names of the variants in the same order as `SELECTORS`. + pub const VARIANT_NAMES: &'static [&'static str] = &[ + ::core::stringify!(name), + ::core::stringify!(approve), + ::core::stringify!(transferFrom), + ::core::stringify!(withdraw), + ::core::stringify!(decimals), + ::core::stringify!(balanceOf), + ::core::stringify!(symbol), + ::core::stringify!(transfer), + ::core::stringify!(deposit), + ::core::stringify!(allowance), + ]; + /// Returns the signature for the given selector, if known. #[inline] pub fn signature_by_selector( @@ -2371,55 +2332,49 @@ function withdraw(uint256 wad) external; ::core::result::Result::Err(_) => ::core::option::Option::None, } } + /// Returns the enum variant name for the given selector, if known. #[inline] - pub fn name_by_selector( - selector: [u8; 4usize], - ) -> ::core::option::Option<&'static str> { + pub fn name_by_selector(selector: [u8; 4usize]) -> ::core::option::Option<&'static str> { let sig = Self::signature_by_selector(selector)?; sig.split_once('(').map(|(name, _)| name) } } #[automatically_derived] impl alloy_sol_types::SolInterface for WETH9Calls { - const NAME: &'static str = "WETH9Calls"; - const MIN_DATA_LENGTH: usize = 0usize; const COUNT: usize = 10usize; + const MIN_DATA_LENGTH: usize = 0usize; + const NAME: &'static str = "WETH9Calls"; + #[inline] fn selector(&self) -> [u8; 4] { match self { - Self::allowance(_) => { - ::SELECTOR - } + Self::allowance(_) => ::SELECTOR, Self::approve(_) => ::SELECTOR, - Self::balanceOf(_) => { - ::SELECTOR - } + Self::balanceOf(_) => ::SELECTOR, Self::decimals(_) => ::SELECTOR, Self::deposit(_) => ::SELECTOR, Self::name(_) => ::SELECTOR, Self::symbol(_) => ::SELECTOR, Self::transfer(_) => ::SELECTOR, - Self::transferFrom(_) => { - ::SELECTOR - } + Self::transferFrom(_) => ::SELECTOR, Self::withdraw(_) => ::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 { + fn abi_decode_raw(selector: [u8; 4], data: &[u8]) -> alloy_sol_types::Result { static DECODE_SHIMS: &[fn(&[u8]) -> alloy_sol_types::Result] = &[ { fn name(data: &[u8]) -> alloy_sol_types::Result { @@ -2437,9 +2392,7 @@ function withdraw(uint256 wad) external; }, { fn transferFrom(data: &[u8]) -> alloy_sol_types::Result { - ::abi_decode_raw( - data, - ) + ::abi_decode_raw(data) .map(WETH9Calls::transferFrom) } transferFrom @@ -2495,38 +2448,31 @@ function withdraw(uint256 wad) external; }, ]; let Ok(idx) = Self::SELECTORS.binary_search(&selector) else { - return Err( - alloy_sol_types::Error::unknown_selector( - ::NAME, - selector, - ), - ); + 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] = &[ + static DECODE_VALIDATE_SHIMS: &[fn(&[u8]) -> alloy_sol_types::Result] = &[ { fn name(data: &[u8]) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) + ::abi_decode_raw_validate(data) .map(WETH9Calls::name) } name }, { fn approve(data: &[u8]) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) + ::abi_decode_raw_validate(data) .map(WETH9Calls::approve) } approve @@ -2534,86 +2480,71 @@ function withdraw(uint256 wad) external; { fn transferFrom(data: &[u8]) -> alloy_sol_types::Result { ::abi_decode_raw_validate( - data, - ) - .map(WETH9Calls::transferFrom) + data, + ) + .map(WETH9Calls::transferFrom) } transferFrom }, { fn withdraw(data: &[u8]) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) + ::abi_decode_raw_validate(data) .map(WETH9Calls::withdraw) } withdraw }, { fn decimals(data: &[u8]) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) + ::abi_decode_raw_validate(data) .map(WETH9Calls::decimals) } decimals }, { fn balanceOf(data: &[u8]) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) + ::abi_decode_raw_validate(data) .map(WETH9Calls::balanceOf) } balanceOf }, { fn symbol(data: &[u8]) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) + ::abi_decode_raw_validate(data) .map(WETH9Calls::symbol) } symbol }, { fn transfer(data: &[u8]) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) + ::abi_decode_raw_validate(data) .map(WETH9Calls::transfer) } transfer }, { fn deposit(data: &[u8]) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) + ::abi_decode_raw_validate(data) .map(WETH9Calls::deposit) } deposit }, { fn allowance(data: &[u8]) -> alloy_sol_types::Result { - ::abi_decode_raw_validate( - data, - ) + ::abi_decode_raw_validate(data) .map(WETH9Calls::allowance) } allowance }, ]; let Ok(idx) = Self::SELECTORS.binary_search(&selector) else { - return Err( - alloy_sol_types::Error::unknown_selector( - ::NAME, - selector, - ), - ); + return Err(alloy_sol_types::Error::unknown_selector( + ::NAME, + selector, + )); }; DECODE_VALIDATE_SHIMS[idx](data) } + #[inline] fn abi_encoded_size(&self) -> usize { match self { @@ -2642,38 +2573,28 @@ function withdraw(uint256 wad) external; ::abi_encoded_size(inner) } Self::transferFrom(inner) => { - ::abi_encoded_size( - inner, - ) + ::abi_encoded_size(inner) } Self::withdraw(inner) => { ::abi_encoded_size(inner) } } } + #[inline] fn abi_encode_raw(&self, out: &mut alloy_sol_types::private::Vec) { match self { Self::allowance(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } Self::approve(inner) => { ::abi_encode_raw(inner, out) } Self::balanceOf(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } Self::decimals(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } Self::deposit(inner) => { ::abi_encode_raw(inner, out) @@ -2685,29 +2606,19 @@ function withdraw(uint256 wad) external; ::abi_encode_raw(inner, out) } Self::transfer(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } Self::transferFrom(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } Self::withdraw(inner) => { - ::abi_encode_raw( - inner, - out, - ) + ::abi_encode_raw(inner, out) } } } } ///Container for all the [`WETH9`](self) events. - #[derive(Clone)] - #[derive(Debug, PartialEq, Eq, Hash)] + #[derive(Clone, Debug, PartialEq, Eq, Hash)] pub enum WETH9Events { #[allow(missing_docs)] Approval(Approval), @@ -2721,39 +2632,33 @@ function withdraw(uint256 wad) external; impl WETH9Events { /// 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. + /// 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]] = &[ [ - 127u8, 207u8, 83u8, 44u8, 21u8, 240u8, 166u8, 219u8, 11u8, 214u8, 208u8, - 224u8, 56u8, 190u8, 167u8, 29u8, 48u8, 216u8, 8u8, 199u8, 217u8, 140u8, - 179u8, 191u8, 114u8, 104u8, 169u8, 91u8, 245u8, 8u8, 27u8, 101u8, + 127u8, 207u8, 83u8, 44u8, 21u8, 240u8, 166u8, 219u8, 11u8, 214u8, 208u8, 224u8, + 56u8, 190u8, 167u8, 29u8, 48u8, 216u8, 8u8, 199u8, 217u8, 140u8, 179u8, 191u8, + 114u8, 104u8, 169u8, 91u8, 245u8, 8u8, 27u8, 101u8, ], [ - 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, + 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, ], [ - 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, + 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, ], [ - 225u8, 255u8, 252u8, 196u8, 146u8, 61u8, 4u8, 181u8, 89u8, 244u8, 210u8, - 154u8, 139u8, 252u8, 108u8, 218u8, 4u8, 235u8, 91u8, 13u8, 60u8, 70u8, - 7u8, 81u8, 194u8, 64u8, 44u8, 92u8, 92u8, 201u8, 16u8, 156u8, + 225u8, 255u8, 252u8, 196u8, 146u8, 61u8, 4u8, 181u8, 89u8, 244u8, 210u8, 154u8, + 139u8, 252u8, 108u8, 218u8, 4u8, 235u8, 91u8, 13u8, 60u8, 70u8, 7u8, 81u8, 194u8, + 64u8, 44u8, 92u8, 92u8, 201u8, 16u8, 156u8, ], ]; - /// The names of the variants in the same order as `SELECTORS`. - pub const VARIANT_NAMES: &'static [&'static str] = &[ - ::core::stringify!(Withdrawal), - ::core::stringify!(Approval), - ::core::stringify!(Transfer), - ::core::stringify!(Deposit), - ]; /// The signatures in the same order as `SELECTORS`. pub const SIGNATURES: &'static [&'static str] = &[ ::SIGNATURE, @@ -2761,6 +2666,14 @@ function withdraw(uint256 wad) external; ::SIGNATURE, ::SIGNATURE, ]; + /// The names of the variants in the same order as `SELECTORS`. + pub const VARIANT_NAMES: &'static [&'static str] = &[ + ::core::stringify!(Withdrawal), + ::core::stringify!(Approval), + ::core::stringify!(Transfer), + ::core::stringify!(Deposit), + ]; + /// Returns the signature for the given selector, if known. #[inline] pub fn signature_by_selector( @@ -2773,19 +2686,19 @@ function withdraw(uint256 wad) external; ::core::result::Result::Err(_) => ::core::option::Option::None, } } + /// Returns the enum variant name for the given selector, if known. #[inline] - pub fn name_by_selector( - selector: [u8; 32usize], - ) -> ::core::option::Option<&'static str> { + pub fn name_by_selector(selector: [u8; 32usize]) -> ::core::option::Option<&'static str> { let sig = Self::signature_by_selector(selector)?; sig.split_once('(').map(|(name, _)| name) } } #[automatically_derived] impl alloy_sol_types::SolEventInterface for WETH9Events { - const NAME: &'static str = "WETH9Events"; const COUNT: usize = 4usize; + const NAME: &'static str = "WETH9Events"; + fn decode_raw_log( topics: &[alloy_sol_types::Word], data: &[u8], @@ -2804,23 +2717,18 @@ function withdraw(uint256 wad) external; .map(Self::Transfer) } Some(::SIGNATURE_HASH) => { - ::decode_raw_log( - topics, - data, - ) + ::decode_raw_log(topics, data) .map(Self::Withdrawal) } - _ => { - 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(), - ), + _ => 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(), ), - }) - } + ), + }), } } } @@ -2828,28 +2736,21 @@ function withdraw(uint256 wad) external; impl alloy_sol_types::private::IntoLogData for WETH9Events { 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::Deposit(inner) => { - alloy_sol_types::private::IntoLogData::to_log_data(inner) - } - Self::Transfer(inner) => { - alloy_sol_types::private::IntoLogData::to_log_data(inner) - } + Self::Approval(inner) => alloy_sol_types::private::IntoLogData::to_log_data(inner), + Self::Deposit(inner) => alloy_sol_types::private::IntoLogData::to_log_data(inner), + Self::Transfer(inner) => alloy_sol_types::private::IntoLogData::to_log_data(inner), Self::Withdrawal(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::Deposit(inner) => { - alloy_sol_types::private::IntoLogData::into_log_data(inner) - } + Self::Deposit(inner) => alloy_sol_types::private::IntoLogData::into_log_data(inner), Self::Transfer(inner) => { alloy_sol_types::private::IntoLogData::into_log_data(inner) } @@ -2859,56 +2760,56 @@ function withdraw(uint256 wad) external; } } } - use alloy_contract as alloy_contract; + use alloy_contract; /**Creates a new wrapper around an on-chain [`WETH9`](self) contract instance. -See the [wrapper's documentation](`WETH9Instance`) for more details.*/ + See the [wrapper's documentation](`WETH9Instance`) 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) -> WETH9Instance { + >( + address: alloy_sol_types::private::Address, + __provider: P, + ) -> WETH9Instance { WETH9Instance::::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. + 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.*/ + 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, - >( + pub fn deploy, N: alloy_contract::private::Network>( __provider: P, - ) -> impl ::core::future::Future< - Output = alloy_contract::Result>, - > { + ) -> impl ::core::future::Future>> { WETH9Instance::::deploy(__provider) } /**Creates a `RawCallBuilder` for deploying this contract using the given `provider` -and constructor arguments, if any. + 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.*/ + 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) -> alloy_contract::RawCallBuilder { + >( + __provider: P, + ) -> alloy_contract::RawCallBuilder { WETH9Instance::::deploy_builder(__provider) } /**A [`WETH9`](self) instance. -Contains type-safe methods for interacting with an on-chain instance of the -[`WETH9`](self) contract located at a given `address`, using a given -provider `P`. + Contains type-safe methods for interacting with an on-chain instance of the + [`WETH9`](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. + 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.*/ + See the [module-level documentation](self) for all the available methods.*/ #[derive(Clone)] pub struct WETH9Instance { address: alloy_sol_types::private::Address, @@ -2923,42 +2824,38 @@ See the [module-level documentation](self) for all the available methods.*/ } } /// Instantiation and getters/setters. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > WETH9Instance { + impl, N: alloy_contract::private::Network> + WETH9Instance + { /**Creates a new wrapper around an on-chain [`WETH9`](self) contract instance. -See the [wrapper's documentation](`WETH9Instance`) for more details.*/ + See the [wrapper's documentation](`WETH9Instance`) for more details.*/ #[inline] - pub const fn new( - address: alloy_sol_types::private::Address, - __provider: P, - ) -> Self { + pub const fn new(address: alloy_sol_types::private::Address, __provider: P) -> Self { Self { address, provider: __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. + 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.*/ + For more fine-grained control over the deployment process, use [`deploy_builder`] instead.*/ #[inline] - pub async fn deploy( - __provider: P, - ) -> alloy_contract::Result> { + 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. + 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.*/ + 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( @@ -2966,21 +2863,25 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ ::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 { @@ -2988,7 +2889,8 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ } } impl WETH9Instance<&P, N> { - /// Clones the provider and returns a new instance with the cloned provider. + /// Clones the provider and returns a new instance with the cloned + /// provider. #[inline] pub fn with_cloned_provider(self) -> WETH9Instance { WETH9Instance { @@ -2999,20 +2901,22 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ } } /// Function calls. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > WETH9Instance { - /// Creates a new call builder using this contract instance's provider and address. + impl, N: alloy_contract::private::Network> + WETH9Instance + { + /// 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. + /// 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 [`allowance`] function. pub fn allowance( &self, @@ -3021,6 +2925,7 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ ) -> alloy_contract::SolCallBuilder<&P, allowanceCall, N> { self.call_builder(&allowanceCall { _0, _1 }) } + ///Creates a new call builder for the [`approve`] function. pub fn approve( &self, @@ -3029,6 +2934,7 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ ) -> alloy_contract::SolCallBuilder<&P, approveCall, N> { self.call_builder(&approveCall { guy, wad }) } + ///Creates a new call builder for the [`balanceOf`] function. pub fn balanceOf( &self, @@ -3036,22 +2942,27 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ ) -> alloy_contract::SolCallBuilder<&P, balanceOfCall, N> { self.call_builder(&balanceOfCall(_0)) } + ///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 [`deposit`] function. pub fn deposit(&self) -> alloy_contract::SolCallBuilder<&P, depositCall, N> { self.call_builder(&depositCall) } + ///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 [`symbol`] function. pub fn symbol(&self) -> alloy_contract::SolCallBuilder<&P, symbolCall, N> { self.call_builder(&symbolCall) } + ///Creates a new call builder for the [`transfer`] function. pub fn transfer( &self, @@ -3060,6 +2971,7 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ ) -> alloy_contract::SolCallBuilder<&P, transferCall, N> { self.call_builder(&transferCall { dst, wad }) } + ///Creates a new call builder for the [`transferFrom`] function. pub fn transferFrom( &self, @@ -3069,6 +2981,7 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ ) -> alloy_contract::SolCallBuilder<&P, transferFromCall, N> { self.call_builder(&transferFromCall { src, dst, wad }) } + ///Creates a new call builder for the [`withdraw`] function. pub fn withdraw( &self, @@ -3078,31 +2991,36 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ } } /// Event filters. - impl< - P: alloy_contract::private::Provider, - N: alloy_contract::private::Network, - > WETH9Instance { - /// Creates a new event filter using this contract instance's provider and address. + impl, N: alloy_contract::private::Network> + WETH9Instance + { + /// 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. + /// 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 [`Deposit`] event. pub fn Deposit_filter(&self) -> alloy_contract::Event<&P, Deposit, 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 [`Withdrawal`] event. pub fn Withdrawal_filter(&self) -> alloy_contract::Event<&P, Withdrawal, N> { self.event_filter::() @@ -3111,109 +3029,61 @@ the bytecode concatenated with the constructor's ABI-encoded arguments.*/ } pub type Instance = WETH9::WETH9Instance<::alloy_provider::DynProvider>; use { - std::{sync::LazyLock, collections::HashMap}, - anyhow::{Result, Context}, - alloy_primitives::{address, Address}, - alloy_provider::{Provider, DynProvider}, + alloy_primitives::{Address, address}, + alloy_provider::{DynProvider, Provider}, + anyhow::{Context, Result}, + std::{collections::HashMap, sync::LazyLock}, }; pub const fn deployment_info(chain_id: u64) -> Option<(Address, Option)> { match chain_id { - 1u64 => { - Some(( - ::alloy_primitives::address!( - "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2" - ), - None, - )) - } - 10u64 => { - Some(( - ::alloy_primitives::address!( - "0x4200000000000000000000000000000000000006" - ), - None, - )) - } - 56u64 => { - Some(( - ::alloy_primitives::address!( - "0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c" - ), - None, - )) - } - 100u64 => { - Some(( - ::alloy_primitives::address!( - "0xe91D153E0b41518A2Ce8Dd3D7944Fa863463a97d" - ), - None, - )) - } - 137u64 => { - Some(( - ::alloy_primitives::address!( - "0x0d500B1d8E8eF31E21C99d1Db9A6444d3ADf1270" - ), - None, - )) - } - 8453u64 => { - Some(( - ::alloy_primitives::address!( - "0x4200000000000000000000000000000000000006" - ), - None, - )) - } - 9745u64 => { - Some(( - ::alloy_primitives::address!( - "0x6100E367285b01F48D07953803A2d8dCA5D19873" - ), - None, - )) - } - 42161u64 => { - Some(( - ::alloy_primitives::address!( - "0x82aF49447D8a07e3bd95BD0d56f35241523fBab1" - ), - None, - )) - } - 43114u64 => { - Some(( - ::alloy_primitives::address!( - "0xB31f66AA3C1e785363F0875A1B74E27b85FD66c7" - ), - None, - )) - } - 57073u64 => { - Some(( - ::alloy_primitives::address!( - "0x4200000000000000000000000000000000000006" - ), - None, - )) - } - 59144u64 => { - Some(( - ::alloy_primitives::address!( - "0xe5d7c2a44ffddf6b295a15c148167daaaf5cf34f" - ), - None, - )) - } - 11155111u64 => { - Some(( - ::alloy_primitives::address!( - "0xfFf9976782d46CC05630D1f6eBAb18b2324d6B14" - ), - None, - )) - } + 1u64 => Some(( + ::alloy_primitives::address!("0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2"), + None, + )), + 10u64 => Some(( + ::alloy_primitives::address!("0x4200000000000000000000000000000000000006"), + None, + )), + 56u64 => Some(( + ::alloy_primitives::address!("0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c"), + None, + )), + 100u64 => Some(( + ::alloy_primitives::address!("0xe91D153E0b41518A2Ce8Dd3D7944Fa863463a97d"), + None, + )), + 137u64 => Some(( + ::alloy_primitives::address!("0x0d500B1d8E8eF31E21C99d1Db9A6444d3ADf1270"), + None, + )), + 8453u64 => Some(( + ::alloy_primitives::address!("0x4200000000000000000000000000000000000006"), + None, + )), + 9745u64 => Some(( + ::alloy_primitives::address!("0x6100E367285b01F48D07953803A2d8dCA5D19873"), + None, + )), + 42161u64 => Some(( + ::alloy_primitives::address!("0x82aF49447D8a07e3bd95BD0d56f35241523fBab1"), + None, + )), + 43114u64 => Some(( + ::alloy_primitives::address!("0xB31f66AA3C1e785363F0875A1B74E27b85FD66c7"), + None, + )), + 57073u64 => Some(( + ::alloy_primitives::address!("0x4200000000000000000000000000000000000006"), + None, + )), + 59144u64 => Some(( + ::alloy_primitives::address!("0xe5d7c2a44ffddf6b295a15c148167daaaf5cf34f"), + None, + )), + 11155111u64 => Some(( + ::alloy_primitives::address!("0xfFf9976782d46CC05630D1f6eBAb18b2324d6B14"), + None, + )), _ => None, } } @@ -3230,9 +3100,7 @@ pub const fn deployment_block(chain_id: &u64) -> Option { } } impl Instance { - pub fn deployed( - provider: &DynProvider, - ) -> impl Future> + Send { + pub fn deployed(provider: &DynProvider) -> impl Future> + Send { async move { let chain_id = provider .get_chain_id() From a48236e4e5a0de250b4f055780a7037edbbcb240 Mon Sep 17 00:00:00 2001 From: Jan P Date: Tue, 21 Apr 2026 09:42:10 +0200 Subject: [PATCH 18/80] Fix codegen template to match main's formatting --- contracts/generated/Cargo.toml | 12 ++++++------ .../anyoneauthenticator/Cargo.toml | 4 ++-- .../balancerqueries/Cargo.toml | 4 ++-- .../balancerv2authorizer/Cargo.toml | 4 ++-- .../balancerv2basepool/Cargo.toml | 4 ++-- .../balancerv2basepoolfactory/Cargo.toml | 4 ++-- .../balancerv2composablestablepool/Cargo.toml | 4 ++-- .../Cargo.toml | 4 ++-- .../Cargo.toml | 4 ++-- .../Cargo.toml | 4 ++-- .../Cargo.toml | 4 ++-- .../Cargo.toml | 4 ++-- .../Cargo.toml | 4 ++-- .../Cargo.toml | 4 ++-- .../Cargo.toml | 4 ++-- .../balancerv2stablepool/Cargo.toml | 4 ++-- .../balancerv2stablepoolfactoryv2/Cargo.toml | 4 ++-- .../balancerv2vault/Cargo.toml | 4 ++-- .../balancerv2weightedpool/Cargo.toml | 4 ++-- .../Cargo.toml | 4 ++-- .../balancerv2weightedpoolfactory/Cargo.toml | 4 ++-- .../balancerv2weightedpoolfactoryv3/Cargo.toml | 4 ++-- .../balancerv2weightedpoolfactoryv4/Cargo.toml | 4 ++-- .../balancerv3batchrouter/Cargo.toml | 4 ++-- .../contracts-generated/balances/Cargo.toml | 4 ++-- .../contracts-generated/baoswaprouter/Cargo.toml | 4 ++-- .../chainalysisoracle/Cargo.toml | 4 ++-- .../contracts-generated/counter/Cargo.toml | 4 ++-- .../contracts-generated/cowamm/Cargo.toml | 4 ++-- .../cowammconstantproductfactory/Cargo.toml | 4 ++-- .../cowammfactorygetter/Cargo.toml | 4 ++-- .../cowammlegacyhelper/Cargo.toml | 4 ++-- .../cowammuniswapv2priceoracle/Cargo.toml | 4 ++-- .../cowprotocoltoken/Cargo.toml | 4 ++-- .../cowsettlementforwarder/Cargo.toml | 4 ++-- .../cowswapethflow/Cargo.toml | 4 ++-- .../cowswaponchainorders/Cargo.toml | 4 ++-- .../erc1271signaturevalidator/Cargo.toml | 4 ++-- .../contracts-generated/erc20/Cargo.toml | 4 ++-- .../contracts-generated/erc20mintable/Cargo.toml | 4 ++-- .../flashloanrouter/Cargo.toml | 4 ++-- .../contracts-generated/gashog/Cargo.toml | 4 ++-- .../contracts-generated/gnosissafe/Cargo.toml | 4 ++-- .../Cargo.toml | 4 ++-- .../gnosissafeproxy/Cargo.toml | 4 ++-- .../gnosissafeproxyfactory/Cargo.toml | 4 ++-- .../gpv2allowlistauthentication/Cargo.toml | 4 ++-- .../gpv2settlement/Cargo.toml | 4 ++-- .../honeyswaprouter/Cargo.toml | 4 ++-- .../hookstrampoline/Cargo.toml | 4 ++-- .../contracts-generated/icowwrapper/Cargo.toml | 4 ++-- .../contracts-generated/ierc4626/Cargo.toml | 4 ++-- .../contracts-generated/iswaprpair/Cargo.toml | 4 ++-- .../iuniswaplikepair/Cargo.toml | 4 ++-- .../iuniswaplikerouter/Cargo.toml | 4 ++-- .../iuniswapv3factory/Cargo.toml | 4 ++-- .../contracts-generated/izeroex/Cargo.toml | 4 ++-- .../liquoricesettlement/Cargo.toml | 4 ++-- .../mockerc4626wrapper/Cargo.toml | 4 ++-- .../mockuniswapv3factory/Cargo.toml | 4 ++-- .../mockuniswapv3pool/Cargo.toml | 4 ++-- .../nonstandarderc20balances/Cargo.toml | 4 ++-- .../contracts-generated/pancakerouter/Cargo.toml | 4 ++-- .../contracts-generated/permit2/Cargo.toml | 4 ++-- .../remoteerc20balances/Cargo.toml | 4 ++-- .../contracts-generated/signatures/Cargo.toml | 4 ++-- .../contracts-generated/solver/Cargo.toml | 4 ++-- .../contracts-generated/spardose/Cargo.toml | 4 ++-- .../sushiswaprouter/Cargo.toml | 4 ++-- .../contracts-generated/swapper/Cargo.toml | 4 ++-- .../contracts-generated/swaprrouter/Cargo.toml | 4 ++-- .../testnetuniswapv2router02/Cargo.toml | 4 ++-- .../contracts-generated/trader/Cargo.toml | 4 ++-- .../uniswapv2factory/Cargo.toml | 4 ++-- .../uniswapv2router02/Cargo.toml | 4 ++-- .../contracts-generated/uniswapv3pool/Cargo.toml | 4 ++-- .../uniswapv3quoterv2/Cargo.toml | 4 ++-- .../uniswapv3swaprouterv2/Cargo.toml | 4 ++-- .../contracts-generated/weth9/Cargo.toml | 4 ++-- contracts/src/codegen.rs | 16 ++++++++-------- 80 files changed, 170 insertions(+), 170 deletions(-) diff --git a/contracts/generated/Cargo.toml b/contracts/generated/Cargo.toml index 597508d7d0..05040e2ae0 100644 --- a/contracts/generated/Cargo.toml +++ b/contracts/generated/Cargo.toml @@ -2,15 +2,15 @@ [workspace] resolver = "3" members = [ - "contracts-facade", - "contracts-generated/*", + "contracts-facade", + "contracts-generated/*", ] [workspace.dependencies] -alloy-primitives = { version = "1.5.7", default-features = false } -alloy-sol-types = { version = "1.5.7", default-features = false } -alloy-contract = { version = "1.7.3" } -alloy-provider = { version = "1.7.3", default-features = false } +alloy-contract = { version = "1.7.3" } +alloy-primitives = { version = "1.5.7", default-features = false } +alloy-provider = { version = "1.7.3", default-features = false } +alloy-sol-types = { version = "1.5.7", default-features = false } anyhow = "1.0.100" [workspace.lints.clippy] diff --git a/contracts/generated/contracts-generated/anyoneauthenticator/Cargo.toml b/contracts/generated/contracts-generated/anyoneauthenticator/Cargo.toml index 3eeb1547ba..e537b8086d 100644 --- a/contracts/generated/contracts-generated/anyoneauthenticator/Cargo.toml +++ b/contracts/generated/contracts-generated/anyoneauthenticator/Cargo.toml @@ -9,10 +9,10 @@ publish = false doctest = false [dependencies] -alloy-primitives = { workspace = true } -alloy-sol-types = { workspace = true } alloy-contract = { workspace = true } +alloy-primitives = { workspace = true } alloy-provider = { workspace = true } +alloy-sol-types = { workspace = true } anyhow = { workspace = true } [lints] diff --git a/contracts/generated/contracts-generated/balancerqueries/Cargo.toml b/contracts/generated/contracts-generated/balancerqueries/Cargo.toml index 4a9690d596..c253060b73 100644 --- a/contracts/generated/contracts-generated/balancerqueries/Cargo.toml +++ b/contracts/generated/contracts-generated/balancerqueries/Cargo.toml @@ -9,10 +9,10 @@ publish = false doctest = false [dependencies] -alloy-primitives = { workspace = true } -alloy-sol-types = { workspace = true } alloy-contract = { workspace = true } +alloy-primitives = { workspace = true } alloy-provider = { workspace = true } +alloy-sol-types = { workspace = true } anyhow = { workspace = true } [lints] diff --git a/contracts/generated/contracts-generated/balancerv2authorizer/Cargo.toml b/contracts/generated/contracts-generated/balancerv2authorizer/Cargo.toml index 44912692ef..39bf9bc97b 100644 --- a/contracts/generated/contracts-generated/balancerv2authorizer/Cargo.toml +++ b/contracts/generated/contracts-generated/balancerv2authorizer/Cargo.toml @@ -9,10 +9,10 @@ publish = false doctest = false [dependencies] -alloy-primitives = { workspace = true } -alloy-sol-types = { workspace = true } alloy-contract = { workspace = true } +alloy-primitives = { workspace = true } alloy-provider = { workspace = true } +alloy-sol-types = { workspace = true } anyhow = { workspace = true } [lints] diff --git a/contracts/generated/contracts-generated/balancerv2basepool/Cargo.toml b/contracts/generated/contracts-generated/balancerv2basepool/Cargo.toml index c928c3b403..747e10839f 100644 --- a/contracts/generated/contracts-generated/balancerv2basepool/Cargo.toml +++ b/contracts/generated/contracts-generated/balancerv2basepool/Cargo.toml @@ -9,10 +9,10 @@ publish = false doctest = false [dependencies] -alloy-primitives = { workspace = true } -alloy-sol-types = { workspace = true } alloy-contract = { workspace = true } +alloy-primitives = { workspace = true } alloy-provider = { workspace = true } +alloy-sol-types = { workspace = true } anyhow = { workspace = true } [lints] diff --git a/contracts/generated/contracts-generated/balancerv2basepoolfactory/Cargo.toml b/contracts/generated/contracts-generated/balancerv2basepoolfactory/Cargo.toml index 2ab479b301..c1dae90168 100644 --- a/contracts/generated/contracts-generated/balancerv2basepoolfactory/Cargo.toml +++ b/contracts/generated/contracts-generated/balancerv2basepoolfactory/Cargo.toml @@ -9,10 +9,10 @@ publish = false doctest = false [dependencies] -alloy-primitives = { workspace = true } -alloy-sol-types = { workspace = true } alloy-contract = { workspace = true } +alloy-primitives = { workspace = true } alloy-provider = { workspace = true } +alloy-sol-types = { workspace = true } anyhow = { workspace = true } [lints] diff --git a/contracts/generated/contracts-generated/balancerv2composablestablepool/Cargo.toml b/contracts/generated/contracts-generated/balancerv2composablestablepool/Cargo.toml index 21a07fe493..199d8fe5ba 100644 --- a/contracts/generated/contracts-generated/balancerv2composablestablepool/Cargo.toml +++ b/contracts/generated/contracts-generated/balancerv2composablestablepool/Cargo.toml @@ -9,10 +9,10 @@ publish = false doctest = false [dependencies] -alloy-primitives = { workspace = true } -alloy-sol-types = { workspace = true } alloy-contract = { workspace = true } +alloy-primitives = { workspace = true } alloy-provider = { workspace = true } +alloy-sol-types = { workspace = true } anyhow = { workspace = true } [lints] diff --git a/contracts/generated/contracts-generated/balancerv2composablestablepoolfactory/Cargo.toml b/contracts/generated/contracts-generated/balancerv2composablestablepoolfactory/Cargo.toml index a4547ecaf7..144fe8647d 100644 --- a/contracts/generated/contracts-generated/balancerv2composablestablepoolfactory/Cargo.toml +++ b/contracts/generated/contracts-generated/balancerv2composablestablepoolfactory/Cargo.toml @@ -9,10 +9,10 @@ publish = false doctest = false [dependencies] -alloy-primitives = { workspace = true } -alloy-sol-types = { workspace = true } alloy-contract = { workspace = true } +alloy-primitives = { workspace = true } alloy-provider = { workspace = true } +alloy-sol-types = { workspace = true } anyhow = { workspace = true } [lints] diff --git a/contracts/generated/contracts-generated/balancerv2composablestablepoolfactoryv3/Cargo.toml b/contracts/generated/contracts-generated/balancerv2composablestablepoolfactoryv3/Cargo.toml index 87f2c10abb..f205ae2f71 100644 --- a/contracts/generated/contracts-generated/balancerv2composablestablepoolfactoryv3/Cargo.toml +++ b/contracts/generated/contracts-generated/balancerv2composablestablepoolfactoryv3/Cargo.toml @@ -9,10 +9,10 @@ publish = false doctest = false [dependencies] -alloy-primitives = { workspace = true } -alloy-sol-types = { workspace = true } alloy-contract = { workspace = true } +alloy-primitives = { workspace = true } alloy-provider = { workspace = true } +alloy-sol-types = { workspace = true } anyhow = { workspace = true } [lints] diff --git a/contracts/generated/contracts-generated/balancerv2composablestablepoolfactoryv4/Cargo.toml b/contracts/generated/contracts-generated/balancerv2composablestablepoolfactoryv4/Cargo.toml index 2ca44c9d71..c3a2a63457 100644 --- a/contracts/generated/contracts-generated/balancerv2composablestablepoolfactoryv4/Cargo.toml +++ b/contracts/generated/contracts-generated/balancerv2composablestablepoolfactoryv4/Cargo.toml @@ -9,10 +9,10 @@ publish = false doctest = false [dependencies] -alloy-primitives = { workspace = true } -alloy-sol-types = { workspace = true } alloy-contract = { workspace = true } +alloy-primitives = { workspace = true } alloy-provider = { workspace = true } +alloy-sol-types = { workspace = true } anyhow = { workspace = true } [lints] diff --git a/contracts/generated/contracts-generated/balancerv2composablestablepoolfactoryv5/Cargo.toml b/contracts/generated/contracts-generated/balancerv2composablestablepoolfactoryv5/Cargo.toml index 7211437bf9..6d8761a537 100644 --- a/contracts/generated/contracts-generated/balancerv2composablestablepoolfactoryv5/Cargo.toml +++ b/contracts/generated/contracts-generated/balancerv2composablestablepoolfactoryv5/Cargo.toml @@ -9,10 +9,10 @@ publish = false doctest = false [dependencies] -alloy-primitives = { workspace = true } -alloy-sol-types = { workspace = true } alloy-contract = { workspace = true } +alloy-primitives = { workspace = true } alloy-provider = { workspace = true } +alloy-sol-types = { workspace = true } anyhow = { workspace = true } [lints] diff --git a/contracts/generated/contracts-generated/balancerv2composablestablepoolfactoryv6/Cargo.toml b/contracts/generated/contracts-generated/balancerv2composablestablepoolfactoryv6/Cargo.toml index 10b74c38bf..fb3f1d1aac 100644 --- a/contracts/generated/contracts-generated/balancerv2composablestablepoolfactoryv6/Cargo.toml +++ b/contracts/generated/contracts-generated/balancerv2composablestablepoolfactoryv6/Cargo.toml @@ -9,10 +9,10 @@ publish = false doctest = false [dependencies] -alloy-primitives = { workspace = true } -alloy-sol-types = { workspace = true } alloy-contract = { workspace = true } +alloy-primitives = { workspace = true } alloy-provider = { workspace = true } +alloy-sol-types = { workspace = true } anyhow = { workspace = true } [lints] diff --git a/contracts/generated/contracts-generated/balancerv2liquiditybootstrappingpool/Cargo.toml b/contracts/generated/contracts-generated/balancerv2liquiditybootstrappingpool/Cargo.toml index d8bd929fcb..fe895314ac 100644 --- a/contracts/generated/contracts-generated/balancerv2liquiditybootstrappingpool/Cargo.toml +++ b/contracts/generated/contracts-generated/balancerv2liquiditybootstrappingpool/Cargo.toml @@ -9,10 +9,10 @@ publish = false doctest = false [dependencies] -alloy-primitives = { workspace = true } -alloy-sol-types = { workspace = true } alloy-contract = { workspace = true } +alloy-primitives = { workspace = true } alloy-provider = { workspace = true } +alloy-sol-types = { workspace = true } anyhow = { workspace = true } [lints] diff --git a/contracts/generated/contracts-generated/balancerv2liquiditybootstrappingpoolfactory/Cargo.toml b/contracts/generated/contracts-generated/balancerv2liquiditybootstrappingpoolfactory/Cargo.toml index 325c1a6c9a..7f71999280 100644 --- a/contracts/generated/contracts-generated/balancerv2liquiditybootstrappingpoolfactory/Cargo.toml +++ b/contracts/generated/contracts-generated/balancerv2liquiditybootstrappingpoolfactory/Cargo.toml @@ -9,10 +9,10 @@ publish = false doctest = false [dependencies] -alloy-primitives = { workspace = true } -alloy-sol-types = { workspace = true } alloy-contract = { workspace = true } +alloy-primitives = { workspace = true } alloy-provider = { workspace = true } +alloy-sol-types = { workspace = true } anyhow = { workspace = true } [lints] diff --git a/contracts/generated/contracts-generated/balancerv2noprotocolfeeliquiditybootstrappingpoolfactory/Cargo.toml b/contracts/generated/contracts-generated/balancerv2noprotocolfeeliquiditybootstrappingpoolfactory/Cargo.toml index 4cbb04ea5d..57a32e9b91 100644 --- a/contracts/generated/contracts-generated/balancerv2noprotocolfeeliquiditybootstrappingpoolfactory/Cargo.toml +++ b/contracts/generated/contracts-generated/balancerv2noprotocolfeeliquiditybootstrappingpoolfactory/Cargo.toml @@ -9,10 +9,10 @@ publish = false doctest = false [dependencies] -alloy-primitives = { workspace = true } -alloy-sol-types = { workspace = true } alloy-contract = { workspace = true } +alloy-primitives = { workspace = true } alloy-provider = { workspace = true } +alloy-sol-types = { workspace = true } anyhow = { workspace = true } [lints] diff --git a/contracts/generated/contracts-generated/balancerv2stablepool/Cargo.toml b/contracts/generated/contracts-generated/balancerv2stablepool/Cargo.toml index a8dd2ceb51..d47208d5b3 100644 --- a/contracts/generated/contracts-generated/balancerv2stablepool/Cargo.toml +++ b/contracts/generated/contracts-generated/balancerv2stablepool/Cargo.toml @@ -9,10 +9,10 @@ publish = false doctest = false [dependencies] -alloy-primitives = { workspace = true } -alloy-sol-types = { workspace = true } alloy-contract = { workspace = true } +alloy-primitives = { workspace = true } alloy-provider = { workspace = true } +alloy-sol-types = { workspace = true } anyhow = { workspace = true } [lints] diff --git a/contracts/generated/contracts-generated/balancerv2stablepoolfactoryv2/Cargo.toml b/contracts/generated/contracts-generated/balancerv2stablepoolfactoryv2/Cargo.toml index f0e92b06da..c0d0126850 100644 --- a/contracts/generated/contracts-generated/balancerv2stablepoolfactoryv2/Cargo.toml +++ b/contracts/generated/contracts-generated/balancerv2stablepoolfactoryv2/Cargo.toml @@ -9,10 +9,10 @@ publish = false doctest = false [dependencies] -alloy-primitives = { workspace = true } -alloy-sol-types = { workspace = true } alloy-contract = { workspace = true } +alloy-primitives = { workspace = true } alloy-provider = { workspace = true } +alloy-sol-types = { workspace = true } anyhow = { workspace = true } [lints] diff --git a/contracts/generated/contracts-generated/balancerv2vault/Cargo.toml b/contracts/generated/contracts-generated/balancerv2vault/Cargo.toml index d403dbe6a0..36626224e0 100644 --- a/contracts/generated/contracts-generated/balancerv2vault/Cargo.toml +++ b/contracts/generated/contracts-generated/balancerv2vault/Cargo.toml @@ -9,10 +9,10 @@ publish = false doctest = false [dependencies] -alloy-primitives = { workspace = true } -alloy-sol-types = { workspace = true } alloy-contract = { workspace = true } +alloy-primitives = { workspace = true } alloy-provider = { workspace = true } +alloy-sol-types = { workspace = true } anyhow = { workspace = true } [lints] diff --git a/contracts/generated/contracts-generated/balancerv2weightedpool/Cargo.toml b/contracts/generated/contracts-generated/balancerv2weightedpool/Cargo.toml index f9db1a975c..b1f3d89221 100644 --- a/contracts/generated/contracts-generated/balancerv2weightedpool/Cargo.toml +++ b/contracts/generated/contracts-generated/balancerv2weightedpool/Cargo.toml @@ -9,10 +9,10 @@ publish = false doctest = false [dependencies] -alloy-primitives = { workspace = true } -alloy-sol-types = { workspace = true } alloy-contract = { workspace = true } +alloy-primitives = { workspace = true } alloy-provider = { workspace = true } +alloy-sol-types = { workspace = true } anyhow = { workspace = true } [lints] diff --git a/contracts/generated/contracts-generated/balancerv2weightedpool2tokensfactory/Cargo.toml b/contracts/generated/contracts-generated/balancerv2weightedpool2tokensfactory/Cargo.toml index 67c36fef4e..464db67155 100644 --- a/contracts/generated/contracts-generated/balancerv2weightedpool2tokensfactory/Cargo.toml +++ b/contracts/generated/contracts-generated/balancerv2weightedpool2tokensfactory/Cargo.toml @@ -9,10 +9,10 @@ publish = false doctest = false [dependencies] -alloy-primitives = { workspace = true } -alloy-sol-types = { workspace = true } alloy-contract = { workspace = true } +alloy-primitives = { workspace = true } alloy-provider = { workspace = true } +alloy-sol-types = { workspace = true } anyhow = { workspace = true } [lints] diff --git a/contracts/generated/contracts-generated/balancerv2weightedpoolfactory/Cargo.toml b/contracts/generated/contracts-generated/balancerv2weightedpoolfactory/Cargo.toml index e177599f4d..23a0e3bbc9 100644 --- a/contracts/generated/contracts-generated/balancerv2weightedpoolfactory/Cargo.toml +++ b/contracts/generated/contracts-generated/balancerv2weightedpoolfactory/Cargo.toml @@ -9,10 +9,10 @@ publish = false doctest = false [dependencies] -alloy-primitives = { workspace = true } -alloy-sol-types = { workspace = true } alloy-contract = { workspace = true } +alloy-primitives = { workspace = true } alloy-provider = { workspace = true } +alloy-sol-types = { workspace = true } anyhow = { workspace = true } [lints] diff --git a/contracts/generated/contracts-generated/balancerv2weightedpoolfactoryv3/Cargo.toml b/contracts/generated/contracts-generated/balancerv2weightedpoolfactoryv3/Cargo.toml index 75118f2151..7978bc8ca0 100644 --- a/contracts/generated/contracts-generated/balancerv2weightedpoolfactoryv3/Cargo.toml +++ b/contracts/generated/contracts-generated/balancerv2weightedpoolfactoryv3/Cargo.toml @@ -9,10 +9,10 @@ publish = false doctest = false [dependencies] -alloy-primitives = { workspace = true } -alloy-sol-types = { workspace = true } alloy-contract = { workspace = true } +alloy-primitives = { workspace = true } alloy-provider = { workspace = true } +alloy-sol-types = { workspace = true } anyhow = { workspace = true } [lints] diff --git a/contracts/generated/contracts-generated/balancerv2weightedpoolfactoryv4/Cargo.toml b/contracts/generated/contracts-generated/balancerv2weightedpoolfactoryv4/Cargo.toml index ebf6f609fc..65c20b6a27 100644 --- a/contracts/generated/contracts-generated/balancerv2weightedpoolfactoryv4/Cargo.toml +++ b/contracts/generated/contracts-generated/balancerv2weightedpoolfactoryv4/Cargo.toml @@ -9,10 +9,10 @@ publish = false doctest = false [dependencies] -alloy-primitives = { workspace = true } -alloy-sol-types = { workspace = true } alloy-contract = { workspace = true } +alloy-primitives = { workspace = true } alloy-provider = { workspace = true } +alloy-sol-types = { workspace = true } anyhow = { workspace = true } [lints] diff --git a/contracts/generated/contracts-generated/balancerv3batchrouter/Cargo.toml b/contracts/generated/contracts-generated/balancerv3batchrouter/Cargo.toml index abad81d826..2fb3bae445 100644 --- a/contracts/generated/contracts-generated/balancerv3batchrouter/Cargo.toml +++ b/contracts/generated/contracts-generated/balancerv3batchrouter/Cargo.toml @@ -9,10 +9,10 @@ publish = false doctest = false [dependencies] -alloy-primitives = { workspace = true } -alloy-sol-types = { workspace = true } alloy-contract = { workspace = true } +alloy-primitives = { workspace = true } alloy-provider = { workspace = true } +alloy-sol-types = { workspace = true } anyhow = { workspace = true } [lints] diff --git a/contracts/generated/contracts-generated/balances/Cargo.toml b/contracts/generated/contracts-generated/balances/Cargo.toml index 9ffe0553fc..11c7a8266d 100644 --- a/contracts/generated/contracts-generated/balances/Cargo.toml +++ b/contracts/generated/contracts-generated/balances/Cargo.toml @@ -9,10 +9,10 @@ publish = false doctest = false [dependencies] -alloy-primitives = { workspace = true } -alloy-sol-types = { workspace = true } alloy-contract = { workspace = true } +alloy-primitives = { workspace = true } alloy-provider = { workspace = true } +alloy-sol-types = { workspace = true } anyhow = { workspace = true } [lints] diff --git a/contracts/generated/contracts-generated/baoswaprouter/Cargo.toml b/contracts/generated/contracts-generated/baoswaprouter/Cargo.toml index c261eed05d..cbff1c8f69 100644 --- a/contracts/generated/contracts-generated/baoswaprouter/Cargo.toml +++ b/contracts/generated/contracts-generated/baoswaprouter/Cargo.toml @@ -9,10 +9,10 @@ publish = false doctest = false [dependencies] -alloy-primitives = { workspace = true } -alloy-sol-types = { workspace = true } alloy-contract = { workspace = true } +alloy-primitives = { workspace = true } alloy-provider = { workspace = true } +alloy-sol-types = { workspace = true } anyhow = { workspace = true } [lints] diff --git a/contracts/generated/contracts-generated/chainalysisoracle/Cargo.toml b/contracts/generated/contracts-generated/chainalysisoracle/Cargo.toml index f61e708567..9d645d896d 100644 --- a/contracts/generated/contracts-generated/chainalysisoracle/Cargo.toml +++ b/contracts/generated/contracts-generated/chainalysisoracle/Cargo.toml @@ -9,10 +9,10 @@ publish = false doctest = false [dependencies] -alloy-primitives = { workspace = true } -alloy-sol-types = { workspace = true } alloy-contract = { workspace = true } +alloy-primitives = { workspace = true } alloy-provider = { workspace = true } +alloy-sol-types = { workspace = true } anyhow = { workspace = true } [lints] diff --git a/contracts/generated/contracts-generated/counter/Cargo.toml b/contracts/generated/contracts-generated/counter/Cargo.toml index 863c967f00..0a64b45896 100644 --- a/contracts/generated/contracts-generated/counter/Cargo.toml +++ b/contracts/generated/contracts-generated/counter/Cargo.toml @@ -9,10 +9,10 @@ publish = false doctest = false [dependencies] -alloy-primitives = { workspace = true } -alloy-sol-types = { workspace = true } alloy-contract = { workspace = true } +alloy-primitives = { workspace = true } alloy-provider = { workspace = true } +alloy-sol-types = { workspace = true } anyhow = { workspace = true } [lints] diff --git a/contracts/generated/contracts-generated/cowamm/Cargo.toml b/contracts/generated/contracts-generated/cowamm/Cargo.toml index 6add2f2a9e..5d4ed709e9 100644 --- a/contracts/generated/contracts-generated/cowamm/Cargo.toml +++ b/contracts/generated/contracts-generated/cowamm/Cargo.toml @@ -9,10 +9,10 @@ publish = false doctest = false [dependencies] -alloy-primitives = { workspace = true } -alloy-sol-types = { workspace = true } alloy-contract = { workspace = true } +alloy-primitives = { workspace = true } alloy-provider = { workspace = true } +alloy-sol-types = { workspace = true } anyhow = { workspace = true } [lints] diff --git a/contracts/generated/contracts-generated/cowammconstantproductfactory/Cargo.toml b/contracts/generated/contracts-generated/cowammconstantproductfactory/Cargo.toml index d4f76f91f9..f5e1521cc8 100644 --- a/contracts/generated/contracts-generated/cowammconstantproductfactory/Cargo.toml +++ b/contracts/generated/contracts-generated/cowammconstantproductfactory/Cargo.toml @@ -9,10 +9,10 @@ publish = false doctest = false [dependencies] -alloy-primitives = { workspace = true } -alloy-sol-types = { workspace = true } alloy-contract = { workspace = true } +alloy-primitives = { workspace = true } alloy-provider = { workspace = true } +alloy-sol-types = { workspace = true } anyhow = { workspace = true } [lints] diff --git a/contracts/generated/contracts-generated/cowammfactorygetter/Cargo.toml b/contracts/generated/contracts-generated/cowammfactorygetter/Cargo.toml index fc664cdc60..f70f9f2106 100644 --- a/contracts/generated/contracts-generated/cowammfactorygetter/Cargo.toml +++ b/contracts/generated/contracts-generated/cowammfactorygetter/Cargo.toml @@ -9,10 +9,10 @@ publish = false doctest = false [dependencies] -alloy-primitives = { workspace = true } -alloy-sol-types = { workspace = true } alloy-contract = { workspace = true } +alloy-primitives = { workspace = true } alloy-provider = { workspace = true } +alloy-sol-types = { workspace = true } anyhow = { workspace = true } [lints] diff --git a/contracts/generated/contracts-generated/cowammlegacyhelper/Cargo.toml b/contracts/generated/contracts-generated/cowammlegacyhelper/Cargo.toml index b8387496b3..39331d874d 100644 --- a/contracts/generated/contracts-generated/cowammlegacyhelper/Cargo.toml +++ b/contracts/generated/contracts-generated/cowammlegacyhelper/Cargo.toml @@ -9,10 +9,10 @@ publish = false doctest = false [dependencies] -alloy-primitives = { workspace = true } -alloy-sol-types = { workspace = true } alloy-contract = { workspace = true } +alloy-primitives = { workspace = true } alloy-provider = { workspace = true } +alloy-sol-types = { workspace = true } anyhow = { workspace = true } [lints] diff --git a/contracts/generated/contracts-generated/cowammuniswapv2priceoracle/Cargo.toml b/contracts/generated/contracts-generated/cowammuniswapv2priceoracle/Cargo.toml index 42283c80c1..aba73a2198 100644 --- a/contracts/generated/contracts-generated/cowammuniswapv2priceoracle/Cargo.toml +++ b/contracts/generated/contracts-generated/cowammuniswapv2priceoracle/Cargo.toml @@ -9,10 +9,10 @@ publish = false doctest = false [dependencies] -alloy-primitives = { workspace = true } -alloy-sol-types = { workspace = true } alloy-contract = { workspace = true } +alloy-primitives = { workspace = true } alloy-provider = { workspace = true } +alloy-sol-types = { workspace = true } anyhow = { workspace = true } [lints] diff --git a/contracts/generated/contracts-generated/cowprotocoltoken/Cargo.toml b/contracts/generated/contracts-generated/cowprotocoltoken/Cargo.toml index cf467f0497..2ef10310c4 100644 --- a/contracts/generated/contracts-generated/cowprotocoltoken/Cargo.toml +++ b/contracts/generated/contracts-generated/cowprotocoltoken/Cargo.toml @@ -9,10 +9,10 @@ publish = false doctest = false [dependencies] -alloy-primitives = { workspace = true } -alloy-sol-types = { workspace = true } alloy-contract = { workspace = true } +alloy-primitives = { workspace = true } alloy-provider = { workspace = true } +alloy-sol-types = { workspace = true } anyhow = { workspace = true } [lints] diff --git a/contracts/generated/contracts-generated/cowsettlementforwarder/Cargo.toml b/contracts/generated/contracts-generated/cowsettlementforwarder/Cargo.toml index f9331c5cad..3c4e9baed8 100644 --- a/contracts/generated/contracts-generated/cowsettlementforwarder/Cargo.toml +++ b/contracts/generated/contracts-generated/cowsettlementforwarder/Cargo.toml @@ -9,10 +9,10 @@ publish = false doctest = false [dependencies] -alloy-primitives = { workspace = true } -alloy-sol-types = { workspace = true } alloy-contract = { workspace = true } +alloy-primitives = { workspace = true } alloy-provider = { workspace = true } +alloy-sol-types = { workspace = true } anyhow = { workspace = true } [lints] diff --git a/contracts/generated/contracts-generated/cowswapethflow/Cargo.toml b/contracts/generated/contracts-generated/cowswapethflow/Cargo.toml index 38c47d9df5..a0532ea4de 100644 --- a/contracts/generated/contracts-generated/cowswapethflow/Cargo.toml +++ b/contracts/generated/contracts-generated/cowswapethflow/Cargo.toml @@ -9,10 +9,10 @@ publish = false doctest = false [dependencies] -alloy-primitives = { workspace = true } -alloy-sol-types = { workspace = true } alloy-contract = { workspace = true } +alloy-primitives = { workspace = true } alloy-provider = { workspace = true } +alloy-sol-types = { workspace = true } anyhow = { workspace = true } [lints] diff --git a/contracts/generated/contracts-generated/cowswaponchainorders/Cargo.toml b/contracts/generated/contracts-generated/cowswaponchainorders/Cargo.toml index 9d4c01c4a8..c1b80ba336 100644 --- a/contracts/generated/contracts-generated/cowswaponchainorders/Cargo.toml +++ b/contracts/generated/contracts-generated/cowswaponchainorders/Cargo.toml @@ -9,10 +9,10 @@ publish = false doctest = false [dependencies] -alloy-primitives = { workspace = true } -alloy-sol-types = { workspace = true } alloy-contract = { workspace = true } +alloy-primitives = { workspace = true } alloy-provider = { workspace = true } +alloy-sol-types = { workspace = true } anyhow = { workspace = true } [lints] diff --git a/contracts/generated/contracts-generated/erc1271signaturevalidator/Cargo.toml b/contracts/generated/contracts-generated/erc1271signaturevalidator/Cargo.toml index 4665bf16ed..06f922ce6f 100644 --- a/contracts/generated/contracts-generated/erc1271signaturevalidator/Cargo.toml +++ b/contracts/generated/contracts-generated/erc1271signaturevalidator/Cargo.toml @@ -9,10 +9,10 @@ publish = false doctest = false [dependencies] -alloy-primitives = { workspace = true } -alloy-sol-types = { workspace = true } alloy-contract = { workspace = true } +alloy-primitives = { workspace = true } alloy-provider = { workspace = true } +alloy-sol-types = { workspace = true } anyhow = { workspace = true } [lints] diff --git a/contracts/generated/contracts-generated/erc20/Cargo.toml b/contracts/generated/contracts-generated/erc20/Cargo.toml index 68400e19b2..43ed4adef2 100644 --- a/contracts/generated/contracts-generated/erc20/Cargo.toml +++ b/contracts/generated/contracts-generated/erc20/Cargo.toml @@ -9,10 +9,10 @@ publish = false doctest = false [dependencies] -alloy-primitives = { workspace = true } -alloy-sol-types = { workspace = true } alloy-contract = { workspace = true } +alloy-primitives = { workspace = true } alloy-provider = { workspace = true } +alloy-sol-types = { workspace = true } anyhow = { workspace = true } [lints] diff --git a/contracts/generated/contracts-generated/erc20mintable/Cargo.toml b/contracts/generated/contracts-generated/erc20mintable/Cargo.toml index 8429fe00d1..54d1accfd5 100644 --- a/contracts/generated/contracts-generated/erc20mintable/Cargo.toml +++ b/contracts/generated/contracts-generated/erc20mintable/Cargo.toml @@ -9,10 +9,10 @@ publish = false doctest = false [dependencies] -alloy-primitives = { workspace = true } -alloy-sol-types = { workspace = true } alloy-contract = { workspace = true } +alloy-primitives = { workspace = true } alloy-provider = { workspace = true } +alloy-sol-types = { workspace = true } anyhow = { workspace = true } [lints] diff --git a/contracts/generated/contracts-generated/flashloanrouter/Cargo.toml b/contracts/generated/contracts-generated/flashloanrouter/Cargo.toml index a0281397fe..ef3d5a05dd 100644 --- a/contracts/generated/contracts-generated/flashloanrouter/Cargo.toml +++ b/contracts/generated/contracts-generated/flashloanrouter/Cargo.toml @@ -9,10 +9,10 @@ publish = false doctest = false [dependencies] -alloy-primitives = { workspace = true } -alloy-sol-types = { workspace = true } alloy-contract = { workspace = true } +alloy-primitives = { workspace = true } alloy-provider = { workspace = true } +alloy-sol-types = { workspace = true } anyhow = { workspace = true } [lints] diff --git a/contracts/generated/contracts-generated/gashog/Cargo.toml b/contracts/generated/contracts-generated/gashog/Cargo.toml index ab7c8bf56e..9e318062b7 100644 --- a/contracts/generated/contracts-generated/gashog/Cargo.toml +++ b/contracts/generated/contracts-generated/gashog/Cargo.toml @@ -9,10 +9,10 @@ publish = false doctest = false [dependencies] -alloy-primitives = { workspace = true } -alloy-sol-types = { workspace = true } alloy-contract = { workspace = true } +alloy-primitives = { workspace = true } alloy-provider = { workspace = true } +alloy-sol-types = { workspace = true } anyhow = { workspace = true } [lints] diff --git a/contracts/generated/contracts-generated/gnosissafe/Cargo.toml b/contracts/generated/contracts-generated/gnosissafe/Cargo.toml index 75adf0a28a..cd0a1543ef 100644 --- a/contracts/generated/contracts-generated/gnosissafe/Cargo.toml +++ b/contracts/generated/contracts-generated/gnosissafe/Cargo.toml @@ -9,10 +9,10 @@ publish = false doctest = false [dependencies] -alloy-primitives = { workspace = true } -alloy-sol-types = { workspace = true } alloy-contract = { workspace = true } +alloy-primitives = { workspace = true } alloy-provider = { workspace = true } +alloy-sol-types = { workspace = true } anyhow = { workspace = true } [lints] diff --git a/contracts/generated/contracts-generated/gnosissafecompatibilityfallbackhandler/Cargo.toml b/contracts/generated/contracts-generated/gnosissafecompatibilityfallbackhandler/Cargo.toml index 429447b051..d543682cdd 100644 --- a/contracts/generated/contracts-generated/gnosissafecompatibilityfallbackhandler/Cargo.toml +++ b/contracts/generated/contracts-generated/gnosissafecompatibilityfallbackhandler/Cargo.toml @@ -9,10 +9,10 @@ publish = false doctest = false [dependencies] -alloy-primitives = { workspace = true } -alloy-sol-types = { workspace = true } alloy-contract = { workspace = true } +alloy-primitives = { workspace = true } alloy-provider = { workspace = true } +alloy-sol-types = { workspace = true } anyhow = { workspace = true } [lints] diff --git a/contracts/generated/contracts-generated/gnosissafeproxy/Cargo.toml b/contracts/generated/contracts-generated/gnosissafeproxy/Cargo.toml index 63ed5166ce..aef25e34bb 100644 --- a/contracts/generated/contracts-generated/gnosissafeproxy/Cargo.toml +++ b/contracts/generated/contracts-generated/gnosissafeproxy/Cargo.toml @@ -9,10 +9,10 @@ publish = false doctest = false [dependencies] -alloy-primitives = { workspace = true } -alloy-sol-types = { workspace = true } alloy-contract = { workspace = true } +alloy-primitives = { workspace = true } alloy-provider = { workspace = true } +alloy-sol-types = { workspace = true } anyhow = { workspace = true } [lints] diff --git a/contracts/generated/contracts-generated/gnosissafeproxyfactory/Cargo.toml b/contracts/generated/contracts-generated/gnosissafeproxyfactory/Cargo.toml index f8276d2e3f..d767974466 100644 --- a/contracts/generated/contracts-generated/gnosissafeproxyfactory/Cargo.toml +++ b/contracts/generated/contracts-generated/gnosissafeproxyfactory/Cargo.toml @@ -9,10 +9,10 @@ publish = false doctest = false [dependencies] -alloy-primitives = { workspace = true } -alloy-sol-types = { workspace = true } alloy-contract = { workspace = true } +alloy-primitives = { workspace = true } alloy-provider = { workspace = true } +alloy-sol-types = { workspace = true } anyhow = { workspace = true } [lints] diff --git a/contracts/generated/contracts-generated/gpv2allowlistauthentication/Cargo.toml b/contracts/generated/contracts-generated/gpv2allowlistauthentication/Cargo.toml index 0e9100411a..7fc05ddbbd 100644 --- a/contracts/generated/contracts-generated/gpv2allowlistauthentication/Cargo.toml +++ b/contracts/generated/contracts-generated/gpv2allowlistauthentication/Cargo.toml @@ -9,10 +9,10 @@ publish = false doctest = false [dependencies] -alloy-primitives = { workspace = true } -alloy-sol-types = { workspace = true } alloy-contract = { workspace = true } +alloy-primitives = { workspace = true } alloy-provider = { workspace = true } +alloy-sol-types = { workspace = true } anyhow = { workspace = true } [lints] diff --git a/contracts/generated/contracts-generated/gpv2settlement/Cargo.toml b/contracts/generated/contracts-generated/gpv2settlement/Cargo.toml index 1b20c47342..846c1e3539 100644 --- a/contracts/generated/contracts-generated/gpv2settlement/Cargo.toml +++ b/contracts/generated/contracts-generated/gpv2settlement/Cargo.toml @@ -9,10 +9,10 @@ publish = false doctest = false [dependencies] -alloy-primitives = { workspace = true } -alloy-sol-types = { workspace = true } alloy-contract = { workspace = true } +alloy-primitives = { workspace = true } alloy-provider = { workspace = true } +alloy-sol-types = { workspace = true } anyhow = { workspace = true } [lints] diff --git a/contracts/generated/contracts-generated/honeyswaprouter/Cargo.toml b/contracts/generated/contracts-generated/honeyswaprouter/Cargo.toml index fcf37acaf1..efba40cf2f 100644 --- a/contracts/generated/contracts-generated/honeyswaprouter/Cargo.toml +++ b/contracts/generated/contracts-generated/honeyswaprouter/Cargo.toml @@ -9,10 +9,10 @@ publish = false doctest = false [dependencies] -alloy-primitives = { workspace = true } -alloy-sol-types = { workspace = true } alloy-contract = { workspace = true } +alloy-primitives = { workspace = true } alloy-provider = { workspace = true } +alloy-sol-types = { workspace = true } anyhow = { workspace = true } [lints] diff --git a/contracts/generated/contracts-generated/hookstrampoline/Cargo.toml b/contracts/generated/contracts-generated/hookstrampoline/Cargo.toml index 283b441b33..b872d54cda 100644 --- a/contracts/generated/contracts-generated/hookstrampoline/Cargo.toml +++ b/contracts/generated/contracts-generated/hookstrampoline/Cargo.toml @@ -9,10 +9,10 @@ publish = false doctest = false [dependencies] -alloy-primitives = { workspace = true } -alloy-sol-types = { workspace = true } alloy-contract = { workspace = true } +alloy-primitives = { workspace = true } alloy-provider = { workspace = true } +alloy-sol-types = { workspace = true } anyhow = { workspace = true } [lints] diff --git a/contracts/generated/contracts-generated/icowwrapper/Cargo.toml b/contracts/generated/contracts-generated/icowwrapper/Cargo.toml index 8c3b31f71e..3395cef70f 100644 --- a/contracts/generated/contracts-generated/icowwrapper/Cargo.toml +++ b/contracts/generated/contracts-generated/icowwrapper/Cargo.toml @@ -9,10 +9,10 @@ publish = false doctest = false [dependencies] -alloy-primitives = { workspace = true } -alloy-sol-types = { workspace = true } alloy-contract = { workspace = true } +alloy-primitives = { workspace = true } alloy-provider = { workspace = true } +alloy-sol-types = { workspace = true } anyhow = { workspace = true } [lints] diff --git a/contracts/generated/contracts-generated/ierc4626/Cargo.toml b/contracts/generated/contracts-generated/ierc4626/Cargo.toml index c25bc58247..fe00f44d09 100644 --- a/contracts/generated/contracts-generated/ierc4626/Cargo.toml +++ b/contracts/generated/contracts-generated/ierc4626/Cargo.toml @@ -9,10 +9,10 @@ publish = false doctest = false [dependencies] -alloy-primitives = { workspace = true } -alloy-sol-types = { workspace = true } alloy-contract = { workspace = true } +alloy-primitives = { workspace = true } alloy-provider = { workspace = true } +alloy-sol-types = { workspace = true } anyhow = { workspace = true } [lints] diff --git a/contracts/generated/contracts-generated/iswaprpair/Cargo.toml b/contracts/generated/contracts-generated/iswaprpair/Cargo.toml index 67d4fb050f..915048461d 100644 --- a/contracts/generated/contracts-generated/iswaprpair/Cargo.toml +++ b/contracts/generated/contracts-generated/iswaprpair/Cargo.toml @@ -9,10 +9,10 @@ publish = false doctest = false [dependencies] -alloy-primitives = { workspace = true } -alloy-sol-types = { workspace = true } alloy-contract = { workspace = true } +alloy-primitives = { workspace = true } alloy-provider = { workspace = true } +alloy-sol-types = { workspace = true } anyhow = { workspace = true } [lints] diff --git a/contracts/generated/contracts-generated/iuniswaplikepair/Cargo.toml b/contracts/generated/contracts-generated/iuniswaplikepair/Cargo.toml index d22de9c960..1d20caa72f 100644 --- a/contracts/generated/contracts-generated/iuniswaplikepair/Cargo.toml +++ b/contracts/generated/contracts-generated/iuniswaplikepair/Cargo.toml @@ -9,10 +9,10 @@ publish = false doctest = false [dependencies] -alloy-primitives = { workspace = true } -alloy-sol-types = { workspace = true } alloy-contract = { workspace = true } +alloy-primitives = { workspace = true } alloy-provider = { workspace = true } +alloy-sol-types = { workspace = true } anyhow = { workspace = true } [lints] diff --git a/contracts/generated/contracts-generated/iuniswaplikerouter/Cargo.toml b/contracts/generated/contracts-generated/iuniswaplikerouter/Cargo.toml index e112c51805..8967d78c34 100644 --- a/contracts/generated/contracts-generated/iuniswaplikerouter/Cargo.toml +++ b/contracts/generated/contracts-generated/iuniswaplikerouter/Cargo.toml @@ -9,10 +9,10 @@ publish = false doctest = false [dependencies] -alloy-primitives = { workspace = true } -alloy-sol-types = { workspace = true } alloy-contract = { workspace = true } +alloy-primitives = { workspace = true } alloy-provider = { workspace = true } +alloy-sol-types = { workspace = true } anyhow = { workspace = true } [lints] diff --git a/contracts/generated/contracts-generated/iuniswapv3factory/Cargo.toml b/contracts/generated/contracts-generated/iuniswapv3factory/Cargo.toml index 0904bc4508..090a4745e0 100644 --- a/contracts/generated/contracts-generated/iuniswapv3factory/Cargo.toml +++ b/contracts/generated/contracts-generated/iuniswapv3factory/Cargo.toml @@ -9,10 +9,10 @@ publish = false doctest = false [dependencies] -alloy-primitives = { workspace = true } -alloy-sol-types = { workspace = true } alloy-contract = { workspace = true } +alloy-primitives = { workspace = true } alloy-provider = { workspace = true } +alloy-sol-types = { workspace = true } anyhow = { workspace = true } [lints] diff --git a/contracts/generated/contracts-generated/izeroex/Cargo.toml b/contracts/generated/contracts-generated/izeroex/Cargo.toml index d3055f73ef..394a6db115 100644 --- a/contracts/generated/contracts-generated/izeroex/Cargo.toml +++ b/contracts/generated/contracts-generated/izeroex/Cargo.toml @@ -9,10 +9,10 @@ publish = false doctest = false [dependencies] -alloy-primitives = { workspace = true } -alloy-sol-types = { workspace = true } alloy-contract = { workspace = true } +alloy-primitives = { workspace = true } alloy-provider = { workspace = true } +alloy-sol-types = { workspace = true } anyhow = { workspace = true } [lints] diff --git a/contracts/generated/contracts-generated/liquoricesettlement/Cargo.toml b/contracts/generated/contracts-generated/liquoricesettlement/Cargo.toml index dc17cc3d20..227b925146 100644 --- a/contracts/generated/contracts-generated/liquoricesettlement/Cargo.toml +++ b/contracts/generated/contracts-generated/liquoricesettlement/Cargo.toml @@ -9,10 +9,10 @@ publish = false doctest = false [dependencies] -alloy-primitives = { workspace = true } -alloy-sol-types = { workspace = true } alloy-contract = { workspace = true } +alloy-primitives = { workspace = true } alloy-provider = { workspace = true } +alloy-sol-types = { workspace = true } anyhow = { workspace = true } [lints] diff --git a/contracts/generated/contracts-generated/mockerc4626wrapper/Cargo.toml b/contracts/generated/contracts-generated/mockerc4626wrapper/Cargo.toml index 30783208f0..77ca06c21e 100644 --- a/contracts/generated/contracts-generated/mockerc4626wrapper/Cargo.toml +++ b/contracts/generated/contracts-generated/mockerc4626wrapper/Cargo.toml @@ -9,10 +9,10 @@ publish = false doctest = false [dependencies] -alloy-primitives = { workspace = true } -alloy-sol-types = { workspace = true } alloy-contract = { workspace = true } +alloy-primitives = { workspace = true } alloy-provider = { workspace = true } +alloy-sol-types = { workspace = true } anyhow = { workspace = true } [lints] diff --git a/contracts/generated/contracts-generated/mockuniswapv3factory/Cargo.toml b/contracts/generated/contracts-generated/mockuniswapv3factory/Cargo.toml index 97b7223ac4..b592492933 100644 --- a/contracts/generated/contracts-generated/mockuniswapv3factory/Cargo.toml +++ b/contracts/generated/contracts-generated/mockuniswapv3factory/Cargo.toml @@ -9,10 +9,10 @@ publish = false doctest = false [dependencies] -alloy-primitives = { workspace = true } -alloy-sol-types = { workspace = true } alloy-contract = { workspace = true } +alloy-primitives = { workspace = true } alloy-provider = { workspace = true } +alloy-sol-types = { workspace = true } anyhow = { workspace = true } [lints] diff --git a/contracts/generated/contracts-generated/mockuniswapv3pool/Cargo.toml b/contracts/generated/contracts-generated/mockuniswapv3pool/Cargo.toml index e8b2584c68..4ffa2c1c90 100644 --- a/contracts/generated/contracts-generated/mockuniswapv3pool/Cargo.toml +++ b/contracts/generated/contracts-generated/mockuniswapv3pool/Cargo.toml @@ -9,10 +9,10 @@ publish = false doctest = false [dependencies] -alloy-primitives = { workspace = true } -alloy-sol-types = { workspace = true } alloy-contract = { workspace = true } +alloy-primitives = { workspace = true } alloy-provider = { workspace = true } +alloy-sol-types = { workspace = true } anyhow = { workspace = true } [lints] diff --git a/contracts/generated/contracts-generated/nonstandarderc20balances/Cargo.toml b/contracts/generated/contracts-generated/nonstandarderc20balances/Cargo.toml index e756b5a022..74e9a223ba 100644 --- a/contracts/generated/contracts-generated/nonstandarderc20balances/Cargo.toml +++ b/contracts/generated/contracts-generated/nonstandarderc20balances/Cargo.toml @@ -9,10 +9,10 @@ publish = false doctest = false [dependencies] -alloy-primitives = { workspace = true } -alloy-sol-types = { workspace = true } alloy-contract = { workspace = true } +alloy-primitives = { workspace = true } alloy-provider = { workspace = true } +alloy-sol-types = { workspace = true } anyhow = { workspace = true } [lints] diff --git a/contracts/generated/contracts-generated/pancakerouter/Cargo.toml b/contracts/generated/contracts-generated/pancakerouter/Cargo.toml index 44a5cf3f12..0f4463b992 100644 --- a/contracts/generated/contracts-generated/pancakerouter/Cargo.toml +++ b/contracts/generated/contracts-generated/pancakerouter/Cargo.toml @@ -9,10 +9,10 @@ publish = false doctest = false [dependencies] -alloy-primitives = { workspace = true } -alloy-sol-types = { workspace = true } alloy-contract = { workspace = true } +alloy-primitives = { workspace = true } alloy-provider = { workspace = true } +alloy-sol-types = { workspace = true } anyhow = { workspace = true } [lints] diff --git a/contracts/generated/contracts-generated/permit2/Cargo.toml b/contracts/generated/contracts-generated/permit2/Cargo.toml index 473bfa942c..364b5e1cc0 100644 --- a/contracts/generated/contracts-generated/permit2/Cargo.toml +++ b/contracts/generated/contracts-generated/permit2/Cargo.toml @@ -9,10 +9,10 @@ publish = false doctest = false [dependencies] -alloy-primitives = { workspace = true } -alloy-sol-types = { workspace = true } alloy-contract = { workspace = true } +alloy-primitives = { workspace = true } alloy-provider = { workspace = true } +alloy-sol-types = { workspace = true } anyhow = { workspace = true } [lints] diff --git a/contracts/generated/contracts-generated/remoteerc20balances/Cargo.toml b/contracts/generated/contracts-generated/remoteerc20balances/Cargo.toml index b3c2879bf8..af047dacde 100644 --- a/contracts/generated/contracts-generated/remoteerc20balances/Cargo.toml +++ b/contracts/generated/contracts-generated/remoteerc20balances/Cargo.toml @@ -9,10 +9,10 @@ publish = false doctest = false [dependencies] -alloy-primitives = { workspace = true } -alloy-sol-types = { workspace = true } alloy-contract = { workspace = true } +alloy-primitives = { workspace = true } alloy-provider = { workspace = true } +alloy-sol-types = { workspace = true } anyhow = { workspace = true } [lints] diff --git a/contracts/generated/contracts-generated/signatures/Cargo.toml b/contracts/generated/contracts-generated/signatures/Cargo.toml index 5792e4cb59..19b023805a 100644 --- a/contracts/generated/contracts-generated/signatures/Cargo.toml +++ b/contracts/generated/contracts-generated/signatures/Cargo.toml @@ -9,10 +9,10 @@ publish = false doctest = false [dependencies] -alloy-primitives = { workspace = true } -alloy-sol-types = { workspace = true } alloy-contract = { workspace = true } +alloy-primitives = { workspace = true } alloy-provider = { workspace = true } +alloy-sol-types = { workspace = true } anyhow = { workspace = true } [lints] diff --git a/contracts/generated/contracts-generated/solver/Cargo.toml b/contracts/generated/contracts-generated/solver/Cargo.toml index 129c056e68..8f6ee5bae2 100644 --- a/contracts/generated/contracts-generated/solver/Cargo.toml +++ b/contracts/generated/contracts-generated/solver/Cargo.toml @@ -9,10 +9,10 @@ publish = false doctest = false [dependencies] -alloy-primitives = { workspace = true } -alloy-sol-types = { workspace = true } alloy-contract = { workspace = true } +alloy-primitives = { workspace = true } alloy-provider = { workspace = true } +alloy-sol-types = { workspace = true } anyhow = { workspace = true } [lints] diff --git a/contracts/generated/contracts-generated/spardose/Cargo.toml b/contracts/generated/contracts-generated/spardose/Cargo.toml index 83d2238a22..4082b38f9f 100644 --- a/contracts/generated/contracts-generated/spardose/Cargo.toml +++ b/contracts/generated/contracts-generated/spardose/Cargo.toml @@ -9,10 +9,10 @@ publish = false doctest = false [dependencies] -alloy-primitives = { workspace = true } -alloy-sol-types = { workspace = true } alloy-contract = { workspace = true } +alloy-primitives = { workspace = true } alloy-provider = { workspace = true } +alloy-sol-types = { workspace = true } anyhow = { workspace = true } [lints] diff --git a/contracts/generated/contracts-generated/sushiswaprouter/Cargo.toml b/contracts/generated/contracts-generated/sushiswaprouter/Cargo.toml index c6e6aab058..4e099e1e1d 100644 --- a/contracts/generated/contracts-generated/sushiswaprouter/Cargo.toml +++ b/contracts/generated/contracts-generated/sushiswaprouter/Cargo.toml @@ -9,10 +9,10 @@ publish = false doctest = false [dependencies] -alloy-primitives = { workspace = true } -alloy-sol-types = { workspace = true } alloy-contract = { workspace = true } +alloy-primitives = { workspace = true } alloy-provider = { workspace = true } +alloy-sol-types = { workspace = true } anyhow = { workspace = true } [lints] diff --git a/contracts/generated/contracts-generated/swapper/Cargo.toml b/contracts/generated/contracts-generated/swapper/Cargo.toml index 4058e701ec..d5555196aa 100644 --- a/contracts/generated/contracts-generated/swapper/Cargo.toml +++ b/contracts/generated/contracts-generated/swapper/Cargo.toml @@ -9,10 +9,10 @@ publish = false doctest = false [dependencies] -alloy-primitives = { workspace = true } -alloy-sol-types = { workspace = true } alloy-contract = { workspace = true } +alloy-primitives = { workspace = true } alloy-provider = { workspace = true } +alloy-sol-types = { workspace = true } anyhow = { workspace = true } [lints] diff --git a/contracts/generated/contracts-generated/swaprrouter/Cargo.toml b/contracts/generated/contracts-generated/swaprrouter/Cargo.toml index f41e7bfc1b..f33aba7f10 100644 --- a/contracts/generated/contracts-generated/swaprrouter/Cargo.toml +++ b/contracts/generated/contracts-generated/swaprrouter/Cargo.toml @@ -9,10 +9,10 @@ publish = false doctest = false [dependencies] -alloy-primitives = { workspace = true } -alloy-sol-types = { workspace = true } alloy-contract = { workspace = true } +alloy-primitives = { workspace = true } alloy-provider = { workspace = true } +alloy-sol-types = { workspace = true } anyhow = { workspace = true } [lints] diff --git a/contracts/generated/contracts-generated/testnetuniswapv2router02/Cargo.toml b/contracts/generated/contracts-generated/testnetuniswapv2router02/Cargo.toml index 5f3bcac248..75fff0fbb5 100644 --- a/contracts/generated/contracts-generated/testnetuniswapv2router02/Cargo.toml +++ b/contracts/generated/contracts-generated/testnetuniswapv2router02/Cargo.toml @@ -9,10 +9,10 @@ publish = false doctest = false [dependencies] -alloy-primitives = { workspace = true } -alloy-sol-types = { workspace = true } alloy-contract = { workspace = true } +alloy-primitives = { workspace = true } alloy-provider = { workspace = true } +alloy-sol-types = { workspace = true } anyhow = { workspace = true } [lints] diff --git a/contracts/generated/contracts-generated/trader/Cargo.toml b/contracts/generated/contracts-generated/trader/Cargo.toml index 2603a1cf92..3a469a3081 100644 --- a/contracts/generated/contracts-generated/trader/Cargo.toml +++ b/contracts/generated/contracts-generated/trader/Cargo.toml @@ -9,10 +9,10 @@ publish = false doctest = false [dependencies] -alloy-primitives = { workspace = true } -alloy-sol-types = { workspace = true } alloy-contract = { workspace = true } +alloy-primitives = { workspace = true } alloy-provider = { workspace = true } +alloy-sol-types = { workspace = true } anyhow = { workspace = true } [lints] diff --git a/contracts/generated/contracts-generated/uniswapv2factory/Cargo.toml b/contracts/generated/contracts-generated/uniswapv2factory/Cargo.toml index 6fe67c0595..6fb108842d 100644 --- a/contracts/generated/contracts-generated/uniswapv2factory/Cargo.toml +++ b/contracts/generated/contracts-generated/uniswapv2factory/Cargo.toml @@ -9,10 +9,10 @@ publish = false doctest = false [dependencies] -alloy-primitives = { workspace = true } -alloy-sol-types = { workspace = true } alloy-contract = { workspace = true } +alloy-primitives = { workspace = true } alloy-provider = { workspace = true } +alloy-sol-types = { workspace = true } anyhow = { workspace = true } [lints] diff --git a/contracts/generated/contracts-generated/uniswapv2router02/Cargo.toml b/contracts/generated/contracts-generated/uniswapv2router02/Cargo.toml index 010fe1c957..22cfbf004c 100644 --- a/contracts/generated/contracts-generated/uniswapv2router02/Cargo.toml +++ b/contracts/generated/contracts-generated/uniswapv2router02/Cargo.toml @@ -9,10 +9,10 @@ publish = false doctest = false [dependencies] -alloy-primitives = { workspace = true } -alloy-sol-types = { workspace = true } alloy-contract = { workspace = true } +alloy-primitives = { workspace = true } alloy-provider = { workspace = true } +alloy-sol-types = { workspace = true } anyhow = { workspace = true } [lints] diff --git a/contracts/generated/contracts-generated/uniswapv3pool/Cargo.toml b/contracts/generated/contracts-generated/uniswapv3pool/Cargo.toml index 3f26918b58..65106539a9 100644 --- a/contracts/generated/contracts-generated/uniswapv3pool/Cargo.toml +++ b/contracts/generated/contracts-generated/uniswapv3pool/Cargo.toml @@ -9,10 +9,10 @@ publish = false doctest = false [dependencies] -alloy-primitives = { workspace = true } -alloy-sol-types = { workspace = true } alloy-contract = { workspace = true } +alloy-primitives = { workspace = true } alloy-provider = { workspace = true } +alloy-sol-types = { workspace = true } anyhow = { workspace = true } [lints] diff --git a/contracts/generated/contracts-generated/uniswapv3quoterv2/Cargo.toml b/contracts/generated/contracts-generated/uniswapv3quoterv2/Cargo.toml index 841f4e6ef2..6bbff33248 100644 --- a/contracts/generated/contracts-generated/uniswapv3quoterv2/Cargo.toml +++ b/contracts/generated/contracts-generated/uniswapv3quoterv2/Cargo.toml @@ -9,10 +9,10 @@ publish = false doctest = false [dependencies] -alloy-primitives = { workspace = true } -alloy-sol-types = { workspace = true } alloy-contract = { workspace = true } +alloy-primitives = { workspace = true } alloy-provider = { workspace = true } +alloy-sol-types = { workspace = true } anyhow = { workspace = true } [lints] diff --git a/contracts/generated/contracts-generated/uniswapv3swaprouterv2/Cargo.toml b/contracts/generated/contracts-generated/uniswapv3swaprouterv2/Cargo.toml index 58a652b6a7..8114568730 100644 --- a/contracts/generated/contracts-generated/uniswapv3swaprouterv2/Cargo.toml +++ b/contracts/generated/contracts-generated/uniswapv3swaprouterv2/Cargo.toml @@ -9,10 +9,10 @@ publish = false doctest = false [dependencies] -alloy-primitives = { workspace = true } -alloy-sol-types = { workspace = true } alloy-contract = { workspace = true } +alloy-primitives = { workspace = true } alloy-provider = { workspace = true } +alloy-sol-types = { workspace = true } anyhow = { workspace = true } [lints] diff --git a/contracts/generated/contracts-generated/weth9/Cargo.toml b/contracts/generated/contracts-generated/weth9/Cargo.toml index 36bf4e5716..2bd1f8db76 100644 --- a/contracts/generated/contracts-generated/weth9/Cargo.toml +++ b/contracts/generated/contracts-generated/weth9/Cargo.toml @@ -9,10 +9,10 @@ publish = false doctest = false [dependencies] -alloy-primitives = { workspace = true } -alloy-sol-types = { workspace = true } alloy-contract = { workspace = true } +alloy-primitives = { workspace = true } alloy-provider = { workspace = true } +alloy-sol-types = { workspace = true } anyhow = { workspace = true } [lints] diff --git a/contracts/src/codegen.rs b/contracts/src/codegen.rs index 84c0822c76..93bc710a86 100644 --- a/contracts/src/codegen.rs +++ b/contracts/src/codegen.rs @@ -38,10 +38,10 @@ publish = false doctest = false [dependencies] -alloy-primitives = { workspace = true } -alloy-sol-types = { workspace = true } alloy-contract = { workspace = true } +alloy-primitives = { workspace = true } alloy-provider = { workspace = true } +alloy-sol-types = { workspace = true } anyhow = { workspace = true } [lints] @@ -54,15 +54,15 @@ const WORKSPACE_CARGO_TOML: &str = "\ [workspace] resolver = \"3\" members = [ - \"contracts-facade\", - \"contracts-generated/*\", + \"contracts-facade\", + \"contracts-generated/*\", ] [workspace.dependencies] -alloy-primitives = { version = \"1.5.7\", default-features = false } -alloy-sol-types = { version = \"1.5.7\", default-features = false } -alloy-contract = { version = \"1.7.3\" } -alloy-provider = { version = \"1.7.3\", default-features = false } +alloy-contract = { version = \"1.7.3\" } +alloy-primitives = { version = \"1.5.7\", default-features = false } +alloy-provider = { version = \"1.7.3\", default-features = false } +alloy-sol-types = { version = \"1.5.7\", default-features = false } anyhow = \"1.0.100\" [workspace.lints.clippy] From f69031f4e96874918892ddaade4e06a336f1bf77 Mon Sep 17 00:00:00 2001 From: Jan P Date: Tue, 21 Apr 2026 09:57:19 +0200 Subject: [PATCH 19/80] Kill FE --- crates/pool-indexer/frontend/index.html | 13 - .../pool-indexer/frontend/package-lock.json | 1734 ----------------- crates/pool-indexer/frontend/package.json | 22 - crates/pool-indexer/frontend/src/App.css | 394 ---- crates/pool-indexer/frontend/src/App.tsx | 389 ---- crates/pool-indexer/frontend/src/api.ts | 64 - crates/pool-indexer/frontend/src/main.tsx | 9 - crates/pool-indexer/frontend/src/utils.ts | 147 -- crates/pool-indexer/frontend/tsconfig.json | 20 - crates/pool-indexer/frontend/vite.config.ts | 11 - 10 files changed, 2803 deletions(-) delete mode 100644 crates/pool-indexer/frontend/index.html delete mode 100644 crates/pool-indexer/frontend/package-lock.json delete mode 100644 crates/pool-indexer/frontend/package.json delete mode 100644 crates/pool-indexer/frontend/src/App.css delete mode 100644 crates/pool-indexer/frontend/src/App.tsx delete mode 100644 crates/pool-indexer/frontend/src/api.ts delete mode 100644 crates/pool-indexer/frontend/src/main.tsx delete mode 100644 crates/pool-indexer/frontend/src/utils.ts delete mode 100644 crates/pool-indexer/frontend/tsconfig.json delete mode 100644 crates/pool-indexer/frontend/vite.config.ts diff --git a/crates/pool-indexer/frontend/index.html b/crates/pool-indexer/frontend/index.html deleted file mode 100644 index c326e294e3..0000000000 --- a/crates/pool-indexer/frontend/index.html +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - Pool Indexer - - -
- - - diff --git a/crates/pool-indexer/frontend/package-lock.json b/crates/pool-indexer/frontend/package-lock.json deleted file mode 100644 index 6d4187c34c..0000000000 --- a/crates/pool-indexer/frontend/package-lock.json +++ /dev/null @@ -1,1734 +0,0 @@ -{ - "name": "pool-indexer-ui", - "version": "0.1.0", - "lockfileVersion": 3, - "requires": true, - "packages": { - "": { - "name": "pool-indexer-ui", - "version": "0.1.0", - "dependencies": { - "react": "^18.3.1", - "react-dom": "^18.3.1" - }, - "devDependencies": { - "@types/react": "^18.3.5", - "@types/react-dom": "^18.3.0", - "@vitejs/plugin-react": "^4.3.1", - "typescript": "^5.5.3", - "vite": "^5.4.2" - } - }, - "node_modules/@babel/code-frame": { - "version": "7.29.0", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.29.0.tgz", - "integrity": "sha512-9NhCeYjq9+3uxgdtp20LSiJXJvN0FeCtNGpJxuMFZ1Kv3cWUNb6DOhJwUvcVCzKGR66cw4njwM6hrJLqgOwbcw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-validator-identifier": "^7.28.5", - "js-tokens": "^4.0.0", - "picocolors": "^1.1.1" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/compat-data": { - "version": "7.29.0", - "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.29.0.tgz", - "integrity": "sha512-T1NCJqT/j9+cn8fvkt7jtwbLBfLC/1y1c7NtCeXFRgzGTsafi68MRv8yzkYSapBnFA6L3U2VSc02ciDzoAJhJg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/core": { - "version": "7.29.0", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.29.0.tgz", - "integrity": "sha512-CGOfOJqWjg2qW/Mb6zNsDm+u5vFQ8DxXfbM09z69p5Z6+mE1ikP2jUXw+j42Pf1XTYED2Rni5f95npYeuwMDQA==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "@babel/code-frame": "^7.29.0", - "@babel/generator": "^7.29.0", - "@babel/helper-compilation-targets": "^7.28.6", - "@babel/helper-module-transforms": "^7.28.6", - "@babel/helpers": "^7.28.6", - "@babel/parser": "^7.29.0", - "@babel/template": "^7.28.6", - "@babel/traverse": "^7.29.0", - "@babel/types": "^7.29.0", - "@jridgewell/remapping": "^2.3.5", - "convert-source-map": "^2.0.0", - "debug": "^4.1.0", - "gensync": "^1.0.0-beta.2", - "json5": "^2.2.3", - "semver": "^6.3.1" - }, - "engines": { - "node": ">=6.9.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/babel" - } - }, - "node_modules/@babel/generator": { - "version": "7.29.1", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.29.1.tgz", - "integrity": "sha512-qsaF+9Qcm2Qv8SRIMMscAvG4O3lJ0F1GuMo5HR/Bp02LopNgnZBC/EkbevHFeGs4ls/oPz9v+Bsmzbkbe+0dUw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/parser": "^7.29.0", - "@babel/types": "^7.29.0", - "@jridgewell/gen-mapping": "^0.3.12", - "@jridgewell/trace-mapping": "^0.3.28", - "jsesc": "^3.0.2" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-compilation-targets": { - "version": "7.28.6", - "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.28.6.tgz", - "integrity": "sha512-JYtls3hqi15fcx5GaSNL7SCTJ2MNmjrkHXg4FSpOA/grxK8KwyZ5bubHsCq8FXCkua6xhuaaBit+3b7+VZRfcA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/compat-data": "^7.28.6", - "@babel/helper-validator-option": "^7.27.1", - "browserslist": "^4.24.0", - "lru-cache": "^5.1.1", - "semver": "^6.3.1" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-globals": { - "version": "7.28.0", - "resolved": "https://registry.npmjs.org/@babel/helper-globals/-/helper-globals-7.28.0.tgz", - "integrity": "sha512-+W6cISkXFa1jXsDEdYA8HeevQT/FULhxzR99pxphltZcVaugps53THCeiWA8SguxxpSp3gKPiuYfSWopkLQ4hw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-module-imports": { - "version": "7.28.6", - "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.28.6.tgz", - "integrity": "sha512-l5XkZK7r7wa9LucGw9LwZyyCUscb4x37JWTPz7swwFE/0FMQAGpiWUZn8u9DzkSBWEcK25jmvubfpw2dnAMdbw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/traverse": "^7.28.6", - "@babel/types": "^7.28.6" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-module-transforms": { - "version": "7.28.6", - "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.28.6.tgz", - "integrity": "sha512-67oXFAYr2cDLDVGLXTEABjdBJZ6drElUSI7WKp70NrpyISso3plG9SAGEF6y7zbha/wOzUByWWTJvEDVNIUGcA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-module-imports": "^7.28.6", - "@babel/helper-validator-identifier": "^7.28.5", - "@babel/traverse": "^7.28.6" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0" - } - }, - "node_modules/@babel/helper-plugin-utils": { - "version": "7.28.6", - "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.28.6.tgz", - "integrity": "sha512-S9gzZ/bz83GRysI7gAD4wPT/AI3uCnY+9xn+Mx/KPs2JwHJIz1W8PZkg2cqyt3RNOBM8ejcXhV6y8Og7ly/Dug==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-string-parser": { - "version": "7.27.1", - "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.27.1.tgz", - "integrity": "sha512-qMlSxKbpRlAridDExk92nSobyDdpPijUq2DW6oDnUqd0iOGxmQjyqhMIihI9+zv4LPyZdRje2cavWPbCbWm3eA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-validator-identifier": { - "version": "7.28.5", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.28.5.tgz", - "integrity": "sha512-qSs4ifwzKJSV39ucNjsvc6WVHs6b7S03sOh2OcHF9UHfVPqWWALUsNUVzhSBiItjRZoLHx7nIarVjqKVusUZ1Q==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-validator-option": { - "version": "7.27.1", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.27.1.tgz", - "integrity": "sha512-YvjJow9FxbhFFKDSuFnVCe2WxXk1zWc22fFePVNEaWJEu8IrZVlda6N0uHwzZrUM1il7NC9Mlp4MaJYbYd9JSg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helpers": { - "version": "7.29.2", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.29.2.tgz", - "integrity": "sha512-HoGuUs4sCZNezVEKdVcwqmZN8GoHirLUcLaYVNBK2J0DadGtdcqgr3BCbvH8+XUo4NGjNl3VOtSjEKNzqfFgKw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/template": "^7.28.6", - "@babel/types": "^7.29.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/parser": { - "version": "7.29.2", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.29.2.tgz", - "integrity": "sha512-4GgRzy/+fsBa72/RZVJmGKPmZu9Byn8o4MoLpmNe1m8ZfYnz5emHLQz3U4gLud6Zwl0RZIcgiLD7Uq7ySFuDLA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/types": "^7.29.0" - }, - "bin": { - "parser": "bin/babel-parser.js" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@babel/plugin-transform-react-jsx-self": { - "version": "7.27.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx-self/-/plugin-transform-react-jsx-self-7.27.1.tgz", - "integrity": "sha512-6UzkCs+ejGdZ5mFFC/OCUrv028ab2fp1znZmCZjAOBKiBK2jXD1O+BPSfX8X2qjJ75fZBMSnQn3Rq2mrBJK2mw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.27.1" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-react-jsx-source": { - "version": "7.27.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx-source/-/plugin-transform-react-jsx-source-7.27.1.tgz", - "integrity": "sha512-zbwoTsBruTeKB9hSq73ha66iFeJHuaFkUbwvqElnygoNbj/jHRsSeokowZFN3CZ64IvEqcmmkVe89OPXc7ldAw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.27.1" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/template": { - "version": "7.28.6", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.28.6.tgz", - "integrity": "sha512-YA6Ma2KsCdGb+WC6UpBVFJGXL58MDA6oyONbjyF/+5sBgxY/dwkhLogbMT2GXXyU84/IhRw/2D1Os1B/giz+BQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/code-frame": "^7.28.6", - "@babel/parser": "^7.28.6", - "@babel/types": "^7.28.6" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/traverse": { - "version": "7.29.0", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.29.0.tgz", - "integrity": "sha512-4HPiQr0X7+waHfyXPZpWPfWL/J7dcN1mx9gL6WdQVMbPnF3+ZhSMs8tCxN7oHddJE9fhNE7+lxdnlyemKfJRuA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/code-frame": "^7.29.0", - "@babel/generator": "^7.29.0", - "@babel/helper-globals": "^7.28.0", - "@babel/parser": "^7.29.0", - "@babel/template": "^7.28.6", - "@babel/types": "^7.29.0", - "debug": "^4.3.1" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/types": { - "version": "7.29.0", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.29.0.tgz", - "integrity": "sha512-LwdZHpScM4Qz8Xw2iKSzS+cfglZzJGvofQICy7W7v4caru4EaAmyUuO6BGrbyQ2mYV11W0U8j5mBhd14dd3B0A==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-string-parser": "^7.27.1", - "@babel/helper-validator-identifier": "^7.28.5" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@esbuild/aix-ppc64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.21.5.tgz", - "integrity": "sha512-1SDgH6ZSPTlggy1yI6+Dbkiz8xzpHJEVAlF/AM1tHPLsf5STom9rwtjE4hKAF20FfXXNTFqEYXyJNWh1GiZedQ==", - "cpu": [ - "ppc64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "aix" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/android-arm": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.21.5.tgz", - "integrity": "sha512-vCPvzSjpPHEi1siZdlvAlsPxXl7WbOVUBBAowWug4rJHb68Ox8KualB+1ocNvT5fjv6wpkX6o/iEpbDrf68zcg==", - "cpu": [ - "arm" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/android-arm64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.21.5.tgz", - "integrity": "sha512-c0uX9VAUBQ7dTDCjq+wdyGLowMdtR/GoC2U5IYk/7D1H1JYC0qseD7+11iMP2mRLN9RcCMRcjC4YMclCzGwS/A==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/android-x64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.21.5.tgz", - "integrity": "sha512-D7aPRUUNHRBwHxzxRvp856rjUHRFW1SdQATKXH2hqA0kAZb1hKmi02OpYRacl0TxIGz/ZmXWlbZgjwWYaCakTA==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/darwin-arm64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.21.5.tgz", - "integrity": "sha512-DwqXqZyuk5AiWWf3UfLiRDJ5EDd49zg6O9wclZ7kUMv2WRFr4HKjXp/5t8JZ11QbQfUS6/cRCKGwYhtNAY88kQ==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/darwin-x64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.21.5.tgz", - "integrity": "sha512-se/JjF8NlmKVG4kNIuyWMV/22ZaerB+qaSi5MdrXtd6R08kvs2qCN4C09miupktDitvh8jRFflwGFBQcxZRjbw==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/freebsd-arm64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.21.5.tgz", - "integrity": "sha512-5JcRxxRDUJLX8JXp/wcBCy3pENnCgBR9bN6JsY4OmhfUtIHe3ZW0mawA7+RDAcMLrMIZaf03NlQiX9DGyB8h4g==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "freebsd" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/freebsd-x64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.21.5.tgz", - "integrity": "sha512-J95kNBj1zkbMXtHVH29bBriQygMXqoVQOQYA+ISs0/2l3T9/kj42ow2mpqerRBxDJnmkUDCaQT/dfNXWX/ZZCQ==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "freebsd" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/linux-arm": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.21.5.tgz", - "integrity": "sha512-bPb5AHZtbeNGjCKVZ9UGqGwo8EUu4cLq68E95A53KlxAPRmUyYv2D6F0uUI65XisGOL1hBP5mTronbgo+0bFcA==", - "cpu": [ - "arm" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/linux-arm64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.21.5.tgz", - "integrity": "sha512-ibKvmyYzKsBeX8d8I7MH/TMfWDXBF3db4qM6sy+7re0YXya+K1cem3on9XgdT2EQGMu4hQyZhan7TeQ8XkGp4Q==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/linux-ia32": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.21.5.tgz", - "integrity": "sha512-YvjXDqLRqPDl2dvRODYmmhz4rPeVKYvppfGYKSNGdyZkA01046pLWyRKKI3ax8fbJoK5QbxblURkwK/MWY18Tg==", - "cpu": [ - "ia32" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/linux-loong64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.21.5.tgz", - "integrity": "sha512-uHf1BmMG8qEvzdrzAqg2SIG/02+4/DHB6a9Kbya0XDvwDEKCoC8ZRWI5JJvNdUjtciBGFQ5PuBlpEOXQj+JQSg==", - "cpu": [ - "loong64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/linux-mips64el": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.21.5.tgz", - "integrity": "sha512-IajOmO+KJK23bj52dFSNCMsz1QP1DqM6cwLUv3W1QwyxkyIWecfafnI555fvSGqEKwjMXVLokcV5ygHW5b3Jbg==", - "cpu": [ - "mips64el" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/linux-ppc64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.21.5.tgz", - "integrity": "sha512-1hHV/Z4OEfMwpLO8rp7CvlhBDnjsC3CttJXIhBi+5Aj5r+MBvy4egg7wCbe//hSsT+RvDAG7s81tAvpL2XAE4w==", - "cpu": [ - "ppc64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/linux-riscv64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.21.5.tgz", - "integrity": "sha512-2HdXDMd9GMgTGrPWnJzP2ALSokE/0O5HhTUvWIbD3YdjME8JwvSCnNGBnTThKGEB91OZhzrJ4qIIxk/SBmyDDA==", - "cpu": [ - "riscv64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/linux-s390x": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.21.5.tgz", - "integrity": "sha512-zus5sxzqBJD3eXxwvjN1yQkRepANgxE9lgOW2qLnmr8ikMTphkjgXu1HR01K4FJg8h1kEEDAqDcZQtbrRnB41A==", - "cpu": [ - "s390x" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/linux-x64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.21.5.tgz", - "integrity": "sha512-1rYdTpyv03iycF1+BhzrzQJCdOuAOtaqHTWJZCWvijKD2N5Xu0TtVC8/+1faWqcP9iBCWOmjmhoH94dH82BxPQ==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/netbsd-x64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.21.5.tgz", - "integrity": "sha512-Woi2MXzXjMULccIwMnLciyZH4nCIMpWQAs049KEeMvOcNADVxo0UBIQPfSmxB3CWKedngg7sWZdLvLczpe0tLg==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "netbsd" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/openbsd-x64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.21.5.tgz", - "integrity": "sha512-HLNNw99xsvx12lFBUwoT8EVCsSvRNDVxNpjZ7bPn947b8gJPzeHWyNVhFsaerc0n3TsbOINvRP2byTZ5LKezow==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "openbsd" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/sunos-x64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.21.5.tgz", - "integrity": "sha512-6+gjmFpfy0BHU5Tpptkuh8+uw3mnrvgs+dSPQXQOv3ekbordwnzTVEb4qnIvQcYXq6gzkyTnoZ9dZG+D4garKg==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "sunos" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/win32-arm64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.21.5.tgz", - "integrity": "sha512-Z0gOTd75VvXqyq7nsl93zwahcTROgqvuAcYDUr+vOv8uHhNSKROyU961kgtCD1e95IqPKSQKH7tBTslnS3tA8A==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/win32-ia32": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.21.5.tgz", - "integrity": "sha512-SWXFF1CL2RVNMaVs+BBClwtfZSvDgtL//G/smwAc5oVK/UPu2Gu9tIaRgFmYFFKrmg3SyAjSrElf0TiJ1v8fYA==", - "cpu": [ - "ia32" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/win32-x64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.21.5.tgz", - "integrity": "sha512-tQd/1efJuzPC6rCFwEvLtci/xNFcTZknmXs98FYDfGE4wP9ClFV98nyKrzJKVPMhdDnjzLhdUyMX4PsQAPjwIw==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@jridgewell/gen-mapping": { - "version": "0.3.13", - "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.13.tgz", - "integrity": "sha512-2kkt/7niJ6MgEPxF0bYdQ6etZaA+fQvDcLKckhy1yIQOzaoKjBBjSj63/aLVjYE3qhRt5dvM+uUyfCg6UKCBbA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jridgewell/sourcemap-codec": "^1.5.0", - "@jridgewell/trace-mapping": "^0.3.24" - } - }, - "node_modules/@jridgewell/remapping": { - "version": "2.3.5", - "resolved": "https://registry.npmjs.org/@jridgewell/remapping/-/remapping-2.3.5.tgz", - "integrity": "sha512-LI9u/+laYG4Ds1TDKSJW2YPrIlcVYOwi2fUC6xB43lueCjgxV4lffOCZCtYFiH6TNOX+tQKXx97T4IKHbhyHEQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jridgewell/gen-mapping": "^0.3.5", - "@jridgewell/trace-mapping": "^0.3.24" - } - }, - "node_modules/@jridgewell/resolve-uri": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", - "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@jridgewell/sourcemap-codec": { - "version": "1.5.5", - "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.5.tgz", - "integrity": "sha512-cYQ9310grqxueWbl+WuIUIaiUaDcj7WOq5fVhEljNVgRfOUhY9fy2zTvfoqWsnebh8Sl70VScFbICvJnLKB0Og==", - "dev": true, - "license": "MIT" - }, - "node_modules/@jridgewell/trace-mapping": { - "version": "0.3.31", - "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.31.tgz", - "integrity": "sha512-zzNR+SdQSDJzc8joaeP8QQoCQr8NuYx2dIIytl1QeBEZHJ9uW6hebsrYgbz8hJwUQao3TWCMtmfV8Nu1twOLAw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jridgewell/resolve-uri": "^3.1.0", - "@jridgewell/sourcemap-codec": "^1.4.14" - } - }, - "node_modules/@rolldown/pluginutils": { - "version": "1.0.0-beta.27", - "resolved": "https://registry.npmjs.org/@rolldown/pluginutils/-/pluginutils-1.0.0-beta.27.tgz", - "integrity": "sha512-+d0F4MKMCbeVUJwG96uQ4SgAznZNSq93I3V+9NHA4OpvqG8mRCpGdKmK8l/dl02h2CCDHwW2FqilnTyDcAnqjA==", - "dev": true, - "license": "MIT" - }, - "node_modules/@rollup/rollup-android-arm-eabi": { - "version": "4.60.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.60.0.tgz", - "integrity": "sha512-WOhNW9K8bR3kf4zLxbfg6Pxu2ybOUbB2AjMDHSQx86LIF4rH4Ft7vmMwNt0loO0eonglSNy4cpD3MKXXKQu0/A==", - "cpu": [ - "arm" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "android" - ] - }, - "node_modules/@rollup/rollup-android-arm64": { - "version": "4.60.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.60.0.tgz", - "integrity": "sha512-u6JHLll5QKRvjciE78bQXDmqRqNs5M/3GVqZeMwvmjaNODJih/WIrJlFVEihvV0MiYFmd+ZyPr9wxOVbPAG2Iw==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "android" - ] - }, - "node_modules/@rollup/rollup-darwin-arm64": { - "version": "4.60.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.60.0.tgz", - "integrity": "sha512-qEF7CsKKzSRc20Ciu2Zw1wRrBz4g56F7r/vRwY430UPp/nt1x21Q/fpJ9N5l47WWvJlkNCPJz3QRVw008fi7yA==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ] - }, - "node_modules/@rollup/rollup-darwin-x64": { - "version": "4.60.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.60.0.tgz", - "integrity": "sha512-WADYozJ4QCnXCH4wPB+3FuGmDPoFseVCUrANmA5LWwGmC6FL14BWC7pcq+FstOZv3baGX65tZ378uT6WG8ynTw==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ] - }, - "node_modules/@rollup/rollup-freebsd-arm64": { - "version": "4.60.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.60.0.tgz", - "integrity": "sha512-6b8wGHJlDrGeSE3aH5mGNHBjA0TTkxdoNHik5EkvPHCt351XnigA4pS7Wsj/Eo9Y8RBU6f35cjN9SYmCFBtzxw==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "freebsd" - ] - }, - "node_modules/@rollup/rollup-freebsd-x64": { - "version": "4.60.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.60.0.tgz", - "integrity": "sha512-h25Ga0t4jaylMB8M/JKAyrvvfxGRjnPQIR8lnCayyzEjEOx2EJIlIiMbhpWxDRKGKF8jbNH01NnN663dH638mA==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "freebsd" - ] - }, - "node_modules/@rollup/rollup-linux-arm-gnueabihf": { - "version": "4.60.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.60.0.tgz", - "integrity": "sha512-RzeBwv0B3qtVBWtcuABtSuCzToo2IEAIQrcyB/b2zMvBWVbjo8bZDjACUpnaafaxhTw2W+imQbP2BD1usasK4g==", - "cpu": [ - "arm" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-arm-musleabihf": { - "version": "4.60.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.60.0.tgz", - "integrity": "sha512-Sf7zusNI2CIU1HLzuu9Tc5YGAHEZs5Lu7N1ssJG4Tkw6e0MEsN7NdjUDDfGNHy2IU+ENyWT+L2obgWiguWibWQ==", - "cpu": [ - "arm" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-arm64-gnu": { - "version": "4.60.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.60.0.tgz", - "integrity": "sha512-DX2x7CMcrJzsE91q7/O02IJQ5/aLkVtYFryqCjduJhUfGKG6yJV8hxaw8pZa93lLEpPTP/ohdN4wFz7yp/ry9A==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-arm64-musl": { - "version": "4.60.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.60.0.tgz", - "integrity": "sha512-09EL+yFVbJZlhcQfShpswwRZ0Rg+z/CsSELFCnPt3iK+iqwGsI4zht3secj5vLEs957QvFFXnzAT0FFPIxSrkQ==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-loong64-gnu": { - "version": "4.60.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loong64-gnu/-/rollup-linux-loong64-gnu-4.60.0.tgz", - "integrity": "sha512-i9IcCMPr3EXm8EQg5jnja0Zyc1iFxJjZWlb4wr7U2Wx/GrddOuEafxRdMPRYVaXjgbhvqalp6np07hN1w9kAKw==", - "cpu": [ - "loong64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-loong64-musl": { - "version": "4.60.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loong64-musl/-/rollup-linux-loong64-musl-4.60.0.tgz", - "integrity": "sha512-DGzdJK9kyJ+B78MCkWeGnpXJ91tK/iKA6HwHxF4TAlPIY7GXEvMe8hBFRgdrR9Ly4qebR/7gfUs9y2IoaVEyog==", - "cpu": [ - "loong64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-ppc64-gnu": { - "version": "4.60.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-gnu/-/rollup-linux-ppc64-gnu-4.60.0.tgz", - "integrity": "sha512-RwpnLsqC8qbS8z1H1AxBA1H6qknR4YpPR9w2XX0vo2Sz10miu57PkNcnHVaZkbqyw/kUWfKMI73jhmfi9BRMUQ==", - "cpu": [ - "ppc64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-ppc64-musl": { - "version": "4.60.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-musl/-/rollup-linux-ppc64-musl-4.60.0.tgz", - "integrity": "sha512-Z8pPf54Ly3aqtdWC3G4rFigZgNvd+qJlOE52fmko3KST9SoGfAdSRCwyoyG05q1HrrAblLbk1/PSIV+80/pxLg==", - "cpu": [ - "ppc64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-riscv64-gnu": { - "version": "4.60.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.60.0.tgz", - "integrity": "sha512-3a3qQustp3COCGvnP4SvrMHnPQ9d1vzCakQVRTliaz8cIp/wULGjiGpbcqrkv0WrHTEp8bQD/B3HBjzujVWLOA==", - "cpu": [ - "riscv64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-riscv64-musl": { - "version": "4.60.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-musl/-/rollup-linux-riscv64-musl-4.60.0.tgz", - "integrity": "sha512-pjZDsVH/1VsghMJ2/kAaxt6dL0psT6ZexQVrijczOf+PeP2BUqTHYejk3l6TlPRydggINOeNRhvpLa0AYpCWSQ==", - "cpu": [ - "riscv64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-s390x-gnu": { - "version": "4.60.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.60.0.tgz", - "integrity": "sha512-3ObQs0BhvPgiUVZrN7gqCSvmFuMWvWvsjG5ayJ3Lraqv+2KhOsp+pUbigqbeWqueGIsnn+09HBw27rJ+gYK4VQ==", - "cpu": [ - "s390x" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-x64-gnu": { - "version": "4.60.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.60.0.tgz", - "integrity": "sha512-EtylprDtQPdS5rXvAayrNDYoJhIz1/vzN2fEubo3yLE7tfAw+948dO0g4M0vkTVFhKojnF+n6C8bDNe+gDRdTg==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-x64-musl": { - "version": "4.60.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.60.0.tgz", - "integrity": "sha512-k09oiRCi/bHU9UVFqD17r3eJR9bn03TyKraCrlz5ULFJGdJGi7VOmm9jl44vOJvRJ6P7WuBi/s2A97LxxHGIdw==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-openbsd-x64": { - "version": "4.60.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-openbsd-x64/-/rollup-openbsd-x64-4.60.0.tgz", - "integrity": "sha512-1o/0/pIhozoSaDJoDcec+IVLbnRtQmHwPV730+AOD29lHEEo4F5BEUB24H0OBdhbBBDwIOSuf7vgg0Ywxdfiiw==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "openbsd" - ] - }, - "node_modules/@rollup/rollup-openharmony-arm64": { - "version": "4.60.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-openharmony-arm64/-/rollup-openharmony-arm64-4.60.0.tgz", - "integrity": "sha512-pESDkos/PDzYwtyzB5p/UoNU/8fJo68vcXM9ZW2V0kjYayj1KaaUfi1NmTUTUpMn4UhU4gTuK8gIaFO4UGuMbA==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "openharmony" - ] - }, - "node_modules/@rollup/rollup-win32-arm64-msvc": { - "version": "4.60.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.60.0.tgz", - "integrity": "sha512-hj1wFStD7B1YBeYmvY+lWXZ7ey73YGPcViMShYikqKT1GtstIKQAtfUI6yrzPjAy/O7pO0VLXGmUVWXQMaYgTQ==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "win32" - ] - }, - "node_modules/@rollup/rollup-win32-ia32-msvc": { - "version": "4.60.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.60.0.tgz", - "integrity": "sha512-SyaIPFoxmUPlNDq5EHkTbiKzmSEmq/gOYFI/3HHJ8iS/v1mbugVa7dXUzcJGQfoytp9DJFLhHH4U3/eTy2Bq4w==", - "cpu": [ - "ia32" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "win32" - ] - }, - "node_modules/@rollup/rollup-win32-x64-gnu": { - "version": "4.60.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-gnu/-/rollup-win32-x64-gnu-4.60.0.tgz", - "integrity": "sha512-RdcryEfzZr+lAr5kRm2ucN9aVlCCa2QNq4hXelZxb8GG0NJSazq44Z3PCCc8wISRuCVnGs0lQJVX5Vp6fKA+IA==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "win32" - ] - }, - "node_modules/@rollup/rollup-win32-x64-msvc": { - "version": "4.60.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.60.0.tgz", - "integrity": "sha512-PrsWNQ8BuE00O3Xsx3ALh2Df8fAj9+cvvX9AIA6o4KpATR98c9mud4XtDWVvsEuyia5U4tVSTKygawyJkjm60w==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "win32" - ] - }, - "node_modules/@types/babel__core": { - "version": "7.20.5", - "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.20.5.tgz", - "integrity": "sha512-qoQprZvz5wQFJwMDqeseRXWv3rqMvhgpbXFfVyWhbx9X47POIA6i/+dXefEmZKoAgOaTdaIgNSMqMIU61yRyzA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/parser": "^7.20.7", - "@babel/types": "^7.20.7", - "@types/babel__generator": "*", - "@types/babel__template": "*", - "@types/babel__traverse": "*" - } - }, - "node_modules/@types/babel__generator": { - "version": "7.27.0", - "resolved": "https://registry.npmjs.org/@types/babel__generator/-/babel__generator-7.27.0.tgz", - "integrity": "sha512-ufFd2Xi92OAVPYsy+P4n7/U7e68fex0+Ee8gSG9KX7eo084CWiQ4sdxktvdl0bOPupXtVJPY19zk6EwWqUQ8lg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/types": "^7.0.0" - } - }, - "node_modules/@types/babel__template": { - "version": "7.4.4", - "resolved": "https://registry.npmjs.org/@types/babel__template/-/babel__template-7.4.4.tgz", - "integrity": "sha512-h/NUaSyG5EyxBIp8YRxo4RMe2/qQgvyowRwVMzhYhBCONbW8PUsg4lkFMrhgZhUe5z3L3MiLDuvyJ/CaPa2A8A==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/parser": "^7.1.0", - "@babel/types": "^7.0.0" - } - }, - "node_modules/@types/babel__traverse": { - "version": "7.28.0", - "resolved": "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.28.0.tgz", - "integrity": "sha512-8PvcXf70gTDZBgt9ptxJ8elBeBjcLOAcOtoO/mPJjtji1+CdGbHgm77om1GrsPxsiE+uXIpNSK64UYaIwQXd4Q==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/types": "^7.28.2" - } - }, - "node_modules/@types/estree": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.8.tgz", - "integrity": "sha512-dWHzHa2WqEXI/O1E9OjrocMTKJl2mSrEolh1Iomrv6U+JuNwaHXsXx9bLu5gG7BUWFIN0skIQJQ/L1rIex4X6w==", - "dev": true, - "license": "MIT" - }, - "node_modules/@types/prop-types": { - "version": "15.7.15", - "resolved": "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.15.tgz", - "integrity": "sha512-F6bEyamV9jKGAFBEmlQnesRPGOQqS2+Uwi0Em15xenOxHaf2hv6L8YCVn3rPdPJOiJfPiCnLIRyvwVaqMY3MIw==", - "dev": true, - "license": "MIT" - }, - "node_modules/@types/react": { - "version": "18.3.28", - "resolved": "https://registry.npmjs.org/@types/react/-/react-18.3.28.tgz", - "integrity": "sha512-z9VXpC7MWrhfWipitjNdgCauoMLRdIILQsAEV+ZesIzBq/oUlxk0m3ApZuMFCXdnS4U7KrI+l3WRUEGQ8K1QKw==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "@types/prop-types": "*", - "csstype": "^3.2.2" - } - }, - "node_modules/@types/react-dom": { - "version": "18.3.7", - "resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-18.3.7.tgz", - "integrity": "sha512-MEe3UeoENYVFXzoXEWsvcpg6ZvlrFNlOQ7EOsvhI3CfAXwzPfO8Qwuxd40nepsYKqyyVQnTdEfv68q91yLcKrQ==", - "dev": true, - "license": "MIT", - "peerDependencies": { - "@types/react": "^18.0.0" - } - }, - "node_modules/@vitejs/plugin-react": { - "version": "4.7.0", - "resolved": "https://registry.npmjs.org/@vitejs/plugin-react/-/plugin-react-4.7.0.tgz", - "integrity": "sha512-gUu9hwfWvvEDBBmgtAowQCojwZmJ5mcLn3aufeCsitijs3+f2NsrPtlAWIR6OPiqljl96GVCUbLe0HyqIpVaoA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/core": "^7.28.0", - "@babel/plugin-transform-react-jsx-self": "^7.27.1", - "@babel/plugin-transform-react-jsx-source": "^7.27.1", - "@rolldown/pluginutils": "1.0.0-beta.27", - "@types/babel__core": "^7.20.5", - "react-refresh": "^0.17.0" - }, - "engines": { - "node": "^14.18.0 || >=16.0.0" - }, - "peerDependencies": { - "vite": "^4.2.0 || ^5.0.0 || ^6.0.0 || ^7.0.0" - } - }, - "node_modules/baseline-browser-mapping": { - "version": "2.10.10", - "resolved": "https://registry.npmjs.org/baseline-browser-mapping/-/baseline-browser-mapping-2.10.10.tgz", - "integrity": "sha512-sUoJ3IMxx4AyRqO4MLeHlnGDkyXRoUG0/AI9fjK+vS72ekpV0yWVY7O0BVjmBcRtkNcsAO2QDZ4tdKKGoI6YaQ==", - "dev": true, - "license": "Apache-2.0", - "bin": { - "baseline-browser-mapping": "dist/cli.cjs" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/browserslist": { - "version": "4.28.1", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.28.1.tgz", - "integrity": "sha512-ZC5Bd0LgJXgwGqUknZY/vkUQ04r8NXnJZ3yYi4vDmSiZmC/pdSN0NbNRPxZpbtO4uAfDUAFffO8IZoM3Gj8IkA==", - "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/browserslist" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/browserslist" - }, - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "license": "MIT", - "peer": true, - "dependencies": { - "baseline-browser-mapping": "^2.9.0", - "caniuse-lite": "^1.0.30001759", - "electron-to-chromium": "^1.5.263", - "node-releases": "^2.0.27", - "update-browserslist-db": "^1.2.0" - }, - "bin": { - "browserslist": "cli.js" - }, - "engines": { - "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" - } - }, - "node_modules/caniuse-lite": { - "version": "1.0.30001781", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001781.tgz", - "integrity": "sha512-RdwNCyMsNBftLjW6w01z8bKEvT6e/5tpPVEgtn22TiLGlstHOVecsX2KHFkD5e/vRnIE4EGzpuIODb3mtswtkw==", - "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/browserslist" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/caniuse-lite" - }, - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "license": "CC-BY-4.0" - }, - "node_modules/convert-source-map": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz", - "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==", - "dev": true, - "license": "MIT" - }, - "node_modules/csstype": { - "version": "3.2.3", - "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.2.3.tgz", - "integrity": "sha512-z1HGKcYy2xA8AGQfwrn0PAy+PB7X/GSj3UVJW9qKyn43xWa+gl5nXmU4qqLMRzWVLFC8KusUX8T/0kCiOYpAIQ==", - "dev": true, - "license": "MIT" - }, - "node_modules/debug": { - "version": "4.4.3", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz", - "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==", - "dev": true, - "license": "MIT", - "dependencies": { - "ms": "^2.1.3" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, - "node_modules/electron-to-chromium": { - "version": "1.5.322", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.322.tgz", - "integrity": "sha512-vFU34OcrvMcH66T+dYC3G4nURmgfDVewMIu6Q2urXpumAPSMmzvcn04KVVV8Opikq8Vs5nUbO/8laNhNRqSzYw==", - "dev": true, - "license": "ISC" - }, - "node_modules/esbuild": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.21.5.tgz", - "integrity": "sha512-mg3OPMV4hXywwpoDxu3Qda5xCKQi+vCTZq8S9J/EpkhB2HzKXq4SNFZE3+NK93JYxc8VMSep+lOUSC/RVKaBqw==", - "dev": true, - "hasInstallScript": true, - "license": "MIT", - "bin": { - "esbuild": "bin/esbuild" - }, - "engines": { - "node": ">=12" - }, - "optionalDependencies": { - "@esbuild/aix-ppc64": "0.21.5", - "@esbuild/android-arm": "0.21.5", - "@esbuild/android-arm64": "0.21.5", - "@esbuild/android-x64": "0.21.5", - "@esbuild/darwin-arm64": "0.21.5", - "@esbuild/darwin-x64": "0.21.5", - "@esbuild/freebsd-arm64": "0.21.5", - "@esbuild/freebsd-x64": "0.21.5", - "@esbuild/linux-arm": "0.21.5", - "@esbuild/linux-arm64": "0.21.5", - "@esbuild/linux-ia32": "0.21.5", - "@esbuild/linux-loong64": "0.21.5", - "@esbuild/linux-mips64el": "0.21.5", - "@esbuild/linux-ppc64": "0.21.5", - "@esbuild/linux-riscv64": "0.21.5", - "@esbuild/linux-s390x": "0.21.5", - "@esbuild/linux-x64": "0.21.5", - "@esbuild/netbsd-x64": "0.21.5", - "@esbuild/openbsd-x64": "0.21.5", - "@esbuild/sunos-x64": "0.21.5", - "@esbuild/win32-arm64": "0.21.5", - "@esbuild/win32-ia32": "0.21.5", - "@esbuild/win32-x64": "0.21.5" - } - }, - "node_modules/escalade": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz", - "integrity": "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/fsevents": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", - "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", - "dev": true, - "hasInstallScript": true, - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": "^8.16.0 || ^10.6.0 || >=11.0.0" - } - }, - "node_modules/gensync": { - "version": "1.0.0-beta.2", - "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", - "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/js-tokens": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", - "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", - "license": "MIT" - }, - "node_modules/jsesc": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-3.1.0.tgz", - "integrity": "sha512-/sM3dO2FOzXjKQhJuo0Q173wf2KOo8t4I8vHy6lF9poUp7bKT0/NHE8fPX23PwfhnykfqnC2xRxOnVw5XuGIaA==", - "dev": true, - "license": "MIT", - "bin": { - "jsesc": "bin/jsesc" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/json5": { - "version": "2.2.3", - "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", - "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", - "dev": true, - "license": "MIT", - "bin": { - "json5": "lib/cli.js" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/loose-envify": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", - "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==", - "license": "MIT", - "dependencies": { - "js-tokens": "^3.0.0 || ^4.0.0" - }, - "bin": { - "loose-envify": "cli.js" - } - }, - "node_modules/lru-cache": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", - "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", - "dev": true, - "license": "ISC", - "dependencies": { - "yallist": "^3.0.2" - } - }, - "node_modules/ms": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", - "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", - "dev": true, - "license": "MIT" - }, - "node_modules/nanoid": { - "version": "3.3.11", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.11.tgz", - "integrity": "sha512-N8SpfPUnUp1bK+PMYW8qSWdl9U+wwNWI4QKxOYDy9JAro3WMX7p2OeVRF9v+347pnakNevPmiHhNmZ2HbFA76w==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "license": "MIT", - "bin": { - "nanoid": "bin/nanoid.cjs" - }, - "engines": { - "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" - } - }, - "node_modules/node-releases": { - "version": "2.0.36", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.36.tgz", - "integrity": "sha512-TdC8FSgHz8Mwtw9g5L4gR/Sh9XhSP/0DEkQxfEFXOpiul5IiHgHan2VhYYb6agDSfp4KuvltmGApc8HMgUrIkA==", - "dev": true, - "license": "MIT" - }, - "node_modules/picocolors": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", - "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==", - "dev": true, - "license": "ISC" - }, - "node_modules/postcss": { - "version": "8.5.8", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.8.tgz", - "integrity": "sha512-OW/rX8O/jXnm82Ey1k44pObPtdblfiuWnrd8X7GJ7emImCOstunGbXUpp7HdBrFQX6rJzn3sPT397Wp5aCwCHg==", - "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/postcss/" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/postcss" - }, - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "license": "MIT", - "dependencies": { - "nanoid": "^3.3.11", - "picocolors": "^1.1.1", - "source-map-js": "^1.2.1" - }, - "engines": { - "node": "^10 || ^12 || >=14" - } - }, - "node_modules/react": { - "version": "18.3.1", - "resolved": "https://registry.npmjs.org/react/-/react-18.3.1.tgz", - "integrity": "sha512-wS+hAgJShR0KhEvPJArfuPVN1+Hz1t0Y6n5jLrGQbkb4urgPE/0Rve+1kMB1v/oWgHgm4WIcV+i7F2pTVj+2iQ==", - "license": "MIT", - "peer": true, - "dependencies": { - "loose-envify": "^1.1.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/react-dom": { - "version": "18.3.1", - "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-18.3.1.tgz", - "integrity": "sha512-5m4nQKp+rZRb09LNH59GM4BxTh9251/ylbKIbpe7TpGxfJ+9kv6BLkLBXIjjspbgbnIBNqlI23tRnTWT0snUIw==", - "license": "MIT", - "dependencies": { - "loose-envify": "^1.1.0", - "scheduler": "^0.23.2" - }, - "peerDependencies": { - "react": "^18.3.1" - } - }, - "node_modules/react-refresh": { - "version": "0.17.0", - "resolved": "https://registry.npmjs.org/react-refresh/-/react-refresh-0.17.0.tgz", - "integrity": "sha512-z6F7K9bV85EfseRCp2bzrpyQ0Gkw1uLoCel9XBVWPg/TjRj94SkJzUTGfOa4bs7iJvBWtQG0Wq7wnI0syw3EBQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/rollup": { - "version": "4.60.0", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.60.0.tgz", - "integrity": "sha512-yqjxruMGBQJ2gG4HtjZtAfXArHomazDHoFwFFmZZl0r7Pdo7qCIXKqKHZc8yeoMgzJJ+pO6pEEHa+V7uzWlrAQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/estree": "1.0.8" - }, - "bin": { - "rollup": "dist/bin/rollup" - }, - "engines": { - "node": ">=18.0.0", - "npm": ">=8.0.0" - }, - "optionalDependencies": { - "@rollup/rollup-android-arm-eabi": "4.60.0", - "@rollup/rollup-android-arm64": "4.60.0", - "@rollup/rollup-darwin-arm64": "4.60.0", - "@rollup/rollup-darwin-x64": "4.60.0", - "@rollup/rollup-freebsd-arm64": "4.60.0", - "@rollup/rollup-freebsd-x64": "4.60.0", - "@rollup/rollup-linux-arm-gnueabihf": "4.60.0", - "@rollup/rollup-linux-arm-musleabihf": "4.60.0", - "@rollup/rollup-linux-arm64-gnu": "4.60.0", - "@rollup/rollup-linux-arm64-musl": "4.60.0", - "@rollup/rollup-linux-loong64-gnu": "4.60.0", - "@rollup/rollup-linux-loong64-musl": "4.60.0", - "@rollup/rollup-linux-ppc64-gnu": "4.60.0", - "@rollup/rollup-linux-ppc64-musl": "4.60.0", - "@rollup/rollup-linux-riscv64-gnu": "4.60.0", - "@rollup/rollup-linux-riscv64-musl": "4.60.0", - "@rollup/rollup-linux-s390x-gnu": "4.60.0", - "@rollup/rollup-linux-x64-gnu": "4.60.0", - "@rollup/rollup-linux-x64-musl": "4.60.0", - "@rollup/rollup-openbsd-x64": "4.60.0", - "@rollup/rollup-openharmony-arm64": "4.60.0", - "@rollup/rollup-win32-arm64-msvc": "4.60.0", - "@rollup/rollup-win32-ia32-msvc": "4.60.0", - "@rollup/rollup-win32-x64-gnu": "4.60.0", - "@rollup/rollup-win32-x64-msvc": "4.60.0", - "fsevents": "~2.3.2" - } - }, - "node_modules/scheduler": { - "version": "0.23.2", - "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.23.2.tgz", - "integrity": "sha512-UOShsPwz7NrMUqhR6t0hWjFduvOzbtv7toDH1/hIrfRNIDBnnBWd0CwJTGvTpngVlmwGCdP9/Zl/tVrDqcuYzQ==", - "license": "MIT", - "dependencies": { - "loose-envify": "^1.1.0" - } - }, - "node_modules/semver": { - "version": "6.3.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", - "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", - "dev": true, - "license": "ISC", - "bin": { - "semver": "bin/semver.js" - } - }, - "node_modules/source-map-js": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz", - "integrity": "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==", - "dev": true, - "license": "BSD-3-Clause", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/typescript": { - "version": "5.9.3", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.9.3.tgz", - "integrity": "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==", - "dev": true, - "license": "Apache-2.0", - "bin": { - "tsc": "bin/tsc", - "tsserver": "bin/tsserver" - }, - "engines": { - "node": ">=14.17" - } - }, - "node_modules/update-browserslist-db": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.2.3.tgz", - "integrity": "sha512-Js0m9cx+qOgDxo0eMiFGEueWztz+d4+M3rGlmKPT+T4IS/jP4ylw3Nwpu6cpTTP8R1MAC1kF4VbdLt3ARf209w==", - "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/browserslist" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/browserslist" - }, - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "license": "MIT", - "dependencies": { - "escalade": "^3.2.0", - "picocolors": "^1.1.1" - }, - "bin": { - "update-browserslist-db": "cli.js" - }, - "peerDependencies": { - "browserslist": ">= 4.21.0" - } - }, - "node_modules/vite": { - "version": "5.4.21", - "resolved": "https://registry.npmjs.org/vite/-/vite-5.4.21.tgz", - "integrity": "sha512-o5a9xKjbtuhY6Bi5S3+HvbRERmouabWbyUcpXXUA1u+GNUKoROi9byOJ8M0nHbHYHkYICiMlqxkg1KkYmm25Sw==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "esbuild": "^0.21.3", - "postcss": "^8.4.43", - "rollup": "^4.20.0" - }, - "bin": { - "vite": "bin/vite.js" - }, - "engines": { - "node": "^18.0.0 || >=20.0.0" - }, - "funding": { - "url": "https://github.com/vitejs/vite?sponsor=1" - }, - "optionalDependencies": { - "fsevents": "~2.3.3" - }, - "peerDependencies": { - "@types/node": "^18.0.0 || >=20.0.0", - "less": "*", - "lightningcss": "^1.21.0", - "sass": "*", - "sass-embedded": "*", - "stylus": "*", - "sugarss": "*", - "terser": "^5.4.0" - }, - "peerDependenciesMeta": { - "@types/node": { - "optional": true - }, - "less": { - "optional": true - }, - "lightningcss": { - "optional": true - }, - "sass": { - "optional": true - }, - "sass-embedded": { - "optional": true - }, - "stylus": { - "optional": true - }, - "sugarss": { - "optional": true - }, - "terser": { - "optional": true - } - } - }, - "node_modules/yallist": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", - "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", - "dev": true, - "license": "ISC" - } - } -} diff --git a/crates/pool-indexer/frontend/package.json b/crates/pool-indexer/frontend/package.json deleted file mode 100644 index e429c68401..0000000000 --- a/crates/pool-indexer/frontend/package.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "name": "pool-indexer-ui", - "private": true, - "version": "0.1.0", - "type": "module", - "scripts": { - "dev": "vite", - "build": "tsc && vite build", - "preview": "vite preview" - }, - "dependencies": { - "react": "^18.3.1", - "react-dom": "^18.3.1" - }, - "devDependencies": { - "@types/react": "^18.3.5", - "@types/react-dom": "^18.3.0", - "@vitejs/plugin-react": "^4.3.1", - "typescript": "^5.5.3", - "vite": "^5.4.2" - } -} diff --git a/crates/pool-indexer/frontend/src/App.css b/crates/pool-indexer/frontend/src/App.css deleted file mode 100644 index 62e616e650..0000000000 --- a/crates/pool-indexer/frontend/src/App.css +++ /dev/null @@ -1,394 +0,0 @@ -*, *::before, *::after { - box-sizing: border-box; - margin: 0; - padding: 0; -} - -:root { - --bg: #0a0a0a; - --surface: #111111; - --surface2: #1a1a1a; - --border: #252525; - --text: #e2e2e2; - --dim: #666666; - --accent: #3b82f6; - --green: #22c55e; - --red: #ef4444; - --yellow: #f59e0b; - --selected-bg: rgba(59, 130, 246, 0.08); - --selected-border: #3b82f6; -} - -html, body { - height: 100%; - background: var(--bg); - color: var(--text); -} - -body { - font-family: system-ui, -apple-system, sans-serif; - font-size: 13px; - line-height: 1.5; -} - -.app { - display: flex; - flex-direction: column; - height: 100vh; - overflow: hidden; -} - -/* Header */ -header { - display: flex; - align-items: center; - justify-content: space-between; - padding: 0 16px; - height: 48px; - border-bottom: 1px solid var(--border); - background: var(--surface); - flex-shrink: 0; - gap: 12px; -} - -.header-left, -.header-right { - display: flex; - align-items: center; - gap: 10px; -} - -.logo { - font-size: 14px; - font-weight: 600; -} - -.network-badge { - padding: 2px 8px; - border-radius: 10px; - background: rgba(59, 130, 246, 0.12); - border: 1px solid rgba(59, 130, 246, 0.3); - font-size: 11px; - font-weight: 600; - color: var(--accent); - font-family: 'SF Mono', 'Fira Code', monospace; - text-transform: lowercase; -} - -.chip { - padding: 2px 8px; - border-radius: 10px; - background: var(--surface2); - border: 1px solid var(--border); - font-size: 11px; - color: var(--dim); - font-variant-numeric: tabular-nums; -} - -.filter { - background: var(--surface2); - border: 1px solid var(--border); - border-radius: 6px; - padding: 4px 10px; - color: var(--text); - font-size: 12px; - font-family: 'SF Mono', 'Fira Code', monospace; - width: 220px; - outline: none; - transition: border-color 0.15s; -} -.filter:focus { - border-color: var(--accent); -} -.filter::placeholder { - color: var(--dim); -} - -/* Banners */ -.banner { - padding: 8px 16px; - font-size: 12px; - flex-shrink: 0; -} -.banner.error { - background: rgba(239, 68, 68, 0.08); - color: #fca5a5; - border-bottom: 1px solid rgba(239, 68, 68, 0.2); -} - -/* Layout */ -.layout { - display: flex; - flex: 1; - overflow: hidden; -} - -/* Pool panel */ -.pool-panel { - flex: 1; - overflow: auto; - min-width: 0; -} - -.pool-panel table { - width: 100%; - border-collapse: collapse; -} - -.pool-panel thead { - position: sticky; - top: 0; - background: var(--surface); - z-index: 1; -} - -.pool-panel th { - padding: 8px 12px; - text-align: left; - font-size: 11px; - font-weight: 600; - color: var(--dim); - text-transform: uppercase; - letter-spacing: 0.04em; - border-bottom: 1px solid var(--border); - white-space: nowrap; -} - -.pool-panel td { - padding: 6px 12px; - border-bottom: 1px solid var(--border); - white-space: nowrap; - overflow: hidden; - text-overflow: ellipsis; - max-width: 160px; -} - -.pool-panel tbody tr { - cursor: pointer; - transition: background 0.08s; -} -.pool-panel tbody tr:hover { - background: var(--surface2); -} -.pool-panel tbody tr.selected { - background: var(--selected-bg); - outline: 1px solid var(--selected-border); - outline-offset: -1px; -} - -/* Shared table helpers */ -.mono { - font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace; - font-size: 12px; -} -.r { - text-align: right !important; -} -.dim { - color: var(--dim); -} -.pos { - color: var(--green); -} -.neg { - color: var(--red); -} - -.sortable { - cursor: pointer; - user-select: none; -} -.sortable:hover { - color: var(--text); -} - -.fee-badge { - display: inline-block; - padding: 1px 6px; - border-radius: 4px; - background: var(--surface2); - border: 1px solid var(--border); - font-size: 11px; - color: var(--dim); -} - -.empty { - text-align: center !important; - color: var(--dim); - padding: 40px 0 !important; -} - -.status-row { - text-align: center; - color: var(--dim); - padding: 20px; - font-size: 12px; -} - -.load-more-row { - padding: 12px 16px; - text-align: center; -} -.load-more-row button { - background: var(--surface2); - border: 1px solid var(--border); - color: var(--text); - padding: 6px 24px; - border-radius: 6px; - cursor: pointer; - font-size: 12px; - transition: border-color 0.15s; -} -.load-more-row button:hover { - border-color: var(--accent); -} - -/* Ticks panel */ -.ticks-panel { - width: 400px; - flex-shrink: 0; - border-left: 1px solid var(--border); - background: var(--surface); - display: flex; - flex-direction: column; - overflow: hidden; -} - -.ticks-header { - display: flex; - align-items: flex-start; - justify-content: space-between; - padding: 12px 16px; - border-bottom: 1px solid var(--border); - flex-shrink: 0; -} - -.ticks-header h2 { - font-size: 14px; - font-weight: 600; - margin-bottom: 3px; -} - -.addr-small { - font-size: 10px; - color: var(--dim); - word-break: break-all; -} - -.ticks-tokens { - display: flex; - gap: 12px; - margin-top: 6px; -} - -.ticks-tokens a { - font-size: 11px; - color: var(--dim); - text-decoration: none; -} - -.ticks-tokens a:hover { - color: var(--accent); -} - -.ticks-header-actions { - display: flex; - align-items: center; - gap: 6px; - flex-shrink: 0; - margin-left: 8px; -} - -.explain-btn { - background: var(--surface2); - border: 1px solid var(--border); - color: var(--dim); - cursor: pointer; - font-size: 11px; - padding: 3px 8px; - border-radius: 4px; - white-space: nowrap; - transition: border-color 0.15s, color 0.15s; -} -.explain-btn:hover { - border-color: var(--accent); - color: var(--text); -} - -.explain-box { - background: var(--bg); - border-bottom: 1px solid var(--border); - padding: 12px 16px; - font-family: 'SF Mono', 'Fira Code', monospace; - font-size: 11px; - line-height: 1.6; - color: var(--text); - white-space: pre-wrap; - word-break: break-word; - flex-shrink: 0; - overflow-y: auto; - max-height: 300px; -} - -.ticks-header .close { - background: none; - border: none; - color: var(--dim); - cursor: pointer; - font-size: 14px; - padding: 2px 4px; - border-radius: 4px; - line-height: 1; - flex-shrink: 0; -} -.ticks-header .close:hover { - color: var(--text); - background: var(--surface2); -} - -.ticks-meta { - padding: 8px 16px; - font-size: 11px; - flex-shrink: 0; -} - -/* Tick chart */ -.tick-chart { - display: block; - width: 100%; - height: auto; - padding: 4px 0; - border-bottom: 1px solid var(--border); - flex-shrink: 0; - background: var(--bg); -} - -/* Ticks table */ -.ticks-table-wrap { - flex: 1; - overflow: auto; -} - -.ticks-table-wrap table { - width: 100%; - border-collapse: collapse; -} - -.ticks-table-wrap th { - padding: 6px 12px; - font-size: 11px; - font-weight: 600; - color: var(--dim); - text-transform: uppercase; - letter-spacing: 0.04em; - border-bottom: 1px solid var(--border); - background: var(--surface); - position: sticky; - top: 0; -} - -.ticks-table-wrap td { - padding: 4px 12px; - border-bottom: 1px solid var(--border); - font-size: 12px; -} diff --git a/crates/pool-indexer/frontend/src/App.tsx b/crates/pool-indexer/frontend/src/App.tsx deleted file mode 100644 index df9262a011..0000000000 --- a/crates/pool-indexer/frontend/src/App.tsx +++ /dev/null @@ -1,389 +0,0 @@ -import { useState, useEffect, useCallback } from 'react' -import { fetchPools, fetchTicks } from './api' -import type { Pool, Tick } from './api' -import { computePrice, short, feeTierLabel, formatLiquidity, explainTicks } from './utils' -import './App.css' - -interface TicksState { - data: Tick[] - blockNumber: number - poolId: string -} - -function getNetworkFromPath(): string { - const segment = window.location.pathname.split('/').filter(Boolean)[0] - if (!segment) { - window.location.replace('/mainnet') - return 'mainnet' - } - return segment -} - -export default function App() { - const network = getNetworkFromPath() - const [pools, setPools] = useState([]) - const [blockNumber, setBlockNumber] = useState(null) - // undefined = not yet fetched, null = last page, string = next cursor - const [cursor, setCursor] = useState(undefined) - const [loadingPools, setLoadingPools] = useState(false) - const [poolsError, setPoolsError] = useState(null) - const [selectedPool, setSelectedPool] = useState(null) - const [ticksState, setTicksState] = useState(null) - const [loadingTicks, setLoadingTicks] = useState(false) - const [ticksError, setTicksError] = useState(null) - const [showExplain, setShowExplain] = useState(false) - const [filterInput, setFilterInput] = useState('') - const [activeFilter, setActiveFilter] = useState('') - const [sortDesc, setSortDesc] = useState(true) - - const loadPools = useCallback(async (after?: string) => { - setLoadingPools(true) - setPoolsError(null) - try { - const res = await fetchPools(network, after) - setPools(prev => (after ? [...prev, ...res.pools] : res.pools)) - setBlockNumber(res.block_number) - setCursor(res.next_cursor) - } catch (e) { - const msg = e instanceof Error ? e.message : 'Unknown error' - if (msg === 'not_indexed') { - setPoolsError('Indexer starting up — no blocks indexed yet. Retrying in 5s…') - setTimeout(() => loadPools(after), 5000) - } else { - setPoolsError(msg) - } - } finally { - setLoadingPools(false) - } - }, [network]) - - useEffect(() => { - loadPools() - }, [loadPools]) - - const doSearch = useCallback( - async (searchStr: string) => { - const f = searchStr.trim() - setPools([]) - setCursor(undefined) - if (!f) { - loadPools() - return - } - setLoadingPools(true) - setPoolsError(null) - try { - const parts = f.includes('/') ? f.split('/').map(s => s.trim()).filter(Boolean) : [f] - const search = - parts.length >= 2 ? { token0: parts[0], token1: parts[1] } : { token0: parts[0] } - const res = await fetchPools(network, undefined, 5000, search) - setPools(res.pools) - setBlockNumber(res.block_number) - setCursor(res.next_cursor) - } catch (e) { - const msg = e instanceof Error ? e.message : 'Unknown error' - setPoolsError(msg) - } finally { - setLoadingPools(false) - } - }, - [network, loadPools], - ) - - const openTicks = useCallback( - async (poolId: string) => { - if (selectedPool === poolId) { - setSelectedPool(null) - setTicksState(null) - setShowExplain(false) - return - } - setSelectedPool(poolId) - setTicksState(null) - setTicksError(null) - setShowExplain(false) - setLoadingTicks(true) - try { - const res = await fetchTicks(network, poolId) - setTicksState({ data: res.ticks, blockNumber: res.block_number, poolId }) - } catch (e) { - setTicksError(e instanceof Error ? e.message : 'Unknown error') - } finally { - setLoadingTicks(false) - } - }, - [selectedPool], - ) - - const displayPools = pools.toSorted((a, b) => { - try { - const diff = BigInt(a.liquidity) - BigInt(b.liquidity) - return sortDesc ? (diff < 0n ? 1 : diff > 0n ? -1 : 0) : (diff < 0n ? -1 : diff > 0n ? 1 : 0) - } catch { - return 0 - } - }) - - const selectedPoolData = pools.find(p => p.id === selectedPool) - - return ( -
-
-
- Uniswap V3 Pools - {network} - {blockNumber !== null && ( - block {blockNumber.toLocaleString()} - )} -
-
- {pools.length > 0 && ( - {pools.length.toLocaleString()} pools - )} - setFilterInput(e.target.value)} - onKeyDown={e => { - if (e.key === 'Enter') { setActiveFilter(filterInput); doSearch(filterInput) } - if (e.key === 'Escape') { setFilterInput(''); setActiveFilter(''); doSearch('') } - }} - spellCheck={false} - /> -
-
- - {poolsError &&
{poolsError}
} - -
-
-
- - - - - - - - - - - - - {displayPools.map(pool => ( - openTicks(pool.id)} - > - - - - - - - - - ))} - {!loadingPools && displayPools.length === 0 && ( - - - - )} - -
PoolToken 0Token 1FeePrice (T1/T0) setSortDesc(d => !d)}> - Liquidity {sortDesc ? '↓' : '↑'} - Tick
- {short(pool.id)} - - {pool.token0.symbol ?? short(pool.token0.id)} - {pool.token0.decimals}d - - {pool.token1.symbol ?? short(pool.token1.id)} - {pool.token1.decimals}d - - {feeTierLabel(pool.fee_tier)} - - {computePrice(pool.sqrt_price, pool.token0.decimals, pool.token1.decimals)} - {formatLiquidity(pool.liquidity)}{pool.tick.toLocaleString()}
- {activeFilter ? 'No pools match filter.' : 'No pools loaded.'} -
- - {loadingPools && pools.length === 0 && ( -
Loading pools…
- )} - {typeof cursor === 'string' && !loadingPools && ( -
- -
- )} - {typeof cursor === 'string' && loadingPools && pools.length > 0 && ( -
Loading more…
- )} -
- - {selectedPool && ( - - )} - - - ) -} - -function TickChart({ ticks, currentTick }: { ticks: Tick[]; currentTick: number }) { - const W = 560, - H = 80, - PX = 16, - PY = 8 - const minTick = ticks[0].tick_idx - const maxTick = ticks[ticks.length - 1].tick_idx - const tickRange = maxTick - minTick || 1 - - const maxAbs = ticks.reduce((m, t) => { - try { - const v = BigInt(t.liquidity_net) - const a = v < 0n ? -v : v - return a > m ? a : m - } catch { - return m - } - }, 1n) - - const toX = (tick: number) => PX + ((tick - minTick) / tickRange) * (W - 2 * PX) - const midY = PY + (H - 2 * PY) / 2 - const currentX = Math.min(Math.max(toX(currentTick), PX), W - PX) - - return ( - - - {ticks.map(t => { - const tx = toX(t.tick_idx) - let ratio = 0 - try { - const v = BigInt(t.liquidity_net) - ratio = Number((v * 1000n) / maxAbs) / 1000 - } catch { - /* skip */ - } - const barH = Math.abs(ratio) * ((H - 2 * PY) / 2 - 2) - const positive = ratio >= 0 - return ( - - ) - })} - - - ▶ {currentTick} - - - ) -} diff --git a/crates/pool-indexer/frontend/src/api.ts b/crates/pool-indexer/frontend/src/api.ts deleted file mode 100644 index 6bc4a51579..0000000000 --- a/crates/pool-indexer/frontend/src/api.ts +++ /dev/null @@ -1,64 +0,0 @@ -export interface Token { - id: string - decimals: number - symbol?: string -} - -export interface Pool { - id: string - token0: Token - token1: Token - fee_tier: string - liquidity: string - sqrt_price: string - tick: number - ticks: null -} - -export interface PoolsResponse { - block_number: number - pools: Pool[] - next_cursor: string | null -} - -export interface Tick { - tick_idx: number - liquidity_net: string -} - -export interface TicksResponse { - block_number: number - pool: string - ticks: Tick[] -} - -export async function fetchPools( - network: string, - after?: string, - limit = 1000, - search?: { token0: string; token1?: string }, -): Promise { - const params = new URLSearchParams({ limit: String(limit) }) - if (after) params.set('after', after) - if (search) { - params.set('token0', search.token0) - if (search.token1) params.set('token1', search.token1) - } - const res = await fetch(`/api/v1/${network}/uniswap/v3/pools?${params}`) - if (res.status === 503) throw new Error('not_indexed') - if (!res.ok) { - const body = await res.json().catch(() => ({})) as { error?: string } - throw new Error(body.error ?? `HTTP ${res.status}`) - } - return res.json() as Promise -} - -export async function fetchTicks(network: string, poolAddress: string): Promise { - const res = await fetch(`/api/v1/${network}/uniswap/v3/pools/${poolAddress}/ticks`) - if (res.status === 503) throw new Error('not_indexed') - if (!res.ok) { - const body = await res.json().catch(() => ({})) as { error?: string } - throw new Error(body.error ?? `HTTP ${res.status}`) - } - return res.json() as Promise -} diff --git a/crates/pool-indexer/frontend/src/main.tsx b/crates/pool-indexer/frontend/src/main.tsx deleted file mode 100644 index feac8eed43..0000000000 --- a/crates/pool-indexer/frontend/src/main.tsx +++ /dev/null @@ -1,9 +0,0 @@ -import { StrictMode } from 'react' -import { createRoot } from 'react-dom/client' -import App from './App' - -createRoot(document.getElementById('root')!).render( - - - , -) diff --git a/crates/pool-indexer/frontend/src/utils.ts b/crates/pool-indexer/frontend/src/utils.ts deleted file mode 100644 index 0dd2cbbd87..0000000000 --- a/crates/pool-indexer/frontend/src/utils.ts +++ /dev/null @@ -1,147 +0,0 @@ -// price = (sqrtPriceX96 / 2^96)^2 * 10^(dec0 - dec1) → token1 per token0 (human units) -export function computePrice(sqrtPrice: string, dec0: number, dec1: number): string { - try { - const sq = BigInt(sqrtPrice) - if (sq === 0n) return '0' - const Q96 = 2n ** 96n - const PREC = 10n ** 18n - // price_scaled = sq^2 / Q96^2 * PREC (18 decimal fixed-point) - const scaled = (sq * sq * PREC) / (Q96 * Q96) - const diff = dec0 - dec1 - const adjusted = - diff >= 0 ? scaled * 10n ** BigInt(diff) : scaled / 10n ** BigInt(-diff) - return formatFixed(adjusted, PREC, 6) - } catch { - return '?' - } -} - -function formatFixed(val: bigint, scale: bigint, sigFigs: number): string { - const int = val / scale - const frac = (val % scale).toString().padStart(String(scale).length - 1, '0') - if (int > 0n) return `${int}.${frac.slice(0, sigFigs)}` - const first = frac.search(/[1-9]/) - if (first === -1) return '~0' - return `0.${'0'.repeat(first)}${frac.slice(first, first + sigFigs)}` -} - -export function formatLiquidity(val: string): string { - try { - const n = BigInt(val) - const neg = n < 0n - const abs = neg ? -n : n - const sign = neg ? '−' : '' - if (abs === 0n) return '0' - const tiers: [bigint, string][] = [ - [10n ** 18n, 'e18'], - [10n ** 15n, 'e15'], - [10n ** 12n, 'T'], - [10n ** 9n, 'B'], - [10n ** 6n, 'M'], - [10n ** 3n, 'K'], - ] - for (const [threshold, suffix] of tiers) { - if (abs >= threshold) { - const int = abs / threshold - const frac = ((abs % threshold) * 100n / threshold).toString().padStart(2, '0') - return `${sign}${int}.${frac}${suffix}` - } - } - return `${sign}${abs}` - } catch { - return val - } -} - -export function short(addr: string): string { - return `${addr.slice(0, 6)}…${addr.slice(-4)}` -} - -export function feeTierLabel(ppm: string): string { - const labels: Record = { '100': '0.01%', '500': '0.05%', '3000': '0.3%', '10000': '1%' } - return labels[ppm] ?? `${(Number(ppm) / 10000).toFixed(2)}%` -} - -function tickToPrice(tick: number): number { - return Math.pow(1.0001, tick) -} - -function inferComposition(currentTick: number, lowerTick: number, upperTick: number): string { - if (currentTick < lowerTick) { - return 'entirely token0 (price is below range, position is out of range)' - } else if (currentTick >= upperTick) { - return 'entirely token1 (price is above range, position is out of range)' - } else { - const progress = (currentTick - lowerTick) / (upperTick - lowerTick) - if (progress < 0.2) return 'mostly token0 (price near lower bound)' - if (progress > 0.8) return 'mostly token1 (price near upper bound)' - return 'roughly balanced between token0 and token1' - } -} - -export function explainTicks({ - token0, - token1, - currentTick, - ticks, -}: { - token0: string - token1: string - currentTick: number - ticks: Array<{ tick_idx: number; liquidity_net: string }> -}): string { - // Pair ticks into LP positions: lower tick has +X liquidity net, upper has -X - const unmatched: Record = {} - const positions: Array<{ - lower: { tick_idx: number; liquidity_net: string } - upper: { tick_idx: number; liquidity_net: string } - }> = [] - - for (const tick of ticks) { - let net: bigint - try { - net = BigInt(tick.liquidity_net) - } catch { - continue - } - const absKey = net < 0n ? (-net).toString() : net.toString() - if (unmatched[absKey]) { - const match = unmatched[absKey] - const lower = net > 0n ? tick : match - const upper = net > 0n ? match : tick - positions.push({ lower, upper }) - delete unmatched[absKey] - } else { - unmatched[absKey] = tick - } - } - - const unmatchedList = Object.values(unmatched) - const currentPrice = tickToPrice(currentTick) - const lines: string[] = [] - - lines.push(`Pool: ${token0}/${token1}`) - lines.push(`Current tick: ${currentTick} → 1 ${token0} = ${currentPrice.toFixed(6)} ${token1}`) - lines.push(`Active ticks: ${ticks.length} → ${positions.length} position(s) detected`) - lines.push('') - - positions.forEach((pos, i) => { - const lowerPrice = tickToPrice(pos.lower.tick_idx) - const upperPrice = tickToPrice(pos.upper.tick_idx) - const composition = inferComposition(currentTick, pos.lower.tick_idx, pos.upper.tick_idx) - const inRange = currentTick >= pos.lower.tick_idx && currentTick < pos.upper.tick_idx - - lines.push(`Position ${i + 1}:`) - lines.push(` Range: tick ${pos.lower.tick_idx} to ${pos.upper.tick_idx}`) - lines.push(` Price range: ${lowerPrice.toFixed(6)} to ${upperPrice.toFixed(6)} ${token1} per ${token0}`) - lines.push(` Status: ${inRange ? 'In range (earning fees)' : 'Out of range (not earning fees)'}`) - lines.push(` Composition: ${composition}`) - lines.push('') - }) - - if (unmatchedList.length > 0) { - lines.push(`${unmatchedList.length} unmatched tick(s) — may indicate partial data or a complex position.`) - } - - return lines.join('\n') -} diff --git a/crates/pool-indexer/frontend/tsconfig.json b/crates/pool-indexer/frontend/tsconfig.json deleted file mode 100644 index 109f0ac280..0000000000 --- a/crates/pool-indexer/frontend/tsconfig.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "compilerOptions": { - "target": "ES2020", - "useDefineForClassFields": true, - "lib": ["ES2020", "DOM", "DOM.Iterable"], - "module": "ESNext", - "skipLibCheck": true, - "moduleResolution": "bundler", - "allowImportingTsExtensions": true, - "isolatedModules": true, - "moduleDetection": "force", - "noEmit": true, - "jsx": "react-jsx", - "strict": true, - "noUnusedLocals": true, - "noUnusedParameters": true, - "noFallthroughCasesInSwitch": true - }, - "include": ["src"] -} diff --git a/crates/pool-indexer/frontend/vite.config.ts b/crates/pool-indexer/frontend/vite.config.ts deleted file mode 100644 index e2020d67e0..0000000000 --- a/crates/pool-indexer/frontend/vite.config.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { defineConfig } from 'vite' -import react from '@vitejs/plugin-react' - -export default defineConfig({ - plugins: [react()], - server: { - proxy: { - '/api': 'http://localhost:7777', - }, - }, -}) From 9aec8dce2d3db47abd3c780b5f42886d2708583c Mon Sep 17 00:00:00 2001 From: Jan P Date: Tue, 21 Apr 2026 11:00:48 +0200 Subject: [PATCH 20/80] Add metrics --- Cargo.lock | 4 + crates/e2e/tests/e2e/pool_indexer.rs | 5 + .../src/uniswap_v3/pool_indexer.rs | 6 - crates/pool-indexer/Cargo.toml | 4 + crates/pool-indexer/src/api/mod.rs | 26 +++++ crates/pool-indexer/src/cold_seeder.rs | 30 ++++- crates/pool-indexer/src/config.rs | 28 ++++- crates/pool-indexer/src/indexer/uniswap_v3.rs | 68 ++++++++++- crates/pool-indexer/src/lib.rs | 1 + crates/pool-indexer/src/metrics.rs | 109 ++++++++++++++++++ crates/pool-indexer/src/run.rs | 32 ++++- crates/pool-indexer/src/subgraph_seeder.rs | 4 + 12 files changed, 300 insertions(+), 17 deletions(-) create mode 100644 crates/pool-indexer/src/metrics.rs diff --git a/Cargo.lock b/Cargo.lock index 92664aee68..fd54bf2256 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -6303,6 +6303,7 @@ dependencies = [ "alloy", "alloy-primitives", "anyhow", + "async-trait", "axum 0.8.8", "bigdecimal", "clap", @@ -6313,7 +6314,10 @@ dependencies = [ "num", "number", "observe", + "prometheus", + "prometheus-metric-storage", "reqwest 0.13.2", + "scopeguard", "serde", "serde_json", "sqlx", diff --git a/crates/e2e/tests/e2e/pool_indexer.rs b/crates/e2e/tests/e2e/pool_indexer.rs index 8ba8fc4670..8e881a63be 100644 --- a/crates/e2e/tests/e2e/pool_indexer.rs +++ b/crates/e2e/tests/e2e/pool_indexer.rs @@ -84,6 +84,11 @@ async fn start_pool_indexer(factory: Address) { api: ApiConfig { bind_address: SocketAddr::V4(SocketAddrV4::new(Ipv4Addr::LOCALHOST, POOL_INDEXER_PORT)), }, + // Port 0 → OS-assigned random port so repeated start/stop inside a + // single test process doesn't collide on the default metrics port. + metrics: pool_indexer::config::MetricsConfig { + bind_address: SocketAddr::V4(SocketAddrV4::new(Ipv4Addr::LOCALHOST, 0)), + }, }; let handle = tokio::task::spawn(pool_indexer::run(config)); wait_for_condition(TIMEOUT, || async { diff --git a/crates/liquidity-sources/src/uniswap_v3/pool_indexer.rs b/crates/liquidity-sources/src/uniswap_v3/pool_indexer.rs index 8bef074e3a..d6139e49d0 100644 --- a/crates/liquidity-sources/src/uniswap_v3/pool_indexer.rs +++ b/crates/liquidity-sources/src/uniswap_v3/pool_indexer.rs @@ -54,8 +54,6 @@ impl PoolIndexerClient { } } -// --- Response DTOs ------------------------------------------------------- - #[derive(Deserialize)] struct PoolsResponse { block_number: u64, @@ -102,8 +100,6 @@ struct IndexerTick { liquidity_net: String, } -// --- Conversion into subgraph-shaped types ------------------------------- - impl IndexerPool { fn into_pool_data(self) -> Result { Ok(PoolData { @@ -136,8 +132,6 @@ impl IndexerTick { } } -// --- V3PoolDataSource implementation ------------------------------------- - #[async_trait] impl V3PoolDataSource for PoolIndexerClient { async fn get_registered_pools(&self) -> Result { diff --git a/crates/pool-indexer/Cargo.toml b/crates/pool-indexer/Cargo.toml index 0271a6468e..36683e45c6 100644 --- a/crates/pool-indexer/Cargo.toml +++ b/crates/pool-indexer/Cargo.toml @@ -18,6 +18,7 @@ path = "src/main.rs" alloy = { workspace = true, features = ["providers", "rpc-types", "sol-types"] } alloy-primitives = { workspace = true, features = ["serde", "std"] } anyhow = { workspace = true } +async-trait = { workspace = true } axum = { workspace = true } bigdecimal = { workspace = true } clap = { workspace = true } @@ -28,7 +29,10 @@ mimalloc = { workspace = true, optional = true } num = { workspace = true } number = { workspace = true } observe = { workspace = true } +prometheus = { workspace = true } +prometheus-metric-storage = { workspace = true } reqwest = { workspace = true, features = ["json"] } +scopeguard = { workspace = true } serde = { workspace = true } serde_json = { workspace = true } sqlx = { workspace = true } diff --git a/crates/pool-indexer/src/api/mod.rs b/crates/pool-indexer/src/api/mod.rs index 1e78c89a51..4c2f65ee23 100644 --- a/crates/pool-indexer/src/api/mod.rs +++ b/crates/pool-indexer/src/api/mod.rs @@ -5,7 +5,9 @@ use { axum::{ Json, Router, + extract::{MatchedPath, Request}, http::StatusCode, + middleware::{self, Next}, response::{IntoResponse, Response}, routing::get, }, @@ -102,6 +104,7 @@ pub fn router(state: Arc) -> Router { get(uniswap_v3::get_ticks), ) .with_state(state) + .layer(middleware::from_fn(record_request_metrics)) .layer( TraceLayer::new_for_http() .make_span_with(DefaultMakeSpan::new().level(Level::INFO)) @@ -112,3 +115,26 @@ pub fn router(state: Arc) -> Router { async fn health() -> impl IntoResponse { StatusCode::OK } + +/// Emits per-request `api_requests` (count) and `api_request_seconds` +/// (latency) metrics labelled by the matched route template (e.g. +/// `/api/v1/{network}/uniswap/v3/pools`) rather than the concrete URL — so +/// the cardinality stays bounded no matter how many networks / addresses +/// flow through. +async fn record_request_metrics(req: Request, next: Next) -> Response { + let route = req + .extensions() + .get::() + .map(|p| p.as_str().to_owned()) + .unwrap_or_else(|| "unmatched".to_owned()); + let metrics = crate::metrics::Metrics::get(); + let labels = [route.as_str()]; + let _timer = crate::metrics::Metrics::timer(&metrics.api_request_seconds, &labels); + let response = next.run(req).await; + let status = response.status().as_u16().to_string(); + metrics + .api_requests + .with_label_values(&[route.as_str(), status.as_str()]) + .inc(); + response +} diff --git a/crates/pool-indexer/src/cold_seeder.rs b/crates/pool-indexer/src/cold_seeder.rs index c0f9890f06..06fbcdacb2 100644 --- a/crates/pool-indexer/src/cold_seeder.rs +++ b/crates/pool-indexer/src/cold_seeder.rs @@ -63,6 +63,7 @@ const LOG_FETCH_CONCURRENCY: usize = 8; pub async fn cold_seed( db: &PgPool, + network: &str, chain_id: u64, provider: AlloyProvider, factory: Address, @@ -81,11 +82,25 @@ pub async fn cold_seed( snapshot_block, "cold-seeding pool-indexer from chain" ); - let pools = discover_pools(&provider, factory, snapshot_block).await?; + let metrics = crate::metrics::Metrics::get(); + + let pools = { + let labels = [network, "discovery"]; + let _t = crate::metrics::Metrics::timer(&metrics.cold_seed_phase_seconds, &labels); + discover_pools(&provider, factory, snapshot_block).await? + }; + metrics + .cold_seed_pools_discovered + .with_label_values(&[network]) + .set(i64::try_from(pools.len()).unwrap_or(0)); info!(chain_id, pools = pools.len(), "pools discovered"); persist_pools(db, chain_id, &pools).await?; - let states = snapshot_pool_states(&provider, &pools, snapshot_block).await?; + let states = { + let labels = [network, "state_snapshot"]; + let _t = crate::metrics::Metrics::timer(&metrics.cold_seed_phase_seconds, &labels); + snapshot_pool_states(&provider, &pools, snapshot_block).await? + }; info!(chain_id, states = states.len(), "pool states snapshotted"); persist_pool_states(db, chain_id, &states).await?; @@ -94,6 +109,10 @@ pub async fn cold_seed( .filter(|s| s.liquidity > 0) .map(|s| s.pool_address) .collect(); + metrics + .cold_seed_active_pools + .with_label_values(&[network]) + .set(i64::try_from(active_pools.len()).unwrap_or(0)); info!( chain_id, active = active_pools.len(), @@ -101,7 +120,12 @@ pub async fn cold_seed( "reconstructing ticks for active pools" ); - reconstruct_and_persist_ticks(db, chain_id, &provider, &active_pools, snapshot_block).await?; + { + let labels = [network, "tick_reconstruction"]; + let _t = crate::metrics::Metrics::timer(&metrics.cold_seed_phase_seconds, &labels); + reconstruct_and_persist_ticks(db, chain_id, &provider, &active_pools, snapshot_block) + .await?; + } info!(chain_id, snapshot_block, "cold seeding complete"); Ok(snapshot_block) diff --git a/crates/pool-indexer/src/config.rs b/crates/pool-indexer/src/config.rs index be9b91771a..726b89149f 100644 --- a/crates/pool-indexer/src/config.rs +++ b/crates/pool-indexer/src/config.rs @@ -36,6 +36,13 @@ fn default_bind_address() -> SocketAddr { SocketAddr::V4(SocketAddrV4::new(Ipv4Addr::UNSPECIFIED, 7777)) } +fn default_metrics_address() -> SocketAddr { + SocketAddr::V4(SocketAddrV4::new( + Ipv4Addr::UNSPECIFIED, + observe::metrics::DEFAULT_METRICS_PORT, + )) +} + /// Network identifier used in API routes (e.g. "mainnet", "arbitrum-one"). #[derive(Debug, Clone, PartialEq, Eq, Hash, Deserialize)] #[serde(transparent)] @@ -97,8 +104,9 @@ pub struct NetworkConfig { } /// The subset of [`NetworkConfig`] that [`UniswapV3Indexer`] needs at runtime. -#[derive(Debug, Clone, Copy)] +#[derive(Debug, Clone)] pub struct IndexerConfig { + pub network: NetworkName, pub chain_id: u64, pub factory_address: Address, pub chunk_size: u64, @@ -114,6 +122,7 @@ impl NetworkConfig { pub fn indexer_config(&self, factory: Address) -> IndexerConfig { IndexerConfig { + network: self.name.clone(), chain_id: self.chain_id, factory_address: factory, chunk_size: self.chunk_size, @@ -139,6 +148,21 @@ impl Default for ApiConfig { } } +#[derive(Debug, Deserialize)] +#[serde(rename_all = "kebab-case", deny_unknown_fields)] +pub struct MetricsConfig { + #[serde(default = "default_metrics_address")] + pub bind_address: SocketAddr, +} + +impl Default for MetricsConfig { + fn default() -> Self { + Self { + bind_address: default_metrics_address(), + } + } +} + #[derive(Debug, Deserialize)] #[serde(rename_all = "kebab-case", deny_unknown_fields)] pub struct Configuration { @@ -147,6 +171,8 @@ pub struct Configuration { pub networks: Vec, #[serde(default)] pub api: ApiConfig, + #[serde(default)] + pub metrics: MetricsConfig, } impl Configuration { diff --git a/crates/pool-indexer/src/indexer/uniswap_v3.rs b/crates/pool-indexer/src/indexer/uniswap_v3.rs index 959f1954bd..01c32aac76 100644 --- a/crates/pool-indexer/src/indexer/uniswap_v3.rs +++ b/crates/pool-indexer/src/indexer/uniswap_v3.rs @@ -1,5 +1,8 @@ use { - crate::{config::IndexerConfig, db::uniswap_v3 as db}, + crate::{ + config::{IndexerConfig, NetworkName}, + db::uniswap_v3 as db, + }, alloy::{ primitives::Address, providers::Provider, @@ -97,6 +100,7 @@ struct PrefetchedChunkData { pub struct UniswapV3Indexer { provider: AlloyProvider, db: PgPool, + network: NetworkName, chain_id: u64, factory: Address, chunk_size: u64, @@ -110,6 +114,7 @@ impl UniswapV3Indexer { Self { provider, db, + network: config.network.clone(), chain_id: config.chain_id, factory: config.factory_address, chunk_size: config.chunk_size, @@ -127,12 +132,17 @@ impl UniswapV3Indexer { tokio::spawn(backfill_symbols( self.provider.clone(), self.db.clone(), + self.network.clone(), self.chain_id, self.prefetch_concurrency, poll_interval, )); loop { if let Err(err) = self.run_once().await { + crate::metrics::Metrics::get() + .indexer_errors + .with_label_values(&[self.network.as_str()]) + .inc(); tracing::error!(?err, "indexer error, retrying after poll interval"); } tokio::time::sleep(poll_interval).await; @@ -174,6 +184,12 @@ impl UniswapV3Indexer { let finalized_block = self.finalized_block().await?; let last_indexed_block = self.last_indexed_block().await?; + let lag = finalized_block.saturating_sub(last_indexed_block); + crate::metrics::Metrics::get() + .indexer_lag_blocks + .with_label_values(&[self.network.as_str()]) + .set(i64::try_from(lag).unwrap_or(0)); + if last_indexed_block >= finalized_block { return Ok(()); } @@ -256,6 +272,10 @@ impl UniswapV3Indexer { // opening the DB transaction. Symbols are intentionally excluded — a // hung `symbol()` call must never block pool inserts. They're populated // later by the async backfill task. + let metrics = crate::metrics::Metrics::get(); + let chunk_timer_labels = [self.network.as_str()]; + let _chunk_timer = + crate::metrics::Metrics::timer(&metrics.chunk_commit_seconds, &chunk_timer_labels); let prefetched = self.prefetch_chunk_data(&logs).await; let changes = collect_log_changes( self.factory, @@ -275,7 +295,32 @@ impl UniswapV3Indexer { "processing chunk" ); - self.persist_chunk(chunk, changes).await + let network = self.network.as_str(); + metrics + .events_applied + .with_label_values(&[network, "new_pool"]) + .inc_by(changes.new_pools.len() as u64); + metrics + .events_applied + .with_label_values(&[network, "pool_state"]) + .inc_by(changes.pool_states.len() as u64); + metrics + .events_applied + .with_label_values(&[network, "liq_update"]) + .inc_by(changes.liquidity_updates.len() as u64); + metrics + .events_applied + .with_label_values(&[network, "tick_delta"]) + .inc_by(changes.tick_deltas.len() as u64); + + self.persist_chunk(chunk, changes).await?; + + metrics.chunks_committed.with_label_values(&[network]).inc(); + metrics + .indexed_block + .with_label_values(&[network]) + .set(i64::try_from(chunk.end).unwrap_or(0)); + Ok(()) } async fn persist_chunk(&self, chunk: ChunkRange, changes: ChunkChanges) -> Result<()> { @@ -381,13 +426,14 @@ async fn fetch_decimals(provider: &AlloyProvider, token: Address) -> Option async fn backfill_symbols( provider: AlloyProvider, db: sqlx::PgPool, + network: NetworkName, chain_id: u64, prefetch_concurrency: usize, poll_interval: std::time::Duration, ) -> ! { loop { if let Err(err) = - run_symbol_backfill_pass(&provider, &db, chain_id, prefetch_concurrency).await + run_symbol_backfill_pass(&provider, &db, &network, chain_id, prefetch_concurrency).await { tracing::warn!(?err, "token symbol backfill pass failed"); } @@ -398,12 +444,18 @@ async fn backfill_symbols( async fn run_symbol_backfill_pass( provider: &AlloyProvider, db: &sqlx::PgPool, + network: &NetworkName, chain_id: u64, prefetch_concurrency: usize, ) -> Result<()> { let tokens = db::get_tokens_missing_symbols(db, chain_id) .await .context("get_tokens_missing_symbols")?; + let network = network.as_str(); + crate::metrics::Metrics::get() + .symbols_pending + .with_label_values(&[network]) + .set(i64::try_from(tokens.len()).unwrap_or(0)); if tokens.is_empty() { return Ok(()); } @@ -425,9 +477,17 @@ async fn run_symbol_backfill_pass( .collect() .await; + let metrics = crate::metrics::Metrics::get(); for (token, symbol) in &symbols { match db::set_token_symbol(db, chain_id, token, symbol).await { - Ok(()) => updated += 1, + Ok(()) => { + updated += 1; + let result = if symbol.is_empty() { "empty" } else { "ok" }; + metrics + .symbols_backfilled + .with_label_values(&[network, result]) + .inc(); + } Err(err) => tracing::warn!(%token, ?err, "failed to backfill symbol"), } } diff --git a/crates/pool-indexer/src/lib.rs b/crates/pool-indexer/src/lib.rs index 66409a220c..7d3031f1ba 100644 --- a/crates/pool-indexer/src/lib.rs +++ b/crates/pool-indexer/src/lib.rs @@ -4,6 +4,7 @@ pub mod cold_seeder; pub mod config; pub mod db; pub mod indexer; +pub mod metrics; pub mod run; pub mod subgraph_seeder; diff --git a/crates/pool-indexer/src/metrics.rs b/crates/pool-indexer/src/metrics.rs new file mode 100644 index 0000000000..c1e9289017 --- /dev/null +++ b/crates/pool-indexer/src/metrics.rs @@ -0,0 +1,109 @@ +//! Prometheus metrics for pool-indexer. +//! +//! All metrics live under the `pool_indexer_` prefix (configured by +//! `observe::metrics::setup_registry`) and are labelled by `network` where +//! more than one network is active in the same process. Call `Metrics::get()` +//! to reach the shared registry-backed instance. + +use {prometheus::HistogramVec, prometheus_metric_storage::MetricStorage, std::time::Duration}; + +#[derive(MetricStorage)] +#[metric(subsystem = "pool_indexer")] +pub struct Metrics { + /// Chunks successfully committed to the DB. + #[metric(labels("network"))] + pub chunks_committed: prometheus::IntCounterVec, + + /// Per-chunk commit duration in seconds. + #[metric( + labels("network"), + buckets(0.01, 0.05, 0.1, 0.25, 0.5, 1.0, 2.5, 5.0, 10.0) + )] + pub chunk_commit_seconds: HistogramVec, + + /// Events applied to the DB, labelled by type. + #[metric(labels("network", "kind"))] + pub events_applied: prometheus::IntCounterVec, + + /// Highest block committed by the live indexer for this chain. + #[metric(labels("network"))] + pub indexed_block: prometheus::IntGaugeVec, + + /// Lag (in blocks) between the chain's finalized/latest tip and the + /// indexer's checkpoint. Sampled each polling tick. + #[metric(labels("network"))] + pub indexer_lag_blocks: prometheus::IntGaugeVec, + + /// Unrecoverable `run_once` errors that forced a retry. + #[metric(labels("network"))] + pub indexer_errors: prometheus::IntCounterVec, + + /// Duration of each phase of the cold-seed bootstrap. + #[metric( + labels("network", "phase"), + buckets( + 1.0, 5.0, 10.0, 30.0, 60.0, 120.0, 300.0, 600.0, 1_200.0, 1_800.0, 3_600.0 + ) + )] + pub cold_seed_phase_seconds: HistogramVec, + + /// Pools discovered by the cold seeder (phase 1). + #[metric(labels("network"))] + pub cold_seed_pools_discovered: prometheus::IntGaugeVec, + + /// Pools with non-zero liquidity at snapshot time (phase 2 → phase 3 + /// input). + #[metric(labels("network"))] + pub cold_seed_active_pools: prometheus::IntGaugeVec, + + /// Duration of the full subgraph seed (pool page fetch + tick fetch). + #[metric( + labels("network"), + buckets(1.0, 5.0, 10.0, 30.0, 60.0, 120.0, 300.0, 600.0) + )] + pub subgraph_seed_seconds: HistogramVec, + + /// Symbols written to the DB (label: `result` = `ok` for a real symbol, + /// `empty` for the "tried and failed" sentinel). + #[metric(labels("network", "result"))] + pub symbols_backfilled: prometheus::IntCounterVec, + + /// Tokens still needing a symbol, sampled each backfill pass. + #[metric(labels("network"))] + pub symbols_pending: prometheus::IntGaugeVec, + + /// API request count by route + HTTP status. + #[metric(labels("route", "status"))] + pub api_requests: prometheus::IntCounterVec, + + /// API request duration. + #[metric( + labels("route"), + buckets(0.001, 0.005, 0.01, 0.05, 0.1, 0.25, 0.5, 1.0, 2.5) + )] + pub api_request_seconds: HistogramVec, +} + +impl Metrics { + pub fn get() -> &'static Self { + Self::instance(observe::metrics::get_storage_registry()) + .expect("unexpected pool_indexer metrics duplicate registration") + } + + /// Convenience — record a histogram observation from a `Duration`. + fn observe_seconds(hist: &HistogramVec, labels: &[&str], d: Duration) { + hist.with_label_values(labels).observe(d.as_secs_f64()); + } + + /// Returns a guard that records the elapsed time on a histogram when it's + /// dropped. Use with `let _timer = Metrics::timer(&hist, &[..]);` at the + /// top of a function / block. Cleaner than manual `Instant::now()` + + /// `observe_seconds` pairs, and records even on early return. + #[must_use] + pub fn timer<'a>(hist: &'a HistogramVec, labels: &'a [&'a str]) -> impl Drop + use<'a> { + let start = std::time::Instant::now(); + scopeguard::guard(start, move |start| { + Self::observe_seconds(hist, labels, start.elapsed()); + }) + } +} diff --git a/crates/pool-indexer/src/run.rs b/crates/pool-indexer/src/run.rs index 2d42883844..6a7643e0cd 100644 --- a/crates/pool-indexer/src/run.rs +++ b/crates/pool-indexer/src/run.rs @@ -16,6 +16,7 @@ use { pub async fn start(args: impl Iterator) { let args = Arguments::parse_from(args); initialize_observability(); + observe::metrics::setup_registry(Some("pool_indexer".into()), None); let config = load_configuration(&args); tracing::info!("pool-indexer starting"); run(config).await; @@ -27,6 +28,13 @@ pub async fn run(config: Configuration) { let db = connect_db(&config).await; let api_state = build_api_state(&db, &config.networks); + observe::metrics::serve_metrics( + Arc::new(AlwaysAlive), + config.metrics.bind_address, + Default::default(), + Default::default(), + ); + let mut set = JoinSet::new(); spawn_api_task(&mut set, api_state, config.api.bind_address); @@ -39,6 +47,17 @@ pub async fn run(config: Configuration) { } } +/// Minimal liveness that always reports alive. The indexer panics on +/// unrecoverable faults, so if the process is up it's alive. +struct AlwaysAlive; + +#[async_trait::async_trait] +impl observe::metrics::LivenessChecking for AlwaysAlive { + async fn is_alive(&self) -> bool { + true + } +} + fn initialize_observability() { let log_filter = std::env::var("RUST_LOG").unwrap_or_else(|_| "info".into()); observe::tracing::init::initialize(&observe::Config::new(&log_filter, None, false, None)); @@ -124,12 +143,19 @@ async fn run_factory_indexer( if checkpoint.is_none() { let seeded_block = if let Some(subgraph_url) = network.subgraph_url.as_deref() { - crate::subgraph_seeder::seed(&db, network.chain_id, subgraph_url, network.seed_block) - .await - .expect("subgraph seeding failed") + crate::subgraph_seeder::seed( + &db, + network.name.as_str(), + network.chain_id, + subgraph_url, + network.seed_block, + ) + .await + .expect("subgraph seeding failed") } else { crate::cold_seeder::cold_seed( &db, + network.name.as_str(), network.chain_id, provider, factory, diff --git a/crates/pool-indexer/src/subgraph_seeder.rs b/crates/pool-indexer/src/subgraph_seeder.rs index ce61fe687c..87abb26e37 100644 --- a/crates/pool-indexer/src/subgraph_seeder.rs +++ b/crates/pool-indexer/src/subgraph_seeder.rs @@ -411,10 +411,14 @@ fn parse_seeded_pool_state( /// finalized block via `catch_up`. pub async fn seed( db: &PgPool, + network: &str, chain_id: u64, subgraph_url: &str, block: Option, ) -> Result { + let labels = [network]; + let m = crate::metrics::Metrics::get(); + let _timer = crate::metrics::Metrics::timer(&m.subgraph_seed_seconds, &labels); SubgraphSeeder::new(db, chain_id, subgraph_url, block) .await? .seed() From e93dc6f8865409098f7549513933a9329c3da4e1 Mon Sep 17 00:00:00 2001 From: Jan P Date: Tue, 21 Apr 2026 11:17:38 +0200 Subject: [PATCH 21/80] Clippy --- crates/e2e/tests/e2e/pool_indexer.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/e2e/tests/e2e/pool_indexer.rs b/crates/e2e/tests/e2e/pool_indexer.rs index 8e881a63be..fc008c4ea3 100644 --- a/crates/e2e/tests/e2e/pool_indexer.rs +++ b/crates/e2e/tests/e2e/pool_indexer.rs @@ -45,7 +45,7 @@ async fn seed_checkpoint(db: &PgPool, factory: Address, block: u64) { ON CONFLICT (chain_id, contract) DO UPDATE SET block_number = EXCLUDED.block_number", ) .bind(factory.as_slice()) - .bind(block as i64) + .bind(block.cast_signed()) .execute(db) .await .unwrap(); @@ -500,7 +500,7 @@ async fn pagination(web3: Web3) { .await .unwrap(); assert_eq!( - all_ids.len() as i64, + i64::try_from(all_ids.len()).unwrap(), db_count, "paginated count doesn't match DB" ); From 19581001997068a22901e78fb0e7da7355ac6d3d Mon Sep 17 00:00:00 2001 From: Jan P Date: Tue, 21 Apr 2026 14:08:24 +0200 Subject: [PATCH 22/80] Fix contracts --- Cargo.toml | 2 +- contracts/generated/contracts-facade/Cargo.toml | 2 +- crates/e2e/Cargo.toml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 73cb66e030..f8c1a8f357 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -90,6 +90,7 @@ order-validation = { path = "crates/order-validation" } orderbook = { path = "crates/orderbook" } paste = "1.0" pin-project-lite = "0.2.14" +pool-indexer = { path = "crates/pool-indexer" } prettyplease = "0.2.37" price-estimation = { path = "crates/price-estimation" } proc-macro2 = "1.0.103" @@ -115,7 +116,6 @@ sha2 = "0.10" shared = { path = "crates/shared" } signature-validator = { path = "crates/signature-validator" } simulator = { path = "crates/simulator" } -pool-indexer = { path = "crates/pool-indexer" } solver = { path = "crates/solver" } solvers = { path = "crates/solvers" } solvers-dto = { path = "crates/solvers-dto" } diff --git a/contracts/generated/contracts-facade/Cargo.toml b/contracts/generated/contracts-facade/Cargo.toml index f86d661a3b..9652fa9d20 100644 --- a/contracts/generated/contracts-facade/Cargo.toml +++ b/contracts/generated/contracts-facade/Cargo.toml @@ -45,9 +45,9 @@ cow-contract-cowprotocoltoken = { path = "../contracts-generated/cowprotocoltoke cow-contract-cowsettlementforwarder = { path = "../contracts-generated/cowsettlementforwarder" } cow-contract-cowswapethflow = { path = "../contracts-generated/cowswapethflow" } cow-contract-cowswaponchainorders = { path = "../contracts-generated/cowswaponchainorders" } -cow-contract-erc1271signaturevalidator = { path = "../contracts-generated/erc1271signaturevalidator" } cow-contract-erc20 = { path = "../contracts-generated/erc20" } cow-contract-erc20mintable = { path = "../contracts-generated/erc20mintable" } +cow-contract-erc1271signaturevalidator = { path = "../contracts-generated/erc1271signaturevalidator" } cow-contract-flashloanrouter = { path = "../contracts-generated/flashloanrouter" } cow-contract-gashog = { path = "../contracts-generated/gashog" } cow-contract-gnosissafe = { path = "../contracts-generated/gnosissafe" } diff --git a/crates/e2e/Cargo.toml b/crates/e2e/Cargo.toml index 7e8ae904be..101f3201d9 100644 --- a/crates/e2e/Cargo.toml +++ b/crates/e2e/Cargo.toml @@ -10,6 +10,7 @@ license = "MIT OR Apache-2.0" [dependencies] alloy = { workspace = true, default-features = false, features = [ + "contract", "json-rpc", "provider-anvil-api", "provider-debug-api", @@ -21,7 +22,6 @@ alloy = { workspace = true, default-features = false, features = [ "signer-local", "signer-mnemonic", "signers", - "contract", "sol-types", "transports" ] } From b714f2982fd55234c6a94fd29c0f40a7587a2463 Mon Sep 17 00:00:00 2001 From: Jan P Date: Wed, 22 Apr 2026 07:37:22 +0200 Subject: [PATCH 23/80] Rebuild --- contracts/artifacts/MockUniswapV3Factory.json | 88 +++---- contracts/artifacts/MockUniswapV3Pool.json | 222 +++++++++--------- .../mockuniswapv3factory/src/lib.rs | 8 +- .../mockuniswapv3pool/src/lib.rs | 8 +- 4 files changed, 163 insertions(+), 163 deletions(-) diff --git a/contracts/artifacts/MockUniswapV3Factory.json b/contracts/artifacts/MockUniswapV3Factory.json index a8db8c45bf..806da46e6a 100644 --- a/contracts/artifacts/MockUniswapV3Factory.json +++ b/contracts/artifacts/MockUniswapV3Factory.json @@ -1,74 +1,74 @@ { "abi": [ { - "type": "function", - "name": "createPool", + "anonymous": false, "inputs": [ { - "name": "tokenA", - "type": "address", - "internalType": "address" + "indexed": true, + "internalType": "address", + "name": "token0", + "type": "address" }, { - "name": "tokenB", - "type": "address", - "internalType": "address" + "indexed": true, + "internalType": "address", + "name": "token1", + "type": "address" }, { - "name": "_fee", - "type": "uint24", - "internalType": "uint24" - } - ], - "outputs": [ + "indexed": true, + "internalType": "uint24", + "name": "fee", + "type": "uint24" + }, + { + "indexed": false, + "internalType": "int24", + "name": "tickSpacing", + "type": "int24" + }, { + "indexed": false, + "internalType": "address", "name": "pool", - "type": "address", - "internalType": "address" + "type": "address" } ], - "stateMutability": "nonpayable" + "name": "PoolCreated", + "type": "event" }, { - "type": "event", - "name": "PoolCreated", "inputs": [ { - "name": "token0", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "token1", - "type": "address", - "indexed": true, - "internalType": "address" + "internalType": "address", + "name": "tokenA", + "type": "address" }, { - "name": "fee", - "type": "uint24", - "indexed": true, - "internalType": "uint24" + "internalType": "address", + "name": "tokenB", + "type": "address" }, { - "name": "tickSpacing", - "type": "int24", - "indexed": false, - "internalType": "int24" - }, + "internalType": "uint24", + "name": "_fee", + "type": "uint24" + } + ], + "name": "createPool", + "outputs": [ { + "internalType": "address", "name": "pool", - "type": "address", - "indexed": false, - "internalType": "address" + "type": "address" } ], - "anonymous": false + "stateMutability": "nonpayable", + "type": "function" } ], - "bytecode": "0x6080604052348015600e575f5ffd5b50610b1e8061001c5f395ff3fe608060405234801561000f575f5ffd5b5060043610610029575f3560e01c8063a16712951461002d575b5f5ffd5b610047600480360381019061004291906101f7565b61005d565b6040516100549190610256565b60405180910390f35b5f5f5f8473ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff161061009a57848661009d565b85855b915091505f8282866040516100b190610154565b6100bd9392919061027e565b604051809103905ff0801580156100d6573d5f5f3e3d5ffd5b5090508093508462ffffff168273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167f783cca1c0412dd0d695e784568c96da2e9c22ff989357a2e8b1d9b2b4e6b7118600a886040516101429291906102ce565b60405180910390a45050509392505050565b6107f3806102f683390190565b5f5ffd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f61018e82610165565b9050919050565b61019e81610184565b81146101a8575f5ffd5b50565b5f813590506101b981610195565b92915050565b5f62ffffff82169050919050565b6101d6816101bf565b81146101e0575f5ffd5b50565b5f813590506101f1816101cd565b92915050565b5f5f5f6060848603121561020e5761020d610161565b5b5f61021b868287016101ab565b935050602061022c868287016101ab565b925050604061023d868287016101e3565b9150509250925092565b61025081610184565b82525050565b5f6020820190506102695f830184610247565b92915050565b610278816101bf565b82525050565b5f6060820190506102915f830186610247565b61029e6020830185610247565b6102ab604083018461026f565b949350505050565b5f8160020b9050919050565b6102c8816102b3565b82525050565b5f6040820190506102e15f8301856102bf565b6102ee6020830184610247565b939250505056fe60e060405234801561000f575f5ffd5b506040516107f33803806107f383398181016040528101906100319190610149565b8273ffffffffffffffffffffffffffffffffffffffff1660808173ffffffffffffffffffffffffffffffffffffffff16815250508173ffffffffffffffffffffffffffffffffffffffff1660a08173ffffffffffffffffffffffffffffffffffffffff16815250508062ffffff1660c08162ffffff1681525050505050610199565b5f5ffd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f6100e0826100b7565b9050919050565b6100f0816100d6565b81146100fa575f5ffd5b50565b5f8151905061010b816100e7565b92915050565b5f62ffffff82169050919050565b61012881610111565b8114610132575f5ffd5b50565b5f815190506101438161011f565b92915050565b5f5f5f606084860312156101605761015f6100b3565b5b5f61016d868287016100fd565b935050602061017e868287016100fd565b925050604061018f86828701610135565b9150509250925092565b60805160a05160c0516106306101c35f395f61017e01525f61015a01525f61011601526106305ff3fe608060405234801561000f575f5ffd5b5060043610610060575f3560e01c80630dfe1681146100645780631a68650214610082578063d21220a7146100a0578063ddca3f43146100be578063efe27fa3146100dc578063f637731d146100f8575b5f5ffd5b61006c610114565b60405161007991906102de565b60405180910390f35b61008a610138565b6040516100979190610321565b60405180910390f35b6100a8610158565b6040516100b591906102de565b60405180910390f35b6100c661017c565b6040516100d39190610357565b60405180910390f35b6100f660048036038101906100f191906103fe565b6101a0565b005b610112600480360381019061010d919061048c565b610263565b005b7f000000000000000000000000000000000000000000000000000000000000000081565b5f5f9054906101000a90046fffffffffffffffffffffffffffffffff1681565b7f000000000000000000000000000000000000000000000000000000000000000081565b7f000000000000000000000000000000000000000000000000000000000000000081565b805f5f8282829054906101000a90046fffffffffffffffffffffffffffffffff166101cb91906104e4565b92506101000a8154816fffffffffffffffffffffffffffffffff02191690836fffffffffffffffffffffffffffffffff1602179055508160020b8360020b8573ffffffffffffffffffffffffffffffffffffffff167f7a53080ba414158be7ec69b987b5fb7d07dee101fe85488f0853ae16239d0bde33855f5f6040516102559493929190610572565b60405180910390a450505050565b7f98636036cb66a9c19a37435efc1e90142190214e8abeb821bdba3f2990dd4c95815f6040516102949291906105d3565b60405180910390a150565b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f6102c88261029f565b9050919050565b6102d8816102be565b82525050565b5f6020820190506102f15f8301846102cf565b92915050565b5f6fffffffffffffffffffffffffffffffff82169050919050565b61031b816102f7565b82525050565b5f6020820190506103345f830184610312565b92915050565b5f62ffffff82169050919050565b6103518161033a565b82525050565b5f60208201905061036a5f830184610348565b92915050565b5f5ffd5b61037d816102be565b8114610387575f5ffd5b50565b5f8135905061039881610374565b92915050565b5f8160020b9050919050565b6103b38161039e565b81146103bd575f5ffd5b50565b5f813590506103ce816103aa565b92915050565b6103dd816102f7565b81146103e7575f5ffd5b50565b5f813590506103f8816103d4565b92915050565b5f5f5f5f6080858703121561041657610415610370565b5b5f6104238782880161038a565b9450506020610434878288016103c0565b9350506040610445878288016103c0565b9250506060610456878288016103ea565b91505092959194509250565b61046b8161029f565b8114610475575f5ffd5b50565b5f8135905061048681610462565b92915050565b5f602082840312156104a1576104a0610370565b5b5f6104ae84828501610478565b91505092915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f6104ee826102f7565b91506104f9836102f7565b925082820190506fffffffffffffffffffffffffffffffff811115610521576105206104b7565b5b92915050565b5f819050919050565b5f819050919050565b5f819050919050565b5f61055c61055761055284610527565b610539565b610530565b9050919050565b61056c81610542565b82525050565b5f6080820190506105855f8301876102cf565b6105926020830186610312565b61059f6040830185610563565b6105ac6060830184610563565b95945050505050565b6105be8161029f565b82525050565b6105cd8161039e565b82525050565b5f6040820190506105e65f8301856105b5565b6105f360208301846105c4565b939250505056fea2646970667358221220ed63fe890f9816856ae5c5b059064c95931328b3a4d4e05fc390c02f872495f264736f6c634300081e0033a264697066735822122053da3887987836adfd577d8e6d98a266666bfa2a180305300aae19dbb8cd494f64736f6c634300081e0033", - "deployedBytecode": "0x608060405234801561000f575f5ffd5b5060043610610029575f3560e01c8063a16712951461002d575b5f5ffd5b610047600480360381019061004291906101f7565b61005d565b6040516100549190610256565b60405180910390f35b5f5f5f8473ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff161061009a57848661009d565b85855b915091505f8282866040516100b190610154565b6100bd9392919061027e565b604051809103905ff0801580156100d6573d5f5f3e3d5ffd5b5090508093508462ffffff168273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167f783cca1c0412dd0d695e784568c96da2e9c22ff989357a2e8b1d9b2b4e6b7118600a886040516101429291906102ce565b60405180910390a45050509392505050565b6107f3806102f683390190565b5f5ffd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f61018e82610165565b9050919050565b61019e81610184565b81146101a8575f5ffd5b50565b5f813590506101b981610195565b92915050565b5f62ffffff82169050919050565b6101d6816101bf565b81146101e0575f5ffd5b50565b5f813590506101f1816101cd565b92915050565b5f5f5f6060848603121561020e5761020d610161565b5b5f61021b868287016101ab565b935050602061022c868287016101ab565b925050604061023d868287016101e3565b9150509250925092565b61025081610184565b82525050565b5f6020820190506102695f830184610247565b92915050565b610278816101bf565b82525050565b5f6060820190506102915f830186610247565b61029e6020830185610247565b6102ab604083018461026f565b949350505050565b5f8160020b9050919050565b6102c8816102b3565b82525050565b5f6040820190506102e15f8301856102bf565b6102ee6020830184610247565b939250505056fe60e060405234801561000f575f5ffd5b506040516107f33803806107f383398181016040528101906100319190610149565b8273ffffffffffffffffffffffffffffffffffffffff1660808173ffffffffffffffffffffffffffffffffffffffff16815250508173ffffffffffffffffffffffffffffffffffffffff1660a08173ffffffffffffffffffffffffffffffffffffffff16815250508062ffffff1660c08162ffffff1681525050505050610199565b5f5ffd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f6100e0826100b7565b9050919050565b6100f0816100d6565b81146100fa575f5ffd5b50565b5f8151905061010b816100e7565b92915050565b5f62ffffff82169050919050565b61012881610111565b8114610132575f5ffd5b50565b5f815190506101438161011f565b92915050565b5f5f5f606084860312156101605761015f6100b3565b5b5f61016d868287016100fd565b935050602061017e868287016100fd565b925050604061018f86828701610135565b9150509250925092565b60805160a05160c0516106306101c35f395f61017e01525f61015a01525f61011601526106305ff3fe608060405234801561000f575f5ffd5b5060043610610060575f3560e01c80630dfe1681146100645780631a68650214610082578063d21220a7146100a0578063ddca3f43146100be578063efe27fa3146100dc578063f637731d146100f8575b5f5ffd5b61006c610114565b60405161007991906102de565b60405180910390f35b61008a610138565b6040516100979190610321565b60405180910390f35b6100a8610158565b6040516100b591906102de565b60405180910390f35b6100c661017c565b6040516100d39190610357565b60405180910390f35b6100f660048036038101906100f191906103fe565b6101a0565b005b610112600480360381019061010d919061048c565b610263565b005b7f000000000000000000000000000000000000000000000000000000000000000081565b5f5f9054906101000a90046fffffffffffffffffffffffffffffffff1681565b7f000000000000000000000000000000000000000000000000000000000000000081565b7f000000000000000000000000000000000000000000000000000000000000000081565b805f5f8282829054906101000a90046fffffffffffffffffffffffffffffffff166101cb91906104e4565b92506101000a8154816fffffffffffffffffffffffffffffffff02191690836fffffffffffffffffffffffffffffffff1602179055508160020b8360020b8573ffffffffffffffffffffffffffffffffffffffff167f7a53080ba414158be7ec69b987b5fb7d07dee101fe85488f0853ae16239d0bde33855f5f6040516102559493929190610572565b60405180910390a450505050565b7f98636036cb66a9c19a37435efc1e90142190214e8abeb821bdba3f2990dd4c95815f6040516102949291906105d3565b60405180910390a150565b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f6102c88261029f565b9050919050565b6102d8816102be565b82525050565b5f6020820190506102f15f8301846102cf565b92915050565b5f6fffffffffffffffffffffffffffffffff82169050919050565b61031b816102f7565b82525050565b5f6020820190506103345f830184610312565b92915050565b5f62ffffff82169050919050565b6103518161033a565b82525050565b5f60208201905061036a5f830184610348565b92915050565b5f5ffd5b61037d816102be565b8114610387575f5ffd5b50565b5f8135905061039881610374565b92915050565b5f8160020b9050919050565b6103b38161039e565b81146103bd575f5ffd5b50565b5f813590506103ce816103aa565b92915050565b6103dd816102f7565b81146103e7575f5ffd5b50565b5f813590506103f8816103d4565b92915050565b5f5f5f5f6080858703121561041657610415610370565b5b5f6104238782880161038a565b9450506020610434878288016103c0565b9350506040610445878288016103c0565b9250506060610456878288016103ea565b91505092959194509250565b61046b8161029f565b8114610475575f5ffd5b50565b5f8135905061048681610462565b92915050565b5f602082840312156104a1576104a0610370565b5b5f6104ae84828501610478565b91505092915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f6104ee826102f7565b91506104f9836102f7565b925082820190506fffffffffffffffffffffffffffffffff811115610521576105206104b7565b5b92915050565b5f819050919050565b5f819050919050565b5f819050919050565b5f61055c61055761055284610527565b610539565b610530565b9050919050565b61056c81610542565b82525050565b5f6080820190506105855f8301876102cf565b6105926020830186610312565b61059f6040830185610563565b6105ac6060830184610563565b95945050505050565b6105be8161029f565b82525050565b6105cd8161039e565b82525050565b5f6040820190506105e65f8301856105b5565b6105f360208301846105c4565b939250505056fea2646970667358221220ed63fe890f9816856ae5c5b059064c95931328b3a4d4e05fc390c02f872495f264736f6c634300081e0033a264697066735822122053da3887987836adfd577d8e6d98a266666bfa2a180305300aae19dbb8cd494f64736f6c634300081e0033", + "bytecode": "0x6080604052348015600e575f5ffd5b506106dd8061001c5f395ff3fe608060405234801561000f575f5ffd5b5060043610610029575f3560e01c8063a16712951461002d575b5f5ffd5b61004061003b3660046101ab565b610069565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390f35b5f5f5f8473ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff16106100a65784866100a9565b85855b915091505f8282866040516100bd90610176565b73ffffffffffffffffffffffffffffffffffffffff938416815292909116602083015262ffffff166040820152606001604051809103905ff080158015610106573d5f5f3e3d5ffd5b5060408051600a815273ffffffffffffffffffffffffffffffffffffffff808416602083015292965086935062ffffff88169280861692908716917f783cca1c0412dd0d695e784568c96da2e9c22ff989357a2e8b1d9b2b4e6b7118910160405180910390a45050509392505050565b6104da806101f783390190565b803573ffffffffffffffffffffffffffffffffffffffff811681146101a6575f5ffd5b919050565b5f5f5f606084860312156101bd575f5ffd5b6101c684610183565b92506101d460208501610183565b9150604084013562ffffff811681146101eb575f5ffd5b80915050925092509256fe60e060405234801561000f575f5ffd5b506040516104da3803806104da83398101604081905261002e91610069565b6001600160a01b03928316608052911660a05262ffffff1660c0526100b4565b80516001600160a01b0381168114610064575f5ffd5b919050565b5f5f5f6060848603121561007b575f5ffd5b6100848461004e565b92506100926020850161004e565b9150604084015162ffffff811681146100a9575f5ffd5b809150509250925092565b60805160a05160c0516103fd6100dd5f395f61012c01525f61010501525f607801526103fd5ff3fe608060405234801561000f575f5ffd5b506004361061006f575f3560e01c8063ddca3f431161004d578063ddca3f4314610127578063efe27fa314610162578063f637731d14610177575f5ffd5b80630dfe1681146100735780631a686502146100c4578063d21220a714610100575b5f5ffd5b61009a7f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020015b60405180910390f35b5f546100df906fffffffffffffffffffffffffffffffff1681565b6040516fffffffffffffffffffffffffffffffff90911681526020016100bb565b61009a7f000000000000000000000000000000000000000000000000000000000000000081565b61014e7f000000000000000000000000000000000000000000000000000000000000000081565b60405162ffffff90911681526020016100bb565b610175610170366004610312565b61018a565b005b61017561018536600461037b565b610287565b5f805482919081906101af9084906fffffffffffffffffffffffffffffffff1661039d565b92506101000a8154816fffffffffffffffffffffffffffffffff02191690836fffffffffffffffffffffffffffffffff1602179055508160020b8360020b8573ffffffffffffffffffffffffffffffffffffffff167f7a53080ba414158be7ec69b987b5fb7d07dee101fe85488f0853ae16239d0bde33855f5f604051610279949392919073ffffffffffffffffffffffffffffffffffffffff9490941684526fffffffffffffffffffffffffffffffff9290921660208401526040830152606082015260800190565b60405180910390a450505050565b6040805173ffffffffffffffffffffffffffffffffffffffff831681525f60208201527f98636036cb66a9c19a37435efc1e90142190214e8abeb821bdba3f2990dd4c95910160405180910390a150565b73ffffffffffffffffffffffffffffffffffffffff811681146102f9575f5ffd5b50565b8035600281900b811461030d575f5ffd5b919050565b5f5f5f5f60808587031215610325575f5ffd5b8435610330816102d8565b935061033e602086016102fc565b925061034c604086016102fc565b915060608501356fffffffffffffffffffffffffffffffff81168114610370575f5ffd5b939692955090935050565b5f6020828403121561038b575f5ffd5b8135610396816102d8565b9392505050565b6fffffffffffffffffffffffffffffffff81811683821601908111156103ea577f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b9291505056fea164736f6c634300081e000aa164736f6c634300081e000a", + "deployedBytecode": "0x608060405234801561000f575f5ffd5b5060043610610029575f3560e01c8063a16712951461002d575b5f5ffd5b61004061003b3660046101ab565b610069565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390f35b5f5f5f8473ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff16106100a65784866100a9565b85855b915091505f8282866040516100bd90610176565b73ffffffffffffffffffffffffffffffffffffffff938416815292909116602083015262ffffff166040820152606001604051809103905ff080158015610106573d5f5f3e3d5ffd5b5060408051600a815273ffffffffffffffffffffffffffffffffffffffff808416602083015292965086935062ffffff88169280861692908716917f783cca1c0412dd0d695e784568c96da2e9c22ff989357a2e8b1d9b2b4e6b7118910160405180910390a45050509392505050565b6104da806101f783390190565b803573ffffffffffffffffffffffffffffffffffffffff811681146101a6575f5ffd5b919050565b5f5f5f606084860312156101bd575f5ffd5b6101c684610183565b92506101d460208501610183565b9150604084013562ffffff811681146101eb575f5ffd5b80915050925092509256fe60e060405234801561000f575f5ffd5b506040516104da3803806104da83398101604081905261002e91610069565b6001600160a01b03928316608052911660a05262ffffff1660c0526100b4565b80516001600160a01b0381168114610064575f5ffd5b919050565b5f5f5f6060848603121561007b575f5ffd5b6100848461004e565b92506100926020850161004e565b9150604084015162ffffff811681146100a9575f5ffd5b809150509250925092565b60805160a05160c0516103fd6100dd5f395f61012c01525f61010501525f607801526103fd5ff3fe608060405234801561000f575f5ffd5b506004361061006f575f3560e01c8063ddca3f431161004d578063ddca3f4314610127578063efe27fa314610162578063f637731d14610177575f5ffd5b80630dfe1681146100735780631a686502146100c4578063d21220a714610100575b5f5ffd5b61009a7f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020015b60405180910390f35b5f546100df906fffffffffffffffffffffffffffffffff1681565b6040516fffffffffffffffffffffffffffffffff90911681526020016100bb565b61009a7f000000000000000000000000000000000000000000000000000000000000000081565b61014e7f000000000000000000000000000000000000000000000000000000000000000081565b60405162ffffff90911681526020016100bb565b610175610170366004610312565b61018a565b005b61017561018536600461037b565b610287565b5f805482919081906101af9084906fffffffffffffffffffffffffffffffff1661039d565b92506101000a8154816fffffffffffffffffffffffffffffffff02191690836fffffffffffffffffffffffffffffffff1602179055508160020b8360020b8573ffffffffffffffffffffffffffffffffffffffff167f7a53080ba414158be7ec69b987b5fb7d07dee101fe85488f0853ae16239d0bde33855f5f604051610279949392919073ffffffffffffffffffffffffffffffffffffffff9490941684526fffffffffffffffffffffffffffffffff9290921660208401526040830152606082015260800190565b60405180910390a450505050565b6040805173ffffffffffffffffffffffffffffffffffffffff831681525f60208201527f98636036cb66a9c19a37435efc1e90142190214e8abeb821bdba3f2990dd4c95910160405180910390a150565b73ffffffffffffffffffffffffffffffffffffffff811681146102f9575f5ffd5b50565b8035600281900b811461030d575f5ffd5b919050565b5f5f5f5f60808587031215610325575f5ffd5b8435610330816102d8565b935061033e602086016102fc565b925061034c604086016102fc565b915060608501356fffffffffffffffffffffffffffffffff81168114610370575f5ffd5b939692955090935050565b5f6020828403121561038b575f5ffd5b8135610396816102d8565b9392505050565b6fffffffffffffffffffffffffffffffff81811683821601908111156103ea577f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b9291505056fea164736f6c634300081e000aa164736f6c634300081e000a", "devdoc": { "methods": {} }, diff --git a/contracts/artifacts/MockUniswapV3Pool.json b/contracts/artifacts/MockUniswapV3Pool.json index 845fcfc370..9061a1ca49 100644 --- a/contracts/artifacts/MockUniswapV3Pool.json +++ b/contracts/artifacts/MockUniswapV3Pool.json @@ -1,190 +1,190 @@ { "abi": [ { - "type": "constructor", "inputs": [ { + "internalType": "address", "name": "_token0", - "type": "address", - "internalType": "address" + "type": "address" }, { + "internalType": "address", "name": "_token1", - "type": "address", - "internalType": "address" + "type": "address" }, { + "internalType": "uint24", "name": "_fee", - "type": "uint24", - "internalType": "uint24" + "type": "uint24" } ], - "stateMutability": "nonpayable" + "stateMutability": "nonpayable", + "type": "constructor" }, { - "type": "function", - "name": "fee", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "uint24", - "internalType": "uint24" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "initialize", + "anonymous": false, "inputs": [ { + "indexed": false, + "internalType": "uint160", "name": "sqrtPriceX96", - "type": "uint160", - "internalType": "uint160" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "liquidity", - "inputs": [], - "outputs": [ + "type": "uint160" + }, { - "name": "", - "type": "uint128", - "internalType": "uint128" + "indexed": false, + "internalType": "int24", + "name": "tick", + "type": "int24" } ], - "stateMutability": "view" + "name": "Initialize", + "type": "event" }, { - "type": "function", - "name": "mockMint", + "anonymous": false, "inputs": [ { + "indexed": false, + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", "name": "owner", - "type": "address", - "internalType": "address" + "type": "address" }, { + "indexed": true, + "internalType": "int24", "name": "tickLower", - "type": "int24", - "internalType": "int24" + "type": "int24" }, { + "indexed": true, + "internalType": "int24", "name": "tickUpper", - "type": "int24", - "internalType": "int24" + "type": "int24" }, { + "indexed": false, + "internalType": "uint128", "name": "amount", - "type": "uint128", - "internalType": "uint128" + "type": "uint128" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount0", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount1", + "type": "uint256" } ], - "outputs": [], - "stateMutability": "nonpayable" + "name": "Mint", + "type": "event" }, { - "type": "function", - "name": "token0", "inputs": [], + "name": "fee", "outputs": [ { + "internalType": "uint24", "name": "", - "type": "address", - "internalType": "address" + "type": "uint24" } ], - "stateMutability": "view" + "stateMutability": "view", + "type": "function" }, { - "type": "function", - "name": "token1", - "inputs": [], - "outputs": [ + "inputs": [ { - "name": "", - "type": "address", - "internalType": "address" + "internalType": "uint160", + "name": "sqrtPriceX96", + "type": "uint160" } ], - "stateMutability": "view" + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" }, { - "type": "event", - "name": "Initialize", - "inputs": [ - { - "name": "sqrtPriceX96", - "type": "uint160", - "indexed": false, - "internalType": "uint160" - }, + "inputs": [], + "name": "liquidity", + "outputs": [ { - "name": "tick", - "type": "int24", - "indexed": false, - "internalType": "int24" + "internalType": "uint128", + "name": "", + "type": "uint128" } ], - "anonymous": false + "stateMutability": "view", + "type": "function" }, { - "type": "event", - "name": "Mint", "inputs": [ { - "name": "sender", - "type": "address", - "indexed": false, - "internalType": "address" - }, - { + "internalType": "address", "name": "owner", - "type": "address", - "indexed": true, - "internalType": "address" + "type": "address" }, { + "internalType": "int24", "name": "tickLower", - "type": "int24", - "indexed": true, - "internalType": "int24" + "type": "int24" }, { + "internalType": "int24", "name": "tickUpper", - "type": "int24", - "indexed": true, - "internalType": "int24" + "type": "int24" }, { + "internalType": "uint128", "name": "amount", - "type": "uint128", - "indexed": false, - "internalType": "uint128" - }, + "type": "uint128" + } + ], + "name": "mockMint", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "token0", + "outputs": [ { - "name": "amount0", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - }, + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "token1", + "outputs": [ { - "name": "amount1", - "type": "uint256", - "indexed": false, - "internalType": "uint256" + "internalType": "address", + "name": "", + "type": "address" } ], - "anonymous": false + "stateMutability": "view", + "type": "function" } ], - "bytecode": "0x60e060405234801561000f575f5ffd5b506040516107f33803806107f383398181016040528101906100319190610149565b8273ffffffffffffffffffffffffffffffffffffffff1660808173ffffffffffffffffffffffffffffffffffffffff16815250508173ffffffffffffffffffffffffffffffffffffffff1660a08173ffffffffffffffffffffffffffffffffffffffff16815250508062ffffff1660c08162ffffff1681525050505050610199565b5f5ffd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f6100e0826100b7565b9050919050565b6100f0816100d6565b81146100fa575f5ffd5b50565b5f8151905061010b816100e7565b92915050565b5f62ffffff82169050919050565b61012881610111565b8114610132575f5ffd5b50565b5f815190506101438161011f565b92915050565b5f5f5f606084860312156101605761015f6100b3565b5b5f61016d868287016100fd565b935050602061017e868287016100fd565b925050604061018f86828701610135565b9150509250925092565b60805160a05160c0516106306101c35f395f61017e01525f61015a01525f61011601526106305ff3fe608060405234801561000f575f5ffd5b5060043610610060575f3560e01c80630dfe1681146100645780631a68650214610082578063d21220a7146100a0578063ddca3f43146100be578063efe27fa3146100dc578063f637731d146100f8575b5f5ffd5b61006c610114565b60405161007991906102de565b60405180910390f35b61008a610138565b6040516100979190610321565b60405180910390f35b6100a8610158565b6040516100b591906102de565b60405180910390f35b6100c661017c565b6040516100d39190610357565b60405180910390f35b6100f660048036038101906100f191906103fe565b6101a0565b005b610112600480360381019061010d919061048c565b610263565b005b7f000000000000000000000000000000000000000000000000000000000000000081565b5f5f9054906101000a90046fffffffffffffffffffffffffffffffff1681565b7f000000000000000000000000000000000000000000000000000000000000000081565b7f000000000000000000000000000000000000000000000000000000000000000081565b805f5f8282829054906101000a90046fffffffffffffffffffffffffffffffff166101cb91906104e4565b92506101000a8154816fffffffffffffffffffffffffffffffff02191690836fffffffffffffffffffffffffffffffff1602179055508160020b8360020b8573ffffffffffffffffffffffffffffffffffffffff167f7a53080ba414158be7ec69b987b5fb7d07dee101fe85488f0853ae16239d0bde33855f5f6040516102559493929190610572565b60405180910390a450505050565b7f98636036cb66a9c19a37435efc1e90142190214e8abeb821bdba3f2990dd4c95815f6040516102949291906105d3565b60405180910390a150565b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f6102c88261029f565b9050919050565b6102d8816102be565b82525050565b5f6020820190506102f15f8301846102cf565b92915050565b5f6fffffffffffffffffffffffffffffffff82169050919050565b61031b816102f7565b82525050565b5f6020820190506103345f830184610312565b92915050565b5f62ffffff82169050919050565b6103518161033a565b82525050565b5f60208201905061036a5f830184610348565b92915050565b5f5ffd5b61037d816102be565b8114610387575f5ffd5b50565b5f8135905061039881610374565b92915050565b5f8160020b9050919050565b6103b38161039e565b81146103bd575f5ffd5b50565b5f813590506103ce816103aa565b92915050565b6103dd816102f7565b81146103e7575f5ffd5b50565b5f813590506103f8816103d4565b92915050565b5f5f5f5f6080858703121561041657610415610370565b5b5f6104238782880161038a565b9450506020610434878288016103c0565b9350506040610445878288016103c0565b9250506060610456878288016103ea565b91505092959194509250565b61046b8161029f565b8114610475575f5ffd5b50565b5f8135905061048681610462565b92915050565b5f602082840312156104a1576104a0610370565b5b5f6104ae84828501610478565b91505092915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f6104ee826102f7565b91506104f9836102f7565b925082820190506fffffffffffffffffffffffffffffffff811115610521576105206104b7565b5b92915050565b5f819050919050565b5f819050919050565b5f819050919050565b5f61055c61055761055284610527565b610539565b610530565b9050919050565b61056c81610542565b82525050565b5f6080820190506105855f8301876102cf565b6105926020830186610312565b61059f6040830185610563565b6105ac6060830184610563565b95945050505050565b6105be8161029f565b82525050565b6105cd8161039e565b82525050565b5f6040820190506105e65f8301856105b5565b6105f360208301846105c4565b939250505056fea2646970667358221220ed63fe890f9816856ae5c5b059064c95931328b3a4d4e05fc390c02f872495f264736f6c634300081e0033", - "deployedBytecode": "0x608060405234801561000f575f5ffd5b5060043610610060575f3560e01c80630dfe1681146100645780631a68650214610082578063d21220a7146100a0578063ddca3f43146100be578063efe27fa3146100dc578063f637731d146100f8575b5f5ffd5b61006c610114565b60405161007991906102de565b60405180910390f35b61008a610138565b6040516100979190610321565b60405180910390f35b6100a8610158565b6040516100b591906102de565b60405180910390f35b6100c661017c565b6040516100d39190610357565b60405180910390f35b6100f660048036038101906100f191906103fe565b6101a0565b005b610112600480360381019061010d919061048c565b610263565b005b7f000000000000000000000000000000000000000000000000000000000000000081565b5f5f9054906101000a90046fffffffffffffffffffffffffffffffff1681565b7f000000000000000000000000000000000000000000000000000000000000000081565b7f000000000000000000000000000000000000000000000000000000000000000081565b805f5f8282829054906101000a90046fffffffffffffffffffffffffffffffff166101cb91906104e4565b92506101000a8154816fffffffffffffffffffffffffffffffff02191690836fffffffffffffffffffffffffffffffff1602179055508160020b8360020b8573ffffffffffffffffffffffffffffffffffffffff167f7a53080ba414158be7ec69b987b5fb7d07dee101fe85488f0853ae16239d0bde33855f5f6040516102559493929190610572565b60405180910390a450505050565b7f98636036cb66a9c19a37435efc1e90142190214e8abeb821bdba3f2990dd4c95815f6040516102949291906105d3565b60405180910390a150565b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f6102c88261029f565b9050919050565b6102d8816102be565b82525050565b5f6020820190506102f15f8301846102cf565b92915050565b5f6fffffffffffffffffffffffffffffffff82169050919050565b61031b816102f7565b82525050565b5f6020820190506103345f830184610312565b92915050565b5f62ffffff82169050919050565b6103518161033a565b82525050565b5f60208201905061036a5f830184610348565b92915050565b5f5ffd5b61037d816102be565b8114610387575f5ffd5b50565b5f8135905061039881610374565b92915050565b5f8160020b9050919050565b6103b38161039e565b81146103bd575f5ffd5b50565b5f813590506103ce816103aa565b92915050565b6103dd816102f7565b81146103e7575f5ffd5b50565b5f813590506103f8816103d4565b92915050565b5f5f5f5f6080858703121561041657610415610370565b5b5f6104238782880161038a565b9450506020610434878288016103c0565b9350506040610445878288016103c0565b9250506060610456878288016103ea565b91505092959194509250565b61046b8161029f565b8114610475575f5ffd5b50565b5f8135905061048681610462565b92915050565b5f602082840312156104a1576104a0610370565b5b5f6104ae84828501610478565b91505092915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f6104ee826102f7565b91506104f9836102f7565b925082820190506fffffffffffffffffffffffffffffffff811115610521576105206104b7565b5b92915050565b5f819050919050565b5f819050919050565b5f819050919050565b5f61055c61055761055284610527565b610539565b610530565b9050919050565b61056c81610542565b82525050565b5f6080820190506105855f8301876102cf565b6105926020830186610312565b61059f6040830185610563565b6105ac6060830184610563565b95945050505050565b6105be8161029f565b82525050565b6105cd8161039e565b82525050565b5f6040820190506105e65f8301856105b5565b6105f360208301846105c4565b939250505056fea2646970667358221220ed63fe890f9816856ae5c5b059064c95931328b3a4d4e05fc390c02f872495f264736f6c634300081e0033", + "bytecode": "0x60e060405234801561000f575f5ffd5b506040516104da3803806104da83398101604081905261002e91610069565b6001600160a01b03928316608052911660a05262ffffff1660c0526100b4565b80516001600160a01b0381168114610064575f5ffd5b919050565b5f5f5f6060848603121561007b575f5ffd5b6100848461004e565b92506100926020850161004e565b9150604084015162ffffff811681146100a9575f5ffd5b809150509250925092565b60805160a05160c0516103fd6100dd5f395f61012c01525f61010501525f607801526103fd5ff3fe608060405234801561000f575f5ffd5b506004361061006f575f3560e01c8063ddca3f431161004d578063ddca3f4314610127578063efe27fa314610162578063f637731d14610177575f5ffd5b80630dfe1681146100735780631a686502146100c4578063d21220a714610100575b5f5ffd5b61009a7f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020015b60405180910390f35b5f546100df906fffffffffffffffffffffffffffffffff1681565b6040516fffffffffffffffffffffffffffffffff90911681526020016100bb565b61009a7f000000000000000000000000000000000000000000000000000000000000000081565b61014e7f000000000000000000000000000000000000000000000000000000000000000081565b60405162ffffff90911681526020016100bb565b610175610170366004610312565b61018a565b005b61017561018536600461037b565b610287565b5f805482919081906101af9084906fffffffffffffffffffffffffffffffff1661039d565b92506101000a8154816fffffffffffffffffffffffffffffffff02191690836fffffffffffffffffffffffffffffffff1602179055508160020b8360020b8573ffffffffffffffffffffffffffffffffffffffff167f7a53080ba414158be7ec69b987b5fb7d07dee101fe85488f0853ae16239d0bde33855f5f604051610279949392919073ffffffffffffffffffffffffffffffffffffffff9490941684526fffffffffffffffffffffffffffffffff9290921660208401526040830152606082015260800190565b60405180910390a450505050565b6040805173ffffffffffffffffffffffffffffffffffffffff831681525f60208201527f98636036cb66a9c19a37435efc1e90142190214e8abeb821bdba3f2990dd4c95910160405180910390a150565b73ffffffffffffffffffffffffffffffffffffffff811681146102f9575f5ffd5b50565b8035600281900b811461030d575f5ffd5b919050565b5f5f5f5f60808587031215610325575f5ffd5b8435610330816102d8565b935061033e602086016102fc565b925061034c604086016102fc565b915060608501356fffffffffffffffffffffffffffffffff81168114610370575f5ffd5b939692955090935050565b5f6020828403121561038b575f5ffd5b8135610396816102d8565b9392505050565b6fffffffffffffffffffffffffffffffff81811683821601908111156103ea577f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b9291505056fea164736f6c634300081e000a", + "deployedBytecode": "0x608060405234801561000f575f5ffd5b506004361061006f575f3560e01c8063ddca3f431161004d578063ddca3f4314610127578063efe27fa314610162578063f637731d14610177575f5ffd5b80630dfe1681146100735780631a686502146100c4578063d21220a714610100575b5f5ffd5b61009a7f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020015b60405180910390f35b5f546100df906fffffffffffffffffffffffffffffffff1681565b6040516fffffffffffffffffffffffffffffffff90911681526020016100bb565b61009a7f000000000000000000000000000000000000000000000000000000000000000081565b61014e7f000000000000000000000000000000000000000000000000000000000000000081565b60405162ffffff90911681526020016100bb565b610175610170366004610312565b61018a565b005b61017561018536600461037b565b610287565b5f805482919081906101af9084906fffffffffffffffffffffffffffffffff1661039d565b92506101000a8154816fffffffffffffffffffffffffffffffff02191690836fffffffffffffffffffffffffffffffff1602179055508160020b8360020b8573ffffffffffffffffffffffffffffffffffffffff167f7a53080ba414158be7ec69b987b5fb7d07dee101fe85488f0853ae16239d0bde33855f5f604051610279949392919073ffffffffffffffffffffffffffffffffffffffff9490941684526fffffffffffffffffffffffffffffffff9290921660208401526040830152606082015260800190565b60405180910390a450505050565b6040805173ffffffffffffffffffffffffffffffffffffffff831681525f60208201527f98636036cb66a9c19a37435efc1e90142190214e8abeb821bdba3f2990dd4c95910160405180910390a150565b73ffffffffffffffffffffffffffffffffffffffff811681146102f9575f5ffd5b50565b8035600281900b811461030d575f5ffd5b919050565b5f5f5f5f60808587031215610325575f5ffd5b8435610330816102d8565b935061033e602086016102fc565b925061034c604086016102fc565b915060608501356fffffffffffffffffffffffffffffffff81168114610370575f5ffd5b939692955090935050565b5f6020828403121561038b575f5ffd5b8135610396816102d8565b9392505050565b6fffffffffffffffffffffffffffffffff81811683821601908111156103ea577f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b9291505056fea164736f6c634300081e000a", "devdoc": { "methods": {} }, diff --git a/contracts/generated/contracts-generated/mockuniswapv3factory/src/lib.rs b/contracts/generated/contracts-generated/mockuniswapv3factory/src/lib.rs index 0630a3d004..3c7fc262db 100644 --- a/contracts/generated/contracts-generated/mockuniswapv3factory/src/lib.rs +++ b/contracts/generated/contracts-generated/mockuniswapv3factory/src/lib.rs @@ -100,22 +100,22 @@ pub mod MockUniswapV3Factory { /// The creation / init bytecode of the contract. /// /// ```text - ///0x6080604052348015600e575f5ffd5b50610b1e8061001c5f395ff3fe608060405234801561000f575f5ffd5b5060043610610029575f3560e01c8063a16712951461002d575b5f5ffd5b610047600480360381019061004291906101f7565b61005d565b6040516100549190610256565b60405180910390f35b5f5f5f8473ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff161061009a57848661009d565b85855b915091505f8282866040516100b190610154565b6100bd9392919061027e565b604051809103905ff0801580156100d6573d5f5f3e3d5ffd5b5090508093508462ffffff168273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167f783cca1c0412dd0d695e784568c96da2e9c22ff989357a2e8b1d9b2b4e6b7118600a886040516101429291906102ce565b60405180910390a45050509392505050565b6107f3806102f683390190565b5f5ffd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f61018e82610165565b9050919050565b61019e81610184565b81146101a8575f5ffd5b50565b5f813590506101b981610195565b92915050565b5f62ffffff82169050919050565b6101d6816101bf565b81146101e0575f5ffd5b50565b5f813590506101f1816101cd565b92915050565b5f5f5f6060848603121561020e5761020d610161565b5b5f61021b868287016101ab565b935050602061022c868287016101ab565b925050604061023d868287016101e3565b9150509250925092565b61025081610184565b82525050565b5f6020820190506102695f830184610247565b92915050565b610278816101bf565b82525050565b5f6060820190506102915f830186610247565b61029e6020830185610247565b6102ab604083018461026f565b949350505050565b5f8160020b9050919050565b6102c8816102b3565b82525050565b5f6040820190506102e15f8301856102bf565b6102ee6020830184610247565b939250505056fe60e060405234801561000f575f5ffd5b506040516107f33803806107f383398181016040528101906100319190610149565b8273ffffffffffffffffffffffffffffffffffffffff1660808173ffffffffffffffffffffffffffffffffffffffff16815250508173ffffffffffffffffffffffffffffffffffffffff1660a08173ffffffffffffffffffffffffffffffffffffffff16815250508062ffffff1660c08162ffffff1681525050505050610199565b5f5ffd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f6100e0826100b7565b9050919050565b6100f0816100d6565b81146100fa575f5ffd5b50565b5f8151905061010b816100e7565b92915050565b5f62ffffff82169050919050565b61012881610111565b8114610132575f5ffd5b50565b5f815190506101438161011f565b92915050565b5f5f5f606084860312156101605761015f6100b3565b5b5f61016d868287016100fd565b935050602061017e868287016100fd565b925050604061018f86828701610135565b9150509250925092565b60805160a05160c0516106306101c35f395f61017e01525f61015a01525f61011601526106305ff3fe608060405234801561000f575f5ffd5b5060043610610060575f3560e01c80630dfe1681146100645780631a68650214610082578063d21220a7146100a0578063ddca3f43146100be578063efe27fa3146100dc578063f637731d146100f8575b5f5ffd5b61006c610114565b60405161007991906102de565b60405180910390f35b61008a610138565b6040516100979190610321565b60405180910390f35b6100a8610158565b6040516100b591906102de565b60405180910390f35b6100c661017c565b6040516100d39190610357565b60405180910390f35b6100f660048036038101906100f191906103fe565b6101a0565b005b610112600480360381019061010d919061048c565b610263565b005b7f000000000000000000000000000000000000000000000000000000000000000081565b5f5f9054906101000a90046fffffffffffffffffffffffffffffffff1681565b7f000000000000000000000000000000000000000000000000000000000000000081565b7f000000000000000000000000000000000000000000000000000000000000000081565b805f5f8282829054906101000a90046fffffffffffffffffffffffffffffffff166101cb91906104e4565b92506101000a8154816fffffffffffffffffffffffffffffffff02191690836fffffffffffffffffffffffffffffffff1602179055508160020b8360020b8573ffffffffffffffffffffffffffffffffffffffff167f7a53080ba414158be7ec69b987b5fb7d07dee101fe85488f0853ae16239d0bde33855f5f6040516102559493929190610572565b60405180910390a450505050565b7f98636036cb66a9c19a37435efc1e90142190214e8abeb821bdba3f2990dd4c95815f6040516102949291906105d3565b60405180910390a150565b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f6102c88261029f565b9050919050565b6102d8816102be565b82525050565b5f6020820190506102f15f8301846102cf565b92915050565b5f6fffffffffffffffffffffffffffffffff82169050919050565b61031b816102f7565b82525050565b5f6020820190506103345f830184610312565b92915050565b5f62ffffff82169050919050565b6103518161033a565b82525050565b5f60208201905061036a5f830184610348565b92915050565b5f5ffd5b61037d816102be565b8114610387575f5ffd5b50565b5f8135905061039881610374565b92915050565b5f8160020b9050919050565b6103b38161039e565b81146103bd575f5ffd5b50565b5f813590506103ce816103aa565b92915050565b6103dd816102f7565b81146103e7575f5ffd5b50565b5f813590506103f8816103d4565b92915050565b5f5f5f5f6080858703121561041657610415610370565b5b5f6104238782880161038a565b9450506020610434878288016103c0565b9350506040610445878288016103c0565b9250506060610456878288016103ea565b91505092959194509250565b61046b8161029f565b8114610475575f5ffd5b50565b5f8135905061048681610462565b92915050565b5f602082840312156104a1576104a0610370565b5b5f6104ae84828501610478565b91505092915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f6104ee826102f7565b91506104f9836102f7565b925082820190506fffffffffffffffffffffffffffffffff811115610521576105206104b7565b5b92915050565b5f819050919050565b5f819050919050565b5f819050919050565b5f61055c61055761055284610527565b610539565b610530565b9050919050565b61056c81610542565b82525050565b5f6080820190506105855f8301876102cf565b6105926020830186610312565b61059f6040830185610563565b6105ac6060830184610563565b95945050505050565b6105be8161029f565b82525050565b6105cd8161039e565b82525050565b5f6040820190506105e65f8301856105b5565b6105f360208301846105c4565b939250505056fea2646970667358221220ed63fe890f9816856ae5c5b059064c95931328b3a4d4e05fc390c02f872495f264736f6c634300081e0033a264697066735822122053da3887987836adfd577d8e6d98a266666bfa2a180305300aae19dbb8cd494f64736f6c634300081e0033 + ///0x6080604052348015600e575f5ffd5b506106dd8061001c5f395ff3fe608060405234801561000f575f5ffd5b5060043610610029575f3560e01c8063a16712951461002d575b5f5ffd5b61004061003b3660046101ab565b610069565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390f35b5f5f5f8473ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff16106100a65784866100a9565b85855b915091505f8282866040516100bd90610176565b73ffffffffffffffffffffffffffffffffffffffff938416815292909116602083015262ffffff166040820152606001604051809103905ff080158015610106573d5f5f3e3d5ffd5b5060408051600a815273ffffffffffffffffffffffffffffffffffffffff808416602083015292965086935062ffffff88169280861692908716917f783cca1c0412dd0d695e784568c96da2e9c22ff989357a2e8b1d9b2b4e6b7118910160405180910390a45050509392505050565b6104da806101f783390190565b803573ffffffffffffffffffffffffffffffffffffffff811681146101a6575f5ffd5b919050565b5f5f5f606084860312156101bd575f5ffd5b6101c684610183565b92506101d460208501610183565b9150604084013562ffffff811681146101eb575f5ffd5b80915050925092509256fe60e060405234801561000f575f5ffd5b506040516104da3803806104da83398101604081905261002e91610069565b6001600160a01b03928316608052911660a05262ffffff1660c0526100b4565b80516001600160a01b0381168114610064575f5ffd5b919050565b5f5f5f6060848603121561007b575f5ffd5b6100848461004e565b92506100926020850161004e565b9150604084015162ffffff811681146100a9575f5ffd5b809150509250925092565b60805160a05160c0516103fd6100dd5f395f61012c01525f61010501525f607801526103fd5ff3fe608060405234801561000f575f5ffd5b506004361061006f575f3560e01c8063ddca3f431161004d578063ddca3f4314610127578063efe27fa314610162578063f637731d14610177575f5ffd5b80630dfe1681146100735780631a686502146100c4578063d21220a714610100575b5f5ffd5b61009a7f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020015b60405180910390f35b5f546100df906fffffffffffffffffffffffffffffffff1681565b6040516fffffffffffffffffffffffffffffffff90911681526020016100bb565b61009a7f000000000000000000000000000000000000000000000000000000000000000081565b61014e7f000000000000000000000000000000000000000000000000000000000000000081565b60405162ffffff90911681526020016100bb565b610175610170366004610312565b61018a565b005b61017561018536600461037b565b610287565b5f805482919081906101af9084906fffffffffffffffffffffffffffffffff1661039d565b92506101000a8154816fffffffffffffffffffffffffffffffff02191690836fffffffffffffffffffffffffffffffff1602179055508160020b8360020b8573ffffffffffffffffffffffffffffffffffffffff167f7a53080ba414158be7ec69b987b5fb7d07dee101fe85488f0853ae16239d0bde33855f5f604051610279949392919073ffffffffffffffffffffffffffffffffffffffff9490941684526fffffffffffffffffffffffffffffffff9290921660208401526040830152606082015260800190565b60405180910390a450505050565b6040805173ffffffffffffffffffffffffffffffffffffffff831681525f60208201527f98636036cb66a9c19a37435efc1e90142190214e8abeb821bdba3f2990dd4c95910160405180910390a150565b73ffffffffffffffffffffffffffffffffffffffff811681146102f9575f5ffd5b50565b8035600281900b811461030d575f5ffd5b919050565b5f5f5f5f60808587031215610325575f5ffd5b8435610330816102d8565b935061033e602086016102fc565b925061034c604086016102fc565b915060608501356fffffffffffffffffffffffffffffffff81168114610370575f5ffd5b939692955090935050565b5f6020828403121561038b575f5ffd5b8135610396816102d8565b9392505050565b6fffffffffffffffffffffffffffffffff81811683821601908111156103ea577f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b9291505056fea164736f6c634300081e000aa164736f6c634300081e000a /// ``` #[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`\x0EW__\xFD[Pa\x0B\x1E\x80a\0\x1C_9_\xF3\xFE`\x80`@R4\x80\x15a\0\x0FW__\xFD[P`\x046\x10a\0)W_5`\xE0\x1C\x80c\xA1g\x12\x95\x14a\0-W[__\xFD[a\0G`\x04\x806\x03\x81\x01\x90a\0B\x91\x90a\x01\xF7V[a\0]V[`@Qa\0T\x91\x90a\x02VV[`@Q\x80\x91\x03\x90\xF3[___\x84s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x86s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x10a\0\x9AW\x84\x86a\0\x9DV[\x85\x85[\x91P\x91P_\x82\x82\x86`@Qa\0\xB1\x90a\x01TV[a\0\xBD\x93\x92\x91\x90a\x02~V[`@Q\x80\x91\x03\x90_\xF0\x80\x15\x80\x15a\0\xD6W=__>=_\xFD[P\x90P\x80\x93P\x84b\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\x84s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x7Fx<\xCA\x1C\x04\x12\xDD\ri^xEh\xC9m\xA2\xE9\xC2/\xF9\x895z.\x8B\x1D\x9B+Nkq\x18`\n\x88`@Qa\x01B\x92\x91\x90a\x02\xCEV[`@Q\x80\x91\x03\x90\xA4PPP\x93\x92PPPV[a\x07\xF3\x80a\x02\xF6\x839\x01\x90V[__\xFD[_s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x82\x16\x90P\x91\x90PV[_a\x01\x8E\x82a\x01eV[\x90P\x91\x90PV[a\x01\x9E\x81a\x01\x84V[\x81\x14a\x01\xA8W__\xFD[PV[_\x815\x90Pa\x01\xB9\x81a\x01\x95V[\x92\x91PPV[_b\xFF\xFF\xFF\x82\x16\x90P\x91\x90PV[a\x01\xD6\x81a\x01\xBFV[\x81\x14a\x01\xE0W__\xFD[PV[_\x815\x90Pa\x01\xF1\x81a\x01\xCDV[\x92\x91PPV[___``\x84\x86\x03\x12\x15a\x02\x0EWa\x02\ra\x01aV[[_a\x02\x1B\x86\x82\x87\x01a\x01\xABV[\x93PP` a\x02,\x86\x82\x87\x01a\x01\xABV[\x92PP`@a\x02=\x86\x82\x87\x01a\x01\xE3V[\x91PP\x92P\x92P\x92V[a\x02P\x81a\x01\x84V[\x82RPPV[_` \x82\x01\x90Pa\x02i_\x83\x01\x84a\x02GV[\x92\x91PPV[a\x02x\x81a\x01\xBFV[\x82RPPV[_``\x82\x01\x90Pa\x02\x91_\x83\x01\x86a\x02GV[a\x02\x9E` \x83\x01\x85a\x02GV[a\x02\xAB`@\x83\x01\x84a\x02oV[\x94\x93PPPPV[_\x81`\x02\x0B\x90P\x91\x90PV[a\x02\xC8\x81a\x02\xB3V[\x82RPPV[_`@\x82\x01\x90Pa\x02\xE1_\x83\x01\x85a\x02\xBFV[a\x02\xEE` \x83\x01\x84a\x02GV[\x93\x92PPPV\xFE`\xE0`@R4\x80\x15a\0\x0FW__\xFD[P`@Qa\x07\xF38\x03\x80a\x07\xF3\x839\x81\x81\x01`@R\x81\x01\x90a\x001\x91\x90a\x01IV[\x82s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16`\x80\x81s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x81RPP\x81s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16`\xA0\x81s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x81RPP\x80b\xFF\xFF\xFF\x16`\xC0\x81b\xFF\xFF\xFF\x16\x81RPPPPPa\x01\x99V[__\xFD[_s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x82\x16\x90P\x91\x90PV[_a\0\xE0\x82a\0\xB7V[\x90P\x91\x90PV[a\0\xF0\x81a\0\xD6V[\x81\x14a\0\xFAW__\xFD[PV[_\x81Q\x90Pa\x01\x0B\x81a\0\xE7V[\x92\x91PPV[_b\xFF\xFF\xFF\x82\x16\x90P\x91\x90PV[a\x01(\x81a\x01\x11V[\x81\x14a\x012W__\xFD[PV[_\x81Q\x90Pa\x01C\x81a\x01\x1FV[\x92\x91PPV[___``\x84\x86\x03\x12\x15a\x01`Wa\x01_a\0\xB3V[[_a\x01m\x86\x82\x87\x01a\0\xFDV[\x93PP` a\x01~\x86\x82\x87\x01a\0\xFDV[\x92PP`@a\x01\x8F\x86\x82\x87\x01a\x015V[\x91PP\x92P\x92P\x92V[`\x80Q`\xA0Q`\xC0Qa\x060a\x01\xC3_9_a\x01~\x01R_a\x01Z\x01R_a\x01\x16\x01Ra\x060_\xF3\xFE`\x80`@R4\x80\x15a\0\x0FW__\xFD[P`\x046\x10a\0`W_5`\xE0\x1C\x80c\r\xFE\x16\x81\x14a\0dW\x80c\x1Ahe\x02\x14a\0\x82W\x80c\xD2\x12 \xA7\x14a\0\xA0W\x80c\xDD\xCA?C\x14a\0\xBEW\x80c\xEF\xE2\x7F\xA3\x14a\0\xDCW\x80c\xF67s\x1D\x14a\0\xF8W[__\xFD[a\0la\x01\x14V[`@Qa\0y\x91\x90a\x02\xDEV[`@Q\x80\x91\x03\x90\xF3[a\0\x8Aa\x018V[`@Qa\0\x97\x91\x90a\x03!V[`@Q\x80\x91\x03\x90\xF3[a\0\xA8a\x01XV[`@Qa\0\xB5\x91\x90a\x02\xDEV[`@Q\x80\x91\x03\x90\xF3[a\0\xC6a\x01|V[`@Qa\0\xD3\x91\x90a\x03WV[`@Q\x80\x91\x03\x90\xF3[a\0\xF6`\x04\x806\x03\x81\x01\x90a\0\xF1\x91\x90a\x03\xFEV[a\x01\xA0V[\0[a\x01\x12`\x04\x806\x03\x81\x01\x90a\x01\r\x91\x90a\x04\x8CV[a\x02cV[\0[\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\x81V[__\x90T\x90a\x01\0\n\x90\x04o\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x81V[\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\x81V[\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\x81V[\x80__\x82\x82\x82\x90T\x90a\x01\0\n\x90\x04o\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16a\x01\xCB\x91\x90a\x04\xE4V[\x92Pa\x01\0\n\x81T\x81o\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x02\x19\x16\x90\x83o\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x02\x17\x90UP\x81`\x02\x0B\x83`\x02\x0B\x85s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x7FzS\x08\x0B\xA4\x14\x15\x8B\xE7\xECi\xB9\x87\xB5\xFB}\x07\xDE\xE1\x01\xFE\x85H\x8F\x08S\xAE\x16#\x9D\x0B\xDE3\x85__`@Qa\x02U\x94\x93\x92\x91\x90a\x05rV[`@Q\x80\x91\x03\x90\xA4PPPPV[\x7F\x98c`6\xCBf\xA9\xC1\x9A7C^\xFC\x1E\x90\x14!\x90!N\x8A\xBE\xB8!\xBD\xBA?)\x90\xDDL\x95\x81_`@Qa\x02\x94\x92\x91\x90a\x05\xD3V[`@Q\x80\x91\x03\x90\xA1PV[_s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x82\x16\x90P\x91\x90PV[_a\x02\xC8\x82a\x02\x9FV[\x90P\x91\x90PV[a\x02\xD8\x81a\x02\xBEV[\x82RPPV[_` \x82\x01\x90Pa\x02\xF1_\x83\x01\x84a\x02\xCFV[\x92\x91PPV[_o\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x82\x16\x90P\x91\x90PV[a\x03\x1B\x81a\x02\xF7V[\x82RPPV[_` \x82\x01\x90Pa\x034_\x83\x01\x84a\x03\x12V[\x92\x91PPV[_b\xFF\xFF\xFF\x82\x16\x90P\x91\x90PV[a\x03Q\x81a\x03:V[\x82RPPV[_` \x82\x01\x90Pa\x03j_\x83\x01\x84a\x03HV[\x92\x91PPV[__\xFD[a\x03}\x81a\x02\xBEV[\x81\x14a\x03\x87W__\xFD[PV[_\x815\x90Pa\x03\x98\x81a\x03tV[\x92\x91PPV[_\x81`\x02\x0B\x90P\x91\x90PV[a\x03\xB3\x81a\x03\x9EV[\x81\x14a\x03\xBDW__\xFD[PV[_\x815\x90Pa\x03\xCE\x81a\x03\xAAV[\x92\x91PPV[a\x03\xDD\x81a\x02\xF7V[\x81\x14a\x03\xE7W__\xFD[PV[_\x815\x90Pa\x03\xF8\x81a\x03\xD4V[\x92\x91PPV[____`\x80\x85\x87\x03\x12\x15a\x04\x16Wa\x04\x15a\x03pV[[_a\x04#\x87\x82\x88\x01a\x03\x8AV[\x94PP` a\x044\x87\x82\x88\x01a\x03\xC0V[\x93PP`@a\x04E\x87\x82\x88\x01a\x03\xC0V[\x92PP``a\x04V\x87\x82\x88\x01a\x03\xEAV[\x91PP\x92\x95\x91\x94P\x92PV[a\x04k\x81a\x02\x9FV[\x81\x14a\x04uW__\xFD[PV[_\x815\x90Pa\x04\x86\x81a\x04bV[\x92\x91PPV[_` \x82\x84\x03\x12\x15a\x04\xA1Wa\x04\xA0a\x03pV[[_a\x04\xAE\x84\x82\x85\x01a\x04xV[\x91PP\x92\x91PPV[\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\x04\xEE\x82a\x02\xF7V[\x91Pa\x04\xF9\x83a\x02\xF7V[\x92P\x82\x82\x01\x90Po\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x11\x15a\x05!Wa\x05 a\x04\xB7V[[\x92\x91PPV[_\x81\x90P\x91\x90PV[_\x81\x90P\x91\x90PV[_\x81\x90P\x91\x90PV[_a\x05\\a\x05Wa\x05R\x84a\x05'V[a\x059V[a\x050V[\x90P\x91\x90PV[a\x05l\x81a\x05BV[\x82RPPV[_`\x80\x82\x01\x90Pa\x05\x85_\x83\x01\x87a\x02\xCFV[a\x05\x92` \x83\x01\x86a\x03\x12V[a\x05\x9F`@\x83\x01\x85a\x05cV[a\x05\xAC``\x83\x01\x84a\x05cV[\x95\x94PPPPPV[a\x05\xBE\x81a\x02\x9FV[\x82RPPV[a\x05\xCD\x81a\x03\x9EV[\x82RPPV[_`@\x82\x01\x90Pa\x05\xE6_\x83\x01\x85a\x05\xB5V[a\x05\xF3` \x83\x01\x84a\x05\xC4V[\x93\x92PPPV\xFE\xA2dipfsX\"\x12 \xEDc\xFE\x89\x0F\x98\x16\x85j\xE5\xC5\xB0Y\x06L\x95\x93\x13(\xB3\xA4\xD4\xE0_\xC3\x90\xC0/\x87$\x95\xF2dsolcC\0\x08\x1E\x003\xA2dipfsX\"\x12 S\xDA8\x87\x98x6\xAD\xFDW}\x8Em\x98\xA2ffk\xFA*\x18\x03\x050\n\xAE\x19\xDB\xB8\xCDIOdsolcC\0\x08\x1E\x003", + b"`\x80`@R4\x80\x15`\x0EW__\xFD[Pa\x06\xDD\x80a\0\x1C_9_\xF3\xFE`\x80`@R4\x80\x15a\0\x0FW__\xFD[P`\x046\x10a\0)W_5`\xE0\x1C\x80c\xA1g\x12\x95\x14a\0-W[__\xFD[a\0@a\0;6`\x04a\x01\xABV[a\0iV[`@Qs\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x90\x91\x16\x81R` \x01`@Q\x80\x91\x03\x90\xF3[___\x84s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x86s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x10a\0\xA6W\x84\x86a\0\xA9V[\x85\x85[\x91P\x91P_\x82\x82\x86`@Qa\0\xBD\x90a\x01vV[s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x93\x84\x16\x81R\x92\x90\x91\x16` \x83\x01Rb\xFF\xFF\xFF\x16`@\x82\x01R``\x01`@Q\x80\x91\x03\x90_\xF0\x80\x15\x80\x15a\x01\x06W=__>=_\xFD[P`@\x80Q`\n\x81Rs\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x80\x84\x16` \x83\x01R\x92\x96P\x86\x93Pb\xFF\xFF\xFF\x88\x16\x92\x80\x86\x16\x92\x90\x87\x16\x91\x7Fx<\xCA\x1C\x04\x12\xDD\ri^xEh\xC9m\xA2\xE9\xC2/\xF9\x895z.\x8B\x1D\x9B+Nkq\x18\x91\x01`@Q\x80\x91\x03\x90\xA4PPP\x93\x92PPPV[a\x04\xDA\x80a\x01\xF7\x839\x01\x90V[\x805s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x16\x81\x14a\x01\xA6W__\xFD[\x91\x90PV[___``\x84\x86\x03\x12\x15a\x01\xBDW__\xFD[a\x01\xC6\x84a\x01\x83V[\x92Pa\x01\xD4` \x85\x01a\x01\x83V[\x91P`@\x84\x015b\xFF\xFF\xFF\x81\x16\x81\x14a\x01\xEBW__\xFD[\x80\x91PP\x92P\x92P\x92V\xFE`\xE0`@R4\x80\x15a\0\x0FW__\xFD[P`@Qa\x04\xDA8\x03\x80a\x04\xDA\x839\x81\x01`@\x81\x90Ra\0.\x91a\0iV[`\x01`\x01`\xA0\x1B\x03\x92\x83\x16`\x80R\x91\x16`\xA0Rb\xFF\xFF\xFF\x16`\xC0Ra\0\xB4V[\x80Q`\x01`\x01`\xA0\x1B\x03\x81\x16\x81\x14a\0dW__\xFD[\x91\x90PV[___``\x84\x86\x03\x12\x15a\0{W__\xFD[a\0\x84\x84a\0NV[\x92Pa\0\x92` \x85\x01a\0NV[\x91P`@\x84\x01Qb\xFF\xFF\xFF\x81\x16\x81\x14a\0\xA9W__\xFD[\x80\x91PP\x92P\x92P\x92V[`\x80Q`\xA0Q`\xC0Qa\x03\xFDa\0\xDD_9_a\x01,\x01R_a\x01\x05\x01R_`x\x01Ra\x03\xFD_\xF3\xFE`\x80`@R4\x80\x15a\0\x0FW__\xFD[P`\x046\x10a\0oW_5`\xE0\x1C\x80c\xDD\xCA?C\x11a\0MW\x80c\xDD\xCA?C\x14a\x01'W\x80c\xEF\xE2\x7F\xA3\x14a\x01bW\x80c\xF67s\x1D\x14a\x01wW__\xFD[\x80c\r\xFE\x16\x81\x14a\0sW\x80c\x1Ahe\x02\x14a\0\xC4W\x80c\xD2\x12 \xA7\x14a\x01\0W[__\xFD[a\0\x9A\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\x81V[`@Qs\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x90\x91\x16\x81R` \x01[`@Q\x80\x91\x03\x90\xF3[_Ta\0\xDF\x90o\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x81V[`@Qo\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x90\x91\x16\x81R` \x01a\0\xBBV[a\0\x9A\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\x81V[a\x01N\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\x81V[`@Qb\xFF\xFF\xFF\x90\x91\x16\x81R` \x01a\0\xBBV[a\x01ua\x01p6`\x04a\x03\x12V[a\x01\x8AV[\0[a\x01ua\x01\x856`\x04a\x03{V[a\x02\x87V[_\x80T\x82\x91\x90\x81\x90a\x01\xAF\x90\x84\x90o\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16a\x03\x9DV[\x92Pa\x01\0\n\x81T\x81o\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x02\x19\x16\x90\x83o\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x02\x17\x90UP\x81`\x02\x0B\x83`\x02\x0B\x85s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x7FzS\x08\x0B\xA4\x14\x15\x8B\xE7\xECi\xB9\x87\xB5\xFB}\x07\xDE\xE1\x01\xFE\x85H\x8F\x08S\xAE\x16#\x9D\x0B\xDE3\x85__`@Qa\x02y\x94\x93\x92\x91\x90s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x94\x90\x94\x16\x84Ro\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x92\x90\x92\x16` \x84\x01R`@\x83\x01R``\x82\x01R`\x80\x01\x90V[`@Q\x80\x91\x03\x90\xA4PPPPV[`@\x80Qs\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x83\x16\x81R_` \x82\x01R\x7F\x98c`6\xCBf\xA9\xC1\x9A7C^\xFC\x1E\x90\x14!\x90!N\x8A\xBE\xB8!\xBD\xBA?)\x90\xDDL\x95\x91\x01`@Q\x80\x91\x03\x90\xA1PV[s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x16\x81\x14a\x02\xF9W__\xFD[PV[\x805`\x02\x81\x90\x0B\x81\x14a\x03\rW__\xFD[\x91\x90PV[____`\x80\x85\x87\x03\x12\x15a\x03%W__\xFD[\x845a\x030\x81a\x02\xD8V[\x93Pa\x03>` \x86\x01a\x02\xFCV[\x92Pa\x03L`@\x86\x01a\x02\xFCV[\x91P``\x85\x015o\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x16\x81\x14a\x03pW__\xFD[\x93\x96\x92\x95P\x90\x93PPV[_` \x82\x84\x03\x12\x15a\x03\x8BW__\xFD[\x815a\x03\x96\x81a\x02\xD8V[\x93\x92PPPV[o\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x81\x16\x83\x82\x16\x01\x90\x81\x11\x15a\x03\xEAW\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[\x92\x91PPV\xFE\xA1dsolcC\0\x08\x1E\0\n\xA1dsolcC\0\x08\x1E\0\n", ); /// The runtime bytecode of the contract, as deployed on the network. /// /// ```text - ///0x608060405234801561000f575f5ffd5b5060043610610029575f3560e01c8063a16712951461002d575b5f5ffd5b610047600480360381019061004291906101f7565b61005d565b6040516100549190610256565b60405180910390f35b5f5f5f8473ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff161061009a57848661009d565b85855b915091505f8282866040516100b190610154565b6100bd9392919061027e565b604051809103905ff0801580156100d6573d5f5f3e3d5ffd5b5090508093508462ffffff168273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167f783cca1c0412dd0d695e784568c96da2e9c22ff989357a2e8b1d9b2b4e6b7118600a886040516101429291906102ce565b60405180910390a45050509392505050565b6107f3806102f683390190565b5f5ffd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f61018e82610165565b9050919050565b61019e81610184565b81146101a8575f5ffd5b50565b5f813590506101b981610195565b92915050565b5f62ffffff82169050919050565b6101d6816101bf565b81146101e0575f5ffd5b50565b5f813590506101f1816101cd565b92915050565b5f5f5f6060848603121561020e5761020d610161565b5b5f61021b868287016101ab565b935050602061022c868287016101ab565b925050604061023d868287016101e3565b9150509250925092565b61025081610184565b82525050565b5f6020820190506102695f830184610247565b92915050565b610278816101bf565b82525050565b5f6060820190506102915f830186610247565b61029e6020830185610247565b6102ab604083018461026f565b949350505050565b5f8160020b9050919050565b6102c8816102b3565b82525050565b5f6040820190506102e15f8301856102bf565b6102ee6020830184610247565b939250505056fe60e060405234801561000f575f5ffd5b506040516107f33803806107f383398181016040528101906100319190610149565b8273ffffffffffffffffffffffffffffffffffffffff1660808173ffffffffffffffffffffffffffffffffffffffff16815250508173ffffffffffffffffffffffffffffffffffffffff1660a08173ffffffffffffffffffffffffffffffffffffffff16815250508062ffffff1660c08162ffffff1681525050505050610199565b5f5ffd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f6100e0826100b7565b9050919050565b6100f0816100d6565b81146100fa575f5ffd5b50565b5f8151905061010b816100e7565b92915050565b5f62ffffff82169050919050565b61012881610111565b8114610132575f5ffd5b50565b5f815190506101438161011f565b92915050565b5f5f5f606084860312156101605761015f6100b3565b5b5f61016d868287016100fd565b935050602061017e868287016100fd565b925050604061018f86828701610135565b9150509250925092565b60805160a05160c0516106306101c35f395f61017e01525f61015a01525f61011601526106305ff3fe608060405234801561000f575f5ffd5b5060043610610060575f3560e01c80630dfe1681146100645780631a68650214610082578063d21220a7146100a0578063ddca3f43146100be578063efe27fa3146100dc578063f637731d146100f8575b5f5ffd5b61006c610114565b60405161007991906102de565b60405180910390f35b61008a610138565b6040516100979190610321565b60405180910390f35b6100a8610158565b6040516100b591906102de565b60405180910390f35b6100c661017c565b6040516100d39190610357565b60405180910390f35b6100f660048036038101906100f191906103fe565b6101a0565b005b610112600480360381019061010d919061048c565b610263565b005b7f000000000000000000000000000000000000000000000000000000000000000081565b5f5f9054906101000a90046fffffffffffffffffffffffffffffffff1681565b7f000000000000000000000000000000000000000000000000000000000000000081565b7f000000000000000000000000000000000000000000000000000000000000000081565b805f5f8282829054906101000a90046fffffffffffffffffffffffffffffffff166101cb91906104e4565b92506101000a8154816fffffffffffffffffffffffffffffffff02191690836fffffffffffffffffffffffffffffffff1602179055508160020b8360020b8573ffffffffffffffffffffffffffffffffffffffff167f7a53080ba414158be7ec69b987b5fb7d07dee101fe85488f0853ae16239d0bde33855f5f6040516102559493929190610572565b60405180910390a450505050565b7f98636036cb66a9c19a37435efc1e90142190214e8abeb821bdba3f2990dd4c95815f6040516102949291906105d3565b60405180910390a150565b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f6102c88261029f565b9050919050565b6102d8816102be565b82525050565b5f6020820190506102f15f8301846102cf565b92915050565b5f6fffffffffffffffffffffffffffffffff82169050919050565b61031b816102f7565b82525050565b5f6020820190506103345f830184610312565b92915050565b5f62ffffff82169050919050565b6103518161033a565b82525050565b5f60208201905061036a5f830184610348565b92915050565b5f5ffd5b61037d816102be565b8114610387575f5ffd5b50565b5f8135905061039881610374565b92915050565b5f8160020b9050919050565b6103b38161039e565b81146103bd575f5ffd5b50565b5f813590506103ce816103aa565b92915050565b6103dd816102f7565b81146103e7575f5ffd5b50565b5f813590506103f8816103d4565b92915050565b5f5f5f5f6080858703121561041657610415610370565b5b5f6104238782880161038a565b9450506020610434878288016103c0565b9350506040610445878288016103c0565b9250506060610456878288016103ea565b91505092959194509250565b61046b8161029f565b8114610475575f5ffd5b50565b5f8135905061048681610462565b92915050565b5f602082840312156104a1576104a0610370565b5b5f6104ae84828501610478565b91505092915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f6104ee826102f7565b91506104f9836102f7565b925082820190506fffffffffffffffffffffffffffffffff811115610521576105206104b7565b5b92915050565b5f819050919050565b5f819050919050565b5f819050919050565b5f61055c61055761055284610527565b610539565b610530565b9050919050565b61056c81610542565b82525050565b5f6080820190506105855f8301876102cf565b6105926020830186610312565b61059f6040830185610563565b6105ac6060830184610563565b95945050505050565b6105be8161029f565b82525050565b6105cd8161039e565b82525050565b5f6040820190506105e65f8301856105b5565b6105f360208301846105c4565b939250505056fea2646970667358221220ed63fe890f9816856ae5c5b059064c95931328b3a4d4e05fc390c02f872495f264736f6c634300081e0033a264697066735822122053da3887987836adfd577d8e6d98a266666bfa2a180305300aae19dbb8cd494f64736f6c634300081e0033 + ///0x608060405234801561000f575f5ffd5b5060043610610029575f3560e01c8063a16712951461002d575b5f5ffd5b61004061003b3660046101ab565b610069565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390f35b5f5f5f8473ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff16106100a65784866100a9565b85855b915091505f8282866040516100bd90610176565b73ffffffffffffffffffffffffffffffffffffffff938416815292909116602083015262ffffff166040820152606001604051809103905ff080158015610106573d5f5f3e3d5ffd5b5060408051600a815273ffffffffffffffffffffffffffffffffffffffff808416602083015292965086935062ffffff88169280861692908716917f783cca1c0412dd0d695e784568c96da2e9c22ff989357a2e8b1d9b2b4e6b7118910160405180910390a45050509392505050565b6104da806101f783390190565b803573ffffffffffffffffffffffffffffffffffffffff811681146101a6575f5ffd5b919050565b5f5f5f606084860312156101bd575f5ffd5b6101c684610183565b92506101d460208501610183565b9150604084013562ffffff811681146101eb575f5ffd5b80915050925092509256fe60e060405234801561000f575f5ffd5b506040516104da3803806104da83398101604081905261002e91610069565b6001600160a01b03928316608052911660a05262ffffff1660c0526100b4565b80516001600160a01b0381168114610064575f5ffd5b919050565b5f5f5f6060848603121561007b575f5ffd5b6100848461004e565b92506100926020850161004e565b9150604084015162ffffff811681146100a9575f5ffd5b809150509250925092565b60805160a05160c0516103fd6100dd5f395f61012c01525f61010501525f607801526103fd5ff3fe608060405234801561000f575f5ffd5b506004361061006f575f3560e01c8063ddca3f431161004d578063ddca3f4314610127578063efe27fa314610162578063f637731d14610177575f5ffd5b80630dfe1681146100735780631a686502146100c4578063d21220a714610100575b5f5ffd5b61009a7f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020015b60405180910390f35b5f546100df906fffffffffffffffffffffffffffffffff1681565b6040516fffffffffffffffffffffffffffffffff90911681526020016100bb565b61009a7f000000000000000000000000000000000000000000000000000000000000000081565b61014e7f000000000000000000000000000000000000000000000000000000000000000081565b60405162ffffff90911681526020016100bb565b610175610170366004610312565b61018a565b005b61017561018536600461037b565b610287565b5f805482919081906101af9084906fffffffffffffffffffffffffffffffff1661039d565b92506101000a8154816fffffffffffffffffffffffffffffffff02191690836fffffffffffffffffffffffffffffffff1602179055508160020b8360020b8573ffffffffffffffffffffffffffffffffffffffff167f7a53080ba414158be7ec69b987b5fb7d07dee101fe85488f0853ae16239d0bde33855f5f604051610279949392919073ffffffffffffffffffffffffffffffffffffffff9490941684526fffffffffffffffffffffffffffffffff9290921660208401526040830152606082015260800190565b60405180910390a450505050565b6040805173ffffffffffffffffffffffffffffffffffffffff831681525f60208201527f98636036cb66a9c19a37435efc1e90142190214e8abeb821bdba3f2990dd4c95910160405180910390a150565b73ffffffffffffffffffffffffffffffffffffffff811681146102f9575f5ffd5b50565b8035600281900b811461030d575f5ffd5b919050565b5f5f5f5f60808587031215610325575f5ffd5b8435610330816102d8565b935061033e602086016102fc565b925061034c604086016102fc565b915060608501356fffffffffffffffffffffffffffffffff81168114610370575f5ffd5b939692955090935050565b5f6020828403121561038b575f5ffd5b8135610396816102d8565b9392505050565b6fffffffffffffffffffffffffffffffff81811683821601908111156103ea577f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b9291505056fea164736f6c634300081e000aa164736f6c634300081e000a /// ``` #[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\0)W_5`\xE0\x1C\x80c\xA1g\x12\x95\x14a\0-W[__\xFD[a\0G`\x04\x806\x03\x81\x01\x90a\0B\x91\x90a\x01\xF7V[a\0]V[`@Qa\0T\x91\x90a\x02VV[`@Q\x80\x91\x03\x90\xF3[___\x84s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x86s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x10a\0\x9AW\x84\x86a\0\x9DV[\x85\x85[\x91P\x91P_\x82\x82\x86`@Qa\0\xB1\x90a\x01TV[a\0\xBD\x93\x92\x91\x90a\x02~V[`@Q\x80\x91\x03\x90_\xF0\x80\x15\x80\x15a\0\xD6W=__>=_\xFD[P\x90P\x80\x93P\x84b\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\x84s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x7Fx<\xCA\x1C\x04\x12\xDD\ri^xEh\xC9m\xA2\xE9\xC2/\xF9\x895z.\x8B\x1D\x9B+Nkq\x18`\n\x88`@Qa\x01B\x92\x91\x90a\x02\xCEV[`@Q\x80\x91\x03\x90\xA4PPP\x93\x92PPPV[a\x07\xF3\x80a\x02\xF6\x839\x01\x90V[__\xFD[_s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x82\x16\x90P\x91\x90PV[_a\x01\x8E\x82a\x01eV[\x90P\x91\x90PV[a\x01\x9E\x81a\x01\x84V[\x81\x14a\x01\xA8W__\xFD[PV[_\x815\x90Pa\x01\xB9\x81a\x01\x95V[\x92\x91PPV[_b\xFF\xFF\xFF\x82\x16\x90P\x91\x90PV[a\x01\xD6\x81a\x01\xBFV[\x81\x14a\x01\xE0W__\xFD[PV[_\x815\x90Pa\x01\xF1\x81a\x01\xCDV[\x92\x91PPV[___``\x84\x86\x03\x12\x15a\x02\x0EWa\x02\ra\x01aV[[_a\x02\x1B\x86\x82\x87\x01a\x01\xABV[\x93PP` a\x02,\x86\x82\x87\x01a\x01\xABV[\x92PP`@a\x02=\x86\x82\x87\x01a\x01\xE3V[\x91PP\x92P\x92P\x92V[a\x02P\x81a\x01\x84V[\x82RPPV[_` \x82\x01\x90Pa\x02i_\x83\x01\x84a\x02GV[\x92\x91PPV[a\x02x\x81a\x01\xBFV[\x82RPPV[_``\x82\x01\x90Pa\x02\x91_\x83\x01\x86a\x02GV[a\x02\x9E` \x83\x01\x85a\x02GV[a\x02\xAB`@\x83\x01\x84a\x02oV[\x94\x93PPPPV[_\x81`\x02\x0B\x90P\x91\x90PV[a\x02\xC8\x81a\x02\xB3V[\x82RPPV[_`@\x82\x01\x90Pa\x02\xE1_\x83\x01\x85a\x02\xBFV[a\x02\xEE` \x83\x01\x84a\x02GV[\x93\x92PPPV\xFE`\xE0`@R4\x80\x15a\0\x0FW__\xFD[P`@Qa\x07\xF38\x03\x80a\x07\xF3\x839\x81\x81\x01`@R\x81\x01\x90a\x001\x91\x90a\x01IV[\x82s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16`\x80\x81s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x81RPP\x81s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16`\xA0\x81s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x81RPP\x80b\xFF\xFF\xFF\x16`\xC0\x81b\xFF\xFF\xFF\x16\x81RPPPPPa\x01\x99V[__\xFD[_s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x82\x16\x90P\x91\x90PV[_a\0\xE0\x82a\0\xB7V[\x90P\x91\x90PV[a\0\xF0\x81a\0\xD6V[\x81\x14a\0\xFAW__\xFD[PV[_\x81Q\x90Pa\x01\x0B\x81a\0\xE7V[\x92\x91PPV[_b\xFF\xFF\xFF\x82\x16\x90P\x91\x90PV[a\x01(\x81a\x01\x11V[\x81\x14a\x012W__\xFD[PV[_\x81Q\x90Pa\x01C\x81a\x01\x1FV[\x92\x91PPV[___``\x84\x86\x03\x12\x15a\x01`Wa\x01_a\0\xB3V[[_a\x01m\x86\x82\x87\x01a\0\xFDV[\x93PP` a\x01~\x86\x82\x87\x01a\0\xFDV[\x92PP`@a\x01\x8F\x86\x82\x87\x01a\x015V[\x91PP\x92P\x92P\x92V[`\x80Q`\xA0Q`\xC0Qa\x060a\x01\xC3_9_a\x01~\x01R_a\x01Z\x01R_a\x01\x16\x01Ra\x060_\xF3\xFE`\x80`@R4\x80\x15a\0\x0FW__\xFD[P`\x046\x10a\0`W_5`\xE0\x1C\x80c\r\xFE\x16\x81\x14a\0dW\x80c\x1Ahe\x02\x14a\0\x82W\x80c\xD2\x12 \xA7\x14a\0\xA0W\x80c\xDD\xCA?C\x14a\0\xBEW\x80c\xEF\xE2\x7F\xA3\x14a\0\xDCW\x80c\xF67s\x1D\x14a\0\xF8W[__\xFD[a\0la\x01\x14V[`@Qa\0y\x91\x90a\x02\xDEV[`@Q\x80\x91\x03\x90\xF3[a\0\x8Aa\x018V[`@Qa\0\x97\x91\x90a\x03!V[`@Q\x80\x91\x03\x90\xF3[a\0\xA8a\x01XV[`@Qa\0\xB5\x91\x90a\x02\xDEV[`@Q\x80\x91\x03\x90\xF3[a\0\xC6a\x01|V[`@Qa\0\xD3\x91\x90a\x03WV[`@Q\x80\x91\x03\x90\xF3[a\0\xF6`\x04\x806\x03\x81\x01\x90a\0\xF1\x91\x90a\x03\xFEV[a\x01\xA0V[\0[a\x01\x12`\x04\x806\x03\x81\x01\x90a\x01\r\x91\x90a\x04\x8CV[a\x02cV[\0[\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\x81V[__\x90T\x90a\x01\0\n\x90\x04o\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x81V[\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\x81V[\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\x81V[\x80__\x82\x82\x82\x90T\x90a\x01\0\n\x90\x04o\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16a\x01\xCB\x91\x90a\x04\xE4V[\x92Pa\x01\0\n\x81T\x81o\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x02\x19\x16\x90\x83o\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x02\x17\x90UP\x81`\x02\x0B\x83`\x02\x0B\x85s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x7FzS\x08\x0B\xA4\x14\x15\x8B\xE7\xECi\xB9\x87\xB5\xFB}\x07\xDE\xE1\x01\xFE\x85H\x8F\x08S\xAE\x16#\x9D\x0B\xDE3\x85__`@Qa\x02U\x94\x93\x92\x91\x90a\x05rV[`@Q\x80\x91\x03\x90\xA4PPPPV[\x7F\x98c`6\xCBf\xA9\xC1\x9A7C^\xFC\x1E\x90\x14!\x90!N\x8A\xBE\xB8!\xBD\xBA?)\x90\xDDL\x95\x81_`@Qa\x02\x94\x92\x91\x90a\x05\xD3V[`@Q\x80\x91\x03\x90\xA1PV[_s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x82\x16\x90P\x91\x90PV[_a\x02\xC8\x82a\x02\x9FV[\x90P\x91\x90PV[a\x02\xD8\x81a\x02\xBEV[\x82RPPV[_` \x82\x01\x90Pa\x02\xF1_\x83\x01\x84a\x02\xCFV[\x92\x91PPV[_o\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x82\x16\x90P\x91\x90PV[a\x03\x1B\x81a\x02\xF7V[\x82RPPV[_` \x82\x01\x90Pa\x034_\x83\x01\x84a\x03\x12V[\x92\x91PPV[_b\xFF\xFF\xFF\x82\x16\x90P\x91\x90PV[a\x03Q\x81a\x03:V[\x82RPPV[_` \x82\x01\x90Pa\x03j_\x83\x01\x84a\x03HV[\x92\x91PPV[__\xFD[a\x03}\x81a\x02\xBEV[\x81\x14a\x03\x87W__\xFD[PV[_\x815\x90Pa\x03\x98\x81a\x03tV[\x92\x91PPV[_\x81`\x02\x0B\x90P\x91\x90PV[a\x03\xB3\x81a\x03\x9EV[\x81\x14a\x03\xBDW__\xFD[PV[_\x815\x90Pa\x03\xCE\x81a\x03\xAAV[\x92\x91PPV[a\x03\xDD\x81a\x02\xF7V[\x81\x14a\x03\xE7W__\xFD[PV[_\x815\x90Pa\x03\xF8\x81a\x03\xD4V[\x92\x91PPV[____`\x80\x85\x87\x03\x12\x15a\x04\x16Wa\x04\x15a\x03pV[[_a\x04#\x87\x82\x88\x01a\x03\x8AV[\x94PP` a\x044\x87\x82\x88\x01a\x03\xC0V[\x93PP`@a\x04E\x87\x82\x88\x01a\x03\xC0V[\x92PP``a\x04V\x87\x82\x88\x01a\x03\xEAV[\x91PP\x92\x95\x91\x94P\x92PV[a\x04k\x81a\x02\x9FV[\x81\x14a\x04uW__\xFD[PV[_\x815\x90Pa\x04\x86\x81a\x04bV[\x92\x91PPV[_` \x82\x84\x03\x12\x15a\x04\xA1Wa\x04\xA0a\x03pV[[_a\x04\xAE\x84\x82\x85\x01a\x04xV[\x91PP\x92\x91PPV[\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\x04\xEE\x82a\x02\xF7V[\x91Pa\x04\xF9\x83a\x02\xF7V[\x92P\x82\x82\x01\x90Po\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x11\x15a\x05!Wa\x05 a\x04\xB7V[[\x92\x91PPV[_\x81\x90P\x91\x90PV[_\x81\x90P\x91\x90PV[_\x81\x90P\x91\x90PV[_a\x05\\a\x05Wa\x05R\x84a\x05'V[a\x059V[a\x050V[\x90P\x91\x90PV[a\x05l\x81a\x05BV[\x82RPPV[_`\x80\x82\x01\x90Pa\x05\x85_\x83\x01\x87a\x02\xCFV[a\x05\x92` \x83\x01\x86a\x03\x12V[a\x05\x9F`@\x83\x01\x85a\x05cV[a\x05\xAC``\x83\x01\x84a\x05cV[\x95\x94PPPPPV[a\x05\xBE\x81a\x02\x9FV[\x82RPPV[a\x05\xCD\x81a\x03\x9EV[\x82RPPV[_`@\x82\x01\x90Pa\x05\xE6_\x83\x01\x85a\x05\xB5V[a\x05\xF3` \x83\x01\x84a\x05\xC4V[\x93\x92PPPV\xFE\xA2dipfsX\"\x12 \xEDc\xFE\x89\x0F\x98\x16\x85j\xE5\xC5\xB0Y\x06L\x95\x93\x13(\xB3\xA4\xD4\xE0_\xC3\x90\xC0/\x87$\x95\xF2dsolcC\0\x08\x1E\x003\xA2dipfsX\"\x12 S\xDA8\x87\x98x6\xAD\xFDW}\x8Em\x98\xA2ffk\xFA*\x18\x03\x050\n\xAE\x19\xDB\xB8\xCDIOdsolcC\0\x08\x1E\x003", + b"`\x80`@R4\x80\x15a\0\x0FW__\xFD[P`\x046\x10a\0)W_5`\xE0\x1C\x80c\xA1g\x12\x95\x14a\0-W[__\xFD[a\0@a\0;6`\x04a\x01\xABV[a\0iV[`@Qs\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x90\x91\x16\x81R` \x01`@Q\x80\x91\x03\x90\xF3[___\x84s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x86s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x10a\0\xA6W\x84\x86a\0\xA9V[\x85\x85[\x91P\x91P_\x82\x82\x86`@Qa\0\xBD\x90a\x01vV[s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x93\x84\x16\x81R\x92\x90\x91\x16` \x83\x01Rb\xFF\xFF\xFF\x16`@\x82\x01R``\x01`@Q\x80\x91\x03\x90_\xF0\x80\x15\x80\x15a\x01\x06W=__>=_\xFD[P`@\x80Q`\n\x81Rs\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x80\x84\x16` \x83\x01R\x92\x96P\x86\x93Pb\xFF\xFF\xFF\x88\x16\x92\x80\x86\x16\x92\x90\x87\x16\x91\x7Fx<\xCA\x1C\x04\x12\xDD\ri^xEh\xC9m\xA2\xE9\xC2/\xF9\x895z.\x8B\x1D\x9B+Nkq\x18\x91\x01`@Q\x80\x91\x03\x90\xA4PPP\x93\x92PPPV[a\x04\xDA\x80a\x01\xF7\x839\x01\x90V[\x805s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x16\x81\x14a\x01\xA6W__\xFD[\x91\x90PV[___``\x84\x86\x03\x12\x15a\x01\xBDW__\xFD[a\x01\xC6\x84a\x01\x83V[\x92Pa\x01\xD4` \x85\x01a\x01\x83V[\x91P`@\x84\x015b\xFF\xFF\xFF\x81\x16\x81\x14a\x01\xEBW__\xFD[\x80\x91PP\x92P\x92P\x92V\xFE`\xE0`@R4\x80\x15a\0\x0FW__\xFD[P`@Qa\x04\xDA8\x03\x80a\x04\xDA\x839\x81\x01`@\x81\x90Ra\0.\x91a\0iV[`\x01`\x01`\xA0\x1B\x03\x92\x83\x16`\x80R\x91\x16`\xA0Rb\xFF\xFF\xFF\x16`\xC0Ra\0\xB4V[\x80Q`\x01`\x01`\xA0\x1B\x03\x81\x16\x81\x14a\0dW__\xFD[\x91\x90PV[___``\x84\x86\x03\x12\x15a\0{W__\xFD[a\0\x84\x84a\0NV[\x92Pa\0\x92` \x85\x01a\0NV[\x91P`@\x84\x01Qb\xFF\xFF\xFF\x81\x16\x81\x14a\0\xA9W__\xFD[\x80\x91PP\x92P\x92P\x92V[`\x80Q`\xA0Q`\xC0Qa\x03\xFDa\0\xDD_9_a\x01,\x01R_a\x01\x05\x01R_`x\x01Ra\x03\xFD_\xF3\xFE`\x80`@R4\x80\x15a\0\x0FW__\xFD[P`\x046\x10a\0oW_5`\xE0\x1C\x80c\xDD\xCA?C\x11a\0MW\x80c\xDD\xCA?C\x14a\x01'W\x80c\xEF\xE2\x7F\xA3\x14a\x01bW\x80c\xF67s\x1D\x14a\x01wW__\xFD[\x80c\r\xFE\x16\x81\x14a\0sW\x80c\x1Ahe\x02\x14a\0\xC4W\x80c\xD2\x12 \xA7\x14a\x01\0W[__\xFD[a\0\x9A\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\x81V[`@Qs\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x90\x91\x16\x81R` \x01[`@Q\x80\x91\x03\x90\xF3[_Ta\0\xDF\x90o\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x81V[`@Qo\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x90\x91\x16\x81R` \x01a\0\xBBV[a\0\x9A\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\x81V[a\x01N\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\x81V[`@Qb\xFF\xFF\xFF\x90\x91\x16\x81R` \x01a\0\xBBV[a\x01ua\x01p6`\x04a\x03\x12V[a\x01\x8AV[\0[a\x01ua\x01\x856`\x04a\x03{V[a\x02\x87V[_\x80T\x82\x91\x90\x81\x90a\x01\xAF\x90\x84\x90o\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16a\x03\x9DV[\x92Pa\x01\0\n\x81T\x81o\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x02\x19\x16\x90\x83o\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x02\x17\x90UP\x81`\x02\x0B\x83`\x02\x0B\x85s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x7FzS\x08\x0B\xA4\x14\x15\x8B\xE7\xECi\xB9\x87\xB5\xFB}\x07\xDE\xE1\x01\xFE\x85H\x8F\x08S\xAE\x16#\x9D\x0B\xDE3\x85__`@Qa\x02y\x94\x93\x92\x91\x90s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x94\x90\x94\x16\x84Ro\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x92\x90\x92\x16` \x84\x01R`@\x83\x01R``\x82\x01R`\x80\x01\x90V[`@Q\x80\x91\x03\x90\xA4PPPPV[`@\x80Qs\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x83\x16\x81R_` \x82\x01R\x7F\x98c`6\xCBf\xA9\xC1\x9A7C^\xFC\x1E\x90\x14!\x90!N\x8A\xBE\xB8!\xBD\xBA?)\x90\xDDL\x95\x91\x01`@Q\x80\x91\x03\x90\xA1PV[s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x16\x81\x14a\x02\xF9W__\xFD[PV[\x805`\x02\x81\x90\x0B\x81\x14a\x03\rW__\xFD[\x91\x90PV[____`\x80\x85\x87\x03\x12\x15a\x03%W__\xFD[\x845a\x030\x81a\x02\xD8V[\x93Pa\x03>` \x86\x01a\x02\xFCV[\x92Pa\x03L`@\x86\x01a\x02\xFCV[\x91P``\x85\x015o\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x16\x81\x14a\x03pW__\xFD[\x93\x96\x92\x95P\x90\x93PPV[_` \x82\x84\x03\x12\x15a\x03\x8BW__\xFD[\x815a\x03\x96\x81a\x02\xD8V[\x93\x92PPPV[o\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x81\x16\x83\x82\x16\x01\x90\x81\x11\x15a\x03\xEAW\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[\x92\x91PPV\xFE\xA1dsolcC\0\x08\x1E\0\n\xA1dsolcC\0\x08\x1E\0\n", ); #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Event with signature `PoolCreated(address,address,uint24,int24,address)` and selector `0x783cca1c0412dd0d695e784568c96da2e9c22ff989357a2e8b1d9b2b4e6b7118`. diff --git a/contracts/generated/contracts-generated/mockuniswapv3pool/src/lib.rs b/contracts/generated/contracts-generated/mockuniswapv3pool/src/lib.rs index eb3f2808c8..7e3c0e725b 100644 --- a/contracts/generated/contracts-generated/mockuniswapv3pool/src/lib.rs +++ b/contracts/generated/contracts-generated/mockuniswapv3pool/src/lib.rs @@ -224,22 +224,22 @@ pub mod MockUniswapV3Pool { /// The creation / init bytecode of the contract. /// /// ```text - ///0x60e060405234801561000f575f5ffd5b506040516107f33803806107f383398181016040528101906100319190610149565b8273ffffffffffffffffffffffffffffffffffffffff1660808173ffffffffffffffffffffffffffffffffffffffff16815250508173ffffffffffffffffffffffffffffffffffffffff1660a08173ffffffffffffffffffffffffffffffffffffffff16815250508062ffffff1660c08162ffffff1681525050505050610199565b5f5ffd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f6100e0826100b7565b9050919050565b6100f0816100d6565b81146100fa575f5ffd5b50565b5f8151905061010b816100e7565b92915050565b5f62ffffff82169050919050565b61012881610111565b8114610132575f5ffd5b50565b5f815190506101438161011f565b92915050565b5f5f5f606084860312156101605761015f6100b3565b5b5f61016d868287016100fd565b935050602061017e868287016100fd565b925050604061018f86828701610135565b9150509250925092565b60805160a05160c0516106306101c35f395f61017e01525f61015a01525f61011601526106305ff3fe608060405234801561000f575f5ffd5b5060043610610060575f3560e01c80630dfe1681146100645780631a68650214610082578063d21220a7146100a0578063ddca3f43146100be578063efe27fa3146100dc578063f637731d146100f8575b5f5ffd5b61006c610114565b60405161007991906102de565b60405180910390f35b61008a610138565b6040516100979190610321565b60405180910390f35b6100a8610158565b6040516100b591906102de565b60405180910390f35b6100c661017c565b6040516100d39190610357565b60405180910390f35b6100f660048036038101906100f191906103fe565b6101a0565b005b610112600480360381019061010d919061048c565b610263565b005b7f000000000000000000000000000000000000000000000000000000000000000081565b5f5f9054906101000a90046fffffffffffffffffffffffffffffffff1681565b7f000000000000000000000000000000000000000000000000000000000000000081565b7f000000000000000000000000000000000000000000000000000000000000000081565b805f5f8282829054906101000a90046fffffffffffffffffffffffffffffffff166101cb91906104e4565b92506101000a8154816fffffffffffffffffffffffffffffffff02191690836fffffffffffffffffffffffffffffffff1602179055508160020b8360020b8573ffffffffffffffffffffffffffffffffffffffff167f7a53080ba414158be7ec69b987b5fb7d07dee101fe85488f0853ae16239d0bde33855f5f6040516102559493929190610572565b60405180910390a450505050565b7f98636036cb66a9c19a37435efc1e90142190214e8abeb821bdba3f2990dd4c95815f6040516102949291906105d3565b60405180910390a150565b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f6102c88261029f565b9050919050565b6102d8816102be565b82525050565b5f6020820190506102f15f8301846102cf565b92915050565b5f6fffffffffffffffffffffffffffffffff82169050919050565b61031b816102f7565b82525050565b5f6020820190506103345f830184610312565b92915050565b5f62ffffff82169050919050565b6103518161033a565b82525050565b5f60208201905061036a5f830184610348565b92915050565b5f5ffd5b61037d816102be565b8114610387575f5ffd5b50565b5f8135905061039881610374565b92915050565b5f8160020b9050919050565b6103b38161039e565b81146103bd575f5ffd5b50565b5f813590506103ce816103aa565b92915050565b6103dd816102f7565b81146103e7575f5ffd5b50565b5f813590506103f8816103d4565b92915050565b5f5f5f5f6080858703121561041657610415610370565b5b5f6104238782880161038a565b9450506020610434878288016103c0565b9350506040610445878288016103c0565b9250506060610456878288016103ea565b91505092959194509250565b61046b8161029f565b8114610475575f5ffd5b50565b5f8135905061048681610462565b92915050565b5f602082840312156104a1576104a0610370565b5b5f6104ae84828501610478565b91505092915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f6104ee826102f7565b91506104f9836102f7565b925082820190506fffffffffffffffffffffffffffffffff811115610521576105206104b7565b5b92915050565b5f819050919050565b5f819050919050565b5f819050919050565b5f61055c61055761055284610527565b610539565b610530565b9050919050565b61056c81610542565b82525050565b5f6080820190506105855f8301876102cf565b6105926020830186610312565b61059f6040830185610563565b6105ac6060830184610563565b95945050505050565b6105be8161029f565b82525050565b6105cd8161039e565b82525050565b5f6040820190506105e65f8301856105b5565b6105f360208301846105c4565b939250505056fea2646970667358221220ed63fe890f9816856ae5c5b059064c95931328b3a4d4e05fc390c02f872495f264736f6c634300081e0033 + ///0x60e060405234801561000f575f5ffd5b506040516104da3803806104da83398101604081905261002e91610069565b6001600160a01b03928316608052911660a05262ffffff1660c0526100b4565b80516001600160a01b0381168114610064575f5ffd5b919050565b5f5f5f6060848603121561007b575f5ffd5b6100848461004e565b92506100926020850161004e565b9150604084015162ffffff811681146100a9575f5ffd5b809150509250925092565b60805160a05160c0516103fd6100dd5f395f61012c01525f61010501525f607801526103fd5ff3fe608060405234801561000f575f5ffd5b506004361061006f575f3560e01c8063ddca3f431161004d578063ddca3f4314610127578063efe27fa314610162578063f637731d14610177575f5ffd5b80630dfe1681146100735780631a686502146100c4578063d21220a714610100575b5f5ffd5b61009a7f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020015b60405180910390f35b5f546100df906fffffffffffffffffffffffffffffffff1681565b6040516fffffffffffffffffffffffffffffffff90911681526020016100bb565b61009a7f000000000000000000000000000000000000000000000000000000000000000081565b61014e7f000000000000000000000000000000000000000000000000000000000000000081565b60405162ffffff90911681526020016100bb565b610175610170366004610312565b61018a565b005b61017561018536600461037b565b610287565b5f805482919081906101af9084906fffffffffffffffffffffffffffffffff1661039d565b92506101000a8154816fffffffffffffffffffffffffffffffff02191690836fffffffffffffffffffffffffffffffff1602179055508160020b8360020b8573ffffffffffffffffffffffffffffffffffffffff167f7a53080ba414158be7ec69b987b5fb7d07dee101fe85488f0853ae16239d0bde33855f5f604051610279949392919073ffffffffffffffffffffffffffffffffffffffff9490941684526fffffffffffffffffffffffffffffffff9290921660208401526040830152606082015260800190565b60405180910390a450505050565b6040805173ffffffffffffffffffffffffffffffffffffffff831681525f60208201527f98636036cb66a9c19a37435efc1e90142190214e8abeb821bdba3f2990dd4c95910160405180910390a150565b73ffffffffffffffffffffffffffffffffffffffff811681146102f9575f5ffd5b50565b8035600281900b811461030d575f5ffd5b919050565b5f5f5f5f60808587031215610325575f5ffd5b8435610330816102d8565b935061033e602086016102fc565b925061034c604086016102fc565b915060608501356fffffffffffffffffffffffffffffffff81168114610370575f5ffd5b939692955090935050565b5f6020828403121561038b575f5ffd5b8135610396816102d8565b9392505050565b6fffffffffffffffffffffffffffffffff81811683821601908111156103ea577f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b9291505056fea164736f6c634300081e000a /// ``` #[rustfmt::skip] #[allow(clippy::all)] pub static BYTECODE: alloy_sol_types::private::Bytes = alloy_sol_types::private::Bytes::from_static( - b"`\xE0`@R4\x80\x15a\0\x0FW__\xFD[P`@Qa\x07\xF38\x03\x80a\x07\xF3\x839\x81\x81\x01`@R\x81\x01\x90a\x001\x91\x90a\x01IV[\x82s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16`\x80\x81s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x81RPP\x81s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16`\xA0\x81s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x81RPP\x80b\xFF\xFF\xFF\x16`\xC0\x81b\xFF\xFF\xFF\x16\x81RPPPPPa\x01\x99V[__\xFD[_s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x82\x16\x90P\x91\x90PV[_a\0\xE0\x82a\0\xB7V[\x90P\x91\x90PV[a\0\xF0\x81a\0\xD6V[\x81\x14a\0\xFAW__\xFD[PV[_\x81Q\x90Pa\x01\x0B\x81a\0\xE7V[\x92\x91PPV[_b\xFF\xFF\xFF\x82\x16\x90P\x91\x90PV[a\x01(\x81a\x01\x11V[\x81\x14a\x012W__\xFD[PV[_\x81Q\x90Pa\x01C\x81a\x01\x1FV[\x92\x91PPV[___``\x84\x86\x03\x12\x15a\x01`Wa\x01_a\0\xB3V[[_a\x01m\x86\x82\x87\x01a\0\xFDV[\x93PP` a\x01~\x86\x82\x87\x01a\0\xFDV[\x92PP`@a\x01\x8F\x86\x82\x87\x01a\x015V[\x91PP\x92P\x92P\x92V[`\x80Q`\xA0Q`\xC0Qa\x060a\x01\xC3_9_a\x01~\x01R_a\x01Z\x01R_a\x01\x16\x01Ra\x060_\xF3\xFE`\x80`@R4\x80\x15a\0\x0FW__\xFD[P`\x046\x10a\0`W_5`\xE0\x1C\x80c\r\xFE\x16\x81\x14a\0dW\x80c\x1Ahe\x02\x14a\0\x82W\x80c\xD2\x12 \xA7\x14a\0\xA0W\x80c\xDD\xCA?C\x14a\0\xBEW\x80c\xEF\xE2\x7F\xA3\x14a\0\xDCW\x80c\xF67s\x1D\x14a\0\xF8W[__\xFD[a\0la\x01\x14V[`@Qa\0y\x91\x90a\x02\xDEV[`@Q\x80\x91\x03\x90\xF3[a\0\x8Aa\x018V[`@Qa\0\x97\x91\x90a\x03!V[`@Q\x80\x91\x03\x90\xF3[a\0\xA8a\x01XV[`@Qa\0\xB5\x91\x90a\x02\xDEV[`@Q\x80\x91\x03\x90\xF3[a\0\xC6a\x01|V[`@Qa\0\xD3\x91\x90a\x03WV[`@Q\x80\x91\x03\x90\xF3[a\0\xF6`\x04\x806\x03\x81\x01\x90a\0\xF1\x91\x90a\x03\xFEV[a\x01\xA0V[\0[a\x01\x12`\x04\x806\x03\x81\x01\x90a\x01\r\x91\x90a\x04\x8CV[a\x02cV[\0[\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\x81V[__\x90T\x90a\x01\0\n\x90\x04o\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x81V[\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\x81V[\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\x81V[\x80__\x82\x82\x82\x90T\x90a\x01\0\n\x90\x04o\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16a\x01\xCB\x91\x90a\x04\xE4V[\x92Pa\x01\0\n\x81T\x81o\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x02\x19\x16\x90\x83o\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x02\x17\x90UP\x81`\x02\x0B\x83`\x02\x0B\x85s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x7FzS\x08\x0B\xA4\x14\x15\x8B\xE7\xECi\xB9\x87\xB5\xFB}\x07\xDE\xE1\x01\xFE\x85H\x8F\x08S\xAE\x16#\x9D\x0B\xDE3\x85__`@Qa\x02U\x94\x93\x92\x91\x90a\x05rV[`@Q\x80\x91\x03\x90\xA4PPPPV[\x7F\x98c`6\xCBf\xA9\xC1\x9A7C^\xFC\x1E\x90\x14!\x90!N\x8A\xBE\xB8!\xBD\xBA?)\x90\xDDL\x95\x81_`@Qa\x02\x94\x92\x91\x90a\x05\xD3V[`@Q\x80\x91\x03\x90\xA1PV[_s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x82\x16\x90P\x91\x90PV[_a\x02\xC8\x82a\x02\x9FV[\x90P\x91\x90PV[a\x02\xD8\x81a\x02\xBEV[\x82RPPV[_` \x82\x01\x90Pa\x02\xF1_\x83\x01\x84a\x02\xCFV[\x92\x91PPV[_o\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x82\x16\x90P\x91\x90PV[a\x03\x1B\x81a\x02\xF7V[\x82RPPV[_` \x82\x01\x90Pa\x034_\x83\x01\x84a\x03\x12V[\x92\x91PPV[_b\xFF\xFF\xFF\x82\x16\x90P\x91\x90PV[a\x03Q\x81a\x03:V[\x82RPPV[_` \x82\x01\x90Pa\x03j_\x83\x01\x84a\x03HV[\x92\x91PPV[__\xFD[a\x03}\x81a\x02\xBEV[\x81\x14a\x03\x87W__\xFD[PV[_\x815\x90Pa\x03\x98\x81a\x03tV[\x92\x91PPV[_\x81`\x02\x0B\x90P\x91\x90PV[a\x03\xB3\x81a\x03\x9EV[\x81\x14a\x03\xBDW__\xFD[PV[_\x815\x90Pa\x03\xCE\x81a\x03\xAAV[\x92\x91PPV[a\x03\xDD\x81a\x02\xF7V[\x81\x14a\x03\xE7W__\xFD[PV[_\x815\x90Pa\x03\xF8\x81a\x03\xD4V[\x92\x91PPV[____`\x80\x85\x87\x03\x12\x15a\x04\x16Wa\x04\x15a\x03pV[[_a\x04#\x87\x82\x88\x01a\x03\x8AV[\x94PP` a\x044\x87\x82\x88\x01a\x03\xC0V[\x93PP`@a\x04E\x87\x82\x88\x01a\x03\xC0V[\x92PP``a\x04V\x87\x82\x88\x01a\x03\xEAV[\x91PP\x92\x95\x91\x94P\x92PV[a\x04k\x81a\x02\x9FV[\x81\x14a\x04uW__\xFD[PV[_\x815\x90Pa\x04\x86\x81a\x04bV[\x92\x91PPV[_` \x82\x84\x03\x12\x15a\x04\xA1Wa\x04\xA0a\x03pV[[_a\x04\xAE\x84\x82\x85\x01a\x04xV[\x91PP\x92\x91PPV[\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\x04\xEE\x82a\x02\xF7V[\x91Pa\x04\xF9\x83a\x02\xF7V[\x92P\x82\x82\x01\x90Po\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x11\x15a\x05!Wa\x05 a\x04\xB7V[[\x92\x91PPV[_\x81\x90P\x91\x90PV[_\x81\x90P\x91\x90PV[_\x81\x90P\x91\x90PV[_a\x05\\a\x05Wa\x05R\x84a\x05'V[a\x059V[a\x050V[\x90P\x91\x90PV[a\x05l\x81a\x05BV[\x82RPPV[_`\x80\x82\x01\x90Pa\x05\x85_\x83\x01\x87a\x02\xCFV[a\x05\x92` \x83\x01\x86a\x03\x12V[a\x05\x9F`@\x83\x01\x85a\x05cV[a\x05\xAC``\x83\x01\x84a\x05cV[\x95\x94PPPPPV[a\x05\xBE\x81a\x02\x9FV[\x82RPPV[a\x05\xCD\x81a\x03\x9EV[\x82RPPV[_`@\x82\x01\x90Pa\x05\xE6_\x83\x01\x85a\x05\xB5V[a\x05\xF3` \x83\x01\x84a\x05\xC4V[\x93\x92PPPV\xFE\xA2dipfsX\"\x12 \xEDc\xFE\x89\x0F\x98\x16\x85j\xE5\xC5\xB0Y\x06L\x95\x93\x13(\xB3\xA4\xD4\xE0_\xC3\x90\xC0/\x87$\x95\xF2dsolcC\0\x08\x1E\x003", + b"`\xE0`@R4\x80\x15a\0\x0FW__\xFD[P`@Qa\x04\xDA8\x03\x80a\x04\xDA\x839\x81\x01`@\x81\x90Ra\0.\x91a\0iV[`\x01`\x01`\xA0\x1B\x03\x92\x83\x16`\x80R\x91\x16`\xA0Rb\xFF\xFF\xFF\x16`\xC0Ra\0\xB4V[\x80Q`\x01`\x01`\xA0\x1B\x03\x81\x16\x81\x14a\0dW__\xFD[\x91\x90PV[___``\x84\x86\x03\x12\x15a\0{W__\xFD[a\0\x84\x84a\0NV[\x92Pa\0\x92` \x85\x01a\0NV[\x91P`@\x84\x01Qb\xFF\xFF\xFF\x81\x16\x81\x14a\0\xA9W__\xFD[\x80\x91PP\x92P\x92P\x92V[`\x80Q`\xA0Q`\xC0Qa\x03\xFDa\0\xDD_9_a\x01,\x01R_a\x01\x05\x01R_`x\x01Ra\x03\xFD_\xF3\xFE`\x80`@R4\x80\x15a\0\x0FW__\xFD[P`\x046\x10a\0oW_5`\xE0\x1C\x80c\xDD\xCA?C\x11a\0MW\x80c\xDD\xCA?C\x14a\x01'W\x80c\xEF\xE2\x7F\xA3\x14a\x01bW\x80c\xF67s\x1D\x14a\x01wW__\xFD[\x80c\r\xFE\x16\x81\x14a\0sW\x80c\x1Ahe\x02\x14a\0\xC4W\x80c\xD2\x12 \xA7\x14a\x01\0W[__\xFD[a\0\x9A\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\x81V[`@Qs\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x90\x91\x16\x81R` \x01[`@Q\x80\x91\x03\x90\xF3[_Ta\0\xDF\x90o\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x81V[`@Qo\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x90\x91\x16\x81R` \x01a\0\xBBV[a\0\x9A\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\x81V[a\x01N\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\x81V[`@Qb\xFF\xFF\xFF\x90\x91\x16\x81R` \x01a\0\xBBV[a\x01ua\x01p6`\x04a\x03\x12V[a\x01\x8AV[\0[a\x01ua\x01\x856`\x04a\x03{V[a\x02\x87V[_\x80T\x82\x91\x90\x81\x90a\x01\xAF\x90\x84\x90o\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16a\x03\x9DV[\x92Pa\x01\0\n\x81T\x81o\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x02\x19\x16\x90\x83o\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x02\x17\x90UP\x81`\x02\x0B\x83`\x02\x0B\x85s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x7FzS\x08\x0B\xA4\x14\x15\x8B\xE7\xECi\xB9\x87\xB5\xFB}\x07\xDE\xE1\x01\xFE\x85H\x8F\x08S\xAE\x16#\x9D\x0B\xDE3\x85__`@Qa\x02y\x94\x93\x92\x91\x90s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x94\x90\x94\x16\x84Ro\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x92\x90\x92\x16` \x84\x01R`@\x83\x01R``\x82\x01R`\x80\x01\x90V[`@Q\x80\x91\x03\x90\xA4PPPPV[`@\x80Qs\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x83\x16\x81R_` \x82\x01R\x7F\x98c`6\xCBf\xA9\xC1\x9A7C^\xFC\x1E\x90\x14!\x90!N\x8A\xBE\xB8!\xBD\xBA?)\x90\xDDL\x95\x91\x01`@Q\x80\x91\x03\x90\xA1PV[s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x16\x81\x14a\x02\xF9W__\xFD[PV[\x805`\x02\x81\x90\x0B\x81\x14a\x03\rW__\xFD[\x91\x90PV[____`\x80\x85\x87\x03\x12\x15a\x03%W__\xFD[\x845a\x030\x81a\x02\xD8V[\x93Pa\x03>` \x86\x01a\x02\xFCV[\x92Pa\x03L`@\x86\x01a\x02\xFCV[\x91P``\x85\x015o\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x16\x81\x14a\x03pW__\xFD[\x93\x96\x92\x95P\x90\x93PPV[_` \x82\x84\x03\x12\x15a\x03\x8BW__\xFD[\x815a\x03\x96\x81a\x02\xD8V[\x93\x92PPPV[o\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x81\x16\x83\x82\x16\x01\x90\x81\x11\x15a\x03\xEAW\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[\x92\x91PPV\xFE\xA1dsolcC\0\x08\x1E\0\n", ); /// The runtime bytecode of the contract, as deployed on the network. /// /// ```text - ///0x608060405234801561000f575f5ffd5b5060043610610060575f3560e01c80630dfe1681146100645780631a68650214610082578063d21220a7146100a0578063ddca3f43146100be578063efe27fa3146100dc578063f637731d146100f8575b5f5ffd5b61006c610114565b60405161007991906102de565b60405180910390f35b61008a610138565b6040516100979190610321565b60405180910390f35b6100a8610158565b6040516100b591906102de565b60405180910390f35b6100c661017c565b6040516100d39190610357565b60405180910390f35b6100f660048036038101906100f191906103fe565b6101a0565b005b610112600480360381019061010d919061048c565b610263565b005b7f000000000000000000000000000000000000000000000000000000000000000081565b5f5f9054906101000a90046fffffffffffffffffffffffffffffffff1681565b7f000000000000000000000000000000000000000000000000000000000000000081565b7f000000000000000000000000000000000000000000000000000000000000000081565b805f5f8282829054906101000a90046fffffffffffffffffffffffffffffffff166101cb91906104e4565b92506101000a8154816fffffffffffffffffffffffffffffffff02191690836fffffffffffffffffffffffffffffffff1602179055508160020b8360020b8573ffffffffffffffffffffffffffffffffffffffff167f7a53080ba414158be7ec69b987b5fb7d07dee101fe85488f0853ae16239d0bde33855f5f6040516102559493929190610572565b60405180910390a450505050565b7f98636036cb66a9c19a37435efc1e90142190214e8abeb821bdba3f2990dd4c95815f6040516102949291906105d3565b60405180910390a150565b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f6102c88261029f565b9050919050565b6102d8816102be565b82525050565b5f6020820190506102f15f8301846102cf565b92915050565b5f6fffffffffffffffffffffffffffffffff82169050919050565b61031b816102f7565b82525050565b5f6020820190506103345f830184610312565b92915050565b5f62ffffff82169050919050565b6103518161033a565b82525050565b5f60208201905061036a5f830184610348565b92915050565b5f5ffd5b61037d816102be565b8114610387575f5ffd5b50565b5f8135905061039881610374565b92915050565b5f8160020b9050919050565b6103b38161039e565b81146103bd575f5ffd5b50565b5f813590506103ce816103aa565b92915050565b6103dd816102f7565b81146103e7575f5ffd5b50565b5f813590506103f8816103d4565b92915050565b5f5f5f5f6080858703121561041657610415610370565b5b5f6104238782880161038a565b9450506020610434878288016103c0565b9350506040610445878288016103c0565b9250506060610456878288016103ea565b91505092959194509250565b61046b8161029f565b8114610475575f5ffd5b50565b5f8135905061048681610462565b92915050565b5f602082840312156104a1576104a0610370565b5b5f6104ae84828501610478565b91505092915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f6104ee826102f7565b91506104f9836102f7565b925082820190506fffffffffffffffffffffffffffffffff811115610521576105206104b7565b5b92915050565b5f819050919050565b5f819050919050565b5f819050919050565b5f61055c61055761055284610527565b610539565b610530565b9050919050565b61056c81610542565b82525050565b5f6080820190506105855f8301876102cf565b6105926020830186610312565b61059f6040830185610563565b6105ac6060830184610563565b95945050505050565b6105be8161029f565b82525050565b6105cd8161039e565b82525050565b5f6040820190506105e65f8301856105b5565b6105f360208301846105c4565b939250505056fea2646970667358221220ed63fe890f9816856ae5c5b059064c95931328b3a4d4e05fc390c02f872495f264736f6c634300081e0033 + ///0x608060405234801561000f575f5ffd5b506004361061006f575f3560e01c8063ddca3f431161004d578063ddca3f4314610127578063efe27fa314610162578063f637731d14610177575f5ffd5b80630dfe1681146100735780631a686502146100c4578063d21220a714610100575b5f5ffd5b61009a7f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020015b60405180910390f35b5f546100df906fffffffffffffffffffffffffffffffff1681565b6040516fffffffffffffffffffffffffffffffff90911681526020016100bb565b61009a7f000000000000000000000000000000000000000000000000000000000000000081565b61014e7f000000000000000000000000000000000000000000000000000000000000000081565b60405162ffffff90911681526020016100bb565b610175610170366004610312565b61018a565b005b61017561018536600461037b565b610287565b5f805482919081906101af9084906fffffffffffffffffffffffffffffffff1661039d565b92506101000a8154816fffffffffffffffffffffffffffffffff02191690836fffffffffffffffffffffffffffffffff1602179055508160020b8360020b8573ffffffffffffffffffffffffffffffffffffffff167f7a53080ba414158be7ec69b987b5fb7d07dee101fe85488f0853ae16239d0bde33855f5f604051610279949392919073ffffffffffffffffffffffffffffffffffffffff9490941684526fffffffffffffffffffffffffffffffff9290921660208401526040830152606082015260800190565b60405180910390a450505050565b6040805173ffffffffffffffffffffffffffffffffffffffff831681525f60208201527f98636036cb66a9c19a37435efc1e90142190214e8abeb821bdba3f2990dd4c95910160405180910390a150565b73ffffffffffffffffffffffffffffffffffffffff811681146102f9575f5ffd5b50565b8035600281900b811461030d575f5ffd5b919050565b5f5f5f5f60808587031215610325575f5ffd5b8435610330816102d8565b935061033e602086016102fc565b925061034c604086016102fc565b915060608501356fffffffffffffffffffffffffffffffff81168114610370575f5ffd5b939692955090935050565b5f6020828403121561038b575f5ffd5b8135610396816102d8565b9392505050565b6fffffffffffffffffffffffffffffffff81811683821601908111156103ea577f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b9291505056fea164736f6c634300081e000a /// ``` #[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\0`W_5`\xE0\x1C\x80c\r\xFE\x16\x81\x14a\0dW\x80c\x1Ahe\x02\x14a\0\x82W\x80c\xD2\x12 \xA7\x14a\0\xA0W\x80c\xDD\xCA?C\x14a\0\xBEW\x80c\xEF\xE2\x7F\xA3\x14a\0\xDCW\x80c\xF67s\x1D\x14a\0\xF8W[__\xFD[a\0la\x01\x14V[`@Qa\0y\x91\x90a\x02\xDEV[`@Q\x80\x91\x03\x90\xF3[a\0\x8Aa\x018V[`@Qa\0\x97\x91\x90a\x03!V[`@Q\x80\x91\x03\x90\xF3[a\0\xA8a\x01XV[`@Qa\0\xB5\x91\x90a\x02\xDEV[`@Q\x80\x91\x03\x90\xF3[a\0\xC6a\x01|V[`@Qa\0\xD3\x91\x90a\x03WV[`@Q\x80\x91\x03\x90\xF3[a\0\xF6`\x04\x806\x03\x81\x01\x90a\0\xF1\x91\x90a\x03\xFEV[a\x01\xA0V[\0[a\x01\x12`\x04\x806\x03\x81\x01\x90a\x01\r\x91\x90a\x04\x8CV[a\x02cV[\0[\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\x81V[__\x90T\x90a\x01\0\n\x90\x04o\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x81V[\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\x81V[\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\x81V[\x80__\x82\x82\x82\x90T\x90a\x01\0\n\x90\x04o\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16a\x01\xCB\x91\x90a\x04\xE4V[\x92Pa\x01\0\n\x81T\x81o\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x02\x19\x16\x90\x83o\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x02\x17\x90UP\x81`\x02\x0B\x83`\x02\x0B\x85s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x7FzS\x08\x0B\xA4\x14\x15\x8B\xE7\xECi\xB9\x87\xB5\xFB}\x07\xDE\xE1\x01\xFE\x85H\x8F\x08S\xAE\x16#\x9D\x0B\xDE3\x85__`@Qa\x02U\x94\x93\x92\x91\x90a\x05rV[`@Q\x80\x91\x03\x90\xA4PPPPV[\x7F\x98c`6\xCBf\xA9\xC1\x9A7C^\xFC\x1E\x90\x14!\x90!N\x8A\xBE\xB8!\xBD\xBA?)\x90\xDDL\x95\x81_`@Qa\x02\x94\x92\x91\x90a\x05\xD3V[`@Q\x80\x91\x03\x90\xA1PV[_s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x82\x16\x90P\x91\x90PV[_a\x02\xC8\x82a\x02\x9FV[\x90P\x91\x90PV[a\x02\xD8\x81a\x02\xBEV[\x82RPPV[_` \x82\x01\x90Pa\x02\xF1_\x83\x01\x84a\x02\xCFV[\x92\x91PPV[_o\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x82\x16\x90P\x91\x90PV[a\x03\x1B\x81a\x02\xF7V[\x82RPPV[_` \x82\x01\x90Pa\x034_\x83\x01\x84a\x03\x12V[\x92\x91PPV[_b\xFF\xFF\xFF\x82\x16\x90P\x91\x90PV[a\x03Q\x81a\x03:V[\x82RPPV[_` \x82\x01\x90Pa\x03j_\x83\x01\x84a\x03HV[\x92\x91PPV[__\xFD[a\x03}\x81a\x02\xBEV[\x81\x14a\x03\x87W__\xFD[PV[_\x815\x90Pa\x03\x98\x81a\x03tV[\x92\x91PPV[_\x81`\x02\x0B\x90P\x91\x90PV[a\x03\xB3\x81a\x03\x9EV[\x81\x14a\x03\xBDW__\xFD[PV[_\x815\x90Pa\x03\xCE\x81a\x03\xAAV[\x92\x91PPV[a\x03\xDD\x81a\x02\xF7V[\x81\x14a\x03\xE7W__\xFD[PV[_\x815\x90Pa\x03\xF8\x81a\x03\xD4V[\x92\x91PPV[____`\x80\x85\x87\x03\x12\x15a\x04\x16Wa\x04\x15a\x03pV[[_a\x04#\x87\x82\x88\x01a\x03\x8AV[\x94PP` a\x044\x87\x82\x88\x01a\x03\xC0V[\x93PP`@a\x04E\x87\x82\x88\x01a\x03\xC0V[\x92PP``a\x04V\x87\x82\x88\x01a\x03\xEAV[\x91PP\x92\x95\x91\x94P\x92PV[a\x04k\x81a\x02\x9FV[\x81\x14a\x04uW__\xFD[PV[_\x815\x90Pa\x04\x86\x81a\x04bV[\x92\x91PPV[_` \x82\x84\x03\x12\x15a\x04\xA1Wa\x04\xA0a\x03pV[[_a\x04\xAE\x84\x82\x85\x01a\x04xV[\x91PP\x92\x91PPV[\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\x04\xEE\x82a\x02\xF7V[\x91Pa\x04\xF9\x83a\x02\xF7V[\x92P\x82\x82\x01\x90Po\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x11\x15a\x05!Wa\x05 a\x04\xB7V[[\x92\x91PPV[_\x81\x90P\x91\x90PV[_\x81\x90P\x91\x90PV[_\x81\x90P\x91\x90PV[_a\x05\\a\x05Wa\x05R\x84a\x05'V[a\x059V[a\x050V[\x90P\x91\x90PV[a\x05l\x81a\x05BV[\x82RPPV[_`\x80\x82\x01\x90Pa\x05\x85_\x83\x01\x87a\x02\xCFV[a\x05\x92` \x83\x01\x86a\x03\x12V[a\x05\x9F`@\x83\x01\x85a\x05cV[a\x05\xAC``\x83\x01\x84a\x05cV[\x95\x94PPPPPV[a\x05\xBE\x81a\x02\x9FV[\x82RPPV[a\x05\xCD\x81a\x03\x9EV[\x82RPPV[_`@\x82\x01\x90Pa\x05\xE6_\x83\x01\x85a\x05\xB5V[a\x05\xF3` \x83\x01\x84a\x05\xC4V[\x93\x92PPPV\xFE\xA2dipfsX\"\x12 \xEDc\xFE\x89\x0F\x98\x16\x85j\xE5\xC5\xB0Y\x06L\x95\x93\x13(\xB3\xA4\xD4\xE0_\xC3\x90\xC0/\x87$\x95\xF2dsolcC\0\x08\x1E\x003", + b"`\x80`@R4\x80\x15a\0\x0FW__\xFD[P`\x046\x10a\0oW_5`\xE0\x1C\x80c\xDD\xCA?C\x11a\0MW\x80c\xDD\xCA?C\x14a\x01'W\x80c\xEF\xE2\x7F\xA3\x14a\x01bW\x80c\xF67s\x1D\x14a\x01wW__\xFD[\x80c\r\xFE\x16\x81\x14a\0sW\x80c\x1Ahe\x02\x14a\0\xC4W\x80c\xD2\x12 \xA7\x14a\x01\0W[__\xFD[a\0\x9A\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\x81V[`@Qs\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x90\x91\x16\x81R` \x01[`@Q\x80\x91\x03\x90\xF3[_Ta\0\xDF\x90o\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x81V[`@Qo\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x90\x91\x16\x81R` \x01a\0\xBBV[a\0\x9A\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\x81V[a\x01N\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\x81V[`@Qb\xFF\xFF\xFF\x90\x91\x16\x81R` \x01a\0\xBBV[a\x01ua\x01p6`\x04a\x03\x12V[a\x01\x8AV[\0[a\x01ua\x01\x856`\x04a\x03{V[a\x02\x87V[_\x80T\x82\x91\x90\x81\x90a\x01\xAF\x90\x84\x90o\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16a\x03\x9DV[\x92Pa\x01\0\n\x81T\x81o\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x02\x19\x16\x90\x83o\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x02\x17\x90UP\x81`\x02\x0B\x83`\x02\x0B\x85s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x16\x7FzS\x08\x0B\xA4\x14\x15\x8B\xE7\xECi\xB9\x87\xB5\xFB}\x07\xDE\xE1\x01\xFE\x85H\x8F\x08S\xAE\x16#\x9D\x0B\xDE3\x85__`@Qa\x02y\x94\x93\x92\x91\x90s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x94\x90\x94\x16\x84Ro\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x92\x90\x92\x16` \x84\x01R`@\x83\x01R``\x82\x01R`\x80\x01\x90V[`@Q\x80\x91\x03\x90\xA4PPPPV[`@\x80Qs\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x83\x16\x81R_` \x82\x01R\x7F\x98c`6\xCBf\xA9\xC1\x9A7C^\xFC\x1E\x90\x14!\x90!N\x8A\xBE\xB8!\xBD\xBA?)\x90\xDDL\x95\x91\x01`@Q\x80\x91\x03\x90\xA1PV[s\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x16\x81\x14a\x02\xF9W__\xFD[PV[\x805`\x02\x81\x90\x0B\x81\x14a\x03\rW__\xFD[\x91\x90PV[____`\x80\x85\x87\x03\x12\x15a\x03%W__\xFD[\x845a\x030\x81a\x02\xD8V[\x93Pa\x03>` \x86\x01a\x02\xFCV[\x92Pa\x03L`@\x86\x01a\x02\xFCV[\x91P``\x85\x015o\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x16\x81\x14a\x03pW__\xFD[\x93\x96\x92\x95P\x90\x93PPV[_` \x82\x84\x03\x12\x15a\x03\x8BW__\xFD[\x815a\x03\x96\x81a\x02\xD8V[\x93\x92PPPV[o\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x81\x81\x16\x83\x82\x16\x01\x90\x81\x11\x15a\x03\xEAW\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[\x92\x91PPV\xFE\xA1dsolcC\0\x08\x1E\0\n", ); #[derive(Default, Debug, PartialEq, Eq, Hash)] /**Event with signature `Initialize(uint160,int24)` and selector `0x98636036cb66a9c19a37435efc1e90142190214e8abeb821bdba3f2990dd4c95`. From 97f0fa10dbb1a0c195f027730b77d4b87de92c10 Mon Sep 17 00:00:00 2001 From: Jan P Date: Wed, 22 Apr 2026 07:41:01 +0200 Subject: [PATCH 24/80] Roll back .gitignore --- .gitignore | 5 ----- 1 file changed, 5 deletions(-) diff --git a/.gitignore b/.gitignore index 25be2aa5eb..b86a4933ba 100644 --- a/.gitignore +++ b/.gitignore @@ -6,8 +6,3 @@ **/testing.*.toml /playground/.env .env.claude - -crates/pool-indexer/config.mainnet.toml -crates/pool-indexer/config.local.toml -crates/pool-indexer/frontend/node_modules/ -crates/pool-indexer/compare_subgraph.sh From c877147d9f972d48b048729d9098c339ab032ea6 Mon Sep 17 00:00:00 2001 From: Jan P Date: Wed, 22 Apr 2026 07:59:39 +0200 Subject: [PATCH 25/80] Delete package.lock --- crates/pool-indexer/package-lock.json | 6 ------ 1 file changed, 6 deletions(-) delete mode 100644 crates/pool-indexer/package-lock.json diff --git a/crates/pool-indexer/package-lock.json b/crates/pool-indexer/package-lock.json deleted file mode 100644 index 73d0d7f2de..0000000000 --- a/crates/pool-indexer/package-lock.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "name": "pool-indexer", - "lockfileVersion": 3, - "requires": true, - "packages": {} -} From 8268ccc80d86b5187d641bc4b309e26ca21aa456 Mon Sep 17 00:00:00 2001 From: Jan P Date: Wed, 22 Apr 2026 12:50:13 +0200 Subject: [PATCH 26/80] Claude review feedback --- crates/database/src/lib.rs | 4 + crates/driver/src/infra/config/file/mod.rs | 2 +- crates/e2e/tests/e2e/pool_indexer.rs | 14 +- .../pool-indexer/src/api/uniswap_v3/pools.rs | 48 +----- crates/pool-indexer/src/cold_seeder.rs | 22 ++- crates/pool-indexer/src/config.rs | 21 ++- crates/pool-indexer/src/db/uniswap_v3.rs | 163 +++++++----------- crates/pool-indexer/src/indexer/uniswap_v3.rs | 19 +- crates/pool-indexer/src/run.rs | 24 ++- .../sql/V110__pool_indexer_uniswap_v3.sql | 2 +- 10 files changed, 147 insertions(+), 172 deletions(-) diff --git a/crates/database/src/lib.rs b/crates/database/src/lib.rs index 97dad43556..95f9b74d0f 100644 --- a/crates/database/src/lib.rs +++ b/crates/database/src/lib.rs @@ -62,6 +62,7 @@ pub const TABLES: &[&str] = &[ "last_indexed_blocks", "onchain_order_invalidations", "onchain_placed_orders", + "pool_indexer_checkpoints", "presignature_events", "proposed_jit_orders", "quotes", @@ -71,6 +72,8 @@ pub const TABLES: &[&str] = &[ "solver_competitions", "surplus_capturing_jit_order_owners", "trades", + "uniswap_v3_pool_states", + "uniswap_v3_pools", ]; /// The names of potentially big volume tables we use in the db. @@ -85,6 +88,7 @@ pub const LARGE_TABLES: &[&str] = &[ "order_quotes", "proposed_solutions", "proposed_trade_executions", + "uniswap_v3_ticks", ]; pub fn all_tables() -> impl Iterator { diff --git a/crates/driver/src/infra/config/file/mod.rs b/crates/driver/src/infra/config/file/mod.rs index ad9f8af5c3..48a3171853 100644 --- a/crates/driver/src/infra/config/file/mod.rs +++ b/crates/driver/src/infra/config/file/mod.rs @@ -573,7 +573,7 @@ enum UniswapV3Config { #[serde(default)] graph_url: Option, - /// Optional URL of a CoW pool-indexer service. hen set, it replaces + /// Optional URL of a CoW pool-indexer service. When set, it replaces /// the subgraph as the pool metadata source. #[serde(default)] pool_indexer_url: Option, diff --git a/crates/e2e/tests/e2e/pool_indexer.rs b/crates/e2e/tests/e2e/pool_indexer.rs index fc008c4ea3..159244b33f 100644 --- a/crates/e2e/tests/e2e/pool_indexer.rs +++ b/crates/e2e/tests/e2e/pool_indexer.rs @@ -7,7 +7,14 @@ use { contracts::test::{MockUniswapV3Factory, MockUniswapV3Pool}, e2e::setup::{TIMEOUT, run_test, wait_for_condition}, ethrpc::Web3, - pool_indexer::config::{ApiConfig, Configuration, DatabaseConfig, NetworkConfig, NetworkName}, + pool_indexer::config::{ + ApiConfig, + Configuration, + DatabaseConfig, + FactoryConfig, + NetworkConfig, + NetworkName, + }, sqlx::{PgPool, Row}, std::{ net::{Ipv4Addr, SocketAddr, SocketAddrV4}, @@ -72,7 +79,10 @@ async fn start_pool_indexer(factory: Address) { name: NetworkName::new("mainnet"), chain_id: 1, rpc_url: "http://127.0.0.1:8545".parse().unwrap(), - factories: vec![factory], + factories: vec![FactoryConfig { + address: factory, + deployment_block: 0, + }], chunk_size: 1000, poll_interval_secs: 1, use_latest: true, diff --git a/crates/pool-indexer/src/api/uniswap_v3/pools.rs b/crates/pool-indexer/src/api/uniswap_v3/pools.rs index 3c4a901485..a2adfd64ff 100644 --- a/crates/pool-indexer/src/api/uniswap_v3/pools.rs +++ b/crates/pool-indexer/src/api/uniswap_v3/pools.rs @@ -20,9 +20,7 @@ use { /// 1. `pool_ids` — bulk lookup by pool address, returns only the requested /// pools (no pagination). Intended for clients that already know the pool /// addresses they care about, e.g. resolving pools referenced by an auction. -/// 2. `token0` (+ optional `token1`) — symbol search. Returns all matching -/// pools, ordered by liquidity descending. No pagination. -/// 3. Neither — cursor-paginated list of all pools. +/// 2. Neither — cursor-paginated list of all pools. #[derive(Deserialize)] pub struct PoolsQuery { /// Comma-separated list of pool addresses (`0x…,0x…`). Capped at @@ -30,19 +28,11 @@ pub struct PoolsQuery { /// addresses should chunk their requests. pub pool_ids: Option, /// Opaque cursor returned by the previous page; omit to start from the - /// beginning. Ignored when `pool_ids` or `token0` is set. + /// beginning. Ignored when `pool_ids` is set. pub after: Option, /// Maximum number of pools to return. Clamped to [1, 5000]; defaults to - /// 1000. Ignored when `pool_ids` or `token0` is set. + /// 1000. Ignored when `pool_ids` is set. pub limit: Option, - /// Filter by token symbol (partial, case-insensitive). Acts as the "base" - /// token when `token1` is also supplied. Matched via SQL `LIKE` against - /// the stored symbol — use a symbol fragment (e.g. `"WETH"`, `"USD"`), - /// not a contract address. - pub token0: Option, - /// Paired with `token0` to filter by an exact token pair (both symbols - /// must match, order-independent). - pub token1: Option, } /// ERC-20 token metadata embedded in pool responses. @@ -88,10 +78,6 @@ pub struct PoolsResponse { enum PoolsRequest<'a> { ByIds(&'a str), - Search { - token0: &'a str, - token1: Option<&'a str>, - }, PaginatedList, } @@ -99,11 +85,6 @@ impl PoolsQuery { fn request(&self) -> PoolsRequest<'_> { if let Some(pool_ids) = self.pool_ids.as_deref() { PoolsRequest::ByIds(pool_ids) - } else if let Some(token0) = self.token0.as_deref() { - PoolsRequest::Search { - token0, - token1: self.token1.as_deref(), - } } else { PoolsRequest::PaginatedList } @@ -167,25 +148,6 @@ fn pools_response( .into_response() } -/// Returns all pools whose token symbols match the given filter(s). -/// When only `token0` is supplied, matches any pool containing that symbol. -/// When both are supplied, both symbols must match (order-independent). -/// Results are ordered by liquidity descending; no pagination is applied. -async fn search_pools( - state: &AppState, - chain_id: u64, - block_number: u64, - token0: &str, - token1: Option<&str>, -) -> Result { - let rows = if let Some(token1) = token1 { - db::search_pools_by_pair(&state.db, chain_id, token0, token1).await? - } else { - db::search_pools_by_token(&state.db, chain_id, token0).await? - }; - Ok(pools_response(block_number, &rows, None)) -} - /// Returns a cursor-paginated list of all indexed pools, ordered by address. /// Fetches `limit + 1` rows to detect whether a next page exists; the extra /// row is stripped from the response and its address is returned as @@ -243,10 +205,6 @@ pub async fn get_pools( match query.request() { PoolsRequest::ByIds(pool_ids) => lookup_pools_by_ids(&state, chain_id, pool_ids).await, - PoolsRequest::Search { token0, token1 } => { - let block_number = latest_indexed_block(&state, chain_id).await?; - search_pools(&state, chain_id, block_number, token0, token1).await - } PoolsRequest::PaginatedList => { let block_number = latest_indexed_block(&state, chain_id).await?; list_pools(&state, chain_id, block_number, &query).await diff --git a/crates/pool-indexer/src/cold_seeder.rs b/crates/pool-indexer/src/cold_seeder.rs index 06fbcdacb2..35ec45912d 100644 --- a/crates/pool-indexer/src/cold_seeder.rs +++ b/crates/pool-indexer/src/cold_seeder.rs @@ -67,6 +67,7 @@ pub async fn cold_seed( chain_id: u64, provider: AlloyProvider, factory: Address, + factory_deployment_block: u64, snapshot_block: Option, ) -> Result { let snapshot_block = match snapshot_block { @@ -79,7 +80,7 @@ pub async fn cold_seed( info!( chain_id, - snapshot_block, "cold-seeding pool-indexer from chain" + factory_deployment_block, snapshot_block, "cold-seeding pool-indexer from chain" ); let metrics = crate::metrics::Metrics::get(); @@ -87,7 +88,7 @@ pub async fn cold_seed( let pools = { let labels = [network, "discovery"]; let _t = crate::metrics::Metrics::timer(&metrics.cold_seed_phase_seconds, &labels); - discover_pools(&provider, factory, snapshot_block).await? + discover_pools(&provider, factory, factory_deployment_block, snapshot_block).await? }; metrics .cold_seed_pools_discovered @@ -123,8 +124,15 @@ pub async fn cold_seed( { let labels = [network, "tick_reconstruction"]; let _t = crate::metrics::Metrics::timer(&metrics.cold_seed_phase_seconds, &labels); - reconstruct_and_persist_ticks(db, chain_id, &provider, &active_pools, snapshot_block) - .await?; + reconstruct_and_persist_ticks( + db, + chain_id, + &provider, + &active_pools, + factory_deployment_block, + snapshot_block, + ) + .await?; } info!(chain_id, snapshot_block, "cold seeding complete"); @@ -135,10 +143,11 @@ pub async fn cold_seed( async fn discover_pools( provider: &AlloyProvider, factory: Address, + from_block: u64, to_block: u64, ) -> Result> { // Chunk the full block range, fetch in parallel, decode PoolCreated events. - let ranges: Vec<(u64, u64)> = (0..=to_block) + let ranges: Vec<(u64, u64)> = (from_block..=to_block) .step_by(DISCOVERY_BLOCK_CHUNK as usize) .map(|start| (start, (start + DISCOVERY_BLOCK_CHUNK - 1).min(to_block))) .collect(); @@ -296,6 +305,7 @@ async fn reconstruct_and_persist_ticks( chain_id: u64, provider: &AlloyProvider, active_pools: &[Address], + from_block: u64, to_block: u64, ) -> Result<()> { let total = active_pools.len(); @@ -306,7 +316,7 @@ async fn reconstruct_and_persist_ticks( let pool_batch = pool_batch.to_vec(); let batch_size = pool_batch.len(); - let block_ranges: Vec<(u64, u64)> = (0..=to_block) + let block_ranges: Vec<(u64, u64)> = (from_block..=to_block) .step_by(HISTORY_BLOCK_CHUNK as usize) .map(|start| (start, (start + HISTORY_BLOCK_CHUNK - 1).min(to_block))) .collect(); diff --git a/crates/pool-indexer/src/config.rs b/crates/pool-indexer/src/config.rs index 726b89149f..fd32fa75a5 100644 --- a/crates/pool-indexer/src/config.rs +++ b/crates/pool-indexer/src/config.rs @@ -78,10 +78,10 @@ pub struct NetworkConfig { pub name: NetworkName, pub chain_id: u64, pub rpc_url: Url, - /// One or more Uniswap V3 factory addresses to index. Each factory runs - /// its own seed + live-indexing loop; pools from all factories share the - /// per-chain namespace in the DB and API. - pub factories: Vec
, + /// One or more Uniswap V3 factories to index. Each factory runs its own + /// seed + live-indexing loop; pools from all factories share the per-chain + /// namespace in the DB and API. + pub factories: Vec, #[serde(default = "default_chunk_size")] pub chunk_size: u64, #[serde(default = "default_poll_interval_secs")] @@ -103,6 +103,19 @@ pub struct NetworkConfig { pub prefetch_concurrency: usize, } +#[derive(Debug, Clone, Copy, Deserialize)] +#[serde(rename_all = "kebab-case", deny_unknown_fields)] +pub struct FactoryConfig { + pub address: Address, + /// Block the factory was deployed at. Cold-seed log discovery starts here + /// instead of block 0 — saves thousands of empty `eth_getLogs` requests on + /// chains where the factory was deployed long after genesis (e.g. + /// Arbitrum). Leave unset (0) on chains where the factory is near + /// genesis. + #[serde(default)] + pub deployment_block: u64, +} + /// The subset of [`NetworkConfig`] that [`UniswapV3Indexer`] needs at runtime. #[derive(Debug, Clone)] pub struct IndexerConfig { diff --git a/crates/pool-indexer/src/db/uniswap_v3.rs b/crates/pool-indexer/src/db/uniswap_v3.rs index 459e45e8c2..000fad9ac0 100644 --- a/crates/pool-indexer/src/db/uniswap_v3.rs +++ b/crates/pool-indexer/src/db/uniswap_v3.rs @@ -568,8 +568,11 @@ pub struct TickRow { pub liquidity_net: BigDecimal, } -/// Maximum number of ticks returned per pool query (safety bound). -pub const MAX_TICKS_PER_POOL: i64 = 10_000; +/// Upper bound on ticks returned per pool query. Sized ~3× the largest known +/// mainnet pool: USDC/WETH 0.05% (0x88e6A0c2dDD26FEEb64F039a2c41296FcB3f5640) +/// had 1533 active ticks on 2026-04-22. Callers that hit this limit get a +/// `warn_truncated` log; bump if that starts firing on real pools. +pub const MAX_TICKS_PER_POOL: u32 = 5_000; /// A tick tagged with its owning pool, used by bulk-tick queries that span /// multiple pools. @@ -625,7 +628,7 @@ pub async fn get_ticks_for_pools( if addresses.is_empty() { return Ok(Vec::new()); } - sqlx::query( + let rows = sqlx::query( "SELECT t.pool_address, t.tick_idx, t.liquidity_net FROM UNNEST($2::BYTEA[]) AS p(addr) JOIN LATERAL ( @@ -639,19 +642,23 @@ pub async fn get_ticks_for_pools( ) .bind(sql_chain_id(chain_id)) .bind(address_bytes_list(addresses)) - .bind(MAX_TICKS_PER_POOL) + .bind(i64::from(MAX_TICKS_PER_POOL)) .fetch_all(pool) .await - .context("get_ticks_for_pools")? - .into_iter() - .map(|r| { - Ok(PoolTickRow { - pool_address: bytes_to_addr(r.get("pool_address"))?, - tick_idx: r.get("tick_idx"), - liquidity_net: r.get("liquidity_net"), + .context("get_ticks_for_pools")?; + + let out: Vec = rows + .into_iter() + .map(|r| { + Ok::<_, anyhow::Error>(PoolTickRow { + pool_address: bytes_to_addr(r.get("pool_address"))?, + tick_idx: r.get("tick_idx"), + liquidity_net: r.get("liquidity_net"), + }) }) - }) - .collect() + .collect::>()?; + warn_on_truncated_pools(&out); + Ok(out) } pub async fn get_ticks( @@ -659,7 +666,7 @@ pub async fn get_ticks( chain_id: u64, pool_address: &Address, ) -> Result> { - sqlx::query( + let ticks: Vec = sqlx::query( "SELECT tick_idx, liquidity_net FROM uniswap_v3_ticks WHERE chain_id = $1 @@ -669,82 +676,42 @@ pub async fn get_ticks( ) .bind(sql_chain_id(chain_id)) .bind(address_bytes(pool_address)) - .bind(MAX_TICKS_PER_POOL) + .bind(i64::from(MAX_TICKS_PER_POOL)) .fetch_all(pool) .await - .context("get_ticks") - .map(|rows| { - rows.into_iter() - .map(|r| TickRow { - tick_idx: r.get("tick_idx"), - liquidity_net: r.get("liquidity_net"), - }) - .collect() + .context("get_ticks")? + .into_iter() + .map(|r| TickRow { + tick_idx: r.get("tick_idx"), + liquidity_net: r.get("liquidity_net"), }) -} - -/// Searches pools by a single token symbol (partial, case-insensitive), ordered -/// by liquidity descending. -pub async fn search_pools_by_token( - pool: &PgPool, - chain_id: u64, - token: &str, -) -> Result> { - let pattern = format!("%{}%", token.to_lowercase()); - let rows = sqlx::query( - "SELECT p.address, p.token0, p.token1, p.fee, - p.token0_decimals, p.token1_decimals, - p.token0_symbol, p.token1_symbol, - s.sqrt_price_x96, s.liquidity, s.tick - FROM uniswap_v3_pools p - JOIN uniswap_v3_pool_states s - ON s.chain_id = p.chain_id AND s.pool_address = p.address - WHERE p.chain_id = $1 - AND (LOWER(p.token0_symbol) LIKE $2 OR LOWER(p.token1_symbol) LIKE $2) - ORDER BY s.liquidity DESC", - ) - .bind(sql_chain_id(chain_id)) - .bind(&pattern) - .fetch_all(pool) - .await - .context("search_pools_by_token")?; + .collect(); - decode_pool_rows(rows) + if ticks.len() >= MAX_TICKS_PER_POOL as usize { + warn_truncated(pool_address); + } + Ok(ticks) } -/// Searches pools matching a pair of token symbols (partial, case-insensitive, -/// order-independent), ordered by liquidity descending. -pub async fn search_pools_by_pair( - pool: &PgPool, - chain_id: u64, - token0: &str, - token1: &str, -) -> Result> { - let t0 = format!("%{}%", token0.to_lowercase()); - let t1 = format!("%{}%", token1.to_lowercase()); - let rows = sqlx::query( - "SELECT p.address, p.token0, p.token1, p.fee, - p.token0_decimals, p.token1_decimals, - p.token0_symbol, p.token1_symbol, - s.sqrt_price_x96, s.liquidity, s.tick - FROM uniswap_v3_pools p - JOIN uniswap_v3_pool_states s - ON s.chain_id = p.chain_id AND s.pool_address = p.address - WHERE p.chain_id = $1 - AND ( - (LOWER(p.token0_symbol) LIKE $2 AND LOWER(p.token1_symbol) LIKE $3) - OR (LOWER(p.token1_symbol) LIKE $2 AND LOWER(p.token0_symbol) LIKE $3) - ) - ORDER BY s.liquidity DESC", - ) - .bind(sql_chain_id(chain_id)) - .bind(&t0) - .bind(&t1) - .fetch_all(pool) - .await - .context("search_pools_by_pair")?; +fn warn_on_truncated_pools(rows: &[PoolTickRow]) { + let mut tick_count: std::collections::HashMap<&Address, usize> = + std::collections::HashMap::new(); + for row in rows { + *tick_count.entry(&row.pool_address).or_default() += 1; + } + for (addr, count) in tick_count { + if count >= MAX_TICKS_PER_POOL as usize { + warn_truncated(addr); + } + } +} - decode_pool_rows(rows) +fn warn_truncated(pool: &Address) { + tracing::warn!( + %pool, + limit = MAX_TICKS_PER_POOL, + "tick query hit MAX_TICKS_PER_POOL limit; results may be truncated", + ); } /// Returns all distinct token addresses that have no symbol recorded yet. @@ -775,31 +742,25 @@ pub async fn set_token_symbol( token: &Address, symbol: &str, ) -> Result<()> { - let mut tx = pool.begin().await.context("set_token_symbol begin")?; - - sqlx::query( - "UPDATE uniswap_v3_pools SET token0_symbol = $3 - WHERE chain_id = $1 AND token0 = $2 AND token0_symbol IS NULL", - ) - .bind(sql_chain_id(chain_id)) - .bind(address_bytes(token)) - .bind(symbol) - .execute(&mut *tx) - .await - .context("set_token_symbol token0")?; - sqlx::query( - "UPDATE uniswap_v3_pools SET token1_symbol = $3 - WHERE chain_id = $1 AND token1 = $2 AND token1_symbol IS NULL", + "UPDATE uniswap_v3_pools + SET token0_symbol = CASE + WHEN token0 = $2 AND token0_symbol IS NULL THEN $3 + ELSE token0_symbol + END, + token1_symbol = CASE + WHEN token1 = $2 AND token1_symbol IS NULL THEN $3 + ELSE token1_symbol + END + WHERE chain_id = $1 AND (token0 = $2 OR token1 = $2)", ) .bind(sql_chain_id(chain_id)) .bind(address_bytes(token)) .bind(symbol) - .execute(&mut *tx) + .execute(pool) .await - .context("set_token_symbol token1")?; + .context("set_token_symbol")?; - tx.commit().await.context("set_token_symbol commit")?; Ok(()) } diff --git a/crates/pool-indexer/src/indexer/uniswap_v3.rs b/crates/pool-indexer/src/indexer/uniswap_v3.rs index 01c32aac76..d4a88208d2 100644 --- a/crates/pool-indexer/src/indexer/uniswap_v3.rs +++ b/crates/pool-indexer/src/indexer/uniswap_v3.rs @@ -153,12 +153,21 @@ impl UniswapV3Indexer { /// current finalized block and returns. Loops until no further blocks /// remain (handles new blocks finalizing during a long catch-up). /// - /// If no checkpoint exists yet (fresh DB after seeding), the checkpoint is - /// initialized to `from_block - 1` so that `run_once` starts at - /// `from_block`. This means the caller (seeder) does not need to write the - /// checkpoint itself — it advances naturally per-chunk as blocks are - /// indexed. + /// Intended for the post-seed bootstrap only: initializes the checkpoint to + /// `from_block - 1` if absent so that `run_once` starts at `from_block`. + /// Errors if a checkpoint already exists — overwriting would silently + /// regress progress and re-index history. pub async fn catch_up(&self, from_block: u64) -> Result<()> { + if db::get_checkpoint(&self.db, self.chain_id, &self.factory) + .await? + .is_some() + { + anyhow::bail!( + "catch_up called but checkpoint already exists for chain {} factory {}", + self.chain_id, + self.factory, + ); + } db::set_checkpoint( &self.db, self.chain_id, diff --git a/crates/pool-indexer/src/run.rs b/crates/pool-indexer/src/run.rs index 6a7643e0cd..d334d6f5cc 100644 --- a/crates/pool-indexer/src/run.rs +++ b/crates/pool-indexer/src/run.rs @@ -5,7 +5,6 @@ use { config::{Configuration, NetworkConfig}, indexer::uniswap_v3::UniswapV3Indexer, }, - alloy::primitives::Address, clap::Parser, ethrpc::{AlloyProvider, Config as EthRpcConfig, web3}, sqlx::{PgPool, postgres::PgPoolOptions}, @@ -110,7 +109,7 @@ async fn run_network_indexer(db: PgPool, network: NetworkConfig) { let indexer = UniswapV3Indexer::new( provider.clone(), db.clone(), - &network.indexer_config(factory), + &network.indexer_config(factory.address), ); factory_set.spawn(run_factory_indexer( db.clone(), @@ -131,13 +130,18 @@ async fn run_factory_indexer( provider: AlloyProvider, indexer: UniswapV3Indexer, network: Arc, - factory: Address, + factory: crate::config::FactoryConfig, ) { - tracing::info!(network = %network.name, chain_id = network.chain_id, %factory, "starting factory indexer"); + tracing::info!( + network = %network.name, + chain_id = network.chain_id, + factory = %factory.address, + "starting factory indexer", + ); // A checkpoint already means this (chain, factory) has been bootstrapped — // e.g. a prior run seeded it. Skip the seed and resume live indexing. - let checkpoint = crate::db::uniswap_v3::get_checkpoint(&db, network.chain_id, &factory) + let checkpoint = crate::db::uniswap_v3::get_checkpoint(&db, network.chain_id, &factory.address) .await .expect("failed to read checkpoint"); @@ -158,7 +162,8 @@ async fn run_factory_indexer( network.name.as_str(), network.chain_id, provider, - factory, + factory.address, + factory.deployment_block, network.seed_block, ) .await @@ -208,7 +213,12 @@ fn validate_networks(networks: &[NetworkConfig]) { ); let mut seen = HashSet::new(); for f in &n.factories { - assert!(seen.insert(*f), "network {}: duplicate factory {f}", n.name,); + assert!( + seen.insert(f.address), + "network {}: duplicate factory {}", + n.name, + f.address, + ); } // A subgraph indexes one specific factory — applying one URL to many // factories would double-seed the wrong data. Multi-factory networks diff --git a/database/sql/V110__pool_indexer_uniswap_v3.sql b/database/sql/V110__pool_indexer_uniswap_v3.sql index 221a1432af..994378b3fd 100644 --- a/database/sql/V110__pool_indexer_uniswap_v3.sql +++ b/database/sql/V110__pool_indexer_uniswap_v3.sql @@ -12,7 +12,7 @@ CREATE TABLE uniswap_v3_pools ( address BYTEA NOT NULL, -- pool address token0 BYTEA NOT NULL, token1 BYTEA NOT NULL, - fee INT NOT NULL, -- fee tier in bps (500, 3000, 10000) + fee INT NOT NULL, -- hundredths of a basis point (500 = 0.05%, 3000 = 0.3%, 10000 = 1%) token0_decimals SMALLINT, token1_decimals SMALLINT, token0_symbol TEXT, From 67021d9f62eddf63553c72d93b1ba639273f138b Mon Sep 17 00:00:00 2001 From: Jan P Date: Wed, 22 Apr 2026 13:27:04 +0200 Subject: [PATCH 27/80] Fix DB tests --- crates/database/src/lib.rs | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/crates/database/src/lib.rs b/crates/database/src/lib.rs index 95f9b74d0f..16257f6849 100644 --- a/crates/database/src/lib.rs +++ b/crates/database/src/lib.rs @@ -96,11 +96,15 @@ pub fn all_tables() -> impl Iterator { } /// Delete all data in the database. Only used by tests. +/// +/// Truncates all tables in a single statement so Postgres accepts foreign-key +/// cycles between listed tables (e.g. `uniswap_v3_pool_states` → +/// `uniswap_v3_pools`). Individual per-table `TRUNCATE`s error out when any +/// other listed table references the one being truncated. #[expect(non_snake_case)] pub async fn clear_DANGER_(ex: &mut PgTransaction<'_>) -> sqlx::Result<()> { - for table in all_tables() { - ex.execute(format!("TRUNCATE {table};").as_str()).await?; - } + let tables = all_tables().collect::>().join(", "); + ex.execute(format!("TRUNCATE {tables};").as_str()).await?; Ok(()) } From a45928f622c104e8a7ecde627772a8f57aa5f60a Mon Sep 17 00:00:00 2001 From: Jan P Date: Wed, 22 Apr 2026 15:32:21 +0200 Subject: [PATCH 28/80] Allow env var names for some config values --- Cargo.lock | 1 + crates/configs/src/deserialize_env.rs | 4 ++-- crates/configs/src/lib.rs | 2 +- crates/e2e/tests/e2e/pool_indexer.rs | 2 +- crates/pool-indexer/Cargo.toml | 1 + crates/pool-indexer/src/config.rs | 12 ++++++++++-- crates/pool-indexer/src/run.rs | 4 ++-- crates/pool-indexer/src/subgraph_seeder.rs | 13 +++++++------ 8 files changed, 25 insertions(+), 14 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index fd54bf2256..b1941e88ca 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -6307,6 +6307,7 @@ dependencies = [ "axum 0.8.8", "bigdecimal", "clap", + "configs", "contracts", "ethrpc", "futures", diff --git a/crates/configs/src/deserialize_env.rs b/crates/configs/src/deserialize_env.rs index 798c99e681..e248f2eef6 100644 --- a/crates/configs/src/deserialize_env.rs +++ b/crates/configs/src/deserialize_env.rs @@ -33,7 +33,7 @@ fn invalid_value_unable_to_parse_url(err: ParseError) -> E /// Deserializes an URL from *either* an environment variable — with the format /// `%` — or interpreting a String as a URL. -pub(crate) fn deserialize_url_from_env<'de, D>(deserializer: D) -> Result +pub fn deserialize_url_from_env<'de, D>(deserializer: D) -> Result where D: Deserializer<'de>, { @@ -70,7 +70,7 @@ where /// Deserializes an optional URL from *either* an environment variable — with /// the format `%` — or interpreting a String as a URL. -pub(crate) fn deserialize_optional_url_from_env<'de, D>( +pub fn deserialize_optional_url_from_env<'de, D>( deserializer: D, ) -> Result, D::Error> where diff --git a/crates/configs/src/lib.rs b/crates/configs/src/lib.rs index 3dd21d4cc0..7dd291317b 100644 --- a/crates/configs/src/lib.rs +++ b/crates/configs/src/lib.rs @@ -2,7 +2,7 @@ pub mod autopilot; pub mod balance_overrides; pub mod banned_users; pub mod database; -pub(crate) mod deserialize_env; +pub mod deserialize_env; pub mod fee_factor; pub mod gas_price_estimation; pub mod http_client; diff --git a/crates/e2e/tests/e2e/pool_indexer.rs b/crates/e2e/tests/e2e/pool_indexer.rs index 159244b33f..1a02db12c3 100644 --- a/crates/e2e/tests/e2e/pool_indexer.rs +++ b/crates/e2e/tests/e2e/pool_indexer.rs @@ -72,7 +72,7 @@ async fn start_pool_indexer(factory: Address) { let config = Configuration { database: DatabaseConfig { - url: LOCAL_DB_URL.to_owned(), + url: LOCAL_DB_URL.parse().unwrap(), max_connections: NonZeroU32::new(5).unwrap(), }, networks: vec![NetworkConfig { diff --git a/crates/pool-indexer/Cargo.toml b/crates/pool-indexer/Cargo.toml index 36683e45c6..2f1cbcebaf 100644 --- a/crates/pool-indexer/Cargo.toml +++ b/crates/pool-indexer/Cargo.toml @@ -22,6 +22,7 @@ async-trait = { workspace = true } axum = { workspace = true } bigdecimal = { workspace = true } clap = { workspace = true } +configs = { workspace = true } contracts = { workspace = true } ethrpc = { workspace = true } futures = { workspace = true } diff --git a/crates/pool-indexer/src/config.rs b/crates/pool-indexer/src/config.rs index fd32fa75a5..7463a38158 100644 --- a/crates/pool-indexer/src/config.rs +++ b/crates/pool-indexer/src/config.rs @@ -67,7 +67,10 @@ impl fmt::Display for NetworkName { #[derive(Debug, Deserialize)] #[serde(rename_all = "kebab-case", deny_unknown_fields)] pub struct DatabaseConfig { - pub url: String, + /// Postgres connection URL. Accepts `%ENV_VAR` to pull from the + /// environment. + #[serde(deserialize_with = "configs::deserialize_env::deserialize_url_from_env")] + pub url: Url, #[serde(default = "default_max_connections")] pub max_connections: NonZeroU32, } @@ -77,6 +80,7 @@ pub struct DatabaseConfig { pub struct NetworkConfig { pub name: NetworkName, pub chain_id: u64, + #[serde(deserialize_with = "configs::deserialize_env::deserialize_url_from_env")] pub rpc_url: Url, /// One or more Uniswap V3 factories to index. Each factory runs its own /// seed + live-indexing loop; pools from all factories share the per-chain @@ -93,7 +97,11 @@ pub struct NetworkConfig { pub use_latest: bool, /// Subgraph GraphQL endpoint for seeding initial state. If absent, the /// indexer starts from genesis event indexing. - pub subgraph_url: Option, + #[serde( + default, + deserialize_with = "configs::deserialize_env::deserialize_optional_url_from_env" + )] + pub subgraph_url: Option, /// Block number to seed at. Defaults to the subgraph's current block when /// `subgraph_url` is set. pub seed_block: Option, diff --git a/crates/pool-indexer/src/run.rs b/crates/pool-indexer/src/run.rs index d334d6f5cc..f3deeef3c4 100644 --- a/crates/pool-indexer/src/run.rs +++ b/crates/pool-indexer/src/run.rs @@ -146,7 +146,7 @@ async fn run_factory_indexer( .expect("failed to read checkpoint"); if checkpoint.is_none() { - let seeded_block = if let Some(subgraph_url) = network.subgraph_url.as_deref() { + let seeded_block = if let Some(subgraph_url) = network.subgraph_url.as_ref() { crate::subgraph_seeder::seed( &db, network.name.as_str(), @@ -235,7 +235,7 @@ fn validate_networks(networks: &[NetworkConfig]) { async fn connect_db(config: &Configuration) -> sqlx::PgPool { PgPoolOptions::new() .max_connections(config.database.max_connections.get()) - .connect(&config.database.url) + .connect(config.database.url.as_str()) .await .expect("failed to connect to database") } diff --git a/crates/pool-indexer/src/subgraph_seeder.rs b/crates/pool-indexer/src/subgraph_seeder.rs index 87abb26e37..e4c6ca8298 100644 --- a/crates/pool-indexer/src/subgraph_seeder.rs +++ b/crates/pool-indexer/src/subgraph_seeder.rs @@ -26,6 +26,7 @@ use { sqlx::PgPool, std::time::Duration, tracing::{info, instrument}, + url::Url, }; /// Number of pools (or ticks) returned per GraphQL page. @@ -101,11 +102,11 @@ struct MetaBlock { #[derive(Clone)] struct SubgraphClient { http: Client, - url: String, + url: Url, } impl SubgraphClient { - fn new(url: &str) -> Result { + fn new(url: &Url) -> Result { let http = Client::builder() .timeout(SUBGRAPH_REQUEST_TIMEOUT) .build() @@ -113,7 +114,7 @@ impl SubgraphClient { Ok(Self { http, - url: url.to_owned(), + url: url.clone(), }) } @@ -122,7 +123,7 @@ impl SubgraphClient { async fn query Deserialize<'de>>(&self, query: &str, vars: Value) -> Result { let response = self .http - .post(&self.url) + .post(self.url.as_str()) .json(&json!({ "query": query, "variables": vars })) .send() .await @@ -229,7 +230,7 @@ impl<'a> SubgraphSeeder<'a> { async fn new( db: &'a PgPool, chain_id: u64, - subgraph_url: &str, + subgraph_url: &Url, block: Option, ) -> Result { let subgraph = SubgraphClient::new(subgraph_url)?; @@ -413,7 +414,7 @@ pub async fn seed( db: &PgPool, network: &str, chain_id: u64, - subgraph_url: &str, + subgraph_url: &Url, block: Option, ) -> Result { let labels = [network]; From 46d81e50a3b3b1b75eee5b734efffb7265b5f5a0 Mon Sep 17 00:00:00 2001 From: Jan P Date: Wed, 22 Apr 2026 15:34:44 +0200 Subject: [PATCH 29/80] Fmt --- crates/configs/src/deserialize_env.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/crates/configs/src/deserialize_env.rs b/crates/configs/src/deserialize_env.rs index e248f2eef6..423b15e439 100644 --- a/crates/configs/src/deserialize_env.rs +++ b/crates/configs/src/deserialize_env.rs @@ -70,9 +70,7 @@ where /// Deserializes an optional URL from *either* an environment variable — with /// the format `%` — or interpreting a String as a URL. -pub fn deserialize_optional_url_from_env<'de, D>( - deserializer: D, -) -> Result, D::Error> +pub fn deserialize_optional_url_from_env<'de, D>(deserializer: D) -> Result, D::Error> where D: Deserializer<'de>, { From c1868fc1134479dacef6995284ea73ebdc82e9f0 Mon Sep 17 00:00:00 2001 From: Jan P Date: Thu, 23 Apr 2026 06:41:54 +0200 Subject: [PATCH 30/80] Expect only base URL in config --- crates/chain/src/lib.rs | 21 +++++++++++++++ .../src/boundary/liquidity/uniswap/v3.rs | 5 +++- .../src/uniswap_v3/pool_indexer.rs | 27 ++++++++++++------- 3 files changed, 43 insertions(+), 10 deletions(-) diff --git a/crates/chain/src/lib.rs b/crates/chain/src/lib.rs index 3f21cc0d5a..fb7b979c72 100644 --- a/crates/chain/src/lib.rs +++ b/crates/chain/src/lib.rs @@ -52,6 +52,27 @@ impl Chain { } } + /// Kebab-case slug used in URLs and per-network configs (pool-indexer API + /// routes, DB database names, etc). Stable — other services parse it. + pub fn slug(&self) -> &'static str { + match &self { + Self::Mainnet => "mainnet", + Self::Goerli => "goerli", + Self::Gnosis => "gnosis", + Self::Sepolia => "sepolia", + Self::ArbitrumOne => "arbitrum-one", + Self::Base => "base", + Self::Hardhat => "hardhat", + Self::Bnb => "bnb", + Self::Avalanche => "avalanche", + Self::Optimism => "optimism", + Self::Polygon => "polygon", + Self::Linea => "linea", + Self::Plasma => "plasma", + Self::Ink => "ink", + } + } + /// The default amount in native tokens atoms to use for price estimation pub fn default_amount_to_estimate_native_prices_with(&self) -> U256 { match &self { diff --git a/crates/driver/src/boundary/liquidity/uniswap/v3.rs b/crates/driver/src/boundary/liquidity/uniswap/v3.rs index e6a7b79521..8364180d09 100644 --- a/crates/driver/src/boundary/liquidity/uniswap/v3.rs +++ b/crates/driver/src/boundary/liquidity/uniswap/v3.rs @@ -123,7 +123,10 @@ async fn init_liquidity( let source: Arc = if let Some(url) = &config.pool_indexer_url { tracing::info!(%url, "uniswap v3: using pool-indexer as data source"); - Arc::new(PoolIndexerClient::new(url.clone(), http)) + Arc::new( + PoolIndexerClient::new(url.clone(), eth.chain(), http) + .context("failed to construct pool-indexer client")?, + ) } else { let graph_url = config .graph_url diff --git a/crates/liquidity-sources/src/uniswap_v3/pool_indexer.rs b/crates/liquidity-sources/src/uniswap_v3/pool_indexer.rs index d6139e49d0..2daabe3523 100644 --- a/crates/liquidity-sources/src/uniswap_v3/pool_indexer.rs +++ b/crates/liquidity-sources/src/uniswap_v3/pool_indexer.rs @@ -16,6 +16,7 @@ use { alloy::primitives::{Address, U256}, anyhow::{Context, Result}, async_trait::async_trait, + chain::Chain, num::BigInt, reqwest::{Client, Url}, serde::Deserialize, @@ -30,21 +31,29 @@ const POOL_IDS_PER_REQUEST: usize = 500; const LIST_PAGE_SIZE: u64 = 5000; pub struct PoolIndexerClient { - /// Base URL including the `/api/v1/{network}/uniswap/v3` prefix. Trailing - /// slash normalization is done at construction. + /// Service root (e.g. `http://pool-indexer/`). base_url: Url, http: Client, } impl PoolIndexerClient { - pub fn new(mut base_url: Url, http: Client) -> Self { + pub fn new(base_url: Url, chain: Chain, http: Client) -> Result { // `Url::join` replaces the last path segment unless the base ends in - // a `/`. Normalize once so every `path()` call behaves like "append". - if !base_url.path().ends_with('/') { - let p = format!("{}/", base_url.path()); - base_url.set_path(&p); - } - Self { base_url, http } + // a `/`. Build `/api/v1//uniswap/v3/` once so + // every `path()` call behaves like "append". + let prefix = format!("api/v1/{}/uniswap/v3/", chain.slug()); + let with_trailing_slash = if base_url.path().ends_with('/') { + base_url + } else { + let mut u = base_url; + let p = format!("{}/", u.path()); + u.set_path(&p); + u + }; + let base_url = with_trailing_slash + .join(&prefix) + .with_context(|| format!("joining {prefix} onto {with_trailing_slash}"))?; + Ok(Self { base_url, http }) } fn path(&self, suffix: &str) -> Result { From 7e179e661e7220f7863c24bbfe4c7d9f54aca601 Mon Sep 17 00:00:00 2001 From: Jan P Date: Thu, 23 Apr 2026 07:30:51 +0200 Subject: [PATCH 31/80] Fix serialization --- crates/pool-indexer/src/api/uniswap_v3/mod.rs | 67 ++++++++++++++++++- .../pool-indexer/src/api/uniswap_v3/pools.rs | 6 +- .../pool-indexer/src/api/uniswap_v3/ticks.rs | 4 +- 3 files changed, 71 insertions(+), 6 deletions(-) diff --git a/crates/pool-indexer/src/api/uniswap_v3/mod.rs b/crates/pool-indexer/src/api/uniswap_v3/mod.rs index f99dddac5e..308b19463d 100644 --- a/crates/pool-indexer/src/api/uniswap_v3/mod.rs +++ b/crates/pool-indexer/src/api/uniswap_v3/mod.rs @@ -1,7 +1,11 @@ pub mod pools; pub mod ticks; -use {crate::api::ApiError, alloy_primitives::Address}; +use { + crate::api::ApiError, + alloy_primitives::Address, + bigdecimal::{BigDecimal, num_bigint::ToBigInt}, +}; pub use { pools::get_pools, ticks::{get_ticks, get_ticks_bulk}, @@ -19,6 +23,28 @@ pub(super) fn serialize_display( serializer.serialize_str(&value.to_string()) } +/// Serializes a [`BigDecimal`] holding an integer value as a plain decimal +/// string — never scientific notation. `BigDecimal`'s own `Display` emits +/// `"Ne±M"` for some magnitudes, which breaks downstream parsers expecting +/// `uint` strings (alloy's `U256::from_str`). The stored columns +/// (`sqrt_price_x96`, `liquidity`, `liquidity_net`) are always integers, so +/// converting via `BigInt` is lossless. +pub(super) fn serialize_integer( + value: &BigDecimal, + serializer: S, +) -> Result { + // `to_bigint` truncates fractional values (1.5 → 1), so also verify the + // round-trip matches — otherwise we'd silently drop precision. + match value.to_bigint() { + Some(bi) if BigDecimal::from(bi.clone()) == *value => { + serializer.serialize_str(&bi.to_string()) + } + _ => Err(serde::ser::Error::custom(format!( + "expected integer, got {value}" + ))), + } +} + pub(super) fn parse_hex_address(s: &str) -> Result { s.parse::
() .map_err(|_| ApiError::InvalidPoolAddress) @@ -43,3 +69,42 @@ pub(super) fn parse_pool_ids(raw: &str) -> Result, ApiError> { } Ok(out) } + +#[cfg(test)] +mod tests { + use { + super::*, + bigdecimal::{BigDecimal, num_bigint::BigInt}, + serde::Serialize, + std::str::FromStr, + }; + + /// Postgres' NUMERIC wire encoding compresses trailing zeros into a + /// negative `BigDecimal` scale (`mantissa × 10^|scale|`). The default + /// `Display` stringifies this as scientific notation (`1E30`), which + /// `alloy::U256::from_str` rejects — `serialize_integer` must emit + /// plain digits instead. + #[test] + fn serialize_integer_handles_negative_scale_bigdecimal() { + // negative-scale compression large enough to push `BigDecimal`'s `Display` into + // `Ne+M` notation. + let mantissa = BigInt::from_str("79228162514264337593543950336").unwrap(); + let v = BigDecimal::new(mantissa, -30); + + // Confirm the bug shape: default `Display` produces scientific + // notation that `U256::from_str` can't parse. + assert_eq!(v.to_string(), "79228162514264337593543950336e+30"); + + // Our serializer normalizes to pure digits that the driver parses. + #[derive(Serialize)] + struct Wrapper { + #[serde(serialize_with = "serialize_integer")] + v: BigDecimal, + } + let json = serde_json::to_string(&Wrapper { v }).unwrap(); + assert_eq!( + json, + "{\"v\":\"79228162514264337593543950336000000000000000000000000000000\"}" + ); + } +} diff --git a/crates/pool-indexer/src/api/uniswap_v3/pools.rs b/crates/pool-indexer/src/api/uniswap_v3/pools.rs index a2adfd64ff..4a653379d2 100644 --- a/crates/pool-indexer/src/api/uniswap_v3/pools.rs +++ b/crates/pool-indexer/src/api/uniswap_v3/pools.rs @@ -1,5 +1,5 @@ use { - super::{parse_pool_ids, serialize_display}, + super::{parse_pool_ids, serialize_display, serialize_integer}, crate::{ api::{ApiError, AppState, latest_indexed_block, resolve_chain_id}, db::uniswap_v3 as db, @@ -56,9 +56,9 @@ pub struct PoolResponse { /// Fee tier in hundredths of a basis point (e.g. 3000 = 0.3%). #[serde(serialize_with = "serialize_display")] pub fee_tier: u32, - #[serde(serialize_with = "serialize_display")] + #[serde(serialize_with = "serialize_integer")] pub liquidity: BigDecimal, - #[serde(serialize_with = "serialize_display")] + #[serde(serialize_with = "serialize_integer")] pub sqrt_price: BigDecimal, pub tick: i32, /// Populated only when tick data is explicitly requested. diff --git a/crates/pool-indexer/src/api/uniswap_v3/ticks.rs b/crates/pool-indexer/src/api/uniswap_v3/ticks.rs index fe87145d1d..7d3d2a79d3 100644 --- a/crates/pool-indexer/src/api/uniswap_v3/ticks.rs +++ b/crates/pool-indexer/src/api/uniswap_v3/ticks.rs @@ -1,5 +1,5 @@ use { - super::{parse_hex_address, parse_pool_ids, serialize_display}, + super::{parse_hex_address, parse_pool_ids, serialize_integer}, crate::{ api::{ApiError, AppState, latest_indexed_block, resolve_chain_id}, db::uniswap_v3 as db, @@ -18,7 +18,7 @@ use { #[derive(Serialize)] pub struct TickEntry { pub tick_idx: i32, - #[serde(serialize_with = "serialize_display")] + #[serde(serialize_with = "serialize_integer")] pub liquidity_net: BigDecimal, } From b4a34ac5109fe3669a34c9302de900f3d1f5ea8a Mon Sep 17 00:00:00 2001 From: Jan P Date: Thu, 23 Apr 2026 08:23:05 +0200 Subject: [PATCH 32/80] Skip pools without active range liq --- .../liquidity-sources/src/uniswap_v3/pool_indexer.rs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/crates/liquidity-sources/src/uniswap_v3/pool_indexer.rs b/crates/liquidity-sources/src/uniswap_v3/pool_indexer.rs index 2daabe3523..991f96fefc 100644 --- a/crates/liquidity-sources/src/uniswap_v3/pool_indexer.rs +++ b/crates/liquidity-sources/src/uniswap_v3/pool_indexer.rs @@ -175,7 +175,15 @@ impl V3PoolDataSource for PoolIndexerClient { fetched_block_number = page.block_number; } for p in page.pools { - pools.push(p.into_pool_data()?); + let data = p.into_pool_data()?; + // Mirror the subgraph path (graph_api.rs): skip pools with no + // active in-range liquidity. Keeps `PoolsCheckpointHandler`'s + // top-N-by-liquidity selection from being dominated by scam + // pools whose only LP is concentrated at MIN/MAX ticks and + // report astronomical virtual `liquidity` values. + if !data.liquidity.is_zero() { + pools.push(data); + } } match page.next_cursor { Some(c) => cursor = Some(c), From acf9c29276079e55df3e0ead8e01e3862e908127 Mon Sep 17 00:00:00 2001 From: Jan P Date: Thu, 23 Apr 2026 08:55:45 +0200 Subject: [PATCH 33/80] Update comments and refactor --- .../src/uniswap_v3/pool_indexer.rs | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/crates/liquidity-sources/src/uniswap_v3/pool_indexer.rs b/crates/liquidity-sources/src/uniswap_v3/pool_indexer.rs index 991f96fefc..bded9a64c7 100644 --- a/crates/liquidity-sources/src/uniswap_v3/pool_indexer.rs +++ b/crates/liquidity-sources/src/uniswap_v3/pool_indexer.rs @@ -174,17 +174,14 @@ impl V3PoolDataSource for PoolIndexerClient { if fetched_block_number == 0 { fetched_block_number = page.block_number; } - for p in page.pools { - let data = p.into_pool_data()?; - // Mirror the subgraph path (graph_api.rs): skip pools with no - // active in-range liquidity. Keeps `PoolsCheckpointHandler`'s - // top-N-by-liquidity selection from being dominated by scam - // pools whose only LP is concentrated at MIN/MAX ticks and - // report astronomical virtual `liquidity` values. - if !data.liquidity.is_zero() { - pools.push(data); - } - } + // Skip zero-liquidity pools (fully-burned LP, never-minted, etc.) + let filtered = page + .pools + .into_iter() + .filter(|p| p.liquidity != "0") + .map(IndexerPool::into_pool_data) + .collect::>>()?; + pools.extend(filtered); match page.next_cursor { Some(c) => cursor = Some(c), None => break, From 608b4e6a5db9bbcb625b26c5816cc58e83d9dc48 Mon Sep 17 00:00:00 2001 From: Jan P Date: Thu, 23 Apr 2026 09:01:23 +0200 Subject: [PATCH 34/80] Use idiom --- .../src/uniswap_v3/pool_indexer.rs | 30 ++++++++++--------- 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/crates/liquidity-sources/src/uniswap_v3/pool_indexer.rs b/crates/liquidity-sources/src/uniswap_v3/pool_indexer.rs index bded9a64c7..b0505ef7e8 100644 --- a/crates/liquidity-sources/src/uniswap_v3/pool_indexer.rs +++ b/crates/liquidity-sources/src/uniswap_v3/pool_indexer.rs @@ -109,22 +109,24 @@ struct IndexerTick { liquidity_net: String, } -impl IndexerPool { - fn into_pool_data(self) -> Result { - Ok(PoolData { - id: self.id, +impl TryFrom for PoolData { + type Error = anyhow::Error; + + fn try_from(pool: IndexerPool) -> Result { + Ok(Self { + id: pool.id, token0: Token { - id: self.token0.id, - decimals: self.token0.decimals.unwrap_or(0), + id: pool.token0.id, + decimals: pool.token0.decimals.unwrap_or(0), }, token1: Token { - id: self.token1.id, - decimals: self.token1.decimals.unwrap_or(0), + id: pool.token1.id, + decimals: pool.token1.decimals.unwrap_or(0), }, - fee_tier: U256::from_str(&self.fee_tier).context("parse fee_tier")?, - liquidity: U256::from_str(&self.liquidity).context("parse liquidity")?, - sqrt_price: U256::from_str(&self.sqrt_price).context("parse sqrt_price")?, - tick: BigInt::from(self.tick), + fee_tier: U256::from_str(&pool.fee_tier).context("parse fee_tier")?, + liquidity: U256::from_str(&pool.liquidity).context("parse liquidity")?, + sqrt_price: U256::from_str(&pool.sqrt_price).context("parse sqrt_price")?, + tick: BigInt::from(pool.tick), ticks: None, }) } @@ -179,7 +181,7 @@ impl V3PoolDataSource for PoolIndexerClient { .pools .into_iter() .filter(|p| p.liquidity != "0") - .map(IndexerPool::into_pool_data) + .map(PoolData::try_from) .collect::>>()?; pools.extend(filtered); match page.next_cursor { @@ -244,7 +246,7 @@ async fn fetch_pools_by_ids(client: &PoolIndexerClient, ids: &[Address]) -> Resu .context("pools-by-ids body")?; resp.pools .into_iter() - .map(IndexerPool::into_pool_data) + .map(PoolData::try_from) .collect() } From 13c1b2653d7438e557f77f139212c64bd824e27d Mon Sep 17 00:00:00 2001 From: Jan P Date: Thu, 23 Apr 2026 14:01:44 +0200 Subject: [PATCH 35/80] Fmt --- crates/liquidity-sources/src/uniswap_v3/pool_indexer.rs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/crates/liquidity-sources/src/uniswap_v3/pool_indexer.rs b/crates/liquidity-sources/src/uniswap_v3/pool_indexer.rs index b0505ef7e8..3583e6d1d2 100644 --- a/crates/liquidity-sources/src/uniswap_v3/pool_indexer.rs +++ b/crates/liquidity-sources/src/uniswap_v3/pool_indexer.rs @@ -244,10 +244,7 @@ async fn fetch_pools_by_ids(client: &PoolIndexerClient, ids: &[Address]) -> Resu .json() .await .context("pools-by-ids body")?; - resp.pools - .into_iter() - .map(PoolData::try_from) - .collect() + resp.pools.into_iter().map(PoolData::try_from).collect() } async fn fetch_ticks_by_pool_ids( From b43e20e35efc9e60a8716addfa454f3af76ab769 Mon Sep 17 00:00:00 2001 From: Jan P Date: Fri, 24 Apr 2026 08:08:11 +0200 Subject: [PATCH 36/80] Fmt --- crates/pool-indexer/src/subgraph_seeder.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/crates/pool-indexer/src/subgraph_seeder.rs b/crates/pool-indexer/src/subgraph_seeder.rs index e4c6ca8298..f1eabe8807 100644 --- a/crates/pool-indexer/src/subgraph_seeder.rs +++ b/crates/pool-indexer/src/subgraph_seeder.rs @@ -31,10 +31,13 @@ use { /// Number of pools (or ticks) returned per GraphQL page. const PAGE_SIZE: usize = 1000; + /// Maximum number of pools whose ticks are fetched concurrently. const TICK_CONCURRENCY: usize = 50; + /// Timeout for individual subgraph HTTP requests. const SUBGRAPH_REQUEST_TIMEOUT: Duration = Duration::from_secs(30); + /// Cursor value below the minimum Uniswap V3 tick index (-887272), ensuring the /// first GraphQL page includes the lowest possible tick. const TICK_IDX_CURSOR_START: i64 = -887_273; From 65db21ce8c6aa4ac4988de5b44ba5672151af1c6 Mon Sep 17 00:00:00 2001 From: Jan P Date: Fri, 24 Apr 2026 08:21:39 +0200 Subject: [PATCH 37/80] Remove var --- crates/pool-indexer/src/subgraph_seeder.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/crates/pool-indexer/src/subgraph_seeder.rs b/crates/pool-indexer/src/subgraph_seeder.rs index f1eabe8807..3c7f59955c 100644 --- a/crates/pool-indexer/src/subgraph_seeder.rs +++ b/crates/pool-indexer/src/subgraph_seeder.rs @@ -281,12 +281,11 @@ impl<'a> SubgraphSeeder<'a> { .subgraph .fetch_pools_page(self.snapshot_block, &cursor) .await?; - let page_len = page.len(); all_pool_ids.extend(self.persist_pool_page(&page).await?); info!(total = all_pool_ids.len(), "pools seeded"); - if page_len < PAGE_SIZE { + if page.len() < PAGE_SIZE { break; } From 4ca9399b971ae49f2f0648e25370e3de380b3886 Mon Sep 17 00:00:00 2001 From: Jan P Date: Fri, 24 Apr 2026 08:27:45 +0200 Subject: [PATCH 38/80] Remove small wrappers --- crates/pool-indexer/src/db/uniswap_v3.rs | 124 ++++++++++------------- 1 file changed, 52 insertions(+), 72 deletions(-) diff --git a/crates/pool-indexer/src/db/uniswap_v3.rs b/crates/pool-indexer/src/db/uniswap_v3.rs index 000fad9ac0..051d0bce20 100644 --- a/crates/pool-indexer/src/db/uniswap_v3.rs +++ b/crates/pool-indexer/src/db/uniswap_v3.rs @@ -12,22 +12,6 @@ fn bytes_to_addr(b: Vec) -> Result
{ Address::try_from(b.as_slice()).context("invalid address bytes") } -fn sql_chain_id(chain_id: u64) -> i64 { - chain_id.cast_signed() -} - -fn sql_block_number(block_number: u64) -> i64 { - block_number.cast_signed() -} - -fn sql_fee(fee: u32) -> i32 { - fee.cast_signed() -} - -fn sql_decimals(decimals: Option) -> Option { - decimals.map(i16::from) -} - fn sql_u128(value: u128) -> BigDecimal { BigDecimal::from(BigInt::from(value)) } @@ -36,10 +20,6 @@ fn sql_i128(value: i128) -> BigDecimal { BigDecimal::from(BigInt::from(value)) } -fn address_bytes(address: &Address) -> &[u8] { - address.as_slice() -} - fn address_bytes_list(addresses: &[Address]) -> Vec<&[u8]> { addresses.iter().map(|address| address.as_slice()).collect() } @@ -56,8 +36,8 @@ pub async fn get_checkpoint( let row = sqlx::query( "SELECT block_number FROM pool_indexer_checkpoints WHERE chain_id = $1 AND contract = $2", ) - .bind(sql_chain_id(chain_id)) - .bind(address_bytes(contract)) + .bind(chain_id.cast_signed()) + .bind(contract.as_slice()) .fetch_optional(pool) .await .context("get_checkpoint")?; @@ -76,9 +56,9 @@ pub async fn set_checkpoint( VALUES ($1, $2, $3) ON CONFLICT (chain_id, contract) DO UPDATE SET block_number = EXCLUDED.block_number", ) - .bind(sql_chain_id(chain_id)) - .bind(address_bytes(contract)) - .bind(sql_block_number(block_number)) + .bind(chain_id.cast_signed()) + .bind(contract.as_slice()) + .bind(block_number.cast_signed()) .execute(executor) .await .context("set_checkpoint")?; @@ -104,14 +84,14 @@ pub async fn insert_pool( VALUES ($1, $2, $3, $4, $5, $6, $7, $8) ON CONFLICT (chain_id, address) DO NOTHING", ) - .bind(sql_chain_id(chain_id)) - .bind(address_bytes(address)) - .bind(address_bytes(token0)) - .bind(address_bytes(token1)) - .bind(sql_fee(fee)) - .bind(sql_decimals(token0_decimals)) - .bind(sql_decimals(token1_decimals)) - .bind(sql_block_number(created_block)) + .bind(chain_id.cast_signed()) + .bind(address.as_slice()) + .bind(token0.as_slice()) + .bind(token1.as_slice()) + .bind(fee.cast_signed()) + .bind(token0_decimals.map(i16::from)) + .bind(token1_decimals.map(i16::from)) + .bind(created_block.cast_signed()) .execute(&mut **tx) .await .context("insert_pool")?; @@ -138,9 +118,9 @@ pub async fn upsert_pool_state( liquidity = EXCLUDED.liquidity, tick = EXCLUDED.tick", ) - .bind(sql_chain_id(chain_id)) - .bind(address_bytes(pool_address)) - .bind(sql_block_number(block_number)) + .bind(chain_id.cast_signed()) + .bind(pool_address.as_slice()) + .bind(block_number.cast_signed()) .bind(u160_to_big_decimal(&sqrt_price_x96)) .bind(sql_u128(liquidity)) .bind(tick) @@ -162,10 +142,10 @@ pub async fn update_pool_liquidity( SET liquidity = $3, block_number = $4 WHERE chain_id = $1 AND pool_address = $2", ) - .bind(sql_chain_id(chain_id)) - .bind(address_bytes(pool_address)) + .bind(chain_id.cast_signed()) + .bind(pool_address.as_slice()) .bind(sql_u128(liquidity)) - .bind(sql_block_number(block_number)) + .bind(block_number.cast_signed()) .execute(&mut **tx) .await .context("update_pool_liquidity")?; @@ -188,8 +168,8 @@ pub async fn update_tick_liquidity_net( ON CONFLICT (chain_id, pool_address, tick_idx) DO UPDATE SET liquidity_net = uniswap_v3_ticks.liquidity_net + EXCLUDED.liquidity_net", ) - .bind(sql_chain_id(chain_id)) - .bind(address_bytes(pool_address)) + .bind(chain_id.cast_signed()) + .bind(pool_address.as_slice()) .bind(tick_idx) .bind(sql_i128(delta)) .execute(&mut **tx) @@ -200,8 +180,8 @@ pub async fn update_tick_liquidity_net( "DELETE FROM uniswap_v3_ticks WHERE chain_id = $1 AND pool_address = $2 AND tick_idx = $3 AND liquidity_net = 0", ) - .bind(sql_chain_id(chain_id)) - .bind(address_bytes(pool_address)) + .bind(chain_id.cast_signed()) + .bind(pool_address.as_slice()) .bind(tick_idx) .execute(&mut **tx) .await @@ -220,30 +200,30 @@ pub async fn batch_insert_pools( } let addresses: Vec<&[u8]> = pools .iter() - .map(|pool| address_bytes(&pool.address)) + .map(|pool| pool.address.as_slice()) .collect(); let token0s: Vec<&[u8]> = pools .iter() - .map(|pool| address_bytes(&pool.token0)) + .map(|pool| pool.token0.as_slice()) .collect(); let token1s: Vec<&[u8]> = pools .iter() - .map(|pool| address_bytes(&pool.token1)) + .map(|pool| pool.token1.as_slice()) .collect(); - let fees: Vec = pools.iter().map(|pool| sql_fee(pool.fee)).collect(); + let fees: Vec = pools.iter().map(|pool| pool.fee.cast_signed()).collect(); let t0_decimals: Vec> = pools .iter() - .map(|pool| sql_decimals(pool.token0_decimals)) + .map(|pool| pool.token0_decimals.map(i16::from)) .collect(); let t1_decimals: Vec> = pools .iter() - .map(|pool| sql_decimals(pool.token1_decimals)) + .map(|pool| pool.token1_decimals.map(i16::from)) .collect(); let t0_symbols: Vec> = pools.iter().map(|p| p.token0_symbol.clone()).collect(); let t1_symbols: Vec> = pools.iter().map(|p| p.token1_symbol.clone()).collect(); let created_blocks: Vec = pools .iter() - .map(|pool| sql_block_number(pool.created_block)) + .map(|pool| pool.created_block.cast_signed()) .collect(); sqlx::query( @@ -256,7 +236,7 @@ pub async fn batch_insert_pools( AS t(addr, t0, t1, fee, t0d, t1d, t0s, t1s, cblk) ON CONFLICT (chain_id, address) DO NOTHING", ) - .bind(sql_chain_id(chain_id)) + .bind(chain_id.cast_signed()) .bind(addresses) .bind(token0s) .bind(token1s) @@ -282,11 +262,11 @@ pub async fn batch_upsert_pool_states( } let addresses: Vec<&[u8]> = states .iter() - .map(|state| address_bytes(&state.pool_address)) + .map(|state| state.pool_address.as_slice()) .collect(); let block_numbers: Vec = states .iter() - .map(|state| sql_block_number(state.block_number)) + .map(|state| state.block_number.cast_signed()) .collect(); let sqrt_prices: Vec = states .iter() @@ -316,7 +296,7 @@ pub async fn batch_upsert_pool_states( liquidity = EXCLUDED.liquidity, tick = EXCLUDED.tick", ) - .bind(sql_chain_id(chain_id)) + .bind(chain_id.cast_signed()) .bind(addresses) .bind(block_numbers) .bind(sqrt_prices) @@ -338,7 +318,7 @@ pub async fn batch_update_pool_liquidity( } let addresses: Vec<&[u8]> = updates .iter() - .map(|update| address_bytes(&update.pool_address)) + .map(|update| update.pool_address.as_slice()) .collect(); let liquidities: Vec = updates .iter() @@ -346,7 +326,7 @@ pub async fn batch_update_pool_liquidity( .collect(); let block_numbers: Vec = updates .iter() - .map(|update| sql_block_number(update.block_number)) + .map(|update| update.block_number.cast_signed()) .collect(); sqlx::query( @@ -360,7 +340,7 @@ pub async fn batch_update_pool_liquidity( FROM latest l WHERE s.chain_id = $1 AND s.pool_address = l.addr", ) - .bind(sql_chain_id(chain_id)) + .bind(chain_id.cast_signed()) .bind(addresses) .bind(liquidities) .bind(block_numbers) @@ -380,7 +360,7 @@ pub async fn batch_update_ticks( } let addresses: Vec<&[u8]> = deltas .iter() - .map(|delta| address_bytes(&delta.pool_address)) + .map(|delta| delta.pool_address.as_slice()) .collect(); let tick_idxs: Vec = deltas.iter().map(|delta| delta.tick_idx).collect(); let delta_values: Vec = deltas.iter().map(|delta| sql_i128(delta.delta)).collect(); @@ -407,7 +387,7 @@ pub async fn batch_update_ticks( AND ticks.tick_idx = upserted.tick_idx AND upserted.liquidity_net = 0", ) - .bind(sql_chain_id(chain_id)) + .bind(chain_id.cast_signed()) .bind(addresses) .bind(tick_idxs) .bind(delta_values) @@ -430,7 +410,7 @@ pub async fn batch_seed_ticks( } let addresses: Vec<&[u8]> = ticks .iter() - .map(|tick| address_bytes(&tick.pool_address)) + .map(|tick| tick.pool_address.as_slice()) .collect(); let tick_idxs: Vec = ticks.iter().map(|tick| tick.tick_idx).collect(); let values: Vec = ticks.iter().map(|tick| sql_i128(tick.delta)).collect(); @@ -449,7 +429,7 @@ pub async fn batch_seed_ticks( ON CONFLICT (chain_id, pool_address, tick_idx) DO UPDATE SET liquidity_net = EXCLUDED.liquidity_net", ) - .bind(sql_chain_id(chain_id)) + .bind(chain_id.cast_signed()) .bind(addresses) .bind(tick_idxs) .bind(values) @@ -464,7 +444,7 @@ pub async fn delete_ticks_for_chain( chain_id: u64, ) -> Result<()> { sqlx::query("DELETE FROM uniswap_v3_ticks WHERE chain_id = $1") - .bind(sql_chain_id(chain_id)) + .bind(chain_id.cast_signed()) .execute(executor) .await .context("delete_ticks_for_chain")?; @@ -524,7 +504,7 @@ pub async fn get_pools(pool: &PgPool, chain_id: u64, limit: u64) -> Result Result< WHERE chain_id = $1 AND token1_symbol IS NULL ) t", ) - .bind(sql_chain_id(chain_id)) + .bind(chain_id.cast_signed()) .fetch_all(pool) .await .context("get_tokens_missing_symbols")?; @@ -754,8 +734,8 @@ pub async fn set_token_symbol( END WHERE chain_id = $1 AND (token0 = $2 OR token1 = $2)", ) - .bind(sql_chain_id(chain_id)) - .bind(address_bytes(token)) + .bind(chain_id.cast_signed()) + .bind(token.as_slice()) .bind(symbol) .execute(pool) .await @@ -768,7 +748,7 @@ pub async fn get_latest_indexed_block(pool: &PgPool, chain_id: u64) -> Result Date: Fri, 24 Apr 2026 08:32:06 +0200 Subject: [PATCH 39/80] Remove trivial wrappers --- crates/pool-indexer/src/indexer/uniswap_v3.rs | 14 +++++--------- crates/pool-indexer/src/metrics.rs | 12 ++++-------- crates/pool-indexer/src/run.rs | 6 +----- 3 files changed, 10 insertions(+), 22 deletions(-) diff --git a/crates/pool-indexer/src/indexer/uniswap_v3.rs b/crates/pool-indexer/src/indexer/uniswap_v3.rs index d4a88208d2..1e3e7e7334 100644 --- a/crates/pool-indexer/src/indexer/uniswap_v3.rs +++ b/crates/pool-indexer/src/indexer/uniswap_v3.rs @@ -403,10 +403,6 @@ pub(crate) fn signed24_to_i32(v: alloy::primitives::aliases::I24) -> i32 { (raw << 8).cast_signed() >> 8 } -fn log_block_number(log: &Log) -> u64 { - log.block_number.unwrap_or_default() -} - async fn fetch_pool_liquidity(provider: &AlloyProvider, pool: Address, block: u64) -> Option { contracts::UniswapV3Pool::Instance::new(pool, provider.clone()) .liquidity() @@ -618,7 +614,7 @@ impl LogAccumulator { let pool: Address = e.pool; let token0: Address = e.token0; let token1: Address = e.token1; - let created_block = log_block_number(log); + let created_block = log.block_number.unwrap_or_default(); tracing::debug!(%pool, %token0, %token1, fee = e.fee.to::(), "discovered pool"); self.new_pools.insert( pool, @@ -644,7 +640,7 @@ impl LogAccumulator { }; let e = &decoded.data; let pool = log.address(); - let block = log_block_number(log); + let block = log.block_number.unwrap_or_default(); let liquidity = self .full_states .get(&pool) @@ -670,7 +666,7 @@ impl LogAccumulator { }; let e = &decoded.data; let pool = log.address(); - let block = log_block_number(log); + let block = log.block_number.unwrap_or_default(); self.full_states.insert( pool, PoolStateData { @@ -692,7 +688,7 @@ impl LogAccumulator { }; let e = &decoded.data; let pool = log.address(); - let block = log_block_number(log); + let block = log.block_number.unwrap_or_default(); let amount = e.amount.cast_signed(); self.record_tick_range_delta( pool, @@ -711,7 +707,7 @@ impl LogAccumulator { }; let e = &decoded.data; let pool = log.address(); - let block = log_block_number(log); + let block = log.block_number.unwrap_or_default(); let amount = e.amount.cast_signed(); self.record_tick_range_delta( pool, diff --git a/crates/pool-indexer/src/metrics.rs b/crates/pool-indexer/src/metrics.rs index c1e9289017..800072c5f4 100644 --- a/crates/pool-indexer/src/metrics.rs +++ b/crates/pool-indexer/src/metrics.rs @@ -5,7 +5,7 @@ //! more than one network is active in the same process. Call `Metrics::get()` //! to reach the shared registry-backed instance. -use {prometheus::HistogramVec, prometheus_metric_storage::MetricStorage, std::time::Duration}; +use {prometheus::HistogramVec, prometheus_metric_storage::MetricStorage}; #[derive(MetricStorage)] #[metric(subsystem = "pool_indexer")] @@ -90,20 +90,16 @@ impl Metrics { .expect("unexpected pool_indexer metrics duplicate registration") } - /// Convenience — record a histogram observation from a `Duration`. - fn observe_seconds(hist: &HistogramVec, labels: &[&str], d: Duration) { - hist.with_label_values(labels).observe(d.as_secs_f64()); - } - /// Returns a guard that records the elapsed time on a histogram when it's /// dropped. Use with `let _timer = Metrics::timer(&hist, &[..]);` at the /// top of a function / block. Cleaner than manual `Instant::now()` + - /// `observe_seconds` pairs, and records even on early return. + /// observe pairs, and records even on early return. #[must_use] pub fn timer<'a>(hist: &'a HistogramVec, labels: &'a [&'a str]) -> impl Drop + use<'a> { let start = std::time::Instant::now(); scopeguard::guard(start, move |start| { - Self::observe_seconds(hist, labels, start.elapsed()); + hist.with_label_values(labels) + .observe(start.elapsed().as_secs_f64()); }) } } diff --git a/crates/pool-indexer/src/run.rs b/crates/pool-indexer/src/run.rs index f3deeef3c4..f87608cb9e 100644 --- a/crates/pool-indexer/src/run.rs +++ b/crates/pool-indexer/src/run.rs @@ -16,7 +16,7 @@ pub async fn start(args: impl Iterator) { let args = Arguments::parse_from(args); initialize_observability(); observe::metrics::setup_registry(Some("pool_indexer".into()), None); - let config = load_configuration(&args); + let config = Configuration::from_path(&args.config).expect("failed to load configuration"); tracing::info!("pool-indexer starting"); run(config).await; } @@ -63,10 +63,6 @@ fn initialize_observability() { observe::panic_hook::install(); } -fn load_configuration(args: &Arguments) -> Configuration { - Configuration::from_path(&args.config).expect("failed to load configuration") -} - fn build_api_state(db: &PgPool, networks: &[NetworkConfig]) -> Arc { let networks = networks .iter() From e97e01afab9e6c5e4d898f49cedc8edbfd072957 Mon Sep 17 00:00:00 2001 From: Jan P Date: Fri, 24 Apr 2026 08:43:20 +0200 Subject: [PATCH 40/80] Remove dead code --- .../pool-indexer/src/api/uniswap_v3/pools.rs | 5 +- crates/pool-indexer/src/cold_seeder.rs | 18 +- crates/pool-indexer/src/db/uniswap_v3.rs | 160 +----------------- crates/pool-indexer/src/indexer/uniswap_v3.rs | 47 ++--- crates/pool-indexer/src/lib.rs | 18 +- 5 files changed, 40 insertions(+), 208 deletions(-) diff --git a/crates/pool-indexer/src/api/uniswap_v3/pools.rs b/crates/pool-indexer/src/api/uniswap_v3/pools.rs index 4a653379d2..8d06948641 100644 --- a/crates/pool-indexer/src/api/uniswap_v3/pools.rs +++ b/crates/pool-indexer/src/api/uniswap_v3/pools.rs @@ -162,10 +162,7 @@ async fn list_pools( let cursor = query.cursor()?; // Fetch one extra row to determine if there is a next page. - let mut rows = match cursor { - Some(cursor) => db::get_pools_after(&state.db, chain_id, cursor, limit + 1).await?, - None => db::get_pools(&state.db, chain_id, limit + 1).await?, - }; + let mut rows = db::get_pools(&state.db, chain_id, cursor, limit + 1).await?; let has_next = rows.len() > limit as usize; rows.truncate(limit as usize); diff --git a/crates/pool-indexer/src/cold_seeder.rs b/crates/pool-indexer/src/cold_seeder.rs index 35ec45912d..63a2bc3746 100644 --- a/crates/pool-indexer/src/cold_seeder.rs +++ b/crates/pool-indexer/src/cold_seeder.rs @@ -15,13 +15,7 @@ use { crate::{ db::uniswap_v3 as db, - indexer::uniswap_v3::{ - NewPoolData, - PoolStateData, - TickDeltaData, - bisecting_get_logs, - signed24_to_i32, - }, + indexer::uniswap_v3::{NewPoolData, PoolStateData, TickDeltaData, bisecting_get_logs}, }, alloy::{primitives::Address, providers::Provider, rpc::types::Log, sol_types::SolEvent}, anyhow::{Context, Result}, @@ -284,7 +278,7 @@ async fn fetch_pool_state( block_number: at_block, sqrt_price_x96: slot0.sqrtPriceX96, liquidity, - tick: signed24_to_i32(slot0.tick), + tick: slot0.tick.as_i32(), }) } @@ -340,15 +334,15 @@ async fn reconstruct_and_persist_ticks( { let e = &decoded.data; let amount = e.amount.cast_signed(); - *acc.entry((pool, signed24_to_i32(e.tickLower))).or_default() += amount; - *acc.entry((pool, signed24_to_i32(e.tickUpper))).or_default() -= amount; + *acc.entry((pool, e.tickLower.as_i32())).or_default() += amount; + *acc.entry((pool, e.tickUpper.as_i32())).or_default() -= amount; } else if *t == Burn::SIGNATURE_HASH && let Ok(decoded) = Burn::decode_log(&log.inner) { let e = &decoded.data; let amount = e.amount.cast_signed(); - *acc.entry((pool, signed24_to_i32(e.tickLower))).or_default() -= amount; - *acc.entry((pool, signed24_to_i32(e.tickUpper))).or_default() += amount; + *acc.entry((pool, e.tickLower.as_i32())).or_default() -= amount; + *acc.entry((pool, e.tickUpper.as_i32())).or_default() += amount; } } diff --git a/crates/pool-indexer/src/db/uniswap_v3.rs b/crates/pool-indexer/src/db/uniswap_v3.rs index 051d0bce20..e9b93513cb 100644 --- a/crates/pool-indexer/src/db/uniswap_v3.rs +++ b/crates/pool-indexer/src/db/uniswap_v3.rs @@ -65,131 +65,6 @@ pub async fn set_checkpoint( Ok(()) } -#[allow(clippy::too_many_arguments)] -pub async fn insert_pool( - tx: &mut Transaction<'_, Postgres>, - chain_id: u64, - address: &Address, - token0: &Address, - token1: &Address, - fee: u32, - token0_decimals: Option, - token1_decimals: Option, - created_block: u64, -) -> Result<()> { - sqlx::query( - "INSERT INTO uniswap_v3_pools - (chain_id, address, token0, token1, fee, token0_decimals, token1_decimals, \ - created_block) - VALUES ($1, $2, $3, $4, $5, $6, $7, $8) - ON CONFLICT (chain_id, address) DO NOTHING", - ) - .bind(chain_id.cast_signed()) - .bind(address.as_slice()) - .bind(token0.as_slice()) - .bind(token1.as_slice()) - .bind(fee.cast_signed()) - .bind(token0_decimals.map(i16::from)) - .bind(token1_decimals.map(i16::from)) - .bind(created_block.cast_signed()) - .execute(&mut **tx) - .await - .context("insert_pool")?; - Ok(()) -} - -pub async fn upsert_pool_state( - tx: &mut Transaction<'_, Postgres>, - chain_id: u64, - pool_address: &Address, - block_number: u64, - sqrt_price_x96: alloy_primitives::aliases::U160, - liquidity: u128, - tick: i32, -) -> Result<()> { - sqlx::query( - "INSERT INTO uniswap_v3_pool_states - (chain_id, pool_address, block_number, sqrt_price_x96, liquidity, tick) - SELECT $1, $2, $3, $4, $5, $6 - WHERE EXISTS (SELECT 1 FROM uniswap_v3_pools WHERE chain_id = $1 AND address = $2) - ON CONFLICT (chain_id, pool_address) DO UPDATE - SET block_number = EXCLUDED.block_number, - sqrt_price_x96 = EXCLUDED.sqrt_price_x96, - liquidity = EXCLUDED.liquidity, - tick = EXCLUDED.tick", - ) - .bind(chain_id.cast_signed()) - .bind(pool_address.as_slice()) - .bind(block_number.cast_signed()) - .bind(u160_to_big_decimal(&sqrt_price_x96)) - .bind(sql_u128(liquidity)) - .bind(tick) - .execute(&mut **tx) - .await - .context("upsert_pool_state")?; - Ok(()) -} - -pub async fn update_pool_liquidity( - tx: &mut Transaction<'_, Postgres>, - chain_id: u64, - pool_address: &Address, - block_number: u64, - liquidity: u128, -) -> Result<()> { - sqlx::query( - "UPDATE uniswap_v3_pool_states - SET liquidity = $3, block_number = $4 - WHERE chain_id = $1 AND pool_address = $2", - ) - .bind(chain_id.cast_signed()) - .bind(pool_address.as_slice()) - .bind(sql_u128(liquidity)) - .bind(block_number.cast_signed()) - .execute(&mut **tx) - .await - .context("update_pool_liquidity")?; - Ok(()) -} - -/// Applies a signed delta to a tick's `liquidity_net`. Rows that reach zero -/// are pruned (Uniswap V3 convention). -pub async fn update_tick_liquidity_net( - tx: &mut Transaction<'_, Postgres>, - chain_id: u64, - pool_address: &Address, - tick_idx: i32, - delta: i128, -) -> Result<()> { - sqlx::query( - "INSERT INTO uniswap_v3_ticks (chain_id, pool_address, tick_idx, liquidity_net) - SELECT $1, $2, $3, $4 - WHERE EXISTS (SELECT 1 FROM uniswap_v3_pools WHERE chain_id = $1 AND address = $2) - ON CONFLICT (chain_id, pool_address, tick_idx) DO UPDATE - SET liquidity_net = uniswap_v3_ticks.liquidity_net + EXCLUDED.liquidity_net", - ) - .bind(chain_id.cast_signed()) - .bind(pool_address.as_slice()) - .bind(tick_idx) - .bind(sql_i128(delta)) - .execute(&mut **tx) - .await - .context("update_tick_liquidity_net upsert")?; - - sqlx::query( - "DELETE FROM uniswap_v3_ticks - WHERE chain_id = $1 AND pool_address = $2 AND tick_idx = $3 AND liquidity_net = 0", - ) - .bind(chain_id.cast_signed()) - .bind(pool_address.as_slice()) - .bind(tick_idx) - .execute(&mut **tx) - .await - .context("update_tick_liquidity_net prune")?; - - Ok(()) -} - pub async fn batch_insert_pools( tx: &mut Transaction<'_, Postgres>, chain_id: u64, @@ -490,34 +365,13 @@ impl TryFrom for PoolRow { } } -/// Fetches a page of pools ordered by address with their current state. -pub async fn get_pools(pool: &PgPool, chain_id: u64, limit: u64) -> Result> { - let rows = sqlx::query( - "SELECT p.address, p.token0, p.token1, p.fee, - p.token0_decimals, p.token1_decimals, - p.token0_symbol, p.token1_symbol, - s.sqrt_price_x96, s.liquidity, s.tick - FROM uniswap_v3_pools p - JOIN uniswap_v3_pool_states s - ON s.chain_id = p.chain_id AND s.pool_address = p.address - WHERE p.chain_id = $1 - ORDER BY p.address - LIMIT $2", - ) - .bind(chain_id.cast_signed()) - .bind(limit.cast_signed()) - .fetch_all(pool) - .await - .context("get_pools")?; - - decode_pool_rows(rows) -} - -/// Fetches the next page of pools after `cursor` address (keyset pagination). -pub async fn get_pools_after( +/// Fetches a page of pools ordered by address with their current state. Pass +/// `cursor = None` for the first page, or the previous page's last address for +/// keyset pagination. +pub async fn get_pools( pool: &PgPool, chain_id: u64, - cursor: Vec, + cursor: Option>, limit: u64, ) -> Result> { let rows = sqlx::query( @@ -529,7 +383,7 @@ pub async fn get_pools_after( JOIN uniswap_v3_pool_states s ON s.chain_id = p.chain_id AND s.pool_address = p.address WHERE p.chain_id = $1 - AND p.address > $2 + AND ($2::BYTEA IS NULL OR p.address > $2) ORDER BY p.address LIMIT $3", ) @@ -538,7 +392,7 @@ pub async fn get_pools_after( .bind(limit.cast_signed()) .fetch_all(pool) .await - .context("get_pools_after")?; + .context("get_pools")?; decode_pool_rows(rows) } diff --git a/crates/pool-indexer/src/indexer/uniswap_v3.rs b/crates/pool-indexer/src/indexer/uniswap_v3.rs index 1e3e7e7334..31b6c59510 100644 --- a/crates/pool-indexer/src/indexer/uniswap_v3.rs +++ b/crates/pool-indexer/src/indexer/uniswap_v3.rs @@ -22,9 +22,7 @@ use { tracing::instrument, }; -/// Cached liquidity value keyed by (pool_address, block_number). type LiquidityCache = HashMap<(Address, u64), u128>; -/// Cached ERC-20 decimal value keyed by token address. type DecimalsCache = HashMap; const SYMBOL_BACKFILL_BATCH_SIZE: usize = 500; @@ -305,22 +303,17 @@ impl UniswapV3Indexer { ); let network = self.network.as_str(); - metrics - .events_applied - .with_label_values(&[network, "new_pool"]) - .inc_by(changes.new_pools.len() as u64); - metrics - .events_applied - .with_label_values(&[network, "pool_state"]) - .inc_by(changes.pool_states.len() as u64); - metrics - .events_applied - .with_label_values(&[network, "liq_update"]) - .inc_by(changes.liquidity_updates.len() as u64); - metrics - .events_applied - .with_label_values(&[network, "tick_delta"]) - .inc_by(changes.tick_deltas.len() as u64); + for (kind, count) in [ + ("new_pool", changes.new_pools.len()), + ("pool_state", changes.pool_states.len()), + ("liq_update", changes.liquidity_updates.len()), + ("tick_delta", changes.tick_deltas.len()), + ] { + metrics + .events_applied + .with_label_values(&[network, kind]) + .inc_by(count as u64); + } self.persist_chunk(chunk, changes).await?; @@ -397,12 +390,6 @@ impl UniswapV3Indexer { } } -/// Sign-extends a 24-bit signed integer (alloy I24) to i32. -pub(crate) fn signed24_to_i32(v: alloy::primitives::aliases::I24) -> i32 { - let raw = v.into_raw().as_limbs()[0] as u32; - (raw << 8).cast_signed() >> 8 -} - async fn fetch_pool_liquidity(provider: &AlloyProvider, pool: Address, block: u64) -> Option { contracts::UniswapV3Pool::Instance::new(pool, provider.clone()) .liquidity() @@ -653,7 +640,7 @@ impl LogAccumulator { block_number: block, sqrt_price_x96: e.sqrtPriceX96, liquidity, - tick: signed24_to_i32(e.tick), + tick: e.tick.as_i32(), }, ); self.liq_only.remove(&pool); @@ -674,7 +661,7 @@ impl LogAccumulator { block_number: block, sqrt_price_x96: e.sqrtPriceX96, liquidity: e.liquidity, - tick: signed24_to_i32(e.tick), + tick: e.tick.as_i32(), }, ); self.liq_only.remove(&pool); @@ -692,8 +679,8 @@ impl LogAccumulator { let amount = e.amount.cast_signed(); self.record_tick_range_delta( pool, - signed24_to_i32(e.tickLower), - signed24_to_i32(e.tickUpper), + e.tickLower.as_i32(), + e.tickUpper.as_i32(), amount, ); self.update_liquidity_from_cache(pool, block, liq_cache); @@ -711,8 +698,8 @@ impl LogAccumulator { let amount = e.amount.cast_signed(); self.record_tick_range_delta( pool, - signed24_to_i32(e.tickLower), - signed24_to_i32(e.tickUpper), + e.tickLower.as_i32(), + e.tickUpper.as_i32(), -amount, ); self.update_liquidity_from_cache(pool, block, liq_cache); diff --git a/crates/pool-indexer/src/lib.rs b/crates/pool-indexer/src/lib.rs index 7d3031f1ba..916da099fa 100644 --- a/crates/pool-indexer/src/lib.rs +++ b/crates/pool-indexer/src/lib.rs @@ -1,11 +1,11 @@ -pub mod api; -pub mod arguments; -pub mod cold_seeder; pub mod config; -pub mod db; -pub mod indexer; -pub mod metrics; -pub mod run; -pub mod subgraph_seeder; - pub use run::{run, start}; + +mod api; +mod arguments; +mod cold_seeder; +mod db; +mod indexer; +mod metrics; +mod run; +mod subgraph_seeder; From 1f22cff4a6988891d47fd00b8eeb337ce90337ed Mon Sep 17 00:00:00 2001 From: Jan P Date: Fri, 24 Apr 2026 08:58:41 +0200 Subject: [PATCH 41/80] Renaming --- crates/liquidity-sources/src/uniswap_v3/pool_indexer.rs | 3 --- crates/pool-indexer/src/cold_seeder.rs | 4 ++-- crates/pool-indexer/src/db/uniswap_v3.rs | 4 ++-- crates/pool-indexer/src/indexer/uniswap_v3.rs | 4 ++-- crates/pool-indexer/src/subgraph_seeder.rs | 4 ++-- 5 files changed, 8 insertions(+), 11 deletions(-) diff --git a/crates/liquidity-sources/src/uniswap_v3/pool_indexer.rs b/crates/liquidity-sources/src/uniswap_v3/pool_indexer.rs index 3583e6d1d2..717ae9864d 100644 --- a/crates/liquidity-sources/src/uniswap_v3/pool_indexer.rs +++ b/crates/liquidity-sources/src/uniswap_v3/pool_indexer.rs @@ -91,9 +91,6 @@ struct IndexerToken { #[derive(Deserialize)] struct BulkTicksResponse { - #[serde(default)] - #[allow(dead_code)] - block_number: u64, pools: Vec, } diff --git a/crates/pool-indexer/src/cold_seeder.rs b/crates/pool-indexer/src/cold_seeder.rs index 63a2bc3746..2e11ae6b6d 100644 --- a/crates/pool-indexer/src/cold_seeder.rs +++ b/crates/pool-indexer/src/cold_seeder.rs @@ -226,7 +226,7 @@ async fn fetch_decimals_concurrent( async fn persist_pools(db: &PgPool, chain_id: u64, pools: &[NewPoolData]) -> Result<()> { let mut tx = db.begin().await.context("begin pools tx")?; - db::batch_insert_pools(&mut tx, chain_id, pools).await?; + db::insert_pools(&mut tx, chain_id, pools).await?; tx.commit().await.context("commit pools tx")?; Ok(()) } @@ -284,7 +284,7 @@ async fn fetch_pool_state( async fn persist_pool_states(db: &PgPool, chain_id: u64, states: &[PoolStateData]) -> Result<()> { let mut tx = db.begin().await.context("begin states tx")?; - db::batch_upsert_pool_states(&mut tx, chain_id, states).await?; + db::upsert_pool_states(&mut tx, chain_id, states).await?; tx.commit().await.context("commit states tx")?; Ok(()) } diff --git a/crates/pool-indexer/src/db/uniswap_v3.rs b/crates/pool-indexer/src/db/uniswap_v3.rs index e9b93513cb..12704a137e 100644 --- a/crates/pool-indexer/src/db/uniswap_v3.rs +++ b/crates/pool-indexer/src/db/uniswap_v3.rs @@ -65,7 +65,7 @@ pub async fn set_checkpoint( Ok(()) } -pub async fn batch_insert_pools( +pub async fn insert_pools( tx: &mut Transaction<'_, Postgres>, chain_id: u64, pools: &[NewPoolData], @@ -127,7 +127,7 @@ pub async fn batch_insert_pools( Ok(()) } -pub async fn batch_upsert_pool_states( +pub async fn upsert_pool_states( tx: &mut Transaction<'_, Postgres>, chain_id: u64, states: &[PoolStateData], diff --git a/crates/pool-indexer/src/indexer/uniswap_v3.rs b/crates/pool-indexer/src/indexer/uniswap_v3.rs index 31b6c59510..d147dee8ab 100644 --- a/crates/pool-indexer/src/indexer/uniswap_v3.rs +++ b/crates/pool-indexer/src/indexer/uniswap_v3.rs @@ -327,8 +327,8 @@ impl UniswapV3Indexer { async fn persist_chunk(&self, chunk: ChunkRange, changes: ChunkChanges) -> Result<()> { let mut tx = self.db.begin().await.context("begin transaction")?; - db::batch_insert_pools(&mut tx, self.chain_id, &changes.new_pools).await?; - db::batch_upsert_pool_states(&mut tx, self.chain_id, &changes.pool_states).await?; + db::insert_pools(&mut tx, self.chain_id, &changes.new_pools).await?; + db::upsert_pool_states(&mut tx, self.chain_id, &changes.pool_states).await?; db::batch_update_pool_liquidity(&mut tx, self.chain_id, &changes.liquidity_updates).await?; db::batch_update_ticks(&mut tx, self.chain_id, &changes.tick_deltas).await?; db::set_checkpoint(&mut *tx, self.chain_id, &self.factory, chunk.end).await?; diff --git a/crates/pool-indexer/src/subgraph_seeder.rs b/crates/pool-indexer/src/subgraph_seeder.rs index 3c7f59955c..6e8c7d8649 100644 --- a/crates/pool-indexer/src/subgraph_seeder.rs +++ b/crates/pool-indexer/src/subgraph_seeder.rs @@ -315,8 +315,8 @@ impl<'a> SubgraphSeeder<'a> { } let mut tx = self.db.begin().await.context("begin pool tx")?; - db::batch_insert_pools(&mut tx, self.chain_id, &new_pools).await?; - db::batch_upsert_pool_states(&mut tx, self.chain_id, &pool_states).await?; + db::insert_pools(&mut tx, self.chain_id, &new_pools).await?; + db::upsert_pool_states(&mut tx, self.chain_id, &pool_states).await?; tx.commit().await.context("commit pool tx")?; Ok(pool_ids) From 93a55a8eca96a5f953bd923582165996e5dca0ac Mon Sep 17 00:00:00 2001 From: Jan P Date: Fri, 24 Apr 2026 08:59:09 +0200 Subject: [PATCH 42/80] Fmt --- crates/pool-indexer/src/db/uniswap_v3.rs | 15 +++------------ crates/pool-indexer/src/indexer/uniswap_v3.rs | 14 ++------------ 2 files changed, 5 insertions(+), 24 deletions(-) diff --git a/crates/pool-indexer/src/db/uniswap_v3.rs b/crates/pool-indexer/src/db/uniswap_v3.rs index 12704a137e..b5519c6779 100644 --- a/crates/pool-indexer/src/db/uniswap_v3.rs +++ b/crates/pool-indexer/src/db/uniswap_v3.rs @@ -73,18 +73,9 @@ pub async fn insert_pools( if pools.is_empty() { return Ok(()); } - let addresses: Vec<&[u8]> = pools - .iter() - .map(|pool| pool.address.as_slice()) - .collect(); - let token0s: Vec<&[u8]> = pools - .iter() - .map(|pool| pool.token0.as_slice()) - .collect(); - let token1s: Vec<&[u8]> = pools - .iter() - .map(|pool| pool.token1.as_slice()) - .collect(); + let addresses: Vec<&[u8]> = pools.iter().map(|pool| pool.address.as_slice()).collect(); + let token0s: Vec<&[u8]> = pools.iter().map(|pool| pool.token0.as_slice()).collect(); + let token1s: Vec<&[u8]> = pools.iter().map(|pool| pool.token1.as_slice()).collect(); let fees: Vec = pools.iter().map(|pool| pool.fee.cast_signed()).collect(); let t0_decimals: Vec> = pools .iter() diff --git a/crates/pool-indexer/src/indexer/uniswap_v3.rs b/crates/pool-indexer/src/indexer/uniswap_v3.rs index d147dee8ab..01f905e6fd 100644 --- a/crates/pool-indexer/src/indexer/uniswap_v3.rs +++ b/crates/pool-indexer/src/indexer/uniswap_v3.rs @@ -677,12 +677,7 @@ impl LogAccumulator { let pool = log.address(); let block = log.block_number.unwrap_or_default(); let amount = e.amount.cast_signed(); - self.record_tick_range_delta( - pool, - e.tickLower.as_i32(), - e.tickUpper.as_i32(), - amount, - ); + self.record_tick_range_delta(pool, e.tickLower.as_i32(), e.tickUpper.as_i32(), amount); self.update_liquidity_from_cache(pool, block, liq_cache); } @@ -696,12 +691,7 @@ impl LogAccumulator { let pool = log.address(); let block = log.block_number.unwrap_or_default(); let amount = e.amount.cast_signed(); - self.record_tick_range_delta( - pool, - e.tickLower.as_i32(), - e.tickUpper.as_i32(), - -amount, - ); + self.record_tick_range_delta(pool, e.tickLower.as_i32(), e.tickUpper.as_i32(), -amount); self.update_liquidity_from_cache(pool, block, liq_cache); } From 653f97b5e8a2c09e5fd499db31104569d42aa096 Mon Sep 17 00:00:00 2001 From: Jan P Date: Fri, 24 Apr 2026 09:07:54 +0200 Subject: [PATCH 43/80] Group ticks without relying on ordering --- .../pool-indexer/src/api/uniswap_v3/ticks.rs | 23 +++++++------------ 1 file changed, 8 insertions(+), 15 deletions(-) diff --git a/crates/pool-indexer/src/api/uniswap_v3/ticks.rs b/crates/pool-indexer/src/api/uniswap_v3/ticks.rs index 7d3d2a79d3..4bbf69268e 100644 --- a/crates/pool-indexer/src/api/uniswap_v3/ticks.rs +++ b/crates/pool-indexer/src/api/uniswap_v3/ticks.rs @@ -11,7 +11,7 @@ use { }, bigdecimal::BigDecimal, serde::{Deserialize, Serialize}, - std::sync::Arc, + std::{collections::HashMap, sync::Arc}, }; /// A single tick entry with its net liquidity. @@ -109,22 +109,15 @@ pub async fn get_ticks_bulk( } fn group_ticks_by_pool(rows: Vec) -> Vec { - let mut pools: Vec = Vec::new(); - + let mut groups: HashMap> = HashMap::new(); for row in rows { - let tick = TickEntry { + groups.entry(row.pool_address).or_default().push(TickEntry { tick_idx: row.tick_idx, liquidity_net: row.liquidity_net, - }; - - match pools.last_mut() { - Some(last) if last.pool == row.pool_address => last.ticks.push(tick), - _ => pools.push(PoolTicks { - pool: row.pool_address, - ticks: vec![tick], - }), - } + }); } - - pools + groups + .into_iter() + .map(|(pool, ticks)| PoolTicks { pool, ticks }) + .collect() } From c048a5e9b96fc6279112863df9e2d1e5a2b18a5d Mon Sep 17 00:00:00 2001 From: Jan P Date: Fri, 24 Apr 2026 09:49:42 +0200 Subject: [PATCH 44/80] Correctly support mutiple factories --- crates/pool-indexer/src/cold_seeder.rs | 26 +++++-- crates/pool-indexer/src/db/uniswap_v3.rs | 75 ++++++++++++++----- crates/pool-indexer/src/indexer/uniswap_v3.rs | 49 +++++++++--- crates/pool-indexer/src/run.rs | 1 + crates/pool-indexer/src/subgraph_seeder.rs | 22 ++++-- .../sql/V110__pool_indexer_uniswap_v3.sql | 6 +- 6 files changed, 134 insertions(+), 45 deletions(-) diff --git a/crates/pool-indexer/src/cold_seeder.rs b/crates/pool-indexer/src/cold_seeder.rs index 2e11ae6b6d..1aadeb8bc8 100644 --- a/crates/pool-indexer/src/cold_seeder.rs +++ b/crates/pool-indexer/src/cold_seeder.rs @@ -89,7 +89,7 @@ pub async fn cold_seed( .with_label_values(&[network]) .set(i64::try_from(pools.len()).unwrap_or(0)); info!(chain_id, pools = pools.len(), "pools discovered"); - persist_pools(db, chain_id, &pools).await?; + persist_pools(db, chain_id, &factory, &pools).await?; let states = { let labels = [network, "state_snapshot"]; @@ -97,7 +97,7 @@ pub async fn cold_seed( snapshot_pool_states(&provider, &pools, snapshot_block).await? }; info!(chain_id, states = states.len(), "pool states snapshotted"); - persist_pool_states(db, chain_id, &states).await?; + persist_pool_states(db, chain_id, &factory, &states).await?; let active_pools: Vec
= states .iter() @@ -121,6 +121,7 @@ pub async fn cold_seed( reconstruct_and_persist_ticks( db, chain_id, + &factory, &provider, &active_pools, factory_deployment_block, @@ -224,9 +225,14 @@ async fn fetch_decimals_concurrent( .await } -async fn persist_pools(db: &PgPool, chain_id: u64, pools: &[NewPoolData]) -> Result<()> { +async fn persist_pools( + db: &PgPool, + chain_id: u64, + factory: &Address, + pools: &[NewPoolData], +) -> Result<()> { let mut tx = db.begin().await.context("begin pools tx")?; - db::insert_pools(&mut tx, chain_id, pools).await?; + db::insert_pools(&mut tx, chain_id, factory, pools).await?; tx.commit().await.context("commit pools tx")?; Ok(()) } @@ -282,9 +288,14 @@ async fn fetch_pool_state( }) } -async fn persist_pool_states(db: &PgPool, chain_id: u64, states: &[PoolStateData]) -> Result<()> { +async fn persist_pool_states( + db: &PgPool, + chain_id: u64, + factory: &Address, + states: &[PoolStateData], +) -> Result<()> { let mut tx = db.begin().await.context("begin states tx")?; - db::upsert_pool_states(&mut tx, chain_id, states).await?; + db::upsert_pool_states(&mut tx, chain_id, factory, states).await?; tx.commit().await.context("commit states tx")?; Ok(()) } @@ -297,6 +308,7 @@ async fn persist_pool_states(db: &PgPool, chain_id: u64, states: &[PoolStateData async fn reconstruct_and_persist_ticks( db: &PgPool, chain_id: u64, + factory: &Address, provider: &AlloyProvider, active_pools: &[Address], from_block: u64, @@ -357,7 +369,7 @@ async fn reconstruct_and_persist_ticks( .collect(); if !deltas.is_empty() { - db::batch_seed_ticks(db, chain_id, &deltas).await?; + db::batch_seed_ticks(db, chain_id, factory, &deltas).await?; tick_rows += deltas.len(); } diff --git a/crates/pool-indexer/src/db/uniswap_v3.rs b/crates/pool-indexer/src/db/uniswap_v3.rs index b5519c6779..9271ab4876 100644 --- a/crates/pool-indexer/src/db/uniswap_v3.rs +++ b/crates/pool-indexer/src/db/uniswap_v3.rs @@ -68,6 +68,7 @@ pub async fn set_checkpoint( pub async fn insert_pools( tx: &mut Transaction<'_, Postgres>, chain_id: u64, + factory: &Address, pools: &[NewPoolData], ) -> Result<()> { if pools.is_empty() { @@ -94,15 +95,16 @@ pub async fn insert_pools( sqlx::query( "INSERT INTO uniswap_v3_pools - (chain_id, address, token0, token1, fee, token0_decimals, token1_decimals, + (chain_id, address, factory, token0, token1, fee, token0_decimals, token1_decimals, token0_symbol, token1_symbol, created_block) - SELECT $1, t.addr, t.t0, t.t1, t.fee, t.t0d, t.t1d, t.t0s, t.t1s, t.cblk - FROM UNNEST($2::BYTEA[], $3::BYTEA[], $4::BYTEA[], $5::INT4[], $6::INT2[], $7::INT2[], - $8::TEXT[], $9::TEXT[], $10::INT8[]) + SELECT $1, t.addr, $2, t.t0, t.t1, t.fee, t.t0d, t.t1d, t.t0s, t.t1s, t.cblk + FROM UNNEST($3::BYTEA[], $4::BYTEA[], $5::BYTEA[], $6::INT4[], $7::INT2[], $8::INT2[], + $9::TEXT[], $10::TEXT[], $11::INT8[]) AS t(addr, t0, t1, fee, t0d, t1d, t0s, t1s, cblk) ON CONFLICT (chain_id, address) DO NOTHING", ) .bind(chain_id.cast_signed()) + .bind(factory.as_slice()) .bind(addresses) .bind(token0s) .bind(token1s) @@ -114,13 +116,14 @@ pub async fn insert_pools( .bind(created_blocks) .execute(&mut **tx) .await - .context("batch_insert_pools")?; + .context("insert_pools")?; Ok(()) } pub async fn upsert_pool_states( tx: &mut Transaction<'_, Postgres>, chain_id: u64, + factory: &Address, states: &[PoolStateData], ) -> Result<()> { if states.is_empty() { @@ -147,7 +150,7 @@ pub async fn upsert_pool_states( sqlx::query( "WITH latest AS ( SELECT DISTINCT ON (addr) addr, blk, sqrt, liq, tick - FROM UNNEST($2::BYTEA[], $3::INT8[], $4::NUMERIC[], $5::NUMERIC[], $6::INT4[]) + FROM UNNEST($3::BYTEA[], $4::INT8[], $5::NUMERIC[], $6::NUMERIC[], $7::INT4[]) AS t(addr, blk, sqrt, liq, tick) ORDER BY addr, blk DESC ) @@ -155,7 +158,10 @@ pub async fn upsert_pool_states( (chain_id, pool_address, block_number, sqrt_price_x96, liquidity, tick) SELECT $1, l.addr, l.blk, l.sqrt, l.liq, l.tick FROM latest l - WHERE EXISTS (SELECT 1 FROM uniswap_v3_pools WHERE chain_id = $1 AND address = l.addr) + WHERE EXISTS ( + SELECT 1 FROM uniswap_v3_pools + WHERE chain_id = $1 AND address = l.addr AND factory = $2 + ) ON CONFLICT (chain_id, pool_address) DO UPDATE SET block_number = EXCLUDED.block_number, sqrt_price_x96 = EXCLUDED.sqrt_price_x96, @@ -163,6 +169,7 @@ pub async fn upsert_pool_states( tick = EXCLUDED.tick", ) .bind(chain_id.cast_signed()) + .bind(factory.as_slice()) .bind(addresses) .bind(block_numbers) .bind(sqrt_prices) @@ -170,13 +177,14 @@ pub async fn upsert_pool_states( .bind(ticks) .execute(&mut **tx) .await - .context("batch_upsert_pool_states")?; + .context("upsert_pool_states")?; Ok(()) } pub async fn batch_update_pool_liquidity( tx: &mut Transaction<'_, Postgres>, chain_id: u64, + factory: &Address, updates: &[LiquidityUpdateData], ) -> Result<()> { if updates.is_empty() { @@ -198,15 +206,20 @@ pub async fn batch_update_pool_liquidity( sqlx::query( "WITH latest AS ( SELECT DISTINCT ON (addr) addr, liq, blk - FROM UNNEST($2::BYTEA[], $3::NUMERIC[], $4::INT8[]) AS t(addr, liq, blk) + FROM UNNEST($3::BYTEA[], $4::NUMERIC[], $5::INT8[]) AS t(addr, liq, blk) ORDER BY addr, blk DESC ) UPDATE uniswap_v3_pool_states s SET liquidity = l.liq, block_number = l.blk FROM latest l - WHERE s.chain_id = $1 AND s.pool_address = l.addr", + WHERE s.chain_id = $1 AND s.pool_address = l.addr + AND EXISTS ( + SELECT 1 FROM uniswap_v3_pools p + WHERE p.chain_id = $1 AND p.address = l.addr AND p.factory = $2 + )", ) .bind(chain_id.cast_signed()) + .bind(factory.as_slice()) .bind(addresses) .bind(liquidities) .bind(block_numbers) @@ -219,6 +232,7 @@ pub async fn batch_update_pool_liquidity( pub async fn batch_update_ticks( tx: &mut Transaction<'_, Postgres>, chain_id: u64, + factory: &Address, deltas: &[TickDeltaData], ) -> Result<()> { if deltas.is_empty() { @@ -234,14 +248,17 @@ pub async fn batch_update_ticks( sqlx::query( "WITH input AS ( SELECT t.addr, t.tick_idx, SUM(t.delta) AS total_delta - FROM UNNEST($2::BYTEA[], $3::INT4[], $4::NUMERIC[]) AS t(addr, tick_idx, delta) + FROM UNNEST($3::BYTEA[], $4::INT4[], $5::NUMERIC[]) AS t(addr, tick_idx, delta) GROUP BY t.addr, t.tick_idx ), upserted AS ( INSERT INTO uniswap_v3_ticks (chain_id, pool_address, tick_idx, liquidity_net) SELECT $1, i.addr, i.tick_idx, i.total_delta FROM input i - WHERE EXISTS (SELECT 1 FROM uniswap_v3_pools WHERE chain_id = $1 AND address = i.addr) + WHERE EXISTS ( + SELECT 1 FROM uniswap_v3_pools + WHERE chain_id = $1 AND address = i.addr AND factory = $2 + ) ON CONFLICT (chain_id, pool_address, tick_idx) DO UPDATE SET liquidity_net = uniswap_v3_ticks.liquidity_net + EXCLUDED.liquidity_net RETURNING chain_id, pool_address, tick_idx, liquidity_net @@ -254,6 +271,7 @@ pub async fn batch_update_ticks( AND upserted.liquidity_net = 0", ) .bind(chain_id.cast_signed()) + .bind(factory.as_slice()) .bind(addresses) .bind(tick_idxs) .bind(delta_values) @@ -269,6 +287,7 @@ pub async fn batch_update_ticks( pub async fn batch_seed_ticks( executor: impl sqlx::PgExecutor<'_>, chain_id: u64, + factory: &Address, ticks: &[TickDeltaData], ) -> Result<()> { if ticks.is_empty() { @@ -284,18 +303,22 @@ pub async fn batch_seed_ticks( sqlx::query( "WITH input AS ( SELECT t.addr, t.tick_idx, SUM(t.val) AS net - FROM UNNEST($2::BYTEA[], $3::INT4[], $4::NUMERIC[]) AS t(addr, tick_idx, val) + FROM UNNEST($3::BYTEA[], $4::INT4[], $5::NUMERIC[]) AS t(addr, tick_idx, val) GROUP BY t.addr, t.tick_idx ) INSERT INTO uniswap_v3_ticks (chain_id, pool_address, tick_idx, liquidity_net) SELECT $1, i.addr, i.tick_idx, i.net FROM input i - WHERE EXISTS (SELECT 1 FROM uniswap_v3_pools WHERE chain_id = $1 AND address = i.addr) + WHERE EXISTS ( + SELECT 1 FROM uniswap_v3_pools + WHERE chain_id = $1 AND address = i.addr AND factory = $2 + ) AND i.net <> 0 ON CONFLICT (chain_id, pool_address, tick_idx) DO UPDATE SET liquidity_net = EXCLUDED.liquidity_net", ) .bind(chain_id.cast_signed()) + .bind(factory.as_slice()) .bind(addresses) .bind(tick_idxs) .bind(values) @@ -305,15 +328,27 @@ pub async fn batch_seed_ticks( Ok(()) } -pub async fn delete_ticks_for_chain( +/// Deletes ticks for all pools owned by `factory` on `chain_id`. Used by the +/// subgraph seeder to clear stale state before reseeding. Scoped to this +/// factory so a reseed on one factory doesn't wipe another's ticks. +pub async fn delete_ticks_for_factory( executor: impl sqlx::PgExecutor<'_>, chain_id: u64, + factory: &Address, ) -> Result<()> { - sqlx::query("DELETE FROM uniswap_v3_ticks WHERE chain_id = $1") - .bind(chain_id.cast_signed()) - .execute(executor) - .await - .context("delete_ticks_for_chain")?; + sqlx::query( + "DELETE FROM uniswap_v3_ticks t + USING uniswap_v3_pools p + WHERE t.chain_id = $1 + AND p.chain_id = $1 + AND p.address = t.pool_address + AND p.factory = $2", + ) + .bind(chain_id.cast_signed()) + .bind(factory.as_slice()) + .execute(executor) + .await + .context("delete_ticks_for_factory")?; Ok(()) } diff --git a/crates/pool-indexer/src/indexer/uniswap_v3.rs b/crates/pool-indexer/src/indexer/uniswap_v3.rs index 01f905e6fd..97115494f6 100644 --- a/crates/pool-indexer/src/indexer/uniswap_v3.rs +++ b/crates/pool-indexer/src/indexer/uniswap_v3.rs @@ -327,10 +327,16 @@ impl UniswapV3Indexer { async fn persist_chunk(&self, chunk: ChunkRange, changes: ChunkChanges) -> Result<()> { let mut tx = self.db.begin().await.context("begin transaction")?; - db::insert_pools(&mut tx, self.chain_id, &changes.new_pools).await?; - db::upsert_pool_states(&mut tx, self.chain_id, &changes.pool_states).await?; - db::batch_update_pool_liquidity(&mut tx, self.chain_id, &changes.liquidity_updates).await?; - db::batch_update_ticks(&mut tx, self.chain_id, &changes.tick_deltas).await?; + db::insert_pools(&mut tx, self.chain_id, &self.factory, &changes.new_pools).await?; + db::upsert_pool_states(&mut tx, self.chain_id, &self.factory, &changes.pool_states).await?; + db::batch_update_pool_liquidity( + &mut tx, + self.chain_id, + &self.factory, + &changes.liquidity_updates, + ) + .await?; + db::batch_update_ticks(&mut tx, self.chain_id, &self.factory, &changes.tick_deltas).await?; db::set_checkpoint(&mut *tx, self.chain_id, &self.factory, chunk.end).await?; tx.commit().await.context("commit transaction")?; @@ -906,7 +912,12 @@ mod tests { }; let liq_cache: LiquidityCache = HashMap::from([((POOL, 100u64), amount)]); let log = make_log(POOL, 100, event); - let c = collect_log_changes(FACTORY, &[log], &liq_cache, &Default::default()); + let c = collect_log_changes( + FACTORY, + &[log], + &liq_cache, + &Default::default(), + ); assert_eq!(c.tick_deltas.len(), 2); let lower = c.tick_deltas.iter().find(|d| d.tick_idx == -100).unwrap(); @@ -945,7 +956,12 @@ mod tests { }; let liq_cache: LiquidityCache = HashMap::from([((POOL, 201u64), after_mint_liq)]); let logs = vec![make_log(POOL, 200, swap), make_log(POOL, 201, mint)]; - let c = collect_log_changes(FACTORY, &logs, &liq_cache, &Default::default()); + let c = collect_log_changes( + FACTORY, + &logs, + &liq_cache, + &Default::default(), + ); assert_eq!(c.pool_states.len(), 1); // Swap established full_state; Mint updated its liquidity from the cache. @@ -975,7 +991,12 @@ mod tests { amount1: alloy::primitives::U256::ZERO, }; let logs = vec![make_log(POOL, 100, mint), make_log(POOL, 101, burn)]; - let c = collect_log_changes(FACTORY, &logs, &Default::default(), &Default::default()); + let c = collect_log_changes( + FACTORY, + &logs, + &Default::default(), + &Default::default(), + ); assert!(c.tick_deltas.is_empty(), "zero-net ticks must be pruned"); } @@ -1001,7 +1022,12 @@ mod tests { amount1: alloy::primitives::U256::ZERO, }; let logs = vec![make_log(POOL, 100, mint), make_log(POOL, 101, burn)]; - let c = collect_log_changes(FACTORY, &logs, &Default::default(), &Default::default()); + let c = collect_log_changes( + FACTORY, + &logs, + &Default::default(), + &Default::default(), + ); let expected = (mint_amount - burn_amount).cast_signed(); let lower = c.tick_deltas.iter().find(|d| d.tick_idx == -100).unwrap(); @@ -1024,7 +1050,12 @@ mod tests { tick: t(0), }; let logs = vec![make_log(FACTORY, 100, created), make_log(POOL, 100, init)]; - let c = collect_log_changes(FACTORY, &logs, &Default::default(), &Default::default()); + let c = collect_log_changes( + FACTORY, + &logs, + &Default::default(), + &Default::default(), + ); assert_eq!(c.new_pools.len(), 1); assert_eq!(c.pool_states.len(), 1); assert_eq!(c.pool_states[0].pool_address, POOL); diff --git a/crates/pool-indexer/src/run.rs b/crates/pool-indexer/src/run.rs index f87608cb9e..39b8596f4b 100644 --- a/crates/pool-indexer/src/run.rs +++ b/crates/pool-indexer/src/run.rs @@ -147,6 +147,7 @@ async fn run_factory_indexer( &db, network.name.as_str(), network.chain_id, + factory.address, subgraph_url, network.seed_block, ) diff --git a/crates/pool-indexer/src/subgraph_seeder.rs b/crates/pool-indexer/src/subgraph_seeder.rs index 6e8c7d8649..0a06d10160 100644 --- a/crates/pool-indexer/src/subgraph_seeder.rs +++ b/crates/pool-indexer/src/subgraph_seeder.rs @@ -225,6 +225,7 @@ impl SubgraphClient { struct SubgraphSeeder<'a> { db: &'a PgPool, chain_id: u64, + factory: Address, subgraph: SubgraphClient, snapshot_block: u64, } @@ -233,6 +234,7 @@ impl<'a> SubgraphSeeder<'a> { async fn new( db: &'a PgPool, chain_id: u64, + factory: Address, subgraph_url: &Url, block: Option, ) -> Result { @@ -248,6 +250,7 @@ impl<'a> SubgraphSeeder<'a> { Ok(Self { db, chain_id, + factory, subgraph, snapshot_block, }) @@ -315,25 +318,27 @@ impl<'a> SubgraphSeeder<'a> { } let mut tx = self.db.begin().await.context("begin pool tx")?; - db::insert_pools(&mut tx, self.chain_id, &new_pools).await?; - db::upsert_pool_states(&mut tx, self.chain_id, &pool_states).await?; + db::insert_pools(&mut tx, self.chain_id, &self.factory, &new_pools).await?; + db::upsert_pool_states(&mut tx, self.chain_id, &self.factory, &pool_states).await?; tx.commit().await.context("commit pool tx")?; Ok(pool_ids) } async fn seed_ticks(&self, pool_ids: &[String]) -> Result { - // Clear all existing tick data so seeded values are authoritative. - // This prevents stale rows (e.g. ticks burned to 0 before the seed block) - // from persisting if the seeder is re-run on a non-empty database. - db::delete_ticks_for_chain(self.db, self.chain_id).await?; + // Clear this factory's existing tick data so seeded values are + // authoritative — prevents stale rows (e.g. ticks burned to 0 before + // the seed block) from persisting if the seeder is re-run on a + // non-empty database. Scoped to `self.factory` so a reseed doesn't + // wipe another factory's ticks on the same chain. + db::delete_ticks_for_factory(self.db, self.chain_id, &self.factory).await?; let mut total_ticks = 0usize; for pool_batch in pool_ids.chunks(TICK_CONCURRENCY) { let ticks = self.fetch_tick_batch(pool_batch).await?; if !ticks.is_empty() { - db::batch_seed_ticks(self.db, self.chain_id, &ticks).await?; + db::batch_seed_ticks(self.db, self.chain_id, &self.factory, &ticks).await?; } total_ticks += ticks.len(); @@ -416,13 +421,14 @@ pub async fn seed( db: &PgPool, network: &str, chain_id: u64, + factory: Address, subgraph_url: &Url, block: Option, ) -> Result { let labels = [network]; let m = crate::metrics::Metrics::get(); let _timer = crate::metrics::Metrics::timer(&m.subgraph_seed_seconds, &labels); - SubgraphSeeder::new(db, chain_id, subgraph_url, block) + SubgraphSeeder::new(db, chain_id, factory, subgraph_url, block) .await? .seed() .await diff --git a/database/sql/V110__pool_indexer_uniswap_v3.sql b/database/sql/V110__pool_indexer_uniswap_v3.sql index 994378b3fd..dd3bc9f2be 100644 --- a/database/sql/V110__pool_indexer_uniswap_v3.sql +++ b/database/sql/V110__pool_indexer_uniswap_v3.sql @@ -6,10 +6,14 @@ CREATE TABLE pool_indexer_checkpoints ( PRIMARY KEY (chain_id, contract) ); --- One row per discovered pool (from PoolCreated events on the factory) +-- One row per discovered pool (from PoolCreated events on the factory). +-- `factory` is the emitting factory's address; it partitions the table so each +-- indexer writes only to its own rows on chains where multiple V3-compatible +-- factories are configured (same chain's logs are fetched chain-wide). CREATE TABLE uniswap_v3_pools ( chain_id BIGINT NOT NULL, address BYTEA NOT NULL, -- pool address + factory BYTEA NOT NULL, token0 BYTEA NOT NULL, token1 BYTEA NOT NULL, fee INT NOT NULL, -- hundredths of a basis point (500 = 0.05%, 3000 = 0.3%, 10000 = 1%) From 93dee8386f93674859345f0dfbe168a7cef17bb5 Mon Sep 17 00:00:00 2001 From: Jan P Date: Fri, 24 Apr 2026 09:51:35 +0200 Subject: [PATCH 45/80] Fmt --- crates/pool-indexer/src/indexer/uniswap_v3.rs | 35 +++---------------- 1 file changed, 5 insertions(+), 30 deletions(-) diff --git a/crates/pool-indexer/src/indexer/uniswap_v3.rs b/crates/pool-indexer/src/indexer/uniswap_v3.rs index 97115494f6..b7429e8877 100644 --- a/crates/pool-indexer/src/indexer/uniswap_v3.rs +++ b/crates/pool-indexer/src/indexer/uniswap_v3.rs @@ -912,12 +912,7 @@ mod tests { }; let liq_cache: LiquidityCache = HashMap::from([((POOL, 100u64), amount)]); let log = make_log(POOL, 100, event); - let c = collect_log_changes( - FACTORY, - &[log], - &liq_cache, - &Default::default(), - ); + let c = collect_log_changes(FACTORY, &[log], &liq_cache, &Default::default()); assert_eq!(c.tick_deltas.len(), 2); let lower = c.tick_deltas.iter().find(|d| d.tick_idx == -100).unwrap(); @@ -956,12 +951,7 @@ mod tests { }; let liq_cache: LiquidityCache = HashMap::from([((POOL, 201u64), after_mint_liq)]); let logs = vec![make_log(POOL, 200, swap), make_log(POOL, 201, mint)]; - let c = collect_log_changes( - FACTORY, - &logs, - &liq_cache, - &Default::default(), - ); + let c = collect_log_changes(FACTORY, &logs, &liq_cache, &Default::default()); assert_eq!(c.pool_states.len(), 1); // Swap established full_state; Mint updated its liquidity from the cache. @@ -991,12 +981,7 @@ mod tests { amount1: alloy::primitives::U256::ZERO, }; let logs = vec![make_log(POOL, 100, mint), make_log(POOL, 101, burn)]; - let c = collect_log_changes( - FACTORY, - &logs, - &Default::default(), - &Default::default(), - ); + let c = collect_log_changes(FACTORY, &logs, &Default::default(), &Default::default()); assert!(c.tick_deltas.is_empty(), "zero-net ticks must be pruned"); } @@ -1022,12 +1007,7 @@ mod tests { amount1: alloy::primitives::U256::ZERO, }; let logs = vec![make_log(POOL, 100, mint), make_log(POOL, 101, burn)]; - let c = collect_log_changes( - FACTORY, - &logs, - &Default::default(), - &Default::default(), - ); + let c = collect_log_changes(FACTORY, &logs, &Default::default(), &Default::default()); let expected = (mint_amount - burn_amount).cast_signed(); let lower = c.tick_deltas.iter().find(|d| d.tick_idx == -100).unwrap(); @@ -1050,12 +1030,7 @@ mod tests { tick: t(0), }; let logs = vec![make_log(FACTORY, 100, created), make_log(POOL, 100, init)]; - let c = collect_log_changes( - FACTORY, - &logs, - &Default::default(), - &Default::default(), - ); + let c = collect_log_changes(FACTORY, &logs, &Default::default(), &Default::default()); assert_eq!(c.new_pools.len(), 1); assert_eq!(c.pool_states.len(), 1); assert_eq!(c.pool_states[0].pool_address, POOL); From 9569ab1703759c3f19797260f1b7914a49f44476 Mon Sep 17 00:00:00 2001 From: Jan P Date: Fri, 24 Apr 2026 10:55:14 +0200 Subject: [PATCH 46/80] Add e2e integration test with driver --- crates/e2e/tests/e2e/pool_indexer.rs | 124 +++++++++++++++++++++++++-- 1 file changed, 119 insertions(+), 5 deletions(-) diff --git a/crates/e2e/tests/e2e/pool_indexer.rs b/crates/e2e/tests/e2e/pool_indexer.rs index 1a02db12c3..3c59209bec 100644 --- a/crates/e2e/tests/e2e/pool_indexer.rs +++ b/crates/e2e/tests/e2e/pool_indexer.rs @@ -5,8 +5,9 @@ use { sol_types::SolEvent, }, contracts::test::{MockUniswapV3Factory, MockUniswapV3Pool}, - e2e::setup::{TIMEOUT, run_test, wait_for_condition}, + e2e::setup::{OnchainComponents, TIMEOUT, colocation, run_test, wait_for_condition}, ethrpc::Web3, + number::units::EthUnit, pool_indexer::config::{ ApiConfig, Configuration, @@ -30,6 +31,7 @@ static CURRENT_HANDLE: Mutex>> = Mutex::new(N const POOL_INDEXER_PORT: u16 = 7778; const POOL_INDEXER_HOST: &str = "http://127.0.0.1:7778"; +const POOL_INDEXER_METRICS_PORT: u16 = 7779; const LOCAL_DB_URL: &str = "postgresql://"; // sqrt(1) * 2^96 — valid starting price @@ -60,8 +62,13 @@ async fn seed_checkpoint(db: &PgPool, factory: Address, block: u64) { /// Start the pool-indexer. Aborts any previously-running instance first /// (handles leftover from a prior test that panicked before calling -/// `stop_pool_indexer`). +/// `stop_pool_indexer`). `metrics_port = 0` asks the OS to pick a random +/// port; tests that need to scrape metrics should pass a fixed port. async fn start_pool_indexer(factory: Address) { + start_pool_indexer_at(factory, 0).await; +} + +async fn start_pool_indexer_at(factory: Address, metrics_port: u16) { // Abort any handle left over from a previous test that panicked. if let Some(old) = CURRENT_HANDLE.lock().unwrap().take() { old.abort(); @@ -94,10 +101,8 @@ async fn start_pool_indexer(factory: Address) { api: ApiConfig { bind_address: SocketAddr::V4(SocketAddrV4::new(Ipv4Addr::LOCALHOST, POOL_INDEXER_PORT)), }, - // Port 0 → OS-assigned random port so repeated start/stop inside a - // single test process doesn't collide on the default metrics port. metrics: pool_indexer::config::MetricsConfig { - bind_address: SocketAddr::V4(SocketAddrV4::new(Ipv4Addr::LOCALHOST, 0)), + bind_address: SocketAddr::V4(SocketAddrV4::new(Ipv4Addr::LOCALHOST, metrics_port)), }, }; let handle = tokio::task::spawn(pool_indexer::run(config)); @@ -527,3 +532,112 @@ async fn pagination(web3: Web3) { stop_pool_indexer(); } + +/// Reads the prometheus `/metrics` endpoint and extracts the request count +/// for `GET /api/v1/{network}/uniswap/v3/pools` with status 200. The metric +/// family name is `pool_indexer_api_requests` (optionally prefixed by the +/// process registry's namespace — e.g. `driver_pool_indexer_api_requests` +/// when the driver was the first to call `setup_registry_reentrant`), so we +/// substring-match on the route+status suffix rather than assume a prefix. +async fn pools_requests_counter(metrics_port: u16) -> u64 { + let text = reqwest::get(format!("http://127.0.0.1:{metrics_port}/metrics")) + .await + .unwrap() + .text() + .await + .unwrap(); + let needle = + r#"pool_indexer_api_requests{route="/api/v1/{network}/uniswap/v3/pools",status="200"}"#; + for line in text.lines() { + if line.starts_with('#') { + continue; + } + if let Some(idx) = line.find(needle) { + let after = line[idx + needle.len()..].trim(); + return after.parse().unwrap_or(0); + } + } + 0 +} + +#[tokio::test] +#[ignore] +async fn local_node_pool_indexer_driver_integration() { + run_test(driver_integration).await; +} + +/// End-to-end: pool-indexer indexes a mock V3 factory, driver starts with +/// `pool-indexer-url` pointing at the service, and we assert (via the +/// indexer's own request counter) that the driver actually hit `GET /pools` +/// during `UniswapV3PoolFetcher::new`. A baseline solver is spun up only +/// because the driver's TOML config requires at least one `[[solver]]`; the +/// solver itself isn't exercised here. +async fn driver_integration(web3: Web3) { + let db = PgPool::connect(LOCAL_DB_URL).await.unwrap(); + clear_pool_indexer_tables(&db).await; + + let mut onchain = OnchainComponents::deploy(web3.clone()).await; + let [solver] = onchain.make_solvers(10u64.eth()).await; + + let (factory, _pool_addr) = deploy_univ3(&web3).await; + let factory_addr = *factory.address(); + let head = web3.provider.get_block_number().await.unwrap(); + seed_checkpoint(&db, factory_addr, 0).await; + + start_pool_indexer_at(factory_addr, POOL_INDEXER_METRICS_PORT).await; + + wait_for_condition(TIMEOUT, || async { + let resp = reqwest::get(format!( + "{POOL_INDEXER_HOST}/api/v1/mainnet/uniswap/v3/pools" + )) + .await + .ok()?; + let body: serde_json::Value = resp.json().await.ok()?; + Some(body["block_number"].as_u64()? >= head) + }) + .await + .expect("indexer did not reach head"); + + // Capture baseline after all test-side warm-up requests so the final + // assertion proves a bump came from the driver, not from the polling + // above. + let baseline = pools_requests_counter(POOL_INDEXER_METRICS_PORT).await; + + let baseline_solver = colocation::start_baseline_solver( + "test_solver".into(), + solver.clone(), + *onchain.contracts().weth.address(), + vec![], + 1, + true, + ) + .await; + + // The router address is required by the `manual` variant of the + // uniswap-v3 config but only used at settlement time — any 20-byte value + // is fine for a pool-fetch-only integration test. + let config_override = format!( + r#" +[[liquidity.uniswap-v3]] +router = "0x000000000000000000000000000000000000dEaD" +pool-indexer-url = "{POOL_INDEXER_HOST}" +max-pools-to-initialize = 10 +"# + ); + let driver_handle = colocation::start_driver_with_config_override( + onchain.contracts(), + vec![baseline_solver], + colocation::LiquidityProvider::UniswapV2, + false, + Some(&config_override), + ); + + wait_for_condition(TIMEOUT, || async { + pools_requests_counter(POOL_INDEXER_METRICS_PORT).await > baseline + }) + .await + .expect("driver did not query pool-indexer /pools within timeout"); + + driver_handle.abort(); + stop_pool_indexer(); +} From 7a1aedbfeb3e6d6cca0232c3717c59ff739ffa2d Mon Sep 17 00:00:00 2001 From: Jan P Date: Fri, 24 Apr 2026 10:58:42 +0200 Subject: [PATCH 47/80] Improve test --- crates/e2e/tests/e2e/pool_indexer.rs | 49 +++++++++++++++++++--------- 1 file changed, 34 insertions(+), 15 deletions(-) diff --git a/crates/e2e/tests/e2e/pool_indexer.rs b/crates/e2e/tests/e2e/pool_indexer.rs index 3c59209bec..fb78c87e28 100644 --- a/crates/e2e/tests/e2e/pool_indexer.rs +++ b/crates/e2e/tests/e2e/pool_indexer.rs @@ -539,20 +539,26 @@ async fn pagination(web3: Web3) { /// process registry's namespace — e.g. `driver_pool_indexer_api_requests` /// when the driver was the first to call `setup_registry_reentrant`), so we /// substring-match on the route+status suffix rather than assume a prefix. -async fn pools_requests_counter(metrics_port: u16) -> u64 { +/// Reads the prometheus counter `api_requests{route, status="200"}` for the +/// given route template (e.g. `/api/v1/{network}/uniswap/v3/pools`). The +/// metric family name is `pool_indexer_api_requests`, optionally prefixed by +/// the process registry's namespace (e.g. `driver_pool_indexer_api_requests` +/// when the driver was the first to call `setup_registry_reentrant`), so we +/// substring-match on the family-name-plus-labels rather than assume a +/// prefix. +async fn api_requests_counter(metrics_port: u16, route: &str) -> u64 { let text = reqwest::get(format!("http://127.0.0.1:{metrics_port}/metrics")) .await .unwrap() .text() .await .unwrap(); - let needle = - r#"pool_indexer_api_requests{route="/api/v1/{network}/uniswap/v3/pools",status="200"}"#; + let needle = format!(r#"pool_indexer_api_requests{{route="{route}",status="200"}}"#); for line in text.lines() { if line.starts_with('#') { continue; } - if let Some(idx) = line.find(needle) { + if let Some(idx) = line.find(&needle) { let after = line[idx + needle.len()..].trim(); return after.parse().unwrap_or(0); } @@ -568,11 +574,15 @@ async fn local_node_pool_indexer_driver_integration() { /// End-to-end: pool-indexer indexes a mock V3 factory, driver starts with /// `pool-indexer-url` pointing at the service, and we assert (via the -/// indexer's own request counter) that the driver actually hit `GET /pools` -/// during `UniswapV3PoolFetcher::new`. A baseline solver is spun up only -/// because the driver's TOML config requires at least one `[[solver]]`; the -/// solver itself isn't exercised here. +/// indexer's own request counters) that the driver actually fetched pools +/// AND their ticks. The ticks endpoint is the stronger signal — it only +/// fires after `UniswapV3PoolFetcher::new` has a non-empty registered-pool +/// set to pick a top-N from. A baseline solver is spun up only because the +/// driver's TOML config requires at least one `[[solver]]`. async fn driver_integration(web3: Web3) { + const POOLS_ROUTE: &str = "/api/v1/{network}/uniswap/v3/pools"; + const TICKS_ROUTE: &str = "/api/v1/{network}/uniswap/v3/pools/ticks"; + let db = PgPool::connect(LOCAL_DB_URL).await.unwrap(); clear_pool_indexer_tables(&db).await; @@ -586,6 +596,10 @@ async fn driver_integration(web3: Web3) { start_pool_indexer_at(factory_addr, POOL_INDEXER_METRICS_PORT).await; + // Wait until the indexer has both caught up to head AND surfaced the + // seeded pool. If we only check the block number the driver could race + // in and see an empty registered-pool set, which would never trigger a + // ticks fetch and silently degrade the test. wait_for_condition(TIMEOUT, || async { let resp = reqwest::get(format!( "{POOL_INDEXER_HOST}/api/v1/mainnet/uniswap/v3/pools" @@ -593,15 +607,18 @@ async fn driver_integration(web3: Web3) { .await .ok()?; let body: serde_json::Value = resp.json().await.ok()?; - Some(body["block_number"].as_u64()? >= head) + let at_head = body["block_number"].as_u64()? >= head; + let has_pool = !body["pools"].as_array()?.is_empty(); + Some(at_head && has_pool) }) .await - .expect("indexer did not reach head"); + .expect("indexer did not reach head with pool visible"); - // Capture baseline after all test-side warm-up requests so the final - // assertion proves a bump came from the driver, not from the polling + // Capture baselines after all test-side warm-up requests so the final + // assertions prove the bumps came from the driver, not from the polling // above. - let baseline = pools_requests_counter(POOL_INDEXER_METRICS_PORT).await; + let baseline_pools = api_requests_counter(POOL_INDEXER_METRICS_PORT, POOLS_ROUTE).await; + let baseline_ticks = api_requests_counter(POOL_INDEXER_METRICS_PORT, TICKS_ROUTE).await; let baseline_solver = colocation::start_baseline_solver( "test_solver".into(), @@ -633,10 +650,12 @@ max-pools-to-initialize = 10 ); wait_for_condition(TIMEOUT, || async { - pools_requests_counter(POOL_INDEXER_METRICS_PORT).await > baseline + let pools = api_requests_counter(POOL_INDEXER_METRICS_PORT, POOLS_ROUTE).await; + let ticks = api_requests_counter(POOL_INDEXER_METRICS_PORT, TICKS_ROUTE).await; + pools > baseline_pools && ticks > baseline_ticks }) .await - .expect("driver did not query pool-indexer /pools within timeout"); + .expect("driver did not complete pool + tick fetch from pool-indexer within timeout"); driver_handle.abort(); stop_pool_indexer(); From 145499b806a595f7136ac4d93f1ab30cb0fd0c61 Mon Sep 17 00:00:00 2001 From: Jan P Date: Fri, 24 Apr 2026 15:24:02 +0200 Subject: [PATCH 48/80] PR feedback #1 --- Cargo.lock | 1 + .../src/boundary/liquidity/uniswap/v3.rs | 52 ++++++------ .../src/uniswap_v3/pool_indexer.rs | 6 +- crates/number/src/conversions.rs | 7 +- crates/pool-indexer/Cargo.toml | 1 + crates/pool-indexer/src/api/mod.rs | 82 ++++--------------- crates/pool-indexer/src/api/routes.rs | 74 +++++++++++++++++ crates/pool-indexer/src/api/uniswap_v3/mod.rs | 53 ++++++------ .../pool-indexer/src/api/uniswap_v3/pools.rs | 60 ++++++++++---- .../pool-indexer/src/api/uniswap_v3/ticks.rs | 18 ++-- crates/pool-indexer/src/subgraph_seeder.rs | 40 +++++---- 11 files changed, 231 insertions(+), 163 deletions(-) create mode 100644 crates/pool-indexer/src/api/routes.rs diff --git a/Cargo.lock b/Cargo.lock index 56b1bca7c6..56f3b81add 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -6326,6 +6326,7 @@ dependencies = [ "tikv-jemallocator", "tokio", "toml", + "tower 0.5.3", "tower-http", "tracing", "url", diff --git a/crates/driver/src/boundary/liquidity/uniswap/v3.rs b/crates/driver/src/boundary/liquidity/uniswap/v3.rs index 8364180d09..a7fd2d93af 100644 --- a/crates/driver/src/boundary/liquidity/uniswap/v3.rs +++ b/crates/driver/src/boundary/liquidity/uniswap/v3.rs @@ -119,30 +119,7 @@ async fn init_liquidity( config: &infra::liquidity::config::UniswapV3, ) -> anyhow::Result> { let web3 = eth.web3().clone(); - let http = boundary::liquidity::http_client(); - - let source: Arc = if let Some(url) = &config.pool_indexer_url { - tracing::info!(%url, "uniswap v3: using pool-indexer as data source"); - Arc::new( - PoolIndexerClient::new(url.clone(), eth.chain(), http) - .context("failed to construct pool-indexer client")?, - ) - } else { - let graph_url = config - .graph_url - .as_ref() - .context("uniswap v3: graph_url required when pool_indexer_url is unset")?; - tracing::info!(url = %graph_url, "uniswap v3: using subgraph as data source"); - Arc::new( - UniV3SubgraphClient::from_subgraph_url( - graph_url, - http, - config.max_pools_per_tick_query, - ) - .await - .context("failed to construct UniV3 subgraph client")?, - ) - }; + let source = build_pool_data_source(eth, config).await?; let pool_fetcher = Arc::new( UniswapV3PoolFetcher::new( @@ -165,3 +142,30 @@ async fn init_liquidity( pool_fetcher, )) } + +/// Picks the V3 pool data source based on config precedence. +async fn build_pool_data_source( + eth: &Ethereum, + config: &infra::liquidity::config::UniswapV3, +) -> anyhow::Result> { + let http = boundary::liquidity::http_client(); + + if let Some(url) = &config.pool_indexer_url { + tracing::info!(%url, "uniswap v3: using pool-indexer as data source"); + return Ok(Arc::new( + PoolIndexerClient::new(url.clone(), eth.chain(), http) + .context("failed to construct pool-indexer client")?, + )); + } + + let graph_url = config + .graph_url + .as_ref() + .context("uniswap v3: graph_url required when pool_indexer_url is unset")?; + tracing::info!(url = %graph_url, "uniswap v3: using subgraph as data source"); + Ok(Arc::new( + UniV3SubgraphClient::from_subgraph_url(graph_url, http, config.max_pools_per_tick_query) + .await + .context("failed to construct UniV3 subgraph client")?, + )) +} diff --git a/crates/liquidity-sources/src/uniswap_v3/pool_indexer.rs b/crates/liquidity-sources/src/uniswap_v3/pool_indexer.rs index 717ae9864d..53e109a97c 100644 --- a/crates/liquidity-sources/src/uniswap_v3/pool_indexer.rs +++ b/crates/liquidity-sources/src/uniswap_v3/pool_indexer.rs @@ -145,9 +145,9 @@ impl V3PoolDataSource for PoolIndexerClient { async fn get_registered_pools(&self) -> Result { // Paginate through the full pool set. The block_number returned from // the first page is what we pin the snapshot to — subsequent pages - // may report a higher block, which we tolerate as bounded drift - // (see block-coherence discussion; driver's event replay takes it - // from there). + // may report a higher block, which we tolerate as bounded drift: the + // driver's event replay picks up anything committed after this + // snapshot. let mut cursor: Option = None; let mut pools: Vec = Vec::new(); let mut fetched_block_number: u64 = 0; diff --git a/crates/number/src/conversions.rs b/crates/number/src/conversions.rs index 4d7daf084a..b63e87226e 100644 --- a/crates/number/src/conversions.rs +++ b/crates/number/src/conversions.rs @@ -1,12 +1,13 @@ use { - alloy_primitives::{U256, aliases::I512}, + alloy_primitives::{ + U256, + aliases::{I512, U160}, + }, anyhow::{Result, ensure}, bigdecimal::{BigDecimal, num_bigint::ToBigInt}, num::{BigInt, BigRational, BigUint, Zero, bigint::Sign, rational::Ratio}, }; -type U160 = alloy_primitives::aliases::U160; - pub fn big_decimal_to_big_uint(big_decimal: &BigDecimal) -> Option { // TODO(vkgnosis): It would be nice to avoid copying the underlying BigInt when // converting BigDecimal to anything else but the simple diff --git a/crates/pool-indexer/Cargo.toml b/crates/pool-indexer/Cargo.toml index 2f1cbcebaf..f6f5e6121d 100644 --- a/crates/pool-indexer/Cargo.toml +++ b/crates/pool-indexer/Cargo.toml @@ -40,6 +40,7 @@ sqlx = { workspace = true } tikv-jemallocator = { workspace = true } tokio = { workspace = true, features = ["macros", "rt-multi-thread", "signal", "sync", "time"] } toml = { workspace = true } +tower = { workspace = true } tower-http = { workspace = true, features = ["trace"] } tracing = { workspace = true } url = { workspace = true } diff --git a/crates/pool-indexer/src/api/mod.rs b/crates/pool-indexer/src/api/mod.rs index 4c2f65ee23..597589c65c 100644 --- a/crates/pool-indexer/src/api/mod.rs +++ b/crates/pool-indexer/src/api/mod.rs @@ -1,20 +1,16 @@ +pub mod routes; pub mod uniswap_v3; +pub use routes::router; use { crate::config::NetworkName, axum::{ Json, - Router, - extract::{MatchedPath, Request}, http::StatusCode, - middleware::{self, Next}, response::{IntoResponse, Response}, - routing::get, }, sqlx::PgPool, - std::{collections::HashMap, sync::Arc}, - tower_http::trace::{DefaultMakeSpan, DefaultOnResponse, TraceLayer}, - tracing::Level, + std::collections::HashMap, }; #[derive(Clone)] @@ -33,15 +29,25 @@ impl AppState { /// Structured error type for API handlers. Each variant decides its own HTTP /// status + body via the `IntoResponse` impl so formatting lives in one place /// and helpers can `?`-propagate failures instead of handing around prebuilt -/// `Response` values. +/// `Response` values. Input-shape errors (bad addresses, bad cursors, too +/// many ids) are handled earlier by the serde extractors and come back as +/// axum's default 400s — see [`crate::api::uniswap_v3::PoolIds`]. #[derive(Debug)] pub enum ApiError { + /// `{network}` path segment doesn't match any configured network. Says + /// nothing about whether the network exists in the world, only that + /// this indexer wasn't told about it. NetworkNotFound, + /// The indexer has no checkpoint yet for this chain — it's still in + /// bootstrap. Returned as 503 so clients retry rather than treat it + /// as a permanent empty set. NotReady, - InvalidPoolId, - InvalidPoolAddress, + /// The `after=` cursor didn't parse as a 20-byte hex address. Cursors + /// are opaque but not arbitrary — clients must pass back exactly what + /// the previous response returned. InvalidCursor, - TooManyPoolIds { max: usize }, + /// Unexpected failure inside the handler (usually DB). Body is generic + /// 500; the underlying error is logged server-side. Internal(anyhow::Error), } @@ -50,10 +56,7 @@ impl IntoResponse for ApiError { match self { Self::NetworkNotFound => StatusCode::NOT_FOUND.into_response(), Self::NotReady => StatusCode::SERVICE_UNAVAILABLE.into_response(), - Self::InvalidPoolId => bad_request("invalid pool id"), - Self::InvalidPoolAddress => bad_request("invalid pool address"), Self::InvalidCursor => bad_request("invalid cursor"), - Self::TooManyPoolIds { max } => bad_request(format!("too many pool ids; max {max}")), Self::Internal(err) => { tracing::error!(?err, "internal error"); StatusCode::INTERNAL_SERVER_ERROR.into_response() @@ -87,54 +90,3 @@ pub(super) async fn latest_indexed_block(state: &AppState, chain_id: u64) -> Res .await? .ok_or(ApiError::NotReady) } - -pub fn router(state: Arc) -> Router { - Router::new() - .route("/health", get(health)) - .route( - "/api/v1/{network}/uniswap/v3/pools", - get(uniswap_v3::get_pools), - ) - .route( - "/api/v1/{network}/uniswap/v3/pools/ticks", - get(uniswap_v3::get_ticks_bulk), - ) - .route( - "/api/v1/{network}/uniswap/v3/pools/{pool_address}/ticks", - get(uniswap_v3::get_ticks), - ) - .with_state(state) - .layer(middleware::from_fn(record_request_metrics)) - .layer( - TraceLayer::new_for_http() - .make_span_with(DefaultMakeSpan::new().level(Level::INFO)) - .on_response(DefaultOnResponse::new().level(Level::INFO)), - ) -} - -async fn health() -> impl IntoResponse { - StatusCode::OK -} - -/// Emits per-request `api_requests` (count) and `api_request_seconds` -/// (latency) metrics labelled by the matched route template (e.g. -/// `/api/v1/{network}/uniswap/v3/pools`) rather than the concrete URL — so -/// the cardinality stays bounded no matter how many networks / addresses -/// flow through. -async fn record_request_metrics(req: Request, next: Next) -> Response { - let route = req - .extensions() - .get::() - .map(|p| p.as_str().to_owned()) - .unwrap_or_else(|| "unmatched".to_owned()); - let metrics = crate::metrics::Metrics::get(); - let labels = [route.as_str()]; - let _timer = crate::metrics::Metrics::timer(&metrics.api_request_seconds, &labels); - let response = next.run(req).await; - let status = response.status().as_u16().to_string(); - metrics - .api_requests - .with_label_values(&[route.as_str(), status.as_str()]) - .inc(); - response -} diff --git a/crates/pool-indexer/src/api/routes.rs b/crates/pool-indexer/src/api/routes.rs new file mode 100644 index 0000000000..33895b81cd --- /dev/null +++ b/crates/pool-indexer/src/api/routes.rs @@ -0,0 +1,74 @@ +//! HTTP routing for the pool-indexer API. Keeps the wiring — route table, +//! middleware, span extraction — separate from the type definitions in +//! `super` so either side can change without churn in the other. + +use { + super::{AppState, uniswap_v3}, + axum::{ + Router, + extract::{MatchedPath, Request}, + http::StatusCode, + middleware::{self, Next}, + response::{IntoResponse, Response}, + routing::get, + }, + observe::tracing::distributed::axum::{make_span, record_trace_id}, + std::sync::Arc, + tower::ServiceBuilder, + tower_http::trace::TraceLayer, +}; + +/// Builds the full axum `Router` for the pool-indexer API. Mounts handlers, +/// attaches the metrics middleware, and wires the distributed-tracing layer +/// so `traceparent` / B3 headers on incoming requests seed the current +/// span — letting logs correlate across services. +pub fn router(state: Arc) -> Router { + Router::new() + .route("/health", get(health)) + .route( + "/api/v1/{network}/uniswap/v3/pools", + get(uniswap_v3::get_pools), + ) + .route( + "/api/v1/{network}/uniswap/v3/pools/ticks", + get(uniswap_v3::get_ticks_bulk), + ) + .route( + "/api/v1/{network}/uniswap/v3/pools/{pool_address}/ticks", + get(uniswap_v3::get_ticks), + ) + .with_state(state) + .layer(middleware::from_fn(record_request_metrics)) + .layer( + ServiceBuilder::new() + .layer(TraceLayer::new_for_http().make_span_with(make_span)) + .map_request(record_trace_id), + ) +} + +async fn health() -> impl IntoResponse { + StatusCode::OK +} + +/// Emits per-request `api_requests` (count) and `api_request_seconds` +/// (latency) metrics labelled by the matched route template (e.g. +/// `/api/v1/{network}/uniswap/v3/pools`) rather than the concrete URL — so +/// the cardinality stays bounded no matter how many networks / addresses +/// flow through. +async fn record_request_metrics(req: Request, next: Next) -> Response { + let route = req + .extensions() + .get::() + .map(|p| p.as_str().to_owned()) + .unwrap_or_else(|| "unmatched".to_owned()); + let metrics = crate::metrics::Metrics::get(); + let labels = [route.as_str()]; + let _timer = crate::metrics::Metrics::timer(&metrics.api_request_seconds, &labels); + let response = next.run(req).await; + let status = response.status().as_u16().to_string(); + metrics + .api_requests + .with_label_values(&[route.as_str(), status.as_str()]) + .inc(); + response +} diff --git a/crates/pool-indexer/src/api/uniswap_v3/mod.rs b/crates/pool-indexer/src/api/uniswap_v3/mod.rs index 308b19463d..38c0e15537 100644 --- a/crates/pool-indexer/src/api/uniswap_v3/mod.rs +++ b/crates/pool-indexer/src/api/uniswap_v3/mod.rs @@ -2,9 +2,9 @@ pub mod pools; pub mod ticks; use { - crate::api::ApiError, alloy_primitives::Address, bigdecimal::{BigDecimal, num_bigint::ToBigInt}, + serde::{Deserialize, Deserializer}, }; pub use { pools::get_pools, @@ -15,6 +15,32 @@ pub use { /// URL under typical proxy limits and bounds DB query size. pub(super) const MAX_POOL_IDS_PER_REQUEST: usize = 500; +/// Newtype over `Vec
` that deserializes from a comma-separated list +/// of 20-byte hex addresses in URL query strings (`0x…,0x…`). Parsing + +/// capping happen at the extractor boundary so handlers work with typed +/// addresses instead of raw strings. +pub(crate) struct PoolIds(pub Vec
); + +impl<'de> Deserialize<'de> for PoolIds { + fn deserialize>(de: D) -> Result { + let raw = <&str>::deserialize(de)?; + let mut out = Vec::new(); + for entry in raw.split(',').map(str::trim).filter(|s| !s.is_empty()) { + out.push( + entry + .parse::
() + .map_err(|_| serde::de::Error::custom("invalid pool id"))?, + ); + } + if out.len() > MAX_POOL_IDS_PER_REQUEST { + return Err(serde::de::Error::custom(format!( + "too many pool ids; max {MAX_POOL_IDS_PER_REQUEST}" + ))); + } + Ok(PoolIds(out)) + } +} + /// Serializes any [`Display`](std::fmt::Display) value as a JSON string. pub(super) fn serialize_display( value: &T, @@ -45,31 +71,6 @@ pub(super) fn serialize_integer( } } -pub(super) fn parse_hex_address(s: &str) -> Result { - s.parse::
() - .map_err(|_| ApiError::InvalidPoolAddress) -} - -/// Parses a comma-separated list of pool addresses (`0x…,0x…`). Empty entries -/// are skipped. -pub(super) fn parse_pool_ids(raw: &str) -> Result, ApiError> { - let mut out = Vec::new(); - for entry in raw.split(',').filter(|s| !s.is_empty()) { - out.push( - entry - .trim() - .parse::
() - .map_err(|_| ApiError::InvalidPoolId)?, - ); - } - if out.len() > MAX_POOL_IDS_PER_REQUEST { - return Err(ApiError::TooManyPoolIds { - max: MAX_POOL_IDS_PER_REQUEST, - }); - } - Ok(out) -} - #[cfg(test)] mod tests { use { diff --git a/crates/pool-indexer/src/api/uniswap_v3/pools.rs b/crates/pool-indexer/src/api/uniswap_v3/pools.rs index 8d06948641..cab2ee8f1c 100644 --- a/crates/pool-indexer/src/api/uniswap_v3/pools.rs +++ b/crates/pool-indexer/src/api/uniswap_v3/pools.rs @@ -1,5 +1,5 @@ use { - super::{parse_pool_ids, serialize_display, serialize_integer}, + super::{PoolIds, serialize_display, serialize_integer}, crate::{ api::{ApiError, AppState, latest_indexed_block, resolve_chain_id}, db::uniswap_v3 as db, @@ -23,10 +23,10 @@ use { /// 2. Neither — cursor-paginated list of all pools. #[derive(Deserialize)] pub struct PoolsQuery { - /// Comma-separated list of pool addresses (`0x…,0x…`). Capped at - /// [`super::MAX_POOL_IDS_PER_REQUEST`] entries; callers with more - /// addresses should chunk their requests. - pub pool_ids: Option, + /// Comma-separated list of pool addresses (`0x…,0x…`) parsed eagerly. + /// Capped at [`super::MAX_POOL_IDS_PER_REQUEST`] entries; callers with + /// more addresses should chunk their requests. + pub pool_ids: Option, /// Opaque cursor returned by the previous page; omit to start from the /// beginning. Ignored when `pool_ids` is set. pub after: Option, @@ -76,24 +76,46 @@ pub struct PoolsResponse { pub next_cursor: Option, } +/// Normalised view of a [`PoolsQuery`]: which of the two request shapes the +/// client is asking for. enum PoolsRequest<'a> { - ByIds(&'a str), + /// Bulk lookup by address list. + ByIds(&'a [Address]), + /// Cursor-paginated full listing. PaginatedList, } +/// Default number of pools to return per page when the client doesn't +/// specify a `limit`. Sized so a full mainnet pool set can be drained in +/// a few pages. +const DEFAULT_PAGE_LIMIT: u64 = 1_000; + +/// Hard cap on `limit` to bound both query time and response size. Server +/// applies this even if the client asks for more. +const MAX_PAGE_LIMIT: u64 = 5_000; + impl PoolsQuery { + /// Dispatch the incoming query to the right handler shape — see + /// [`PoolsRequest`]. `pool_ids` wins over pagination when present. fn request(&self) -> PoolsRequest<'_> { - if let Some(pool_ids) = self.pool_ids.as_deref() { - PoolsRequest::ByIds(pool_ids) + if let Some(PoolIds(ids)) = &self.pool_ids { + PoolsRequest::ByIds(ids) } else { PoolsRequest::PaginatedList } } + /// Resolve the effective page size: the client-supplied `limit` clamped + /// to `[1, MAX_PAGE_LIMIT]`, defaulting to `DEFAULT_PAGE_LIMIT`. fn page_limit(&self) -> u64 { - self.limit.unwrap_or(1000).clamp(1, 5000) + self.limit + .unwrap_or(DEFAULT_PAGE_LIMIT) + .clamp(1, MAX_PAGE_LIMIT) } + /// Parse the opaque `after` cursor back to the 20-byte address key used + /// by the DB's keyset pagination. Returns `InvalidCursor` on malformed + /// input so callers see a 400 rather than an empty page. fn cursor(&self) -> Result>, ApiError> { self.after .as_deref() @@ -135,6 +157,9 @@ fn non_empty(s: &Option) -> Option { s.as_ref().filter(|s| !s.is_empty()).cloned() } +/// Converts a slice of DB rows into the on-the-wire [`PoolsResponse`] +/// envelope, attaching the indexed-block tag and optional pagination +/// cursor. Centralised here so every route emits the same JSON shape. fn pools_response( block_number: u64, rows: &[db::PoolRow], @@ -149,9 +174,14 @@ fn pools_response( } /// Returns a cursor-paginated list of all indexed pools, ordered by address. -/// Fetches `limit + 1` rows to detect whether a next page exists; the extra -/// row is stripped from the response and its address is returned as -/// `next_cursor`. +/// +/// Pagination is last-value-seen: the DB query returns `limit + 1` rows to +/// detect whether a next page exists, the extra row is dropped, and the +/// address of the last row in the returned page becomes the `next_cursor`. +/// The next request passes that back as `after=…`, and the DB uses +/// `WHERE address > $cursor` to pick up from the row immediately after it — +/// so the cursor points at the *last row served*, not the next one to +/// serve. async fn list_pools( state: &AppState, chain_id: u64, @@ -161,7 +191,6 @@ async fn list_pools( let limit = query.page_limit(); let cursor = query.cursor()?; - // Fetch one extra row to determine if there is a next page. let mut rows = db::get_pools(&state.db, chain_id, cursor, limit + 1).await?; let has_next = rows.len() > limit as usize; @@ -180,12 +209,11 @@ async fn list_pools( async fn lookup_pools_by_ids( state: &AppState, chain_id: u64, - raw_ids: &str, + addresses: &[Address], ) -> Result { - let addresses = parse_pool_ids(raw_ids)?; let (block, pools) = tokio::join!( latest_indexed_block(state, chain_id), - db::get_pools_by_ids(&state.db, chain_id, &addresses), + db::get_pools_by_ids(&state.db, chain_id, addresses), ); Ok(pools_response(block?, &pools?, None)) } diff --git a/crates/pool-indexer/src/api/uniswap_v3/ticks.rs b/crates/pool-indexer/src/api/uniswap_v3/ticks.rs index 4bbf69268e..416fe2cbf6 100644 --- a/crates/pool-indexer/src/api/uniswap_v3/ticks.rs +++ b/crates/pool-indexer/src/api/uniswap_v3/ticks.rs @@ -1,5 +1,5 @@ use { - super::{parse_hex_address, parse_pool_ids, serialize_integer}, + super::{PoolIds, serialize_integer}, crate::{ api::{ApiError, AppState, latest_indexed_block, resolve_chain_id}, db::uniswap_v3 as db, @@ -41,9 +41,9 @@ pub struct TicksResponse { /// Query parameters for the bulk ticks endpoint. #[derive(Deserialize)] pub struct BulkTicksQuery { - /// Comma-separated list of pool addresses (`0x…,0x…`). Capped at - /// [`super::MAX_POOL_IDS_PER_REQUEST`] entries. - pub pool_ids: String, + /// Comma-separated list of pool addresses (`0x…,0x…`) parsed eagerly. + /// Capped at [`super::MAX_POOL_IDS_PER_REQUEST`] entries. + pub pool_ids: PoolIds, } /// One pool's worth of ticks in a bulk response. @@ -64,10 +64,9 @@ pub struct BulkTicksResponse { pub async fn get_ticks( State(state): State>, - Path((network, pool_address)): Path<(String, String)>, + Path((network, pool)): Path<(String, Address)>, ) -> Result { let chain_id = resolve_chain_id(&state, &network)?; - let pool = parse_hex_address(&pool_address)?; let (block, ticks) = tokio::join!( latest_indexed_block(&state, chain_id), @@ -91,14 +90,13 @@ pub async fn get_ticks( pub async fn get_ticks_bulk( State(state): State>, Path(network): Path, - Query(query): Query, + Query(BulkTicksQuery { pool_ids }): Query, ) -> Result { let chain_id = resolve_chain_id(&state, &network)?; - let pool_ids = parse_pool_ids(&query.pool_ids)?; let (block, ticks) = tokio::join!( latest_indexed_block(&state, chain_id), - db::get_ticks_for_pools(&state.db, chain_id, &pool_ids), + db::get_ticks_for_pools(&state.db, chain_id, &pool_ids.0), ); Ok(Json(BulkTicksResponse { @@ -109,7 +107,7 @@ pub async fn get_ticks_bulk( } fn group_ticks_by_pool(rows: Vec) -> Vec { - let mut groups: HashMap> = HashMap::new(); + let mut groups: HashMap> = HashMap::with_capacity(rows.len()); for row in rows { groups.entry(row.pool_address).or_default().push(TickEntry { tick_idx: row.tick_idx, diff --git a/crates/pool-indexer/src/subgraph_seeder.rs b/crates/pool-indexer/src/subgraph_seeder.rs index 0a06d10160..db96d46ab7 100644 --- a/crates/pool-indexer/src/subgraph_seeder.rs +++ b/crates/pool-indexer/src/subgraph_seeder.rs @@ -4,8 +4,10 @@ //! //! 1. **Pools** — all pools and their current state are fetched with keyset //! pagination and written to the DB in page-sized transactions. -//! 2. **Ticks** — existing tick rows are cleared, then each pool's ticks are -//! fetched concurrently (up to [`TICK_CONCURRENCY`] at a time) and written. +//! 2. **Ticks** — each pool's ticks are fetched concurrently (up to +//! [`TICK_CONCURRENCY`] at a time) and buffered; the existing tick rows are +//! then deleted and the buffered set inserted in a single transaction so the +//! API never observes an empty tick set mid-reseed. //! //! Both phases query the subgraph at the same fixed block number so the //! snapshot is consistent. After seeding, the caller should invoke @@ -326,25 +328,31 @@ impl<'a> SubgraphSeeder<'a> { } async fn seed_ticks(&self, pool_ids: &[String]) -> Result { - // Clear this factory's existing tick data so seeded values are - // authoritative — prevents stale rows (e.g. ticks burned to 0 before - // the seed block) from persisting if the seeder is re-run on a - // non-empty database. Scoped to `self.factory` so a reseed doesn't - // wipe another factory's ticks on the same chain. - db::delete_ticks_for_factory(self.db, self.chain_id, &self.factory).await?; - - let mut total_ticks = 0usize; + // All delete + insert work happens inside one transaction so the + // API never observes an empty tick set mid-reseed. Scoped to + // `self.factory` so a reseed doesn't wipe another factory's ticks + // on the same chain. + // + // Subgraph fetches run outside the transaction — the result is + // buffered and only the final DB writes are transactional, which + // keeps the tx short and avoids holding a DB connection during + // slow HTTP I/O. + let mut all_ticks: Vec = Vec::new(); for pool_batch in pool_ids.chunks(TICK_CONCURRENCY) { let ticks = self.fetch_tick_batch(pool_batch).await?; + all_ticks.extend(ticks); + info!(total = all_ticks.len(), "ticks fetched"); + } - if !ticks.is_empty() { - db::batch_seed_ticks(self.db, self.chain_id, &self.factory, &ticks).await?; - } - - total_ticks += ticks.len(); - info!(total = total_ticks, "ticks seeded"); + let total_ticks = all_ticks.len(); + let mut tx = self.db.begin().await.context("begin tick reseed tx")?; + db::delete_ticks_for_factory(&mut *tx, self.chain_id, &self.factory).await?; + if !all_ticks.is_empty() { + db::batch_seed_ticks(&mut *tx, self.chain_id, &self.factory, &all_ticks).await?; } + tx.commit().await.context("commit tick reseed tx")?; + info!(total = total_ticks, "ticks seeded"); Ok(total_ticks) } From 690d7fffbcdafe04347b14d4dbe7a879322b662c Mon Sep 17 00:00:00 2001 From: Jan P Date: Tue, 28 Apr 2026 07:44:06 +0200 Subject: [PATCH 49/80] Comment --- crates/driver/src/infra/config/file/mod.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/crates/driver/src/infra/config/file/mod.rs b/crates/driver/src/infra/config/file/mod.rs index 8e0e2a0751..6608a949c3 100644 --- a/crates/driver/src/infra/config/file/mod.rs +++ b/crates/driver/src/infra/config/file/mod.rs @@ -540,6 +540,9 @@ enum UniswapV3Config { #[serde(default = "uniswap_v3::default_max_pools_to_initialize")] max_pools_to_initialize: usize, + // TODO: model these two URLs as an enum (Graph / PoolIndexer / Both) + // once serde supports `deny_unknown_fields` with internally-tagged or + // flattened enum variants — https://github.com/serde-rs/serde/issues/1547. /// The URL used to connect to uniswap v3 subgraph client. At least one /// of `graph_url` or `pool_indexer_url` must be set; `pool_indexer_url` /// takes precedence when both are provided. @@ -578,6 +581,9 @@ enum UniswapV3Config { #[serde(default = "uniswap_v3::default_max_pools_per_tick_query")] max_pools_per_tick_query: usize, + // TODO: model these two URLs as an enum (Graph / PoolIndexer / Both) + // once serde supports `deny_unknown_fields` with internally-tagged or + // flattened enum variants — https://github.com/serde-rs/serde/issues/1547. /// The URL used to connect to uniswap v3 subgraph client. At least one /// of `graph_url` or `pool_indexer_url` must be set; `pool_indexer_url` /// takes precedence when both are provided. From 521237fcd9e75e5a0aa3fee1dcbf58abe229acf3 Mon Sep 17 00:00:00 2001 From: Jan P Date: Tue, 28 Apr 2026 07:47:38 +0200 Subject: [PATCH 50/80] Cmt --- crates/liquidity-sources/src/uniswap_v3/mod.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/crates/liquidity-sources/src/uniswap_v3/mod.rs b/crates/liquidity-sources/src/uniswap_v3/mod.rs index e0bd534ace..712d21870c 100644 --- a/crates/liquidity-sources/src/uniswap_v3/mod.rs +++ b/crates/liquidity-sources/src/uniswap_v3/mod.rs @@ -17,8 +17,10 @@ use { #[async_trait] pub trait V3PoolDataSource: Send + Sync + 'static { /// Fetch the full set of pools the source knows about, tagged with the - /// block number the snapshot was taken at. Ticks are NOT populated; use - /// [`Self::get_pools_with_ticks_by_ids`] for that. + /// block number the snapshot was taken at. `PoolData::ticks` is always + /// `None` here — callers needing ticks must use + /// [`Self::get_pools_with_ticks_by_ids`] separately. The split lets a + /// cheap "what pools exist?" lookup skip the expensive tick fetch. async fn get_registered_pools(&self) -> Result; /// Fetch pools + their active ticks for the given pool addresses. The From 23a0a59c2871388e5352d7578a4e95a5aca5e9ef Mon Sep 17 00:00:00 2001 From: Jan P Date: Tue, 28 Apr 2026 07:52:38 +0200 Subject: [PATCH 51/80] Make sure decimals are present --- .../src/uniswap_v3/pool_indexer.rs | 37 +++++++++++++++++-- 1 file changed, 34 insertions(+), 3 deletions(-) diff --git a/crates/liquidity-sources/src/uniswap_v3/pool_indexer.rs b/crates/liquidity-sources/src/uniswap_v3/pool_indexer.rs index 53e109a97c..c4cc911f1c 100644 --- a/crates/liquidity-sources/src/uniswap_v3/pool_indexer.rs +++ b/crates/liquidity-sources/src/uniswap_v3/pool_indexer.rs @@ -106,19 +106,45 @@ struct IndexerTick { liquidity_net: String, } +/// Filter predicate: drop pools where either token's `decimals` is missing. +/// `decimals = 0` reaching the solver would mis-scale prices by 10^18, so we +/// fail closed (drop + warn) until the indexer backfills the value. +fn pools_tokens_have_decimals(p: &IndexerPool) -> bool { + if p.token0.decimals.is_none() || p.token1.decimals.is_none() { + tracing::warn!( + pool = %format!("{:#x}", p.id), + token0 = %format!("{:#x}", p.token0.id), + token1 = %format!("{:#x}", p.token1.id), + token0_decimals_set = p.token0.decimals.is_some(), + token1_decimals_set = p.token1.decimals.is_some(), + "pool dropped from response: missing token decimals" + ); + return false; + } + true +} + impl TryFrom for PoolData { type Error = anyhow::Error; fn try_from(pool: IndexerPool) -> Result { + let token0_decimals = pool + .token0 + .decimals + .context("BUG: missing token0 decimals after pools_tokens_have_decimals filter")?; + let token1_decimals = pool + .token1 + .decimals + .context("BUG: missing token1 decimals after pools_tokens_have_decimals filter")?; Ok(Self { id: pool.id, token0: Token { id: pool.token0.id, - decimals: pool.token0.decimals.unwrap_or(0), + decimals: token0_decimals, }, token1: Token { id: pool.token1.id, - decimals: pool.token1.decimals.unwrap_or(0), + decimals: token1_decimals, }, fee_tier: U256::from_str(&pool.fee_tier).context("parse fee_tier")?, liquidity: U256::from_str(&pool.liquidity).context("parse liquidity")?, @@ -178,6 +204,7 @@ impl V3PoolDataSource for PoolIndexerClient { .pools .into_iter() .filter(|p| p.liquidity != "0") + .filter(pools_tokens_have_decimals) .map(PoolData::try_from) .collect::>>()?; pools.extend(filtered); @@ -241,7 +268,11 @@ async fn fetch_pools_by_ids(client: &PoolIndexerClient, ids: &[Address]) -> Resu .json() .await .context("pools-by-ids body")?; - resp.pools.into_iter().map(PoolData::try_from).collect() + resp.pools + .into_iter() + .filter(pools_tokens_have_decimals) + .map(PoolData::try_from) + .collect() } async fn fetch_ticks_by_pool_ids( From f59d86774b7de0ee5c03efd5961d10ba8e712268 Mon Sep 17 00:00:00 2001 From: Jan P Date: Tue, 28 Apr 2026 07:56:21 +0200 Subject: [PATCH 52/80] Docs --- crates/liquidity-sources/src/uniswap_v3/mod.rs | 11 +++++++---- .../liquidity-sources/src/uniswap_v3/pool_indexer.rs | 1 + 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/crates/liquidity-sources/src/uniswap_v3/mod.rs b/crates/liquidity-sources/src/uniswap_v3/mod.rs index 712d21870c..188aa735a5 100644 --- a/crates/liquidity-sources/src/uniswap_v3/mod.rs +++ b/crates/liquidity-sources/src/uniswap_v3/mod.rs @@ -23,10 +23,13 @@ pub trait V3PoolDataSource: Send + Sync + 'static { /// cheap "what pools exist?" lookup skip the expensive tick fetch. async fn get_registered_pools(&self) -> Result; - /// Fetch pools + their active ticks for the given pool addresses. The - /// `block_number` hint is honored by sources that support historical - /// queries (subgraph); sources that only expose head data (pool-indexer) - /// ignore it and return at-head data. + /// Fetch pools + their active ticks for the given pool addresses. + /// + /// `block_number` is a best-effort hint: sources that support historical + /// queries (subgraph) honor it exactly; sources that only expose head + /// data (pool-indexer) ignore it and return at-head data instead. + /// Callers requiring strict at-block semantics must not use this trait + /// generically — they must pin to an impl that supports it. async fn get_pools_with_ticks_by_ids( &self, ids: &[Address], diff --git a/crates/liquidity-sources/src/uniswap_v3/pool_indexer.rs b/crates/liquidity-sources/src/uniswap_v3/pool_indexer.rs index c4cc911f1c..5357f12a82 100644 --- a/crates/liquidity-sources/src/uniswap_v3/pool_indexer.rs +++ b/crates/liquidity-sources/src/uniswap_v3/pool_indexer.rs @@ -222,6 +222,7 @@ impl V3PoolDataSource for PoolIndexerClient { async fn get_pools_with_ticks_by_ids( &self, ids: &[Address], + // pool-indexer is at-head only — see trait doc on `V3PoolDataSource`. _block_number: u64, ) -> Result> { if ids.is_empty() { From 5ec895283abdc2d861d37feb30765e582dd966bf Mon Sep 17 00:00:00 2001 From: Jan P Date: Tue, 28 Apr 2026 07:59:53 +0200 Subject: [PATCH 53/80] Add warning --- crates/pool-indexer/src/api/uniswap_v3/mod.rs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/crates/pool-indexer/src/api/uniswap_v3/mod.rs b/crates/pool-indexer/src/api/uniswap_v3/mod.rs index 38c0e15537..a17f6666d0 100644 --- a/crates/pool-indexer/src/api/uniswap_v3/mod.rs +++ b/crates/pool-indexer/src/api/uniswap_v3/mod.rs @@ -25,7 +25,14 @@ impl<'de> Deserialize<'de> for PoolIds { fn deserialize>(de: D) -> Result { let raw = <&str>::deserialize(de)?; let mut out = Vec::new(); - for entry in raw.split(',').map(str::trim).filter(|s| !s.is_empty()) { + for entry in raw.split(',').map(str::trim).filter(|s| { + if s.is_empty() { + tracing::warn!("pool_ids query contained an empty entry"); + false + } else { + true + } + }) { out.push( entry .parse::
() From 7233312cb8e76481c896132e4408ae263ae374ff Mon Sep 17 00:00:00 2001 From: Jan P Date: Tue, 28 Apr 2026 08:04:57 +0200 Subject: [PATCH 54/80] Dont use debug --- crates/pool-indexer/src/api/uniswap_v3/pools.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/pool-indexer/src/api/uniswap_v3/pools.rs b/crates/pool-indexer/src/api/uniswap_v3/pools.rs index cab2ee8f1c..968a1af808 100644 --- a/crates/pool-indexer/src/api/uniswap_v3/pools.rs +++ b/crates/pool-indexer/src/api/uniswap_v3/pools.rs @@ -196,7 +196,7 @@ async fn list_pools( let has_next = rows.len() > limit as usize; rows.truncate(limit as usize); let next_cursor = has_next - .then(|| rows.last().map(|row| format!("{:?}", row.address))) + .then(|| rows.last().map(|row| format!("{:#x}", row.address))) .flatten(); Ok(pools_response(block_number, &rows, next_cursor)) From 93bae4cd12671e9b24ecbb66a87fd394884d5301 Mon Sep 17 00:00:00 2001 From: Jan P Date: Tue, 28 Apr 2026 08:54:24 +0200 Subject: [PATCH 55/80] Break up to two endpoints --- crates/e2e/tests/e2e/pool_indexer.rs | 27 ++++- .../src/uniswap_v3/pool_indexer.rs | 4 +- crates/pool-indexer/src/api/routes.rs | 4 + crates/pool-indexer/src/api/uniswap_v3/mod.rs | 2 +- .../pool-indexer/src/api/uniswap_v3/pools.rs | 99 +++++++------------ 5 files changed, 67 insertions(+), 69 deletions(-) diff --git a/crates/e2e/tests/e2e/pool_indexer.rs b/crates/e2e/tests/e2e/pool_indexer.rs index fb78c87e28..14f369cafd 100644 --- a/crates/e2e/tests/e2e/pool_indexer.rs +++ b/crates/e2e/tests/e2e/pool_indexer.rs @@ -581,6 +581,7 @@ async fn local_node_pool_indexer_driver_integration() { /// driver's TOML config requires at least one `[[solver]]`. async fn driver_integration(web3: Web3) { const POOLS_ROUTE: &str = "/api/v1/{network}/uniswap/v3/pools"; + const POOLS_BY_IDS_ROUTE: &str = "/api/v1/{network}/uniswap/v3/pools/by-ids"; const TICKS_ROUTE: &str = "/api/v1/{network}/uniswap/v3/pools/ticks"; let db = PgPool::connect(LOCAL_DB_URL).await.unwrap(); @@ -589,7 +590,7 @@ async fn driver_integration(web3: Web3) { let mut onchain = OnchainComponents::deploy(web3.clone()).await; let [solver] = onchain.make_solvers(10u64.eth()).await; - let (factory, _pool_addr) = deploy_univ3(&web3).await; + let (factory, pool_addr) = deploy_univ3(&web3).await; let factory_addr = *factory.address(); let head = web3.provider.get_block_number().await.unwrap(); seed_checkpoint(&db, factory_addr, 0).await; @@ -614,10 +615,28 @@ async fn driver_integration(web3: Web3) { .await .expect("indexer did not reach head with pool visible"); + // The mock tokens (`[1u8;20]`, `[2u8;20]`) don't have a real `decimals()` + // selector, so the indexer's discovery-time eth_call returns `None` and + // the pool is stored with NULL decimals. The driver-side filter + // `pools_tokens_have_decimals` then drops the pool, leaving the + // top-N selection empty and skipping the bulk-by-ids/ticks fetch path + // this test wants to assert. Backfill plausible decimals so the driver + // doesn't drop it. + sqlx::query( + "UPDATE uniswap_v3_pools SET token0_decimals = 18, token1_decimals = 6 WHERE chain_id = 1 \ + AND address = $1", + ) + .bind(pool_addr.as_slice()) + .execute(&db) + .await + .unwrap(); + // Capture baselines after all test-side warm-up requests so the final // assertions prove the bumps came from the driver, not from the polling // above. let baseline_pools = api_requests_counter(POOL_INDEXER_METRICS_PORT, POOLS_ROUTE).await; + let baseline_pools_by_ids = + api_requests_counter(POOL_INDEXER_METRICS_PORT, POOLS_BY_IDS_ROUTE).await; let baseline_ticks = api_requests_counter(POOL_INDEXER_METRICS_PORT, TICKS_ROUTE).await; let baseline_solver = colocation::start_baseline_solver( @@ -651,8 +670,12 @@ max-pools-to-initialize = 10 wait_for_condition(TIMEOUT, || async { let pools = api_requests_counter(POOL_INDEXER_METRICS_PORT, POOLS_ROUTE).await; + let pools_by_ids = + api_requests_counter(POOL_INDEXER_METRICS_PORT, POOLS_BY_IDS_ROUTE).await; let ticks = api_requests_counter(POOL_INDEXER_METRICS_PORT, TICKS_ROUTE).await; - pools > baseline_pools && ticks > baseline_ticks + pools > baseline_pools + && pools_by_ids > baseline_pools_by_ids + && ticks > baseline_ticks }) .await .expect("driver did not complete pool + tick fetch from pool-indexer within timeout"); diff --git a/crates/liquidity-sources/src/uniswap_v3/pool_indexer.rs b/crates/liquidity-sources/src/uniswap_v3/pool_indexer.rs index 5357f12a82..297c3ed411 100644 --- a/crates/liquidity-sources/src/uniswap_v3/pool_indexer.rs +++ b/crates/liquidity-sources/src/uniswap_v3/pool_indexer.rs @@ -255,7 +255,7 @@ fn ids_param(ids: &[Address]) -> String { } async fn fetch_pools_by_ids(client: &PoolIndexerClient, ids: &[Address]) -> Result> { - let mut url = client.path("pools")?; + let mut url = client.path("pools/by-ids")?; url.query_pairs_mut() .append_pair("pool_ids", &ids_param(ids)); let resp: PoolsResponse = client @@ -263,7 +263,7 @@ async fn fetch_pools_by_ids(client: &PoolIndexerClient, ids: &[Address]) -> Resu .get(url) .send() .await - .context("GET /pools?pool_ids=")? + .context("GET /pools/by-ids?pool_ids=")? .error_for_status() .context("pools-by-ids HTTP status")? .json() diff --git a/crates/pool-indexer/src/api/routes.rs b/crates/pool-indexer/src/api/routes.rs index 33895b81cd..fbd490d586 100644 --- a/crates/pool-indexer/src/api/routes.rs +++ b/crates/pool-indexer/src/api/routes.rs @@ -29,6 +29,10 @@ pub fn router(state: Arc) -> Router { "/api/v1/{network}/uniswap/v3/pools", get(uniswap_v3::get_pools), ) + .route( + "/api/v1/{network}/uniswap/v3/pools/by-ids", + get(uniswap_v3::get_pools_by_ids), + ) .route( "/api/v1/{network}/uniswap/v3/pools/ticks", get(uniswap_v3::get_ticks_bulk), diff --git a/crates/pool-indexer/src/api/uniswap_v3/mod.rs b/crates/pool-indexer/src/api/uniswap_v3/mod.rs index a17f6666d0..1e529c59ef 100644 --- a/crates/pool-indexer/src/api/uniswap_v3/mod.rs +++ b/crates/pool-indexer/src/api/uniswap_v3/mod.rs @@ -7,7 +7,7 @@ use { serde::{Deserialize, Deserializer}, }; pub use { - pools::get_pools, + pools::{get_pools, get_pools_by_ids}, ticks::{get_ticks, get_ticks_bulk}, }; diff --git a/crates/pool-indexer/src/api/uniswap_v3/pools.rs b/crates/pool-indexer/src/api/uniswap_v3/pools.rs index 968a1af808..b48627fcc5 100644 --- a/crates/pool-indexer/src/api/uniswap_v3/pools.rs +++ b/crates/pool-indexer/src/api/uniswap_v3/pools.rs @@ -14,27 +14,30 @@ use { std::sync::Arc, }; -/// Query parameters for the `/pools` endpoint. -/// -/// Dispatch (first match wins): -/// 1. `pool_ids` — bulk lookup by pool address, returns only the requested -/// pools (no pagination). Intended for clients that already know the pool -/// addresses they care about, e.g. resolving pools referenced by an auction. -/// 2. Neither — cursor-paginated list of all pools. +/// Query parameters for the `GET /pools` endpoint — cursor-paginated full +/// listing. #[derive(Deserialize)] -pub struct PoolsQuery { - /// Comma-separated list of pool addresses (`0x…,0x…`) parsed eagerly. - /// Capped at [`super::MAX_POOL_IDS_PER_REQUEST`] entries; callers with - /// more addresses should chunk their requests. - pub pool_ids: Option, +pub struct ListPoolsQuery { /// Opaque cursor returned by the previous page; omit to start from the - /// beginning. Ignored when `pool_ids` is set. + /// beginning. pub after: Option, /// Maximum number of pools to return. Clamped to [1, 5000]; defaults to - /// 1000. Ignored when `pool_ids` is set. + /// 1000. pub limit: Option, } +/// Query parameters for the `GET /pools/by-ids` endpoint — bulk lookup of +/// specific pool addresses, returns only the requested pools (no pagination). +/// Intended for clients that already know the pool addresses they care about, +/// e.g. resolving pools referenced by an auction. +#[derive(Deserialize)] +pub struct BulkLookupQuery { + /// Comma-separated list of pool addresses (`0x…,0x…`) parsed eagerly. + /// Capped at [`super::MAX_POOL_IDS_PER_REQUEST`] entries; callers with + /// more addresses should chunk their requests. + pub pool_ids: PoolIds, +} + /// ERC-20 token metadata embedded in pool responses. #[derive(Serialize)] pub struct TokenInfo { @@ -76,15 +79,6 @@ pub struct PoolsResponse { pub next_cursor: Option, } -/// Normalised view of a [`PoolsQuery`]: which of the two request shapes the -/// client is asking for. -enum PoolsRequest<'a> { - /// Bulk lookup by address list. - ByIds(&'a [Address]), - /// Cursor-paginated full listing. - PaginatedList, -} - /// Default number of pools to return per page when the client doesn't /// specify a `limit`. Sized so a full mainnet pool set can be drained in /// a few pages. @@ -94,17 +88,7 @@ const DEFAULT_PAGE_LIMIT: u64 = 1_000; /// applies this even if the client asks for more. const MAX_PAGE_LIMIT: u64 = 5_000; -impl PoolsQuery { - /// Dispatch the incoming query to the right handler shape — see - /// [`PoolsRequest`]. `pool_ids` wins over pagination when present. - fn request(&self) -> PoolsRequest<'_> { - if let Some(PoolIds(ids)) = &self.pool_ids { - PoolsRequest::ByIds(ids) - } else { - PoolsRequest::PaginatedList - } - } - +impl ListPoolsQuery { /// Resolve the effective page size: the client-supplied `limit` clamped /// to `[1, MAX_PAGE_LIMIT]`, defaulting to `DEFAULT_PAGE_LIMIT`. fn page_limit(&self) -> u64 { @@ -173,6 +157,8 @@ fn pools_response( .into_response() } +/// `GET /api/v1/{network}/uniswap/v3/pools` +/// /// Returns a cursor-paginated list of all indexed pools, ordered by address. /// /// Pagination is last-value-seen: the DB query returns `limit + 1` rows to @@ -182,12 +168,13 @@ fn pools_response( /// `WHERE address > $cursor` to pick up from the row immediately after it — /// so the cursor points at the *last row served*, not the next one to /// serve. -async fn list_pools( - state: &AppState, - chain_id: u64, - block_number: u64, - query: &PoolsQuery, +pub async fn get_pools( + State(state): State>, + Path(network): Path, + Query(query): Query, ) -> Result { + let chain_id = resolve_chain_id(&state, &network)?; + let block_number = latest_indexed_block(&state, chain_id).await?; let limit = query.page_limit(); let cursor = query.cursor()?; @@ -202,37 +189,21 @@ async fn list_pools( Ok(pools_response(block_number, &rows, next_cursor)) } +/// `GET /api/v1/{network}/uniswap/v3/pools/by-ids?pool_ids=0x…,0x…` +/// /// Returns the pools with addresses in `pool_ids` (order not guaranteed to /// match the request). Silently skips unknown addresses so callers can treat /// a partial response as "these are the ones I have". Fetches the latest /// indexed block in parallel with the pool lookup. -async fn lookup_pools_by_ids( - state: &AppState, - chain_id: u64, - addresses: &[Address], -) -> Result { - let (block, pools) = tokio::join!( - latest_indexed_block(state, chain_id), - db::get_pools_by_ids(&state.db, chain_id, addresses), - ); - Ok(pools_response(block?, &pools?, None)) -} - -/// `GET /api/v1/{network}/uniswap/v3/pools` -/// -/// Dispatches based on query params — see [`PoolsQuery`]. -pub async fn get_pools( +pub async fn get_pools_by_ids( State(state): State>, Path(network): Path, - Query(query): Query, + Query(BulkLookupQuery { pool_ids }): Query, ) -> Result { let chain_id = resolve_chain_id(&state, &network)?; - - match query.request() { - PoolsRequest::ByIds(pool_ids) => lookup_pools_by_ids(&state, chain_id, pool_ids).await, - PoolsRequest::PaginatedList => { - let block_number = latest_indexed_block(&state, chain_id).await?; - list_pools(&state, chain_id, block_number, &query).await - } - } + let (block, pools) = tokio::join!( + latest_indexed_block(&state, chain_id), + db::get_pools_by_ids(&state.db, chain_id, &pool_ids.0), + ); + Ok(pools_response(block?, &pools?, None)) } From 9c3c3d2d79afcd245d3f659b9731fcf51cc613c8 Mon Sep 17 00:00:00 2001 From: Jan P Date: Tue, 28 Apr 2026 09:07:36 +0200 Subject: [PATCH 56/80] Import shuffle & fmt --- crates/e2e/tests/e2e/pool_indexer.rs | 6 ++---- crates/pool-indexer/src/cold_seeder.rs | 7 ++++--- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/crates/e2e/tests/e2e/pool_indexer.rs b/crates/e2e/tests/e2e/pool_indexer.rs index 14f369cafd..331f268964 100644 --- a/crates/e2e/tests/e2e/pool_indexer.rs +++ b/crates/e2e/tests/e2e/pool_indexer.rs @@ -621,7 +621,7 @@ async fn driver_integration(web3: Web3) { // `pools_tokens_have_decimals` then drops the pool, leaving the // top-N selection empty and skipping the bulk-by-ids/ticks fetch path // this test wants to assert. Backfill plausible decimals so the driver - // doesn't drop it. + // doesn't drop it. sqlx::query( "UPDATE uniswap_v3_pools SET token0_decimals = 18, token1_decimals = 6 WHERE chain_id = 1 \ AND address = $1", @@ -673,9 +673,7 @@ max-pools-to-initialize = 10 let pools_by_ids = api_requests_counter(POOL_INDEXER_METRICS_PORT, POOLS_BY_IDS_ROUTE).await; let ticks = api_requests_counter(POOL_INDEXER_METRICS_PORT, TICKS_ROUTE).await; - pools > baseline_pools - && pools_by_ids > baseline_pools_by_ids - && ticks > baseline_ticks + pools > baseline_pools && pools_by_ids > baseline_pools_by_ids && ticks > baseline_ticks }) .await .expect("driver did not complete pool + tick fetch from pool-indexer within timeout"); diff --git a/crates/pool-indexer/src/cold_seeder.rs b/crates/pool-indexer/src/cold_seeder.rs index 1aadeb8bc8..1b056a03b6 100644 --- a/crates/pool-indexer/src/cold_seeder.rs +++ b/crates/pool-indexer/src/cold_seeder.rs @@ -16,6 +16,7 @@ use { crate::{ db::uniswap_v3 as db, indexer::uniswap_v3::{NewPoolData, PoolStateData, TickDeltaData, bisecting_get_logs}, + metrics::Metrics, }, alloy::{primitives::Address, providers::Provider, rpc::types::Log, sol_types::SolEvent}, anyhow::{Context, Result}, @@ -81,7 +82,7 @@ pub async fn cold_seed( let pools = { let labels = [network, "discovery"]; - let _t = crate::metrics::Metrics::timer(&metrics.cold_seed_phase_seconds, &labels); + let _t = Metrics::timer(&metrics.cold_seed_phase_seconds, &labels); discover_pools(&provider, factory, factory_deployment_block, snapshot_block).await? }; metrics @@ -93,7 +94,7 @@ pub async fn cold_seed( let states = { let labels = [network, "state_snapshot"]; - let _t = crate::metrics::Metrics::timer(&metrics.cold_seed_phase_seconds, &labels); + let _t = Metrics::timer(&metrics.cold_seed_phase_seconds, &labels); snapshot_pool_states(&provider, &pools, snapshot_block).await? }; info!(chain_id, states = states.len(), "pool states snapshotted"); @@ -117,7 +118,7 @@ pub async fn cold_seed( { let labels = [network, "tick_reconstruction"]; - let _t = crate::metrics::Metrics::timer(&metrics.cold_seed_phase_seconds, &labels); + let _t = Metrics::timer(&metrics.cold_seed_phase_seconds, &labels); reconstruct_and_persist_ticks( db, chain_id, From 457353bd2235a3861c6cf2171cb74535c3bed491 Mon Sep 17 00:00:00 2001 From: Jan P Date: Tue, 28 Apr 2026 09:14:41 +0200 Subject: [PATCH 57/80] Find ticks for all pools --- crates/pool-indexer/src/cold_seeder.rs | 30 +++++++++++--------------- crates/pool-indexer/src/metrics.rs | 5 ----- 2 files changed, 13 insertions(+), 22 deletions(-) diff --git a/crates/pool-indexer/src/cold_seeder.rs b/crates/pool-indexer/src/cold_seeder.rs index 1b056a03b6..d8c904de11 100644 --- a/crates/pool-indexer/src/cold_seeder.rs +++ b/crates/pool-indexer/src/cold_seeder.rs @@ -100,20 +100,16 @@ pub async fn cold_seed( info!(chain_id, states = states.len(), "pool states snapshotted"); persist_pool_states(db, chain_id, &factory, &states).await?; - let active_pools: Vec
= states - .iter() - .filter(|s| s.liquidity > 0) - .map(|s| s.pool_address) - .collect(); - metrics - .cold_seed_active_pools - .with_label_values(&[network]) - .set(i64::try_from(active_pools.len()).unwrap_or(0)); + // Reconstruct ticks for every discovered pool, not just the ones with + // currently-active liquidity. A pool with `state.liquidity == 0` can + // still hold dormant out-of-range positions whose `liquidity_net` deltas + // matter once the price moves back into range — skipping them would + // leave the indexer mispricing those pools after the fact. + let pool_addresses: Vec
= pools.iter().map(|p| p.address).collect(); info!( chain_id, - active = active_pools.len(), - inactive = pools.len() - active_pools.len(), - "reconstructing ticks for active pools" + pools = pool_addresses.len(), + "reconstructing ticks for all discovered pools" ); { @@ -124,7 +120,7 @@ pub async fn cold_seed( chain_id, &factory, &provider, - &active_pools, + &pool_addresses, factory_deployment_block, snapshot_block, ) @@ -305,21 +301,21 @@ async fn persist_pool_states( /// Each group's full history is fetched, deltas accumulated, and flushed to /// the DB before moving on — bounds memory to roughly one batch's worth of /// logs at any moment, and gives operators visible progress on long runs. -#[instrument(skip(db, provider, active_pools))] +#[instrument(skip(db, provider, pool_addresses))] async fn reconstruct_and_persist_ticks( db: &PgPool, chain_id: u64, factory: &Address, provider: &AlloyProvider, - active_pools: &[Address], + pool_addresses: &[Address], from_block: u64, to_block: u64, ) -> Result<()> { - let total = active_pools.len(); + let total = pool_addresses.len(); let mut processed = 0usize; let mut tick_rows = 0usize; - for pool_batch in active_pools.chunks(POOL_ADDRESS_BATCH) { + for pool_batch in pool_addresses.chunks(POOL_ADDRESS_BATCH) { let pool_batch = pool_batch.to_vec(); let batch_size = pool_batch.len(); diff --git a/crates/pool-indexer/src/metrics.rs b/crates/pool-indexer/src/metrics.rs index 800072c5f4..bc5c5d2f6a 100644 --- a/crates/pool-indexer/src/metrics.rs +++ b/crates/pool-indexer/src/metrics.rs @@ -51,11 +51,6 @@ pub struct Metrics { #[metric(labels("network"))] pub cold_seed_pools_discovered: prometheus::IntGaugeVec, - /// Pools with non-zero liquidity at snapshot time (phase 2 → phase 3 - /// input). - #[metric(labels("network"))] - pub cold_seed_active_pools: prometheus::IntGaugeVec, - /// Duration of the full subgraph seed (pool page fetch + tick fetch). #[metric( labels("network"), From 8e9084ecd8bbe06c1acc8fa9afdcb1ce5ee2f1a8 Mon Sep 17 00:00:00 2001 From: Jan P Date: Tue, 28 Apr 2026 09:23:33 +0200 Subject: [PATCH 58/80] Use clone on arc instead of reference --- crates/pool-indexer/src/cold_seeder.rs | 40 ++++++++++++++++---------- 1 file changed, 25 insertions(+), 15 deletions(-) diff --git a/crates/pool-indexer/src/cold_seeder.rs b/crates/pool-indexer/src/cold_seeder.rs index d8c904de11..27f8977bc5 100644 --- a/crates/pool-indexer/src/cold_seeder.rs +++ b/crates/pool-indexer/src/cold_seeder.rs @@ -83,7 +83,13 @@ pub async fn cold_seed( let pools = { let labels = [network, "discovery"]; let _t = Metrics::timer(&metrics.cold_seed_phase_seconds, &labels); - discover_pools(&provider, factory, factory_deployment_block, snapshot_block).await? + discover_pools( + provider.clone(), + factory, + factory_deployment_block, + snapshot_block, + ) + .await? }; metrics .cold_seed_pools_discovered @@ -95,7 +101,7 @@ pub async fn cold_seed( let states = { let labels = [network, "state_snapshot"]; let _t = Metrics::timer(&metrics.cold_seed_phase_seconds, &labels); - snapshot_pool_states(&provider, &pools, snapshot_block).await? + snapshot_pool_states(provider.clone(), &pools, snapshot_block).await? }; info!(chain_id, states = states.len(), "pool states snapshotted"); persist_pool_states(db, chain_id, &factory, &states).await?; @@ -119,7 +125,7 @@ pub async fn cold_seed( db, chain_id, &factory, - &provider, + provider.clone(), &pool_addresses, factory_deployment_block, snapshot_block, @@ -133,7 +139,7 @@ pub async fn cold_seed( #[instrument(skip(provider))] async fn discover_pools( - provider: &AlloyProvider, + provider: AlloyProvider, factory: Address, from_block: u64, to_block: u64, @@ -147,7 +153,7 @@ async fn discover_pools( let logs: Vec = futures::stream::iter(ranges) .map(|(from, to)| { let provider = provider.clone(); - async move { fetch_pool_created_logs(&provider, factory, from, to).await } + async move { fetch_pool_created_logs(provider, factory, from, to).await } }) .buffered(LOG_FETCH_CONCURRENCY) .try_concat() @@ -185,13 +191,13 @@ async fn discover_pools( } async fn fetch_pool_created_logs( - provider: &AlloyProvider, + provider: AlloyProvider, factory: Address, from: u64, to: u64, ) -> Result> { bisecting_get_logs( - provider, + &provider, from, to, vec![factory], @@ -201,7 +207,7 @@ async fn fetch_pool_created_logs( } async fn fetch_decimals_concurrent( - provider: &AlloyProvider, + provider: AlloyProvider, tokens: std::collections::HashSet
, ) -> HashMap { futures::stream::iter(tokens) @@ -236,7 +242,7 @@ async fn persist_pools( #[instrument(skip(provider, pools))] async fn snapshot_pool_states( - provider: &AlloyProvider, + provider: AlloyProvider, pools: &[NewPoolData], at_block: u64, ) -> Result> { @@ -244,7 +250,7 @@ async fn snapshot_pool_states( let states: Vec = futures::stream::iter(addresses) .map(|pool| { let provider = provider.clone(); - async move { fetch_pool_state(&provider, pool, at_block).await } + async move { fetch_pool_state(provider, pool, at_block).await } }) .buffer_unordered(POOL_VIEW_CALL_CONCURRENCY) .filter_map(|res| async move { res }) @@ -253,8 +259,12 @@ async fn snapshot_pool_states( Ok(states) } +/// Fetch a pool's `slot0` + `liquidity` at `at_block`. Returns `None` if +/// either eth_call fails (RPC blip, contract not yet deployed at that block, +/// non-conforming pool); the failure is logged and the caller treats this +/// pool as missing-state for the snapshot. async fn fetch_pool_state( - provider: &AlloyProvider, + provider: AlloyProvider, pool: Address, at_block: u64, ) -> Option { @@ -306,7 +316,7 @@ async fn reconstruct_and_persist_ticks( db: &PgPool, chain_id: u64, factory: &Address, - provider: &AlloyProvider, + provider: AlloyProvider, pool_addresses: &[Address], from_block: u64, to_block: u64, @@ -328,7 +338,7 @@ async fn reconstruct_and_persist_ticks( .map(|(from, to)| { let provider = provider.clone(); let pool_batch = pool_batch.clone(); - async move { fetch_mint_burn_logs(&provider, pool_batch, from, to).await } + async move { fetch_mint_burn_logs(provider, pool_batch, from, to).await } }) .buffered(LOG_FETCH_CONCURRENCY) .try_concat() @@ -377,14 +387,14 @@ async fn reconstruct_and_persist_ticks( } async fn fetch_mint_burn_logs( - provider: &AlloyProvider, + provider: AlloyProvider, pool_batch: Vec
, from: u64, to: u64, ) -> Result> { let pool_count = pool_batch.len(); bisecting_get_logs( - provider, + &provider, from, to, pool_batch, From 6566e13551751a3b38cbb36f17427a13809b1c1d Mon Sep 17 00:00:00 2001 From: Jan P Date: Tue, 28 Apr 2026 09:25:38 +0200 Subject: [PATCH 59/80] Cmt --- crates/pool-indexer/src/cold_seeder.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/crates/pool-indexer/src/cold_seeder.rs b/crates/pool-indexer/src/cold_seeder.rs index 27f8977bc5..87407728a3 100644 --- a/crates/pool-indexer/src/cold_seeder.rs +++ b/crates/pool-indexer/src/cold_seeder.rs @@ -344,6 +344,9 @@ async fn reconstruct_and_persist_ticks( .try_concat() .await?; + // Accumulate net liquidity per pool × tick boundary across the whole + // history range: `(pool_address, tick_idx) -> sum(liquidity_net)`. + // Mints add at tickLower / subtract at tickUpper; Burns reverse. let mut acc: HashMap<(Address, i32), i128> = HashMap::new(); for log in logs { let Some(t) = log.topic0() else { continue }; From d170351fc2e93d7ff18d568dc9fe00362297ded1 Mon Sep 17 00:00:00 2001 From: Jan P Date: Tue, 28 Apr 2026 09:27:10 +0200 Subject: [PATCH 60/80] Move related params together --- crates/pool-indexer/src/config.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/crates/pool-indexer/src/config.rs b/crates/pool-indexer/src/config.rs index 7463a38158..353c344618 100644 --- a/crates/pool-indexer/src/config.rs +++ b/crates/pool-indexer/src/config.rs @@ -90,6 +90,10 @@ pub struct NetworkConfig { pub chunk_size: u64, #[serde(default = "default_poll_interval_secs")] pub poll_interval_secs: u64, + #[serde(default = "default_fetch_concurrency")] + pub fetch_concurrency: usize, + #[serde(default = "default_prefetch_concurrency")] + pub prefetch_concurrency: usize, /// When `true`, use `latest` instead of `finalized` as the target block. /// Useful for test environments where finality is not simulated (e.g. local /// Anvil). @@ -105,10 +109,6 @@ pub struct NetworkConfig { /// Block number to seed at. Defaults to the subgraph's current block when /// `subgraph_url` is set. pub seed_block: Option, - #[serde(default = "default_fetch_concurrency")] - pub fetch_concurrency: usize, - #[serde(default = "default_prefetch_concurrency")] - pub prefetch_concurrency: usize, } #[derive(Debug, Clone, Copy, Deserialize)] From 71f2090e0e051dbd69a80ebfa8d9ae1133125bfe Mon Sep 17 00:00:00 2001 From: Jan P Date: Tue, 28 Apr 2026 09:31:13 +0200 Subject: [PATCH 61/80] Move struct and impl together --- crates/pool-indexer/src/config.rs | 36 +++++++++++++++---------------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/crates/pool-indexer/src/config.rs b/crates/pool-indexer/src/config.rs index 353c344618..74e68c195e 100644 --- a/crates/pool-indexer/src/config.rs +++ b/crates/pool-indexer/src/config.rs @@ -111,6 +111,24 @@ pub struct NetworkConfig { pub seed_block: Option, } +impl NetworkConfig { + pub fn poll_interval(&self) -> Duration { + Duration::from_secs(self.poll_interval_secs) + } + + pub fn indexer_config(&self, factory: Address) -> IndexerConfig { + IndexerConfig { + network: self.name.clone(), + chain_id: self.chain_id, + factory_address: factory, + chunk_size: self.chunk_size, + use_latest: self.use_latest, + fetch_concurrency: self.fetch_concurrency, + prefetch_concurrency: self.prefetch_concurrency, + } + } +} + #[derive(Debug, Clone, Copy, Deserialize)] #[serde(rename_all = "kebab-case", deny_unknown_fields)] pub struct FactoryConfig { @@ -136,24 +154,6 @@ pub struct IndexerConfig { pub prefetch_concurrency: usize, } -impl NetworkConfig { - pub fn poll_interval(&self) -> Duration { - Duration::from_secs(self.poll_interval_secs) - } - - pub fn indexer_config(&self, factory: Address) -> IndexerConfig { - IndexerConfig { - network: self.name.clone(), - chain_id: self.chain_id, - factory_address: factory, - chunk_size: self.chunk_size, - use_latest: self.use_latest, - fetch_concurrency: self.fetch_concurrency, - prefetch_concurrency: self.prefetch_concurrency, - } - } -} - #[derive(Debug, Deserialize)] #[serde(rename_all = "kebab-case", deny_unknown_fields)] pub struct ApiConfig { From 620b4d9c9b7a8878fff558357d736325abb914d1 Mon Sep 17 00:00:00 2001 From: Jan P Date: Tue, 28 Apr 2026 09:46:15 +0200 Subject: [PATCH 62/80] Use full path import --- crates/pool-indexer/src/indexer/uniswap_v3.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/pool-indexer/src/indexer/uniswap_v3.rs b/crates/pool-indexer/src/indexer/uniswap_v3.rs index b7429e8877..e4292d9938 100644 --- a/crates/pool-indexer/src/indexer/uniswap_v3.rs +++ b/crates/pool-indexer/src/indexer/uniswap_v3.rs @@ -4,7 +4,7 @@ use { db::uniswap_v3 as db, }, alloy::{ - primitives::Address, + primitives::{Address, aliases::U160}, providers::Provider, rpc::types::{BlockNumberOrTag, Filter, FilterSet, Log}, sol_types::SolEvent, @@ -47,7 +47,7 @@ pub struct NewPoolData { pub struct PoolStateData { pub pool_address: Address, pub block_number: u64, - pub sqrt_price_x96: alloy::primitives::aliases::U160, + pub sqrt_price_x96: U160, pub liquidity: u128, pub tick: i32, } From cec2edb60624024598de4446860ab8787401d0e0 Mon Sep 17 00:00:00 2001 From: Jan P Date: Tue, 28 Apr 2026 09:53:44 +0200 Subject: [PATCH 63/80] Docs --- crates/pool-indexer/src/indexer/uniswap_v3.rs | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/crates/pool-indexer/src/indexer/uniswap_v3.rs b/crates/pool-indexer/src/indexer/uniswap_v3.rs index e4292d9938..4b787fa37d 100644 --- a/crates/pool-indexer/src/indexer/uniswap_v3.rs +++ b/crates/pool-indexer/src/indexer/uniswap_v3.rs @@ -147,14 +147,16 @@ impl UniswapV3Indexer { } } - /// Processes all pending blocks starting from `from_block` up to the - /// current finalized block and returns. Loops until no further blocks - /// remain (handles new blocks finalizing during a long catch-up). + /// Bootstrap helper: brings a fresh (chain, factory) up to the current + /// finalized block in one shot, then returns. Loops until no further + /// blocks remain (handles new blocks finalizing during a long catch-up). + /// Intended to run exactly once, right after seeding completes. /// - /// Intended for the post-seed bootstrap only: initializes the checkpoint to - /// `from_block - 1` if absent so that `run_once` starts at `from_block`. - /// Errors if a checkpoint already exists — overwriting would silently - /// regress progress and re-index history. + /// The checkpoint stores the *last indexed* block, so to make the next + /// indexer pass start at `from_block` we initialize the checkpoint to + /// `from_block - 1`. Errors if a checkpoint already exists — overwriting + /// would silently regress progress and re-index history; callers should + /// guard with `if checkpoint.is_none()` before invoking. pub async fn catch_up(&self, from_block: u64) -> Result<()> { if db::get_checkpoint(&self.db, self.chain_id, &self.factory) .await? From f13e89029febf6790fde92d5dbc8b93943689ce8 Mon Sep 17 00:00:00 2001 From: Jan P Date: Wed, 29 Apr 2026 08:21:49 +0200 Subject: [PATCH 64/80] Add warnings --- crates/pool-indexer/src/indexer/uniswap_v3.rs | 20 +++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/crates/pool-indexer/src/indexer/uniswap_v3.rs b/crates/pool-indexer/src/indexer/uniswap_v3.rs index 4b787fa37d..4e754c96ac 100644 --- a/crates/pool-indexer/src/indexer/uniswap_v3.rs +++ b/crates/pool-indexer/src/indexer/uniswap_v3.rs @@ -399,20 +399,32 @@ impl UniswapV3Indexer { } async fn fetch_pool_liquidity(provider: &AlloyProvider, pool: Address, block: u64) -> Option { - contracts::UniswapV3Pool::Instance::new(pool, provider.clone()) + match contracts::UniswapV3Pool::Instance::new(pool, provider.clone()) .liquidity() .block(block.into()) .call() .await - .ok() + { + Ok(liq) => Some(liq), + Err(err) => { + tracing::warn!(%pool, block, ?err, "fetch_pool_liquidity failed"); + None + } + } } async fn fetch_decimals(provider: &AlloyProvider, token: Address) -> Option { - ERC20::Instance::new(token, provider.clone()) + match ERC20::Instance::new(token, provider.clone()) .decimals() .call() .await - .ok() + { + Ok(d) => Some(d), + Err(err) => { + tracing::warn!(%token, ?err, "fetch_decimals failed"); + None + } + } } /// Periodically fills in missing `token{0,1}_symbol` values on From 18a0b4142c140c91d38b6a389b874c9fde3eece6 Mon Sep 17 00:00:00 2001 From: Jan P Date: Wed, 29 Apr 2026 08:36:57 +0200 Subject: [PATCH 65/80] Add retry --- Cargo.lock | 1 + crates/pool-indexer/Cargo.toml | 1 + crates/pool-indexer/src/indexer/uniswap_v3.rs | 23 +++++--- crates/shared/src/lib.rs | 1 + crates/shared/src/retry.rs | 52 +++++++++++++++++++ 5 files changed, 71 insertions(+), 7 deletions(-) create mode 100644 crates/shared/src/retry.rs diff --git a/Cargo.lock b/Cargo.lock index 56f3b81add..f666400ac8 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -6322,6 +6322,7 @@ dependencies = [ "scopeguard", "serde", "serde_json", + "shared", "sqlx", "tikv-jemallocator", "tokio", diff --git a/crates/pool-indexer/Cargo.toml b/crates/pool-indexer/Cargo.toml index f6f5e6121d..1ddc26b484 100644 --- a/crates/pool-indexer/Cargo.toml +++ b/crates/pool-indexer/Cargo.toml @@ -36,6 +36,7 @@ reqwest = { workspace = true, features = ["json"] } scopeguard = { workspace = true } serde = { workspace = true } serde_json = { workspace = true } +shared = { workspace = true } sqlx = { workspace = true } tikv-jemallocator = { workspace = true } tokio = { workspace = true, features = ["macros", "rt-multi-thread", "signal", "sync", "time"] } diff --git a/crates/pool-indexer/src/indexer/uniswap_v3.rs b/crates/pool-indexer/src/indexer/uniswap_v3.rs index 4e754c96ac..13d235513a 100644 --- a/crates/pool-indexer/src/indexer/uniswap_v3.rs +++ b/crates/pool-indexer/src/indexer/uniswap_v3.rs @@ -399,15 +399,24 @@ impl UniswapV3Indexer { } async fn fetch_pool_liquidity(provider: &AlloyProvider, pool: Address, block: u64) -> Option { - match contracts::UniswapV3Pool::Instance::new(pool, provider.clone()) - .liquidity() - .block(block.into()) - .call() - .await + use ethrpc::alloy::errors::ContractErrorExt; + match shared::retry::retry_with_sleep_if( + || async move { + contracts::UniswapV3Pool::Instance::new(pool, provider.clone()) + .liquidity() + .block(block.into()) + .call() + .await + }, + // Retry only on transient transport errors. Contract reverts and + // missing-selector failures are permanent — no point sleeping. + |err: &alloy::contract::Error| err.is_node_error(), + ) + .await { Ok(liq) => Some(liq), - Err(err) => { - tracing::warn!(%pool, block, ?err, "fetch_pool_liquidity failed"); + Err(errors) => { + tracing::warn!(%pool, block, ?errors, "fetch_pool_liquidity gave up"); None } } diff --git a/crates/shared/src/lib.rs b/crates/shared/src/lib.rs index aebbb50b83..86e60a410b 100644 --- a/crates/shared/src/lib.rs +++ b/crates/shared/src/lib.rs @@ -12,6 +12,7 @@ pub mod interaction; pub mod order_quoting; pub mod order_validation; pub mod remaining_amounts; +pub mod retry; pub mod token_list; pub mod url; pub mod web3; diff --git a/crates/shared/src/retry.rs b/crates/shared/src/retry.rs new file mode 100644 index 0000000000..7fbe22c679 --- /dev/null +++ b/crates/shared/src/retry.rs @@ -0,0 +1,52 @@ +//! Bounded retry-with-sleep for transient failures. +//! +//! Calls the supplied future-producing closure up to a fixed number of times, +//! sleeping with small jitter between attempts so concurrent retriers don't +//! all wake up at once. Returns `Ok` on the first success, otherwise an +//! `Err(Vec)` containing every observed error in order — useful for +//! diagnosing whether a permanent failure was masked as a flake. +use { + rand::Rng, + std::{future::Future, time::Duration}, +}; + +const MAX_RETRIES: usize = 5; + +/// Retry on every error. +pub async fn retry_with_sleep(future: impl Fn() -> F) -> Result> +where + F: Future>, + E: std::fmt::Debug, +{ + retry_with_sleep_if(future, |_| true).await +} + +/// Retry only when `should_retry(&err)` returns true. Permanent errors +/// (e.g. contract reverts, bad input) bail out immediately so callers don't +/// waste sleep budget on something that won't get better. +pub async fn retry_with_sleep_if( + future: impl Fn() -> F, + should_retry: P, +) -> Result> +where + F: Future>, + E: std::fmt::Debug, + P: Fn(&E) -> bool, +{ + let mut errors = Vec::new(); + for attempt in 0..MAX_RETRIES { + match future().await { + Ok(value) => return Ok(value), + Err(err) => { + let retryable = should_retry(&err); + errors.push(err); + if !retryable || attempt + 1 == MAX_RETRIES { + return Err(errors); + } + let timeout_with_jitter = 50u64 + rand::rng().random_range(0..=50); + tokio::time::sleep(Duration::from_millis(timeout_with_jitter)).await; + } + } + } + Err(errors) +} From b6a30edffb6349bb0e70c6470017311c9d13d7b1 Mon Sep 17 00:00:00 2001 From: Jan P Date: Wed, 29 Apr 2026 08:39:09 +0200 Subject: [PATCH 66/80] Warn to err --- crates/pool-indexer/src/indexer/uniswap_v3.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/pool-indexer/src/indexer/uniswap_v3.rs b/crates/pool-indexer/src/indexer/uniswap_v3.rs index 13d235513a..fbb2202c2b 100644 --- a/crates/pool-indexer/src/indexer/uniswap_v3.rs +++ b/crates/pool-indexer/src/indexer/uniswap_v3.rs @@ -456,7 +456,7 @@ async fn backfill_symbols( if let Err(err) = run_symbol_backfill_pass(&provider, &db, &network, chain_id, prefetch_concurrency).await { - tracing::warn!(?err, "token symbol backfill pass failed"); + tracing::error!(?err, "token symbol backfill pass failed"); } tokio::time::sleep(poll_interval).await; } From 15ca733f01360b2f761b84dd6e570ea9816907e8 Mon Sep 17 00:00:00 2001 From: Jan P Date: Wed, 29 Apr 2026 09:22:46 +0200 Subject: [PATCH 67/80] Decimal backfill job --- crates/pool-indexer/src/db/uniswap_v3.rs | 128 +++++++++++++--- crates/pool-indexer/src/indexer/uniswap_v3.rs | 139 ++++++++++++++++-- crates/pool-indexer/src/metrics.rs | 9 ++ .../sql/V110__pool_indexer_uniswap_v3.sql | 11 +- 4 files changed, 251 insertions(+), 36 deletions(-) diff --git a/crates/pool-indexer/src/db/uniswap_v3.rs b/crates/pool-indexer/src/db/uniswap_v3.rs index 9271ab4876..8616f7cd20 100644 --- a/crates/pool-indexer/src/db/uniswap_v3.rs +++ b/crates/pool-indexer/src/db/uniswap_v3.rs @@ -376,12 +376,15 @@ impl TryFrom for PoolRow { token0: bytes_to_addr(r.get("token0"))?, token1: bytes_to_addr(r.get("token1"))?, fee: r.get::("fee").cast_unsigned(), + // The DB stores `-1` as the "tried, failed" sentinel written by + // the decimals backfill task. Drop those back to `None` so callers + // see "missing" rather than a misleading `Some(0)`. token0_decimals: r .get::, _>("token0_decimals") - .map(|d| u8::try_from(d).unwrap_or(0)), + .and_then(|d| u8::try_from(d).ok()), token1_decimals: r .get::, _>("token1_decimals") - .map(|d| u8::try_from(d).unwrap_or(0)), + .and_then(|d| u8::try_from(d).ok()), token0_symbol: r.get("token0_symbol"), token1_symbol: r.get("token1_symbol"), sqrt_price_x96: r.get("sqrt_price_x96"), @@ -595,31 +598,118 @@ pub async fn get_tokens_missing_symbols(pool: &PgPool, chain_id: u64) -> Result< .collect() } -/// Updates `token0_symbol` / `token1_symbol` for all pools containing `token`. -pub async fn set_token_symbol( +/// Returns all distinct token addresses that have no decimals recorded yet. +pub async fn get_tokens_missing_decimals(pool: &PgPool, chain_id: u64) -> Result> { + let rows = sqlx::query( + "SELECT DISTINCT token FROM ( + SELECT token0 AS token FROM uniswap_v3_pools + WHERE chain_id = $1 AND token0_decimals IS NULL + UNION + SELECT token1 AS token FROM uniswap_v3_pools + WHERE chain_id = $1 AND token1_decimals IS NULL + ) t", + ) + .bind(chain_id.cast_signed()) + .fetch_all(pool) + .await + .context("get_tokens_missing_decimals")?; + + rows.into_iter() + .map(|r| bytes_to_addr(r.get("token"))) + .collect() +} + +/// Batched update of `token0_decimals` / `token1_decimals` for every pool +/// containing one of the provided tokens. Pass `-1` for entries that were +/// "tried, failed" so the next backfill pass's `IS NULL` filter skips them. +/// +/// One round-trip via a writeable CTE: the side-by-side UPDATE ... FROM UNNEST +/// pattern would mis-handle pools where both `token0` and `token1` appear in +/// the batch (Postgres picks an arbitrary FROM row per target row, so only +/// one side would get set). Splitting into two separate UPDATEs keyed on each +/// side avoids that. +pub async fn batch_set_token_decimals( + pool: &PgPool, + chain_id: u64, + entries: &[(Address, i16)], +) -> Result<()> { + if entries.is_empty() { + return Ok(()); + } + let tokens: Vec<&[u8]> = entries.iter().map(|(t, _)| t.as_slice()).collect(); + let decimals: Vec = entries.iter().map(|(_, d)| *d).collect(); + + sqlx::query( + "WITH input AS ( + SELECT * FROM UNNEST($2::BYTEA[], $3::INT2[]) AS t(tok, dec) + ), + update_t0 AS ( + UPDATE uniswap_v3_pools p + SET token0_decimals = i.dec + FROM input i + WHERE p.chain_id = $1 + AND p.token0 = i.tok + AND p.token0_decimals IS NULL + RETURNING 1 + ) + UPDATE uniswap_v3_pools p + SET token1_decimals = i.dec + FROM input i + WHERE p.chain_id = $1 + AND p.token1 = i.tok + AND p.token1_decimals IS NULL", + ) + .bind(chain_id.cast_signed()) + .bind(tokens) + .bind(decimals) + .execute(pool) + .await + .context("batch_set_token_decimals")?; + + Ok(()) +} + +/// Batched update of `token0_symbol` / `token1_symbol` for every pool +/// containing one of the provided tokens. Pass `""` for entries that were +/// "tried, failed" so the next backfill pass's `IS NULL` filter skips them. +/// See [`batch_set_token_decimals`] for the writeable-CTE rationale. +pub async fn batch_set_token_symbols( pool: &PgPool, chain_id: u64, - token: &Address, - symbol: &str, + entries: &[(Address, String)], ) -> Result<()> { + if entries.is_empty() { + return Ok(()); + } + let tokens: Vec<&[u8]> = entries.iter().map(|(t, _)| t.as_slice()).collect(); + let symbols: Vec<&str> = entries.iter().map(|(_, s)| s.as_str()).collect(); + sqlx::query( - "UPDATE uniswap_v3_pools - SET token0_symbol = CASE - WHEN token0 = $2 AND token0_symbol IS NULL THEN $3 - ELSE token0_symbol - END, - token1_symbol = CASE - WHEN token1 = $2 AND token1_symbol IS NULL THEN $3 - ELSE token1_symbol - END - WHERE chain_id = $1 AND (token0 = $2 OR token1 = $2)", + "WITH input AS ( + SELECT * FROM UNNEST($2::BYTEA[], $3::TEXT[]) AS t(tok, sym) + ), + update_t0 AS ( + UPDATE uniswap_v3_pools p + SET token0_symbol = i.sym + FROM input i + WHERE p.chain_id = $1 + AND p.token0 = i.tok + AND p.token0_symbol IS NULL + RETURNING 1 + ) + UPDATE uniswap_v3_pools p + SET token1_symbol = i.sym + FROM input i + WHERE p.chain_id = $1 + AND p.token1 = i.tok + AND p.token1_symbol IS NULL", ) .bind(chain_id.cast_signed()) - .bind(token.as_slice()) - .bind(symbol) + .bind(tokens) + .bind(symbols) .execute(pool) .await - .context("set_token_symbol")?; + .context("batch_set_token_symbols")?; Ok(()) } diff --git a/crates/pool-indexer/src/indexer/uniswap_v3.rs b/crates/pool-indexer/src/indexer/uniswap_v3.rs index fbb2202c2b..44469adbde 100644 --- a/crates/pool-indexer/src/indexer/uniswap_v3.rs +++ b/crates/pool-indexer/src/indexer/uniswap_v3.rs @@ -4,7 +4,7 @@ use { db::uniswap_v3 as db, }, alloy::{ - primitives::{Address, aliases::U160}, + primitives::{Address, U256, aliases::U160}, providers::Provider, rpc::types::{BlockNumberOrTag, Filter, FilterSet, Log}, sol_types::SolEvent, @@ -135,6 +135,14 @@ impl UniswapV3Indexer { self.prefetch_concurrency, poll_interval, )); + tokio::spawn(backfill_decimals( + self.provider.clone(), + self.db.clone(), + self.network.clone(), + self.chain_id, + self.prefetch_concurrency, + poll_interval, + )); loop { if let Err(err) = self.run_once().await { crate::metrics::Metrics::get() @@ -423,14 +431,23 @@ async fn fetch_pool_liquidity(provider: &AlloyProvider, pool: Address, block: u6 } async fn fetch_decimals(provider: &AlloyProvider, token: Address) -> Option { - match ERC20::Instance::new(token, provider.clone()) - .decimals() - .call() - .await + use ethrpc::alloy::errors::ContractErrorExt; + // Retry transient transport errors before giving up. Contract reverts / + // missing-selector failures bail out immediately. + match shared::retry::retry_with_sleep_if( + || async move { + ERC20::Instance::new(token, provider.clone()) + .decimals() + .call() + .await + }, + |err: &alloy::contract::Error| err.is_node_error(), + ) + .await { Ok(d) => Some(d), - Err(err) => { - tracing::warn!(%token, ?err, "fetch_decimals failed"); + Err(errors) => { + tracing::warn!(%token, ?errors, "fetch_decimals gave up"); None } } @@ -499,9 +516,9 @@ async fn run_symbol_backfill_pass( .await; let metrics = crate::metrics::Metrics::get(); - for (token, symbol) in &symbols { - match db::set_token_symbol(db, chain_id, token, symbol).await { - Ok(()) => { + match db::batch_set_token_symbols(db, chain_id, &symbols).await { + Ok(()) => { + for (_, symbol) in &symbols { updated += 1; let result = if symbol.is_empty() { "empty" } else { "ok" }; metrics @@ -509,8 +526,8 @@ async fn run_symbol_backfill_pass( .with_label_values(&[network, result]) .inc(); } - Err(err) => tracing::warn!(%token, ?err, "failed to backfill symbol"), } + Err(err) => tracing::warn!(?err, batch_size = symbols.len(), "failed to backfill symbols batch"), } processed += token_batch.len(); @@ -521,6 +538,102 @@ async fn run_symbol_backfill_pass( Ok(()) } +/// Periodically fills in missing `token{0,1}_decimals` values on +/// `uniswap_v3_pools`. Same shape as [`backfill_symbols`]: sleeps +/// `poll_interval` between passes, persists `-1` as the "tried and failed" +/// sentinel for tokens whose `decimals()` call fails so subsequent passes +/// skip them. A process restart re-probes them once. +async fn backfill_decimals( + provider: AlloyProvider, + db: sqlx::PgPool, + network: NetworkName, + chain_id: u64, + prefetch_concurrency: usize, + poll_interval: std::time::Duration, +) -> ! { + loop { + if let Err(err) = + run_decimals_backfill_pass(&provider, &db, &network, chain_id, prefetch_concurrency) + .await + { + tracing::error!(?err, "token decimals backfill pass failed"); + } + tokio::time::sleep(poll_interval).await; + } +} + +async fn run_decimals_backfill_pass( + provider: &AlloyProvider, + db: &sqlx::PgPool, + network: &NetworkName, + chain_id: u64, + prefetch_concurrency: usize, +) -> Result<()> { + let tokens = db::get_tokens_missing_decimals(db, chain_id) + .await + .context("get_tokens_missing_decimals")?; + let network = network.as_str(); + crate::metrics::Metrics::get() + .decimals_pending + .with_label_values(&[network]) + .set(i64::try_from(tokens.len()).unwrap_or(0)); + if tokens.is_empty() { + return Ok(()); + } + let total = tokens.len(); + tracing::info!(total, "backfilling token decimals"); + + let mut updated = 0usize; + let mut processed = 0usize; + + for token_batch in tokens.chunks(SYMBOL_BACKFILL_BATCH_SIZE) { + let decimals: Vec<(Address, i16)> = futures::stream::iter(token_batch.iter().copied()) + .map(|token| async move { + // `None` → `-1` sentinel: marks the token as "tried and + // failed" so the next backfill pass's `IS NULL` filter skips + // it. + let dec = fetch_decimals(provider, token) + .await + .map(i16::from) + .unwrap_or(-1); + (token, dec) + }) + .buffer_unordered(prefetch_concurrency) + .collect() + .await; + + let metrics = crate::metrics::Metrics::get(); + match db::batch_set_token_decimals(db, chain_id, &decimals).await { + Ok(()) => { + for (_, dec) in &decimals { + updated += 1; + let result = if *dec < 0 { "empty" } else { "ok" }; + metrics + .decimals_backfilled + .with_label_values(&[network, result]) + .inc(); + } + } + Err(err) => tracing::warn!( + ?err, + batch_size = decimals.len(), + "failed to backfill decimals batch" + ), + } + + processed += token_batch.len(); + tracing::info!( + processed, + total, + updated, + "token decimals backfill progress" + ); + } + + tracing::info!(updated, total, "token decimals backfill pass complete"); + Ok(()) +} + async fn fetch_symbol(provider: &AlloyProvider, token: Address) -> Option { let sym = ERC20::Instance::new(token, provider.clone()) .symbol() @@ -930,8 +1043,8 @@ mod tests { tickLower: t(-100), tickUpper: t(100), amount, - amount0: alloy::primitives::U256::ZERO, - amount1: alloy::primitives::U256::ZERO, + amount0: U256::ZERO, + amount1: U256::ZERO, }; let liq_cache: LiquidityCache = HashMap::from([((POOL, 100u64), amount)]); let log = make_log(POOL, 100, event); diff --git a/crates/pool-indexer/src/metrics.rs b/crates/pool-indexer/src/metrics.rs index bc5c5d2f6a..a2d599b8b1 100644 --- a/crates/pool-indexer/src/metrics.rs +++ b/crates/pool-indexer/src/metrics.rs @@ -67,6 +67,15 @@ pub struct Metrics { #[metric(labels("network"))] pub symbols_pending: prometheus::IntGaugeVec, + /// Decimals written to the DB (label: `result` = `ok` for a real value, + /// `empty` for the "tried and failed" `-1` sentinel). + #[metric(labels("network", "result"))] + pub decimals_backfilled: prometheus::IntCounterVec, + + /// Tokens still needing a decimals value, sampled each backfill pass. + #[metric(labels("network"))] + pub decimals_pending: prometheus::IntGaugeVec, + /// API request count by route + HTTP status. #[metric(labels("route", "status"))] pub api_requests: prometheus::IntCounterVec, diff --git a/database/sql/V110__pool_indexer_uniswap_v3.sql b/database/sql/V110__pool_indexer_uniswap_v3.sql index dd3bc9f2be..ab76c2ecbc 100644 --- a/database/sql/V110__pool_indexer_uniswap_v3.sql +++ b/database/sql/V110__pool_indexer_uniswap_v3.sql @@ -47,9 +47,12 @@ CREATE TABLE uniswap_v3_ticks ( FOREIGN KEY (chain_id, pool_address) REFERENCES uniswap_v3_pools(chain_id, address) ); --- Symbol backfill hot paths: both `get_tokens_missing_symbols` (scan for NULL --- symbols) and `set_token_symbol` (update by token address where symbol IS --- NULL) hit these. Partial on the IS NULL predicate so the indices shrink to --- near-empty once most symbols are populated. +-- Symbol- and decimals-backfill hot paths: both `get_tokens_missing_*` +-- (scan for NULL columns) and the batched `batch_set_token_*` updates hit +-- these. Partial on the IS NULL predicate so each index shrinks to near-empty +-- once most rows are populated (real value or `""` / `-1` "tried, failed" +-- sentinel). CREATE INDEX ON uniswap_v3_pools (chain_id, token0) WHERE token0_symbol IS NULL; CREATE INDEX ON uniswap_v3_pools (chain_id, token1) WHERE token1_symbol IS NULL; +CREATE INDEX ON uniswap_v3_pools (chain_id, token0) WHERE token0_decimals IS NULL; +CREATE INDEX ON uniswap_v3_pools (chain_id, token1) WHERE token1_decimals IS NULL; From 8cd860e06ccd5c17be7924906e59748ba106c1b9 Mon Sep 17 00:00:00 2001 From: Jan P Date: Wed, 29 Apr 2026 09:31:22 +0200 Subject: [PATCH 68/80] Nits --- crates/pool-indexer/src/indexer/uniswap_v3.rs | 60 +++++++++++++++---- 1 file changed, 50 insertions(+), 10 deletions(-) diff --git a/crates/pool-indexer/src/indexer/uniswap_v3.rs b/crates/pool-indexer/src/indexer/uniswap_v3.rs index 44469adbde..10e4dfd854 100644 --- a/crates/pool-indexer/src/indexer/uniswap_v3.rs +++ b/crates/pool-indexer/src/indexer/uniswap_v3.rs @@ -4,7 +4,7 @@ use { db::uniswap_v3 as db, }, alloy::{ - primitives::{Address, U256, aliases::U160}, + primitives::{Address, B256, U256, aliases::U160}, providers::Provider, rpc::types::{BlockNumberOrTag, Filter, FilterSet, Log}, sol_types::SolEvent, @@ -493,7 +493,10 @@ async fn run_symbol_backfill_pass( crate::metrics::Metrics::get() .symbols_pending .with_label_values(&[network]) - .set(i64::try_from(tokens.len()).unwrap_or(0)); + // -1 surfaces the impossible-but-defensive `usize → i64` overflow as + // a visible signal in metrics rather than masquerading as "no work + // pending". + .set(i64::try_from(tokens.len()).unwrap_or(-1)); if tokens.is_empty() { return Ok(()); } @@ -576,7 +579,8 @@ async fn run_decimals_backfill_pass( crate::metrics::Metrics::get() .decimals_pending .with_label_values(&[network]) - .set(i64::try_from(tokens.len()).unwrap_or(0)); + // -1: see `symbols_pending` above for the rationale. + .set(i64::try_from(tokens.len()).unwrap_or(-1)); if tokens.is_empty() { return Ok(()); } @@ -662,16 +666,37 @@ pub(crate) fn is_range_too_large(err: &anyhow::Error) -> bool { }) } +/// Bisecting bound — `is_range_too_large` substring-matches `"timed out"`, +/// which can also fire on transient client/network timeouts unrelated to +/// range size. Without this cap a single misclassified timeout would burn +/// `log2(range)` RPC calls before the recursion bottoms out at `to == from`. +/// 8 halvings = 256× resolution; for the indexer's ~1k-block chunks that +/// means giving up around ~4-block ranges, well past where range-size could +/// plausibly still be the cause. +const MAX_BISECTION_DEPTH: u32 = 8; + /// Fetches logs for `[from, to]` filtered by the given contract addresses /// and `topic0` event signatures, sequentially bisecting the block range on /// "too large" rejections until each sub-range is tractable. An empty -/// `addresses` list means "any contract". +/// `addresses` list means "any contract". Bisection depth is capped by +/// [`MAX_BISECTION_DEPTH`]. pub(crate) fn bisecting_get_logs( provider: &AlloyProvider, from: u64, to: u64, addresses: Vec
, - topics: Vec, + topics: Vec, +) -> futures::future::BoxFuture<'_, Result>> { + bisecting_get_logs_with_depth(provider, from, to, addresses, topics, 0) +} + +fn bisecting_get_logs_with_depth( + provider: &AlloyProvider, + from: u64, + to: u64, + addresses: Vec
, + topics: Vec, + depth: u32, ) -> futures::future::BoxFuture<'_, Result>> { Box::pin(async move { let filter = Filter::new() @@ -684,12 +709,27 @@ pub(crate) fn bisecting_get_logs( Ok(logs) => return Ok(logs), Err(err) => anyhow::Error::new(err).context(format!("get_logs({from}..={to})")), }; - if is_range_too_large(&err) && to > from { + if is_range_too_large(&err) && to > from && depth < MAX_BISECTION_DEPTH { let mid = (from + to) / 2; - tracing::debug!(from, to, mid, "range too large, bisecting"); - let mut left = - bisecting_get_logs(provider, from, mid, addresses.clone(), topics.clone()).await?; - let right = bisecting_get_logs(provider, mid + 1, to, addresses, topics).await?; + tracing::debug!(from, to, mid, depth, "range too large, bisecting"); + let mut left = bisecting_get_logs_with_depth( + provider, + from, + mid, + addresses.clone(), + topics.clone(), + depth + 1, + ) + .await?; + let right = bisecting_get_logs_with_depth( + provider, + mid + 1, + to, + addresses, + topics, + depth + 1, + ) + .await?; left.extend(right); Ok(left) } else { From f338fe41207b13bd96e5c25f2a55b6eb524be58a Mon Sep 17 00:00:00 2001 From: Jan P Date: Wed, 29 Apr 2026 09:43:53 +0200 Subject: [PATCH 69/80] Improve err handling --- crates/pool-indexer/src/indexer/uniswap_v3.rs | 72 +++++++++++-------- 1 file changed, 43 insertions(+), 29 deletions(-) diff --git a/crates/pool-indexer/src/indexer/uniswap_v3.rs b/crates/pool-indexer/src/indexer/uniswap_v3.rs index 10e4dfd854..31573d48d5 100644 --- a/crates/pool-indexer/src/indexer/uniswap_v3.rs +++ b/crates/pool-indexer/src/indexer/uniswap_v3.rs @@ -4,10 +4,11 @@ use { db::uniswap_v3 as db, }, alloy::{ - primitives::{Address, B256, U256, aliases::U160}, + primitives::{Address, B256, aliases::U160}, providers::Provider, rpc::types::{BlockNumberOrTag, Filter, FilterSet, Log}, sol_types::SolEvent, + transports::RpcError, }, anyhow::{Context, Result}, contracts::{ @@ -530,7 +531,11 @@ async fn run_symbol_backfill_pass( .inc(); } } - Err(err) => tracing::warn!(?err, batch_size = symbols.len(), "failed to backfill symbols batch"), + Err(err) => tracing::warn!( + ?err, + batch_size = symbols.len(), + "failed to backfill symbols batch" + ), } processed += token_batch.len(); @@ -651,19 +656,21 @@ async fn fetch_symbol(provider: &AlloyProvider, token: Address) -> Option bool { - err.chain().any(|e| { - let msg = e.to_string().to_lowercase(); - // Alchemy: "query exceeds max block range 10000" - msg.contains("max block range") +/// the range is too wide. Reads the structured `message` field on the +/// server-side error response directly (no `Display`-then-substring on a +/// type-erased `anyhow::Error`). Extend when a new rejection phrase appears +/// in the wild. +pub(crate) fn is_range_too_large(err: &alloy::transports::TransportError) -> bool { + let RpcError::ErrorResp(payload) = err else { + return false; + }; + let msg = payload.message.to_lowercase(); + // Alchemy: "query exceeds max block range 10000" + msg.contains("max block range") // OVH: "request timed out" — the server cuts off oversized queries // instead of rejecting with a size error, so bisecting on timeout // eventually lands on a tractable range. || msg.contains("timed out") - }) } /// Bisecting bound — `is_range_too_large` substring-matches `"timed out"`, @@ -707,9 +714,10 @@ fn bisecting_get_logs_with_depth( let err = match provider.get_logs(&filter).await { Ok(logs) => return Ok(logs), - Err(err) => anyhow::Error::new(err).context(format!("get_logs({from}..={to})")), + Err(err) => err, }; - if is_range_too_large(&err) && to > from && depth < MAX_BISECTION_DEPTH { + let too_large = is_range_too_large(&err); + if too_large && to > from && depth < MAX_BISECTION_DEPTH { let mid = (from + to) / 2; tracing::debug!(from, to, mid, depth, "range too large, bisecting"); let mut left = bisecting_get_logs_with_depth( @@ -721,19 +729,13 @@ fn bisecting_get_logs_with_depth( depth + 1, ) .await?; - let right = bisecting_get_logs_with_depth( - provider, - mid + 1, - to, - addresses, - topics, - depth + 1, - ) - .await?; + let right = + bisecting_get_logs_with_depth(provider, mid + 1, to, addresses, topics, depth + 1) + .await?; left.extend(right); Ok(left) } else { - Err(err) + Err(anyhow::Error::new(err).context(format!("get_logs({from}..={to})"))) } }) } @@ -830,8 +832,12 @@ impl LogAccumulator { /// Records a full pool-state update (price, liquidity, tick) from a `Swap`. fn handle_swap(&mut self, log: &Log) { - let Ok(decoded) = Swap::decode_log(&log.inner) else { - return; + let decoded = match Swap::decode_log(&log.inner) { + Ok(d) => d, + Err(err) => { + tracing::warn!(?err, pool = %log.address(), block = ?log.block_number, "failed to decode Swap log"); + return; + } }; let e = &decoded.data; let pool = log.address(); @@ -852,8 +858,12 @@ impl LogAccumulator { /// Applies positive tick-liquidity deltas from a `Mint` and refreshes /// pool liquidity from the prefetch cache. fn handle_mint(&mut self, log: &Log, liq_cache: &LiquidityCache) { - let Ok(decoded) = Mint::decode_log(&log.inner) else { - return; + let decoded = match Mint::decode_log(&log.inner) { + Ok(d) => d, + Err(err) => { + tracing::warn!(?err, pool = %log.address(), block = ?log.block_number, "failed to decode Mint log"); + return; + } }; let e = &decoded.data; let pool = log.address(); @@ -866,8 +876,12 @@ impl LogAccumulator { /// Applies negative tick-liquidity deltas from a `Burn` and refreshes /// pool liquidity from the prefetch cache. fn handle_burn(&mut self, log: &Log, liq_cache: &LiquidityCache) { - let Ok(decoded) = Burn::decode_log(&log.inner) else { - return; + let decoded = match Burn::decode_log(&log.inner) { + Ok(d) => d, + Err(err) => { + tracing::warn!(?err, pool = %log.address(), block = ?log.block_number, "failed to decode Burn log"); + return; + } }; let e = &decoded.data; let pool = log.address(); From 718f97b2b2cc9eb8b0347c3c8433a90dafc8629a Mon Sep 17 00:00:00 2001 From: Jan P Date: Wed, 29 Apr 2026 09:45:50 +0200 Subject: [PATCH 70/80] Add warns --- crates/pool-indexer/src/indexer/uniswap_v3.rs | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/crates/pool-indexer/src/indexer/uniswap_v3.rs b/crates/pool-indexer/src/indexer/uniswap_v3.rs index 31573d48d5..80c253f908 100644 --- a/crates/pool-indexer/src/indexer/uniswap_v3.rs +++ b/crates/pool-indexer/src/indexer/uniswap_v3.rs @@ -778,8 +778,12 @@ impl LogAccumulator { /// cache. Symbols are left `None` here and populated later by the /// background backfill task. fn handle_pool_created(&mut self, log: &Log, dec_cache: &DecimalsCache) { - let Ok(decoded) = PoolCreated::decode_log(&log.inner) else { - return; + let decoded = match PoolCreated::decode_log(&log.inner) { + Ok(d) => d, + Err(err) => { + tracing::warn!(?err, pool = %log.address(), block = ?log.block_number, "failed to decode PoolCreated log"); + return; + } }; let e = &decoded.data; let pool: Address = e.pool; @@ -806,8 +810,12 @@ impl LogAccumulator { /// Records the initial price and tick from an `Initialize` event. /// Preserves any liquidity already seen for this pool earlier in the chunk. fn handle_initialize(&mut self, log: &Log) { - let Ok(decoded) = Initialize::decode_log(&log.inner) else { - return; + let decoded = match Initialize::decode_log(&log.inner) { + Ok(d) => d, + Err(err) => { + tracing::warn!(?err, pool = %log.address(), block = ?log.block_number, "failed to decode Initialize log"); + return; + } }; let e = &decoded.data; let pool = log.address(); From e45e87743dd9658950c134d9bb149195e9d547fe Mon Sep 17 00:00:00 2001 From: Jan P Date: Wed, 29 Apr 2026 09:51:38 +0200 Subject: [PATCH 71/80] Comment about univ3 price point --- crates/pool-indexer/src/indexer/uniswap_v3.rs | 23 ++++++++++--------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/crates/pool-indexer/src/indexer/uniswap_v3.rs b/crates/pool-indexer/src/indexer/uniswap_v3.rs index 80c253f908..c0f269b205 100644 --- a/crates/pool-indexer/src/indexer/uniswap_v3.rs +++ b/crates/pool-indexer/src/indexer/uniswap_v3.rs @@ -1000,7 +1000,8 @@ mod tests { const POOL: Address = Address::repeat_byte(0x01); const TOKEN0: Address = Address::repeat_byte(0x02); const TOKEN1: Address = Address::repeat_byte(0x03); - // sqrt(1) * 2^96 — a valid initialised price + // `sqrtPriceX96 = sqrt(price) * 2^96` is Uniswap V3's Q64.96 fixed-point + // price representation; for `price = 1` this is exactly `2^96`. const SQRT_PRICE_1: u128 = 79_228_162_514_264_337_593_543_950_336; fn t(n: i32) -> I24 { @@ -1144,8 +1145,8 @@ mod tests { tickLower: t(-100), tickUpper: t(100), amount: 100_000u128, - amount0: alloy::primitives::U256::ZERO, - amount1: alloy::primitives::U256::ZERO, + amount0: U256::ZERO, + amount1: U256::ZERO, }; let liq_cache: LiquidityCache = HashMap::from([((POOL, 201u64), after_mint_liq)]); let logs = vec![make_log(POOL, 200, swap), make_log(POOL, 201, mint)]; @@ -1167,16 +1168,16 @@ mod tests { tickLower: t(-100), tickUpper: t(100), amount, - amount0: alloy::primitives::U256::ZERO, - amount1: alloy::primitives::U256::ZERO, + amount0: U256::ZERO, + amount1: U256::ZERO, }; let burn = Burn { owner: Address::ZERO, tickLower: t(-100), tickUpper: t(100), amount, - amount0: alloy::primitives::U256::ZERO, - amount1: alloy::primitives::U256::ZERO, + amount0: U256::ZERO, + amount1: U256::ZERO, }; let logs = vec![make_log(POOL, 100, mint), make_log(POOL, 101, burn)]; let c = collect_log_changes(FACTORY, &logs, &Default::default(), &Default::default()); @@ -1193,16 +1194,16 @@ mod tests { tickLower: t(-100), tickUpper: t(100), amount: mint_amount, - amount0: alloy::primitives::U256::ZERO, - amount1: alloy::primitives::U256::ZERO, + amount0: U256::ZERO, + amount1: U256::ZERO, }; let burn = Burn { owner: Address::ZERO, tickLower: t(-100), tickUpper: t(100), amount: burn_amount, - amount0: alloy::primitives::U256::ZERO, - amount1: alloy::primitives::U256::ZERO, + amount0: U256::ZERO, + amount1: U256::ZERO, }; let logs = vec![make_log(POOL, 100, mint), make_log(POOL, 101, burn)]; let c = collect_log_changes(FACTORY, &logs, &Default::default(), &Default::default()); From 3f0d0f9f356ce404416021f896fa38556dcc7bb6 Mon Sep 17 00:00:00 2001 From: Jan P Date: Wed, 29 Apr 2026 10:02:09 +0200 Subject: [PATCH 72/80] Refactor --- crates/pool-indexer/src/config.rs | 52 +++++++++- crates/pool-indexer/src/run.rs | 161 +++++++++++++----------------- 2 files changed, 118 insertions(+), 95 deletions(-) diff --git a/crates/pool-indexer/src/config.rs b/crates/pool-indexer/src/config.rs index 74e68c195e..7c94576c6b 100644 --- a/crates/pool-indexer/src/config.rs +++ b/crates/pool-indexer/src/config.rs @@ -200,6 +200,56 @@ impl Configuration { pub fn from_path(path: &Path) -> Result { let content = std::fs::read_to_string(path) .with_context(|| format!("reading config file {}", path.display()))?; - toml::from_str(&content).context("parsing config file") + let config: Self = toml::from_str(&content).context("parsing config file")?; + config.validate_networks(); + Ok(config) + } + + /// Cross-network sanity checks that don't fit serde's per-field + /// validation: uniqueness of names / chain IDs / factory addresses, the + /// subgraph-URL ↔ multi-factory mutual exclusion, and the at-least-one- + /// network requirement. + fn validate_networks(&self) { + assert!( + !self.networks.is_empty(), + "at least one [[network]] must be configured" + ); + let mut names = std::collections::HashSet::new(); + let mut chain_ids = std::collections::HashSet::new(); + for n in &self.networks { + assert!( + names.insert(n.name.as_str()), + "duplicate network name: {}", + n.name, + ); + assert!( + chain_ids.insert(n.chain_id), + "duplicate chain_id: {}", + n.chain_id, + ); + assert!( + !n.factories.is_empty(), + "network {} must list at least one factory", + n.name, + ); + let mut seen = std::collections::HashSet::new(); + for f in &n.factories { + assert!( + seen.insert(f.address), + "network {}: duplicate factory {}", + n.name, + f.address, + ); + } + // A subgraph indexes one specific factory — applying one URL to + // many factories would double-seed the wrong data. Multi-factory + // networks must cold-seed each factory. + assert!( + !(n.factories.len() > 1 && n.subgraph_url.is_some()), + "network {}: subgraph-url cannot be combined with multiple \ + factories (omit subgraph-url to cold-seed each factory)", + n.name, + ); + } } } diff --git a/crates/pool-indexer/src/run.rs b/crates/pool-indexer/src/run.rs index 39b8596f4b..563a479b8e 100644 --- a/crates/pool-indexer/src/run.rs +++ b/crates/pool-indexer/src/run.rs @@ -8,7 +8,7 @@ use { clap::Parser, ethrpc::{AlloyProvider, Config as EthRpcConfig, web3}, sqlx::{PgPool, postgres::PgPoolOptions}, - std::{collections::HashSet, net::SocketAddr, sync::Arc}, + std::sync::Arc, tokio::task::JoinSet, }; @@ -22,8 +22,6 @@ pub async fn start(args: impl Iterator) { } pub async fn run(config: Configuration) { - validate_networks(&config.networks); - let db = connect_db(&config).await; let api_state = build_api_state(&db, &config.networks); @@ -35,10 +33,13 @@ pub async fn run(config: Configuration) { ); let mut set = JoinSet::new(); - spawn_api_task(&mut set, api_state, config.api.bind_address); + let api_router = crate::api::router(api_state); + let api_addr = config.api.bind_address; + set.spawn(async move { serve(api_router, api_addr).await }); for network in config.networks { - spawn_network_task(&mut set, db.clone(), network); + let db = db.clone(); + set.spawn(async move { run_network_indexer(db, network).await }); } if let Some(result) = set.join_next().await { @@ -75,17 +76,6 @@ fn build_api_state(db: &PgPool, networks: &[NetworkConfig]) -> Arc { }) } -fn spawn_api_task(set: &mut JoinSet<()>, state: Arc, bind_address: SocketAddr) { - let router = crate::api::router(state); - set.spawn(async move { serve(router, bind_address).await }); -} - -fn spawn_network_task(set: &mut JoinSet<()>, db: PgPool, network: NetworkConfig) { - set.spawn(async move { - run_network_indexer(db, network).await; - }); -} - async fn run_network_indexer(db: PgPool, network: NetworkConfig) { tracing::info!( network = %network.name, @@ -95,6 +85,22 @@ async fn run_network_indexer(db: PgPool, network: NetworkConfig) { ); let provider = build_provider(&network); + + // Verify the configured chain_id matches the RPC. A misconfigured + // deployment (e.g. chain_id = 1 pointed at an Arbitrum RPC) would + // otherwise silently index Arbitrum events into the mainnet partition + // of the shared DB. + use alloy::providers::Provider; + let actual_chain_id = provider + .get_chain_id() + .await + .expect("failed to fetch chain_id from RPC"); + assert_eq!( + actual_chain_id, network.chain_id, + "chain_id mismatch for network {}: config says {}, RPC reports {}", + network.name, network.chain_id, actual_chain_id, + ); + let network = Arc::new(network); // One indexer task per factory, sharing the same provider and DB pool. @@ -135,44 +141,55 @@ async fn run_factory_indexer( "starting factory indexer", ); - // A checkpoint already means this (chain, factory) has been bootstrapped — - // e.g. a prior run seeded it. Skip the seed and resume live indexing. - let checkpoint = crate::db::uniswap_v3::get_checkpoint(&db, network.chain_id, &factory.address) + bootstrap_factory(&db, &provider, &indexer, &network, &factory).await; + indexer.run(network.poll_interval()).await; +} + +/// Seed + catch-up for a fresh `(chain, factory)`. A pre-existing checkpoint +/// means this pair has already been bootstrapped (e.g. a prior run seeded +/// it), in which case we skip straight to live indexing. +async fn bootstrap_factory( + db: &PgPool, + provider: &AlloyProvider, + indexer: &UniswapV3Indexer, + network: &NetworkConfig, + factory: &crate::config::FactoryConfig, +) { + let checkpoint = crate::db::uniswap_v3::get_checkpoint(db, network.chain_id, &factory.address) .await .expect("failed to read checkpoint"); - - if checkpoint.is_none() { - let seeded_block = if let Some(subgraph_url) = network.subgraph_url.as_ref() { - crate::subgraph_seeder::seed( - &db, - network.name.as_str(), - network.chain_id, - factory.address, - subgraph_url, - network.seed_block, - ) - .await - .expect("subgraph seeding failed") - } else { - crate::cold_seeder::cold_seed( - &db, - network.name.as_str(), - network.chain_id, - provider, - factory.address, - factory.deployment_block, - network.seed_block, - ) - .await - .expect("cold seeding failed") - }; - indexer - .catch_up(seeded_block) - .await - .expect("catch-up indexing failed"); + if checkpoint.is_some() { + return; } - indexer.run(network.poll_interval()).await; + let seeded_block = if let Some(subgraph_url) = network.subgraph_url.as_ref() { + crate::subgraph_seeder::seed( + db, + network.name.as_str(), + network.chain_id, + factory.address, + subgraph_url, + network.seed_block, + ) + .await + .expect("subgraph seeding failed") + } else { + crate::cold_seeder::cold_seed( + db, + network.name.as_str(), + network.chain_id, + provider.clone(), + factory.address, + factory.deployment_block, + network.seed_block, + ) + .await + .expect("cold seeding failed") + }; + indexer + .catch_up(seeded_block) + .await + .expect("catch-up indexing failed"); } fn build_provider(network: &NetworkConfig) -> AlloyProvider { @@ -185,50 +202,6 @@ fn build_provider(network: &NetworkConfig) -> AlloyProvider { .clone() } -fn validate_networks(networks: &[NetworkConfig]) { - assert!( - !networks.is_empty(), - "at least one [[network]] must be configured" - ); - let mut names = HashSet::new(); - let mut chain_ids = HashSet::new(); - for n in networks { - assert!( - names.insert(n.name.as_str()), - "duplicate network name: {}", - n.name, - ); - assert!( - chain_ids.insert(n.chain_id), - "duplicate chain_id: {}", - n.chain_id, - ); - assert!( - !n.factories.is_empty(), - "network {} must list at least one factory", - n.name, - ); - let mut seen = HashSet::new(); - for f in &n.factories { - assert!( - seen.insert(f.address), - "network {}: duplicate factory {}", - n.name, - f.address, - ); - } - // A subgraph indexes one specific factory — applying one URL to many - // factories would double-seed the wrong data. Multi-factory networks - // must cold-seed each factory. - assert!( - !(n.factories.len() > 1 && n.subgraph_url.is_some()), - "network {}: subgraph-url cannot be combined with multiple factories (omit \ - subgraph-url to cold-seed each factory)", - n.name, - ); - } -} - async fn connect_db(config: &Configuration) -> sqlx::PgPool { PgPoolOptions::new() .max_connections(config.database.max_connections.get()) From 1fbe68c9066824b75ec2ea8804aefbcfd70ae745 Mon Sep 17 00:00:00 2001 From: Jan P Date: Wed, 29 Apr 2026 10:02:23 +0200 Subject: [PATCH 73/80] Fmt --- crates/pool-indexer/src/config.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/pool-indexer/src/config.rs b/crates/pool-indexer/src/config.rs index 7c94576c6b..b3bc2a4259 100644 --- a/crates/pool-indexer/src/config.rs +++ b/crates/pool-indexer/src/config.rs @@ -246,8 +246,8 @@ impl Configuration { // networks must cold-seed each factory. assert!( !(n.factories.len() > 1 && n.subgraph_url.is_some()), - "network {}: subgraph-url cannot be combined with multiple \ - factories (omit subgraph-url to cold-seed each factory)", + "network {}: subgraph-url cannot be combined with multiple factories (omit \ + subgraph-url to cold-seed each factory)", n.name, ); } From ea7c54b4870f8f74f347e7f0ecf8ece850e3743d Mon Sep 17 00:00:00 2001 From: Jan P Date: Wed, 29 Apr 2026 10:07:48 +0200 Subject: [PATCH 74/80] Force positive fee --- database/sql/V110__pool_indexer_uniswap_v3.sql | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/database/sql/V110__pool_indexer_uniswap_v3.sql b/database/sql/V110__pool_indexer_uniswap_v3.sql index ab76c2ecbc..108b3befe4 100644 --- a/database/sql/V110__pool_indexer_uniswap_v3.sql +++ b/database/sql/V110__pool_indexer_uniswap_v3.sql @@ -16,7 +16,7 @@ CREATE TABLE uniswap_v3_pools ( factory BYTEA NOT NULL, token0 BYTEA NOT NULL, token1 BYTEA NOT NULL, - fee INT NOT NULL, -- hundredths of a basis point (500 = 0.05%, 3000 = 0.3%, 10000 = 1%) + fee INT NOT NULL CHECK (fee > 0), -- hundredths of a basis point (500 = 0.05%, 3000 = 0.3%, 10000 = 1%) token0_decimals SMALLINT, token1_decimals SMALLINT, token0_symbol TEXT, @@ -32,12 +32,18 @@ CREATE TABLE uniswap_v3_pool_states ( block_number BIGINT NOT NULL, sqrt_price_x96 NUMERIC NOT NULL, -- uint160 liquidity NUMERIC NOT NULL, -- uint128 + -- `tick` is the Uniswap V3 *price tick index* (signed int24), not a + -- database index. It's the discrete log-price coordinate from the pool's + -- last Swap/Initialize event. See also `uniswap_v3_ticks.tick_idx` below. tick INT NOT NULL, PRIMARY KEY (chain_id, pool_address), FOREIGN KEY (chain_id, pool_address) REFERENCES uniswap_v3_pools(chain_id, address) ); --- Active ticks per pool (rows with liquidity_net = 0 are pruned) +-- Active ticks per pool (rows with liquidity_net = 0 are pruned). +-- `tick_idx` is the Uniswap V3 price tick coordinate (signed int24) — the +-- same domain as `uniswap_v3_pool_states.tick`, just one row per active +-- tick boundary instead of the pool's current tick. CREATE TABLE uniswap_v3_ticks ( chain_id BIGINT NOT NULL, pool_address BYTEA NOT NULL, From 2a2137451a9cf35a5e03b49520043aa9e1d50836 Mon Sep 17 00:00:00 2001 From: Jan P Date: Wed, 29 Apr 2026 10:17:28 +0200 Subject: [PATCH 75/80] Fix test --- crates/pool-indexer/src/indexer/uniswap_v3.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/crates/pool-indexer/src/indexer/uniswap_v3.rs b/crates/pool-indexer/src/indexer/uniswap_v3.rs index c0f269b205..3f8c06db42 100644 --- a/crates/pool-indexer/src/indexer/uniswap_v3.rs +++ b/crates/pool-indexer/src/indexer/uniswap_v3.rs @@ -986,6 +986,7 @@ mod tests { alloy::{ primitives::{ I256, + U256, aliases::{I24, U24, U160}, }, sol_types::SolEvent, From 0c5ff14bf415a869808cea2dcddcf3a33de22da5 Mon Sep 17 00:00:00 2001 From: Jan P Date: Wed, 29 Apr 2026 10:30:26 +0200 Subject: [PATCH 76/80] Use url builder from shared --- Cargo.lock | 2 +- .../src/boundary/liquidity/uniswap/v3.rs | 9 +++--- crates/liquidity-sources/Cargo.toml | 1 + .../src/uniswap_v3/pool_indexer.rs | 31 +++++-------------- crates/shared/Cargo.toml | 1 - 5 files changed, 15 insertions(+), 29 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index f666400ac8..c0db5dc200 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -5421,6 +5421,7 @@ dependencies = [ "serde", "serde_json", "serde_with", + "shared", "strum", "testlib", "thiserror 1.0.69", @@ -7742,7 +7743,6 @@ dependencies = [ "humantime", "indexmap 2.13.0", "itertools 0.14.0", - "liquidity-sources", "maplit", "mockall", "model", diff --git a/crates/driver/src/boundary/liquidity/uniswap/v3.rs b/crates/driver/src/boundary/liquidity/uniswap/v3.rs index a7fd2d93af..f690afc32c 100644 --- a/crates/driver/src/boundary/liquidity/uniswap/v3.rs +++ b/crates/driver/src/boundary/liquidity/uniswap/v3.rs @@ -152,10 +152,11 @@ async fn build_pool_data_source( if let Some(url) = &config.pool_indexer_url { tracing::info!(%url, "uniswap v3: using pool-indexer as data source"); - return Ok(Arc::new( - PoolIndexerClient::new(url.clone(), eth.chain(), http) - .context("failed to construct pool-indexer client")?, - )); + return Ok(Arc::new(PoolIndexerClient::new( + url.clone(), + eth.chain(), + http, + ))); } let graph_url = config diff --git a/crates/liquidity-sources/Cargo.toml b/crates/liquidity-sources/Cargo.toml index f4b0b87547..3f886ac7e2 100644 --- a/crates/liquidity-sources/Cargo.toml +++ b/crates/liquidity-sources/Cargo.toml @@ -33,6 +33,7 @@ reqwest = { workspace = true, features = ["json"] } serde = { workspace = true } serde_json = { workspace = true } serde_with = { workspace = true } +shared = { workspace = true } strum = { workspace = true } thiserror = { workspace = true } token-info = { workspace = true } diff --git a/crates/liquidity-sources/src/uniswap_v3/pool_indexer.rs b/crates/liquidity-sources/src/uniswap_v3/pool_indexer.rs index 297c3ed411..b651618b34 100644 --- a/crates/liquidity-sources/src/uniswap_v3/pool_indexer.rs +++ b/crates/liquidity-sources/src/uniswap_v3/pool_indexer.rs @@ -37,29 +37,14 @@ pub struct PoolIndexerClient { } impl PoolIndexerClient { - pub fn new(base_url: Url, chain: Chain, http: Client) -> Result { - // `Url::join` replaces the last path segment unless the base ends in - // a `/`. Build `/api/v1//uniswap/v3/` once so - // every `path()` call behaves like "append". + pub fn new(base_url: Url, chain: Chain, http: Client) -> Self { let prefix = format!("api/v1/{}/uniswap/v3/", chain.slug()); - let with_trailing_slash = if base_url.path().ends_with('/') { - base_url - } else { - let mut u = base_url; - let p = format!("{}/", u.path()); - u.set_path(&p); - u - }; - let base_url = with_trailing_slash - .join(&prefix) - .with_context(|| format!("joining {prefix} onto {with_trailing_slash}"))?; - Ok(Self { base_url, http }) + let base_url = shared::url::join(&base_url, &prefix); + Self { base_url, http } } - fn path(&self, suffix: &str) -> Result { - self.base_url - .join(suffix) - .with_context(|| format!("joining {suffix} onto {}", self.base_url)) + fn path(&self, suffix: &str) -> Url { + shared::url::join(&self.base_url, suffix) } } @@ -178,7 +163,7 @@ impl V3PoolDataSource for PoolIndexerClient { let mut pools: Vec = Vec::new(); let mut fetched_block_number: u64 = 0; loop { - let mut url = self.path("pools")?; + let mut url = self.path("pools"); url.query_pairs_mut() .append_pair("limit", &LIST_PAGE_SIZE.to_string()); if let Some(c) = &cursor { @@ -255,7 +240,7 @@ fn ids_param(ids: &[Address]) -> String { } async fn fetch_pools_by_ids(client: &PoolIndexerClient, ids: &[Address]) -> Result> { - let mut url = client.path("pools/by-ids")?; + let mut url = client.path("pools/by-ids"); url.query_pairs_mut() .append_pair("pool_ids", &ids_param(ids)); let resp: PoolsResponse = client @@ -280,7 +265,7 @@ async fn fetch_ticks_by_pool_ids( client: &PoolIndexerClient, ids: &[Address], ) -> Result>> { - let mut url = client.path("pools/ticks")?; + let mut url = client.path("pools/ticks"); url.query_pairs_mut() .append_pair("pool_ids", &ids_param(ids)); let resp: BulkTicksResponse = client diff --git a/crates/shared/Cargo.toml b/crates/shared/Cargo.toml index ab8b09f759..1fbf5824e6 100644 --- a/crates/shared/Cargo.toml +++ b/crates/shared/Cargo.toml @@ -36,7 +36,6 @@ hex-literal = { workspace = true } humantime = { workspace = true } indexmap = { workspace = true } itertools = { workspace = true } -liquidity-sources = { workspace = true } mockall = { workspace = true, optional = true } model = { workspace = true } moka = { workspace = true, features = ["sync"] } From 02656cfe8d54ddfe623bac37a903cc1738e098aa Mon Sep 17 00:00:00 2001 From: Jan P Date: Wed, 29 Apr 2026 10:38:28 +0200 Subject: [PATCH 77/80] Refactor config --- .../src/boundary/liquidity/uniswap/v3.rs | 18 +++++---- crates/driver/src/infra/config/file/load.rs | 17 +++++---- crates/driver/src/infra/liquidity/config.rs | 37 ++++++++++--------- 3 files changed, 41 insertions(+), 31 deletions(-) diff --git a/crates/driver/src/boundary/liquidity/uniswap/v3.rs b/crates/driver/src/boundary/liquidity/uniswap/v3.rs index f690afc32c..a41d12bbb8 100644 --- a/crates/driver/src/boundary/liquidity/uniswap/v3.rs +++ b/crates/driver/src/boundary/liquidity/uniswap/v3.rs @@ -159,14 +159,18 @@ async fn build_pool_data_source( ))); } - let graph_url = config - .graph_url + let subgraph = config + .subgraph .as_ref() - .context("uniswap v3: graph_url required when pool_indexer_url is unset")?; - tracing::info!(url = %graph_url, "uniswap v3: using subgraph as data source"); + .context("uniswap v3: subgraph required when pool_indexer_url is unset")?; + tracing::info!(url = %subgraph.url, "uniswap v3: using subgraph as data source"); Ok(Arc::new( - UniV3SubgraphClient::from_subgraph_url(graph_url, http, config.max_pools_per_tick_query) - .await - .context("failed to construct UniV3 subgraph client")?, + UniV3SubgraphClient::from_subgraph_url( + &subgraph.url, + http, + subgraph.max_pools_per_tick_query, + ) + .await + .context("failed to construct UniV3 subgraph client")?, )) } diff --git a/crates/driver/src/infra/config/file/load.rs b/crates/driver/src/infra/config/file/load.rs index ddc6286772..d9d4750a60 100644 --- a/crates/driver/src/infra/config/file/load.rs +++ b/crates/driver/src/infra/config/file/load.rs @@ -233,17 +233,17 @@ pub async fn load(chain: Chain, path: &Path) -> infra::Config { graph_url.is_some() || pool_indexer_url.is_some(), "uniswap-v3: set at least one of graph-url or pool-indexer-url" ); + let subgraph = graph_url.map(|url| liquidity::config::UniswapV3Subgraph { + url, + max_pools_per_tick_query, + }); liquidity::config::UniswapV3 { max_pools_to_initialize, pool_indexer_url, reinit_interval, ..match preset { file::UniswapV3Preset::UniswapV3 => { - liquidity::config::UniswapV3::uniswap_v3( - graph_url, - chain, - max_pools_per_tick_query, - ) + liquidity::config::UniswapV3::uniswap_v3(subgraph, chain) } } .expect("no Uniswap V3 preset for current network") @@ -261,13 +261,16 @@ pub async fn load(chain: Chain, path: &Path) -> infra::Config { graph_url.is_some() || pool_indexer_url.is_some(), "uniswap-v3: set at least one of graph-url or pool-indexer-url" ); + let subgraph = graph_url.map(|url| liquidity::config::UniswapV3Subgraph { + url, + max_pools_per_tick_query, + }); liquidity::config::UniswapV3 { router: router.into(), max_pools_to_initialize, - graph_url, + subgraph, pool_indexer_url, reinit_interval, - max_pools_per_tick_query, } } }) diff --git a/crates/driver/src/infra/liquidity/config.rs b/crates/driver/src/infra/liquidity/config.rs index 4e1d395bf9..87cb4ca225 100644 --- a/crates/driver/src/infra/liquidity/config.rs +++ b/crates/driver/src/infra/liquidity/config.rs @@ -158,6 +158,19 @@ impl Swapr { } } +/// Subgraph-specific Uniswap V3 config. Only consulted when no +/// `pool_indexer_url` is set on [`UniswapV3`]. +#[derive(Clone, Debug)] +pub struct UniswapV3Subgraph { + /// URL of the Uniswap V3 subgraph. + pub url: Url, + + /// How many pool IDs can be present in a where clause of a Tick query at + /// once. Some subgraphs are overloaded and throw errors when there are + /// too many. + pub max_pools_per_tick_query: usize, +} + /// Uniswap V3 liquidity fetching options. #[derive(Clone, Debug)] pub struct UniswapV3 { @@ -167,41 +180,31 @@ pub struct UniswapV3 { /// How many pools should be initialized during start up. pub max_pools_to_initialize: usize, - /// URL of the Uniswap V3 subgraph. One of `graph_url` or - /// `pool_indexer_url` must be set; when both are set the pool-indexer - /// wins. Enforced by the config loader. - pub graph_url: Option, + /// Subgraph data source. One of `subgraph` or `pool_indexer_url` must be + /// set; when both are set the pool-indexer wins. Enforced by the config + /// loader. + pub subgraph: Option, /// Optional URL of a CoW pool-indexer service exposing the /// `/api/v1/{network}/uniswap/v3/` endpoints. When set, it takes - /// precedence over `graph_url` for pool metadata and ticks. + /// precedence over `subgraph` for pool metadata and ticks. pub pool_indexer_url: Option, /// How often the liquidity source should be reinitialized to /// become aware of new pools. pub reinit_interval: Option, - - /// How many pool IDs can be present in a where clause of a Tick query at - /// once. Some subgraphs are overloaded and throw errors when there are - /// too many. Only applies when using the subgraph source. - pub max_pools_per_tick_query: usize, } impl UniswapV3 { /// Returns the liquidity configuration for Uniswap V3. #[expect(clippy::self_named_constructors)] - pub fn uniswap_v3( - graph_url: Option, - chain: Chain, - max_pools_per_tick_query: usize, - ) -> Option { + pub fn uniswap_v3(subgraph: Option, chain: Chain) -> Option { Some(Self { router: contracts::UniswapV3SwapRouterV2::deployment_address(&chain.id())?.into(), max_pools_to_initialize: 100, - graph_url, + subgraph, pool_indexer_url: None, reinit_interval: None, - max_pools_per_tick_query, }) } } From a6b1d7ab3bbc836717d3ec35fb988069ced323de Mon Sep 17 00:00:00 2001 From: Jan P Date: Wed, 29 Apr 2026 13:30:49 +0200 Subject: [PATCH 78/80] Comment --- crates/pool-indexer/src/indexer/uniswap_v3.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/crates/pool-indexer/src/indexer/uniswap_v3.rs b/crates/pool-indexer/src/indexer/uniswap_v3.rs index 3f8c06db42..b91555563a 100644 --- a/crates/pool-indexer/src/indexer/uniswap_v3.rs +++ b/crates/pool-indexer/src/indexer/uniswap_v3.rs @@ -657,11 +657,10 @@ async fn fetch_symbol(provider: &AlloyProvider, token: Address) -> Option bool { let RpcError::ErrorResp(payload) = err else { + // Early return for transport error where we don't get a payload from the node return false; }; let msg = payload.message.to_lowercase(); From 1a0faec5e431abcec7e0d30d1ded9ad0560bdc57 Mon Sep 17 00:00:00 2001 From: Jan P Date: Wed, 29 Apr 2026 13:50:29 +0200 Subject: [PATCH 79/80] Redo err recognition --- crates/pool-indexer/Cargo.toml | 2 +- crates/pool-indexer/src/indexer/uniswap_v3.rs | 33 ++++++++++--------- 2 files changed, 18 insertions(+), 17 deletions(-) diff --git a/crates/pool-indexer/Cargo.toml b/crates/pool-indexer/Cargo.toml index 1ddc26b484..b54ae24efa 100644 --- a/crates/pool-indexer/Cargo.toml +++ b/crates/pool-indexer/Cargo.toml @@ -15,7 +15,7 @@ name = "pool-indexer" path = "src/main.rs" [dependencies] -alloy = { workspace = true, features = ["providers", "rpc-types", "sol-types"] } +alloy = { workspace = true, features = ["contract", "providers", "rpc-types", "sol-types"] } alloy-primitives = { workspace = true, features = ["serde", "std"] } anyhow = { workspace = true } async-trait = { workspace = true } diff --git a/crates/pool-indexer/src/indexer/uniswap_v3.rs b/crates/pool-indexer/src/indexer/uniswap_v3.rs index b91555563a..fd4e7aaacb 100644 --- a/crates/pool-indexer/src/indexer/uniswap_v3.rs +++ b/crates/pool-indexer/src/indexer/uniswap_v3.rs @@ -655,30 +655,31 @@ async fn fetch_symbol(provider: &AlloyProvider, token: Address) -> Option bool { let RpcError::ErrorResp(payload) = err else { - // Early return for transport error where we don't get a payload from the node return false; }; let msg = payload.message.to_lowercase(); - // Alchemy: "query exceeds max block range 10000" msg.contains("max block range") - // OVH: "request timed out" — the server cuts off oversized queries - // instead of rejecting with a size error, so bisecting on timeout - // eventually lands on a tractable range. - || msg.contains("timed out") + || msg.contains("max results") + || msg.contains("log response size exceeded") + || msg.contains("query timeout exceeded") + || msg.contains("response is too big") } -/// Bisecting bound — `is_range_too_large` substring-matches `"timed out"`, -/// which can also fire on transient client/network timeouts unrelated to -/// range size. Without this cap a single misclassified timeout would burn -/// `log2(range)` RPC calls before the recursion bottoms out at `to == from`. -/// 8 halvings = 256× resolution; for the indexer's ~1k-block chunks that -/// means giving up around ~4-block ranges, well past where range-size could -/// plausibly still be the cause. +/// Bisecting bound — substring matching on RPC error messages is necessarily +/// approximate, and a misclassified error would otherwise burn `log2(range)` +/// RPC calls before the recursion bottoms out at `to == from`. 8 halvings = +/// 256× resolution; for the indexer's ~1k-block chunks that means giving up +/// around ~4-block ranges, well past where range-size could plausibly still +/// be the cause. const MAX_BISECTION_DEPTH: u32 = 8; /// Fetches logs for `[from, to]` filtered by the given contract addresses From 1454ac2254abad2f20ae6ef233e1f0e35f69a464 Mon Sep 17 00:00:00 2001 From: Jan P Date: Wed, 29 Apr 2026 14:08:41 +0200 Subject: [PATCH 80/80] Add caught up msg --- crates/pool-indexer/src/indexer/uniswap_v3.rs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/crates/pool-indexer/src/indexer/uniswap_v3.rs b/crates/pool-indexer/src/indexer/uniswap_v3.rs index fd4e7aaacb..47f2852002 100644 --- a/crates/pool-indexer/src/indexer/uniswap_v3.rs +++ b/crates/pool-indexer/src/indexer/uniswap_v3.rs @@ -220,7 +220,14 @@ impl UniswapV3Indexer { }) .buffered(self.fetch_concurrency) .try_for_each(|(chunk, logs)| self.commit_chunk(chunk, logs)) - .await + .await?; + + tracing::info!( + block = finalized_block, + blocks_processed = lag, + "live indexer caught up to finalized block", + ); + Ok(()) } async fn finalized_block(&self) -> Result {