Showing preview only (590K chars total). Download the full file or copy to clipboard to get everything.
Repository: darkforestry/amms-rs
Branch: main
Commit: 48587d490b35
Files: 75
Total size: 562.0 KB
Directory structure:
gitextract_fe8e_14t/
├── .github/
│ ├── ISSUE_TEMPLATE/
│ │ ├── BUG-FORM.yml
│ │ └── FEATURE-FORM.yml
│ ├── PULL_REQUEST_TEMPLATE.md
│ ├── dependabot.yml
│ └── workflows/
│ └── ci.yml
├── .gitignore
├── .gitmodules
├── Cargo.toml
├── README.md
├── benches/
│ ├── erc_4626.rs
│ ├── uniswap_v2.rs
│ └── uniswap_v3.rs
├── build.rs
├── contracts/
│ ├── foundry.toml
│ ├── src/
│ │ ├── Balancer/
│ │ │ └── GetBalancerPoolDataBatchRequest.sol
│ │ ├── ERC20/
│ │ │ └── GetTokenDecimalsBatchRequest.sol
│ │ ├── ERC4626/
│ │ │ └── GetERC4626VaultDataBatchRequest.sol
│ │ ├── UniswapV2/
│ │ │ ├── GetUniswapV2PairsBatchRequest.sol
│ │ │ └── GetUniswapV2PoolDataBatchRequest.sol
│ │ ├── UniswapV3/
│ │ │ ├── FixedPoint.sol
│ │ │ ├── GetUniswapV3PoolDataBatchRequest.sol
│ │ │ ├── GetUniswapV3PoolSlot0BatchRequest.sol
│ │ │ ├── GetUniswapV3PoolTickBitmapBatchRequest.sol
│ │ │ ├── GetUniswapV3PoolTickDataBatchRequest.sol
│ │ │ └── interfaces/
│ │ │ ├── IBalancer.sol
│ │ │ ├── IUniswapV2.sol
│ │ │ ├── IUniswapV3.sol
│ │ │ └── Token.sol
│ │ ├── filters/
│ │ │ ├── WethValueInPools.sol
│ │ │ └── WethValueInPoolsBatchRequest.sol
│ │ └── interfaces/
│ │ ├── IBalancer.sol
│ │ ├── IUniswapV2.sol
│ │ ├── IUniswapV3.sol
│ │ └── Token.sol
│ └── test/
│ ├── FixedPoint.t.sol
│ ├── WethValueInPools.t.sol
│ └── WethValueInPoolsBatchRequest.t.sol
├── dependabot.yml
├── examples/
│ ├── filters.rs
│ ├── simulate_swap.rs
│ ├── state_space_builder.rs
│ ├── subscribe.rs
│ ├── swap_calldata.rs
│ └── sync_macro.rs
└── src/
├── amms/
│ ├── abi/
│ │ ├── GetBalancerPoolDataBatchRequest.json
│ │ ├── GetERC4626VaultDataBatchRequest.json
│ │ ├── GetTokenDecimalsBatchRequest.json
│ │ ├── GetUniswapV2PairsBatchRequest.json
│ │ ├── GetUniswapV2PoolDataBatchRequest.json
│ │ ├── GetUniswapV3PoolDataBatchRequest.json
│ │ ├── GetUniswapV3PoolSlot0BatchRequest.json
│ │ ├── GetUniswapV3PoolTickBitmapBatchRequest.json
│ │ ├── GetUniswapV3PoolTickDataBatchRequest.json
│ │ ├── WethValueInPools.json
│ │ └── WethValueInPoolsBatchRequest.json
│ ├── amm.rs
│ ├── balancer/
│ │ ├── bmath.rs
│ │ └── mod.rs
│ ├── consts.rs
│ ├── erc_4626/
│ │ └── mod.rs
│ ├── error.rs
│ ├── factory.rs
│ ├── float.rs
│ ├── mod.rs
│ ├── uniswap_v2/
│ │ └── mod.rs
│ └── uniswap_v3/
│ └── mod.rs
├── lib.rs
└── state_space/
├── cache.rs
├── discovery.rs
├── error.rs
├── filters/
│ ├── blacklist.rs
│ ├── mod.rs
│ ├── value.rs
│ └── whitelist.rs
└── mod.rs
================================================
FILE CONTENTS
================================================
================================================
FILE: .github/ISSUE_TEMPLATE/BUG-FORM.yml
================================================
name: Bug report
description: File a bug report
labels: ["bug"]
title: "Bug: "
body:
- type: markdown
attributes:
value: |
Please ensure that the bug has not already been filed in the issue tracker.
Thanks for taking the time to report this bug!
- type: textarea
attributes:
label: Describe the bug
description: Please include code snippets as well if relevant.
validations:
required: true
================================================
FILE: .github/ISSUE_TEMPLATE/FEATURE-FORM.yml
================================================
name: Feature request
description: Suggest a feature
labels: ["enhancement"]
title: "Feat: "
body:
- type: markdown
attributes:
value: |
Please ensure that the feature has not already been requested in the issue tracker.
- type: textarea
attributes:
label: Describe the feature you would like
description:
Please also describe your goals for the feature. What problems it solves, how it would
be used, etc.
validations:
required: true
- type: textarea
attributes:
label: Additional context
description: Add any other context to the feature (screenshots, resources, etc.)
================================================
FILE: .github/PULL_REQUEST_TEMPLATE.md
================================================
<!--
Thank you for your Pull Request. Please provide a description above and review
the requirements below.
Bug fixes and new features should include tests.
-->
<!-- ** Please select "Allow edits from maintainers" in the PR Options ** -->
## Motivation
<!--
Explain the context and why you're making that change. What is the problem
you're trying to solve? In some cases there is not a problem and this can be
thought of as being the motivation for your change.
-->
## Solution
<!--
Summarize the solution and provide any necessary context needed to understand
the code change.
-->
## PR Checklist
- [ ] Added Tests
- [ ] Added Documentation
- [ ] Breaking changes
================================================
FILE: .github/dependabot.yml
================================================
version: 2
updates:
- package-ecosystem: "cargo"
directory: "/"
schedule:
interval: "weekly"
- package-ecosystem: "docker"
directory: "/"
schedule:
interval: "weekly"
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
================================================
FILE: .github/workflows/ci.yml
================================================
name: CI
on:
push:
branches:
- main
pull_request:
types: [opened,synchronize,reopened]
branches:
- main
env:
ETHEREUM_PROVIDER: ${{ secrets.ETHEREUM_PROVIDER }}
RUST_VERSION: "1.84"
NIGHTLY_VERSION: nightly-2024-11-01
CARGO_TERM_COLOR: always
# Skip incremental build and debug info generation in CI
CARGO_INCREMENTAL: 0
CARGO_PROFILE_DEV_DEBUG: 0
jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- run: rustup component add rustfmt
- uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check
test:
name: Test
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: ${{ env.NIGHTLY_VERSION }}
override: true
- name: Install protobuf-compiler
run: sudo apt-get install -y protobuf-compiler
- name: Cache
uses: actions/cache@v3
continue-on-error: false
with:
path: |
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ env.RUST_VERSION }}-${{ env.NIGHTLY_VERSION }}-cargo-test-${{ hashFiles('**/Cargo.lock') }}
restore-keys: ${{ env.RUST_VERSION }}-${{ env.NIGHTLY_VERSION }}-cargo-test-
- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
with:
version: nightly
- name: Install latest nextest release
uses: taiki-e/install-action@nextest
- name: Build tests
uses: actions-rs/cargo@v1
with:
command: nextest
args: run --workspace --no-run
- name: Run tests
uses: actions-rs/cargo@v1
with:
command: nextest
args: run --workspace
================================================
FILE: .gitignore
================================================
/target
Cargo.lock
# Foundry
# Compiler files
contracts/cache/
contracts/out/
contracts/lib/
contracts/src/flattened/
# Ignores development broadcast logs
!/broadcast
/broadcast/*/31337/
/broadcast/**/dry-run/
# Dotenv file
*.env
# Temp checkpoint
*.temp-checkpoint.json
# intellij
*.idea/
================================================
FILE: .gitmodules
================================================
[submodule "contracts/lib/forge-std"]
path = contracts/lib/forge-std
url = https://github.com/foundry-rs/forge-std
================================================
FILE: Cargo.toml
================================================
[package]
name = "amms"
version = "0.7.4"
edition = "2021"
license = "MIT"
description = "A library to interact with automated market makers across EVM chains."
readme = "README.md"
homepage = "https://github.com/darkforestry/amms-rs"
repository = "https://github.com/darkforestry/amms-rs"
keywords = ["ethereum", "amm", "mev"]
exclude = ["target/*", ".github/*", ".gitignore", "build.rs", "contracts/*"]
[dependencies]
# darkforest
uniswap_v3_math = "0.6.2"
# alloy
alloy = { version = "1.0.25", features = [
"contract",
"network",
"rpc",
"rpc-types",
"provider-ws",
"rpc-types-eth",
"signer-local",
] }
# tracing
eyre = "0.6"
tracing = "0.1"
# async
tokio = { version = "1.42", default-features = false }
futures = "0.3"
async-trait = "0.1"
# misc
arraydeque = "0.5"
thiserror = "1.0"
rug = "1.24.1"
itertools = "0.14.0"
rayon = "1.11.0"
async-stream = "0.3.6"
serde = "1.0"
[dev-dependencies]
rand = "0.9.2"
tracing-subscriber = "0.3"
criterion = "0.7"
tokio = { version = "1.42", default-features = false, features = [
"rt-multi-thread",
] }
alloy = { version = "1.0.25", features = ["rpc-client"] }
alloy-provider = { version = "1.0.25", features = ["throttle"] }
[build-dependencies]
serde_json = "1.0"
rayon = "1"
[profile.release]
opt-level = 3
lto = true
codegen-units = 1
panic = "abort"
[profile.dev]
opt-level = 3
lto = true
codegen-units = 1
debug = "full"
[[bench]]
name = "uniswap_v2"
harness = false
[[bench]]
name = "uniswap_v3"
harness = false
[[bench]]
name = "erc_4626"
harness = false
================================================
FILE: README.md
================================================
# amms-rs [![Github Actions][gha-badge]][gha] [![Chat][tg-badge]][tg-url]
[gha]: https://github.com/darkforestry/amms-rs/actions
[gha-badge]: https://github.com/darkforestry/amms-rs/actions/workflows/ci.yml/badge.svg
[tg-url]: https://t.me/amms_rs
[tg-badge]: https://img.shields.io/badge/chat-telegram-blue
`amms-rs` is a Rust library to interact with automated market makers across EVM chains.
<!-- This lib provides functionality to [discover](https://github.com/darkforestry/amms-rs/blob/main/examples/discover-factories.rs), [sync](https://github.com/darkforestry/amms-rs/blob/main/examples/sync-amms.rs), [filter](https://github.com/darkforestry/amms-rs/blob/main/examples/filter-value.rs), and interact with a variety of AMMs. This library also provides functionality to keep a [state space synced](https://github.com/darkforestry/amms-rs/blob/main/examples/state-space.rs), abstracting logic to handle chain reorgs, maintaining a state change cache and more.
`amms-rs` was built with modularity in mind, making it quick and easy to add a new `AMM` variant by implementing the `AutomatedMarketMaker` trait. For a full walkthrough on how to quickly implement a new `AMM`, check out [`addingAnAMM.md`](https://github.com/darkforestry/amms-rs/blob/main/docs/addingAnAMM.md). -->
## Supported AMMs
| AMM | Status |
| --------------- | ------ |
| UniswapV2 | ✅ |
| UniswapV3 | ✅ |
| Balancer | ✅ |
| ERC4626 Vaults | ✅ |
================================================
FILE: benches/erc_4626.rs
================================================
use alloy::primitives::{address, U256};
use amms::amms::{amm::AutomatedMarketMaker, erc_4626::ERC4626Vault};
use criterion::{criterion_group, criterion_main, Criterion};
use rand::Rng;
fn simulate_swap(c: &mut Criterion) {
let token_a = address!("c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2");
let token_b = address!("fc0d6cf33e38bce7ca7d89c0e292274031b7157a");
let pool = ERC4626Vault {
vault_token: token_a,
vault_token_decimals: 18,
asset_token: token_b,
asset_token_decimals: 18,
vault_reserve: U256::from(20_000_000_u128),
asset_reserve: U256::from(20_000_000_u128),
deposit_fee: 300,
withdraw_fee: 300,
};
let mut rng = rand::thread_rng();
c.bench_function("erc4626_simulate_swap", |b| {
b.iter_with_setup(
|| U256::from(rng.gen_range(1_000..=1e24 as u128)),
|amount| {
let _ = pool.simulate_swap(token_a, token_b, amount).unwrap();
},
);
});
}
criterion_group!(erc_4626, simulate_swap);
criterion_main!(erc_4626);
================================================
FILE: benches/uniswap_v2.rs
================================================
use alloy::primitives::{address, U256};
use amms::amms::{amm::AutomatedMarketMaker, uniswap_v2::UniswapV2Pool, Token};
use criterion::{criterion_group, criterion_main, Criterion};
use rand::Rng;
fn simulate_swap(c: &mut Criterion) {
let token_a = address!("c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2");
let token_b = address!("fc0d6cf33e38bce7ca7d89c0e292274031b7157a");
let pool = UniswapV2Pool {
token_a: Token::new_with_decimals(token_a, 18),
token_b: Token::new_with_decimals(token_b, 18),
reserve_0: 20_000_000_u128,
reserve_1: 20_000_000_u128,
fee: 300,
..Default::default()
};
let mut rng = rand::thread_rng();
c.bench_function("uniswap_v2_simulate_swap", |b| {
b.iter_with_setup(
|| U256::from(rng.gen_range(1_000..=1e24 as u128)),
|amount| {
let _ = pool.simulate_swap(token_a, token_b, amount).unwrap();
},
);
});
}
criterion_group!(uniswap_v2, simulate_swap);
criterion_main!(uniswap_v2);
================================================
FILE: benches/uniswap_v3.rs
================================================
use std::sync::Arc;
use alloy::{
eips::BlockId,
primitives::{address, U256},
providers::ProviderBuilder,
rpc::client::ClientBuilder,
transports::layers::{RetryBackoffLayer, ThrottleLayer},
};
use amms::amms::{amm::AutomatedMarketMaker, uniswap_v3::UniswapV3Pool};
use criterion::{criterion_group, criterion_main, Criterion};
use rand::Rng;
use tokio::runtime::Runtime;
fn simulate_swap(c: &mut Criterion) {
let rpc_endpoint = std::env::var("ETHEREUM_PROVIDER").expect("Could not get rpc endpoint");
let client = ClientBuilder::default()
.layer(ThrottleLayer::new(500))
.layer(RetryBackoffLayer::new(5, 200, 330))
.http(rpc_endpoint.parse().unwrap());
let provider = Arc::new(ProviderBuilder::new().connect_client(client));
let token_a = address!("A0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48");
let token_b = address!("C02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2");
let runtime = Runtime::new().expect("Failed to create Tokio runtime");
let pool = runtime.block_on(async {
UniswapV3Pool::new(address!("88e6A0c2dDD26FEEb64F039a2c41296FcB3f5640"))
.init(BlockId::latest(), provider.clone())
.await
.expect("Could not init pool")
});
let mut rng = rand::thread_rng();
c.bench_function("uniswap_v3_simulate_swap", |b| {
b.iter_with_setup(
|| U256::from(rng.gen_range(1_000..=1e24 as u128)),
|amount| {
let _ = pool.simulate_swap(token_a, token_b, amount).unwrap();
},
);
});
}
criterion_group!(uniswap_v3, simulate_swap);
criterion_main!(uniswap_v3);
================================================
FILE: build.rs
================================================
use rayon::iter::{IntoParallelRefIterator, ParallelIterator};
use serde_json::Value;
use std::{
fs,
hash::{DefaultHasher, Hash, Hasher},
path::PathBuf,
process::Command,
};
const TARGET_CONTRACTS: &[&str] = &[
"GetERC4626VaultDataBatchRequest",
"GetTokenDecimalsBatchRequest",
"GetBalancerPoolDataBatchRequest",
"WethValueInPools",
"WethValueInPoolsBatchRequest",
"GetUniswapV2PairsBatchRequest",
"GetUniswapV2PoolDataBatchRequest",
"GetUniswapV3PoolDataBatchRequest",
"GetUniswapV3PoolSlot0BatchRequest",
"GetUniswapV3PoolTickBitmapBatchRequest",
"GetUniswapV3PoolTickDataBatchRequest",
];
fn main() -> Result<(), Box<dyn std::error::Error>> {
let manifest_dir = PathBuf::from(env!("CARGO_MANIFEST_DIR"));
let status = Command::new("forge")
.arg("build")
.current_dir("contracts")
.status()?;
if !status.success() {
panic!("forge build failed");
}
let forge_out_dir = manifest_dir.join("contracts/out");
let abi_out_dir = manifest_dir.join("src/amms/abi/");
fs::create_dir_all(&abi_out_dir)?;
TARGET_CONTRACTS.par_iter().for_each(|contract| {
let new_abi = forge_out_dir
.join(format!("{contract}.sol"))
.join(format!("{contract}.json"));
let prev_abi = abi_out_dir.join(format!("{contract}.json"));
if !prev_abi.exists() {
fs::copy(&new_abi, &prev_abi).unwrap();
return;
}
let prev_contents: Value =
serde_json::from_str(&fs::read_to_string(&prev_abi).unwrap()).unwrap();
let new_contents: Value =
serde_json::from_str(&fs::read_to_string(&new_abi).unwrap()).unwrap();
let prev_bytecode = prev_contents["bytecode"]["object"]
.as_str()
.expect("Missing prev bytecode");
let new_bytecode = new_contents["bytecode"]["object"]
.as_str()
.expect("Missing new bytecode");
if hash(prev_bytecode) != hash(new_bytecode) {
fs::copy(&new_abi, &prev_abi).unwrap();
}
});
println!("cargo:rerun-if-changed=contracts");
Ok(())
}
fn hash(value: &str) -> u64 {
let mut hasher = DefaultHasher::new();
value.hash(&mut hasher);
hasher.finish()
}
================================================
FILE: contracts/foundry.toml
================================================
[profile.default]
optimizer = false
evm_version = "cancun"
remappings = ["forge-std=lib/forge-std/src/"]
fs_permissions = [{ access = "read-write", path = "./" }]
================================================
FILE: contracts/src/Balancer/GetBalancerPoolDataBatchRequest.sol
================================================
//SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
interface IBPool {
function getCurrentTokens() external returns (address[] memory);
function getDenormalizedWeight(address token) external returns (uint);
function getSwapFee() external returns (uint);
function getBalance(address token) external returns (uint);
}
interface IERC20 {
function decimals() external view returns (uint8);
}
/**
* @dev This contract is not meant to be deployed. Instead, use a static call with the
* deployment bytecode as payload.
*/
contract GetBalancerPoolDataBatchRequest {
struct PoolData {
address[] tokens;
uint8[] decimals;
uint256[] liquidity;
uint256[] weights;
uint32 fee;
}
constructor(address[] memory pools) {
PoolData[] memory allPoolData = new PoolData[](pools.length);
for (uint256 i = 0; i < pools.length; ++i) {
address poolAddress = pools[i];
if (codeSizeIsZero(poolAddress)) continue;
PoolData memory poolData;
// Get the tokens
address[] memory tokens = IBPool(poolAddress).getCurrentTokens();
uint8[] memory decimals = new uint8[](tokens.length);
uint256[] memory liquidity = new uint256[](tokens.length);
uint256[] memory weights = new uint256[](tokens.length);
for (uint256 j = 0; j < tokens.length; ++j) {
if (codeSizeIsZero(tokens[j])) {
continue;
}
}
// Grab the decimals/liquidity
for (uint256 j = 0; j < tokens.length; ++j) {
uint8 tokenDecimals = getTokenDecimals(tokens[j]);
if (tokenDecimals == 0) {
continue;
} else {
decimals[j] = tokenDecimals;
}
weights[j] = IBPool(poolAddress).getDenormalizedWeight(
tokens[j]
);
liquidity[j] = IBPool(poolAddress).getBalance(tokens[j]);
}
// Grab the swap fee
poolData.fee = uint32(IBPool(poolAddress).getSwapFee());
poolData.tokens = tokens;
poolData.decimals = decimals;
poolData.liquidity = liquidity;
poolData.weights = weights;
allPoolData[i] = poolData;
}
bytes memory _abiEncodedData = abi.encode(allPoolData);
assembly {
// Return from the start of the data (discarding the original data address)
// up to the end of the memory used
let dataStart := add(_abiEncodedData, 0x20)
return(dataStart, sub(msize(), dataStart))
}
}
function getTokenDecimals(address token) internal returns (uint8) {
(bool success, bytes memory data) = token.call(
abi.encodeWithSignature("decimals()")
);
if (success) {
uint256 decimals;
if (data.length == 32) {
(decimals) = abi.decode(data, (uint256));
if (decimals == 0 || decimals > 255) {
return 0;
} else {
return uint8(decimals);
}
} else {
return 0;
}
} else {
return 0;
}
}
function codeSizeIsZero(address target) internal view returns (bool) {
if (target.code.length == 0) {
return true;
} else {
return false;
}
}
}
================================================
FILE: contracts/src/ERC20/GetTokenDecimalsBatchRequest.sol
================================================
//SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
contract GetTokenDecimalsBatchRequest {
constructor(address[] memory tokens) {
uint8[] memory decimals = new uint8[](tokens.length);
for (uint256 i = 0; i < tokens.length; ++i) {
address token = tokens[i];
if (codeSizeIsZero(token)) continue;
(bool tokenDecimalsSuccess, bytes memory tokenDecimalsData) = token
.call{gas: 20000}(abi.encodeWithSignature("decimals()"));
if (tokenDecimalsSuccess) {
uint256 tokenDecimals;
if (tokenDecimalsData.length == 32) {
(tokenDecimals) = abi.decode(tokenDecimalsData, (uint256));
if (tokenDecimals == 0 || tokenDecimals > 255) {
continue;
} else {
decimals[i] = uint8(tokenDecimals);
}
} else {
continue;
}
} else {
continue;
}
}
bytes memory _abiEncodedData = abi.encode(decimals);
assembly {
// Return from the start of the data (discarding the original data address)
// up to the end of the memory used
let dataStart := add(_abiEncodedData, 0x20)
return(dataStart, sub(msize(), dataStart))
}
}
}
function codeSizeIsZero(address target) view returns (bool) {
if (target.code.length == 0) {
return true;
} else {
return false;
}
}
================================================
FILE: contracts/src/ERC4626/GetERC4626VaultDataBatchRequest.sol
================================================
//SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
interface IERC4626Vault {
function asset() external view returns (address);
function decimals() external view returns (uint8);
function totalSupply() external view returns (uint256);
function totalAssets() external view returns (uint256);
function convertToShares(uint256 assets) external view returns (uint256);
function convertToAssets(uint256 shares) external view returns (uint256);
function previewDeposit(uint256 assets) external view returns (uint256);
function previewRedeem(uint256 shares) external view returns (uint256);
}
interface IERC20 {
function decimals() external view returns (uint8);
}
/**
* @dev This contract is not meant to be deployed. Instead, use a static call with the
* deployment bytecode as payload.
*/
contract GetERC4626VaultDataBatchRequest {
struct VaultData {
address vaultToken;
uint8 vaultTokenDecimals;
address assetToken;
uint8 assetTokenDecimals;
uint256 vaultTokenReserve;
uint256 assetTokenReserve;
uint256 depositFeeDelta1;
uint256 depositFeeDelta2;
uint256 depositNoFee;
uint256 withdrawFeeDelta1;
uint256 withdrawFeeDelta2;
uint256 withdrawNoFee;
}
constructor(address[] memory vaults) {
VaultData[] memory allVaultData = new VaultData[](vaults.length);
for (uint256 i = 0; i < vaults.length; ++i) {
address vaultAddress = vaults[i];
if (codeSizeIsZero(vaultAddress)) continue;
address assetToken = IERC4626Vault(vaultAddress).asset();
// Check that assetToken exists and get assetTokenDecimals
if (codeSizeIsZero(assetToken)) continue;
(
bool assetTokenDecimalsSuccess,
bytes memory assetTokenDecimalsData
) = assetToken.call{gas: 20000}(
abi.encodeWithSignature("decimals()")
);
if (
!assetTokenDecimalsSuccess ||
assetTokenDecimalsData.length == 32
) {
continue;
}
uint256 assetTokenDecimals = abi.decode(
assetTokenDecimalsData,
(uint256)
);
if (assetTokenDecimals == 0 || assetTokenDecimals > 255) {
continue;
}
VaultData memory vaultData;
// Get tokens
vaultData.vaultToken = vaultAddress;
vaultData.assetToken = assetToken;
// Get vault token decimals
vaultData.vaultTokenDecimals = IERC4626Vault(vaultAddress)
.decimals();
// Get asset token decimals
vaultData.assetTokenDecimals = uint8(assetTokenDecimals);
// Get token reserves
vaultData.vaultTokenReserve = IERC4626Vault(vaultAddress)
.totalSupply();
vaultData.assetTokenReserve = IERC4626Vault(vaultAddress)
.totalAssets();
// Get fee deltas
// Deposit fee delta 1 - 100 asset tokens
vaultData.depositFeeDelta1 =
IERC4626Vault(vaultAddress).convertToShares(
100 * 10 ** vaultData.assetTokenDecimals
) -
IERC4626Vault(vaultAddress).previewDeposit(
100 * 10 ** vaultData.assetTokenDecimals
);
// Deposit fee delta 2 - 200 asset tokens
vaultData.depositFeeDelta2 =
IERC4626Vault(vaultAddress).convertToShares(
200 * 10 ** vaultData.assetTokenDecimals
) -
IERC4626Vault(vaultAddress).previewDeposit(
200 * 10 ** vaultData.assetTokenDecimals
);
vaultData.depositNoFee = IERC4626Vault(vaultAddress)
.convertToShares(100 * 10 ** vaultData.assetTokenDecimals);
// Withdraw fee delta 1 - 100 vault tokens
vaultData.withdrawFeeDelta1 =
IERC4626Vault(vaultAddress).convertToAssets(
100 * 10 ** vaultData.vaultTokenDecimals
) -
IERC4626Vault(vaultAddress).previewRedeem(
100 * 10 ** vaultData.vaultTokenDecimals
);
// Withdraw fee delta 2 - 200 vault tokens
vaultData.withdrawFeeDelta2 =
IERC4626Vault(vaultAddress).convertToAssets(
200 * 10 ** vaultData.vaultTokenDecimals
) -
IERC4626Vault(vaultAddress).previewRedeem(
200 * 10 ** vaultData.vaultTokenDecimals
);
vaultData.withdrawNoFee = IERC4626Vault(vaultAddress)
.convertToAssets(100 * 10 ** vaultData.vaultTokenDecimals);
allVaultData[i] = vaultData;
}
// ensure abi encoding, not needed here but increase reusability for different return types
// note: abi.encode add a first 32 bytes word with the address of the original data
bytes memory _abiEncodedData = abi.encode(allVaultData);
assembly {
// Return from the start of the data (discarding the original data address)
// up to the end of the memory used
let dataStart := add(_abiEncodedData, 0x20)
return(dataStart, sub(msize(), dataStart))
}
}
function codeSizeIsZero(address target) internal view returns (bool) {
return target.code.length == 0;
}
}
================================================
FILE: contracts/src/UniswapV2/GetUniswapV2PairsBatchRequest.sol
================================================
//SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
interface IFactory {
function allPairs(uint256 idx) external returns (address);
function allPairsLength() external returns (uint256);
}
/**
* @dev This contract is not meant to be deployed. Instead, use a static call with the
* deployment bytecode as payload.
*/
contract GetUniswapV2PairsBatchRequest {
constructor(uint256 from, uint256 step, address factory) {
uint256 allPairsLength = IFactory(factory).allPairsLength();
step = from + step > allPairsLength ? allPairsLength - from : step;
// There is a max number of pool as a too big returned data times out the rpc
address[] memory allPairs = new address[](step);
for (uint256 i = 0; i < step; ++i) {
allPairs[i] = IFactory(factory).allPairs(from + i);
}
// ensure abi encoding, not needed here but increase reusability for different return types
// note: abi.encode add a first 32 bytes word with the address of the original data
bytes memory _abiEncodedData = abi.encode(allPairs);
assembly {
// Return from the start of the data (discarding the original data address)
// up to the end of the memory used
let dataStart := add(_abiEncodedData, 0x20)
return(dataStart, sub(msize(), dataStart))
}
}
}
================================================
FILE: contracts/src/UniswapV2/GetUniswapV2PoolDataBatchRequest.sol
================================================
//SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
interface IUniswapV2Pair {
function token0() external view returns (address);
function token1() external view returns (address);
function getReserves()
external
view
returns (uint112 reserve0, uint112 reserve1, uint32 blockTimestampLast);
}
interface IERC20 {
function decimals() external view returns (uint8);
}
/**
* @dev This contract is not meant to be deployed. Instead, use a static call with the
* deployment bytecode as payload.
*/
contract GetUniswapV2PoolDataBatchRequest {
struct PoolData {
address tokenA;
address tokenB;
uint112 reserve0;
uint112 reserve1;
uint8 tokenADecimals;
uint8 tokenBDecimals;
}
constructor(address[] memory pools) {
PoolData[] memory allPoolData = new PoolData[](pools.length);
for (uint256 i = 0; i < pools.length; ++i) {
address poolAddress = pools[i];
if (codeSizeIsZero(poolAddress)) continue;
PoolData memory poolData;
// Get tokens A and B
poolData.tokenA = IUniswapV2Pair(poolAddress).token0();
poolData.tokenB = IUniswapV2Pair(poolAddress).token1();
// Check that tokenA and tokenB do not have codesize of 0
if (codeSizeIsZero(poolData.tokenA)) continue;
if (codeSizeIsZero(poolData.tokenB)) continue;
// Get tokenA decimals
(
bool tokenADecimalsSuccess,
bytes memory tokenADecimalsData
) = poolData.tokenA.call{gas: 20000}(
abi.encodeWithSignature("decimals()")
);
if (tokenADecimalsSuccess) {
uint256 tokenADecimals;
if (tokenADecimalsData.length == 32) {
(tokenADecimals) = abi.decode(
tokenADecimalsData,
(uint256)
);
if (tokenADecimals == 0 || tokenADecimals > 255) {
continue;
} else {
poolData.tokenADecimals = uint8(tokenADecimals);
}
} else {
continue;
}
} else {
continue;
}
// Get tokenB decimals
(
bool tokenBDecimalsSuccess,
bytes memory tokenBDecimalsData
) = poolData.tokenB.call{gas: 20000}(
abi.encodeWithSignature("decimals()")
);
if (tokenBDecimalsSuccess) {
uint256 tokenBDecimals;
if (tokenBDecimalsData.length == 32) {
(tokenBDecimals) = abi.decode(
tokenBDecimalsData,
(uint256)
);
if (tokenBDecimals == 0 || tokenBDecimals > 255) {
continue;
} else {
poolData.tokenBDecimals = uint8(tokenBDecimals);
}
} else {
continue;
}
} else {
continue;
}
// Get reserves
(poolData.reserve0, poolData.reserve1, ) = IUniswapV2Pair(
poolAddress
).getReserves();
allPoolData[i] = poolData;
}
// ensure abi encoding, not needed here but increase reusability for different return types
// note: abi.encode add a first 32 bytes word with the address of the original data
bytes memory _abiEncodedData = abi.encode(allPoolData);
assembly {
// Return from the start of the data (discarding the original data address)
// up to the end of the memory used
let dataStart := add(_abiEncodedData, 0x20)
return(dataStart, sub(msize(), dataStart))
}
}
function codeSizeIsZero(address target) internal view returns (bool) {
if (target.code.length == 0) {
return true;
} else {
return false;
}
}
}
================================================
FILE: contracts/src/UniswapV3/FixedPoint.sol
================================================
//SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
library FixedPointMath {
uint256 internal constant Q96 = 0x1000000000000000000000000;
/// @notice helper function to multiply unsigned 64.64 fixed point number by a unsigned integer
/// @param x 64.64 unsigned fixed point number
/// @param y uint256 unsigned integer
/// @return unsigned
function mul64u(uint128 x, uint256 y) internal pure returns (uint256) {
unchecked {
if (y == 0 || x == 0) {
return 0;
}
uint256 lo = (uint256(x) * (y & 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF)) >> 64;
uint256 hi = uint256(x) * (y >> 128);
if (hi > 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF) {
return 0;
}
hi <<= 64;
if (hi > 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff - lo) {
return 0;
}
return hi + lo;
}
}
/// @notice helper to divide two unsigned integers
/// @param x uint256 unsigned integer
/// @param y uint256 unsigned integer
/// @return unsigned 64.64 fixed point number
function divuu(uint256 x, uint256 y) internal pure returns (uint128) {
unchecked {
if (y == 0) return 0;
uint256 answer;
if (x <= 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF) {
answer = (x << 64) / y;
} else {
uint256 msb = 192;
uint256 xc = x >> 192;
if (xc >= 0x100000000) {
xc >>= 32;
msb += 32;
}
if (xc >= 0x10000) {
xc >>= 16;
msb += 16;
}
if (xc >= 0x100) {
xc >>= 8;
msb += 8;
}
if (xc >= 0x10) {
xc >>= 4;
msb += 4;
}
if (xc >= 0x4) {
xc >>= 2;
msb += 2;
}
if (xc >= 0x2) msb += 1; // No need to shift xc anymore
answer = (x << (255 - msb)) / (((y - 1) >> (msb - 191)) + 1);
// require(
// answer <= 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF,
// "overflow in divuu"
// );
// We ignore pools that have a price that is too high because it is likely that the reserves are too low to be accurate
// There is almost certainly not a pool that has a price of token/weth > 2^128
if (answer > 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF) {
return 0;
}
uint256 hi = answer * (y >> 128);
uint256 lo = answer * (y & 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF);
uint256 xh = x >> 192;
uint256 xl = x << 64;
if (xl < lo) xh -= 1;
xl -= lo; // We rely on overflow behavior here
lo = hi << 128;
if (xl < lo) xh -= 1;
xl -= lo; // We rely on overflow behavior here
assert(xh == hi >> 128);
answer += xl / y;
}
// We ignore pools that have a price that is too high because it is likely that the reserves are too low to be accurate
// There is almost certainly not a pool that has a price of token/weth > 2^128
if (answer > 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF) {
return 0;
}
return uint128(answer);
}
}
function fromSqrtX96(uint160 sqrtPriceX96, bool token0IsReserve0, int8 token0Decimals, int8 token1Decimals)
internal
pure
returns (uint256 priceX128)
{
unchecked {
///@notice Cache the difference between the input and output token decimals. p=y/x ==> p*10**(x_decimals-y_decimals)>>Q192 will be the proper price in base 10.
int8 decimalShift = token0Decimals - token1Decimals;
///@notice Square the sqrtPrice ratio and normalize the value based on decimalShift.
uint256 priceSquaredX96 = decimalShift < 0
? uint256(sqrtPriceX96) ** 2 / uint256(10) ** (uint8(-decimalShift))
: uint256(sqrtPriceX96) ** 2 * 10 ** uint8(decimalShift);
if (Q96 > priceSquaredX96) {
return 0;
}
///@notice The first value is a Q96 representation of p_token0, the second is 128X fixed point representation of p_token1.
uint256 priceSquaredShiftQ96 = token0IsReserve0
? priceSquaredX96 / Q96
: (Q96 * 0xffffffffffffffffffffffffffffffff) / (priceSquaredX96 / Q96);
///@notice Convert the first value to 128X fixed point by shifting it left 128 bits and normalizing the value by Q96.
priceX128 = token0IsReserve0
? (uint256(priceSquaredShiftQ96) * 0xffffffffffffffffffffffffffffffff) / Q96
: priceSquaredShiftQ96;
if (priceX128 > type(uint256).max) {
// Essentially 0 liquidity.
return 0;
}
}
}
}
================================================
FILE: contracts/src/UniswapV3/GetUniswapV3PoolDataBatchRequest.sol
================================================
//SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
/**
* @dev This contract is not meant to be deployed. Instead, use a static call with the
* deployment bytecode as payload.
*/
contract GetUniswapV3PoolDataBatchRequest {
struct PoolInfo {
address pool;
address tokenA;
address tokenB;
int24 tickSpacing;
int16 minWord;
int16 maxWord;
}
struct TickInfo {
uint128 liquidityGross;
int128 liquidityNet;
bool initialized;
}
struct PoolData {
uint256[] tickBitmap;
int24[] tickIndices;
TickInfo[] ticks;
}
constructor(PoolInfo[] memory poolInfo) {
PoolData[] memory allPoolData = new PoolData[](poolInfo.length);
for (uint256 i = 0; i < poolInfo.length; ++i) {
PoolInfo memory info = poolInfo[i];
IUniswapV3PoolState pool = IUniswapV3PoolState(info.pool);
PoolData memory poolData = allPoolData[i];
uint256 wordRange = uint256(int256(info.maxWord - info.minWord)) + 1;
poolData.tickBitmap = new uint256[](wordRange);
TickInfo[] memory tickInfo = new TickInfo[](256 * wordRange);
int24[] memory tickIdxs = new int24[](256 * wordRange);
uint256 tickArrayIndex = 0;
// Loop from min to max word inclusive and get all tick bitmaps
uint256 wordRangeIdx = 0;
for (int16 j = info.minWord; j <= info.maxWord; ++j) {
uint256 tickBitmap = pool.tickBitmap(j);
if (tickBitmap == 0) {
continue;
}
for (uint256 k = 0; k < 256; ++k) {
uint256 bit = 1 << k;
bool initialized = (tickBitmap & bit) != 0;
if (initialized) {
int24 tickIndex = int24(int256(wordRangeIdx * 256 + k * uint256(int256(info.tickSpacing))));
IUniswapV3PoolState.TickInfo memory tick = pool.ticks(tickIndex);
tickIdxs[tickArrayIndex] = tickIndex;
tickInfo[tickArrayIndex] = TickInfo({
liquidityGross: tick.liquidityGross,
liquidityNet: tick.liquidityNet,
initialized: tick.initialized
});
++tickArrayIndex;
}
}
poolData.tickBitmap[wordRangeIdx] = tickBitmap;
++wordRangeIdx;
}
assembly {
mstore(tickInfo, tickArrayIndex)
mstore(tickIdxs, tickArrayIndex)
}
poolData.ticks = tickInfo;
poolData.tickIndices = tickIdxs;
allPoolData[i] = poolData;
}
// ensure abi encoding, not needed here but increase reusability for different return types
// note: abi.encode add a first 32 bytes word with the address of the original data
bytes memory abiEncodedData = abi.encode(allPoolData);
assembly {
// Return from the start of the data (discarding the original data address)
// up to the end of the memory used
let dataStart := add(abiEncodedData, 0x20)
return(dataStart, sub(msize(), dataStart))
}
}
}
function codeSizeIsZero(address target) view returns (bool) {
if (target.code.length == 0) {
return true;
} else {
return false;
}
}
/// @title Pool state that can change
/// @notice These methods compose the pool's state, and can change with any frequency including multiple times
/// per transaction
interface IUniswapV3PoolState {
struct TickInfo {
// the total position liquidity that references this tick
uint128 liquidityGross;
// amount of net liquidity added (subtracted) when tick is crossed from left to right (right to left),
int128 liquidityNet;
// fee growth per unit of liquidity on the _other_ side of this tick (relative to the current tick)
// only has relative meaning, not absolute — the value depends on when the tick is initialized
uint256 feeGrowthOutside0X128;
uint256 feeGrowthOutside1X128;
// the cumulative tick value on the other side of the tick
int56 tickCumulativeOutside;
// the seconds per unit of liquidity on the _other_ side of this tick (relative to the current tick)
// only has relative meaning, not absolute — the value depends on when the tick is initialized
uint160 secondsPerLiquidityOutsideX128;
// the seconds spent on the other side of the tick (relative to the current tick)
// only has relative meaning, not absolute — the value depends on when the tick is initialized
uint32 secondsOutside;
// true iff the tick is initialized, i.e. the value is exactly equivalent to the expression liquidityGross != 0
// these 8 bits are set to prevent fresh sstores when crossing newly initialized ticks
bool initialized;
}
function ticks(int24 tick) external view returns (TickInfo memory);
/// @notice Returns 256 packed tick initialized boolean values. See TickBitmap for more information
function tickBitmap(int16 wordPosition) external view returns (uint256);
function slot0()
external
view
returns (
uint160 sqrtPriceX96,
int24 tick,
uint16 observationIndex,
uint16 observationCardinality,
uint16 observationCardinalityNext,
uint8 feeProtocol,
bool unlocked
);
function liquidity() external view returns (uint128);
}
================================================
FILE: contracts/src/UniswapV3/GetUniswapV3PoolSlot0BatchRequest.sol
================================================
//SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
/**
* @dev This contract is not meant to be deployed. Instead, use a static call with the
* deployment bytecode as payload.
*/
contract GetUniswapV3PoolSlot0BatchRequest {
struct Slot0Data {
int24 tick;
uint128 liquidity;
uint256 sqrtPrice;
}
constructor(address[] memory pools) {
Slot0Data[] memory allSlot0Data = new Slot0Data[](pools.length);
for (uint256 i = 0; i < pools.length; ++i) {
Slot0Data memory slot0Data = allSlot0Data[i];
address poolAddress = pools[i];
IUniswapV3PoolState pool = IUniswapV3PoolState(poolAddress);
slot0Data.liquidity = pool.liquidity();
(slot0Data.sqrtPrice, slot0Data.tick, , , , , ) = pool.slot0();
allSlot0Data[i] = slot0Data;
}
// ensure abi encoding, not needed here but increase reusability for different return types
// note: abi.encode add a first 32 bytes word with the address of the original data
bytes memory abiEncodedData = abi.encode(allSlot0Data);
assembly {
// Return from the start of the data (discarding the original data address)
// up to the end of the memory used
let dataStart := add(abiEncodedData, 0x20)
return(dataStart, sub(msize(), dataStart))
}
}
}
/// @title Pool state that can change
/// @notice These methods compose the pool's state, and can change with any frequency including multiple times
/// per transaction
interface IUniswapV3PoolState {
struct TickInfo {
// the total position liquidity that references this tick
uint128 liquidityGross;
// amount of net liquidity added (subtracted) when tick is crossed from left to right (right to left),
int128 liquidityNet;
// fee growth per unit of liquidity on the _other_ side of this tick (relative to the current tick)
// only has relative meaning, not absolute — the value depends on when the tick is initialized
uint256 feeGrowthOutside0X128;
uint256 feeGrowthOutside1X128;
// the cumulative tick value on the other side of the tick
int56 tickCumulativeOutside;
// the seconds per unit of liquidity on the _other_ side of this tick (relative to the current tick)
// only has relative meaning, not absolute — the value depends on when the tick is initialized
uint160 secondsPerLiquidityOutsideX128;
// the seconds spent on the other side of the tick (relative to the current tick)
// only has relative meaning, not absolute — the value depends on when the tick is initialized
uint32 secondsOutside;
// true iff the tick is initialized, i.e. the value is exactly equivalent to the expression liquidityGross != 0
// these 8 bits are set to prevent fresh sstores when crossing newly initialized ticks
bool initialized;
}
function ticks(int24 tick) external view returns (TickInfo memory);
/// @notice Returns 256 packed tick initialized boolean values. See TickBitmap for more information
function tickBitmap(int16 wordPosition) external view returns (uint256);
function slot0()
external
view
returns (
uint160 sqrtPriceX96,
int24 tick,
uint16 observationIndex,
uint16 observationCardinality,
uint16 observationCardinalityNext,
uint8 feeProtocol,
bool unlocked
);
function liquidity() external view returns (uint128);
}
================================================
FILE: contracts/src/UniswapV3/GetUniswapV3PoolTickBitmapBatchRequest.sol
================================================
//SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
/**
* @dev This contract is not meant to be deployed. Instead, use a static call with the
* deployment bytecode as payload.
*/
contract GetUniswapV3PoolTickBitmapBatchRequest {
struct TickBitmapInfo {
address pool;
int16 minWord;
int16 maxWord;
}
struct TickBitmaps {
int16[] wordPositions;
uint256[] tickBitmaps;
}
constructor(TickBitmapInfo[] memory allPoolInfo) {
uint256[][] memory allTickBitmaps = new uint256[][](allPoolInfo.length);
for (uint256 i = 0; i < allPoolInfo.length; ++i) {
TickBitmapInfo memory info = allPoolInfo[i];
IUniswapV3PoolState pool = IUniswapV3PoolState(info.pool);
uint256[] memory tickBitmaps = new uint256[](uint16(info.maxWord - info.minWord) + 1);
uint256 wordIdx = 0;
for (int16 j = info.minWord; j <= info.maxWord; ++j) {
uint256 tickBitmap = pool.tickBitmap(j);
if (tickBitmap == 0) {
continue;
}
tickBitmaps[wordIdx] = uint256(int256(j));
++wordIdx;
tickBitmaps[wordIdx] = tickBitmap;
++wordIdx;
}
assembly {
mstore(tickBitmaps, wordIdx)
}
allTickBitmaps[i] = tickBitmaps;
}
// ensure abi encoding, not needed here but increase reusability for different return types
// note: abi.encode add a first 32 bytes word with the address of the original data
bytes memory abiEncodedData = abi.encode(allTickBitmaps);
assembly {
// Return from the start of the data (discarding the original data address)
// up to the end of the memory used
let dataStart := add(abiEncodedData, 0x20)
return(dataStart, sub(msize(), dataStart))
}
}
}
/// @title Pool state that can change
/// @notice These methods compose the pool's state, and can change with any frequency including multiple times
/// per transaction
interface IUniswapV3PoolState {
/// @notice Returns 256 packed tick initialized boolean values. See TickBitmap for more information
function tickBitmap(int16 wordPosition) external view returns (uint256);
function tickSpacing() external view returns (int24);
}
================================================
FILE: contracts/src/UniswapV3/GetUniswapV3PoolTickDataBatchRequest.sol
================================================
//SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
/**
* @dev This contract is not meant to be deployed. Instead, use a static call with the
* deployment bytecode as payload.
*/
contract GetUniswapV3PoolTickDataBatchRequest {
struct TickDataInfo {
address pool;
int24[] ticks;
}
struct Info {
bool initialized;
uint128 liquidityGross;
int128 liquidityNet;
}
constructor(TickDataInfo[] memory allPoolInfo) {
Info[][] memory tickInfoReturn = new Info[][](allPoolInfo.length);
for (uint256 i = 0; i < allPoolInfo.length; ++i) {
Info[] memory tickInfo = new Info[](allPoolInfo[i].ticks.length);
for (uint256 j = 0; j < allPoolInfo[i].ticks.length; ++j) {
IUniswapV3PoolState.Info memory tick = IUniswapV3PoolState(
allPoolInfo[i].pool
).ticks(allPoolInfo[i].ticks[j]);
tickInfo[j] = Info({
liquidityGross: tick.liquidityGross,
liquidityNet: tick.liquidityNet,
initialized: tick.initialized
});
}
tickInfoReturn[i] = tickInfo;
}
// ensure abi encoding, not needed here but increase reusability for different return types
// note: abi.encode add a first 32 bytes word with the address of the original data
bytes memory abiEncodedData = abi.encode(tickInfoReturn);
assembly {
// Return from the start of the data (discarding the original data address)
// up to the end of the memory used
let dataStart := add(abiEncodedData, 0x20)
return(dataStart, sub(msize(), dataStart))
}
}
}
/// @title Pool state that can change
/// @notice These methods compose the pool's state, and can change with any frequency including multiple times
/// per transaction
interface IUniswapV3PoolState {
struct Info {
// the total position liquidity that references this tick
uint128 liquidityGross;
// amount of net liquidity added (subtracted) when tick is crossed from left to right (right to left),
int128 liquidityNet;
// fee growth per unit of liquidity on the _other_ side of this tick (relative to the current tick)
// only has relative meaning, not absolute — the value depends on when the tick is initialized
uint256 feeGrowthOutside0X128;
uint256 feeGrowthOutside1X128;
// the cumulative tick value on the other side of the tick
int56 tickCumulativeOutside;
// the seconds per unit of liquidity on the _other_ side of this tick (relative to the current tick)
// only has relative meaning, not absolute — the value depends on when the tick is initialized
uint160 secondsPerLiquidityOutsideX128;
// the seconds spent on the other side of the tick (relative to the current tick)
// only has relative meaning, not absolute — the value depends on when the tick is initialized
uint32 secondsOutside;
// true iff the tick is initialized, i.e. the value is exactly equivalent to the expression liquidityGross != 0
// these 8 bits are set to prevent fresh sstores when crossing newly initialized ticks
bool initialized;
}
/// @notice Returns 256 packed tick initialized boolean values. See TickBitmap for more information
function tickBitmap(int16 wordPosition) external view returns (uint256);
function ticks(int24 tick) external view returns (Info memory);
}
================================================
FILE: contracts/src/UniswapV3/interfaces/IBalancer.sol
================================================
//SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
interface IBPool {
function getCurrentTokens() external returns (address[] memory);
function getDenormalizedWeight(address token) external returns (uint256);
function getSwapFee() external returns (uint256);
function getBalance(address token) external returns (uint256);
}
================================================
FILE: contracts/src/UniswapV3/interfaces/IUniswapV2.sol
================================================
//SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
interface IUniswapV2Pair {
function token0() external view returns (address);
function token1() external view returns (address);
function getReserves() external view returns (uint112 reserve0, uint112 reserve1, uint32 blockTimestampLast);
}
interface IUniswapV2Factory {
function allPairs(uint256 idx) external returns (address);
function getPair(address tokenA, address tokenB) external view returns (address pair);
}
================================================
FILE: contracts/src/UniswapV3/interfaces/IUniswapV3.sol
================================================
//SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
interface IUniswapV3Pool {
function fee() external view returns (uint24);
function tickSpacing() external view returns (int24);
function liquidity() external view returns (uint128);
function slot0()
external
view
returns (
uint160 sqrtPriceX96,
int24 tick,
uint16 observationIndex,
uint16 observationCardinality,
uint16 observationCardinalityNext,
uint8 feeProtocol,
bool unlocked
);
function ticks(int24 tick)
external
view
returns (
uint128 liquidityGross,
int128 liquidityNet,
uint256 feeGrowthOutside0X128,
uint256 feeGrowthOutside1X128,
int56 tickCumulativeOutside,
uint160 secondsPerLiquidityOutsideX128,
uint32 secondsOutside,
bool initialized
);
}
interface IUniswapV3Factory {
function getPool(address tokenA, address tokenB, uint24 fee) external view returns (address pool);
}
================================================
FILE: contracts/src/UniswapV3/interfaces/Token.sol
================================================
//SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
interface IERC20 {
function decimals() external view returns (uint8);
function balanceOf(address) external view returns (uint256);
}
================================================
FILE: contracts/src/filters/WethValueInPools.sol
================================================
//SPDX-License-Identifier: MIT
pragma solidity ^0.8.26;
import {IBPool} from "../interfaces/IBalancer.sol";
import {IUniswapV2Pair} from "../interfaces/IUniswapV2.sol";
import {IUniswapV2Factory} from "../interfaces/IUniswapV2.sol";
import {IUniswapV3Pool} from "../interfaces/IUniswapV3.sol";
import {IUniswapV3Factory} from "../interfaces/IUniswapV3.sol";
import {IERC20} from "../interfaces/Token.sol";
import {FixedPointMath} from "../UniswapV3/FixedPoint.sol";
contract WethValueInPools {
/// @notice Address of Uniswap V2 factory
/// @dev Used as the first priority for quoting WETH value
address UNISWAP_V2_FACTORY;
//
/// @notice Address of Uniswap V3 factory
/// @dev Used as the second priority for quoting WETH value
address UNISWAP_V3_FACTORY;
/// @notice Address of WETH
address WETH;
/// @notice The minimum WETH liquidity to consider a `quote` valid.
uint256 private constant MIN_WETH_LIQUIDITY = 1 ether;
address private constant ADDRESS_ZERO = address(0);
uint8 private constant WETH_DECIMALS = 18;
constructor(address _uniswapV2Factory, address _uniswapV3Factory, address _weth) {
UNISWAP_V2_FACTORY = _uniswapV2Factory;
UNISWAP_V3_FACTORY = _uniswapV3Factory;
WETH = _weth;
}
/// @notice Enum for pool types
enum PoolType {
Balancer,
UniswapV2,
UniswapV3
}
/// @notice Struct for pool info
struct PoolInfo {
PoolType poolType;
address poolAddress;
}
/// @notice Struct for pool info return
struct PoolInfoReturn {
PoolType poolType;
address poolAddress;
uint256 wethValue;
}
/// @notice Returns an array of `PoolInfoReturn` for the consumer to determine wether to filter or not to save gas.
/// @dev We require a 1 ETH minimum liquidity in the quoting pool for it to be considered.
function getWethValueInPools(PoolInfo[] memory pools) public returns (PoolInfoReturn[] memory) {
PoolInfoReturn[] memory poolInfoReturns = new PoolInfoReturn[](pools.length);
for (uint256 i = 0; i < pools.length; i++) {
PoolInfo memory info = pools[i];
if (info.poolType == PoolType.Balancer) {
uint256 wethValue = handleBalancerPool(info.poolAddress);
poolInfoReturns[i] = PoolInfoReturn(info.poolType, info.poolAddress, wethValue);
} else if (info.poolType == PoolType.UniswapV2) {
uint256 wethValue = handleUniswapV2Pool(info.poolAddress);
poolInfoReturns[i] = PoolInfoReturn(info.poolType, info.poolAddress, wethValue);
} else if (info.poolType == PoolType.UniswapV3) {
uint256 wethValue = handleUniswapV3Pool(info.poolAddress);
poolInfoReturns[i] = PoolInfoReturn(info.poolType, info.poolAddress, wethValue);
}
}
return poolInfoReturns;
}
function handleBalancerPool(address pool) internal returns (uint256) {
// Get pool tokens
address[] memory tokens;
try IBPool(pool).getCurrentTokens() returns (address[] memory _tokens) {
tokens = _tokens;
} catch {
return 0;
}
// First check if we have WETH in the pool. If so, return Weth Value * # of tokens in the pool.
for (uint256 i = 0; i < tokens.length; i++) {
if (tokens[i] == WETH) {
try IBPool(pool).getBalance(tokens[i]) returns (uint256 _balance) {
// Obviously assuming an even distribution of value. Which is a "good enough" approximation.
// For a value filter.
return _balance * tokens.length;
} catch {
return 0;
}
}
}
address baseToken = tokens[0];
uint256 balance;
try IBPool(pool).getBalance(baseToken) returns (uint256 _balance) {
balance = _balance;
} catch {
return 0;
}
uint256 wethValue = quoteTokenToWethValue(baseToken, balance);
return wethValue * tokens.length;
}
function handleUniswapV2Pool(address pool) internal returns (uint256) {
address token0;
try IUniswapV2Pair(pool).token0() returns (address _token0) {
token0 = _token0;
} catch {
return 0;
}
address token1;
try IUniswapV2Pair(pool).token1() returns (address _token1) {
token1 = _token1;
} catch {
return 0;
}
try IUniswapV2Pair(pool).getReserves() returns (uint112 reserve0, uint112 reserve1, uint32) {
if (token0 == WETH) {
return reserve0 * 2;
} else if (token1 == WETH) {
return reserve1 * 2;
}
// No WETH in the pool Quote token0.
uint256 wethValue = quoteTokenToWethValue(token0, reserve0);
return wethValue * 2;
} catch {
return 0;
}
}
function handleUniswapV3Pool(address pool) internal returns (uint256) {
address token0;
try IUniswapV2Pair(address(pool)).token0() returns (address _token0) {
token0 = _token0;
} catch {
return 0;
}
address token1;
try IUniswapV2Pair(address(pool)).token1() returns (address _token1) {
token1 = _token1;
} catch {
return 0;
}
if (token0 == WETH) {
try IERC20(token0).balanceOf(address(pool)) returns (uint256 balance) {
return balance * 2;
} catch {
return 0;
}
} else if (token1 == WETH) {
try IERC20(token1).balanceOf(address(pool)) returns (uint256 balance) {
return balance * 2;
} catch {
return 0;
}
}
// No WETH in the pool Quote token0.
try IERC20(token0).balanceOf(address(pool)) returns (uint256 balance) {
uint256 wethValue = quoteTokenToWethValue(token0, balance);
return wethValue * 2;
} catch {
return 0;
}
}
/// @dev Returns the value of `amount` of `token` in terms of WETH.
function quoteTokenToWethValue(address token, uint256 amount) internal returns (uint256) {
// Try Uniswap V2.
uint128 price = quoteToken(token);
if (price > 0) {
return FixedPointMath.mul64u(price, amount);
} else {
return price;
}
}
/// @dev Quotes a Q64 quote of `token` in terms of WETH.
function quoteToken(address token) internal returns (uint128) {
// Get the token decimals
uint128 price;
// Try Uniswap V2.
price = quoteTokenUniswapV2(token);
if (price > 0) {
return price;
}
// Try Uniswap V3.
price = quoteTokenUniswapV3(token);
return price;
}
function quoteTokenUniswapV2(address token) internal returns (uint128 price) {
// Get the pair
IUniswapV2Pair pair = IUniswapV2Pair(IUniswapV2Factory(UNISWAP_V2_FACTORY).getPair(token, WETH));
if (address(pair) == ADDRESS_ZERO) {
return 0;
}
// Get the reserves
// (uint112 reserve0, uint112 reserve1, ) = pair.getReserves();
uint112 reserve0;
uint112 reserve1;
try pair.getReserves() returns (uint112 _reserve0, uint112 _reserve1, uint32) {
reserve0 = _reserve0;
reserve1 = _reserve1;
} catch {
return 0;
}
if (reserve0 == 0 || reserve1 == 0) {
return 0;
}
// Get the decimals of token.
(uint8 tokenDecimals, bool tokenDecimalsSuccess) = getTokenDecimalsUnsafe(token);
if (!tokenDecimalsSuccess) {
return 0;
}
// Normalize r0/r1 to 18 decimals.
uint112 reserveWeth = token < WETH ? reserve1 : reserve0;
uint112 reserveToken = token < WETH ? reserve0 : reserve1;
reserveToken = tokenDecimals <= WETH_DECIMALS
? uint112(reserveToken * 10 ** (WETH_DECIMALS - tokenDecimals))
: uint112(reserveToken / 10 ** (tokenDecimals - WETH_DECIMALS));
price = FixedPointMath.divuu(reserveWeth, reserveToken);
}
function quoteTokenUniswapV3(address token) internal returns (uint128) {
uint16[3] memory feeTiers = [500, 3000, 10000];
IUniswapV3Pool pool;
for (uint256 i = 0; i < feeTiers.length; ++i) {
// Get the pool
IUniswapV3Pool pair =
IUniswapV3Pool(IUniswapV3Factory(UNISWAP_V3_FACTORY).getPool(token, WETH, feeTiers[i]));
if (address(pool) != ADDRESS_ZERO) {
pool = pair;
break;
}
}
if (address(pool) == ADDRESS_ZERO) {
return 0;
}
// Get slot 0 sqrtPriceX96
uint160 sqrtPriceX96;
try pool.slot0() returns (uint160 _sqrtPriceX96, int24, uint16, uint16, uint16, uint8, bool) {
sqrtPriceX96 = _sqrtPriceX96;
} catch {
return 0;
}
bool token0IsReserve0 = token < WETH;
(uint8 tokenDecimals, bool token0DecimalsSuccess) = getTokenDecimalsUnsafe(token);
if (!token0DecimalsSuccess) {
return 0;
}
// Q128 -> Q64
return uint128(
FixedPointMath.fromSqrtX96(
sqrtPriceX96,
token0IsReserve0,
token0IsReserve0 ? int8(tokenDecimals) : int8(WETH_DECIMALS),
token0IsReserve0 ? int8(WETH_DECIMALS) : int8(tokenDecimals)
) >> 64
);
}
/// @notice returns true as the second return value if the token decimals can be successfully retrieved
function getTokenDecimalsUnsafe(address token) internal returns (uint8, bool) {
(bool tokenDecimalsSuccess, bytes memory tokenDecimalsData) =
token.call{gas: 20000}(abi.encodeWithSignature("decimals()"));
if (tokenDecimalsSuccess) {
uint256 tokenDecimals;
if (tokenDecimalsData.length == 32) {
(tokenDecimals) = abi.decode(tokenDecimalsData, (uint256));
if (tokenDecimals == 0 || tokenDecimals > 255) {
return (0, false);
} else {
return (uint8(tokenDecimals), true);
}
} else {
return (0, false);
}
} else {
return (0, false);
}
}
}
================================================
FILE: contracts/src/filters/WethValueInPoolsBatchRequest.sol
================================================
//SPDX-License-Identifier: MIT
pragma solidity ^0.8.26;
import "./WethValueInPools.sol";
contract WethValueInPoolsBatchRequest is WethValueInPools {
constructor(
address _uniswapV2Factory,
address _uniswapV3Factory,
address _weth,
WethValueInPools.PoolInfo[] memory pools
) WethValueInPools(_uniswapV2Factory, _uniswapV3Factory, _weth) {
WethValueInPools.PoolInfoReturn[] memory poolInfoReturn = getWethValueInPools(pools);
// insure abi encoding, not needed here but increase reusability for different return types
// note: abi.encode add a first 32 bytes word with the address of the original data
bytes memory abiEncodedData = abi.encode(poolInfoReturn);
assembly {
// Return from the start of the data (discarding the original data address)
// up to the end of the memory used
let dataStart := add(abiEncodedData, 0x20)
return(dataStart, sub(msize(), dataStart))
}
}
}
================================================
FILE: contracts/src/interfaces/IBalancer.sol
================================================
//SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
interface IBPool {
function getCurrentTokens() external returns (address[] memory);
function getDenormalizedWeight(address token) external returns (uint256);
function getSwapFee() external returns (uint256);
function getBalance(address token) external returns (uint256);
}
================================================
FILE: contracts/src/interfaces/IUniswapV2.sol
================================================
//SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
interface IUniswapV2Pair {
function token0() external view returns (address);
function token1() external view returns (address);
function getReserves() external view returns (uint112 reserve0, uint112 reserve1, uint32 blockTimestampLast);
}
interface IUniswapV2Factory {
function allPairs(uint256 idx) external returns (address);
function getPair(address tokenA, address tokenB) external view returns (address pair);
}
================================================
FILE: contracts/src/interfaces/IUniswapV3.sol
================================================
//SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
interface IUniswapV3Pool {
function fee() external view returns (uint24);
function tickSpacing() external view returns (int24);
function liquidity() external view returns (uint128);
function slot0()
external
view
returns (
uint160 sqrtPriceX96,
int24 tick,
uint16 observationIndex,
uint16 observationCardinality,
uint16 observationCardinalityNext,
uint8 feeProtocol,
bool unlocked
);
function ticks(int24 tick)
external
view
returns (
uint128 liquidityGross,
int128 liquidityNet,
uint256 feeGrowthOutside0X128,
uint256 feeGrowthOutside1X128,
int56 tickCumulativeOutside,
uint160 secondsPerLiquidityOutsideX128,
uint32 secondsOutside,
bool initialized
);
}
interface IUniswapV3Factory {
function getPool(address tokenA, address tokenB, uint24 fee) external view returns (address pool);
}
================================================
FILE: contracts/src/interfaces/Token.sol
================================================
//SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
interface IERC20 {
function decimals() external view returns (uint8);
function balanceOf(address) external view returns (uint256);
}
================================================
FILE: contracts/test/FixedPoint.t.sol
================================================
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "forge-std/Test.sol";
import "../src/UniswapV3/FixedPoint.sol";
contract FixedPointTest is Test {
/// @dev The minimum value that can be returned from #getSqrtRatioAtTick. Equivalent to getSqrtRatioAtTick(MIN_TICK)
uint160 internal constant MIN_SQRT_RATIO = 4295128739;
/// @dev The maximum value that can be returned from #getSqrtRatioAtTick. Equivalent to getSqrtRatioAtTick(MAX_TICK)
uint160 internal constant MAX_SQRT_RATIO = 1461446703485210103287273052203988822378723970342;
function setUp() public {}
function test_divuu_never_reverts(uint128 a, uint128 b) public pure {
FixedPointMath.divuu(a, b);
}
function test_mul64u_never_reverts(uint128 a, uint256 b) public pure {
FixedPointMath.mul64u(a, b);
}
function test_from_sqrt_x_96_never_reverts(
uint160 x,
bool token0IsReserve0,
int8 token0Decimals,
int8 token1Decimals
) public pure {
// Bound x from min_sqrt_x_96 to max_sqrt_x_96
if (x >= MIN_SQRT_RATIO || x <= MAX_SQRT_RATIO) {
FixedPointMath.fromSqrtX96(x, token0IsReserve0, token0Decimals, token1Decimals);
}
}
}
================================================
FILE: contracts/test/WethValueInPools.t.sol
================================================
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "forge-std/Test.sol";
import "../src/filters/WethValueInPools.sol";
contract WethValueInPoolsTest is Test {
WethValueInPools public wethValueInPools;
address uniswapV2Factory = 0x5C69bEe701ef814a2B6a3EDD4B1652CB9cc5aA6f;
address uniswapV3Factory = 0x1F98431c8aD98523631AE4a59f267346ea31F984;
address constant WETH = 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2;
address constant DAI = 0x6B175474E89094C44Da98b954EedeAC495271d0F;
address constant USDC = 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48;
function setUp() public {
wethValueInPools = new WethValueInPools(uniswapV2Factory, uniswapV3Factory, WETH);
}
function test_getWethValueInPools_validWeth() public {
WethValueInPools.PoolInfo[] memory testFixtureValidWeth = new WethValueInPools.PoolInfo[](3);
testFixtureValidWeth[0] = WethValueInPools.PoolInfo({
poolType: WethValueInPools.PoolType.Balancer,
poolAddress: 0x8a649274E4d777FFC6851F13d23A86BBFA2f2Fbf
});
testFixtureValidWeth[1] = WethValueInPools.PoolInfo({
poolType: WethValueInPools.PoolType.UniswapV2,
poolAddress: 0x397FF1542f962076d0BFE58eA045FfA2d347ACa0
});
testFixtureValidWeth[2] = WethValueInPools.PoolInfo({
poolType: WethValueInPools.PoolType.UniswapV3,
poolAddress: 0x88e6A0c2dDD26FEEb64F039a2c41296FcB3f5640
});
WethValueInPools.PoolInfoReturn[] memory pools = wethValueInPools.getWethValueInPools(testFixtureValidWeth);
assertEq(pools.length, 3);
// Check weth value > 0
assertGt(pools[0].wethValue, 0);
assertGt(pools[1].wethValue, 0);
assertGt(pools[2].wethValue, 0);
}
function test_getWethValueInPools_validNoWeth() public {
WethValueInPools.PoolInfo[] memory testFixtureValidNoWeth = new WethValueInPools.PoolInfo[](3);
testFixtureValidNoWeth[0] = WethValueInPools.PoolInfo({
poolType: WethValueInPools.PoolType.Balancer,
poolAddress: 0xE5D1fAB0C5596ef846DCC0958d6D0b20E1Ec4498
});
testFixtureValidNoWeth[1] = WethValueInPools.PoolInfo({
poolType: WethValueInPools.PoolType.UniswapV2,
poolAddress: 0xAE461cA67B15dc8dc81CE7615e0320dA1A9aB8D5
});
testFixtureValidNoWeth[2] = WethValueInPools.PoolInfo({
poolType: WethValueInPools.PoolType.UniswapV3,
poolAddress: 0x6c6Bc977E13Df9b0de53b251522280BB72383700
});
WethValueInPools.PoolInfoReturn[] memory pools = wethValueInPools.getWethValueInPools(testFixtureValidNoWeth);
assertEq(pools.length, 3);
// Check weth value > 0
assertGt(pools[0].wethValue, 0);
assertGt(pools[1].wethValue, 0);
assertGt(pools[2].wethValue, 0);
}
function test_getWethValueInPools_invalid_no_revert() public {
WethValueInPools.PoolInfo[] memory testFixtureInvalid = new WethValueInPools.PoolInfo[](3);
testFixtureInvalid[0] = WethValueInPools.PoolInfo({
poolType: WethValueInPools.PoolType.Balancer,
poolAddress: 0x5C69bEe701ef814a2B6a3EDD4B1652CB9cc5aA6f
});
testFixtureInvalid[1] = WethValueInPools.PoolInfo({
poolType: WethValueInPools.PoolType.UniswapV2,
poolAddress: 0x5C69bEe701ef814a2B6a3EDD4B1652CB9cc5aA6f
});
testFixtureInvalid[2] = WethValueInPools.PoolInfo({
poolType: WethValueInPools.PoolType.UniswapV3,
poolAddress: 0x5C69bEe701ef814a2B6a3EDD4B1652CB9cc5aA6f
});
WethValueInPools.PoolInfoReturn[] memory pools = wethValueInPools.getWethValueInPools(testFixtureInvalid);
assertEq(pools.length, 3);
// Should all be zero
assertEq(pools[0].wethValue, 0);
assertEq(pools[1].wethValue, 0);
assertEq(pools[2].wethValue, 0);
}
}
================================================
FILE: contracts/test/WethValueInPoolsBatchRequest.t.sol
================================================
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "forge-std/Test.sol";
import "../src/filters/WethValueInPoolsBatchRequest.sol";
contract WethValueInPoolsBatchRequestTest is Test {
address uniswapV2Factory = 0x5C69bEe701ef814a2B6a3EDD4B1652CB9cc5aA6f;
address uniswapV3Factory = 0x1F98431c8aD98523631AE4a59f267346ea31F984;
address constant WETH = 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2;
address constant DAI = 0x6B175474E89094C44Da98b954EedeAC495271d0F;
address constant USDC = 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48;
function setUp() public {}
function test_WethValueInPoolsBatchRequest_validWeth() public {
WethValueInPools.PoolInfo[] memory testFixtureValidWeth = new WethValueInPools.PoolInfo[](3);
testFixtureValidWeth[0] = WethValueInPools.PoolInfo({
poolType: WethValueInPools.PoolType.Balancer,
poolAddress: 0x8a649274E4d777FFC6851F13d23A86BBFA2f2Fbf
});
testFixtureValidWeth[1] = WethValueInPools.PoolInfo({
poolType: WethValueInPools.PoolType.UniswapV2,
poolAddress: 0x397FF1542f962076d0BFE58eA045FfA2d347ACa0
});
testFixtureValidWeth[2] = WethValueInPools.PoolInfo({
poolType: WethValueInPools.PoolType.UniswapV3,
poolAddress: 0x88e6A0c2dDD26FEEb64F039a2c41296FcB3f5640
});
bytes memory returnData = address(
new WethValueInPoolsBatchRequest(uniswapV2Factory, uniswapV3Factory, WETH, testFixtureValidWeth)
).code;
WethValueInPools.PoolInfoReturn[] memory pools = abi.decode(returnData, (WethValueInPools.PoolInfoReturn[]));
assertEq(pools.length, 3);
// Check weth value > 0 and valid pool address and pool type
for (uint256 i = 0; i < pools.length; i++) {
assertGt(pools[i].wethValue, 0);
assertEq(uint8(pools[i].poolType), uint8(testFixtureValidWeth[i].poolType));
assertEq(pools[i].poolAddress, testFixtureValidWeth[i].poolAddress);
}
}
function test_WethValueInPoolsBatchRequest_validNoWeth() public {
WethValueInPools.PoolInfo[] memory testFixtureValidNoWeth = new WethValueInPools.PoolInfo[](3);
testFixtureValidNoWeth[0] = WethValueInPools.PoolInfo({
poolType: WethValueInPools.PoolType.Balancer,
poolAddress: 0xE5D1fAB0C5596ef846DCC0958d6D0b20E1Ec4498
});
testFixtureValidNoWeth[1] = WethValueInPools.PoolInfo({
poolType: WethValueInPools.PoolType.UniswapV2,
poolAddress: 0xAE461cA67B15dc8dc81CE7615e0320dA1A9aB8D5
});
testFixtureValidNoWeth[2] = WethValueInPools.PoolInfo({
poolType: WethValueInPools.PoolType.UniswapV3,
poolAddress: 0x6c6Bc977E13Df9b0de53b251522280BB72383700
});
bytes memory returnData = address(
new WethValueInPoolsBatchRequest(uniswapV2Factory, uniswapV3Factory, WETH, testFixtureValidNoWeth)
).code;
WethValueInPools.PoolInfoReturn[] memory pools = abi.decode(returnData, (WethValueInPools.PoolInfoReturn[]));
assertEq(pools.length, 3);
// Check weth value > 0 and valid pool address and pool type
for (uint256 i = 0; i < pools.length; i++) {
assertGt(pools[i].wethValue, 0);
assertEq(uint8(pools[i].poolType), uint8(testFixtureValidNoWeth[i].poolType));
assertEq(pools[i].poolAddress, testFixtureValidNoWeth[i].poolAddress);
}
}
function test_WethValueInPoolsBatchRequest_invalid_no_revert() public {
WethValueInPools.PoolInfo[] memory testFixtureInvalid = new WethValueInPools.PoolInfo[](3);
testFixtureInvalid[0] = WethValueInPools.PoolInfo({
poolType: WethValueInPools.PoolType.Balancer,
poolAddress: 0x5C69bEe701ef814a2B6a3EDD4B1652CB9cc5aA6f
});
testFixtureInvalid[1] = WethValueInPools.PoolInfo({
poolType: WethValueInPools.PoolType.UniswapV2,
poolAddress: 0x5C69bEe701ef814a2B6a3EDD4B1652CB9cc5aA6f
});
testFixtureInvalid[2] = WethValueInPools.PoolInfo({
poolType: WethValueInPools.PoolType.UniswapV3,
poolAddress: 0x5C69bEe701ef814a2B6a3EDD4B1652CB9cc5aA6f
});
bytes memory returnData =
address(new WethValueInPoolsBatchRequest(uniswapV2Factory, uniswapV3Factory, WETH, testFixtureInvalid)).code;
WethValueInPools.PoolInfoReturn[] memory pools = abi.decode(returnData, (WethValueInPools.PoolInfoReturn[]));
assertEq(pools.length, 3);
// All weth values should be zero
for (uint256 i = 0; i < pools.length; i++) {
assertEq(pools[i].wethValue, 0);
assertEq(uint8(pools[i].poolType), uint8(testFixtureInvalid[i].poolType));
assertEq(pools[i].poolAddress, testFixtureInvalid[i].poolAddress);
}
}
}
================================================
FILE: dependabot.yml
================================================
version: 2
updates:
- package-ecosystem: "cargo"
directory: "/"
schedule:
interval: "monthly"
- package-ecosystem: "docker"
directory: "/"
schedule:
interval: "monthly"
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "monthly"
================================================
FILE: examples/filters.rs
================================================
use alloy::{
primitives::address,
providers::ProviderBuilder,
rpc::client::ClientBuilder,
transports::layers::{RetryBackoffLayer, ThrottleLayer},
};
use amms::{
amms::uniswap_v2::UniswapV2Factory,
state_space::{
filters::whitelist::{PoolWhitelistFilter, TokenWhitelistFilter},
StateSpaceBuilder,
},
};
use std::sync::Arc;
#[tokio::main]
async fn main() -> eyre::Result<()> {
tracing_subscriber::fmt::init();
let rpc_endpoint = std::env::var("ETHEREUM_PROVIDER")?;
let client = ClientBuilder::default()
.layer(ThrottleLayer::new(500))
.layer(RetryBackoffLayer::new(5, 200, 330))
.http(rpc_endpoint.parse()?);
let provider = Arc::new(ProviderBuilder::new().connect_client(client));
let factories = vec![
// UniswapV2
UniswapV2Factory::new(
address!("5C69bEe701ef814a2B6a3EDD4B1652CB9cc5aA6f"),
300,
10000835,
)
.into(),
];
/* PoolFilters are applied all AMMs when syncing the state space.
Filters have two "stages", `FilterStage::Discovery` or `FilterStage::Sync`.
Discovery filters are applied to AMMs after the `StateSpaceManager` has processed all pool created events.
Sync filters are applied to AMMs after the `StateSpaceManager` has processed all pool sync events.
This allows for efficient syncing of the state space by minimizing the amount of pools that need to sync state.
In the following example, the `PoolWhitelistFilter` is applied to the `Discovery` stage
and the `TokenWhitelistFilter` is applied to the `Sync` stage. Rather than syncing all pools from the factory,
only the whitelisted pools are synced. The `TokenWhitelistFilter` is applied after syncing since pool creation logs
do not always emit the tokens included in the pool, but this data will always be populated after syncing.
*/
let filters = vec![
PoolWhitelistFilter::new(vec![address!("88e6A0c2dDD26FEEb64F039a2c41296FcB3f5640")]).into(),
TokenWhitelistFilter::new(vec![address!("A0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48")])
.into(),
];
let _state_space_manager = StateSpaceBuilder::new(provider.clone())
.with_factories(factories)
.with_filters(filters)
.sync()
.await;
Ok(())
}
================================================
FILE: examples/simulate_swap.rs
================================================
use alloy::eips::BlockId;
use alloy::primitives::{Address, U256};
use alloy::transports::layers::ThrottleLayer;
use alloy::{
primitives::address, providers::ProviderBuilder, rpc::client::ClientBuilder,
transports::layers::RetryBackoffLayer,
};
use amms::amms::amm::AutomatedMarketMaker;
use amms::amms::uniswap_v3::UniswapV3Pool;
use std::sync::Arc;
#[tokio::main]
async fn main() -> eyre::Result<()> {
let rpc_endpoint = std::env::var("ETHEREUM_PROVIDER")?;
let client = ClientBuilder::default()
.layer(ThrottleLayer::new(50))
.layer(RetryBackoffLayer::new(5, 200, 330))
.http(rpc_endpoint.parse()?);
let provider = Arc::new(ProviderBuilder::new().connect_client(client));
let pool = UniswapV3Pool::new(address!("88e6A0c2dDD26FEEb64F039a2c41296FcB3f5640"))
.init(BlockId::latest(), provider)
.await?;
// Note that the token out does not need to be specified when
// simulating a swap for pools with only two tokens.
let amount_out = pool.simulate_swap(
pool.token_a.address,
Address::default(),
U256::from(1000000),
)?;
println!("Amount out: {:?}", amount_out);
Ok(())
}
================================================
FILE: examples/state_space_builder.rs
================================================
use std::sync::Arc;
use alloy::{
primitives::address,
providers::ProviderBuilder,
rpc::client::ClientBuilder,
transports::layers::{RetryBackoffLayer, ThrottleLayer},
};
use amms::{
amms::{
erc_4626::ERC4626Vault,
uniswap_v2::{UniswapV2Factory, UniswapV2Pool},
uniswap_v3::{UniswapV3Factory, UniswapV3Pool},
},
state_space::StateSpaceBuilder,
};
#[tokio::main]
async fn main() -> eyre::Result<()> {
tracing_subscriber::fmt::init();
let rpc_endpoint = std::env::var("ETHEREUM_PROVIDER")?;
let client = ClientBuilder::default()
.layer(ThrottleLayer::new(500))
.layer(RetryBackoffLayer::new(5, 200, 330))
.http(rpc_endpoint.parse()?);
let provider = Arc::new(ProviderBuilder::new().connect_client(client));
/*
The `StateSpaceBuilder` is used to sync a state space of AMMs.
When specifying a set of factories to sync from, the `sync()` method fetches all pool creation logs
from the factory contracts specified and syncs all pools to the latest block. This method returns a
`StateSpaceManager` which can be used to subscribe to state changes and interact with AMMs
the state space.
*/
let factories = vec![
// UniswapV2
UniswapV2Factory::new(
address!("5C69bEe701ef814a2B6a3EDD4B1652CB9cc5aA6f"),
300,
10000835,
)
.into(),
// UniswapV3
UniswapV3Factory::new(
address!("1F98431c8aD98523631AE4a59f267346ea31F984"),
12369621,
)
.into(),
];
let _state_space_manager = StateSpaceBuilder::new(provider.clone())
.with_factories(factories.clone())
.sync()
.await?;
// ======================================================================================== //
/*
You can also sync pools directly without specifying factories. This is great for when you only
need to track a handful of specific pools.
*/
let amms = vec![
UniswapV2Pool::new(address!("B4e16d0168e52d35CaCD2c6185b44281Ec28C9Dc"), 300).into(),
UniswapV3Pool::new(address!("88e6A0c2dDD26FEEb64F039a2c41296FcB3f5640")).into(),
];
let _state_space_manager = StateSpaceBuilder::new(provider.clone())
.with_amms(amms)
.sync()
.await?;
// ======================================================================================== //
/*
Additionally, you can specify specific factories to discover and sync pools from, as well as
specify specific AMMs to sync. This can be helpful when there isnt a factory for a given AMM
as is the case with ERC4626 vaults.
*/
let amms = vec![ERC4626Vault::new(address!("163538E22F4d38c1eb21B79939f3d2ee274198Ff")).into()];
let _state_space_manager = StateSpaceBuilder::new(provider.clone())
.with_factories(factories)
.with_amms(amms)
.sync()
.await?;
Ok(())
}
================================================
FILE: examples/subscribe.rs
================================================
use alloy::{
primitives::address,
providers::ProviderBuilder,
rpc::client::ClientBuilder,
transports::layers::{RetryBackoffLayer, ThrottleLayer},
};
use amms::{amms::uniswap_v2::UniswapV2Factory, state_space::StateSpaceBuilder};
use futures::StreamExt;
use std::sync::Arc;
#[tokio::main]
async fn main() -> eyre::Result<()> {
tracing_subscriber::fmt::init();
let rpc_endpoint = std::env::var("ETHEREUM_PROVIDER")?;
let client = ClientBuilder::default()
.layer(ThrottleLayer::new(500))
.layer(RetryBackoffLayer::new(5, 200, 330))
.http(rpc_endpoint.parse()?);
let sync_provider = Arc::new(ProviderBuilder::new().connect_client(client));
let factories = vec![UniswapV2Factory::new(
address!("5C69bEe701ef814a2B6a3EDD4B1652CB9cc5aA6f"),
300,
10000835,
)
.into()];
let state_space_manager = StateSpaceBuilder::new(sync_provider.clone())
.with_factories(factories)
.sync()
.await?;
/*
The subscribe method listens for new blocks and fetches
all logs matching any `sync_events()` specified by the AMM variants in the state space.
Under the hood, this method applies all state changes to any affected AMMs and returns a Vec of
addresses, indicating which AMMs have been updated.
*/
let mut stream = state_space_manager.subscribe().await?.take(5);
while let Some(updated_amms) = stream.next().await {
if let Ok(amms) = updated_amms {
println!("Updated AMMs: {:?}", amms);
}
}
Ok(())
}
================================================
FILE: examples/swap_calldata.rs
================================================
use alloy::eips::BlockId;
use alloy::primitives::U256;
use alloy::transports::layers::ThrottleLayer;
use alloy::{
primitives::address, providers::ProviderBuilder, rpc::client::ClientBuilder,
transports::layers::RetryBackoffLayer,
};
use amms::amms::{amm::AutomatedMarketMaker, uniswap_v2::UniswapV2Pool};
use std::sync::Arc;
#[tokio::main]
async fn main() -> eyre::Result<()> {
let rpc_endpoint = std::env::var("ETHEREUM_PROVIDER")?;
let client = ClientBuilder::default()
.layer(ThrottleLayer::new(500))
.layer(RetryBackoffLayer::new(5, 200, 330))
.http(rpc_endpoint.parse()?);
let provider = Arc::new(ProviderBuilder::new().connect_client(client));
let pool = UniswapV2Pool::new(address!("B4e16d0168e52d35CaCD2c6185b44281Ec28C9Dc"), 300)
.init(BlockId::latest(), provider)
.await?;
let to_address = address!("DecafC0ffee15BadDecafC0ffee15BadDecafC0f");
let swap_calldata = pool.swap_calldata(U256::from(10000), U256::ZERO, to_address, vec![]);
println!("Swap calldata: {:?}", swap_calldata);
Ok(())
}
================================================
FILE: examples/sync_macro.rs
================================================
use std::sync::Arc;
use alloy::{
primitives::address,
providers::ProviderBuilder,
rpc::client::ClientBuilder,
transports::layers::{RetryBackoffLayer, ThrottleLayer},
};
use amms::{
amms::{uniswap_v2::UniswapV2Factory, uniswap_v3::UniswapV3Factory},
state_space::{
filters::{
whitelist::{PoolWhitelistFilter, TokenWhitelistFilter},
PoolFilter,
},
StateSpaceBuilder,
},
sync,
};
#[tokio::main]
async fn main() -> eyre::Result<()> {
tracing_subscriber::fmt::init();
let rpc_endpoint = std::env::var("ETHEREUM_PROVIDER")?;
let client = ClientBuilder::default()
.layer(ThrottleLayer::new(500))
.layer(RetryBackoffLayer::new(5, 200, 330))
.http(rpc_endpoint.parse()?);
let provider = Arc::new(ProviderBuilder::new().connect_client(client));
let factories = vec![
// UniswapV2
UniswapV2Factory::new(
address!("5C69bEe701ef814a2B6a3EDD4B1652CB9cc5aA6f"),
300,
10000835,
)
.into(),
// UniswapV3
UniswapV3Factory::new(
address!("1F98431c8aD98523631AE4a59f267346ea31F984"),
12369621,
)
.into(),
];
let filters: Vec<PoolFilter> = vec![
PoolWhitelistFilter::new(vec![address!("88e6A0c2dDD26FEEb64F039a2c41296FcB3f5640")]).into(),
TokenWhitelistFilter::new(vec![address!("A0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48")])
.into(),
];
let _state_space_manager = sync!(factories, filters, provider);
Ok(())
}
================================================
FILE: src/amms/abi/GetBalancerPoolDataBatchRequest.json
================================================
{"abi":[{"type":"constructor","inputs":[{"name":"pools","type":"address[]","internalType":"address[]"}],"stateMutability":"nonpayable"}],"bytecode":{"object":"0x608060405234801561000f575f5ffd5b50604051610de8380380610de8833981810160405281019061003191906108d3565b5f815167ffffffffffffffff81111561004d5761004c61073d565b5b60405190808252806020026020018201604052801561008657816020015b6100736106e4565b81526020019060019003908161006b5790505b5090505f5f90505b8251811015610533575f8382815181106100ab576100aa61091a565b5b602002602001015190506100c48161056160201b60201c565b156100cf5750610528565b6100d76106e4565b5f8273ffffffffffffffffffffffffffffffffffffffff1663cc77828d6040518163ffffffff1660e01b81526004015f604051808303815f875af1158015610121573d5f5f3e3d5ffd5b505050506040513d5f823e3d601f19601f8201168201806040525081019061014991906108d3565b90505f815167ffffffffffffffff8111156101675761016661073d565b5b6040519080825280602002602001820160405280156101955781602001602082028036833780820191505090505b5090505f825167ffffffffffffffff8111156101b4576101b361073d565b5b6040519080825280602002602001820160405280156101e25781602001602082028036833780820191505090505b5090505f835167ffffffffffffffff8111156102015761020061073d565b5b60405190808252806020026020018201604052801561022f5781602001602082028036833780820191505090505b5090505f5f90505b8451811015610275576102698582815181106102565761025561091a565b5b602002602001015161056160201b60201c565b50806001019050610237565b505f5f90505b8451811015610459575f6102ae86838151811061029b5761029a61091a565b5b602002602001015161059260201b60201c565b90505f8160ff16036102c0575061044e565b808583815181106102d4576102d361091a565b5b602002602001019060ff16908160ff16815250508773ffffffffffffffffffffffffffffffffffffffff1663948d8ce68784815181106103175761031661091a565b5b60200260200101516040518263ffffffff1660e01b815260040161033b9190610956565b6020604051808303815f875af1158015610357573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061037b91906109a2565b83838151811061038e5761038d61091a565b5b6020026020010181815250508773ffffffffffffffffffffffffffffffffffffffff1663f8b2cb4f8784815181106103c9576103c861091a565b5b60200260200101516040518263ffffffff1660e01b81526004016103ed9190610956565b6020604051808303815f875af1158015610409573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061042d91906109a2565b8483815181106104405761043f61091a565b5b602002602001018181525050505b80600101905061027b565b508573ffffffffffffffffffffffffffffffffffffffff1663d4cadf686040518163ffffffff1660e01b81526004016020604051808303815f875af11580156104a4573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906104c891906109a2565b856080019063ffffffff16908163ffffffff168152505083855f0181905250828560200181905250818560400181905250808560600181905250848888815181106105165761051561091a565b5b60200260200101819052505050505050505b80600101905061008e565b505f816040516020016105469190610d5f565b60405160208183030381529060405290506020810180590381f35b5f5f8273ffffffffffffffffffffffffffffffffffffffff163b03610589576001905061058d565b5f90505b919050565b5f5f5f8373ffffffffffffffffffffffffffffffffffffffff166040516024016040516020818303038152906040527f313ce567000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff838183161783525050505060405161063c9190610dd1565b5f604051808303815f865af19150503d805f8114610675576040519150601f19603f3d011682016040523d82523d5f602084013e61067a565b606091505b509150915081156106d9575f60208251036106ce57818060200190518101906106a391906109a2565b90505f8114806106b3575060ff81115b156106c3575f93505050506106df565b8093505050506106df565b5f93505050506106df565b5f925050505b919050565b6040518060a00160405280606081526020016060815260200160608152602001606081526020015f63ffffffff1681525090565b5f604051905090565b5f5ffd5b5f5ffd5b5f5ffd5b5f601f19601f8301169050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b6107738261072d565b810181811067ffffffffffffffff821117156107925761079161073d565b5b80604052505050565b5f6107a4610718565b90506107b0828261076a565b919050565b5f67ffffffffffffffff8211156107cf576107ce61073d565b5b602082029050602081019050919050565b5f5ffd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f61080d826107e4565b9050919050565b61081d81610803565b8114610827575f5ffd5b50565b5f8151905061083881610814565b92915050565b5f61085061084b846107b5565b61079b565b90508083825260208201905060208402830185811115610873576108726107e0565b5b835b8181101561089c5780610888888261082a565b845260208401935050602081019050610875565b5050509392505050565b5f82601f8301126108ba576108b9610729565b5b81516108ca84826020860161083e565b91505092915050565b5f602082840312156108e8576108e7610721565b5b5f82015167ffffffffffffffff81111561090557610904610725565b5b610911848285016108a6565b91505092915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b61095081610803565b82525050565b5f6020820190506109695f830184610947565b92915050565b5f819050919050565b6109818161096f565b811461098b575f5ffd5b50565b5f8151905061099c81610978565b92915050565b5f602082840312156109b7576109b6610721565b5b5f6109c48482850161098e565b91505092915050565b5f81519050919050565b5f82825260208201905092915050565b5f819050602082019050919050565b5f81519050919050565b5f82825260208201905092915050565b5f819050602082019050919050565b610a2881610803565b82525050565b5f610a398383610a1f565b60208301905092915050565b5f602082019050919050565b5f610a5b826109f6565b610a658185610a00565b9350610a7083610a10565b805f5b83811015610aa0578151610a878882610a2e565b9750610a9283610a45565b925050600181019050610a73565b5085935050505092915050565b5f81519050919050565b5f82825260208201905092915050565b5f819050602082019050919050565b5f60ff82169050919050565b610aeb81610ad6565b82525050565b5f610afc8383610ae2565b60208301905092915050565b5f602082019050919050565b5f610b1e82610aad565b610b288185610ab7565b9350610b3383610ac7565b805f5b83811015610b63578151610b4a8882610af1565b9750610b5583610b08565b925050600181019050610b36565b5085935050505092915050565b5f81519050919050565b5f82825260208201905092915050565b5f819050602082019050919050565b610ba28161096f565b82525050565b5f610bb38383610b99565b60208301905092915050565b5f602082019050919050565b5f610bd582610b70565b610bdf8185610b7a565b9350610bea83610b8a565b805f5b83811015610c1a578151610c018882610ba8565b9750610c0c83610bbf565b925050600181019050610bed565b5085935050505092915050565b5f63ffffffff82169050919050565b610c3f81610c27565b82525050565b5f60a083015f8301518482035f860152610c5f8282610a51565b91505060208301518482036020860152610c798282610b14565b91505060408301518482036040860152610c938282610bcb565b91505060608301518482036060860152610cad8282610bcb565b9150506080830151610cc26080860182610c36565b508091505092915050565b5f610cd88383610c45565b905092915050565b5f602082019050919050565b5f610cf6826109cd565b610d0081856109d7565b935083602082028501610d12856109e7565b805f5b85811015610d4d5784840389528151610d2e8582610ccd565b9450610d3983610ce0565b925060208a01995050600181019050610d15565b50829750879550505050505092915050565b5f6020820190508181035f830152610d778184610cec565b905092915050565b5f81519050919050565b5f81905092915050565b8281835e5f83830152505050565b5f610dab82610d7f565b610db58185610d89565b9350610dc5818560208601610d93565b80840191505092915050565b5f610ddc8284610da1565b91508190509291505056fe","sourceMap":"550:3022:23:-:0;;;754:1990;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;800:29;847:5;:12;832:28;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;800:60;;876:9;888:1;876:13;;871:1526;895:5;:12;891:1;:16;871:1526;;;928:19;950:5;956:1;950:8;;;;;;;;:::i;:::-;;;;;;;;928:30;;977:27;992:11;977:14;;;:27;;:::i;:::-;973:41;;;1006:8;;;973:41;1029:24;;:::i;:::-;1098:23;1131:11;1124:36;;;:38;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;1098:64;;1176:23;1214:6;:13;1202:26;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1176:52;;1242:26;1285:6;:13;1271:28;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1242:57;;1313:24;1354:6;:13;1340:28;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1313:55;;1388:9;1400:1;1388:13;;1383:156;1407:6;:13;1403:1;:17;1383:156;;;1449:25;1464:6;1471:1;1464:9;;;;;;;;:::i;:::-;;;;;;;;1449:14;;;:25;;:::i;:::-;1445:80;1422:3;;;;;1383:156;;;;1601:9;1613:1;1601:13;;1596:485;1620:6;:13;1616:1;:17;1596:485;;;1658:19;1680:27;1697:6;1704:1;1697:9;;;;;;;;:::i;:::-;;;;;;;;1680:16;;;:27;;:::i;:::-;1658:49;;1746:1;1729:13;:18;;;1725:147;;1771:8;;;1725:147;1840:13;1826:8;1835:1;1826:11;;;;;;;;:::i;:::-;;;;;;;:27;;;;;;;;;;;1909:11;1902:41;;;1965:6;1972:1;1965:9;;;;;;;;:::i;:::-;;;;;;;;1902:90;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;1889:7;1897:1;1889:10;;;;;;;;:::i;:::-;;;;;;;:103;;;;;2032:11;2025:30;;;2056:6;2063:1;2056:9;;;;;;;;:::i;:::-;;;;;;;;2025:41;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;2010:9;2020:1;2010:12;;;;;;;;:::i;:::-;;;;;;;:56;;;;;1640:441;1596:485;1635:3;;;;;1596:485;;;;2157:11;2150:30;;;:32;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;2128:8;:12;;:55;;;;;;;;;;;2215:6;2197:8;:15;;:24;;;;2255:8;2235;:17;;:28;;;;2298:9;2277:8;:18;;:30;;;;2340:7;2321:8;:16;;:26;;;;2378:8;2361:11;2373:1;2361:14;;;;;;;;:::i;:::-;;;;;;;:25;;;;914:1483;;;;;;871:1526;909:3;;;;;871:1526;;;;2407:28;2449:11;2438:23;;;;;;;;:::i;:::-;;;;;;;;;;;;;2407:54;;2668:4;2651:15;2647:26;2717:9;2708:7;2704:23;2693:9;2686:42;3377:193;3440:4;3482:1;3460:6;:18;;;:23;3456:108;;3506:4;3499:11;;;;3456:108;3548:5;3541:12;;3377:193;;;;:::o;2750:621::-;2809:5;2827:12;2841:17;2862:5;:10;;2886:37;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2862:71;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2826:107;;;;2948:7;2944:421;;;2971:16;3020:2;3005:4;:11;:17;3001:315;;3066:4;3055:27;;;;;;;;;;;;:::i;:::-;3042:40;;3116:1;3104:8;:13;:31;;;;3132:3;3121:8;:14;3104:31;3100:155;;;3166:1;3159:8;;;;;;;3100:155;3227:8;3214:22;;;;;;;3001:315;3300:1;3293:8;;;;;;;2944:421;3353:1;3346:8;;;;2750:621;;;;:::o;550:3022::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;7:75:41:-;40:6;73:2;67:9;57:19;;7:75;:::o;88:117::-;197:1;194;187:12;211:117;320:1;317;310:12;334:117;443:1;440;433:12;457:102;498:6;549:2;545:7;540:2;533:5;529:14;525:28;515:38;;457:102;;;:::o;565:180::-;613:77;610:1;603:88;710:4;707:1;700:15;734:4;731:1;724:15;751:281;834:27;856:4;834:27;:::i;:::-;826:6;822:40;964:6;952:10;949:22;928:18;916:10;913:34;910:62;907:88;;;975:18;;:::i;:::-;907:88;1015:10;1011:2;1004:22;794:238;751:281;;:::o;1038:129::-;1072:6;1099:20;;:::i;:::-;1089:30;;1128:33;1156:4;1148:6;1128:33;:::i;:::-;1038:129;;;:::o;1173:311::-;1250:4;1340:18;1332:6;1329:30;1326:56;;;1362:18;;:::i;:::-;1326:56;1412:4;1404:6;1400:17;1392:25;;1472:4;1466;1462:15;1454:23;;1173:311;;;:::o;1490:117::-;1599:1;1596;1589:12;1613:126;1650:7;1690:42;1683:5;1679:54;1668:65;;1613:126;;;:::o;1745:96::-;1782:7;1811:24;1829:5;1811:24;:::i;:::-;1800:35;;1745:96;;;:::o;1847:122::-;1920:24;1938:5;1920:24;:::i;:::-;1913:5;1910:35;1900:63;;1959:1;1956;1949:12;1900:63;1847:122;:::o;1975:143::-;2032:5;2063:6;2057:13;2048:22;;2079:33;2106:5;2079:33;:::i;:::-;1975:143;;;;:::o;2141:732::-;2248:5;2273:81;2289:64;2346:6;2289:64;:::i;:::-;2273:81;:::i;:::-;2264:90;;2374:5;2403:6;2396:5;2389:21;2437:4;2430:5;2426:16;2419:23;;2490:4;2482:6;2478:17;2470:6;2466:30;2519:3;2511:6;2508:15;2505:122;;;2538:79;;:::i;:::-;2505:122;2653:6;2636:231;2670:6;2665:3;2662:15;2636:231;;;2745:3;2774:48;2818:3;2806:10;2774:48;:::i;:::-;2769:3;2762:61;2852:4;2847:3;2843:14;2836:21;;2712:155;2696:4;2691:3;2687:14;2680:21;;2636:231;;;2640:21;2254:619;;2141:732;;;;;:::o;2896:385::-;2978:5;3027:3;3020:4;3012:6;3008:17;3004:27;2994:122;;3035:79;;:::i;:::-;2994:122;3145:6;3139:13;3170:105;3271:3;3263:6;3256:4;3248:6;3244:17;3170:105;:::i;:::-;3161:114;;2984:297;2896:385;;;;:::o;3287:554::-;3382:6;3431:2;3419:9;3410:7;3406:23;3402:32;3399:119;;;3437:79;;:::i;:::-;3399:119;3578:1;3567:9;3563:17;3557:24;3608:18;3600:6;3597:30;3594:117;;;3630:79;;:::i;:::-;3594:117;3735:89;3816:7;3807:6;3796:9;3792:22;3735:89;:::i;:::-;3725:99;;3528:306;3287:554;;;;:::o;3847:180::-;3895:77;3892:1;3885:88;3992:4;3989:1;3982:15;4016:4;4013:1;4006:15;4033:118;4120:24;4138:5;4120:24;:::i;:::-;4115:3;4108:37;4033:118;;:::o;4157:222::-;4250:4;4288:2;4277:9;4273:18;4265:26;;4301:71;4369:1;4358:9;4354:17;4345:6;4301:71;:::i;:::-;4157:222;;;;:::o;4385:77::-;4422:7;4451:5;4440:16;;4385:77;;;:::o;4468:122::-;4541:24;4559:5;4541:24;:::i;:::-;4534:5;4531:35;4521:63;;4580:1;4577;4570:12;4521:63;4468:122;:::o;4596:143::-;4653:5;4684:6;4678:13;4669:22;;4700:33;4727:5;4700:33;:::i;:::-;4596:143;;;;:::o;4745:351::-;4815:6;4864:2;4852:9;4843:7;4839:23;4835:32;4832:119;;;4870:79;;:::i;:::-;4832:119;4990:1;5015:64;5071:7;5062:6;5051:9;5047:22;5015:64;:::i;:::-;5005:74;;4961:128;4745:351;;;;:::o;5102:141::-;5196:6;5230:5;5224:12;5214:22;;5102:141;;;:::o;5249:211::-;5375:11;5409:6;5404:3;5397:19;5449:4;5444:3;5440:14;5425:29;;5249:211;;;;:::o;5466:159::-;5560:4;5583:3;5575:11;;5613:4;5608:3;5604:14;5596:22;;5466:159;;;:::o;5631:114::-;5698:6;5732:5;5726:12;5716:22;;5631:114;;;:::o;5751:174::-;5840:11;5874:6;5869:3;5862:19;5914:4;5909:3;5905:14;5890:29;;5751:174;;;;:::o;5931:132::-;5998:4;6021:3;6013:11;;6051:4;6046:3;6042:14;6034:22;;5931:132;;;:::o;6069:108::-;6146:24;6164:5;6146:24;:::i;:::-;6141:3;6134:37;6069:108;;:::o;6183:179::-;6252:10;6273:46;6315:3;6307:6;6273:46;:::i;:::-;6351:4;6346:3;6342:14;6328:28;;6183:179;;;;:::o;6368:113::-;6438:4;6470;6465:3;6461:14;6453:22;;6368:113;;;:::o;6517:712::-;6626:3;6655:54;6703:5;6655:54;:::i;:::-;6725:76;6794:6;6789:3;6725:76;:::i;:::-;6718:83;;6825:56;6875:5;6825:56;:::i;:::-;6904:7;6935:1;6920:284;6945:6;6942:1;6939:13;6920:284;;;7021:6;7015:13;7048:63;7107:3;7092:13;7048:63;:::i;:::-;7041:70;;7134:60;7187:6;7134:60;:::i;:::-;7124:70;;6980:224;6967:1;6964;6960:9;6955:14;;6920:284;;;6924:14;7220:3;7213:10;;6631:598;;;6517:712;;;;:::o;7235:112::-;7300:6;7334:5;7328:12;7318:22;;7235:112;;;:::o;7353:172::-;7440:11;7474:6;7469:3;7462:19;7514:4;7509:3;7505:14;7490:29;;7353:172;;;;:::o;7531:130::-;7596:4;7619:3;7611:11;;7649:4;7644:3;7640:14;7632:22;;7531:130;;;:::o;7667:86::-;7702:7;7742:4;7735:5;7731:16;7720:27;;7667:86;;;:::o;7759:102::-;7832:22;7848:5;7832:22;:::i;:::-;7827:3;7820:35;7759:102;;:::o;7867:171::-;7932:10;7953:42;7991:3;7983:6;7953:42;:::i;:::-;8027:4;8022:3;8018:14;8004:28;;7867:171;;;;:::o;8044:111::-;8112:4;8144;8139:3;8135:14;8127:22;;8044:111;;;:::o;8187:696::-;8292:3;8321:52;8367:5;8321:52;:::i;:::-;8389:74;8456:6;8451:3;8389:74;:::i;:::-;8382:81;;8487:54;8535:5;8487:54;:::i;:::-;8564:7;8595:1;8580:278;8605:6;8602:1;8599:13;8580:278;;;8681:6;8675:13;8708:59;8763:3;8748:13;8708:59;:::i;:::-;8701:66;;8790:58;8841:6;8790:58;:::i;:::-;8780:68;;8640:218;8627:1;8624;8620:9;8615:14;;8580:278;;;8584:14;8874:3;8867:10;;8297:586;;;8187:696;;;;:::o;8889:114::-;8956:6;8990:5;8984:12;8974:22;;8889:114;;;:::o;9009:174::-;9098:11;9132:6;9127:3;9120:19;9172:4;9167:3;9163:14;9148:29;;9009:174;;;;:::o;9189:132::-;9256:4;9279:3;9271:11;;9309:4;9304:3;9300:14;9292:22;;9189:132;;;:::o;9327:108::-;9404:24;9422:5;9404:24;:::i;:::-;9399:3;9392:37;9327:108;;:::o;9441:179::-;9510:10;9531:46;9573:3;9565:6;9531:46;:::i;:::-;9609:4;9604:3;9600:14;9586:28;;9441:179;;;;:::o;9626:113::-;9696:4;9728;9723:3;9719:14;9711:22;;9626:113;;;:::o;9775:712::-;9884:3;9913:54;9961:5;9913:54;:::i;:::-;9983:76;10052:6;10047:3;9983:76;:::i;:::-;9976:83;;10083:56;10133:5;10083:56;:::i;:::-;10162:7;10193:1;10178:284;10203:6;10200:1;10197:13;10178:284;;;10279:6;10273:13;10306:63;10365:3;10350:13;10306:63;:::i;:::-;10299:70;;10392:60;10445:6;10392:60;:::i;:::-;10382:70;;10238:224;10225:1;10222;10218:9;10213:14;;10178:284;;;10182:14;10478:3;10471:10;;9889:598;;;9775:712;;;;:::o;10493:93::-;10529:7;10569:10;10562:5;10558:22;10547:33;;10493:93;;;:::o;10592:105::-;10667:23;10684:5;10667:23;:::i;:::-;10662:3;10655:36;10592:105;;:::o;10809:1462::-;10922:3;10958:4;10953:3;10949:14;11047:4;11040:5;11036:16;11030:23;11100:3;11094:4;11090:14;11083:4;11078:3;11074:14;11067:38;11126:103;11224:4;11210:12;11126:103;:::i;:::-;11118:111;;10973:267;11326:4;11319:5;11315:16;11309:23;11379:3;11373:4;11369:14;11362:4;11357:3;11353:14;11346:38;11405:99;11499:4;11485:12;11405:99;:::i;:::-;11397:107;;11250:265;11602:4;11595:5;11591:16;11585:23;11655:3;11649:4;11645:14;11638:4;11633:3;11629:14;11622:38;11681:103;11779:4;11765:12;11681:103;:::i;:::-;11673:111;;11525:270;11880:4;11873:5;11869:16;11863:23;11933:3;11927:4;11923:14;11916:4;11911:3;11907:14;11900:38;11959:103;12057:4;12043:12;11959:103;:::i;:::-;11951:111;;11805:268;12154:4;12147:5;12143:16;12137:23;12173:61;12228:4;12223:3;12219:14;12205:12;12173:61;:::i;:::-;12083:161;12261:4;12254:11;;10927:1344;10809:1462;;;;:::o;12277:264::-;12400:10;12435:100;12531:3;12523:6;12435:100;:::i;:::-;12421:114;;12277:264;;;;:::o;12547:140::-;12644:4;12676;12671:3;12667:14;12659:22;;12547:140;;;:::o;12803:1127::-;12976:3;13005:81;13080:5;13005:81;:::i;:::-;13102:113;13208:6;13203:3;13102:113;:::i;:::-;13095:120;;13241:3;13286:4;13278:6;13274:17;13269:3;13265:27;13316:83;13393:5;13316:83;:::i;:::-;13422:7;13453:1;13438:447;13463:6;13460:1;13457:13;13438:447;;;13534:9;13528:4;13524:20;13519:3;13512:33;13585:6;13579:13;13613:118;13726:4;13711:13;13613:118;:::i;:::-;13605:126;;13754:87;13834:6;13754:87;:::i;:::-;13744:97;;13870:4;13865:3;13861:14;13854:21;;13498:387;13485:1;13482;13478:9;13473:14;;13438:447;;;13442:14;13901:4;13894:11;;13921:3;13914:10;;12981:949;;;;;12803:1127;;;;:::o;13936:481::-;14133:4;14171:2;14160:9;14156:18;14148:26;;14220:9;14214:4;14210:20;14206:1;14195:9;14191:17;14184:47;14248:162;14405:4;14396:6;14248:162;:::i;:::-;14240:170;;13936:481;;;;:::o;14423:98::-;14474:6;14508:5;14502:12;14492:22;;14423:98;;;:::o;14527:147::-;14628:11;14665:3;14650:18;;14527:147;;;;:::o;14680:139::-;14769:6;14764:3;14759;14753:23;14810:1;14801:6;14796:3;14792:16;14785:27;14680:139;;;:::o;14825:386::-;14929:3;14957:38;14989:5;14957:38;:::i;:::-;15011:88;15092:6;15087:3;15011:88;:::i;:::-;15004:95;;15108:65;15166:6;15161:3;15154:4;15147:5;15143:16;15108:65;:::i;:::-;15198:6;15193:3;15189:16;15182:23;;14933:278;14825:386;;;;:::o;15217:271::-;15347:3;15369:93;15458:3;15449:6;15369:93;:::i;:::-;15362:100;;15479:3;15472:10;;15217:271;;;;:::o","linkReferences":{}},"deployedBytecode":{"object":"0x60806040525f5ffdfea164736f6c634300081c000a","sourceMap":"550:3022:23:-:0;;;;;","linkReferences":{}},"methodIdentifiers":{},"rawMetadata":"{\"compiler\":{\"version\":\"0.8.28+commit.7893614a\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"pools\",\"type\":\"address[]\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"}],\"devdoc\":{\"details\":\"This contract is not meant to be deployed. Instead, use a static call with the deployment bytecode as payload.\",\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/Balancer/GetBalancerPoolDataBatchRequest.sol\":\"GetBalancerPoolDataBatchRequest\"},\"evmVersion\":\"cancun\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"none\"},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[\":forge-std/=lib/forge-std/src/\"]},\"sources\":{\"src/Balancer/GetBalancerPoolDataBatchRequest.sol\":{\"keccak256\":\"0x3e1577d615b675bc39200e3dc32570558e53b8ea30312a81704e8dce264b98c2\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://ec97ff172e26f806289c07ec87d0a2416fc4d199b9dee267c65ed42c8a0a327d\",\"dweb:/ipfs/Qmf2VT6PM4HSfQ6vBhffX3DKrBnW7EtF9VWC8NE5SoQgwP\"]}},\"version\":1}","metadata":{"compiler":{"version":"0.8.28+commit.7893614a"},"language":"Solidity","output":{"abi":[{"inputs":[{"internalType":"address[]","name":"pools","type":"address[]"}],"stateMutability":"nonpayable","type":"constructor"}],"devdoc":{"kind":"dev","methods":{},"version":1},"userdoc":{"kind":"user","methods":{},"version":1}},"settings":{"remappings":["forge-std/=lib/forge-std/src/"],"optimizer":{"enabled":false,"runs":200},"metadata":{"bytecodeHash":"none"},"compilationTarget":{"src/Balancer/GetBalancerPoolDataBatchRequest.sol":"GetBalancerPoolDataBatchRequest"},"evmVersion":"cancun","libraries":{}},"sources":{"src/Balancer/GetBalancerPoolDataBatchRequest.sol":{"keccak256":"0x3e1577d615b675bc39200e3dc32570558e53b8ea30312a81704e8dce264b98c2","urls":["bzz-raw://ec97ff172e26f806289c07ec87d0a2416fc4d199b9dee267c65ed42c8a0a327d","dweb:/ipfs/Qmf2VT6PM4HSfQ6vBhffX3DKrBnW7EtF9VWC8NE5SoQgwP"],"license":"MIT"}},"version":1},"id":23}
================================================
FILE: src/amms/abi/GetERC4626VaultDataBatchRequest.json
================================================
{"abi":[{"type":"constructor","inputs":[{"name":"vaults","type":"address[]","internalType":"address[]"}],"stateMutability":"nonpayable"}],"bytecode":{"object":"0x608060405234801561000f575f5ffd5b5060405161136d38038061136d83398181016040528101906100319190610d7a565b5f815167ffffffffffffffff81111561004d5761004c610be4565b5b60405190808252806020026020018201604052801561008657816020015b610073610b38565b81526020019060019003908161006b5790505b5090505f5f90505b8251811015610ae8575f8382815181106100ab576100aa610dc1565b5b602002602001015190506100c481610b1660201b60201c565b156100cf5750610add565b5f8173ffffffffffffffffffffffffffffffffffffffff166338d52e0f6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610119573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061013d9190610dee565b905061014e81610b1660201b60201c565b1561015a575050610add565b5f5f8273ffffffffffffffffffffffffffffffffffffffff16614e206040516024016040516020818303038152906040527f313ce567000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506040516102069190610e6b565b5f604051808303815f8787f1925050503d805f8114610240576040519150601f19603f3d011682016040523d82523d5f602084013e610245565b606091505b5091509150811580610258575060208151145b156102665750505050610add565b5f8180602001905181019061027b9190610eb4565b90505f81148061028b575060ff81115b1561029a575050505050610add565b6102a2610b38565b85815f019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505084816040019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250508573ffffffffffffffffffffffffffffffffffffffff1663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa15801561035a573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061037e9190610f15565b816020019060ff16908160ff168152505081816060019060ff16908160ff16815250508573ffffffffffffffffffffffffffffffffffffffff166318160ddd6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156103ea573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061040e9190610eb4565b8160800181815250508573ffffffffffffffffffffffffffffffffffffffff166301e1d1146040518163ffffffff1660e01b8152600401602060405180830381865afa158015610460573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906104849190610eb4565b8160a00181815250508573ffffffffffffffffffffffffffffffffffffffff1663ef8b30f78260600151600a6104ba919061109c565b60646104c691906110e6565b6040518263ffffffff1660e01b81526004016104e29190611136565b602060405180830381865afa1580156104fd573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906105219190610eb4565b8673ffffffffffffffffffffffffffffffffffffffff1663c6e6f5928360600151600a61054e919061109c565b606461055a91906110e6565b6040518263ffffffff1660e01b81526004016105769190611136565b602060405180830381865afa158015610591573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906105b59190610eb4565b6105bf919061114f565b8160c00181815250508573ffffffffffffffffffffffffffffffffffffffff1663ef8b30f78260600151600a6105f5919061109c565b60c861060191906110e6565b6040518263ffffffff1660e01b815260040161061d9190611136565b602060405180830381865afa158015610638573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061065c9190610eb4565b8673ffffffffffffffffffffffffffffffffffffffff1663c6e6f5928360600151600a610689919061109c565b60c861069591906110e6565b6040518263ffffffff1660e01b81526004016106b19190611136565b602060405180830381865afa1580156106cc573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906106f09190610eb4565b6106fa919061114f565b8160e00181815250508573ffffffffffffffffffffffffffffffffffffffff1663c6e6f5928260600151600a610730919061109c565b606461073c91906110e6565b6040518263ffffffff1660e01b81526004016107589190611136565b602060405180830381865afa158015610773573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906107979190610eb4565b816101000181815250508573ffffffffffffffffffffffffffffffffffffffff16634cdad5068260200151600a6107ce919061109c565b60646107da91906110e6565b6040518263ffffffff1660e01b81526004016107f69190611136565b602060405180830381865afa158015610811573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906108359190610eb4565b8673ffffffffffffffffffffffffffffffffffffffff166307a2d13a8360200151600a610862919061109c565b606461086e91906110e6565b6040518263ffffffff1660e01b815260040161088a9190611136565b602060405180830381865afa1580156108a5573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906108c99190610eb4565b6108d3919061114f565b816101200181815250508573ffffffffffffffffffffffffffffffffffffffff16634cdad5068260200151600a61090a919061109c565b60c861091691906110e6565b6040518263ffffffff1660e01b81526004016109329190611136565b602060405180830381865afa15801561094d573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906109719190610eb4565b8673ffffffffffffffffffffffffffffffffffffffff166307a2d13a8360200151600a61099e919061109c565b60c86109aa91906110e6565b6040518263ffffffff1660e01b81526004016109c69190611136565b602060405180830381865afa1580156109e1573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610a059190610eb4565b610a0f919061114f565b816101400181815250508573ffffffffffffffffffffffffffffffffffffffff166307a2d13a8260200151600a610a46919061109c565b6064610a5291906110e6565b6040518263ffffffff1660e01b8152600401610a6e9190611136565b602060405180830381865afa158015610a89573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610aad9190610eb4565b8161016001818152505080888881518110610acb57610aca610dc1565b5b60200260200101819052505050505050505b80600101905061008e565b505f81604051602001610afb919061134c565b60405160208183030381529060405290506020810180590381f35b5f5f8273ffffffffffffffffffffffffffffffffffffffff163b149050919050565b6040518061018001604052805f73ffffffffffffffffffffffffffffffffffffffff1681526020015f60ff1681526020015f73ffffffffffffffffffffffffffffffffffffffff1681526020015f60ff1681526020015f81526020015f81526020015f81526020015f81526020015f81526020015f81526020015f81526020015f81525090565b5f604051905090565b5f5ffd5b5f5ffd5b5f5ffd5b5f601f19601f8301169050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b610c1a82610bd4565b810181811067ffffffffffffffff82111715610c3957610c38610be4565b5b80604052505050565b5f610c4b610bbf565b9050610c578282610c11565b919050565b5f67ffffffffffffffff821115610c7657610c75610be4565b5b602082029050602081019050919050565b5f5ffd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f610cb482610c8b565b9050919050565b610cc481610caa565b8114610cce575f5ffd5b50565b5f81519050610cdf81610cbb565b92915050565b5f610cf7610cf284610c5c565b610c42565b90508083825260208201905060208402830185811115610d1a57610d19610c87565b5b835b81811015610d435780610d2f8882610cd1565b845260208401935050602081019050610d1c565b5050509392505050565b5f82601f830112610d6157610d60610bd0565b5b8151610d71848260208601610ce5565b91505092915050565b5f60208284031215610d8f57610d8e610bc8565b5b5f82015167ffffffffffffffff811115610dac57610dab610bcc565b5b610db884828501610d4d565b91505092915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b5f60208284031215610e0357610e02610bc8565b5b5f610e1084828501610cd1565b91505092915050565b5f81519050919050565b5f81905092915050565b8281835e5f83830152505050565b5f610e4582610e19565b610e4f8185610e23565b9350610e5f818560208601610e2d565b80840191505092915050565b5f610e768284610e3b565b915081905092915050565b5f819050919050565b610e9381610e81565b8114610e9d575f5ffd5b50565b5f81519050610eae81610e8a565b92915050565b5f60208284031215610ec957610ec8610bc8565b5b5f610ed684828501610ea0565b91505092915050565b5f60ff82169050919050565b610ef481610edf565b8114610efe575f5ffd5b50565b5f81519050610f0f81610eeb565b92915050565b5f60208284031215610f2a57610f29610bc8565b5b5f610f3784828501610f01565b91505092915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f8160011c9050919050565b5f5f8291508390505b6001851115610fc257808604811115610f9e57610f9d610f40565b5b6001851615610fad5780820291505b8081029050610fbb85610f6d565b9450610f82565b94509492505050565b5f82610fda5760019050611095565b81610fe7575f9050611095565b8160018114610ffd576002811461100757611036565b6001915050611095565b60ff84111561101957611018610f40565b5b8360020a9150848211156110305761102f610f40565b5b50611095565b5060208310610133831016604e8410600b841016171561106b5782820a90508381111561106657611065610f40565b5b611095565b6110788484846001610f79565b9250905081840481111561108f5761108e610f40565b5b81810290505b9392505050565b5f6110a682610e81565b91506110b183610edf565b92506110de7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8484610fcb565b905092915050565b5f6110f082610e81565b91506110fb83610e81565b925082820261110981610e81565b915082820484148315176111205761111f610f40565b5b5092915050565b61113081610e81565b82525050565b5f6020820190506111495f830184611127565b92915050565b5f61115982610e81565b915061116483610e81565b925082820390508181111561117c5761117b610f40565b5b92915050565b5f81519050919050565b5f82825260208201905092915050565b5f819050602082019050919050565b6111b481610caa565b82525050565b6111c381610edf565b82525050565b6111d281610e81565b82525050565b61018082015f8201516111ed5f8501826111ab565b50602082015161120060208501826111ba565b50604082015161121360408501826111ab565b50606082015161122660608501826111ba565b50608082015161123960808501826111c9565b5060a082015161124c60a08501826111c9565b5060c082015161125f60c08501826111c9565b5060e082015161127260e08501826111c9565b506101008201516112876101008501826111c9565b5061012082015161129c6101208501826111c9565b506101408201516112b16101408501826111c9565b506101608201516112c66101608501826111c9565b50505050565b5f6112d783836111d8565b6101808301905092915050565b5f602082019050919050565b5f6112fa82611182565b611304818561118c565b935061130f8361119c565b805f5b8381101561133f57815161132688826112cc565b9750611331836112e4565b925050600181019050611312565b5085935050505092915050565b5f6020820190508181035f83015261136481846112f0565b90509291505056fe","sourceMap":"843:4790:25:-:0;;;1313:4196;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;1360:31;1410:6;:13;1394:30;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;1360:64;;1440:9;1452:1;1440:13;;1435:3533;1459:6;:13;1455:1;:17;1435:3533;;;1493:20;1516:6;1523:1;1516:9;;;;;;;;:::i;:::-;;;;;;;;1493:32;;1544:28;1559:12;1544:14;;;:28;;:::i;:::-;1540:42;;;1574:8;;;1540:42;1597:18;1632:12;1618:33;;;:35;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;1597:56;;1742:26;1757:10;1742:14;;;:26;;:::i;:::-;1738:40;;;1770:8;;;;1738:40;1810:30;1858:35;1910:10;:15;;1931:5;1959:37;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1910:104;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1792:222;;;;2051:25;2050:26;:81;;;;2129:2;2096:22;:29;:35;2050:81;2029:158;;;2164:8;;;;;;2029:158;2201:26;2258:22;2230:91;;;;;;;;;;;;:::i;:::-;2201:120;;2361:1;2339:18;:23;:51;;;;2387:3;2366:18;:24;2339:51;2335:98;;;2410:8;;;;;;;2335:98;2447:26;;:::i;:::-;2537:12;2514:9;:20;;:35;;;;;;;;;;;2586:10;2563:9;:20;;:33;;;;;;;;;;;2696:12;2682:53;;;:55;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;2651:9;:28;;:86;;;;;;;;;;;2828:18;2791:9;:28;;:56;;;;;;;;;;;2940:12;2926:56;;;:58;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;2896:9;:27;;:88;;;;;3042:12;3028:56;;;:58;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;2998:9;:27;;:88;;;;;3386:12;3372:42;;;3448:9;:28;;;3442:2;:34;;;;:::i;:::-;3436:3;:40;;;;:::i;:::-;3372:122;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;3244:12;3230:43;;;3307:9;:28;;;3301:2;:34;;;;:::i;:::-;3295:3;:40;;;;:::i;:::-;3230:123;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;:264;;;;:::i;:::-;3185:9;:26;;:309;;;;;3764:12;3750:42;;;3826:9;:28;;;3820:2;:34;;;;:::i;:::-;3814:3;:40;;;;:::i;:::-;3750:122;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;3622:12;3608:43;;;3685:9;:28;;;3679:2;:34;;;;:::i;:::-;3673:3;:40;;;;:::i;:::-;3608:123;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;:264;;;;:::i;:::-;3563:9;:26;;:309;;;;;3926:12;3912:60;;;3985:9;:28;;;3979:2;:34;;;;:::i;:::-;3973:3;:40;;;;:::i;:::-;3912:102;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;3887:9;:22;;:127;;;;;4286:12;4272:41;;;4347:9;:28;;;4341:2;:34;;;;:::i;:::-;4335:3;:40;;;;:::i;:::-;4272:121;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;4144:12;4130:43;;;4207:9;:28;;;4201:2;:34;;;;:::i;:::-;4195:3;:40;;;;:::i;:::-;4130:123;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;:263;;;;:::i;:::-;4084:9;:27;;:309;;;;;4665:12;4651:41;;;4726:9;:28;;;4720:2;:34;;;;:::i;:::-;4714:3;:40;;;;:::i;:::-;4651:121;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;4523:12;4509:43;;;4586:9;:28;;;4580:2;:34;;;;:::i;:::-;4574:3;:40;;;;:::i;:::-;4509:123;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;:263;;;;:::i;:::-;4463:9;:27;;:309;;;;;4827:12;4813:60;;;4886:9;:28;;;4880:2;:34;;;;:::i;:::-;4874:3;:40;;;;:::i;:::-;4813:102;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;4787:9;:23;;:128;;;;;4948:9;4930:12;4943:1;4930:15;;;;;;;;:::i;:::-;;;;;;;:27;;;;1479:3489;;;;;;1435:3533;1474:3;;;;;1435:3533;;;;5170:28;5212:12;5201:24;;;;;;;;:::i;:::-;;;;;;;;;;;;;5170:55;;5433:4;5416:15;5412:26;5482:9;5473:7;5469:23;5458:9;5451:42;5515:116;5578:4;5623:1;5601:6;:18;;;:23;5594:30;;5515:116;;;:::o;843:4790::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;7:75:41:-;40:6;73:2;67:9;57:19;;7:75;:::o;88:117::-;197:1;194;187:12;211:117;320:1;317;310:12;334:117;443:1;440;433:12;457:102;498:6;549:2;545:7;540:2;533:5;529:14;525:28;515:38;;457:102;;;:::o;565:180::-;613:77;610:1;603:88;710:4;707:1;700:15;734:4;731:1;724:15;751:281;834:27;856:4;834:27;:::i;:::-;826:6;822:40;964:6;952:10;949:22;928:18;916:10;913:34;910:62;907:88;;;975:18;;:::i;:::-;907:88;1015:10;1011:2;1004:22;794:238;751:281;;:::o;1038:129::-;1072:6;1099:20;;:::i;:::-;1089:30;;1128:33;1156:4;1148:6;1128:33;:::i;:::-;1038:129;;;:::o;1173:311::-;1250:4;1340:18;1332:6;1329:30;1326:56;;;1362:18;;:::i;:::-;1326:56;1412:4;1404:6;1400:17;1392:25;;1472:4;1466;1462:15;1454:23;;1173:311;;;:::o;1490:117::-;1599:1;1596;1589:12;1613:126;1650:7;1690:42;1683:5;1679:54;1668:65;;1613:126;;;:::o;1745:96::-;1782:7;1811:24;1829:5;1811:24;:::i;:::-;1800:35;;1745:96;;;:::o;1847:122::-;1920:24;1938:5;1920:24;:::i;:::-;1913:5;1910:35;1900:63;;1959:1;1956;1949:12;1900:63;1847:122;:::o;1975:143::-;2032:5;2063:6;2057:13;2048:22;;2079:33;2106:5;2079:33;:::i;:::-;1975:143;;;;:::o;2141:732::-;2248:5;2273:81;2289:64;2346:6;2289:64;:::i;:::-;2273:81;:::i;:::-;2264:90;;2374:5;2403:6;2396:5;2389:21;2437:4;2430:5;2426:16;2419:23;;2490:4;2482:6;2478:17;2470:6;2466:30;2519:3;2511:6;2508:15;2505:122;;;2538:79;;:::i;:::-;2505:122;2653:6;2636:231;2670:6;2665:3;2662:15;2636:231;;;2745:3;2774:48;2818:3;2806:10;2774:48;:::i;:::-;2769:3;2762:61;2852:4;2847:3;2843:14;2836:21;;2712:155;2696:4;2691:3;2687:14;2680:21;;2636:231;;;2640:21;2254:619;;2141:732;;;;;:::o;2896:385::-;2978:5;3027:3;3020:4;3012:6;3008:17;3004:27;2994:122;;3035:79;;:::i;:::-;2994:122;3145:6;3139:13;3170:105;3271:3;3263:6;3256:4;3248:6;3244:17;3170:105;:::i;:::-;3161:114;;2984:297;2896:385;;;;:::o;3287:554::-;3382:6;3431:2;3419:9;3410:7;3406:23;3402:32;3399:119;;;3437:79;;:::i;:::-;3399:119;3578:1;3567:9;3563:17;3557:24;3608:18;3600:6;3597:30;3594:117;;;3630:79;;:::i;:::-;3594:117;3735:89;3816:7;3807:6;3796:9;3792:22;3735:89;:::i;:::-;3725:99;;3528:306;3287:554;;;;:::o;3847:180::-;3895:77;3892:1;3885:88;3992:4;3989:1;3982:15;4016:4;4013:1;4006:15;4033:351;4103:6;4152:2;4140:9;4131:7;4127:23;4123:32;4120:119;;;4158:79;;:::i;:::-;4120:119;4278:1;4303:64;4359:7;4350:6;4339:9;4335:22;4303:64;:::i;:::-;4293:74;;4249:128;4033:351;;;;:::o;4390:98::-;4441:6;4475:5;4469:12;4459:22;;4390:98;;;:::o;4494:147::-;4595:11;4632:3;4617:18;;4494:147;;;;:::o;4647:139::-;4736:6;4731:3;4726;4720:23;4777:1;4768:6;4763:3;4759:16;4752:27;4647:139;;;:::o;4792:386::-;4896:3;4924:38;4956:5;4924:38;:::i;:::-;4978:88;5059:6;5054:3;4978:88;:::i;:::-;4971:95;;5075:65;5133:6;5128:3;5121:4;5114:5;5110:16;5075:65;:::i;:::-;5165:6;5160:3;5156:16;5149:23;;4900:278;4792:386;;;;:::o;5184:271::-;5314:3;5336:93;5425:3;5416:6;5336:93;:::i;:::-;5329:100;;5446:3;5439:10;;5184:271;;;;:::o;5461:77::-;5498:7;5527:5;5516:16;;5461:77;;;:::o;5544:122::-;5617:24;5635:5;5617:24;:::i;:::-;5610:5;5607:35;5597:63;;5656:1;5653;5646:12;5597:63;5544:122;:::o;5672:143::-;5729:5;5760:6;5754:13;5745:22;;5776:33;5803:5;5776:33;:::i;:::-;5672:143;;;;:::o;5821:351::-;5891:6;5940:2;5928:9;5919:7;5915:23;5911:32;5908:119;;;5946:79;;:::i;:::-;5908:119;6066:1;6091:64;6147:7;6138:6;6127:9;6123:22;6091:64;:::i;:::-;6081:74;;6037:128;5821:351;;;;:::o;6178:86::-;6213:7;6253:4;6246:5;6242:16;6231:27;;6178:86;;;:::o;6270:118::-;6341:22;6357:5;6341:22;:::i;:::-;6334:5;6331:33;6321:61;;6378:1;6375;6368:12;6321:61;6270:118;:::o;6394:139::-;6449:5;6480:6;6474:13;6465:22;;6496:31;6521:5;6496:31;:::i;:::-;6394:139;;;;:::o;6539:347::-;6607:6;6656:2;6644:9;6635:7;6631:23;6627:32;6624:119;;;6662:79;;:::i;:::-;6624:119;6782:1;6807:62;6861:7;6852:6;6841:9;6837:22;6807:62;:::i;:::-;6797:72;;6753:126;6539:347;;;;:::o;6892:180::-;6940:77;6937:1;6930:88;7037:4;7034:1;7027:15;7061:4;7058:1;7051:15;7078:102;7120:8;7167:5;7164:1;7160:13;7139:34;;7078:102;;;:::o;7186:848::-;7247:5;7254:4;7278:6;7269:15;;7302:5;7293:14;;7316:712;7337:1;7327:8;7324:15;7316:712;;;7432:4;7427:3;7423:14;7417:4;7414:24;7411:50;;;7441:18;;:::i;:::-;7411:50;7491:1;7481:8;7477:16;7474:451;;;7906:4;7899:5;7895:16;7886:25;;7474:451;7956:4;7950;7946:15;7938:23;;7986:32;8009:8;7986:32;:::i;:::-;7974:44;;7316:712;;;7186:848;;;;;;;:::o;8040:1073::-;8094:5;8285:8;8275:40;;8306:1;8297:10;;8308:5;;8275:40;8334:4;8324:36;;8351:1;8342:10;;8353:5;;8324:36;8420:4;8468:1;8463:27;;;;8504:1;8499:191;;;;8413:277;;8463:27;8481:1;8472:10;;8483:5;;;8499:191;8544:3;8534:8;8531:17;8528:43;;;8551:18;;:::i;:::-;8528:43;8600:8;8597:1;8593:16;8584:25;;8635:3;8628:5;8625:14;8622:40;;;8642:18;;:::i;:::-;8622:40;8675:5;;;8413:277;;8799:2;8789:8;8786:16;8780:3;8774:4;8771:13;8767:36;8749:2;8739:8;8736:16;8731:2;8725:4;8722:12;8718:35;8702:111;8699:246;;;8855:8;8849:4;8845:19;8836:28;;8890:3;8883:5;8880:14;8877:40;;;8897:18;;:::i;:::-;8877:40;8930:5;;8699:246;8970:42;9008:3;8998:8;8992:4;8989:1;8970:42;:::i;:::-;8955:57;;;;9044:4;9039:3;9035:14;9028:5;9025:25;9022:51;;;9053:18;;:::i;:::-;9022:51;9102:4;9095:5;9091:16;9082:25;;8040:1073;;;;;;:::o;9119:281::-;9177:5;9201:23;9219:4;9201:23;:::i;:::-;9193:31;;9245:25;9261:8;9245:25;:::i;:::-;9233:37;;9289:104;9326:66;9316:8;9310:4;9289:104;:::i;:::-;9280:113;;9119:281;;;;:::o;9406:410::-;9446:7;9469:20;9487:1;9469:20;:::i;:::-;9464:25;;9503:20;9521:1;9503:20;:::i;:::-;9498:25;;9558:1;9555;9551:9;9580:30;9598:11;9580:30;:::i;:::-;9569:41;;9759:1;9750:7;9746:15;9743:1;9740:22;9720:1;9713:9;9693:83;9670:139;;9789:18;;:::i;:::-;9670:139;9454:362;9406:410;;;;:::o;9822:118::-;9909:24;9927:5;9909:24;:::i;:::-;9904:3;9897:37;9822:118;;:::o;9946:222::-;10039:4;10077:2;10066:9;10062:18;10054:26;;10090:71;10158:1;10147:9;10143:17;10134:6;10090:71;:::i;:::-;9946:222;;;;:::o;10174:194::-;10214:4;10234:20;10252:1;10234:20;:::i;:::-;10229:25;;10268:20;10286:1;10268:20;:::i;:::-;10263:25;;10312:1;10309;10305:9;10297:17;;10336:1;10330:4;10327:11;10324:37;;;10341:18;;:::i;:::-;10324:37;10174:194;;;;:::o;10374:142::-;10469:6;10503:5;10497:12;10487:22;;10374:142;;;:::o;10522:212::-;10649:11;10683:6;10678:3;10671:19;10723:4;10718:3;10714:14;10699:29;;10522:212;;;;:::o;10740:160::-;10835:4;10858:3;10850:11;;10888:4;10883:3;10879:14;10871:22;;10740:160;;;:::o;10906:108::-;10983:24;11001:5;10983:24;:::i;:::-;10978:3;10971:37;10906:108;;:::o;11020:102::-;11093:22;11109:5;11093:22;:::i;:::-;11088:3;11081:35;11020:102;;:::o;11128:108::-;11205:24;11223:5;11205:24;:::i;:::-;11200:3;11193:37;11128:108;;:::o;11350:2386::-;11493:6;11488:3;11484:16;11588:4;11581:5;11577:16;11571:23;11607:63;11664:4;11659:3;11655:14;11641:12;11607:63;:::i;:::-;11510:170;11776:4;11769:5;11765:16;11759:23;11795:59;11848:4;11843:3;11839:14;11825:12;11795:59;:::i;:::-;11690:174;11952:4;11945:5;11941:16;11935:23;11971:63;12028:4;12023:3;12019:14;12005:12;11971:63;:::i;:::-;11874:170;12140:4;12133:5;12129:16;12123:23;12159:59;12212:4;12207:3;12203:14;12189:12;12159:59;:::i;:::-;12054:174;12323:4;12316:5;12312:16;12306:23;12342:63;12399:4;12394:3;12390:14;12376:12;12342:63;:::i;:::-;12238:177;12510:4;12503:5;12499:16;12493:23;12529:63;12586:4;12581:3;12577:14;12563:12;12529:63;:::i;:::-;12425:177;12696:4;12689:5;12685:16;12679:23;12715:63;12772:4;12767:3;12763:14;12749:12;12715:63;:::i;:::-;12612:176;12882:4;12875:5;12871:16;12865:23;12901:63;12958:4;12953:3;12949:14;12935:12;12901:63;:::i;:::-;12798:176;13064:6;13057:5;13053:18;13047:25;13085:65;13142:6;13137:3;13133:16;13119:12;13085:65;:::i;:::-;12984:176;13255:6;13248:5;13244:18;13238:25;13276:65;13333:6;13328:3;13324:16;13310:12;13276:65;:::i;:::-;13170:181;13446:6;13439:5;13435:18;13429:25;13467:65;13524:6;13519:3;13515:16;13501:12;13467:65;:::i;:::-;13361:181;13633:6;13626:5;13622:18;13616:25;13654:65;13711:6;13706:3;13702:16;13688:12;13654:65;:::i;:::-;13552:177;11462:2274;11350:2386;;:::o;13742:293::-;13867:10;13888:102;13986:3;13978:6;13888:102;:::i;:::-;14022:6;14017:3;14013:16;13999:30;;13742:293;;;;:::o;14041:141::-;14139:4;14171;14166:3;14162:14;14154:22;;14041:141;;;:::o;14300:956::-;14475:3;14504:82;14580:5;14504:82;:::i;:::-;14602:114;14709:6;14704:3;14602:114;:::i;:::-;14595:121;;14740:84;14818:5;14740:84;:::i;:::-;14847:7;14878:1;14863:368;14888:6;14885:1;14882:13;14863:368;;;14964:6;14958:13;14991:119;15106:3;15091:13;14991:119;:::i;:::-;14984:126;;15133:88;15214:6;15133:88;:::i;:::-;15123:98;;14923:308;14910:1;14907;14903:9;14898:14;;14863:368;;;14867:14;15247:3;15240:10;;14480:776;;;14300:956;;;;:::o;15262:485::-;15461:4;15499:2;15488:9;15484:18;15476:26;;15548:9;15542:4;15538:20;15534:1;15523:9;15519:17;15512:47;15576:164;15735:4;15726:6;15576:164;:::i;:::-;15568:172;;15262:485;;;;:::o","linkReferences":{}},"deployedBytecode":{"object":"0x60806040525f5ffdfea164736f6c634300081c000a","sourceMap":"843:4790:25:-:0;;;;;","linkReferences":{}},"methodIdentifiers":{},"rawMetadata":"{\"compiler\":{\"version\":\"0.8.28+commit.7893614a\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"vaults\",\"type\":\"address[]\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"}],\"devdoc\":{\"details\":\"This contract is not meant to be deployed. Instead, use a static call with the deployment bytecode as payload.\",\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/ERC4626/GetERC4626VaultDataBatchRequest.sol\":\"GetERC4626VaultDataBatchRequest\"},\"evmVersion\":\"cancun\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"none\"},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[\":forge-std/=lib/forge-std/src/\"]},\"sources\":{\"src/ERC4626/GetERC4626VaultDataBatchRequest.sol\":{\"keccak256\":\"0xb2fe86a5bf7fd8d2b4fc00233e05233fc326c1ff2cb3fa99ba835244d514abd7\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://f5b3b15b490d325b730f9d8b7dcbec77a7ee58430abfb7f8e830b7c53f3a6ed0\",\"dweb:/ipfs/QmaP3ZqjZymnv7tbVk5Q1Bgamfk9CGB3dboRTfGidV1Qck\"]}},\"version\":1}","metadata":{"compiler":{"version":"0.8.28+commit.7893614a"},"language":"Solidity","output":{"abi":[{"inputs":[{"internalType":"address[]","name":"vaults","type":"address[]"}],"stateMutability":"nonpayable","type":"constructor"}],"devdoc":{"kind":"dev","methods":{},"version":1},"userdoc":{"kind":"user","methods":{},"version":1}},"settings":{"remappings":["forge-std/=lib/forge-std/src/"],"optimizer":{"enabled":false,"runs":200},"metadata":{"bytecodeHash":"none"},"compilationTarget":{"src/ERC4626/GetERC4626VaultDataBatchRequest.sol":"GetERC4626VaultDataBatchRequest"},"evmVersion":"cancun","libraries":{}},"sources":{"src/ERC4626/GetERC4626VaultDataBatchRequest.sol":{"keccak256":"0xb2fe86a5bf7fd8d2b4fc00233e05233fc326c1ff2cb3fa99ba835244d514abd7","urls":["bzz-raw://f5b3b15b490d325b730f9d8b7dcbec77a7ee58430abfb7f8e830b7c53f3a6ed0","dweb:/ipfs/QmaP3ZqjZymnv7tbVk5Q1Bgamfk9CGB3dboRTfGidV1Qck"],"license":"MIT"}},"version":1},"id":25}
================================================
FILE: src/amms/abi/GetTokenDecimalsBatchRequest.json
================================================
{"abi":[{"type":"constructor","inputs":[{"name":"tokens","type":"address[]","internalType":"address[]"}],"stateMutability":"nonpayable"}],"bytecode":{"object":"0x608060405234801561000f575f5ffd5b5060405161068138038061068183398181016040528101906100319190610463565b5f815167ffffffffffffffff81111561004d5761004c6102cd565b5b60405190808252806020026020018201604052801561007b5781602001602082028036833780820191505090505b5090505f5f90505b8251811015610249575f8382815181106100a05761009f6104aa565b5b602002602001015190506100b98161027760201b60201c565b156100c4575061023e565b5f5f8273ffffffffffffffffffffffffffffffffffffffff16614e206040516024016040516020818303038152906040527f313ce567000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506040516101709190610529565b5f604051808303815f8787f1925050503d805f81146101aa576040519150601f19603f3d011682016040523d82523d5f602084013e6101af565b606091505b50915091508115610232575f602082510361022357818060200190518101906101d89190610572565b90505f8114806101e8575060ff81115b156101f6575050505061023e565b8086868151811061020a576102096104aa565b5b602002602001019060ff16908160ff168152505061022c565b5050505061023e565b5061023a565b50505061023e565b5050505b806001019050610083565b505f8160405160200161025c9190610660565b60405160208183030381529060405290506020810180590381f35b5f5f8273ffffffffffffffffffffffffffffffffffffffff163b0361029f57600190506102a3565b5f90505b919050565b5f604051905090565b5f5ffd5b5f5ffd5b5f5ffd5b5f601f19601f8301169050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b610303826102bd565b810181811067ffffffffffffffff82111715610322576103216102cd565b5b80604052505050565b5f6103346102a8565b905061034082826102fa565b919050565b5f67ffffffffffffffff82111561035f5761035e6102cd565b5b602082029050602081019050919050565b5f5ffd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f61039d82610374565b9050919050565b6103ad81610393565b81146103b7575f5ffd5b50565b5f815190506103c8816103a4565b92915050565b5f6103e06103db84610345565b61032b565b9050808382526020820190506020840283018581111561040357610402610370565b5b835b8181101561042c578061041888826103ba565b845260208401935050602081019050610405565b5050509392505050565b5f82601f83011261044a576104496102b9565b5b815161045a8482602086016103ce565b91505092915050565b5f60208284031215610478576104776102b1565b5b5f82015167ffffffffffffffff811115610495576104946102b5565b5b6104a184828501610436565b91505092915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b5f81519050919050565b5f81905092915050565b8281835e5f83830152505050565b5f610503826104d7565b61050d81856104e1565b935061051d8185602086016104eb565b80840191505092915050565b5f61053482846104f9565b915081905092915050565b5f819050919050565b6105518161053f565b811461055b575f5ffd5b50565b5f8151905061056c81610548565b92915050565b5f60208284031215610587576105866102b1565b5b5f6105948482850161055e565b91505092915050565b5f81519050919050565b5f82825260208201905092915050565b5f819050602082019050919050565b5f60ff82169050919050565b6105db816105c6565b82525050565b5f6105ec83836105d2565b60208301905092915050565b5f602082019050919050565b5f61060e8261059d565b61061881856105a7565b9350610623836105b7565b805f5b8381101561065357815161063a88826105e1565b9750610645836105f8565b925050600181019050610626565b5085935050505092915050565b5f6020820190508181035f8301526106788184610604565b90509291505056fe","sourceMap":"56:1363:24:-:0;;;100:1317;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;147:23;185:6;:13;173:26;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;147:52;;215:9;227:1;215:13;;210:863;234:6;:13;230:1;:17;210:863;;;268:13;284:6;291:1;284:9;;;;;;;;:::i;:::-;;;;;;;;268:25;;312:21;327:5;312:14;;;:21;;:::i;:::-;308:35;;;335:8;;;308:35;359:25;386:30;420:5;:27;;453:5;460:37;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;420:78;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;358:140;;;;517:20;513:550;;;557:21;629:2;601:17;:24;:30;597:405;;684:17;673:40;;;;;;;;;;;;:::i;:::-;655:58;;757:1;740:13;:18;:41;;;;778:3;762:13;:19;740:41;736:193;;;809:8;;;;;;736:193;892:13;872:8;881:1;872:11;;;;;;;;:::i;:::-;;;;;;;:34;;;;;;;;;;;597:405;;;975:8;;;;;;597:405;539:477;513:550;;;1040:8;;;;;513:550;254:819;;;210:863;249:3;;;;;210:863;;;;1083:28;1125:8;1114:20;;;;;;;;:::i;:::-;;;;;;;;;;;;;1083:51;;1341:4;1324:15;1320:26;1390:9;1381:7;1377:23;1366:9;1359:42;1421:160;1475:4;1513:1;1491:6;:18;;;:23;1487:92;;1533:4;1526:11;;;;1487:92;1567:5;1560:12;;1421:160;;;;:::o;7:75:41:-;40:6;73:2;67:9;57:19;;7:75;:::o;88:117::-;197:1;194;187:12;211:117;320:1;317;310:12;334:117;443:1;440;433:12;457:102;498:6;549:2;545:7;540:2;533:5;529:14;525:28;515:38;;457:102;;;:::o;565:180::-;613:77;610:1;603:88;710:4;707:1;700:15;734:4;731:1;724:15;751:281;834:27;856:4;834:27;:::i;:::-;826:6;822:40;964:6;952:10;949:22;928:18;916:10;913:34;910:62;907:88;;;975:18;;:::i;:::-;907:88;1015:10;1011:2;1004:22;794:238;751:281;;:::o;1038:129::-;1072:6;1099:20;;:::i;:::-;1089:30;;1128:33;1156:4;1148:6;1128:33;:::i;:::-;1038:129;;;:::o;1173:311::-;1250:4;1340:18;1332:6;1329:30;1326:56;;;1362:18;;:::i;:::-;1326:56;1412:4;1404:6;1400:17;1392:25;;1472:4;1466;1462:15;1454:23;;1173:311;;;:::o;1490:117::-;1599:1;1596;1589:12;1613:126;1650:7;1690:42;1683:5;1679:54;1668:65;;1613:126;;;:::o;1745:96::-;1782:7;1811:24;1829:5;1811:24;:::i;:::-;1800:35;;1745:96;;;:::o;1847:122::-;1920:24;1938:5;1920:24;:::i;:::-;1913:5;1910:35;1900:63;;1959:1;1956;1949:12;1900:63;1847:122;:::o;1975:143::-;2032:5;2063:6;2057:13;2048:22;;2079:33;2106:5;2079:33;:::i;:::-;1975:143;;;;:::o;2141:732::-;2248:5;2273:81;2289:64;2346:6;2289:64;:::i;:::-;2273:81;:::i;:::-;2264:90;;2374:5;2403:6;2396:5;2389:21;2437:4;2430:5;2426:16;2419:23;;2490:4;2482:6;2478:17;2470:6;2466:30;2519:3;2511:6;2508:15;2505:122;;;2538:79;;:::i;:::-;2505:122;2653:6;2636:231;2670:6;2665:3;2662:15;2636:231;;;2745:3;2774:48;2818:3;2806:10;2774:48;:::i;:::-;2769:3;2762:61;2852:4;2847:3;2843:14;2836:21;;2712:155;2696:4;2691:3;2687:14;2680:21;;2636:231;;;2640:21;2254:619;;2141:732;;;;;:::o;2896:385::-;2978:5;3027:3;3020:4;3012:6;3008:17;3004:27;2994:122;;3035:79;;:::i;:::-;2994:122;3145:6;3139:13;3170:105;3271:3;3263:6;3256:4;3248:6;3244:17;3170:105;:::i;:::-;3161:114;;2984:297;2896:385;;;;:::o;3287:554::-;3382:6;3431:2;3419:9;3410:7;3406:23;3402:32;3399:119;;;3437:79;;:::i;:::-;3399:119;3578:1;3567:9;3563:17;3557:24;3608:18;3600:6;3597:30;3594:117;;;3630:79;;:::i;:::-;3594:117;3735:89;3816:7;3807:6;3796:9;3792:22;3735:89;:::i;:::-;3725:99;;3528:306;3287:554;;;;:::o;3847:180::-;3895:77;3892:1;3885:88;3992:4;3989:1;3982:15;4016:4;4013:1;4006:15;4033:98;4084:6;4118:5;4112:12;4102:22;;4033:98;;;:::o;4137:147::-;4238:11;4275:3;4260:18;;4137:147;;;;:::o;4290:139::-;4379:6;4374:3;4369;4363:23;4420:1;4411:6;4406:3;4402:16;4395:27;4290:139;;;:::o;4435:386::-;4539:3;4567:38;4599:5;4567:38;:::i;:::-;4621:88;4702:6;4697:3;4621:88;:::i;:::-;4614:95;;4718:65;4776:6;4771:3;4764:4;4757:5;4753:16;4718:65;:::i;:::-;4808:6;4803:3;4799:16;4792:23;;4543:278;4435:386;;;;:::o;4827:271::-;4957:3;4979:93;5068:3;5059:6;4979:93;:::i;:::-;4972:100;;5089:3;5082:10;;4827:271;;;;:::o;5104:77::-;5141:7;5170:5;5159:16;;5104:77;;;:::o;5187:122::-;5260:24;5278:5;5260:24;:::i;:::-;5253:5;5250:35;5240:63;;5299:1;5296;5289:12;5240:63;5187:122;:::o;5315:143::-;5372:5;5403:6;5397:13;5388:22;;5419:33;5446:5;5419:33;:::i;:::-;5315:143;;;;:::o;5464:351::-;5534:6;5583:2;5571:9;5562:7;5558:23;5554:32;5551:119;;;5589:79;;:::i;:::-;5551:119;5709:1;5734:64;5790:7;5781:6;5770:9;5766:22;5734:64;:::i;:::-;5724:74;;5680:128;5464:351;;;;:::o;5821:112::-;5886:6;5920:5;5914:12;5904:22;;5821:112;;;:::o;5939:182::-;6036:11;6070:6;6065:3;6058:19;6110:4;6105:3;6101:14;6086:29;;5939:182;;;;:::o;6127:130::-;6192:4;6215:3;6207:11;;6245:4;6240:3;6236:14;6228:22;;6127:130;;;:::o;6263:86::-;6298:7;6338:4;6331:5;6327:16;6316:27;;6263:86;;;:::o;6355:102::-;6428:22;6444:5;6428:22;:::i;:::-;6423:3;6416:35;6355:102;;:::o;6463:171::-;6528:10;6549:42;6587:3;6579:6;6549:42;:::i;:::-;6623:4;6618:3;6614:14;6600:28;;6463:171;;;;:::o;6640:111::-;6708:4;6740;6735:3;6731:14;6723:22;;6640:111;;;:::o;6783:716::-;6898:3;6927:52;6973:5;6927:52;:::i;:::-;6995:84;7072:6;7067:3;6995:84;:::i;:::-;6988:91;;7103:54;7151:5;7103:54;:::i;:::-;7180:7;7211:1;7196:278;7221:6;7218:1;7215:13;7196:278;;;7297:6;7291:13;7324:59;7379:3;7364:13;7324:59;:::i;:::-;7317:66;;7406:58;7457:6;7406:58;:::i;:::-;7396:68;;7256:218;7243:1;7240;7236:9;7231:14;;7196:278;;;7200:14;7490:3;7483:10;;6903:596;;;6783:716;;;;:::o;7505:365::-;7644:4;7682:2;7671:9;7667:18;7659:26;;7731:9;7725:4;7721:20;7717:1;7706:9;7702:17;7695:47;7759:104;7858:4;7849:6;7759:104;:::i;:::-;7751:112;;7505:365;;;;:::o","linkReferences":{}},"deployedBytecode":{"object":"0x60806040525f5ffdfea164736f6c634300081c000a","sourceMap":"56:1363:24:-:0;;;;;","linkReferences":{}},"methodIdentifiers":{},"rawMetadata":"{\"compiler\":{\"version\":\"0.8.28+commit.7893614a\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"tokens\",\"type\":\"address[]\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/ERC20/GetTokenDecimalsBatchRequest.sol\":\"GetTokenDecimalsBatchRequest\"},\"evmVersion\":\"cancun\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"none\"},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[\":forge-std/=lib/forge-std/src/\"]},\"sources\":{\"src/ERC20/GetTokenDecimalsBatchRequest.sol\":{\"keccak256\":\"0xc7540761024525cf0d1371c70d9890b2beb0d8e5c996a238139e61541fc36ec5\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://fa59b893b03692814beb0d442247b028099e8a8582e5b3757bf3e5dd8231ae98\",\"dweb:/ipfs/QmUXeRAb4EAsaLRXCx7rHaJmyDA9dPnKoJbPoBoTWZfTZr\"]}},\"version\":1}","metadata":{"compiler":{"version":"0.8.28+commit.7893614a"},"language":"Solidity","output":{"abi":[{"inputs":[{"internalType":"address[]","name":"tokens","type":"address[]"}],"stateMutability":"nonpayable","type":"constructor"}],"devdoc":{"kind":"dev","methods":{},"version":1},"userdoc":{"kind":"user","methods":{},"version":1}},"settings":{"remappings":["forge-std/=lib/forge-std/src/"],"optimizer":{"enabled":false,"runs":200},"metadata":{"bytecodeHash":"none"},"compilationTarget":{"src/ERC20/GetTokenDecimalsBatchRequest.sol":"GetTokenDecimalsBatchRequest"},"evmVersion":"cancun","libraries":{}},"sources":{"src/ERC20/GetTokenDecimalsBatchRequest.sol":{"keccak256":"0xc7540761024525cf0d1371c70d9890b2beb0d8e5c996a238139e61541fc36ec5","urls":["bzz-raw://fa59b893b03692814beb0d442247b028099e8a8582e5b3757bf3e5dd8231ae98","dweb:/ipfs/QmUXeRAb4EAsaLRXCx7rHaJmyDA9dPnKoJbPoBoTWZfTZr"],"license":"MIT"}},"version":1},"id":24}
================================================
FILE: src/amms/abi/GetUniswapV2PairsBatchRequest.json
================================================
{"abi":[{"type":"constructor","inputs":[{"name":"from","type":"uint256","internalType":"uint256"},{"name":"step","type":"uint256","internalType":"uint256"},{"name":"factory","type":"address","internalType":"address"}],"stateMutability":"nonpayable"}],"bytecode":{"object":"0x608060405234801561000f575f5ffd5b50604051610550380380610550833981810160405281019061003191906102bd565b5f8173ffffffffffffffffffffffffffffffffffffffff1663574f2ba36040518163ffffffff1660e01b81526004016020604051808303815f875af115801561007c573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906100a0919061030d565b90508083856100af9190610365565b116100ba57826100c7565b83816100c69190610398565b5b92505f8367ffffffffffffffff8111156100e4576100e36103cb565b5b6040519080825280602002602001820160405280156101125781602001602082028036833780820191505090505b5090505f5f90505b848110156101fe578373ffffffffffffffffffffffffffffffffffffffff16631e3dd18b828861014a9190610365565b6040518263ffffffff1660e01b81526004016101669190610407565b6020604051808303815f875af1158015610182573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906101a69190610420565b8282815181106101b9576101b861044b565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505080600101905061011a565b505f81604051602001610211919061052f565b60405160208183030381529060405290506020810180590381f35b5f5ffd5b5f819050919050565b61024281610230565b811461024c575f5ffd5b50565b5f8151905061025d81610239565b92915050565b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f61028c82610263565b9050919050565b61029c81610282565b81146102a6575f5ffd5b50565b5f815190506102b781610293565b92915050565b5f5f5f606084860312156102d4576102d361022c565b5b5f6102e18682870161024f565b93505060206102f28682870161024f565b9250506040610303868287016102a9565b9150509250925092565b5f602082840312156103225761032161022c565b5b5f61032f8482850161024f565b91505092915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f61036f82610230565b915061037a83610230565b925082820190508082111561039257610391610338565b5b92915050565b5f6103a282610230565b91506103ad83610230565b92508282039050818111156103c5576103c4610338565b5b92915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b61040181610230565b82525050565b5f60208201905061041a5f8301846103f8565b92915050565b5f602082840312156104355761043461022c565b5b5f610442848285016102a9565b91505092915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b5f81519050919050565b5f82825260208201905092915050565b5f819050602082019050919050565b6104aa81610282565b82525050565b5f6104bb83836104a1565b60208301905092915050565b5f602082019050919050565b5f6104dd82610478565b6104e78185610482565b93506104f283610492565b805f5b8381101561052257815161050988826104b0565b9750610514836104c7565b9250506001810190506104f5565b5085935050505092915050565b5f6020820190508181035f83015261054781846104d3565b90509291505056fe","sourceMap":"337:1052:26:-:0;;;382:1005;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;449:22;483:7;474:32;;;:34;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;449:59;;540:14;533:4;526;:11;;;;:::i;:::-;:28;:59;;581:4;526:59;;;574:4;557:14;:21;;;;:::i;:::-;526:59;519:66;;682:25;724:4;710:19;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;682:47;;745:9;757:1;745:13;;740:110;764:4;760:1;:8;740:110;;;812:7;803:26;;;837:1;830:4;:8;;;;:::i;:::-;803:36;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;789:8;798:1;789:11;;;;;;;;:::i;:::-;;;;;;;:50;;;;;;;;;;;770:3;;;;;740:110;;;;1052:28;1094:8;1083:20;;;;;;;;:::i;:::-;;;;;;;;;;;;;1052:51;;1311:4;1294:15;1290:26;1360:9;1351:7;1347:23;1336:9;1329:42;88:117:41;197:1;194;187:12;334:77;371:7;400:5;389:16;;334:77;;;:::o;417:122::-;490:24;508:5;490:24;:::i;:::-;483:5;480:35;470:63;;529:1;526;519:12;470:63;417:122;:::o;545:143::-;602:5;633:6;627:13;618:22;;649:33;676:5;649:33;:::i;:::-;545:143;;;;:::o;694:126::-;731:7;771:42;764:5;760:54;749:65;;694:126;;;:::o;826:96::-;863:7;892:24;910:5;892:24;:::i;:::-;881:35;;826:96;;;:::o;928:122::-;1001:24;1019:5;1001:24;:::i;:::-;994:5;991:35;981:63;;1040:1;1037;1030:12;981:63;928:122;:::o;1056:143::-;1113:5;1144:6;1138:13;1129:22;;1160:33;1187:5;1160:33;:::i;:::-;1056:143;;;;:::o;1205:663::-;1293:6;1301;1309;1358:2;1346:9;1337:7;1333:23;1329:32;1326:119;;;1364:79;;:::i;:::-;1326:119;1484:1;1509:64;1565:7;1556:6;1545:9;1541:22;1509:64;:::i;:::-;1499:74;;1455:128;1622:2;1648:64;1704:7;1695:6;1684:9;1680:22;1648:64;:::i;:::-;1638:74;;1593:129;1761:2;1787:64;1843:7;1834:6;1823:9;1819:22;1787:64;:::i;:::-;1777:74;;1732:129;1205:663;;;;;:::o;1874:351::-;1944:6;1993:2;1981:9;1972:7;1968:23;1964:32;1961:119;;;1999:79;;:::i;:::-;1961:119;2119:1;2144:64;2200:7;2191:6;2180:9;2176:22;2144:64;:::i;:::-;2134:74;;2090:128;1874:351;;;;:::o;2231:180::-;2279:77;2276:1;2269:88;2376:4;2373:1;2366:15;2400:4;2397:1;2390:15;2417:191;2457:3;2476:20;2494:1;2476:20;:::i;:::-;2471:25;;2510:20;2528:1;2510:20;:::i;:::-;2505:25;;2553:1;2550;2546:9;2539:16;;2574:3;2571:1;2568:10;2565:36;;;2581:18;;:::i;:::-;2565:36;2417:191;;;;:::o;2614:194::-;2654:4;2674:20;2692:1;2674:20;:::i;:::-;2669:25;;2708:20;2726:1;2708:20;:::i;:::-;2703:25;;2752:1;2749;2745:9;2737:17;;2776:1;2770:4;2767:11;2764:37;;;2781:18;;:::i;:::-;2764:37;2614:194;;;;:::o;2814:180::-;2862:77;2859:1;2852:88;2959:4;2956:1;2949:15;2983:4;2980:1;2973:15;3000:118;3087:24;3105:5;3087:24;:::i;:::-;3082:3;3075:37;3000:118;;:::o;3124:222::-;3217:4;3255:2;3244:9;3240:18;3232:26;;3268:71;3336:1;3325:9;3321:17;3312:6;3268:71;:::i;:::-;3124:222;;;;:::o;3352:351::-;3422:6;3471:2;3459:9;3450:7;3446:23;3442:32;3439:119;;;3477:79;;:::i;:::-;3439:119;3597:1;3622:64;3678:7;3669:6;3658:9;3654:22;3622:64;:::i;:::-;3612:74;;3568:128;3352:351;;;;:::o;3709:180::-;3757:77;3754:1;3747:88;3854:4;3851:1;3844:15;3878:4;3875:1;3868:15;3895:114;3962:6;3996:5;3990:12;3980:22;;3895:114;;;:::o;4015:184::-;4114:11;4148:6;4143:3;4136:19;4188:4;4183:3;4179:14;4164:29;;4015:184;;;;:::o;4205:132::-;4272:4;4295:3;4287:11;;4325:4;4320:3;4316:14;4308:22;;4205:132;;;:::o;4343:108::-;4420:24;4438:5;4420:24;:::i;:::-;4415:3;4408:37;4343:108;;:::o;4457:179::-;4526:10;4547:46;4589:3;4581:6;4547:46;:::i;:::-;4625:4;4620:3;4616:14;4602:28;;4457:179;;;;:::o;4642:113::-;4712:4;4744;4739:3;4735:14;4727:22;;4642:113;;;:::o;4791:732::-;4910:3;4939:54;4987:5;4939:54;:::i;:::-;5009:86;5088:6;5083:3;5009:86;:::i;:::-;5002:93;;5119:56;5169:5;5119:56;:::i;:::-;5198:7;5229:1;5214:284;5239:6;5236:1;5233:13;5214:284;;;5315:6;5309:13;5342:63;5401:3;5386:13;5342:63;:::i;:::-;5335:70;;5428:60;5481:6;5428:60;:::i;:::-;5418:70;;5274:224;5261:1;5258;5254:9;5249:14;;5214:284;;;5218:14;5514:3;5507:10;;4915:608;;;4791:732;;;;:::o;5529:373::-;5672:4;5710:2;5699:9;5695:18;5687:26;;5759:9;5753:4;5749:20;5745:1;5734:9;5730:17;5723:47;5787:108;5890:4;5881:6;5787:108;:::i;:::-;5779:116;;5529:373;;;;:::o","linkReferences":{}},"deployedBytecode":{"object":"0x60806040525f5ffdfea164736f6c634300081c000a","sourceMap":"337:1052:26:-:0;;;;;","linkReferences":{}},"methodIdentifiers":{},"rawMetadata":"{\"compiler\":{\"version\":\"0.8.28+commit.7893614a\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"from\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"step\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"factory\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"}],\"devdoc\":{\"details\":\"This contract is not meant to be deployed. Instead, use a static call with the deployment bytecode as payload.\",\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/UniswapV2/GetUniswapV2PairsBatchRequest.sol\":\"GetUniswapV2PairsBatchRequest\"},\"evmVersion\":\"cancun\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"none\"},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[\":forge-std/=lib/forge-std/src/\"]},\"sources\":{\"src/UniswapV2/GetUniswapV2PairsBatchRequest.sol\":{\"keccak256\":\"0x44d0d290e07e6cc3f6a365f4c907b81419593172a9b47dd1a64e3d2942d20229\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://9f90e9388ee75d7b9c82f144e7f440de704bbe058c0287db83db0677f3819707\",\"dweb:/ipfs/QmfP1KFxDHdAFZSNYK9oP2prKypbw5FbqufxFGp3BVPMGB\"]}},\"version\":1}","metadata":{"compiler":{"version":"0.8.28+commit.7893614a"},"language":"Solidity","output":{"abi":[{"inputs":[{"internalType":"uint256","name":"from","type":"uint256"},{"internalType":"uint256","name":"step","type":"uint256"},{"internalType":"address","name":"factory","type":"address"}],"stateMutability":"nonpayable","type":"constructor"}],"devdoc":{"kind":"dev","methods":{},"version":1},"userdoc":{"kind":"user","methods":{},"version":1}},"settings":{"remappings":["forge-std/=lib/forge-std/src/"],"optimizer":{"enabled":false,"runs":200},"metadata":{"bytecodeHash":"none"},"compilationTarget":{"src/UniswapV2/GetUniswapV2PairsBatchRequest.sol":"GetUniswapV2PairsBatchRequest"},"evmVersion":"cancun","libraries":{}},"sources":{"src/UniswapV2/GetUniswapV2PairsBatchRequest.sol":{"keccak256":"0x44d0d290e07e6cc3f6a365f4c907b81419593172a9b47dd1a64e3d2942d20229","urls":["bzz-raw://9f90e9388ee75d7b9c82f144e7f440de704bbe058c0287db83db0677f3819707","dweb:/ipfs/QmfP1KFxDHdAFZSNYK9oP2prKypbw5FbqufxFGp3BVPMGB"],"license":"MIT"}},"version":1},"id":26}
================================================
FILE: src/amms/abi/GetUniswapV2PoolDataBatchRequest.json
================================================
{
"abi": [
{
"type": "constructor",
"inputs": [
{
"name": "pools",
"type": "address[]",
"internalType": "address[]"
}
],
"stateMutability": "nonpayable"
}
],
"bytecode": {
"object": "0x608060405234801561000f575f5ffd5b50604051610c67380380610c67833981810160405281019061003191906108bb565b5f815167ffffffffffffffff81111561004d5761004c610725565b5b60405190808252806020026020018201604052801561008657816020015b61007361067e565b81526020019060019003908161006b5790505b5090505f5f90505b825181101561061f575f8382815181106100ab576100aa610902565b5b602002602001015190506100c48161064d60201b60201c565b156100cf5750610614565b6100d761067e565b8173ffffffffffffffffffffffffffffffffffffffff16630dfe16816040518163ffffffff1660e01b8152600401602060405180830381865afa158015610120573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610144919061092f565b815f019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250508173ffffffffffffffffffffffffffffffffffffffff1663d21220a76040518163ffffffff1660e01b8152600401602060405180830381865afa1580156101c3573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906101e7919061092f565b816020019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050610230815f015161064d60201b60201c565b1561023c575050610614565b61024f816020015161064d60201b60201c565b1561025b575050610614565b5f5f825f015173ffffffffffffffffffffffffffffffffffffffff16614e206040516024016040516020818303038152906040527f313ce567000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff838183161783525050505060405161030a91906109ac565b5f604051808303815f8787f1925050503d805f8114610344576040519150601f19603f3d011682016040523d82523d5f602084013e610349565b606091505b509150915081156103b8575f60208251036103a8578180602001905181019061037291906109f5565b90505f811480610382575060ff81115b15610391575050505050610614565b80846080019060ff16908160ff16815250506103b2565b5050505050610614565b506103c1565b50505050610614565b5f5f846020015173ffffffffffffffffffffffffffffffffffffffff16614e206040516024016040516020818303038152906040527f313ce567000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff838183161783525050505060405161047191906109ac565b5f604051808303815f8787f1925050503d805f81146104ab576040519150601f19603f3d011682016040523d82523d5f602084013e6104b0565b606091505b50915091508115610523575f602082510361051157818060200190518101906104d991906109f5565b90505f8114806104e9575060ff81115b156104fa5750505050505050610614565b808660a0019060ff16908160ff168152505061051d565b50505050505050610614565b5061052e565b505050505050610614565b8573ffffffffffffffffffffffffffffffffffffffff16630902f1ac6040518163ffffffff1660e01b8152600401606060405180830381865afa158015610577573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061059b9190610a9c565b508660400187606001826dffffffffffffffffffffffffffff166dffffffffffffffffffffffffffff16815250826dffffffffffffffffffffffffffff166dffffffffffffffffffffffffffff1681525050508488888151811061060257610601610902565b5b60200260200101819052505050505050505b80600101905061008e565b505f816040516020016106329190610c46565b60405160208183030381529060405290506020810180590381f35b5f5f8273ffffffffffffffffffffffffffffffffffffffff163b036106755760019050610679565b5f90505b919050565b6040518060c001604052805f73ffffffffffffffffffffffffffffffffffffffff1681526020015f73ffffffffffffffffffffffffffffffffffffffff1681526020015f6dffffffffffffffffffffffffffff1681526020015f6dffffffffffffffffffffffffffff1681526020015f60ff1681526020015f60ff1681525090565b5f604051905090565b5f5ffd5b5f5ffd5b5f5ffd5b5f601f19601f8301169050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b61075b82610715565b810181811067ffffffffffffffff8211171561077a57610779610725565b5b80604052505050565b5f61078c610700565b90506107988282610752565b919050565b5f67ffffffffffffffff8211156107b7576107b6610725565b5b602082029050602081019050919050565b5f5ffd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f6107f5826107cc565b9050919050565b610805816107eb565b811461080f575f5ffd5b50565b5f81519050610820816107fc565b92915050565b5f6108386108338461079d565b610783565b9050808382526020820190506020840283018581111561085b5761085a6107c8565b5b835b8181101561088457806108708882610812565b84526020840193505060208101905061085d565b5050509392505050565b5f82601f8301126108a2576108a1610711565b5b81516108b2848260208601610826565b91505092915050565b5f602082840312156108d0576108cf610709565b5b5f82015167ffffffffffffffff8111156108ed576108ec61070d565b5b6108f98482850161088e565b91505092915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b5f6020828403121561094457610943610709565b5b5f61095184828501610812565b91505092915050565b5f81519050919050565b5f81905092915050565b8281835e5f83830152505050565b5f6109868261095a565b6109908185610964565b93506109a081856020860161096e565b80840191505092915050565b5f6109b7828461097c565b915081905092915050565b5f819050919050565b6109d4816109c2565b81146109de575f5ffd5b50565b5f815190506109ef816109cb565b92915050565b5f60208284031215610a0a57610a09610709565b5b5f610a17848285016109e1565b91505092915050565b5f6dffffffffffffffffffffffffffff82169050919050565b610a4281610a20565b8114610a4c575f5ffd5b50565b5f81519050610a5d81610a39565b92915050565b5f63ffffffff82169050919050565b610a7b81610a63565b8114610a85575f5ffd5b50565b5f81519050610a9681610a72565b92915050565b5f5f5f60608486031215610ab357610ab2610709565b5b5f610ac086828701610a4f565b9350506020610ad186828701610a4f565b9250506040610ae286828701610a88565b9150509250925092565b5f81519050919050565b5f82825260208201905092915050565b5f819050602082019050919050565b610b1e816107eb565b82525050565b610b2d81610a20565b82525050565b5f60ff82169050919050565b610b4881610b33565b82525050565b60c082015f820151610b625f850182610b15565b506020820151610b756020850182610b15565b506040820151610b886040850182610b24565b506060820151610b9b6060850182610b24565b506080820151610bae6080850182610b3f565b5060a0820151610bc160a0850182610b3f565b50505050565b5f610bd28383610b4e565b60c08301905092915050565b5f602082019050919050565b5f610bf482610aec565b610bfe8185610af6565b9350610c0983610b06565b805f5b83811015610c39578151610c208882610bc7565b9750610c2b83610bde565b925050600181019050610c0c565b5085935050505092915050565b5f6020820190508181035f830152610c5e8184610bea565b90509291505056fe",
"sourceMap": "549:3691:27:-:0;;;786:3253;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;832:29;879:5;:12;864:28;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;832:60;;908:9;920:1;908:13;;903:2596;927:5;:12;923:1;:16;903:2596;;;960:19;982:5;988:1;982:8;;;;;;;;:::i;:::-;;;;;;;;960:30;;1009:27;1024:11;1009:14;;;:27;;:::i;:::-;1005:41;;;1038:8;;;1005:41;1061:24;;:::i;:::-;1167:11;1152:34;;;:36;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;1134:8;:15;;:54;;;;;;;;;;;1235:11;1220:34;;;:36;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;1202:8;:15;;:54;;;;;;;;;;;1345:31;1360:8;:15;;;1345:14;;;:31;;:::i;:::-;1341:45;;;1378:8;;;;1341:45;1404:31;1419:8;:15;;;1404:14;;;:31;;:::i;:::-;1400:45;;;1437:8;;;;1400:45;1513:26;1557:31;1605:8;:15;;;:20;;1631:5;1659:37;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1605:109;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1495:219;;;;1733:21;1729:640;;;1774:22;1848:2;1819:18;:25;:31;1815:493;;1929:18;1893:111;;;;;;;;;;;;:::i;:::-;1874:130;;2049:1;2031:14;:19;:43;;;;2071:3;2054:14;:20;2031:43;2027:208;;;2102:8;;;;;;;2027:208;2197:14;2165:8;:23;;:47;;;;;;;;;;;1815:493;;;2281:8;;;;;;;1815:493;1756:566;1729:640;;;2346:8;;;;;;1729:640;2436:26;2480:31;2528:8;:15;;;:20;;2554:5;2582:37;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2528:109;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2418:219;;;;2656:21;2652:640;;;2697:22;2771:2;2742:18;:25;:31;2738:493;;2852:18;2816:111;;;;;;;;;;;;:::i;:::-;2797:130;;2972:1;2954:14;:19;:43;;;;2994:3;2977:14;:20;2954:43;2950:208;;;3025:8;;;;;;;;;2950:208;3120:14;3088:8;:23;;:47;;;;;;;;;;;2738:493;;;3204:8;;;;;;;;;2738:493;2679:566;2652:640;;;3269:8;;;;;;;;2652:640;3409:11;3377:69;;;:71;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;3334:114;3335:8;:17;;3354:8;:17;;3334:114;;;;;;;;;;;;;;;;;;3480:8;3463:11;3475:1;3463:14;;;;;;;;:::i;:::-;;;;;;;:25;;;;946:2553;;;;;;903:2596;941:3;;;;;903:2596;;;;3701:28;3743:11;3732:23;;;;;;;;:::i;:::-;;;;;;;;;;;;;3701:54;;3963:4;3946:15;3942:26;4012:9;4003:7;3999:23;3988:9;3981:42;4045:193;4108:4;4150:1;4128:6;:18;;;:23;4124:108;;4174:4;4167:11;;;;4124:108;4216:5;4209:12;;4045:193;;;;:::o;549:3691::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;7:75:41:-;40:6;73:2;67:9;57:19;;7:75;:::o;88:117::-;197:1;194;187:12;211:117;320:1;317;310:12;334:117;443:1;440;433:12;457:102;498:6;549:2;545:7;540:2;533:5;529:14;525:28;515:38;;457:102;;;:::o;565:180::-;613:77;610:1;603:88;710:4;707:1;700:15;734:4;731:1;724:15;751:281;834:27;856:4;834:27;:::i;:::-;826:6;822:40;964:6;952:10;949:22;928:18;916:10;913:34;910:62;907:88;;;975:18;;:::i;:::-;907:88;1015:10;1011:2;1004:22;794:238;751:281;;:::o;1038:129::-;1072:6;1099:20;;:::i;:::-;1089:30;;1128:33;1156:4;1148:6;1128:33;:::i;:::-;1038:129;;;:::o;1173:311::-;1250:4;1340:18;1332:6;1329:30;1326:56;;;1362:18;;:::i;:::-;1326:56;1412:4;1404:6;1400:17;1392:25;;1472:4;1466;1462:15;1454:23;;1173:311;;;:::o;1490:117::-;1599:1;1596;1589:12;1613:126;1650:7;1690:42;1683:5;1679:54;1668:65;;1613:126;;;:::o;1745:96::-;1782:7;1811:24;1829:5;1811:24;:::i;:::-;1800:35;;1745:96;;;:::o;1847:122::-;1920:24;1938:5;1920:24;:::i;:::-;1913:5;1910:35;1900:63;;1959:1;1956;1949:12;1900:63;1847:122;:::o;1975:143::-;2032:5;2063:6;2057:13;2048:22;;2079:33;2106:5;2079:33;:::i;:::-;1975:143;;;;:::o;2141:732::-;2248:5;2273:81;2289:64;2346:6;2289:64;:::i;:::-;2273:81;:::i;:::-;2264:90;;2374:5;2403:6;2396:5;2389:21;2437:4;2430:5;2426:16;2419:23;;2490:4;2482:6;2478:17;2470:6;2466:30;2519:3;2511:6;2508:15;2505:122;;;2538:79;;:::i;:::-;2505:122;2653:6;2636:231;2670:6;2665:3;2662:15;2636:231;;;2745:3;2774:48;2818:3;2806:10;2774:48;:::i;:::-;2769:3;2762:61;2852:4;2847:3;2843:14;2836:21;;2712:155;2696:4;2691:3;2687:14;2680:21;;2636:231;;;2640:21;2254:619;;2141:732;;;;;:::o;2896:385::-;2978:5;3027:3;3020:4;3012:6;3008:17;3004:27;2994:122;;3035:79;;:::i;:::-;2994:122;3145:6;3139:13;3170:105;3271:3;3263:6;3256:4;3248:6;3244:17;3170:105;:::i;:::-;3161:114;;2984:297;2896:385;;;;:::o;3287:554::-;3382:6;3431:2;3419:9;3410:7;3406:23;3402:32;3399:119;;;3437:79;;:::i;:::-;3399:119;3578:1;3567:9;3563:17;3557:24;3608:18;3600:6;3597:30;3594:117;;;3630:79;;:::i;:::-;3594:117;3735:89;3816:7;3807:6;3796:9;3792:22;3735:89;:::i;:::-;3725:99;;3528:306;3287:554;;;;:::o;3847:180::-;3895:77;3892:1;3885:88;3992:4;3989:1;3982:15;4016:4;4013:1;4006:15;4033:351;4103:6;4152:2;4140:9;4131:7;4127:23;4123:32;4120:119;;;4158:79;;:::i;:::-;4120:119;4278:1;4303:64;4359:7;4350:6;4339:9;4335:22;4303:64;:::i;:::-;4293:74;;4249:128;4033:351;;;;:::o;4390:98::-;4441:6;4475:5;4469:12;4459:22;;4390:98;;;:::o;4494:147::-;4595:11;4632:3;4617:18;;4494:147;;;;:::o;4647:139::-;4736:6;4731:3;4726;4720:23;4777:1;4768:6;4763:3;4759:16;4752:27;4647:139;;;:::o;4792:386::-;4896:3;4924:38;4956:5;4924:38;:::i;:::-;4978:88;5059:6;5054:3;4978:88;:::i;:::-;4971:95;;5075:65;5133:6;5128:3;5121:4;5114:5;5110:16;5075:65;:::i;:::-;5165:6;5160:3;5156:16;5149:23;;4900:278;4792:386;;;;:::o;5184:271::-;5314:3;5336:93;5425:3;5416:6;5336:93;:::i;:::-;5329:100;;5446:3;5439:10;;5184:271;;;;:::o;5461:77::-;5498:7;5527:5;5516:16;;5461:77;;;:::o;5544:122::-;5617:24;5635:5;5617:24;:::i;:::-;5610:5;5607:35;5597:63;;5656:1;5653;5646:12;5597:63;5544:122;:::o;5672:143::-;5729:5;5760:6;5754:13;5745:22;;5776:33;5803:5;5776:33;:::i;:::-;5672:143;;;;:::o;5821:351::-;5891:6;5940:2;5928:9;5919:7;5915:23;5911:32;5908:119;;;5946:79;;:::i;:::-;5908:119;6066:1;6091:64;6147:7;6138:6;6127:9;6123:22;6091:64;:::i;:::-;6081:74;;6037:128;5821:351;;;;:::o;6178:114::-;6215:7;6255:30;6248:5;6244:42;6233:53;;6178:114;;;:::o;6298:122::-;6371:24;6389:5;6371:24;:::i;:::-;6364:5;6361:35;6351:63;;6410:1;6407;6400:12;6351:63;6298:122;:::o;6426:143::-;6483:5;6514:6;6508:13;6499:22;;6530:33;6557:5;6530:33;:::i;:::-;6426:143;;;;:::o;6575:93::-;6611:7;6651:10;6644:5;6640:22;6629:33;;6575:93;;;:::o;6674:120::-;6746:23;6763:5;6746:23;:::i;:::-;6739:5;6736:34;6726:62;;6784:1;6781;6774:12;6726:62;6674:120;:::o;6800:141::-;6856:5;6887:6;6881:13;6872:22;;6903:32;6929:5;6903:32;:::i;:::-;6800:141;;;;:::o;6947:661::-;7034:6;7042;7050;7099:2;7087:9;7078:7;7074:23;7070:32;7067:119;;;7105:79;;:::i;:::-;7067:119;7225:1;7250:64;7306:7;7297:6;7286:9;7282:22;7250:64;:::i;:::-;7240:74;;7196:128;7363:2;7389:64;7445:7;7436:6;7425:9;7421:22;7389:64;:::i;:::-;7379:74;;7334:129;7502:2;7528:63;7583:7;7574:6;7563:9;7559:22;7528:63;:::i;:::-;7518:73;;7473:128;6947:661;;;;;:::o;7614:141::-;7708:6;7742:5;7736:12;7726:22;;7614:141;;;:::o;7761:211::-;7887:11;7921:6;7916:3;7909:19;7961:4;7956:3;7952:14;7937:29;;7761:211;;;;:::o;7978:159::-;8072:4;8095:3;8087:11;;8125:4;8120:3;8116:14;8108:22;;7978:159;;;:::o;8143:108::-;8220:24;8238:5;8220:24;:::i;:::-;8215:3;8208:37;8143:108;;:::o;8257:::-;8334:24;8352:5;8334:24;:::i;:::-;8329:3;8322:37;8257:108;;:::o;8371:86::-;8406:7;8446:4;8439:5;8435:16;8424:27;;8371:86;;;:::o;8463:102::-;8536:22;8552:5;8536:22;:::i;:::-;8531:3;8524:35;8463:102;;:::o;8679:1221::-;8820:4;8815:3;8811:14;8909:4;8902:5;8898:16;8892:23;8928:63;8985:4;8980:3;8976:14;8962:12;8928:63;:::i;:::-;8835:166;9085:4;9078:5;9074:16;9068:23;9104:63;9161:4;9156:3;9152:14;9138:12;9104:63;:::i;:::-;9011:166;9263:4;9256:5;9252:16;9246:23;9282:63;9339:4;9334:3;9330:14;9316:12;9282:63;:::i;:::-;9187:168;9441:4;9434:5;9430:16;9424:23;9460:63;9517:4;9512:3;9508:14;9494:12;9460:63;:::i;:::-;9365:168;9625:4;9618:5;9614:16;9608:23;9644:59;9697:4;9692:3;9688:14;9674:12;9644:59;:::i;:::-;9543:170;9805:4;9798:5;9794:16;9788:23;9824:59;9877:4;9872:3;9868:14;9854:12;9824:59;:::i;:::-;9723:170;8789:1111;8679:1221;;:::o;9906:287::-;10029:10;10050:100;10146:3;10138:6;10050:100;:::i;:::-;10182:4;10177:3;10173:14;10159:28;;9906:287;;;;:::o;10199:140::-;10296:4;10328;10323:3;10319:14;10311:22;;10199:140;;;:::o;10457:948::-;10630:3;10659:81;10734:5;10659:81;:::i;:::-;10756:113;10862:6;10857:3;10756:113;:::i;:::-;10749:120;;10893:83;10970:5;10893:83;:::i;:::-;10999:7;11030:1;11015:365;11040:6;11037:1;11034:13;11015:365;;;11116:6;11110:13;11143:117;11256:3;11241:13;11143:117;:::i;:::-;11136:124;;11283:87;11363:6;11283:87;:::i;:::-;11273:97;;11075:305;11062:1;11059;11055:9;11050:14;;11015:365;;;11019:14;11396:3;11389:10;;10635:770;;;10457:948;;;;:::o;11411:481::-;11608:4;11646:2;11635:9;11631:18;11623:26;;11695:9;11689:4;11685:20;11681:1;11670:9;11666:17;11659:47;11723:162;11880:4;11871:6;11723:162;:::i;:::-;11715:170;;11411:481;;;;:::o",
"linkReferences": {}
},
"deployedBytecode": {
"object": "0x60806040525f5ffdfea164736f6c634300081c000a",
"sourceMap": "549:3691:27:-:0;;;;;",
"linkReferences": {}
},
"methodIdentifiers": {},
"rawMetadata": "{\"compiler\":{\"version\":\"0.8.28+commit.7893614a\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"pools\",\"type\":\"address[]\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"}],\"devdoc\":{\"details\":\"This contract is not meant to be deployed. Instead, use a static call with the deployment bytecode as payload.\",\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/UniswapV2/GetUniswapV2PoolDataBatchRequest.sol\":\"GetUniswapV2PoolDataBatchRequest\"},\"evmVersion\":\"cancun\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"none\"},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[\":forge-std/=lib/forge-std/src/\"]},\"sources\":{\"src/UniswapV2/GetUniswapV2PoolDataBatchRequest.sol\":{\"keccak256\":\"0x1064713fd23fc7576c8aa10c7de0032af68c8c1ce6e4a2a645403e99e73ee0a9\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://8c9ba9f29f761a7fad1def642d9b248d5114e2ab7595d1a2f98d567b28175222\",\"dweb:/ipfs/QmZBgGhkWxFoPho5Jt34B9xaAFrYAAwgukLPqc4mV3LCHy\"]}},\"version\":1}",
"metadata": {
"compiler": {
"version": "0.8.28+commit.7893614a"
},
"language": "Solidity",
"output": {
"abi": [
{
"inputs": [
{
"internalType": "address[]",
"name": "pools",
"type": "address[]"
}
],
"stateMutability": "nonpayable",
"type": "constructor"
}
],
"devdoc": {
"kind": "dev",
"methods": {},
"version": 1
},
"userdoc": {
"kind": "user",
"methods": {},
"version": 1
}
},
"settings": {
"remappings": [
"forge-std/=lib/forge-std/src/"
],
"optimizer": {
"enabled": false,
"runs": 200
},
"metadata": {
"bytecodeHash": "none"
},
"compilationTarget": {
"src/UniswapV2/GetUniswapV2PoolDataBatchRequest.sol": "GetUniswapV2PoolDataBatchRequest"
},
"evmVersion": "cancun",
"libraries": {}
},
"sources": {
"src/UniswapV2/GetUniswapV2PoolDataBatchRequest.sol": {
"keccak256": "0x1064713fd23fc7576c8aa10c7de0032af68c8c1ce6e4a2a645403e99e73ee0a9",
"urls": [
"bzz-raw://8c9ba9f29f761a7fad1def642d9b248d5114e2ab7595d1a2f98d567b28175222",
"dweb:/ipfs/QmZBgGhkWxFoPho5Jt34B9xaAFrYAAwgukLPqc4mV3LCHy"
],
"license": "MIT"
}
},
"version": 1
},
"id": 27
}
================================================
FILE: src/amms/abi/GetUniswapV3PoolDataBatchRequest.json
================================================
{"abi":[{"type":"constructor","inputs":[{"name":"poolInfo","type":"tuple[]","internalType":"struct GetUniswapV3PoolDataBatchRequest.PoolInfo[]","components":[{"name":"pool","type":"address","internalType":"address"},{"name":"tokenA","type":"address","internalType":"address"},{"name":"tokenB","type":"address","internalType":"address"},{"name":"tickSpacing","type":"int24","internalType":"int24"},{"name":"minWord","type":"int16","internalType":"int16"},{"name":"maxWord","type":"int16","internalType":"int16"}]}],"stateMutability":"nonpayable"}],"bytecode":{"object":"0x608060405234801561000f575f5ffd5b5060405161108238038061108283398181016040528101906100319190610800565b5f815167ffffffffffffffff81111561004d5761004c61055d565b5b60405190808252806020026020018201604052801561008657816020015b6100736104e2565b81526020019060019003908161006b5790505b5090505f5f90505b82518110156104b4575f8382815181106100ab576100aa610847565b5b602002602001015190505f815f015190505f8484815181106100d0576100cf610847565b5b602002602001015190505f600184608001518560a001516100f191906108a1565b60010b6100fe9190610903565b90508067ffffffffffffffff81111561011a5761011961055d565b5b6040519080825280602002602001820160405280156101485781602001602082028036833780820191505090505b50825f01819052505f8161010061015f9190610936565b67ffffffffffffffff8111156101785761017761055d565b5b6040519080825280602002602001820160405280156101b157816020015b61019e610503565b8152602001906001900390816101965790505b5090505f826101006101c39190610936565b67ffffffffffffffff8111156101dc576101db61055d565b5b60405190808252806020026020018201604052801561020a5781602001602082028036833780820191505090505b5090505f5f90505f5f90505f886080015190505b8860a0015160010b8160010b13610469575f8873ffffffffffffffffffffffffffffffffffffffff16635339c296836040518263ffffffff1660e01b81526004016102699190610986565b602060405180830381865afa158015610284573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906102a891906109c9565b90505f81036102b75750610458565b5f5f90505b610100811015610426575f816001901b90505f5f828516141590508015610419575f8d6060015160020b846102f19190610936565b610100886102ff9190610936565b6103099190610903565b90505f8d73ffffffffffffffffffffffffffffffffffffffff1663f30dba93836040518263ffffffff1660e01b81526004016103459190610a03565b61010060405180830381865afa158015610361573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906103859190610c2c565b9050818a8a8151811061039b5761039a610847565b5b602002602001019060020b908160020b815250506040518060600160405280825f01516fffffffffffffffffffffffffffffffff1681526020018260200151600f0b81526020018260e0015115158152508b8a815181106103ff576103fe610847565b5b60200260200101819052508861041490610c58565b985050505b50508060010190506102bc565b5080885f0151848151811061043e5761043d610847565b5b6020026020010181815250508261045490610c58565b9250505b8061046290610c9f565b905061021e565b50818452818352838660400181905250828660200181905250858a8a8151811061049657610495610847565b5b6020026020010181905250505050505050505080600101905061008e565b505f816040516020016104c79190611061565b60405160208183030381529060405290506020810180590381f35b60405180606001604052806060815260200160608152602001606081525090565b60405180606001604052805f6fffffffffffffffffffffffffffffffff1681526020015f600f0b81526020015f151581525090565b5f604051905090565b5f5ffd5b5f5ffd5b5f5ffd5b5f601f19601f8301169050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b6105938261054d565b810181811067ffffffffffffffff821117156105b2576105b161055d565b5b80604052505050565b5f6105c4610538565b90506105d0828261058a565b919050565b5f67ffffffffffffffff8211156105ef576105ee61055d565b5b602082029050602081019050919050565b5f5ffd5b5f5ffd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f61063182610608565b9050919050565b61064181610627565b811461064b575f5ffd5b50565b5f8151905061065c81610638565b92915050565b5f8160020b9050919050565b61067781610662565b8114610681575f5ffd5b50565b5f815190506106928161066e565b92915050565b5f8160010b9050919050565b6106ad81610698565b81146106b7575f5ffd5b50565b5f815190506106c8816106a4565b92915050565b5f60c082840312156106e3576106e2610604565b5b6106ed60c06105bb565b90505f6106fc8482850161064e565b5f83015250602061070f8482850161064e565b60208301525060406107238482850161064e565b604083015250606061073784828501610684565b606083015250608061074b848285016106ba565b60808301525060a061075f848285016106ba565b60a08301525092915050565b5f61077d610778846105d5565b6105bb565b90508083825260208201905060c084028301858111156107a05761079f610600565b5b835b818110156107c957806107b588826106ce565b84526020840193505060c0810190506107a2565b5050509392505050565b5f82601f8301126107e7576107e6610549565b5b81516107f784826020860161076b565b91505092915050565b5f6020828403121561081557610814610541565b5b5f82015167ffffffffffffffff81111561083257610831610545565b5b61083e848285016107d3565b91505092915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f6108ab82610698565b91506108b683610698565b92508282039050617fff81137fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8000821217156108f4576108f3610874565b5b92915050565b5f819050919050565b5f61090d826108fa565b9150610918836108fa565b92508282019050808211156109305761092f610874565b5b92915050565b5f610940826108fa565b915061094b836108fa565b9250828202610959816108fa565b915082820484148315176109705761096f610874565b5b5092915050565b61098081610698565b82525050565b5f6020820190506109995f830184610977565b92915050565b6109a8816108fa565b81146109b2575f5ffd5b50565b5f815190506109c38161099f565b92915050565b5f602082840312156109de576109dd610541565b5b5f6109eb848285016109b5565b91505092915050565b6109fd81610662565b82525050565b5f602082019050610a165f8301846109f4565b92915050565b5f6fffffffffffffffffffffffffffffffff82169050919050565b610a4081610a1c565b8114610a4a575f5ffd5b50565b5f81519050610a5b81610a37565b92915050565b5f81600f0b9050919050565b610a7681610a61565b8114610a80575f5ffd5b50565b5f81519050610a9181610a6d565b92915050565b5f8160060b9050919050565b610aac81610a97565b8114610ab6575f5ffd5b50565b5f81519050610ac781610aa3565b92915050565b610ad681610608565b8114610ae0575f5ffd5b50565b5f81519050610af181610acd565b92915050565b5f63ffffffff82169050919050565b610b0f81610af7565b8114610b19575f5ffd5b50565b5f81519050610b2a81610b06565b92915050565b5f8115159050919050565b610b4481610b30565b8114610b4e575f5ffd5b50565b5f81519050610b5f81610b3b565b92915050565b5f6101008284031215610b7b57610b7a610604565b5b610b866101006105bb565b90505f610b9584828501610a4d565b5f830152506020610ba884828501610a83565b6020830152506040610bbc848285016109b5565b6040830152506060610bd0848285016109b5565b6060830152506080610be484828501610ab9565b60808301525060a0610bf884828501610ae3565b60a08301525060c0610c0c84828501610b1c565b60c08301525060e0610c2084828501610b51565b60e08301525092915050565b5f6101008284031215610c4257610c41610541565b5b5f610c4f84828501610b65565b91505092915050565b5f610c62826108fa565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203610c9457610c93610874565b5b600182019050919050565b5f610ca982610698565b9150617fff8203610cbd57610cbc610874565b5b600182019050919050565b5f81519050919050565b5f82825260208201905092915050565b5f819050602082019050919050565b5f81519050919050565b5f82825260208201905092915050565b5f819050602082019050919050565b610d23816108fa565b82525050565b5f610d348383610d1a565b60208301905092915050565b5f602082019050919050565b5f610d5682610cf1565b610d608185610cfb565b9350610d6b83610d0b565b805f5b83811015610d9b578151610d828882610d29565b9750610d8d83610d40565b925050600181019050610d6e565b5085935050505092915050565b5f81519050919050565b5f82825260208201905092915050565b5f819050602082019050919050565b610dda81610662565b82525050565b5f610deb8383610dd1565b60208301905092915050565b5f602082019050919050565b5f610e0d82610da8565b610e178185610db2565b9350610e2283610dc2565b805f5b83811015610e52578151610e398882610de0565b9750610e4483610df7565b925050600181019050610e25565b5085935050505092915050565b5f81519050919050565b5f82825260208201905092915050565b5f819050602082019050919050565b610e9181610a1c565b82525050565b610ea081610a61565b82525050565b610eaf81610b30565b82525050565b606082015f820151610ec95f850182610e88565b506020820151610edc6020850182610e97565b506040820151610eef6040850182610ea6565b50505050565b5f610f008383610eb5565b60608301905092915050565b5f602082019050919050565b5f610f2282610e5f565b610f2c8185610e69565b9350610f3783610e79565b805f5b83811015610f67578151610f4e8882610ef5565b9750610f5983610f0c565b925050600181019050610f3a565b5085935050505092915050565b5f606083015f8301518482035f860152610f8e8282610d4c565b91505060208301518482036020860152610fa88282610e03565b91505060408301518482036040860152610fc28282610f18565b9150508091505092915050565b5f610fda8383610f74565b905092915050565b5f602082019050919050565b5f610ff882610cc8565b6110028185610cd2565b93508360208202850161101485610ce2565b805f5b8581101561104f57848403895281516110308582610fcf565b945061103b83610fe2565b925060208a01995050600181019050611017565b50829750879550505050505092915050565b5f6020820190508181035f8301526110798184610fee565b90509291505056fe","sourceMap":"192:3422:29:-:0;;;728:2884;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;778:29;825:8;:15;810:31;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;778:63;;857:9;869:1;857:13;;852:2222;876:8;:15;872:1;:19;852:2222;;;912:20;935:8;944:1;935:11;;;;;;;;:::i;:::-;;;;;;;;912:34;;960:24;1007:4;:9;;;960:57;;1032:24;1059:11;1071:1;1059:14;;;;;;;;:::i;:::-;;;;;;;;1032:41;;1087:17;1154:1;1137:4;:12;;;1122:4;:12;;;:27;;;;:::i;:::-;1115:35;;1107:48;;;;:::i;:::-;1087:68;;1206:9;1192:24;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1170:8;:19;;:46;;;;1231:26;1281:9;1275:3;:15;;;;:::i;:::-;1260:31;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;1231:60;;1305:23;1349:9;1343:3;:15;;;;:::i;:::-;1331:28;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1305:54;;1374:22;1399:1;1374:26;;1629:20;1652:1;1629:24;;1672:7;1682:4;:12;;;1672:22;;1667:1137;1701:4;:12;;;1696:17;;:1;:17;;;1667:1137;;1738:18;1759:4;:15;;;1775:1;1759:18;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;1738:39;;1814:1;1800:10;:15;1796:70;;1839:8;;;1796:70;1889:9;1901:1;1889:13;;1884:809;1908:3;1904:1;:7;1884:809;;;1940:11;1959:1;1954;:6;;1940:20;;1983:16;2024:1;2016:3;2003:10;:16;2002:23;;1983:42;;2051:11;2047:628;;;2090:15;2161:4;:16;;;2154:24;;2142:1;:37;;;;:::i;:::-;2136:3;2121:12;:18;;;;:::i;:::-;:58;;;;:::i;:::-;2090:91;;2208:40;2251:4;:10;;;2262:9;2251:21;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;2208:64;;2326:9;2299:8;2308:14;2299:24;;;;;;;;:::i;:::-;;;;;;;:36;;;;;;;;;;;2388:221;;;;;;;;2443:4;:19;;;2388:221;;;;;;2506:4;:17;;;2388:221;;;;;;2566:4;:16;;;2388:221;;;;;2361:8;2370:14;2361:24;;;;;;;;:::i;:::-;;;;;;;:248;;;;2636:16;;;;:::i;:::-;;;2064:611;;2047:628;1918:775;;1913:3;;;;;1884:809;;;;2747:10;2711:8;:19;;;2731:12;2711:33;;;;;;;;:::i;:::-;;;;;;;:46;;;;;2775:14;;;;:::i;:::-;;;1720:1084;1667:1137;1715:3;;;;:::i;:::-;;;1667:1137;;;;2862:14;2852:8;2845:32;2911:14;2901:8;2894:32;2971:8;2954;:14;;:25;;;;3016:8;2993;:20;;:31;;;;3055:8;3038:11;3050:1;3038:14;;;;;;;;:::i;:::-;;;;;;;:25;;;;898:2176;;;;;;;;893:3;;;;;852:2222;;;;3276:27;3317:11;3306:23;;;;;;;;:::i;:::-;;;;;;;;;;;;;3276:53;;3536:4;3520:14;3516:25;3585:9;3576:7;3572:23;3561:9;3554:42;192:3422;;;;;;;;;;;;;;;;;;;;;;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;7:75:41:-;40:6;73:2;67:9;57:19;;7:75;:::o;88:117::-;197:1;194;187:12;211:117;320:1;317;310:12;334:117;443:1;440;433:12;457:102;498:6;549:2;545:7;540:2;533:5;529:14;525:28;515:38;;457:102;;;:::o;565:180::-;613:77;610:1;603:88;710:4;707:1;700:15;734:4;731:1;724:15;751:281;834:27;856:4;834:27;:::i;:::-;826:6;822:40;964:6;952:10;949:22;928:18;916:10;913:34;910:62;907:88;;;975:18;;:::i;:::-;907:88;1015:10;1011:2;1004:22;794:238;751:281;;:::o;1038:129::-;1072:6;1099:20;;:::i;:::-;1089:30;;1128:33;1156:4;1148:6;1128:33;:::i;:::-;1038:129;;;:::o;1173:338::-;1277:4;1367:18;1359:6;1356:30;1353:56;;;1389:18;;:::i;:::-;1353:56;1439:4;1431:6;1427:17;1419:25;;1499:4;1493;1489:15;1481:23;;1173:338;;;:::o;1517:117::-;1626:1;1623;1616:12;1640:117;1749:1;1746;1739:12;1886:126;1923:7;1963:42;1956:5;1952:54;1941:65;;1886:126;;;:::o;2018:96::-;2055:7;2084:24;2102:5;2084:24;:::i;:::-;2073:35;;2018:96;;;:::o;2120:122::-;2193:24;2211:5;2193:24;:::i;:::-;2186:5;2183:35;2173:63;;2232:1;2229;2222:12;2173:63;2120:122;:::o;2248:143::-;2305:5;2336:6;2330:13;2321:22;;2352:33;2379:5;2352:33;:::i;:::-;2248:143;;;;:::o;2397:90::-;2432:7;2475:5;2472:1;2461:20;2450:31;;2397:90;;;:::o;2493:118::-;2564:22;2580:5;2564:22;:::i;:::-;2557:5;2554:33;2544:61;;2601:1;2598;2591:12;2544:61;2493:118;:::o;2617:139::-;2672:5;2703:6;2697:13;2688:22;;2719:31;2744:5;2719:31;:::i;:::-;2617:139;;;;:::o;2762:90::-;2797:7;2840:5;2837:1;2826:20;2815:31;;2762:90;;;:::o;2858:118::-;2929:22;2945:5;2929:22;:::i;:::-;2922:5;2919:33;2909:61;;2966:1;2963;2956:12;2909:61;2858:118;:::o;2982:139::-;3037:5;3068:6;3062:13;3053:22;;3084:31;3109:5;3084:31;:::i;:::-;2982:139;;;;:::o;3183:1310::-;3270:5;3314:4;3302:9;3297:3;3293:19;3289:30;3286:117;;;3322:79;;:::i;:::-;3286:117;3421:21;3437:4;3421:21;:::i;:::-;3412:30;;3501:1;3541:60;3597:3;3588:6;3577:9;3573:22;3541:60;:::i;:::-;3534:4;3527:5;3523:16;3516:86;3452:161;3674:2;3715:60;3771:3;3762:6;3751:9;3747:22;3715:60;:::i;:::-;3708:4;3701:5;3697:16;3690:86;3623:164;3848:2;3889:60;3945:3;3936:6;3925:9;3921:22;3889:60;:::i;:::-;3882:4;3875:5;3871:16;3864:86;3797:164;4027:2;4068:58;4122:3;4113:6;4102:9;4098:22;4068:58;:::i;:::-;4061:4;4054:5;4050:16;4043:84;3971:167;4200:3;4242:58;4296:3;4287:6;4276:9;4272:22;4242:58;:::i;:::-;4235:4;4228:5;4224:16;4217:84;4148:164;4374:3;4416:58;4470:3;4461:6;4450:9;4446:22;4416:58;:::i;:::-;4409:4;4402:5;4398:16;4391:84;4322:164;3183:1310;;;;:::o;4557:813::-;4691:5;4716:108;4732:91;4816:6;4732:91;:::i;:::-;4716:108;:::i;:::-;4707:117;;4844:5;4873:6;4866:5;4859:21;4907:4;4900:5;4896:16;4889:23;;4960:4;4952:6;4948:17;4940:6;4936:30;4989:3;4981:6;4978:15;4975:122;;;5008:79;;:::i;:::-;4975:122;5123:6;5106:258;5140:6;5135:3;5132:15;5106:258;;;5215:3;5244:75;5315:3;5303:10;5244:75;:::i;:::-;5239:3;5232:88;5349:4;5344:3;5340:14;5333:21;;5182:182;5166:4;5161:3;5157:14;5150:21;;5106:258;;;5110:21;4697:673;;4557:813;;;;;:::o;5434:439::-;5543:5;5592:3;5585:4;5577:6;5573:17;5569:27;5559:122;;5600:79;;:::i;:::-;5559:122;5710:6;5704:13;5735:132;5863:3;5855:6;5848:4;5840:6;5836:17;5735:132;:::i;:::-;5726:141;;5549:324;5434:439;;;;:::o;5879:608::-;6001:6;6050:2;6038:9;6029:7;6025:23;6021:32;6018:119;;;6056:79;;:::i;:::-;6018:119;6197:1;6186:9;6182:17;6176:24;6227:18;6219:6;6216:30;6213:117;;;6249:79;;:::i;:::-;6213:117;6354:116;6462:7;6453:6;6442:9;6438:22;6354:116;:::i;:::-;6344:126;;6147:333;5879:608;;;;:::o;6493:180::-;6541:77;6538:1;6531:88;6638:4;6635:1;6628:15;6662:4;6659:1;6652:15;6679:180;6727:77;6724:1;6717:88;6824:4;6821:1;6814:15;6848:4;6845:1;6838:15;6865:311;6903:4;6923:18;6939:1;6923:18;:::i;:::-;6918:23;;6955:18;6971:1;6955:18;:::i;:::-;6950:23;;6997:1;6994;6990:9;6982:17;;7129:6;7123:4;7119:17;7038:66;7032:4;7028:77;7012:134;7009:160;;;7149:18;;:::i;:::-;7009:160;6865:311;;;;:::o;7182:77::-;7219:7;7248:5;7237:16;;7182:77;;;:::o;7265:191::-;7305:3;7324:20;7342:1;7324:20;:::i;:::-;7319:25;;7358:20;7376:1;7358:20;:::i;:::-;7353:25;;7401:1;7398;7394:9;7387:16;;7422:3;7419:1;7416:10;7413:36;;;7429:18;;:::i;:::-;7413:36;7265:191;;;;:::o;7462:410::-;7502:7;7525:20;7543:1;7525:20;:::i;:::-;7520:25;;7559:20;7577:1;7559:20;:::i;:::-;7554:25;;7614:1;7611;7607:9;7636:30;7654:11;7636:30;:::i;:::-;7625:41;;7815:1;7806:7;7802:15;7799:1;7796:22;7776:1;7769:9;7749:83;7726:139;;7845:18;;:::i;:::-;7726:139;7510:362;7462:410;;;;:::o;7878:112::-;7961:22;7977:5;7961:22;:::i;:::-;7956:3;7949:35;7878:112;;:::o;7996:214::-;8085:4;8123:2;8112:9;8108:18;8100:26;;8136:67;8200:1;8189:9;8185:17;8176:6;8136:67;:::i;:::-;7996:214;;;;:::o;8216:122::-;8289:24;8307:5;8289:24;:::i;:::-;8282:5;8279:35;8269:63;;8328:1;8325;8318:12;8269:63;8216:122;:::o;8344:143::-;8401:5;8432:6;8426:13;8417:22;;8448:33;8475:5;8448:33;:::i;:::-;8344:143;;;;:::o;8493:351::-;8563:6;8612:2;8600:9;8591:7;8587:23;8583:32;8580:119;;;8618:79;;:::i;:::-;8580:119;8738:1;8763:64;8819:7;8810:6;8799:9;8795:22;8763:64;:::i;:::-;8753:74;;8709:128;8493:351;;;;:::o;8850:112::-;8933:22;8949:5;8933:22;:::i;:::-;8928:3;8921:35;8850:112;;:::o;8968:214::-;9057:4;9095:2;9084:9;9080:18;9072:26;;9108:67;9172:1;9161:9;9157:17;9148:6;9108:67;:::i;:::-;8968:214;;;;:::o;9188:118::-;9225:7;9265:34;9258:5;9254:46;9243:57;;9188:118;;;:::o;9312:122::-;9385:24;9403:5;9385:24;:::i;:::-;9378:5;9375:35;9365:63;;9424:1;9421;9414:12;9365:63;9312:122;:::o;9440:143::-;9497:5;9528:6;9522:13;9513:22;;9544:33;9571:5;9544:33;:::i;:::-;9440:143;;;;:::o;9589:92::-;9625:7;9669:5;9665:2;9654:21;9643:32;;9589:92;;;:::o;9687:120::-;9759:23;9776:5;9759:23;:::i;:::-;9752:5;9749:34;9739:62;;9797:1;9794;9787:12;9739:62;9687:120;:::o;9813:141::-;9869:5;9900:6;9894:13;9885:22;;9916:32;9942:5;9916:32;:::i;:::-;9813:141;;;;:::o;9960:90::-;9995:7;10038:5;10035:1;10024:20;10013:31;;9960:90;;;:::o;10056:118::-;10127:22;10143:5;10127:22;:::i;:::-;10120:5;10117:33;10107:61;;10164:1;10161;10154:12;10107:61;10056:118;:::o;10180:139::-;10235:5;10266:6;10260:13;10251:22;;10282:31;10307:5;10282:31;:::i;:::-;10180:139;;;;:::o;10325:122::-;10398:24;10416:5;10398:24;:::i;:::-;10391:5;10388:35;10378:63;;10437:1;10434;10427:12;10378:63;10325:122;:::o;10453:143::-;10510:5;10541:6;10535:13;10526:22;;10557:33;10584:5;10557:33;:::i;:::-;10453:143;;;;:::o;10602:93::-;10638:7;10678:10;10671:5;10667:22;10656:33;;10602:93;;;:::o;10701:120::-;10773:23;10790:5;10773:23;:::i;:::-;10766:5;10763:34;10753:62;;10811:1;10808;10801:12;10753:62;10701:120;:::o;10827:141::-;10883:5;10914:6;10908:13;10899:22;;10930:32;10956:5;10930:32;:::i;:::-;10827:141;;;;:::o;10974:90::-;11008:7;11051:5;11044:13;11037:21;11026:32;;10974:90;;;:::o;11070:116::-;11140:21;11155:5;11140:21;:::i;:::-;11133:5;11130:32;11120:60;;11176:1;11173;11166:12;11120:60;11070:116;:::o;11192:137::-;11246:5;11277:6;11271:13;11262:22;;11293:30;11317:5;11293:30;:::i;:::-;11192:137;;;;:::o;11378:1754::-;11465:5;11509:6;11497:9;11492:3;11488:19;11484:32;11481:119;;;11519:79;;:::i;:::-;11481:119;11618:23;11634:6;11618:23;:::i;:::-;11609:32;;11710:1;11750:60;11806:3;11797:6;11786:9;11782:22;11750:60;:::i;:::-;11743:4;11736:5;11732:16;11725:86;11651:171;11889:2;11930:59;11985:3;11976:6;11965:9;11961:22;11930:59;:::i;:::-;11923:4;11916:5;11912:16;11905:85;11832:169;12077:2;12118:60;12174:3;12165:6;12154:9;12150:22;12118:60;:::i;:::-;12111:4;12104:5;12100:16;12093:86;12011:179;12266:2;12307:60;12363:3;12354:6;12343:9;12339:22;12307:60;:::i;:::-;12300:4;12293:5;12289:16;12282:86;12200:179;12455:3;12497:58;12551:3;12542:6;12531:9;12527:22;12497:58;:::i;:::-;12490:4;12483:5;12479:16;12472:84;12389:178;12652:3;12694:60;12750:3;12741:6;12730:9;12726:22;12694:60;:::i;:::-;12687:4;12680:5;12676:16;12669:86;12577:189;12835:3;12877:59;12932:3;12923:6;12912:9;12908:22;12877:59;:::i;:::-;12870:4;12863:5;12859:16;12852:85;12776:172;13014:3;13056:57;13109:3;13100:6;13089:9;13085:22;13056:57;:::i;:::-;13049:4;13042:5;13038:16;13031:83;12958:167;11378:1754;;;;:::o;13138:406::-;13235:6;13284:3;13272:9;13263:7;13259:23;13255:33;13252:120;;;13291:79;;:::i;:::-;13252:120;13411:1;13436:91;13519:7;13510:6;13499:9;13495:22;13436:91;:::i;:::-;13426:101;;13382:155;13138:406;;;;:::o;13550:233::-;13589:3;13612:24;13630:5;13612:24;:::i;:::-;13603:33;;13658:66;13651:5;13648:77;13645:103;;13728:18;;:::i;:::-;13645:103;13775:1;13768:5;13764:13;13757:20;;13550:233;;;:::o;13789:169::-;13826:3;13849:22;13865:5;13849:22;:::i;:::-;13840:31;;13893:6;13886:5;13883:17;13880:43;;13903:18;;:::i;:::-;13880:43;13950:1;13943:5;13939:13;13932:20;;13789:169;;;:::o;13964:141::-;14058:6;14092:5;14086:12;14076:22;;13964:141;;;:::o;14111:211::-;14237:11;14271:6;14266:3;14259:19;14311:4;14306:3;14302:14;14287:29;;14111:211;;;;:::o;14328:159::-;14422:4;14445:3;14437:11;;14475:4;14470:3;14466:14;14458:22;;14328:159;;;:::o;14493:114::-;14560:6;14594:5;14588:12;14578:22;;14493:114;;;:::o;14613:174::-;14702:11;14736:6;14731:3;14724:19;14776:4;14771:3;14767:14;14752:29;;14613:174;;;;:::o;14793:132::-;14860:4;14883:3;14875:11;;14913:4;14908:3;14904:14;14896:22;;14793:132;;;:::o;14931:108::-;15008:24;15026:5;15008:24;:::i;:::-;15003:3;14996:37;14931:108;;:::o;15045:179::-;15114:10;15135:46;151
gitextract_fe8e_14t/
├── .github/
│ ├── ISSUE_TEMPLATE/
│ │ ├── BUG-FORM.yml
│ │ └── FEATURE-FORM.yml
│ ├── PULL_REQUEST_TEMPLATE.md
│ ├── dependabot.yml
│ └── workflows/
│ └── ci.yml
├── .gitignore
├── .gitmodules
├── Cargo.toml
├── README.md
├── benches/
│ ├── erc_4626.rs
│ ├── uniswap_v2.rs
│ └── uniswap_v3.rs
├── build.rs
├── contracts/
│ ├── foundry.toml
│ ├── src/
│ │ ├── Balancer/
│ │ │ └── GetBalancerPoolDataBatchRequest.sol
│ │ ├── ERC20/
│ │ │ └── GetTokenDecimalsBatchRequest.sol
│ │ ├── ERC4626/
│ │ │ └── GetERC4626VaultDataBatchRequest.sol
│ │ ├── UniswapV2/
│ │ │ ├── GetUniswapV2PairsBatchRequest.sol
│ │ │ └── GetUniswapV2PoolDataBatchRequest.sol
│ │ ├── UniswapV3/
│ │ │ ├── FixedPoint.sol
│ │ │ ├── GetUniswapV3PoolDataBatchRequest.sol
│ │ │ ├── GetUniswapV3PoolSlot0BatchRequest.sol
│ │ │ ├── GetUniswapV3PoolTickBitmapBatchRequest.sol
│ │ │ ├── GetUniswapV3PoolTickDataBatchRequest.sol
│ │ │ └── interfaces/
│ │ │ ├── IBalancer.sol
│ │ │ ├── IUniswapV2.sol
│ │ │ ├── IUniswapV3.sol
│ │ │ └── Token.sol
│ │ ├── filters/
│ │ │ ├── WethValueInPools.sol
│ │ │ └── WethValueInPoolsBatchRequest.sol
│ │ └── interfaces/
│ │ ├── IBalancer.sol
│ │ ├── IUniswapV2.sol
│ │ ├── IUniswapV3.sol
│ │ └── Token.sol
│ └── test/
│ ├── FixedPoint.t.sol
│ ├── WethValueInPools.t.sol
│ └── WethValueInPoolsBatchRequest.t.sol
├── dependabot.yml
├── examples/
│ ├── filters.rs
│ ├── simulate_swap.rs
│ ├── state_space_builder.rs
│ ├── subscribe.rs
│ ├── swap_calldata.rs
│ └── sync_macro.rs
└── src/
├── amms/
│ ├── abi/
│ │ ├── GetBalancerPoolDataBatchRequest.json
│ │ ├── GetERC4626VaultDataBatchRequest.json
│ │ ├── GetTokenDecimalsBatchRequest.json
│ │ ├── GetUniswapV2PairsBatchRequest.json
│ │ ├── GetUniswapV2PoolDataBatchRequest.json
│ │ ├── GetUniswapV3PoolDataBatchRequest.json
│ │ ├── GetUniswapV3PoolSlot0BatchRequest.json
│ │ ├── GetUniswapV3PoolTickBitmapBatchRequest.json
│ │ ├── GetUniswapV3PoolTickDataBatchRequest.json
│ │ ├── WethValueInPools.json
│ │ └── WethValueInPoolsBatchRequest.json
│ ├── amm.rs
│ ├── balancer/
│ │ ├── bmath.rs
│ │ └── mod.rs
│ ├── consts.rs
│ ├── erc_4626/
│ │ └── mod.rs
│ ├── error.rs
│ ├── factory.rs
│ ├── float.rs
│ ├── mod.rs
│ ├── uniswap_v2/
│ │ └── mod.rs
│ └── uniswap_v3/
│ └── mod.rs
├── lib.rs
└── state_space/
├── cache.rs
├── discovery.rs
├── error.rs
├── filters/
│ ├── blacklist.rs
│ ├── mod.rs
│ ├── value.rs
│ └── whitelist.rs
└── mod.rs
SYMBOL INDEX (253 symbols across 29 files)
FILE: benches/erc_4626.rs
function simulate_swap (line 6) | fn simulate_swap(c: &mut Criterion) {
FILE: benches/uniswap_v2.rs
function simulate_swap (line 6) | fn simulate_swap(c: &mut Criterion) {
FILE: benches/uniswap_v3.rs
function simulate_swap (line 15) | fn simulate_swap(c: &mut Criterion) {
FILE: build.rs
constant TARGET_CONTRACTS (line 10) | const TARGET_CONTRACTS: &[&str] = &[
function main (line 24) | fn main() -> Result<(), Box<dyn std::error::Error>> {
function hash (line 73) | fn hash(value: &str) -> u64 {
FILE: examples/filters.rs
function main (line 17) | async fn main() -> eyre::Result<()> {
FILE: examples/simulate_swap.rs
function main (line 13) | async fn main() -> eyre::Result<()> {
FILE: examples/state_space_builder.rs
function main (line 19) | async fn main() -> eyre::Result<()> {
FILE: examples/subscribe.rs
function main (line 12) | async fn main() -> eyre::Result<()> {
FILE: examples/swap_calldata.rs
function main (line 12) | async fn main() -> eyre::Result<()> {
FILE: examples/sync_macro.rs
function main (line 22) | async fn main() -> eyre::Result<()> {
FILE: src/amms/amm.rs
type AutomatedMarketMaker (line 17) | pub trait AutomatedMarketMaker {
method address (line 19) | fn address(&self) -> Address;
method sync_events (line 22) | fn sync_events(&self) -> Vec<B256>;
method sync (line 25) | fn sync(&mut self, log: &Log) -> Result<(), AMMError>;
method tokens (line 28) | fn tokens(&self) -> Vec<Address>;
method calculate_price (line 31) | fn calculate_price(&self, base_token: Address, quote_token: Address) -...
method simulate_swap (line 35) | fn simulate_swap(
method simulate_swap_mut (line 44) | fn simulate_swap_mut(
method init (line 52) | async fn init<N, P>(self, block_number: BlockId, provider: P) -> Resul...
FILE: src/amms/balancer/bmath.rs
function btoi (line 7) | pub fn btoi(a: U256) -> U256 {
function badd (line 12) | pub fn badd(a: U256, b: U256) -> Result<U256, BalancerError> {
function bpowi (line 21) | pub fn bpowi(a: U256, n: U256) -> Result<U256, BalancerError> {
function bpow (line 37) | pub fn bpow(base: U256, exp: U256) -> Result<U256, BalancerError> {
function bpow_approx (line 50) | pub fn bpow_approx(base: U256, exp: U256, precision: U256) -> Result<U25...
function bfloor (line 77) | pub fn bfloor(a: U256) -> U256 {
function bdiv (line 84) | pub fn bdiv(a: U256, b: U256) -> Result<U256, BalancerError> {
function bsub (line 102) | pub fn bsub(a: U256, b: U256) -> Result<U256, BalancerError> {
function bsub_sign (line 113) | pub fn bsub_sign(a: U256, b: U256) -> (U256, bool) {
function bmul (line 124) | pub fn bmul(a: U256, b: U256) -> Result<U256, BalancerError> {
function calculate_price (line 145) | pub fn calculate_price(
function calculate_out_given_in (line 169) | pub fn calculate_out_given_in(
FILE: src/amms/balancer/mod.rs
type BalancerError (line 86) | pub enum BalancerError {
type BalancerPool (line 106) | pub struct BalancerPool {
method new (line 356) | pub fn new(address: Address) -> BalancerPool {
type TokenPoolState (line 115) | pub struct TokenPoolState {
method address (line 123) | fn address(&self) -> Address {
method sync_events (line 127) | fn sync_events(&self) -> Vec<B256> {
method sync (line 135) | fn sync(&mut self, log: &Log) -> Result<(), AMMError> {
method tokens (line 190) | fn tokens(&self) -> Vec<Address> {
method calculate_price (line 204) | fn calculate_price(&self, base_token: Address, quote_token: Address) -> ...
method simulate_swap (line 249) | fn simulate_swap(
method simulate_swap_mut (line 280) | fn simulate_swap_mut(
method init (line 311) | async fn init<N, P>(mut self, block_number: BlockId, provider: P) -> Res...
type BalancerFactory (line 365) | pub struct BalancerFactory {
method new (line 437) | pub fn new(address: Address, creation_block: u64) -> BalancerFactory {
method get_all_pools (line 444) | pub async fn get_all_pools<N, P>(
method sync_all_pools (line 489) | pub async fn sync_all_pools<N, P>(
type PoolVariant (line 372) | type PoolVariant = BalancerPool;
method address (line 375) | fn address(&self) -> Address {
method create_pool (line 380) | fn create_pool(&self, log: Log) -> Result<AMM, AMMError> {
method creation_block (line 389) | fn creation_block(&self) -> u64 {
method pool_creation_event (line 394) | fn pool_creation_event(&self) -> B256 {
method discover (line 400) | fn discover<N, P>(
method sync (line 417) | fn sync<N, P>(
function test_populate_data (line 598) | pub async fn test_populate_data() -> eyre::Result<()> {
function test_calculate_price (line 646) | pub async fn test_calculate_price() -> eyre::Result<()> {
function test_simulate_swap (line 668) | pub async fn test_simulate_swap() -> eyre::Result<()> {
FILE: src/amms/consts.rs
constant U256_10E_10 (line 4) | pub const U256_10E_10: U256 = U256::from_limbs([10000000000, 0, 0, 0]);
constant U256_0X100000000 (line 5) | pub const U256_0X100000000: U256 = U256::from_limbs([4294967296, 0, 0, 0]);
constant U256_0X10000 (line 6) | pub const U256_0X10000: U256 = U256::from_limbs([65536, 0, 0, 0]);
constant U256_0X100 (line 7) | pub const U256_0X100: U256 = U256::from_limbs([256, 0, 0, 0]);
constant U256_1000 (line 8) | pub const U256_1000: U256 = U256::from_limbs([1000, 0, 0, 0]);
constant U256_10000 (line 9) | pub const U256_10000: U256 = U256::from_limbs([10000, 0, 0, 0]);
constant U256_100000 (line 10) | pub const U256_100000: U256 = U256::from_limbs([100000, 0, 0, 0]);
constant U256_255 (line 11) | pub const U256_255: U256 = U256::from_limbs([255, 0, 0, 0]);
constant U256_192 (line 12) | pub const U256_192: U256 = U256::from_limbs([192, 0, 0, 0]);
constant U256_191 (line 13) | pub const U256_191: U256 = U256::from_limbs([191, 0, 0, 0]);
constant U256_128 (line 14) | pub const U256_128: U256 = U256::from_limbs([128, 0, 0, 0]);
constant U256_64 (line 15) | pub const U256_64: U256 = U256::from_limbs([64, 0, 0, 0]);
constant U256_32 (line 16) | pub const U256_32: U256 = U256::from_limbs([32, 0, 0, 0]);
constant U256_16 (line 17) | pub const U256_16: U256 = U256::from_limbs([16, 0, 0, 0]);
constant U256_10 (line 18) | pub const U256_10: U256 = U256::from_limbs([10, 0, 0, 0]);
constant U256_8 (line 19) | pub const U256_8: U256 = U256::from_limbs([8, 0, 0, 0]);
constant U256_4 (line 20) | pub const U256_4: U256 = U256::from_limbs([4, 0, 0, 0]);
constant U256_2 (line 21) | pub const U256_2: U256 = U256::from_limbs([2, 0, 0, 0]);
constant U256_1 (line 22) | pub const U256_1: U256 = U256::from_limbs([1, 0, 0, 0]);
constant POPULATE_TICK_DATA_STEP (line 25) | pub const POPULATE_TICK_DATA_STEP: u64 = 100000;
constant Q128 (line 26) | pub const Q128: U256 = U256::from_limbs([0, 0, 1, 0]);
constant Q224 (line 27) | pub const Q224: U256 = U256::from_limbs([0, 0, 0, 4294967296]);
constant BONE (line 30) | pub const BONE: U256 = U256::from_limbs([0xDE0B6B3A7640000, 0, 0, 0]);
constant U128_0X10000000000000000 (line 33) | pub const U128_0X10000000000000000: u128 = 18446744073709551616;
constant U256_0XFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF (line 34) | pub const U256_0XFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF: U256 ...
constant U256_0XFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF (line 40) | pub const U256_0XFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF: U256 =
constant DECIMAL_RADIX (line 43) | pub const DECIMAL_RADIX: i32 = 10;
constant MPFR_T_PRECISION (line 44) | pub const MPFR_T_PRECISION: u32 = 70;
FILE: src/amms/erc_4626/mod.rs
type ERC4626VaultError (line 42) | pub enum ERC4626VaultError {
type ERC4626Vault (line 52) | pub struct ERC4626Vault {
method new (line 249) | pub fn new(address: Address) -> Self {
method get_amount_out (line 256) | pub fn get_amount_out(
method calculate_price_64_x_64 (line 283) | pub fn calculate_price_64_x_64(&self, base_token: Address) -> Result<u...
method get_reserves (line 315) | pub async fn get_reserves<N, P>(
method address (line 70) | fn address(&self) -> Address {
method sync_events (line 74) | fn sync_events(&self) -> Vec<B256> {
method sync (line 81) | fn sync(&mut self, log: &Log) -> Result<(), AMMError> {
method tokens (line 120) | fn tokens(&self) -> Vec<Address> {
method calculate_price (line 124) | fn calculate_price(&self, base_token: Address, _quote_token: Address) ->...
method simulate_swap (line 128) | fn simulate_swap(
method simulate_swap_mut (line 141) | fn simulate_swap_mut(
method init (line 167) | async fn init<N, P>(mut self, block_number: BlockId, provider: P) -> Res...
FILE: src/amms/error.rs
type AMMError (line 9) | pub enum AMMError {
type BatchContractError (line 37) | pub enum BatchContractError {
FILE: src/amms/factory.rs
type DiscoverySync (line 21) | pub trait DiscoverySync {
method discover (line 22) | fn discover<N, P>(
method sync (line 31) | fn sync<N, P>(
type AutomatedMarketMakerFactory (line 42) | pub trait AutomatedMarketMakerFactory: DiscoverySync {
method address (line 46) | fn address(&self) -> Address;
method create_pool (line 49) | fn create_pool(&self, log: Log) -> Result<AMM, AMMError>;
method creation_block (line 52) | fn creation_block(&self) -> u64;
method pool_creation_event (line 55) | fn pool_creation_event(&self) -> B256;
method pool_events (line 58) | fn pool_events(&self) -> Vec<B256> {
method pool_variant (line 62) | fn pool_variant(&self) -> Self::PoolVariant {
type NoopAMM (line 162) | pub struct NoopAMM;
method address (line 164) | fn address(&self) -> Address {
method sync_events (line 168) | fn sync_events(&self) -> Vec<B256> {
method sync (line 172) | fn sync(&mut self, _log: &Log) -> Result<(), AMMError> {
method simulate_swap (line 176) | fn simulate_swap(
method simulate_swap_mut (line 185) | fn simulate_swap_mut(
method calculate_price (line 193) | fn calculate_price(
method tokens (line 201) | fn tokens(&self) -> Vec<Address> {
method init (line 205) | async fn init<N, P>(self, _block_number: BlockId, _provider: P) -> Resul...
FILE: src/amms/float.rs
function q64_to_float (line 9) | pub fn q64_to_float(num: u128) -> Result<f64, AMMError> {
function u128_to_float (line 15) | pub fn u128_to_float(num: u128) -> Result<Float, AMMError> {
function u256_to_float (line 21) | pub fn u256_to_float(num: U256) -> Result<Float, AMMError> {
FILE: src/amms/mod.rs
type Token (line 35) | pub struct Token {
method new (line 42) | pub async fn new<N, P>(address: Address, provider: P) -> Result<Self, ...
method new_with_decimals (line 52) | pub const fn new_with_decimals(address: Address, decimals: u8) -> Self {
method address (line 56) | pub const fn address(&self) -> &Address {
method decimals (line 60) | pub const fn decimals(&self) -> u8 {
method from (line 66) | fn from(address: Address) -> Self {
method hash (line 75) | fn hash<H: Hasher>(&self, state: &mut H) {
function get_token_decimals (line 84) | pub async fn get_token_decimals<N, P>(
FILE: src/amms/uniswap_v2/mod.rs
type UniswapV2Error (line 71) | pub enum UniswapV2Error {
type UniswapV2Pool (line 79) | pub struct UniswapV2Pool {
method new (line 216) | pub fn new(address: Address, fee: usize) -> Self {
method get_amount_out (line 225) | pub fn get_amount_out(&self, amount_in: U256, reserve_in: U256, reserv...
method calculate_price_64_x_64 (line 240) | pub fn calculate_price_64_x_64(&self, base_token: Address) -> Result<u...
method swap_calldata (line 269) | pub fn swap_calldata(
method address (line 89) | fn address(&self) -> Address {
method sync_events (line 93) | fn sync_events(&self) -> Vec<B256> {
method sync (line 97) | fn sync(&mut self, log: &Log) -> Result<(), AMMError> {
method simulate_swap (line 116) | fn simulate_swap(
method simulate_swap_mut (line 137) | fn simulate_swap_mut(
method tokens (line 168) | fn tokens(&self) -> Vec<Address> {
method calculate_price (line 172) | fn calculate_price(&self, base_token: Address, _quote_token: Address) ->...
method init (line 177) | async fn init<N, P>(mut self, block_number: BlockId, provider: P) -> Res...
function u128_to_float (line 207) | pub fn u128_to_float(num: u128) -> Result<Float, AMMError> {
function div_uu (line 287) | pub fn div_uu(x: U256, y: U256) -> Result<u128, AMMError> {
type UniswapV2Factory (line 369) | pub struct UniswapV2Factory {
method new (line 376) | pub fn new(address: Address, fee: usize, creation_block: u64) -> Self {
method get_all_pairs (line 384) | pub async fn get_all_pairs<N, P>(
method sync_all_pools (line 434) | pub async fn sync_all_pools<N, P>(
type PoolVariant (line 515) | type PoolVariant = UniswapV2Pool;
method address (line 517) | fn address(&self) -> Address {
method pool_creation_event (line 521) | fn pool_creation_event(&self) -> B256 {
method create_pool (line 525) | fn create_pool(&self, log: Log) -> Result<AMM, AMMError> {
method creation_block (line 537) | fn creation_block(&self) -> u64 {
method discover (line 543) | fn discover<N, P>(
method sync (line 579) | fn sync<N, P>(
function test_get_amount_out (line 607) | fn test_get_amount_out() {
function test_calculate_price_edge_case (line 625) | fn test_calculate_price_edge_case() {
function test_calculate_price (line 648) | async fn test_calculate_price() {
function test_calculate_price_64_x_64 (line 678) | async fn test_calculate_price_64_x_64() {
FILE: src/amms/uniswap_v3/mod.rs
type UniswapV3Error (line 120) | pub enum UniswapV3Error {
type UniswapV3Pool (line 128) | pub struct UniswapV3Pool {
method new (line 613) | pub fn new(address: Address) -> Self {
method modify_position (line 621) | pub fn modify_position(
method update_position (line 645) | pub fn update_position(
method update_tick (line 678) | pub fn update_tick(
method flip_tick (line 713) | pub fn flip_tick(&mut self, tick: i32, tick_spacing: i32) {
method swap_calldata (line 724) | pub fn swap_calldata(
type Info (line 142) | pub struct Info {
method new (line 149) | pub fn new(liquidity_gross: u128, liquidity_net: i128, initialized: bo...
type CurrentState (line 158) | pub struct CurrentState {
type StepComputations (line 167) | pub struct StepComputations {
type Tick (line 177) | pub struct Tick {
method address (line 189) | fn address(&self) -> Address {
method sync_events (line 193) | fn sync_events(&self) -> Vec<B256> {
method sync (line 201) | fn sync(&mut self, log: &Log) -> Result<(), AMMError> {
method simulate_swap (line 264) | fn simulate_swap(
method simulate_swap_mut (line 408) | fn simulate_swap_mut(
method tokens (line 560) | fn tokens(&self) -> Vec<Address> {
method calculate_price (line 564) | fn calculate_price(&self, base_token: Address, _quote_token: Address) ->...
method init (line 582) | async fn init<N, P>(mut self, block_number: BlockId, provider: P) -> Res...
type UniswapV3Factory (line 745) | pub struct UniswapV3Factory {
method new (line 751) | pub fn new(address: Address, creation_block: u64) -> Self {
method get_all_pools (line 758) | pub async fn get_all_pools<N, P>(
method sync_all_pools (line 803) | pub async fn sync_all_pools<N, P>(
method sync_token_decimals (line 833) | async fn sync_token_decimals<N, P>(
method sync_slot_0 (line 868) | async fn sync_slot_0<N, P>(
method sync_tick_bitmaps (line 916) | async fn sync_tick_bitmaps<N, P>(
method sync_tick_data (line 1025) | async fn sync_tick_data<N, P>(
function tick_to_word (line 1162) | fn tick_to_word(tick: i32, tick_spacing: i32) -> i32 {
type PoolVariant (line 1172) | type PoolVariant = UniswapV3Pool;
method address (line 1174) | fn address(&self) -> Address {
method pool_creation_event (line 1178) | fn pool_creation_event(&self) -> B256 {
method create_pool (line 1182) | fn create_pool(&self, log: Log) -> Result<AMM, AMMError> {
method creation_block (line 1196) | fn creation_block(&self) -> u64 {
method discover (line 1202) | fn discover<N, P>(
method sync (line 1220) | fn sync<N, P>(
function test_simulate_swap_usdc_weth (line 1262) | async fn test_simulate_swap_usdc_weth() -> eyre::Result<()> {
function test_simulate_swap_link_weth (line 1429) | async fn test_simulate_swap_link_weth() -> eyre::Result<()> {
function test_calculate_price (line 1593) | async fn test_calculate_price() -> eyre::Result<()> {
FILE: src/state_space/cache.rs
type StateChangeCache (line 8) | pub struct StateChangeCache<const CAP: usize> {
method default (line 14) | fn default() -> Self {
function new (line 20) | pub fn new() -> Self {
function is_empty (line 27) | pub fn is_empty(&self) -> bool {
function push (line 31) | pub fn push(&mut self, state_change: StateChange) {
function unwind_state_changes (line 45) | pub fn unwind_state_changes(&mut self, block_to_unwind: u64) -> Vec<AMM> {
function flatten_state_changes (line 73) | fn flatten_state_changes(&self, state_changes: Vec<StateChange>) -> Vec<...
type StateChange (line 91) | pub struct StateChange {
method new (line 97) | pub fn new(state_change: Vec<AMM>, block_number: u64) -> Self {
FILE: src/state_space/discovery.rs
type DiscoveryManager (line 10) | pub struct DiscoveryManager {
method new (line 17) | pub fn new(factories: Vec<Factory>) -> Self {
method with_pool_filters (line 31) | pub fn with_pool_filters(self, pool_filters: Vec<PoolFilter>) -> Self {
method disc_events (line 38) | pub fn disc_events(&self) -> HashSet<FixedBytes<32>> {
FILE: src/state_space/error.rs
type StateSpaceError (line 7) | pub enum StateSpaceError {
FILE: src/state_space/filters/blacklist.rs
type BlacklistFilter (line 12) | pub struct BlacklistFilter {
method new (line 18) | pub fn new(blacklist: Vec<Address>) -> Self {
method filter (line 26) | async fn filter(&self, amms: Vec<AMM>) -> Result<Vec<AMM>, AMMError> {
method stage (line 38) | fn stage(&self) -> FilterStage {
FILE: src/state_space/filters/mod.rs
type AMMFilter (line 11) | pub trait AMMFilter {
method filter (line 12) | async fn filter(&self, amms: Vec<AMM>) -> Result<Vec<AMM>, AMMError>;
method stage (line 13) | fn stage(&self) -> FilterStage;
type FilterStage (line 17) | pub enum FilterStage {
FILE: src/state_space/filters/value.rs
type ValueFilter (line 24) | pub struct ValueFilter<const CHUNK_SIZE: usize, N, P>
function new (line 42) | pub fn new(
function get_weth_value_in_pools (line 59) | pub async fn get_weth_value_in_pools(
method filter (line 87) | async fn filter(&self, amms: Vec<AMM>) -> Result<Vec<AMM>, AMMError> {
method stage (line 133) | fn stage(&self) -> FilterStage {
FILE: src/state_space/filters/whitelist.rs
type PoolWhitelistFilter (line 12) | pub struct PoolWhitelistFilter {
method new (line 17) | pub fn new(pools: Vec<Address>) -> Self {
method filter (line 25) | async fn filter(&self, amms: Vec<AMM>) -> Result<Vec<AMM>, AMMError> {
method stage (line 32) | fn stage(&self) -> FilterStage {
type TokenWhitelistFilter (line 38) | pub struct TokenWhitelistFilter {
method new (line 43) | pub fn new(tokens: Vec<Address>) -> Self {
method filter (line 51) | async fn filter(&self, amms: Vec<AMM>) -> Result<Vec<AMM>, AMMError> {
method stage (line 58) | fn stage(&self) -> FilterStage {
FILE: src/state_space/mod.rs
constant CACHE_SIZE (line 38) | pub const CACHE_SIZE: usize = 30;
type StateSpaceManager (line 41) | pub struct StateSpaceManager<N, P> {
function subscribe (line 52) | pub async fn subscribe(
type StateSpaceBuilder (line 90) | pub struct StateSpaceBuilder<N, P> {
function new (line 105) | pub fn new(provider: P) -> StateSpaceBuilder<N, P> {
function block (line 117) | pub fn block(self, latest_block: u64) -> StateSpaceBuilder<N, P> {
function with_factories (line 124) | pub fn with_factories(self, factories: Vec<Factory>) -> StateSpaceBuilde...
function with_amms (line 128) | pub fn with_amms(self, amms: Vec<AMM>) -> StateSpaceBuilder<N, P> {
function with_filters (line 132) | pub fn with_filters(self, filters: Vec<PoolFilter>) -> StateSpaceBuilder...
function sync (line 136) | pub async fn sync(self) -> Result<StateSpaceManager<N, P>, AMMError> {
type StateSpace (line 246) | pub struct StateSpace {
method get (line 253) | pub fn get(&self, address: &Address) -> Option<&AMM> {
method get_mut (line 257) | pub fn get_mut(&mut self, address: &Address) -> Option<&mut AMM> {
method sync (line 261) | pub fn sync(&mut self, logs: &[Log]) -> Result<Vec<Address>, StateSpac...
Condensed preview — 75 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (595K chars).
[
{
"path": ".github/ISSUE_TEMPLATE/BUG-FORM.yml",
"chars": 485,
"preview": "name: Bug report\ndescription: File a bug report\nlabels: [\"bug\"]\ntitle: \"Bug: \"\nbody:\n - type: markdown\n attribut"
},
{
"path": ".github/ISSUE_TEMPLATE/FEATURE-FORM.yml",
"chars": 709,
"preview": "name: Feature request\ndescription: Suggest a feature\nlabels: [\"enhancement\"]\ntitle: \"Feat: \"\nbody:\n - type: markdown\n"
},
{
"path": ".github/PULL_REQUEST_TEMPLATE.md",
"chars": 674,
"preview": "<!--\nThank you for your Pull Request. Please provide a description above and review\nthe requirements below.\n\nBug fixes a"
},
{
"path": ".github/dependabot.yml",
"chars": 296,
"preview": "version: 2\nupdates:\n - package-ecosystem: \"cargo\"\n directory: \"/\"\n schedule:\n interval: \"weekly\"\n - package"
},
{
"path": ".github/workflows/ci.yml",
"chars": 2093,
"preview": "name: CI\n\non:\n push:\n branches:\n - main\n pull_request:\n types: [opened,synchronize,reopened]\n branches:\n"
},
{
"path": ".gitignore",
"chars": 297,
"preview": "/target\nCargo.lock\n\n# Foundry \n\n# Compiler files\ncontracts/cache/\ncontracts/out/\ncontracts/lib/\ncontracts/src/flattened/"
},
{
"path": ".gitmodules",
"chars": 117,
"preview": "[submodule \"contracts/lib/forge-std\"]\n\tpath = contracts/lib/forge-std\n\turl = https://github.com/foundry-rs/forge-std\n"
},
{
"path": "Cargo.toml",
"chars": 1539,
"preview": "[package]\nname = \"amms\"\nversion = \"0.7.4\"\nedition = \"2021\"\nlicense = \"MIT\"\ndescription = \"A library to interact with aut"
},
{
"path": "README.md",
"chars": 1459,
"preview": "# amms-rs [![Github Actions][gha-badge]][gha] [![Chat][tg-badge]][tg-url]\n\n[gha]: https://github.com/darkforestry/amms-r"
},
{
"path": "benches/erc_4626.rs",
"chars": 1082,
"preview": "use alloy::primitives::{address, U256};\nuse amms::amms::{amm::AutomatedMarketMaker, erc_4626::ERC4626Vault};\nuse criteri"
},
{
"path": "benches/uniswap_v2.rs",
"chars": 1046,
"preview": "use alloy::primitives::{address, U256};\nuse amms::amms::{amm::AutomatedMarketMaker, uniswap_v2::UniswapV2Pool, Token};\nu"
},
{
"path": "benches/uniswap_v3.rs",
"chars": 1648,
"preview": "use std::sync::Arc;\n\nuse alloy::{\n eips::BlockId,\n primitives::{address, U256},\n providers::ProviderBuilder,\n "
},
{
"path": "build.rs",
"chars": 2301,
"preview": "use rayon::iter::{IntoParallelRefIterator, ParallelIterator};\nuse serde_json::Value;\nuse std::{\n fs,\n hash::{Defau"
},
{
"path": "contracts/foundry.toml",
"chars": 163,
"preview": "[profile.default]\noptimizer = false\nevm_version = \"cancun\"\nremappings = [\"forge-std=lib/forge-std/src/\"]\nfs_permissions "
},
{
"path": "contracts/src/Balancer/GetBalancerPoolDataBatchRequest.sol",
"chars": 3572,
"preview": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\ninterface IBPool {\n function getCurrentTokens() external retu"
},
{
"path": "contracts/src/ERC20/GetTokenDecimalsBatchRequest.sol",
"chars": 1582,
"preview": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\ncontract GetTokenDecimalsBatchRequest {\n constructor(address["
},
{
"path": "contracts/src/ERC4626/GetERC4626VaultDataBatchRequest.sol",
"chars": 5634,
"preview": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\ninterface IERC4626Vault {\n function asset() external view ret"
},
{
"path": "contracts/src/UniswapV2/GetUniswapV2PairsBatchRequest.sol",
"chars": 1390,
"preview": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\ninterface IFactory {\n function allPairs(uint256 idx) external"
},
{
"path": "contracts/src/UniswapV2/GetUniswapV2PoolDataBatchRequest.sol",
"chars": 4241,
"preview": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\ninterface IUniswapV2Pair {\n function token0() external view r"
},
{
"path": "contracts/src/UniswapV3/FixedPoint.sol",
"chars": 5319,
"preview": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nlibrary FixedPointMath {\n uint256 internal constant Q96 = 0x1"
},
{
"path": "contracts/src/UniswapV3/GetUniswapV3PoolDataBatchRequest.sol",
"chars": 5778,
"preview": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\n/**\n * @dev This contract is not meant to be deployed. Instead, "
},
{
"path": "contracts/src/UniswapV3/GetUniswapV3PoolSlot0BatchRequest.sol",
"chars": 3633,
"preview": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\n/**\n * @dev This contract is not meant to be deployed. Instead, "
},
{
"path": "contracts/src/UniswapV3/GetUniswapV3PoolTickBitmapBatchRequest.sol",
"chars": 2414,
"preview": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\n/**\n * @dev This contract is not meant to be deployed. Instead, "
},
{
"path": "contracts/src/UniswapV3/GetUniswapV3PoolTickDataBatchRequest.sol",
"chars": 3596,
"preview": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\n/**\n * @dev This contract is not meant to be deployed. Instead, "
},
{
"path": "contracts/src/UniswapV3/interfaces/IBalancer.sol",
"chars": 345,
"preview": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\ninterface IBPool {\n function getCurrentTokens() external retu"
},
{
"path": "contracts/src/UniswapV3/interfaces/IUniswapV2.sol",
"chars": 496,
"preview": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\ninterface IUniswapV2Pair {\n function token0() external view r"
},
{
"path": "contracts/src/UniswapV3/interfaces/IUniswapV3.sol",
"chars": 1112,
"preview": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\ninterface IUniswapV3Pool {\n function fee() external view retu"
},
{
"path": "contracts/src/UniswapV3/interfaces/Token.sol",
"chars": 197,
"preview": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\ninterface IERC20 {\n function decimals() external view returns"
},
{
"path": "contracts/src/filters/WethValueInPools.sol",
"chars": 10704,
"preview": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.26;\n\nimport {IBPool} from \"../interfaces/IBalancer.sol\";\nimport {IUn"
},
{
"path": "contracts/src/filters/WethValueInPoolsBatchRequest.sol",
"chars": 1015,
"preview": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.26;\n\nimport \"./WethValueInPools.sol\";\n\ncontract WethValueInPoolsBatc"
},
{
"path": "contracts/src/interfaces/IBalancer.sol",
"chars": 345,
"preview": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\ninterface IBPool {\n function getCurrentTokens() external retu"
},
{
"path": "contracts/src/interfaces/IUniswapV2.sol",
"chars": 496,
"preview": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\ninterface IUniswapV2Pair {\n function token0() external view r"
},
{
"path": "contracts/src/interfaces/IUniswapV3.sol",
"chars": 1112,
"preview": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\ninterface IUniswapV3Pool {\n function fee() external view retu"
},
{
"path": "contracts/src/interfaces/Token.sol",
"chars": 197,
"preview": "//SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\ninterface IERC20 {\n function decimals() external view returns"
},
{
"path": "contracts/test/FixedPoint.t.sol",
"chars": 1230,
"preview": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport \"forge-std/Test.sol\";\nimport \"../src/UniswapV3/FixedPoin"
},
{
"path": "contracts/test/WethValueInPools.t.sol",
"chars": 3953,
"preview": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport \"forge-std/Test.sol\";\nimport \"../src/filters/WethValueIn"
},
{
"path": "contracts/test/WethValueInPoolsBatchRequest.t.sol",
"chars": 4916,
"preview": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nimport \"forge-std/Test.sol\";\nimport \"../src/filters/WethValueIn"
},
{
"path": "dependabot.yml",
"chars": 299,
"preview": "version: 2\nupdates:\n - package-ecosystem: \"cargo\"\n directory: \"/\"\n schedule:\n interval: \"monthly\"\n - packag"
},
{
"path": "examples/filters.rs",
"chars": 2367,
"preview": "use alloy::{\n primitives::address,\n providers::ProviderBuilder,\n rpc::client::ClientBuilder,\n transports::la"
},
{
"path": "examples/simulate_swap.rs",
"chars": 1189,
"preview": "use alloy::eips::BlockId;\nuse alloy::primitives::{Address, U256};\nuse alloy::transports::layers::ThrottleLayer;\nuse allo"
},
{
"path": "examples/state_space_builder.rs",
"chars": 2987,
"preview": "use std::sync::Arc;\n\nuse alloy::{\n primitives::address,\n providers::ProviderBuilder,\n rpc::client::ClientBuilde"
},
{
"path": "examples/subscribe.rs",
"chars": 1571,
"preview": "use alloy::{\n primitives::address,\n providers::ProviderBuilder,\n rpc::client::ClientBuilder,\n transports::la"
},
{
"path": "examples/swap_calldata.rs",
"chars": 1088,
"preview": "use alloy::eips::BlockId;\nuse alloy::primitives::U256;\nuse alloy::transports::layers::ThrottleLayer;\nuse alloy::{\n pr"
},
{
"path": "examples/sync_macro.rs",
"chars": 1592,
"preview": "use std::sync::Arc;\n\nuse alloy::{\n primitives::address,\n providers::ProviderBuilder,\n rpc::client::ClientBuilde"
},
{
"path": "src/amms/abi/GetBalancerPoolDataBatchRequest.json",
"chars": 20560,
"preview": "{\"abi\":[{\"type\":\"constructor\",\"inputs\":[{\"name\":\"pools\",\"type\":\"address[]\",\"internalType\":\"address[]\"}],\"stateMutability"
},
{
"path": "src/amms/abi/GetERC4626VaultDataBatchRequest.json",
"chars": 24705,
"preview": "{\"abi\":[{\"type\":\"constructor\",\"inputs\":[{\"name\":\"vaults\",\"type\":\"address[]\",\"internalType\":\"address[]\"}],\"stateMutabilit"
},
{
"path": "src/amms/abi/GetTokenDecimalsBatchRequest.json",
"chars": 10887,
"preview": "{\"abi\":[{\"type\":\"constructor\",\"inputs\":[{\"name\":\"tokens\",\"type\":\"address[]\",\"internalType\":\"address[]\"}],\"stateMutabilit"
},
{
"path": "src/amms/abi/GetUniswapV2PairsBatchRequest.json",
"chars": 9497,
"preview": "{\"abi\":[{\"type\":\"constructor\",\"inputs\":[{\"name\":\"from\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"step\",\"type\":"
},
{
"path": "src/amms/abi/GetUniswapV2PoolDataBatchRequest.json",
"chars": 18461,
"preview": "{\n \"abi\": [\n {\n \"type\": \"constructor\",\n \"inputs\": [\n {\n "
},
{
"path": "src/amms/abi/GetUniswapV3PoolDataBatchRequest.json",
"chars": 28208,
"preview": "{\"abi\":[{\"type\":\"constructor\",\"inputs\":[{\"name\":\"poolInfo\",\"type\":\"tuple[]\",\"internalType\":\"struct GetUniswapV3PoolDataB"
},
{
"path": "src/amms/abi/GetUniswapV3PoolSlot0BatchRequest.json",
"chars": 13757,
"preview": "{\"abi\":[{\"type\":\"constructor\",\"inputs\":[{\"name\":\"pools\",\"type\":\"address[]\",\"internalType\":\"address[]\"}],\"stateMutability"
},
{
"path": "src/amms/abi/GetUniswapV3PoolTickBitmapBatchRequest.json",
"chars": 15418,
"preview": "{\"abi\":[{\"type\":\"constructor\",\"inputs\":[{\"name\":\"allPoolInfo\",\"type\":\"tuple[]\",\"internalType\":\"struct GetUniswapV3PoolTi"
},
{
"path": "src/amms/abi/GetUniswapV3PoolTickDataBatchRequest.json",
"chars": 19827,
"preview": "{\"abi\":[{\"type\":\"constructor\",\"inputs\":[{\"name\":\"allPoolInfo\",\"type\":\"tuple[]\",\"internalType\":\"struct GetUniswapV3PoolTi"
},
{
"path": "src/amms/abi/WethValueInPools.json",
"chars": 71994,
"preview": "{\"abi\":[{\"type\":\"constructor\",\"inputs\":[{\"name\":\"_uniswapV2Factory\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\""
},
{
"path": "src/amms/abi/WethValueInPoolsBatchRequest.json",
"chars": 96518,
"preview": "{\"abi\":[{\"type\":\"constructor\",\"inputs\":[{\"name\":\"_uniswapV2Factory\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\""
},
{
"path": "src/amms/amm.rs",
"chars": 4951,
"preview": "use super::{\n balancer::BalancerPool, erc_4626::ERC4626Vault, error::AMMError, uniswap_v2::UniswapV2Pool,\n uniswap"
},
{
"path": "src/amms/balancer/bmath.rs",
"chars": 6153,
"preview": "use alloy::primitives::U256;\n\nuse crate::amms::consts::{BONE, U256_1, U256_10E_10, U256_2};\n\nuse super::BalancerError;\n\n"
},
{
"path": "src/amms/balancer/mod.rs",
"chars": 21902,
"preview": "pub mod bmath;\n\nuse std::{collections::HashMap, future::Future};\n\nuse alloy::{\n eips::BlockId,\n network::Network,\n"
},
{
"path": "src/amms/consts.rs",
"chars": 1986,
"preview": "use alloy::primitives::U256;\n\n// commonly used U256s\npub const U256_10E_10: U256 = U256::from_limbs([10000000000, 0, 0, "
},
{
"path": "src/amms/erc_4626/mod.rs",
"chars": 10422,
"preview": "use super::{\n amm::AutomatedMarketMaker,\n consts::{U128_0X10000000000000000, U256_10000, U256_2},\n error::AMMEr"
},
{
"path": "src/amms/error.rs",
"chars": 1425,
"preview": "use super::{\n balancer::BalancerError, erc_4626::ERC4626VaultError, uniswap_v2::UniswapV2Error,\n uniswap_v3::Unisw"
},
{
"path": "src/amms/factory.rs",
"chars": 5764,
"preview": "use super::{amm::Variant, uniswap_v2::UniswapV2Factory, uniswap_v3::UniswapV3Factory};\nuse super::{\n amm::{AutomatedM"
},
{
"path": "src/amms/float.rs",
"chars": 786,
"preview": "use alloy::primitives::U256;\nuse rug::Float;\n\nuse super::{\n consts::{MPFR_T_PRECISION, U128_0X10000000000000000},\n "
},
{
"path": "src/amms/mod.rs",
"chars": 3104,
"preview": "use std::{\n collections::HashMap,\n hash::{Hash, Hasher},\n};\n\nuse alloy::{dyn_abi::DynSolType, network::Network, pr"
},
{
"path": "src/amms/uniswap_v2/mod.rs",
"chars": 21090,
"preview": "use super::{\n amm::{AutomatedMarketMaker, AMM},\n consts::{\n MPFR_T_PRECISION, U128_0X10000000000000000, U25"
},
{
"path": "src/amms/uniswap_v3/mod.rs",
"chars": 55819,
"preview": "use super::{\n amm::{AutomatedMarketMaker, AMM},\n error::{AMMError, BatchContractError},\n factory::{AutomatedMar"
},
{
"path": "src/lib.rs",
"chars": 93,
"preview": "#![cfg_attr(not(test), warn(unused_crate_dependencies))]\n\npub mod amms;\npub mod state_space;\n"
},
{
"path": "src/state_space/cache.rs",
"chars": 2882,
"preview": "use std::collections::HashMap;\n\nuse crate::amms::amm::{AutomatedMarketMaker, AMM};\nuse arraydeque::ArrayDeque;\n\n#[derive"
},
{
"path": "src/state_space/discovery.rs",
"chars": 1193,
"preview": "use std::collections::{HashMap, HashSet};\n\nuse alloy::primitives::{Address, FixedBytes};\n\nuse crate::amms::factory::Fact"
},
{
"path": "src/state_space/error.rs",
"chars": 456,
"preview": "use alloy::transports::TransportErrorKind;\nuse thiserror::Error;\n\nuse crate::amms::error::AMMError;\n\n#[derive(Error, Deb"
},
{
"path": "src/state_space/filters/blacklist.rs",
"chars": 1112,
"preview": "use alloy::primitives::Address;\nuse async_trait::async_trait;\n\nuse crate::amms::{\n amm::{AutomatedMarketMaker, AMM},\n"
},
{
"path": "src/state_space/filters/mod.rs",
"chars": 1460,
"preview": "pub mod blacklist;\npub mod value;\npub mod whitelist;\n\nuse async_trait::async_trait;\nuse blacklist::BlacklistFilter;\nuse "
},
{
"path": "src/state_space/filters/value.rs",
"chars": 3744,
"preview": "use std::{collections::HashMap, marker::PhantomData};\n\nuse super::{AMMFilter, FilterStage};\nuse crate::amms::{\n amm::"
},
{
"path": "src/state_space/filters/whitelist.rs",
"chars": 1376,
"preview": "use alloy::primitives::Address;\nuse async_trait::async_trait;\n\nuse crate::amms::{\n amm::{AutomatedMarketMaker, AMM},\n"
},
{
"path": "src/state_space/mod.rs",
"chars": 11672,
"preview": "pub mod cache;\npub mod discovery;\npub mod error;\npub mod filters;\n\nuse crate::amms::amm::AutomatedMarketMaker;\nuse crate"
}
]
About this extraction
This page contains the full source code of the darkforestry/amms-rs GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 75 files (562.0 KB), approximately 213.2k tokens, and a symbol index with 253 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.
Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.