From ae6d73b141d5bae43b84220ab5ae9416878cfd65 Mon Sep 17 00:00:00 2001 From: Jem <0x0xjem@gmail.com> Date: Mon, 24 Jun 2024 15:48:32 +0400 Subject: [PATCH 01/29] Validate configuration addresses --- lib/g-uni-v1-core/deploy/GUniFactory.deploy.ts | 12 ++++++++++++ lib/g-uni-v1-core/deploy/GUniPool.deploy.ts | 9 +++++++++ lib/g-uni-v1-core/deploy/address.ts | 2 ++ 3 files changed, 23 insertions(+) create mode 100644 lib/g-uni-v1-core/deploy/address.ts diff --git a/lib/g-uni-v1-core/deploy/GUniFactory.deploy.ts b/lib/g-uni-v1-core/deploy/GUniFactory.deploy.ts index 8388d9247..978d5f65b 100644 --- a/lib/g-uni-v1-core/deploy/GUniFactory.deploy.ts +++ b/lib/g-uni-v1-core/deploy/GUniFactory.deploy.ts @@ -2,6 +2,7 @@ import { deployments, getNamedAccounts } from "hardhat"; import { HardhatRuntimeEnvironment } from "hardhat/types"; import { DeployFunction } from "hardhat-deploy/types"; import { getAddresses } from "../src/addresses"; +import { isZeroAddress } from "./address"; const func: DeployFunction = async (hre: HardhatRuntimeEnvironment) => { if ( @@ -19,6 +20,17 @@ const func: DeployFunction = async (hre: HardhatRuntimeEnvironment) => { const { deployer } = await getNamedAccounts(); const addresses = getAddresses(hre.network.name); + // Validate input addresses + if (isZeroAddress(addresses.UniswapV3Factory)) { + throw new Error("UniswapV3Factory address not set"); + } + if (isZeroAddress(addresses.GelatoDevMultiSig)) { + throw new Error("GelatoDevMultiSig address not set"); + } + if (isZeroAddress(addresses.GUniImplementation)) { + throw new Error("GUniImplementation (pool implementation) address not set"); + } + await deploy("GUniFactory", { from: deployer, proxy: { diff --git a/lib/g-uni-v1-core/deploy/GUniPool.deploy.ts b/lib/g-uni-v1-core/deploy/GUniPool.deploy.ts index 86329c39f..8319ea21f 100644 --- a/lib/g-uni-v1-core/deploy/GUniPool.deploy.ts +++ b/lib/g-uni-v1-core/deploy/GUniPool.deploy.ts @@ -2,6 +2,7 @@ import { deployments, getNamedAccounts } from "hardhat"; import { HardhatRuntimeEnvironment } from "hardhat/types"; import { DeployFunction } from "hardhat-deploy/types"; import { getAddresses } from "../src/addresses"; +import { isZeroAddress } from "./address"; const func: DeployFunction = async (hre: HardhatRuntimeEnvironment) => { if ( @@ -19,6 +20,14 @@ const func: DeployFunction = async (hre: HardhatRuntimeEnvironment) => { const { deployer } = await getNamedAccounts(); const addresses = getAddresses(hre.network.name); + // Validate input addresses + if (isZeroAddress(addresses.Gelato)) { + throw new Error("Gelato address not set"); + } + if (isZeroAddress(deployer)) { + throw new Error("Deployer address not set"); + } + await deploy("GUniPool", { from: deployer, args: [addresses.Gelato], diff --git a/lib/g-uni-v1-core/deploy/address.ts b/lib/g-uni-v1-core/deploy/address.ts new file mode 100644 index 000000000..a9020e5e3 --- /dev/null +++ b/lib/g-uni-v1-core/deploy/address.ts @@ -0,0 +1,2 @@ + +export const isZeroAddress = (address: string): boolean => !address || address === "" || address === "0x0000000000000000000000000000000000000000"; From c9c49d3f991b11dfc3bfbec152e0bad148b2a630 Mon Sep 17 00:00:00 2001 From: Jem <0x0xjem@gmail.com> Date: Mon, 24 Jun 2024 16:03:12 +0400 Subject: [PATCH 02/29] Compile error --- lib/g-uni-v1-core/contracts/abstract/GUniFactoryStorage.sol | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/g-uni-v1-core/contracts/abstract/GUniFactoryStorage.sol b/lib/g-uni-v1-core/contracts/abstract/GUniFactoryStorage.sol index 6b8aab5cf..567eb7e46 100644 --- a/lib/g-uni-v1-core/contracts/abstract/GUniFactoryStorage.sol +++ b/lib/g-uni-v1-core/contracts/abstract/GUniFactoryStorage.sol @@ -4,7 +4,7 @@ pragma solidity 0.8.19; import {OwnableUninitialized} from "./OwnableUninitialized.sol"; import { Initializable -} from "@openzeppelin/contracts-upgradeable/utils/Initializable.sol"; +} from "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol"; import { EnumerableSet } from "@openzeppelin/contracts/utils/structs/EnumerableSet.sol"; From c8b0435ee03d1a4c7e2abff1e2d63d8820b5f7b7 Mon Sep 17 00:00:00 2001 From: Jem <0x0xjem@gmail.com> Date: Mon, 24 Jun 2024 16:03:28 +0400 Subject: [PATCH 03/29] Add script for pool deployment --- lib/g-uni-v1-core/deploy/{ => factory}/GUniFactory.deploy.ts | 4 ++-- lib/g-uni-v1-core/deploy/{ => pool}/GUniPool.deploy.ts | 4 ++-- lib/g-uni-v1-core/package.json | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) rename lib/g-uni-v1-core/deploy/{ => factory}/GUniFactory.deploy.ts (94%) rename lib/g-uni-v1-core/deploy/{ => pool}/GUniPool.deploy.ts (92%) diff --git a/lib/g-uni-v1-core/deploy/GUniFactory.deploy.ts b/lib/g-uni-v1-core/deploy/factory/GUniFactory.deploy.ts similarity index 94% rename from lib/g-uni-v1-core/deploy/GUniFactory.deploy.ts rename to lib/g-uni-v1-core/deploy/factory/GUniFactory.deploy.ts index 978d5f65b..ecacacbc4 100644 --- a/lib/g-uni-v1-core/deploy/GUniFactory.deploy.ts +++ b/lib/g-uni-v1-core/deploy/factory/GUniFactory.deploy.ts @@ -1,8 +1,8 @@ import { deployments, getNamedAccounts } from "hardhat"; import { HardhatRuntimeEnvironment } from "hardhat/types"; import { DeployFunction } from "hardhat-deploy/types"; -import { getAddresses } from "../src/addresses"; -import { isZeroAddress } from "./address"; +import { getAddresses } from "../../src/addresses"; +import { isZeroAddress } from "../address"; const func: DeployFunction = async (hre: HardhatRuntimeEnvironment) => { if ( diff --git a/lib/g-uni-v1-core/deploy/GUniPool.deploy.ts b/lib/g-uni-v1-core/deploy/pool/GUniPool.deploy.ts similarity index 92% rename from lib/g-uni-v1-core/deploy/GUniPool.deploy.ts rename to lib/g-uni-v1-core/deploy/pool/GUniPool.deploy.ts index 8319ea21f..9ba79f216 100644 --- a/lib/g-uni-v1-core/deploy/GUniPool.deploy.ts +++ b/lib/g-uni-v1-core/deploy/pool/GUniPool.deploy.ts @@ -1,8 +1,8 @@ import { deployments, getNamedAccounts } from "hardhat"; import { HardhatRuntimeEnvironment } from "hardhat/types"; import { DeployFunction } from "hardhat-deploy/types"; -import { getAddresses } from "../src/addresses"; -import { isZeroAddress } from "./address"; +import { getAddresses } from "../../src/addresses"; +import { isZeroAddress } from "../address"; const func: DeployFunction = async (hre: HardhatRuntimeEnvironment) => { if ( diff --git a/lib/g-uni-v1-core/package.json b/lib/g-uni-v1-core/package.json index 07129b739..08b5a8c01 100644 --- a/lib/g-uni-v1-core/package.json +++ b/lib/g-uni-v1-core/package.json @@ -4,7 +4,7 @@ "build": "yarn compile && npx tsc", "compile": "npx hardhat compile", "clean": "rm -rf dist && npx hardhat clean", - "deploy": "npx hardhat deploy ", + "deploy:pool": "npx hardhat deploy --deploy-scripts deploy/pool/ --write true", "format": "prettier --write .", "format:check": "prettier --check '*/**/*.{js,sol,json,md,ts}'", "lint": "eslint --cache . && yarn lint:sol", From 4989e57fb06f8b51e6c189e4e5dca0a943711938 Mon Sep 17 00:00:00 2001 From: Jem <0x0xjem@gmail.com> Date: Mon, 24 Jun 2024 16:03:36 +0400 Subject: [PATCH 04/29] Default RPC urls --- lib/g-uni-v1-core/hardhat.config.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/g-uni-v1-core/hardhat.config.ts b/lib/g-uni-v1-core/hardhat.config.ts index 8f0f80f6c..68dba3ebb 100644 --- a/lib/g-uni-v1-core/hardhat.config.ts +++ b/lib/g-uni-v1-core/hardhat.config.ts @@ -34,22 +34,22 @@ const config: HardhatUserConfig = { }, blastSepolia: { chainId: 168587773, - url: process.env.BLAST_SEPOLIA_RPC, + url: process.env.BLAST_SEPOLIA_RPC || "https://sepolia.blast.io", accounts: [process.env.DEPLOYER_PRIVATE_KEY ?? ""] }, arbitrumSepolia: { chainId: 421614, - url: process.env.ARBITRUM_SEPOLIA_RPC, + url: process.env.ARBITRUM_SEPOLIA_RPC || "https://sepolia-rollup.arbitrum.io/rpc", accounts: [process.env.DEPLOYER_PRIVATE_KEY ?? ""] }, modeSepolia: { chainId: 919, - url: process.env.MODE_SEPOLIA_RPC, + url: process.env.MODE_SEPOLIA_RPC || "https://sepolia.mode.network", accounts: [process.env.DEPLOYER_PRIVATE_KEY ?? ""] }, baseSepolia: { chainId: 84532, - url: process.env.BASE_SEPOLIA_RPC, + url: process.env.BASE_SEPOLIA_RPC || "https://sepolia.base.org", accounts: [process.env.DEPLOYER_PRIVATE_KEY ?? ""] }, }, From a19acce536bcfe336a189c7b0b1e6de71687c6f5 Mon Sep 17 00:00:00 2001 From: Jem <0x0xjem@gmail.com> Date: Mon, 24 Jun 2024 16:03:40 +0400 Subject: [PATCH 05/29] README --- lib/g-uni-v1-core/README.md | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/lib/g-uni-v1-core/README.md b/lib/g-uni-v1-core/README.md index cd2ce97a6..7f841ff25 100644 --- a/lib/g-uni-v1-core/README.md +++ b/lib/g-uni-v1-core/README.md @@ -128,3 +128,30 @@ Arguments: yarn yarn test + +## Setup + +```shell +yarn install +``` + +Set up environment variables: + +- Copy `.env.example` to `.env` +- Fill out environment variables + +## Deployment + +First, deploy the GUniPool, as that will serve as input to the GUniFactory: + +```shell +HARDHAT_NETWORK="" yarn run deploy:pool +``` + +TODO: need to copy/paste pool address? + +Then, deploy the GUniFactory: + +```shell +yarn run deploy:factory +``` From 1b87606a3037e1ae5f7c29b03d74db7b56a78f6a Mon Sep 17 00:00:00 2001 From: Jem <0x0xjem@gmail.com> Date: Mon, 24 Jun 2024 16:28:50 +0400 Subject: [PATCH 06/29] Deployment script uses tags instead of directory --- lib/g-uni-v1-core/deploy/{factory => }/GUniFactory.deploy.ts | 4 ++-- lib/g-uni-v1-core/deploy/{pool => }/GUniPool.deploy.ts | 4 ++-- lib/g-uni-v1-core/package.json | 3 ++- 3 files changed, 6 insertions(+), 5 deletions(-) rename lib/g-uni-v1-core/deploy/{factory => }/GUniFactory.deploy.ts (94%) rename lib/g-uni-v1-core/deploy/{pool => }/GUniPool.deploy.ts (92%) diff --git a/lib/g-uni-v1-core/deploy/factory/GUniFactory.deploy.ts b/lib/g-uni-v1-core/deploy/GUniFactory.deploy.ts similarity index 94% rename from lib/g-uni-v1-core/deploy/factory/GUniFactory.deploy.ts rename to lib/g-uni-v1-core/deploy/GUniFactory.deploy.ts index ecacacbc4..978d5f65b 100644 --- a/lib/g-uni-v1-core/deploy/factory/GUniFactory.deploy.ts +++ b/lib/g-uni-v1-core/deploy/GUniFactory.deploy.ts @@ -1,8 +1,8 @@ import { deployments, getNamedAccounts } from "hardhat"; import { HardhatRuntimeEnvironment } from "hardhat/types"; import { DeployFunction } from "hardhat-deploy/types"; -import { getAddresses } from "../../src/addresses"; -import { isZeroAddress } from "../address"; +import { getAddresses } from "../src/addresses"; +import { isZeroAddress } from "./address"; const func: DeployFunction = async (hre: HardhatRuntimeEnvironment) => { if ( diff --git a/lib/g-uni-v1-core/deploy/pool/GUniPool.deploy.ts b/lib/g-uni-v1-core/deploy/GUniPool.deploy.ts similarity index 92% rename from lib/g-uni-v1-core/deploy/pool/GUniPool.deploy.ts rename to lib/g-uni-v1-core/deploy/GUniPool.deploy.ts index 9ba79f216..8319ea21f 100644 --- a/lib/g-uni-v1-core/deploy/pool/GUniPool.deploy.ts +++ b/lib/g-uni-v1-core/deploy/GUniPool.deploy.ts @@ -1,8 +1,8 @@ import { deployments, getNamedAccounts } from "hardhat"; import { HardhatRuntimeEnvironment } from "hardhat/types"; import { DeployFunction } from "hardhat-deploy/types"; -import { getAddresses } from "../../src/addresses"; -import { isZeroAddress } from "../address"; +import { getAddresses } from "../src/addresses"; +import { isZeroAddress } from "./address"; const func: DeployFunction = async (hre: HardhatRuntimeEnvironment) => { if ( diff --git a/lib/g-uni-v1-core/package.json b/lib/g-uni-v1-core/package.json index 08b5a8c01..9dfa6019b 100644 --- a/lib/g-uni-v1-core/package.json +++ b/lib/g-uni-v1-core/package.json @@ -4,7 +4,8 @@ "build": "yarn compile && npx tsc", "compile": "npx hardhat compile", "clean": "rm -rf dist && npx hardhat clean", - "deploy:pool": "npx hardhat deploy --deploy-scripts deploy/pool/ --write true", + "deploy:pool": "npx hardhat deploy --tags GUniPool --write true", + "deploy:factory": "npx hardhat deploy --tags GUniFactory --write true", "format": "prettier --write .", "format:check": "prettier --check '*/**/*.{js,sol,json,md,ts}'", "lint": "eslint --cache . && yarn lint:sol", From 6d789de5a4c17bb3d7a884c4617d49558163cdee Mon Sep 17 00:00:00 2001 From: Jem <0x0xjem@gmail.com> Date: Mon, 24 Jun 2024 16:31:21 +0400 Subject: [PATCH 07/29] Logs and notes --- lib/g-uni-v1-core/README.md | 2 ++ lib/g-uni-v1-core/deploy/GUniFactory.deploy.ts | 2 ++ lib/g-uni-v1-core/deploy/GUniPool.deploy.ts | 2 ++ 3 files changed, 6 insertions(+) diff --git a/lib/g-uni-v1-core/README.md b/lib/g-uni-v1-core/README.md index 7f841ff25..4ed57c31f 100644 --- a/lib/g-uni-v1-core/README.md +++ b/lib/g-uni-v1-core/README.md @@ -155,3 +155,5 @@ Then, deploy the GUniFactory: ```shell yarn run deploy:factory ``` + +Note that these scripts will not deploy to a particular chain if there have been no changes to the contracts since the last deployment on that chain. To override this, pass the `--reset` flag. diff --git a/lib/g-uni-v1-core/deploy/GUniFactory.deploy.ts b/lib/g-uni-v1-core/deploy/GUniFactory.deploy.ts index 978d5f65b..0d1809677 100644 --- a/lib/g-uni-v1-core/deploy/GUniFactory.deploy.ts +++ b/lib/g-uni-v1-core/deploy/GUniFactory.deploy.ts @@ -49,6 +49,8 @@ const func: DeployFunction = async (hre: HardhatRuntimeEnvironment) => { }, args: [addresses.UniswapV3Factory], }); + + console.log("Deployment of GUniFactory complete"); }; func.skip = async (hre: HardhatRuntimeEnvironment) => { diff --git a/lib/g-uni-v1-core/deploy/GUniPool.deploy.ts b/lib/g-uni-v1-core/deploy/GUniPool.deploy.ts index 8319ea21f..459b0c5cf 100644 --- a/lib/g-uni-v1-core/deploy/GUniPool.deploy.ts +++ b/lib/g-uni-v1-core/deploy/GUniPool.deploy.ts @@ -32,6 +32,8 @@ const func: DeployFunction = async (hre: HardhatRuntimeEnvironment) => { from: deployer, args: [addresses.Gelato], }); + + console.log("Deployment of GUniPool complete"); }; func.skip = async (hre: HardhatRuntimeEnvironment) => { From e7b85c588f66d4aae332d10b816087ff69832745 Mon Sep 17 00:00:00 2001 From: Jem <0x0xjem@gmail.com> Date: Mon, 24 Jun 2024 16:38:28 +0400 Subject: [PATCH 08/29] Log deployment address. Update docs. --- lib/g-uni-v1-core/README.md | 20 +++++++++---------- .../deploy/GUniFactory.deploy.ts | 4 ++-- lib/g-uni-v1-core/deploy/GUniPool.deploy.ts | 4 ++-- 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/lib/g-uni-v1-core/README.md b/lib/g-uni-v1-core/README.md index 4ed57c31f..409d90094 100644 --- a/lib/g-uni-v1-core/README.md +++ b/lib/g-uni-v1-core/README.md @@ -142,18 +142,18 @@ Set up environment variables: ## Deployment -First, deploy the GUniPool, as that will serve as input to the GUniFactory: +1. Ensure that the `Gelato`, `GelatoDevMultiSig` and `UniswapV3Factory` addresses are set in `src/addresses.ts` for the target chain. +1. Deploy the GUniPool, as that will serve as input to the GUniFactory: -```shell -HARDHAT_NETWORK="" yarn run deploy:pool -``` - -TODO: need to copy/paste pool address? + ```shell + HARDHAT_NETWORK="" yarn run deploy:pool + ``` -Then, deploy the GUniFactory: +1. Copy the address of the GUniPool (output to the terminal) into the value of the `GUniImplementation` key in `src/addresses.ts` for the target chain. +1. Deploy the GUniFactory: -```shell -yarn run deploy:factory -``` + ```shell + HARDHAT_NETWORK="" yarn run deploy:factory + ``` Note that these scripts will not deploy to a particular chain if there have been no changes to the contracts since the last deployment on that chain. To override this, pass the `--reset` flag. diff --git a/lib/g-uni-v1-core/deploy/GUniFactory.deploy.ts b/lib/g-uni-v1-core/deploy/GUniFactory.deploy.ts index 0d1809677..127be8711 100644 --- a/lib/g-uni-v1-core/deploy/GUniFactory.deploy.ts +++ b/lib/g-uni-v1-core/deploy/GUniFactory.deploy.ts @@ -31,7 +31,7 @@ const func: DeployFunction = async (hre: HardhatRuntimeEnvironment) => { throw new Error("GUniImplementation (pool implementation) address not set"); } - await deploy("GUniFactory", { + const result = await deploy("GUniFactory", { from: deployer, proxy: { proxyContract: "EIP173Proxy", @@ -50,7 +50,7 @@ const func: DeployFunction = async (hre: HardhatRuntimeEnvironment) => { args: [addresses.UniswapV3Factory], }); - console.log("Deployment of GUniFactory complete"); + console.log("GUniFactory deployed to:", result.address); }; func.skip = async (hre: HardhatRuntimeEnvironment) => { diff --git a/lib/g-uni-v1-core/deploy/GUniPool.deploy.ts b/lib/g-uni-v1-core/deploy/GUniPool.deploy.ts index 459b0c5cf..8026aee52 100644 --- a/lib/g-uni-v1-core/deploy/GUniPool.deploy.ts +++ b/lib/g-uni-v1-core/deploy/GUniPool.deploy.ts @@ -28,12 +28,12 @@ const func: DeployFunction = async (hre: HardhatRuntimeEnvironment) => { throw new Error("Deployer address not set"); } - await deploy("GUniPool", { + const result = await deploy("GUniPool", { from: deployer, args: [addresses.Gelato], }); - console.log("Deployment of GUniPool complete"); + console.log("GUniPool deployed to:", result.address); }; func.skip = async (hre: HardhatRuntimeEnvironment) => { From d649d62169e7d99f25b27f47e75600584f5f8565 Mon Sep 17 00:00:00 2001 From: Jem <0x0xjem@gmail.com> Date: Mon, 24 Jun 2024 17:34:44 +0400 Subject: [PATCH 09/29] Verification works --- lib/g-uni-v1-core/README.md | 12 ++++++++++++ lib/g-uni-v1-core/hardhat.config.ts | 13 ++++++++----- lib/g-uni-v1-core/package.json | 2 +- lib/g-uni-v1-core/yarn.lock | 8 ++++---- 4 files changed, 25 insertions(+), 10 deletions(-) diff --git a/lib/g-uni-v1-core/README.md b/lib/g-uni-v1-core/README.md index 409d90094..9f9eec8c6 100644 --- a/lib/g-uni-v1-core/README.md +++ b/lib/g-uni-v1-core/README.md @@ -157,3 +157,15 @@ Set up environment variables: ``` Note that these scripts will not deploy to a particular chain if there have been no changes to the contracts since the last deployment on that chain. To override this, pass the `--reset` flag. + +## Verification + +1. Verify the contracts: + + ```shell + HARDHAT_NETWORK="" yarn run verify + ``` + + - If hardhat reports that a network is not supported, specify the API url using `--api-url ` + +NOTE: The GUniFactory contract will require additional steps to enable it to be viewed as a proxy. diff --git a/lib/g-uni-v1-core/hardhat.config.ts b/lib/g-uni-v1-core/hardhat.config.ts index 68dba3ebb..3c189122a 100644 --- a/lib/g-uni-v1-core/hardhat.config.ts +++ b/lib/g-uni-v1-core/hardhat.config.ts @@ -30,27 +30,27 @@ const config: HardhatUserConfig = { anvil: { chainId: 31337, url: "http://localhost:8545", - accounts: [process.env.ANVIL_PRIVATE_KEY ?? ""] + accounts: [process.env.ANVIL_PRIVATE_KEY ?? ""], }, blastSepolia: { chainId: 168587773, url: process.env.BLAST_SEPOLIA_RPC || "https://sepolia.blast.io", - accounts: [process.env.DEPLOYER_PRIVATE_KEY ?? ""] + accounts: [process.env.DEPLOYER_PRIVATE_KEY ?? ""], }, arbitrumSepolia: { chainId: 421614, url: process.env.ARBITRUM_SEPOLIA_RPC || "https://sepolia-rollup.arbitrum.io/rpc", - accounts: [process.env.DEPLOYER_PRIVATE_KEY ?? ""] + accounts: [process.env.DEPLOYER_PRIVATE_KEY ?? ""], }, modeSepolia: { chainId: 919, url: process.env.MODE_SEPOLIA_RPC || "https://sepolia.mode.network", - accounts: [process.env.DEPLOYER_PRIVATE_KEY ?? ""] + accounts: [process.env.DEPLOYER_PRIVATE_KEY ?? ""], }, baseSepolia: { chainId: 84532, url: process.env.BASE_SEPOLIA_RPC || "https://sepolia.base.org", - accounts: [process.env.DEPLOYER_PRIVATE_KEY ?? ""] + accounts: [process.env.DEPLOYER_PRIVATE_KEY ?? ""], }, }, @@ -75,6 +75,9 @@ const config: HardhatUserConfig = { outDir: "typechain", target: "ethers-v5", }, + etherscan: { + apiKey: process.env[`${process.env.HARDHAT_NETWORK}_ETHERSCAN_API_KEY`], + } }; export default config; diff --git a/lib/g-uni-v1-core/package.json b/lib/g-uni-v1-core/package.json index 9dfa6019b..e76c91924 100644 --- a/lib/g-uni-v1-core/package.json +++ b/lib/g-uni-v1-core/package.json @@ -37,7 +37,7 @@ "ethereum-waffle": "3.3.0", "ethers": "5.1.4", "hardhat": "2.3.0", - "hardhat-deploy": "0.9.14", + "hardhat-deploy": "0.10.0", "husky": "6.0.0", "lint-staged": "11.0.0", "node-fetch": "2.6.1", diff --git a/lib/g-uni-v1-core/yarn.lock b/lib/g-uni-v1-core/yarn.lock index f1190a51e..c684243a5 100644 --- a/lib/g-uni-v1-core/yarn.lock +++ b/lib/g-uni-v1-core/yarn.lock @@ -5120,10 +5120,10 @@ har-validator@~5.1.3: ajv "^6.12.3" har-schema "^2.0.0" -hardhat-deploy@0.9.14: - version "0.9.14" - resolved "https://registry.yarnpkg.com/hardhat-deploy/-/hardhat-deploy-0.9.14.tgz#88c07497efd14cfca6f9fed1574f0bad65f0a8a0" - integrity sha512-mCwXeXdqtrQN8dL1gOnoGUh0z9Jylfsh56UNVZJC0c8AhjlwjLPgGE3pzNmMuyy88pj9OX4qo53X57bW2W7NJQ== +hardhat-deploy@0.10.0: + version "0.10.0" + resolved "https://registry.yarnpkg.com/hardhat-deploy/-/hardhat-deploy-0.10.0.tgz#6b98790010dd3f1f362c4ad45207e43c8511eadd" + integrity sha512-C6p0IvdK2CK0fIsdUK0dM+nuhCmDvuL8fi19RUPeSMMfl7BityJArAzVbJt5f68VJ3CZRMa5WV7aSc8M8sNHvg== dependencies: "@ethersproject/abi" "^5.4.0" "@ethersproject/abstract-signer" "^5.4.1" From e3519f24b346606d0c395685db800aaf3482db38 Mon Sep 17 00:00:00 2001 From: Jem <0x0xjem@gmail.com> Date: Mon, 24 Jun 2024 17:35:31 +0400 Subject: [PATCH 10/29] Updated deployment on arbitrum sepolia --- .../arbitrumSepolia/GUniFactory.json | 57 ++++++++++--------- .../GUniFactory_Implementation.json | 23 ++++---- .../arbitrumSepolia/GUniFactory_Proxy.json | 53 ++++++++--------- .../deployments/arbitrumSepolia/GUniPool.json | 19 ++++--- lib/g-uni-v1-core/src/addresses.ts | 16 +++--- 5 files changed, 86 insertions(+), 82 deletions(-) diff --git a/lib/g-uni-v1-core/deployments/arbitrumSepolia/GUniFactory.json b/lib/g-uni-v1-core/deployments/arbitrumSepolia/GUniFactory.json index 3602a4afe..2ee9e4266 100644 --- a/lib/g-uni-v1-core/deployments/arbitrumSepolia/GUniFactory.json +++ b/lib/g-uni-v1-core/deployments/arbitrumSepolia/GUniFactory.json @@ -1,5 +1,5 @@ { - "address": "0x39AC4439e6CB9427C073259e5742529cE46DD663", + "address": "0x7f502e91182338F19CB6F4B02B33B33feD1c5000", "abi": [ { "anonymous": false, @@ -640,56 +640,57 @@ "type": "constructor" } ], - "transactionHash": "0xa994440a2ad7747eb9c88bea6b326358d7d24f1d345f0ed3b425561b05cf824f", + "transactionHash": "0x9b83e7b0549ce4adfcc2ffbdfb847572df815ca36cb5951ffecf2136042ff281", "receipt": { "to": null, - "from": "0xB47C8e4bEb28af80eDe5E5bF474927b110Ef2c0e", - "contractAddress": "0x39AC4439e6CB9427C073259e5742529cE46DD663", - "transactionIndex": 4, - "gasUsed": "1375415", - "logsBloom": "0x00100000000020000000000000000000000000000000000000000000000000000000000000020000000400000000000000000000000000000000000000000000000000000000000000000000000008000000000000000000000400000200000000000000020010000000000000000800000000002000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000200000000000000080000000000000000000000000000000000000000000000000010000000000000000000000000000020000000000000000000080400000000000000000000000000000000000000000000", - "blockHash": "0xf5b7b2abe69c5722bd1b5142d00597648f1d6aeb9e41fe577400c4451de3259b", - "transactionHash": "0xa994440a2ad7747eb9c88bea6b326358d7d24f1d345f0ed3b425561b05cf824f", + "from": "0x5fCfdc65044bf008A6b473512D34102282Ee43a6", + "contractAddress": "0x7f502e91182338F19CB6F4B02B33B33feD1c5000", + "transactionIndex": 3, + "gasUsed": "6114773", + "logsBloom": "0x00101000000020000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000400000000000000000000000000000000000000000000000008008000000000000000000000000000200000000000000020000000001000000000800000000002000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000100000200000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000020000000000000000000000400000000000000000000000000000000000000000000", + "blockHash": "0xf177e051cdb89f5b045dfa101135f95bd01e47ac4dc9fb9096403347f9c6c7e0", + "transactionHash": "0x9b83e7b0549ce4adfcc2ffbdfb847572df815ca36cb5951ffecf2136042ff281", "logs": [ { - "transactionIndex": 4, - "blockNumber": 53304410, - "transactionHash": "0xa994440a2ad7747eb9c88bea6b326358d7d24f1d345f0ed3b425561b05cf824f", - "address": "0x39AC4439e6CB9427C073259e5742529cE46DD663", + "transactionIndex": 3, + "blockNumber": 57912178, + "transactionHash": "0x9b83e7b0549ce4adfcc2ffbdfb847572df815ca36cb5951ffecf2136042ff281", + "address": "0x7f502e91182338F19CB6F4B02B33B33feD1c5000", "topics": [ "0x5570d70a002632a7b0b3c9304cc89efb62d8da9eca0dbd7752c83b7379068296", "0x0000000000000000000000000000000000000000000000000000000000000000", - "0x00000000000000000000000090608f57161ac771b28fb0adcd2434cfa1463201" + "0x0000000000000000000000009ff468bd1de89f0229193f1f8f0ba0e265ba026a" ], "data": "0x", - "logIndex": 4, - "blockHash": "0xf5b7b2abe69c5722bd1b5142d00597648f1d6aeb9e41fe577400c4451de3259b" + "logIndex": 6, + "blockHash": "0xf177e051cdb89f5b045dfa101135f95bd01e47ac4dc9fb9096403347f9c6c7e0" }, { - "transactionIndex": 4, - "blockNumber": 53304410, - "transactionHash": "0xa994440a2ad7747eb9c88bea6b326358d7d24f1d345f0ed3b425561b05cf824f", - "address": "0x39AC4439e6CB9427C073259e5742529cE46DD663", + "transactionIndex": 3, + "blockNumber": 57912178, + "transactionHash": "0x9b83e7b0549ce4adfcc2ffbdfb847572df815ca36cb5951ffecf2136042ff281", + "address": "0x7f502e91182338F19CB6F4B02B33B33feD1c5000", "topics": [ "0xdf435d422321da6b195902d70fc417c06a32f88379c20dd8f2a8da07088cec29", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x000000000000000000000000b47c8e4beb28af80ede5e5bf474927b110ef2c0e" ], "data": "0x", - "logIndex": 5, - "blockHash": "0xf5b7b2abe69c5722bd1b5142d00597648f1d6aeb9e41fe577400c4451de3259b" + "logIndex": 7, + "blockHash": "0xf177e051cdb89f5b045dfa101135f95bd01e47ac4dc9fb9096403347f9c6c7e0" } ], - "blockNumber": 53304410, - "cumulativeGasUsed": "2551868", + "blockNumber": 57912178, + "cumulativeGasUsed": "9556108", "status": 1, "byzantium": true }, "args": [ - "0x90608F57161aC771b28fb0adCd2434cfa1463201", + "0x9ff468bd1De89F0229193F1F8f0bA0e265bA026a", "0xB47C8e4bEb28af80eDe5E5bF474927b110Ef2c0e", - "0xc0c53b8b00000000000000000000000090608f57161ac771b28fb0adcd2434cfa1463201000000000000000000000000b47c8e4beb28af80ede5e5bf474927b110ef2c0e000000000000000000000000b47c8e4beb28af80ede5e5bf474927b110ef2c0e" + "0xc0c53b8b000000000000000000000000ce7427a94bc9b8a90e2c8d91cb0247d779819437000000000000000000000000b47c8e4beb28af80ede5e5bf474927b110ef2c0e000000000000000000000000b47c8e4beb28af80ede5e5bf474927b110ef2c0e" ], + "numDeployments": 1, "solcInputHash": "f1f932b5297d788fce5c0abb03e1e395", "metadata": "{\"compiler\":{\"version\":\"0.8.19+commit.7dd6d404\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"implementationAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"adminAddress\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"stateMutability\":\"payable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousAdmin\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newAdmin\",\"type\":\"address\"}],\"name\":\"ProxyAdminTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousImplementation\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"ProxyImplementationUpdated\",\"type\":\"event\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"inputs\":[],\"name\":\"proxyAdmin\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"id\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newAdmin\",\"type\":\"address\"}],\"name\":\"transferProxyAdmin\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"upgradeTo\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"upgradeToAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"notice\":\"Proxy implementing EIP173 for ownership management\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/vendor/proxy/EIP173Proxy.sol\":\"EIP173Proxy\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":1},\"remappings\":[]},\"sources\":{\"contracts/vendor/proxy/EIP173Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity 0.8.19;\\n\\nimport \\\"./Proxy.sol\\\";\\n\\ninterface ERC165 {\\n function supportsInterface(bytes4 id) external view returns (bool);\\n}\\n\\n///@notice Proxy implementing EIP173 for ownership management\\ncontract EIP173Proxy is Proxy {\\n // ////////////////////////// EVENTS ///////////////////////////////////////////////////////////////////////\\n\\n event ProxyAdminTransferred(\\n address indexed previousAdmin,\\n address indexed newAdmin\\n );\\n\\n // /////////////////////// CONSTRUCTOR //////////////////////////////////////////////////////////////////////\\n\\n constructor(\\n address implementationAddress,\\n address adminAddress,\\n bytes memory data\\n ) payable {\\n _setImplementation(implementationAddress, data);\\n _setProxyAdmin(adminAddress);\\n }\\n\\n // ///////////////////// EXTERNAL ///////////////////////////////////////////////////////////////////////////\\n\\n function proxyAdmin() external view returns (address) {\\n return _proxyAdmin();\\n }\\n\\n function supportsInterface(bytes4 id) external view returns (bool) {\\n if (id == 0x01ffc9a7 || id == 0x7f5828d0) {\\n return true;\\n }\\n if (id == 0xFFFFFFFF) {\\n return false;\\n }\\n\\n ERC165 implementation;\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n implementation := sload(\\n 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc\\n )\\n }\\n\\n // Technically this is not standard compliant as ERC-165 require 30,000 gas which that call cannot ensure\\n // because it is itself inside `supportsInterface` that might only get 30,000 gas.\\n // In practise this is unlikely to be an issue.\\n try implementation.supportsInterface(id) returns (bool support) {\\n return support;\\n } catch {\\n return false;\\n }\\n }\\n\\n function transferProxyAdmin(address newAdmin) external onlyProxyAdmin {\\n _setProxyAdmin(newAdmin);\\n }\\n\\n function upgradeTo(address newImplementation) external onlyProxyAdmin {\\n _setImplementation(newImplementation, \\\"\\\");\\n }\\n\\n function upgradeToAndCall(address newImplementation, bytes calldata data)\\n external\\n payable\\n onlyProxyAdmin\\n {\\n _setImplementation(newImplementation, data);\\n }\\n\\n // /////////////////////// MODIFIERS ////////////////////////////////////////////////////////////////////////\\n\\n modifier onlyProxyAdmin() {\\n require(msg.sender == _proxyAdmin(), \\\"NOT_AUTHORIZED\\\");\\n _;\\n }\\n\\n // ///////////////////////// INTERNAL //////////////////////////////////////////////////////////////////////\\n\\n function _proxyAdmin() internal view returns (address adminAddress) {\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n adminAddress := sload(\\n 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103\\n )\\n }\\n }\\n\\n function _setProxyAdmin(address newAdmin) internal {\\n address previousAdmin = _proxyAdmin();\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n sstore(\\n 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103,\\n newAdmin\\n )\\n }\\n emit ProxyAdminTransferred(previousAdmin, newAdmin);\\n }\\n}\\n\",\"keccak256\":\"0x3e2e1473604e7e42e99f77ad5e5d8eb8a3b6d0e63c154a9c6d9a223190372070\",\"license\":\"GPL-3.0\"},\"contracts/vendor/proxy/Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity 0.8.19;\\n\\n// EIP-1967\\nabstract contract Proxy {\\n // /////////////////////// EVENTS ///////////////////////////////////////////////////////////////////////////\\n\\n event ProxyImplementationUpdated(\\n address indexed previousImplementation,\\n address indexed newImplementation\\n );\\n\\n // ///////////////////// EXTERNAL ///////////////////////////////////////////////////////////////////////////\\n\\n // prettier-ignore\\n receive() external payable virtual {\\n revert(\\\"ETHER_REJECTED\\\"); // explicit reject by default\\n }\\n\\n fallback() external payable {\\n _fallback();\\n }\\n\\n // ///////////////////////// INTERNAL //////////////////////////////////////////////////////////////////////\\n\\n function _fallback() internal {\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n let implementationAddress := sload(\\n 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc\\n )\\n calldatacopy(0x0, 0x0, calldatasize())\\n let success := delegatecall(\\n gas(),\\n implementationAddress,\\n 0x0,\\n calldatasize(),\\n 0,\\n 0\\n )\\n let retSz := returndatasize()\\n returndatacopy(0, 0, retSz)\\n switch success\\n case 0 {\\n revert(0, retSz)\\n }\\n default {\\n return(0, retSz)\\n }\\n }\\n }\\n\\n function _setImplementation(address newImplementation, bytes memory data)\\n internal\\n {\\n address previousImplementation;\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n previousImplementation := sload(\\n 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc\\n )\\n }\\n\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n sstore(\\n 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc,\\n newImplementation\\n )\\n }\\n\\n emit ProxyImplementationUpdated(\\n previousImplementation,\\n newImplementation\\n );\\n\\n if (data.length > 0) {\\n (bool success, ) = newImplementation.delegatecall(data);\\n if (!success) {\\n assembly {\\n // This assembly ensure the revert contains the exact string data\\n let returnDataSize := returndatasize()\\n returndatacopy(0, 0, returnDataSize)\\n revert(0, returnDataSize)\\n }\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0x5fd4f538f92f377d4e7b09fe8d5387eb1d5ff5ac95869c969be5049ae23439ba\",\"license\":\"GPL-3.0\"}},\"version\":1}", "bytecode": "0x6080604052604051610992380380610992833981016040819052610022916101de565b61002c838261003d565b61003582610119565b5050506102ca565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc8054908390556040516001600160a01b0380851691908316907f5570d70a002632a7b0b3c9304cc89efb62d8da9eca0dbd7752c83b737906829690600090a3815115610114576000836001600160a01b0316836040516100be91906102ae565b600060405180830381855af49150503d80600081146100f9576040519150601f19603f3d011682016040523d82523d6000602084013e6100fe565b606091505b5050905080610112573d806000803e806000fd5b505b505050565b60006101316000805160206109728339815191525490565b90508160008051602061097283398151915255816001600160a01b0316816001600160a01b03167fdf435d422321da6b195902d70fc417c06a32f88379c20dd8f2a8da07088cec2960405160405180910390a35050565b80516001600160a01b038116811461019f57600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60005b838110156101d55781810151838201526020016101bd565b50506000910152565b6000806000606084860312156101f357600080fd5b6101fc84610188565b925061020a60208501610188565b60408501519092506001600160401b038082111561022757600080fd5b818601915086601f83011261023b57600080fd5b81518181111561024d5761024d6101a4565b604051601f8201601f19908116603f01168101908382118183101715610275576102756101a4565b8160405282815289602084870101111561028e57600080fd5b61029f8360208301602088016101ba565b80955050505050509250925092565b600082516102c08184602087016101ba565b9190910192915050565b610699806102d96000396000f3fe60806040526004361061004e5760003560e01c806301ffc9a71461009b5780633659cfe6146100d05780633e47158c146100f05780634f1ef2861461011d5780638356ca4f1461013057610091565b366100915760405162461bcd60e51b815260206004820152600e60248201526d115512115497d491529150d5115160921b60448201526064015b60405180910390fd5b610099610150565b005b3480156100a757600080fd5b506100bb6100b63660046104c7565b610189565b60405190151581526020015b60405180910390f35b3480156100dc57600080fd5b506100996100eb36600461050d565b61026f565b3480156100fc57600080fd5b506101056102c3565b6040516001600160a01b0390911681526020016100c7565b61009961012b366004610528565b6102d2565b34801561013c57600080fd5b5061009961014b36600461050d565b61034f565b6000805160206106448339815191525460003681823780813683855af491503d8082833e82801561017f578183f35b8183fd5b50505050565b60006301ffc9a760e01b6001600160e01b0319831614806101ba57506307f5828d60e41b6001600160e01b03198316145b156101c757506001919050565b6001600160e01b031980831690036101e157506000919050565b600080516020610644833981519152546040516301ffc9a760e01b81526001600160e01b0319841660048201526001600160a01b038216906301ffc9a790602401602060405180830381865afa92505050801561025b575060408051601f3d908101601f19168201909252610258918101906105aa565b60015b6102685750600092915050565b9392505050565b610277610390565b6001600160a01b0316336001600160a01b0316146102a75760405162461bcd60e51b8152600401610088906105cc565b6102c081604051806020016040528060008152506103a3565b50565b60006102cd610390565b905090565b6102da610390565b6001600160a01b0316336001600160a01b03161461030a5760405162461bcd60e51b8152600401610088906105cc565b61034a8383838080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506103a392505050565b505050565b610357610390565b6001600160a01b0316336001600160a01b0316146103875760405162461bcd60e51b8152600401610088906105cc565b6102c081610466565b6000805160206106248339815191525490565b6000805160206106448339815191528054908390556040516001600160a01b0380851691908316907f5570d70a002632a7b0b3c9304cc89efb62d8da9eca0dbd7752c83b737906829690600090a381511561034a576000836001600160a01b03168360405161041291906105f4565b600060405180830381855af49150503d806000811461044d576040519150601f19603f3d011682016040523d82523d6000602084013e610452565b606091505b5050905080610183573d806000803e806000fd5b6000610470610390565b90508160008051602061062483398151915255816001600160a01b0316816001600160a01b03167fdf435d422321da6b195902d70fc417c06a32f88379c20dd8f2a8da07088cec2960405160405180910390a35050565b6000602082840312156104d957600080fd5b81356001600160e01b03198116811461026857600080fd5b80356001600160a01b038116811461050857600080fd5b919050565b60006020828403121561051f57600080fd5b610268826104f1565b60008060006040848603121561053d57600080fd5b610546846104f1565b925060208401356001600160401b038082111561056257600080fd5b818601915086601f83011261057657600080fd5b81358181111561058557600080fd5b87602082850101111561059757600080fd5b6020830194508093505050509250925092565b6000602082840312156105bc57600080fd5b8151801515811461026857600080fd5b6020808252600e908201526d1393d517d055551213d49256915160921b604082015260600190565b6000825160005b8181101561061557602081860181015185830152016105fb565b50600092019182525091905056feb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbca2646970667358221220f8092c6d4e38cdaacdb3c899e6c75d21baaeaba76b22f353673f931b1f0f8a9b64736f6c63430008130033b53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103", @@ -697,12 +698,12 @@ "execute": { "methodName": "initialize", "args": [ - "0x90608F57161aC771b28fb0adCd2434cfa1463201", + "0xCE7427a94bc9B8A90E2C8d91cB0247D779819437", "0xB47C8e4bEb28af80eDe5E5bF474927b110Ef2c0e", "0xB47C8e4bEb28af80eDe5E5bF474927b110Ef2c0e" ] }, - "implementation": "0x90608F57161aC771b28fb0adCd2434cfa1463201", + "implementation": "0x9ff468bd1De89F0229193F1F8f0bA0e265bA026a", "devdoc": { "kind": "dev", "methods": {}, diff --git a/lib/g-uni-v1-core/deployments/arbitrumSepolia/GUniFactory_Implementation.json b/lib/g-uni-v1-core/deployments/arbitrumSepolia/GUniFactory_Implementation.json index f6e4f9aef..4e70e8319 100644 --- a/lib/g-uni-v1-core/deployments/arbitrumSepolia/GUniFactory_Implementation.json +++ b/lib/g-uni-v1-core/deployments/arbitrumSepolia/GUniFactory_Implementation.json @@ -1,5 +1,5 @@ { - "address": "0x90608F57161aC771b28fb0adCd2434cfa1463201", + "address": "0x9ff468bd1De89F0229193F1F8f0bA0e265bA026a", "abi": [ { "inputs": [ @@ -508,25 +508,26 @@ "type": "function" } ], - "transactionHash": "0x0ddae94495bea4ad45f3cf0bd0c7f3df1517ed5e13c1ed7135738305f91e92dc", + "transactionHash": "0xa08927fd8eb46642fd2ac115535f998f40a36ecb273a4e2662802b6a4c9130f2", "receipt": { "to": null, - "from": "0xB47C8e4bEb28af80eDe5E5bF474927b110Ef2c0e", - "contractAddress": "0x90608F57161aC771b28fb0adCd2434cfa1463201", - "transactionIndex": 3, - "gasUsed": "4839221", + "from": "0x5fCfdc65044bf008A6b473512D34102282Ee43a6", + "contractAddress": "0x9ff468bd1De89F0229193F1F8f0bA0e265bA026a", + "transactionIndex": 1, + "gasUsed": "19792719", "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x8bf57b4c77eff10abe629c05e512a69be9f81ce267bdda90c3cd31220ea59624", - "transactionHash": "0x0ddae94495bea4ad45f3cf0bd0c7f3df1517ed5e13c1ed7135738305f91e92dc", + "blockHash": "0x17695cd8d27ba4b0d7bbdbdaa2a05d55db91f1914cb61ebbfb1eaec48730a3e4", + "transactionHash": "0xa08927fd8eb46642fd2ac115535f998f40a36ecb273a4e2662802b6a4c9130f2", "logs": [], - "blockNumber": 53304307, - "cumulativeGasUsed": "5320219", + "blockNumber": 57912155, + "cumulativeGasUsed": "19792719", "status": 1, "byzantium": true }, "args": [ - "0x2dCC5a88A861FB73613153F82CF801cd09E72a5F" + "0x248AB79Bbb9bC29bB72f7Cd42F17e054Fc40188e" ], + "numDeployments": 1, "solcInputHash": "f1f932b5297d788fce5c0abb03e1e395", "metadata": "{\"compiler\":{\"version\":\"0.8.19+commit.7dd6d404\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_uniswapV3Factory\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousManager\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newManager\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"uniPool\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"manager\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"pool\",\"type\":\"address\"}],\"name\":\"PoolCreated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"previosGelatoDeployer\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newGelatoDeployer\",\"type\":\"address\"}],\"name\":\"UpdateGelatoDeployer\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"previousImplementation\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"UpdatePoolImplementation\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"tokenA\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"tokenB\",\"type\":\"address\"},{\"internalType\":\"uint24\",\"name\":\"uniFee\",\"type\":\"uint24\"},{\"internalType\":\"uint16\",\"name\":\"managerFee\",\"type\":\"uint16\"},{\"internalType\":\"int24\",\"name\":\"lowerTick\",\"type\":\"int24\"},{\"internalType\":\"int24\",\"name\":\"upperTick\",\"type\":\"int24\"}],\"name\":\"createManagedPool\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"pool\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"tokenA\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"tokenB\",\"type\":\"address\"},{\"internalType\":\"uint24\",\"name\":\"uniFee\",\"type\":\"uint24\"},{\"internalType\":\"int24\",\"name\":\"lowerTick\",\"type\":\"int24\"},{\"internalType\":\"int24\",\"name\":\"upperTick\",\"type\":\"int24\"}],\"name\":\"createPool\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"pool\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"factory\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"gelatoDeployer\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getDeployers\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getGelatoPools\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"deployer\",\"type\":\"address\"}],\"name\":\"getPools\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"pool\",\"type\":\"address\"}],\"name\":\"getProxyAdmin\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token0\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"token1\",\"type\":\"address\"}],\"name\":\"getTokenName\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_implementation\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_gelatoDeployer\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_manager_\",\"type\":\"address\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"pool\",\"type\":\"address\"}],\"name\":\"isPoolImmutable\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"pools\",\"type\":\"address[]\"}],\"name\":\"makePoolsImmutable\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"manager\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"numDeployers\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"numPools\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"result\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"deployer\",\"type\":\"address\"}],\"name\":\"numPools\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"poolImplementation\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"nextGelatoDeployer\",\"type\":\"address\"}],\"name\":\"setGelatoDeployer\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"nextImplementation\",\"type\":\"address\"}],\"name\":\"setPoolImplementation\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"pools\",\"type\":\"address[]\"}],\"name\":\"upgradePools\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"pools\",\"type\":\"address[]\"},{\"internalType\":\"bytes[]\",\"name\":\"datas\",\"type\":\"bytes[]\"}],\"name\":\"upgradePoolsAndCall\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"version\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"createManagedPool(address,address,uint24,uint16,int24,int24)\":{\"params\":{\"lowerTick\":\"initial lower bound of the Uniswap V3 position\",\"managerFee\":\"proportion of earned fees that go to pool manager in Basis Points\",\"tokenA\":\"one of the tokens in the uniswap pair\",\"tokenB\":\"the other token in the uniswap pair\",\"uniFee\":\"fee tier of the uniswap pair\",\"upperTick\":\"initial upper bound of the Uniswap V3 position\"},\"returns\":{\"pool\":\"the address of the newly created G-UNI pool (proxy)\"}},\"createPool(address,address,uint24,int24,int24)\":{\"params\":{\"lowerTick\":\"initial lower bound of the Uniswap V3 position\",\"tokenA\":\"one of the tokens in the uniswap pair\",\"tokenB\":\"the other token in the uniswap pair\",\"uniFee\":\"fee tier of the uniswap pair\",\"upperTick\":\"initial upper bound of the Uniswap V3 position\"},\"returns\":{\"pool\":\"the address of the newly created G-UNI pool (proxy)\"}},\"getDeployers()\":{\"returns\":{\"_0\":\"deployers the list of deployer addresses\"}},\"getGelatoPools()\":{\"returns\":{\"_0\":\"list of Gelato managed G-UNI pool addresses\"}},\"getPools(address)\":{\"params\":{\"deployer\":\"address that has potentially deployed G-UNI pools (can return empty array)\"},\"returns\":{\"_0\":\"pools the list of G-UNI pool addresses deployed by `deployer`\"}},\"getProxyAdmin(address)\":{\"params\":{\"pool\":\"address of the G-UNI pool\"},\"returns\":{\"_0\":\"address that controls the G-UNI implementation (has power to upgrade it)\"}},\"isPoolImmutable(address)\":{\"params\":{\"pool\":\"address of the G-UNI pool\"},\"returns\":{\"_0\":\"bool signaling if pool is immutable (true) or not (false)\"}},\"manager()\":{\"details\":\"Returns the address of the current manager.\"},\"numDeployers()\":{\"returns\":{\"_0\":\"total number of G-UNI pool deployer addresses\"}},\"numPools()\":{\"returns\":{\"result\":\"total number of G-UNI pools deployed\"}},\"numPools(address)\":{\"params\":{\"deployer\":\"deployer address\"},\"returns\":{\"_0\":\"total number of G-UNI pools deployed by `deployer`\"}},\"renounceOwnership()\":{\"details\":\"Leaves the contract without manager. It will not be possible to call `onlyManager` functions anymore. Can only be called by the current manager. NOTE: Renouncing ownership will leave the contract without an manager, thereby removing any functionality that is only available to the manager.\"},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current manager.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"createManagedPool(address,address,uint24,uint16,int24,int24)\":{\"notice\":\"createManagedPool creates a new instance of a G-UNI token on a specified UniswapV3Pool. The msg.sender is the initial manager of the pool and will forever be associated with the G-UNI pool as it's `deployer`\"},\"createPool(address,address,uint24,int24,int24)\":{\"notice\":\"createPool creates a new instance of a G-UNI token on a specified UniswapV3Pool. Here the manager role is immediately burned, however msg.sender will still forever be associated with the G-UNI pool as it's `deployer`\"},\"getDeployers()\":{\"notice\":\"getDeployers fetches all addresses that have deployed a G-UNI pool\"},\"getGelatoPools()\":{\"notice\":\"getGelatoPools gets all the G-UNI pools deployed by Gelato's default deployer address (since anyone can deploy and manage G-UNI pools)\"},\"getPools(address)\":{\"notice\":\"getPools fetches all the G-UNI pool addresses deployed by `deployer`\"},\"getProxyAdmin(address)\":{\"notice\":\"getProxyAdmin gets the current address who controls the underlying implementation of a G-UNI pool. For most all pools either this contract address or the zero address will be the proxyAdmin. If the admin is the zero address the pool's implementation is naturally no longer upgradable (no one owns the zero address).\"},\"isPoolImmutable(address)\":{\"notice\":\"isPoolImmutable checks if a certain G-UNI pool is \\\"immutable\\\" i.e. that the proxyAdmin is the zero address and thus the underlying implementation cannot be upgraded\"},\"numDeployers()\":{\"notice\":\"numDeployers counts the total number of G-UNI pool deployer addresses\"},\"numPools()\":{\"notice\":\"numPools counts the total number of G-UNI pools in existence\"},\"numPools(address)\":{\"notice\":\"numPools counts the total number of G-UNI pools deployed by `deployer`\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/GUniFactory.sol\":\"GUniFactory\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":1},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n// solhint-disable-next-line compiler-version\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\\n * behind a proxy. Since a proxied contract can't have a constructor, it's common to move constructor logic to an\\n * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\\n * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\\n *\\n * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\\n * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.\\n *\\n * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\\n * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\\n */\\nabstract contract Initializable {\\n\\n /**\\n * @dev Indicates that the contract has been initialized.\\n */\\n bool private _initialized;\\n\\n /**\\n * @dev Indicates that the contract is in the process of being initialized.\\n */\\n bool private _initializing;\\n\\n /**\\n * @dev Modifier to protect an initializer function from being invoked twice.\\n */\\n modifier initializer() {\\n require(_initializing || !_initialized, \\\"Initializable: contract is already initialized\\\");\\n\\n bool isTopLevelCall = !_initializing;\\n if (isTopLevelCall) {\\n _initializing = true;\\n _initialized = true;\\n }\\n\\n _;\\n\\n if (isTopLevelCall) {\\n _initializing = false;\\n }\\n }\\n}\\n\",\"keccak256\":\"0x67d2f282a9678e58e878a0b774041ba7a01e2740a262aea97a3f681339914713\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC20 standard as defined in the EIP.\\n */\\ninterface IERC20 {\\n /**\\n * @dev Returns the amount of tokens in existence.\\n */\\n function totalSupply() external view returns (uint256);\\n\\n /**\\n * @dev Returns the amount of tokens owned by `account`.\\n */\\n function balanceOf(address account) external view returns (uint256);\\n\\n /**\\n * @dev Moves `amount` tokens from the caller's account to `recipient`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address recipient, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Returns the remaining number of tokens that `spender` will be\\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\\n * zero by default.\\n *\\n * This value changes when {approve} or {transferFrom} are called.\\n */\\n function allowance(address owner, address spender) external view returns (uint256);\\n\\n /**\\n * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\\n * that someone may use both the old and the new allowance by unfortunate\\n * transaction ordering. One possible solution to mitigate this race\\n * condition is to first reduce the spender's allowance to 0 and set the\\n * desired value afterwards:\\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address spender, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Moves `amount` tokens from `sender` to `recipient` using the\\n * allowance mechanism. `amount` is then deducted from the caller's\\n * allowance.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\\n * another (`to`).\\n *\\n * Note that `value` may be zero.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 value);\\n\\n /**\\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\\n * a call to {approve}. `value` is the new allowance.\\n */\\n event Approval(address indexed owner, address indexed spender, uint256 value);\\n}\\n\",\"keccak256\":\"0xf8e8d118a7a8b2e134181f7da655f6266aa3a0f9134b2605747139fcb0c5d835\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../IERC20.sol\\\";\\n\\n/**\\n * @dev Interface for the optional metadata functions from the ERC20 standard.\\n *\\n * _Available since v4.1._\\n */\\ninterface IERC20Metadata is IERC20 {\\n /**\\n * @dev Returns the name of the token.\\n */\\n function name() external view returns (string memory);\\n\\n /**\\n * @dev Returns the symbol of the token.\\n */\\n function symbol() external view returns (string memory);\\n\\n /**\\n * @dev Returns the decimals places of the token.\\n */\\n function decimals() external view returns (uint8);\\n}\\n\",\"keccak256\":\"0x83fe24f5c04a56091e50f4a345ff504c8bff658a76d4c43b16878c8f940c53b2\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/structs/EnumerableSet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Library for managing\\n * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive\\n * types.\\n *\\n * Sets have the following properties:\\n *\\n * - Elements are added, removed, and checked for existence in constant time\\n * (O(1)).\\n * - Elements are enumerated in O(n). No guarantees are made on the ordering.\\n *\\n * ```\\n * contract Example {\\n * // Add the library methods\\n * using EnumerableSet for EnumerableSet.AddressSet;\\n *\\n * // Declare a set state variable\\n * EnumerableSet.AddressSet private mySet;\\n * }\\n * ```\\n *\\n * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`)\\n * and `uint256` (`UintSet`) are supported.\\n */\\nlibrary EnumerableSet {\\n // To implement this library for multiple types with as little code\\n // repetition as possible, we write it in terms of a generic Set type with\\n // bytes32 values.\\n // The Set implementation uses private functions, and user-facing\\n // implementations (such as AddressSet) are just wrappers around the\\n // underlying Set.\\n // This means that we can only create new EnumerableSets for types that fit\\n // in bytes32.\\n\\n struct Set {\\n // Storage of set values\\n bytes32[] _values;\\n\\n // Position of the value in the `values` array, plus 1 because index 0\\n // means a value is not in the set.\\n mapping (bytes32 => uint256) _indexes;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function _add(Set storage set, bytes32 value) private returns (bool) {\\n if (!_contains(set, value)) {\\n set._values.push(value);\\n // The value is stored at length-1, but we add 1 to all indexes\\n // and use 0 as a sentinel value\\n set._indexes[value] = set._values.length;\\n return true;\\n } else {\\n return false;\\n }\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function _remove(Set storage set, bytes32 value) private returns (bool) {\\n // We read and store the value's index to prevent multiple reads from the same storage slot\\n uint256 valueIndex = set._indexes[value];\\n\\n if (valueIndex != 0) { // Equivalent to contains(set, value)\\n // To delete an element from the _values array in O(1), we swap the element to delete with the last one in\\n // the array, and then remove the last element (sometimes called as 'swap and pop').\\n // This modifies the order of the array, as noted in {at}.\\n\\n uint256 toDeleteIndex = valueIndex - 1;\\n uint256 lastIndex = set._values.length - 1;\\n\\n // When the value to delete is the last one, the swap operation is unnecessary. However, since this occurs\\n // so rarely, we still do the swap anyway to avoid the gas cost of adding an 'if' statement.\\n\\n bytes32 lastvalue = set._values[lastIndex];\\n\\n // Move the last value to the index where the value to delete is\\n set._values[toDeleteIndex] = lastvalue;\\n // Update the index for the moved value\\n set._indexes[lastvalue] = valueIndex; // Replace lastvalue's index to valueIndex\\n\\n // Delete the slot where the moved value was stored\\n set._values.pop();\\n\\n // Delete the index for the deleted slot\\n delete set._indexes[value];\\n\\n return true;\\n } else {\\n return false;\\n }\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function _contains(Set storage set, bytes32 value) private view returns (bool) {\\n return set._indexes[value] != 0;\\n }\\n\\n /**\\n * @dev Returns the number of values on the set. O(1).\\n */\\n function _length(Set storage set) private view returns (uint256) {\\n return set._values.length;\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function _at(Set storage set, uint256 index) private view returns (bytes32) {\\n require(set._values.length > index, \\\"EnumerableSet: index out of bounds\\\");\\n return set._values[index];\\n }\\n\\n // Bytes32Set\\n\\n struct Bytes32Set {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(Bytes32Set storage set, bytes32 value) internal returns (bool) {\\n return _add(set._inner, value);\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) {\\n return _remove(set._inner, value);\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) {\\n return _contains(set._inner, value);\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(Bytes32Set storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) {\\n return _at(set._inner, index);\\n }\\n\\n // AddressSet\\n\\n struct AddressSet {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(AddressSet storage set, address value) internal returns (bool) {\\n return _add(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(AddressSet storage set, address value) internal returns (bool) {\\n return _remove(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(AddressSet storage set, address value) internal view returns (bool) {\\n return _contains(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(AddressSet storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(AddressSet storage set, uint256 index) internal view returns (address) {\\n return address(uint160(uint256(_at(set._inner, index))));\\n }\\n\\n\\n // UintSet\\n\\n struct UintSet {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(UintSet storage set, uint256 value) internal returns (bool) {\\n return _add(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(UintSet storage set, uint256 value) internal returns (bool) {\\n return _remove(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(UintSet storage set, uint256 value) internal view returns (bool) {\\n return _contains(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Returns the number of values on the set. O(1).\\n */\\n function length(UintSet storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(UintSet storage set, uint256 index) internal view returns (uint256) {\\n return uint256(_at(set._inner, index));\\n }\\n}\\n\",\"keccak256\":\"0x4878ef6c288f4cef3c2a288d32cc548c648831cc55503ad3d9a581ed3b93aad9\",\"license\":\"MIT\"},\"@uniswap/v3-core/contracts/interfaces/IUniswapV3Factory.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-2.0-or-later\\npragma solidity >=0.5.0;\\n\\n/// @title The interface for the Uniswap V3 Factory\\n/// @notice The Uniswap V3 Factory facilitates creation of Uniswap V3 pools and control over the protocol fees\\ninterface IUniswapV3Factory {\\n /// @notice Emitted when the owner of the factory is changed\\n /// @param oldOwner The owner before the owner was changed\\n /// @param newOwner The owner after the owner was changed\\n event OwnerChanged(address indexed oldOwner, address indexed newOwner);\\n\\n /// @notice Emitted when a pool is created\\n /// @param token0 The first token of the pool by address sort order\\n /// @param token1 The second token of the pool by address sort order\\n /// @param fee The fee collected upon every swap in the pool, denominated in hundredths of a bip\\n /// @param tickSpacing The minimum number of ticks between initialized ticks\\n /// @param pool The address of the created pool\\n event PoolCreated(\\n address indexed token0,\\n address indexed token1,\\n uint24 indexed fee,\\n int24 tickSpacing,\\n address pool\\n );\\n\\n /// @notice Emitted when a new fee amount is enabled for pool creation via the factory\\n /// @param fee The enabled fee, denominated in hundredths of a bip\\n /// @param tickSpacing The minimum number of ticks between initialized ticks for pools created with the given fee\\n event FeeAmountEnabled(uint24 indexed fee, int24 indexed tickSpacing);\\n\\n /// @notice Returns the current owner of the factory\\n /// @dev Can be changed by the current owner via setOwner\\n /// @return The address of the factory owner\\n function owner() external view returns (address);\\n\\n /// @notice Returns the tick spacing for a given fee amount, if enabled, or 0 if not enabled\\n /// @dev A fee amount can never be removed, so this value should be hard coded or cached in the calling context\\n /// @param fee The enabled fee, denominated in hundredths of a bip. Returns 0 in case of unenabled fee\\n /// @return The tick spacing\\n function feeAmountTickSpacing(uint24 fee) external view returns (int24);\\n\\n /// @notice Returns the pool address for a given pair of tokens and a fee, or address 0 if it does not exist\\n /// @dev tokenA and tokenB may be passed in either token0/token1 or token1/token0 order\\n /// @param tokenA The contract address of either token0 or token1\\n /// @param tokenB The contract address of the other token\\n /// @param fee The fee collected upon every swap in the pool, denominated in hundredths of a bip\\n /// @return pool The pool address\\n function getPool(\\n address tokenA,\\n address tokenB,\\n uint24 fee\\n ) external view returns (address pool);\\n\\n /// @notice Creates a pool for the given two tokens and fee\\n /// @param tokenA One of the two tokens in the desired pool\\n /// @param tokenB The other of the two tokens in the desired pool\\n /// @param fee The desired fee for the pool\\n /// @dev tokenA and tokenB may be passed in either order: token0/token1 or token1/token0. tickSpacing is retrieved\\n /// from the fee. The call will revert if the pool already exists, the fee is invalid, or the token arguments\\n /// are invalid.\\n /// @return pool The address of the newly created pool\\n function createPool(\\n address tokenA,\\n address tokenB,\\n uint24 fee\\n ) external returns (address pool);\\n\\n /// @notice Updates the owner of the factory\\n /// @dev Must be called by the current owner\\n /// @param _owner The new owner of the factory\\n function setOwner(address _owner) external;\\n\\n /// @notice Enables a fee amount with the given tickSpacing\\n /// @dev Fee amounts may never be removed once enabled\\n /// @param fee The fee amount to enable, denominated in hundredths of a bip (i.e. 1e-6)\\n /// @param tickSpacing The spacing between ticks to be enforced for all pools created with the given fee amount\\n function enableFeeAmount(uint24 fee, int24 tickSpacing) external;\\n}\\n\",\"keccak256\":\"0xcc3d0c93fc9ac0febbe09f941b465b57f750bcf3b48432da0b97dc289cfdc489\",\"license\":\"GPL-2.0-or-later\"},\"contracts/GUniFactory.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\npragma solidity 0.8.19;\\n\\nimport {\\n IUniswapV3Factory\\n} from \\\"@uniswap/v3-core/contracts/interfaces/IUniswapV3Factory.sol\\\";\\nimport {IUniswapV3TickSpacing} from \\\"./interfaces/IUniswapV3TickSpacing.sol\\\";\\nimport {IGUniFactory} from \\\"./interfaces/IGUniFactory.sol\\\";\\nimport {IGUniPoolStorage} from \\\"./interfaces/IGUniPoolStorage.sol\\\";\\nimport {GUniFactoryStorage} from \\\"./abstract/GUniFactoryStorage.sol\\\";\\nimport {EIP173Proxy} from \\\"./vendor/proxy/EIP173Proxy.sol\\\";\\nimport {IEIP173Proxy} from \\\"./interfaces/IEIP173Proxy.sol\\\";\\nimport {\\n IERC20Metadata\\n} from \\\"@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol\\\";\\nimport {\\n EnumerableSet\\n} from \\\"@openzeppelin/contracts/utils/structs/EnumerableSet.sol\\\";\\n\\ncontract GUniFactory is GUniFactoryStorage, IGUniFactory {\\n using EnumerableSet for EnumerableSet.AddressSet;\\n\\n constructor(address _uniswapV3Factory)\\n GUniFactoryStorage(_uniswapV3Factory)\\n {} // solhint-disable-line no-empty-blocks\\n\\n /// @notice createManagedPool creates a new instance of a G-UNI token on a specified\\n /// UniswapV3Pool. The msg.sender is the initial manager of the pool and will\\n /// forever be associated with the G-UNI pool as it's `deployer`\\n /// @param tokenA one of the tokens in the uniswap pair\\n /// @param tokenB the other token in the uniswap pair\\n /// @param uniFee fee tier of the uniswap pair\\n /// @param managerFee proportion of earned fees that go to pool manager in Basis Points\\n /// @param lowerTick initial lower bound of the Uniswap V3 position\\n /// @param upperTick initial upper bound of the Uniswap V3 position\\n /// @return pool the address of the newly created G-UNI pool (proxy)\\n function createManagedPool(\\n address tokenA,\\n address tokenB,\\n uint24 uniFee,\\n uint16 managerFee,\\n int24 lowerTick,\\n int24 upperTick\\n ) external override returns (address pool) {\\n return\\n _createPool(\\n tokenA,\\n tokenB,\\n uniFee,\\n managerFee,\\n lowerTick,\\n upperTick,\\n msg.sender\\n );\\n }\\n\\n /// @notice createPool creates a new instance of a G-UNI token on a specified\\n /// UniswapV3Pool. Here the manager role is immediately burned, however msg.sender will still\\n /// forever be associated with the G-UNI pool as it's `deployer`\\n /// @param tokenA one of the tokens in the uniswap pair\\n /// @param tokenB the other token in the uniswap pair\\n /// @param uniFee fee tier of the uniswap pair\\n /// @param lowerTick initial lower bound of the Uniswap V3 position\\n /// @param upperTick initial upper bound of the Uniswap V3 position\\n /// @return pool the address of the newly created G-UNI pool (proxy)\\n function createPool(\\n address tokenA,\\n address tokenB,\\n uint24 uniFee,\\n int24 lowerTick,\\n int24 upperTick\\n ) external override returns (address pool) {\\n return\\n _createPool(\\n tokenA,\\n tokenB,\\n uniFee,\\n 0,\\n lowerTick,\\n upperTick,\\n address(0)\\n );\\n }\\n\\n function _createPool(\\n address tokenA,\\n address tokenB,\\n uint24 uniFee,\\n uint16 managerFee,\\n int24 lowerTick,\\n int24 upperTick,\\n address manager\\n ) internal returns (address pool) {\\n (address token0, address token1) = _getTokenOrder(tokenA, tokenB);\\n\\n pool = address(new EIP173Proxy(poolImplementation, address(this), \\\"\\\"));\\n\\n string memory name = \\\"Gelato Uniswap LP\\\";\\n try this.getTokenName(token0, token1) returns (string memory result) {\\n name = result;\\n } catch {} // solhint-disable-line no-empty-blocks\\n\\n address uniPool =\\n IUniswapV3Factory(factory).getPool(token0, token1, uniFee);\\n require(uniPool != address(0), \\\"uniswap pool does not exist\\\");\\n require(\\n _validateTickSpacing(uniPool, lowerTick, upperTick),\\n \\\"tickSpacing mismatch\\\"\\n );\\n\\n IGUniPoolStorage(pool).initialize(\\n name,\\n \\\"G-UNI\\\",\\n uniPool,\\n managerFee,\\n lowerTick,\\n upperTick,\\n manager\\n );\\n _deployers.add(msg.sender);\\n _pools[msg.sender].add(pool);\\n emit PoolCreated(uniPool, manager, pool);\\n }\\n\\n function _validateTickSpacing(\\n address uniPool,\\n int24 lowerTick,\\n int24 upperTick\\n ) internal view returns (bool) {\\n int24 spacing = IUniswapV3TickSpacing(uniPool).tickSpacing();\\n return\\n lowerTick < upperTick &&\\n lowerTick % spacing == 0 &&\\n upperTick % spacing == 0;\\n }\\n\\n function getTokenName(address token0, address token1)\\n external\\n view\\n returns (string memory)\\n {\\n string memory symbol0 = IERC20Metadata(token0).symbol();\\n string memory symbol1 = IERC20Metadata(token1).symbol();\\n\\n return _append(\\\"Gelato Uniswap \\\", symbol0, \\\"/\\\", symbol1, \\\" LP\\\");\\n }\\n\\n function upgradePools(address[] memory pools) external onlyManager {\\n for (uint256 i = 0; i < pools.length; i++) {\\n IEIP173Proxy(pools[i]).upgradeTo(poolImplementation);\\n }\\n }\\n\\n function upgradePoolsAndCall(address[] memory pools, bytes[] calldata datas)\\n external\\n onlyManager\\n {\\n require(pools.length == datas.length, \\\"mismatching array length\\\");\\n for (uint256 i = 0; i < pools.length; i++) {\\n IEIP173Proxy(pools[i]).upgradeToAndCall(\\n poolImplementation,\\n datas[i]\\n );\\n }\\n }\\n\\n function makePoolsImmutable(address[] memory pools) external onlyManager {\\n for (uint256 i = 0; i < pools.length; i++) {\\n IEIP173Proxy(pools[i]).transferProxyAdmin(address(0));\\n }\\n }\\n\\n /// @notice isPoolImmutable checks if a certain G-UNI pool is \\\"immutable\\\" i.e. that the\\n /// proxyAdmin is the zero address and thus the underlying implementation cannot be upgraded\\n /// @param pool address of the G-UNI pool\\n /// @return bool signaling if pool is immutable (true) or not (false)\\n function isPoolImmutable(address pool) external view returns (bool) {\\n return address(0) == getProxyAdmin(pool);\\n }\\n\\n /// @notice getGelatoPools gets all the G-UNI pools deployed by Gelato's\\n /// default deployer address (since anyone can deploy and manage G-UNI pools)\\n /// @return list of Gelato managed G-UNI pool addresses\\n function getGelatoPools() external view returns (address[] memory) {\\n return getPools(gelatoDeployer);\\n }\\n\\n /// @notice getDeployers fetches all addresses that have deployed a G-UNI pool\\n /// @return deployers the list of deployer addresses\\n function getDeployers() public view returns (address[] memory) {\\n uint256 length = numDeployers();\\n address[] memory deployers = new address[](length);\\n for (uint256 i = 0; i < length; i++) {\\n deployers[i] = _getDeployer(i);\\n }\\n\\n return deployers;\\n }\\n\\n /// @notice getPools fetches all the G-UNI pool addresses deployed by `deployer`\\n /// @param deployer address that has potentially deployed G-UNI pools (can return empty array)\\n /// @return pools the list of G-UNI pool addresses deployed by `deployer`\\n function getPools(address deployer) public view returns (address[] memory) {\\n uint256 length = numPools(deployer);\\n address[] memory pools = new address[](length);\\n for (uint256 i = 0; i < length; i++) {\\n pools[i] = _getPool(deployer, i);\\n }\\n\\n return pools;\\n }\\n\\n /// @notice numPools counts the total number of G-UNI pools in existence\\n /// @return result total number of G-UNI pools deployed\\n function numPools() public view returns (uint256 result) {\\n address[] memory deployers = getDeployers();\\n for (uint256 i = 0; i < deployers.length; i++) {\\n result += numPools(deployers[i]);\\n }\\n }\\n\\n /// @notice numDeployers counts the total number of G-UNI pool deployer addresses\\n /// @return total number of G-UNI pool deployer addresses\\n function numDeployers() public view returns (uint256) {\\n return _deployers.length();\\n }\\n\\n /// @notice numPools counts the total number of G-UNI pools deployed by `deployer`\\n /// @param deployer deployer address\\n /// @return total number of G-UNI pools deployed by `deployer`\\n function numPools(address deployer) public view returns (uint256) {\\n return _pools[deployer].length();\\n }\\n\\n /// @notice getProxyAdmin gets the current address who controls the underlying implementation\\n /// of a G-UNI pool. For most all pools either this contract address or the zero address will\\n /// be the proxyAdmin. If the admin is the zero address the pool's implementation is naturally\\n /// no longer upgradable (no one owns the zero address).\\n /// @param pool address of the G-UNI pool\\n /// @return address that controls the G-UNI implementation (has power to upgrade it)\\n function getProxyAdmin(address pool) public view returns (address) {\\n return IEIP173Proxy(pool).proxyAdmin();\\n }\\n\\n function _getDeployer(uint256 index) internal view returns (address) {\\n return _deployers.at(index);\\n }\\n\\n function _getPool(address deployer, uint256 index)\\n internal\\n view\\n returns (address)\\n {\\n return _pools[deployer].at(index);\\n }\\n\\n function _getTokenOrder(address tokenA, address tokenB)\\n internal\\n pure\\n returns (address token0, address token1)\\n {\\n require(tokenA != tokenB, \\\"same token\\\");\\n (token0, token1) = tokenA < tokenB\\n ? (tokenA, tokenB)\\n : (tokenB, tokenA);\\n require(token0 != address(0), \\\"no address zero\\\");\\n }\\n\\n function _append(\\n string memory a,\\n string memory b,\\n string memory c,\\n string memory d,\\n string memory e\\n ) internal pure returns (string memory) {\\n return string(abi.encodePacked(a, b, c, d, e));\\n }\\n}\\n\",\"keccak256\":\"0x41d2d6a42321eed641468824c4d0ba4fbe40040895304388315ece96132011d6\",\"license\":\"MIT\"},\"contracts/abstract/GUniFactoryStorage.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\npragma solidity 0.8.19;\\n\\nimport {OwnableUninitialized} from \\\"./OwnableUninitialized.sol\\\";\\nimport {\\n Initializable\\n} from \\\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\\\";\\nimport {\\n EnumerableSet\\n} from \\\"@openzeppelin/contracts/utils/structs/EnumerableSet.sol\\\";\\n\\n// solhint-disable-next-line max-states-count\\ncontract GUniFactoryStorage is\\n OwnableUninitialized, /* XXXX DONT MODIFY ORDERING XXXX */\\n Initializable\\n // APPEND ADDITIONAL BASE WITH STATE VARS BELOW:\\n // XXXX DONT MODIFY ORDERING XXXX\\n{\\n // XXXXXXXX DO NOT MODIFY ORDERING XXXXXXXX\\n // solhint-disable-next-line const-name-snakecase\\n string public constant version = \\\"1.0.0\\\";\\n address public immutable factory;\\n address public poolImplementation;\\n address public gelatoDeployer;\\n EnumerableSet.AddressSet internal _deployers;\\n mapping(address => EnumerableSet.AddressSet) internal _pools;\\n // APPPEND ADDITIONAL STATE VARS BELOW:\\n // XXXXXXXX DO NOT MODIFY ORDERING XXXXXXXX\\n\\n event UpdatePoolImplementation(\\n address previousImplementation,\\n address newImplementation\\n );\\n\\n event UpdateGelatoDeployer(\\n address previosGelatoDeployer,\\n address newGelatoDeployer\\n );\\n\\n constructor(address _uniswapV3Factory) {\\n factory = _uniswapV3Factory;\\n }\\n\\n function initialize(\\n address _implementation,\\n address _gelatoDeployer,\\n address _manager_\\n ) external initializer {\\n poolImplementation = _implementation;\\n gelatoDeployer = _gelatoDeployer;\\n _manager = _manager_;\\n }\\n\\n function setPoolImplementation(address nextImplementation)\\n external\\n onlyManager\\n {\\n emit UpdatePoolImplementation(poolImplementation, nextImplementation);\\n poolImplementation = nextImplementation;\\n }\\n\\n function setGelatoDeployer(address nextGelatoDeployer)\\n external\\n onlyManager\\n {\\n emit UpdateGelatoDeployer(gelatoDeployer, nextGelatoDeployer);\\n gelatoDeployer = nextGelatoDeployer;\\n }\\n}\\n\",\"keccak256\":\"0xb0e3a7e77ab8aecf8997593526451e64dd8e8aa07882c210c9aa38d4f7168755\",\"license\":\"MIT\"},\"contracts/abstract/OwnableUninitialized.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity 0.8.19;\\n\\n/**\\n * @dev Contract module which provides a basic access control mechanism, where\\n * there is an account (an manager) that can be granted exclusive access to\\n * specific functions.\\n *\\n * By default, the manager account will be the one that deploys the contract. This\\n * can later be changed with {transferOwnership}.\\n *\\n * This module is used through inheritance. It will make available the modifier\\n * `onlyManager`, which can be applied to your functions to restrict their use to\\n * the manager.\\n */\\n/// @dev DO NOT ADD STATE VARIABLES - APPEND THEM TO GelatoUniV3PoolStorage\\n/// @dev DO NOT ADD BASE CONTRACTS WITH STATE VARS - APPEND THEM TO GelatoUniV3PoolStorage\\nabstract contract OwnableUninitialized {\\n address internal _manager;\\n\\n event OwnershipTransferred(\\n address indexed previousManager,\\n address indexed newManager\\n );\\n\\n /// @dev Initializes the contract setting the deployer as the initial manager.\\n /// CONSTRUCTOR EMPTY - USE INITIALIZIABLE INSTEAD\\n // solhint-disable-next-line no-empty-blocks\\n constructor() {}\\n\\n /**\\n * @dev Returns the address of the current manager.\\n */\\n function manager() public view virtual returns (address) {\\n return _manager;\\n }\\n\\n /**\\n * @dev Throws if called by any account other than the manager.\\n */\\n modifier onlyManager() {\\n require(manager() == msg.sender, \\\"Ownable: caller is not the manager\\\");\\n _;\\n }\\n\\n /**\\n * @dev Leaves the contract without manager. It will not be possible to call\\n * `onlyManager` functions anymore. Can only be called by the current manager.\\n *\\n * NOTE: Renouncing ownership will leave the contract without an manager,\\n * thereby removing any functionality that is only available to the manager.\\n */\\n function renounceOwnership() public virtual onlyManager {\\n emit OwnershipTransferred(_manager, address(0));\\n _manager = address(0);\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Can only be called by the current manager.\\n */\\n function transferOwnership(address newOwner) public virtual onlyManager {\\n require(\\n newOwner != address(0),\\n \\\"Ownable: new manager is the zero address\\\"\\n );\\n emit OwnershipTransferred(_manager, newOwner);\\n _manager = newOwner;\\n }\\n}\\n\",\"keccak256\":\"0xb6016d5611f38fbd516a84ea2e56794cb76a8d61c40f6716d5f0133f195759bd\",\"license\":\"GPL-3.0\"},\"contracts/interfaces/IEIP173Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity 0.8.19;\\n\\ninterface IEIP173Proxy {\\n function proxyAdmin() external view returns (address);\\n\\n function transferProxyAdmin(address newAdmin) external;\\n\\n function upgradeTo(address newImplementation) external;\\n\\n function upgradeToAndCall(address newImplementation, bytes calldata data)\\n external\\n payable;\\n}\\n\",\"keccak256\":\"0xae9996ea370d97cb5fd1934394aca615bee0e46c9a0c161d728490264e83eda5\",\"license\":\"GPL-3.0\"},\"contracts/interfaces/IGUniFactory.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\npragma solidity 0.8.19;\\n\\ninterface IGUniFactory {\\n event PoolCreated(\\n address indexed uniPool,\\n address indexed manager,\\n address indexed pool\\n );\\n\\n function createPool(\\n address tokenA,\\n address tokenB,\\n uint24 uniFee,\\n int24 lowerTick,\\n int24 upperTick\\n ) external returns (address pool);\\n\\n function createManagedPool(\\n address tokenA,\\n address tokenB,\\n uint24 uniFee,\\n uint16 managerFee,\\n int24 lowerTick,\\n int24 upperTick\\n ) external returns (address pool);\\n}\\n\",\"keccak256\":\"0xe06f79e9b1e6351fc4f40c9f25630f0fbfabae9d2ae2bb642ef1f03d4c2195c1\",\"license\":\"MIT\"},\"contracts/interfaces/IGUniPoolStorage.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity 0.8.19;\\n\\ninterface IGUniPoolStorage {\\n function initialize(\\n string memory _name,\\n string memory _symbol,\\n address _pool,\\n uint16 _managerFeeBPS,\\n int24 _lowerTick,\\n int24 _upperTick,\\n address _manager_\\n ) external;\\n}\\n\",\"keccak256\":\"0x52a3f83a23917772f1eb242cecdfa8b45d7b357a615383628c1ac1f26259dd3f\",\"license\":\"GPL-3.0\"},\"contracts/interfaces/IUniswapV3TickSpacing.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity 0.8.19;\\n\\ninterface IUniswapV3TickSpacing {\\n function tickSpacing() external view returns (int24);\\n}\\n\",\"keccak256\":\"0xa6f22651f7e49c6eecf584d8e829d31336de7c43eec3c4c4df3b309db27bd355\",\"license\":\"GPL-3.0\"},\"contracts/vendor/proxy/EIP173Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity 0.8.19;\\n\\nimport \\\"./Proxy.sol\\\";\\n\\ninterface ERC165 {\\n function supportsInterface(bytes4 id) external view returns (bool);\\n}\\n\\n///@notice Proxy implementing EIP173 for ownership management\\ncontract EIP173Proxy is Proxy {\\n // ////////////////////////// EVENTS ///////////////////////////////////////////////////////////////////////\\n\\n event ProxyAdminTransferred(\\n address indexed previousAdmin,\\n address indexed newAdmin\\n );\\n\\n // /////////////////////// CONSTRUCTOR //////////////////////////////////////////////////////////////////////\\n\\n constructor(\\n address implementationAddress,\\n address adminAddress,\\n bytes memory data\\n ) payable {\\n _setImplementation(implementationAddress, data);\\n _setProxyAdmin(adminAddress);\\n }\\n\\n // ///////////////////// EXTERNAL ///////////////////////////////////////////////////////////////////////////\\n\\n function proxyAdmin() external view returns (address) {\\n return _proxyAdmin();\\n }\\n\\n function supportsInterface(bytes4 id) external view returns (bool) {\\n if (id == 0x01ffc9a7 || id == 0x7f5828d0) {\\n return true;\\n }\\n if (id == 0xFFFFFFFF) {\\n return false;\\n }\\n\\n ERC165 implementation;\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n implementation := sload(\\n 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc\\n )\\n }\\n\\n // Technically this is not standard compliant as ERC-165 require 30,000 gas which that call cannot ensure\\n // because it is itself inside `supportsInterface` that might only get 30,000 gas.\\n // In practise this is unlikely to be an issue.\\n try implementation.supportsInterface(id) returns (bool support) {\\n return support;\\n } catch {\\n return false;\\n }\\n }\\n\\n function transferProxyAdmin(address newAdmin) external onlyProxyAdmin {\\n _setProxyAdmin(newAdmin);\\n }\\n\\n function upgradeTo(address newImplementation) external onlyProxyAdmin {\\n _setImplementation(newImplementation, \\\"\\\");\\n }\\n\\n function upgradeToAndCall(address newImplementation, bytes calldata data)\\n external\\n payable\\n onlyProxyAdmin\\n {\\n _setImplementation(newImplementation, data);\\n }\\n\\n // /////////////////////// MODIFIERS ////////////////////////////////////////////////////////////////////////\\n\\n modifier onlyProxyAdmin() {\\n require(msg.sender == _proxyAdmin(), \\\"NOT_AUTHORIZED\\\");\\n _;\\n }\\n\\n // ///////////////////////// INTERNAL //////////////////////////////////////////////////////////////////////\\n\\n function _proxyAdmin() internal view returns (address adminAddress) {\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n adminAddress := sload(\\n 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103\\n )\\n }\\n }\\n\\n function _setProxyAdmin(address newAdmin) internal {\\n address previousAdmin = _proxyAdmin();\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n sstore(\\n 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103,\\n newAdmin\\n )\\n }\\n emit ProxyAdminTransferred(previousAdmin, newAdmin);\\n }\\n}\\n\",\"keccak256\":\"0x3e2e1473604e7e42e99f77ad5e5d8eb8a3b6d0e63c154a9c6d9a223190372070\",\"license\":\"GPL-3.0\"},\"contracts/vendor/proxy/Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity 0.8.19;\\n\\n// EIP-1967\\nabstract contract Proxy {\\n // /////////////////////// EVENTS ///////////////////////////////////////////////////////////////////////////\\n\\n event ProxyImplementationUpdated(\\n address indexed previousImplementation,\\n address indexed newImplementation\\n );\\n\\n // ///////////////////// EXTERNAL ///////////////////////////////////////////////////////////////////////////\\n\\n // prettier-ignore\\n receive() external payable virtual {\\n revert(\\\"ETHER_REJECTED\\\"); // explicit reject by default\\n }\\n\\n fallback() external payable {\\n _fallback();\\n }\\n\\n // ///////////////////////// INTERNAL //////////////////////////////////////////////////////////////////////\\n\\n function _fallback() internal {\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n let implementationAddress := sload(\\n 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc\\n )\\n calldatacopy(0x0, 0x0, calldatasize())\\n let success := delegatecall(\\n gas(),\\n implementationAddress,\\n 0x0,\\n calldatasize(),\\n 0,\\n 0\\n )\\n let retSz := returndatasize()\\n returndatacopy(0, 0, retSz)\\n switch success\\n case 0 {\\n revert(0, retSz)\\n }\\n default {\\n return(0, retSz)\\n }\\n }\\n }\\n\\n function _setImplementation(address newImplementation, bytes memory data)\\n internal\\n {\\n address previousImplementation;\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n previousImplementation := sload(\\n 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc\\n )\\n }\\n\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n sstore(\\n 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc,\\n newImplementation\\n )\\n }\\n\\n emit ProxyImplementationUpdated(\\n previousImplementation,\\n newImplementation\\n );\\n\\n if (data.length > 0) {\\n (bool success, ) = newImplementation.delegatecall(data);\\n if (!success) {\\n assembly {\\n // This assembly ensure the revert contains the exact string data\\n let returnDataSize := returndatasize()\\n returndatacopy(0, 0, returnDataSize)\\n revert(0, returnDataSize)\\n }\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0x5fd4f538f92f377d4e7b09fe8d5387eb1d5ff5ac95869c969be5049ae23439ba\",\"license\":\"GPL-3.0\"}},\"version\":1}", "bytecode": "0x60a060405234801561001057600080fd5b5060405161273838038061273883398101604081905261002f91610040565b6001600160a01b0316608052610070565b60006020828403121561005257600080fd5b81516001600160a01b038116811461006957600080fd5b9392505050565b6080516126a661009260003960008181610312015261103101526126a66000f3fe60806040523480156200001157600080fd5b5060043610620001425760003560e01c8063088933281462000147578063098eddb114620001605780630dfc574b146200017d578063260fc2b8146200019457806335c62bc214620001ab57806340aee04114620001b557806342f5de9914620001cc578063481c6a7514620001e357806354fd4d5014620001fc578063562b810314620002305780635c39f4671462000249578063607c12b51462000260578063715018a6146200026a57806383c60ac4146200027457806386238765146200028b57806395d807f1146200029f578063a958b89514620002c7578063bd30dfb914620002de578063c0c53b8b14620002f5578063c45a0155146200030c578063cefa77991462000334578063d6f748981462000348578063f2fde38b146200035f578063f3b7dead1462000376575b600080fd5b6200015e620001583660046200151e565b6200038d565b005b6200016a62000435565b6040519081526020015b60405180910390f35b6200015e6200018e3660046200160f565b62000448565b6200015e620001a5366004620016b0565b620005b0565b6200016a6200068a565b6200015e620001c6366004620016b0565b620006f5565b6200016a620001dd3660046200151e565b620007d3565b620001ed620007fc565b604051620001749190620016f0565b62000221604051806040016040528060058152602001640312e302e360dc1b81525081565b60405162000174919062001758565b6200023a6200080b565b6040516200017491906200176d565b6200023a6200025a3660046200151e565b62000820565b6200023a620008dd565b6200015e62000997565b620001ed62000285366004620017e5565b62000a04565b600254620001ed906001600160a01b031681565b620002b6620002b03660046200151e565b62000a22565b604051901515815260200162000174565b620001ed620002d836600462001878565b62000a3f565b62000221620002ef366004620018f2565b62000a5e565b6200015e6200030636600462001930565b62000bad565b620001ed7f000000000000000000000000000000000000000000000000000000000000000081565b600154620001ed906001600160a01b031681565b6200015e620003593660046200151e565b62000cb7565b6200015e620003703660046200151e565b62000d56565b620001ed620003873660046200151e565b62000e3d565b3362000398620007fc565b6001600160a01b031614620003ca5760405162461bcd60e51b8152600401620003c19062001982565b60405180910390fd5b6002546040517fb316078581b0eaf0714b47d13192560506acc3e23b5bf3b72d27248f173c9085916200040b916001600160a01b03909116908490620019c4565b60405180910390a1600280546001600160a01b0319166001600160a01b0392909216919091179055565b600062000443600362000ea4565b905090565b3362000453620007fc565b6001600160a01b0316146200047c5760405162461bcd60e51b8152600401620003c19062001982565b82518114620004c95760405162461bcd60e51b81526020600482015260186024820152770dad2e6dac2e8c6d0d2dcce40c2e4e4c2f240d8cadccee8d60431b6044820152606401620003c1565b60005b8351811015620005aa57838181518110620004eb57620004eb620019de565b60200260200101516001600160a01b0316634f1ef286600160009054906101000a90046001600160a01b03168585858181106200052c576200052c620019de565b9050602002810190620005409190620019f4565b6040518463ffffffff1660e01b8152600401620005609392919062001a3d565b600060405180830381600087803b1580156200057b57600080fd5b505af115801562000590573d6000803e3d6000fd5b505050508080620005a19062001a93565b915050620004cc565b50505050565b33620005bb620007fc565b6001600160a01b031614620005e45760405162461bcd60e51b8152600401620003c19062001982565b60005b81518110156200068657818181518110620006065762000606620019de565b60200260200101516001600160a01b0316638356ca4f60006040518263ffffffff1660e01b81526004016200063c9190620016f0565b600060405180830381600087803b1580156200065757600080fd5b505af11580156200066c573d6000803e3d6000fd5b5050505080806200067d9062001a93565b915050620005e7565b5050565b60008062000697620008dd565b905060005b8151811015620006f057620006cd828281518110620006bf57620006bf620019de565b6020026020010151620007d3565b620006d9908462001aaf565b925080620006e78162001a93565b9150506200069c565b505090565b3362000700620007fc565b6001600160a01b031614620007295760405162461bcd60e51b8152600401620003c19062001982565b60005b815181101562000686578181815181106200074b576200074b620019de565b6020908102919091010151600154604051631b2ce7f360e11b81526001600160a01b0392831692633659cfe6926200078992911690600401620016f0565b600060405180830381600087803b158015620007a457600080fd5b505af1158015620007b9573d6000803e3d6000fd5b505050508080620007ca9062001a93565b9150506200072c565b6001600160a01b0381166000908152600560205260408120620007f69062000ea4565b92915050565b6000546001600160a01b031690565b60025460609062000443906001600160a01b03165b606060006200082f83620007d3565b90506000816001600160401b038111156200084e576200084e6200153e565b60405190808252806020026020018201604052801562000878578160200160208202803683370190505b50905060005b82811015620008d55762000893858262000eaf565b828281518110620008a857620008a8620019de565b6001600160a01b039092166020928302919091019091015280620008cc8162001a93565b9150506200087e565b509392505050565b60606000620008eb62000435565b90506000816001600160401b038111156200090a576200090a6200153e565b60405190808252806020026020018201604052801562000934578160200160208202803683370190505b50905060005b8281101562000990576200094e8162000eda565b828281518110620009635762000963620019de565b6001600160a01b039092166020928302919091019091015280620009878162001a93565b9150506200093a565b5092915050565b33620009a2620007fc565b6001600160a01b031614620009cb5760405162461bcd60e51b8152600401620003c19062001982565b600080546040516001600160a01b039091169060008051602062002651833981519152908390a3600080546001600160a01b0319169055565b600062000a178787878787873362000ee9565b979650505050505050565b600062000a2f8262000e3d565b6001600160a01b03161592915050565b600062000a5486868660008787600062000ee9565b9695505050505050565b60606000836001600160a01b03166395d89b416040518163ffffffff1660e01b8152600401600060405180830381865afa15801562000aa1573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405262000acb919081019062001ac5565b90506000836001600160a01b03166395d89b416040518163ffffffff1660e01b8152600401600060405180830381865afa15801562000b0e573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405262000b38919081019062001ac5565b905062000ba46040518060400160405280600f81526020016e023b2b630ba37902ab734b9bbb0b81608d1b81525083604051806040016040528060018152602001602f60f81b81525084604051806040016040528060038152602001620204c560ec1b81525062001243565b95945050505050565b600054600160a81b900460ff168062000bd05750600054600160a01b900460ff16155b62000c355760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401620003c1565b600054600160a81b900460ff1615801562000c60576000805461ffff60a01b191661010160a01b1790555b600180546001600160a01b038087166001600160a01b0319928316179092556002805486841690831617905560008054928516929091169190911790558015620005aa576000805460ff60a81b1916905550505050565b3362000cc2620007fc565b6001600160a01b03161462000ceb5760405162461bcd60e51b8152600401620003c19062001982565b6001546040517f0617fd31aa5ab95ec80eefc1eb61a2c477aa419d1d761b4e46f5f077e47852aa9162000d2c916001600160a01b03909116908490620019c4565b60405180910390a1600180546001600160a01b0319166001600160a01b0392909216919091179055565b3362000d61620007fc565b6001600160a01b03161462000d8a5760405162461bcd60e51b8152600401620003c19062001982565b6001600160a01b03811662000df35760405162461bcd60e51b815260206004820152602860248201527f4f776e61626c653a206e6577206d616e6167657220697320746865207a65726f604482015267206164647265737360c01b6064820152608401620003c1565b600080546040516001600160a01b03808516939216916000805160206200265183398151915291a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b6000816001600160a01b0316633e47158c6040518163ffffffff1660e01b8152600401602060405180830381865afa15801562000e7e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620007f6919062001b63565b6000620007f6825490565b6001600160a01b038216600090815260056020526040812062000ed390836200127a565b9392505050565b6000620007f66003836200127a565b600080600062000efa8a8a62001288565b6001546040519294509092506001600160a01b031690309062000f1d90620014f7565b6001600160a01b03928316815291166020820152606060408201819052600090820152608001604051809103906000f08015801562000f60573d6000803e3d6000fd5b506040805180820182526011815270047656c61746f20556e6973776170204c5607c1b6020820152905163bd30dfb960e01b815291945090309063bd30dfb99062000fb29086908690600401620019c4565b600060405180830381865afa92505050801562000ff357506040513d6000823e601f3d908101601f1916820160405262000ff0919081019062001ac5565b60015b1562000ffc5790505b604051630b4c774160e11b81526001600160a01b038481166004830152838116602483015262ffffff8b1660448301526000917f000000000000000000000000000000000000000000000000000000000000000090911690631698ee8290606401602060405180830381865afa1580156200107b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620010a1919062001b63565b90506001600160a01b038116620010f95760405162461bcd60e51b815260206004820152601b60248201527a1d5b9a5cddd85c081c1bdbdb08191bd95cc81b9bdd08195e1a5cdd602a1b6044820152606401620003c1565b6200110681898962001356565b6200114b5760405162461bcd60e51b81526020600482015260146024820152730e8d2c6d6a6e0c2c6d2dcce40dad2e6dac2e8c6d60631b6044820152606401620003c1565b60405163e25e15e360e01b81526001600160a01b0386169063e25e15e3906200118390859085908e908e908e908e9060040162001b83565b600060405180830381600087803b1580156200119e57600080fd5b505af1158015620011b3573d6000803e3d6000fd5b50505050620011cd3360036200140390919063ffffffff16565b50336000908152600560205260409020620011e9908662001403565b50846001600160a01b0316866001600160a01b0316826001600160a01b03167f9c5d829b9b23efc461f9aeef91979ec04bb903feb3bee4f26d22114abfc7335b60405160405180910390a450505050979650505050505050565b606085858585856040516020016200126095949392919062001bf8565b604051602081830303815290604052905095945050505050565b600062000ed383836200141a565b600080826001600160a01b0316846001600160a01b031603620012db5760405162461bcd60e51b815260206004820152600a60248201526939b0b6b2903a37b5b2b760b11b6044820152606401620003c1565b826001600160a01b0316846001600160a01b031610620012fd57828462001300565b83835b90925090506001600160a01b0382166200134f5760405162461bcd60e51b815260206004820152600f60248201526e6e6f2061646472657373207a65726f60881b6044820152606401620003c1565b9250929050565b600080846001600160a01b031663d0c93a7c6040518163ffffffff1660e01b8152600401602060405180830381865afa15801562001398573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620013be919062001c6d565b90508260020b8460020b128015620013e25750620013dd818562001c8d565b60020b155b801562000ba45750620013f6818462001c8d565b60020b1595945050505050565b600062000ed3836001600160a01b038416620014a5565b815460009082106200147a5760405162461bcd60e51b815260206004820152602260248201527f456e756d657261626c655365743a20696e646578206f7574206f6620626f756e604482015261647360f01b6064820152608401620003c1565b826000018281548110620014925762001492620019de565b9060005260206000200154905092915050565b6000818152600183016020526040812054620014ee57508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155620007f6565b506000620007f6565b6109928062001cbf83390190565b6001600160a01b03811681146200151b57600080fd5b50565b6000602082840312156200153157600080fd5b813562000ed38162001505565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b03811182821017156200157f576200157f6200153e565b604052919050565b600082601f8301126200159957600080fd5b813560206001600160401b03821115620015b757620015b76200153e565b8160051b620015c882820162001554565b9283528481018201928281019087851115620015e357600080fd5b83870192505b8483101562000a17578235620015ff8162001505565b82529183019190830190620015e9565b6000806000604084860312156200162557600080fd5b83356001600160401b03808211156200163d57600080fd5b6200164b8783880162001587565b945060208601359150808211156200166257600080fd5b818601915086601f8301126200167757600080fd5b8135818111156200168757600080fd5b8760208260051b85010111156200169d57600080fd5b6020830194508093505050509250925092565b600060208284031215620016c357600080fd5b81356001600160401b03811115620016da57600080fd5b620016e88482850162001587565b949350505050565b6001600160a01b0391909116815260200190565b60005b838110156200172157818101518382015260200162001707565b50506000910152565b600081518084526200174481602086016020860162001704565b601f01601f19169290920160200192915050565b60208152600062000ed360208301846200172a565b6020808252825182820181905260009190848201906040850190845b81811015620017b05783516001600160a01b03168352928401929184019160010162001789565b50909695505050505050565b803562ffffff81168114620017d057600080fd5b919050565b8060020b81146200151b57600080fd5b60008060008060008060c08789031215620017ff57600080fd5b86356200180c8162001505565b955060208701356200181e8162001505565b94506200182e60408801620017bc565b9350606087013561ffff811681146200184657600080fd5b925060808701356200185881620017d5565b915060a08701356200186a81620017d5565b809150509295509295509295565b600080600080600060a086880312156200189157600080fd5b85356200189e8162001505565b94506020860135620018b08162001505565b9350620018c060408701620017bc565b92506060860135620018d281620017d5565b91506080860135620018e481620017d5565b809150509295509295909350565b600080604083850312156200190657600080fd5b8235620019138162001505565b91506020830135620019258162001505565b809150509250929050565b6000806000606084860312156200194657600080fd5b8335620019538162001505565b92506020840135620019658162001505565b91506040840135620019778162001505565b809150509250925092565b60208082526022908201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206d616e616760408201526132b960f11b606082015260800190565b6001600160a01b0392831681529116602082015260400190565b634e487b7160e01b600052603260045260246000fd5b6000808335601e1984360301811262001a0c57600080fd5b8301803591506001600160401b0382111562001a2757600080fd5b6020019150368190038213156200134f57600080fd5b6001600160a01b03841681526040602082018190528101829052818360608301376000818301606090810191909152601f909201601f1916010192915050565b634e487b7160e01b600052601160045260246000fd5b60006001820162001aa85762001aa862001a7d565b5060010190565b80820180821115620007f657620007f662001a7d565b60006020828403121562001ad857600080fd5b81516001600160401b038082111562001af057600080fd5b818401915084601f83011262001b0557600080fd5b81518181111562001b1a5762001b1a6200153e565b62001b2f601f8201601f191660200162001554565b915080825285602082850101111562001b4757600080fd5b62001b5a81602084016020860162001704565b50949350505050565b60006020828403121562001b7657600080fd5b815162000ed38162001505565b60e08152600062001b9860e08301896200172a565b82810360208401526005815264472d554e4960d81b60208201526040810191505060018060a01b03808816604084015261ffff871660608401528560020b60808401528460020b60a084015280841660c084015250979650505050505050565b6000865162001c0c818460208b0162001704565b86519083019062001c22818360208b0162001704565b865191019062001c37818360208a0162001704565b855191019062001c4c81836020890162001704565b845191019062001c6181836020880162001704565b01979650505050505050565b60006020828403121562001c8057600080fd5b815162000ed381620017d5565b60008260020b8062001caf57634e487b7160e01b600052601260045260246000fd5b808360020b079150509291505056fe6080604052604051610992380380610992833981016040819052610022916101de565b61002c838261003d565b61003582610119565b5050506102ca565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc8054908390556040516001600160a01b0380851691908316907f5570d70a002632a7b0b3c9304cc89efb62d8da9eca0dbd7752c83b737906829690600090a3815115610114576000836001600160a01b0316836040516100be91906102ae565b600060405180830381855af49150503d80600081146100f9576040519150601f19603f3d011682016040523d82523d6000602084013e6100fe565b606091505b5050905080610112573d806000803e806000fd5b505b505050565b60006101316000805160206109728339815191525490565b90508160008051602061097283398151915255816001600160a01b0316816001600160a01b03167fdf435d422321da6b195902d70fc417c06a32f88379c20dd8f2a8da07088cec2960405160405180910390a35050565b80516001600160a01b038116811461019f57600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60005b838110156101d55781810151838201526020016101bd565b50506000910152565b6000806000606084860312156101f357600080fd5b6101fc84610188565b925061020a60208501610188565b60408501519092506001600160401b038082111561022757600080fd5b818601915086601f83011261023b57600080fd5b81518181111561024d5761024d6101a4565b604051601f8201601f19908116603f01168101908382118183101715610275576102756101a4565b8160405282815289602084870101111561028e57600080fd5b61029f8360208301602088016101ba565b80955050505050509250925092565b600082516102c08184602087016101ba565b9190910192915050565b610699806102d96000396000f3fe60806040526004361061004e5760003560e01c806301ffc9a71461009b5780633659cfe6146100d05780633e47158c146100f05780634f1ef2861461011d5780638356ca4f1461013057610091565b366100915760405162461bcd60e51b815260206004820152600e60248201526d115512115497d491529150d5115160921b60448201526064015b60405180910390fd5b610099610150565b005b3480156100a757600080fd5b506100bb6100b63660046104c7565b610189565b60405190151581526020015b60405180910390f35b3480156100dc57600080fd5b506100996100eb36600461050d565b61026f565b3480156100fc57600080fd5b506101056102c3565b6040516001600160a01b0390911681526020016100c7565b61009961012b366004610528565b6102d2565b34801561013c57600080fd5b5061009961014b36600461050d565b61034f565b6000805160206106448339815191525460003681823780813683855af491503d8082833e82801561017f578183f35b8183fd5b50505050565b60006301ffc9a760e01b6001600160e01b0319831614806101ba57506307f5828d60e41b6001600160e01b03198316145b156101c757506001919050565b6001600160e01b031980831690036101e157506000919050565b600080516020610644833981519152546040516301ffc9a760e01b81526001600160e01b0319841660048201526001600160a01b038216906301ffc9a790602401602060405180830381865afa92505050801561025b575060408051601f3d908101601f19168201909252610258918101906105aa565b60015b6102685750600092915050565b9392505050565b610277610390565b6001600160a01b0316336001600160a01b0316146102a75760405162461bcd60e51b8152600401610088906105cc565b6102c081604051806020016040528060008152506103a3565b50565b60006102cd610390565b905090565b6102da610390565b6001600160a01b0316336001600160a01b03161461030a5760405162461bcd60e51b8152600401610088906105cc565b61034a8383838080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506103a392505050565b505050565b610357610390565b6001600160a01b0316336001600160a01b0316146103875760405162461bcd60e51b8152600401610088906105cc565b6102c081610466565b6000805160206106248339815191525490565b6000805160206106448339815191528054908390556040516001600160a01b0380851691908316907f5570d70a002632a7b0b3c9304cc89efb62d8da9eca0dbd7752c83b737906829690600090a381511561034a576000836001600160a01b03168360405161041291906105f4565b600060405180830381855af49150503d806000811461044d576040519150601f19603f3d011682016040523d82523d6000602084013e610452565b606091505b5050905080610183573d806000803e806000fd5b6000610470610390565b90508160008051602061062483398151915255816001600160a01b0316816001600160a01b03167fdf435d422321da6b195902d70fc417c06a32f88379c20dd8f2a8da07088cec2960405160405180910390a35050565b6000602082840312156104d957600080fd5b81356001600160e01b03198116811461026857600080fd5b80356001600160a01b038116811461050857600080fd5b919050565b60006020828403121561051f57600080fd5b610268826104f1565b60008060006040848603121561053d57600080fd5b610546846104f1565b925060208401356001600160401b038082111561056257600080fd5b818601915086601f83011261057657600080fd5b81358181111561058557600080fd5b87602082850101111561059757600080fd5b6020830194508093505050509250925092565b6000602082840312156105bc57600080fd5b8151801515811461026857600080fd5b6020808252600e908201526d1393d517d055551213d49256915160921b604082015260600190565b6000825160005b8181101561061557602081860181015185830152016105fb565b50600092019182525091905056feb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbca2646970667358221220f8092c6d4e38cdaacdb3c899e6c75d21baaeaba76b22f353673f931b1f0f8a9b64736f6c63430008130033b53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61038be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0a2646970667358221220bab4dc364f42f8e82ed2983d450c7f7b787f86ecc2b056c62a10271dfd59e29364736f6c63430008130033", diff --git a/lib/g-uni-v1-core/deployments/arbitrumSepolia/GUniFactory_Proxy.json b/lib/g-uni-v1-core/deployments/arbitrumSepolia/GUniFactory_Proxy.json index 7ac4f1028..a99a904e4 100644 --- a/lib/g-uni-v1-core/deployments/arbitrumSepolia/GUniFactory_Proxy.json +++ b/lib/g-uni-v1-core/deployments/arbitrumSepolia/GUniFactory_Proxy.json @@ -1,5 +1,5 @@ { - "address": "0x39AC4439e6CB9427C073259e5742529cE46DD663", + "address": "0x7f502e91182338F19CB6F4B02B33B33feD1c5000", "abi": [ { "inputs": [ @@ -145,56 +145,57 @@ "type": "receive" } ], - "transactionHash": "0xa994440a2ad7747eb9c88bea6b326358d7d24f1d345f0ed3b425561b05cf824f", + "transactionHash": "0x9b83e7b0549ce4adfcc2ffbdfb847572df815ca36cb5951ffecf2136042ff281", "receipt": { "to": null, - "from": "0xB47C8e4bEb28af80eDe5E5bF474927b110Ef2c0e", - "contractAddress": "0x39AC4439e6CB9427C073259e5742529cE46DD663", - "transactionIndex": 4, - "gasUsed": "1375415", - "logsBloom": "0x00100000000020000000000000000000000000000000000000000000000000000000000000020000000400000000000000000000000000000000000000000000000000000000000000000000000008000000000000000000000400000200000000000000020010000000000000000800000000002000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000200000000000000080000000000000000000000000000000000000000000000000010000000000000000000000000000020000000000000000000080400000000000000000000000000000000000000000000", - "blockHash": "0xf5b7b2abe69c5722bd1b5142d00597648f1d6aeb9e41fe577400c4451de3259b", - "transactionHash": "0xa994440a2ad7747eb9c88bea6b326358d7d24f1d345f0ed3b425561b05cf824f", + "from": "0x5fCfdc65044bf008A6b473512D34102282Ee43a6", + "contractAddress": "0x7f502e91182338F19CB6F4B02B33B33feD1c5000", + "transactionIndex": 3, + "gasUsed": "6114773", + "logsBloom": "0x00101000000020000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000400000000000000000000000000000000000000000000000008008000000000000000000000000000200000000000000020000000001000000000800000000002000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000100000200000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000020000000000000000000000400000000000000000000000000000000000000000000", + "blockHash": "0xf177e051cdb89f5b045dfa101135f95bd01e47ac4dc9fb9096403347f9c6c7e0", + "transactionHash": "0x9b83e7b0549ce4adfcc2ffbdfb847572df815ca36cb5951ffecf2136042ff281", "logs": [ { - "transactionIndex": 4, - "blockNumber": 53304410, - "transactionHash": "0xa994440a2ad7747eb9c88bea6b326358d7d24f1d345f0ed3b425561b05cf824f", - "address": "0x39AC4439e6CB9427C073259e5742529cE46DD663", + "transactionIndex": 3, + "blockNumber": 57912178, + "transactionHash": "0x9b83e7b0549ce4adfcc2ffbdfb847572df815ca36cb5951ffecf2136042ff281", + "address": "0x7f502e91182338F19CB6F4B02B33B33feD1c5000", "topics": [ "0x5570d70a002632a7b0b3c9304cc89efb62d8da9eca0dbd7752c83b7379068296", "0x0000000000000000000000000000000000000000000000000000000000000000", - "0x00000000000000000000000090608f57161ac771b28fb0adcd2434cfa1463201" + "0x0000000000000000000000009ff468bd1de89f0229193f1f8f0ba0e265ba026a" ], "data": "0x", - "logIndex": 4, - "blockHash": "0xf5b7b2abe69c5722bd1b5142d00597648f1d6aeb9e41fe577400c4451de3259b" + "logIndex": 6, + "blockHash": "0xf177e051cdb89f5b045dfa101135f95bd01e47ac4dc9fb9096403347f9c6c7e0" }, { - "transactionIndex": 4, - "blockNumber": 53304410, - "transactionHash": "0xa994440a2ad7747eb9c88bea6b326358d7d24f1d345f0ed3b425561b05cf824f", - "address": "0x39AC4439e6CB9427C073259e5742529cE46DD663", + "transactionIndex": 3, + "blockNumber": 57912178, + "transactionHash": "0x9b83e7b0549ce4adfcc2ffbdfb847572df815ca36cb5951ffecf2136042ff281", + "address": "0x7f502e91182338F19CB6F4B02B33B33feD1c5000", "topics": [ "0xdf435d422321da6b195902d70fc417c06a32f88379c20dd8f2a8da07088cec29", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x000000000000000000000000b47c8e4beb28af80ede5e5bf474927b110ef2c0e" ], "data": "0x", - "logIndex": 5, - "blockHash": "0xf5b7b2abe69c5722bd1b5142d00597648f1d6aeb9e41fe577400c4451de3259b" + "logIndex": 7, + "blockHash": "0xf177e051cdb89f5b045dfa101135f95bd01e47ac4dc9fb9096403347f9c6c7e0" } ], - "blockNumber": 53304410, - "cumulativeGasUsed": "2551868", + "blockNumber": 57912178, + "cumulativeGasUsed": "9556108", "status": 1, "byzantium": true }, "args": [ - "0x90608F57161aC771b28fb0adCd2434cfa1463201", + "0x9ff468bd1De89F0229193F1F8f0bA0e265bA026a", "0xB47C8e4bEb28af80eDe5E5bF474927b110Ef2c0e", - "0xc0c53b8b00000000000000000000000090608f57161ac771b28fb0adcd2434cfa1463201000000000000000000000000b47c8e4beb28af80ede5e5bf474927b110ef2c0e000000000000000000000000b47c8e4beb28af80ede5e5bf474927b110ef2c0e" + "0xc0c53b8b000000000000000000000000ce7427a94bc9b8a90e2c8d91cb0247d779819437000000000000000000000000b47c8e4beb28af80ede5e5bf474927b110ef2c0e000000000000000000000000b47c8e4beb28af80ede5e5bf474927b110ef2c0e" ], + "numDeployments": 1, "solcInputHash": "f1f932b5297d788fce5c0abb03e1e395", "metadata": "{\"compiler\":{\"version\":\"0.8.19+commit.7dd6d404\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"implementationAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"adminAddress\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"stateMutability\":\"payable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousAdmin\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newAdmin\",\"type\":\"address\"}],\"name\":\"ProxyAdminTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousImplementation\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"ProxyImplementationUpdated\",\"type\":\"event\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"inputs\":[],\"name\":\"proxyAdmin\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"id\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newAdmin\",\"type\":\"address\"}],\"name\":\"transferProxyAdmin\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"upgradeTo\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"upgradeToAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"notice\":\"Proxy implementing EIP173 for ownership management\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/vendor/proxy/EIP173Proxy.sol\":\"EIP173Proxy\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":1},\"remappings\":[]},\"sources\":{\"contracts/vendor/proxy/EIP173Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity 0.8.19;\\n\\nimport \\\"./Proxy.sol\\\";\\n\\ninterface ERC165 {\\n function supportsInterface(bytes4 id) external view returns (bool);\\n}\\n\\n///@notice Proxy implementing EIP173 for ownership management\\ncontract EIP173Proxy is Proxy {\\n // ////////////////////////// EVENTS ///////////////////////////////////////////////////////////////////////\\n\\n event ProxyAdminTransferred(\\n address indexed previousAdmin,\\n address indexed newAdmin\\n );\\n\\n // /////////////////////// CONSTRUCTOR //////////////////////////////////////////////////////////////////////\\n\\n constructor(\\n address implementationAddress,\\n address adminAddress,\\n bytes memory data\\n ) payable {\\n _setImplementation(implementationAddress, data);\\n _setProxyAdmin(adminAddress);\\n }\\n\\n // ///////////////////// EXTERNAL ///////////////////////////////////////////////////////////////////////////\\n\\n function proxyAdmin() external view returns (address) {\\n return _proxyAdmin();\\n }\\n\\n function supportsInterface(bytes4 id) external view returns (bool) {\\n if (id == 0x01ffc9a7 || id == 0x7f5828d0) {\\n return true;\\n }\\n if (id == 0xFFFFFFFF) {\\n return false;\\n }\\n\\n ERC165 implementation;\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n implementation := sload(\\n 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc\\n )\\n }\\n\\n // Technically this is not standard compliant as ERC-165 require 30,000 gas which that call cannot ensure\\n // because it is itself inside `supportsInterface` that might only get 30,000 gas.\\n // In practise this is unlikely to be an issue.\\n try implementation.supportsInterface(id) returns (bool support) {\\n return support;\\n } catch {\\n return false;\\n }\\n }\\n\\n function transferProxyAdmin(address newAdmin) external onlyProxyAdmin {\\n _setProxyAdmin(newAdmin);\\n }\\n\\n function upgradeTo(address newImplementation) external onlyProxyAdmin {\\n _setImplementation(newImplementation, \\\"\\\");\\n }\\n\\n function upgradeToAndCall(address newImplementation, bytes calldata data)\\n external\\n payable\\n onlyProxyAdmin\\n {\\n _setImplementation(newImplementation, data);\\n }\\n\\n // /////////////////////// MODIFIERS ////////////////////////////////////////////////////////////////////////\\n\\n modifier onlyProxyAdmin() {\\n require(msg.sender == _proxyAdmin(), \\\"NOT_AUTHORIZED\\\");\\n _;\\n }\\n\\n // ///////////////////////// INTERNAL //////////////////////////////////////////////////////////////////////\\n\\n function _proxyAdmin() internal view returns (address adminAddress) {\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n adminAddress := sload(\\n 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103\\n )\\n }\\n }\\n\\n function _setProxyAdmin(address newAdmin) internal {\\n address previousAdmin = _proxyAdmin();\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n sstore(\\n 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103,\\n newAdmin\\n )\\n }\\n emit ProxyAdminTransferred(previousAdmin, newAdmin);\\n }\\n}\\n\",\"keccak256\":\"0x3e2e1473604e7e42e99f77ad5e5d8eb8a3b6d0e63c154a9c6d9a223190372070\",\"license\":\"GPL-3.0\"},\"contracts/vendor/proxy/Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity 0.8.19;\\n\\n// EIP-1967\\nabstract contract Proxy {\\n // /////////////////////// EVENTS ///////////////////////////////////////////////////////////////////////////\\n\\n event ProxyImplementationUpdated(\\n address indexed previousImplementation,\\n address indexed newImplementation\\n );\\n\\n // ///////////////////// EXTERNAL ///////////////////////////////////////////////////////////////////////////\\n\\n // prettier-ignore\\n receive() external payable virtual {\\n revert(\\\"ETHER_REJECTED\\\"); // explicit reject by default\\n }\\n\\n fallback() external payable {\\n _fallback();\\n }\\n\\n // ///////////////////////// INTERNAL //////////////////////////////////////////////////////////////////////\\n\\n function _fallback() internal {\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n let implementationAddress := sload(\\n 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc\\n )\\n calldatacopy(0x0, 0x0, calldatasize())\\n let success := delegatecall(\\n gas(),\\n implementationAddress,\\n 0x0,\\n calldatasize(),\\n 0,\\n 0\\n )\\n let retSz := returndatasize()\\n returndatacopy(0, 0, retSz)\\n switch success\\n case 0 {\\n revert(0, retSz)\\n }\\n default {\\n return(0, retSz)\\n }\\n }\\n }\\n\\n function _setImplementation(address newImplementation, bytes memory data)\\n internal\\n {\\n address previousImplementation;\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n previousImplementation := sload(\\n 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc\\n )\\n }\\n\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n sstore(\\n 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc,\\n newImplementation\\n )\\n }\\n\\n emit ProxyImplementationUpdated(\\n previousImplementation,\\n newImplementation\\n );\\n\\n if (data.length > 0) {\\n (bool success, ) = newImplementation.delegatecall(data);\\n if (!success) {\\n assembly {\\n // This assembly ensure the revert contains the exact string data\\n let returnDataSize := returndatasize()\\n returndatacopy(0, 0, returnDataSize)\\n revert(0, returnDataSize)\\n }\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0x5fd4f538f92f377d4e7b09fe8d5387eb1d5ff5ac95869c969be5049ae23439ba\",\"license\":\"GPL-3.0\"}},\"version\":1}", "bytecode": "0x6080604052604051610992380380610992833981016040819052610022916101de565b61002c838261003d565b61003582610119565b5050506102ca565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc8054908390556040516001600160a01b0380851691908316907f5570d70a002632a7b0b3c9304cc89efb62d8da9eca0dbd7752c83b737906829690600090a3815115610114576000836001600160a01b0316836040516100be91906102ae565b600060405180830381855af49150503d80600081146100f9576040519150601f19603f3d011682016040523d82523d6000602084013e6100fe565b606091505b5050905080610112573d806000803e806000fd5b505b505050565b60006101316000805160206109728339815191525490565b90508160008051602061097283398151915255816001600160a01b0316816001600160a01b03167fdf435d422321da6b195902d70fc417c06a32f88379c20dd8f2a8da07088cec2960405160405180910390a35050565b80516001600160a01b038116811461019f57600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60005b838110156101d55781810151838201526020016101bd565b50506000910152565b6000806000606084860312156101f357600080fd5b6101fc84610188565b925061020a60208501610188565b60408501519092506001600160401b038082111561022757600080fd5b818601915086601f83011261023b57600080fd5b81518181111561024d5761024d6101a4565b604051601f8201601f19908116603f01168101908382118183101715610275576102756101a4565b8160405282815289602084870101111561028e57600080fd5b61029f8360208301602088016101ba565b80955050505050509250925092565b600082516102c08184602087016101ba565b9190910192915050565b610699806102d96000396000f3fe60806040526004361061004e5760003560e01c806301ffc9a71461009b5780633659cfe6146100d05780633e47158c146100f05780634f1ef2861461011d5780638356ca4f1461013057610091565b366100915760405162461bcd60e51b815260206004820152600e60248201526d115512115497d491529150d5115160921b60448201526064015b60405180910390fd5b610099610150565b005b3480156100a757600080fd5b506100bb6100b63660046104c7565b610189565b60405190151581526020015b60405180910390f35b3480156100dc57600080fd5b506100996100eb36600461050d565b61026f565b3480156100fc57600080fd5b506101056102c3565b6040516001600160a01b0390911681526020016100c7565b61009961012b366004610528565b6102d2565b34801561013c57600080fd5b5061009961014b36600461050d565b61034f565b6000805160206106448339815191525460003681823780813683855af491503d8082833e82801561017f578183f35b8183fd5b50505050565b60006301ffc9a760e01b6001600160e01b0319831614806101ba57506307f5828d60e41b6001600160e01b03198316145b156101c757506001919050565b6001600160e01b031980831690036101e157506000919050565b600080516020610644833981519152546040516301ffc9a760e01b81526001600160e01b0319841660048201526001600160a01b038216906301ffc9a790602401602060405180830381865afa92505050801561025b575060408051601f3d908101601f19168201909252610258918101906105aa565b60015b6102685750600092915050565b9392505050565b610277610390565b6001600160a01b0316336001600160a01b0316146102a75760405162461bcd60e51b8152600401610088906105cc565b6102c081604051806020016040528060008152506103a3565b50565b60006102cd610390565b905090565b6102da610390565b6001600160a01b0316336001600160a01b03161461030a5760405162461bcd60e51b8152600401610088906105cc565b61034a8383838080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506103a392505050565b505050565b610357610390565b6001600160a01b0316336001600160a01b0316146103875760405162461bcd60e51b8152600401610088906105cc565b6102c081610466565b6000805160206106248339815191525490565b6000805160206106448339815191528054908390556040516001600160a01b0380851691908316907f5570d70a002632a7b0b3c9304cc89efb62d8da9eca0dbd7752c83b737906829690600090a381511561034a576000836001600160a01b03168360405161041291906105f4565b600060405180830381855af49150503d806000811461044d576040519150601f19603f3d011682016040523d82523d6000602084013e610452565b606091505b5050905080610183573d806000803e806000fd5b6000610470610390565b90508160008051602061062483398151915255816001600160a01b0316816001600160a01b03167fdf435d422321da6b195902d70fc417c06a32f88379c20dd8f2a8da07088cec2960405160405180910390a35050565b6000602082840312156104d957600080fd5b81356001600160e01b03198116811461026857600080fd5b80356001600160a01b038116811461050857600080fd5b919050565b60006020828403121561051f57600080fd5b610268826104f1565b60008060006040848603121561053d57600080fd5b610546846104f1565b925060208401356001600160401b038082111561056257600080fd5b818601915086601f83011261057657600080fd5b81358181111561058557600080fd5b87602082850101111561059757600080fd5b6020830194508093505050509250925092565b6000602082840312156105bc57600080fd5b8151801515811461026857600080fd5b6020808252600e908201526d1393d517d055551213d49256915160921b604082015260600190565b6000825160005b8181101561061557602081860181015185830152016105fb565b50600092019182525091905056feb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbca2646970667358221220f8092c6d4e38cdaacdb3c899e6c75d21baaeaba76b22f353673f931b1f0f8a9b64736f6c63430008130033b53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103", diff --git a/lib/g-uni-v1-core/deployments/arbitrumSepolia/GUniPool.json b/lib/g-uni-v1-core/deployments/arbitrumSepolia/GUniPool.json index be35676c8..afd2eb704 100644 --- a/lib/g-uni-v1-core/deployments/arbitrumSepolia/GUniPool.json +++ b/lib/g-uni-v1-core/deployments/arbitrumSepolia/GUniPool.json @@ -1,5 +1,5 @@ { - "address": "0xF3e2578C66071a637F06cc02b1c11DeC0784C1A6", + "address": "0xCE7427a94bc9B8A90E2C8d91cB0247D779819437", "abi": [ { "inputs": [ @@ -1150,25 +1150,26 @@ "type": "function" } ], - "transactionHash": "0x8ca1d397f287c7ac87d7677c74656480c141f7242e78f3b9ad4612cf77a39fbe", + "transactionHash": "0x8556c6e13c6c9182f77b188412ef62e184732d732ac66d5bd24f69a7a9f43a94", "receipt": { "to": null, - "from": "0xB47C8e4bEb28af80eDe5E5bF474927b110Ef2c0e", - "contractAddress": "0xF3e2578C66071a637F06cc02b1c11DeC0784C1A6", + "from": "0x5fCfdc65044bf008A6b473512D34102282Ee43a6", + "contractAddress": "0xCE7427a94bc9B8A90E2C8d91cB0247D779819437", "transactionIndex": 4, - "gasUsed": "5709523", + "gasUsed": "40852250", "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0xde2678056ddc18fe88264d249865e9cc47de73569a4988671c34dc0cf897d472", - "transactionHash": "0x8ca1d397f287c7ac87d7677c74656480c141f7242e78f3b9ad4612cf77a39fbe", + "blockHash": "0x8819a719eb6a9cbd16f6db1117ab4f4a0fb6aa7a2dc26cb4d5553ccda2071636", + "transactionHash": "0x8556c6e13c6c9182f77b188412ef62e184732d732ac66d5bd24f69a7a9f43a94", "logs": [], - "blockNumber": 54644356, - "cumulativeGasUsed": "6328188", + "blockNumber": 57910853, + "cumulativeGasUsed": "48848339", "status": 1, "byzantium": true }, "args": [ "0xB47C8e4bEb28af80eDe5E5bF474927b110Ef2c0e" ], + "numDeployments": 1, "solcInputHash": "f1f932b5297d788fce5c0abb03e1e395", "metadata": "{\"compiler\":{\"version\":\"0.8.19+commit.7dd6d404\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address payable\",\"name\":\"_gelato\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"burnAmount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount0Out\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount1Out\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint128\",\"name\":\"liquidityBurned\",\"type\":\"uint128\"}],\"name\":\"Burned\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"feesEarned0\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"feesEarned1\",\"type\":\"uint256\"}],\"name\":\"FeesEarned\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"mintAmount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount0In\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount1In\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint128\",\"name\":\"liquidityMinted\",\"type\":\"uint128\"}],\"name\":\"Minted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousManager\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newManager\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"int24\",\"name\":\"lowerTick_\",\"type\":\"int24\"},{\"indexed\":false,\"internalType\":\"int24\",\"name\":\"upperTick_\",\"type\":\"int24\"},{\"indexed\":false,\"internalType\":\"uint128\",\"name\":\"liquidityBefore\",\"type\":\"uint128\"},{\"indexed\":false,\"internalType\":\"uint128\",\"name\":\"liquidityAfter\",\"type\":\"uint128\"}],\"name\":\"Rebalance\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint16\",\"name\":\"managerFee\",\"type\":\"uint16\"}],\"name\":\"SetManagerFee\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"oldAdminTreasury\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newAdminTreasury\",\"type\":\"address\"}],\"name\":\"UpdateAdminTreasury\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint16\",\"name\":\"gelatoRebalanceBPS\",\"type\":\"uint16\"},{\"indexed\":false,\"internalType\":\"uint16\",\"name\":\"gelatoWithdrawBPS\",\"type\":\"uint16\"},{\"indexed\":false,\"internalType\":\"uint16\",\"name\":\"gelatoSlippageBPS\",\"type\":\"uint16\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"gelatoSlippageInterval\",\"type\":\"uint32\"}],\"name\":\"UpdateGelatoParams\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"GELATO\",\"outputs\":[{\"internalType\":\"address payable\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"burnAmount\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"}],\"name\":\"burn\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"amount0\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amount1\",\"type\":\"uint256\"},{\"internalType\":\"uint128\",\"name\":\"liquidityBurned\",\"type\":\"uint128\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"subtractedValue\",\"type\":\"uint256\"}],\"name\":\"decreaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"int24\",\"name\":\"newLowerTick\",\"type\":\"int24\"},{\"internalType\":\"int24\",\"name\":\"newUpperTick\",\"type\":\"int24\"},{\"internalType\":\"uint160\",\"name\":\"swapThresholdPrice\",\"type\":\"uint160\"},{\"internalType\":\"uint256\",\"name\":\"swapAmountBPS\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"zeroForOne\",\"type\":\"bool\"}],\"name\":\"executiveRebalance\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"gelatoBalance0\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"gelatoBalance1\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"gelatoFeeBPS\",\"outputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"gelatoRebalanceBPS\",\"outputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"gelatoSlippageBPS\",\"outputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"gelatoSlippageInterval\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"gelatoWithdrawBPS\",\"outputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount0Max\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amount1Max\",\"type\":\"uint256\"}],\"name\":\"getMintAmounts\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"amount0\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amount1\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"mintAmount\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getPositionID\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"positionID\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getUnderlyingBalances\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"amount0Current\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amount1Current\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint160\",\"name\":\"sqrtRatioX96\",\"type\":\"uint160\"}],\"name\":\"getUnderlyingBalancesAtPrice\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"amount0Current\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amount1Current\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"addedValue\",\"type\":\"uint256\"}],\"name\":\"increaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"_name\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"_symbol\",\"type\":\"string\"},{\"internalType\":\"address\",\"name\":\"_pool\",\"type\":\"address\"},{\"internalType\":\"uint16\",\"name\":\"_managerFeeBPS\",\"type\":\"uint16\"},{\"internalType\":\"int24\",\"name\":\"_lowerTick\",\"type\":\"int24\"},{\"internalType\":\"int24\",\"name\":\"_upperTick\",\"type\":\"int24\"},{\"internalType\":\"address\",\"name\":\"_manager_\",\"type\":\"address\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_managerFeeBPS\",\"type\":\"uint16\"}],\"name\":\"initializeManagerFee\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"lowerTick\",\"outputs\":[{\"internalType\":\"int24\",\"name\":\"\",\"type\":\"int24\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"manager\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"managerBalance0\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"managerBalance1\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"managerFeeBPS\",\"outputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"managerTreasury\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"mintAmount\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"}],\"name\":\"mint\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"amount0\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amount1\",\"type\":\"uint256\"},{\"internalType\":\"uint128\",\"name\":\"liquidityMinted\",\"type\":\"uint128\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pool\",\"outputs\":[{\"internalType\":\"contract IUniswapV3Pool\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint160\",\"name\":\"swapThresholdPrice\",\"type\":\"uint160\"},{\"internalType\":\"uint256\",\"name\":\"swapAmountBPS\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"zeroForOne\",\"type\":\"bool\"},{\"internalType\":\"uint256\",\"name\":\"feeAmount\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"paymentToken\",\"type\":\"address\"}],\"name\":\"rebalance\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"token0\",\"outputs\":[{\"internalType\":\"contract IERC20\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"token1\",\"outputs\":[{\"internalType\":\"contract IERC20\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount0Owed\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amount1Owed\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"name\":\"uniswapV3MintCallback\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"int256\",\"name\":\"amount0Delta\",\"type\":\"int256\"},{\"internalType\":\"int256\",\"name\":\"amount1Delta\",\"type\":\"int256\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"name\":\"uniswapV3SwapCallback\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"newRebalanceBPS\",\"type\":\"uint16\"},{\"internalType\":\"uint16\",\"name\":\"newWithdrawBPS\",\"type\":\"uint16\"},{\"internalType\":\"uint16\",\"name\":\"newSlippageBPS\",\"type\":\"uint16\"},{\"internalType\":\"uint32\",\"name\":\"newSlippageInterval\",\"type\":\"uint32\"},{\"internalType\":\"address\",\"name\":\"newTreasury\",\"type\":\"address\"}],\"name\":\"updateGelatoParams\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"upperTick\",\"outputs\":[{\"internalType\":\"int24\",\"name\":\"\",\"type\":\"int24\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"version\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"feeAmount\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"feeToken\",\"type\":\"address\"}],\"name\":\"withdrawGelatoBalance\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"feeAmount\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"feeToken\",\"type\":\"address\"}],\"name\":\"withdrawManagerBalance\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"events\":{\"Approval(address,address,uint256)\":{\"details\":\"Emitted when the allowance of a `spender` for an `owner` is set by a call to {approve}. `value` is the new allowance.\"},\"Transfer(address,address,uint256)\":{\"details\":\"Emitted when `value` tokens are moved from one account (`from`) to another (`to`). Note that `value` may be zero.\"}},\"kind\":\"dev\",\"methods\":{\"allowance(address,address)\":{\"details\":\"See {IERC20-allowance}.\"},\"approve(address,uint256)\":{\"details\":\"See {IERC20-approve}. Requirements: - `spender` cannot be the zero address.\"},\"balanceOf(address)\":{\"details\":\"See {IERC20-balanceOf}.\"},\"burn(uint256,address)\":{\"params\":{\"burnAmount\":\"The number of G-UNI tokens to burn\",\"receiver\":\"The account to receive the underlying amounts of token0 and token1\"},\"returns\":{\"amount0\":\"amount of token0 transferred to receiver for burning `burnAmount`\",\"amount1\":\"amount of token1 transferred to receiver for burning `burnAmount`\",\"liquidityBurned\":\"amount of liquidity removed from the underlying Uniswap V3 position\"}},\"decimals()\":{\"details\":\"Returns the number of decimals used to get its user representation. For example, if `decimals` equals `2`, a balance of `505` tokens should be displayed to a user as `5,05` (`505 / 10 ** 2`). Tokens usually opt for a value of 18, imitating the relationship between Ether and Wei. This is the value {ERC20} uses, unless this function is overridden; NOTE: This information is only used for _display_ purposes: it in no way affects any of the arithmetic of the contract, including {IERC20-balanceOf} and {IERC20-transfer}.\"},\"decreaseAllowance(address,uint256)\":{\"details\":\"Atomically decreases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address. - `spender` must have allowance for the caller of at least `subtractedValue`.\"},\"executiveRebalance(int24,int24,uint160,uint256,bool)\":{\"details\":\"When changing the range the inventory of token0 and token1 may be rebalanced with a swap to deposit as much liquidity as possible into the new position. Swap parameters can be computed by simulating the whole operation: remove all liquidity, deposit as much as possible into new position, then observe how much of token0 or token1 is leftover. Swap a proportion of this leftover to deposit more liquidity into the position, since any leftover will be unused and sit idle until the next rebalance.\",\"params\":{\"newLowerTick\":\"The new lower bound of the position's range\",\"newUpperTick\":\"The new upper bound of the position's range\",\"swapAmountBPS\":\"amount of token to swap as proportion of total. Pass 0 to ignore swap.\",\"swapThresholdPrice\":\"slippage parameter on the swap as a max or min sqrtPriceX96\",\"zeroForOne\":\"Which token to input into the swap (true = token0, false = token1)\"}},\"getMintAmounts(uint256,uint256)\":{\"params\":{\"amount0Max\":\"The maximum amount of token1 to forward on mint\"},\"returns\":{\"amount0\":\"actual amount of token0 to forward when minting `mintAmount`\",\"amount1\":\"actual amount of token1 to forward when minting `mintAmount`\",\"mintAmount\":\"maximum number of G-UNI tokens to mint\"}},\"getUnderlyingBalances()\":{\"returns\":{\"amount0Current\":\"current total underlying balance of token0\",\"amount1Current\":\"current total underlying balance of token1\"}},\"increaseAllowance(address,uint256)\":{\"details\":\"Atomically increases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address.\"},\"initialize(string,string,address,uint16,int24,int24,address)\":{\"params\":{\"_lowerTick\":\"initial upperTick (only changeable with executiveRebalance)\",\"_managerFeeBPS\":\"proportion of fees earned that go to manager treasury note that the 4 above params are NOT UPDATEABLE AFTER INILIALIZATION\",\"_manager_\":\"address of manager (ownership can be transferred)\",\"_name\":\"name of G-UNI token\",\"_pool\":\"address of Uniswap V3 pool\",\"_symbol\":\"symbol of G-UNI token\"}},\"initializeManagerFee(uint16)\":{\"params\":{\"_managerFeeBPS\":\"proportion of fees earned that are credited to manager in Basis Points\"}},\"manager()\":{\"details\":\"Returns the address of the current manager.\"},\"mint(uint256,address)\":{\"details\":\"to compute the amouint of tokens necessary to mint `mintAmount` see getMintAmounts\",\"params\":{\"mintAmount\":\"The number of G-UNI tokens to mint\",\"receiver\":\"The account to receive the minted tokens\"},\"returns\":{\"amount0\":\"amount of token0 transferred from msg.sender to mint `mintAmount`\",\"amount1\":\"amount of token1 transferred from msg.sender to mint `mintAmount`\",\"liquidityMinted\":\"amount of liquidity added to the underlying Uniswap V3 position\"}},\"name()\":{\"details\":\"Returns the name of the token.\"},\"renounceOwnership()\":{\"details\":\"Leaves the contract without manager. It will not be possible to call `onlyManager` functions anymore. Can only be called by the current manager. NOTE: Renouncing ownership will leave the contract without an manager, thereby removing any functionality that is only available to the manager.\"},\"symbol()\":{\"details\":\"Returns the symbol of the token, usually a shorter version of the name.\"},\"totalSupply()\":{\"details\":\"See {IERC20-totalSupply}.\"},\"transfer(address,uint256)\":{\"details\":\"See {IERC20-transfer}. Requirements: - `recipient` cannot be the zero address. - the caller must have a balance of at least `amount`.\"},\"transferFrom(address,address,uint256)\":{\"details\":\"See {IERC20-transferFrom}. Emits an {Approval} event indicating the updated allowance. This is not required by the EIP. See the note at the beginning of {ERC20}. Requirements: - `sender` and `recipient` cannot be the zero address. - `sender` must have a balance of at least `amount`. - the caller must have allowance for ``sender``'s tokens of at least `amount`.\"},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current manager.\"},\"updateGelatoParams(uint16,uint16,uint16,uint32,address)\":{\"params\":{\"newRebalanceBPS\":\"controls frequency of gelato rebalances: gas fee to execute rebalance can be gelatoRebalanceBPS proportion of fees earned since last rebalance\",\"newSlippageBPS\":\"maximum slippage on swaps during gelato rebalance\",\"newSlippageInterval\":\"length of time for TWAP used in computing slippage on swaps\",\"newTreasury\":\"address where managerFee withdrawals are sent\",\"newWithdrawBPS\":\"controls frequency of gelato withdrawals: gas fee to execute withdrawal can be gelatoWithdrawBPS proportion of fees accrued since last withdraw\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"burn(uint256,address)\":{\"notice\":\"burn G-UNI tokens (fractional shares of a Uniswap V3 position) and receive tokens\"},\"executiveRebalance(int24,int24,uint160,uint256,bool)\":{\"notice\":\"Change the range of underlying UniswapV3 position, only manager can call\"},\"getMintAmounts(uint256,uint256)\":{\"notice\":\"compute maximum G-UNI tokens that can be minted from `amount0Max` and `amount1Max`\"},\"getUnderlyingBalances()\":{\"notice\":\"compute total underlying holdings of the G-UNI token supply includes current liquidity invested in uniswap position, current fees earned and any uninvested leftover (but does not include manager or gelato fees accrued)\"},\"initialize(string,string,address,uint16,int24,int24,address)\":{\"notice\":\"initialize storage variables on a new G-UNI pool, only called once\"},\"initializeManagerFee(uint16)\":{\"notice\":\"initializeManagerFee sets a managerFee, only manager can call. If a manager fee was not set in the initialize function it can be set here but ONLY ONCE- after it is set to a non-zero value, managerFee can never be set again.\"},\"mint(uint256,address)\":{\"notice\":\"mint fungible G-UNI tokens, fractional shares of a Uniswap V3 position\"},\"rebalance(uint160,uint256,bool,uint256,address)\":{\"notice\":\"Reinvest fees earned into underlying position, only gelato executors can call Position bounds CANNOT be altered by gelato, only manager may via executiveRebalance. Frequency of rebalance configured with gelatoRebalanceBPS, alterable by manager.\"},\"uniswapV3MintCallback(uint256,uint256,bytes)\":{\"notice\":\"Uniswap V3 callback fn, called back on pool.mint\"},\"uniswapV3SwapCallback(int256,int256,bytes)\":{\"notice\":\"Uniswap v3 callback fn, called back on pool.swap\"},\"updateGelatoParams(uint16,uint16,uint16,uint32,address)\":{\"notice\":\"change configurable parameters, only manager can call\"},\"withdrawGelatoBalance(uint256,address)\":{\"notice\":\"withdraw gelato fees accrued, only gelato executors can call. Frequency of withdrawals configured with gelatoWithdrawBPS, alterable by manager.\"},\"withdrawManagerBalance(uint256,address)\":{\"notice\":\"withdraw manager fees accrued, only gelato executors can call. Target account to receive fees is managerTreasury, alterable by manager. Frequency of withdrawals configured with gelatoWithdrawBPS, alterable by manager.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/GUniPool.sol\":\"GUniPool\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":1},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n// solhint-disable-next-line compiler-version\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\\n * behind a proxy. Since a proxied contract can't have a constructor, it's common to move constructor logic to an\\n * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\\n * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\\n *\\n * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\\n * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.\\n *\\n * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\\n * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\\n */\\nabstract contract Initializable {\\n\\n /**\\n * @dev Indicates that the contract has been initialized.\\n */\\n bool private _initialized;\\n\\n /**\\n * @dev Indicates that the contract is in the process of being initialized.\\n */\\n bool private _initializing;\\n\\n /**\\n * @dev Modifier to protect an initializer function from being invoked twice.\\n */\\n modifier initializer() {\\n require(_initializing || !_initialized, \\\"Initializable: contract is already initialized\\\");\\n\\n bool isTopLevelCall = !_initializing;\\n if (isTopLevelCall) {\\n _initializing = true;\\n _initialized = true;\\n }\\n\\n _;\\n\\n if (isTopLevelCall) {\\n _initializing = false;\\n }\\n }\\n}\\n\",\"keccak256\":\"0x67d2f282a9678e58e878a0b774041ba7a01e2740a262aea97a3f681339914713\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\nimport \\\"../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Contract module that helps prevent reentrant calls to a function.\\n *\\n * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier\\n * available, which can be applied to functions to make sure there are no nested\\n * (reentrant) calls to them.\\n *\\n * Note that because there is a single `nonReentrant` guard, functions marked as\\n * `nonReentrant` may not call one another. This can be worked around by making\\n * those functions `private`, and then adding `external` `nonReentrant` entry\\n * points to them.\\n *\\n * TIP: If you would like to learn more about reentrancy and alternative ways\\n * to protect against it, check out our blog post\\n * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].\\n */\\nabstract contract ReentrancyGuardUpgradeable is Initializable {\\n // Booleans are more expensive than uint256 or any type that takes up a full\\n // word because each write operation emits an extra SLOAD to first read the\\n // slot's contents, replace the bits taken up by the boolean, and then write\\n // back. This is the compiler's defense against contract upgrades and\\n // pointer aliasing, and it cannot be disabled.\\n\\n // The values being non-zero value makes deployment a bit more expensive,\\n // but in exchange the refund on every call to nonReentrant will be lower in\\n // amount. Since refunds are capped to a percentage of the total\\n // transaction's gas, it is best to keep them low in cases like this one, to\\n // increase the likelihood of the full refund coming into effect.\\n uint256 private constant _NOT_ENTERED = 1;\\n uint256 private constant _ENTERED = 2;\\n\\n uint256 private _status;\\n\\n function __ReentrancyGuard_init() internal initializer {\\n __ReentrancyGuard_init_unchained();\\n }\\n\\n function __ReentrancyGuard_init_unchained() internal initializer {\\n _status = _NOT_ENTERED;\\n }\\n\\n /**\\n * @dev Prevents a contract from calling itself, directly or indirectly.\\n * Calling a `nonReentrant` function from another `nonReentrant`\\n * function is not supported. It is possible to prevent this from happening\\n * by making the `nonReentrant` function external, and make it call a\\n * `private` function that does the actual work.\\n */\\n modifier nonReentrant() {\\n // On the first call to nonReentrant, _notEntered will be true\\n require(_status != _ENTERED, \\\"ReentrancyGuard: reentrant call\\\");\\n\\n // Any calls to nonReentrant after this point will fail\\n _status = _ENTERED;\\n\\n _;\\n\\n // By storing the original value once again, a refund is triggered (see\\n // https://eips.ethereum.org/EIPS/eip-2200)\\n _status = _NOT_ENTERED;\\n }\\n uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0x89fa60d14355f7ae06af11e28fce2bb90c5c6186645d681a30e1b36234a4c210\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IERC20Upgradeable.sol\\\";\\nimport \\\"./extensions/IERC20MetadataUpgradeable.sol\\\";\\nimport \\\"../../utils/ContextUpgradeable.sol\\\";\\nimport \\\"../../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Implementation of the {IERC20} interface.\\n *\\n * This implementation is agnostic to the way tokens are created. This means\\n * that a supply mechanism has to be added in a derived contract using {_mint}.\\n * For a generic mechanism see {ERC20PresetMinterPauser}.\\n *\\n * TIP: For a detailed writeup see our guide\\n * https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How\\n * to implement supply mechanisms].\\n *\\n * We have followed general OpenZeppelin guidelines: functions revert instead\\n * of returning `false` on failure. This behavior is nonetheless conventional\\n * and does not conflict with the expectations of ERC20 applications.\\n *\\n * Additionally, an {Approval} event is emitted on calls to {transferFrom}.\\n * This allows applications to reconstruct the allowance for all accounts just\\n * by listening to said events. Other implementations of the EIP may not emit\\n * these events, as it isn't required by the specification.\\n *\\n * Finally, the non-standard {decreaseAllowance} and {increaseAllowance}\\n * functions have been added to mitigate the well-known issues around setting\\n * allowances. See {IERC20-approve}.\\n */\\ncontract ERC20Upgradeable is Initializable, ContextUpgradeable, IERC20Upgradeable, IERC20MetadataUpgradeable {\\n mapping (address => uint256) private _balances;\\n\\n mapping (address => mapping (address => uint256)) private _allowances;\\n\\n uint256 private _totalSupply;\\n\\n string private _name;\\n string private _symbol;\\n\\n /**\\n * @dev Sets the values for {name} and {symbol}.\\n *\\n * The defaut value of {decimals} is 18. To select a different value for\\n * {decimals} you should overload it.\\n *\\n * All two of these values are immutable: they can only be set once during\\n * construction.\\n */\\n function __ERC20_init(string memory name_, string memory symbol_) internal initializer {\\n __Context_init_unchained();\\n __ERC20_init_unchained(name_, symbol_);\\n }\\n\\n function __ERC20_init_unchained(string memory name_, string memory symbol_) internal initializer {\\n _name = name_;\\n _symbol = symbol_;\\n }\\n\\n /**\\n * @dev Returns the name of the token.\\n */\\n function name() public view virtual override returns (string memory) {\\n return _name;\\n }\\n\\n /**\\n * @dev Returns the symbol of the token, usually a shorter version of the\\n * name.\\n */\\n function symbol() public view virtual override returns (string memory) {\\n return _symbol;\\n }\\n\\n /**\\n * @dev Returns the number of decimals used to get its user representation.\\n * For example, if `decimals` equals `2`, a balance of `505` tokens should\\n * be displayed to a user as `5,05` (`505 / 10 ** 2`).\\n *\\n * Tokens usually opt for a value of 18, imitating the relationship between\\n * Ether and Wei. This is the value {ERC20} uses, unless this function is\\n * overridden;\\n *\\n * NOTE: This information is only used for _display_ purposes: it in\\n * no way affects any of the arithmetic of the contract, including\\n * {IERC20-balanceOf} and {IERC20-transfer}.\\n */\\n function decimals() public view virtual override returns (uint8) {\\n return 18;\\n }\\n\\n /**\\n * @dev See {IERC20-totalSupply}.\\n */\\n function totalSupply() public view virtual override returns (uint256) {\\n return _totalSupply;\\n }\\n\\n /**\\n * @dev See {IERC20-balanceOf}.\\n */\\n function balanceOf(address account) public view virtual override returns (uint256) {\\n return _balances[account];\\n }\\n\\n /**\\n * @dev See {IERC20-transfer}.\\n *\\n * Requirements:\\n *\\n * - `recipient` cannot be the zero address.\\n * - the caller must have a balance of at least `amount`.\\n */\\n function transfer(address recipient, uint256 amount) public virtual override returns (bool) {\\n _transfer(_msgSender(), recipient, amount);\\n return true;\\n }\\n\\n /**\\n * @dev See {IERC20-allowance}.\\n */\\n function allowance(address owner, address spender) public view virtual override returns (uint256) {\\n return _allowances[owner][spender];\\n }\\n\\n /**\\n * @dev See {IERC20-approve}.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n */\\n function approve(address spender, uint256 amount) public virtual override returns (bool) {\\n _approve(_msgSender(), spender, amount);\\n return true;\\n }\\n\\n /**\\n * @dev See {IERC20-transferFrom}.\\n *\\n * Emits an {Approval} event indicating the updated allowance. This is not\\n * required by the EIP. See the note at the beginning of {ERC20}.\\n *\\n * Requirements:\\n *\\n * - `sender` and `recipient` cannot be the zero address.\\n * - `sender` must have a balance of at least `amount`.\\n * - the caller must have allowance for ``sender``'s tokens of at least\\n * `amount`.\\n */\\n function transferFrom(address sender, address recipient, uint256 amount) public virtual override returns (bool) {\\n _transfer(sender, recipient, amount);\\n\\n uint256 currentAllowance = _allowances[sender][_msgSender()];\\n require(currentAllowance >= amount, \\\"ERC20: transfer amount exceeds allowance\\\");\\n _approve(sender, _msgSender(), currentAllowance - amount);\\n\\n return true;\\n }\\n\\n /**\\n * @dev Atomically increases the allowance granted to `spender` by the caller.\\n *\\n * This is an alternative to {approve} that can be used as a mitigation for\\n * problems described in {IERC20-approve}.\\n *\\n * Emits an {Approval} event indicating the updated allowance.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n */\\n function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {\\n _approve(_msgSender(), spender, _allowances[_msgSender()][spender] + addedValue);\\n return true;\\n }\\n\\n /**\\n * @dev Atomically decreases the allowance granted to `spender` by the caller.\\n *\\n * This is an alternative to {approve} that can be used as a mitigation for\\n * problems described in {IERC20-approve}.\\n *\\n * Emits an {Approval} event indicating the updated allowance.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n * - `spender` must have allowance for the caller of at least\\n * `subtractedValue`.\\n */\\n function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {\\n uint256 currentAllowance = _allowances[_msgSender()][spender];\\n require(currentAllowance >= subtractedValue, \\\"ERC20: decreased allowance below zero\\\");\\n _approve(_msgSender(), spender, currentAllowance - subtractedValue);\\n\\n return true;\\n }\\n\\n /**\\n * @dev Moves tokens `amount` from `sender` to `recipient`.\\n *\\n * This is internal function is equivalent to {transfer}, and can be used to\\n * e.g. implement automatic token fees, slashing mechanisms, etc.\\n *\\n * Emits a {Transfer} event.\\n *\\n * Requirements:\\n *\\n * - `sender` cannot be the zero address.\\n * - `recipient` cannot be the zero address.\\n * - `sender` must have a balance of at least `amount`.\\n */\\n function _transfer(address sender, address recipient, uint256 amount) internal virtual {\\n require(sender != address(0), \\\"ERC20: transfer from the zero address\\\");\\n require(recipient != address(0), \\\"ERC20: transfer to the zero address\\\");\\n\\n _beforeTokenTransfer(sender, recipient, amount);\\n\\n uint256 senderBalance = _balances[sender];\\n require(senderBalance >= amount, \\\"ERC20: transfer amount exceeds balance\\\");\\n _balances[sender] = senderBalance - amount;\\n _balances[recipient] += amount;\\n\\n emit Transfer(sender, recipient, amount);\\n }\\n\\n /** @dev Creates `amount` tokens and assigns them to `account`, increasing\\n * the total supply.\\n *\\n * Emits a {Transfer} event with `from` set to the zero address.\\n *\\n * Requirements:\\n *\\n * - `to` cannot be the zero address.\\n */\\n function _mint(address account, uint256 amount) internal virtual {\\n require(account != address(0), \\\"ERC20: mint to the zero address\\\");\\n\\n _beforeTokenTransfer(address(0), account, amount);\\n\\n _totalSupply += amount;\\n _balances[account] += amount;\\n emit Transfer(address(0), account, amount);\\n }\\n\\n /**\\n * @dev Destroys `amount` tokens from `account`, reducing the\\n * total supply.\\n *\\n * Emits a {Transfer} event with `to` set to the zero address.\\n *\\n * Requirements:\\n *\\n * - `account` cannot be the zero address.\\n * - `account` must have at least `amount` tokens.\\n */\\n function _burn(address account, uint256 amount) internal virtual {\\n require(account != address(0), \\\"ERC20: burn from the zero address\\\");\\n\\n _beforeTokenTransfer(account, address(0), amount);\\n\\n uint256 accountBalance = _balances[account];\\n require(accountBalance >= amount, \\\"ERC20: burn amount exceeds balance\\\");\\n _balances[account] = accountBalance - amount;\\n _totalSupply -= amount;\\n\\n emit Transfer(account, address(0), amount);\\n }\\n\\n /**\\n * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.\\n *\\n * This internal function is equivalent to `approve`, and can be used to\\n * e.g. set automatic allowances for certain subsystems, etc.\\n *\\n * Emits an {Approval} event.\\n *\\n * Requirements:\\n *\\n * - `owner` cannot be the zero address.\\n * - `spender` cannot be the zero address.\\n */\\n function _approve(address owner, address spender, uint256 amount) internal virtual {\\n require(owner != address(0), \\\"ERC20: approve from the zero address\\\");\\n require(spender != address(0), \\\"ERC20: approve to the zero address\\\");\\n\\n _allowances[owner][spender] = amount;\\n emit Approval(owner, spender, amount);\\n }\\n\\n /**\\n * @dev Hook that is called before any transfer of tokens. This includes\\n * minting and burning.\\n *\\n * Calling conditions:\\n *\\n * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\\n * will be to transferred to `to`.\\n * - when `from` is zero, `amount` tokens will be minted for `to`.\\n * - when `to` is zero, `amount` of ``from``'s tokens will be burned.\\n * - `from` and `to` are never both zero.\\n *\\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\\n */\\n function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual { }\\n uint256[45] private __gap;\\n}\\n\",\"keccak256\":\"0x9c2d7425f3343ea340d6ea67e9d90109d4d846bb013c2572096ec88c9e74946b\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/token/ERC20/IERC20Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC20 standard as defined in the EIP.\\n */\\ninterface IERC20Upgradeable {\\n /**\\n * @dev Returns the amount of tokens in existence.\\n */\\n function totalSupply() external view returns (uint256);\\n\\n /**\\n * @dev Returns the amount of tokens owned by `account`.\\n */\\n function balanceOf(address account) external view returns (uint256);\\n\\n /**\\n * @dev Moves `amount` tokens from the caller's account to `recipient`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address recipient, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Returns the remaining number of tokens that `spender` will be\\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\\n * zero by default.\\n *\\n * This value changes when {approve} or {transferFrom} are called.\\n */\\n function allowance(address owner, address spender) external view returns (uint256);\\n\\n /**\\n * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\\n * that someone may use both the old and the new allowance by unfortunate\\n * transaction ordering. One possible solution to mitigate this race\\n * condition is to first reduce the spender's allowance to 0 and set the\\n * desired value afterwards:\\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address spender, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Moves `amount` tokens from `sender` to `recipient` using the\\n * allowance mechanism. `amount` is then deducted from the caller's\\n * allowance.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\\n * another (`to`).\\n *\\n * Note that `value` may be zero.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 value);\\n\\n /**\\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\\n * a call to {approve}. `value` is the new allowance.\\n */\\n event Approval(address indexed owner, address indexed spender, uint256 value);\\n}\\n\",\"keccak256\":\"0x8d4a0f2b5b760b5e2c19ed3c108d83897a4dfd5bfed97a93867918df19191e5e\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/token/ERC20/extensions/IERC20MetadataUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../IERC20Upgradeable.sol\\\";\\n\\n/**\\n * @dev Interface for the optional metadata functions from the ERC20 standard.\\n *\\n * _Available since v4.1._\\n */\\ninterface IERC20MetadataUpgradeable is IERC20Upgradeable {\\n /**\\n * @dev Returns the name of the token.\\n */\\n function name() external view returns (string memory);\\n\\n /**\\n * @dev Returns the symbol of the token.\\n */\\n function symbol() external view returns (string memory);\\n\\n /**\\n * @dev Returns the decimals places of the token.\\n */\\n function decimals() external view returns (uint8);\\n}\\n\",\"keccak256\":\"0x6795c369a4eefa78468e38966f7851fbc2dda5e5b9ccd3fa2b45970e2e4d3abd\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\nimport \\\"../proxy/utils/Initializable.sol\\\";\\n\\n/*\\n * @dev Provides information about the current execution context, including the\\n * sender of the transaction and its data. While these are generally available\\n * via msg.sender and msg.data, they should not be accessed in such a direct\\n * manner, since when dealing with meta-transactions the account sending and\\n * paying for execution may not be the actual sender (as far as an application\\n * is concerned).\\n *\\n * This contract is only required for intermediate, library-like contracts.\\n */\\nabstract contract ContextUpgradeable is Initializable {\\n function __Context_init() internal initializer {\\n __Context_init_unchained();\\n }\\n\\n function __Context_init_unchained() internal initializer {\\n }\\n function _msgSender() internal view virtual returns (address) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes calldata) {\\n this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691\\n return msg.data;\\n }\\n uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0x8e9eb503de1189f50c5f16fef327da310b11898d6b9ab3ca937df07c35233b9e\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC20 standard as defined in the EIP.\\n */\\ninterface IERC20 {\\n /**\\n * @dev Returns the amount of tokens in existence.\\n */\\n function totalSupply() external view returns (uint256);\\n\\n /**\\n * @dev Returns the amount of tokens owned by `account`.\\n */\\n function balanceOf(address account) external view returns (uint256);\\n\\n /**\\n * @dev Moves `amount` tokens from the caller's account to `recipient`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address recipient, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Returns the remaining number of tokens that `spender` will be\\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\\n * zero by default.\\n *\\n * This value changes when {approve} or {transferFrom} are called.\\n */\\n function allowance(address owner, address spender) external view returns (uint256);\\n\\n /**\\n * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\\n * that someone may use both the old and the new allowance by unfortunate\\n * transaction ordering. One possible solution to mitigate this race\\n * condition is to first reduce the spender's allowance to 0 and set the\\n * desired value afterwards:\\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address spender, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Moves `amount` tokens from `sender` to `recipient` using the\\n * allowance mechanism. `amount` is then deducted from the caller's\\n * allowance.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\\n * another (`to`).\\n *\\n * Note that `value` may be zero.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 value);\\n\\n /**\\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\\n * a call to {approve}. `value` is the new allowance.\\n */\\n event Approval(address indexed owner, address indexed spender, uint256 value);\\n}\\n\",\"keccak256\":\"0xf8e8d118a7a8b2e134181f7da655f6266aa3a0f9134b2605747139fcb0c5d835\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../IERC20.sol\\\";\\nimport \\\"../../../utils/Address.sol\\\";\\n\\n/**\\n * @title SafeERC20\\n * @dev Wrappers around ERC20 operations that throw on failure (when the token\\n * contract returns false). Tokens that return no value (and instead revert or\\n * throw on failure) are also supported, non-reverting calls are assumed to be\\n * successful.\\n * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,\\n * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.\\n */\\nlibrary SafeERC20 {\\n using Address for address;\\n\\n function safeTransfer(IERC20 token, address to, uint256 value) internal {\\n _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));\\n }\\n\\n function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal {\\n _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));\\n }\\n\\n /**\\n * @dev Deprecated. This function has issues similar to the ones found in\\n * {IERC20-approve}, and its usage is discouraged.\\n *\\n * Whenever possible, use {safeIncreaseAllowance} and\\n * {safeDecreaseAllowance} instead.\\n */\\n function safeApprove(IERC20 token, address spender, uint256 value) internal {\\n // safeApprove should only be called when setting an initial allowance,\\n // or when resetting it to zero. To increase and decrease it, use\\n // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'\\n // solhint-disable-next-line max-line-length\\n require((value == 0) || (token.allowance(address(this), spender) == 0),\\n \\\"SafeERC20: approve from non-zero to non-zero allowance\\\"\\n );\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));\\n }\\n\\n function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {\\n uint256 newAllowance = token.allowance(address(this), spender) + value;\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\\n }\\n\\n function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal {\\n unchecked {\\n uint256 oldAllowance = token.allowance(address(this), spender);\\n require(oldAllowance >= value, \\\"SafeERC20: decreased allowance below zero\\\");\\n uint256 newAllowance = oldAllowance - value;\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\\n }\\n }\\n\\n /**\\n * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\\n * on the return value: the return value is optional (but if data is returned, it must not be false).\\n * @param token The token targeted by the call.\\n * @param data The call data (encoded using abi.encode or one of its variants).\\n */\\n function _callOptionalReturn(IERC20 token, bytes memory data) private {\\n // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since\\n // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that\\n // the target address contains contract code and also asserts for success in the low-level call.\\n\\n bytes memory returndata = address(token).functionCall(data, \\\"SafeERC20: low-level call failed\\\");\\n if (returndata.length > 0) { // Return data is optional\\n // solhint-disable-next-line max-line-length\\n require(abi.decode(returndata, (bool)), \\\"SafeERC20: ERC20 operation did not succeed\\\");\\n }\\n }\\n}\\n\",\"keccak256\":\"0x99f5c21018d796db7833a2100bb0e7411999e248a3c950fb526eee5d2bf47cb7\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary Address {\\n /**\\n * @dev Returns true if `account` is a contract.\\n *\\n * [IMPORTANT]\\n * ====\\n * It is unsafe to assume that an address for which this function returns\\n * false is an externally-owned account (EOA) and not a contract.\\n *\\n * Among others, `isContract` will return false for the following\\n * types of addresses:\\n *\\n * - an externally-owned account\\n * - a contract in construction\\n * - an address where a contract will be created\\n * - an address where a contract lived, but was destroyed\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize, which returns 0 for contracts in\\n // construction, since the code is only stored at the end of the\\n // constructor execution.\\n\\n uint256 size;\\n // solhint-disable-next-line no-inline-assembly\\n assembly { size := extcodesize(account) }\\n return size > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n // solhint-disable-next-line avoid-low-level-calls, avoid-call-value\\n (bool success, ) = recipient.call{ value: amount }(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain`call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCall(target, data, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n\\n // solhint-disable-next-line avoid-low-level-calls\\n (bool success, bytes memory returndata) = target.call{ value: value }(data);\\n return _verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data, string memory errorMessage) internal view returns (bytes memory) {\\n require(isContract(target), \\\"Address: static call to non-contract\\\");\\n\\n // solhint-disable-next-line avoid-low-level-calls\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return _verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionDelegateCall(target, data, \\\"Address: low-level delegate call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {\\n require(isContract(target), \\\"Address: delegate call to non-contract\\\");\\n\\n // solhint-disable-next-line avoid-low-level-calls\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return _verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n function _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private pure returns(bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n let returndata_size := mload(returndata)\\n revert(add(32, returndata), returndata_size)\\n }\\n } else {\\n revert(errorMessage);\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0x069b2631bb5b5193a58ccf7a06266c7361bd2c20095667af4402817605627f45\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/math/SafeCast.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Wrappers over Solidity's uintXX/intXX casting operators with added overflow\\n * checks.\\n *\\n * Downcasting from uint256/int256 in Solidity does not revert on overflow. This can\\n * easily result in undesired exploitation or bugs, since developers usually\\n * assume that overflows raise errors. `SafeCast` restores this intuition by\\n * reverting the transaction when such an operation overflows.\\n *\\n * Using this library instead of the unchecked operations eliminates an entire\\n * class of bugs, so it's recommended to use it always.\\n *\\n * Can be combined with {SafeMath} and {SignedSafeMath} to extend it to smaller types, by performing\\n * all math on `uint256` and `int256` and then downcasting.\\n */\\nlibrary SafeCast {\\n /**\\n * @dev Returns the downcasted uint128 from uint256, reverting on\\n * overflow (when the input is greater than largest uint128).\\n *\\n * Counterpart to Solidity's `uint128` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 128 bits\\n */\\n function toUint128(uint256 value) internal pure returns (uint128) {\\n require(value < 2**128, \\\"SafeCast: value doesn\\\\'t fit in 128 bits\\\");\\n return uint128(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint64 from uint256, reverting on\\n * overflow (when the input is greater than largest uint64).\\n *\\n * Counterpart to Solidity's `uint64` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 64 bits\\n */\\n function toUint64(uint256 value) internal pure returns (uint64) {\\n require(value < 2**64, \\\"SafeCast: value doesn\\\\'t fit in 64 bits\\\");\\n return uint64(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint32 from uint256, reverting on\\n * overflow (when the input is greater than largest uint32).\\n *\\n * Counterpart to Solidity's `uint32` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 32 bits\\n */\\n function toUint32(uint256 value) internal pure returns (uint32) {\\n require(value < 2**32, \\\"SafeCast: value doesn\\\\'t fit in 32 bits\\\");\\n return uint32(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint16 from uint256, reverting on\\n * overflow (when the input is greater than largest uint16).\\n *\\n * Counterpart to Solidity's `uint16` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 16 bits\\n */\\n function toUint16(uint256 value) internal pure returns (uint16) {\\n require(value < 2**16, \\\"SafeCast: value doesn\\\\'t fit in 16 bits\\\");\\n return uint16(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint8 from uint256, reverting on\\n * overflow (when the input is greater than largest uint8).\\n *\\n * Counterpart to Solidity's `uint8` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 8 bits.\\n */\\n function toUint8(uint256 value) internal pure returns (uint8) {\\n require(value < 2**8, \\\"SafeCast: value doesn\\\\'t fit in 8 bits\\\");\\n return uint8(value);\\n }\\n\\n /**\\n * @dev Converts a signed int256 into an unsigned uint256.\\n *\\n * Requirements:\\n *\\n * - input must be greater than or equal to 0.\\n */\\n function toUint256(int256 value) internal pure returns (uint256) {\\n require(value >= 0, \\\"SafeCast: value must be positive\\\");\\n return uint256(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted int128 from int256, reverting on\\n * overflow (when the input is less than smallest int128 or\\n * greater than largest int128).\\n *\\n * Counterpart to Solidity's `int128` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 128 bits\\n *\\n * _Available since v3.1._\\n */\\n function toInt128(int256 value) internal pure returns (int128) {\\n require(value >= -2**127 && value < 2**127, \\\"SafeCast: value doesn\\\\'t fit in 128 bits\\\");\\n return int128(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted int64 from int256, reverting on\\n * overflow (when the input is less than smallest int64 or\\n * greater than largest int64).\\n *\\n * Counterpart to Solidity's `int64` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 64 bits\\n *\\n * _Available since v3.1._\\n */\\n function toInt64(int256 value) internal pure returns (int64) {\\n require(value >= -2**63 && value < 2**63, \\\"SafeCast: value doesn\\\\'t fit in 64 bits\\\");\\n return int64(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted int32 from int256, reverting on\\n * overflow (when the input is less than smallest int32 or\\n * greater than largest int32).\\n *\\n * Counterpart to Solidity's `int32` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 32 bits\\n *\\n * _Available since v3.1._\\n */\\n function toInt32(int256 value) internal pure returns (int32) {\\n require(value >= -2**31 && value < 2**31, \\\"SafeCast: value doesn\\\\'t fit in 32 bits\\\");\\n return int32(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted int16 from int256, reverting on\\n * overflow (when the input is less than smallest int16 or\\n * greater than largest int16).\\n *\\n * Counterpart to Solidity's `int16` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 16 bits\\n *\\n * _Available since v3.1._\\n */\\n function toInt16(int256 value) internal pure returns (int16) {\\n require(value >= -2**15 && value < 2**15, \\\"SafeCast: value doesn\\\\'t fit in 16 bits\\\");\\n return int16(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted int8 from int256, reverting on\\n * overflow (when the input is less than smallest int8 or\\n * greater than largest int8).\\n *\\n * Counterpart to Solidity's `int8` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 8 bits.\\n *\\n * _Available since v3.1._\\n */\\n function toInt8(int256 value) internal pure returns (int8) {\\n require(value >= -2**7 && value < 2**7, \\\"SafeCast: value doesn\\\\'t fit in 8 bits\\\");\\n return int8(value);\\n }\\n\\n /**\\n * @dev Converts an unsigned uint256 into a signed int256.\\n *\\n * Requirements:\\n *\\n * - input must be less than or equal to maxInt256.\\n */\\n function toInt256(uint256 value) internal pure returns (int256) {\\n require(value < 2**255, \\\"SafeCast: value doesn't fit in an int256\\\");\\n return int256(value);\\n }\\n}\\n\",\"keccak256\":\"0xc37d85b96c2a8d7bc09f25958e0a81394bf5780286444147ddf875fa628d53ce\",\"license\":\"MIT\"},\"@uniswap/v3-core/contracts/interfaces/IUniswapV3Pool.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-2.0-or-later\\npragma solidity >=0.5.0;\\n\\nimport './pool/IUniswapV3PoolImmutables.sol';\\nimport './pool/IUniswapV3PoolState.sol';\\nimport './pool/IUniswapV3PoolDerivedState.sol';\\nimport './pool/IUniswapV3PoolActions.sol';\\nimport './pool/IUniswapV3PoolOwnerActions.sol';\\nimport './pool/IUniswapV3PoolEvents.sol';\\n\\n/// @title The interface for a Uniswap V3 Pool\\n/// @notice A Uniswap pool facilitates swapping and automated market making between any two assets that strictly conform\\n/// to the ERC20 specification\\n/// @dev The pool interface is broken up into many smaller pieces\\ninterface IUniswapV3Pool is\\n IUniswapV3PoolImmutables,\\n IUniswapV3PoolState,\\n IUniswapV3PoolDerivedState,\\n IUniswapV3PoolActions,\\n IUniswapV3PoolOwnerActions,\\n IUniswapV3PoolEvents\\n{\\n\\n}\\n\",\"keccak256\":\"0xfe6113d518466cd6652c85b111e01f33eb62157f49ae5ed7d5a3947a2044adb1\",\"license\":\"GPL-2.0-or-later\"},\"@uniswap/v3-core/contracts/interfaces/callback/IUniswapV3MintCallback.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-2.0-or-later\\npragma solidity >=0.5.0;\\n\\n/// @title Callback for IUniswapV3PoolActions#mint\\n/// @notice Any contract that calls IUniswapV3PoolActions#mint must implement this interface\\ninterface IUniswapV3MintCallback {\\n /// @notice Called to `msg.sender` after minting liquidity to a position from IUniswapV3Pool#mint.\\n /// @dev In the implementation you must pay the pool tokens owed for the minted liquidity.\\n /// The caller of this method must be checked to be a UniswapV3Pool deployed by the canonical UniswapV3Factory.\\n /// @param amount0Owed The amount of token0 due to the pool for the minted liquidity\\n /// @param amount1Owed The amount of token1 due to the pool for the minted liquidity\\n /// @param data Any data passed through by the caller via the IUniswapV3PoolActions#mint call\\n function uniswapV3MintCallback(\\n uint256 amount0Owed,\\n uint256 amount1Owed,\\n bytes calldata data\\n ) external;\\n}\\n\",\"keccak256\":\"0x27a9725b8f831a92d16380860c3d348a0b926a7f01b34a54ea6eea78cbdbcd6a\",\"license\":\"GPL-2.0-or-later\"},\"@uniswap/v3-core/contracts/interfaces/callback/IUniswapV3SwapCallback.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-2.0-or-later\\npragma solidity >=0.5.0;\\n\\n/// @title Callback for IUniswapV3PoolActions#swap\\n/// @notice Any contract that calls IUniswapV3PoolActions#swap must implement this interface\\ninterface IUniswapV3SwapCallback {\\n /// @notice Called to `msg.sender` after executing a swap via IUniswapV3Pool#swap.\\n /// @dev In the implementation you must pay the pool tokens owed for the swap.\\n /// The caller of this method must be checked to be a UniswapV3Pool deployed by the canonical UniswapV3Factory.\\n /// amount0Delta and amount1Delta can both be 0 if no tokens were swapped.\\n /// @param amount0Delta The amount of token0 that was sent (negative) or must be received (positive) by the pool by\\n /// the end of the swap. If positive, the callback must send that amount of token0 to the pool.\\n /// @param amount1Delta The amount of token1 that was sent (negative) or must be received (positive) by the pool by\\n /// the end of the swap. If positive, the callback must send that amount of token1 to the pool.\\n /// @param data Any data passed through by the caller via the IUniswapV3PoolActions#swap call\\n function uniswapV3SwapCallback(\\n int256 amount0Delta,\\n int256 amount1Delta,\\n bytes calldata data\\n ) external;\\n}\\n\",\"keccak256\":\"0x3f485fb1a44e8fbeadefb5da07d66edab3cfe809f0ac4074b1e54e3eb3c4cf69\",\"license\":\"GPL-2.0-or-later\"},\"@uniswap/v3-core/contracts/interfaces/pool/IUniswapV3PoolActions.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-2.0-or-later\\npragma solidity >=0.5.0;\\n\\n/// @title Permissionless pool actions\\n/// @notice Contains pool methods that can be called by anyone\\ninterface IUniswapV3PoolActions {\\n /// @notice Sets the initial price for the pool\\n /// @dev Price is represented as a sqrt(amountToken1/amountToken0) Q64.96 value\\n /// @param sqrtPriceX96 the initial sqrt price of the pool as a Q64.96\\n function initialize(uint160 sqrtPriceX96) external;\\n\\n /// @notice Adds liquidity for the given recipient/tickLower/tickUpper position\\n /// @dev The caller of this method receives a callback in the form of IUniswapV3MintCallback#uniswapV3MintCallback\\n /// in which they must pay any token0 or token1 owed for the liquidity. The amount of token0/token1 due depends\\n /// on tickLower, tickUpper, the amount of liquidity, and the current price.\\n /// @param recipient The address for which the liquidity will be created\\n /// @param tickLower The lower tick of the position in which to add liquidity\\n /// @param tickUpper The upper tick of the position in which to add liquidity\\n /// @param amount The amount of liquidity to mint\\n /// @param data Any data that should be passed through to the callback\\n /// @return amount0 The amount of token0 that was paid to mint the given amount of liquidity. Matches the value in the callback\\n /// @return amount1 The amount of token1 that was paid to mint the given amount of liquidity. Matches the value in the callback\\n function mint(\\n address recipient,\\n int24 tickLower,\\n int24 tickUpper,\\n uint128 amount,\\n bytes calldata data\\n ) external returns (uint256 amount0, uint256 amount1);\\n\\n /// @notice Collects tokens owed to a position\\n /// @dev Does not recompute fees earned, which must be done either via mint or burn of any amount of liquidity.\\n /// Collect must be called by the position owner. To withdraw only token0 or only token1, amount0Requested or\\n /// amount1Requested may be set to zero. To withdraw all tokens owed, caller may pass any value greater than the\\n /// actual tokens owed, e.g. type(uint128).max. Tokens owed may be from accumulated swap fees or burned liquidity.\\n /// @param recipient The address which should receive the fees collected\\n /// @param tickLower The lower tick of the position for which to collect fees\\n /// @param tickUpper The upper tick of the position for which to collect fees\\n /// @param amount0Requested How much token0 should be withdrawn from the fees owed\\n /// @param amount1Requested How much token1 should be withdrawn from the fees owed\\n /// @return amount0 The amount of fees collected in token0\\n /// @return amount1 The amount of fees collected in token1\\n function collect(\\n address recipient,\\n int24 tickLower,\\n int24 tickUpper,\\n uint128 amount0Requested,\\n uint128 amount1Requested\\n ) external returns (uint128 amount0, uint128 amount1);\\n\\n /// @notice Burn liquidity from the sender and account tokens owed for the liquidity to the position\\n /// @dev Can be used to trigger a recalculation of fees owed to a position by calling with an amount of 0\\n /// @dev Fees must be collected separately via a call to #collect\\n /// @param tickLower The lower tick of the position for which to burn liquidity\\n /// @param tickUpper The upper tick of the position for which to burn liquidity\\n /// @param amount How much liquidity to burn\\n /// @return amount0 The amount of token0 sent to the recipient\\n /// @return amount1 The amount of token1 sent to the recipient\\n function burn(\\n int24 tickLower,\\n int24 tickUpper,\\n uint128 amount\\n ) external returns (uint256 amount0, uint256 amount1);\\n\\n /// @notice Swap token0 for token1, or token1 for token0\\n /// @dev The caller of this method receives a callback in the form of IUniswapV3SwapCallback#uniswapV3SwapCallback\\n /// @param recipient The address to receive the output of the swap\\n /// @param zeroForOne The direction of the swap, true for token0 to token1, false for token1 to token0\\n /// @param amountSpecified The amount of the swap, which implicitly configures the swap as exact input (positive), or exact output (negative)\\n /// @param sqrtPriceLimitX96 The Q64.96 sqrt price limit. If zero for one, the price cannot be less than this\\n /// value after the swap. If one for zero, the price cannot be greater than this value after the swap\\n /// @param data Any data to be passed through to the callback\\n /// @return amount0 The delta of the balance of token0 of the pool, exact when negative, minimum when positive\\n /// @return amount1 The delta of the balance of token1 of the pool, exact when negative, minimum when positive\\n function swap(\\n address recipient,\\n bool zeroForOne,\\n int256 amountSpecified,\\n uint160 sqrtPriceLimitX96,\\n bytes calldata data\\n ) external returns (int256 amount0, int256 amount1);\\n\\n /// @notice Receive token0 and/or token1 and pay it back, plus a fee, in the callback\\n /// @dev The caller of this method receives a callback in the form of IUniswapV3FlashCallback#uniswapV3FlashCallback\\n /// @dev Can be used to donate underlying tokens pro-rata to currently in-range liquidity providers by calling\\n /// with 0 amount{0,1} and sending the donation amount(s) from the callback\\n /// @param recipient The address which will receive the token0 and token1 amounts\\n /// @param amount0 The amount of token0 to send\\n /// @param amount1 The amount of token1 to send\\n /// @param data Any data to be passed through to the callback\\n function flash(\\n address recipient,\\n uint256 amount0,\\n uint256 amount1,\\n bytes calldata data\\n ) external;\\n\\n /// @notice Increase the maximum number of price and liquidity observations that this pool will store\\n /// @dev This method is no-op if the pool already has an observationCardinalityNext greater than or equal to\\n /// the input observationCardinalityNext.\\n /// @param observationCardinalityNext The desired minimum number of observations for the pool to store\\n function increaseObservationCardinalityNext(uint16 observationCardinalityNext) external;\\n}\\n\",\"keccak256\":\"0x9453dd0e7442188667d01d9b65de3f1e14e9511ff3e303179a15f6fc267f7634\",\"license\":\"GPL-2.0-or-later\"},\"@uniswap/v3-core/contracts/interfaces/pool/IUniswapV3PoolDerivedState.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-2.0-or-later\\npragma solidity >=0.5.0;\\n\\n/// @title Pool state that is not stored\\n/// @notice Contains view functions to provide information about the pool that is computed rather than stored on the\\n/// blockchain. The functions here may have variable gas costs.\\ninterface IUniswapV3PoolDerivedState {\\n /// @notice Returns the cumulative tick and liquidity as of each timestamp `secondsAgo` from the current block timestamp\\n /// @dev To get a time weighted average tick or liquidity-in-range, you must call this with two values, one representing\\n /// the beginning of the period and another for the end of the period. E.g., to get the last hour time-weighted average tick,\\n /// you must call it with secondsAgos = [3600, 0].\\n /// @dev The time weighted average tick represents the geometric time weighted average price of the pool, in\\n /// log base sqrt(1.0001) of token1 / token0. The TickMath library can be used to go from a tick value to a ratio.\\n /// @param secondsAgos From how long ago each cumulative tick and liquidity value should be returned\\n /// @return tickCumulatives Cumulative tick values as of each `secondsAgos` from the current block timestamp\\n /// @return secondsPerLiquidityCumulativeX128s Cumulative seconds per liquidity-in-range value as of each `secondsAgos` from the current block\\n /// timestamp\\n function observe(uint32[] calldata secondsAgos)\\n external\\n view\\n returns (int56[] memory tickCumulatives, uint160[] memory secondsPerLiquidityCumulativeX128s);\\n\\n /// @notice Returns a snapshot of the tick cumulative, seconds per liquidity and seconds inside a tick range\\n /// @dev Snapshots must only be compared to other snapshots, taken over a period for which a position existed.\\n /// I.e., snapshots cannot be compared if a position is not held for the entire period between when the first\\n /// snapshot is taken and the second snapshot is taken.\\n /// @param tickLower The lower tick of the range\\n /// @param tickUpper The upper tick of the range\\n /// @return tickCumulativeInside The snapshot of the tick accumulator for the range\\n /// @return secondsPerLiquidityInsideX128 The snapshot of seconds per liquidity for the range\\n /// @return secondsInside The snapshot of seconds per liquidity for the range\\n function snapshotCumulativesInside(int24 tickLower, int24 tickUpper)\\n external\\n view\\n returns (\\n int56 tickCumulativeInside,\\n uint160 secondsPerLiquidityInsideX128,\\n uint32 secondsInside\\n );\\n}\\n\",\"keccak256\":\"0xe603ac5b17ecdee73ba2b27efdf386c257a19c14206e87eee77e2017b742d9e5\",\"license\":\"GPL-2.0-or-later\"},\"@uniswap/v3-core/contracts/interfaces/pool/IUniswapV3PoolEvents.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-2.0-or-later\\npragma solidity >=0.5.0;\\n\\n/// @title Events emitted by a pool\\n/// @notice Contains all events emitted by the pool\\ninterface IUniswapV3PoolEvents {\\n /// @notice Emitted exactly once by a pool when #initialize is first called on the pool\\n /// @dev Mint/Burn/Swap cannot be emitted by the pool before Initialize\\n /// @param sqrtPriceX96 The initial sqrt price of the pool, as a Q64.96\\n /// @param tick The initial tick of the pool, i.e. log base 1.0001 of the starting price of the pool\\n event Initialize(uint160 sqrtPriceX96, int24 tick);\\n\\n /// @notice Emitted when liquidity is minted for a given position\\n /// @param sender The address that minted the liquidity\\n /// @param owner The owner of the position and recipient of any minted liquidity\\n /// @param tickLower The lower tick of the position\\n /// @param tickUpper The upper tick of the position\\n /// @param amount The amount of liquidity minted to the position range\\n /// @param amount0 How much token0 was required for the minted liquidity\\n /// @param amount1 How much token1 was required for the minted liquidity\\n event Mint(\\n address sender,\\n address indexed owner,\\n int24 indexed tickLower,\\n int24 indexed tickUpper,\\n uint128 amount,\\n uint256 amount0,\\n uint256 amount1\\n );\\n\\n /// @notice Emitted when fees are collected by the owner of a position\\n /// @dev Collect events may be emitted with zero amount0 and amount1 when the caller chooses not to collect fees\\n /// @param owner The owner of the position for which fees are collected\\n /// @param tickLower The lower tick of the position\\n /// @param tickUpper The upper tick of the position\\n /// @param amount0 The amount of token0 fees collected\\n /// @param amount1 The amount of token1 fees collected\\n event Collect(\\n address indexed owner,\\n address recipient,\\n int24 indexed tickLower,\\n int24 indexed tickUpper,\\n uint128 amount0,\\n uint128 amount1\\n );\\n\\n /// @notice Emitted when a position's liquidity is removed\\n /// @dev Does not withdraw any fees earned by the liquidity position, which must be withdrawn via #collect\\n /// @param owner The owner of the position for which liquidity is removed\\n /// @param tickLower The lower tick of the position\\n /// @param tickUpper The upper tick of the position\\n /// @param amount The amount of liquidity to remove\\n /// @param amount0 The amount of token0 withdrawn\\n /// @param amount1 The amount of token1 withdrawn\\n event Burn(\\n address indexed owner,\\n int24 indexed tickLower,\\n int24 indexed tickUpper,\\n uint128 amount,\\n uint256 amount0,\\n uint256 amount1\\n );\\n\\n /// @notice Emitted by the pool for any swaps between token0 and token1\\n /// @param sender The address that initiated the swap call, and that received the callback\\n /// @param recipient The address that received the output of the swap\\n /// @param amount0 The delta of the token0 balance of the pool\\n /// @param amount1 The delta of the token1 balance of the pool\\n /// @param sqrtPriceX96 The sqrt(price) of the pool after the swap, as a Q64.96\\n /// @param liquidity The liquidity of the pool after the swap\\n /// @param tick The log base 1.0001 of price of the pool after the swap\\n event Swap(\\n address indexed sender,\\n address indexed recipient,\\n int256 amount0,\\n int256 amount1,\\n uint160 sqrtPriceX96,\\n uint128 liquidity,\\n int24 tick\\n );\\n\\n /// @notice Emitted by the pool for any flashes of token0/token1\\n /// @param sender The address that initiated the swap call, and that received the callback\\n /// @param recipient The address that received the tokens from flash\\n /// @param amount0 The amount of token0 that was flashed\\n /// @param amount1 The amount of token1 that was flashed\\n /// @param paid0 The amount of token0 paid for the flash, which can exceed the amount0 plus the fee\\n /// @param paid1 The amount of token1 paid for the flash, which can exceed the amount1 plus the fee\\n event Flash(\\n address indexed sender,\\n address indexed recipient,\\n uint256 amount0,\\n uint256 amount1,\\n uint256 paid0,\\n uint256 paid1\\n );\\n\\n /// @notice Emitted by the pool for increases to the number of observations that can be stored\\n /// @dev observationCardinalityNext is not the observation cardinality until an observation is written at the index\\n /// just before a mint/swap/burn.\\n /// @param observationCardinalityNextOld The previous value of the next observation cardinality\\n /// @param observationCardinalityNextNew The updated value of the next observation cardinality\\n event IncreaseObservationCardinalityNext(\\n uint16 observationCardinalityNextOld,\\n uint16 observationCardinalityNextNew\\n );\\n\\n /// @notice Emitted when the protocol fee is changed by the pool\\n /// @param feeProtocol0Old The previous value of the token0 protocol fee\\n /// @param feeProtocol1Old The previous value of the token1 protocol fee\\n /// @param feeProtocol0New The updated value of the token0 protocol fee\\n /// @param feeProtocol1New The updated value of the token1 protocol fee\\n event SetFeeProtocol(uint8 feeProtocol0Old, uint8 feeProtocol1Old, uint8 feeProtocol0New, uint8 feeProtocol1New);\\n\\n /// @notice Emitted when the collected protocol fees are withdrawn by the factory owner\\n /// @param sender The address that collects the protocol fees\\n /// @param recipient The address that receives the collected protocol fees\\n /// @param amount0 The amount of token0 protocol fees that is withdrawn\\n /// @param amount0 The amount of token1 protocol fees that is withdrawn\\n event CollectProtocol(address indexed sender, address indexed recipient, uint128 amount0, uint128 amount1);\\n}\\n\",\"keccak256\":\"0x8071514d0fe5d17d6fbd31c191cdfb703031c24e0ece3621d88ab10e871375cd\",\"license\":\"GPL-2.0-or-later\"},\"@uniswap/v3-core/contracts/interfaces/pool/IUniswapV3PoolImmutables.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-2.0-or-later\\npragma solidity >=0.5.0;\\n\\n/// @title Pool state that never changes\\n/// @notice These parameters are fixed for a pool forever, i.e., the methods will always return the same values\\ninterface IUniswapV3PoolImmutables {\\n /// @notice The contract that deployed the pool, which must adhere to the IUniswapV3Factory interface\\n /// @return The contract address\\n function factory() external view returns (address);\\n\\n /// @notice The first of the two tokens of the pool, sorted by address\\n /// @return The token contract address\\n function token0() external view returns (address);\\n\\n /// @notice The second of the two tokens of the pool, sorted by address\\n /// @return The token contract address\\n function token1() external view returns (address);\\n\\n /// @notice The pool's fee in hundredths of a bip, i.e. 1e-6\\n /// @return The fee\\n function fee() external view returns (uint24);\\n\\n /// @notice The pool tick spacing\\n /// @dev Ticks can only be used at multiples of this value, minimum of 1 and always positive\\n /// e.g.: a tickSpacing of 3 means ticks can be initialized every 3rd tick, i.e., ..., -6, -3, 0, 3, 6, ...\\n /// This value is an int24 to avoid casting even though it is always positive.\\n /// @return The tick spacing\\n function tickSpacing() external view returns (int24);\\n\\n /// @notice The maximum amount of position liquidity that can use any tick in the range\\n /// @dev This parameter is enforced per tick to prevent liquidity from overflowing a uint128 at any point, and\\n /// also prevents out-of-range liquidity from being used to prevent adding in-range liquidity to a pool\\n /// @return The max amount of liquidity per tick\\n function maxLiquidityPerTick() external view returns (uint128);\\n}\\n\",\"keccak256\":\"0xf6e5d2cd1139c4c276bdbc8e1d2b256e456c866a91f1b868da265c6d2685c3f7\",\"license\":\"GPL-2.0-or-later\"},\"@uniswap/v3-core/contracts/interfaces/pool/IUniswapV3PoolOwnerActions.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-2.0-or-later\\npragma solidity >=0.5.0;\\n\\n/// @title Permissioned pool actions\\n/// @notice Contains pool methods that may only be called by the factory owner\\ninterface IUniswapV3PoolOwnerActions {\\n /// @notice Set the denominator of the protocol's % share of the fees\\n /// @param feeProtocol0 new protocol fee for token0 of the pool\\n /// @param feeProtocol1 new protocol fee for token1 of the pool\\n function setFeeProtocol(uint8 feeProtocol0, uint8 feeProtocol1) external;\\n\\n /// @notice Collect the protocol fee accrued to the pool\\n /// @param recipient The address to which collected protocol fees should be sent\\n /// @param amount0Requested The maximum amount of token0 to send, can be 0 to collect fees in only token1\\n /// @param amount1Requested The maximum amount of token1 to send, can be 0 to collect fees in only token0\\n /// @return amount0 The protocol fee collected in token0\\n /// @return amount1 The protocol fee collected in token1\\n function collectProtocol(\\n address recipient,\\n uint128 amount0Requested,\\n uint128 amount1Requested\\n ) external returns (uint128 amount0, uint128 amount1);\\n}\\n\",\"keccak256\":\"0x759b78a2918af9e99e246dc3af084f654e48ef32bb4e4cb8a966aa3dcaece235\",\"license\":\"GPL-2.0-or-later\"},\"@uniswap/v3-core/contracts/interfaces/pool/IUniswapV3PoolState.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-2.0-or-later\\npragma solidity >=0.5.0;\\n\\n/// @title Pool state that can change\\n/// @notice These methods compose the pool's state, and can change with any frequency including multiple times\\n/// per transaction\\ninterface IUniswapV3PoolState {\\n /// @notice The 0th storage slot in the pool stores many values, and is exposed as a single method to save gas\\n /// when accessed externally.\\n /// @return sqrtPriceX96 The current price of the pool as a sqrt(token1/token0) Q64.96 value\\n /// tick The current tick of the pool, i.e. according to the last tick transition that was run.\\n /// This value may not always be equal to SqrtTickMath.getTickAtSqrtRatio(sqrtPriceX96) if the price is on a tick\\n /// boundary.\\n /// observationIndex The index of the last oracle observation that was written,\\n /// observationCardinality The current maximum number of observations stored in the pool,\\n /// observationCardinalityNext The next maximum number of observations, to be updated when the observation.\\n /// feeProtocol The protocol fee for both tokens of the pool.\\n /// Encoded as two 4 bit values, where the protocol fee of token1 is shifted 4 bits and the protocol fee of token0\\n /// is the lower 4 bits. Used as the denominator of a fraction of the swap fee, e.g. 4 means 1/4th of the swap fee.\\n /// unlocked Whether the pool is currently locked to reentrancy\\n function slot0()\\n external\\n view\\n returns (\\n uint160 sqrtPriceX96,\\n int24 tick,\\n uint16 observationIndex,\\n uint16 observationCardinality,\\n uint16 observationCardinalityNext,\\n uint8 feeProtocol,\\n bool unlocked\\n );\\n\\n /// @notice The fee growth as a Q128.128 fees of token0 collected per unit of liquidity for the entire life of the pool\\n /// @dev This value can overflow the uint256\\n function feeGrowthGlobal0X128() external view returns (uint256);\\n\\n /// @notice The fee growth as a Q128.128 fees of token1 collected per unit of liquidity for the entire life of the pool\\n /// @dev This value can overflow the uint256\\n function feeGrowthGlobal1X128() external view returns (uint256);\\n\\n /// @notice The amounts of token0 and token1 that are owed to the protocol\\n /// @dev Protocol fees will never exceed uint128 max in either token\\n function protocolFees() external view returns (uint128 token0, uint128 token1);\\n\\n /// @notice The currently in range liquidity available to the pool\\n /// @dev This value has no relationship to the total liquidity across all ticks\\n function liquidity() external view returns (uint128);\\n\\n /// @notice Look up information about a specific tick in the pool\\n /// @param tick The tick to look up\\n /// @return liquidityGross the total amount of position liquidity that uses the pool either as tick lower or\\n /// tick upper,\\n /// liquidityNet how much liquidity changes when the pool price crosses the tick,\\n /// feeGrowthOutside0X128 the fee growth on the other side of the tick from the current tick in token0,\\n /// feeGrowthOutside1X128 the fee growth on the other side of the tick from the current tick in token1,\\n /// tickCumulativeOutside the cumulative tick value on the other side of the tick from the current tick\\n /// secondsPerLiquidityOutsideX128 the seconds spent per liquidity on the other side of the tick from the current tick,\\n /// secondsOutside the seconds spent on the other side of the tick from the current tick,\\n /// initialized Set to true if the tick is initialized, i.e. liquidityGross is greater than 0, otherwise equal to false.\\n /// Outside values can only be used if the tick is initialized, i.e. if liquidityGross is greater than 0.\\n /// In addition, these values are only relative and must be used only in comparison to previous snapshots for\\n /// a specific position.\\n function ticks(int24 tick)\\n external\\n view\\n returns (\\n uint128 liquidityGross,\\n int128 liquidityNet,\\n uint256 feeGrowthOutside0X128,\\n uint256 feeGrowthOutside1X128,\\n int56 tickCumulativeOutside,\\n uint160 secondsPerLiquidityOutsideX128,\\n uint32 secondsOutside,\\n bool initialized\\n );\\n\\n /// @notice Returns 256 packed tick initialized boolean values. See TickBitmap for more information\\n function tickBitmap(int16 wordPosition) external view returns (uint256);\\n\\n /// @notice Returns the information about a position by the position's key\\n /// @param key The position's key is a hash of a preimage composed by the owner, tickLower and tickUpper\\n /// @return _liquidity The amount of liquidity in the position,\\n /// Returns feeGrowthInside0LastX128 fee growth of token0 inside the tick range as of the last mint/burn/poke,\\n /// Returns feeGrowthInside1LastX128 fee growth of token1 inside the tick range as of the last mint/burn/poke,\\n /// Returns tokensOwed0 the computed amount of token0 owed to the position as of the last mint/burn/poke,\\n /// Returns tokensOwed1 the computed amount of token1 owed to the position as of the last mint/burn/poke\\n function positions(bytes32 key)\\n external\\n view\\n returns (\\n uint128 _liquidity,\\n uint256 feeGrowthInside0LastX128,\\n uint256 feeGrowthInside1LastX128,\\n uint128 tokensOwed0,\\n uint128 tokensOwed1\\n );\\n\\n /// @notice Returns data about a specific observation index\\n /// @param index The element of the observations array to fetch\\n /// @dev You most likely want to use #observe() instead of this method to get an observation as of some amount of time\\n /// ago, rather than at a specific index in the array.\\n /// @return blockTimestamp The timestamp of the observation,\\n /// Returns tickCumulative the tick multiplied by seconds elapsed for the life of the pool as of the observation timestamp,\\n /// Returns secondsPerLiquidityCumulativeX128 the seconds per in range liquidity for the life of the pool as of the observation timestamp,\\n /// Returns initialized whether the observation has been initialized and the values are safe to use\\n function observations(uint256 index)\\n external\\n view\\n returns (\\n uint32 blockTimestamp,\\n int56 tickCumulative,\\n uint160 secondsPerLiquidityCumulativeX128,\\n bool initialized\\n );\\n}\\n\",\"keccak256\":\"0x852dc1f5df7dcf7f11e7bb3eed79f0cea72ad4b25f6a9d2c35aafb48925fd49f\",\"license\":\"GPL-2.0-or-later\"},\"@uniswap/v3-core/contracts/libraries/FixedPoint96.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-2.0-or-later\\npragma solidity >=0.4.0;\\n\\n/// @title FixedPoint96\\n/// @notice A library for handling binary fixed point numbers, see https://en.wikipedia.org/wiki/Q_(number_format)\\n/// @dev Used in SqrtPriceMath.sol\\nlibrary FixedPoint96 {\\n uint8 internal constant RESOLUTION = 96;\\n uint256 internal constant Q96 = 0x1000000000000000000000000;\\n}\\n\",\"keccak256\":\"0x0ba8a9b95a956a4050749c0158e928398c447c91469682ca8a7cc7e77a7fe032\",\"license\":\"GPL-2.0-or-later\"},\"contracts/GUniPool.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity 0.8.19;\\n\\nimport {\\n IUniswapV3MintCallback\\n} from \\\"@uniswap/v3-core/contracts/interfaces/callback/IUniswapV3MintCallback.sol\\\";\\nimport {\\n IUniswapV3SwapCallback\\n} from \\\"@uniswap/v3-core/contracts/interfaces/callback/IUniswapV3SwapCallback.sol\\\";\\nimport {GUniPoolStorage} from \\\"./abstract/GUniPoolStorage.sol\\\";\\nimport {\\n IUniswapV3Pool\\n} from \\\"@uniswap/v3-core/contracts/interfaces/IUniswapV3Pool.sol\\\";\\nimport {TickMath} from \\\"./vendor/uniswap/TickMath.sol\\\";\\nimport {\\n IERC20,\\n SafeERC20\\n} from \\\"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\\\";\\nimport {SafeCast} from \\\"@openzeppelin/contracts/utils/math/SafeCast.sol\\\";\\nimport {\\n FullMath,\\n LiquidityAmounts\\n} from \\\"./vendor/uniswap/LiquidityAmounts.sol\\\";\\n\\ncontract GUniPool is\\n IUniswapV3MintCallback,\\n IUniswapV3SwapCallback,\\n GUniPoolStorage\\n{\\n using SafeERC20 for IERC20;\\n using TickMath for int24;\\n\\n event Minted(\\n address receiver,\\n uint256 mintAmount,\\n uint256 amount0In,\\n uint256 amount1In,\\n uint128 liquidityMinted\\n );\\n\\n event Burned(\\n address receiver,\\n uint256 burnAmount,\\n uint256 amount0Out,\\n uint256 amount1Out,\\n uint128 liquidityBurned\\n );\\n\\n event Rebalance(\\n int24 lowerTick_,\\n int24 upperTick_,\\n uint128 liquidityBefore,\\n uint128 liquidityAfter\\n );\\n\\n event FeesEarned(uint256 feesEarned0, uint256 feesEarned1);\\n\\n // solhint-disable-next-line max-line-length\\n constructor(address payable _gelato) GUniPoolStorage(_gelato) {} // solhint-disable-line no-empty-blocks\\n\\n /// @notice Uniswap V3 callback fn, called back on pool.mint\\n function uniswapV3MintCallback(\\n uint256 amount0Owed,\\n uint256 amount1Owed,\\n bytes calldata /*_data*/\\n ) external override {\\n require(msg.sender == address(pool), \\\"callback caller\\\");\\n\\n if (amount0Owed > 0) token0.safeTransfer(msg.sender, amount0Owed);\\n if (amount1Owed > 0) token1.safeTransfer(msg.sender, amount1Owed);\\n }\\n\\n /// @notice Uniswap v3 callback fn, called back on pool.swap\\n function uniswapV3SwapCallback(\\n int256 amount0Delta,\\n int256 amount1Delta,\\n bytes calldata /*data*/\\n ) external override {\\n require(msg.sender == address(pool), \\\"callback caller\\\");\\n\\n if (amount0Delta > 0)\\n token0.safeTransfer(msg.sender, uint256(amount0Delta));\\n else if (amount1Delta > 0)\\n token1.safeTransfer(msg.sender, uint256(amount1Delta));\\n }\\n\\n // User functions => Should be called via a Router\\n\\n /// @notice mint fungible G-UNI tokens, fractional shares of a Uniswap V3 position\\n /// @dev to compute the amouint of tokens necessary to mint `mintAmount` see getMintAmounts\\n /// @param mintAmount The number of G-UNI tokens to mint\\n /// @param receiver The account to receive the minted tokens\\n /// @return amount0 amount of token0 transferred from msg.sender to mint `mintAmount`\\n /// @return amount1 amount of token1 transferred from msg.sender to mint `mintAmount`\\n /// @return liquidityMinted amount of liquidity added to the underlying Uniswap V3 position\\n // solhint-disable-next-line function-max-lines, code-complexity\\n function mint(uint256 mintAmount, address receiver)\\n external\\n nonReentrant\\n returns (\\n uint256 amount0,\\n uint256 amount1,\\n uint128 liquidityMinted\\n )\\n {\\n require(mintAmount > 0, \\\"mint 0\\\");\\n\\n uint256 totalSupply = totalSupply();\\n\\n (uint160 sqrtRatioX96, , , , , , ) = pool.slot0();\\n\\n if (totalSupply > 0) {\\n (uint256 amount0Current, uint256 amount1Current) =\\n getUnderlyingBalances();\\n\\n amount0 = FullMath.mulDivRoundingUp(\\n amount0Current,\\n mintAmount,\\n totalSupply\\n );\\n amount1 = FullMath.mulDivRoundingUp(\\n amount1Current,\\n mintAmount,\\n totalSupply\\n );\\n } else {\\n // if supply is 0 mintAmount == liquidity to deposit\\n (amount0, amount1) = LiquidityAmounts.getAmountsForLiquidity(\\n sqrtRatioX96,\\n lowerTick.getSqrtRatioAtTick(),\\n upperTick.getSqrtRatioAtTick(),\\n SafeCast.toUint128(mintAmount)\\n );\\n }\\n\\n // transfer amounts owed to contract\\n if (amount0 > 0) {\\n token0.safeTransferFrom(msg.sender, address(this), amount0);\\n }\\n if (amount1 > 0) {\\n token1.safeTransferFrom(msg.sender, address(this), amount1);\\n }\\n\\n // deposit as much new liquidity as possible\\n liquidityMinted = LiquidityAmounts.getLiquidityForAmounts(\\n sqrtRatioX96,\\n lowerTick.getSqrtRatioAtTick(),\\n upperTick.getSqrtRatioAtTick(),\\n amount0,\\n amount1\\n );\\n\\n pool.mint(address(this), lowerTick, upperTick, liquidityMinted, \\\"\\\");\\n\\n _mint(receiver, mintAmount);\\n emit Minted(receiver, mintAmount, amount0, amount1, liquidityMinted);\\n }\\n\\n /// @notice burn G-UNI tokens (fractional shares of a Uniswap V3 position) and receive tokens\\n /// @param burnAmount The number of G-UNI tokens to burn\\n /// @param receiver The account to receive the underlying amounts of token0 and token1\\n /// @return amount0 amount of token0 transferred to receiver for burning `burnAmount`\\n /// @return amount1 amount of token1 transferred to receiver for burning `burnAmount`\\n /// @return liquidityBurned amount of liquidity removed from the underlying Uniswap V3 position\\n // solhint-disable-next-line function-max-lines\\n function burn(uint256 burnAmount, address receiver)\\n external\\n nonReentrant\\n returns (\\n uint256 amount0,\\n uint256 amount1,\\n uint128 liquidityBurned\\n )\\n {\\n require(burnAmount > 0, \\\"burn 0\\\");\\n\\n uint256 totalSupply = totalSupply();\\n\\n (uint128 liquidity, , , , ) = pool.positions(_getPositionID());\\n\\n _burn(msg.sender, burnAmount);\\n\\n uint256 liquidityBurned_ =\\n FullMath.mulDiv(burnAmount, liquidity, totalSupply);\\n liquidityBurned = SafeCast.toUint128(liquidityBurned_);\\n (uint256 burn0, uint256 burn1, uint256 fee0, uint256 fee1) =\\n _withdraw(lowerTick, upperTick, liquidityBurned);\\n _applyFees(fee0, fee1);\\n (fee0, fee1) = _subtractAdminFees(fee0, fee1);\\n emit FeesEarned(fee0, fee1);\\n\\n amount0 =\\n burn0 +\\n FullMath.mulDiv(\\n token0.balanceOf(address(this)) -\\n burn0 -\\n managerBalance0 -\\n gelatoBalance0,\\n burnAmount,\\n totalSupply\\n );\\n amount1 =\\n burn1 +\\n FullMath.mulDiv(\\n token1.balanceOf(address(this)) -\\n burn1 -\\n managerBalance1 -\\n gelatoBalance1,\\n burnAmount,\\n totalSupply\\n );\\n\\n if (amount0 > 0) {\\n token0.safeTransfer(receiver, amount0);\\n }\\n\\n if (amount1 > 0) {\\n token1.safeTransfer(receiver, amount1);\\n }\\n\\n emit Burned(receiver, burnAmount, amount0, amount1, liquidityBurned);\\n }\\n\\n // Manager Functions => Called by Pool Manager\\n\\n /// @notice Change the range of underlying UniswapV3 position, only manager can call\\n /// @dev When changing the range the inventory of token0 and token1 may be rebalanced\\n /// with a swap to deposit as much liquidity as possible into the new position. Swap parameters\\n /// can be computed by simulating the whole operation: remove all liquidity, deposit as much\\n /// as possible into new position, then observe how much of token0 or token1 is leftover.\\n /// Swap a proportion of this leftover to deposit more liquidity into the position, since\\n /// any leftover will be unused and sit idle until the next rebalance.\\n /// @param newLowerTick The new lower bound of the position's range\\n /// @param newUpperTick The new upper bound of the position's range\\n /// @param swapThresholdPrice slippage parameter on the swap as a max or min sqrtPriceX96\\n /// @param swapAmountBPS amount of token to swap as proportion of total. Pass 0 to ignore swap.\\n /// @param zeroForOne Which token to input into the swap (true = token0, false = token1)\\n // solhint-disable-next-line function-max-lines\\n function executiveRebalance(\\n int24 newLowerTick,\\n int24 newUpperTick,\\n uint160 swapThresholdPrice,\\n uint256 swapAmountBPS,\\n bool zeroForOne\\n ) external onlyManager {\\n uint128 liquidity;\\n uint128 newLiquidity;\\n if (totalSupply() > 0) {\\n (liquidity, , , , ) = pool.positions(_getPositionID());\\n if (liquidity > 0) {\\n (, , uint256 fee0, uint256 fee1) =\\n _withdraw(lowerTick, upperTick, liquidity);\\n\\n _applyFees(fee0, fee1);\\n (fee0, fee1) = _subtractAdminFees(fee0, fee1);\\n emit FeesEarned(fee0, fee1);\\n }\\n\\n lowerTick = newLowerTick;\\n upperTick = newUpperTick;\\n\\n uint256 reinvest0 =\\n token0.balanceOf(address(this)) -\\n managerBalance0 -\\n gelatoBalance0;\\n uint256 reinvest1 =\\n token1.balanceOf(address(this)) -\\n managerBalance1 -\\n gelatoBalance1;\\n\\n _deposit(\\n newLowerTick,\\n newUpperTick,\\n reinvest0,\\n reinvest1,\\n swapThresholdPrice,\\n swapAmountBPS,\\n zeroForOne\\n );\\n\\n (newLiquidity, , , , ) = pool.positions(_getPositionID());\\n require(newLiquidity > 0, \\\"new position 0\\\");\\n } else {\\n lowerTick = newLowerTick;\\n upperTick = newUpperTick;\\n }\\n\\n emit Rebalance(newLowerTick, newUpperTick, liquidity, newLiquidity);\\n }\\n\\n // Gelatofied functions => Automatically called by Gelato\\n\\n /// @notice Reinvest fees earned into underlying position, only gelato executors can call\\n /// Position bounds CANNOT be altered by gelato, only manager may via executiveRebalance.\\n /// Frequency of rebalance configured with gelatoRebalanceBPS, alterable by manager.\\n function rebalance(\\n uint160 swapThresholdPrice,\\n uint256 swapAmountBPS,\\n bool zeroForOne,\\n uint256 feeAmount,\\n address paymentToken\\n ) external gelatofy(feeAmount, paymentToken) {\\n if (swapAmountBPS > 0) {\\n _checkSlippage(swapThresholdPrice, zeroForOne);\\n }\\n (uint128 liquidity, , , , ) = pool.positions(_getPositionID());\\n _rebalance(\\n liquidity,\\n swapThresholdPrice,\\n swapAmountBPS,\\n zeroForOne,\\n feeAmount,\\n paymentToken\\n );\\n\\n (uint128 newLiquidity, , , , ) = pool.positions(_getPositionID());\\n require(newLiquidity > liquidity, \\\"liquidity must increase\\\");\\n\\n emit Rebalance(lowerTick, upperTick, liquidity, newLiquidity);\\n }\\n\\n /// @notice withdraw manager fees accrued, only gelato executors can call.\\n /// Target account to receive fees is managerTreasury, alterable by manager.\\n /// Frequency of withdrawals configured with gelatoWithdrawBPS, alterable by manager.\\n function withdrawManagerBalance(uint256 feeAmount, address feeToken)\\n external\\n gelatofy(feeAmount, feeToken)\\n {\\n (uint256 amount0, uint256 amount1) =\\n _balancesToWithdraw(\\n managerBalance0,\\n managerBalance1,\\n feeAmount,\\n feeToken\\n );\\n\\n managerBalance0 = 0;\\n managerBalance1 = 0;\\n\\n if (amount0 > 0) {\\n token0.safeTransfer(managerTreasury, amount0);\\n }\\n\\n if (amount1 > 0) {\\n token1.safeTransfer(managerTreasury, amount1);\\n }\\n }\\n\\n /// @notice withdraw gelato fees accrued, only gelato executors can call.\\n /// Frequency of withdrawals configured with gelatoWithdrawBPS, alterable by manager.\\n function withdrawGelatoBalance(uint256 feeAmount, address feeToken)\\n external\\n gelatofy(feeAmount, feeToken)\\n {\\n (uint256 amount0, uint256 amount1) =\\n _balancesToWithdraw(\\n gelatoBalance0,\\n gelatoBalance1,\\n feeAmount,\\n feeToken\\n );\\n\\n gelatoBalance0 = 0;\\n gelatoBalance1 = 0;\\n\\n if (amount0 > 0) {\\n token0.safeTransfer(GELATO, amount0);\\n }\\n\\n if (amount1 > 0) {\\n token1.safeTransfer(GELATO, amount1);\\n }\\n }\\n\\n function _balancesToWithdraw(\\n uint256 balance0,\\n uint256 balance1,\\n uint256 feeAmount,\\n address feeToken\\n ) internal view returns (uint256 amount0, uint256 amount1) {\\n if (feeToken == address(token0)) {\\n require(\\n (balance0 * gelatoWithdrawBPS) / 10000 >= feeAmount,\\n \\\"high fee\\\"\\n );\\n amount0 = balance0 - feeAmount;\\n amount1 = balance1;\\n } else if (feeToken == address(token1)) {\\n require(\\n (balance1 * gelatoWithdrawBPS) / 10000 >= feeAmount,\\n \\\"high fee\\\"\\n );\\n amount1 = balance1 - feeAmount;\\n amount0 = balance0;\\n } else {\\n revert(\\\"wrong token\\\");\\n }\\n }\\n\\n // View functions\\n\\n /// @notice compute maximum G-UNI tokens that can be minted from `amount0Max` and `amount1Max`\\n /// @param amount0Max The maximum amount of token0 to forward on mint\\n /// @param amount0Max The maximum amount of token1 to forward on mint\\n /// @return amount0 actual amount of token0 to forward when minting `mintAmount`\\n /// @return amount1 actual amount of token1 to forward when minting `mintAmount`\\n /// @return mintAmount maximum number of G-UNI tokens to mint\\n function getMintAmounts(uint256 amount0Max, uint256 amount1Max)\\n external\\n view\\n returns (\\n uint256 amount0,\\n uint256 amount1,\\n uint256 mintAmount\\n )\\n {\\n uint256 totalSupply = totalSupply();\\n if (totalSupply > 0) {\\n (amount0, amount1, mintAmount) = _computeMintAmounts(\\n totalSupply,\\n amount0Max,\\n amount1Max\\n );\\n } else {\\n (uint160 sqrtRatioX96, , , , , , ) = pool.slot0();\\n uint128 newLiquidity =\\n LiquidityAmounts.getLiquidityForAmounts(\\n sqrtRatioX96,\\n lowerTick.getSqrtRatioAtTick(),\\n upperTick.getSqrtRatioAtTick(),\\n amount0Max,\\n amount1Max\\n );\\n mintAmount = uint256(newLiquidity);\\n (amount0, amount1) = LiquidityAmounts.getAmountsForLiquidity(\\n sqrtRatioX96,\\n lowerTick.getSqrtRatioAtTick(),\\n upperTick.getSqrtRatioAtTick(),\\n newLiquidity\\n );\\n }\\n }\\n\\n /// @notice compute total underlying holdings of the G-UNI token supply\\n /// includes current liquidity invested in uniswap position, current fees earned\\n /// and any uninvested leftover (but does not include manager or gelato fees accrued)\\n /// @return amount0Current current total underlying balance of token0\\n /// @return amount1Current current total underlying balance of token1\\n function getUnderlyingBalances()\\n public\\n view\\n returns (uint256 amount0Current, uint256 amount1Current)\\n {\\n (uint160 sqrtRatioX96, int24 tick, , , , , ) = pool.slot0();\\n return _getUnderlyingBalances(sqrtRatioX96, tick);\\n }\\n\\n function getUnderlyingBalancesAtPrice(uint160 sqrtRatioX96)\\n external\\n view\\n returns (uint256 amount0Current, uint256 amount1Current)\\n {\\n (, int24 tick, , , , , ) = pool.slot0();\\n return _getUnderlyingBalances(sqrtRatioX96, tick);\\n }\\n\\n // solhint-disable-next-line function-max-lines\\n function _getUnderlyingBalances(uint160 sqrtRatioX96, int24 tick)\\n internal\\n view\\n returns (uint256 amount0Current, uint256 amount1Current)\\n {\\n (\\n uint128 liquidity,\\n uint256 feeGrowthInside0Last,\\n uint256 feeGrowthInside1Last,\\n uint128 tokensOwed0,\\n uint128 tokensOwed1\\n ) = pool.positions(_getPositionID());\\n\\n // compute current holdings from liquidity\\n (amount0Current, amount1Current) = LiquidityAmounts\\n .getAmountsForLiquidity(\\n sqrtRatioX96,\\n lowerTick.getSqrtRatioAtTick(),\\n upperTick.getSqrtRatioAtTick(),\\n liquidity\\n );\\n\\n // compute current fees earned\\n uint256 fee0 =\\n _computeFeesEarned(true, feeGrowthInside0Last, tick, liquidity) +\\n uint256(tokensOwed0);\\n uint256 fee1 =\\n _computeFeesEarned(false, feeGrowthInside1Last, tick, liquidity) +\\n uint256(tokensOwed1);\\n\\n (fee0, fee1) = _subtractAdminFees(fee0, fee1);\\n\\n // add any leftover in contract to current holdings\\n amount0Current +=\\n fee0 +\\n token0.balanceOf(address(this)) -\\n managerBalance0 -\\n gelatoBalance0;\\n amount1Current +=\\n fee1 +\\n token1.balanceOf(address(this)) -\\n managerBalance1 -\\n gelatoBalance1;\\n }\\n\\n // Private functions\\n\\n // solhint-disable-next-line function-max-lines\\n function _rebalance(\\n uint128 liquidity,\\n uint160 swapThresholdPrice,\\n uint256 swapAmountBPS,\\n bool zeroForOne,\\n uint256 feeAmount,\\n address paymentToken\\n ) private {\\n uint256 leftover0 =\\n token0.balanceOf(address(this)) - managerBalance0 - gelatoBalance0;\\n uint256 leftover1 =\\n token1.balanceOf(address(this)) - managerBalance1 - gelatoBalance1;\\n\\n (, , uint256 feesEarned0, uint256 feesEarned1) =\\n _withdraw(lowerTick, upperTick, liquidity);\\n _applyFees(feesEarned0, feesEarned1);\\n (feesEarned0, feesEarned1) = _subtractAdminFees(\\n feesEarned0,\\n feesEarned1\\n );\\n emit FeesEarned(feesEarned0, feesEarned1);\\n feesEarned0 += leftover0;\\n feesEarned1 += leftover1;\\n\\n if (paymentToken == address(token0)) {\\n require(\\n (feesEarned0 * gelatoRebalanceBPS) / 10000 >= feeAmount,\\n \\\"high fee\\\"\\n );\\n leftover0 =\\n token0.balanceOf(address(this)) -\\n managerBalance0 -\\n gelatoBalance0 -\\n feeAmount;\\n leftover1 =\\n token1.balanceOf(address(this)) -\\n managerBalance1 -\\n gelatoBalance1;\\n } else if (paymentToken == address(token1)) {\\n require(\\n (feesEarned1 * gelatoRebalanceBPS) / 10000 >= feeAmount,\\n \\\"high fee\\\"\\n );\\n leftover0 =\\n token0.balanceOf(address(this)) -\\n managerBalance0 -\\n gelatoBalance0;\\n leftover1 =\\n token1.balanceOf(address(this)) -\\n managerBalance1 -\\n gelatoBalance1 -\\n feeAmount;\\n } else {\\n revert(\\\"wrong token\\\");\\n }\\n\\n _deposit(\\n lowerTick,\\n upperTick,\\n leftover0,\\n leftover1,\\n swapThresholdPrice,\\n swapAmountBPS,\\n zeroForOne\\n );\\n }\\n\\n // solhint-disable-next-line function-max-lines\\n function _withdraw(\\n int24 lowerTick_,\\n int24 upperTick_,\\n uint128 liquidity\\n )\\n private\\n returns (\\n uint256 burn0,\\n uint256 burn1,\\n uint256 fee0,\\n uint256 fee1\\n )\\n {\\n uint256 preBalance0 = token0.balanceOf(address(this));\\n uint256 preBalance1 = token1.balanceOf(address(this));\\n\\n (burn0, burn1) = pool.burn(lowerTick_, upperTick_, liquidity);\\n\\n pool.collect(\\n address(this),\\n lowerTick_,\\n upperTick_,\\n type(uint128).max,\\n type(uint128).max\\n );\\n\\n fee0 = token0.balanceOf(address(this)) - preBalance0 - burn0;\\n fee1 = token1.balanceOf(address(this)) - preBalance1 - burn1;\\n }\\n\\n // solhint-disable-next-line function-max-lines\\n function _deposit(\\n int24 lowerTick_,\\n int24 upperTick_,\\n uint256 amount0,\\n uint256 amount1,\\n uint160 swapThresholdPrice,\\n uint256 swapAmountBPS,\\n bool zeroForOne\\n ) private {\\n (uint160 sqrtRatioX96, , , , , , ) = pool.slot0();\\n // First, deposit as much as we can\\n uint128 baseLiquidity =\\n LiquidityAmounts.getLiquidityForAmounts(\\n sqrtRatioX96,\\n lowerTick_.getSqrtRatioAtTick(),\\n upperTick_.getSqrtRatioAtTick(),\\n amount0,\\n amount1\\n );\\n if (baseLiquidity > 0) {\\n (uint256 amountDeposited0, uint256 amountDeposited1) =\\n pool.mint(\\n address(this),\\n lowerTick_,\\n upperTick_,\\n baseLiquidity,\\n \\\"\\\"\\n );\\n\\n amount0 -= amountDeposited0;\\n amount1 -= amountDeposited1;\\n }\\n int256 swapAmount =\\n SafeCast.toInt256(\\n ((zeroForOne ? amount0 : amount1) * swapAmountBPS) / 10000\\n );\\n if (swapAmount > 0) {\\n _swapAndDeposit(\\n lowerTick_,\\n upperTick_,\\n amount0,\\n amount1,\\n swapAmount,\\n swapThresholdPrice,\\n zeroForOne\\n );\\n }\\n }\\n\\n function _swapAndDeposit(\\n int24 lowerTick_,\\n int24 upperTick_,\\n uint256 amount0,\\n uint256 amount1,\\n int256 swapAmount,\\n uint160 swapThresholdPrice,\\n bool zeroForOne\\n ) private returns (uint256 finalAmount0, uint256 finalAmount1) {\\n (int256 amount0Delta, int256 amount1Delta) =\\n pool.swap(\\n address(this),\\n zeroForOne,\\n swapAmount,\\n swapThresholdPrice,\\n \\\"\\\"\\n );\\n finalAmount0 = uint256(SafeCast.toInt256(amount0) - amount0Delta);\\n finalAmount1 = uint256(SafeCast.toInt256(amount1) - amount1Delta);\\n\\n // Add liquidity a second time\\n (uint160 sqrtRatioX96, , , , , , ) = pool.slot0();\\n uint128 liquidityAfterSwap =\\n LiquidityAmounts.getLiquidityForAmounts(\\n sqrtRatioX96,\\n lowerTick_.getSqrtRatioAtTick(),\\n upperTick_.getSqrtRatioAtTick(),\\n finalAmount0,\\n finalAmount1\\n );\\n if (liquidityAfterSwap > 0) {\\n pool.mint(\\n address(this),\\n lowerTick_,\\n upperTick_,\\n liquidityAfterSwap,\\n \\\"\\\"\\n );\\n }\\n }\\n\\n // solhint-disable-next-line function-max-lines, code-complexity\\n function _computeMintAmounts(\\n uint256 totalSupply,\\n uint256 amount0Max,\\n uint256 amount1Max\\n )\\n private\\n view\\n returns (\\n uint256 amount0,\\n uint256 amount1,\\n uint256 mintAmount\\n )\\n {\\n (uint256 amount0Current, uint256 amount1Current) =\\n getUnderlyingBalances();\\n\\n // compute proportional amount of tokens to mint\\n if (amount0Current == 0 && amount1Current > 0) {\\n mintAmount = FullMath.mulDiv(\\n amount1Max,\\n totalSupply,\\n amount1Current\\n );\\n } else if (amount1Current == 0 && amount0Current > 0) {\\n mintAmount = FullMath.mulDiv(\\n amount0Max,\\n totalSupply,\\n amount0Current\\n );\\n } else if (amount0Current == 0 && amount1Current == 0) {\\n revert(\\\"\\\");\\n } else {\\n // only if both are non-zero\\n uint256 amount0Mint =\\n FullMath.mulDiv(amount0Max, totalSupply, amount0Current);\\n uint256 amount1Mint =\\n FullMath.mulDiv(amount1Max, totalSupply, amount1Current);\\n require(amount0Mint > 0 && amount1Mint > 0, \\\"mint 0\\\");\\n\\n mintAmount = amount0Mint < amount1Mint ? amount0Mint : amount1Mint;\\n }\\n\\n // compute amounts owed to contract\\n amount0 = FullMath.mulDivRoundingUp(\\n mintAmount,\\n amount0Current,\\n totalSupply\\n );\\n amount1 = FullMath.mulDivRoundingUp(\\n mintAmount,\\n amount1Current,\\n totalSupply\\n );\\n }\\n\\n // solhint-disable-next-line function-max-lines\\n function _computeFeesEarned(\\n bool isZero,\\n uint256 feeGrowthInsideLast,\\n int24 tick,\\n uint128 liquidity\\n ) private view returns (uint256 fee) {\\n uint256 feeGrowthOutsideLower;\\n uint256 feeGrowthOutsideUpper;\\n uint256 feeGrowthGlobal;\\n if (isZero) {\\n feeGrowthGlobal = pool.feeGrowthGlobal0X128();\\n (, , feeGrowthOutsideLower, , , , , ) = pool.ticks(lowerTick);\\n (, , feeGrowthOutsideUpper, , , , , ) = pool.ticks(upperTick);\\n } else {\\n feeGrowthGlobal = pool.feeGrowthGlobal1X128();\\n (, , , feeGrowthOutsideLower, , , , ) = pool.ticks(lowerTick);\\n (, , , feeGrowthOutsideUpper, , , , ) = pool.ticks(upperTick);\\n }\\n\\n unchecked {\\n // calculate fee growth below\\n uint256 feeGrowthBelow;\\n if (tick >= lowerTick) {\\n feeGrowthBelow = feeGrowthOutsideLower;\\n } else {\\n feeGrowthBelow = feeGrowthGlobal - feeGrowthOutsideLower;\\n }\\n\\n // calculate fee growth above\\n uint256 feeGrowthAbove;\\n if (tick < upperTick) {\\n feeGrowthAbove = feeGrowthOutsideUpper;\\n } else {\\n feeGrowthAbove = feeGrowthGlobal - feeGrowthOutsideUpper;\\n }\\n\\n uint256 feeGrowthInside =\\n feeGrowthGlobal - feeGrowthBelow - feeGrowthAbove;\\n fee = FullMath.mulDiv(\\n liquidity,\\n feeGrowthInside - feeGrowthInsideLast,\\n 0x100000000000000000000000000000000\\n );\\n }\\n }\\n\\n function _applyFees(uint256 _fee0, uint256 _fee1) private {\\n gelatoBalance0 += (_fee0 * gelatoFeeBPS) / 10000;\\n gelatoBalance1 += (_fee1 * gelatoFeeBPS) / 10000;\\n managerBalance0 += (_fee0 * managerFeeBPS) / 10000;\\n managerBalance1 += (_fee1 * managerFeeBPS) / 10000;\\n }\\n\\n function _subtractAdminFees(uint256 rawFee0, uint256 rawFee1)\\n private\\n view\\n returns (uint256 fee0, uint256 fee1)\\n {\\n uint256 deduct0 = (rawFee0 * (gelatoFeeBPS + managerFeeBPS)) / 10000;\\n uint256 deduct1 = (rawFee1 * (gelatoFeeBPS + managerFeeBPS)) / 10000;\\n fee0 = rawFee0 - deduct0;\\n fee1 = rawFee1 - deduct1;\\n }\\n\\n function _checkSlippage(uint160 swapThresholdPrice, bool zeroForOne)\\n private\\n view\\n {\\n uint32[] memory secondsAgo = new uint32[](2);\\n secondsAgo[0] = gelatoSlippageInterval;\\n secondsAgo[1] = 0;\\n\\n (int56[] memory tickCumulatives, ) = pool.observe(secondsAgo);\\n\\n require(tickCumulatives.length == 2, \\\"array len\\\");\\n uint160 avgSqrtRatioX96;\\n unchecked {\\n int24 avgTick =\\n int24(\\n (tickCumulatives[1] - tickCumulatives[0]) /\\n int56(uint56(gelatoSlippageInterval))\\n );\\n avgSqrtRatioX96 = avgTick.getSqrtRatioAtTick();\\n }\\n\\n uint160 maxSlippage = (avgSqrtRatioX96 * gelatoSlippageBPS) / 10000;\\n if (zeroForOne) {\\n require(\\n swapThresholdPrice >= avgSqrtRatioX96 - maxSlippage,\\n \\\"high slippage\\\"\\n );\\n } else {\\n require(\\n swapThresholdPrice <= avgSqrtRatioX96 + maxSlippage,\\n \\\"high slippage\\\"\\n );\\n }\\n }\\n}\\n\",\"keccak256\":\"0xdd382818c81f34c434bb3d4235ac9ff39034cb68e1b87244837d9250878d9fa0\",\"license\":\"GPL-3.0\"},\"contracts/abstract/GUniPoolStorage.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity 0.8.19;\\n\\nimport {Gelatofied} from \\\"./Gelatofied.sol\\\";\\nimport {OwnableUninitialized} from \\\"./OwnableUninitialized.sol\\\";\\nimport {\\n IUniswapV3Pool\\n} from \\\"@uniswap/v3-core/contracts/interfaces/IUniswapV3Pool.sol\\\";\\nimport {IERC20} from \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\nimport {\\n ReentrancyGuardUpgradeable\\n} from \\\"@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol\\\";\\nimport {\\n ERC20Upgradeable\\n} from \\\"@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol\\\";\\n\\n/// @dev Single Global upgradeable state var storage base: APPEND ONLY\\n/// @dev Add all inherited contracts with state vars here: APPEND ONLY\\n/// @dev ERC20Upgradable Includes Initialize\\n// solhint-disable-next-line max-states-count\\n/// @dev Modified to support 0.8.19\\n/// @dev Modified to set the gelatoFeeBPS to 0\\nabstract contract GUniPoolStorage is\\n ERC20Upgradeable, /* XXXX DONT MODIFY ORDERING XXXX */\\n ReentrancyGuardUpgradeable,\\n OwnableUninitialized,\\n Gelatofied\\n // APPEND ADDITIONAL BASE WITH STATE VARS BELOW:\\n // XXXX DONT MODIFY ORDERING XXXX\\n{\\n // solhint-disable-next-line const-name-snakecase\\n string public constant version = \\\"1.0.0\\\";\\n // solhint-disable-next-line const-name-snakecase\\n uint16 public constant gelatoFeeBPS = 0;\\n\\n // XXXXXXXX DO NOT MODIFY ORDERING XXXXXXXX\\n int24 public lowerTick;\\n int24 public upperTick;\\n\\n uint16 public gelatoRebalanceBPS;\\n uint16 public gelatoWithdrawBPS;\\n uint16 public gelatoSlippageBPS;\\n uint32 public gelatoSlippageInterval;\\n\\n uint16 public managerFeeBPS;\\n address public managerTreasury;\\n\\n uint256 public managerBalance0;\\n uint256 public managerBalance1;\\n uint256 public gelatoBalance0;\\n uint256 public gelatoBalance1;\\n\\n IUniswapV3Pool public pool;\\n IERC20 public token0;\\n IERC20 public token1;\\n // APPPEND ADDITIONAL STATE VARS BELOW:\\n // XXXXXXXX DO NOT MODIFY ORDERING XXXXXXXX\\n\\n event UpdateAdminTreasury(\\n address oldAdminTreasury,\\n address newAdminTreasury\\n );\\n\\n event UpdateGelatoParams(\\n uint16 gelatoRebalanceBPS,\\n uint16 gelatoWithdrawBPS,\\n uint16 gelatoSlippageBPS,\\n uint32 gelatoSlippageInterval\\n );\\n\\n event SetManagerFee(uint16 managerFee);\\n\\n // solhint-disable-next-line max-line-length\\n constructor(address payable _gelato) Gelatofied(_gelato) {} // solhint-disable-line no-empty-blocks\\n\\n /// @notice initialize storage variables on a new G-UNI pool, only called once\\n /// @param _name name of G-UNI token\\n /// @param _symbol symbol of G-UNI token\\n /// @param _pool address of Uniswap V3 pool\\n /// @param _managerFeeBPS proportion of fees earned that go to manager treasury\\n /// note that the 4 above params are NOT UPDATEABLE AFTER INILIALIZATION\\n /// @param _lowerTick initial lowerTick (only changeable with executiveRebalance)\\n /// @param _lowerTick initial upperTick (only changeable with executiveRebalance)\\n /// @param _manager_ address of manager (ownership can be transferred)\\n function initialize(\\n string memory _name,\\n string memory _symbol,\\n address _pool,\\n uint16 _managerFeeBPS,\\n int24 _lowerTick,\\n int24 _upperTick,\\n address _manager_\\n ) external initializer {\\n require(_managerFeeBPS <= 10000 - gelatoFeeBPS, \\\"mBPS\\\");\\n\\n // these variables are immutable after initialization\\n pool = IUniswapV3Pool(_pool);\\n token0 = IERC20(pool.token0());\\n token1 = IERC20(pool.token1());\\n managerFeeBPS = _managerFeeBPS; // if set to 0 here manager can still initialize later\\n\\n // these variables can be udpated by the manager\\n gelatoSlippageInterval = 5 minutes; // default: last five minutes;\\n gelatoSlippageBPS = 500; // default: 5% slippage\\n gelatoWithdrawBPS = 100; // default: only auto withdraw if tx fee is lt 1% withdrawn\\n gelatoRebalanceBPS = 200; // default: only rebalance if tx fee is lt 2% reinvested\\n managerTreasury = _manager_; // default: treasury is admin\\n lowerTick = _lowerTick;\\n upperTick = _upperTick;\\n _manager = _manager_;\\n\\n // e.g. \\\"Gelato Uniswap V3 USDC/DAI LP\\\" and \\\"G-UNI\\\"\\n __ERC20_init(_name, _symbol);\\n __ReentrancyGuard_init();\\n }\\n\\n /// @notice change configurable parameters, only manager can call\\n /// @param newRebalanceBPS controls frequency of gelato rebalances: gas fee to execute\\n /// rebalance can be gelatoRebalanceBPS proportion of fees earned since last rebalance\\n /// @param newWithdrawBPS controls frequency of gelato withdrawals: gas fee to execute\\n /// withdrawal can be gelatoWithdrawBPS proportion of fees accrued since last withdraw\\n /// @param newSlippageBPS maximum slippage on swaps during gelato rebalance\\n /// @param newSlippageInterval length of time for TWAP used in computing slippage on swaps\\n /// @param newTreasury address where managerFee withdrawals are sent\\n // solhint-disable-next-line code-complexity\\n function updateGelatoParams(\\n uint16 newRebalanceBPS,\\n uint16 newWithdrawBPS,\\n uint16 newSlippageBPS,\\n uint32 newSlippageInterval,\\n address newTreasury\\n ) external onlyManager {\\n require(newWithdrawBPS <= 10000, \\\"BPS\\\");\\n require(newRebalanceBPS <= 10000, \\\"BPS\\\");\\n require(newSlippageBPS <= 10000, \\\"BPS\\\");\\n emit UpdateGelatoParams(\\n newRebalanceBPS,\\n newWithdrawBPS,\\n newSlippageBPS,\\n newSlippageInterval\\n );\\n if (newRebalanceBPS != 0) gelatoRebalanceBPS = newRebalanceBPS;\\n if (newWithdrawBPS != 0) gelatoWithdrawBPS = newWithdrawBPS;\\n if (newSlippageBPS != 0) gelatoSlippageBPS = newSlippageBPS;\\n if (newSlippageInterval != 0)\\n gelatoSlippageInterval = newSlippageInterval;\\n if (newTreasury != address(0)) managerTreasury = newTreasury;\\n }\\n\\n /// @notice initializeManagerFee sets a managerFee, only manager can call.\\n /// If a manager fee was not set in the initialize function it can be set here\\n /// but ONLY ONCE- after it is set to a non-zero value, managerFee can never be set again.\\n /// @param _managerFeeBPS proportion of fees earned that are credited to manager in Basis Points\\n function initializeManagerFee(uint16 _managerFeeBPS) external onlyManager {\\n require(managerFeeBPS == 0, \\\"fee\\\");\\n require(\\n _managerFeeBPS > 0 && _managerFeeBPS <= 10000 - gelatoFeeBPS,\\n \\\"mBPS\\\"\\n );\\n emit SetManagerFee(_managerFeeBPS);\\n managerFeeBPS = _managerFeeBPS;\\n }\\n\\n function renounceOwnership() public virtual override onlyManager {\\n managerTreasury = address(0);\\n managerFeeBPS = 0;\\n managerBalance0 = 0;\\n managerBalance1 = 0;\\n super.renounceOwnership();\\n }\\n\\n function getPositionID() external view returns (bytes32 positionID) {\\n return _getPositionID();\\n }\\n\\n function _getPositionID() internal view returns (bytes32 positionID) {\\n return keccak256(abi.encodePacked(address(this), lowerTick, upperTick));\\n }\\n}\\n\",\"keccak256\":\"0xd1ad805a13c7cd73554b1e3cc3735f3f369d759f8e0b9188977b85295456d033\",\"license\":\"GPL-3.0\"},\"contracts/abstract/Gelatofied.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity 0.8.19;\\n\\nimport {Address} from \\\"@openzeppelin/contracts/utils/Address.sol\\\";\\nimport {\\n IERC20,\\n SafeERC20\\n} from \\\"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\\\";\\n\\n/// @dev DO NOT ADD STATE VARIABLES - APPEND THEM TO GelatoUniV3PoolStorage\\n/// @dev DO NOT ADD BASE CONTRACTS WITH STATE VARS - APPEND THEM TO GelatoUniV3PoolStorage\\nabstract contract Gelatofied {\\n using Address for address payable;\\n using SafeERC20 for IERC20;\\n\\n // solhint-disable-next-line var-name-mixedcase\\n address payable public immutable GELATO;\\n\\n address private constant _ETH = 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE;\\n\\n constructor(address payable _gelato) {\\n GELATO = _gelato;\\n }\\n\\n modifier gelatofy(uint256 _amount, address _paymentToken) {\\n require(msg.sender == GELATO, \\\"Gelatofied: Only gelato\\\");\\n _;\\n if (_paymentToken == _ETH) GELATO.sendValue(_amount);\\n else IERC20(_paymentToken).safeTransfer(GELATO, _amount);\\n }\\n}\\n\",\"keccak256\":\"0x264bc07e6e1b80c454c311ecf4b56afe245ddde31151ed9bcc4cb9ad25bec46a\",\"license\":\"GPL-3.0\"},\"contracts/abstract/OwnableUninitialized.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity 0.8.19;\\n\\n/**\\n * @dev Contract module which provides a basic access control mechanism, where\\n * there is an account (an manager) that can be granted exclusive access to\\n * specific functions.\\n *\\n * By default, the manager account will be the one that deploys the contract. This\\n * can later be changed with {transferOwnership}.\\n *\\n * This module is used through inheritance. It will make available the modifier\\n * `onlyManager`, which can be applied to your functions to restrict their use to\\n * the manager.\\n */\\n/// @dev DO NOT ADD STATE VARIABLES - APPEND THEM TO GelatoUniV3PoolStorage\\n/// @dev DO NOT ADD BASE CONTRACTS WITH STATE VARS - APPEND THEM TO GelatoUniV3PoolStorage\\nabstract contract OwnableUninitialized {\\n address internal _manager;\\n\\n event OwnershipTransferred(\\n address indexed previousManager,\\n address indexed newManager\\n );\\n\\n /// @dev Initializes the contract setting the deployer as the initial manager.\\n /// CONSTRUCTOR EMPTY - USE INITIALIZIABLE INSTEAD\\n // solhint-disable-next-line no-empty-blocks\\n constructor() {}\\n\\n /**\\n * @dev Returns the address of the current manager.\\n */\\n function manager() public view virtual returns (address) {\\n return _manager;\\n }\\n\\n /**\\n * @dev Throws if called by any account other than the manager.\\n */\\n modifier onlyManager() {\\n require(manager() == msg.sender, \\\"Ownable: caller is not the manager\\\");\\n _;\\n }\\n\\n /**\\n * @dev Leaves the contract without manager. It will not be possible to call\\n * `onlyManager` functions anymore. Can only be called by the current manager.\\n *\\n * NOTE: Renouncing ownership will leave the contract without an manager,\\n * thereby removing any functionality that is only available to the manager.\\n */\\n function renounceOwnership() public virtual onlyManager {\\n emit OwnershipTransferred(_manager, address(0));\\n _manager = address(0);\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Can only be called by the current manager.\\n */\\n function transferOwnership(address newOwner) public virtual onlyManager {\\n require(\\n newOwner != address(0),\\n \\\"Ownable: new manager is the zero address\\\"\\n );\\n emit OwnershipTransferred(_manager, newOwner);\\n _manager = newOwner;\\n }\\n}\\n\",\"keccak256\":\"0xb6016d5611f38fbd516a84ea2e56794cb76a8d61c40f6716d5f0133f195759bd\",\"license\":\"GPL-3.0\"},\"contracts/vendor/uniswap/FullMath.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity ^0.8.4;\\n\\n/// @title Contains 512-bit math functions\\n/// @notice Facilitates multiplication and division that can have overflow of an intermediate value without any loss of precision\\n/// @dev Handles \\\"phantom overflow\\\" i.e., allows multiplication and division where an intermediate value overflows 256 bits\\nlibrary FullMath {\\n /// @notice Calculates floor(a\\u00d7b\\u00f7denominator) with full precision. Throws if result overflows a uint256 or denominator == 0\\n /// @param a The multiplicand\\n /// @param b The multiplier\\n /// @param denominator The divisor\\n /// @return result The 256-bit result\\n /// @dev Credit to Remco Bloemen under MIT license https://xn--2-umb.com/21/muldiv\\n function mulDiv(\\n uint256 a,\\n uint256 b,\\n uint256 denominator\\n ) internal pure returns (uint256 result) {\\n unchecked {\\n // 512-bit multiply [prod1 prod0] = a * b\\n // Compute the product mod 2**256 and mod 2**256 - 1\\n // then use the Chinese Remainder Theorem to reconstruct\\n // the 512 bit result. The result is stored in two 256\\n // variables such that product = prod1 * 2**256 + prod0\\n uint256 prod0; // Least significant 256 bits of the product\\n uint256 prod1; // Most significant 256 bits of the product\\n assembly {\\n let mm := mulmod(a, b, not(0))\\n prod0 := mul(a, b)\\n prod1 := sub(sub(mm, prod0), lt(mm, prod0))\\n }\\n\\n // Handle non-overflow cases, 256 by 256 division\\n if (prod1 == 0) {\\n require(denominator > 0);\\n assembly {\\n result := div(prod0, denominator)\\n }\\n return result;\\n }\\n\\n // Make sure the result is less than 2**256.\\n // Also prevents denominator == 0\\n require(denominator > prod1);\\n\\n ///////////////////////////////////////////////\\n // 512 by 256 division.\\n ///////////////////////////////////////////////\\n\\n // Make division exact by subtracting the remainder from [prod1 prod0]\\n // Compute remainder using mulmod\\n uint256 remainder;\\n assembly {\\n remainder := mulmod(a, b, denominator)\\n }\\n // Subtract 256 bit number from 512 bit number\\n assembly {\\n prod1 := sub(prod1, gt(remainder, prod0))\\n prod0 := sub(prod0, remainder)\\n }\\n\\n // Factor powers of two out of denominator\\n // Compute largest power of two divisor of denominator.\\n // Always >= 1.\\n // EDIT for 0.8 compatibility:\\n // see: https://ethereum.stackexchange.com/questions/96642/unary-operator-cannot-be-applied-to-type-uint256\\n uint256 twos = denominator & (~denominator + 1);\\n\\n // Divide denominator by power of two\\n assembly {\\n denominator := div(denominator, twos)\\n }\\n\\n // Divide [prod1 prod0] by the factors of two\\n assembly {\\n prod0 := div(prod0, twos)\\n }\\n // Shift in bits from prod1 into prod0. For this we need\\n // to flip `twos` such that it is 2**256 / twos.\\n // If twos is zero, then it becomes one\\n assembly {\\n twos := add(div(sub(0, twos), twos), 1)\\n }\\n prod0 |= prod1 * twos;\\n\\n // Invert denominator mod 2**256\\n // Now that denominator is an odd number, it has an inverse\\n // modulo 2**256 such that denominator * inv = 1 mod 2**256.\\n // Compute the inverse by starting with a seed that is correct\\n // correct for four bits. That is, denominator * inv = 1 mod 2**4\\n uint256 inv = (3 * denominator) ^ 2;\\n // Now use Newton-Raphson iteration to improve the precision.\\n // Thanks to Hensel's lifting lemma, this also works in modular\\n // arithmetic, doubling the correct bits in each step.\\n inv *= 2 - denominator * inv; // inverse mod 2**8\\n inv *= 2 - denominator * inv; // inverse mod 2**16\\n inv *= 2 - denominator * inv; // inverse mod 2**32\\n inv *= 2 - denominator * inv; // inverse mod 2**64\\n inv *= 2 - denominator * inv; // inverse mod 2**128\\n inv *= 2 - denominator * inv; // inverse mod 2**256\\n\\n // Because the division is now exact we can divide by multiplying\\n // with the modular inverse of denominator. This will give us the\\n // correct result modulo 2**256. Since the precoditions guarantee\\n // that the outcome is less than 2**256, this is the final result.\\n // We don't need to compute the high bits of the result and prod1\\n // is no longer required.\\n result = prod0 * inv;\\n return result;\\n }\\n }\\n\\n /// @notice Calculates ceil(a\\u00d7b\\u00f7denominator) with full precision. Throws if result overflows a uint256 or denominator == 0\\n /// @param a The multiplicand\\n /// @param b The multiplier\\n /// @param denominator The divisor\\n /// @return result The 256-bit result\\n function mulDivRoundingUp(\\n uint256 a,\\n uint256 b,\\n uint256 denominator\\n ) internal pure returns (uint256 result) {\\n result = mulDiv(a, b, denominator);\\n if (mulmod(a, b, denominator) > 0) {\\n require(result < type(uint256).max);\\n result++;\\n }\\n }\\n}\\n\",\"keccak256\":\"0x3fa0efa3eea2a84bd6ab7e55badd61f97069a6c50780059b036c810427a9740c\",\"license\":\"GPL-3.0\"},\"contracts/vendor/uniswap/LiquidityAmounts.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity >=0.5.0;\\n\\nimport {FullMath} from \\\"./FullMath.sol\\\";\\nimport \\\"@uniswap/v3-core/contracts/libraries/FixedPoint96.sol\\\";\\n\\n/// @title Liquidity amount functions\\n/// @notice Provides functions for computing liquidity amounts from token amounts and prices\\nlibrary LiquidityAmounts {\\n function toUint128(uint256 x) private pure returns (uint128 y) {\\n require((y = uint128(x)) == x);\\n }\\n\\n /// @notice Computes the amount of liquidity received for a given amount of token0 and price range\\n /// @dev Calculates amount0 * (sqrt(upper) * sqrt(lower)) / (sqrt(upper) - sqrt(lower)).\\n /// @param sqrtRatioAX96 A sqrt price\\n /// @param sqrtRatioBX96 Another sqrt price\\n /// @param amount0 The amount0 being sent in\\n /// @return liquidity The amount of returned liquidity\\n function getLiquidityForAmount0(\\n uint160 sqrtRatioAX96,\\n uint160 sqrtRatioBX96,\\n uint256 amount0\\n ) internal pure returns (uint128 liquidity) {\\n if (sqrtRatioAX96 > sqrtRatioBX96)\\n (sqrtRatioAX96, sqrtRatioBX96) = (sqrtRatioBX96, sqrtRatioAX96);\\n uint256 intermediate =\\n FullMath.mulDiv(sqrtRatioAX96, sqrtRatioBX96, FixedPoint96.Q96);\\n return\\n toUint128(\\n FullMath.mulDiv(\\n amount0,\\n intermediate,\\n sqrtRatioBX96 - sqrtRatioAX96\\n )\\n );\\n }\\n\\n /// @notice Computes the amount of liquidity received for a given amount of token1 and price range\\n /// @dev Calculates amount1 / (sqrt(upper) - sqrt(lower)).\\n /// @param sqrtRatioAX96 A sqrt price\\n /// @param sqrtRatioBX96 Another sqrt price\\n /// @param amount1 The amount1 being sent in\\n /// @return liquidity The amount of returned liquidity\\n function getLiquidityForAmount1(\\n uint160 sqrtRatioAX96,\\n uint160 sqrtRatioBX96,\\n uint256 amount1\\n ) internal pure returns (uint128 liquidity) {\\n if (sqrtRatioAX96 > sqrtRatioBX96)\\n (sqrtRatioAX96, sqrtRatioBX96) = (sqrtRatioBX96, sqrtRatioAX96);\\n return\\n toUint128(\\n FullMath.mulDiv(\\n amount1,\\n FixedPoint96.Q96,\\n sqrtRatioBX96 - sqrtRatioAX96\\n )\\n );\\n }\\n\\n /// @notice Computes the maximum amount of liquidity received for a given amount of token0, token1, the current\\n /// pool prices and the prices at the tick boundaries\\n function getLiquidityForAmounts(\\n uint160 sqrtRatioX96,\\n uint160 sqrtRatioAX96,\\n uint160 sqrtRatioBX96,\\n uint256 amount0,\\n uint256 amount1\\n ) internal pure returns (uint128 liquidity) {\\n if (sqrtRatioAX96 > sqrtRatioBX96)\\n (sqrtRatioAX96, sqrtRatioBX96) = (sqrtRatioBX96, sqrtRatioAX96);\\n\\n if (sqrtRatioX96 <= sqrtRatioAX96) {\\n liquidity = getLiquidityForAmount0(\\n sqrtRatioAX96,\\n sqrtRatioBX96,\\n amount0\\n );\\n } else if (sqrtRatioX96 < sqrtRatioBX96) {\\n uint128 liquidity0 =\\n getLiquidityForAmount0(sqrtRatioX96, sqrtRatioBX96, amount0);\\n uint128 liquidity1 =\\n getLiquidityForAmount1(sqrtRatioAX96, sqrtRatioX96, amount1);\\n\\n liquidity = liquidity0 < liquidity1 ? liquidity0 : liquidity1;\\n } else {\\n liquidity = getLiquidityForAmount1(\\n sqrtRatioAX96,\\n sqrtRatioBX96,\\n amount1\\n );\\n }\\n }\\n\\n /// @notice Computes the amount of token0 for a given amount of liquidity and a price range\\n /// @param sqrtRatioAX96 A sqrt price\\n /// @param sqrtRatioBX96 Another sqrt price\\n /// @param liquidity The liquidity being valued\\n /// @return amount0 The amount0\\n function getAmount0ForLiquidity(\\n uint160 sqrtRatioAX96,\\n uint160 sqrtRatioBX96,\\n uint128 liquidity\\n ) internal pure returns (uint256 amount0) {\\n if (sqrtRatioAX96 > sqrtRatioBX96)\\n (sqrtRatioAX96, sqrtRatioBX96) = (sqrtRatioBX96, sqrtRatioAX96);\\n\\n return\\n FullMath.mulDiv(\\n uint256(liquidity) << FixedPoint96.RESOLUTION,\\n sqrtRatioBX96 - sqrtRatioAX96,\\n sqrtRatioBX96\\n ) / sqrtRatioAX96;\\n }\\n\\n /// @notice Computes the amount of token1 for a given amount of liquidity and a price range\\n /// @param sqrtRatioAX96 A sqrt price\\n /// @param sqrtRatioBX96 Another sqrt price\\n /// @param liquidity The liquidity being valued\\n /// @return amount1 The amount1\\n function getAmount1ForLiquidity(\\n uint160 sqrtRatioAX96,\\n uint160 sqrtRatioBX96,\\n uint128 liquidity\\n ) internal pure returns (uint256 amount1) {\\n if (sqrtRatioAX96 > sqrtRatioBX96)\\n (sqrtRatioAX96, sqrtRatioBX96) = (sqrtRatioBX96, sqrtRatioAX96);\\n\\n return\\n FullMath.mulDiv(\\n liquidity,\\n sqrtRatioBX96 - sqrtRatioAX96,\\n FixedPoint96.Q96\\n );\\n }\\n\\n /// @notice Computes the token0 and token1 value for a given amount of liquidity, the current\\n /// pool prices and the prices at the tick boundaries\\n function getAmountsForLiquidity(\\n uint160 sqrtRatioX96,\\n uint160 sqrtRatioAX96,\\n uint160 sqrtRatioBX96,\\n uint128 liquidity\\n ) internal pure returns (uint256 amount0, uint256 amount1) {\\n if (sqrtRatioAX96 > sqrtRatioBX96)\\n (sqrtRatioAX96, sqrtRatioBX96) = (sqrtRatioBX96, sqrtRatioAX96);\\n\\n if (sqrtRatioX96 <= sqrtRatioAX96) {\\n amount0 = getAmount0ForLiquidity(\\n sqrtRatioAX96,\\n sqrtRatioBX96,\\n liquidity\\n );\\n } else if (sqrtRatioX96 < sqrtRatioBX96) {\\n amount0 = getAmount0ForLiquidity(\\n sqrtRatioX96,\\n sqrtRatioBX96,\\n liquidity\\n );\\n amount1 = getAmount1ForLiquidity(\\n sqrtRatioAX96,\\n sqrtRatioX96,\\n liquidity\\n );\\n } else {\\n amount1 = getAmount1ForLiquidity(\\n sqrtRatioAX96,\\n sqrtRatioBX96,\\n liquidity\\n );\\n }\\n }\\n}\\n\",\"keccak256\":\"0x6205f6409d42fc9565530d2a69819bf8c4e4c66b7a4c61d0827e81c084df6832\",\"license\":\"GPL-3.0\"},\"contracts/vendor/uniswap/TickMath.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity 0.8.19;\\n\\n/// @title Math library for computing sqrt prices from ticks and vice versa\\n/// @notice Computes sqrt price for ticks of size 1.0001, i.e. sqrt(1.0001^tick) as fixed point Q64.96 numbers. Supports\\n/// prices between 2**-128 and 2**128\\nlibrary TickMath {\\n /// @dev The minimum tick that may be passed to #getSqrtRatioAtTick computed from log base 1.0001 of 2**-128\\n int24 internal constant MIN_TICK = -887272;\\n /// @dev The maximum tick that may be passed to #getSqrtRatioAtTick computed from log base 1.0001 of 2**128\\n int24 internal constant MAX_TICK = -MIN_TICK;\\n\\n /// @dev The minimum value that can be returned from #getSqrtRatioAtTick. Equivalent to getSqrtRatioAtTick(MIN_TICK)\\n uint160 internal constant MIN_SQRT_RATIO = 4295128739;\\n /// @dev The maximum value that can be returned from #getSqrtRatioAtTick. Equivalent to getSqrtRatioAtTick(MAX_TICK)\\n uint160 internal constant MAX_SQRT_RATIO =\\n 1461446703485210103287273052203988822378723970342;\\n\\n /// @notice Calculates sqrt(1.0001^tick) * 2^96\\n /// @dev Throws if |tick| > max tick\\n /// @param tick The input tick for the above formula\\n /// @return sqrtPriceX96 A Fixed point Q64.96 number representing the sqrt of the ratio of the two assets (token1/token0)\\n /// at the given tick\\n function getSqrtRatioAtTick(int24 tick)\\n internal\\n pure\\n returns (uint160 sqrtPriceX96)\\n {\\n uint256 absTick =\\n tick < 0 ? uint256(-int256(tick)) : uint256(int256(tick));\\n\\n // EDIT: 0.8 compatibility\\n require(absTick <= uint256(int256(MAX_TICK)), \\\"T\\\");\\n\\n uint256 ratio =\\n absTick & 0x1 != 0\\n ? 0xfffcb933bd6fad37aa2d162d1a594001\\n : 0x100000000000000000000000000000000;\\n if (absTick & 0x2 != 0)\\n ratio = (ratio * 0xfff97272373d413259a46990580e213a) >> 128;\\n if (absTick & 0x4 != 0)\\n ratio = (ratio * 0xfff2e50f5f656932ef12357cf3c7fdcc) >> 128;\\n if (absTick & 0x8 != 0)\\n ratio = (ratio * 0xffe5caca7e10e4e61c3624eaa0941cd0) >> 128;\\n if (absTick & 0x10 != 0)\\n ratio = (ratio * 0xffcb9843d60f6159c9db58835c926644) >> 128;\\n if (absTick & 0x20 != 0)\\n ratio = (ratio * 0xff973b41fa98c081472e6896dfb254c0) >> 128;\\n if (absTick & 0x40 != 0)\\n ratio = (ratio * 0xff2ea16466c96a3843ec78b326b52861) >> 128;\\n if (absTick & 0x80 != 0)\\n ratio = (ratio * 0xfe5dee046a99a2a811c461f1969c3053) >> 128;\\n if (absTick & 0x100 != 0)\\n ratio = (ratio * 0xfcbe86c7900a88aedcffc83b479aa3a4) >> 128;\\n if (absTick & 0x200 != 0)\\n ratio = (ratio * 0xf987a7253ac413176f2b074cf7815e54) >> 128;\\n if (absTick & 0x400 != 0)\\n ratio = (ratio * 0xf3392b0822b70005940c7a398e4b70f3) >> 128;\\n if (absTick & 0x800 != 0)\\n ratio = (ratio * 0xe7159475a2c29b7443b29c7fa6e889d9) >> 128;\\n if (absTick & 0x1000 != 0)\\n ratio = (ratio * 0xd097f3bdfd2022b8845ad8f792aa5825) >> 128;\\n if (absTick & 0x2000 != 0)\\n ratio = (ratio * 0xa9f746462d870fdf8a65dc1f90e061e5) >> 128;\\n if (absTick & 0x4000 != 0)\\n ratio = (ratio * 0x70d869a156d2a1b890bb3df62baf32f7) >> 128;\\n if (absTick & 0x8000 != 0)\\n ratio = (ratio * 0x31be135f97d08fd981231505542fcfa6) >> 128;\\n if (absTick & 0x10000 != 0)\\n ratio = (ratio * 0x9aa508b5b7a84e1c677de54f3e99bc9) >> 128;\\n if (absTick & 0x20000 != 0)\\n ratio = (ratio * 0x5d6af8dedb81196699c329225ee604) >> 128;\\n if (absTick & 0x40000 != 0)\\n ratio = (ratio * 0x2216e584f5fa1ea926041bedfe98) >> 128;\\n if (absTick & 0x80000 != 0)\\n ratio = (ratio * 0x48a170391f7dc42444e8fa2) >> 128;\\n\\n if (tick > 0) ratio = type(uint256).max / ratio;\\n\\n // this divides by 1<<32 rounding up to go from a Q128.128 to a Q128.96.\\n // we then downcast because we know the result always fits within 160 bits due to our tick input constraint\\n // we round up in the division so getTickAtSqrtRatio of the output price is always consistent\\n sqrtPriceX96 = uint160(\\n (ratio >> 32) + (ratio % (1 << 32) == 0 ? 0 : 1)\\n );\\n }\\n\\n /// @notice Calculates the greatest tick value such that getRatioAtTick(tick) <= ratio\\n /// @dev Throws in case sqrtPriceX96 < MIN_SQRT_RATIO, as MIN_SQRT_RATIO is the lowest value getRatioAtTick may\\n /// ever return.\\n /// @param sqrtPriceX96 The sqrt ratio for which to compute the tick as a Q64.96\\n /// @return tick The greatest tick for which the ratio is less than or equal to the input ratio\\n function getTickAtSqrtRatio(uint160 sqrtPriceX96)\\n internal\\n pure\\n returns (int24 tick)\\n {\\n // second inequality must be < because the price can never reach the price at the max tick\\n require(\\n sqrtPriceX96 >= MIN_SQRT_RATIO && sqrtPriceX96 < MAX_SQRT_RATIO,\\n \\\"R\\\"\\n );\\n uint256 ratio = uint256(sqrtPriceX96) << 32;\\n\\n uint256 r = ratio;\\n uint256 msb = 0;\\n\\n assembly {\\n let f := shl(7, gt(r, 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF))\\n msb := or(msb, f)\\n r := shr(f, r)\\n }\\n assembly {\\n let f := shl(6, gt(r, 0xFFFFFFFFFFFFFFFF))\\n msb := or(msb, f)\\n r := shr(f, r)\\n }\\n assembly {\\n let f := shl(5, gt(r, 0xFFFFFFFF))\\n msb := or(msb, f)\\n r := shr(f, r)\\n }\\n assembly {\\n let f := shl(4, gt(r, 0xFFFF))\\n msb := or(msb, f)\\n r := shr(f, r)\\n }\\n assembly {\\n let f := shl(3, gt(r, 0xFF))\\n msb := or(msb, f)\\n r := shr(f, r)\\n }\\n assembly {\\n let f := shl(2, gt(r, 0xF))\\n msb := or(msb, f)\\n r := shr(f, r)\\n }\\n assembly {\\n let f := shl(1, gt(r, 0x3))\\n msb := or(msb, f)\\n r := shr(f, r)\\n }\\n assembly {\\n let f := gt(r, 0x1)\\n msb := or(msb, f)\\n }\\n\\n if (msb >= 128) r = ratio >> (msb - 127);\\n else r = ratio << (127 - msb);\\n\\n int256 log_2 = (int256(msb) - 128) << 64;\\n\\n assembly {\\n r := shr(127, mul(r, r))\\n let f := shr(128, r)\\n log_2 := or(log_2, shl(63, f))\\n r := shr(f, r)\\n }\\n assembly {\\n r := shr(127, mul(r, r))\\n let f := shr(128, r)\\n log_2 := or(log_2, shl(62, f))\\n r := shr(f, r)\\n }\\n assembly {\\n r := shr(127, mul(r, r))\\n let f := shr(128, r)\\n log_2 := or(log_2, shl(61, f))\\n r := shr(f, r)\\n }\\n assembly {\\n r := shr(127, mul(r, r))\\n let f := shr(128, r)\\n log_2 := or(log_2, shl(60, f))\\n r := shr(f, r)\\n }\\n assembly {\\n r := shr(127, mul(r, r))\\n let f := shr(128, r)\\n log_2 := or(log_2, shl(59, f))\\n r := shr(f, r)\\n }\\n assembly {\\n r := shr(127, mul(r, r))\\n let f := shr(128, r)\\n log_2 := or(log_2, shl(58, f))\\n r := shr(f, r)\\n }\\n assembly {\\n r := shr(127, mul(r, r))\\n let f := shr(128, r)\\n log_2 := or(log_2, shl(57, f))\\n r := shr(f, r)\\n }\\n assembly {\\n r := shr(127, mul(r, r))\\n let f := shr(128, r)\\n log_2 := or(log_2, shl(56, f))\\n r := shr(f, r)\\n }\\n assembly {\\n r := shr(127, mul(r, r))\\n let f := shr(128, r)\\n log_2 := or(log_2, shl(55, f))\\n r := shr(f, r)\\n }\\n assembly {\\n r := shr(127, mul(r, r))\\n let f := shr(128, r)\\n log_2 := or(log_2, shl(54, f))\\n r := shr(f, r)\\n }\\n assembly {\\n r := shr(127, mul(r, r))\\n let f := shr(128, r)\\n log_2 := or(log_2, shl(53, f))\\n r := shr(f, r)\\n }\\n assembly {\\n r := shr(127, mul(r, r))\\n let f := shr(128, r)\\n log_2 := or(log_2, shl(52, f))\\n r := shr(f, r)\\n }\\n assembly {\\n r := shr(127, mul(r, r))\\n let f := shr(128, r)\\n log_2 := or(log_2, shl(51, f))\\n r := shr(f, r)\\n }\\n assembly {\\n r := shr(127, mul(r, r))\\n let f := shr(128, r)\\n log_2 := or(log_2, shl(50, f))\\n }\\n\\n int256 log_sqrt10001 = log_2 * 255738958999603826347141; // 128.128 number\\n\\n int24 tickLow =\\n int24(\\n (log_sqrt10001 - 3402992956809132418596140100660247210) >> 128\\n );\\n int24 tickHi =\\n int24(\\n (log_sqrt10001 + 291339464771989622907027621153398088495) >> 128\\n );\\n\\n tick = tickLow == tickHi\\n ? tickLow\\n : getSqrtRatioAtTick(tickHi) <= sqrtPriceX96\\n ? tickHi\\n : tickLow;\\n }\\n}\\n\",\"keccak256\":\"0x589b6104fd07d2e56e5b52edcfa53e6e47e2c38cace38025c16278ca73413f2d\",\"license\":\"GPL-3.0\"}},\"version\":1}", "bytecode": "0x60a06040523480156200001157600080fd5b5060405162005e0e38038062005e0e833981016040819052620000349162000046565b6001600160a01b031660805262000078565b6000602082840312156200005957600080fd5b81516001600160a01b03811681146200007157600080fd5b9392505050565b608051615d3b620000d3600039600081816105f801528181610ce301528181610dcc01528181610e06015281816114a7015281816116d50152818161170f015281816117e20152818161185901526118960152615d3b6000f3fe608060405234801561001057600080fd5b50600436106102255760003560e01c8063065756db1461022a57806306fdde0314610246578063095ea7b31461025b5780630dfe16811461027e5780631322d9541461029e57806316f0115b146102b457806318160ddd146102c757806323b872dd146102cf57806324b8fd1b146102e257806331366be4146102f7578063313ce5671461031257806339509351146103215780633d8b30e11461033457806342fb9d4414610349578063481c6a751461035257806354fd4d501461035a578063672152bd1461037e57806370a08231146103a3578063715018a6146103cc578063727dd228146103d457806378ac6357146103f557806394bf804d1461040857806395d89b411461043f5780639894f21a1461044757806399fd808c146104755780639b1344ac14610488578063a457c2d71461049c578063a50b1fe7146104af578063a9059cbb146104c4578063b135c99f146104d7578063b536bd12146104ea578063b670ed7d146104f3578063be93dd5f14610506578063c345445914610519578063cc95353e14610522578063ccdf7a021461053c578063d21220a714610551578063d348799714610564578063d6e7ff3914610577578063dd62ed3e1461058c578063df28408a146105c5578063e25e15e3146105cd578063e4077894146105e0578063eff557a7146105f3578063f2fde38b1461061a578063fa461e331461062d578063fcd3533c14610640575b600080fd5b61023360995481565b6040519081526020015b60405180910390f35b61024e610653565b60405161023d9190614dc5565b61026e610269366004614e0d565b6106e5565b604051901515815260200161023d565b609e54610291906001600160a01b031681565b60405161023d9190614e39565b6102a66106fc565b60405161023d929190614e4d565b609d54610291906001600160a01b031681565b603554610233565b61026e6102dd366004614e5b565b610796565b6102f56102f0366004614eb9565b61084e565b005b6102ff600081565b60405161ffff909116815260200161023d565b6040516012815260200161023d565b61026e61032f366004614e0d565b610c3a565b6097546102ff90600160e01b900461ffff1681565b610233609a5481565b610291610c71565b61024e604051806040016040528060058152602001640312e302e360dc1b81525081565b60985461038e9063ffffffff1681565b60405163ffffffff909116815260200161023d565b6102336103b1366004614f21565b6001600160a01b031660009081526033602052604090205490565b6102f5610c80565b6097546103e890600160b81b900460020b81565b60405161023d9190614f3e565b6102f5610403366004614f4c565b610cd6565b61041b610416366004614f4c565b610e31565b6040805193845260208401929092526001600160801b03169082015260600161023d565b61024e6110ea565b61045a610455366004614f7c565b6110f9565b6040805193845260208401929092529082015260600161023d565b6102f5610483366004614fc0565b611232565b6097546103e890600160a01b900460020b81565b61026e6104aa366004614e0d565b6113f2565b6097546102ff90600160d01b900461ffff1681565b61026e6104d2366004614e0d565b61148d565b6102f56104e5366004615023565b61149a565b610233609b5481565b6102a6610501366004614f21565b61173d565b6102f5610514366004614f4c565b6117d5565b610233609c5481565b60985461029190600160301b90046001600160a01b031681565b6098546102ff90600160201b900461ffff1681565b609f54610291906001600160a01b031681565b6102f56105723660046150bc565b6118bb565b6097546102ff90600160f01b900461ffff1681565b61023361059a36600461510e565b6001600160a01b03918216600090815260346020908152604080832093909416825291909152205490565b61023361191f565b6102f56105db3660046151f1565b61192e565b6102f56105ee3660046152b3565b611ba3565b6102917f000000000000000000000000000000000000000000000000000000000000000081565b6102f5610628366004614f21565b611cb0565b6102f561063b3660046150bc565b611d90565b61041b61064e366004614f4c565b611dfa565b606060368054610662906152d0565b80601f016020809104026020016040519081016040528092919081815260200182805461068e906152d0565b80156106db5780601f106106b0576101008083540402835291602001916106db565b820191906000526020600020905b8154815290600101906020018083116106be57829003601f168201915b5050505050905090565b60006106f2338484612114565b5060015b92915050565b600080600080609d60009054906101000a90046001600160a01b03166001600160a01b0316633850c7bd6040518163ffffffff1660e01b815260040160e060405180830381865afa158015610755573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610779919061530a565b50505050509150915061078c8282612239565b9350935050509091565b60006107a38484846124b9565b6001600160a01b03841660009081526034602090815260408083203384529091529020548281101561082d5760405162461bcd60e51b815260206004820152602860248201527f45524332303a207472616e7366657220616d6f756e74206578636565647320616044820152676c6c6f77616e636560c01b60648201526084015b60405180910390fd5b610841853361083c86856153b2565b612114565b60019150505b9392505050565b33610857610c71565b6001600160a01b03161461087d5760405162461bcd60e51b8152600401610824906153c5565b600080600061088b60355490565b1115610bca57609d546001600160a01b031663514ea4bf6108aa61267f565b6040518263ffffffff1660e01b81526004016108c891815260200190565b60a060405180830381865afa1580156108e5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610909919061541e565b5092945050506001600160801b03831615905061099257609754600090819061094890600160a01b8104600290810b91600160b81b9004900b866126da565b9350935050506109588282612a0d565b6109628282612ae6565b6040519193509150600080516020615ce6833981519152906109879084908490614e4d565b60405180910390a150505b6097805462ffffff888116600160b81b0262ffffff60b81b19918b16600160a01b029190911665ffffffffffff60a01b1990921691909117179055609b54609954609e546040516370a0823160e01b815260009392916001600160a01b0316906370a0823190610a06903090600401614e39565b602060405180830381865afa158015610a23573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a479190615475565b610a5191906153b2565b610a5b91906153b2565b609c54609a54609f546040516370a0823160e01b81529394506000936001600160a01b03909116906370a0823190610a97903090600401614e39565b602060405180830381865afa158015610ab4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ad89190615475565b610ae291906153b2565b610aec91906153b2565b9050610afd898984848b8b8b612b80565b609d546001600160a01b031663514ea4bf610b1661267f565b6040518263ffffffff1660e01b8152600401610b3491815260200190565b60a060405180830381865afa158015610b51573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b75919061541e565b509295505050506001600160801b038316610bc35760405162461bcd60e51b815260206004820152600e60248201526d06e657720706f736974696f6e20360941b6044820152606401610824565b5050610c06565b6097805462ffffff888116600160b81b0262ffffff60b81b19918b16600160a01b029190911665ffffffffffff60a01b19909216919091171790555b600080516020615c8683398151915287878484604051610c29949392919061548e565b60405180910390a150505050505050565b3360008181526034602090815260408083206001600160a01b038716845290915281205490916106f291859061083c9086906154bc565b6097546001600160a01b031690565b33610c89610c71565b6001600160a01b031614610caf5760405162461bcd60e51b8152600401610824906153c5565b60988054600160201b600160d01b031916905560006099819055609a55610cd4612d21565b565b8181336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614610d205760405162461bcd60e51b8152600401610824906154cf565b600080610d33609954609a548888612d88565b60006099819055609a5590925090508115610d6d57609854609e54610d6d916001600160a01b0391821691600160301b9091041684612eac565b8015610d9857609854609f54610d98916001600160a01b0391821691600160301b9091041683612eac565b505073eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeed196001600160a01b03821601610df757610df26001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001683612f14565b610e2b565b610e2b6001600160a01b0382167f000000000000000000000000000000000000000000000000000000000000000084612eac565b50505050565b6000806000600260655403610e585760405162461bcd60e51b815260040161082490615500565b600260655584610e7a5760405162461bcd60e51b815260040161082490615537565b6000610e8560355490565b90506000609d60009054906101000a90046001600160a01b03166001600160a01b0316633850c7bd6040518163ffffffff1660e01b815260040160e060405180830381865afa158015610edc573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f00919061530a565b50505050505090506000821115610f4157600080610f1c6106fc565b91509150610f2b828a8661302a565b9650610f38818a8661302a565b95505050610f87565b609754610f81908290610f5d90600160a01b900460020b613073565b609754610f7390600160b81b900460020b613073565b610f7c8b613488565b6134f1565b90955093505b8415610fa557609e54610fa5906001600160a01b031633308861358c565b8315610fc357609f54610fc3906001600160a01b031633308761358c565b609754610ffc908290610fdf90600160a01b900460020b613073565b609754610ff590600160b81b900460020b613073565b88886135c4565b609d54609754604051633c8a7d8d60e01b81529295506001600160a01b0390911691633c8a7d8d9161104c913091600160a01b8104600290810b92600160b81b909204900b908990600401615557565b60408051808303816000875af115801561106a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061108e9190615599565b505061109a8688613686565b7f55801cfe493000b734571da1694b21e7f66b11e8ce9fdaa0524ecb59105e73e786888787876040516110d19594939291906155bd565b60405180910390a1505060016065819055509250925092565b606060378054610662906152d0565b60008060008061110860355490565b905080156111275761111b818787613753565b9195509350915061122a565b609d5460408051633850c7bd60e01b815290516000926001600160a01b031691633850c7bd9160048083019260e09291908290030181865afa158015611171573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611195919061530a565b505050505050905060006111db826111be609760149054906101000a900460020b60020b613073565b6097546111d490600160b81b900460020b613073565b8b8b6135c4565b6097546001600160801b038216955090915061122290839061120690600160a01b900460020b613073565b60975461121c90600160b81b900460020b613073565b846134f1565b909650945050505b509250925092565b3361123b610c71565b6001600160a01b0316146112615760405162461bcd60e51b8152600401610824906153c5565b6127108461ffff1611156112875760405162461bcd60e51b8152600401610824906155f4565b6127108561ffff1611156112ad5760405162461bcd60e51b8152600401610824906155f4565b6127108361ffff1611156112d35760405162461bcd60e51b8152600401610824906155f4565b6040805161ffff8781168252868116602083015285168183015263ffffffff8416606082015290517f0b7615006627cf7664941bc288d4641731f895e102f95cb8690583ad7508faa89181900360800190a161ffff85161561134a576097805461ffff60d01b1916600160d01b61ffff8816021790555b61ffff84161561136f576097805461ffff60e01b1916600160e01b61ffff8716021790555b61ffff83161561139557609780546001600160f01b0316600160f01b61ffff8616021790555b63ffffffff8216156113b7576098805463ffffffff191663ffffffff84161790555b6001600160a01b038116156113eb5760988054600160301b600160d01b031916600160301b6001600160a01b038416021790555b5050505050565b3360009081526034602090815260408083206001600160a01b0386168452909152812054828110156114745760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b6064820152608401610824565b611483338561083c86856153b2565b5060019392505050565b60006106f23384846124b9565b8181336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146114e45760405162461bcd60e51b8152600401610824906154cf565b85156114f4576114f48786613862565b609d546000906001600160a01b031663514ea4bf61151061267f565b6040518263ffffffff1660e01b815260040161152e91815260200190565b60a060405180830381865afa15801561154b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061156f919061541e565b505050509050611583818989898989613abb565b609d546000906001600160a01b031663514ea4bf61159f61267f565b6040518263ffffffff1660e01b81526004016115bd91815260200190565b60a060405180830381865afa1580156115da573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115fe919061541e565b505050509050816001600160801b0316816001600160801b03161161165f5760405162461bcd60e51b81526020600482015260176024820152766c6971756964697479206d75737420696e63726561736560481b6044820152606401610824565b609754604051600080516020615c868339815191529161169991600160a01b8204600290810b92600160b81b9004900b908690869061548e565b60405180910390a1505073eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeed196001600160a01b03821601611700576116fb6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001683612f14565b611734565b6117346001600160a01b0382167f000000000000000000000000000000000000000000000000000000000000000084612eac565b50505050505050565b6000806000609d60009054906101000a90046001600160a01b03166001600160a01b0316633850c7bd6040518163ffffffff1660e01b815260040160e060405180830381865afa158015611795573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117b9919061530a565b50505050509150506117cb8482612239565b9250925050915091565b8181336001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161461181f5760405162461bcd60e51b8152600401610824906154cf565b600080611832609b54609c548888612d88565b6000609b819055609c559092509050811561187e57609e5461187e906001600160a01b03167f000000000000000000000000000000000000000000000000000000000000000084612eac565b8015610d9857609f54610d98906001600160a01b03167f000000000000000000000000000000000000000000000000000000000000000083612eac565b609d546001600160a01b031633146118e55760405162461bcd60e51b815260040161082490615611565b831561190257609e54611902906001600160a01b03163386612eac565b8215610e2b57609f54610e2b906001600160a01b03163385612eac565b600061192961267f565b905090565b600054610100900460ff1680611947575060005460ff16155b6119635760405162461bcd60e51b81526004016108249061563a565b600054610100900460ff16158015611985576000805461ffff19166101011790555b6119926000612710615688565b61ffff168561ffff1611156119b95760405162461bcd60e51b8152600401610824906156aa565b609d80546001600160a01b0319166001600160a01b03881690811790915560408051630dfe168160e01b81529051630dfe1681916004808201926020929091908290030181865afa158015611a12573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a3691906156c8565b609e80546001600160a01b0319166001600160a01b03928316179055609d546040805163d21220a760e01b81529051919092169163d21220a79160048083019260209291908290030181865afa158015611a94573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ab891906156c8565b609f80546001600160a01b039283166001600160a01b0319918216179091556098805460978054948716600160301b8102600160301b600160d01b031963ffffffff1961ffff8e16600160201b021665ffffffffffff199095169490941761012c17939093169290921790925562ffffff878116600160b81b02909316600165ffffff00000160a01b0319938916600160a01b02600165ffffff00000160a01b0390951694909417643e800c801960d31b179290921692909217179055611b7f8888613f83565b611b87614002565b8015611b99576000805461ff00191690555b5050505050505050565b33611bac610c71565b6001600160a01b031614611bd25760405162461bcd60e51b8152600401610824906153c5565b609854600160201b900461ffff1615611c135760405162461bcd60e51b815260206004820152600360248201526266656560e81b6044820152606401610824565b60008161ffff16118015611c3b5750611c2f6000612710615688565b61ffff168161ffff1611155b611c575760405162461bcd60e51b8152600401610824906156aa565b60405161ffff821681527f8a1ffb520c943072e654fc414750dbefad5b6d6311339d041901c4752782fad39060200160405180910390a16098805461ffff909216600160201b0261ffff60201b19909216919091179055565b33611cb9610c71565b6001600160a01b031614611cdf5760405162461bcd60e51b8152600401610824906153c5565b6001600160a01b038116611d465760405162461bcd60e51b815260206004820152602860248201527f4f776e61626c653a206e6577206d616e6167657220697320746865207a65726f604482015267206164647265737360c01b6064820152608401610824565b6097546040516001600160a01b03808416921690600080516020615ca683398151915290600090a3609780546001600160a01b0319166001600160a01b0392909216919091179055565b609d546001600160a01b03163314611dba5760405162461bcd60e51b815260040161082490615611565b6000841315611dda57609e54610df2906001600160a01b03163386612eac565b6000831315610e2b57609f54610e2b906001600160a01b03163385612eac565b6000806000600260655403611e215760405162461bcd60e51b815260040161082490615500565b600260655584611e5c5760405162461bcd60e51b815260206004820152600660248201526506275726e20360d41b6044820152606401610824565b6000611e6760355490565b609d549091506000906001600160a01b031663514ea4bf611e8661267f565b6040518263ffffffff1660e01b8152600401611ea491815260200190565b60a060405180830381865afa158015611ec1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ee5919061541e565b505050509050611ef53388614076565b6000611f0b88836001600160801b0316856141b3565b9050611f1681613488565b609754909450600090819081908190611f4590600160a01b8104600290810b91600160b81b9004900b8a6126da565b9350935093509350611f578282612a0d565b611f618282612ae6565b6040519193509150600080516020615ce683398151915290611f869084908490614e4d565b60405180910390a1609b54609954609e546040516370a0823160e01b815261203293929188916001600160a01b03909116906370a0823190611fcc903090600401614e39565b602060405180830381865afa158015611fe9573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061200d9190615475565b61201791906153b2565b61202191906153b2565b61202b91906153b2565b8d896141b3565b61203c90856154bc565b609c54609a54609f546040516370a0823160e01b8152939d506120799387916001600160a01b0316906370a0823190611fcc903090600401614e39565b61208390846154bc565b985089156120a257609e546120a2906001600160a01b03168c8c612eac565b88156120bf57609f546120bf906001600160a01b03168c8b612eac565b7f7239dff1718b550db7f36cbf69c665cfeb56d0e96b4fb76a5cba712961b655098b8d8c8c8c6040516120f69594939291906155bd565b60405180910390a15050505050505060016065819055509250925092565b6001600160a01b0383166121765760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610824565b6001600160a01b0382166121d75760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610824565b6001600160a01b0383811660008181526034602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591015b60405180910390a3505050565b609d546000908190819081908190819081906001600160a01b031663514ea4bf61226161267f565b6040518263ffffffff1660e01b815260040161227f91815260200190565b60a060405180830381865afa15801561229c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906122c0919061541e565b94509450945094509450612305896122e9609760149054906101000a900460020b60020b613073565b6097546122ff90600160b81b900460020b613073565b886134f1565b909750955060006001600160801b0383166123236001878c8a614261565b61232d91906154bc565b90506000826001600160801b03166123486000878d8b614261565b61235291906154bc565b905061235e8282612ae6565b609b54609954609e546040516370a0823160e01b8152949650929450909290916001600160a01b0316906370a082319061239c903090600401614e39565b602060405180830381865afa1580156123b9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906123dd9190615475565b6123e790856154bc565b6123f191906153b2565b6123fb91906153b2565b612405908a6154bc565b609c54609a54609f546040516370a0823160e01b8152939c50919290916001600160a01b0316906370a0823190612440903090600401614e39565b602060405180830381865afa15801561245d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906124819190615475565b61248b90846154bc565b61249591906153b2565b61249f91906153b2565b6124a990896154bc565b9750505050505050509250929050565b6001600160a01b03831661251d5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610824565b6001600160a01b03821661257f5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610824565b6001600160a01b038316600090815260336020526040902054818110156125f75760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b6064820152608401610824565b61260182826153b2565b6001600160a01b0380861660009081526033602052604080822093909355908516815290812080548492906126379084906154bc565b92505081905550826001600160a01b0316846001600160a01b0316600080516020615cc68339815191528460405161267191815260200190565b60405180910390a350505050565b6097546040516001600160601b03193060601b166020820152600160a01b820460e890811b6034830152600160b81b90920490911b6037820152600090603a0160405160208183030381529060405280519060200120905090565b609e546040516370a0823160e01b815260009182918291829182916001600160a01b0316906370a0823190612713903090600401614e39565b602060405180830381865afa158015612730573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906127549190615475565b609f546040516370a0823160e01b81529192506000916001600160a01b03909116906370a082319061278a903090600401614e39565b602060405180830381865afa1580156127a7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906127cb9190615475565b609d5460405163a34123a760e01b815260028c810b60048301528b900b60248201526001600160801b038a1660448201529192506001600160a01b03169063a34123a79060640160408051808303816000875af1158015612830573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906128549190615599565b609d546040516309e3d67b60e31b815230600482015260028d810b60248301528c900b60448201526001600160801b036064820181905260848201529298509096506001600160a01b031690634f1eb3d89060a40160408051808303816000875af11580156128c7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906128eb91906156e5565b5050609e546040516370a0823160e01b8152879184916001600160a01b03909116906370a0823190612921903090600401614e39565b602060405180830381865afa15801561293e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906129629190615475565b61296c91906153b2565b61297691906153b2565b609f546040516370a0823160e01b8152919550869183916001600160a01b0316906370a08231906129ab903090600401614e39565b602060405180830381865afa1580156129c8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906129ec9190615475565b6129f691906153b2565b612a0091906153b2565b9250505093509350935093565b612710612a1b600084615718565b612a259190615745565b609b6000828254612a3691906154bc565b909155506127109050612a4a600083615718565b612a549190615745565b609c6000828254612a6591906154bc565b909155505060985461271090612a8690600160201b900461ffff1684615718565b612a909190615745565b60996000828254612aa191906154bc565b909155505060985461271090612ac290600160201b900461ffff1683615718565b612acc9190615745565b609a6000828254612add91906154bc565b90915550505050565b6000806000612710609860049054906101000a900461ffff166000612b0b9190615759565b612b199061ffff1687615718565b612b239190615745565b60985490915060009061271090612b4590600160201b900461ffff1683615759565b612b539061ffff1687615718565b612b5d9190615745565b9050612b6982876153b2565b9350612b7581866153b2565b925050509250929050565b609d5460408051633850c7bd60e01b815290516000926001600160a01b031691633850c7bd9160048083019260e09291908290030181865afa158015612bca573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612bee919061530a565b50505050505090506000612c1b82612c088b60020b613073565b612c148b60020b613073565b8a8a6135c4565b90506001600160801b03811615612cc957609d54604051633c8a7d8d60e01b815260009182916001600160a01b0390911690633c8a7d8d90612c679030908f908f908990600401615557565b60408051808303816000875af1158015612c85573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612ca99190615599565b9092509050612cb8828a6153b2565b9850612cc481896153b2565b975050505b6000612cf86127108686612cdd5789612cdf565b8a5b612ce99190615718565b612cf39190615745565b61460d565b90506000811315612d1557612d128a8a8a8a858b8a614673565b50505b50505050505050505050565b33612d2a610c71565b6001600160a01b031614612d505760405162461bcd60e51b8152600401610824906153c5565b6097546040516000916001600160a01b031690600080516020615ca6833981519152908390a3609780546001600160a01b0319169055565b609e5460009081906001600160a01b0390811690841603612dfd57609754849061271090612dc190600160e01b900461ffff1689615718565b612dcb9190615745565b1015612de95760405162461bcd60e51b815260040161082490615774565b612df384876153b2565b9150849050612ea3565b609f546001600160a01b0390811690841603612e6d57609754849061271090612e3190600160e01b900461ffff1688615718565b612e3b9190615745565b1015612e595760405162461bcd60e51b815260040161082490615774565b612e6384866153b2565b9050859150612ea3565b60405162461bcd60e51b815260206004820152600b60248201526a3bb937b733903a37b5b2b760a91b6044820152606401610824565b94509492505050565b6040516001600160a01b038316602482015260448101829052612f0f90849063a9059cbb60e01b906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b03199093169290921790915261488f565b505050565b80471015612f645760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e63650000006044820152606401610824565b6000826001600160a01b03168260405160006040518083038185875af1925050503d8060008114612fb1576040519150601f19603f3d011682016040523d82523d6000602084013e612fb6565b606091505b5050905080612f0f5760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c20726044820152791958da5c1a595b9d081b585e481a185d99481c995d995c9d195960321b6064820152608401610824565b60006130378484846141b3565b9050600082806130495761304961572f565b848609111561084757600019811061306057600080fd5b8061306a81615796565b95945050505050565b60008060008360020b1261308a578260020b613097565b8260020b613097906157af565b90506130a6620d89e7196157cb565b60020b8111156130dc5760405162461bcd60e51b81526020600482015260016024820152601560fa1b6044820152606401610824565b6000816001166000036130f357600160801b613105565b6ffffcb933bd6fad37aa2d162d1a5940015b6001600160881b03169050600282161561313a576080613135826ffff97272373d413259a46990580e213a615718565b901c90505b600482161561316457608061315f826ffff2e50f5f656932ef12357cf3c7fdcc615718565b901c90505b600882161561318e576080613189826fffe5caca7e10e4e61c3624eaa0941cd0615718565b901c90505b60108216156131b85760806131b3826fffcb9843d60f6159c9db58835c926644615718565b901c90505b60208216156131e25760806131dd826fff973b41fa98c081472e6896dfb254c0615718565b901c90505b604082161561320c576080613207826fff2ea16466c96a3843ec78b326b52861615718565b901c90505b6080821615613236576080613231826ffe5dee046a99a2a811c461f1969c3053615718565b901c90505b61010082161561326157608061325c826ffcbe86c7900a88aedcffc83b479aa3a4615718565b901c90505b61020082161561328c576080613287826ff987a7253ac413176f2b074cf7815e54615718565b901c90505b6104008216156132b75760806132b2826ff3392b0822b70005940c7a398e4b70f3615718565b901c90505b6108008216156132e25760806132dd826fe7159475a2c29b7443b29c7fa6e889d9615718565b901c90505b61100082161561330d576080613308826fd097f3bdfd2022b8845ad8f792aa5825615718565b901c90505b612000821615613338576080613333826fa9f746462d870fdf8a65dc1f90e061e5615718565b901c90505b61400082161561336357608061335e826f70d869a156d2a1b890bb3df62baf32f7615718565b901c90505b61800082161561338e576080613389826f31be135f97d08fd981231505542fcfa6615718565b901c90505b620100008216156133ba5760806133b5826f09aa508b5b7a84e1c677de54f3e99bc9615718565b901c90505b620200008216156133e55760806133e0826e5d6af8dedb81196699c329225ee604615718565b901c90505b6204000082161561340f57608061340a826d2216e584f5fa1ea926041bedfe98615718565b901c90505b62080000821615613437576080613432826b048a170391f7dc42444e8fa2615718565b901c90505b60008460020b13156134525761344f81600019615745565b90505b613460600160201b826157ed565b1561346c57600161346f565b60005b6134809060ff16602083901c6154bc565b949350505050565b6000600160801b82106134ed5760405162461bcd60e51b815260206004820152602760248201527f53616665436173743a2076616c756520646f65736e27742066697420696e20316044820152663238206269747360c81b6064820152608401610824565b5090565b600080836001600160a01b0316856001600160a01b03161115613512579293925b846001600160a01b0316866001600160a01b03161161353d57613536858585614961565b9150612ea3565b836001600160a01b0316866001600160a01b0316101561357657613562868585614961565b915061356f8587856149cb565b9050612ea3565b6135818585856149cb565b905094509492505050565b6040516001600160a01b0380851660248301528316604482015260648101829052610e2b9085906323b872dd60e01b90608401612ed8565b6000836001600160a01b0316856001600160a01b031611156135e4579293925b846001600160a01b0316866001600160a01b03161161360f57613608858585614a15565b905061306a565b836001600160a01b0316866001600160a01b03161015613671576000613636878686614a15565b90506000613645878986614a7f565b9050806001600160801b0316826001600160801b0316106136665780613668565b815b9250505061306a565b61367c858584614a7f565b9695505050505050565b6001600160a01b0382166136dc5760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401610824565b80603560008282546136ee91906154bc565b90915550506001600160a01b0382166000908152603360205260408120805483929061371b9084906154bc565b90915550506040518181526001600160a01b03831690600090600080516020615cc68339815191529060200160405180910390a35050565b60008060008060006137636106fc565b915091508160001480156137775750600081115b1561378e576137878689836141b3565b925061383d565b8015801561379c5750600082115b156137ac576137878789846141b3565b811580156137b8575080155b156137df5760405162461bcd60e51b81526020600482015260006024820152604401610824565b60006137ec888a856141b3565b905060006137fb888b856141b3565b905060008211801561380d5750600081115b6138295760405162461bcd60e51b815260040161082490615537565b8082106138365780613838565b815b945050505b61384883838a61302a565b945061385583828a61302a565b9350505093509350939050565b6040805160028082526060820183526000926020830190803683375050609854825192935063ffffffff16918391506000906138a0576138a0615801565b602002602001019063ffffffff16908163ffffffff16815250506000816001815181106138cf576138cf615801565b63ffffffff90921660209283029190910190910152609d5460405163883bdbfd60e01b81526000916001600160a01b03169063883bdbfd90613915908590600401615817565b600060405180830381865afa158015613932573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261395a919081019061590a565b509050805160021461399a5760405162461bcd60e51b815260206004820152600960248201526830b93930bc903632b760b91b6044820152606401610824565b6098548151600091829163ffffffff90911660060b90849083906139c0576139c0615801565b6020026020010151846001815181106139db576139db615801565b60200260200101510360060b816139f4576139f461572f565b059050613a038160020b613073565b6097549092506000915061271090613a2690600160f01b900461ffff16846159cc565b613a3091906159fe565b90508415613a7857613a428183615a24565b6001600160a01b0316866001600160a01b03161015613a735760405162461bcd60e51b815260040161082490615a44565b613ab3565b613a828183615a6b565b6001600160a01b0316866001600160a01b03161115613ab35760405162461bcd60e51b815260040161082490615a44565b505050505050565b609b54609954609e546040516370a0823160e01b815260009392916001600160a01b0316906370a0823190613af4903090600401614e39565b602060405180830381865afa158015613b11573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613b359190615475565b613b3f91906153b2565b613b4991906153b2565b609c54609a54609f546040516370a0823160e01b81529394506000936001600160a01b03909116906370a0823190613b85903090600401614e39565b602060405180830381865afa158015613ba2573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613bc69190615475565b613bd091906153b2565b613bda91906153b2565b6097549091506000908190613c0590600160a01b8104600290810b91600160b81b9004900b8c6126da565b935093505050613c158282612a0d565b613c1f8282612ae6565b6040519193509150600080516020615ce683398151915290613c449084908490614e4d565b60405180910390a1613c5684836154bc565b9150613c6283826154bc565b609e549091506001600160a01b0390811690861603613def57609754869061271090613c9990600160d01b900461ffff1685615718565b613ca39190615745565b1015613cc15760405162461bcd60e51b815260040161082490615774565b609b54609954609e546040516370a0823160e01b8152899392916001600160a01b0316906370a0823190613cf9903090600401614e39565b602060405180830381865afa158015613d16573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613d3a9190615475565b613d4491906153b2565b613d4e91906153b2565b613d5891906153b2565b609c54609a54609f546040516370a0823160e01b8152939750919290916001600160a01b0316906370a0823190613d93903090600401614e39565b602060405180830381865afa158015613db0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613dd49190615475565b613dde91906153b2565b613de891906153b2565b9250613f5c565b609f546001600160a01b0390811690861603612e6d57609754869061271090613e2390600160d01b900461ffff1684615718565b613e2d9190615745565b1015613e4b5760405162461bcd60e51b815260040161082490615774565b609b54609954609e546040516370a0823160e01b81526001600160a01b03909116906370a0823190613e81903090600401614e39565b602060405180830381865afa158015613e9e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613ec29190615475565b613ecc91906153b2565b613ed691906153b2565b609c54609a54609f546040516370a0823160e01b815293975089936001600160a01b03909116906370a0823190613f11903090600401614e39565b602060405180830381865afa158015613f2e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613f529190615475565b613dd491906153b2565b609754612d1590600160a01b8104600290810b91600160b81b9004900b86868d8d8d612b80565b600054610100900460ff1680613f9c575060005460ff16155b613fb85760405162461bcd60e51b81526004016108249061563a565b600054610100900460ff16158015613fda576000805461ffff19166101011790555b613fe2614ab5565b613fec8383614b1f565b8015612f0f576000805461ff0019169055505050565b600054610100900460ff168061401b575060005460ff16155b6140375760405162461bcd60e51b81526004016108249061563a565b600054610100900460ff16158015614059576000805461ffff19166101011790555b614061614ba6565b8015614073576000805461ff00191690555b50565b6001600160a01b0382166140d65760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b6064820152608401610824565b6001600160a01b0382166000908152603360205260409020548181101561414a5760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e604482015261636560f01b6064820152608401610824565b61415482826153b2565b6001600160a01b038416600090815260336020526040812091909155603580548492906141829084906153b2565b90915550506040518281526000906001600160a01b03851690600080516020615cc68339815191529060200161222c565b60008080600019858709858702925082811083820303915050806000036141ec57600084116141e157600080fd5b508290049050610847565b8084116141f857600080fd5b60008486880960026001871981018816978890046003810283188082028403028082028403028082028403028082028403028082028403029081029092039091026000889003889004909101858311909403939093029303949094049190911702949350505050565b600080600080871561440157609d60009054906101000a90046001600160a01b03166001600160a01b031663f30583996040518163ffffffff1660e01b8152600401602060405180830381865afa1580156142c0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906142e49190615475565b609d5460975460405163f30dba9360e01b81529293506001600160a01b039091169163f30dba939161432491600160a01b90910460020b90600401614f3e565b61010060405180830381865afa158015614342573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906143669190615a8b565b5050609d5460975460405163f30dba9360e01b8152959a506001600160a01b03909116965063f30dba9395506143af94600160b81b90910460020b93506004019150614f3e9050565b61010060405180830381865afa1580156143cd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906143f19190615a8b565b5093975061458f95505050505050565b609d60009054906101000a90046001600160a01b03166001600160a01b031663461413196040518163ffffffff1660e01b8152600401602060405180830381865afa158015614454573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906144789190615475565b609d5460975460405163f30dba9360e01b81529293506001600160a01b039091169163f30dba93916144b891600160a01b90910460020b90600401614f3e565b61010060405180830381865afa1580156144d6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906144fa9190615a8b565b5050609d5460975460405163f30dba9360e01b8152949a506001600160a01b03909116965063f30dba9395506145429450600160b81b900460020b926004019150614f3e9050565b61010060405180830381865afa158015614560573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906145849190615a8b565b509297505050505050505b609754600090600160a01b9004600290810b9088900b126145b15750826145b6565b508281035b609754600090600160b81b9004600290810b9089900b12156145d95750826145de565b508282035b8183038190036145fe6001600160801b0389168b8303600160801b6141b3565b9b9a5050505050505050505050565b6000600160ff1b82106134ed5760405162461bcd60e51b815260206004820152602860248201527f53616665436173743a2076616c756520646f65736e27742066697420696e2061604482015267371034b73a191a9b60c11b6064820152608401610824565b609d54604051630251596160e31b81523060048201528215156024820152604481018590526001600160a01b03848116606483015260a06084830152600060a4830181905292839283928392169063128acb089060c40160408051808303816000875af11580156146e8573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061470c9190615599565b915091508161471a8a61460d565b6147249190615b27565b9350806147308961460d565b61473a9190615b27565b92506000609d60009054906101000a90046001600160a01b03166001600160a01b0316633850c7bd6040518163ffffffff1660e01b815260040160e060405180830381865afa158015614791573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906147b5919061530a565b505050505050905060006147e2826147cf8f60020b613073565b6147db8f60020b613073565b89896135c4565b90506001600160801b0381161561487f57609d60009054906101000a90046001600160a01b03166001600160a01b0316633c8a7d8d308f8f856040518563ffffffff1660e01b815260040161483a9493929190615557565b60408051808303816000875af1158015614858573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061487c9190615599565b50505b5050505097509795505050505050565b60006148e4826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316614c169092919063ffffffff16565b805190915015612f0f57808060200190518101906149029190615b47565b612f0f5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610824565b6000826001600160a01b0316846001600160a01b03161115614981579192915b6001600160a01b0384166149c1600160601b600160e01b03606085901b166149a98787615a24565b6001600160a01b0316866001600160a01b03166141b3565b6134809190615745565b6000826001600160a01b0316846001600160a01b031611156149eb579192915b6134806001600160801b038316614a028686615a24565b6001600160a01b0316600160601b6141b3565b6000826001600160a01b0316846001600160a01b03161115614a35579192915b6000614a58856001600160a01b0316856001600160a01b0316600160601b6141b3565b905061306a614a7a8483614a6c8989615a24565b6001600160a01b03166141b3565b614c25565b6000826001600160a01b0316846001600160a01b03161115614a9f579192915b613480614a7a83600160601b614a6c8888615a24565b600054610100900460ff1680614ace575060005460ff16155b614aea5760405162461bcd60e51b81526004016108249061563a565b600054610100900460ff16158015614061576000805461ffff19166101011790558015614073576000805461ff001916905550565b600054610100900460ff1680614b38575060005460ff16155b614b545760405162461bcd60e51b81526004016108249061563a565b600054610100900460ff16158015614b76576000805461ffff19166101011790555b6036614b828482615baa565b506037614b8f8382615baa565b508015612f0f576000805461ff0019169055505050565b600054610100900460ff1680614bbf575060005460ff16155b614bdb5760405162461bcd60e51b81526004016108249061563a565b600054610100900460ff16158015614bfd576000805461ffff19166101011790555b60016065558015614073576000805461ff001916905550565b60606134808484600085614c40565b806001600160801b0381168114614c3b57600080fd5b919050565b606082471015614ca15760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401610824565b843b614cef5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610824565b600080866001600160a01b03168587604051614d0b9190615c69565b60006040518083038185875af1925050503d8060008114614d48576040519150601f19603f3d011682016040523d82523d6000602084013e614d4d565b606091505b5091509150614d5d828286614d68565b979650505050505050565b60608315614d77575081610847565b825115614d875782518084602001fd5b8160405162461bcd60e51b81526004016108249190614dc5565b60005b83811015614dbc578181015183820152602001614da4565b50506000910152565b6020815260008251806020840152614de4816040850160208701614da1565b601f01601f19169190910160400192915050565b6001600160a01b038116811461407357600080fd5b60008060408385031215614e2057600080fd5b8235614e2b81614df8565b946020939093013593505050565b6001600160a01b0391909116815260200190565b918252602082015260400190565b600080600060608486031215614e7057600080fd5b8335614e7b81614df8565b92506020840135614e8b81614df8565b929592945050506040919091013590565b8060020b811461407357600080fd5b801515811461407357600080fd5b600080600080600060a08688031215614ed157600080fd5b8535614edc81614e9c565b94506020860135614eec81614e9c565b93506040860135614efc81614df8565b9250606086013591506080860135614f1381614eab565b809150509295509295909350565b600060208284031215614f3357600080fd5b813561084781614df8565b60029190910b815260200190565b60008060408385031215614f5f57600080fd5b823591506020830135614f7181614df8565b809150509250929050565b60008060408385031215614f8f57600080fd5b50508035926020909101359150565b61ffff8116811461407357600080fd5b63ffffffff8116811461407357600080fd5b600080600080600060a08688031215614fd857600080fd5b8535614fe381614f9e565b94506020860135614ff381614f9e565b9350604086013561500381614f9e565b9250606086013561501381614fae565b91506080860135614f1381614df8565b600080600080600060a0868803121561503b57600080fd5b853561504681614df8565b945060208601359350604086013561505d81614eab565b9250606086013591506080860135614f1381614df8565b60008083601f84011261508657600080fd5b5081356001600160401b0381111561509d57600080fd5b6020830191508360208285010111156150b557600080fd5b9250929050565b600080600080606085870312156150d257600080fd5b843593506020850135925060408501356001600160401b038111156150f657600080fd5b61510287828801615074565b95989497509550505050565b6000806040838503121561512157600080fd5b823561512c81614df8565b91506020830135614f7181614df8565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b038111828210171561517a5761517a61513c565b604052919050565b600082601f83011261519357600080fd5b81356001600160401b038111156151ac576151ac61513c565b6151bf601f8201601f1916602001615152565b8181528460208386010111156151d457600080fd5b816020850160208301376000918101602001919091529392505050565b600080600080600080600060e0888a03121561520c57600080fd5b87356001600160401b038082111561522357600080fd5b61522f8b838c01615182565b985060208a013591508082111561524557600080fd5b506152528a828b01615182565b965050604088013561526381614df8565b9450606088013561527381614f9e565b9350608088013561528381614e9c565b925060a088013561529381614e9c565b915060c08801356152a381614df8565b8091505092959891949750929550565b6000602082840312156152c557600080fd5b813561084781614f9e565b600181811c908216806152e457607f821691505b60208210810361530457634e487b7160e01b600052602260045260246000fd5b50919050565b600080600080600080600060e0888a03121561532557600080fd5b875161533081614df8565b602089015190975061534181614e9c565b604089015190965061535281614f9e565b606089015190955061536381614f9e565b608089015190945061537481614f9e565b60a089015190935060ff8116811461538b57600080fd5b60c08901519092506152a381614eab565b634e487b7160e01b600052601160045260246000fd5b818103818111156106f6576106f661539c565b60208082526022908201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206d616e616760408201526132b960f11b606082015260800190565b80516001600160801b0381168114614c3b57600080fd5b600080600080600060a0868803121561543657600080fd5b61543f86615407565b9450602086015193506040860151925061545b60608701615407565b915061546960808701615407565b90509295509295909350565b60006020828403121561548757600080fd5b5051919050565b600294850b81529290930b60208301526001600160801b039081166040830152909116606082015260800190565b808201808211156106f6576106f661539c565b60208082526017908201527647656c61746f666965643a204f6e6c792067656c61746f60481b604082015260600190565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b60208082526006908201526506d696e7420360d41b604082015260600190565b6001600160a01b03949094168452600292830b6020850152910b60408301526001600160801b0316606082015260a06080820181905260009082015260c00190565b600080604083850312156155ac57600080fd5b505080516020909101519092909150565b6001600160a01b039590951685526020850193909352604084019190915260608301526001600160801b0316608082015260a00190565b60208082526003908201526242505360e81b604082015260600190565b6020808252600f908201526e31b0b6363130b1b59031b0b63632b960891b604082015260600190565b6020808252602e908201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160408201526d191e481a5b9a5d1a585b1a5e995960921b606082015260800190565b61ffff8281168282160390808211156156a3576156a361539c565b5092915050565b6020808252600490820152636d42505360e01b604082015260600190565b6000602082840312156156da57600080fd5b815161084781614df8565b600080604083850312156156f857600080fd5b61570183615407565b915061570f60208401615407565b90509250929050565b80820281158282048414176106f6576106f661539c565b634e487b7160e01b600052601260045260246000fd5b6000826157545761575461572f565b500490565b61ffff8181168382160190808211156156a3576156a361539c565b602080825260089082015267686967682066656560c01b604082015260600190565b6000600182016157a8576157a861539c565b5060010190565b6000600160ff1b82016157c4576157c461539c565b5060000390565b60008160020b627fffff1981036157e4576157e461539c565b60000392915050565b6000826157fc576157fc61572f565b500690565b634e487b7160e01b600052603260045260246000fd5b6020808252825182820181905260009190848201906040850190845b8181101561585557835163ffffffff1683529284019291840191600101615833565b50909695505050505050565b60006001600160401b0382111561587a5761587a61513c565b5060051b60200190565b8051600681900b8114614c3b57600080fd5b600082601f8301126158a757600080fd5b815160206158bc6158b783615861565b615152565b82815260059290921b840181019181810190868411156158db57600080fd5b8286015b848110156158ff5780516158f281614df8565b83529183019183016158df565b509695505050505050565b6000806040838503121561591d57600080fd5b82516001600160401b038082111561593457600080fd5b818501915085601f83011261594857600080fd5b815160206159586158b783615861565b82815260059290921b8401810191818101908984111561597757600080fd5b948201945b8386101561599c5761598d86615884565b8252948201949082019061597c565b918801519196509093505050808211156159b557600080fd5b506159c285828601615896565b9150509250929050565b6001600160a01b038281168282168181028316929181158285048214176159f5576159f561539c565b50505092915050565b60006001600160a01b0383811680615a1857615a1861572f565b92169190910492915050565b6001600160a01b038281168282160390808211156156a3576156a361539c565b6020808252600d908201526c6869676820736c69707061676560981b604082015260600190565b6001600160a01b038181168382160190808211156156a3576156a361539c565b600080600080600080600080610100898b031215615aa857600080fd5b615ab189615407565b9750602089015180600f0b8114615ac757600080fd5b60408a015160608b015191985096509450615ae460808a01615884565b935060a0890151615af481614df8565b60c08a0151909350615b0581614fae565b60e08a0151909250615b1681614eab565b809150509295985092959890939650565b81810360008312801583831316838312821617156156a3576156a361539c565b600060208284031215615b5957600080fd5b815161084781614eab565b601f821115612f0f57600081815260208120601f850160051c81016020861015615b8b5750805b601f850160051c820191505b81811015613ab357828155600101615b97565b81516001600160401b03811115615bc357615bc361513c565b615bd781615bd184546152d0565b84615b64565b602080601f831160018114615c0c5760008415615bf45750858301515b600019600386901b1c1916600185901b178555613ab3565b600085815260208120601f198616915b82811015615c3b57888601518255948401946001909101908401615c1c565b5085821015615c595787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b60008251615c7b818460208701614da1565b919091019291505056fec749f9ae947d4734cf1569606a8a347391ae94a063478aa853aeff48ac5f99e88be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0ddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3efc28ad1de9c0c32e5394ba60323e44d8d9536312236a47231772e448a3e49de42a2646970667358221220a11bde499516b0a2e8e737821292815fcefc66549a9729f24ea128d34ed6027364736f6c63430008130033", diff --git a/lib/g-uni-v1-core/src/addresses.ts b/lib/g-uni-v1-core/src/addresses.ts index f0e89f9e9..09362d282 100644 --- a/lib/g-uni-v1-core/src/addresses.ts +++ b/lib/g-uni-v1-core/src/addresses.ts @@ -62,7 +62,7 @@ export const getAddresses = (network: string): Addresses => { GUniImplementation: "", }; case "anvil": - return { + return { Gelato: "0x0000000000000000000000000000000000000000", Swapper: "", GelatoDevMultiSig: "0x0000000000000000000000000000000000000000", @@ -74,7 +74,7 @@ export const getAddresses = (network: string): Addresses => { GUniImplementation: "", }; case "blastSepolia": - return { + return { Gelato: "0xB47C8e4bEb28af80eDe5E5bF474927b110Ef2c0e", Swapper: "", GelatoDevMultiSig: "0xB47C8e4bEb28af80eDe5E5bF474927b110Ef2c0e", @@ -86,19 +86,19 @@ export const getAddresses = (network: string): Addresses => { GUniImplementation: "0xdde18C0c3B637F4BA02f5567a671F5e28b7404e7", }; case "arbitrumSepolia": - return { + return { Gelato: "0xB47C8e4bEb28af80eDe5E5bF474927b110Ef2c0e", Swapper: "", GelatoDevMultiSig: "0xB47C8e4bEb28af80eDe5E5bF474927b110Ef2c0e", WETH: "", DAI: "", USDC: "", - UniswapV3Factory: "0x2dCC5a88A861FB73613153F82CF801cd09E72a5F", - GUniFactory: "0x39AC4439e6CB9427C073259e5742529cE46DD663", - GUniImplementation: "0xF3e2578C66071a637F06cc02b1c11DeC0784C1A6", + UniswapV3Factory: "0x248AB79Bbb9bC29bB72f7Cd42F17e054Fc40188e", + GUniFactory: "0x7f502e91182338F19CB6F4B02B33B33feD1c5000", + GUniImplementation: "0xCE7427a94bc9B8A90E2C8d91cB0247D779819437", }; case "modeSepolia": - return { + return { Gelato: "0xB47C8e4bEb28af80eDe5E5bF474927b110Ef2c0e", Swapper: "", GelatoDevMultiSig: "0xB47C8e4bEb28af80eDe5E5bF474927b110Ef2c0e", @@ -110,7 +110,7 @@ export const getAddresses = (network: string): Addresses => { GUniImplementation: "0xe1B83edA3399A2c9B8265215EA21042C9b918dc5", }; case "baseSepolia": - return { + return { Gelato: "0xB47C8e4bEb28af80eDe5E5bF474927b110Ef2c0e", Swapper: "", GelatoDevMultiSig: "0xB47C8e4bEb28af80eDe5E5bF474927b110Ef2c0e", From 6e7644cc7c78899ef27c15f4f33347ea6da234cb Mon Sep 17 00:00:00 2001 From: Jem <0x0xjem@gmail.com> Date: Tue, 25 Jun 2024 13:07:08 +0400 Subject: [PATCH 11/29] Add example .env file for g-uni --- .gitignore | 1 + lib/g-uni-v1-core/.env.example | 3 +++ 2 files changed, 4 insertions(+) create mode 100644 lib/g-uni-v1-core/.env.example diff --git a/.gitignore b/.gitignore index c79b712c5..7b16da948 100644 --- a/.gitignore +++ b/.gitignore @@ -12,6 +12,7 @@ docs/ # Dotenv file .env .env.* +!.env.example node_modules/ diff --git a/lib/g-uni-v1-core/.env.example b/lib/g-uni-v1-core/.env.example new file mode 100644 index 000000000..73e944907 --- /dev/null +++ b/lib/g-uni-v1-core/.env.example @@ -0,0 +1,3 @@ +# Wallets +ANVIL_PRIVATE_KEY= +DEPLOYER_PRIVATE_KEY= From 15e37200aae7d662300a199b2ef3a3d3ab7fe51c Mon Sep 17 00:00:00 2001 From: Jem <0x0xjem@gmail.com> Date: Tue, 25 Jun 2024 13:08:00 +0400 Subject: [PATCH 12/29] Address conflicting dependency versions by adding Initializable into the g-uni repo --- .../contracts/abstract/GUniFactoryStorage.sol | 2 +- .../contracts/lib/Initializable.sol | 50 +++++++++++++++++++ 2 files changed, 51 insertions(+), 1 deletion(-) create mode 100644 lib/g-uni-v1-core/contracts/lib/Initializable.sol diff --git a/lib/g-uni-v1-core/contracts/abstract/GUniFactoryStorage.sol b/lib/g-uni-v1-core/contracts/abstract/GUniFactoryStorage.sol index 567eb7e46..f3c9b2650 100644 --- a/lib/g-uni-v1-core/contracts/abstract/GUniFactoryStorage.sol +++ b/lib/g-uni-v1-core/contracts/abstract/GUniFactoryStorage.sol @@ -4,7 +4,7 @@ pragma solidity 0.8.19; import {OwnableUninitialized} from "./OwnableUninitialized.sol"; import { Initializable -} from "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol"; +} from "contracts/lib/Initializable.sol"; import { EnumerableSet } from "@openzeppelin/contracts/utils/structs/EnumerableSet.sol"; diff --git a/lib/g-uni-v1-core/contracts/lib/Initializable.sol b/lib/g-uni-v1-core/contracts/lib/Initializable.sol new file mode 100644 index 000000000..a6a57c3c8 --- /dev/null +++ b/lib/g-uni-v1-core/contracts/lib/Initializable.sol @@ -0,0 +1,50 @@ +// SPDX-License-Identifier: MIT + +// solhint-disable-next-line compiler-version +pragma solidity ^0.8.0; + +/** + * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed + * behind a proxy. Since a proxied contract can't have a constructor, it's common to move constructor logic to an + * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer + * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect. + * + * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as + * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}. + * + * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure + * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity. + * + * @dev Copied into repo from OpenZeppelin Contracts v4.1.0 + */ +abstract contract Initializable { + + /** + * @dev Indicates that the contract has been initialized. + */ + bool private _initialized; + + /** + * @dev Indicates that the contract is in the process of being initialized. + */ + bool private _initializing; + + /** + * @dev Modifier to protect an initializer function from being invoked twice. + */ + modifier initializer() { + require(_initializing || !_initialized, "Initializable: contract is already initialized"); + + bool isTopLevelCall = !_initializing; + if (isTopLevelCall) { + _initializing = true; + _initialized = true; + } + + _; + + if (isTopLevelCall) { + _initializing = false; + } + } +} From e5baeb39e5f4afa83eaf20ff24790f1fc73fd855 Mon Sep 17 00:00:00 2001 From: Jem <0x0xjem@gmail.com> Date: Tue, 25 Jun 2024 13:30:09 +0400 Subject: [PATCH 13/29] Update salts --- script/salts/salts.json | 4 ++-- test/Constants.sol | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/script/salts/salts.json b/script/salts/salts.json index b415c0cc2..b6aabd5fc 100644 --- a/script/salts/salts.json +++ b/script/salts/salts.json @@ -54,7 +54,7 @@ "0xb8a17b3ee693ebdcfc6913bb2f65d0fadbe8812d9ef4d927595a7dc75db68727": "0x956b71c3545015d12e8bbefbad72019b673860f32a5b4313eeb866425d97be17" }, "Test_GUniFactory": { - "0x3bf0e882023640f31bf861e1f13d306fd4fbb7afb7860e21a489062cbefcf885": "0x397acf3db4cc9c81f8c1975a5505e392e6b5f8eb3b22efcc094b3e0f39f6739b" + "0x7e47ffe07f5a38974d644bf78ff55e828227cdb7443c62eab211e53641973cc9": "0x8f8ca5383a10d7183d8e5ab6d19509307d674794ec2010e6e7acd764d815f6cf" }, "Test_MockCallback": { "0x0825d99059fe0dc95e0b5cd7b853a5f3f50b58f25c5812fc7fd01d69ff4ec679": "0x222b47fd0259b3eacfbc04b9dddf5bb5ba060245c2c3c3673672ad4d815d01df", @@ -83,7 +83,7 @@ "0xe6204aa211921628df345ff0b909c863298684cd8ca65de5479af6b70662e622": "0xf508fd71ff40f5d0640b01b9384f98d35db43c7ddb0d4abe274d61fdf1ea967f" }, "Test_UniswapV3DirectToLiquidity": { - "0x58b7674df101688da4f68d9cfad65390f1f35abe1c999bd0a251069b8883f528": "0xee9c953ecdad99f7aab8e6812d8b023c11ca7978a5324739a9e8987c44ac2e96" + "0x799ac11038ac9e9253b501db246287f36fac19f84cac3075938e3f52895cb138": "0xa7ea84dd1b36183230d2b956e8485c2690df42840d37487e8d34e9edc1304025" }, "Test_UniswapV3Factory": { "0xbcd657c3390ecd2e1782b6473400c51fa124922eb98b69f1b5192eb0f8e3d3df": "0x3448ebb18cb03fae2e9153c621d46f1b9b8941cc66e7063b587fe4a284490b01" diff --git a/test/Constants.sol b/test/Constants.sol index 04b9f4fe8..e8e9be86f 100644 --- a/test/Constants.sol +++ b/test/Constants.sol @@ -10,7 +10,7 @@ abstract contract TestConstants { address(0xAA9E6CDA232112EBc0FC2Ca14B3178567a410224); address internal constant _UNISWAP_V3_FACTORY = address(0xAA6E2347940f38546B6a1b804070899Ccb75c558); - address internal constant _GUNI_FACTORY = address(0xAA426C06A7D084E79bFa5B8cd0A15aeebA7693f1); + address internal constant _GUNI_FACTORY = address(0xAA1788e4c22129e5316273749F99E32049a8BBdA); address internal constant _BASELINE_KERNEL = address(0xBB); address internal constant _BASELINE_QUOTE_TOKEN = address(0xAA58516d932C482469914260268EEA7611BF0eb4); From f5ee3dd7bf05758e97384ebdba8e70e23d6baf7c Mon Sep 17 00:00:00 2001 From: Jem <0x0xjem@gmail.com> Date: Tue, 25 Jun 2024 13:41:56 +0400 Subject: [PATCH 14/29] Add note on salts/address mismatch --- README.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/README.md b/README.md index 787594ae7..71649e9f1 100644 --- a/README.md +++ b/README.md @@ -65,6 +65,17 @@ Then, the test suite can be run with: pnpm run test ``` +#### Address Mismatch + +Many of the contracts (e.g. callbacks) require a specific address prefix or have a deterministic address. If tests are failing for this reason, the cause is usually one of: + +- The code of a callback contract has been changed + - This requires re-generating the salt for the contract. See the [test_salts.sh](/script/salts/test/test_salts.sh) script. +- There has been a change to the dependencies under `/lib`. The dependencies affect the build output, so any changes will affect the bytecode generated by the Solidity compiler. + - If the submodule change was inadvertent, this can be fixed by running `pnpm run full-install` to reset the changes. + - In some cases, such as the `g-uni-v1-core` dependency, installing npm packages will result in the remappings being changed. It is best to remove the dependency's respective dependencies in order to fix this. + - If the change to dependencies and invalidation of salts is expected, then new salts must be generated. In some cases (such as Uniswap V2 and V3 factories), the new addresses must be recorded in the `Constants.sol` file. + ### Format Combines `forge fmt` and `solhint` From daa6f8263b3d0a90a6c873392f6d127f81c81609 Mon Sep 17 00:00:00 2001 From: Jem <0x0xjem@gmail.com> Date: Tue, 25 Jun 2024 14:16:45 +0400 Subject: [PATCH 15/29] Revert "Updated deployment on arbitrum sepolia" This reverts commit e3519f24b346606d0c395685db800aaf3482db38. --- .../arbitrumSepolia/GUniFactory.json | 57 +++++++++---------- .../GUniFactory_Implementation.json | 23 ++++---- .../arbitrumSepolia/GUniFactory_Proxy.json | 53 +++++++++-------- .../deployments/arbitrumSepolia/GUniPool.json | 19 +++---- lib/g-uni-v1-core/src/addresses.ts | 16 +++--- 5 files changed, 82 insertions(+), 86 deletions(-) diff --git a/lib/g-uni-v1-core/deployments/arbitrumSepolia/GUniFactory.json b/lib/g-uni-v1-core/deployments/arbitrumSepolia/GUniFactory.json index 2ee9e4266..3602a4afe 100644 --- a/lib/g-uni-v1-core/deployments/arbitrumSepolia/GUniFactory.json +++ b/lib/g-uni-v1-core/deployments/arbitrumSepolia/GUniFactory.json @@ -1,5 +1,5 @@ { - "address": "0x7f502e91182338F19CB6F4B02B33B33feD1c5000", + "address": "0x39AC4439e6CB9427C073259e5742529cE46DD663", "abi": [ { "anonymous": false, @@ -640,57 +640,56 @@ "type": "constructor" } ], - "transactionHash": "0x9b83e7b0549ce4adfcc2ffbdfb847572df815ca36cb5951ffecf2136042ff281", + "transactionHash": "0xa994440a2ad7747eb9c88bea6b326358d7d24f1d345f0ed3b425561b05cf824f", "receipt": { "to": null, - "from": "0x5fCfdc65044bf008A6b473512D34102282Ee43a6", - "contractAddress": "0x7f502e91182338F19CB6F4B02B33B33feD1c5000", - "transactionIndex": 3, - "gasUsed": "6114773", - "logsBloom": "0x00101000000020000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000400000000000000000000000000000000000000000000000008008000000000000000000000000000200000000000000020000000001000000000800000000002000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000100000200000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000020000000000000000000000400000000000000000000000000000000000000000000", - "blockHash": "0xf177e051cdb89f5b045dfa101135f95bd01e47ac4dc9fb9096403347f9c6c7e0", - "transactionHash": "0x9b83e7b0549ce4adfcc2ffbdfb847572df815ca36cb5951ffecf2136042ff281", + "from": "0xB47C8e4bEb28af80eDe5E5bF474927b110Ef2c0e", + "contractAddress": "0x39AC4439e6CB9427C073259e5742529cE46DD663", + "transactionIndex": 4, + "gasUsed": "1375415", + "logsBloom": "0x00100000000020000000000000000000000000000000000000000000000000000000000000020000000400000000000000000000000000000000000000000000000000000000000000000000000008000000000000000000000400000200000000000000020010000000000000000800000000002000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000200000000000000080000000000000000000000000000000000000000000000000010000000000000000000000000000020000000000000000000080400000000000000000000000000000000000000000000", + "blockHash": "0xf5b7b2abe69c5722bd1b5142d00597648f1d6aeb9e41fe577400c4451de3259b", + "transactionHash": "0xa994440a2ad7747eb9c88bea6b326358d7d24f1d345f0ed3b425561b05cf824f", "logs": [ { - "transactionIndex": 3, - "blockNumber": 57912178, - "transactionHash": "0x9b83e7b0549ce4adfcc2ffbdfb847572df815ca36cb5951ffecf2136042ff281", - "address": "0x7f502e91182338F19CB6F4B02B33B33feD1c5000", + "transactionIndex": 4, + "blockNumber": 53304410, + "transactionHash": "0xa994440a2ad7747eb9c88bea6b326358d7d24f1d345f0ed3b425561b05cf824f", + "address": "0x39AC4439e6CB9427C073259e5742529cE46DD663", "topics": [ "0x5570d70a002632a7b0b3c9304cc89efb62d8da9eca0dbd7752c83b7379068296", "0x0000000000000000000000000000000000000000000000000000000000000000", - "0x0000000000000000000000009ff468bd1de89f0229193f1f8f0ba0e265ba026a" + "0x00000000000000000000000090608f57161ac771b28fb0adcd2434cfa1463201" ], "data": "0x", - "logIndex": 6, - "blockHash": "0xf177e051cdb89f5b045dfa101135f95bd01e47ac4dc9fb9096403347f9c6c7e0" + "logIndex": 4, + "blockHash": "0xf5b7b2abe69c5722bd1b5142d00597648f1d6aeb9e41fe577400c4451de3259b" }, { - "transactionIndex": 3, - "blockNumber": 57912178, - "transactionHash": "0x9b83e7b0549ce4adfcc2ffbdfb847572df815ca36cb5951ffecf2136042ff281", - "address": "0x7f502e91182338F19CB6F4B02B33B33feD1c5000", + "transactionIndex": 4, + "blockNumber": 53304410, + "transactionHash": "0xa994440a2ad7747eb9c88bea6b326358d7d24f1d345f0ed3b425561b05cf824f", + "address": "0x39AC4439e6CB9427C073259e5742529cE46DD663", "topics": [ "0xdf435d422321da6b195902d70fc417c06a32f88379c20dd8f2a8da07088cec29", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x000000000000000000000000b47c8e4beb28af80ede5e5bf474927b110ef2c0e" ], "data": "0x", - "logIndex": 7, - "blockHash": "0xf177e051cdb89f5b045dfa101135f95bd01e47ac4dc9fb9096403347f9c6c7e0" + "logIndex": 5, + "blockHash": "0xf5b7b2abe69c5722bd1b5142d00597648f1d6aeb9e41fe577400c4451de3259b" } ], - "blockNumber": 57912178, - "cumulativeGasUsed": "9556108", + "blockNumber": 53304410, + "cumulativeGasUsed": "2551868", "status": 1, "byzantium": true }, "args": [ - "0x9ff468bd1De89F0229193F1F8f0bA0e265bA026a", + "0x90608F57161aC771b28fb0adCd2434cfa1463201", "0xB47C8e4bEb28af80eDe5E5bF474927b110Ef2c0e", - "0xc0c53b8b000000000000000000000000ce7427a94bc9b8a90e2c8d91cb0247d779819437000000000000000000000000b47c8e4beb28af80ede5e5bf474927b110ef2c0e000000000000000000000000b47c8e4beb28af80ede5e5bf474927b110ef2c0e" + "0xc0c53b8b00000000000000000000000090608f57161ac771b28fb0adcd2434cfa1463201000000000000000000000000b47c8e4beb28af80ede5e5bf474927b110ef2c0e000000000000000000000000b47c8e4beb28af80ede5e5bf474927b110ef2c0e" ], - "numDeployments": 1, "solcInputHash": "f1f932b5297d788fce5c0abb03e1e395", "metadata": "{\"compiler\":{\"version\":\"0.8.19+commit.7dd6d404\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"implementationAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"adminAddress\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"stateMutability\":\"payable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousAdmin\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newAdmin\",\"type\":\"address\"}],\"name\":\"ProxyAdminTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousImplementation\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"ProxyImplementationUpdated\",\"type\":\"event\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"inputs\":[],\"name\":\"proxyAdmin\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"id\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newAdmin\",\"type\":\"address\"}],\"name\":\"transferProxyAdmin\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"upgradeTo\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"upgradeToAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"notice\":\"Proxy implementing EIP173 for ownership management\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/vendor/proxy/EIP173Proxy.sol\":\"EIP173Proxy\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":1},\"remappings\":[]},\"sources\":{\"contracts/vendor/proxy/EIP173Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity 0.8.19;\\n\\nimport \\\"./Proxy.sol\\\";\\n\\ninterface ERC165 {\\n function supportsInterface(bytes4 id) external view returns (bool);\\n}\\n\\n///@notice Proxy implementing EIP173 for ownership management\\ncontract EIP173Proxy is Proxy {\\n // ////////////////////////// EVENTS ///////////////////////////////////////////////////////////////////////\\n\\n event ProxyAdminTransferred(\\n address indexed previousAdmin,\\n address indexed newAdmin\\n );\\n\\n // /////////////////////// CONSTRUCTOR //////////////////////////////////////////////////////////////////////\\n\\n constructor(\\n address implementationAddress,\\n address adminAddress,\\n bytes memory data\\n ) payable {\\n _setImplementation(implementationAddress, data);\\n _setProxyAdmin(adminAddress);\\n }\\n\\n // ///////////////////// EXTERNAL ///////////////////////////////////////////////////////////////////////////\\n\\n function proxyAdmin() external view returns (address) {\\n return _proxyAdmin();\\n }\\n\\n function supportsInterface(bytes4 id) external view returns (bool) {\\n if (id == 0x01ffc9a7 || id == 0x7f5828d0) {\\n return true;\\n }\\n if (id == 0xFFFFFFFF) {\\n return false;\\n }\\n\\n ERC165 implementation;\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n implementation := sload(\\n 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc\\n )\\n }\\n\\n // Technically this is not standard compliant as ERC-165 require 30,000 gas which that call cannot ensure\\n // because it is itself inside `supportsInterface` that might only get 30,000 gas.\\n // In practise this is unlikely to be an issue.\\n try implementation.supportsInterface(id) returns (bool support) {\\n return support;\\n } catch {\\n return false;\\n }\\n }\\n\\n function transferProxyAdmin(address newAdmin) external onlyProxyAdmin {\\n _setProxyAdmin(newAdmin);\\n }\\n\\n function upgradeTo(address newImplementation) external onlyProxyAdmin {\\n _setImplementation(newImplementation, \\\"\\\");\\n }\\n\\n function upgradeToAndCall(address newImplementation, bytes calldata data)\\n external\\n payable\\n onlyProxyAdmin\\n {\\n _setImplementation(newImplementation, data);\\n }\\n\\n // /////////////////////// MODIFIERS ////////////////////////////////////////////////////////////////////////\\n\\n modifier onlyProxyAdmin() {\\n require(msg.sender == _proxyAdmin(), \\\"NOT_AUTHORIZED\\\");\\n _;\\n }\\n\\n // ///////////////////////// INTERNAL //////////////////////////////////////////////////////////////////////\\n\\n function _proxyAdmin() internal view returns (address adminAddress) {\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n adminAddress := sload(\\n 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103\\n )\\n }\\n }\\n\\n function _setProxyAdmin(address newAdmin) internal {\\n address previousAdmin = _proxyAdmin();\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n sstore(\\n 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103,\\n newAdmin\\n )\\n }\\n emit ProxyAdminTransferred(previousAdmin, newAdmin);\\n }\\n}\\n\",\"keccak256\":\"0x3e2e1473604e7e42e99f77ad5e5d8eb8a3b6d0e63c154a9c6d9a223190372070\",\"license\":\"GPL-3.0\"},\"contracts/vendor/proxy/Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity 0.8.19;\\n\\n// EIP-1967\\nabstract contract Proxy {\\n // /////////////////////// EVENTS ///////////////////////////////////////////////////////////////////////////\\n\\n event ProxyImplementationUpdated(\\n address indexed previousImplementation,\\n address indexed newImplementation\\n );\\n\\n // ///////////////////// EXTERNAL ///////////////////////////////////////////////////////////////////////////\\n\\n // prettier-ignore\\n receive() external payable virtual {\\n revert(\\\"ETHER_REJECTED\\\"); // explicit reject by default\\n }\\n\\n fallback() external payable {\\n _fallback();\\n }\\n\\n // ///////////////////////// INTERNAL //////////////////////////////////////////////////////////////////////\\n\\n function _fallback() internal {\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n let implementationAddress := sload(\\n 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc\\n )\\n calldatacopy(0x0, 0x0, calldatasize())\\n let success := delegatecall(\\n gas(),\\n implementationAddress,\\n 0x0,\\n calldatasize(),\\n 0,\\n 0\\n )\\n let retSz := returndatasize()\\n returndatacopy(0, 0, retSz)\\n switch success\\n case 0 {\\n revert(0, retSz)\\n }\\n default {\\n return(0, retSz)\\n }\\n }\\n }\\n\\n function _setImplementation(address newImplementation, bytes memory data)\\n internal\\n {\\n address previousImplementation;\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n previousImplementation := sload(\\n 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc\\n )\\n }\\n\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n sstore(\\n 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc,\\n newImplementation\\n )\\n }\\n\\n emit ProxyImplementationUpdated(\\n previousImplementation,\\n newImplementation\\n );\\n\\n if (data.length > 0) {\\n (bool success, ) = newImplementation.delegatecall(data);\\n if (!success) {\\n assembly {\\n // This assembly ensure the revert contains the exact string data\\n let returnDataSize := returndatasize()\\n returndatacopy(0, 0, returnDataSize)\\n revert(0, returnDataSize)\\n }\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0x5fd4f538f92f377d4e7b09fe8d5387eb1d5ff5ac95869c969be5049ae23439ba\",\"license\":\"GPL-3.0\"}},\"version\":1}", "bytecode": "0x6080604052604051610992380380610992833981016040819052610022916101de565b61002c838261003d565b61003582610119565b5050506102ca565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc8054908390556040516001600160a01b0380851691908316907f5570d70a002632a7b0b3c9304cc89efb62d8da9eca0dbd7752c83b737906829690600090a3815115610114576000836001600160a01b0316836040516100be91906102ae565b600060405180830381855af49150503d80600081146100f9576040519150601f19603f3d011682016040523d82523d6000602084013e6100fe565b606091505b5050905080610112573d806000803e806000fd5b505b505050565b60006101316000805160206109728339815191525490565b90508160008051602061097283398151915255816001600160a01b0316816001600160a01b03167fdf435d422321da6b195902d70fc417c06a32f88379c20dd8f2a8da07088cec2960405160405180910390a35050565b80516001600160a01b038116811461019f57600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60005b838110156101d55781810151838201526020016101bd565b50506000910152565b6000806000606084860312156101f357600080fd5b6101fc84610188565b925061020a60208501610188565b60408501519092506001600160401b038082111561022757600080fd5b818601915086601f83011261023b57600080fd5b81518181111561024d5761024d6101a4565b604051601f8201601f19908116603f01168101908382118183101715610275576102756101a4565b8160405282815289602084870101111561028e57600080fd5b61029f8360208301602088016101ba565b80955050505050509250925092565b600082516102c08184602087016101ba565b9190910192915050565b610699806102d96000396000f3fe60806040526004361061004e5760003560e01c806301ffc9a71461009b5780633659cfe6146100d05780633e47158c146100f05780634f1ef2861461011d5780638356ca4f1461013057610091565b366100915760405162461bcd60e51b815260206004820152600e60248201526d115512115497d491529150d5115160921b60448201526064015b60405180910390fd5b610099610150565b005b3480156100a757600080fd5b506100bb6100b63660046104c7565b610189565b60405190151581526020015b60405180910390f35b3480156100dc57600080fd5b506100996100eb36600461050d565b61026f565b3480156100fc57600080fd5b506101056102c3565b6040516001600160a01b0390911681526020016100c7565b61009961012b366004610528565b6102d2565b34801561013c57600080fd5b5061009961014b36600461050d565b61034f565b6000805160206106448339815191525460003681823780813683855af491503d8082833e82801561017f578183f35b8183fd5b50505050565b60006301ffc9a760e01b6001600160e01b0319831614806101ba57506307f5828d60e41b6001600160e01b03198316145b156101c757506001919050565b6001600160e01b031980831690036101e157506000919050565b600080516020610644833981519152546040516301ffc9a760e01b81526001600160e01b0319841660048201526001600160a01b038216906301ffc9a790602401602060405180830381865afa92505050801561025b575060408051601f3d908101601f19168201909252610258918101906105aa565b60015b6102685750600092915050565b9392505050565b610277610390565b6001600160a01b0316336001600160a01b0316146102a75760405162461bcd60e51b8152600401610088906105cc565b6102c081604051806020016040528060008152506103a3565b50565b60006102cd610390565b905090565b6102da610390565b6001600160a01b0316336001600160a01b03161461030a5760405162461bcd60e51b8152600401610088906105cc565b61034a8383838080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506103a392505050565b505050565b610357610390565b6001600160a01b0316336001600160a01b0316146103875760405162461bcd60e51b8152600401610088906105cc565b6102c081610466565b6000805160206106248339815191525490565b6000805160206106448339815191528054908390556040516001600160a01b0380851691908316907f5570d70a002632a7b0b3c9304cc89efb62d8da9eca0dbd7752c83b737906829690600090a381511561034a576000836001600160a01b03168360405161041291906105f4565b600060405180830381855af49150503d806000811461044d576040519150601f19603f3d011682016040523d82523d6000602084013e610452565b606091505b5050905080610183573d806000803e806000fd5b6000610470610390565b90508160008051602061062483398151915255816001600160a01b0316816001600160a01b03167fdf435d422321da6b195902d70fc417c06a32f88379c20dd8f2a8da07088cec2960405160405180910390a35050565b6000602082840312156104d957600080fd5b81356001600160e01b03198116811461026857600080fd5b80356001600160a01b038116811461050857600080fd5b919050565b60006020828403121561051f57600080fd5b610268826104f1565b60008060006040848603121561053d57600080fd5b610546846104f1565b925060208401356001600160401b038082111561056257600080fd5b818601915086601f83011261057657600080fd5b81358181111561058557600080fd5b87602082850101111561059757600080fd5b6020830194508093505050509250925092565b6000602082840312156105bc57600080fd5b8151801515811461026857600080fd5b6020808252600e908201526d1393d517d055551213d49256915160921b604082015260600190565b6000825160005b8181101561061557602081860181015185830152016105fb565b50600092019182525091905056feb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbca2646970667358221220f8092c6d4e38cdaacdb3c899e6c75d21baaeaba76b22f353673f931b1f0f8a9b64736f6c63430008130033b53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103", @@ -698,12 +697,12 @@ "execute": { "methodName": "initialize", "args": [ - "0xCE7427a94bc9B8A90E2C8d91cB0247D779819437", + "0x90608F57161aC771b28fb0adCd2434cfa1463201", "0xB47C8e4bEb28af80eDe5E5bF474927b110Ef2c0e", "0xB47C8e4bEb28af80eDe5E5bF474927b110Ef2c0e" ] }, - "implementation": "0x9ff468bd1De89F0229193F1F8f0bA0e265bA026a", + "implementation": "0x90608F57161aC771b28fb0adCd2434cfa1463201", "devdoc": { "kind": "dev", "methods": {}, diff --git a/lib/g-uni-v1-core/deployments/arbitrumSepolia/GUniFactory_Implementation.json b/lib/g-uni-v1-core/deployments/arbitrumSepolia/GUniFactory_Implementation.json index 4e70e8319..f6e4f9aef 100644 --- a/lib/g-uni-v1-core/deployments/arbitrumSepolia/GUniFactory_Implementation.json +++ b/lib/g-uni-v1-core/deployments/arbitrumSepolia/GUniFactory_Implementation.json @@ -1,5 +1,5 @@ { - "address": "0x9ff468bd1De89F0229193F1F8f0bA0e265bA026a", + "address": "0x90608F57161aC771b28fb0adCd2434cfa1463201", "abi": [ { "inputs": [ @@ -508,26 +508,25 @@ "type": "function" } ], - "transactionHash": "0xa08927fd8eb46642fd2ac115535f998f40a36ecb273a4e2662802b6a4c9130f2", + "transactionHash": "0x0ddae94495bea4ad45f3cf0bd0c7f3df1517ed5e13c1ed7135738305f91e92dc", "receipt": { "to": null, - "from": "0x5fCfdc65044bf008A6b473512D34102282Ee43a6", - "contractAddress": "0x9ff468bd1De89F0229193F1F8f0bA0e265bA026a", - "transactionIndex": 1, - "gasUsed": "19792719", + "from": "0xB47C8e4bEb28af80eDe5E5bF474927b110Ef2c0e", + "contractAddress": "0x90608F57161aC771b28fb0adCd2434cfa1463201", + "transactionIndex": 3, + "gasUsed": "4839221", "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x17695cd8d27ba4b0d7bbdbdaa2a05d55db91f1914cb61ebbfb1eaec48730a3e4", - "transactionHash": "0xa08927fd8eb46642fd2ac115535f998f40a36ecb273a4e2662802b6a4c9130f2", + "blockHash": "0x8bf57b4c77eff10abe629c05e512a69be9f81ce267bdda90c3cd31220ea59624", + "transactionHash": "0x0ddae94495bea4ad45f3cf0bd0c7f3df1517ed5e13c1ed7135738305f91e92dc", "logs": [], - "blockNumber": 57912155, - "cumulativeGasUsed": "19792719", + "blockNumber": 53304307, + "cumulativeGasUsed": "5320219", "status": 1, "byzantium": true }, "args": [ - "0x248AB79Bbb9bC29bB72f7Cd42F17e054Fc40188e" + "0x2dCC5a88A861FB73613153F82CF801cd09E72a5F" ], - "numDeployments": 1, "solcInputHash": "f1f932b5297d788fce5c0abb03e1e395", "metadata": "{\"compiler\":{\"version\":\"0.8.19+commit.7dd6d404\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_uniswapV3Factory\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousManager\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newManager\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"uniPool\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"manager\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"pool\",\"type\":\"address\"}],\"name\":\"PoolCreated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"previosGelatoDeployer\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newGelatoDeployer\",\"type\":\"address\"}],\"name\":\"UpdateGelatoDeployer\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"previousImplementation\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"UpdatePoolImplementation\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"tokenA\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"tokenB\",\"type\":\"address\"},{\"internalType\":\"uint24\",\"name\":\"uniFee\",\"type\":\"uint24\"},{\"internalType\":\"uint16\",\"name\":\"managerFee\",\"type\":\"uint16\"},{\"internalType\":\"int24\",\"name\":\"lowerTick\",\"type\":\"int24\"},{\"internalType\":\"int24\",\"name\":\"upperTick\",\"type\":\"int24\"}],\"name\":\"createManagedPool\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"pool\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"tokenA\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"tokenB\",\"type\":\"address\"},{\"internalType\":\"uint24\",\"name\":\"uniFee\",\"type\":\"uint24\"},{\"internalType\":\"int24\",\"name\":\"lowerTick\",\"type\":\"int24\"},{\"internalType\":\"int24\",\"name\":\"upperTick\",\"type\":\"int24\"}],\"name\":\"createPool\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"pool\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"factory\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"gelatoDeployer\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getDeployers\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getGelatoPools\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"deployer\",\"type\":\"address\"}],\"name\":\"getPools\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"pool\",\"type\":\"address\"}],\"name\":\"getProxyAdmin\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token0\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"token1\",\"type\":\"address\"}],\"name\":\"getTokenName\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_implementation\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_gelatoDeployer\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_manager_\",\"type\":\"address\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"pool\",\"type\":\"address\"}],\"name\":\"isPoolImmutable\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"pools\",\"type\":\"address[]\"}],\"name\":\"makePoolsImmutable\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"manager\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"numDeployers\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"numPools\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"result\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"deployer\",\"type\":\"address\"}],\"name\":\"numPools\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"poolImplementation\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"nextGelatoDeployer\",\"type\":\"address\"}],\"name\":\"setGelatoDeployer\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"nextImplementation\",\"type\":\"address\"}],\"name\":\"setPoolImplementation\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"pools\",\"type\":\"address[]\"}],\"name\":\"upgradePools\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"pools\",\"type\":\"address[]\"},{\"internalType\":\"bytes[]\",\"name\":\"datas\",\"type\":\"bytes[]\"}],\"name\":\"upgradePoolsAndCall\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"version\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"createManagedPool(address,address,uint24,uint16,int24,int24)\":{\"params\":{\"lowerTick\":\"initial lower bound of the Uniswap V3 position\",\"managerFee\":\"proportion of earned fees that go to pool manager in Basis Points\",\"tokenA\":\"one of the tokens in the uniswap pair\",\"tokenB\":\"the other token in the uniswap pair\",\"uniFee\":\"fee tier of the uniswap pair\",\"upperTick\":\"initial upper bound of the Uniswap V3 position\"},\"returns\":{\"pool\":\"the address of the newly created G-UNI pool (proxy)\"}},\"createPool(address,address,uint24,int24,int24)\":{\"params\":{\"lowerTick\":\"initial lower bound of the Uniswap V3 position\",\"tokenA\":\"one of the tokens in the uniswap pair\",\"tokenB\":\"the other token in the uniswap pair\",\"uniFee\":\"fee tier of the uniswap pair\",\"upperTick\":\"initial upper bound of the Uniswap V3 position\"},\"returns\":{\"pool\":\"the address of the newly created G-UNI pool (proxy)\"}},\"getDeployers()\":{\"returns\":{\"_0\":\"deployers the list of deployer addresses\"}},\"getGelatoPools()\":{\"returns\":{\"_0\":\"list of Gelato managed G-UNI pool addresses\"}},\"getPools(address)\":{\"params\":{\"deployer\":\"address that has potentially deployed G-UNI pools (can return empty array)\"},\"returns\":{\"_0\":\"pools the list of G-UNI pool addresses deployed by `deployer`\"}},\"getProxyAdmin(address)\":{\"params\":{\"pool\":\"address of the G-UNI pool\"},\"returns\":{\"_0\":\"address that controls the G-UNI implementation (has power to upgrade it)\"}},\"isPoolImmutable(address)\":{\"params\":{\"pool\":\"address of the G-UNI pool\"},\"returns\":{\"_0\":\"bool signaling if pool is immutable (true) or not (false)\"}},\"manager()\":{\"details\":\"Returns the address of the current manager.\"},\"numDeployers()\":{\"returns\":{\"_0\":\"total number of G-UNI pool deployer addresses\"}},\"numPools()\":{\"returns\":{\"result\":\"total number of G-UNI pools deployed\"}},\"numPools(address)\":{\"params\":{\"deployer\":\"deployer address\"},\"returns\":{\"_0\":\"total number of G-UNI pools deployed by `deployer`\"}},\"renounceOwnership()\":{\"details\":\"Leaves the contract without manager. It will not be possible to call `onlyManager` functions anymore. Can only be called by the current manager. NOTE: Renouncing ownership will leave the contract without an manager, thereby removing any functionality that is only available to the manager.\"},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current manager.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"createManagedPool(address,address,uint24,uint16,int24,int24)\":{\"notice\":\"createManagedPool creates a new instance of a G-UNI token on a specified UniswapV3Pool. The msg.sender is the initial manager of the pool and will forever be associated with the G-UNI pool as it's `deployer`\"},\"createPool(address,address,uint24,int24,int24)\":{\"notice\":\"createPool creates a new instance of a G-UNI token on a specified UniswapV3Pool. Here the manager role is immediately burned, however msg.sender will still forever be associated with the G-UNI pool as it's `deployer`\"},\"getDeployers()\":{\"notice\":\"getDeployers fetches all addresses that have deployed a G-UNI pool\"},\"getGelatoPools()\":{\"notice\":\"getGelatoPools gets all the G-UNI pools deployed by Gelato's default deployer address (since anyone can deploy and manage G-UNI pools)\"},\"getPools(address)\":{\"notice\":\"getPools fetches all the G-UNI pool addresses deployed by `deployer`\"},\"getProxyAdmin(address)\":{\"notice\":\"getProxyAdmin gets the current address who controls the underlying implementation of a G-UNI pool. For most all pools either this contract address or the zero address will be the proxyAdmin. If the admin is the zero address the pool's implementation is naturally no longer upgradable (no one owns the zero address).\"},\"isPoolImmutable(address)\":{\"notice\":\"isPoolImmutable checks if a certain G-UNI pool is \\\"immutable\\\" i.e. that the proxyAdmin is the zero address and thus the underlying implementation cannot be upgraded\"},\"numDeployers()\":{\"notice\":\"numDeployers counts the total number of G-UNI pool deployer addresses\"},\"numPools()\":{\"notice\":\"numPools counts the total number of G-UNI pools in existence\"},\"numPools(address)\":{\"notice\":\"numPools counts the total number of G-UNI pools deployed by `deployer`\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/GUniFactory.sol\":\"GUniFactory\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":1},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n// solhint-disable-next-line compiler-version\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\\n * behind a proxy. Since a proxied contract can't have a constructor, it's common to move constructor logic to an\\n * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\\n * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\\n *\\n * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\\n * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.\\n *\\n * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\\n * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\\n */\\nabstract contract Initializable {\\n\\n /**\\n * @dev Indicates that the contract has been initialized.\\n */\\n bool private _initialized;\\n\\n /**\\n * @dev Indicates that the contract is in the process of being initialized.\\n */\\n bool private _initializing;\\n\\n /**\\n * @dev Modifier to protect an initializer function from being invoked twice.\\n */\\n modifier initializer() {\\n require(_initializing || !_initialized, \\\"Initializable: contract is already initialized\\\");\\n\\n bool isTopLevelCall = !_initializing;\\n if (isTopLevelCall) {\\n _initializing = true;\\n _initialized = true;\\n }\\n\\n _;\\n\\n if (isTopLevelCall) {\\n _initializing = false;\\n }\\n }\\n}\\n\",\"keccak256\":\"0x67d2f282a9678e58e878a0b774041ba7a01e2740a262aea97a3f681339914713\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC20 standard as defined in the EIP.\\n */\\ninterface IERC20 {\\n /**\\n * @dev Returns the amount of tokens in existence.\\n */\\n function totalSupply() external view returns (uint256);\\n\\n /**\\n * @dev Returns the amount of tokens owned by `account`.\\n */\\n function balanceOf(address account) external view returns (uint256);\\n\\n /**\\n * @dev Moves `amount` tokens from the caller's account to `recipient`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address recipient, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Returns the remaining number of tokens that `spender` will be\\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\\n * zero by default.\\n *\\n * This value changes when {approve} or {transferFrom} are called.\\n */\\n function allowance(address owner, address spender) external view returns (uint256);\\n\\n /**\\n * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\\n * that someone may use both the old and the new allowance by unfortunate\\n * transaction ordering. One possible solution to mitigate this race\\n * condition is to first reduce the spender's allowance to 0 and set the\\n * desired value afterwards:\\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address spender, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Moves `amount` tokens from `sender` to `recipient` using the\\n * allowance mechanism. `amount` is then deducted from the caller's\\n * allowance.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\\n * another (`to`).\\n *\\n * Note that `value` may be zero.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 value);\\n\\n /**\\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\\n * a call to {approve}. `value` is the new allowance.\\n */\\n event Approval(address indexed owner, address indexed spender, uint256 value);\\n}\\n\",\"keccak256\":\"0xf8e8d118a7a8b2e134181f7da655f6266aa3a0f9134b2605747139fcb0c5d835\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../IERC20.sol\\\";\\n\\n/**\\n * @dev Interface for the optional metadata functions from the ERC20 standard.\\n *\\n * _Available since v4.1._\\n */\\ninterface IERC20Metadata is IERC20 {\\n /**\\n * @dev Returns the name of the token.\\n */\\n function name() external view returns (string memory);\\n\\n /**\\n * @dev Returns the symbol of the token.\\n */\\n function symbol() external view returns (string memory);\\n\\n /**\\n * @dev Returns the decimals places of the token.\\n */\\n function decimals() external view returns (uint8);\\n}\\n\",\"keccak256\":\"0x83fe24f5c04a56091e50f4a345ff504c8bff658a76d4c43b16878c8f940c53b2\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/structs/EnumerableSet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Library for managing\\n * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive\\n * types.\\n *\\n * Sets have the following properties:\\n *\\n * - Elements are added, removed, and checked for existence in constant time\\n * (O(1)).\\n * - Elements are enumerated in O(n). No guarantees are made on the ordering.\\n *\\n * ```\\n * contract Example {\\n * // Add the library methods\\n * using EnumerableSet for EnumerableSet.AddressSet;\\n *\\n * // Declare a set state variable\\n * EnumerableSet.AddressSet private mySet;\\n * }\\n * ```\\n *\\n * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`)\\n * and `uint256` (`UintSet`) are supported.\\n */\\nlibrary EnumerableSet {\\n // To implement this library for multiple types with as little code\\n // repetition as possible, we write it in terms of a generic Set type with\\n // bytes32 values.\\n // The Set implementation uses private functions, and user-facing\\n // implementations (such as AddressSet) are just wrappers around the\\n // underlying Set.\\n // This means that we can only create new EnumerableSets for types that fit\\n // in bytes32.\\n\\n struct Set {\\n // Storage of set values\\n bytes32[] _values;\\n\\n // Position of the value in the `values` array, plus 1 because index 0\\n // means a value is not in the set.\\n mapping (bytes32 => uint256) _indexes;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function _add(Set storage set, bytes32 value) private returns (bool) {\\n if (!_contains(set, value)) {\\n set._values.push(value);\\n // The value is stored at length-1, but we add 1 to all indexes\\n // and use 0 as a sentinel value\\n set._indexes[value] = set._values.length;\\n return true;\\n } else {\\n return false;\\n }\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function _remove(Set storage set, bytes32 value) private returns (bool) {\\n // We read and store the value's index to prevent multiple reads from the same storage slot\\n uint256 valueIndex = set._indexes[value];\\n\\n if (valueIndex != 0) { // Equivalent to contains(set, value)\\n // To delete an element from the _values array in O(1), we swap the element to delete with the last one in\\n // the array, and then remove the last element (sometimes called as 'swap and pop').\\n // This modifies the order of the array, as noted in {at}.\\n\\n uint256 toDeleteIndex = valueIndex - 1;\\n uint256 lastIndex = set._values.length - 1;\\n\\n // When the value to delete is the last one, the swap operation is unnecessary. However, since this occurs\\n // so rarely, we still do the swap anyway to avoid the gas cost of adding an 'if' statement.\\n\\n bytes32 lastvalue = set._values[lastIndex];\\n\\n // Move the last value to the index where the value to delete is\\n set._values[toDeleteIndex] = lastvalue;\\n // Update the index for the moved value\\n set._indexes[lastvalue] = valueIndex; // Replace lastvalue's index to valueIndex\\n\\n // Delete the slot where the moved value was stored\\n set._values.pop();\\n\\n // Delete the index for the deleted slot\\n delete set._indexes[value];\\n\\n return true;\\n } else {\\n return false;\\n }\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function _contains(Set storage set, bytes32 value) private view returns (bool) {\\n return set._indexes[value] != 0;\\n }\\n\\n /**\\n * @dev Returns the number of values on the set. O(1).\\n */\\n function _length(Set storage set) private view returns (uint256) {\\n return set._values.length;\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function _at(Set storage set, uint256 index) private view returns (bytes32) {\\n require(set._values.length > index, \\\"EnumerableSet: index out of bounds\\\");\\n return set._values[index];\\n }\\n\\n // Bytes32Set\\n\\n struct Bytes32Set {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(Bytes32Set storage set, bytes32 value) internal returns (bool) {\\n return _add(set._inner, value);\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) {\\n return _remove(set._inner, value);\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) {\\n return _contains(set._inner, value);\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(Bytes32Set storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) {\\n return _at(set._inner, index);\\n }\\n\\n // AddressSet\\n\\n struct AddressSet {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(AddressSet storage set, address value) internal returns (bool) {\\n return _add(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(AddressSet storage set, address value) internal returns (bool) {\\n return _remove(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(AddressSet storage set, address value) internal view returns (bool) {\\n return _contains(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(AddressSet storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(AddressSet storage set, uint256 index) internal view returns (address) {\\n return address(uint160(uint256(_at(set._inner, index))));\\n }\\n\\n\\n // UintSet\\n\\n struct UintSet {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(UintSet storage set, uint256 value) internal returns (bool) {\\n return _add(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(UintSet storage set, uint256 value) internal returns (bool) {\\n return _remove(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(UintSet storage set, uint256 value) internal view returns (bool) {\\n return _contains(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Returns the number of values on the set. O(1).\\n */\\n function length(UintSet storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(UintSet storage set, uint256 index) internal view returns (uint256) {\\n return uint256(_at(set._inner, index));\\n }\\n}\\n\",\"keccak256\":\"0x4878ef6c288f4cef3c2a288d32cc548c648831cc55503ad3d9a581ed3b93aad9\",\"license\":\"MIT\"},\"@uniswap/v3-core/contracts/interfaces/IUniswapV3Factory.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-2.0-or-later\\npragma solidity >=0.5.0;\\n\\n/// @title The interface for the Uniswap V3 Factory\\n/// @notice The Uniswap V3 Factory facilitates creation of Uniswap V3 pools and control over the protocol fees\\ninterface IUniswapV3Factory {\\n /// @notice Emitted when the owner of the factory is changed\\n /// @param oldOwner The owner before the owner was changed\\n /// @param newOwner The owner after the owner was changed\\n event OwnerChanged(address indexed oldOwner, address indexed newOwner);\\n\\n /// @notice Emitted when a pool is created\\n /// @param token0 The first token of the pool by address sort order\\n /// @param token1 The second token of the pool by address sort order\\n /// @param fee The fee collected upon every swap in the pool, denominated in hundredths of a bip\\n /// @param tickSpacing The minimum number of ticks between initialized ticks\\n /// @param pool The address of the created pool\\n event PoolCreated(\\n address indexed token0,\\n address indexed token1,\\n uint24 indexed fee,\\n int24 tickSpacing,\\n address pool\\n );\\n\\n /// @notice Emitted when a new fee amount is enabled for pool creation via the factory\\n /// @param fee The enabled fee, denominated in hundredths of a bip\\n /// @param tickSpacing The minimum number of ticks between initialized ticks for pools created with the given fee\\n event FeeAmountEnabled(uint24 indexed fee, int24 indexed tickSpacing);\\n\\n /// @notice Returns the current owner of the factory\\n /// @dev Can be changed by the current owner via setOwner\\n /// @return The address of the factory owner\\n function owner() external view returns (address);\\n\\n /// @notice Returns the tick spacing for a given fee amount, if enabled, or 0 if not enabled\\n /// @dev A fee amount can never be removed, so this value should be hard coded or cached in the calling context\\n /// @param fee The enabled fee, denominated in hundredths of a bip. Returns 0 in case of unenabled fee\\n /// @return The tick spacing\\n function feeAmountTickSpacing(uint24 fee) external view returns (int24);\\n\\n /// @notice Returns the pool address for a given pair of tokens and a fee, or address 0 if it does not exist\\n /// @dev tokenA and tokenB may be passed in either token0/token1 or token1/token0 order\\n /// @param tokenA The contract address of either token0 or token1\\n /// @param tokenB The contract address of the other token\\n /// @param fee The fee collected upon every swap in the pool, denominated in hundredths of a bip\\n /// @return pool The pool address\\n function getPool(\\n address tokenA,\\n address tokenB,\\n uint24 fee\\n ) external view returns (address pool);\\n\\n /// @notice Creates a pool for the given two tokens and fee\\n /// @param tokenA One of the two tokens in the desired pool\\n /// @param tokenB The other of the two tokens in the desired pool\\n /// @param fee The desired fee for the pool\\n /// @dev tokenA and tokenB may be passed in either order: token0/token1 or token1/token0. tickSpacing is retrieved\\n /// from the fee. The call will revert if the pool already exists, the fee is invalid, or the token arguments\\n /// are invalid.\\n /// @return pool The address of the newly created pool\\n function createPool(\\n address tokenA,\\n address tokenB,\\n uint24 fee\\n ) external returns (address pool);\\n\\n /// @notice Updates the owner of the factory\\n /// @dev Must be called by the current owner\\n /// @param _owner The new owner of the factory\\n function setOwner(address _owner) external;\\n\\n /// @notice Enables a fee amount with the given tickSpacing\\n /// @dev Fee amounts may never be removed once enabled\\n /// @param fee The fee amount to enable, denominated in hundredths of a bip (i.e. 1e-6)\\n /// @param tickSpacing The spacing between ticks to be enforced for all pools created with the given fee amount\\n function enableFeeAmount(uint24 fee, int24 tickSpacing) external;\\n}\\n\",\"keccak256\":\"0xcc3d0c93fc9ac0febbe09f941b465b57f750bcf3b48432da0b97dc289cfdc489\",\"license\":\"GPL-2.0-or-later\"},\"contracts/GUniFactory.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\npragma solidity 0.8.19;\\n\\nimport {\\n IUniswapV3Factory\\n} from \\\"@uniswap/v3-core/contracts/interfaces/IUniswapV3Factory.sol\\\";\\nimport {IUniswapV3TickSpacing} from \\\"./interfaces/IUniswapV3TickSpacing.sol\\\";\\nimport {IGUniFactory} from \\\"./interfaces/IGUniFactory.sol\\\";\\nimport {IGUniPoolStorage} from \\\"./interfaces/IGUniPoolStorage.sol\\\";\\nimport {GUniFactoryStorage} from \\\"./abstract/GUniFactoryStorage.sol\\\";\\nimport {EIP173Proxy} from \\\"./vendor/proxy/EIP173Proxy.sol\\\";\\nimport {IEIP173Proxy} from \\\"./interfaces/IEIP173Proxy.sol\\\";\\nimport {\\n IERC20Metadata\\n} from \\\"@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol\\\";\\nimport {\\n EnumerableSet\\n} from \\\"@openzeppelin/contracts/utils/structs/EnumerableSet.sol\\\";\\n\\ncontract GUniFactory is GUniFactoryStorage, IGUniFactory {\\n using EnumerableSet for EnumerableSet.AddressSet;\\n\\n constructor(address _uniswapV3Factory)\\n GUniFactoryStorage(_uniswapV3Factory)\\n {} // solhint-disable-line no-empty-blocks\\n\\n /// @notice createManagedPool creates a new instance of a G-UNI token on a specified\\n /// UniswapV3Pool. The msg.sender is the initial manager of the pool and will\\n /// forever be associated with the G-UNI pool as it's `deployer`\\n /// @param tokenA one of the tokens in the uniswap pair\\n /// @param tokenB the other token in the uniswap pair\\n /// @param uniFee fee tier of the uniswap pair\\n /// @param managerFee proportion of earned fees that go to pool manager in Basis Points\\n /// @param lowerTick initial lower bound of the Uniswap V3 position\\n /// @param upperTick initial upper bound of the Uniswap V3 position\\n /// @return pool the address of the newly created G-UNI pool (proxy)\\n function createManagedPool(\\n address tokenA,\\n address tokenB,\\n uint24 uniFee,\\n uint16 managerFee,\\n int24 lowerTick,\\n int24 upperTick\\n ) external override returns (address pool) {\\n return\\n _createPool(\\n tokenA,\\n tokenB,\\n uniFee,\\n managerFee,\\n lowerTick,\\n upperTick,\\n msg.sender\\n );\\n }\\n\\n /// @notice createPool creates a new instance of a G-UNI token on a specified\\n /// UniswapV3Pool. Here the manager role is immediately burned, however msg.sender will still\\n /// forever be associated with the G-UNI pool as it's `deployer`\\n /// @param tokenA one of the tokens in the uniswap pair\\n /// @param tokenB the other token in the uniswap pair\\n /// @param uniFee fee tier of the uniswap pair\\n /// @param lowerTick initial lower bound of the Uniswap V3 position\\n /// @param upperTick initial upper bound of the Uniswap V3 position\\n /// @return pool the address of the newly created G-UNI pool (proxy)\\n function createPool(\\n address tokenA,\\n address tokenB,\\n uint24 uniFee,\\n int24 lowerTick,\\n int24 upperTick\\n ) external override returns (address pool) {\\n return\\n _createPool(\\n tokenA,\\n tokenB,\\n uniFee,\\n 0,\\n lowerTick,\\n upperTick,\\n address(0)\\n );\\n }\\n\\n function _createPool(\\n address tokenA,\\n address tokenB,\\n uint24 uniFee,\\n uint16 managerFee,\\n int24 lowerTick,\\n int24 upperTick,\\n address manager\\n ) internal returns (address pool) {\\n (address token0, address token1) = _getTokenOrder(tokenA, tokenB);\\n\\n pool = address(new EIP173Proxy(poolImplementation, address(this), \\\"\\\"));\\n\\n string memory name = \\\"Gelato Uniswap LP\\\";\\n try this.getTokenName(token0, token1) returns (string memory result) {\\n name = result;\\n } catch {} // solhint-disable-line no-empty-blocks\\n\\n address uniPool =\\n IUniswapV3Factory(factory).getPool(token0, token1, uniFee);\\n require(uniPool != address(0), \\\"uniswap pool does not exist\\\");\\n require(\\n _validateTickSpacing(uniPool, lowerTick, upperTick),\\n \\\"tickSpacing mismatch\\\"\\n );\\n\\n IGUniPoolStorage(pool).initialize(\\n name,\\n \\\"G-UNI\\\",\\n uniPool,\\n managerFee,\\n lowerTick,\\n upperTick,\\n manager\\n );\\n _deployers.add(msg.sender);\\n _pools[msg.sender].add(pool);\\n emit PoolCreated(uniPool, manager, pool);\\n }\\n\\n function _validateTickSpacing(\\n address uniPool,\\n int24 lowerTick,\\n int24 upperTick\\n ) internal view returns (bool) {\\n int24 spacing = IUniswapV3TickSpacing(uniPool).tickSpacing();\\n return\\n lowerTick < upperTick &&\\n lowerTick % spacing == 0 &&\\n upperTick % spacing == 0;\\n }\\n\\n function getTokenName(address token0, address token1)\\n external\\n view\\n returns (string memory)\\n {\\n string memory symbol0 = IERC20Metadata(token0).symbol();\\n string memory symbol1 = IERC20Metadata(token1).symbol();\\n\\n return _append(\\\"Gelato Uniswap \\\", symbol0, \\\"/\\\", symbol1, \\\" LP\\\");\\n }\\n\\n function upgradePools(address[] memory pools) external onlyManager {\\n for (uint256 i = 0; i < pools.length; i++) {\\n IEIP173Proxy(pools[i]).upgradeTo(poolImplementation);\\n }\\n }\\n\\n function upgradePoolsAndCall(address[] memory pools, bytes[] calldata datas)\\n external\\n onlyManager\\n {\\n require(pools.length == datas.length, \\\"mismatching array length\\\");\\n for (uint256 i = 0; i < pools.length; i++) {\\n IEIP173Proxy(pools[i]).upgradeToAndCall(\\n poolImplementation,\\n datas[i]\\n );\\n }\\n }\\n\\n function makePoolsImmutable(address[] memory pools) external onlyManager {\\n for (uint256 i = 0; i < pools.length; i++) {\\n IEIP173Proxy(pools[i]).transferProxyAdmin(address(0));\\n }\\n }\\n\\n /// @notice isPoolImmutable checks if a certain G-UNI pool is \\\"immutable\\\" i.e. that the\\n /// proxyAdmin is the zero address and thus the underlying implementation cannot be upgraded\\n /// @param pool address of the G-UNI pool\\n /// @return bool signaling if pool is immutable (true) or not (false)\\n function isPoolImmutable(address pool) external view returns (bool) {\\n return address(0) == getProxyAdmin(pool);\\n }\\n\\n /// @notice getGelatoPools gets all the G-UNI pools deployed by Gelato's\\n /// default deployer address (since anyone can deploy and manage G-UNI pools)\\n /// @return list of Gelato managed G-UNI pool addresses\\n function getGelatoPools() external view returns (address[] memory) {\\n return getPools(gelatoDeployer);\\n }\\n\\n /// @notice getDeployers fetches all addresses that have deployed a G-UNI pool\\n /// @return deployers the list of deployer addresses\\n function getDeployers() public view returns (address[] memory) {\\n uint256 length = numDeployers();\\n address[] memory deployers = new address[](length);\\n for (uint256 i = 0; i < length; i++) {\\n deployers[i] = _getDeployer(i);\\n }\\n\\n return deployers;\\n }\\n\\n /// @notice getPools fetches all the G-UNI pool addresses deployed by `deployer`\\n /// @param deployer address that has potentially deployed G-UNI pools (can return empty array)\\n /// @return pools the list of G-UNI pool addresses deployed by `deployer`\\n function getPools(address deployer) public view returns (address[] memory) {\\n uint256 length = numPools(deployer);\\n address[] memory pools = new address[](length);\\n for (uint256 i = 0; i < length; i++) {\\n pools[i] = _getPool(deployer, i);\\n }\\n\\n return pools;\\n }\\n\\n /// @notice numPools counts the total number of G-UNI pools in existence\\n /// @return result total number of G-UNI pools deployed\\n function numPools() public view returns (uint256 result) {\\n address[] memory deployers = getDeployers();\\n for (uint256 i = 0; i < deployers.length; i++) {\\n result += numPools(deployers[i]);\\n }\\n }\\n\\n /// @notice numDeployers counts the total number of G-UNI pool deployer addresses\\n /// @return total number of G-UNI pool deployer addresses\\n function numDeployers() public view returns (uint256) {\\n return _deployers.length();\\n }\\n\\n /// @notice numPools counts the total number of G-UNI pools deployed by `deployer`\\n /// @param deployer deployer address\\n /// @return total number of G-UNI pools deployed by `deployer`\\n function numPools(address deployer) public view returns (uint256) {\\n return _pools[deployer].length();\\n }\\n\\n /// @notice getProxyAdmin gets the current address who controls the underlying implementation\\n /// of a G-UNI pool. For most all pools either this contract address or the zero address will\\n /// be the proxyAdmin. If the admin is the zero address the pool's implementation is naturally\\n /// no longer upgradable (no one owns the zero address).\\n /// @param pool address of the G-UNI pool\\n /// @return address that controls the G-UNI implementation (has power to upgrade it)\\n function getProxyAdmin(address pool) public view returns (address) {\\n return IEIP173Proxy(pool).proxyAdmin();\\n }\\n\\n function _getDeployer(uint256 index) internal view returns (address) {\\n return _deployers.at(index);\\n }\\n\\n function _getPool(address deployer, uint256 index)\\n internal\\n view\\n returns (address)\\n {\\n return _pools[deployer].at(index);\\n }\\n\\n function _getTokenOrder(address tokenA, address tokenB)\\n internal\\n pure\\n returns (address token0, address token1)\\n {\\n require(tokenA != tokenB, \\\"same token\\\");\\n (token0, token1) = tokenA < tokenB\\n ? (tokenA, tokenB)\\n : (tokenB, tokenA);\\n require(token0 != address(0), \\\"no address zero\\\");\\n }\\n\\n function _append(\\n string memory a,\\n string memory b,\\n string memory c,\\n string memory d,\\n string memory e\\n ) internal pure returns (string memory) {\\n return string(abi.encodePacked(a, b, c, d, e));\\n }\\n}\\n\",\"keccak256\":\"0x41d2d6a42321eed641468824c4d0ba4fbe40040895304388315ece96132011d6\",\"license\":\"MIT\"},\"contracts/abstract/GUniFactoryStorage.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\npragma solidity 0.8.19;\\n\\nimport {OwnableUninitialized} from \\\"./OwnableUninitialized.sol\\\";\\nimport {\\n Initializable\\n} from \\\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\\\";\\nimport {\\n EnumerableSet\\n} from \\\"@openzeppelin/contracts/utils/structs/EnumerableSet.sol\\\";\\n\\n// solhint-disable-next-line max-states-count\\ncontract GUniFactoryStorage is\\n OwnableUninitialized, /* XXXX DONT MODIFY ORDERING XXXX */\\n Initializable\\n // APPEND ADDITIONAL BASE WITH STATE VARS BELOW:\\n // XXXX DONT MODIFY ORDERING XXXX\\n{\\n // XXXXXXXX DO NOT MODIFY ORDERING XXXXXXXX\\n // solhint-disable-next-line const-name-snakecase\\n string public constant version = \\\"1.0.0\\\";\\n address public immutable factory;\\n address public poolImplementation;\\n address public gelatoDeployer;\\n EnumerableSet.AddressSet internal _deployers;\\n mapping(address => EnumerableSet.AddressSet) internal _pools;\\n // APPPEND ADDITIONAL STATE VARS BELOW:\\n // XXXXXXXX DO NOT MODIFY ORDERING XXXXXXXX\\n\\n event UpdatePoolImplementation(\\n address previousImplementation,\\n address newImplementation\\n );\\n\\n event UpdateGelatoDeployer(\\n address previosGelatoDeployer,\\n address newGelatoDeployer\\n );\\n\\n constructor(address _uniswapV3Factory) {\\n factory = _uniswapV3Factory;\\n }\\n\\n function initialize(\\n address _implementation,\\n address _gelatoDeployer,\\n address _manager_\\n ) external initializer {\\n poolImplementation = _implementation;\\n gelatoDeployer = _gelatoDeployer;\\n _manager = _manager_;\\n }\\n\\n function setPoolImplementation(address nextImplementation)\\n external\\n onlyManager\\n {\\n emit UpdatePoolImplementation(poolImplementation, nextImplementation);\\n poolImplementation = nextImplementation;\\n }\\n\\n function setGelatoDeployer(address nextGelatoDeployer)\\n external\\n onlyManager\\n {\\n emit UpdateGelatoDeployer(gelatoDeployer, nextGelatoDeployer);\\n gelatoDeployer = nextGelatoDeployer;\\n }\\n}\\n\",\"keccak256\":\"0xb0e3a7e77ab8aecf8997593526451e64dd8e8aa07882c210c9aa38d4f7168755\",\"license\":\"MIT\"},\"contracts/abstract/OwnableUninitialized.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity 0.8.19;\\n\\n/**\\n * @dev Contract module which provides a basic access control mechanism, where\\n * there is an account (an manager) that can be granted exclusive access to\\n * specific functions.\\n *\\n * By default, the manager account will be the one that deploys the contract. This\\n * can later be changed with {transferOwnership}.\\n *\\n * This module is used through inheritance. It will make available the modifier\\n * `onlyManager`, which can be applied to your functions to restrict their use to\\n * the manager.\\n */\\n/// @dev DO NOT ADD STATE VARIABLES - APPEND THEM TO GelatoUniV3PoolStorage\\n/// @dev DO NOT ADD BASE CONTRACTS WITH STATE VARS - APPEND THEM TO GelatoUniV3PoolStorage\\nabstract contract OwnableUninitialized {\\n address internal _manager;\\n\\n event OwnershipTransferred(\\n address indexed previousManager,\\n address indexed newManager\\n );\\n\\n /// @dev Initializes the contract setting the deployer as the initial manager.\\n /// CONSTRUCTOR EMPTY - USE INITIALIZIABLE INSTEAD\\n // solhint-disable-next-line no-empty-blocks\\n constructor() {}\\n\\n /**\\n * @dev Returns the address of the current manager.\\n */\\n function manager() public view virtual returns (address) {\\n return _manager;\\n }\\n\\n /**\\n * @dev Throws if called by any account other than the manager.\\n */\\n modifier onlyManager() {\\n require(manager() == msg.sender, \\\"Ownable: caller is not the manager\\\");\\n _;\\n }\\n\\n /**\\n * @dev Leaves the contract without manager. It will not be possible to call\\n * `onlyManager` functions anymore. Can only be called by the current manager.\\n *\\n * NOTE: Renouncing ownership will leave the contract without an manager,\\n * thereby removing any functionality that is only available to the manager.\\n */\\n function renounceOwnership() public virtual onlyManager {\\n emit OwnershipTransferred(_manager, address(0));\\n _manager = address(0);\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Can only be called by the current manager.\\n */\\n function transferOwnership(address newOwner) public virtual onlyManager {\\n require(\\n newOwner != address(0),\\n \\\"Ownable: new manager is the zero address\\\"\\n );\\n emit OwnershipTransferred(_manager, newOwner);\\n _manager = newOwner;\\n }\\n}\\n\",\"keccak256\":\"0xb6016d5611f38fbd516a84ea2e56794cb76a8d61c40f6716d5f0133f195759bd\",\"license\":\"GPL-3.0\"},\"contracts/interfaces/IEIP173Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity 0.8.19;\\n\\ninterface IEIP173Proxy {\\n function proxyAdmin() external view returns (address);\\n\\n function transferProxyAdmin(address newAdmin) external;\\n\\n function upgradeTo(address newImplementation) external;\\n\\n function upgradeToAndCall(address newImplementation, bytes calldata data)\\n external\\n payable;\\n}\\n\",\"keccak256\":\"0xae9996ea370d97cb5fd1934394aca615bee0e46c9a0c161d728490264e83eda5\",\"license\":\"GPL-3.0\"},\"contracts/interfaces/IGUniFactory.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\npragma solidity 0.8.19;\\n\\ninterface IGUniFactory {\\n event PoolCreated(\\n address indexed uniPool,\\n address indexed manager,\\n address indexed pool\\n );\\n\\n function createPool(\\n address tokenA,\\n address tokenB,\\n uint24 uniFee,\\n int24 lowerTick,\\n int24 upperTick\\n ) external returns (address pool);\\n\\n function createManagedPool(\\n address tokenA,\\n address tokenB,\\n uint24 uniFee,\\n uint16 managerFee,\\n int24 lowerTick,\\n int24 upperTick\\n ) external returns (address pool);\\n}\\n\",\"keccak256\":\"0xe06f79e9b1e6351fc4f40c9f25630f0fbfabae9d2ae2bb642ef1f03d4c2195c1\",\"license\":\"MIT\"},\"contracts/interfaces/IGUniPoolStorage.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity 0.8.19;\\n\\ninterface IGUniPoolStorage {\\n function initialize(\\n string memory _name,\\n string memory _symbol,\\n address _pool,\\n uint16 _managerFeeBPS,\\n int24 _lowerTick,\\n int24 _upperTick,\\n address _manager_\\n ) external;\\n}\\n\",\"keccak256\":\"0x52a3f83a23917772f1eb242cecdfa8b45d7b357a615383628c1ac1f26259dd3f\",\"license\":\"GPL-3.0\"},\"contracts/interfaces/IUniswapV3TickSpacing.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity 0.8.19;\\n\\ninterface IUniswapV3TickSpacing {\\n function tickSpacing() external view returns (int24);\\n}\\n\",\"keccak256\":\"0xa6f22651f7e49c6eecf584d8e829d31336de7c43eec3c4c4df3b309db27bd355\",\"license\":\"GPL-3.0\"},\"contracts/vendor/proxy/EIP173Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity 0.8.19;\\n\\nimport \\\"./Proxy.sol\\\";\\n\\ninterface ERC165 {\\n function supportsInterface(bytes4 id) external view returns (bool);\\n}\\n\\n///@notice Proxy implementing EIP173 for ownership management\\ncontract EIP173Proxy is Proxy {\\n // ////////////////////////// EVENTS ///////////////////////////////////////////////////////////////////////\\n\\n event ProxyAdminTransferred(\\n address indexed previousAdmin,\\n address indexed newAdmin\\n );\\n\\n // /////////////////////// CONSTRUCTOR //////////////////////////////////////////////////////////////////////\\n\\n constructor(\\n address implementationAddress,\\n address adminAddress,\\n bytes memory data\\n ) payable {\\n _setImplementation(implementationAddress, data);\\n _setProxyAdmin(adminAddress);\\n }\\n\\n // ///////////////////// EXTERNAL ///////////////////////////////////////////////////////////////////////////\\n\\n function proxyAdmin() external view returns (address) {\\n return _proxyAdmin();\\n }\\n\\n function supportsInterface(bytes4 id) external view returns (bool) {\\n if (id == 0x01ffc9a7 || id == 0x7f5828d0) {\\n return true;\\n }\\n if (id == 0xFFFFFFFF) {\\n return false;\\n }\\n\\n ERC165 implementation;\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n implementation := sload(\\n 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc\\n )\\n }\\n\\n // Technically this is not standard compliant as ERC-165 require 30,000 gas which that call cannot ensure\\n // because it is itself inside `supportsInterface` that might only get 30,000 gas.\\n // In practise this is unlikely to be an issue.\\n try implementation.supportsInterface(id) returns (bool support) {\\n return support;\\n } catch {\\n return false;\\n }\\n }\\n\\n function transferProxyAdmin(address newAdmin) external onlyProxyAdmin {\\n _setProxyAdmin(newAdmin);\\n }\\n\\n function upgradeTo(address newImplementation) external onlyProxyAdmin {\\n _setImplementation(newImplementation, \\\"\\\");\\n }\\n\\n function upgradeToAndCall(address newImplementation, bytes calldata data)\\n external\\n payable\\n onlyProxyAdmin\\n {\\n _setImplementation(newImplementation, data);\\n }\\n\\n // /////////////////////// MODIFIERS ////////////////////////////////////////////////////////////////////////\\n\\n modifier onlyProxyAdmin() {\\n require(msg.sender == _proxyAdmin(), \\\"NOT_AUTHORIZED\\\");\\n _;\\n }\\n\\n // ///////////////////////// INTERNAL //////////////////////////////////////////////////////////////////////\\n\\n function _proxyAdmin() internal view returns (address adminAddress) {\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n adminAddress := sload(\\n 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103\\n )\\n }\\n }\\n\\n function _setProxyAdmin(address newAdmin) internal {\\n address previousAdmin = _proxyAdmin();\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n sstore(\\n 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103,\\n newAdmin\\n )\\n }\\n emit ProxyAdminTransferred(previousAdmin, newAdmin);\\n }\\n}\\n\",\"keccak256\":\"0x3e2e1473604e7e42e99f77ad5e5d8eb8a3b6d0e63c154a9c6d9a223190372070\",\"license\":\"GPL-3.0\"},\"contracts/vendor/proxy/Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity 0.8.19;\\n\\n// EIP-1967\\nabstract contract Proxy {\\n // /////////////////////// EVENTS ///////////////////////////////////////////////////////////////////////////\\n\\n event ProxyImplementationUpdated(\\n address indexed previousImplementation,\\n address indexed newImplementation\\n );\\n\\n // ///////////////////// EXTERNAL ///////////////////////////////////////////////////////////////////////////\\n\\n // prettier-ignore\\n receive() external payable virtual {\\n revert(\\\"ETHER_REJECTED\\\"); // explicit reject by default\\n }\\n\\n fallback() external payable {\\n _fallback();\\n }\\n\\n // ///////////////////////// INTERNAL //////////////////////////////////////////////////////////////////////\\n\\n function _fallback() internal {\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n let implementationAddress := sload(\\n 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc\\n )\\n calldatacopy(0x0, 0x0, calldatasize())\\n let success := delegatecall(\\n gas(),\\n implementationAddress,\\n 0x0,\\n calldatasize(),\\n 0,\\n 0\\n )\\n let retSz := returndatasize()\\n returndatacopy(0, 0, retSz)\\n switch success\\n case 0 {\\n revert(0, retSz)\\n }\\n default {\\n return(0, retSz)\\n }\\n }\\n }\\n\\n function _setImplementation(address newImplementation, bytes memory data)\\n internal\\n {\\n address previousImplementation;\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n previousImplementation := sload(\\n 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc\\n )\\n }\\n\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n sstore(\\n 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc,\\n newImplementation\\n )\\n }\\n\\n emit ProxyImplementationUpdated(\\n previousImplementation,\\n newImplementation\\n );\\n\\n if (data.length > 0) {\\n (bool success, ) = newImplementation.delegatecall(data);\\n if (!success) {\\n assembly {\\n // This assembly ensure the revert contains the exact string data\\n let returnDataSize := returndatasize()\\n returndatacopy(0, 0, returnDataSize)\\n revert(0, returnDataSize)\\n }\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0x5fd4f538f92f377d4e7b09fe8d5387eb1d5ff5ac95869c969be5049ae23439ba\",\"license\":\"GPL-3.0\"}},\"version\":1}", "bytecode": "0x60a060405234801561001057600080fd5b5060405161273838038061273883398101604081905261002f91610040565b6001600160a01b0316608052610070565b60006020828403121561005257600080fd5b81516001600160a01b038116811461006957600080fd5b9392505050565b6080516126a661009260003960008181610312015261103101526126a66000f3fe60806040523480156200001157600080fd5b5060043610620001425760003560e01c8063088933281462000147578063098eddb114620001605780630dfc574b146200017d578063260fc2b8146200019457806335c62bc214620001ab57806340aee04114620001b557806342f5de9914620001cc578063481c6a7514620001e357806354fd4d5014620001fc578063562b810314620002305780635c39f4671462000249578063607c12b51462000260578063715018a6146200026a57806383c60ac4146200027457806386238765146200028b57806395d807f1146200029f578063a958b89514620002c7578063bd30dfb914620002de578063c0c53b8b14620002f5578063c45a0155146200030c578063cefa77991462000334578063d6f748981462000348578063f2fde38b146200035f578063f3b7dead1462000376575b600080fd5b6200015e620001583660046200151e565b6200038d565b005b6200016a62000435565b6040519081526020015b60405180910390f35b6200015e6200018e3660046200160f565b62000448565b6200015e620001a5366004620016b0565b620005b0565b6200016a6200068a565b6200015e620001c6366004620016b0565b620006f5565b6200016a620001dd3660046200151e565b620007d3565b620001ed620007fc565b604051620001749190620016f0565b62000221604051806040016040528060058152602001640312e302e360dc1b81525081565b60405162000174919062001758565b6200023a6200080b565b6040516200017491906200176d565b6200023a6200025a3660046200151e565b62000820565b6200023a620008dd565b6200015e62000997565b620001ed62000285366004620017e5565b62000a04565b600254620001ed906001600160a01b031681565b620002b6620002b03660046200151e565b62000a22565b604051901515815260200162000174565b620001ed620002d836600462001878565b62000a3f565b62000221620002ef366004620018f2565b62000a5e565b6200015e6200030636600462001930565b62000bad565b620001ed7f000000000000000000000000000000000000000000000000000000000000000081565b600154620001ed906001600160a01b031681565b6200015e620003593660046200151e565b62000cb7565b6200015e620003703660046200151e565b62000d56565b620001ed620003873660046200151e565b62000e3d565b3362000398620007fc565b6001600160a01b031614620003ca5760405162461bcd60e51b8152600401620003c19062001982565b60405180910390fd5b6002546040517fb316078581b0eaf0714b47d13192560506acc3e23b5bf3b72d27248f173c9085916200040b916001600160a01b03909116908490620019c4565b60405180910390a1600280546001600160a01b0319166001600160a01b0392909216919091179055565b600062000443600362000ea4565b905090565b3362000453620007fc565b6001600160a01b0316146200047c5760405162461bcd60e51b8152600401620003c19062001982565b82518114620004c95760405162461bcd60e51b81526020600482015260186024820152770dad2e6dac2e8c6d0d2dcce40c2e4e4c2f240d8cadccee8d60431b6044820152606401620003c1565b60005b8351811015620005aa57838181518110620004eb57620004eb620019de565b60200260200101516001600160a01b0316634f1ef286600160009054906101000a90046001600160a01b03168585858181106200052c576200052c620019de565b9050602002810190620005409190620019f4565b6040518463ffffffff1660e01b8152600401620005609392919062001a3d565b600060405180830381600087803b1580156200057b57600080fd5b505af115801562000590573d6000803e3d6000fd5b505050508080620005a19062001a93565b915050620004cc565b50505050565b33620005bb620007fc565b6001600160a01b031614620005e45760405162461bcd60e51b8152600401620003c19062001982565b60005b81518110156200068657818181518110620006065762000606620019de565b60200260200101516001600160a01b0316638356ca4f60006040518263ffffffff1660e01b81526004016200063c9190620016f0565b600060405180830381600087803b1580156200065757600080fd5b505af11580156200066c573d6000803e3d6000fd5b5050505080806200067d9062001a93565b915050620005e7565b5050565b60008062000697620008dd565b905060005b8151811015620006f057620006cd828281518110620006bf57620006bf620019de565b6020026020010151620007d3565b620006d9908462001aaf565b925080620006e78162001a93565b9150506200069c565b505090565b3362000700620007fc565b6001600160a01b031614620007295760405162461bcd60e51b8152600401620003c19062001982565b60005b815181101562000686578181815181106200074b576200074b620019de565b6020908102919091010151600154604051631b2ce7f360e11b81526001600160a01b0392831692633659cfe6926200078992911690600401620016f0565b600060405180830381600087803b158015620007a457600080fd5b505af1158015620007b9573d6000803e3d6000fd5b505050508080620007ca9062001a93565b9150506200072c565b6001600160a01b0381166000908152600560205260408120620007f69062000ea4565b92915050565b6000546001600160a01b031690565b60025460609062000443906001600160a01b03165b606060006200082f83620007d3565b90506000816001600160401b038111156200084e576200084e6200153e565b60405190808252806020026020018201604052801562000878578160200160208202803683370190505b50905060005b82811015620008d55762000893858262000eaf565b828281518110620008a857620008a8620019de565b6001600160a01b039092166020928302919091019091015280620008cc8162001a93565b9150506200087e565b509392505050565b60606000620008eb62000435565b90506000816001600160401b038111156200090a576200090a6200153e565b60405190808252806020026020018201604052801562000934578160200160208202803683370190505b50905060005b8281101562000990576200094e8162000eda565b828281518110620009635762000963620019de565b6001600160a01b039092166020928302919091019091015280620009878162001a93565b9150506200093a565b5092915050565b33620009a2620007fc565b6001600160a01b031614620009cb5760405162461bcd60e51b8152600401620003c19062001982565b600080546040516001600160a01b039091169060008051602062002651833981519152908390a3600080546001600160a01b0319169055565b600062000a178787878787873362000ee9565b979650505050505050565b600062000a2f8262000e3d565b6001600160a01b03161592915050565b600062000a5486868660008787600062000ee9565b9695505050505050565b60606000836001600160a01b03166395d89b416040518163ffffffff1660e01b8152600401600060405180830381865afa15801562000aa1573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405262000acb919081019062001ac5565b90506000836001600160a01b03166395d89b416040518163ffffffff1660e01b8152600401600060405180830381865afa15801562000b0e573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405262000b38919081019062001ac5565b905062000ba46040518060400160405280600f81526020016e023b2b630ba37902ab734b9bbb0b81608d1b81525083604051806040016040528060018152602001602f60f81b81525084604051806040016040528060038152602001620204c560ec1b81525062001243565b95945050505050565b600054600160a81b900460ff168062000bd05750600054600160a01b900460ff16155b62000c355760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401620003c1565b600054600160a81b900460ff1615801562000c60576000805461ffff60a01b191661010160a01b1790555b600180546001600160a01b038087166001600160a01b0319928316179092556002805486841690831617905560008054928516929091169190911790558015620005aa576000805460ff60a81b1916905550505050565b3362000cc2620007fc565b6001600160a01b03161462000ceb5760405162461bcd60e51b8152600401620003c19062001982565b6001546040517f0617fd31aa5ab95ec80eefc1eb61a2c477aa419d1d761b4e46f5f077e47852aa9162000d2c916001600160a01b03909116908490620019c4565b60405180910390a1600180546001600160a01b0319166001600160a01b0392909216919091179055565b3362000d61620007fc565b6001600160a01b03161462000d8a5760405162461bcd60e51b8152600401620003c19062001982565b6001600160a01b03811662000df35760405162461bcd60e51b815260206004820152602860248201527f4f776e61626c653a206e6577206d616e6167657220697320746865207a65726f604482015267206164647265737360c01b6064820152608401620003c1565b600080546040516001600160a01b03808516939216916000805160206200265183398151915291a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b6000816001600160a01b0316633e47158c6040518163ffffffff1660e01b8152600401602060405180830381865afa15801562000e7e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620007f6919062001b63565b6000620007f6825490565b6001600160a01b038216600090815260056020526040812062000ed390836200127a565b9392505050565b6000620007f66003836200127a565b600080600062000efa8a8a62001288565b6001546040519294509092506001600160a01b031690309062000f1d90620014f7565b6001600160a01b03928316815291166020820152606060408201819052600090820152608001604051809103906000f08015801562000f60573d6000803e3d6000fd5b506040805180820182526011815270047656c61746f20556e6973776170204c5607c1b6020820152905163bd30dfb960e01b815291945090309063bd30dfb99062000fb29086908690600401620019c4565b600060405180830381865afa92505050801562000ff357506040513d6000823e601f3d908101601f1916820160405262000ff0919081019062001ac5565b60015b1562000ffc5790505b604051630b4c774160e11b81526001600160a01b038481166004830152838116602483015262ffffff8b1660448301526000917f000000000000000000000000000000000000000000000000000000000000000090911690631698ee8290606401602060405180830381865afa1580156200107b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620010a1919062001b63565b90506001600160a01b038116620010f95760405162461bcd60e51b815260206004820152601b60248201527a1d5b9a5cddd85c081c1bdbdb08191bd95cc81b9bdd08195e1a5cdd602a1b6044820152606401620003c1565b6200110681898962001356565b6200114b5760405162461bcd60e51b81526020600482015260146024820152730e8d2c6d6a6e0c2c6d2dcce40dad2e6dac2e8c6d60631b6044820152606401620003c1565b60405163e25e15e360e01b81526001600160a01b0386169063e25e15e3906200118390859085908e908e908e908e9060040162001b83565b600060405180830381600087803b1580156200119e57600080fd5b505af1158015620011b3573d6000803e3d6000fd5b50505050620011cd3360036200140390919063ffffffff16565b50336000908152600560205260409020620011e9908662001403565b50846001600160a01b0316866001600160a01b0316826001600160a01b03167f9c5d829b9b23efc461f9aeef91979ec04bb903feb3bee4f26d22114abfc7335b60405160405180910390a450505050979650505050505050565b606085858585856040516020016200126095949392919062001bf8565b604051602081830303815290604052905095945050505050565b600062000ed383836200141a565b600080826001600160a01b0316846001600160a01b031603620012db5760405162461bcd60e51b815260206004820152600a60248201526939b0b6b2903a37b5b2b760b11b6044820152606401620003c1565b826001600160a01b0316846001600160a01b031610620012fd57828462001300565b83835b90925090506001600160a01b0382166200134f5760405162461bcd60e51b815260206004820152600f60248201526e6e6f2061646472657373207a65726f60881b6044820152606401620003c1565b9250929050565b600080846001600160a01b031663d0c93a7c6040518163ffffffff1660e01b8152600401602060405180830381865afa15801562001398573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620013be919062001c6d565b90508260020b8460020b128015620013e25750620013dd818562001c8d565b60020b155b801562000ba45750620013f6818462001c8d565b60020b1595945050505050565b600062000ed3836001600160a01b038416620014a5565b815460009082106200147a5760405162461bcd60e51b815260206004820152602260248201527f456e756d657261626c655365743a20696e646578206f7574206f6620626f756e604482015261647360f01b6064820152608401620003c1565b826000018281548110620014925762001492620019de565b9060005260206000200154905092915050565b6000818152600183016020526040812054620014ee57508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155620007f6565b506000620007f6565b6109928062001cbf83390190565b6001600160a01b03811681146200151b57600080fd5b50565b6000602082840312156200153157600080fd5b813562000ed38162001505565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b03811182821017156200157f576200157f6200153e565b604052919050565b600082601f8301126200159957600080fd5b813560206001600160401b03821115620015b757620015b76200153e565b8160051b620015c882820162001554565b9283528481018201928281019087851115620015e357600080fd5b83870192505b8483101562000a17578235620015ff8162001505565b82529183019190830190620015e9565b6000806000604084860312156200162557600080fd5b83356001600160401b03808211156200163d57600080fd5b6200164b8783880162001587565b945060208601359150808211156200166257600080fd5b818601915086601f8301126200167757600080fd5b8135818111156200168757600080fd5b8760208260051b85010111156200169d57600080fd5b6020830194508093505050509250925092565b600060208284031215620016c357600080fd5b81356001600160401b03811115620016da57600080fd5b620016e88482850162001587565b949350505050565b6001600160a01b0391909116815260200190565b60005b838110156200172157818101518382015260200162001707565b50506000910152565b600081518084526200174481602086016020860162001704565b601f01601f19169290920160200192915050565b60208152600062000ed360208301846200172a565b6020808252825182820181905260009190848201906040850190845b81811015620017b05783516001600160a01b03168352928401929184019160010162001789565b50909695505050505050565b803562ffffff81168114620017d057600080fd5b919050565b8060020b81146200151b57600080fd5b60008060008060008060c08789031215620017ff57600080fd5b86356200180c8162001505565b955060208701356200181e8162001505565b94506200182e60408801620017bc565b9350606087013561ffff811681146200184657600080fd5b925060808701356200185881620017d5565b915060a08701356200186a81620017d5565b809150509295509295509295565b600080600080600060a086880312156200189157600080fd5b85356200189e8162001505565b94506020860135620018b08162001505565b9350620018c060408701620017bc565b92506060860135620018d281620017d5565b91506080860135620018e481620017d5565b809150509295509295909350565b600080604083850312156200190657600080fd5b8235620019138162001505565b91506020830135620019258162001505565b809150509250929050565b6000806000606084860312156200194657600080fd5b8335620019538162001505565b92506020840135620019658162001505565b91506040840135620019778162001505565b809150509250925092565b60208082526022908201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206d616e616760408201526132b960f11b606082015260800190565b6001600160a01b0392831681529116602082015260400190565b634e487b7160e01b600052603260045260246000fd5b6000808335601e1984360301811262001a0c57600080fd5b8301803591506001600160401b0382111562001a2757600080fd5b6020019150368190038213156200134f57600080fd5b6001600160a01b03841681526040602082018190528101829052818360608301376000818301606090810191909152601f909201601f1916010192915050565b634e487b7160e01b600052601160045260246000fd5b60006001820162001aa85762001aa862001a7d565b5060010190565b80820180821115620007f657620007f662001a7d565b60006020828403121562001ad857600080fd5b81516001600160401b038082111562001af057600080fd5b818401915084601f83011262001b0557600080fd5b81518181111562001b1a5762001b1a6200153e565b62001b2f601f8201601f191660200162001554565b915080825285602082850101111562001b4757600080fd5b62001b5a81602084016020860162001704565b50949350505050565b60006020828403121562001b7657600080fd5b815162000ed38162001505565b60e08152600062001b9860e08301896200172a565b82810360208401526005815264472d554e4960d81b60208201526040810191505060018060a01b03808816604084015261ffff871660608401528560020b60808401528460020b60a084015280841660c084015250979650505050505050565b6000865162001c0c818460208b0162001704565b86519083019062001c22818360208b0162001704565b865191019062001c37818360208a0162001704565b855191019062001c4c81836020890162001704565b845191019062001c6181836020880162001704565b01979650505050505050565b60006020828403121562001c8057600080fd5b815162000ed381620017d5565b60008260020b8062001caf57634e487b7160e01b600052601260045260246000fd5b808360020b079150509291505056fe6080604052604051610992380380610992833981016040819052610022916101de565b61002c838261003d565b61003582610119565b5050506102ca565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc8054908390556040516001600160a01b0380851691908316907f5570d70a002632a7b0b3c9304cc89efb62d8da9eca0dbd7752c83b737906829690600090a3815115610114576000836001600160a01b0316836040516100be91906102ae565b600060405180830381855af49150503d80600081146100f9576040519150601f19603f3d011682016040523d82523d6000602084013e6100fe565b606091505b5050905080610112573d806000803e806000fd5b505b505050565b60006101316000805160206109728339815191525490565b90508160008051602061097283398151915255816001600160a01b0316816001600160a01b03167fdf435d422321da6b195902d70fc417c06a32f88379c20dd8f2a8da07088cec2960405160405180910390a35050565b80516001600160a01b038116811461019f57600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60005b838110156101d55781810151838201526020016101bd565b50506000910152565b6000806000606084860312156101f357600080fd5b6101fc84610188565b925061020a60208501610188565b60408501519092506001600160401b038082111561022757600080fd5b818601915086601f83011261023b57600080fd5b81518181111561024d5761024d6101a4565b604051601f8201601f19908116603f01168101908382118183101715610275576102756101a4565b8160405282815289602084870101111561028e57600080fd5b61029f8360208301602088016101ba565b80955050505050509250925092565b600082516102c08184602087016101ba565b9190910192915050565b610699806102d96000396000f3fe60806040526004361061004e5760003560e01c806301ffc9a71461009b5780633659cfe6146100d05780633e47158c146100f05780634f1ef2861461011d5780638356ca4f1461013057610091565b366100915760405162461bcd60e51b815260206004820152600e60248201526d115512115497d491529150d5115160921b60448201526064015b60405180910390fd5b610099610150565b005b3480156100a757600080fd5b506100bb6100b63660046104c7565b610189565b60405190151581526020015b60405180910390f35b3480156100dc57600080fd5b506100996100eb36600461050d565b61026f565b3480156100fc57600080fd5b506101056102c3565b6040516001600160a01b0390911681526020016100c7565b61009961012b366004610528565b6102d2565b34801561013c57600080fd5b5061009961014b36600461050d565b61034f565b6000805160206106448339815191525460003681823780813683855af491503d8082833e82801561017f578183f35b8183fd5b50505050565b60006301ffc9a760e01b6001600160e01b0319831614806101ba57506307f5828d60e41b6001600160e01b03198316145b156101c757506001919050565b6001600160e01b031980831690036101e157506000919050565b600080516020610644833981519152546040516301ffc9a760e01b81526001600160e01b0319841660048201526001600160a01b038216906301ffc9a790602401602060405180830381865afa92505050801561025b575060408051601f3d908101601f19168201909252610258918101906105aa565b60015b6102685750600092915050565b9392505050565b610277610390565b6001600160a01b0316336001600160a01b0316146102a75760405162461bcd60e51b8152600401610088906105cc565b6102c081604051806020016040528060008152506103a3565b50565b60006102cd610390565b905090565b6102da610390565b6001600160a01b0316336001600160a01b03161461030a5760405162461bcd60e51b8152600401610088906105cc565b61034a8383838080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506103a392505050565b505050565b610357610390565b6001600160a01b0316336001600160a01b0316146103875760405162461bcd60e51b8152600401610088906105cc565b6102c081610466565b6000805160206106248339815191525490565b6000805160206106448339815191528054908390556040516001600160a01b0380851691908316907f5570d70a002632a7b0b3c9304cc89efb62d8da9eca0dbd7752c83b737906829690600090a381511561034a576000836001600160a01b03168360405161041291906105f4565b600060405180830381855af49150503d806000811461044d576040519150601f19603f3d011682016040523d82523d6000602084013e610452565b606091505b5050905080610183573d806000803e806000fd5b6000610470610390565b90508160008051602061062483398151915255816001600160a01b0316816001600160a01b03167fdf435d422321da6b195902d70fc417c06a32f88379c20dd8f2a8da07088cec2960405160405180910390a35050565b6000602082840312156104d957600080fd5b81356001600160e01b03198116811461026857600080fd5b80356001600160a01b038116811461050857600080fd5b919050565b60006020828403121561051f57600080fd5b610268826104f1565b60008060006040848603121561053d57600080fd5b610546846104f1565b925060208401356001600160401b038082111561056257600080fd5b818601915086601f83011261057657600080fd5b81358181111561058557600080fd5b87602082850101111561059757600080fd5b6020830194508093505050509250925092565b6000602082840312156105bc57600080fd5b8151801515811461026857600080fd5b6020808252600e908201526d1393d517d055551213d49256915160921b604082015260600190565b6000825160005b8181101561061557602081860181015185830152016105fb565b50600092019182525091905056feb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbca2646970667358221220f8092c6d4e38cdaacdb3c899e6c75d21baaeaba76b22f353673f931b1f0f8a9b64736f6c63430008130033b53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61038be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0a2646970667358221220bab4dc364f42f8e82ed2983d450c7f7b787f86ecc2b056c62a10271dfd59e29364736f6c63430008130033", diff --git a/lib/g-uni-v1-core/deployments/arbitrumSepolia/GUniFactory_Proxy.json b/lib/g-uni-v1-core/deployments/arbitrumSepolia/GUniFactory_Proxy.json index a99a904e4..7ac4f1028 100644 --- a/lib/g-uni-v1-core/deployments/arbitrumSepolia/GUniFactory_Proxy.json +++ b/lib/g-uni-v1-core/deployments/arbitrumSepolia/GUniFactory_Proxy.json @@ -1,5 +1,5 @@ { - "address": "0x7f502e91182338F19CB6F4B02B33B33feD1c5000", + "address": "0x39AC4439e6CB9427C073259e5742529cE46DD663", "abi": [ { "inputs": [ @@ -145,57 +145,56 @@ "type": "receive" } ], - "transactionHash": "0x9b83e7b0549ce4adfcc2ffbdfb847572df815ca36cb5951ffecf2136042ff281", + "transactionHash": "0xa994440a2ad7747eb9c88bea6b326358d7d24f1d345f0ed3b425561b05cf824f", "receipt": { "to": null, - "from": "0x5fCfdc65044bf008A6b473512D34102282Ee43a6", - "contractAddress": "0x7f502e91182338F19CB6F4B02B33B33feD1c5000", - "transactionIndex": 3, - "gasUsed": "6114773", - "logsBloom": "0x00101000000020000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000400000000000000000000000000000000000000000000000008008000000000000000000000000000200000000000000020000000001000000000800000000002000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000100000200000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000020000000000000000000000400000000000000000000000000000000000000000000", - "blockHash": "0xf177e051cdb89f5b045dfa101135f95bd01e47ac4dc9fb9096403347f9c6c7e0", - "transactionHash": "0x9b83e7b0549ce4adfcc2ffbdfb847572df815ca36cb5951ffecf2136042ff281", + "from": "0xB47C8e4bEb28af80eDe5E5bF474927b110Ef2c0e", + "contractAddress": "0x39AC4439e6CB9427C073259e5742529cE46DD663", + "transactionIndex": 4, + "gasUsed": "1375415", + "logsBloom": "0x00100000000020000000000000000000000000000000000000000000000000000000000000020000000400000000000000000000000000000000000000000000000000000000000000000000000008000000000000000000000400000200000000000000020010000000000000000800000000002000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000200000000000000080000000000000000000000000000000000000000000000000010000000000000000000000000000020000000000000000000080400000000000000000000000000000000000000000000", + "blockHash": "0xf5b7b2abe69c5722bd1b5142d00597648f1d6aeb9e41fe577400c4451de3259b", + "transactionHash": "0xa994440a2ad7747eb9c88bea6b326358d7d24f1d345f0ed3b425561b05cf824f", "logs": [ { - "transactionIndex": 3, - "blockNumber": 57912178, - "transactionHash": "0x9b83e7b0549ce4adfcc2ffbdfb847572df815ca36cb5951ffecf2136042ff281", - "address": "0x7f502e91182338F19CB6F4B02B33B33feD1c5000", + "transactionIndex": 4, + "blockNumber": 53304410, + "transactionHash": "0xa994440a2ad7747eb9c88bea6b326358d7d24f1d345f0ed3b425561b05cf824f", + "address": "0x39AC4439e6CB9427C073259e5742529cE46DD663", "topics": [ "0x5570d70a002632a7b0b3c9304cc89efb62d8da9eca0dbd7752c83b7379068296", "0x0000000000000000000000000000000000000000000000000000000000000000", - "0x0000000000000000000000009ff468bd1de89f0229193f1f8f0ba0e265ba026a" + "0x00000000000000000000000090608f57161ac771b28fb0adcd2434cfa1463201" ], "data": "0x", - "logIndex": 6, - "blockHash": "0xf177e051cdb89f5b045dfa101135f95bd01e47ac4dc9fb9096403347f9c6c7e0" + "logIndex": 4, + "blockHash": "0xf5b7b2abe69c5722bd1b5142d00597648f1d6aeb9e41fe577400c4451de3259b" }, { - "transactionIndex": 3, - "blockNumber": 57912178, - "transactionHash": "0x9b83e7b0549ce4adfcc2ffbdfb847572df815ca36cb5951ffecf2136042ff281", - "address": "0x7f502e91182338F19CB6F4B02B33B33feD1c5000", + "transactionIndex": 4, + "blockNumber": 53304410, + "transactionHash": "0xa994440a2ad7747eb9c88bea6b326358d7d24f1d345f0ed3b425561b05cf824f", + "address": "0x39AC4439e6CB9427C073259e5742529cE46DD663", "topics": [ "0xdf435d422321da6b195902d70fc417c06a32f88379c20dd8f2a8da07088cec29", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x000000000000000000000000b47c8e4beb28af80ede5e5bf474927b110ef2c0e" ], "data": "0x", - "logIndex": 7, - "blockHash": "0xf177e051cdb89f5b045dfa101135f95bd01e47ac4dc9fb9096403347f9c6c7e0" + "logIndex": 5, + "blockHash": "0xf5b7b2abe69c5722bd1b5142d00597648f1d6aeb9e41fe577400c4451de3259b" } ], - "blockNumber": 57912178, - "cumulativeGasUsed": "9556108", + "blockNumber": 53304410, + "cumulativeGasUsed": "2551868", "status": 1, "byzantium": true }, "args": [ - "0x9ff468bd1De89F0229193F1F8f0bA0e265bA026a", + "0x90608F57161aC771b28fb0adCd2434cfa1463201", "0xB47C8e4bEb28af80eDe5E5bF474927b110Ef2c0e", - "0xc0c53b8b000000000000000000000000ce7427a94bc9b8a90e2c8d91cb0247d779819437000000000000000000000000b47c8e4beb28af80ede5e5bf474927b110ef2c0e000000000000000000000000b47c8e4beb28af80ede5e5bf474927b110ef2c0e" + "0xc0c53b8b00000000000000000000000090608f57161ac771b28fb0adcd2434cfa1463201000000000000000000000000b47c8e4beb28af80ede5e5bf474927b110ef2c0e000000000000000000000000b47c8e4beb28af80ede5e5bf474927b110ef2c0e" ], - "numDeployments": 1, "solcInputHash": "f1f932b5297d788fce5c0abb03e1e395", "metadata": "{\"compiler\":{\"version\":\"0.8.19+commit.7dd6d404\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"implementationAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"adminAddress\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"stateMutability\":\"payable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousAdmin\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newAdmin\",\"type\":\"address\"}],\"name\":\"ProxyAdminTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousImplementation\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"ProxyImplementationUpdated\",\"type\":\"event\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"inputs\":[],\"name\":\"proxyAdmin\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"id\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newAdmin\",\"type\":\"address\"}],\"name\":\"transferProxyAdmin\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"upgradeTo\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"upgradeToAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"notice\":\"Proxy implementing EIP173 for ownership management\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/vendor/proxy/EIP173Proxy.sol\":\"EIP173Proxy\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":1},\"remappings\":[]},\"sources\":{\"contracts/vendor/proxy/EIP173Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity 0.8.19;\\n\\nimport \\\"./Proxy.sol\\\";\\n\\ninterface ERC165 {\\n function supportsInterface(bytes4 id) external view returns (bool);\\n}\\n\\n///@notice Proxy implementing EIP173 for ownership management\\ncontract EIP173Proxy is Proxy {\\n // ////////////////////////// EVENTS ///////////////////////////////////////////////////////////////////////\\n\\n event ProxyAdminTransferred(\\n address indexed previousAdmin,\\n address indexed newAdmin\\n );\\n\\n // /////////////////////// CONSTRUCTOR //////////////////////////////////////////////////////////////////////\\n\\n constructor(\\n address implementationAddress,\\n address adminAddress,\\n bytes memory data\\n ) payable {\\n _setImplementation(implementationAddress, data);\\n _setProxyAdmin(adminAddress);\\n }\\n\\n // ///////////////////// EXTERNAL ///////////////////////////////////////////////////////////////////////////\\n\\n function proxyAdmin() external view returns (address) {\\n return _proxyAdmin();\\n }\\n\\n function supportsInterface(bytes4 id) external view returns (bool) {\\n if (id == 0x01ffc9a7 || id == 0x7f5828d0) {\\n return true;\\n }\\n if (id == 0xFFFFFFFF) {\\n return false;\\n }\\n\\n ERC165 implementation;\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n implementation := sload(\\n 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc\\n )\\n }\\n\\n // Technically this is not standard compliant as ERC-165 require 30,000 gas which that call cannot ensure\\n // because it is itself inside `supportsInterface` that might only get 30,000 gas.\\n // In practise this is unlikely to be an issue.\\n try implementation.supportsInterface(id) returns (bool support) {\\n return support;\\n } catch {\\n return false;\\n }\\n }\\n\\n function transferProxyAdmin(address newAdmin) external onlyProxyAdmin {\\n _setProxyAdmin(newAdmin);\\n }\\n\\n function upgradeTo(address newImplementation) external onlyProxyAdmin {\\n _setImplementation(newImplementation, \\\"\\\");\\n }\\n\\n function upgradeToAndCall(address newImplementation, bytes calldata data)\\n external\\n payable\\n onlyProxyAdmin\\n {\\n _setImplementation(newImplementation, data);\\n }\\n\\n // /////////////////////// MODIFIERS ////////////////////////////////////////////////////////////////////////\\n\\n modifier onlyProxyAdmin() {\\n require(msg.sender == _proxyAdmin(), \\\"NOT_AUTHORIZED\\\");\\n _;\\n }\\n\\n // ///////////////////////// INTERNAL //////////////////////////////////////////////////////////////////////\\n\\n function _proxyAdmin() internal view returns (address adminAddress) {\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n adminAddress := sload(\\n 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103\\n )\\n }\\n }\\n\\n function _setProxyAdmin(address newAdmin) internal {\\n address previousAdmin = _proxyAdmin();\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n sstore(\\n 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103,\\n newAdmin\\n )\\n }\\n emit ProxyAdminTransferred(previousAdmin, newAdmin);\\n }\\n}\\n\",\"keccak256\":\"0x3e2e1473604e7e42e99f77ad5e5d8eb8a3b6d0e63c154a9c6d9a223190372070\",\"license\":\"GPL-3.0\"},\"contracts/vendor/proxy/Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity 0.8.19;\\n\\n// EIP-1967\\nabstract contract Proxy {\\n // /////////////////////// EVENTS ///////////////////////////////////////////////////////////////////////////\\n\\n event ProxyImplementationUpdated(\\n address indexed previousImplementation,\\n address indexed newImplementation\\n );\\n\\n // ///////////////////// EXTERNAL ///////////////////////////////////////////////////////////////////////////\\n\\n // prettier-ignore\\n receive() external payable virtual {\\n revert(\\\"ETHER_REJECTED\\\"); // explicit reject by default\\n }\\n\\n fallback() external payable {\\n _fallback();\\n }\\n\\n // ///////////////////////// INTERNAL //////////////////////////////////////////////////////////////////////\\n\\n function _fallback() internal {\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n let implementationAddress := sload(\\n 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc\\n )\\n calldatacopy(0x0, 0x0, calldatasize())\\n let success := delegatecall(\\n gas(),\\n implementationAddress,\\n 0x0,\\n calldatasize(),\\n 0,\\n 0\\n )\\n let retSz := returndatasize()\\n returndatacopy(0, 0, retSz)\\n switch success\\n case 0 {\\n revert(0, retSz)\\n }\\n default {\\n return(0, retSz)\\n }\\n }\\n }\\n\\n function _setImplementation(address newImplementation, bytes memory data)\\n internal\\n {\\n address previousImplementation;\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n previousImplementation := sload(\\n 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc\\n )\\n }\\n\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n sstore(\\n 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc,\\n newImplementation\\n )\\n }\\n\\n emit ProxyImplementationUpdated(\\n previousImplementation,\\n newImplementation\\n );\\n\\n if (data.length > 0) {\\n (bool success, ) = newImplementation.delegatecall(data);\\n if (!success) {\\n assembly {\\n // This assembly ensure the revert contains the exact string data\\n let returnDataSize := returndatasize()\\n returndatacopy(0, 0, returnDataSize)\\n revert(0, returnDataSize)\\n }\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0x5fd4f538f92f377d4e7b09fe8d5387eb1d5ff5ac95869c969be5049ae23439ba\",\"license\":\"GPL-3.0\"}},\"version\":1}", "bytecode": "0x6080604052604051610992380380610992833981016040819052610022916101de565b61002c838261003d565b61003582610119565b5050506102ca565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc8054908390556040516001600160a01b0380851691908316907f5570d70a002632a7b0b3c9304cc89efb62d8da9eca0dbd7752c83b737906829690600090a3815115610114576000836001600160a01b0316836040516100be91906102ae565b600060405180830381855af49150503d80600081146100f9576040519150601f19603f3d011682016040523d82523d6000602084013e6100fe565b606091505b5050905080610112573d806000803e806000fd5b505b505050565b60006101316000805160206109728339815191525490565b90508160008051602061097283398151915255816001600160a01b0316816001600160a01b03167fdf435d422321da6b195902d70fc417c06a32f88379c20dd8f2a8da07088cec2960405160405180910390a35050565b80516001600160a01b038116811461019f57600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60005b838110156101d55781810151838201526020016101bd565b50506000910152565b6000806000606084860312156101f357600080fd5b6101fc84610188565b925061020a60208501610188565b60408501519092506001600160401b038082111561022757600080fd5b818601915086601f83011261023b57600080fd5b81518181111561024d5761024d6101a4565b604051601f8201601f19908116603f01168101908382118183101715610275576102756101a4565b8160405282815289602084870101111561028e57600080fd5b61029f8360208301602088016101ba565b80955050505050509250925092565b600082516102c08184602087016101ba565b9190910192915050565b610699806102d96000396000f3fe60806040526004361061004e5760003560e01c806301ffc9a71461009b5780633659cfe6146100d05780633e47158c146100f05780634f1ef2861461011d5780638356ca4f1461013057610091565b366100915760405162461bcd60e51b815260206004820152600e60248201526d115512115497d491529150d5115160921b60448201526064015b60405180910390fd5b610099610150565b005b3480156100a757600080fd5b506100bb6100b63660046104c7565b610189565b60405190151581526020015b60405180910390f35b3480156100dc57600080fd5b506100996100eb36600461050d565b61026f565b3480156100fc57600080fd5b506101056102c3565b6040516001600160a01b0390911681526020016100c7565b61009961012b366004610528565b6102d2565b34801561013c57600080fd5b5061009961014b36600461050d565b61034f565b6000805160206106448339815191525460003681823780813683855af491503d8082833e82801561017f578183f35b8183fd5b50505050565b60006301ffc9a760e01b6001600160e01b0319831614806101ba57506307f5828d60e41b6001600160e01b03198316145b156101c757506001919050565b6001600160e01b031980831690036101e157506000919050565b600080516020610644833981519152546040516301ffc9a760e01b81526001600160e01b0319841660048201526001600160a01b038216906301ffc9a790602401602060405180830381865afa92505050801561025b575060408051601f3d908101601f19168201909252610258918101906105aa565b60015b6102685750600092915050565b9392505050565b610277610390565b6001600160a01b0316336001600160a01b0316146102a75760405162461bcd60e51b8152600401610088906105cc565b6102c081604051806020016040528060008152506103a3565b50565b60006102cd610390565b905090565b6102da610390565b6001600160a01b0316336001600160a01b03161461030a5760405162461bcd60e51b8152600401610088906105cc565b61034a8383838080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506103a392505050565b505050565b610357610390565b6001600160a01b0316336001600160a01b0316146103875760405162461bcd60e51b8152600401610088906105cc565b6102c081610466565b6000805160206106248339815191525490565b6000805160206106448339815191528054908390556040516001600160a01b0380851691908316907f5570d70a002632a7b0b3c9304cc89efb62d8da9eca0dbd7752c83b737906829690600090a381511561034a576000836001600160a01b03168360405161041291906105f4565b600060405180830381855af49150503d806000811461044d576040519150601f19603f3d011682016040523d82523d6000602084013e610452565b606091505b5050905080610183573d806000803e806000fd5b6000610470610390565b90508160008051602061062483398151915255816001600160a01b0316816001600160a01b03167fdf435d422321da6b195902d70fc417c06a32f88379c20dd8f2a8da07088cec2960405160405180910390a35050565b6000602082840312156104d957600080fd5b81356001600160e01b03198116811461026857600080fd5b80356001600160a01b038116811461050857600080fd5b919050565b60006020828403121561051f57600080fd5b610268826104f1565b60008060006040848603121561053d57600080fd5b610546846104f1565b925060208401356001600160401b038082111561056257600080fd5b818601915086601f83011261057657600080fd5b81358181111561058557600080fd5b87602082850101111561059757600080fd5b6020830194508093505050509250925092565b6000602082840312156105bc57600080fd5b8151801515811461026857600080fd5b6020808252600e908201526d1393d517d055551213d49256915160921b604082015260600190565b6000825160005b8181101561061557602081860181015185830152016105fb565b50600092019182525091905056feb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbca2646970667358221220f8092c6d4e38cdaacdb3c899e6c75d21baaeaba76b22f353673f931b1f0f8a9b64736f6c63430008130033b53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103", diff --git a/lib/g-uni-v1-core/deployments/arbitrumSepolia/GUniPool.json b/lib/g-uni-v1-core/deployments/arbitrumSepolia/GUniPool.json index afd2eb704..be35676c8 100644 --- a/lib/g-uni-v1-core/deployments/arbitrumSepolia/GUniPool.json +++ b/lib/g-uni-v1-core/deployments/arbitrumSepolia/GUniPool.json @@ -1,5 +1,5 @@ { - "address": "0xCE7427a94bc9B8A90E2C8d91cB0247D779819437", + "address": "0xF3e2578C66071a637F06cc02b1c11DeC0784C1A6", "abi": [ { "inputs": [ @@ -1150,26 +1150,25 @@ "type": "function" } ], - "transactionHash": "0x8556c6e13c6c9182f77b188412ef62e184732d732ac66d5bd24f69a7a9f43a94", + "transactionHash": "0x8ca1d397f287c7ac87d7677c74656480c141f7242e78f3b9ad4612cf77a39fbe", "receipt": { "to": null, - "from": "0x5fCfdc65044bf008A6b473512D34102282Ee43a6", - "contractAddress": "0xCE7427a94bc9B8A90E2C8d91cB0247D779819437", + "from": "0xB47C8e4bEb28af80eDe5E5bF474927b110Ef2c0e", + "contractAddress": "0xF3e2578C66071a637F06cc02b1c11DeC0784C1A6", "transactionIndex": 4, - "gasUsed": "40852250", + "gasUsed": "5709523", "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x8819a719eb6a9cbd16f6db1117ab4f4a0fb6aa7a2dc26cb4d5553ccda2071636", - "transactionHash": "0x8556c6e13c6c9182f77b188412ef62e184732d732ac66d5bd24f69a7a9f43a94", + "blockHash": "0xde2678056ddc18fe88264d249865e9cc47de73569a4988671c34dc0cf897d472", + "transactionHash": "0x8ca1d397f287c7ac87d7677c74656480c141f7242e78f3b9ad4612cf77a39fbe", "logs": [], - "blockNumber": 57910853, - "cumulativeGasUsed": "48848339", + "blockNumber": 54644356, + "cumulativeGasUsed": "6328188", "status": 1, "byzantium": true }, "args": [ "0xB47C8e4bEb28af80eDe5E5bF474927b110Ef2c0e" ], - "numDeployments": 1, "solcInputHash": "f1f932b5297d788fce5c0abb03e1e395", "metadata": "{\"compiler\":{\"version\":\"0.8.19+commit.7dd6d404\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address payable\",\"name\":\"_gelato\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"burnAmount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount0Out\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount1Out\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint128\",\"name\":\"liquidityBurned\",\"type\":\"uint128\"}],\"name\":\"Burned\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"feesEarned0\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"feesEarned1\",\"type\":\"uint256\"}],\"name\":\"FeesEarned\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"mintAmount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount0In\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount1In\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint128\",\"name\":\"liquidityMinted\",\"type\":\"uint128\"}],\"name\":\"Minted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousManager\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newManager\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"int24\",\"name\":\"lowerTick_\",\"type\":\"int24\"},{\"indexed\":false,\"internalType\":\"int24\",\"name\":\"upperTick_\",\"type\":\"int24\"},{\"indexed\":false,\"internalType\":\"uint128\",\"name\":\"liquidityBefore\",\"type\":\"uint128\"},{\"indexed\":false,\"internalType\":\"uint128\",\"name\":\"liquidityAfter\",\"type\":\"uint128\"}],\"name\":\"Rebalance\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint16\",\"name\":\"managerFee\",\"type\":\"uint16\"}],\"name\":\"SetManagerFee\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"oldAdminTreasury\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newAdminTreasury\",\"type\":\"address\"}],\"name\":\"UpdateAdminTreasury\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint16\",\"name\":\"gelatoRebalanceBPS\",\"type\":\"uint16\"},{\"indexed\":false,\"internalType\":\"uint16\",\"name\":\"gelatoWithdrawBPS\",\"type\":\"uint16\"},{\"indexed\":false,\"internalType\":\"uint16\",\"name\":\"gelatoSlippageBPS\",\"type\":\"uint16\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"gelatoSlippageInterval\",\"type\":\"uint32\"}],\"name\":\"UpdateGelatoParams\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"GELATO\",\"outputs\":[{\"internalType\":\"address payable\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"burnAmount\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"}],\"name\":\"burn\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"amount0\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amount1\",\"type\":\"uint256\"},{\"internalType\":\"uint128\",\"name\":\"liquidityBurned\",\"type\":\"uint128\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"subtractedValue\",\"type\":\"uint256\"}],\"name\":\"decreaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"int24\",\"name\":\"newLowerTick\",\"type\":\"int24\"},{\"internalType\":\"int24\",\"name\":\"newUpperTick\",\"type\":\"int24\"},{\"internalType\":\"uint160\",\"name\":\"swapThresholdPrice\",\"type\":\"uint160\"},{\"internalType\":\"uint256\",\"name\":\"swapAmountBPS\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"zeroForOne\",\"type\":\"bool\"}],\"name\":\"executiveRebalance\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"gelatoBalance0\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"gelatoBalance1\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"gelatoFeeBPS\",\"outputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"gelatoRebalanceBPS\",\"outputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"gelatoSlippageBPS\",\"outputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"gelatoSlippageInterval\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"gelatoWithdrawBPS\",\"outputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount0Max\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amount1Max\",\"type\":\"uint256\"}],\"name\":\"getMintAmounts\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"amount0\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amount1\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"mintAmount\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getPositionID\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"positionID\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getUnderlyingBalances\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"amount0Current\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amount1Current\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint160\",\"name\":\"sqrtRatioX96\",\"type\":\"uint160\"}],\"name\":\"getUnderlyingBalancesAtPrice\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"amount0Current\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amount1Current\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"addedValue\",\"type\":\"uint256\"}],\"name\":\"increaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"_name\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"_symbol\",\"type\":\"string\"},{\"internalType\":\"address\",\"name\":\"_pool\",\"type\":\"address\"},{\"internalType\":\"uint16\",\"name\":\"_managerFeeBPS\",\"type\":\"uint16\"},{\"internalType\":\"int24\",\"name\":\"_lowerTick\",\"type\":\"int24\"},{\"internalType\":\"int24\",\"name\":\"_upperTick\",\"type\":\"int24\"},{\"internalType\":\"address\",\"name\":\"_manager_\",\"type\":\"address\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_managerFeeBPS\",\"type\":\"uint16\"}],\"name\":\"initializeManagerFee\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"lowerTick\",\"outputs\":[{\"internalType\":\"int24\",\"name\":\"\",\"type\":\"int24\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"manager\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"managerBalance0\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"managerBalance1\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"managerFeeBPS\",\"outputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"managerTreasury\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"mintAmount\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"}],\"name\":\"mint\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"amount0\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amount1\",\"type\":\"uint256\"},{\"internalType\":\"uint128\",\"name\":\"liquidityMinted\",\"type\":\"uint128\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pool\",\"outputs\":[{\"internalType\":\"contract IUniswapV3Pool\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint160\",\"name\":\"swapThresholdPrice\",\"type\":\"uint160\"},{\"internalType\":\"uint256\",\"name\":\"swapAmountBPS\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"zeroForOne\",\"type\":\"bool\"},{\"internalType\":\"uint256\",\"name\":\"feeAmount\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"paymentToken\",\"type\":\"address\"}],\"name\":\"rebalance\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"token0\",\"outputs\":[{\"internalType\":\"contract IERC20\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"token1\",\"outputs\":[{\"internalType\":\"contract IERC20\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount0Owed\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amount1Owed\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"name\":\"uniswapV3MintCallback\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"int256\",\"name\":\"amount0Delta\",\"type\":\"int256\"},{\"internalType\":\"int256\",\"name\":\"amount1Delta\",\"type\":\"int256\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"name\":\"uniswapV3SwapCallback\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"newRebalanceBPS\",\"type\":\"uint16\"},{\"internalType\":\"uint16\",\"name\":\"newWithdrawBPS\",\"type\":\"uint16\"},{\"internalType\":\"uint16\",\"name\":\"newSlippageBPS\",\"type\":\"uint16\"},{\"internalType\":\"uint32\",\"name\":\"newSlippageInterval\",\"type\":\"uint32\"},{\"internalType\":\"address\",\"name\":\"newTreasury\",\"type\":\"address\"}],\"name\":\"updateGelatoParams\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"upperTick\",\"outputs\":[{\"internalType\":\"int24\",\"name\":\"\",\"type\":\"int24\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"version\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"feeAmount\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"feeToken\",\"type\":\"address\"}],\"name\":\"withdrawGelatoBalance\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"feeAmount\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"feeToken\",\"type\":\"address\"}],\"name\":\"withdrawManagerBalance\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"events\":{\"Approval(address,address,uint256)\":{\"details\":\"Emitted when the allowance of a `spender` for an `owner` is set by a call to {approve}. `value` is the new allowance.\"},\"Transfer(address,address,uint256)\":{\"details\":\"Emitted when `value` tokens are moved from one account (`from`) to another (`to`). Note that `value` may be zero.\"}},\"kind\":\"dev\",\"methods\":{\"allowance(address,address)\":{\"details\":\"See {IERC20-allowance}.\"},\"approve(address,uint256)\":{\"details\":\"See {IERC20-approve}. Requirements: - `spender` cannot be the zero address.\"},\"balanceOf(address)\":{\"details\":\"See {IERC20-balanceOf}.\"},\"burn(uint256,address)\":{\"params\":{\"burnAmount\":\"The number of G-UNI tokens to burn\",\"receiver\":\"The account to receive the underlying amounts of token0 and token1\"},\"returns\":{\"amount0\":\"amount of token0 transferred to receiver for burning `burnAmount`\",\"amount1\":\"amount of token1 transferred to receiver for burning `burnAmount`\",\"liquidityBurned\":\"amount of liquidity removed from the underlying Uniswap V3 position\"}},\"decimals()\":{\"details\":\"Returns the number of decimals used to get its user representation. For example, if `decimals` equals `2`, a balance of `505` tokens should be displayed to a user as `5,05` (`505 / 10 ** 2`). Tokens usually opt for a value of 18, imitating the relationship between Ether and Wei. This is the value {ERC20} uses, unless this function is overridden; NOTE: This information is only used for _display_ purposes: it in no way affects any of the arithmetic of the contract, including {IERC20-balanceOf} and {IERC20-transfer}.\"},\"decreaseAllowance(address,uint256)\":{\"details\":\"Atomically decreases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address. - `spender` must have allowance for the caller of at least `subtractedValue`.\"},\"executiveRebalance(int24,int24,uint160,uint256,bool)\":{\"details\":\"When changing the range the inventory of token0 and token1 may be rebalanced with a swap to deposit as much liquidity as possible into the new position. Swap parameters can be computed by simulating the whole operation: remove all liquidity, deposit as much as possible into new position, then observe how much of token0 or token1 is leftover. Swap a proportion of this leftover to deposit more liquidity into the position, since any leftover will be unused and sit idle until the next rebalance.\",\"params\":{\"newLowerTick\":\"The new lower bound of the position's range\",\"newUpperTick\":\"The new upper bound of the position's range\",\"swapAmountBPS\":\"amount of token to swap as proportion of total. Pass 0 to ignore swap.\",\"swapThresholdPrice\":\"slippage parameter on the swap as a max or min sqrtPriceX96\",\"zeroForOne\":\"Which token to input into the swap (true = token0, false = token1)\"}},\"getMintAmounts(uint256,uint256)\":{\"params\":{\"amount0Max\":\"The maximum amount of token1 to forward on mint\"},\"returns\":{\"amount0\":\"actual amount of token0 to forward when minting `mintAmount`\",\"amount1\":\"actual amount of token1 to forward when minting `mintAmount`\",\"mintAmount\":\"maximum number of G-UNI tokens to mint\"}},\"getUnderlyingBalances()\":{\"returns\":{\"amount0Current\":\"current total underlying balance of token0\",\"amount1Current\":\"current total underlying balance of token1\"}},\"increaseAllowance(address,uint256)\":{\"details\":\"Atomically increases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address.\"},\"initialize(string,string,address,uint16,int24,int24,address)\":{\"params\":{\"_lowerTick\":\"initial upperTick (only changeable with executiveRebalance)\",\"_managerFeeBPS\":\"proportion of fees earned that go to manager treasury note that the 4 above params are NOT UPDATEABLE AFTER INILIALIZATION\",\"_manager_\":\"address of manager (ownership can be transferred)\",\"_name\":\"name of G-UNI token\",\"_pool\":\"address of Uniswap V3 pool\",\"_symbol\":\"symbol of G-UNI token\"}},\"initializeManagerFee(uint16)\":{\"params\":{\"_managerFeeBPS\":\"proportion of fees earned that are credited to manager in Basis Points\"}},\"manager()\":{\"details\":\"Returns the address of the current manager.\"},\"mint(uint256,address)\":{\"details\":\"to compute the amouint of tokens necessary to mint `mintAmount` see getMintAmounts\",\"params\":{\"mintAmount\":\"The number of G-UNI tokens to mint\",\"receiver\":\"The account to receive the minted tokens\"},\"returns\":{\"amount0\":\"amount of token0 transferred from msg.sender to mint `mintAmount`\",\"amount1\":\"amount of token1 transferred from msg.sender to mint `mintAmount`\",\"liquidityMinted\":\"amount of liquidity added to the underlying Uniswap V3 position\"}},\"name()\":{\"details\":\"Returns the name of the token.\"},\"renounceOwnership()\":{\"details\":\"Leaves the contract without manager. It will not be possible to call `onlyManager` functions anymore. Can only be called by the current manager. NOTE: Renouncing ownership will leave the contract without an manager, thereby removing any functionality that is only available to the manager.\"},\"symbol()\":{\"details\":\"Returns the symbol of the token, usually a shorter version of the name.\"},\"totalSupply()\":{\"details\":\"See {IERC20-totalSupply}.\"},\"transfer(address,uint256)\":{\"details\":\"See {IERC20-transfer}. Requirements: - `recipient` cannot be the zero address. - the caller must have a balance of at least `amount`.\"},\"transferFrom(address,address,uint256)\":{\"details\":\"See {IERC20-transferFrom}. Emits an {Approval} event indicating the updated allowance. This is not required by the EIP. See the note at the beginning of {ERC20}. Requirements: - `sender` and `recipient` cannot be the zero address. - `sender` must have a balance of at least `amount`. - the caller must have allowance for ``sender``'s tokens of at least `amount`.\"},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current manager.\"},\"updateGelatoParams(uint16,uint16,uint16,uint32,address)\":{\"params\":{\"newRebalanceBPS\":\"controls frequency of gelato rebalances: gas fee to execute rebalance can be gelatoRebalanceBPS proportion of fees earned since last rebalance\",\"newSlippageBPS\":\"maximum slippage on swaps during gelato rebalance\",\"newSlippageInterval\":\"length of time for TWAP used in computing slippage on swaps\",\"newTreasury\":\"address where managerFee withdrawals are sent\",\"newWithdrawBPS\":\"controls frequency of gelato withdrawals: gas fee to execute withdrawal can be gelatoWithdrawBPS proportion of fees accrued since last withdraw\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"burn(uint256,address)\":{\"notice\":\"burn G-UNI tokens (fractional shares of a Uniswap V3 position) and receive tokens\"},\"executiveRebalance(int24,int24,uint160,uint256,bool)\":{\"notice\":\"Change the range of underlying UniswapV3 position, only manager can call\"},\"getMintAmounts(uint256,uint256)\":{\"notice\":\"compute maximum G-UNI tokens that can be minted from `amount0Max` and `amount1Max`\"},\"getUnderlyingBalances()\":{\"notice\":\"compute total underlying holdings of the G-UNI token supply includes current liquidity invested in uniswap position, current fees earned and any uninvested leftover (but does not include manager or gelato fees accrued)\"},\"initialize(string,string,address,uint16,int24,int24,address)\":{\"notice\":\"initialize storage variables on a new G-UNI pool, only called once\"},\"initializeManagerFee(uint16)\":{\"notice\":\"initializeManagerFee sets a managerFee, only manager can call. If a manager fee was not set in the initialize function it can be set here but ONLY ONCE- after it is set to a non-zero value, managerFee can never be set again.\"},\"mint(uint256,address)\":{\"notice\":\"mint fungible G-UNI tokens, fractional shares of a Uniswap V3 position\"},\"rebalance(uint160,uint256,bool,uint256,address)\":{\"notice\":\"Reinvest fees earned into underlying position, only gelato executors can call Position bounds CANNOT be altered by gelato, only manager may via executiveRebalance. Frequency of rebalance configured with gelatoRebalanceBPS, alterable by manager.\"},\"uniswapV3MintCallback(uint256,uint256,bytes)\":{\"notice\":\"Uniswap V3 callback fn, called back on pool.mint\"},\"uniswapV3SwapCallback(int256,int256,bytes)\":{\"notice\":\"Uniswap v3 callback fn, called back on pool.swap\"},\"updateGelatoParams(uint16,uint16,uint16,uint32,address)\":{\"notice\":\"change configurable parameters, only manager can call\"},\"withdrawGelatoBalance(uint256,address)\":{\"notice\":\"withdraw gelato fees accrued, only gelato executors can call. Frequency of withdrawals configured with gelatoWithdrawBPS, alterable by manager.\"},\"withdrawManagerBalance(uint256,address)\":{\"notice\":\"withdraw manager fees accrued, only gelato executors can call. Target account to receive fees is managerTreasury, alterable by manager. Frequency of withdrawals configured with gelatoWithdrawBPS, alterable by manager.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/GUniPool.sol\":\"GUniPool\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":1},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n// solhint-disable-next-line compiler-version\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\\n * behind a proxy. Since a proxied contract can't have a constructor, it's common to move constructor logic to an\\n * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\\n * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\\n *\\n * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\\n * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.\\n *\\n * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\\n * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\\n */\\nabstract contract Initializable {\\n\\n /**\\n * @dev Indicates that the contract has been initialized.\\n */\\n bool private _initialized;\\n\\n /**\\n * @dev Indicates that the contract is in the process of being initialized.\\n */\\n bool private _initializing;\\n\\n /**\\n * @dev Modifier to protect an initializer function from being invoked twice.\\n */\\n modifier initializer() {\\n require(_initializing || !_initialized, \\\"Initializable: contract is already initialized\\\");\\n\\n bool isTopLevelCall = !_initializing;\\n if (isTopLevelCall) {\\n _initializing = true;\\n _initialized = true;\\n }\\n\\n _;\\n\\n if (isTopLevelCall) {\\n _initializing = false;\\n }\\n }\\n}\\n\",\"keccak256\":\"0x67d2f282a9678e58e878a0b774041ba7a01e2740a262aea97a3f681339914713\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\nimport \\\"../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Contract module that helps prevent reentrant calls to a function.\\n *\\n * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier\\n * available, which can be applied to functions to make sure there are no nested\\n * (reentrant) calls to them.\\n *\\n * Note that because there is a single `nonReentrant` guard, functions marked as\\n * `nonReentrant` may not call one another. This can be worked around by making\\n * those functions `private`, and then adding `external` `nonReentrant` entry\\n * points to them.\\n *\\n * TIP: If you would like to learn more about reentrancy and alternative ways\\n * to protect against it, check out our blog post\\n * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].\\n */\\nabstract contract ReentrancyGuardUpgradeable is Initializable {\\n // Booleans are more expensive than uint256 or any type that takes up a full\\n // word because each write operation emits an extra SLOAD to first read the\\n // slot's contents, replace the bits taken up by the boolean, and then write\\n // back. This is the compiler's defense against contract upgrades and\\n // pointer aliasing, and it cannot be disabled.\\n\\n // The values being non-zero value makes deployment a bit more expensive,\\n // but in exchange the refund on every call to nonReentrant will be lower in\\n // amount. Since refunds are capped to a percentage of the total\\n // transaction's gas, it is best to keep them low in cases like this one, to\\n // increase the likelihood of the full refund coming into effect.\\n uint256 private constant _NOT_ENTERED = 1;\\n uint256 private constant _ENTERED = 2;\\n\\n uint256 private _status;\\n\\n function __ReentrancyGuard_init() internal initializer {\\n __ReentrancyGuard_init_unchained();\\n }\\n\\n function __ReentrancyGuard_init_unchained() internal initializer {\\n _status = _NOT_ENTERED;\\n }\\n\\n /**\\n * @dev Prevents a contract from calling itself, directly or indirectly.\\n * Calling a `nonReentrant` function from another `nonReentrant`\\n * function is not supported. It is possible to prevent this from happening\\n * by making the `nonReentrant` function external, and make it call a\\n * `private` function that does the actual work.\\n */\\n modifier nonReentrant() {\\n // On the first call to nonReentrant, _notEntered will be true\\n require(_status != _ENTERED, \\\"ReentrancyGuard: reentrant call\\\");\\n\\n // Any calls to nonReentrant after this point will fail\\n _status = _ENTERED;\\n\\n _;\\n\\n // By storing the original value once again, a refund is triggered (see\\n // https://eips.ethereum.org/EIPS/eip-2200)\\n _status = _NOT_ENTERED;\\n }\\n uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0x89fa60d14355f7ae06af11e28fce2bb90c5c6186645d681a30e1b36234a4c210\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IERC20Upgradeable.sol\\\";\\nimport \\\"./extensions/IERC20MetadataUpgradeable.sol\\\";\\nimport \\\"../../utils/ContextUpgradeable.sol\\\";\\nimport \\\"../../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Implementation of the {IERC20} interface.\\n *\\n * This implementation is agnostic to the way tokens are created. This means\\n * that a supply mechanism has to be added in a derived contract using {_mint}.\\n * For a generic mechanism see {ERC20PresetMinterPauser}.\\n *\\n * TIP: For a detailed writeup see our guide\\n * https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How\\n * to implement supply mechanisms].\\n *\\n * We have followed general OpenZeppelin guidelines: functions revert instead\\n * of returning `false` on failure. This behavior is nonetheless conventional\\n * and does not conflict with the expectations of ERC20 applications.\\n *\\n * Additionally, an {Approval} event is emitted on calls to {transferFrom}.\\n * This allows applications to reconstruct the allowance for all accounts just\\n * by listening to said events. Other implementations of the EIP may not emit\\n * these events, as it isn't required by the specification.\\n *\\n * Finally, the non-standard {decreaseAllowance} and {increaseAllowance}\\n * functions have been added to mitigate the well-known issues around setting\\n * allowances. See {IERC20-approve}.\\n */\\ncontract ERC20Upgradeable is Initializable, ContextUpgradeable, IERC20Upgradeable, IERC20MetadataUpgradeable {\\n mapping (address => uint256) private _balances;\\n\\n mapping (address => mapping (address => uint256)) private _allowances;\\n\\n uint256 private _totalSupply;\\n\\n string private _name;\\n string private _symbol;\\n\\n /**\\n * @dev Sets the values for {name} and {symbol}.\\n *\\n * The defaut value of {decimals} is 18. To select a different value for\\n * {decimals} you should overload it.\\n *\\n * All two of these values are immutable: they can only be set once during\\n * construction.\\n */\\n function __ERC20_init(string memory name_, string memory symbol_) internal initializer {\\n __Context_init_unchained();\\n __ERC20_init_unchained(name_, symbol_);\\n }\\n\\n function __ERC20_init_unchained(string memory name_, string memory symbol_) internal initializer {\\n _name = name_;\\n _symbol = symbol_;\\n }\\n\\n /**\\n * @dev Returns the name of the token.\\n */\\n function name() public view virtual override returns (string memory) {\\n return _name;\\n }\\n\\n /**\\n * @dev Returns the symbol of the token, usually a shorter version of the\\n * name.\\n */\\n function symbol() public view virtual override returns (string memory) {\\n return _symbol;\\n }\\n\\n /**\\n * @dev Returns the number of decimals used to get its user representation.\\n * For example, if `decimals` equals `2`, a balance of `505` tokens should\\n * be displayed to a user as `5,05` (`505 / 10 ** 2`).\\n *\\n * Tokens usually opt for a value of 18, imitating the relationship between\\n * Ether and Wei. This is the value {ERC20} uses, unless this function is\\n * overridden;\\n *\\n * NOTE: This information is only used for _display_ purposes: it in\\n * no way affects any of the arithmetic of the contract, including\\n * {IERC20-balanceOf} and {IERC20-transfer}.\\n */\\n function decimals() public view virtual override returns (uint8) {\\n return 18;\\n }\\n\\n /**\\n * @dev See {IERC20-totalSupply}.\\n */\\n function totalSupply() public view virtual override returns (uint256) {\\n return _totalSupply;\\n }\\n\\n /**\\n * @dev See {IERC20-balanceOf}.\\n */\\n function balanceOf(address account) public view virtual override returns (uint256) {\\n return _balances[account];\\n }\\n\\n /**\\n * @dev See {IERC20-transfer}.\\n *\\n * Requirements:\\n *\\n * - `recipient` cannot be the zero address.\\n * - the caller must have a balance of at least `amount`.\\n */\\n function transfer(address recipient, uint256 amount) public virtual override returns (bool) {\\n _transfer(_msgSender(), recipient, amount);\\n return true;\\n }\\n\\n /**\\n * @dev See {IERC20-allowance}.\\n */\\n function allowance(address owner, address spender) public view virtual override returns (uint256) {\\n return _allowances[owner][spender];\\n }\\n\\n /**\\n * @dev See {IERC20-approve}.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n */\\n function approve(address spender, uint256 amount) public virtual override returns (bool) {\\n _approve(_msgSender(), spender, amount);\\n return true;\\n }\\n\\n /**\\n * @dev See {IERC20-transferFrom}.\\n *\\n * Emits an {Approval} event indicating the updated allowance. This is not\\n * required by the EIP. See the note at the beginning of {ERC20}.\\n *\\n * Requirements:\\n *\\n * - `sender` and `recipient` cannot be the zero address.\\n * - `sender` must have a balance of at least `amount`.\\n * - the caller must have allowance for ``sender``'s tokens of at least\\n * `amount`.\\n */\\n function transferFrom(address sender, address recipient, uint256 amount) public virtual override returns (bool) {\\n _transfer(sender, recipient, amount);\\n\\n uint256 currentAllowance = _allowances[sender][_msgSender()];\\n require(currentAllowance >= amount, \\\"ERC20: transfer amount exceeds allowance\\\");\\n _approve(sender, _msgSender(), currentAllowance - amount);\\n\\n return true;\\n }\\n\\n /**\\n * @dev Atomically increases the allowance granted to `spender` by the caller.\\n *\\n * This is an alternative to {approve} that can be used as a mitigation for\\n * problems described in {IERC20-approve}.\\n *\\n * Emits an {Approval} event indicating the updated allowance.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n */\\n function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {\\n _approve(_msgSender(), spender, _allowances[_msgSender()][spender] + addedValue);\\n return true;\\n }\\n\\n /**\\n * @dev Atomically decreases the allowance granted to `spender` by the caller.\\n *\\n * This is an alternative to {approve} that can be used as a mitigation for\\n * problems described in {IERC20-approve}.\\n *\\n * Emits an {Approval} event indicating the updated allowance.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n * - `spender` must have allowance for the caller of at least\\n * `subtractedValue`.\\n */\\n function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {\\n uint256 currentAllowance = _allowances[_msgSender()][spender];\\n require(currentAllowance >= subtractedValue, \\\"ERC20: decreased allowance below zero\\\");\\n _approve(_msgSender(), spender, currentAllowance - subtractedValue);\\n\\n return true;\\n }\\n\\n /**\\n * @dev Moves tokens `amount` from `sender` to `recipient`.\\n *\\n * This is internal function is equivalent to {transfer}, and can be used to\\n * e.g. implement automatic token fees, slashing mechanisms, etc.\\n *\\n * Emits a {Transfer} event.\\n *\\n * Requirements:\\n *\\n * - `sender` cannot be the zero address.\\n * - `recipient` cannot be the zero address.\\n * - `sender` must have a balance of at least `amount`.\\n */\\n function _transfer(address sender, address recipient, uint256 amount) internal virtual {\\n require(sender != address(0), \\\"ERC20: transfer from the zero address\\\");\\n require(recipient != address(0), \\\"ERC20: transfer to the zero address\\\");\\n\\n _beforeTokenTransfer(sender, recipient, amount);\\n\\n uint256 senderBalance = _balances[sender];\\n require(senderBalance >= amount, \\\"ERC20: transfer amount exceeds balance\\\");\\n _balances[sender] = senderBalance - amount;\\n _balances[recipient] += amount;\\n\\n emit Transfer(sender, recipient, amount);\\n }\\n\\n /** @dev Creates `amount` tokens and assigns them to `account`, increasing\\n * the total supply.\\n *\\n * Emits a {Transfer} event with `from` set to the zero address.\\n *\\n * Requirements:\\n *\\n * - `to` cannot be the zero address.\\n */\\n function _mint(address account, uint256 amount) internal virtual {\\n require(account != address(0), \\\"ERC20: mint to the zero address\\\");\\n\\n _beforeTokenTransfer(address(0), account, amount);\\n\\n _totalSupply += amount;\\n _balances[account] += amount;\\n emit Transfer(address(0), account, amount);\\n }\\n\\n /**\\n * @dev Destroys `amount` tokens from `account`, reducing the\\n * total supply.\\n *\\n * Emits a {Transfer} event with `to` set to the zero address.\\n *\\n * Requirements:\\n *\\n * - `account` cannot be the zero address.\\n * - `account` must have at least `amount` tokens.\\n */\\n function _burn(address account, uint256 amount) internal virtual {\\n require(account != address(0), \\\"ERC20: burn from the zero address\\\");\\n\\n _beforeTokenTransfer(account, address(0), amount);\\n\\n uint256 accountBalance = _balances[account];\\n require(accountBalance >= amount, \\\"ERC20: burn amount exceeds balance\\\");\\n _balances[account] = accountBalance - amount;\\n _totalSupply -= amount;\\n\\n emit Transfer(account, address(0), amount);\\n }\\n\\n /**\\n * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.\\n *\\n * This internal function is equivalent to `approve`, and can be used to\\n * e.g. set automatic allowances for certain subsystems, etc.\\n *\\n * Emits an {Approval} event.\\n *\\n * Requirements:\\n *\\n * - `owner` cannot be the zero address.\\n * - `spender` cannot be the zero address.\\n */\\n function _approve(address owner, address spender, uint256 amount) internal virtual {\\n require(owner != address(0), \\\"ERC20: approve from the zero address\\\");\\n require(spender != address(0), \\\"ERC20: approve to the zero address\\\");\\n\\n _allowances[owner][spender] = amount;\\n emit Approval(owner, spender, amount);\\n }\\n\\n /**\\n * @dev Hook that is called before any transfer of tokens. This includes\\n * minting and burning.\\n *\\n * Calling conditions:\\n *\\n * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\\n * will be to transferred to `to`.\\n * - when `from` is zero, `amount` tokens will be minted for `to`.\\n * - when `to` is zero, `amount` of ``from``'s tokens will be burned.\\n * - `from` and `to` are never both zero.\\n *\\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\\n */\\n function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual { }\\n uint256[45] private __gap;\\n}\\n\",\"keccak256\":\"0x9c2d7425f3343ea340d6ea67e9d90109d4d846bb013c2572096ec88c9e74946b\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/token/ERC20/IERC20Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC20 standard as defined in the EIP.\\n */\\ninterface IERC20Upgradeable {\\n /**\\n * @dev Returns the amount of tokens in existence.\\n */\\n function totalSupply() external view returns (uint256);\\n\\n /**\\n * @dev Returns the amount of tokens owned by `account`.\\n */\\n function balanceOf(address account) external view returns (uint256);\\n\\n /**\\n * @dev Moves `amount` tokens from the caller's account to `recipient`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address recipient, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Returns the remaining number of tokens that `spender` will be\\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\\n * zero by default.\\n *\\n * This value changes when {approve} or {transferFrom} are called.\\n */\\n function allowance(address owner, address spender) external view returns (uint256);\\n\\n /**\\n * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\\n * that someone may use both the old and the new allowance by unfortunate\\n * transaction ordering. One possible solution to mitigate this race\\n * condition is to first reduce the spender's allowance to 0 and set the\\n * desired value afterwards:\\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address spender, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Moves `amount` tokens from `sender` to `recipient` using the\\n * allowance mechanism. `amount` is then deducted from the caller's\\n * allowance.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\\n * another (`to`).\\n *\\n * Note that `value` may be zero.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 value);\\n\\n /**\\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\\n * a call to {approve}. `value` is the new allowance.\\n */\\n event Approval(address indexed owner, address indexed spender, uint256 value);\\n}\\n\",\"keccak256\":\"0x8d4a0f2b5b760b5e2c19ed3c108d83897a4dfd5bfed97a93867918df19191e5e\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/token/ERC20/extensions/IERC20MetadataUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../IERC20Upgradeable.sol\\\";\\n\\n/**\\n * @dev Interface for the optional metadata functions from the ERC20 standard.\\n *\\n * _Available since v4.1._\\n */\\ninterface IERC20MetadataUpgradeable is IERC20Upgradeable {\\n /**\\n * @dev Returns the name of the token.\\n */\\n function name() external view returns (string memory);\\n\\n /**\\n * @dev Returns the symbol of the token.\\n */\\n function symbol() external view returns (string memory);\\n\\n /**\\n * @dev Returns the decimals places of the token.\\n */\\n function decimals() external view returns (uint8);\\n}\\n\",\"keccak256\":\"0x6795c369a4eefa78468e38966f7851fbc2dda5e5b9ccd3fa2b45970e2e4d3abd\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\nimport \\\"../proxy/utils/Initializable.sol\\\";\\n\\n/*\\n * @dev Provides information about the current execution context, including the\\n * sender of the transaction and its data. While these are generally available\\n * via msg.sender and msg.data, they should not be accessed in such a direct\\n * manner, since when dealing with meta-transactions the account sending and\\n * paying for execution may not be the actual sender (as far as an application\\n * is concerned).\\n *\\n * This contract is only required for intermediate, library-like contracts.\\n */\\nabstract contract ContextUpgradeable is Initializable {\\n function __Context_init() internal initializer {\\n __Context_init_unchained();\\n }\\n\\n function __Context_init_unchained() internal initializer {\\n }\\n function _msgSender() internal view virtual returns (address) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes calldata) {\\n this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691\\n return msg.data;\\n }\\n uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0x8e9eb503de1189f50c5f16fef327da310b11898d6b9ab3ca937df07c35233b9e\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC20 standard as defined in the EIP.\\n */\\ninterface IERC20 {\\n /**\\n * @dev Returns the amount of tokens in existence.\\n */\\n function totalSupply() external view returns (uint256);\\n\\n /**\\n * @dev Returns the amount of tokens owned by `account`.\\n */\\n function balanceOf(address account) external view returns (uint256);\\n\\n /**\\n * @dev Moves `amount` tokens from the caller's account to `recipient`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address recipient, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Returns the remaining number of tokens that `spender` will be\\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\\n * zero by default.\\n *\\n * This value changes when {approve} or {transferFrom} are called.\\n */\\n function allowance(address owner, address spender) external view returns (uint256);\\n\\n /**\\n * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\\n * that someone may use both the old and the new allowance by unfortunate\\n * transaction ordering. One possible solution to mitigate this race\\n * condition is to first reduce the spender's allowance to 0 and set the\\n * desired value afterwards:\\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address spender, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Moves `amount` tokens from `sender` to `recipient` using the\\n * allowance mechanism. `amount` is then deducted from the caller's\\n * allowance.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\\n * another (`to`).\\n *\\n * Note that `value` may be zero.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 value);\\n\\n /**\\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\\n * a call to {approve}. `value` is the new allowance.\\n */\\n event Approval(address indexed owner, address indexed spender, uint256 value);\\n}\\n\",\"keccak256\":\"0xf8e8d118a7a8b2e134181f7da655f6266aa3a0f9134b2605747139fcb0c5d835\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../IERC20.sol\\\";\\nimport \\\"../../../utils/Address.sol\\\";\\n\\n/**\\n * @title SafeERC20\\n * @dev Wrappers around ERC20 operations that throw on failure (when the token\\n * contract returns false). Tokens that return no value (and instead revert or\\n * throw on failure) are also supported, non-reverting calls are assumed to be\\n * successful.\\n * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,\\n * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.\\n */\\nlibrary SafeERC20 {\\n using Address for address;\\n\\n function safeTransfer(IERC20 token, address to, uint256 value) internal {\\n _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));\\n }\\n\\n function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal {\\n _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));\\n }\\n\\n /**\\n * @dev Deprecated. This function has issues similar to the ones found in\\n * {IERC20-approve}, and its usage is discouraged.\\n *\\n * Whenever possible, use {safeIncreaseAllowance} and\\n * {safeDecreaseAllowance} instead.\\n */\\n function safeApprove(IERC20 token, address spender, uint256 value) internal {\\n // safeApprove should only be called when setting an initial allowance,\\n // or when resetting it to zero. To increase and decrease it, use\\n // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'\\n // solhint-disable-next-line max-line-length\\n require((value == 0) || (token.allowance(address(this), spender) == 0),\\n \\\"SafeERC20: approve from non-zero to non-zero allowance\\\"\\n );\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));\\n }\\n\\n function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {\\n uint256 newAllowance = token.allowance(address(this), spender) + value;\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\\n }\\n\\n function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal {\\n unchecked {\\n uint256 oldAllowance = token.allowance(address(this), spender);\\n require(oldAllowance >= value, \\\"SafeERC20: decreased allowance below zero\\\");\\n uint256 newAllowance = oldAllowance - value;\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\\n }\\n }\\n\\n /**\\n * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\\n * on the return value: the return value is optional (but if data is returned, it must not be false).\\n * @param token The token targeted by the call.\\n * @param data The call data (encoded using abi.encode or one of its variants).\\n */\\n function _callOptionalReturn(IERC20 token, bytes memory data) private {\\n // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since\\n // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that\\n // the target address contains contract code and also asserts for success in the low-level call.\\n\\n bytes memory returndata = address(token).functionCall(data, \\\"SafeERC20: low-level call failed\\\");\\n if (returndata.length > 0) { // Return data is optional\\n // solhint-disable-next-line max-line-length\\n require(abi.decode(returndata, (bool)), \\\"SafeERC20: ERC20 operation did not succeed\\\");\\n }\\n }\\n}\\n\",\"keccak256\":\"0x99f5c21018d796db7833a2100bb0e7411999e248a3c950fb526eee5d2bf47cb7\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary Address {\\n /**\\n * @dev Returns true if `account` is a contract.\\n *\\n * [IMPORTANT]\\n * ====\\n * It is unsafe to assume that an address for which this function returns\\n * false is an externally-owned account (EOA) and not a contract.\\n *\\n * Among others, `isContract` will return false for the following\\n * types of addresses:\\n *\\n * - an externally-owned account\\n * - a contract in construction\\n * - an address where a contract will be created\\n * - an address where a contract lived, but was destroyed\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize, which returns 0 for contracts in\\n // construction, since the code is only stored at the end of the\\n // constructor execution.\\n\\n uint256 size;\\n // solhint-disable-next-line no-inline-assembly\\n assembly { size := extcodesize(account) }\\n return size > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n // solhint-disable-next-line avoid-low-level-calls, avoid-call-value\\n (bool success, ) = recipient.call{ value: amount }(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain`call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCall(target, data, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n\\n // solhint-disable-next-line avoid-low-level-calls\\n (bool success, bytes memory returndata) = target.call{ value: value }(data);\\n return _verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data, string memory errorMessage) internal view returns (bytes memory) {\\n require(isContract(target), \\\"Address: static call to non-contract\\\");\\n\\n // solhint-disable-next-line avoid-low-level-calls\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return _verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionDelegateCall(target, data, \\\"Address: low-level delegate call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {\\n require(isContract(target), \\\"Address: delegate call to non-contract\\\");\\n\\n // solhint-disable-next-line avoid-low-level-calls\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return _verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n function _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private pure returns(bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n let returndata_size := mload(returndata)\\n revert(add(32, returndata), returndata_size)\\n }\\n } else {\\n revert(errorMessage);\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0x069b2631bb5b5193a58ccf7a06266c7361bd2c20095667af4402817605627f45\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/math/SafeCast.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Wrappers over Solidity's uintXX/intXX casting operators with added overflow\\n * checks.\\n *\\n * Downcasting from uint256/int256 in Solidity does not revert on overflow. This can\\n * easily result in undesired exploitation or bugs, since developers usually\\n * assume that overflows raise errors. `SafeCast` restores this intuition by\\n * reverting the transaction when such an operation overflows.\\n *\\n * Using this library instead of the unchecked operations eliminates an entire\\n * class of bugs, so it's recommended to use it always.\\n *\\n * Can be combined with {SafeMath} and {SignedSafeMath} to extend it to smaller types, by performing\\n * all math on `uint256` and `int256` and then downcasting.\\n */\\nlibrary SafeCast {\\n /**\\n * @dev Returns the downcasted uint128 from uint256, reverting on\\n * overflow (when the input is greater than largest uint128).\\n *\\n * Counterpart to Solidity's `uint128` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 128 bits\\n */\\n function toUint128(uint256 value) internal pure returns (uint128) {\\n require(value < 2**128, \\\"SafeCast: value doesn\\\\'t fit in 128 bits\\\");\\n return uint128(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint64 from uint256, reverting on\\n * overflow (when the input is greater than largest uint64).\\n *\\n * Counterpart to Solidity's `uint64` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 64 bits\\n */\\n function toUint64(uint256 value) internal pure returns (uint64) {\\n require(value < 2**64, \\\"SafeCast: value doesn\\\\'t fit in 64 bits\\\");\\n return uint64(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint32 from uint256, reverting on\\n * overflow (when the input is greater than largest uint32).\\n *\\n * Counterpart to Solidity's `uint32` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 32 bits\\n */\\n function toUint32(uint256 value) internal pure returns (uint32) {\\n require(value < 2**32, \\\"SafeCast: value doesn\\\\'t fit in 32 bits\\\");\\n return uint32(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint16 from uint256, reverting on\\n * overflow (when the input is greater than largest uint16).\\n *\\n * Counterpart to Solidity's `uint16` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 16 bits\\n */\\n function toUint16(uint256 value) internal pure returns (uint16) {\\n require(value < 2**16, \\\"SafeCast: value doesn\\\\'t fit in 16 bits\\\");\\n return uint16(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint8 from uint256, reverting on\\n * overflow (when the input is greater than largest uint8).\\n *\\n * Counterpart to Solidity's `uint8` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 8 bits.\\n */\\n function toUint8(uint256 value) internal pure returns (uint8) {\\n require(value < 2**8, \\\"SafeCast: value doesn\\\\'t fit in 8 bits\\\");\\n return uint8(value);\\n }\\n\\n /**\\n * @dev Converts a signed int256 into an unsigned uint256.\\n *\\n * Requirements:\\n *\\n * - input must be greater than or equal to 0.\\n */\\n function toUint256(int256 value) internal pure returns (uint256) {\\n require(value >= 0, \\\"SafeCast: value must be positive\\\");\\n return uint256(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted int128 from int256, reverting on\\n * overflow (when the input is less than smallest int128 or\\n * greater than largest int128).\\n *\\n * Counterpart to Solidity's `int128` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 128 bits\\n *\\n * _Available since v3.1._\\n */\\n function toInt128(int256 value) internal pure returns (int128) {\\n require(value >= -2**127 && value < 2**127, \\\"SafeCast: value doesn\\\\'t fit in 128 bits\\\");\\n return int128(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted int64 from int256, reverting on\\n * overflow (when the input is less than smallest int64 or\\n * greater than largest int64).\\n *\\n * Counterpart to Solidity's `int64` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 64 bits\\n *\\n * _Available since v3.1._\\n */\\n function toInt64(int256 value) internal pure returns (int64) {\\n require(value >= -2**63 && value < 2**63, \\\"SafeCast: value doesn\\\\'t fit in 64 bits\\\");\\n return int64(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted int32 from int256, reverting on\\n * overflow (when the input is less than smallest int32 or\\n * greater than largest int32).\\n *\\n * Counterpart to Solidity's `int32` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 32 bits\\n *\\n * _Available since v3.1._\\n */\\n function toInt32(int256 value) internal pure returns (int32) {\\n require(value >= -2**31 && value < 2**31, \\\"SafeCast: value doesn\\\\'t fit in 32 bits\\\");\\n return int32(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted int16 from int256, reverting on\\n * overflow (when the input is less than smallest int16 or\\n * greater than largest int16).\\n *\\n * Counterpart to Solidity's `int16` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 16 bits\\n *\\n * _Available since v3.1._\\n */\\n function toInt16(int256 value) internal pure returns (int16) {\\n require(value >= -2**15 && value < 2**15, \\\"SafeCast: value doesn\\\\'t fit in 16 bits\\\");\\n return int16(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted int8 from int256, reverting on\\n * overflow (when the input is less than smallest int8 or\\n * greater than largest int8).\\n *\\n * Counterpart to Solidity's `int8` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 8 bits.\\n *\\n * _Available since v3.1._\\n */\\n function toInt8(int256 value) internal pure returns (int8) {\\n require(value >= -2**7 && value < 2**7, \\\"SafeCast: value doesn\\\\'t fit in 8 bits\\\");\\n return int8(value);\\n }\\n\\n /**\\n * @dev Converts an unsigned uint256 into a signed int256.\\n *\\n * Requirements:\\n *\\n * - input must be less than or equal to maxInt256.\\n */\\n function toInt256(uint256 value) internal pure returns (int256) {\\n require(value < 2**255, \\\"SafeCast: value doesn't fit in an int256\\\");\\n return int256(value);\\n }\\n}\\n\",\"keccak256\":\"0xc37d85b96c2a8d7bc09f25958e0a81394bf5780286444147ddf875fa628d53ce\",\"license\":\"MIT\"},\"@uniswap/v3-core/contracts/interfaces/IUniswapV3Pool.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-2.0-or-later\\npragma solidity >=0.5.0;\\n\\nimport './pool/IUniswapV3PoolImmutables.sol';\\nimport './pool/IUniswapV3PoolState.sol';\\nimport './pool/IUniswapV3PoolDerivedState.sol';\\nimport './pool/IUniswapV3PoolActions.sol';\\nimport './pool/IUniswapV3PoolOwnerActions.sol';\\nimport './pool/IUniswapV3PoolEvents.sol';\\n\\n/// @title The interface for a Uniswap V3 Pool\\n/// @notice A Uniswap pool facilitates swapping and automated market making between any two assets that strictly conform\\n/// to the ERC20 specification\\n/// @dev The pool interface is broken up into many smaller pieces\\ninterface IUniswapV3Pool is\\n IUniswapV3PoolImmutables,\\n IUniswapV3PoolState,\\n IUniswapV3PoolDerivedState,\\n IUniswapV3PoolActions,\\n IUniswapV3PoolOwnerActions,\\n IUniswapV3PoolEvents\\n{\\n\\n}\\n\",\"keccak256\":\"0xfe6113d518466cd6652c85b111e01f33eb62157f49ae5ed7d5a3947a2044adb1\",\"license\":\"GPL-2.0-or-later\"},\"@uniswap/v3-core/contracts/interfaces/callback/IUniswapV3MintCallback.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-2.0-or-later\\npragma solidity >=0.5.0;\\n\\n/// @title Callback for IUniswapV3PoolActions#mint\\n/// @notice Any contract that calls IUniswapV3PoolActions#mint must implement this interface\\ninterface IUniswapV3MintCallback {\\n /// @notice Called to `msg.sender` after minting liquidity to a position from IUniswapV3Pool#mint.\\n /// @dev In the implementation you must pay the pool tokens owed for the minted liquidity.\\n /// The caller of this method must be checked to be a UniswapV3Pool deployed by the canonical UniswapV3Factory.\\n /// @param amount0Owed The amount of token0 due to the pool for the minted liquidity\\n /// @param amount1Owed The amount of token1 due to the pool for the minted liquidity\\n /// @param data Any data passed through by the caller via the IUniswapV3PoolActions#mint call\\n function uniswapV3MintCallback(\\n uint256 amount0Owed,\\n uint256 amount1Owed,\\n bytes calldata data\\n ) external;\\n}\\n\",\"keccak256\":\"0x27a9725b8f831a92d16380860c3d348a0b926a7f01b34a54ea6eea78cbdbcd6a\",\"license\":\"GPL-2.0-or-later\"},\"@uniswap/v3-core/contracts/interfaces/callback/IUniswapV3SwapCallback.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-2.0-or-later\\npragma solidity >=0.5.0;\\n\\n/// @title Callback for IUniswapV3PoolActions#swap\\n/// @notice Any contract that calls IUniswapV3PoolActions#swap must implement this interface\\ninterface IUniswapV3SwapCallback {\\n /// @notice Called to `msg.sender` after executing a swap via IUniswapV3Pool#swap.\\n /// @dev In the implementation you must pay the pool tokens owed for the swap.\\n /// The caller of this method must be checked to be a UniswapV3Pool deployed by the canonical UniswapV3Factory.\\n /// amount0Delta and amount1Delta can both be 0 if no tokens were swapped.\\n /// @param amount0Delta The amount of token0 that was sent (negative) or must be received (positive) by the pool by\\n /// the end of the swap. If positive, the callback must send that amount of token0 to the pool.\\n /// @param amount1Delta The amount of token1 that was sent (negative) or must be received (positive) by the pool by\\n /// the end of the swap. If positive, the callback must send that amount of token1 to the pool.\\n /// @param data Any data passed through by the caller via the IUniswapV3PoolActions#swap call\\n function uniswapV3SwapCallback(\\n int256 amount0Delta,\\n int256 amount1Delta,\\n bytes calldata data\\n ) external;\\n}\\n\",\"keccak256\":\"0x3f485fb1a44e8fbeadefb5da07d66edab3cfe809f0ac4074b1e54e3eb3c4cf69\",\"license\":\"GPL-2.0-or-later\"},\"@uniswap/v3-core/contracts/interfaces/pool/IUniswapV3PoolActions.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-2.0-or-later\\npragma solidity >=0.5.0;\\n\\n/// @title Permissionless pool actions\\n/// @notice Contains pool methods that can be called by anyone\\ninterface IUniswapV3PoolActions {\\n /// @notice Sets the initial price for the pool\\n /// @dev Price is represented as a sqrt(amountToken1/amountToken0) Q64.96 value\\n /// @param sqrtPriceX96 the initial sqrt price of the pool as a Q64.96\\n function initialize(uint160 sqrtPriceX96) external;\\n\\n /// @notice Adds liquidity for the given recipient/tickLower/tickUpper position\\n /// @dev The caller of this method receives a callback in the form of IUniswapV3MintCallback#uniswapV3MintCallback\\n /// in which they must pay any token0 or token1 owed for the liquidity. The amount of token0/token1 due depends\\n /// on tickLower, tickUpper, the amount of liquidity, and the current price.\\n /// @param recipient The address for which the liquidity will be created\\n /// @param tickLower The lower tick of the position in which to add liquidity\\n /// @param tickUpper The upper tick of the position in which to add liquidity\\n /// @param amount The amount of liquidity to mint\\n /// @param data Any data that should be passed through to the callback\\n /// @return amount0 The amount of token0 that was paid to mint the given amount of liquidity. Matches the value in the callback\\n /// @return amount1 The amount of token1 that was paid to mint the given amount of liquidity. Matches the value in the callback\\n function mint(\\n address recipient,\\n int24 tickLower,\\n int24 tickUpper,\\n uint128 amount,\\n bytes calldata data\\n ) external returns (uint256 amount0, uint256 amount1);\\n\\n /// @notice Collects tokens owed to a position\\n /// @dev Does not recompute fees earned, which must be done either via mint or burn of any amount of liquidity.\\n /// Collect must be called by the position owner. To withdraw only token0 or only token1, amount0Requested or\\n /// amount1Requested may be set to zero. To withdraw all tokens owed, caller may pass any value greater than the\\n /// actual tokens owed, e.g. type(uint128).max. Tokens owed may be from accumulated swap fees or burned liquidity.\\n /// @param recipient The address which should receive the fees collected\\n /// @param tickLower The lower tick of the position for which to collect fees\\n /// @param tickUpper The upper tick of the position for which to collect fees\\n /// @param amount0Requested How much token0 should be withdrawn from the fees owed\\n /// @param amount1Requested How much token1 should be withdrawn from the fees owed\\n /// @return amount0 The amount of fees collected in token0\\n /// @return amount1 The amount of fees collected in token1\\n function collect(\\n address recipient,\\n int24 tickLower,\\n int24 tickUpper,\\n uint128 amount0Requested,\\n uint128 amount1Requested\\n ) external returns (uint128 amount0, uint128 amount1);\\n\\n /// @notice Burn liquidity from the sender and account tokens owed for the liquidity to the position\\n /// @dev Can be used to trigger a recalculation of fees owed to a position by calling with an amount of 0\\n /// @dev Fees must be collected separately via a call to #collect\\n /// @param tickLower The lower tick of the position for which to burn liquidity\\n /// @param tickUpper The upper tick of the position for which to burn liquidity\\n /// @param amount How much liquidity to burn\\n /// @return amount0 The amount of token0 sent to the recipient\\n /// @return amount1 The amount of token1 sent to the recipient\\n function burn(\\n int24 tickLower,\\n int24 tickUpper,\\n uint128 amount\\n ) external returns (uint256 amount0, uint256 amount1);\\n\\n /// @notice Swap token0 for token1, or token1 for token0\\n /// @dev The caller of this method receives a callback in the form of IUniswapV3SwapCallback#uniswapV3SwapCallback\\n /// @param recipient The address to receive the output of the swap\\n /// @param zeroForOne The direction of the swap, true for token0 to token1, false for token1 to token0\\n /// @param amountSpecified The amount of the swap, which implicitly configures the swap as exact input (positive), or exact output (negative)\\n /// @param sqrtPriceLimitX96 The Q64.96 sqrt price limit. If zero for one, the price cannot be less than this\\n /// value after the swap. If one for zero, the price cannot be greater than this value after the swap\\n /// @param data Any data to be passed through to the callback\\n /// @return amount0 The delta of the balance of token0 of the pool, exact when negative, minimum when positive\\n /// @return amount1 The delta of the balance of token1 of the pool, exact when negative, minimum when positive\\n function swap(\\n address recipient,\\n bool zeroForOne,\\n int256 amountSpecified,\\n uint160 sqrtPriceLimitX96,\\n bytes calldata data\\n ) external returns (int256 amount0, int256 amount1);\\n\\n /// @notice Receive token0 and/or token1 and pay it back, plus a fee, in the callback\\n /// @dev The caller of this method receives a callback in the form of IUniswapV3FlashCallback#uniswapV3FlashCallback\\n /// @dev Can be used to donate underlying tokens pro-rata to currently in-range liquidity providers by calling\\n /// with 0 amount{0,1} and sending the donation amount(s) from the callback\\n /// @param recipient The address which will receive the token0 and token1 amounts\\n /// @param amount0 The amount of token0 to send\\n /// @param amount1 The amount of token1 to send\\n /// @param data Any data to be passed through to the callback\\n function flash(\\n address recipient,\\n uint256 amount0,\\n uint256 amount1,\\n bytes calldata data\\n ) external;\\n\\n /// @notice Increase the maximum number of price and liquidity observations that this pool will store\\n /// @dev This method is no-op if the pool already has an observationCardinalityNext greater than or equal to\\n /// the input observationCardinalityNext.\\n /// @param observationCardinalityNext The desired minimum number of observations for the pool to store\\n function increaseObservationCardinalityNext(uint16 observationCardinalityNext) external;\\n}\\n\",\"keccak256\":\"0x9453dd0e7442188667d01d9b65de3f1e14e9511ff3e303179a15f6fc267f7634\",\"license\":\"GPL-2.0-or-later\"},\"@uniswap/v3-core/contracts/interfaces/pool/IUniswapV3PoolDerivedState.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-2.0-or-later\\npragma solidity >=0.5.0;\\n\\n/// @title Pool state that is not stored\\n/// @notice Contains view functions to provide information about the pool that is computed rather than stored on the\\n/// blockchain. The functions here may have variable gas costs.\\ninterface IUniswapV3PoolDerivedState {\\n /// @notice Returns the cumulative tick and liquidity as of each timestamp `secondsAgo` from the current block timestamp\\n /// @dev To get a time weighted average tick or liquidity-in-range, you must call this with two values, one representing\\n /// the beginning of the period and another for the end of the period. E.g., to get the last hour time-weighted average tick,\\n /// you must call it with secondsAgos = [3600, 0].\\n /// @dev The time weighted average tick represents the geometric time weighted average price of the pool, in\\n /// log base sqrt(1.0001) of token1 / token0. The TickMath library can be used to go from a tick value to a ratio.\\n /// @param secondsAgos From how long ago each cumulative tick and liquidity value should be returned\\n /// @return tickCumulatives Cumulative tick values as of each `secondsAgos` from the current block timestamp\\n /// @return secondsPerLiquidityCumulativeX128s Cumulative seconds per liquidity-in-range value as of each `secondsAgos` from the current block\\n /// timestamp\\n function observe(uint32[] calldata secondsAgos)\\n external\\n view\\n returns (int56[] memory tickCumulatives, uint160[] memory secondsPerLiquidityCumulativeX128s);\\n\\n /// @notice Returns a snapshot of the tick cumulative, seconds per liquidity and seconds inside a tick range\\n /// @dev Snapshots must only be compared to other snapshots, taken over a period for which a position existed.\\n /// I.e., snapshots cannot be compared if a position is not held for the entire period between when the first\\n /// snapshot is taken and the second snapshot is taken.\\n /// @param tickLower The lower tick of the range\\n /// @param tickUpper The upper tick of the range\\n /// @return tickCumulativeInside The snapshot of the tick accumulator for the range\\n /// @return secondsPerLiquidityInsideX128 The snapshot of seconds per liquidity for the range\\n /// @return secondsInside The snapshot of seconds per liquidity for the range\\n function snapshotCumulativesInside(int24 tickLower, int24 tickUpper)\\n external\\n view\\n returns (\\n int56 tickCumulativeInside,\\n uint160 secondsPerLiquidityInsideX128,\\n uint32 secondsInside\\n );\\n}\\n\",\"keccak256\":\"0xe603ac5b17ecdee73ba2b27efdf386c257a19c14206e87eee77e2017b742d9e5\",\"license\":\"GPL-2.0-or-later\"},\"@uniswap/v3-core/contracts/interfaces/pool/IUniswapV3PoolEvents.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-2.0-or-later\\npragma solidity >=0.5.0;\\n\\n/// @title Events emitted by a pool\\n/// @notice Contains all events emitted by the pool\\ninterface IUniswapV3PoolEvents {\\n /// @notice Emitted exactly once by a pool when #initialize is first called on the pool\\n /// @dev Mint/Burn/Swap cannot be emitted by the pool before Initialize\\n /// @param sqrtPriceX96 The initial sqrt price of the pool, as a Q64.96\\n /// @param tick The initial tick of the pool, i.e. log base 1.0001 of the starting price of the pool\\n event Initialize(uint160 sqrtPriceX96, int24 tick);\\n\\n /// @notice Emitted when liquidity is minted for a given position\\n /// @param sender The address that minted the liquidity\\n /// @param owner The owner of the position and recipient of any minted liquidity\\n /// @param tickLower The lower tick of the position\\n /// @param tickUpper The upper tick of the position\\n /// @param amount The amount of liquidity minted to the position range\\n /// @param amount0 How much token0 was required for the minted liquidity\\n /// @param amount1 How much token1 was required for the minted liquidity\\n event Mint(\\n address sender,\\n address indexed owner,\\n int24 indexed tickLower,\\n int24 indexed tickUpper,\\n uint128 amount,\\n uint256 amount0,\\n uint256 amount1\\n );\\n\\n /// @notice Emitted when fees are collected by the owner of a position\\n /// @dev Collect events may be emitted with zero amount0 and amount1 when the caller chooses not to collect fees\\n /// @param owner The owner of the position for which fees are collected\\n /// @param tickLower The lower tick of the position\\n /// @param tickUpper The upper tick of the position\\n /// @param amount0 The amount of token0 fees collected\\n /// @param amount1 The amount of token1 fees collected\\n event Collect(\\n address indexed owner,\\n address recipient,\\n int24 indexed tickLower,\\n int24 indexed tickUpper,\\n uint128 amount0,\\n uint128 amount1\\n );\\n\\n /// @notice Emitted when a position's liquidity is removed\\n /// @dev Does not withdraw any fees earned by the liquidity position, which must be withdrawn via #collect\\n /// @param owner The owner of the position for which liquidity is removed\\n /// @param tickLower The lower tick of the position\\n /// @param tickUpper The upper tick of the position\\n /// @param amount The amount of liquidity to remove\\n /// @param amount0 The amount of token0 withdrawn\\n /// @param amount1 The amount of token1 withdrawn\\n event Burn(\\n address indexed owner,\\n int24 indexed tickLower,\\n int24 indexed tickUpper,\\n uint128 amount,\\n uint256 amount0,\\n uint256 amount1\\n );\\n\\n /// @notice Emitted by the pool for any swaps between token0 and token1\\n /// @param sender The address that initiated the swap call, and that received the callback\\n /// @param recipient The address that received the output of the swap\\n /// @param amount0 The delta of the token0 balance of the pool\\n /// @param amount1 The delta of the token1 balance of the pool\\n /// @param sqrtPriceX96 The sqrt(price) of the pool after the swap, as a Q64.96\\n /// @param liquidity The liquidity of the pool after the swap\\n /// @param tick The log base 1.0001 of price of the pool after the swap\\n event Swap(\\n address indexed sender,\\n address indexed recipient,\\n int256 amount0,\\n int256 amount1,\\n uint160 sqrtPriceX96,\\n uint128 liquidity,\\n int24 tick\\n );\\n\\n /// @notice Emitted by the pool for any flashes of token0/token1\\n /// @param sender The address that initiated the swap call, and that received the callback\\n /// @param recipient The address that received the tokens from flash\\n /// @param amount0 The amount of token0 that was flashed\\n /// @param amount1 The amount of token1 that was flashed\\n /// @param paid0 The amount of token0 paid for the flash, which can exceed the amount0 plus the fee\\n /// @param paid1 The amount of token1 paid for the flash, which can exceed the amount1 plus the fee\\n event Flash(\\n address indexed sender,\\n address indexed recipient,\\n uint256 amount0,\\n uint256 amount1,\\n uint256 paid0,\\n uint256 paid1\\n );\\n\\n /// @notice Emitted by the pool for increases to the number of observations that can be stored\\n /// @dev observationCardinalityNext is not the observation cardinality until an observation is written at the index\\n /// just before a mint/swap/burn.\\n /// @param observationCardinalityNextOld The previous value of the next observation cardinality\\n /// @param observationCardinalityNextNew The updated value of the next observation cardinality\\n event IncreaseObservationCardinalityNext(\\n uint16 observationCardinalityNextOld,\\n uint16 observationCardinalityNextNew\\n );\\n\\n /// @notice Emitted when the protocol fee is changed by the pool\\n /// @param feeProtocol0Old The previous value of the token0 protocol fee\\n /// @param feeProtocol1Old The previous value of the token1 protocol fee\\n /// @param feeProtocol0New The updated value of the token0 protocol fee\\n /// @param feeProtocol1New The updated value of the token1 protocol fee\\n event SetFeeProtocol(uint8 feeProtocol0Old, uint8 feeProtocol1Old, uint8 feeProtocol0New, uint8 feeProtocol1New);\\n\\n /// @notice Emitted when the collected protocol fees are withdrawn by the factory owner\\n /// @param sender The address that collects the protocol fees\\n /// @param recipient The address that receives the collected protocol fees\\n /// @param amount0 The amount of token0 protocol fees that is withdrawn\\n /// @param amount0 The amount of token1 protocol fees that is withdrawn\\n event CollectProtocol(address indexed sender, address indexed recipient, uint128 amount0, uint128 amount1);\\n}\\n\",\"keccak256\":\"0x8071514d0fe5d17d6fbd31c191cdfb703031c24e0ece3621d88ab10e871375cd\",\"license\":\"GPL-2.0-or-later\"},\"@uniswap/v3-core/contracts/interfaces/pool/IUniswapV3PoolImmutables.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-2.0-or-later\\npragma solidity >=0.5.0;\\n\\n/// @title Pool state that never changes\\n/// @notice These parameters are fixed for a pool forever, i.e., the methods will always return the same values\\ninterface IUniswapV3PoolImmutables {\\n /// @notice The contract that deployed the pool, which must adhere to the IUniswapV3Factory interface\\n /// @return The contract address\\n function factory() external view returns (address);\\n\\n /// @notice The first of the two tokens of the pool, sorted by address\\n /// @return The token contract address\\n function token0() external view returns (address);\\n\\n /// @notice The second of the two tokens of the pool, sorted by address\\n /// @return The token contract address\\n function token1() external view returns (address);\\n\\n /// @notice The pool's fee in hundredths of a bip, i.e. 1e-6\\n /// @return The fee\\n function fee() external view returns (uint24);\\n\\n /// @notice The pool tick spacing\\n /// @dev Ticks can only be used at multiples of this value, minimum of 1 and always positive\\n /// e.g.: a tickSpacing of 3 means ticks can be initialized every 3rd tick, i.e., ..., -6, -3, 0, 3, 6, ...\\n /// This value is an int24 to avoid casting even though it is always positive.\\n /// @return The tick spacing\\n function tickSpacing() external view returns (int24);\\n\\n /// @notice The maximum amount of position liquidity that can use any tick in the range\\n /// @dev This parameter is enforced per tick to prevent liquidity from overflowing a uint128 at any point, and\\n /// also prevents out-of-range liquidity from being used to prevent adding in-range liquidity to a pool\\n /// @return The max amount of liquidity per tick\\n function maxLiquidityPerTick() external view returns (uint128);\\n}\\n\",\"keccak256\":\"0xf6e5d2cd1139c4c276bdbc8e1d2b256e456c866a91f1b868da265c6d2685c3f7\",\"license\":\"GPL-2.0-or-later\"},\"@uniswap/v3-core/contracts/interfaces/pool/IUniswapV3PoolOwnerActions.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-2.0-or-later\\npragma solidity >=0.5.0;\\n\\n/// @title Permissioned pool actions\\n/// @notice Contains pool methods that may only be called by the factory owner\\ninterface IUniswapV3PoolOwnerActions {\\n /// @notice Set the denominator of the protocol's % share of the fees\\n /// @param feeProtocol0 new protocol fee for token0 of the pool\\n /// @param feeProtocol1 new protocol fee for token1 of the pool\\n function setFeeProtocol(uint8 feeProtocol0, uint8 feeProtocol1) external;\\n\\n /// @notice Collect the protocol fee accrued to the pool\\n /// @param recipient The address to which collected protocol fees should be sent\\n /// @param amount0Requested The maximum amount of token0 to send, can be 0 to collect fees in only token1\\n /// @param amount1Requested The maximum amount of token1 to send, can be 0 to collect fees in only token0\\n /// @return amount0 The protocol fee collected in token0\\n /// @return amount1 The protocol fee collected in token1\\n function collectProtocol(\\n address recipient,\\n uint128 amount0Requested,\\n uint128 amount1Requested\\n ) external returns (uint128 amount0, uint128 amount1);\\n}\\n\",\"keccak256\":\"0x759b78a2918af9e99e246dc3af084f654e48ef32bb4e4cb8a966aa3dcaece235\",\"license\":\"GPL-2.0-or-later\"},\"@uniswap/v3-core/contracts/interfaces/pool/IUniswapV3PoolState.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-2.0-or-later\\npragma solidity >=0.5.0;\\n\\n/// @title Pool state that can change\\n/// @notice These methods compose the pool's state, and can change with any frequency including multiple times\\n/// per transaction\\ninterface IUniswapV3PoolState {\\n /// @notice The 0th storage slot in the pool stores many values, and is exposed as a single method to save gas\\n /// when accessed externally.\\n /// @return sqrtPriceX96 The current price of the pool as a sqrt(token1/token0) Q64.96 value\\n /// tick The current tick of the pool, i.e. according to the last tick transition that was run.\\n /// This value may not always be equal to SqrtTickMath.getTickAtSqrtRatio(sqrtPriceX96) if the price is on a tick\\n /// boundary.\\n /// observationIndex The index of the last oracle observation that was written,\\n /// observationCardinality The current maximum number of observations stored in the pool,\\n /// observationCardinalityNext The next maximum number of observations, to be updated when the observation.\\n /// feeProtocol The protocol fee for both tokens of the pool.\\n /// Encoded as two 4 bit values, where the protocol fee of token1 is shifted 4 bits and the protocol fee of token0\\n /// is the lower 4 bits. Used as the denominator of a fraction of the swap fee, e.g. 4 means 1/4th of the swap fee.\\n /// unlocked Whether the pool is currently locked to reentrancy\\n function slot0()\\n external\\n view\\n returns (\\n uint160 sqrtPriceX96,\\n int24 tick,\\n uint16 observationIndex,\\n uint16 observationCardinality,\\n uint16 observationCardinalityNext,\\n uint8 feeProtocol,\\n bool unlocked\\n );\\n\\n /// @notice The fee growth as a Q128.128 fees of token0 collected per unit of liquidity for the entire life of the pool\\n /// @dev This value can overflow the uint256\\n function feeGrowthGlobal0X128() external view returns (uint256);\\n\\n /// @notice The fee growth as a Q128.128 fees of token1 collected per unit of liquidity for the entire life of the pool\\n /// @dev This value can overflow the uint256\\n function feeGrowthGlobal1X128() external view returns (uint256);\\n\\n /// @notice The amounts of token0 and token1 that are owed to the protocol\\n /// @dev Protocol fees will never exceed uint128 max in either token\\n function protocolFees() external view returns (uint128 token0, uint128 token1);\\n\\n /// @notice The currently in range liquidity available to the pool\\n /// @dev This value has no relationship to the total liquidity across all ticks\\n function liquidity() external view returns (uint128);\\n\\n /// @notice Look up information about a specific tick in the pool\\n /// @param tick The tick to look up\\n /// @return liquidityGross the total amount of position liquidity that uses the pool either as tick lower or\\n /// tick upper,\\n /// liquidityNet how much liquidity changes when the pool price crosses the tick,\\n /// feeGrowthOutside0X128 the fee growth on the other side of the tick from the current tick in token0,\\n /// feeGrowthOutside1X128 the fee growth on the other side of the tick from the current tick in token1,\\n /// tickCumulativeOutside the cumulative tick value on the other side of the tick from the current tick\\n /// secondsPerLiquidityOutsideX128 the seconds spent per liquidity on the other side of the tick from the current tick,\\n /// secondsOutside the seconds spent on the other side of the tick from the current tick,\\n /// initialized Set to true if the tick is initialized, i.e. liquidityGross is greater than 0, otherwise equal to false.\\n /// Outside values can only be used if the tick is initialized, i.e. if liquidityGross is greater than 0.\\n /// In addition, these values are only relative and must be used only in comparison to previous snapshots for\\n /// a specific position.\\n function ticks(int24 tick)\\n external\\n view\\n returns (\\n uint128 liquidityGross,\\n int128 liquidityNet,\\n uint256 feeGrowthOutside0X128,\\n uint256 feeGrowthOutside1X128,\\n int56 tickCumulativeOutside,\\n uint160 secondsPerLiquidityOutsideX128,\\n uint32 secondsOutside,\\n bool initialized\\n );\\n\\n /// @notice Returns 256 packed tick initialized boolean values. See TickBitmap for more information\\n function tickBitmap(int16 wordPosition) external view returns (uint256);\\n\\n /// @notice Returns the information about a position by the position's key\\n /// @param key The position's key is a hash of a preimage composed by the owner, tickLower and tickUpper\\n /// @return _liquidity The amount of liquidity in the position,\\n /// Returns feeGrowthInside0LastX128 fee growth of token0 inside the tick range as of the last mint/burn/poke,\\n /// Returns feeGrowthInside1LastX128 fee growth of token1 inside the tick range as of the last mint/burn/poke,\\n /// Returns tokensOwed0 the computed amount of token0 owed to the position as of the last mint/burn/poke,\\n /// Returns tokensOwed1 the computed amount of token1 owed to the position as of the last mint/burn/poke\\n function positions(bytes32 key)\\n external\\n view\\n returns (\\n uint128 _liquidity,\\n uint256 feeGrowthInside0LastX128,\\n uint256 feeGrowthInside1LastX128,\\n uint128 tokensOwed0,\\n uint128 tokensOwed1\\n );\\n\\n /// @notice Returns data about a specific observation index\\n /// @param index The element of the observations array to fetch\\n /// @dev You most likely want to use #observe() instead of this method to get an observation as of some amount of time\\n /// ago, rather than at a specific index in the array.\\n /// @return blockTimestamp The timestamp of the observation,\\n /// Returns tickCumulative the tick multiplied by seconds elapsed for the life of the pool as of the observation timestamp,\\n /// Returns secondsPerLiquidityCumulativeX128 the seconds per in range liquidity for the life of the pool as of the observation timestamp,\\n /// Returns initialized whether the observation has been initialized and the values are safe to use\\n function observations(uint256 index)\\n external\\n view\\n returns (\\n uint32 blockTimestamp,\\n int56 tickCumulative,\\n uint160 secondsPerLiquidityCumulativeX128,\\n bool initialized\\n );\\n}\\n\",\"keccak256\":\"0x852dc1f5df7dcf7f11e7bb3eed79f0cea72ad4b25f6a9d2c35aafb48925fd49f\",\"license\":\"GPL-2.0-or-later\"},\"@uniswap/v3-core/contracts/libraries/FixedPoint96.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-2.0-or-later\\npragma solidity >=0.4.0;\\n\\n/// @title FixedPoint96\\n/// @notice A library for handling binary fixed point numbers, see https://en.wikipedia.org/wiki/Q_(number_format)\\n/// @dev Used in SqrtPriceMath.sol\\nlibrary FixedPoint96 {\\n uint8 internal constant RESOLUTION = 96;\\n uint256 internal constant Q96 = 0x1000000000000000000000000;\\n}\\n\",\"keccak256\":\"0x0ba8a9b95a956a4050749c0158e928398c447c91469682ca8a7cc7e77a7fe032\",\"license\":\"GPL-2.0-or-later\"},\"contracts/GUniPool.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity 0.8.19;\\n\\nimport {\\n IUniswapV3MintCallback\\n} from \\\"@uniswap/v3-core/contracts/interfaces/callback/IUniswapV3MintCallback.sol\\\";\\nimport {\\n IUniswapV3SwapCallback\\n} from \\\"@uniswap/v3-core/contracts/interfaces/callback/IUniswapV3SwapCallback.sol\\\";\\nimport {GUniPoolStorage} from \\\"./abstract/GUniPoolStorage.sol\\\";\\nimport {\\n IUniswapV3Pool\\n} from \\\"@uniswap/v3-core/contracts/interfaces/IUniswapV3Pool.sol\\\";\\nimport {TickMath} from \\\"./vendor/uniswap/TickMath.sol\\\";\\nimport {\\n IERC20,\\n SafeERC20\\n} from \\\"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\\\";\\nimport {SafeCast} from \\\"@openzeppelin/contracts/utils/math/SafeCast.sol\\\";\\nimport {\\n FullMath,\\n LiquidityAmounts\\n} from \\\"./vendor/uniswap/LiquidityAmounts.sol\\\";\\n\\ncontract GUniPool is\\n IUniswapV3MintCallback,\\n IUniswapV3SwapCallback,\\n GUniPoolStorage\\n{\\n using SafeERC20 for IERC20;\\n using TickMath for int24;\\n\\n event Minted(\\n address receiver,\\n uint256 mintAmount,\\n uint256 amount0In,\\n uint256 amount1In,\\n uint128 liquidityMinted\\n );\\n\\n event Burned(\\n address receiver,\\n uint256 burnAmount,\\n uint256 amount0Out,\\n uint256 amount1Out,\\n uint128 liquidityBurned\\n );\\n\\n event Rebalance(\\n int24 lowerTick_,\\n int24 upperTick_,\\n uint128 liquidityBefore,\\n uint128 liquidityAfter\\n );\\n\\n event FeesEarned(uint256 feesEarned0, uint256 feesEarned1);\\n\\n // solhint-disable-next-line max-line-length\\n constructor(address payable _gelato) GUniPoolStorage(_gelato) {} // solhint-disable-line no-empty-blocks\\n\\n /// @notice Uniswap V3 callback fn, called back on pool.mint\\n function uniswapV3MintCallback(\\n uint256 amount0Owed,\\n uint256 amount1Owed,\\n bytes calldata /*_data*/\\n ) external override {\\n require(msg.sender == address(pool), \\\"callback caller\\\");\\n\\n if (amount0Owed > 0) token0.safeTransfer(msg.sender, amount0Owed);\\n if (amount1Owed > 0) token1.safeTransfer(msg.sender, amount1Owed);\\n }\\n\\n /// @notice Uniswap v3 callback fn, called back on pool.swap\\n function uniswapV3SwapCallback(\\n int256 amount0Delta,\\n int256 amount1Delta,\\n bytes calldata /*data*/\\n ) external override {\\n require(msg.sender == address(pool), \\\"callback caller\\\");\\n\\n if (amount0Delta > 0)\\n token0.safeTransfer(msg.sender, uint256(amount0Delta));\\n else if (amount1Delta > 0)\\n token1.safeTransfer(msg.sender, uint256(amount1Delta));\\n }\\n\\n // User functions => Should be called via a Router\\n\\n /// @notice mint fungible G-UNI tokens, fractional shares of a Uniswap V3 position\\n /// @dev to compute the amouint of tokens necessary to mint `mintAmount` see getMintAmounts\\n /// @param mintAmount The number of G-UNI tokens to mint\\n /// @param receiver The account to receive the minted tokens\\n /// @return amount0 amount of token0 transferred from msg.sender to mint `mintAmount`\\n /// @return amount1 amount of token1 transferred from msg.sender to mint `mintAmount`\\n /// @return liquidityMinted amount of liquidity added to the underlying Uniswap V3 position\\n // solhint-disable-next-line function-max-lines, code-complexity\\n function mint(uint256 mintAmount, address receiver)\\n external\\n nonReentrant\\n returns (\\n uint256 amount0,\\n uint256 amount1,\\n uint128 liquidityMinted\\n )\\n {\\n require(mintAmount > 0, \\\"mint 0\\\");\\n\\n uint256 totalSupply = totalSupply();\\n\\n (uint160 sqrtRatioX96, , , , , , ) = pool.slot0();\\n\\n if (totalSupply > 0) {\\n (uint256 amount0Current, uint256 amount1Current) =\\n getUnderlyingBalances();\\n\\n amount0 = FullMath.mulDivRoundingUp(\\n amount0Current,\\n mintAmount,\\n totalSupply\\n );\\n amount1 = FullMath.mulDivRoundingUp(\\n amount1Current,\\n mintAmount,\\n totalSupply\\n );\\n } else {\\n // if supply is 0 mintAmount == liquidity to deposit\\n (amount0, amount1) = LiquidityAmounts.getAmountsForLiquidity(\\n sqrtRatioX96,\\n lowerTick.getSqrtRatioAtTick(),\\n upperTick.getSqrtRatioAtTick(),\\n SafeCast.toUint128(mintAmount)\\n );\\n }\\n\\n // transfer amounts owed to contract\\n if (amount0 > 0) {\\n token0.safeTransferFrom(msg.sender, address(this), amount0);\\n }\\n if (amount1 > 0) {\\n token1.safeTransferFrom(msg.sender, address(this), amount1);\\n }\\n\\n // deposit as much new liquidity as possible\\n liquidityMinted = LiquidityAmounts.getLiquidityForAmounts(\\n sqrtRatioX96,\\n lowerTick.getSqrtRatioAtTick(),\\n upperTick.getSqrtRatioAtTick(),\\n amount0,\\n amount1\\n );\\n\\n pool.mint(address(this), lowerTick, upperTick, liquidityMinted, \\\"\\\");\\n\\n _mint(receiver, mintAmount);\\n emit Minted(receiver, mintAmount, amount0, amount1, liquidityMinted);\\n }\\n\\n /// @notice burn G-UNI tokens (fractional shares of a Uniswap V3 position) and receive tokens\\n /// @param burnAmount The number of G-UNI tokens to burn\\n /// @param receiver The account to receive the underlying amounts of token0 and token1\\n /// @return amount0 amount of token0 transferred to receiver for burning `burnAmount`\\n /// @return amount1 amount of token1 transferred to receiver for burning `burnAmount`\\n /// @return liquidityBurned amount of liquidity removed from the underlying Uniswap V3 position\\n // solhint-disable-next-line function-max-lines\\n function burn(uint256 burnAmount, address receiver)\\n external\\n nonReentrant\\n returns (\\n uint256 amount0,\\n uint256 amount1,\\n uint128 liquidityBurned\\n )\\n {\\n require(burnAmount > 0, \\\"burn 0\\\");\\n\\n uint256 totalSupply = totalSupply();\\n\\n (uint128 liquidity, , , , ) = pool.positions(_getPositionID());\\n\\n _burn(msg.sender, burnAmount);\\n\\n uint256 liquidityBurned_ =\\n FullMath.mulDiv(burnAmount, liquidity, totalSupply);\\n liquidityBurned = SafeCast.toUint128(liquidityBurned_);\\n (uint256 burn0, uint256 burn1, uint256 fee0, uint256 fee1) =\\n _withdraw(lowerTick, upperTick, liquidityBurned);\\n _applyFees(fee0, fee1);\\n (fee0, fee1) = _subtractAdminFees(fee0, fee1);\\n emit FeesEarned(fee0, fee1);\\n\\n amount0 =\\n burn0 +\\n FullMath.mulDiv(\\n token0.balanceOf(address(this)) -\\n burn0 -\\n managerBalance0 -\\n gelatoBalance0,\\n burnAmount,\\n totalSupply\\n );\\n amount1 =\\n burn1 +\\n FullMath.mulDiv(\\n token1.balanceOf(address(this)) -\\n burn1 -\\n managerBalance1 -\\n gelatoBalance1,\\n burnAmount,\\n totalSupply\\n );\\n\\n if (amount0 > 0) {\\n token0.safeTransfer(receiver, amount0);\\n }\\n\\n if (amount1 > 0) {\\n token1.safeTransfer(receiver, amount1);\\n }\\n\\n emit Burned(receiver, burnAmount, amount0, amount1, liquidityBurned);\\n }\\n\\n // Manager Functions => Called by Pool Manager\\n\\n /// @notice Change the range of underlying UniswapV3 position, only manager can call\\n /// @dev When changing the range the inventory of token0 and token1 may be rebalanced\\n /// with a swap to deposit as much liquidity as possible into the new position. Swap parameters\\n /// can be computed by simulating the whole operation: remove all liquidity, deposit as much\\n /// as possible into new position, then observe how much of token0 or token1 is leftover.\\n /// Swap a proportion of this leftover to deposit more liquidity into the position, since\\n /// any leftover will be unused and sit idle until the next rebalance.\\n /// @param newLowerTick The new lower bound of the position's range\\n /// @param newUpperTick The new upper bound of the position's range\\n /// @param swapThresholdPrice slippage parameter on the swap as a max or min sqrtPriceX96\\n /// @param swapAmountBPS amount of token to swap as proportion of total. Pass 0 to ignore swap.\\n /// @param zeroForOne Which token to input into the swap (true = token0, false = token1)\\n // solhint-disable-next-line function-max-lines\\n function executiveRebalance(\\n int24 newLowerTick,\\n int24 newUpperTick,\\n uint160 swapThresholdPrice,\\n uint256 swapAmountBPS,\\n bool zeroForOne\\n ) external onlyManager {\\n uint128 liquidity;\\n uint128 newLiquidity;\\n if (totalSupply() > 0) {\\n (liquidity, , , , ) = pool.positions(_getPositionID());\\n if (liquidity > 0) {\\n (, , uint256 fee0, uint256 fee1) =\\n _withdraw(lowerTick, upperTick, liquidity);\\n\\n _applyFees(fee0, fee1);\\n (fee0, fee1) = _subtractAdminFees(fee0, fee1);\\n emit FeesEarned(fee0, fee1);\\n }\\n\\n lowerTick = newLowerTick;\\n upperTick = newUpperTick;\\n\\n uint256 reinvest0 =\\n token0.balanceOf(address(this)) -\\n managerBalance0 -\\n gelatoBalance0;\\n uint256 reinvest1 =\\n token1.balanceOf(address(this)) -\\n managerBalance1 -\\n gelatoBalance1;\\n\\n _deposit(\\n newLowerTick,\\n newUpperTick,\\n reinvest0,\\n reinvest1,\\n swapThresholdPrice,\\n swapAmountBPS,\\n zeroForOne\\n );\\n\\n (newLiquidity, , , , ) = pool.positions(_getPositionID());\\n require(newLiquidity > 0, \\\"new position 0\\\");\\n } else {\\n lowerTick = newLowerTick;\\n upperTick = newUpperTick;\\n }\\n\\n emit Rebalance(newLowerTick, newUpperTick, liquidity, newLiquidity);\\n }\\n\\n // Gelatofied functions => Automatically called by Gelato\\n\\n /// @notice Reinvest fees earned into underlying position, only gelato executors can call\\n /// Position bounds CANNOT be altered by gelato, only manager may via executiveRebalance.\\n /// Frequency of rebalance configured with gelatoRebalanceBPS, alterable by manager.\\n function rebalance(\\n uint160 swapThresholdPrice,\\n uint256 swapAmountBPS,\\n bool zeroForOne,\\n uint256 feeAmount,\\n address paymentToken\\n ) external gelatofy(feeAmount, paymentToken) {\\n if (swapAmountBPS > 0) {\\n _checkSlippage(swapThresholdPrice, zeroForOne);\\n }\\n (uint128 liquidity, , , , ) = pool.positions(_getPositionID());\\n _rebalance(\\n liquidity,\\n swapThresholdPrice,\\n swapAmountBPS,\\n zeroForOne,\\n feeAmount,\\n paymentToken\\n );\\n\\n (uint128 newLiquidity, , , , ) = pool.positions(_getPositionID());\\n require(newLiquidity > liquidity, \\\"liquidity must increase\\\");\\n\\n emit Rebalance(lowerTick, upperTick, liquidity, newLiquidity);\\n }\\n\\n /// @notice withdraw manager fees accrued, only gelato executors can call.\\n /// Target account to receive fees is managerTreasury, alterable by manager.\\n /// Frequency of withdrawals configured with gelatoWithdrawBPS, alterable by manager.\\n function withdrawManagerBalance(uint256 feeAmount, address feeToken)\\n external\\n gelatofy(feeAmount, feeToken)\\n {\\n (uint256 amount0, uint256 amount1) =\\n _balancesToWithdraw(\\n managerBalance0,\\n managerBalance1,\\n feeAmount,\\n feeToken\\n );\\n\\n managerBalance0 = 0;\\n managerBalance1 = 0;\\n\\n if (amount0 > 0) {\\n token0.safeTransfer(managerTreasury, amount0);\\n }\\n\\n if (amount1 > 0) {\\n token1.safeTransfer(managerTreasury, amount1);\\n }\\n }\\n\\n /// @notice withdraw gelato fees accrued, only gelato executors can call.\\n /// Frequency of withdrawals configured with gelatoWithdrawBPS, alterable by manager.\\n function withdrawGelatoBalance(uint256 feeAmount, address feeToken)\\n external\\n gelatofy(feeAmount, feeToken)\\n {\\n (uint256 amount0, uint256 amount1) =\\n _balancesToWithdraw(\\n gelatoBalance0,\\n gelatoBalance1,\\n feeAmount,\\n feeToken\\n );\\n\\n gelatoBalance0 = 0;\\n gelatoBalance1 = 0;\\n\\n if (amount0 > 0) {\\n token0.safeTransfer(GELATO, amount0);\\n }\\n\\n if (amount1 > 0) {\\n token1.safeTransfer(GELATO, amount1);\\n }\\n }\\n\\n function _balancesToWithdraw(\\n uint256 balance0,\\n uint256 balance1,\\n uint256 feeAmount,\\n address feeToken\\n ) internal view returns (uint256 amount0, uint256 amount1) {\\n if (feeToken == address(token0)) {\\n require(\\n (balance0 * gelatoWithdrawBPS) / 10000 >= feeAmount,\\n \\\"high fee\\\"\\n );\\n amount0 = balance0 - feeAmount;\\n amount1 = balance1;\\n } else if (feeToken == address(token1)) {\\n require(\\n (balance1 * gelatoWithdrawBPS) / 10000 >= feeAmount,\\n \\\"high fee\\\"\\n );\\n amount1 = balance1 - feeAmount;\\n amount0 = balance0;\\n } else {\\n revert(\\\"wrong token\\\");\\n }\\n }\\n\\n // View functions\\n\\n /// @notice compute maximum G-UNI tokens that can be minted from `amount0Max` and `amount1Max`\\n /// @param amount0Max The maximum amount of token0 to forward on mint\\n /// @param amount0Max The maximum amount of token1 to forward on mint\\n /// @return amount0 actual amount of token0 to forward when minting `mintAmount`\\n /// @return amount1 actual amount of token1 to forward when minting `mintAmount`\\n /// @return mintAmount maximum number of G-UNI tokens to mint\\n function getMintAmounts(uint256 amount0Max, uint256 amount1Max)\\n external\\n view\\n returns (\\n uint256 amount0,\\n uint256 amount1,\\n uint256 mintAmount\\n )\\n {\\n uint256 totalSupply = totalSupply();\\n if (totalSupply > 0) {\\n (amount0, amount1, mintAmount) = _computeMintAmounts(\\n totalSupply,\\n amount0Max,\\n amount1Max\\n );\\n } else {\\n (uint160 sqrtRatioX96, , , , , , ) = pool.slot0();\\n uint128 newLiquidity =\\n LiquidityAmounts.getLiquidityForAmounts(\\n sqrtRatioX96,\\n lowerTick.getSqrtRatioAtTick(),\\n upperTick.getSqrtRatioAtTick(),\\n amount0Max,\\n amount1Max\\n );\\n mintAmount = uint256(newLiquidity);\\n (amount0, amount1) = LiquidityAmounts.getAmountsForLiquidity(\\n sqrtRatioX96,\\n lowerTick.getSqrtRatioAtTick(),\\n upperTick.getSqrtRatioAtTick(),\\n newLiquidity\\n );\\n }\\n }\\n\\n /// @notice compute total underlying holdings of the G-UNI token supply\\n /// includes current liquidity invested in uniswap position, current fees earned\\n /// and any uninvested leftover (but does not include manager or gelato fees accrued)\\n /// @return amount0Current current total underlying balance of token0\\n /// @return amount1Current current total underlying balance of token1\\n function getUnderlyingBalances()\\n public\\n view\\n returns (uint256 amount0Current, uint256 amount1Current)\\n {\\n (uint160 sqrtRatioX96, int24 tick, , , , , ) = pool.slot0();\\n return _getUnderlyingBalances(sqrtRatioX96, tick);\\n }\\n\\n function getUnderlyingBalancesAtPrice(uint160 sqrtRatioX96)\\n external\\n view\\n returns (uint256 amount0Current, uint256 amount1Current)\\n {\\n (, int24 tick, , , , , ) = pool.slot0();\\n return _getUnderlyingBalances(sqrtRatioX96, tick);\\n }\\n\\n // solhint-disable-next-line function-max-lines\\n function _getUnderlyingBalances(uint160 sqrtRatioX96, int24 tick)\\n internal\\n view\\n returns (uint256 amount0Current, uint256 amount1Current)\\n {\\n (\\n uint128 liquidity,\\n uint256 feeGrowthInside0Last,\\n uint256 feeGrowthInside1Last,\\n uint128 tokensOwed0,\\n uint128 tokensOwed1\\n ) = pool.positions(_getPositionID());\\n\\n // compute current holdings from liquidity\\n (amount0Current, amount1Current) = LiquidityAmounts\\n .getAmountsForLiquidity(\\n sqrtRatioX96,\\n lowerTick.getSqrtRatioAtTick(),\\n upperTick.getSqrtRatioAtTick(),\\n liquidity\\n );\\n\\n // compute current fees earned\\n uint256 fee0 =\\n _computeFeesEarned(true, feeGrowthInside0Last, tick, liquidity) +\\n uint256(tokensOwed0);\\n uint256 fee1 =\\n _computeFeesEarned(false, feeGrowthInside1Last, tick, liquidity) +\\n uint256(tokensOwed1);\\n\\n (fee0, fee1) = _subtractAdminFees(fee0, fee1);\\n\\n // add any leftover in contract to current holdings\\n amount0Current +=\\n fee0 +\\n token0.balanceOf(address(this)) -\\n managerBalance0 -\\n gelatoBalance0;\\n amount1Current +=\\n fee1 +\\n token1.balanceOf(address(this)) -\\n managerBalance1 -\\n gelatoBalance1;\\n }\\n\\n // Private functions\\n\\n // solhint-disable-next-line function-max-lines\\n function _rebalance(\\n uint128 liquidity,\\n uint160 swapThresholdPrice,\\n uint256 swapAmountBPS,\\n bool zeroForOne,\\n uint256 feeAmount,\\n address paymentToken\\n ) private {\\n uint256 leftover0 =\\n token0.balanceOf(address(this)) - managerBalance0 - gelatoBalance0;\\n uint256 leftover1 =\\n token1.balanceOf(address(this)) - managerBalance1 - gelatoBalance1;\\n\\n (, , uint256 feesEarned0, uint256 feesEarned1) =\\n _withdraw(lowerTick, upperTick, liquidity);\\n _applyFees(feesEarned0, feesEarned1);\\n (feesEarned0, feesEarned1) = _subtractAdminFees(\\n feesEarned0,\\n feesEarned1\\n );\\n emit FeesEarned(feesEarned0, feesEarned1);\\n feesEarned0 += leftover0;\\n feesEarned1 += leftover1;\\n\\n if (paymentToken == address(token0)) {\\n require(\\n (feesEarned0 * gelatoRebalanceBPS) / 10000 >= feeAmount,\\n \\\"high fee\\\"\\n );\\n leftover0 =\\n token0.balanceOf(address(this)) -\\n managerBalance0 -\\n gelatoBalance0 -\\n feeAmount;\\n leftover1 =\\n token1.balanceOf(address(this)) -\\n managerBalance1 -\\n gelatoBalance1;\\n } else if (paymentToken == address(token1)) {\\n require(\\n (feesEarned1 * gelatoRebalanceBPS) / 10000 >= feeAmount,\\n \\\"high fee\\\"\\n );\\n leftover0 =\\n token0.balanceOf(address(this)) -\\n managerBalance0 -\\n gelatoBalance0;\\n leftover1 =\\n token1.balanceOf(address(this)) -\\n managerBalance1 -\\n gelatoBalance1 -\\n feeAmount;\\n } else {\\n revert(\\\"wrong token\\\");\\n }\\n\\n _deposit(\\n lowerTick,\\n upperTick,\\n leftover0,\\n leftover1,\\n swapThresholdPrice,\\n swapAmountBPS,\\n zeroForOne\\n );\\n }\\n\\n // solhint-disable-next-line function-max-lines\\n function _withdraw(\\n int24 lowerTick_,\\n int24 upperTick_,\\n uint128 liquidity\\n )\\n private\\n returns (\\n uint256 burn0,\\n uint256 burn1,\\n uint256 fee0,\\n uint256 fee1\\n )\\n {\\n uint256 preBalance0 = token0.balanceOf(address(this));\\n uint256 preBalance1 = token1.balanceOf(address(this));\\n\\n (burn0, burn1) = pool.burn(lowerTick_, upperTick_, liquidity);\\n\\n pool.collect(\\n address(this),\\n lowerTick_,\\n upperTick_,\\n type(uint128).max,\\n type(uint128).max\\n );\\n\\n fee0 = token0.balanceOf(address(this)) - preBalance0 - burn0;\\n fee1 = token1.balanceOf(address(this)) - preBalance1 - burn1;\\n }\\n\\n // solhint-disable-next-line function-max-lines\\n function _deposit(\\n int24 lowerTick_,\\n int24 upperTick_,\\n uint256 amount0,\\n uint256 amount1,\\n uint160 swapThresholdPrice,\\n uint256 swapAmountBPS,\\n bool zeroForOne\\n ) private {\\n (uint160 sqrtRatioX96, , , , , , ) = pool.slot0();\\n // First, deposit as much as we can\\n uint128 baseLiquidity =\\n LiquidityAmounts.getLiquidityForAmounts(\\n sqrtRatioX96,\\n lowerTick_.getSqrtRatioAtTick(),\\n upperTick_.getSqrtRatioAtTick(),\\n amount0,\\n amount1\\n );\\n if (baseLiquidity > 0) {\\n (uint256 amountDeposited0, uint256 amountDeposited1) =\\n pool.mint(\\n address(this),\\n lowerTick_,\\n upperTick_,\\n baseLiquidity,\\n \\\"\\\"\\n );\\n\\n amount0 -= amountDeposited0;\\n amount1 -= amountDeposited1;\\n }\\n int256 swapAmount =\\n SafeCast.toInt256(\\n ((zeroForOne ? amount0 : amount1) * swapAmountBPS) / 10000\\n );\\n if (swapAmount > 0) {\\n _swapAndDeposit(\\n lowerTick_,\\n upperTick_,\\n amount0,\\n amount1,\\n swapAmount,\\n swapThresholdPrice,\\n zeroForOne\\n );\\n }\\n }\\n\\n function _swapAndDeposit(\\n int24 lowerTick_,\\n int24 upperTick_,\\n uint256 amount0,\\n uint256 amount1,\\n int256 swapAmount,\\n uint160 swapThresholdPrice,\\n bool zeroForOne\\n ) private returns (uint256 finalAmount0, uint256 finalAmount1) {\\n (int256 amount0Delta, int256 amount1Delta) =\\n pool.swap(\\n address(this),\\n zeroForOne,\\n swapAmount,\\n swapThresholdPrice,\\n \\\"\\\"\\n );\\n finalAmount0 = uint256(SafeCast.toInt256(amount0) - amount0Delta);\\n finalAmount1 = uint256(SafeCast.toInt256(amount1) - amount1Delta);\\n\\n // Add liquidity a second time\\n (uint160 sqrtRatioX96, , , , , , ) = pool.slot0();\\n uint128 liquidityAfterSwap =\\n LiquidityAmounts.getLiquidityForAmounts(\\n sqrtRatioX96,\\n lowerTick_.getSqrtRatioAtTick(),\\n upperTick_.getSqrtRatioAtTick(),\\n finalAmount0,\\n finalAmount1\\n );\\n if (liquidityAfterSwap > 0) {\\n pool.mint(\\n address(this),\\n lowerTick_,\\n upperTick_,\\n liquidityAfterSwap,\\n \\\"\\\"\\n );\\n }\\n }\\n\\n // solhint-disable-next-line function-max-lines, code-complexity\\n function _computeMintAmounts(\\n uint256 totalSupply,\\n uint256 amount0Max,\\n uint256 amount1Max\\n )\\n private\\n view\\n returns (\\n uint256 amount0,\\n uint256 amount1,\\n uint256 mintAmount\\n )\\n {\\n (uint256 amount0Current, uint256 amount1Current) =\\n getUnderlyingBalances();\\n\\n // compute proportional amount of tokens to mint\\n if (amount0Current == 0 && amount1Current > 0) {\\n mintAmount = FullMath.mulDiv(\\n amount1Max,\\n totalSupply,\\n amount1Current\\n );\\n } else if (amount1Current == 0 && amount0Current > 0) {\\n mintAmount = FullMath.mulDiv(\\n amount0Max,\\n totalSupply,\\n amount0Current\\n );\\n } else if (amount0Current == 0 && amount1Current == 0) {\\n revert(\\\"\\\");\\n } else {\\n // only if both are non-zero\\n uint256 amount0Mint =\\n FullMath.mulDiv(amount0Max, totalSupply, amount0Current);\\n uint256 amount1Mint =\\n FullMath.mulDiv(amount1Max, totalSupply, amount1Current);\\n require(amount0Mint > 0 && amount1Mint > 0, \\\"mint 0\\\");\\n\\n mintAmount = amount0Mint < amount1Mint ? amount0Mint : amount1Mint;\\n }\\n\\n // compute amounts owed to contract\\n amount0 = FullMath.mulDivRoundingUp(\\n mintAmount,\\n amount0Current,\\n totalSupply\\n );\\n amount1 = FullMath.mulDivRoundingUp(\\n mintAmount,\\n amount1Current,\\n totalSupply\\n );\\n }\\n\\n // solhint-disable-next-line function-max-lines\\n function _computeFeesEarned(\\n bool isZero,\\n uint256 feeGrowthInsideLast,\\n int24 tick,\\n uint128 liquidity\\n ) private view returns (uint256 fee) {\\n uint256 feeGrowthOutsideLower;\\n uint256 feeGrowthOutsideUpper;\\n uint256 feeGrowthGlobal;\\n if (isZero) {\\n feeGrowthGlobal = pool.feeGrowthGlobal0X128();\\n (, , feeGrowthOutsideLower, , , , , ) = pool.ticks(lowerTick);\\n (, , feeGrowthOutsideUpper, , , , , ) = pool.ticks(upperTick);\\n } else {\\n feeGrowthGlobal = pool.feeGrowthGlobal1X128();\\n (, , , feeGrowthOutsideLower, , , , ) = pool.ticks(lowerTick);\\n (, , , feeGrowthOutsideUpper, , , , ) = pool.ticks(upperTick);\\n }\\n\\n unchecked {\\n // calculate fee growth below\\n uint256 feeGrowthBelow;\\n if (tick >= lowerTick) {\\n feeGrowthBelow = feeGrowthOutsideLower;\\n } else {\\n feeGrowthBelow = feeGrowthGlobal - feeGrowthOutsideLower;\\n }\\n\\n // calculate fee growth above\\n uint256 feeGrowthAbove;\\n if (tick < upperTick) {\\n feeGrowthAbove = feeGrowthOutsideUpper;\\n } else {\\n feeGrowthAbove = feeGrowthGlobal - feeGrowthOutsideUpper;\\n }\\n\\n uint256 feeGrowthInside =\\n feeGrowthGlobal - feeGrowthBelow - feeGrowthAbove;\\n fee = FullMath.mulDiv(\\n liquidity,\\n feeGrowthInside - feeGrowthInsideLast,\\n 0x100000000000000000000000000000000\\n );\\n }\\n }\\n\\n function _applyFees(uint256 _fee0, uint256 _fee1) private {\\n gelatoBalance0 += (_fee0 * gelatoFeeBPS) / 10000;\\n gelatoBalance1 += (_fee1 * gelatoFeeBPS) / 10000;\\n managerBalance0 += (_fee0 * managerFeeBPS) / 10000;\\n managerBalance1 += (_fee1 * managerFeeBPS) / 10000;\\n }\\n\\n function _subtractAdminFees(uint256 rawFee0, uint256 rawFee1)\\n private\\n view\\n returns (uint256 fee0, uint256 fee1)\\n {\\n uint256 deduct0 = (rawFee0 * (gelatoFeeBPS + managerFeeBPS)) / 10000;\\n uint256 deduct1 = (rawFee1 * (gelatoFeeBPS + managerFeeBPS)) / 10000;\\n fee0 = rawFee0 - deduct0;\\n fee1 = rawFee1 - deduct1;\\n }\\n\\n function _checkSlippage(uint160 swapThresholdPrice, bool zeroForOne)\\n private\\n view\\n {\\n uint32[] memory secondsAgo = new uint32[](2);\\n secondsAgo[0] = gelatoSlippageInterval;\\n secondsAgo[1] = 0;\\n\\n (int56[] memory tickCumulatives, ) = pool.observe(secondsAgo);\\n\\n require(tickCumulatives.length == 2, \\\"array len\\\");\\n uint160 avgSqrtRatioX96;\\n unchecked {\\n int24 avgTick =\\n int24(\\n (tickCumulatives[1] - tickCumulatives[0]) /\\n int56(uint56(gelatoSlippageInterval))\\n );\\n avgSqrtRatioX96 = avgTick.getSqrtRatioAtTick();\\n }\\n\\n uint160 maxSlippage = (avgSqrtRatioX96 * gelatoSlippageBPS) / 10000;\\n if (zeroForOne) {\\n require(\\n swapThresholdPrice >= avgSqrtRatioX96 - maxSlippage,\\n \\\"high slippage\\\"\\n );\\n } else {\\n require(\\n swapThresholdPrice <= avgSqrtRatioX96 + maxSlippage,\\n \\\"high slippage\\\"\\n );\\n }\\n }\\n}\\n\",\"keccak256\":\"0xdd382818c81f34c434bb3d4235ac9ff39034cb68e1b87244837d9250878d9fa0\",\"license\":\"GPL-3.0\"},\"contracts/abstract/GUniPoolStorage.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity 0.8.19;\\n\\nimport {Gelatofied} from \\\"./Gelatofied.sol\\\";\\nimport {OwnableUninitialized} from \\\"./OwnableUninitialized.sol\\\";\\nimport {\\n IUniswapV3Pool\\n} from \\\"@uniswap/v3-core/contracts/interfaces/IUniswapV3Pool.sol\\\";\\nimport {IERC20} from \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\nimport {\\n ReentrancyGuardUpgradeable\\n} from \\\"@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol\\\";\\nimport {\\n ERC20Upgradeable\\n} from \\\"@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol\\\";\\n\\n/// @dev Single Global upgradeable state var storage base: APPEND ONLY\\n/// @dev Add all inherited contracts with state vars here: APPEND ONLY\\n/// @dev ERC20Upgradable Includes Initialize\\n// solhint-disable-next-line max-states-count\\n/// @dev Modified to support 0.8.19\\n/// @dev Modified to set the gelatoFeeBPS to 0\\nabstract contract GUniPoolStorage is\\n ERC20Upgradeable, /* XXXX DONT MODIFY ORDERING XXXX */\\n ReentrancyGuardUpgradeable,\\n OwnableUninitialized,\\n Gelatofied\\n // APPEND ADDITIONAL BASE WITH STATE VARS BELOW:\\n // XXXX DONT MODIFY ORDERING XXXX\\n{\\n // solhint-disable-next-line const-name-snakecase\\n string public constant version = \\\"1.0.0\\\";\\n // solhint-disable-next-line const-name-snakecase\\n uint16 public constant gelatoFeeBPS = 0;\\n\\n // XXXXXXXX DO NOT MODIFY ORDERING XXXXXXXX\\n int24 public lowerTick;\\n int24 public upperTick;\\n\\n uint16 public gelatoRebalanceBPS;\\n uint16 public gelatoWithdrawBPS;\\n uint16 public gelatoSlippageBPS;\\n uint32 public gelatoSlippageInterval;\\n\\n uint16 public managerFeeBPS;\\n address public managerTreasury;\\n\\n uint256 public managerBalance0;\\n uint256 public managerBalance1;\\n uint256 public gelatoBalance0;\\n uint256 public gelatoBalance1;\\n\\n IUniswapV3Pool public pool;\\n IERC20 public token0;\\n IERC20 public token1;\\n // APPPEND ADDITIONAL STATE VARS BELOW:\\n // XXXXXXXX DO NOT MODIFY ORDERING XXXXXXXX\\n\\n event UpdateAdminTreasury(\\n address oldAdminTreasury,\\n address newAdminTreasury\\n );\\n\\n event UpdateGelatoParams(\\n uint16 gelatoRebalanceBPS,\\n uint16 gelatoWithdrawBPS,\\n uint16 gelatoSlippageBPS,\\n uint32 gelatoSlippageInterval\\n );\\n\\n event SetManagerFee(uint16 managerFee);\\n\\n // solhint-disable-next-line max-line-length\\n constructor(address payable _gelato) Gelatofied(_gelato) {} // solhint-disable-line no-empty-blocks\\n\\n /// @notice initialize storage variables on a new G-UNI pool, only called once\\n /// @param _name name of G-UNI token\\n /// @param _symbol symbol of G-UNI token\\n /// @param _pool address of Uniswap V3 pool\\n /// @param _managerFeeBPS proportion of fees earned that go to manager treasury\\n /// note that the 4 above params are NOT UPDATEABLE AFTER INILIALIZATION\\n /// @param _lowerTick initial lowerTick (only changeable with executiveRebalance)\\n /// @param _lowerTick initial upperTick (only changeable with executiveRebalance)\\n /// @param _manager_ address of manager (ownership can be transferred)\\n function initialize(\\n string memory _name,\\n string memory _symbol,\\n address _pool,\\n uint16 _managerFeeBPS,\\n int24 _lowerTick,\\n int24 _upperTick,\\n address _manager_\\n ) external initializer {\\n require(_managerFeeBPS <= 10000 - gelatoFeeBPS, \\\"mBPS\\\");\\n\\n // these variables are immutable after initialization\\n pool = IUniswapV3Pool(_pool);\\n token0 = IERC20(pool.token0());\\n token1 = IERC20(pool.token1());\\n managerFeeBPS = _managerFeeBPS; // if set to 0 here manager can still initialize later\\n\\n // these variables can be udpated by the manager\\n gelatoSlippageInterval = 5 minutes; // default: last five minutes;\\n gelatoSlippageBPS = 500; // default: 5% slippage\\n gelatoWithdrawBPS = 100; // default: only auto withdraw if tx fee is lt 1% withdrawn\\n gelatoRebalanceBPS = 200; // default: only rebalance if tx fee is lt 2% reinvested\\n managerTreasury = _manager_; // default: treasury is admin\\n lowerTick = _lowerTick;\\n upperTick = _upperTick;\\n _manager = _manager_;\\n\\n // e.g. \\\"Gelato Uniswap V3 USDC/DAI LP\\\" and \\\"G-UNI\\\"\\n __ERC20_init(_name, _symbol);\\n __ReentrancyGuard_init();\\n }\\n\\n /// @notice change configurable parameters, only manager can call\\n /// @param newRebalanceBPS controls frequency of gelato rebalances: gas fee to execute\\n /// rebalance can be gelatoRebalanceBPS proportion of fees earned since last rebalance\\n /// @param newWithdrawBPS controls frequency of gelato withdrawals: gas fee to execute\\n /// withdrawal can be gelatoWithdrawBPS proportion of fees accrued since last withdraw\\n /// @param newSlippageBPS maximum slippage on swaps during gelato rebalance\\n /// @param newSlippageInterval length of time for TWAP used in computing slippage on swaps\\n /// @param newTreasury address where managerFee withdrawals are sent\\n // solhint-disable-next-line code-complexity\\n function updateGelatoParams(\\n uint16 newRebalanceBPS,\\n uint16 newWithdrawBPS,\\n uint16 newSlippageBPS,\\n uint32 newSlippageInterval,\\n address newTreasury\\n ) external onlyManager {\\n require(newWithdrawBPS <= 10000, \\\"BPS\\\");\\n require(newRebalanceBPS <= 10000, \\\"BPS\\\");\\n require(newSlippageBPS <= 10000, \\\"BPS\\\");\\n emit UpdateGelatoParams(\\n newRebalanceBPS,\\n newWithdrawBPS,\\n newSlippageBPS,\\n newSlippageInterval\\n );\\n if (newRebalanceBPS != 0) gelatoRebalanceBPS = newRebalanceBPS;\\n if (newWithdrawBPS != 0) gelatoWithdrawBPS = newWithdrawBPS;\\n if (newSlippageBPS != 0) gelatoSlippageBPS = newSlippageBPS;\\n if (newSlippageInterval != 0)\\n gelatoSlippageInterval = newSlippageInterval;\\n if (newTreasury != address(0)) managerTreasury = newTreasury;\\n }\\n\\n /// @notice initializeManagerFee sets a managerFee, only manager can call.\\n /// If a manager fee was not set in the initialize function it can be set here\\n /// but ONLY ONCE- after it is set to a non-zero value, managerFee can never be set again.\\n /// @param _managerFeeBPS proportion of fees earned that are credited to manager in Basis Points\\n function initializeManagerFee(uint16 _managerFeeBPS) external onlyManager {\\n require(managerFeeBPS == 0, \\\"fee\\\");\\n require(\\n _managerFeeBPS > 0 && _managerFeeBPS <= 10000 - gelatoFeeBPS,\\n \\\"mBPS\\\"\\n );\\n emit SetManagerFee(_managerFeeBPS);\\n managerFeeBPS = _managerFeeBPS;\\n }\\n\\n function renounceOwnership() public virtual override onlyManager {\\n managerTreasury = address(0);\\n managerFeeBPS = 0;\\n managerBalance0 = 0;\\n managerBalance1 = 0;\\n super.renounceOwnership();\\n }\\n\\n function getPositionID() external view returns (bytes32 positionID) {\\n return _getPositionID();\\n }\\n\\n function _getPositionID() internal view returns (bytes32 positionID) {\\n return keccak256(abi.encodePacked(address(this), lowerTick, upperTick));\\n }\\n}\\n\",\"keccak256\":\"0xd1ad805a13c7cd73554b1e3cc3735f3f369d759f8e0b9188977b85295456d033\",\"license\":\"GPL-3.0\"},\"contracts/abstract/Gelatofied.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity 0.8.19;\\n\\nimport {Address} from \\\"@openzeppelin/contracts/utils/Address.sol\\\";\\nimport {\\n IERC20,\\n SafeERC20\\n} from \\\"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\\\";\\n\\n/// @dev DO NOT ADD STATE VARIABLES - APPEND THEM TO GelatoUniV3PoolStorage\\n/// @dev DO NOT ADD BASE CONTRACTS WITH STATE VARS - APPEND THEM TO GelatoUniV3PoolStorage\\nabstract contract Gelatofied {\\n using Address for address payable;\\n using SafeERC20 for IERC20;\\n\\n // solhint-disable-next-line var-name-mixedcase\\n address payable public immutable GELATO;\\n\\n address private constant _ETH = 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE;\\n\\n constructor(address payable _gelato) {\\n GELATO = _gelato;\\n }\\n\\n modifier gelatofy(uint256 _amount, address _paymentToken) {\\n require(msg.sender == GELATO, \\\"Gelatofied: Only gelato\\\");\\n _;\\n if (_paymentToken == _ETH) GELATO.sendValue(_amount);\\n else IERC20(_paymentToken).safeTransfer(GELATO, _amount);\\n }\\n}\\n\",\"keccak256\":\"0x264bc07e6e1b80c454c311ecf4b56afe245ddde31151ed9bcc4cb9ad25bec46a\",\"license\":\"GPL-3.0\"},\"contracts/abstract/OwnableUninitialized.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity 0.8.19;\\n\\n/**\\n * @dev Contract module which provides a basic access control mechanism, where\\n * there is an account (an manager) that can be granted exclusive access to\\n * specific functions.\\n *\\n * By default, the manager account will be the one that deploys the contract. This\\n * can later be changed with {transferOwnership}.\\n *\\n * This module is used through inheritance. It will make available the modifier\\n * `onlyManager`, which can be applied to your functions to restrict their use to\\n * the manager.\\n */\\n/// @dev DO NOT ADD STATE VARIABLES - APPEND THEM TO GelatoUniV3PoolStorage\\n/// @dev DO NOT ADD BASE CONTRACTS WITH STATE VARS - APPEND THEM TO GelatoUniV3PoolStorage\\nabstract contract OwnableUninitialized {\\n address internal _manager;\\n\\n event OwnershipTransferred(\\n address indexed previousManager,\\n address indexed newManager\\n );\\n\\n /// @dev Initializes the contract setting the deployer as the initial manager.\\n /// CONSTRUCTOR EMPTY - USE INITIALIZIABLE INSTEAD\\n // solhint-disable-next-line no-empty-blocks\\n constructor() {}\\n\\n /**\\n * @dev Returns the address of the current manager.\\n */\\n function manager() public view virtual returns (address) {\\n return _manager;\\n }\\n\\n /**\\n * @dev Throws if called by any account other than the manager.\\n */\\n modifier onlyManager() {\\n require(manager() == msg.sender, \\\"Ownable: caller is not the manager\\\");\\n _;\\n }\\n\\n /**\\n * @dev Leaves the contract without manager. It will not be possible to call\\n * `onlyManager` functions anymore. Can only be called by the current manager.\\n *\\n * NOTE: Renouncing ownership will leave the contract without an manager,\\n * thereby removing any functionality that is only available to the manager.\\n */\\n function renounceOwnership() public virtual onlyManager {\\n emit OwnershipTransferred(_manager, address(0));\\n _manager = address(0);\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Can only be called by the current manager.\\n */\\n function transferOwnership(address newOwner) public virtual onlyManager {\\n require(\\n newOwner != address(0),\\n \\\"Ownable: new manager is the zero address\\\"\\n );\\n emit OwnershipTransferred(_manager, newOwner);\\n _manager = newOwner;\\n }\\n}\\n\",\"keccak256\":\"0xb6016d5611f38fbd516a84ea2e56794cb76a8d61c40f6716d5f0133f195759bd\",\"license\":\"GPL-3.0\"},\"contracts/vendor/uniswap/FullMath.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity ^0.8.4;\\n\\n/// @title Contains 512-bit math functions\\n/// @notice Facilitates multiplication and division that can have overflow of an intermediate value without any loss of precision\\n/// @dev Handles \\\"phantom overflow\\\" i.e., allows multiplication and division where an intermediate value overflows 256 bits\\nlibrary FullMath {\\n /// @notice Calculates floor(a\\u00d7b\\u00f7denominator) with full precision. Throws if result overflows a uint256 or denominator == 0\\n /// @param a The multiplicand\\n /// @param b The multiplier\\n /// @param denominator The divisor\\n /// @return result The 256-bit result\\n /// @dev Credit to Remco Bloemen under MIT license https://xn--2-umb.com/21/muldiv\\n function mulDiv(\\n uint256 a,\\n uint256 b,\\n uint256 denominator\\n ) internal pure returns (uint256 result) {\\n unchecked {\\n // 512-bit multiply [prod1 prod0] = a * b\\n // Compute the product mod 2**256 and mod 2**256 - 1\\n // then use the Chinese Remainder Theorem to reconstruct\\n // the 512 bit result. The result is stored in two 256\\n // variables such that product = prod1 * 2**256 + prod0\\n uint256 prod0; // Least significant 256 bits of the product\\n uint256 prod1; // Most significant 256 bits of the product\\n assembly {\\n let mm := mulmod(a, b, not(0))\\n prod0 := mul(a, b)\\n prod1 := sub(sub(mm, prod0), lt(mm, prod0))\\n }\\n\\n // Handle non-overflow cases, 256 by 256 division\\n if (prod1 == 0) {\\n require(denominator > 0);\\n assembly {\\n result := div(prod0, denominator)\\n }\\n return result;\\n }\\n\\n // Make sure the result is less than 2**256.\\n // Also prevents denominator == 0\\n require(denominator > prod1);\\n\\n ///////////////////////////////////////////////\\n // 512 by 256 division.\\n ///////////////////////////////////////////////\\n\\n // Make division exact by subtracting the remainder from [prod1 prod0]\\n // Compute remainder using mulmod\\n uint256 remainder;\\n assembly {\\n remainder := mulmod(a, b, denominator)\\n }\\n // Subtract 256 bit number from 512 bit number\\n assembly {\\n prod1 := sub(prod1, gt(remainder, prod0))\\n prod0 := sub(prod0, remainder)\\n }\\n\\n // Factor powers of two out of denominator\\n // Compute largest power of two divisor of denominator.\\n // Always >= 1.\\n // EDIT for 0.8 compatibility:\\n // see: https://ethereum.stackexchange.com/questions/96642/unary-operator-cannot-be-applied-to-type-uint256\\n uint256 twos = denominator & (~denominator + 1);\\n\\n // Divide denominator by power of two\\n assembly {\\n denominator := div(denominator, twos)\\n }\\n\\n // Divide [prod1 prod0] by the factors of two\\n assembly {\\n prod0 := div(prod0, twos)\\n }\\n // Shift in bits from prod1 into prod0. For this we need\\n // to flip `twos` such that it is 2**256 / twos.\\n // If twos is zero, then it becomes one\\n assembly {\\n twos := add(div(sub(0, twos), twos), 1)\\n }\\n prod0 |= prod1 * twos;\\n\\n // Invert denominator mod 2**256\\n // Now that denominator is an odd number, it has an inverse\\n // modulo 2**256 such that denominator * inv = 1 mod 2**256.\\n // Compute the inverse by starting with a seed that is correct\\n // correct for four bits. That is, denominator * inv = 1 mod 2**4\\n uint256 inv = (3 * denominator) ^ 2;\\n // Now use Newton-Raphson iteration to improve the precision.\\n // Thanks to Hensel's lifting lemma, this also works in modular\\n // arithmetic, doubling the correct bits in each step.\\n inv *= 2 - denominator * inv; // inverse mod 2**8\\n inv *= 2 - denominator * inv; // inverse mod 2**16\\n inv *= 2 - denominator * inv; // inverse mod 2**32\\n inv *= 2 - denominator * inv; // inverse mod 2**64\\n inv *= 2 - denominator * inv; // inverse mod 2**128\\n inv *= 2 - denominator * inv; // inverse mod 2**256\\n\\n // Because the division is now exact we can divide by multiplying\\n // with the modular inverse of denominator. This will give us the\\n // correct result modulo 2**256. Since the precoditions guarantee\\n // that the outcome is less than 2**256, this is the final result.\\n // We don't need to compute the high bits of the result and prod1\\n // is no longer required.\\n result = prod0 * inv;\\n return result;\\n }\\n }\\n\\n /// @notice Calculates ceil(a\\u00d7b\\u00f7denominator) with full precision. Throws if result overflows a uint256 or denominator == 0\\n /// @param a The multiplicand\\n /// @param b The multiplier\\n /// @param denominator The divisor\\n /// @return result The 256-bit result\\n function mulDivRoundingUp(\\n uint256 a,\\n uint256 b,\\n uint256 denominator\\n ) internal pure returns (uint256 result) {\\n result = mulDiv(a, b, denominator);\\n if (mulmod(a, b, denominator) > 0) {\\n require(result < type(uint256).max);\\n result++;\\n }\\n }\\n}\\n\",\"keccak256\":\"0x3fa0efa3eea2a84bd6ab7e55badd61f97069a6c50780059b036c810427a9740c\",\"license\":\"GPL-3.0\"},\"contracts/vendor/uniswap/LiquidityAmounts.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity >=0.5.0;\\n\\nimport {FullMath} from \\\"./FullMath.sol\\\";\\nimport \\\"@uniswap/v3-core/contracts/libraries/FixedPoint96.sol\\\";\\n\\n/// @title Liquidity amount functions\\n/// @notice Provides functions for computing liquidity amounts from token amounts and prices\\nlibrary LiquidityAmounts {\\n function toUint128(uint256 x) private pure returns (uint128 y) {\\n require((y = uint128(x)) == x);\\n }\\n\\n /// @notice Computes the amount of liquidity received for a given amount of token0 and price range\\n /// @dev Calculates amount0 * (sqrt(upper) * sqrt(lower)) / (sqrt(upper) - sqrt(lower)).\\n /// @param sqrtRatioAX96 A sqrt price\\n /// @param sqrtRatioBX96 Another sqrt price\\n /// @param amount0 The amount0 being sent in\\n /// @return liquidity The amount of returned liquidity\\n function getLiquidityForAmount0(\\n uint160 sqrtRatioAX96,\\n uint160 sqrtRatioBX96,\\n uint256 amount0\\n ) internal pure returns (uint128 liquidity) {\\n if (sqrtRatioAX96 > sqrtRatioBX96)\\n (sqrtRatioAX96, sqrtRatioBX96) = (sqrtRatioBX96, sqrtRatioAX96);\\n uint256 intermediate =\\n FullMath.mulDiv(sqrtRatioAX96, sqrtRatioBX96, FixedPoint96.Q96);\\n return\\n toUint128(\\n FullMath.mulDiv(\\n amount0,\\n intermediate,\\n sqrtRatioBX96 - sqrtRatioAX96\\n )\\n );\\n }\\n\\n /// @notice Computes the amount of liquidity received for a given amount of token1 and price range\\n /// @dev Calculates amount1 / (sqrt(upper) - sqrt(lower)).\\n /// @param sqrtRatioAX96 A sqrt price\\n /// @param sqrtRatioBX96 Another sqrt price\\n /// @param amount1 The amount1 being sent in\\n /// @return liquidity The amount of returned liquidity\\n function getLiquidityForAmount1(\\n uint160 sqrtRatioAX96,\\n uint160 sqrtRatioBX96,\\n uint256 amount1\\n ) internal pure returns (uint128 liquidity) {\\n if (sqrtRatioAX96 > sqrtRatioBX96)\\n (sqrtRatioAX96, sqrtRatioBX96) = (sqrtRatioBX96, sqrtRatioAX96);\\n return\\n toUint128(\\n FullMath.mulDiv(\\n amount1,\\n FixedPoint96.Q96,\\n sqrtRatioBX96 - sqrtRatioAX96\\n )\\n );\\n }\\n\\n /// @notice Computes the maximum amount of liquidity received for a given amount of token0, token1, the current\\n /// pool prices and the prices at the tick boundaries\\n function getLiquidityForAmounts(\\n uint160 sqrtRatioX96,\\n uint160 sqrtRatioAX96,\\n uint160 sqrtRatioBX96,\\n uint256 amount0,\\n uint256 amount1\\n ) internal pure returns (uint128 liquidity) {\\n if (sqrtRatioAX96 > sqrtRatioBX96)\\n (sqrtRatioAX96, sqrtRatioBX96) = (sqrtRatioBX96, sqrtRatioAX96);\\n\\n if (sqrtRatioX96 <= sqrtRatioAX96) {\\n liquidity = getLiquidityForAmount0(\\n sqrtRatioAX96,\\n sqrtRatioBX96,\\n amount0\\n );\\n } else if (sqrtRatioX96 < sqrtRatioBX96) {\\n uint128 liquidity0 =\\n getLiquidityForAmount0(sqrtRatioX96, sqrtRatioBX96, amount0);\\n uint128 liquidity1 =\\n getLiquidityForAmount1(sqrtRatioAX96, sqrtRatioX96, amount1);\\n\\n liquidity = liquidity0 < liquidity1 ? liquidity0 : liquidity1;\\n } else {\\n liquidity = getLiquidityForAmount1(\\n sqrtRatioAX96,\\n sqrtRatioBX96,\\n amount1\\n );\\n }\\n }\\n\\n /// @notice Computes the amount of token0 for a given amount of liquidity and a price range\\n /// @param sqrtRatioAX96 A sqrt price\\n /// @param sqrtRatioBX96 Another sqrt price\\n /// @param liquidity The liquidity being valued\\n /// @return amount0 The amount0\\n function getAmount0ForLiquidity(\\n uint160 sqrtRatioAX96,\\n uint160 sqrtRatioBX96,\\n uint128 liquidity\\n ) internal pure returns (uint256 amount0) {\\n if (sqrtRatioAX96 > sqrtRatioBX96)\\n (sqrtRatioAX96, sqrtRatioBX96) = (sqrtRatioBX96, sqrtRatioAX96);\\n\\n return\\n FullMath.mulDiv(\\n uint256(liquidity) << FixedPoint96.RESOLUTION,\\n sqrtRatioBX96 - sqrtRatioAX96,\\n sqrtRatioBX96\\n ) / sqrtRatioAX96;\\n }\\n\\n /// @notice Computes the amount of token1 for a given amount of liquidity and a price range\\n /// @param sqrtRatioAX96 A sqrt price\\n /// @param sqrtRatioBX96 Another sqrt price\\n /// @param liquidity The liquidity being valued\\n /// @return amount1 The amount1\\n function getAmount1ForLiquidity(\\n uint160 sqrtRatioAX96,\\n uint160 sqrtRatioBX96,\\n uint128 liquidity\\n ) internal pure returns (uint256 amount1) {\\n if (sqrtRatioAX96 > sqrtRatioBX96)\\n (sqrtRatioAX96, sqrtRatioBX96) = (sqrtRatioBX96, sqrtRatioAX96);\\n\\n return\\n FullMath.mulDiv(\\n liquidity,\\n sqrtRatioBX96 - sqrtRatioAX96,\\n FixedPoint96.Q96\\n );\\n }\\n\\n /// @notice Computes the token0 and token1 value for a given amount of liquidity, the current\\n /// pool prices and the prices at the tick boundaries\\n function getAmountsForLiquidity(\\n uint160 sqrtRatioX96,\\n uint160 sqrtRatioAX96,\\n uint160 sqrtRatioBX96,\\n uint128 liquidity\\n ) internal pure returns (uint256 amount0, uint256 amount1) {\\n if (sqrtRatioAX96 > sqrtRatioBX96)\\n (sqrtRatioAX96, sqrtRatioBX96) = (sqrtRatioBX96, sqrtRatioAX96);\\n\\n if (sqrtRatioX96 <= sqrtRatioAX96) {\\n amount0 = getAmount0ForLiquidity(\\n sqrtRatioAX96,\\n sqrtRatioBX96,\\n liquidity\\n );\\n } else if (sqrtRatioX96 < sqrtRatioBX96) {\\n amount0 = getAmount0ForLiquidity(\\n sqrtRatioX96,\\n sqrtRatioBX96,\\n liquidity\\n );\\n amount1 = getAmount1ForLiquidity(\\n sqrtRatioAX96,\\n sqrtRatioX96,\\n liquidity\\n );\\n } else {\\n amount1 = getAmount1ForLiquidity(\\n sqrtRatioAX96,\\n sqrtRatioBX96,\\n liquidity\\n );\\n }\\n }\\n}\\n\",\"keccak256\":\"0x6205f6409d42fc9565530d2a69819bf8c4e4c66b7a4c61d0827e81c084df6832\",\"license\":\"GPL-3.0\"},\"contracts/vendor/uniswap/TickMath.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\npragma solidity 0.8.19;\\n\\n/// @title Math library for computing sqrt prices from ticks and vice versa\\n/// @notice Computes sqrt price for ticks of size 1.0001, i.e. sqrt(1.0001^tick) as fixed point Q64.96 numbers. Supports\\n/// prices between 2**-128 and 2**128\\nlibrary TickMath {\\n /// @dev The minimum tick that may be passed to #getSqrtRatioAtTick computed from log base 1.0001 of 2**-128\\n int24 internal constant MIN_TICK = -887272;\\n /// @dev The maximum tick that may be passed to #getSqrtRatioAtTick computed from log base 1.0001 of 2**128\\n int24 internal constant MAX_TICK = -MIN_TICK;\\n\\n /// @dev The minimum value that can be returned from #getSqrtRatioAtTick. Equivalent to getSqrtRatioAtTick(MIN_TICK)\\n uint160 internal constant MIN_SQRT_RATIO = 4295128739;\\n /// @dev The maximum value that can be returned from #getSqrtRatioAtTick. Equivalent to getSqrtRatioAtTick(MAX_TICK)\\n uint160 internal constant MAX_SQRT_RATIO =\\n 1461446703485210103287273052203988822378723970342;\\n\\n /// @notice Calculates sqrt(1.0001^tick) * 2^96\\n /// @dev Throws if |tick| > max tick\\n /// @param tick The input tick for the above formula\\n /// @return sqrtPriceX96 A Fixed point Q64.96 number representing the sqrt of the ratio of the two assets (token1/token0)\\n /// at the given tick\\n function getSqrtRatioAtTick(int24 tick)\\n internal\\n pure\\n returns (uint160 sqrtPriceX96)\\n {\\n uint256 absTick =\\n tick < 0 ? uint256(-int256(tick)) : uint256(int256(tick));\\n\\n // EDIT: 0.8 compatibility\\n require(absTick <= uint256(int256(MAX_TICK)), \\\"T\\\");\\n\\n uint256 ratio =\\n absTick & 0x1 != 0\\n ? 0xfffcb933bd6fad37aa2d162d1a594001\\n : 0x100000000000000000000000000000000;\\n if (absTick & 0x2 != 0)\\n ratio = (ratio * 0xfff97272373d413259a46990580e213a) >> 128;\\n if (absTick & 0x4 != 0)\\n ratio = (ratio * 0xfff2e50f5f656932ef12357cf3c7fdcc) >> 128;\\n if (absTick & 0x8 != 0)\\n ratio = (ratio * 0xffe5caca7e10e4e61c3624eaa0941cd0) >> 128;\\n if (absTick & 0x10 != 0)\\n ratio = (ratio * 0xffcb9843d60f6159c9db58835c926644) >> 128;\\n if (absTick & 0x20 != 0)\\n ratio = (ratio * 0xff973b41fa98c081472e6896dfb254c0) >> 128;\\n if (absTick & 0x40 != 0)\\n ratio = (ratio * 0xff2ea16466c96a3843ec78b326b52861) >> 128;\\n if (absTick & 0x80 != 0)\\n ratio = (ratio * 0xfe5dee046a99a2a811c461f1969c3053) >> 128;\\n if (absTick & 0x100 != 0)\\n ratio = (ratio * 0xfcbe86c7900a88aedcffc83b479aa3a4) >> 128;\\n if (absTick & 0x200 != 0)\\n ratio = (ratio * 0xf987a7253ac413176f2b074cf7815e54) >> 128;\\n if (absTick & 0x400 != 0)\\n ratio = (ratio * 0xf3392b0822b70005940c7a398e4b70f3) >> 128;\\n if (absTick & 0x800 != 0)\\n ratio = (ratio * 0xe7159475a2c29b7443b29c7fa6e889d9) >> 128;\\n if (absTick & 0x1000 != 0)\\n ratio = (ratio * 0xd097f3bdfd2022b8845ad8f792aa5825) >> 128;\\n if (absTick & 0x2000 != 0)\\n ratio = (ratio * 0xa9f746462d870fdf8a65dc1f90e061e5) >> 128;\\n if (absTick & 0x4000 != 0)\\n ratio = (ratio * 0x70d869a156d2a1b890bb3df62baf32f7) >> 128;\\n if (absTick & 0x8000 != 0)\\n ratio = (ratio * 0x31be135f97d08fd981231505542fcfa6) >> 128;\\n if (absTick & 0x10000 != 0)\\n ratio = (ratio * 0x9aa508b5b7a84e1c677de54f3e99bc9) >> 128;\\n if (absTick & 0x20000 != 0)\\n ratio = (ratio * 0x5d6af8dedb81196699c329225ee604) >> 128;\\n if (absTick & 0x40000 != 0)\\n ratio = (ratio * 0x2216e584f5fa1ea926041bedfe98) >> 128;\\n if (absTick & 0x80000 != 0)\\n ratio = (ratio * 0x48a170391f7dc42444e8fa2) >> 128;\\n\\n if (tick > 0) ratio = type(uint256).max / ratio;\\n\\n // this divides by 1<<32 rounding up to go from a Q128.128 to a Q128.96.\\n // we then downcast because we know the result always fits within 160 bits due to our tick input constraint\\n // we round up in the division so getTickAtSqrtRatio of the output price is always consistent\\n sqrtPriceX96 = uint160(\\n (ratio >> 32) + (ratio % (1 << 32) == 0 ? 0 : 1)\\n );\\n }\\n\\n /// @notice Calculates the greatest tick value such that getRatioAtTick(tick) <= ratio\\n /// @dev Throws in case sqrtPriceX96 < MIN_SQRT_RATIO, as MIN_SQRT_RATIO is the lowest value getRatioAtTick may\\n /// ever return.\\n /// @param sqrtPriceX96 The sqrt ratio for which to compute the tick as a Q64.96\\n /// @return tick The greatest tick for which the ratio is less than or equal to the input ratio\\n function getTickAtSqrtRatio(uint160 sqrtPriceX96)\\n internal\\n pure\\n returns (int24 tick)\\n {\\n // second inequality must be < because the price can never reach the price at the max tick\\n require(\\n sqrtPriceX96 >= MIN_SQRT_RATIO && sqrtPriceX96 < MAX_SQRT_RATIO,\\n \\\"R\\\"\\n );\\n uint256 ratio = uint256(sqrtPriceX96) << 32;\\n\\n uint256 r = ratio;\\n uint256 msb = 0;\\n\\n assembly {\\n let f := shl(7, gt(r, 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF))\\n msb := or(msb, f)\\n r := shr(f, r)\\n }\\n assembly {\\n let f := shl(6, gt(r, 0xFFFFFFFFFFFFFFFF))\\n msb := or(msb, f)\\n r := shr(f, r)\\n }\\n assembly {\\n let f := shl(5, gt(r, 0xFFFFFFFF))\\n msb := or(msb, f)\\n r := shr(f, r)\\n }\\n assembly {\\n let f := shl(4, gt(r, 0xFFFF))\\n msb := or(msb, f)\\n r := shr(f, r)\\n }\\n assembly {\\n let f := shl(3, gt(r, 0xFF))\\n msb := or(msb, f)\\n r := shr(f, r)\\n }\\n assembly {\\n let f := shl(2, gt(r, 0xF))\\n msb := or(msb, f)\\n r := shr(f, r)\\n }\\n assembly {\\n let f := shl(1, gt(r, 0x3))\\n msb := or(msb, f)\\n r := shr(f, r)\\n }\\n assembly {\\n let f := gt(r, 0x1)\\n msb := or(msb, f)\\n }\\n\\n if (msb >= 128) r = ratio >> (msb - 127);\\n else r = ratio << (127 - msb);\\n\\n int256 log_2 = (int256(msb) - 128) << 64;\\n\\n assembly {\\n r := shr(127, mul(r, r))\\n let f := shr(128, r)\\n log_2 := or(log_2, shl(63, f))\\n r := shr(f, r)\\n }\\n assembly {\\n r := shr(127, mul(r, r))\\n let f := shr(128, r)\\n log_2 := or(log_2, shl(62, f))\\n r := shr(f, r)\\n }\\n assembly {\\n r := shr(127, mul(r, r))\\n let f := shr(128, r)\\n log_2 := or(log_2, shl(61, f))\\n r := shr(f, r)\\n }\\n assembly {\\n r := shr(127, mul(r, r))\\n let f := shr(128, r)\\n log_2 := or(log_2, shl(60, f))\\n r := shr(f, r)\\n }\\n assembly {\\n r := shr(127, mul(r, r))\\n let f := shr(128, r)\\n log_2 := or(log_2, shl(59, f))\\n r := shr(f, r)\\n }\\n assembly {\\n r := shr(127, mul(r, r))\\n let f := shr(128, r)\\n log_2 := or(log_2, shl(58, f))\\n r := shr(f, r)\\n }\\n assembly {\\n r := shr(127, mul(r, r))\\n let f := shr(128, r)\\n log_2 := or(log_2, shl(57, f))\\n r := shr(f, r)\\n }\\n assembly {\\n r := shr(127, mul(r, r))\\n let f := shr(128, r)\\n log_2 := or(log_2, shl(56, f))\\n r := shr(f, r)\\n }\\n assembly {\\n r := shr(127, mul(r, r))\\n let f := shr(128, r)\\n log_2 := or(log_2, shl(55, f))\\n r := shr(f, r)\\n }\\n assembly {\\n r := shr(127, mul(r, r))\\n let f := shr(128, r)\\n log_2 := or(log_2, shl(54, f))\\n r := shr(f, r)\\n }\\n assembly {\\n r := shr(127, mul(r, r))\\n let f := shr(128, r)\\n log_2 := or(log_2, shl(53, f))\\n r := shr(f, r)\\n }\\n assembly {\\n r := shr(127, mul(r, r))\\n let f := shr(128, r)\\n log_2 := or(log_2, shl(52, f))\\n r := shr(f, r)\\n }\\n assembly {\\n r := shr(127, mul(r, r))\\n let f := shr(128, r)\\n log_2 := or(log_2, shl(51, f))\\n r := shr(f, r)\\n }\\n assembly {\\n r := shr(127, mul(r, r))\\n let f := shr(128, r)\\n log_2 := or(log_2, shl(50, f))\\n }\\n\\n int256 log_sqrt10001 = log_2 * 255738958999603826347141; // 128.128 number\\n\\n int24 tickLow =\\n int24(\\n (log_sqrt10001 - 3402992956809132418596140100660247210) >> 128\\n );\\n int24 tickHi =\\n int24(\\n (log_sqrt10001 + 291339464771989622907027621153398088495) >> 128\\n );\\n\\n tick = tickLow == tickHi\\n ? tickLow\\n : getSqrtRatioAtTick(tickHi) <= sqrtPriceX96\\n ? tickHi\\n : tickLow;\\n }\\n}\\n\",\"keccak256\":\"0x589b6104fd07d2e56e5b52edcfa53e6e47e2c38cace38025c16278ca73413f2d\",\"license\":\"GPL-3.0\"}},\"version\":1}", "bytecode": "0x60a06040523480156200001157600080fd5b5060405162005e0e38038062005e0e833981016040819052620000349162000046565b6001600160a01b031660805262000078565b6000602082840312156200005957600080fd5b81516001600160a01b03811681146200007157600080fd5b9392505050565b608051615d3b620000d3600039600081816105f801528181610ce301528181610dcc01528181610e06015281816114a7015281816116d50152818161170f015281816117e20152818161185901526118960152615d3b6000f3fe608060405234801561001057600080fd5b50600436106102255760003560e01c8063065756db1461022a57806306fdde0314610246578063095ea7b31461025b5780630dfe16811461027e5780631322d9541461029e57806316f0115b146102b457806318160ddd146102c757806323b872dd146102cf57806324b8fd1b146102e257806331366be4146102f7578063313ce5671461031257806339509351146103215780633d8b30e11461033457806342fb9d4414610349578063481c6a751461035257806354fd4d501461035a578063672152bd1461037e57806370a08231146103a3578063715018a6146103cc578063727dd228146103d457806378ac6357146103f557806394bf804d1461040857806395d89b411461043f5780639894f21a1461044757806399fd808c146104755780639b1344ac14610488578063a457c2d71461049c578063a50b1fe7146104af578063a9059cbb146104c4578063b135c99f146104d7578063b536bd12146104ea578063b670ed7d146104f3578063be93dd5f14610506578063c345445914610519578063cc95353e14610522578063ccdf7a021461053c578063d21220a714610551578063d348799714610564578063d6e7ff3914610577578063dd62ed3e1461058c578063df28408a146105c5578063e25e15e3146105cd578063e4077894146105e0578063eff557a7146105f3578063f2fde38b1461061a578063fa461e331461062d578063fcd3533c14610640575b600080fd5b61023360995481565b6040519081526020015b60405180910390f35b61024e610653565b60405161023d9190614dc5565b61026e610269366004614e0d565b6106e5565b604051901515815260200161023d565b609e54610291906001600160a01b031681565b60405161023d9190614e39565b6102a66106fc565b60405161023d929190614e4d565b609d54610291906001600160a01b031681565b603554610233565b61026e6102dd366004614e5b565b610796565b6102f56102f0366004614eb9565b61084e565b005b6102ff600081565b60405161ffff909116815260200161023d565b6040516012815260200161023d565b61026e61032f366004614e0d565b610c3a565b6097546102ff90600160e01b900461ffff1681565b610233609a5481565b610291610c71565b61024e604051806040016040528060058152602001640312e302e360dc1b81525081565b60985461038e9063ffffffff1681565b60405163ffffffff909116815260200161023d565b6102336103b1366004614f21565b6001600160a01b031660009081526033602052604090205490565b6102f5610c80565b6097546103e890600160b81b900460020b81565b60405161023d9190614f3e565b6102f5610403366004614f4c565b610cd6565b61041b610416366004614f4c565b610e31565b6040805193845260208401929092526001600160801b03169082015260600161023d565b61024e6110ea565b61045a610455366004614f7c565b6110f9565b6040805193845260208401929092529082015260600161023d565b6102f5610483366004614fc0565b611232565b6097546103e890600160a01b900460020b81565b61026e6104aa366004614e0d565b6113f2565b6097546102ff90600160d01b900461ffff1681565b61026e6104d2366004614e0d565b61148d565b6102f56104e5366004615023565b61149a565b610233609b5481565b6102a6610501366004614f21565b61173d565b6102f5610514366004614f4c565b6117d5565b610233609c5481565b60985461029190600160301b90046001600160a01b031681565b6098546102ff90600160201b900461ffff1681565b609f54610291906001600160a01b031681565b6102f56105723660046150bc565b6118bb565b6097546102ff90600160f01b900461ffff1681565b61023361059a36600461510e565b6001600160a01b03918216600090815260346020908152604080832093909416825291909152205490565b61023361191f565b6102f56105db3660046151f1565b61192e565b6102f56105ee3660046152b3565b611ba3565b6102917f000000000000000000000000000000000000000000000000000000000000000081565b6102f5610628366004614f21565b611cb0565b6102f561063b3660046150bc565b611d90565b61041b61064e366004614f4c565b611dfa565b606060368054610662906152d0565b80601f016020809104026020016040519081016040528092919081815260200182805461068e906152d0565b80156106db5780601f106106b0576101008083540402835291602001916106db565b820191906000526020600020905b8154815290600101906020018083116106be57829003601f168201915b5050505050905090565b60006106f2338484612114565b5060015b92915050565b600080600080609d60009054906101000a90046001600160a01b03166001600160a01b0316633850c7bd6040518163ffffffff1660e01b815260040160e060405180830381865afa158015610755573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610779919061530a565b50505050509150915061078c8282612239565b9350935050509091565b60006107a38484846124b9565b6001600160a01b03841660009081526034602090815260408083203384529091529020548281101561082d5760405162461bcd60e51b815260206004820152602860248201527f45524332303a207472616e7366657220616d6f756e74206578636565647320616044820152676c6c6f77616e636560c01b60648201526084015b60405180910390fd5b610841853361083c86856153b2565b612114565b60019150505b9392505050565b33610857610c71565b6001600160a01b03161461087d5760405162461bcd60e51b8152600401610824906153c5565b600080600061088b60355490565b1115610bca57609d546001600160a01b031663514ea4bf6108aa61267f565b6040518263ffffffff1660e01b81526004016108c891815260200190565b60a060405180830381865afa1580156108e5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610909919061541e565b5092945050506001600160801b03831615905061099257609754600090819061094890600160a01b8104600290810b91600160b81b9004900b866126da565b9350935050506109588282612a0d565b6109628282612ae6565b6040519193509150600080516020615ce6833981519152906109879084908490614e4d565b60405180910390a150505b6097805462ffffff888116600160b81b0262ffffff60b81b19918b16600160a01b029190911665ffffffffffff60a01b1990921691909117179055609b54609954609e546040516370a0823160e01b815260009392916001600160a01b0316906370a0823190610a06903090600401614e39565b602060405180830381865afa158015610a23573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a479190615475565b610a5191906153b2565b610a5b91906153b2565b609c54609a54609f546040516370a0823160e01b81529394506000936001600160a01b03909116906370a0823190610a97903090600401614e39565b602060405180830381865afa158015610ab4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ad89190615475565b610ae291906153b2565b610aec91906153b2565b9050610afd898984848b8b8b612b80565b609d546001600160a01b031663514ea4bf610b1661267f565b6040518263ffffffff1660e01b8152600401610b3491815260200190565b60a060405180830381865afa158015610b51573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b75919061541e565b509295505050506001600160801b038316610bc35760405162461bcd60e51b815260206004820152600e60248201526d06e657720706f736974696f6e20360941b6044820152606401610824565b5050610c06565b6097805462ffffff888116600160b81b0262ffffff60b81b19918b16600160a01b029190911665ffffffffffff60a01b19909216919091171790555b600080516020615c8683398151915287878484604051610c29949392919061548e565b60405180910390a150505050505050565b3360008181526034602090815260408083206001600160a01b038716845290915281205490916106f291859061083c9086906154bc565b6097546001600160a01b031690565b33610c89610c71565b6001600160a01b031614610caf5760405162461bcd60e51b8152600401610824906153c5565b60988054600160201b600160d01b031916905560006099819055609a55610cd4612d21565b565b8181336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614610d205760405162461bcd60e51b8152600401610824906154cf565b600080610d33609954609a548888612d88565b60006099819055609a5590925090508115610d6d57609854609e54610d6d916001600160a01b0391821691600160301b9091041684612eac565b8015610d9857609854609f54610d98916001600160a01b0391821691600160301b9091041683612eac565b505073eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeed196001600160a01b03821601610df757610df26001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001683612f14565b610e2b565b610e2b6001600160a01b0382167f000000000000000000000000000000000000000000000000000000000000000084612eac565b50505050565b6000806000600260655403610e585760405162461bcd60e51b815260040161082490615500565b600260655584610e7a5760405162461bcd60e51b815260040161082490615537565b6000610e8560355490565b90506000609d60009054906101000a90046001600160a01b03166001600160a01b0316633850c7bd6040518163ffffffff1660e01b815260040160e060405180830381865afa158015610edc573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f00919061530a565b50505050505090506000821115610f4157600080610f1c6106fc565b91509150610f2b828a8661302a565b9650610f38818a8661302a565b95505050610f87565b609754610f81908290610f5d90600160a01b900460020b613073565b609754610f7390600160b81b900460020b613073565b610f7c8b613488565b6134f1565b90955093505b8415610fa557609e54610fa5906001600160a01b031633308861358c565b8315610fc357609f54610fc3906001600160a01b031633308761358c565b609754610ffc908290610fdf90600160a01b900460020b613073565b609754610ff590600160b81b900460020b613073565b88886135c4565b609d54609754604051633c8a7d8d60e01b81529295506001600160a01b0390911691633c8a7d8d9161104c913091600160a01b8104600290810b92600160b81b909204900b908990600401615557565b60408051808303816000875af115801561106a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061108e9190615599565b505061109a8688613686565b7f55801cfe493000b734571da1694b21e7f66b11e8ce9fdaa0524ecb59105e73e786888787876040516110d19594939291906155bd565b60405180910390a1505060016065819055509250925092565b606060378054610662906152d0565b60008060008061110860355490565b905080156111275761111b818787613753565b9195509350915061122a565b609d5460408051633850c7bd60e01b815290516000926001600160a01b031691633850c7bd9160048083019260e09291908290030181865afa158015611171573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611195919061530a565b505050505050905060006111db826111be609760149054906101000a900460020b60020b613073565b6097546111d490600160b81b900460020b613073565b8b8b6135c4565b6097546001600160801b038216955090915061122290839061120690600160a01b900460020b613073565b60975461121c90600160b81b900460020b613073565b846134f1565b909650945050505b509250925092565b3361123b610c71565b6001600160a01b0316146112615760405162461bcd60e51b8152600401610824906153c5565b6127108461ffff1611156112875760405162461bcd60e51b8152600401610824906155f4565b6127108561ffff1611156112ad5760405162461bcd60e51b8152600401610824906155f4565b6127108361ffff1611156112d35760405162461bcd60e51b8152600401610824906155f4565b6040805161ffff8781168252868116602083015285168183015263ffffffff8416606082015290517f0b7615006627cf7664941bc288d4641731f895e102f95cb8690583ad7508faa89181900360800190a161ffff85161561134a576097805461ffff60d01b1916600160d01b61ffff8816021790555b61ffff84161561136f576097805461ffff60e01b1916600160e01b61ffff8716021790555b61ffff83161561139557609780546001600160f01b0316600160f01b61ffff8616021790555b63ffffffff8216156113b7576098805463ffffffff191663ffffffff84161790555b6001600160a01b038116156113eb5760988054600160301b600160d01b031916600160301b6001600160a01b038416021790555b5050505050565b3360009081526034602090815260408083206001600160a01b0386168452909152812054828110156114745760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b6064820152608401610824565b611483338561083c86856153b2565b5060019392505050565b60006106f23384846124b9565b8181336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146114e45760405162461bcd60e51b8152600401610824906154cf565b85156114f4576114f48786613862565b609d546000906001600160a01b031663514ea4bf61151061267f565b6040518263ffffffff1660e01b815260040161152e91815260200190565b60a060405180830381865afa15801561154b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061156f919061541e565b505050509050611583818989898989613abb565b609d546000906001600160a01b031663514ea4bf61159f61267f565b6040518263ffffffff1660e01b81526004016115bd91815260200190565b60a060405180830381865afa1580156115da573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115fe919061541e565b505050509050816001600160801b0316816001600160801b03161161165f5760405162461bcd60e51b81526020600482015260176024820152766c6971756964697479206d75737420696e63726561736560481b6044820152606401610824565b609754604051600080516020615c868339815191529161169991600160a01b8204600290810b92600160b81b9004900b908690869061548e565b60405180910390a1505073eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeed196001600160a01b03821601611700576116fb6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001683612f14565b611734565b6117346001600160a01b0382167f000000000000000000000000000000000000000000000000000000000000000084612eac565b50505050505050565b6000806000609d60009054906101000a90046001600160a01b03166001600160a01b0316633850c7bd6040518163ffffffff1660e01b815260040160e060405180830381865afa158015611795573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117b9919061530a565b50505050509150506117cb8482612239565b9250925050915091565b8181336001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161461181f5760405162461bcd60e51b8152600401610824906154cf565b600080611832609b54609c548888612d88565b6000609b819055609c559092509050811561187e57609e5461187e906001600160a01b03167f000000000000000000000000000000000000000000000000000000000000000084612eac565b8015610d9857609f54610d98906001600160a01b03167f000000000000000000000000000000000000000000000000000000000000000083612eac565b609d546001600160a01b031633146118e55760405162461bcd60e51b815260040161082490615611565b831561190257609e54611902906001600160a01b03163386612eac565b8215610e2b57609f54610e2b906001600160a01b03163385612eac565b600061192961267f565b905090565b600054610100900460ff1680611947575060005460ff16155b6119635760405162461bcd60e51b81526004016108249061563a565b600054610100900460ff16158015611985576000805461ffff19166101011790555b6119926000612710615688565b61ffff168561ffff1611156119b95760405162461bcd60e51b8152600401610824906156aa565b609d80546001600160a01b0319166001600160a01b03881690811790915560408051630dfe168160e01b81529051630dfe1681916004808201926020929091908290030181865afa158015611a12573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a3691906156c8565b609e80546001600160a01b0319166001600160a01b03928316179055609d546040805163d21220a760e01b81529051919092169163d21220a79160048083019260209291908290030181865afa158015611a94573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ab891906156c8565b609f80546001600160a01b039283166001600160a01b0319918216179091556098805460978054948716600160301b8102600160301b600160d01b031963ffffffff1961ffff8e16600160201b021665ffffffffffff199095169490941761012c17939093169290921790925562ffffff878116600160b81b02909316600165ffffff00000160a01b0319938916600160a01b02600165ffffff00000160a01b0390951694909417643e800c801960d31b179290921692909217179055611b7f8888613f83565b611b87614002565b8015611b99576000805461ff00191690555b5050505050505050565b33611bac610c71565b6001600160a01b031614611bd25760405162461bcd60e51b8152600401610824906153c5565b609854600160201b900461ffff1615611c135760405162461bcd60e51b815260206004820152600360248201526266656560e81b6044820152606401610824565b60008161ffff16118015611c3b5750611c2f6000612710615688565b61ffff168161ffff1611155b611c575760405162461bcd60e51b8152600401610824906156aa565b60405161ffff821681527f8a1ffb520c943072e654fc414750dbefad5b6d6311339d041901c4752782fad39060200160405180910390a16098805461ffff909216600160201b0261ffff60201b19909216919091179055565b33611cb9610c71565b6001600160a01b031614611cdf5760405162461bcd60e51b8152600401610824906153c5565b6001600160a01b038116611d465760405162461bcd60e51b815260206004820152602860248201527f4f776e61626c653a206e6577206d616e6167657220697320746865207a65726f604482015267206164647265737360c01b6064820152608401610824565b6097546040516001600160a01b03808416921690600080516020615ca683398151915290600090a3609780546001600160a01b0319166001600160a01b0392909216919091179055565b609d546001600160a01b03163314611dba5760405162461bcd60e51b815260040161082490615611565b6000841315611dda57609e54610df2906001600160a01b03163386612eac565b6000831315610e2b57609f54610e2b906001600160a01b03163385612eac565b6000806000600260655403611e215760405162461bcd60e51b815260040161082490615500565b600260655584611e5c5760405162461bcd60e51b815260206004820152600660248201526506275726e20360d41b6044820152606401610824565b6000611e6760355490565b609d549091506000906001600160a01b031663514ea4bf611e8661267f565b6040518263ffffffff1660e01b8152600401611ea491815260200190565b60a060405180830381865afa158015611ec1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ee5919061541e565b505050509050611ef53388614076565b6000611f0b88836001600160801b0316856141b3565b9050611f1681613488565b609754909450600090819081908190611f4590600160a01b8104600290810b91600160b81b9004900b8a6126da565b9350935093509350611f578282612a0d565b611f618282612ae6565b6040519193509150600080516020615ce683398151915290611f869084908490614e4d565b60405180910390a1609b54609954609e546040516370a0823160e01b815261203293929188916001600160a01b03909116906370a0823190611fcc903090600401614e39565b602060405180830381865afa158015611fe9573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061200d9190615475565b61201791906153b2565b61202191906153b2565b61202b91906153b2565b8d896141b3565b61203c90856154bc565b609c54609a54609f546040516370a0823160e01b8152939d506120799387916001600160a01b0316906370a0823190611fcc903090600401614e39565b61208390846154bc565b985089156120a257609e546120a2906001600160a01b03168c8c612eac565b88156120bf57609f546120bf906001600160a01b03168c8b612eac565b7f7239dff1718b550db7f36cbf69c665cfeb56d0e96b4fb76a5cba712961b655098b8d8c8c8c6040516120f69594939291906155bd565b60405180910390a15050505050505060016065819055509250925092565b6001600160a01b0383166121765760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610824565b6001600160a01b0382166121d75760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610824565b6001600160a01b0383811660008181526034602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591015b60405180910390a3505050565b609d546000908190819081908190819081906001600160a01b031663514ea4bf61226161267f565b6040518263ffffffff1660e01b815260040161227f91815260200190565b60a060405180830381865afa15801561229c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906122c0919061541e565b94509450945094509450612305896122e9609760149054906101000a900460020b60020b613073565b6097546122ff90600160b81b900460020b613073565b886134f1565b909750955060006001600160801b0383166123236001878c8a614261565b61232d91906154bc565b90506000826001600160801b03166123486000878d8b614261565b61235291906154bc565b905061235e8282612ae6565b609b54609954609e546040516370a0823160e01b8152949650929450909290916001600160a01b0316906370a082319061239c903090600401614e39565b602060405180830381865afa1580156123b9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906123dd9190615475565b6123e790856154bc565b6123f191906153b2565b6123fb91906153b2565b612405908a6154bc565b609c54609a54609f546040516370a0823160e01b8152939c50919290916001600160a01b0316906370a0823190612440903090600401614e39565b602060405180830381865afa15801561245d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906124819190615475565b61248b90846154bc565b61249591906153b2565b61249f91906153b2565b6124a990896154bc565b9750505050505050509250929050565b6001600160a01b03831661251d5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610824565b6001600160a01b03821661257f5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610824565b6001600160a01b038316600090815260336020526040902054818110156125f75760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b6064820152608401610824565b61260182826153b2565b6001600160a01b0380861660009081526033602052604080822093909355908516815290812080548492906126379084906154bc565b92505081905550826001600160a01b0316846001600160a01b0316600080516020615cc68339815191528460405161267191815260200190565b60405180910390a350505050565b6097546040516001600160601b03193060601b166020820152600160a01b820460e890811b6034830152600160b81b90920490911b6037820152600090603a0160405160208183030381529060405280519060200120905090565b609e546040516370a0823160e01b815260009182918291829182916001600160a01b0316906370a0823190612713903090600401614e39565b602060405180830381865afa158015612730573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906127549190615475565b609f546040516370a0823160e01b81529192506000916001600160a01b03909116906370a082319061278a903090600401614e39565b602060405180830381865afa1580156127a7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906127cb9190615475565b609d5460405163a34123a760e01b815260028c810b60048301528b900b60248201526001600160801b038a1660448201529192506001600160a01b03169063a34123a79060640160408051808303816000875af1158015612830573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906128549190615599565b609d546040516309e3d67b60e31b815230600482015260028d810b60248301528c900b60448201526001600160801b036064820181905260848201529298509096506001600160a01b031690634f1eb3d89060a40160408051808303816000875af11580156128c7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906128eb91906156e5565b5050609e546040516370a0823160e01b8152879184916001600160a01b03909116906370a0823190612921903090600401614e39565b602060405180830381865afa15801561293e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906129629190615475565b61296c91906153b2565b61297691906153b2565b609f546040516370a0823160e01b8152919550869183916001600160a01b0316906370a08231906129ab903090600401614e39565b602060405180830381865afa1580156129c8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906129ec9190615475565b6129f691906153b2565b612a0091906153b2565b9250505093509350935093565b612710612a1b600084615718565b612a259190615745565b609b6000828254612a3691906154bc565b909155506127109050612a4a600083615718565b612a549190615745565b609c6000828254612a6591906154bc565b909155505060985461271090612a8690600160201b900461ffff1684615718565b612a909190615745565b60996000828254612aa191906154bc565b909155505060985461271090612ac290600160201b900461ffff1683615718565b612acc9190615745565b609a6000828254612add91906154bc565b90915550505050565b6000806000612710609860049054906101000a900461ffff166000612b0b9190615759565b612b199061ffff1687615718565b612b239190615745565b60985490915060009061271090612b4590600160201b900461ffff1683615759565b612b539061ffff1687615718565b612b5d9190615745565b9050612b6982876153b2565b9350612b7581866153b2565b925050509250929050565b609d5460408051633850c7bd60e01b815290516000926001600160a01b031691633850c7bd9160048083019260e09291908290030181865afa158015612bca573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612bee919061530a565b50505050505090506000612c1b82612c088b60020b613073565b612c148b60020b613073565b8a8a6135c4565b90506001600160801b03811615612cc957609d54604051633c8a7d8d60e01b815260009182916001600160a01b0390911690633c8a7d8d90612c679030908f908f908990600401615557565b60408051808303816000875af1158015612c85573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612ca99190615599565b9092509050612cb8828a6153b2565b9850612cc481896153b2565b975050505b6000612cf86127108686612cdd5789612cdf565b8a5b612ce99190615718565b612cf39190615745565b61460d565b90506000811315612d1557612d128a8a8a8a858b8a614673565b50505b50505050505050505050565b33612d2a610c71565b6001600160a01b031614612d505760405162461bcd60e51b8152600401610824906153c5565b6097546040516000916001600160a01b031690600080516020615ca6833981519152908390a3609780546001600160a01b0319169055565b609e5460009081906001600160a01b0390811690841603612dfd57609754849061271090612dc190600160e01b900461ffff1689615718565b612dcb9190615745565b1015612de95760405162461bcd60e51b815260040161082490615774565b612df384876153b2565b9150849050612ea3565b609f546001600160a01b0390811690841603612e6d57609754849061271090612e3190600160e01b900461ffff1688615718565b612e3b9190615745565b1015612e595760405162461bcd60e51b815260040161082490615774565b612e6384866153b2565b9050859150612ea3565b60405162461bcd60e51b815260206004820152600b60248201526a3bb937b733903a37b5b2b760a91b6044820152606401610824565b94509492505050565b6040516001600160a01b038316602482015260448101829052612f0f90849063a9059cbb60e01b906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b03199093169290921790915261488f565b505050565b80471015612f645760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e63650000006044820152606401610824565b6000826001600160a01b03168260405160006040518083038185875af1925050503d8060008114612fb1576040519150601f19603f3d011682016040523d82523d6000602084013e612fb6565b606091505b5050905080612f0f5760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c20726044820152791958da5c1a595b9d081b585e481a185d99481c995d995c9d195960321b6064820152608401610824565b60006130378484846141b3565b9050600082806130495761304961572f565b848609111561084757600019811061306057600080fd5b8061306a81615796565b95945050505050565b60008060008360020b1261308a578260020b613097565b8260020b613097906157af565b90506130a6620d89e7196157cb565b60020b8111156130dc5760405162461bcd60e51b81526020600482015260016024820152601560fa1b6044820152606401610824565b6000816001166000036130f357600160801b613105565b6ffffcb933bd6fad37aa2d162d1a5940015b6001600160881b03169050600282161561313a576080613135826ffff97272373d413259a46990580e213a615718565b901c90505b600482161561316457608061315f826ffff2e50f5f656932ef12357cf3c7fdcc615718565b901c90505b600882161561318e576080613189826fffe5caca7e10e4e61c3624eaa0941cd0615718565b901c90505b60108216156131b85760806131b3826fffcb9843d60f6159c9db58835c926644615718565b901c90505b60208216156131e25760806131dd826fff973b41fa98c081472e6896dfb254c0615718565b901c90505b604082161561320c576080613207826fff2ea16466c96a3843ec78b326b52861615718565b901c90505b6080821615613236576080613231826ffe5dee046a99a2a811c461f1969c3053615718565b901c90505b61010082161561326157608061325c826ffcbe86c7900a88aedcffc83b479aa3a4615718565b901c90505b61020082161561328c576080613287826ff987a7253ac413176f2b074cf7815e54615718565b901c90505b6104008216156132b75760806132b2826ff3392b0822b70005940c7a398e4b70f3615718565b901c90505b6108008216156132e25760806132dd826fe7159475a2c29b7443b29c7fa6e889d9615718565b901c90505b61100082161561330d576080613308826fd097f3bdfd2022b8845ad8f792aa5825615718565b901c90505b612000821615613338576080613333826fa9f746462d870fdf8a65dc1f90e061e5615718565b901c90505b61400082161561336357608061335e826f70d869a156d2a1b890bb3df62baf32f7615718565b901c90505b61800082161561338e576080613389826f31be135f97d08fd981231505542fcfa6615718565b901c90505b620100008216156133ba5760806133b5826f09aa508b5b7a84e1c677de54f3e99bc9615718565b901c90505b620200008216156133e55760806133e0826e5d6af8dedb81196699c329225ee604615718565b901c90505b6204000082161561340f57608061340a826d2216e584f5fa1ea926041bedfe98615718565b901c90505b62080000821615613437576080613432826b048a170391f7dc42444e8fa2615718565b901c90505b60008460020b13156134525761344f81600019615745565b90505b613460600160201b826157ed565b1561346c57600161346f565b60005b6134809060ff16602083901c6154bc565b949350505050565b6000600160801b82106134ed5760405162461bcd60e51b815260206004820152602760248201527f53616665436173743a2076616c756520646f65736e27742066697420696e20316044820152663238206269747360c81b6064820152608401610824565b5090565b600080836001600160a01b0316856001600160a01b03161115613512579293925b846001600160a01b0316866001600160a01b03161161353d57613536858585614961565b9150612ea3565b836001600160a01b0316866001600160a01b0316101561357657613562868585614961565b915061356f8587856149cb565b9050612ea3565b6135818585856149cb565b905094509492505050565b6040516001600160a01b0380851660248301528316604482015260648101829052610e2b9085906323b872dd60e01b90608401612ed8565b6000836001600160a01b0316856001600160a01b031611156135e4579293925b846001600160a01b0316866001600160a01b03161161360f57613608858585614a15565b905061306a565b836001600160a01b0316866001600160a01b03161015613671576000613636878686614a15565b90506000613645878986614a7f565b9050806001600160801b0316826001600160801b0316106136665780613668565b815b9250505061306a565b61367c858584614a7f565b9695505050505050565b6001600160a01b0382166136dc5760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401610824565b80603560008282546136ee91906154bc565b90915550506001600160a01b0382166000908152603360205260408120805483929061371b9084906154bc565b90915550506040518181526001600160a01b03831690600090600080516020615cc68339815191529060200160405180910390a35050565b60008060008060006137636106fc565b915091508160001480156137775750600081115b1561378e576137878689836141b3565b925061383d565b8015801561379c5750600082115b156137ac576137878789846141b3565b811580156137b8575080155b156137df5760405162461bcd60e51b81526020600482015260006024820152604401610824565b60006137ec888a856141b3565b905060006137fb888b856141b3565b905060008211801561380d5750600081115b6138295760405162461bcd60e51b815260040161082490615537565b8082106138365780613838565b815b945050505b61384883838a61302a565b945061385583828a61302a565b9350505093509350939050565b6040805160028082526060820183526000926020830190803683375050609854825192935063ffffffff16918391506000906138a0576138a0615801565b602002602001019063ffffffff16908163ffffffff16815250506000816001815181106138cf576138cf615801565b63ffffffff90921660209283029190910190910152609d5460405163883bdbfd60e01b81526000916001600160a01b03169063883bdbfd90613915908590600401615817565b600060405180830381865afa158015613932573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261395a919081019061590a565b509050805160021461399a5760405162461bcd60e51b815260206004820152600960248201526830b93930bc903632b760b91b6044820152606401610824565b6098548151600091829163ffffffff90911660060b90849083906139c0576139c0615801565b6020026020010151846001815181106139db576139db615801565b60200260200101510360060b816139f4576139f461572f565b059050613a038160020b613073565b6097549092506000915061271090613a2690600160f01b900461ffff16846159cc565b613a3091906159fe565b90508415613a7857613a428183615a24565b6001600160a01b0316866001600160a01b03161015613a735760405162461bcd60e51b815260040161082490615a44565b613ab3565b613a828183615a6b565b6001600160a01b0316866001600160a01b03161115613ab35760405162461bcd60e51b815260040161082490615a44565b505050505050565b609b54609954609e546040516370a0823160e01b815260009392916001600160a01b0316906370a0823190613af4903090600401614e39565b602060405180830381865afa158015613b11573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613b359190615475565b613b3f91906153b2565b613b4991906153b2565b609c54609a54609f546040516370a0823160e01b81529394506000936001600160a01b03909116906370a0823190613b85903090600401614e39565b602060405180830381865afa158015613ba2573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613bc69190615475565b613bd091906153b2565b613bda91906153b2565b6097549091506000908190613c0590600160a01b8104600290810b91600160b81b9004900b8c6126da565b935093505050613c158282612a0d565b613c1f8282612ae6565b6040519193509150600080516020615ce683398151915290613c449084908490614e4d565b60405180910390a1613c5684836154bc565b9150613c6283826154bc565b609e549091506001600160a01b0390811690861603613def57609754869061271090613c9990600160d01b900461ffff1685615718565b613ca39190615745565b1015613cc15760405162461bcd60e51b815260040161082490615774565b609b54609954609e546040516370a0823160e01b8152899392916001600160a01b0316906370a0823190613cf9903090600401614e39565b602060405180830381865afa158015613d16573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613d3a9190615475565b613d4491906153b2565b613d4e91906153b2565b613d5891906153b2565b609c54609a54609f546040516370a0823160e01b8152939750919290916001600160a01b0316906370a0823190613d93903090600401614e39565b602060405180830381865afa158015613db0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613dd49190615475565b613dde91906153b2565b613de891906153b2565b9250613f5c565b609f546001600160a01b0390811690861603612e6d57609754869061271090613e2390600160d01b900461ffff1684615718565b613e2d9190615745565b1015613e4b5760405162461bcd60e51b815260040161082490615774565b609b54609954609e546040516370a0823160e01b81526001600160a01b03909116906370a0823190613e81903090600401614e39565b602060405180830381865afa158015613e9e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613ec29190615475565b613ecc91906153b2565b613ed691906153b2565b609c54609a54609f546040516370a0823160e01b815293975089936001600160a01b03909116906370a0823190613f11903090600401614e39565b602060405180830381865afa158015613f2e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613f529190615475565b613dd491906153b2565b609754612d1590600160a01b8104600290810b91600160b81b9004900b86868d8d8d612b80565b600054610100900460ff1680613f9c575060005460ff16155b613fb85760405162461bcd60e51b81526004016108249061563a565b600054610100900460ff16158015613fda576000805461ffff19166101011790555b613fe2614ab5565b613fec8383614b1f565b8015612f0f576000805461ff0019169055505050565b600054610100900460ff168061401b575060005460ff16155b6140375760405162461bcd60e51b81526004016108249061563a565b600054610100900460ff16158015614059576000805461ffff19166101011790555b614061614ba6565b8015614073576000805461ff00191690555b50565b6001600160a01b0382166140d65760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b6064820152608401610824565b6001600160a01b0382166000908152603360205260409020548181101561414a5760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e604482015261636560f01b6064820152608401610824565b61415482826153b2565b6001600160a01b038416600090815260336020526040812091909155603580548492906141829084906153b2565b90915550506040518281526000906001600160a01b03851690600080516020615cc68339815191529060200161222c565b60008080600019858709858702925082811083820303915050806000036141ec57600084116141e157600080fd5b508290049050610847565b8084116141f857600080fd5b60008486880960026001871981018816978890046003810283188082028403028082028403028082028403028082028403028082028403029081029092039091026000889003889004909101858311909403939093029303949094049190911702949350505050565b600080600080871561440157609d60009054906101000a90046001600160a01b03166001600160a01b031663f30583996040518163ffffffff1660e01b8152600401602060405180830381865afa1580156142c0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906142e49190615475565b609d5460975460405163f30dba9360e01b81529293506001600160a01b039091169163f30dba939161432491600160a01b90910460020b90600401614f3e565b61010060405180830381865afa158015614342573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906143669190615a8b565b5050609d5460975460405163f30dba9360e01b8152959a506001600160a01b03909116965063f30dba9395506143af94600160b81b90910460020b93506004019150614f3e9050565b61010060405180830381865afa1580156143cd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906143f19190615a8b565b5093975061458f95505050505050565b609d60009054906101000a90046001600160a01b03166001600160a01b031663461413196040518163ffffffff1660e01b8152600401602060405180830381865afa158015614454573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906144789190615475565b609d5460975460405163f30dba9360e01b81529293506001600160a01b039091169163f30dba93916144b891600160a01b90910460020b90600401614f3e565b61010060405180830381865afa1580156144d6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906144fa9190615a8b565b5050609d5460975460405163f30dba9360e01b8152949a506001600160a01b03909116965063f30dba9395506145429450600160b81b900460020b926004019150614f3e9050565b61010060405180830381865afa158015614560573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906145849190615a8b565b509297505050505050505b609754600090600160a01b9004600290810b9088900b126145b15750826145b6565b508281035b609754600090600160b81b9004600290810b9089900b12156145d95750826145de565b508282035b8183038190036145fe6001600160801b0389168b8303600160801b6141b3565b9b9a5050505050505050505050565b6000600160ff1b82106134ed5760405162461bcd60e51b815260206004820152602860248201527f53616665436173743a2076616c756520646f65736e27742066697420696e2061604482015267371034b73a191a9b60c11b6064820152608401610824565b609d54604051630251596160e31b81523060048201528215156024820152604481018590526001600160a01b03848116606483015260a06084830152600060a4830181905292839283928392169063128acb089060c40160408051808303816000875af11580156146e8573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061470c9190615599565b915091508161471a8a61460d565b6147249190615b27565b9350806147308961460d565b61473a9190615b27565b92506000609d60009054906101000a90046001600160a01b03166001600160a01b0316633850c7bd6040518163ffffffff1660e01b815260040160e060405180830381865afa158015614791573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906147b5919061530a565b505050505050905060006147e2826147cf8f60020b613073565b6147db8f60020b613073565b89896135c4565b90506001600160801b0381161561487f57609d60009054906101000a90046001600160a01b03166001600160a01b0316633c8a7d8d308f8f856040518563ffffffff1660e01b815260040161483a9493929190615557565b60408051808303816000875af1158015614858573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061487c9190615599565b50505b5050505097509795505050505050565b60006148e4826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316614c169092919063ffffffff16565b805190915015612f0f57808060200190518101906149029190615b47565b612f0f5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610824565b6000826001600160a01b0316846001600160a01b03161115614981579192915b6001600160a01b0384166149c1600160601b600160e01b03606085901b166149a98787615a24565b6001600160a01b0316866001600160a01b03166141b3565b6134809190615745565b6000826001600160a01b0316846001600160a01b031611156149eb579192915b6134806001600160801b038316614a028686615a24565b6001600160a01b0316600160601b6141b3565b6000826001600160a01b0316846001600160a01b03161115614a35579192915b6000614a58856001600160a01b0316856001600160a01b0316600160601b6141b3565b905061306a614a7a8483614a6c8989615a24565b6001600160a01b03166141b3565b614c25565b6000826001600160a01b0316846001600160a01b03161115614a9f579192915b613480614a7a83600160601b614a6c8888615a24565b600054610100900460ff1680614ace575060005460ff16155b614aea5760405162461bcd60e51b81526004016108249061563a565b600054610100900460ff16158015614061576000805461ffff19166101011790558015614073576000805461ff001916905550565b600054610100900460ff1680614b38575060005460ff16155b614b545760405162461bcd60e51b81526004016108249061563a565b600054610100900460ff16158015614b76576000805461ffff19166101011790555b6036614b828482615baa565b506037614b8f8382615baa565b508015612f0f576000805461ff0019169055505050565b600054610100900460ff1680614bbf575060005460ff16155b614bdb5760405162461bcd60e51b81526004016108249061563a565b600054610100900460ff16158015614bfd576000805461ffff19166101011790555b60016065558015614073576000805461ff001916905550565b60606134808484600085614c40565b806001600160801b0381168114614c3b57600080fd5b919050565b606082471015614ca15760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401610824565b843b614cef5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610824565b600080866001600160a01b03168587604051614d0b9190615c69565b60006040518083038185875af1925050503d8060008114614d48576040519150601f19603f3d011682016040523d82523d6000602084013e614d4d565b606091505b5091509150614d5d828286614d68565b979650505050505050565b60608315614d77575081610847565b825115614d875782518084602001fd5b8160405162461bcd60e51b81526004016108249190614dc5565b60005b83811015614dbc578181015183820152602001614da4565b50506000910152565b6020815260008251806020840152614de4816040850160208701614da1565b601f01601f19169190910160400192915050565b6001600160a01b038116811461407357600080fd5b60008060408385031215614e2057600080fd5b8235614e2b81614df8565b946020939093013593505050565b6001600160a01b0391909116815260200190565b918252602082015260400190565b600080600060608486031215614e7057600080fd5b8335614e7b81614df8565b92506020840135614e8b81614df8565b929592945050506040919091013590565b8060020b811461407357600080fd5b801515811461407357600080fd5b600080600080600060a08688031215614ed157600080fd5b8535614edc81614e9c565b94506020860135614eec81614e9c565b93506040860135614efc81614df8565b9250606086013591506080860135614f1381614eab565b809150509295509295909350565b600060208284031215614f3357600080fd5b813561084781614df8565b60029190910b815260200190565b60008060408385031215614f5f57600080fd5b823591506020830135614f7181614df8565b809150509250929050565b60008060408385031215614f8f57600080fd5b50508035926020909101359150565b61ffff8116811461407357600080fd5b63ffffffff8116811461407357600080fd5b600080600080600060a08688031215614fd857600080fd5b8535614fe381614f9e565b94506020860135614ff381614f9e565b9350604086013561500381614f9e565b9250606086013561501381614fae565b91506080860135614f1381614df8565b600080600080600060a0868803121561503b57600080fd5b853561504681614df8565b945060208601359350604086013561505d81614eab565b9250606086013591506080860135614f1381614df8565b60008083601f84011261508657600080fd5b5081356001600160401b0381111561509d57600080fd5b6020830191508360208285010111156150b557600080fd5b9250929050565b600080600080606085870312156150d257600080fd5b843593506020850135925060408501356001600160401b038111156150f657600080fd5b61510287828801615074565b95989497509550505050565b6000806040838503121561512157600080fd5b823561512c81614df8565b91506020830135614f7181614df8565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b038111828210171561517a5761517a61513c565b604052919050565b600082601f83011261519357600080fd5b81356001600160401b038111156151ac576151ac61513c565b6151bf601f8201601f1916602001615152565b8181528460208386010111156151d457600080fd5b816020850160208301376000918101602001919091529392505050565b600080600080600080600060e0888a03121561520c57600080fd5b87356001600160401b038082111561522357600080fd5b61522f8b838c01615182565b985060208a013591508082111561524557600080fd5b506152528a828b01615182565b965050604088013561526381614df8565b9450606088013561527381614f9e565b9350608088013561528381614e9c565b925060a088013561529381614e9c565b915060c08801356152a381614df8565b8091505092959891949750929550565b6000602082840312156152c557600080fd5b813561084781614f9e565b600181811c908216806152e457607f821691505b60208210810361530457634e487b7160e01b600052602260045260246000fd5b50919050565b600080600080600080600060e0888a03121561532557600080fd5b875161533081614df8565b602089015190975061534181614e9c565b604089015190965061535281614f9e565b606089015190955061536381614f9e565b608089015190945061537481614f9e565b60a089015190935060ff8116811461538b57600080fd5b60c08901519092506152a381614eab565b634e487b7160e01b600052601160045260246000fd5b818103818111156106f6576106f661539c565b60208082526022908201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206d616e616760408201526132b960f11b606082015260800190565b80516001600160801b0381168114614c3b57600080fd5b600080600080600060a0868803121561543657600080fd5b61543f86615407565b9450602086015193506040860151925061545b60608701615407565b915061546960808701615407565b90509295509295909350565b60006020828403121561548757600080fd5b5051919050565b600294850b81529290930b60208301526001600160801b039081166040830152909116606082015260800190565b808201808211156106f6576106f661539c565b60208082526017908201527647656c61746f666965643a204f6e6c792067656c61746f60481b604082015260600190565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b60208082526006908201526506d696e7420360d41b604082015260600190565b6001600160a01b03949094168452600292830b6020850152910b60408301526001600160801b0316606082015260a06080820181905260009082015260c00190565b600080604083850312156155ac57600080fd5b505080516020909101519092909150565b6001600160a01b039590951685526020850193909352604084019190915260608301526001600160801b0316608082015260a00190565b60208082526003908201526242505360e81b604082015260600190565b6020808252600f908201526e31b0b6363130b1b59031b0b63632b960891b604082015260600190565b6020808252602e908201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160408201526d191e481a5b9a5d1a585b1a5e995960921b606082015260800190565b61ffff8281168282160390808211156156a3576156a361539c565b5092915050565b6020808252600490820152636d42505360e01b604082015260600190565b6000602082840312156156da57600080fd5b815161084781614df8565b600080604083850312156156f857600080fd5b61570183615407565b915061570f60208401615407565b90509250929050565b80820281158282048414176106f6576106f661539c565b634e487b7160e01b600052601260045260246000fd5b6000826157545761575461572f565b500490565b61ffff8181168382160190808211156156a3576156a361539c565b602080825260089082015267686967682066656560c01b604082015260600190565b6000600182016157a8576157a861539c565b5060010190565b6000600160ff1b82016157c4576157c461539c565b5060000390565b60008160020b627fffff1981036157e4576157e461539c565b60000392915050565b6000826157fc576157fc61572f565b500690565b634e487b7160e01b600052603260045260246000fd5b6020808252825182820181905260009190848201906040850190845b8181101561585557835163ffffffff1683529284019291840191600101615833565b50909695505050505050565b60006001600160401b0382111561587a5761587a61513c565b5060051b60200190565b8051600681900b8114614c3b57600080fd5b600082601f8301126158a757600080fd5b815160206158bc6158b783615861565b615152565b82815260059290921b840181019181810190868411156158db57600080fd5b8286015b848110156158ff5780516158f281614df8565b83529183019183016158df565b509695505050505050565b6000806040838503121561591d57600080fd5b82516001600160401b038082111561593457600080fd5b818501915085601f83011261594857600080fd5b815160206159586158b783615861565b82815260059290921b8401810191818101908984111561597757600080fd5b948201945b8386101561599c5761598d86615884565b8252948201949082019061597c565b918801519196509093505050808211156159b557600080fd5b506159c285828601615896565b9150509250929050565b6001600160a01b038281168282168181028316929181158285048214176159f5576159f561539c565b50505092915050565b60006001600160a01b0383811680615a1857615a1861572f565b92169190910492915050565b6001600160a01b038281168282160390808211156156a3576156a361539c565b6020808252600d908201526c6869676820736c69707061676560981b604082015260600190565b6001600160a01b038181168382160190808211156156a3576156a361539c565b600080600080600080600080610100898b031215615aa857600080fd5b615ab189615407565b9750602089015180600f0b8114615ac757600080fd5b60408a015160608b015191985096509450615ae460808a01615884565b935060a0890151615af481614df8565b60c08a0151909350615b0581614fae565b60e08a0151909250615b1681614eab565b809150509295985092959890939650565b81810360008312801583831316838312821617156156a3576156a361539c565b600060208284031215615b5957600080fd5b815161084781614eab565b601f821115612f0f57600081815260208120601f850160051c81016020861015615b8b5750805b601f850160051c820191505b81811015613ab357828155600101615b97565b81516001600160401b03811115615bc357615bc361513c565b615bd781615bd184546152d0565b84615b64565b602080601f831160018114615c0c5760008415615bf45750858301515b600019600386901b1c1916600185901b178555613ab3565b600085815260208120601f198616915b82811015615c3b57888601518255948401946001909101908401615c1c565b5085821015615c595787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b60008251615c7b818460208701614da1565b919091019291505056fec749f9ae947d4734cf1569606a8a347391ae94a063478aa853aeff48ac5f99e88be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0ddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3efc28ad1de9c0c32e5394ba60323e44d8d9536312236a47231772e448a3e49de42a2646970667358221220a11bde499516b0a2e8e737821292815fcefc66549a9729f24ea128d34ed6027364736f6c63430008130033", diff --git a/lib/g-uni-v1-core/src/addresses.ts b/lib/g-uni-v1-core/src/addresses.ts index 09362d282..f0e89f9e9 100644 --- a/lib/g-uni-v1-core/src/addresses.ts +++ b/lib/g-uni-v1-core/src/addresses.ts @@ -62,7 +62,7 @@ export const getAddresses = (network: string): Addresses => { GUniImplementation: "", }; case "anvil": - return { + return { Gelato: "0x0000000000000000000000000000000000000000", Swapper: "", GelatoDevMultiSig: "0x0000000000000000000000000000000000000000", @@ -74,7 +74,7 @@ export const getAddresses = (network: string): Addresses => { GUniImplementation: "", }; case "blastSepolia": - return { + return { Gelato: "0xB47C8e4bEb28af80eDe5E5bF474927b110Ef2c0e", Swapper: "", GelatoDevMultiSig: "0xB47C8e4bEb28af80eDe5E5bF474927b110Ef2c0e", @@ -86,19 +86,19 @@ export const getAddresses = (network: string): Addresses => { GUniImplementation: "0xdde18C0c3B637F4BA02f5567a671F5e28b7404e7", }; case "arbitrumSepolia": - return { + return { Gelato: "0xB47C8e4bEb28af80eDe5E5bF474927b110Ef2c0e", Swapper: "", GelatoDevMultiSig: "0xB47C8e4bEb28af80eDe5E5bF474927b110Ef2c0e", WETH: "", DAI: "", USDC: "", - UniswapV3Factory: "0x248AB79Bbb9bC29bB72f7Cd42F17e054Fc40188e", - GUniFactory: "0x7f502e91182338F19CB6F4B02B33B33feD1c5000", - GUniImplementation: "0xCE7427a94bc9B8A90E2C8d91cB0247D779819437", + UniswapV3Factory: "0x2dCC5a88A861FB73613153F82CF801cd09E72a5F", + GUniFactory: "0x39AC4439e6CB9427C073259e5742529cE46DD663", + GUniImplementation: "0xF3e2578C66071a637F06cc02b1c11DeC0784C1A6", }; case "modeSepolia": - return { + return { Gelato: "0xB47C8e4bEb28af80eDe5E5bF474927b110Ef2c0e", Swapper: "", GelatoDevMultiSig: "0xB47C8e4bEb28af80eDe5E5bF474927b110Ef2c0e", @@ -110,7 +110,7 @@ export const getAddresses = (network: string): Addresses => { GUniImplementation: "0xe1B83edA3399A2c9B8265215EA21042C9b918dc5", }; case "baseSepolia": - return { + return { Gelato: "0xB47C8e4bEb28af80eDe5E5bF474927b110Ef2c0e", Swapper: "", GelatoDevMultiSig: "0xB47C8e4bEb28af80eDe5E5bF474927b110Ef2c0e", From be152b64fb374a8d8551b9247070ef92231bf21e Mon Sep 17 00:00:00 2001 From: Jem <0x0xjem@gmail.com> Date: Tue, 25 Jun 2024 14:24:47 +0400 Subject: [PATCH 16/29] Add G-UNI factory addresses from testnet deployments --- script/env.json | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/script/env.json b/script/env.json index 029777eaf..f0b937728 100644 --- a/script/env.json +++ b/script/env.json @@ -53,14 +53,14 @@ "PROTOCOL": "0xB47C8e4bEb28af80eDe5E5bF474927b110Ef2c0e" }, "gUni": { - "factory": "0x0000000000000000000000000000000000000000" + "factory": "0x39AC4439e6CB9427C073259e5742529cE46DD663" }, "uniswapV2": { "factory": "0x6c4f747ba42136f3F12E70c975AbBc194CBD39E4", "router": "0x909F26919989167d051312fBB0a1Df4CD93Bf70b" }, "uniswapV3": { - "factory": "0x248AB79Bbb9bC29bB72f7Cd42F17e054Fc40188e" + "factory": "0x2dCC5a88A861FB73613153F82CF801cd09E72a5F" } }, "base-sepolia": { @@ -87,7 +87,7 @@ "PROTOCOL": "0xB47C8e4bEb28af80eDe5E5bF474927b110Ef2c0e" }, "gUni": { - "factory": "0x0000000000000000000000000000000000000000" + "factory": "0x04974BcFC715c148818724d9Caab3Fe8d0391b8b" }, "uniswapV2": { "factory": "0x5D7ddDFee9fB5709Ccdea49Acd51db3d73BC75Fa", @@ -160,7 +160,7 @@ "weth": "0x4200000000000000000000000000000000000023" }, "gUni": { - "factory": "0x0000000000000000000000000000000000000000" + "factory": "0xED28E5230E934cf9C843C08818D0639176040297" }, "uniswapV2": { "factory": "0x9371C6e657681923708CA6F621DE5e93E5d46F7e", @@ -223,7 +223,7 @@ "PROTOCOL": "0xB47C8e4bEb28af80eDe5E5bF474927b110Ef2c0e" }, "gUni": { - "factory": "0x0000000000000000000000000000000000000000" + "factory": "0x2dCC5a88A861FB73613153F82CF801cd09E72a5F" }, "uniswapV2": { "factory": "0x85c0A59A492C084d84eDcD7a8b785eaF620a9B0d", From 5703b4f9f5a0b38b85cd30b53c2f8c17cb92ee8c Mon Sep 17 00:00:00 2001 From: Jem <0x0xjem@gmail.com> Date: Tue, 25 Jun 2024 15:12:48 +0400 Subject: [PATCH 17/29] chore: linting --- script/salts/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/script/salts/README.md b/script/salts/README.md index 1f8825ecd..f08b51bc5 100644 --- a/script/salts/README.md +++ b/script/salts/README.md @@ -81,4 +81,4 @@ The following steps need to be followed to generate the salt: ./scripts/salts/write_salt.sh ./bytecode/MockCallback98.bin 98 MockCallback 0x5080f4a157b896da527e936ac326bc3742c5d0239c63823b4d5c9939cc19ccb1 ``` -Provided the contract bytecode (contract code and constructor arguments) is the same, the saved salt will be used during deployment. \ No newline at end of file +Provided the contract bytecode (contract code and constructor arguments) is the same, the saved salt will be used during deployment. From e6283498d594ef45aa6bc8e409d166ab191a468a Mon Sep 17 00:00:00 2001 From: Jem <0x0xjem@gmail.com> Date: Tue, 25 Jun 2024 18:56:12 +0400 Subject: [PATCH 18/29] Verification of deployed tokens --- script/ops/test/deployTokens.sh | 37 +++++++++++++++++++++++++++++++-- 1 file changed, 35 insertions(+), 2 deletions(-) diff --git a/script/ops/test/deployTokens.sh b/script/ops/test/deployTokens.sh index 7c89a378a..f9c7c8d36 100755 --- a/script/ops/test/deployTokens.sh +++ b/script/ops/test/deployTokens.sh @@ -1,7 +1,7 @@ #!/bin/bash # Usage: -# ./deployTokens.sh --seller --buyer --envFile <.env> --broadcast +# ./deployTokens.sh --seller --buyer --envFile <.env> --broadcast --verify # Iterate through named arguments # Source: https://unix.stackexchange.com/a/388038 @@ -25,6 +25,7 @@ set +a # Disable automatic export # Apply defaults to command-line arguments BROADCAST=${broadcast:-false} +VERIFY=${verify:-false} # Check that the seller is defined and is an address if [[ ! "$seller" =~ ^0x[a-fA-F0-9]{40}$ ]] @@ -42,6 +43,9 @@ fi echo "Using chain: $CHAIN" echo "Using RPC at URL: $RPC_URL" +if [ -n "$VERIFIER_URL" ]; then + echo "Using verifier at URL: $VERIFIER_URL" +fi echo "Seller: $seller" echo "Buyer: $buyer" echo "Deployer: $DEPLOYER_ADDRESS" @@ -55,7 +59,36 @@ else echo "Broadcast: disabled" fi +# Set VERIFY_FLAG based on VERIFY +VERIFY_FLAG="" +if [ "$VERIFY" = "true" ] || [ "$VERIFY" = "TRUE" ]; then + + if [ -z "$VERIFIER" ] || [ "$VERIFIER" = "etherscan" ]; then + # Check if ETHERSCAN_API_KEY is set + if [ -z "$ETHERSCAN_API_KEY" ]; then + echo "No Etherscan API key found. Provide the key in .env or disable verification." + exit 1 + fi + + if [ -n "$VERIFIER_URL" ]; then + VERIFY_FLAG="--verify --verifier-url $VERIFIER_URL --etherscan-api-key $ETHERSCAN_API_KEY" + else + VERIFY_FLAG="--verify --etherscan-api-key $ETHERSCAN_API_KEY" + fi + else + if [ -n "$VERIFIER_URL" ]; then + VERIFY_FLAG="--verify --verifier $VERIFIER --verifier-url $VERIFIER_URL" + else + VERIFY_FLAG="--verify --verifier $VERIFIER" + fi + fi + echo "Verification: enabled" +else + echo "Verification: disabled" +fi + # Create auction forge script ./script/ops/test/TestData.s.sol:TestData --sig "deployTestTokens(address,address)()" $seller $buyer \ --rpc-url $RPC_URL --private-key $DEPLOYER_PRIVATE_KEY --froms $DEPLOYER_ADDRESS --slow -vvv \ -$BROADCAST_FLAG +$BROADCAST_FLAG \ +$VERIFY_FLAG From a657c48994911dffc9f7b03dad6e7438362fc854 Mon Sep 17 00:00:00 2001 From: Jem <0x0xjem@gmail.com> Date: Wed, 26 Jun 2024 11:14:42 +0400 Subject: [PATCH 19/29] Update Uniswap V2 addresses for arbitrum sepolia --- script/env.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/script/env.json b/script/env.json index f0b937728..c7c8b15cc 100644 --- a/script/env.json +++ b/script/env.json @@ -56,8 +56,8 @@ "factory": "0x39AC4439e6CB9427C073259e5742529cE46DD663" }, "uniswapV2": { - "factory": "0x6c4f747ba42136f3F12E70c975AbBc194CBD39E4", - "router": "0x909F26919989167d051312fBB0a1Df4CD93Bf70b" + "factory": "0xeA68f4B82D43979c42E1Fc8E80BDA27BF54C9651", + "router": "0x706f328cdE340522149821FC249c2ad321070212" }, "uniswapV3": { "factory": "0x2dCC5a88A861FB73613153F82CF801cd09E72a5F" From 127cc24ba1020c445d6f74a29bcbe86f72520d60 Mon Sep 17 00:00:00 2001 From: Jem <0x0xjem@gmail.com> Date: Wed, 26 Jun 2024 11:14:53 +0400 Subject: [PATCH 20/29] Add resume flag to deployTokens script --- script/ops/test/deployTokens.sh | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/script/ops/test/deployTokens.sh b/script/ops/test/deployTokens.sh index f9c7c8d36..886679af0 100755 --- a/script/ops/test/deployTokens.sh +++ b/script/ops/test/deployTokens.sh @@ -1,7 +1,7 @@ #!/bin/bash # Usage: -# ./deployTokens.sh --seller --buyer --envFile <.env> --broadcast --verify +# ./deployTokens.sh --seller --buyer --envFile <.env> --broadcast --verify --resume # Iterate through named arguments # Source: https://unix.stackexchange.com/a/388038 @@ -26,6 +26,7 @@ set +a # Disable automatic export # Apply defaults to command-line arguments BROADCAST=${broadcast:-false} VERIFY=${verify:-false} +RESUME=${resume:-false} # Check that the seller is defined and is an address if [[ ! "$seller" =~ ^0x[a-fA-F0-9]{40}$ ]] @@ -87,8 +88,18 @@ else echo "Verification: disabled" fi +# Set RESUME_FLAG based on RESUME +RESUME_FLAG="" +if [ "$RESUME" = "true" ] || [ "$RESUME" = "TRUE" ]; then + RESUME_FLAG="--resume" + echo "Resume: enabled" +else + echo "Resume: disabled" +fi + # Create auction forge script ./script/ops/test/TestData.s.sol:TestData --sig "deployTestTokens(address,address)()" $seller $buyer \ --rpc-url $RPC_URL --private-key $DEPLOYER_PRIVATE_KEY --froms $DEPLOYER_ADDRESS --slow -vvv \ $BROADCAST_FLAG \ -$VERIFY_FLAG +$VERIFY_FLAG \ +$RESUME_FLAG From d65b906eb4091f056316e6c6745c70b9096d4f5c Mon Sep 17 00:00:00 2001 From: Jem <0x0xjem@gmail.com> Date: Wed, 26 Jun 2024 11:52:35 +0400 Subject: [PATCH 21/29] Update Uniswap V2 deployments on blast/base/mode sepolia testnets --- script/env.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/script/env.json b/script/env.json index c7c8b15cc..eab6ecadc 100644 --- a/script/env.json +++ b/script/env.json @@ -90,8 +90,8 @@ "factory": "0x04974BcFC715c148818724d9Caab3Fe8d0391b8b" }, "uniswapV2": { - "factory": "0x5D7ddDFee9fB5709Ccdea49Acd51db3d73BC75Fa", - "router": "0x3c068BF506925A8349CC14438ce91d2C43793D4e" + "factory": "0xFFa262a1FaDaEd0CE863792CE7A57cC329d7492e", + "router": "0xFA41988c6D1B095826Bea02dbcD124661305dAE7" }, "uniswapV3": { "factory": "0x4752ba5DBc23f44D87826276BF6Fd6b1C372aD24" @@ -163,8 +163,8 @@ "factory": "0xED28E5230E934cf9C843C08818D0639176040297" }, "uniswapV2": { - "factory": "0x9371C6e657681923708CA6F621DE5e93E5d46F7e", - "router": "0x82D4e19FeC908EEE6009e6E099794EA050eb8a96" + "factory": "0x8823062F9406f31cc52cc24A70a8415d982E245b", + "router": "0xF3711CaF818d6932da1e31aACF27167c989cD886" }, "uniswapV3": { "factory": "0x84fF29e6321c9dd328B8B383b08dd2815b121243" @@ -226,8 +226,8 @@ "factory": "0x2dCC5a88A861FB73613153F82CF801cd09E72a5F" }, "uniswapV2": { - "factory": "0x85c0A59A492C084d84eDcD7a8b785eaF620a9B0d", - "router": "0xaBBD0dBeF1f5A61b89CDAaefB6c25ADf3Be05B58" + "factory": "0xFFa262a1FaDaEd0CE863792CE7A57cC329d7492e", + "router": "0xFA41988c6D1B095826Bea02dbcD124661305dAE7" }, "uniswapV3": { "factory": "0x0f88f3f5108eB3BD1A2D411E9a1fD41997811D88" From c1922fcefcbf6b43488c604048f080fdc1eedaf0 Mon Sep 17 00:00:00 2001 From: Jem <0x0xjem@gmail.com> Date: Thu, 27 Jun 2024 12:26:20 +0400 Subject: [PATCH 22/29] Remove redundant env addresses --- script/env.json | 29 ----------------------------- 1 file changed, 29 deletions(-) diff --git a/script/env.json b/script/env.json index eab6ecadc..6a855b8ab 100644 --- a/script/env.json +++ b/script/env.json @@ -261,35 +261,6 @@ "uniswapV3": { "factory": "0x0227628f3F023bb0B980b67D528571c95c6DaC1c" } - }, - "tests": { - "axis": { - "AtomicAuctionHouse": "0x0000000000000000000000000000000000000000", - "AtomicCatalogue": "0x0000000000000000000000000000000000000000", - "AtomicLinearVesting": "0x0000000000000000000000000000000000000000", - "AtomicUniswapV2DirectToLiquidity": "0x0000000000000000000000000000000000000000", - "AtomicUniswapV3DirectToLiquidity": "0x0000000000000000000000000000000000000000", - "BatchAuctionHouse": "0x0000000000000000000000000000000000000000", - "BatchCatalogue": "0x0000000000000000000000000000000000000000", - "BatchLinearVesting": "0x0000000000000000000000000000000000000000", - "BatchUniswapV2DirectToLiquidity": "0x0000000000000000000000000000000000000000", - "BatchUniswapV3DirectToLiquidity": "0x0000000000000000000000000000000000000000", - "EncryptedMarginalPrice": "0x0000000000000000000000000000000000000000", - "FixedPriceSale": "0x0000000000000000000000000000000000000000", - "OWNER": "0x0000000000000000000000000000000000000001", - "PERMIT2": "0x000000000022D473030F116dDEE9F6B43aC78BA3", - "PROTOCOL": "0x0000000000000000000000000000000000000003" - }, - "gUni": { - "factory": "0x0000000000000000000000000000000000000000" - }, - "uniswapV2": { - "factory": "0x0000000000000000000000000000000000000000", - "router": "0x0000000000000000000000000000000000000000" - }, - "uniswapV3": { - "factory": "0x0000000000000000000000000000000000000000" - } } } } From 706689ddd1d429dc0af39ec4a527ef123065c206 Mon Sep 17 00:00:00 2001 From: Jem <0x0xjem@gmail.com> Date: Thu, 27 Jun 2024 12:35:37 +0400 Subject: [PATCH 23/29] Add addresses for dependencies on Base --- script/env.json | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/script/env.json b/script/env.json index 6a855b8ab..bb34b1d5f 100644 --- a/script/env.json +++ b/script/env.json @@ -63,6 +63,19 @@ "factory": "0x2dCC5a88A861FB73613153F82CF801cd09E72a5F" } }, + "base": { + "axis": {}, + "gUni": { + "factory": "0x0000000000000000000000000000000000000000" + }, + "uniswapV2": { + "factory": "0x8909Dc15e40173Ff4699343b6eB8132c65e18eC6", + "router": "0x4752ba5dbc23f44d87826276bf6fd6b1c372ad24" + }, + "uniswapV3": { + "factory": "0x33128a8fC17869897dcE68Ed026d694621f6FDfD" + } + }, "base-sepolia": { "axis": { "AtomicAuctionHouse": "0x0000000000000000000000000000000000000000", From de4491fd58a8471f82b739c6d0ed8ce39fa46c3f Mon Sep 17 00:00:00 2001 From: Jem <0x0xjem@gmail.com> Date: Thu, 27 Jun 2024 12:35:46 +0400 Subject: [PATCH 24/29] Document sources for external addresses --- script/deploy/README.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/script/deploy/README.md b/script/deploy/README.md index 10e35d628..4b7f06336 100644 --- a/script/deploy/README.md +++ b/script/deploy/README.md @@ -98,3 +98,18 @@ CHAIN="blast-sepolia" ./script/deploy/deploy.sh --deployFile ./script/deploy/seq If the `verify` flag on `deploy.sh` is set, the contract should be verified automatically. If `VERIFIER` is blank or `etherscan`, then `ETHERSCAN_API_KEY` must be set as an environment variable. Additionally, `VERIFIER_URL` can be used to set a custom verifier URL (by default it uses the one configurd in ethers-rs). If deploying against a Tenderly fork and verifying, [follow the instructions](https://docs.tenderly.co/contract-verification). + +## External Dependencies + +Note that for each chain Axis is to be deployed on, if the Uniswap V3 DTL callback is to be used, a deployment of G-UNI will be required. + +Apart from first-party deployments, the `script/env.json` file contains the addresses of third-party dependencies. These have been sourced from the following locations: + +- [Uniswap V2](https://github.com/Uniswap/docs/blob/65d3f21e6cb2879b0672ad791563de0e54fcc089/docs/contracts/v2/reference/smart-contracts/08-deployment-addresses.md) + - Exceptions + - Arbitrum Sepolia, Base Sepolia, Blast Sepolia and Mode Sepolia are custom deployments, due to the unavailability of the Uniswap V2 contracts. +- [Uniswap V3](https://github.com/Uniswap/docs/tree/65d3f21e6cb2879b0672ad791563de0e54fcc089/docs/contracts/v3/reference/deployments) + - Exceptions + - Arbitrum Sepolia and Blast Sepolia are custom deployments by Axis Finance alongside the G-UNI deployment. +- G-UNI + - All of the addresses mentioned are custom deployments by Axis Finance. This is because the addresses from the deployments recorded in the [g-uni-v1-core repository](https://github.com/gelatodigital/g-uni-v1-core/tree/bea63422e2155242b051896b635508b7a99d2a1a/deployments) point to proxies, which have since been upgraded to point to Arrakis contracts that have different interfaces. From 3e3752222fcc8c25a64038274016f483d4c2dca4 Mon Sep 17 00:00:00 2001 From: Jem <0x0xjem@gmail.com> Date: Fri, 28 Jun 2024 11:06:15 +0400 Subject: [PATCH 25/29] Re-deployment of UniswapV2DTL to Arbitrum Sepolia --- deployments/.arbitrum-sepolia-1719558304.json | 3 +++ script/env.json | 2 +- script/salts/salts.json | 1 + 3 files changed, 5 insertions(+), 1 deletion(-) create mode 100644 deployments/.arbitrum-sepolia-1719558304.json diff --git a/deployments/.arbitrum-sepolia-1719558304.json b/deployments/.arbitrum-sepolia-1719558304.json new file mode 100644 index 000000000..6ae6449c6 --- /dev/null +++ b/deployments/.arbitrum-sepolia-1719558304.json @@ -0,0 +1,3 @@ +{ +"axis.BatchUniswapV2DirectToLiquidity": "0xE676907Fa9a09dC1E3b67De11816665A1313524f" +} diff --git a/script/env.json b/script/env.json index bb34b1d5f..009e74d16 100644 --- a/script/env.json +++ b/script/env.json @@ -43,7 +43,7 @@ "BatchLinearVesting": "0xFB1113E170CA6d95f3a91121BDD2370a822598E9", "BatchMerkleAllowlist": "0x9837cA34C444cEbd07C699036D1D174C6392D9fa", "BatchTokenAllowlist": "0x988c61b36F7898e464a0Bf477d2dc06aC4E95F95", - "BatchUniswapV2DirectToLiquidity": "0xE64E0807E5a0d789dB2fABB3345aB763f879521C", + "BatchUniswapV2DirectToLiquidity": "0xE676907Fa9a09dC1E3b67De11816665A1313524f", "BatchUniswapV3DirectToLiquidity": "0xE6ECF0f655E642834c79F30323e7ae941883ac00", "EncryptedMarginalPrice": "0x2Ca8954B468E2FbfE55240B69db937861c12F0d0", "FixedPriceBatch": "0x8b47F82a58d8AFBE5167feBf0D3F3Bb509aaf2bd", diff --git a/script/salts/salts.json b/script/salts/salts.json index b6aabd5fc..5c5659aee 100644 --- a/script/salts/salts.json +++ b/script/salts/salts.json @@ -102,6 +102,7 @@ "0x49a44765f82e21a2455ecafadfd36f1dd7066ae8733dab3bf13fa33f271faabe": "0x036007589a41359e5858eddc394a9e4c2fe917360175a38d6139d77c8d8b0a89", "0x5e493cf7f7157b59101a569467e19f4a2618cb03f6414d4a8b4f1d2b4ac2912e": "0x43996039523bd2f955e18733dafabd2ab45c0e40865e93cca76dd2773c453d97", "0x60bc649627ebd535e11e848bd93dbbb4dc819e0279d20e1d3088983f65562dbf": "0xc4534d72b992c13813b52daa775c9dbe230eaf0b139a76fdc78baf72487148d0", + "0x72c2f4c8abb52265f37b52eb8732d93bdf72ff14512a77bb62d85f44283f81c1": "0x193e02d9a140f48949d8e6d06639c2b6f07aa2ac3aede83f1c2806fb603fde06", "0x8b4463835dc772630989c2d09011d747347fc03f6cdf5b4e820ed1ef05f26942": "0xc3a15bdea9242368d2db15a46055a9bf88b551562eda6217f0a02f1d6a93f73b", "0xd1807b8e8fef23d2bd5acb7fe74e7dab661f1ef2f7aaaa66e286398a6d9e8011": "0xec56a79198c3d690cad3e6e39521bd7dd90dc8692cf50a7ab027408d139bd189", "0xe8242d2e1eae0d89d0ca278cea284cd4056496fb12fd0405237827e252efdfea": "0x65a71869dd1c30cc12ac786991b9492a5286c8cd942161d738ca34b3e0e29053", From 99cbe361ace45349070ee0e5060f2f3f7b329bfd Mon Sep 17 00:00:00 2001 From: Jem <0x0xjem@gmail.com> Date: Fri, 28 Jun 2024 11:11:24 +0400 Subject: [PATCH 26/29] Re-deployment of UniswapV2DTL to Base Sepolia --- deployments/.base-sepolia-1719558588.json | 3 +++ script/env.json | 2 +- script/salts/salts.json | 1 + 3 files changed, 5 insertions(+), 1 deletion(-) create mode 100644 deployments/.base-sepolia-1719558588.json diff --git a/deployments/.base-sepolia-1719558588.json b/deployments/.base-sepolia-1719558588.json new file mode 100644 index 000000000..2bf7186d6 --- /dev/null +++ b/deployments/.base-sepolia-1719558588.json @@ -0,0 +1,3 @@ +{ +"axis.BatchUniswapV2DirectToLiquidity": "0xE66538D4EEbf830b1Dc791894af4709Af257764d" +} diff --git a/script/env.json b/script/env.json index 009e74d16..82b631eca 100644 --- a/script/env.json +++ b/script/env.json @@ -90,7 +90,7 @@ "BatchLinearVesting": "0x392C629741a0c7350c7181addD5870dE178eeD94", "BatchMerkleAllowlist": "0x9837cA34C444cEbd07C699036D1D174C6392D9fa", "BatchTokenAllowlist": "0x988c61b36F7898e464a0Bf477d2dc06aC4E95F95", - "BatchUniswapV2DirectToLiquidity": "0xE650A43485b89F26FB98ad16811BF45BD52ad014", + "BatchUniswapV2DirectToLiquidity": "0xE66538D4EEbf830b1Dc791894af4709Af257764d", "BatchUniswapV3DirectToLiquidity": "0xE661c46d94c53584095A8240958695bAD6d6fC2F", "EncryptedMarginalPrice": "0x02c63F8aE0a8e9D0F7267AA4d0Af0567858188C2", "FixedPriceBatch": "0x188Ad428c60eADFB0749B2E3A4836D63489304E3", diff --git a/script/salts/salts.json b/script/salts/salts.json index 5c5659aee..81310698c 100644 --- a/script/salts/salts.json +++ b/script/salts/salts.json @@ -99,6 +99,7 @@ "UniswapV2DirectToLiquidity": { "0x2952f587868594ee4aed1e483cdbb653d4ef61c9c662a737fc6ae8f271225fe1": "0x000174bce07575898f52c13859450718eea202638a7089ff3d358a023b48bbfb", "0x32dcc0983af67a522f275494ce3a9a2aa88e6402989414825c965c9ca5fba907": "0xf588d14ef594a9c7c4fa378cfdebcbec0356153259bfe8a58d168f4866f7f2fb", + "0x3da878eaa4aa411d061618a12b80bd1a2896d0c89cdfc57bf95f335ec4c95544": "0xa368baf207ddf8d6a2d6bff03af56f0b527211d2c717d8e0768080227a6f4ca8", "0x49a44765f82e21a2455ecafadfd36f1dd7066ae8733dab3bf13fa33f271faabe": "0x036007589a41359e5858eddc394a9e4c2fe917360175a38d6139d77c8d8b0a89", "0x5e493cf7f7157b59101a569467e19f4a2618cb03f6414d4a8b4f1d2b4ac2912e": "0x43996039523bd2f955e18733dafabd2ab45c0e40865e93cca76dd2773c453d97", "0x60bc649627ebd535e11e848bd93dbbb4dc819e0279d20e1d3088983f65562dbf": "0xc4534d72b992c13813b52daa775c9dbe230eaf0b139a76fdc78baf72487148d0", From 60024dcf6a026bdfc618444feba7dd64c6234892 Mon Sep 17 00:00:00 2001 From: Jem <0x0xjem@gmail.com> Date: Fri, 28 Jun 2024 11:12:35 +0400 Subject: [PATCH 27/29] Re-deployment of UniswapV2DTL to Blast Sepolia --- deployments/.blast-sepolia-1719558704.json | 3 +++ script/env.json | 2 +- script/salts/salts.json | 1 + 3 files changed, 5 insertions(+), 1 deletion(-) create mode 100644 deployments/.blast-sepolia-1719558704.json diff --git a/deployments/.blast-sepolia-1719558704.json b/deployments/.blast-sepolia-1719558704.json new file mode 100644 index 000000000..f822c2bec --- /dev/null +++ b/deployments/.blast-sepolia-1719558704.json @@ -0,0 +1,3 @@ +{ +"axis.BatchUniswapV2DirectToLiquidity": "0xE60007A0721A92f0eb538c360317d4808238700D" +} diff --git a/script/env.json b/script/env.json index 82b631eca..fb734c23e 100644 --- a/script/env.json +++ b/script/env.json @@ -158,7 +158,7 @@ "BatchLinearVesting": "0xBD0474b8e7b65f3dF35d2817BA09aC864a199e31", "BatchMerkleAllowlist": "0x9859c6FA2594e93149bd76415cE3982f39888CCb", "BatchTokenAllowlist": "0x984B6165fC87c682441E81B4aa23A017cdbFba18", - "BatchUniswapV2DirectToLiquidity": "0xE6282DDB61f81F4d769FE511676dC21E570AF815", + "BatchUniswapV2DirectToLiquidity": "0xE60007A0721A92f0eb538c360317d4808238700D", "BatchUniswapV3DirectToLiquidity": "0xE6b1113d108f86Fb7eF662ecF235dB6dB8978Cc3", "EncryptedMarginalPrice": "0x8F34bBB3edd28017f826FE7a73eb9297384BF0d8", "FixedPriceBatch": "0x87ED152099949F870725bD9517A1697d428ddF74", diff --git a/script/salts/salts.json b/script/salts/salts.json index 81310698c..ade6cedd3 100644 --- a/script/salts/salts.json +++ b/script/salts/salts.json @@ -106,6 +106,7 @@ "0x72c2f4c8abb52265f37b52eb8732d93bdf72ff14512a77bb62d85f44283f81c1": "0x193e02d9a140f48949d8e6d06639c2b6f07aa2ac3aede83f1c2806fb603fde06", "0x8b4463835dc772630989c2d09011d747347fc03f6cdf5b4e820ed1ef05f26942": "0xc3a15bdea9242368d2db15a46055a9bf88b551562eda6217f0a02f1d6a93f73b", "0xd1807b8e8fef23d2bd5acb7fe74e7dab661f1ef2f7aaaa66e286398a6d9e8011": "0xec56a79198c3d690cad3e6e39521bd7dd90dc8692cf50a7ab027408d139bd189", + "0xd2933152e78d2d8b4bc2fd47ec67df6c92de359d55ada6804e2071bbe3597d29": "0x8a132dcd9dd6726916af25a65e707d2d6e654b73df598b3b3edd92360b16d4e7", "0xe8242d2e1eae0d89d0ca278cea284cd4056496fb12fd0405237827e252efdfea": "0x65a71869dd1c30cc12ac786991b9492a5286c8cd942161d738ca34b3e0e29053", "0xf40b0b3a6c36f510d58633db604bcd978fe1e804891ce9792ac9bbb064cbe97a": "0x4fdd82a331ef80cde3af5905bd2b39c5b1d2f1da38e059fc7e077a355f4caa92" }, From 6687984a316abffc33e5c9a1e4edafd2e084d5e0 Mon Sep 17 00:00:00 2001 From: Jem <0x0xjem@gmail.com> Date: Fri, 28 Jun 2024 11:15:47 +0400 Subject: [PATCH 28/29] Re-deployment of UniswapV2DTL on Mode Sepolia --- deployments/.mode-sepolia-1719558822.json | 3 +++ script/env.json | 2 +- script/salts/salts.json | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) create mode 100644 deployments/.mode-sepolia-1719558822.json diff --git a/deployments/.mode-sepolia-1719558822.json b/deployments/.mode-sepolia-1719558822.json new file mode 100644 index 000000000..a656a37d5 --- /dev/null +++ b/deployments/.mode-sepolia-1719558822.json @@ -0,0 +1,3 @@ +{ +"axis.BatchUniswapV2DirectToLiquidity": "0xE60FD6203AF5D5d43433952a033Cb70Ba21784E9" +} diff --git a/script/env.json b/script/env.json index fb734c23e..1f09721bc 100644 --- a/script/env.json +++ b/script/env.json @@ -226,7 +226,7 @@ "BatchLinearVesting": "0x90608F57161aC771b28fb0adCd2434cfa1463201", "BatchMerkleAllowlist": "0x9837cA34C444cEbd07C699036D1D174C6392D9fa", "BatchTokenAllowlist": "0x988c61b36F7898e464a0Bf477d2dc06aC4E95F95", - "BatchUniswapV2DirectToLiquidity": "0xE60f928d399782836540752Eb3fCfE46b0Cb4E24", + "BatchUniswapV2DirectToLiquidity": "0xE60FD6203AF5D5d43433952a033Cb70Ba21784E9", "BatchUniswapV3DirectToLiquidity": "0xE6ce65C413a5Fc10Fa77B26032B33DCD68F8474a", "EncryptedMarginalPrice": "0x1A6Ba70B8e5957bCd03C20f9CF42D9e6D3d9b514", "FixedPriceBatch": "0x75DA61536510BA0bCa0C9Af21311A1Fc035DCf4e", diff --git a/script/salts/salts.json b/script/salts/salts.json index ade6cedd3..4c4f54eca 100644 --- a/script/salts/salts.json +++ b/script/salts/salts.json @@ -99,7 +99,7 @@ "UniswapV2DirectToLiquidity": { "0x2952f587868594ee4aed1e483cdbb653d4ef61c9c662a737fc6ae8f271225fe1": "0x000174bce07575898f52c13859450718eea202638a7089ff3d358a023b48bbfb", "0x32dcc0983af67a522f275494ce3a9a2aa88e6402989414825c965c9ca5fba907": "0xf588d14ef594a9c7c4fa378cfdebcbec0356153259bfe8a58d168f4866f7f2fb", - "0x3da878eaa4aa411d061618a12b80bd1a2896d0c89cdfc57bf95f335ec4c95544": "0xa368baf207ddf8d6a2d6bff03af56f0b527211d2c717d8e0768080227a6f4ca8", + "0x3da878eaa4aa411d061618a12b80bd1a2896d0c89cdfc57bf95f335ec4c95544": "0xc281eab2cbc2fa51cc5bf3dde7cf9bef394d9db473c797d48a7da85e2c4bfb95", "0x49a44765f82e21a2455ecafadfd36f1dd7066ae8733dab3bf13fa33f271faabe": "0x036007589a41359e5858eddc394a9e4c2fe917360175a38d6139d77c8d8b0a89", "0x5e493cf7f7157b59101a569467e19f4a2618cb03f6414d4a8b4f1d2b4ac2912e": "0x43996039523bd2f955e18733dafabd2ab45c0e40865e93cca76dd2773c453d97", "0x60bc649627ebd535e11e848bd93dbbb4dc819e0279d20e1d3088983f65562dbf": "0xc4534d72b992c13813b52daa775c9dbe230eaf0b139a76fdc78baf72487148d0", From 5d6d89be290afb683ce50a82785efaf63ff2e455 Mon Sep 17 00:00:00 2001 From: Oighty Date: Mon, 8 Jul 2024 14:20:14 -0400 Subject: [PATCH 29/29] test: update salts --- script/salts/salts.json | 4 ++-- test/Constants.sol | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/script/salts/salts.json b/script/salts/salts.json index e2e3fa0c1..efc15d67d 100644 --- a/script/salts/salts.json +++ b/script/salts/salts.json @@ -58,7 +58,7 @@ "0xe577ed57cc6c3ce09f0d1f66fbf3fcb30b35fde4c350c8d515d0f930603c41df": "0x97167e0f92b3e91d6e0fb8637c5ddfa224a3ec191528f46208663258c0cb95c3" }, "Test_GUniFactory": { - "0xa8ee5069b769099da4dbc8c5d4c95cb74d416554203119678be4d0eba33f5962": "0x767e6faad4f8e62d6ab897930a0eb497cb71ebc75f90856dc13996fb00b907d3" + "0x99fbce18602720731ae027d057bc0e206a620bbb54da7363d32dc149e7aeaa64": "0xf3e2bc8f6351215210664136231cceca0f7c958d3b200eaed4043a316eca22be" }, "Test_MockCallback": { "0x052a304d0a4a19a819c4e1501b45b4f1b49f73d1a7cac910386fe5fc509633a4": "0x1416c5dbf5cb95f1d5793df295de71f9fd1f46cf6e2cbdf08863e720fa750dbb", @@ -91,7 +91,7 @@ "0xe6204aa211921628df345ff0b909c863298684cd8ca65de5479af6b70662e622": "0xf5700f795856223d45b9e1b76fa0f23db9d770b25c44cae8f556ae6d1e7bee5e" }, "Test_UniswapV3DirectToLiquidity": { - "0x5aec331792b9b995051d0efd683176c0800e527130eb7514f415c4f1a9f09f43": "0x37c69f7eea77a282f753c9ae1505d0272745cd870612e78e4e962285eb0de2d3" + "0xc7b7c0717c869c4ea95e40c24731f0e4cb49f7665e8962a2cb2b58e5c46cc46d": "0xe5bda1880e46560490c3388a09b092db47d824b9214ad91150627c5c13c43343" }, "Test_UniswapV3Factory": { "0xbcd657c3390ecd2e1782b6473400c51fa124922eb98b69f1b5192eb0f8e3d3df": "0xfad08a6eaa7974f06cec79e15064de7f6fa17b22ecdb3764988b2c4b1571c613" diff --git a/test/Constants.sol b/test/Constants.sol index 08aaf8862..8b9f46089 100644 --- a/test/Constants.sol +++ b/test/Constants.sol @@ -10,7 +10,7 @@ abstract contract TestConstants { address(0xAAe2b0bEf00E78705673DFc5c3a8Fb39Dba6E3E5); address internal constant _UNISWAP_V3_FACTORY = address(0xAA70C9Ef2969368cE15644696b63b0fcEb93e501); - address internal constant _GUNI_FACTORY = address(0xAAd32E7fC9695dF836C4A454EdB8243F4b62a14E); + address internal constant _GUNI_FACTORY = address(0xAA6180e11cf2118E9e9D766D67Bb8Bb9959DF17B); address internal constant _BASELINE_KERNEL = address(0xBB); address internal constant _BASELINE_QUOTE_TOKEN = address(0xAA58516d932C482469914260268EEA7611BF0eb4);